summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--c++/src/H5Location.cpp1
-rw-r--r--c++/src/H5Object.cpp1
-rw-r--r--configure.ac4
-rw-r--r--src/H5AC.c12
-rw-r--r--src/H5ACmpio.c4
-rw-r--r--src/H5ACprivate.h59
-rw-r--r--src/H5C.c457
-rw-r--r--src/H5Cpkg.h56
-rw-r--r--src/H5Ctag.c29
-rw-r--r--src/H5Dfarray.c2
-rw-r--r--src/H5Dpkg.h6
-rw-r--r--src/H5EA.c4
-rw-r--r--src/H5EAdblkpage.c4
-rw-r--r--src/H5EAhdr.c19
-rw-r--r--src/H5EApkg.h18
-rw-r--r--src/H5FA.c38
-rw-r--r--src/H5FAdblkpage.c4
-rw-r--r--src/H5FAdblock.c32
-rw-r--r--src/H5FAhdr.c8
-rw-r--r--src/H5FScache.c2
-rw-r--r--src/H5Fprivate.h4
-rw-r--r--src/H5Fsuper_cache.c2
-rw-r--r--src/H5HFiblock.c7
-rw-r--r--src/H5HG.c2
-rw-r--r--src/H5O.c16
-rw-r--r--src/H5Oalloc.c29
-rw-r--r--src/H5Ocache.c4
-rw-r--r--src/H5Ocopy.c10
-rw-r--r--src/H5Opkg.h2
-rw-r--r--src/H5SM.c4
-rw-r--r--src/H5Zszip.c2
-rw-r--r--src/H5system.c2
-rw-r--r--test/cache.c9376
-rw-r--r--test/cache_common.c456
-rw-r--r--test/cache_tagging.c238
-rw-r--r--test/evict_on_close.c7
-rw-r--r--test/tmisc.c10
-rw-r--r--tools/lib/h5diff_attr.c147
-rw-r--r--tools/lib/h5tools_str.c1
39 files changed, 5234 insertions, 5845 deletions
diff --git a/c++/src/H5Location.cpp b/c++/src/H5Location.cpp
index c31db02..cb4fd12 100644
--- a/c++/src/H5Location.cpp
+++ b/c++/src/H5Location.cpp
@@ -38,7 +38,6 @@
namespace H5 {
#ifndef DOXYGEN_SHOULD_SKIP_THIS
-
//--------------------------------------------------------------------------
// Function: H5Location default constructor (protected)
// Programmer Binh-Minh Ribler - 2000
diff --git a/c++/src/H5Object.cpp b/c++/src/H5Object.cpp
index 4bce9b1..ab79d9d 100644
--- a/c++/src/H5Object.cpp
+++ b/c++/src/H5Object.cpp
@@ -85,7 +85,6 @@ H5Object::H5Object() : H5Location() {}
//--------------------------------------------------------------------------
// H5Object::H5Object(const H5Object& original) : H5Location() {}
-
//--------------------------------------------------------------------------
// Function: H5Object::createAttribute
///\brief Creates an attribute for a group, dataset, or named datatype.
diff --git a/configure.ac b/configure.ac
index f9d535b..f61c167 100644
--- a/configure.ac
+++ b/configure.ac
@@ -3341,6 +3341,7 @@ AC_CONFIG_FILES([src/libhdf5.settings
tools/test/h5dump/testh5dumppbits.sh
tools/test/h5dump/testh5dumpvds.sh
tools/test/h5dump/testh5dumpxml.sh
+ tools/test/h5ls/Makefile
tools/test/h5ls/testh5ls.sh
tools/test/h5ls/testh5lsvds.sh
tools/test/h5import/Makefile
@@ -3356,15 +3357,14 @@ AC_CONFIG_FILES([src/libhdf5.settings
tools/test/h5repack/Makefile
tools/test/h5repack/h5repack.sh
tools/test/h5repack/h5repack_plugin.sh
- tools/test/h5ls/Makefile
tools/test/h5copy/Makefile
tools/test/h5copy/testh5copy.sh
tools/test/misc/Makefile
tools/test/misc/testh5mkgrp.sh
tools/test/misc/testh5repart.sh
tools/test/misc/vds/Makefile
- tools/test/h5stat/testh5stat.sh
tools/test/h5stat/Makefile
+ tools/test/h5stat/testh5stat.sh
tools/test/perform/Makefile
examples/Makefile
examples/run-c-ex.sh
diff --git a/src/H5AC.c b/src/H5AC.c
index f226c3d..8433e77 100644
--- a/src/H5AC.c
+++ b/src/H5AC.c
@@ -32,7 +32,7 @@
/****************/
#include "H5ACmodule.h" /* This source code file is part of the H5AC module */
-#define H5F_FRIEND /* Suppress error about including H5Fpkg */
+#define H5F_FRIEND /* Suppress error about including H5Fpkg */
/***********/
@@ -880,7 +880,7 @@ H5AC_insert_entry(H5F_t *f, hid_t dxpl_id, const H5AC_class_t *type, haddr_t add
#endif /* H5AC__TRACE_FILE_ENABLED */
#if H5AC_DO_TAGGING_SANITY_CHECKS
- if(!H5C_get_ignore_tags(f->shared->cache) && (H5AC__verify_tag(dxpl_id, type) < 0))
+ if(!H5C_get_ignore_tags(f->shared->cache) && H5AC__verify_tag(dxpl_id, type) < 0)
HGOTO_ERROR(H5E_CACHE, H5E_CANTTAG, FAIL, "Bad tag value")
#endif /* H5AC_DO_TAGGING_SANITY_CHECKS */
@@ -966,8 +966,7 @@ H5AC_mark_entry_dirty(void *thing)
* occult errors.
*/
if(NULL != (trace_file_ptr = H5C_get_trace_file_ptr_from_entry(thing)))
- sprintf(trace, "%s 0x%lx", FUNC,
- (unsigned long)(((H5C_cache_entry_t *)thing)->addr));
+ sprintf(trace, "%s 0x%lx", FUNC, (unsigned long)(entry_ptr->addr));
#endif /* H5AC__TRACE_FILE_ENABLED */
/* Check if log messages are being emitted */
@@ -1291,7 +1290,7 @@ H5AC_protect(H5F_t *f, hid_t dxpl_id, const H5AC_class_t *type, haddr_t addr,
#endif /* H5_HAVE_PARALLEL */
/* Check for invalid access request */
- if((0 == (H5F_INTENT(f) & H5F_ACC_RDWR)) && (0 == (flags & H5C__READ_ONLY_FLAG)))
+ if((0 == (H5F_INTENT(f) & H5F_ACC_RDWR)) && (0 == (flags & H5C__READ_ONLY_FLAG)))
HGOTO_ERROR(H5E_CACHE, H5E_BADVALUE, NULL, "no write intent on file")
#if H5AC__TRACE_FILE_ENABLED
@@ -1305,7 +1304,7 @@ H5AC_protect(H5F_t *f, hid_t dxpl_id, const H5AC_class_t *type, haddr_t addr,
#endif /* H5AC__TRACE_FILE_ENABLED */
#if H5AC_DO_TAGGING_SANITY_CHECKS
- if(!H5C_get_ignore_tags(f->shared->cache) && (H5AC__verify_tag(dxpl_id, type) < 0))
+ if(!H5C_get_ignore_tags(f->shared->cache) && H5AC__verify_tag(dxpl_id, type) < 0)
HGOTO_ERROR(H5E_CACHE, H5E_CANTTAG, NULL, "Bad tag value")
#endif /* H5AC_DO_TAGGING_SANITY_CHECKS */
@@ -2449,7 +2448,6 @@ H5AC_expunge_tag_type_metadata(H5F_t *f, hid_t dxpl_id, haddr_t tag, int type_id
done:
FUNC_LEAVE_NOAPI(ret_value)
-
} /* H5AC_expunge_tag_type_metadata*/
diff --git a/src/H5ACmpio.c b/src/H5ACmpio.c
index e33fc8e..89a8f9d 100644
--- a/src/H5ACmpio.c
+++ b/src/H5ACmpio.c
@@ -730,12 +730,10 @@ H5AC__log_deleted_entry(const H5AC_info_t *entry_ptr)
*
* If mpi_rank is 0, we must first check to see if the entry
* appears in the dirty entries slist. If it is, do nothing.
- * If it isn't, add the size to th dirty_bytes count, add the
+ * If it isn't, add the size to the dirty_bytes count, add the
* entry to the dirty entries slist, and remove it from the
* cleaned list (if it is present there).
*
- * Return SUCCEED on success, and FAIL on failure.
- *
* Return: Non-negative on success/Negative on failure.
*
* Programmer: John Mainzer, 6/29/05
diff --git a/src/H5ACprivate.h b/src/H5ACprivate.h
index c5bf8f3..739cbce 100644
--- a/src/H5ACprivate.h
+++ b/src/H5ACprivate.h
@@ -53,35 +53,35 @@
/* Types of metadata objects cached */
typedef enum {
- H5AC_BT_ID = 0, /* ( 0) B-tree nodes */
- H5AC_SNODE_ID, /* ( 1) symbol table nodes */
- H5AC_LHEAP_PRFX_ID, /* ( 2) local heap prefix */
- H5AC_LHEAP_DBLK_ID, /* ( 3) local heap data block */
- H5AC_GHEAP_ID, /* ( 4) global heap */
- H5AC_OHDR_ID, /* ( 5) object header */
- H5AC_OHDR_CHK_ID, /* ( 6) object header chunk */
- H5AC_BT2_HDR_ID, /* ( 7) v2 B-tree header */
- H5AC_BT2_INT_ID, /* ( 8) v2 B-tree internal node */
- H5AC_BT2_LEAF_ID, /* ( 9) v2 B-tree leaf node */
- H5AC_FHEAP_HDR_ID, /* (10) fractal heap header */
- H5AC_FHEAP_DBLOCK_ID, /* (11) fractal heap direct block */
- H5AC_FHEAP_IBLOCK_ID, /* (12) fractal heap indirect block */
- H5AC_FSPACE_HDR_ID, /* (13) free space header */
- H5AC_FSPACE_SINFO_ID, /* (14) free space sections */
- H5AC_SOHM_TABLE_ID, /* (15) shared object header message master table */
- H5AC_SOHM_LIST_ID, /* (16) shared message index stored as a list */
- H5AC_EARRAY_HDR_ID, /* (17) extensible array header */
- H5AC_EARRAY_IBLOCK_ID, /* (18) extensible array index block */
- H5AC_EARRAY_SBLOCK_ID, /* (19) extensible array super block */
- H5AC_EARRAY_DBLOCK_ID, /* (20) extensible array data block */
- H5AC_EARRAY_DBLK_PAGE_ID, /* (21) extensible array data block page */
- H5AC_FARRAY_HDR_ID, /* (22) fixed array header */
- H5AC_FARRAY_DBLOCK_ID, /* (23) fixed array data block */
- H5AC_FARRAY_DBLK_PAGE_ID, /* (24) fixed array data block page */
- H5AC_SUPERBLOCK_ID, /* (25) file superblock */
- H5AC_DRVRINFO_ID, /* (26) driver info block (supplements superblock) */
- H5AC_TEST_ID, /* (27) test entry -- not used for actual files */
- H5AC_NTYPES /* Number of types, must be last */
+ H5AC_BT_ID = 0, /* ( 0) B-tree nodes */
+ H5AC_SNODE_ID, /* ( 1) symbol table nodes */
+ H5AC_LHEAP_PRFX_ID, /* ( 2) local heap prefix */
+ H5AC_LHEAP_DBLK_ID, /* ( 3) local heap data block */
+ H5AC_GHEAP_ID, /* ( 4) global heap */
+ H5AC_OHDR_ID, /* ( 5) object header */
+ H5AC_OHDR_CHK_ID, /* ( 6) object header chunk */
+ H5AC_BT2_HDR_ID, /* ( 7) v2 B-tree header */
+ H5AC_BT2_INT_ID, /* ( 8) v2 B-tree internal node */
+ H5AC_BT2_LEAF_ID, /* ( 9) v2 B-tree leaf node */
+ H5AC_FHEAP_HDR_ID, /* (10) fractal heap header */
+ H5AC_FHEAP_DBLOCK_ID, /* (11) fractal heap direct block */
+ H5AC_FHEAP_IBLOCK_ID, /* (12) fractal heap indirect block */
+ H5AC_FSPACE_HDR_ID, /* (13) free space header */
+ H5AC_FSPACE_SINFO_ID, /* (14) free space sections */
+ H5AC_SOHM_TABLE_ID, /* (15) shared object header message master table */
+ H5AC_SOHM_LIST_ID, /* (16) shared message index stored as a list */
+ H5AC_EARRAY_HDR_ID, /* (17) extensible array header */
+ H5AC_EARRAY_IBLOCK_ID, /* (18) extensible array index block */
+ H5AC_EARRAY_SBLOCK_ID, /* (19) extensible array super block */
+ H5AC_EARRAY_DBLOCK_ID, /* (20) extensible array data block */
+ H5AC_EARRAY_DBLK_PAGE_ID, /* (21) extensible array data block page */
+ H5AC_FARRAY_HDR_ID, /* (22) fixed array header */
+ H5AC_FARRAY_DBLOCK_ID, /* (23) fixed array data block */
+ H5AC_FARRAY_DBLK_PAGE_ID, /* (24) fixed array data block page */
+ H5AC_SUPERBLOCK_ID, /* (25) file superblock */
+ H5AC_DRVRINFO_ID, /* (26) driver info block (supplements superblock)*/
+ H5AC_TEST_ID, /* (27) test entry -- not used for actual files */
+ H5AC_NTYPES /* Number of types, must be last */
} H5AC_type_t;
/* H5AC_DUMP_STATS_ON_CLOSE should always be FALSE when
@@ -188,7 +188,6 @@ typedef H5C_class_t H5AC_class_t;
/* Cache entry info */
typedef H5C_cache_entry_t H5AC_info_t;
-
/* Typedef for metadata cache (defined in H5Cpkg.h) */
typedef H5C_t H5AC_t;
diff --git a/src/H5C.c b/src/H5C.c
index d122910..8b11755 100644
--- a/src/H5C.c
+++ b/src/H5C.c
@@ -270,26 +270,18 @@ H5C_create(size_t max_cache_size,
HDassert( type_name_table_ptr );
for ( i = 0; i <= max_type_id; i++ ) {
-
HDassert( (type_name_table_ptr)[i] );
HDassert( HDstrlen(( type_name_table_ptr)[i]) > 0 );
}
- if ( NULL == (cache_ptr = H5FL_CALLOC(H5C_t)) ) {
-
- HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, \
- "memory allocation failed")
- }
-
- if ( (cache_ptr->slist_ptr = H5SL_create(H5SL_TYPE_HADDR, NULL)) == NULL ) {
+ if(NULL == (cache_ptr = H5FL_CALLOC(H5C_t)))
+ HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed")
+ if(NULL == (cache_ptr->slist_ptr = H5SL_create(H5SL_TYPE_HADDR, NULL)))
HGOTO_ERROR(H5E_CACHE, H5E_CANTCREATE, NULL, "can't create skip list.")
- }
-
- if ( (cache_ptr->cork_list_ptr = H5SL_create(H5SL_TYPE_HADDR, NULL)) == NULL ) {
+ if ( (cache_ptr->cork_list_ptr = H5SL_create(H5SL_TYPE_HADDR, NULL)) == NULL )
HGOTO_ERROR(H5E_CACHE, H5E_CANTCREATE, NULL, "can't create skip list for corked object addresses.")
- }
/* If we get this far, we should succeed. Go ahead and initialize all
* the fields.
@@ -460,12 +452,9 @@ H5C_create(size_t max_cache_size,
ret_value = cache_ptr;
done:
-
- if ( ret_value == 0 ) {
-
- if ( cache_ptr != NULL ) {
-
- if ( cache_ptr->slist_ptr != NULL )
+ if(NULL == ret_value) {
+ if(cache_ptr != NULL) {
+ if(cache_ptr->slist_ptr != NULL)
H5SL_close(cache_ptr->slist_ptr);
if ( cache_ptr->cork_list_ptr != NULL )
@@ -473,13 +462,10 @@ done:
cache_ptr->magic = 0;
cache_ptr = H5FL_FREE(H5C_t, cache_ptr);
-
} /* end if */
-
} /* end if */
FUNC_LEAVE_NOAPI(ret_value)
-
} /* H5C_create() */
@@ -677,7 +663,8 @@ H5C_def_auto_resize_rpt_fcn(H5C_t * cache_ptr,
*
* Return: Non-negative on success/Negative on failure
*
- * Programmer: Vailin Choi; January 2014
+ * Programmer: Vailin Choi
+ * January 2014
*
*-------------------------------------------------------------------------
*/
@@ -858,8 +845,7 @@ H5C_expunge_entry(H5F_t *f, hid_t dxpl_id, const H5C_class_t *type,
done:
#if H5C_DO_EXTREME_SANITY_CHECKS
if(H5C_validate_lru_list(cache_ptr) < 0)
- HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, \
- "LRU extreme sanity check failed on exit.\n");
+ HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "LRU extreme sanity check failed on exit.\n")
#endif /* H5C_DO_EXTREME_SANITY_CHECKS */
FUNC_LEAVE_NOAPI(ret_value)
@@ -1327,9 +1313,8 @@ H5C_insert_entry(H5F_t * f,
*/
entry_ptr->compressed = FALSE;
entry_ptr->compressed_size = 0;
- if((type->image_len)(thing, &(entry_ptr->size), &(entry_ptr->compressed),
- &(entry_ptr->compressed_size)) < 0)
- HGOTO_ERROR(H5E_RESOURCE, H5E_CANTGETSIZE, FAIL, "Can't get size of thing")
+ if((type->image_len)(thing, &(entry_ptr->size), &(entry_ptr->compressed), &(entry_ptr->compressed_size)) < 0)
+ HGOTO_ERROR(H5E_CACHE, H5E_CANTGETSIZE, FAIL, "Can't get size of thing")
HDassert(entry_ptr->size > 0 && entry_ptr->size < H5C_MAX_ENTRY_SIZE);
HDassert(((type->flags & H5C__CLASS_COMPRESSED_FLAG) != 0) ||
(entry_ptr->compressed == FALSE));
@@ -1338,10 +1323,8 @@ H5C_insert_entry(H5F_t * f,
* been computed yet. Thus if entry_ptr->compressed is TRUE,
* entry_ptr->size must equal entry_ptr->compressed_size.
*/
- HDassert((entry_ptr->compressed == FALSE) ||
- (entry_ptr->size == entry_ptr->compressed_size));
- HDassert((entry_ptr->compressed == TRUE) ||
- (entry_ptr->compressed_size == 0));
+ HDassert(!entry_ptr->compressed || (entry_ptr->size == entry_ptr->compressed_size));
+ HDassert(entry_ptr->compressed || (entry_ptr->compressed_size == 0));
entry_ptr->in_slist = FALSE;
@@ -1378,25 +1361,20 @@ H5C_insert_entry(H5F_t * f,
H5C__RESET_CACHE_ENTRY_STATS(entry_ptr)
- if ( ( cache_ptr->flash_size_increase_possible ) &&
- ( entry_ptr->size > cache_ptr->flash_size_increase_threshold ) ) {
-
+ if(cache_ptr->flash_size_increase_possible &&
+ (entry_ptr->size > cache_ptr->flash_size_increase_threshold))
if(H5C__flash_increase_cache_size(cache_ptr, 0, entry_ptr->size) < 0)
HGOTO_ERROR(H5E_CACHE, H5E_CANTINS, FAIL, "H5C__flash_increase_cache_size failed.")
- }
if(cache_ptr->index_size >= cache_ptr->max_cache_size)
- empty_space = 0;
+ empty_space = 0;
else
- empty_space = cache_ptr->max_cache_size - cache_ptr->index_size;
+ empty_space = cache_ptr->max_cache_size - cache_ptr->index_size;
- if ( ( cache_ptr->evictions_enabled ) &&
- ( ( (cache_ptr->index_size + entry_ptr->size) >
- cache_ptr->max_cache_size)
+ if(cache_ptr->evictions_enabled &&
+ (((cache_ptr->index_size + entry_ptr->size) > cache_ptr->max_cache_size)
||
- ( ( ( empty_space + cache_ptr->clean_index_size ) <
- cache_ptr->min_clean_size ) ) ) ) {
-
+ (((empty_space + cache_ptr->clean_index_size) < cache_ptr->min_clean_size)))) {
size_t space_needed;
if(empty_space <= entry_ptr->size)
@@ -1577,11 +1555,12 @@ H5C_mark_entry_dirty(void *thing)
entry_ptr->dirtied = TRUE;
} else if ( entry_ptr->is_pinned ) {
- hbool_t was_clean;
+ hbool_t was_clean; /* Whether the entry was previously clean */
+ /* Remember previous dirty status */
was_clean = !entry_ptr->is_dirty;
- /* mark the entry as dirty if it isn't already */
+ /* Mark the entry as dirty if it isn't already */
entry_ptr->is_dirty = TRUE;
entry_ptr->image_up_to_date = FALSE;
@@ -1638,56 +1617,40 @@ H5C_move_entry(H5C_t * cache_ptr,
FUNC_ENTER_NOAPI(FAIL)
- HDassert( cache_ptr );
- HDassert( cache_ptr->magic == H5C__H5C_T_MAGIC );
- HDassert( type );
- HDassert( H5F_addr_defined(old_addr) );
- HDassert( H5F_addr_defined(new_addr) );
- HDassert( H5F_addr_ne(old_addr, new_addr) );
+ HDassert(cache_ptr);
+ HDassert(cache_ptr->magic == H5C__H5C_T_MAGIC);
+ HDassert(type);
+ HDassert(H5F_addr_defined(old_addr));
+ HDassert(H5F_addr_defined(new_addr));
+ HDassert(H5F_addr_ne(old_addr, new_addr));
#if H5C_DO_EXTREME_SANITY_CHECKS
- if ( ( H5C_validate_protected_entry_list(cache_ptr) < 0 ) ||
- ( H5C_validate_pinned_entry_list(cache_ptr) < 0 ) ||
- ( H5C_validate_lru_list(cache_ptr) < 0 ) ) {
-
- HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, \
- "an extreme sanity check failed on entry.\n");
- }
+ if((H5C_validate_protected_entry_list(cache_ptr) < 0) ||
+ (H5C_validate_pinned_entry_list(cache_ptr) < 0) ||
+ (H5C_validate_lru_list(cache_ptr) < 0))
+ HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "an extreme sanity check failed on entry.\n")
#endif /* H5C_DO_EXTREME_SANITY_CHECKS */
H5C__SEARCH_INDEX(cache_ptr, old_addr, entry_ptr, FAIL)
- if ( ( entry_ptr == NULL ) || ( entry_ptr->type != type ) ) {
-
+ if(entry_ptr == NULL || entry_ptr->type != type)
/* the old item doesn't exist in the cache, so we are done. */
HGOTO_DONE(SUCCEED)
- }
- HDassert( entry_ptr->addr == old_addr );
- HDassert( entry_ptr->type == type );
-
- if ( entry_ptr->is_protected ) {
+ HDassert(entry_ptr->addr == old_addr);
+ HDassert(entry_ptr->type == type);
- HGOTO_ERROR(H5E_CACHE, H5E_CANTMOVE, FAIL, \
- "Target entry is protected.")
- }
+ if(entry_ptr->is_protected)
+ HGOTO_ERROR(H5E_CACHE, H5E_CANTMOVE, FAIL, "target entry is protected.")
H5C__SEARCH_INDEX(cache_ptr, new_addr, test_entry_ptr, FAIL)
- if ( test_entry_ptr != NULL ) { /* we are hosed */
-
- if ( test_entry_ptr->type == type ) {
-
- HGOTO_ERROR(H5E_CACHE, H5E_CANTMOVE, FAIL, \
- "Target already moved & reinserted???.")
-
- } else {
-
- HGOTO_ERROR(H5E_CACHE, H5E_CANTMOVE, FAIL, \
- "New address already in use?.")
-
- }
- }
+ if(test_entry_ptr != NULL) { /* we are hosed */
+ if(test_entry_ptr->type == type)
+ HGOTO_ERROR(H5E_CACHE, H5E_CANTMOVE, FAIL, "target already moved & reinserted???")
+ else
+ HGOTO_ERROR(H5E_CACHE, H5E_CANTMOVE, FAIL, "new address already in use?")
+ } /* end if */
/* If we get this far we have work to do. Remove *entry_ptr from
* the hash table (and skip list if necessary), change its address to the
@@ -1704,31 +1667,29 @@ H5C_move_entry(H5C_t * cache_ptr,
* change the addr. If the entry is only in the process of being flushed,
* don't mark it as dirty either, lest we confuse the flush call back.
*/
-
- if ( ! ( entry_ptr->destroy_in_progress ) ) {
-
+ if(!entry_ptr->destroy_in_progress) {
H5C__DELETE_FROM_INDEX(cache_ptr, entry_ptr)
- if ( entry_ptr->in_slist ) {
-
- HDassert( cache_ptr->slist_ptr );
+ if(entry_ptr->in_slist) {
+ HDassert(cache_ptr->slist_ptr);
H5C__REMOVE_ENTRY_FROM_SLIST(cache_ptr, entry_ptr)
#if H5C_DO_SANITY_CHECKS
-
removed_entry_from_slist = TRUE;
-
#endif /* H5C_DO_SANITY_CHECKS */
- }
- }
+ } /* end if */
+ } /* end if */
entry_ptr->addr = new_addr;
if(!entry_ptr->destroy_in_progress) {
- hbool_t was_dirty;
+ hbool_t was_dirty; /* Whether the entry was previously dirty */
+ /* Remember previous dirty status */
was_dirty = entry_ptr->is_dirty;
+
+ /* Mark the entry as dirty if it isn't already */
entry_ptr->is_dirty = TRUE;
/* This shouldn't be needed, but it keeps the test code happy */
@@ -1743,7 +1704,6 @@ H5C_move_entry(H5C_t * cache_ptr,
} /* end if */
H5C__INSERT_IN_INDEX(cache_ptr, entry_ptr, FAIL)
-
H5C__INSERT_ENTRY_IN_SLIST(cache_ptr, entry_ptr, FAIL)
#if H5C_DO_SANITY_CHECKS
@@ -1759,7 +1719,7 @@ H5C_move_entry(H5C_t * cache_ptr,
#endif /* H5C_DO_SANITY_CHECKS */
if(!entry_ptr->flush_in_progress) {
- /* skip the update if a flush is in progress */
+ /* Update the replacement policy for the entry */
H5C__UPDATE_RP_FOR_MOVE(cache_ptr, entry_ptr, was_dirty, FAIL)
}
} /* end if */
@@ -1768,13 +1728,10 @@ H5C_move_entry(H5C_t * cache_ptr,
done:
#if H5C_DO_EXTREME_SANITY_CHECKS
- if ( ( H5C_validate_protected_entry_list(cache_ptr) < 0 ) ||
- ( H5C_validate_pinned_entry_list(cache_ptr) < 0 ) ||
- ( H5C_validate_lru_list(cache_ptr) < 0 ) ) {
-
- HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, \
- "an extreme sanity check failed on exit.\n");
- }
+ if((H5C_validate_protected_entry_list(cache_ptr) < 0) ||
+ (H5C_validate_pinned_entry_list(cache_ptr) < 0) ||
+ (H5C_validate_lru_list(cache_ptr) < 0))
+ HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "an extreme sanity check failed on exit.\n")
#endif /* H5C_DO_EXTREME_SANITY_CHECKS */
FUNC_LEAVE_NOAPI(ret_value)
@@ -1884,14 +1841,12 @@ H5C_resize_entry(void *thing, size_t new_size)
#endif /* H5_HAVE_PARALLEL */
/* update the hash table */
- H5C__UPDATE_INDEX_FOR_SIZE_CHANGE((cache_ptr), (entry_ptr->size),\
- (new_size), (entry_ptr), (was_clean));
+ H5C__UPDATE_INDEX_FOR_SIZE_CHANGE(cache_ptr, entry_ptr->size, \
+ new_size, entry_ptr, was_clean);
/* if the entry is in the skip list, update that too */
- if ( entry_ptr->in_slist ) {
- H5C__UPDATE_SLIST_FOR_SIZE_CHANGE((cache_ptr), (entry_ptr->size),\
- (new_size));
- } /* end if */
+ if(entry_ptr->in_slist)
+ H5C__UPDATE_SLIST_FOR_SIZE_CHANGE(cache_ptr, entry_ptr->size, new_size);
/* update statistics just before changing the entry size */
H5C__UPDATE_STATS_FOR_ENTRY_SIZE_CHANGE((cache_ptr), (entry_ptr), \
@@ -1900,13 +1855,11 @@ H5C_resize_entry(void *thing, size_t new_size)
/* finally, update the entry size proper */
entry_ptr->size = new_size;
- if(!entry_ptr->in_slist) {
+ if(!entry_ptr->in_slist)
H5C__INSERT_ENTRY_IN_SLIST(cache_ptr, entry_ptr, FAIL)
- } /* end if */
- if(entry_ptr->is_pinned) {
+ if(entry_ptr->is_pinned)
H5C__UPDATE_STATS_FOR_DIRTY_PIN(cache_ptr, entry_ptr)
- } /* end if */
} /* end if */
done:
@@ -2536,7 +2489,6 @@ H5C_protect(H5F_t * f,
#endif /* H5_HAVE_PARALLEL */
done:
-
#if H5C_DO_EXTREME_SANITY_CHECKS
if ( ( H5C_validate_protected_entry_list(cache_ptr) < 0 ) ||
( H5C_validate_pinned_entry_list(cache_ptr) < 0 ) ||
@@ -2545,7 +2497,6 @@ done:
#endif /* H5C_DO_EXTREME_SANITY_CHECKS */
FUNC_LEAVE_NOAPI(ret_value)
-
} /* H5C_protect() */
@@ -2568,18 +2519,14 @@ H5C_reset_cache_hit_rate_stats(H5C_t * cache_ptr)
FUNC_ENTER_NOAPI(FAIL)
- if ( ( cache_ptr == NULL ) || ( cache_ptr->magic != H5C__H5C_T_MAGIC ) ) {
-
- HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "Bad cache_ptr on entry.")
- }
+ if((cache_ptr == NULL) || (cache_ptr->magic != H5C__H5C_T_MAGIC))
+ HGOTO_ERROR(H5E_CACHE, H5E_BADVALUE, FAIL, "bad cache_ptr on entry.")
cache_ptr->cache_hits = 0;
cache_ptr->cache_accesses = 0;
done:
-
FUNC_LEAVE_NOAPI(ret_value)
-
} /* H5C_reset_cache_hit_rate_stats() */
@@ -2606,137 +2553,95 @@ herr_t
H5C_set_cache_auto_resize_config(H5C_t *cache_ptr,
H5C_auto_size_ctl_t *config_ptr)
{
- herr_t result;
size_t new_max_cache_size;
size_t new_min_clean_size;
herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI(FAIL)
- if ( ( cache_ptr == NULL ) || ( cache_ptr->magic != H5C__H5C_T_MAGIC ) ) {
-
- HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "Bad cache_ptr on entry.")
- }
-
- if ( config_ptr == NULL ) {
-
+ if((cache_ptr == NULL) || (cache_ptr->magic != H5C__H5C_T_MAGIC))
+ HGOTO_ERROR(H5E_CACHE, H5E_BADVALUE, FAIL, "bad cache_ptr on entry.")
+ if(config_ptr == NULL)
HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "NULL config_ptr on entry.")
- }
-
- if ( config_ptr->version != H5C__CURR_AUTO_SIZE_CTL_VER ) {
-
- HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "Unknown config version.")
- }
+ if(config_ptr->version != H5C__CURR_AUTO_SIZE_CTL_VER)
+ HGOTO_ERROR(H5E_CACHE, H5E_BADVALUE, FAIL, "unknown config version.")
/* check general configuration section of the config: */
- if ( SUCCEED != H5C_validate_resize_config(config_ptr,
- H5C_RESIZE_CFG__VALIDATE_GENERAL) ) {
-
- HGOTO_ERROR(H5E_ARGS, H5E_BADRANGE, FAIL, \
- "error in general configuration fields of new config.")
- }
+ if(H5C_validate_resize_config(config_ptr, H5C_RESIZE_CFG__VALIDATE_GENERAL) < 0)
+ HGOTO_ERROR(H5E_ARGS, H5E_BADRANGE, FAIL, "error in general configuration fields of new config.")
/* check size increase control fields of the config: */
- if ( SUCCEED != H5C_validate_resize_config(config_ptr,
- H5C_RESIZE_CFG__VALIDATE_INCREMENT) ) {
-
- HGOTO_ERROR(H5E_ARGS, H5E_BADRANGE, FAIL, \
- "error in the size increase control fields of new config.")
- }
+ if(H5C_validate_resize_config(config_ptr, H5C_RESIZE_CFG__VALIDATE_INCREMENT) < 0)
+ HGOTO_ERROR(H5E_ARGS, H5E_BADRANGE, FAIL, "error in the size increase control fields of new config.")
/* check size decrease control fields of the config: */
- if ( SUCCEED != H5C_validate_resize_config(config_ptr,
- H5C_RESIZE_CFG__VALIDATE_DECREMENT) ) {
-
- HGOTO_ERROR(H5E_ARGS, H5E_BADRANGE, FAIL, \
- "error in the size decrease control fields of new config.")
- }
+ if(H5C_validate_resize_config(config_ptr, H5C_RESIZE_CFG__VALIDATE_DECREMENT) < 0)
+ HGOTO_ERROR(H5E_ARGS, H5E_BADRANGE, FAIL, "error in the size decrease control fields of new config.")
/* check for conflicts between size increase and size decrease controls: */
- if ( SUCCEED != H5C_validate_resize_config(config_ptr,
- H5C_RESIZE_CFG__VALIDATE_INTERACTIONS) ) {
-
- HGOTO_ERROR(H5E_ARGS, H5E_BADRANGE, FAIL, \
- "conflicting threshold fields in new config.")
- }
+ if(H5C_validate_resize_config(config_ptr, H5C_RESIZE_CFG__VALIDATE_INTERACTIONS) < 0)
+ HGOTO_ERROR(H5E_ARGS, H5E_BADRANGE, FAIL, "conflicting threshold fields in new config.")
/* will set the increase possible fields to FALSE later if needed */
cache_ptr->size_increase_possible = TRUE;
cache_ptr->flash_size_increase_possible = TRUE;
cache_ptr->size_decrease_possible = TRUE;
- switch ( config_ptr->incr_mode )
- {
+ switch(config_ptr->incr_mode) {
case H5C_incr__off:
cache_ptr->size_increase_possible = FALSE;
break;
case H5C_incr__threshold:
- if ( ( config_ptr->lower_hr_threshold <= (double)0.0f ) ||
- ( config_ptr->increment <= (double)1.0f ) ||
- ( ( config_ptr->apply_max_increment ) &&
- ( config_ptr->max_increment <= 0 ) ) ) {
-
+ if((config_ptr->lower_hr_threshold <= (double)0.0f) ||
+ (config_ptr->increment <= (double)1.0f) ||
+ ((config_ptr->apply_max_increment) && (config_ptr->max_increment <= 0)))
cache_ptr->size_increase_possible = FALSE;
- }
break;
default: /* should be unreachable */
HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "Unknown incr_mode?!?!?.")
- }
+ } /* end switch */
/* logically, this is were configuration for flash cache size increases
* should go. However, this configuration depends on max_cache_size, so
* we wait until the end of the function, when this field is set.
*/
- switch ( config_ptr->decr_mode )
- {
+ switch(config_ptr->decr_mode) {
case H5C_decr__off:
cache_ptr->size_decrease_possible = FALSE;
break;
case H5C_decr__threshold:
- if ( ( config_ptr->upper_hr_threshold >= (double)1.0f ) ||
- ( config_ptr->decrement >= (double)1.0f ) ||
- ( ( config_ptr->apply_max_decrement ) &&
- ( config_ptr->max_decrement <= 0 ) ) ) {
-
+ if((config_ptr->upper_hr_threshold >= (double)1.0f) ||
+ (config_ptr->decrement >= (double)1.0f) ||
+ ((config_ptr->apply_max_decrement) && (config_ptr->max_decrement <= 0)))
cache_ptr->size_decrease_possible = FALSE;
- }
break;
case H5C_decr__age_out:
- if ( ( ( config_ptr->apply_empty_reserve ) &&
- ( config_ptr->empty_reserve >= (double)1.0f ) ) ||
- ( ( config_ptr->apply_max_decrement ) &&
- ( config_ptr->max_decrement <= 0 ) ) ) {
-
+ if(((config_ptr->apply_empty_reserve) && (config_ptr->empty_reserve >= (double)1.0f)) ||
+ ((config_ptr->apply_max_decrement) && (config_ptr->max_decrement <= 0)))
cache_ptr->size_decrease_possible = FALSE;
- }
break;
case H5C_decr__age_out_with_threshold:
- if ( ( ( config_ptr->apply_empty_reserve ) &&
- ( config_ptr->empty_reserve >= (double)1.0f ) ) ||
- ( ( config_ptr->apply_max_decrement ) &&
- ( config_ptr->max_decrement <= 0 ) ) ||
- ( config_ptr->upper_hr_threshold >= (double)1.0f ) ) {
-
+ if(((config_ptr->apply_empty_reserve) && (config_ptr->empty_reserve >= (double)1.0f)) ||
+ ((config_ptr->apply_max_decrement) && (config_ptr->max_decrement <= 0)) ||
+ (config_ptr->upper_hr_threshold >= (double)1.0f))
cache_ptr->size_decrease_possible = FALSE;
- }
break;
default: /* should be unreachable */
HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "Unknown decr_mode?!?!?.")
- }
-
- if ( config_ptr->max_size == config_ptr->min_size ) {
+ } /* end switch */
+ if(config_ptr->max_size == config_ptr->min_size) {
cache_ptr->size_increase_possible = FALSE;
cache_ptr->flash_size_increase_possible = FALSE;
cache_ptr->size_decrease_possible = FALSE;
- }
+ } /* end if */
/* flash_size_increase_possible is intentionally omitted from the
* following:
@@ -2754,25 +2659,16 @@ H5C_set_cache_auto_resize_config(H5C_t *cache_ptr,
* go through the exercise even if the current size is within
* range and an initial size has not been provided.
*/
- if ( (cache_ptr->resize_ctl).set_initial_size ) {
-
- new_max_cache_size = (cache_ptr->resize_ctl).initial_size;
- }
- else if ( cache_ptr->max_cache_size > (cache_ptr->resize_ctl).max_size ) {
-
- new_max_cache_size = (cache_ptr->resize_ctl).max_size;
- }
- else if ( cache_ptr->max_cache_size < (cache_ptr->resize_ctl).min_size ) {
-
- new_max_cache_size = (cache_ptr->resize_ctl).min_size;
-
- } else {
-
+ if(cache_ptr->resize_ctl.set_initial_size)
+ new_max_cache_size = cache_ptr->resize_ctl.initial_size;
+ else if(cache_ptr->max_cache_size > cache_ptr->resize_ctl.max_size)
+ new_max_cache_size = cache_ptr->resize_ctl.max_size;
+ else if(cache_ptr->max_cache_size < cache_ptr->resize_ctl.min_size)
+ new_max_cache_size = cache_ptr->resize_ctl.min_size;
+ else
new_max_cache_size = cache_ptr->max_cache_size;
- }
- new_min_clean_size = (size_t)
- ((double)new_max_cache_size *
+ new_min_clean_size = (size_t)((double)new_max_cache_size *
((cache_ptr->resize_ctl).min_clean_fraction));
@@ -2782,50 +2678,30 @@ H5C_set_cache_auto_resize_config(H5C_t *cache_ptr,
*
* by definition.
*/
- HDassert( new_min_clean_size <= new_max_cache_size );
- HDassert( (cache_ptr->resize_ctl).min_size <= new_max_cache_size );
- HDassert( new_max_cache_size <= (cache_ptr->resize_ctl).max_size );
-
- if ( new_max_cache_size < cache_ptr->max_cache_size ) {
+ HDassert(new_min_clean_size <= new_max_cache_size);
+ HDassert(cache_ptr->resize_ctl.min_size <= new_max_cache_size);
+ HDassert(new_max_cache_size <= cache_ptr->resize_ctl.max_size);
+ if(new_max_cache_size < cache_ptr->max_cache_size)
cache_ptr->size_decreased = TRUE;
- }
cache_ptr->max_cache_size = new_max_cache_size;
cache_ptr->min_clean_size = new_min_clean_size;
- if ( H5C_reset_cache_hit_rate_stats(cache_ptr) != SUCCEED ) {
-
+ if(H5C_reset_cache_hit_rate_stats(cache_ptr) < 0)
/* this should be impossible... */
- HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, \
- "H5C_reset_cache_hit_rate_stats failed.")
- }
+ HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "H5C_reset_cache_hit_rate_stats failed.")
/* remove excess epoch markers if any */
- if ( ( config_ptr->decr_mode == H5C_decr__age_out_with_threshold ) ||
- ( config_ptr->decr_mode == H5C_decr__age_out ) ) {
-
- if ( cache_ptr->epoch_markers_active >
- (cache_ptr->resize_ctl).epochs_before_eviction ) {
-
- result =
- H5C__autoadjust__ageout__remove_excess_markers(cache_ptr);
-
- if ( result != SUCCEED ) {
-
- HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, \
- "can't remove excess epoch markers.")
- }
- }
- } else if ( cache_ptr->epoch_markers_active > 0 ) {
-
- result = H5C__autoadjust__ageout__remove_all_markers(cache_ptr);
-
- if ( result != SUCCEED ) {
-
- HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, \
- "error removing all epoch markers.")
- }
+ if((config_ptr->decr_mode == H5C_decr__age_out_with_threshold) ||
+ (config_ptr->decr_mode == H5C_decr__age_out)) {
+ if(cache_ptr->epoch_markers_active > cache_ptr->resize_ctl.epochs_before_eviction)
+ if(H5C__autoadjust__ageout__remove_excess_markers(cache_ptr) < 0)
+ HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "can't remove excess epoch markers.")
+ } /* end if */
+ else if(cache_ptr->epoch_markers_active > 0) {
+ if(H5C__autoadjust__ageout__remove_all_markers(cache_ptr) < 0)
+ HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "error removing all epoch markers.")
}
/* configure flash size increase facility. We wait until the
@@ -2836,33 +2712,26 @@ H5C_set_cache_auto_resize_config(H5C_t *cache_ptr,
* go ahead and configure it.
*/
- if ( cache_ptr->flash_size_increase_possible ) {
-
- switch ( config_ptr->flash_incr_mode )
- {
+ if(cache_ptr->flash_size_increase_possible) {
+ switch(config_ptr->flash_incr_mode) {
case H5C_flash_incr__off:
cache_ptr->flash_size_increase_possible = FALSE;
break;
case H5C_flash_incr__add_space:
cache_ptr->flash_size_increase_possible = TRUE;
- cache_ptr->flash_size_increase_threshold =
- (size_t)
- (((double)(cache_ptr->max_cache_size)) *
+ cache_ptr->flash_size_increase_threshold = (size_t)(((double)(cache_ptr->max_cache_size)) *
((cache_ptr->resize_ctl).flash_threshold));
break;
default: /* should be unreachable */
- HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, \
- "Unknown flash_incr_mode?!?!?.")
+ HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "Unknown flash_incr_mode?!?!?.")
break;
- }
- }
+ } /* end switch */
+ } /* end if */
done:
-
FUNC_LEAVE_NOAPI(ret_value)
-
} /* H5C_set_cache_auto_resize_config() */
@@ -4470,10 +4339,8 @@ H5C__autoadjust__ageout__evict_aged_out_entries(H5F_t * f,
next_ptr = entry_ptr->next;
prev_ptr = entry_ptr->prev;
- if ( prev_ptr != NULL ) {
-
+ if(prev_ptr != NULL)
prev_is_dirty = prev_ptr->is_dirty;
- }
/* dirty corked entry is skipped */
if(entry_ptr->is_corked && entry_ptr->is_dirty)
@@ -5356,6 +5223,7 @@ H5C_flush_invalidate_ring(const H5F_t * f, hid_t dxpl_id, H5C_ring_t ring,
* slist if we find them. However, best we do some extra
* sanity checking just in case.
*/
+ HDassert(entry_ptr != NULL);
HDassert(entry_ptr->magic == H5C__H5C_CACHE_ENTRY_T_MAGIC);
HDassert(entry_ptr->in_slist);
HDassert(entry_ptr->is_dirty);
@@ -5388,9 +5256,6 @@ H5C_flush_invalidate_ring(const H5F_t * f, hid_t dxpl_id, H5C_ring_t ring,
* flush, we must keep the slist in cannonical form at all
* times.
*/
- HDassert(entry_ptr != NULL);
- HDassert(entry_ptr->in_slist);
-
if(((!entry_ptr->flush_me_last) ||
((entry_ptr->flush_me_last) &&
(cache_ptr->num_last_entries >= cache_ptr->slist_len))) &&
@@ -5510,7 +5375,7 @@ H5C_flush_invalidate_ring(const H5F_t * f, hid_t dxpl_id, H5C_ring_t ring,
* It used to be that all entries remaining in the cache at
* this point had to be clean, but with the fractal heap mods
* this may not be the case. If so, we will flush entries out
- * of increasing address order.
+ * in increasing address order.
*
* Writes to disk are possible here.
*/
@@ -5864,7 +5729,7 @@ H5C_flush_ring(H5F_t *f, hid_t dxpl_id, H5C_ring_t ring, unsigned flags)
if(!flush_marked_entries || entry_ptr->flush_marker)
HDassert(entry_ptr->ring >= ring);
- /* increment node pointer now, before we delete its target
+ /* advance node pointer now, before we delete its target
* from the slist.
*/
node_ptr = H5SL_next(node_ptr);
@@ -6225,7 +6090,7 @@ H5C__flush_single_entry(const H5F_t *f, hid_t dxpl_id, H5C_cache_entry_t *entry_
* just flushed the entry.
*/
if(entry_ptr->type->notify &&
- (entry_ptr->type->notify)(H5C_NOTIFY_ACTION_AFTER_FLUSH, entry_ptr) < 0 )
+ (entry_ptr->type->notify)(H5C_NOTIFY_ACTION_AFTER_FLUSH, entry_ptr) < 0 )
HGOTO_ERROR(H5E_CACHE, H5E_CANTNOTIFY, FAIL, "can't notify client of entry flush")
} /* if ( write_entry ) */
@@ -6250,25 +6115,25 @@ H5C__flush_single_entry(const H5F_t *f, hid_t dxpl_id, H5C_cache_entry_t *entry_
H5C__UPDATE_STATS_FOR_FLUSH(cache_ptr, entry_ptr)
} /* end else if */
+ /* Update the cache internal data structures. */
if(destroy) {
+ /* Sanity checks */
if(take_ownership)
HDassert(!destroy_entry);
else
HDassert(destroy_entry);
+ HDassert(!entry_ptr->is_pinned);
+ /* Update stats, while entry is still in the cache */
H5C__UPDATE_STATS_FOR_EVICTION(cache_ptr, entry_ptr, take_ownership)
- } /* end if */
- /* If the entry's type has a 'notify' callback and the entry is about
- * to be removed from the cache, send a 'before eviction' notice while
- * the entry is still fully integrated in the cache.
- */
- if(destroy)
+ /* If the entry's type has a 'notify' callback and the entry is about
+ * to be removed from the cache, send a 'before eviction' notice while
+ * the entry is still fully integrated in the cache.
+ */
if(entry_ptr->type->notify && (entry_ptr->type->notify)(H5C_NOTIFY_ACTION_BEFORE_EVICT, entry_ptr) < 0)
HGOTO_ERROR(H5E_CACHE, H5E_CANTNOTIFY, FAIL, "can't notify client about entry to evict")
- /* Update the cache internal data structures. */
- if(destroy) {
/* Update the cache internal data structures as appropriate
* for a destroy. Specifically:
*
@@ -6326,12 +6191,11 @@ H5C__flush_single_entry(const H5F_t *f, hid_t dxpl_id, H5C_cache_entry_t *entry_
* appropriate */
if(was_dirty) {
HDassert(entry_ptr->flush_dep_ndirty_children == 0);
-
if(entry_ptr->flush_dep_nparents > 0)
if(H5C__mark_flush_dep_clean(entry_ptr) < 0)
HGOTO_ERROR(H5E_CACHE, H5E_CANTMARKDIRTY, FAIL, "Can't propagate flush dep clean flag")
} /* end if */
- }
+ } /* end else */
/* reset the flush_in progress flag */
entry_ptr->flush_in_progress = FALSE;
@@ -6346,7 +6210,10 @@ H5C__flush_single_entry(const H5F_t *f, hid_t dxpl_id, H5C_cache_entry_t *entry_
* Now discard the entry if appropriate.
*/
if(destroy) {
- /* start by freeing the buffer for the on disk image */
+ /* Sanity check */
+ HDassert(0 == entry_ptr->flush_dep_nparents);
+
+ /* Start by freeing the buffer for the on disk image */
if(entry_ptr->image_ptr != NULL)
entry_ptr->image_ptr = H5MM_xfree(entry_ptr->image_ptr);
@@ -6360,17 +6227,17 @@ H5C__flush_single_entry(const H5F_t *f, hid_t dxpl_id, H5C_cache_entry_t *entry_
HDassert(H5F_addr_defined(entry_ptr->addr));
HDassert(!H5F_IS_TMP_ADDR(f, entry_ptr->addr));
#ifndef NDEBUG
-{
- hbool_t curr_compressed = FALSE;
- size_t curr_len;
- size_t curr_compressed_len = 0;
-
- /* Get the actual image size for the thing again */
- entry_ptr->type->image_len((void *)entry_ptr, &curr_len, &curr_compressed, &curr_compressed_len);
- HDassert(curr_len == entry_ptr->size);
- HDassert(curr_compressed == entry_ptr->compressed);
- HDassert(curr_compressed_len == entry_ptr->compressed_size);
-}
+ {
+ hbool_t curr_compressed = FALSE;
+ size_t curr_len;
+ size_t curr_compressed_len = 0;
+
+ /* Get the actual image size for the thing again */
+ entry_ptr->type->image_len((void *)entry_ptr, &curr_len, &curr_compressed, &curr_compressed_len);
+ HDassert(curr_len == entry_ptr->size);
+ HDassert(curr_compressed == entry_ptr->compressed);
+ HDassert(curr_compressed_len == entry_ptr->compressed_size);
+ }
#endif /* NDEBUG */
/* if the file space free size callback is defined, use
@@ -6438,7 +6305,7 @@ H5C__flush_single_entry(const H5F_t *f, hid_t dxpl_id, H5C_cache_entry_t *entry_
if(entry_ptr->type->free_icr((void *)entry_ptr) < 0)
HGOTO_ERROR(H5E_CACHE, H5E_CANTFLUSH, FAIL, "free_icr callback failed.")
- }
+ } /* end if */
else {
HDassert(take_ownership);
@@ -6447,7 +6314,7 @@ H5C__flush_single_entry(const H5F_t *f, hid_t dxpl_id, H5C_cache_entry_t *entry_
* unless the entry is re-inserted properly
*/
entry_ptr->magic = H5C__H5C_CACHE_ENTRY_T_BAD_MAGIC;
- }
+ } /* end else */
} /* if (destroy) */
if(cache_ptr->log_flush)
@@ -7020,10 +6887,8 @@ H5C_make_space_in_cache(H5F_t * f,
next_ptr = entry_ptr->next;
prev_ptr = entry_ptr->prev;
- if ( prev_ptr != NULL ) {
-
+ if(prev_ptr != NULL)
prev_is_dirty = prev_ptr->is_dirty;
- }
if (entry_ptr->is_corked && entry_ptr->is_dirty) {
@@ -7742,12 +7607,13 @@ done:
* Return: Success: Non-negative
* Failure: Negative
*
- * Programmer: Vailin Choi; January 2014
+ * Programmer: Vailin Choi
+ * January 2014
*
*-------------------------------------------------------------------------
*/
herr_t
-H5C_cork(H5C_t * cache_ptr, haddr_t obj_addr, unsigned action, hbool_t *corked)
+H5C_cork(H5C_t *cache_ptr, haddr_t obj_addr, unsigned action, hbool_t *corked)
{
haddr_t *ptr; /* Points to an address */
herr_t ret_value = SUCCEED; /* Return value */
@@ -8171,7 +8037,6 @@ H5C__generate_image(const H5F_t *f, H5C_t *cache_ptr, H5C_cache_entry_t *entry_p
HDassert(0 == HDmemcmp(((uint8_t *)entry_ptr->image_ptr) + image_len,
H5C_IMAGE_SANITY_VALUE, H5C_IMAGE_EXTRA_SPACE));
#endif /* H5C_DO_MEMORY_SANITY_CHECKS */
-
entry_ptr->image_up_to_date = TRUE;
} /* end block */
diff --git a/src/H5Cpkg.h b/src/H5Cpkg.h
index 92f4cdd..c8f5c00 100644
--- a/src/H5Cpkg.h
+++ b/src/H5Cpkg.h
@@ -524,21 +524,17 @@ if ( ( (entry_ptr) == NULL ) || \
(cache_ptr)->max_pel_size = (cache_ptr)->pel_size;
#define H5C__UPDATE_STATS_FOR_MOVE(cache_ptr, entry_ptr) \
- if ( cache_ptr->flush_in_progress ) { \
+ if ( cache_ptr->flush_in_progress ) \
((cache_ptr)->cache_flush_moves[(entry_ptr)->type->id])++; \
- } \
- if ( entry_ptr->flush_in_progress ) { \
+ if ( entry_ptr->flush_in_progress ) \
((cache_ptr)->entry_flush_moves[(entry_ptr)->type->id])++; \
- } \
(((cache_ptr)->moves)[(entry_ptr)->type->id])++;
#define H5C__UPDATE_STATS_FOR_ENTRY_SIZE_CHANGE(cache_ptr, entry_ptr, new_size)\
- if ( cache_ptr->flush_in_progress ) { \
+ if ( cache_ptr->flush_in_progress ) \
((cache_ptr)->cache_flush_size_changes[(entry_ptr)->type->id])++; \
- } \
- if ( entry_ptr->flush_in_progress ) { \
+ if ( entry_ptr->flush_in_progress ) \
((cache_ptr)->entry_flush_size_changes[(entry_ptr)->type->id])++; \
- } \
if ( (entry_ptr)->size < (new_size) ) { \
((cache_ptr)->size_increases[(entry_ptr)->type->id])++; \
H5C__UPDATE_MAX_INDEX_SIZE_STATS(cache_ptr) \
@@ -1002,7 +998,6 @@ if ( ( (cache_ptr) == NULL ) || \
( (cache_ptr)->index_size <= 0 ) || \
( (new_size) <= 0 ) || \
( (old_size) > (cache_ptr)->index_size ) || \
- ( (new_size) <= 0 ) || \
( ( (cache_ptr)->index_len == 1 ) && \
( (cache_ptr)->index_size != (old_size) ) ) || \
( (cache_ptr)->index_size != \
@@ -1175,19 +1170,17 @@ if ( ( (cache_ptr)->index_size != \
int k; \
H5C__PRE_HT_INSERT_SC(cache_ptr, entry_ptr, fail_val) \
k = H5C__HASH_FCN((entry_ptr)->addr); \
- if ( ((cache_ptr)->index)[k] == NULL ) \
- ((cache_ptr)->index)[k] = (entry_ptr); \
- else { \
+ if(((cache_ptr)->index)[k] != NULL) { \
(entry_ptr)->ht_next = ((cache_ptr)->index)[k]; \
(entry_ptr)->ht_next->ht_prev = (entry_ptr); \
- ((cache_ptr)->index)[k] = (entry_ptr); \
} \
+ ((cache_ptr)->index)[k] = (entry_ptr); \
(cache_ptr)->index_len++; \
(cache_ptr)->index_size += (entry_ptr)->size; \
((cache_ptr)->index_ring_len[entry_ptr->ring])++; \
((cache_ptr)->index_ring_size[entry_ptr->ring]) \
- += (entry_ptr)->size; \
- if ( (entry_ptr)->is_dirty ) { \
+ += (entry_ptr)->size; \
+ if((entry_ptr)->is_dirty) { \
(cache_ptr)->dirty_index_size += (entry_ptr)->size; \
((cache_ptr)->dirty_index_ring_size[entry_ptr->ring]) \
+= (entry_ptr)->size; \
@@ -1221,8 +1214,8 @@ if ( ( (cache_ptr)->index_size != \
(cache_ptr)->index_size -= (entry_ptr)->size; \
((cache_ptr)->index_ring_len[entry_ptr->ring])--; \
((cache_ptr)->index_ring_size[entry_ptr->ring]) \
- -= (entry_ptr)->size; \
- if ( (entry_ptr)->is_dirty ) { \
+ -= (entry_ptr)->size; \
+ if((entry_ptr)->is_dirty) { \
(cache_ptr)->dirty_index_size -= (entry_ptr)->size; \
((cache_ptr)->dirty_index_ring_size[entry_ptr->ring]) \
-= (entry_ptr)->size; \
@@ -1231,7 +1224,7 @@ if ( ( (cache_ptr)->index_size != \
((cache_ptr)->clean_index_ring_size[entry_ptr->ring]) \
-= (entry_ptr)->size; \
} \
- if ((entry_ptr)->flush_me_last) { \
+ if((entry_ptr)->flush_me_last) { \
(cache_ptr)->num_last_entries--; \
HDassert((cache_ptr)->num_last_entries <= 1); \
} \
@@ -1506,31 +1499,6 @@ if ( ( (cache_ptr)->index_size != \
*
* Programmer: John Mainzer, 5/10/04
*
- * Modifications:
- *
- * JRM -- 7/21/04
- * Updated function for the addition of the hash table.
- *
- * JRM - 7/27/04
- * Converted from the function H5C_remove_entry_from_tree()
- * to the macro H5C__REMOVE_ENTRY_FROM_TREE in the hopes of
- * wringing a little more performance out of the cache.
- *
- * QAK -- 11/27/04
- * Switched over to using skip list routines.
- *
- * JRM -- 3/28/07
- * Updated sanity checks for the new is_read_only and
- * ro_ref_count fields in H5C_cache_entry_t.
- *
- * JRM -- 12/13/14
- * Added code to set cache_ptr->slist_changed to TRUE
- * when an entry is removed from the slist.
- *
- * JRM -- 9/1/15
- * Added code to maintain the cache_ptr->slist_ring_len
- * and cache_ptr->slist_ring_size arrays.
- *
*-------------------------------------------------------------------------
*/
@@ -4240,7 +4208,7 @@ struct H5C_t {
int32_t max_pel_len;
size_t max_pel_size;
- /* Fields for tacking 'make space in cache' (msic) operations */
+ /* Fields for tracking 'make space in cache' (msic) operations */
int64_t calls_to_msic;
int64_t total_entries_skipped_in_msic;
int64_t total_entries_scanned_in_msic;
diff --git a/src/H5Ctag.c b/src/H5Ctag.c
index e1b4df6..8ee287c 100644
--- a/src/H5Ctag.c
+++ b/src/H5Ctag.c
@@ -182,12 +182,10 @@ H5C_get_ignore_tags(const H5C_t *cache_ptr)
* Programmer: Mike McGreevy
* January 14, 2010
*
- * Modifications:
- *
*-------------------------------------------------------------------------
*/
herr_t
-H5C__tag_entry(H5C_t * cache_ptr, H5C_cache_entry_t * entry_ptr, hid_t dxpl_id)
+H5C__tag_entry(H5C_t *cache, H5C_cache_entry_t *entry, hid_t dxpl_id)
{
H5P_genplist_t *dxpl; /* dataset transfer property list */
H5C_tag_t tag; /* Tag structure */
@@ -196,9 +194,9 @@ H5C__tag_entry(H5C_t * cache_ptr, H5C_cache_entry_t * entry_ptr, hid_t dxpl_id)
FUNC_ENTER_PACKAGE
/* Assertions */
- HDassert(cache_ptr != NULL);
- HDassert(entry_ptr != NULL);
- HDassert(cache_ptr->magic == H5C__H5C_T_MAGIC);
+ HDassert(cache != NULL);
+ HDassert(entry != NULL);
+ HDassert(cache->magic == H5C__H5C_T_MAGIC);
/* Get the dataset transfer property list */
if(NULL == (dxpl = (H5P_genplist_t *)H5I_object_verify(dxpl_id, H5I_GENPROP_LST)))
@@ -208,13 +206,7 @@ H5C__tag_entry(H5C_t * cache_ptr, H5C_cache_entry_t * entry_ptr, hid_t dxpl_id)
if((H5P_get(dxpl, "H5C_tag", &tag)) < 0)
HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, FAIL, "unable to query property value")
- if(cache_ptr->ignore_tags != TRUE) {
-#if H5C_DO_TAGGING_SANITY_CHECKS
- /* Perform some sanity checks to ensure that a correct tag is being applied */
- if(H5C_verify_tag(entry_ptr->type->id, tag.value, tag.globality) < 0)
- HGOTO_ERROR(H5E_CACHE, H5E_CANTTAG, FAIL, "tag verification failed")
-#endif
- } else {
+ if(cache->ignore_tags) {
/* if we're ignoring tags, it's because we're running
tests on internal functions and may not have inserted a tag
value into a given dxpl_id before creating some metadata. Thus,
@@ -227,12 +219,19 @@ H5C__tag_entry(H5C_t * cache_ptr, H5C_cache_entry_t * entry_ptr, hid_t dxpl_id)
tag.globality = H5C_GLOBALITY_NONE;
} /* end if */
} /* end if */
+#if H5C_DO_TAGGING_SANITY_CHECKS
+ else {
+ /* Perform some sanity checks to ensure that a correct tag is being applied */
+ if(H5C_verify_tag(entry->type->id, tag.value, tag.globality) < 0)
+ HGOTO_ERROR(H5E_CACHE, H5E_CANTTAG, FAIL, "tag verification failed")
+ } /* end else */
+#endif
/* Apply the tag to the entry */
- entry_ptr->tag = tag.value;
+ entry->tag = tag.value;
/* Apply the tag globality to the entry */
- entry_ptr->globality = tag.globality;
+ entry->globality = tag.globality;
done:
FUNC_LEAVE_NOAPI(ret_value)
diff --git a/src/H5Dfarray.c b/src/H5Dfarray.c
index 76ea229..5f82e59 100644
--- a/src/H5Dfarray.c
+++ b/src/H5Dfarray.c
@@ -145,7 +145,7 @@ static herr_t H5D__farray_idx_reset(H5O_storage_chunk_t *storage, hbool_t reset_
static herr_t H5D__farray_idx_dump(const H5O_storage_chunk_t *storage, FILE *stream);
static herr_t H5D__farray_idx_dest(const H5D_chk_idx_info_t *idx_info);
-/* Generic extensible array routines */
+/* Generic fixed array routines */
static herr_t H5D__farray_idx_open(const H5D_chk_idx_info_t *idx_info);
/*********************/
diff --git a/src/H5Dpkg.h b/src/H5Dpkg.h
index 2190f8c..12966f2 100644
--- a/src/H5Dpkg.h
+++ b/src/H5Dpkg.h
@@ -394,6 +394,10 @@ typedef struct H5D_chunk_cached_t {
unsigned filter_mask; /*excluded filters */
} H5D_chunk_cached_t;
+/****************************/
+/* Virtual dataset typedefs */
+/****************************/
+
/* List of files held open during refresh operations */
typedef struct H5D_virtual_held_file_t {
H5F_t *file; /* Pointer to file held open */
@@ -685,6 +689,8 @@ H5_DLL herr_t H5D__chunk_direct_write(const H5D_t *dset, hid_t dxpl_id, uint32_t
#ifdef H5D_CHUNK_DEBUG
H5_DLL herr_t H5D__chunk_stats(const H5D_t *dset, hbool_t headers);
#endif /* H5D_CHUNK_DEBUG */
+
+/* format convert */
H5_DLL herr_t H5D__chunk_format_convert(H5D_t *dset, H5D_chk_idx_info_t *idx_info, H5D_chk_idx_info_t *new_idx_info);
/* Functions that operate on compact dataset storage */
diff --git a/src/H5EA.c b/src/H5EA.c
index 350acc1..8a4c5a1 100644
--- a/src/H5EA.c
+++ b/src/H5EA.c
@@ -756,8 +756,8 @@ END_FUNC(PRIV) /* end H5EA_get() */
/*-------------------------------------------------------------------------
* Function: H5EA_depend
*
- * Purpose: Make a child flush dependency between the extensible array's
- * header and another piece of metadata in the file.
+ * Purpose: Make a child flush dependency between the extensible array
+ * and another piece of metadata in the file.
*
* Return: SUCCEED/FAIL
*
diff --git a/src/H5EAdblkpage.c b/src/H5EAdblkpage.c
index 327feb0..b903a8a 100644
--- a/src/H5EAdblkpage.c
+++ b/src/H5EAdblkpage.c
@@ -154,7 +154,7 @@ H5EA__dblk_page_create(H5EA_hdr_t *hdr, hid_t dxpl_id, H5EA_sblock_t *parent,
haddr_t addr))
/* Local variables */
- H5EA_dblk_page_t *dblk_page = NULL; /* Extensible array data block page */
+ H5EA_dblk_page_t *dblk_page = NULL; /* Extensible array data block page */
/* Sanity check */
HDassert(hdr);
@@ -206,7 +206,7 @@ H5EA__dblk_page_protect(H5EA_hdr_t *hdr, hid_t dxpl_id, H5EA_sblock_t *parent,
haddr_t dblk_page_addr, unsigned flags))
/* Local variables */
- H5EA_dblk_page_cache_ud_t udata; /* Information needed for loading data block page */
+ H5EA_dblk_page_cache_ud_t udata; /* Information needed for loading data block page */
/* Sanity check */
HDassert(hdr);
diff --git a/src/H5EAhdr.c b/src/H5EAhdr.c
index da15087..d8be3cb 100644
--- a/src/H5EAhdr.c
+++ b/src/H5EAhdr.c
@@ -204,9 +204,6 @@ H5EA__hdr_init(H5EA_hdr_t *hdr, void *ctx_udata))
hdr->nsblks = 1 + (hdr->cparam.max_nelmts_bits - H5VM_log2_of2(hdr->cparam.data_blk_min_elmts));
hdr->dblk_page_nelmts = (size_t)1 << hdr->cparam.max_dblk_page_nelmts_bits;
hdr->arr_off_size = (unsigned char)H5EA_SIZEOF_OFFSET_BITS(hdr->cparam.max_nelmts_bits);
-#ifdef QAK
-HDfprintf(stderr, "%s: hdr->nsblks = %Zu\n", FUNC, hdr->nsblks);
-#endif /* QAK */
/* Allocate information for each super block */
if(NULL == (hdr->sblk_info = H5FL_SEQ_MALLOC(H5EA_sblk_info_t, hdr->nsblks)))
@@ -220,9 +217,6 @@ HDfprintf(stderr, "%s: hdr->nsblks = %Zu\n", FUNC, hdr->nsblks);
hdr->sblk_info[u].dblk_nelmts = H5EA_SBLK_DBLK_NELMTS(u, hdr->cparam.data_blk_min_elmts);
hdr->sblk_info[u].start_idx = start_idx;
hdr->sblk_info[u].start_dblk = start_dblk;
-#ifdef QAK
-HDfprintf(stderr, "%s: hdr->sblk_info[%Zu] = {%Zu, %Zu, %Hu, %Hu}\n", FUNC, u, hdr->sblk_info[u].ndblks, hdr->sblk_info[u].dblk_nelmts, hdr->sblk_info[u].start_idx, hdr->sblk_info[u].start_dblk);
-#endif /* QAK */
/* Advance starting indices for next super block */
start_idx += (hsize_t)hdr->sblk_info[u].ndblks * (hsize_t)hdr->sblk_info[u].dblk_nelmts;
@@ -271,9 +265,6 @@ H5EA__hdr_alloc_elmts(H5EA_hdr_t *hdr, size_t nelmts))
/* Compute the index of the element buffer factory */
H5_CHECK_OVERFLOW(nelmts, /*From:*/size_t, /*To:*/uint32_t);
idx = H5VM_log2_of2((uint32_t)nelmts) - H5VM_log2_of2((uint32_t)hdr->cparam.data_blk_min_elmts);
-#ifdef QAK
-HDfprintf(stderr, "%s: nelmts = %Zu, hdr->data_blk_min_elmts = %u, idx = %u\n", FUNC, nelmts, (unsigned)hdr->data_blk_min_elmts, idx);
-#endif /* QAK */
/* Check for needing to increase size of array of factories */
if(idx >= hdr->elmt_fac.nalloc) {
@@ -341,9 +332,6 @@ H5EA__hdr_free_elmts(H5EA_hdr_t *hdr, size_t nelmts, void *elmts))
/* Compute the index of the element buffer factory */
H5_CHECK_OVERFLOW(nelmts, /*From:*/size_t, /*To:*/uint32_t);
idx = H5VM_log2_of2((uint32_t)nelmts) - H5VM_log2_of2((uint32_t)hdr->cparam.data_blk_min_elmts);
-#ifdef QAK
-HDfprintf(stderr, "%s: nelmts = %Zu, hdr->data_blk_min_elmts = %u, idx = %u\n", FUNC, nelmts, (unsigned)hdr->data_blk_min_elmts, idx);
-#endif /* QAK */
/* Free buffer for elements in index block */
HDassert(idx < hdr->elmt_fac.nalloc);
@@ -374,10 +362,6 @@ H5EA__hdr_create(H5F_t *f, hid_t dxpl_id, const H5EA_create_t *cparam,
/* Local variables */
H5EA_hdr_t *hdr = NULL; /* Extensible array header */
-#ifdef QAK
-HDfprintf(stderr, "%s: Called\n", FUNC);
-#endif /* QAK */
-
/* Check arguments */
HDassert(f);
HDassert(cparam);
@@ -725,9 +709,6 @@ H5EA__hdr_delete(H5EA_hdr_t *hdr, hid_t dxpl_id))
/* Check for index block */
if(H5F_addr_defined(hdr->idx_blk_addr)) {
-#ifdef QAK
-HDfprintf(stderr, "%s: hdr->idx_blk_addr = %a\n", FUNC, hdr->idx_blk_addr);
-#endif /* QAK */
/* Delete index block */
if(H5EA__iblock_delete(hdr, dxpl_id) < 0)
H5E_THROW(H5E_CANTDELETE, "unable to delete extensible array index block")
diff --git a/src/H5EApkg.h b/src/H5EApkg.h
index 6f3ee9c..70e6a55 100644
--- a/src/H5EApkg.h
+++ b/src/H5EApkg.h
@@ -241,11 +241,13 @@ typedef struct H5EA_sblock_t {
/* Internal array information (not stored) */
H5EA_hdr_t *hdr; /* Shared array header info */
- hbool_t has_hdr_depend; /* Whether this object has a flush dependency on the header */
- H5EA_iblock_t *parent; /* Parent object for super block (index block) */
haddr_t addr; /* Address of this index block on disk */
size_t size; /* Size of index block on disk */
+ /* Flush dependency information (not stored) */
+ hbool_t has_hdr_depend; /* Whether this object has a flush dependency on the header */
+ H5EA_iblock_t *parent; /* Parent object for super block (index block) */
+
/* Computed/cached values (not stored) */
unsigned idx; /* Super block index within the extensible array */
size_t ndblks; /* # of data block addresses that are in super block */
@@ -266,11 +268,13 @@ typedef struct H5EA_dblock_t {
/* Internal array information (not stored) */
H5EA_hdr_t *hdr; /* Shared array header info */
- hbool_t has_hdr_depend; /* Whether this object has a flush dependency on the header */
- void *parent; /* Parent object for data block (index or super block) */
haddr_t addr; /* Address of this data block on disk */
size_t size; /* Size of data block on disk */
+ /* Flush dependency information (not stored) */
+ hbool_t has_hdr_depend; /* Whether this object has a flush dependency on the header */
+ void *parent; /* Parent object for data block (index or super block) */
+
/* Computed/cached values (not stored) */
size_t nelmts; /* Number of elements in block */
size_t npages; /* Nummber of pages in a block (zero if not paged) */
@@ -286,11 +290,13 @@ typedef struct H5EA_dbk_page_t {
/* Internal array information (not stored) */
H5EA_hdr_t *hdr; /* Shared array header info */
- hbool_t has_hdr_depend; /* Whether this object has a flush dependency on the header */
- H5EA_sblock_t *parent; /* Parent object for data block page (super block) */
haddr_t addr; /* Address of this data block page on disk */
size_t size; /* Size of data block page on disk */
+ /* Flush dependency information (not stored) */
+ hbool_t has_hdr_depend; /* Whether this object has a flush dependency on the header */
+ H5EA_sblock_t *parent; /* Parent object for data block page (super block) */
+
/* Computed/cached values (not stored) */
/* <none> */
} H5EA_dblk_page_t;
diff --git a/src/H5FA.c b/src/H5FA.c
index 9678f45..4435af0 100644
--- a/src/H5FA.c
+++ b/src/H5FA.c
@@ -152,11 +152,11 @@ HDfprintf(stderr, "%s: Called\n", FUNC);
/* Point fixed array wrapper at header and bump it's ref count */
fa->hdr = hdr;
if(H5FA__hdr_incr(fa->hdr) < 0)
- H5E_THROW(H5E_CANTINC, "can't increment reference count on shared array header")
+ H5E_THROW(H5E_CANTINC, "can't increment reference count on shared array header")
/* Increment # of files using this array header */
if(H5FA__hdr_fuse_incr(fa->hdr) < 0)
- H5E_THROW(H5E_CANTINC, "can't increment file reference count on shared array header")
+ H5E_THROW(H5E_CANTINC, "can't increment file reference count on shared array header")
/* Set file pointer for this array open context */
fa->f = f;
@@ -167,7 +167,7 @@ HDfprintf(stderr, "%s: Called\n", FUNC);
CATCH
if(hdr && H5FA__hdr_unprotect(hdr, dxpl_id, H5AC__NO_FLAGS_SET) < 0)
- H5E_THROW(H5E_CANTUNPROTECT, "unable to release fixed array header")
+ H5E_THROW(H5E_CANTUNPROTECT, "unable to release fixed array header")
if(!ret_value)
if(fa && H5FA_close(fa, dxpl_id) < 0)
H5E_THROW(H5E_CLOSEERROR, "unable to close fixed array")
@@ -261,10 +261,6 @@ H5FA_get_nelmts(const H5FA_t *fa, hsize_t *nelmts))
/* Local variables */
-#ifdef H5FA_DEBUG
-HDfprintf(stderr, "%s: Called\n", FUNC);
-#endif /* H5FA_DEBUG */
-
/*
* Check arguments.
*/
@@ -295,10 +291,6 @@ H5FA_get_addr(const H5FA_t *fa, haddr_t *addr))
/* Local variables */
-#ifdef H5FA_DEBUG
-HDfprintf(stderr, "%s: Called\n", FUNC);
-#endif /* H5FA_DEBUG */
-
/*
* Check arguments.
*/
@@ -336,11 +328,6 @@ H5FA_set(const H5FA_t *fa, hid_t dxpl_id, hsize_t idx, const void *elmt))
unsigned dblk_page_cache_flags = H5AC__NO_FLAGS_SET; /* Flags to unprotecting FIxed Array Data block page */
hbool_t hdr_dirty = FALSE; /* Whether header information changed */
-#ifdef H5FA_DEBUG
-HDfprintf(stderr, "%s: Called\n", FUNC);
-HDfprintf(stderr, "%s: Index %Hu\n", FUNC, idx);
-#endif /* H5FA_DEBUG */
-
/*
* Check arguments.
*/
@@ -352,9 +339,6 @@ HDfprintf(stderr, "%s: Index %Hu\n", FUNC, idx);
/* Check if we need to create the fixed array data block */
if(!H5F_addr_defined(hdr->dblk_addr)) {
-#ifdef H5FA_DEBUG
-HDfprintf(stderr, "%s: fixed array data block address not defined!\n", FUNC, idx);
-#endif /* H5FA_DEBUG */
/* Create the data block */
hdr->dblk_addr = H5FA__dblock_create(hdr, dxpl_id, &hdr_dirty);
if(!H5F_addr_defined(hdr->dblk_addr))
@@ -449,11 +433,6 @@ H5FA_get(const H5FA_t *fa, hid_t dxpl_id, hsize_t idx, void *elmt))
H5FA_dblock_t *dblock = NULL; /* Pointer to data block for FA */
H5FA_dblk_page_t *dblk_page = NULL; /* Pointer to data block page for FA */
-#ifdef H5FA_DEBUG
-HDfprintf(stderr, "%s: Called\n", FUNC);
-HDfprintf(stderr, "%s: Index %Hu\n", FUNC, idx);
-#endif /* H5FA_DEBUG */
-
/*
* Check arguments.
*/
@@ -550,10 +529,6 @@ H5FA_close(H5FA_t *fa, hid_t dxpl_id))
hbool_t pending_delete = FALSE; /* Whether the array is pending deletion */
haddr_t fa_addr = HADDR_UNDEF; /* Address of array (for deletion) */
-#ifdef H5FA_DEBUG
-HDfprintf(stderr, "%s: Called\n", FUNC);
-#endif /* H5FA_DEBUG */
-
/*
* Check arguments.
*/
@@ -657,9 +632,6 @@ H5FA_delete(H5F_t *f, hid_t dxpl_id, haddr_t fa_addr, void *ctx_udata))
HDassert(H5F_addr_defined(fa_addr));
/* Lock the array header into memory */
-#ifdef H5FA_DEBUG
-HDfprintf(stderr, "%s: fa_addr = %a\n", FUNC, fa_addr);
-#endif /* H5FA_DEBUG */
if(NULL == (hdr = H5FA__hdr_protect(f, dxpl_id, fa_addr, ctx_udata, H5AC__NO_FLAGS_SET)))
H5E_THROW(H5E_CANTPROTECT, "unable to protect fixed array header, address = %llu", (unsigned long long)fa_addr)
@@ -760,10 +732,6 @@ H5FA_patch_file(H5FA_t *fa, H5F_t *f))
/* Local variables */
-#ifdef H5FA_DEBUG
-HDfprintf(stderr, "%s: Called\n", FUNC);
-#endif /* H5FA_DEBUG */
-
/*
* Check arguments.
*/
diff --git a/src/H5FAdblkpage.c b/src/H5FAdblkpage.c
index bba4439..054ffb9 100644
--- a/src/H5FAdblkpage.c
+++ b/src/H5FAdblkpage.c
@@ -152,7 +152,7 @@ herr_t, SUCCEED, FAIL,
H5FA__dblk_page_create(H5FA_hdr_t *hdr, hid_t dxpl_id, haddr_t addr, size_t nelmts))
/* Local variables */
- H5FA_dblk_page_t *dblk_page = NULL; /* Fixed array data block page */
+ H5FA_dblk_page_t *dblk_page = NULL; /* Fixed array data block page */
#ifdef H5FA_DEBUG
HDfprintf(stderr, "%s: Called, addr = %a\n", FUNC, addr);
@@ -210,7 +210,7 @@ H5FA__dblk_page_protect(H5FA_hdr_t *hdr, hid_t dxpl_id, haddr_t dblk_page_addr,
size_t dblk_page_nelmts, unsigned flags))
/* Local variables */
- H5FA_dblk_page_cache_ud_t udata; /* Information needed for loading data block page */
+ H5FA_dblk_page_cache_ud_t udata; /* Information needed for loading data block page */
#ifdef H5FA_DEBUG
HDfprintf(stderr, "%s: Called\n", FUNC);
diff --git a/src/H5FAdblock.c b/src/H5FAdblock.c
index 95419f8..f597c8e 100644
--- a/src/H5FAdblock.c
+++ b/src/H5FAdblock.c
@@ -189,12 +189,8 @@ haddr_t, HADDR_UNDEF, HADDR_UNDEF,
H5FA__dblock_create(H5FA_hdr_t *hdr, hid_t dxpl_id, hbool_t *hdr_dirty))
/* Local variables */
- H5FA_dblock_t *dblock = NULL; /* fixed array data block */
- haddr_t dblock_addr; /* fixed array data block address */
-
-#ifdef H5FA_DEBUG
-HDfprintf(stderr, "%s: Called, hdr->stats.nelmts = %Zu, nelmts = %Zu\n", FUNC, hdr->stats.nelmts, hdr->cparam.nelmts);
-#endif /* H5FA_DEBUG */
+ H5FA_dblock_t *dblock = NULL; /* Fixed array data block */
+ haddr_t dblock_addr; /* Fixed array data block address */
/* Sanity check */
HDassert(hdr);
@@ -206,10 +202,6 @@ HDfprintf(stderr, "%s: Called, hdr->stats.nelmts = %Zu, nelmts = %Zu\n", FUNC, h
/* Set size of data block on disk */
hdr->stats.dblk_size = dblock->size = H5FA_DBLOCK_SIZE(dblock);
-#ifdef H5FA_DEBUG
-HDfprintf(stderr, "%s: dblock->size = %Zu\n", FUNC, dblock->size);
-#endif /* H5FA_DEBUG */
-
/* Allocate space for the data block on disk */
if(HADDR_UNDEF == (dblock_addr = H5MF_alloc(hdr->f, H5FD_MEM_FARRAY_DBLOCK, dxpl_id, (hsize_t)dblock->size)))
@@ -266,11 +258,7 @@ H5FA__dblock_protect(H5FA_hdr_t *hdr, hid_t dxpl_id, haddr_t dblk_addr,
unsigned flags))
/* Local variables */
- H5FA_dblock_cache_ud_t udata; /* Information needed for loading data block */
-
-#ifdef H5FA_DEBUG
-HDfprintf(stderr, "%s: Called\n", FUNC);
-#endif /* H5FA_DEBUG */
+ H5FA_dblock_cache_ud_t udata; /* Information needed for loading data block */
/* Sanity check */
HDassert(hdr);
@@ -310,10 +298,6 @@ H5FA__dblock_unprotect(H5FA_dblock_t *dblock, hid_t dxpl_id, unsigned cache_flag
/* Local variables */
-#ifdef H5FA_DEBUG
-HDfprintf(stderr, "%s: Called\n", FUNC);
-#endif /* H5FA_DEBUG */
-
/* Sanity check */
HDassert(dblock);
@@ -345,10 +329,6 @@ H5FA__dblock_delete(H5FA_hdr_t *hdr, hid_t dxpl_id, haddr_t dblk_addr))
/* Local variables */
H5FA_dblock_t *dblock = NULL; /* Pointer to data block */
-#ifdef H5FA_DEBUG
-HDfprintf(stderr, "%s: Called\n", FUNC);
-#endif /* H5FA_DEBUG */
-
/* Sanity check */
HDassert(hdr);
HDassert(H5F_addr_defined(dblk_addr));
@@ -367,16 +347,10 @@ HDfprintf(stderr, "%s: Called\n", FUNC);
/* Iterate over pages in data block */
for(u = 0; u < dblock->npages; u++) {
-#ifdef H5FA_DEBUG
-HDfprintf(stderr, "%s: Expunging data block page from cache\n", FUNC);
-#endif /* H5FA_DEBUG */
/* Evict the data block page from the metadata cache */
/* (OK to call if it doesn't exist in the cache) */
if(H5AC_expunge_entry(hdr->f, dxpl_id, H5AC_FARRAY_DBLK_PAGE, dblk_page_addr, H5AC__NO_FLAGS_SET) < 0)
H5E_THROW(H5E_CANTEXPUNGE, "unable to remove array data block page from metadata cache")
-#ifdef H5FA_DEBUG
-HDfprintf(stderr, "%s: Done expunging data block page from cache\n", FUNC);
-#endif /* H5FA_DEBUG */
/* Advance to next page address */
dblk_page_addr += dblock->dblk_page_size;
diff --git a/src/H5FAhdr.c b/src/H5FAhdr.c
index ac9a103..d844f06 100644
--- a/src/H5FAhdr.c
+++ b/src/H5FAhdr.c
@@ -184,10 +184,6 @@ H5FA__hdr_create(H5F_t *f, hid_t dxpl_id, const H5FA_create_t *cparam,
/* Local variables */
H5FA_hdr_t *hdr = NULL; /* Fixed array header */
-#ifdef H5FA_DEBUG
-HDfprintf(stderr, "%s: Called\n", FUNC);
-#endif /* H5FA_DEBUG */
-
/* Check arguments */
HDassert(f);
HDassert(cparam);
@@ -505,10 +501,6 @@ H5FA__hdr_delete(H5FA_hdr_t *hdr, hid_t dxpl_id))
/* Check for Fixed Array Data block */
if(H5F_addr_defined(hdr->dblk_addr)) {
-#ifdef H5FA_DEBUG
-HDfprintf(stderr, "%s: hdr->dblk_addr = %a\n", FUNC, hdr->dblk_addr);
-#endif /* H5FA_DEBUG */
-
/* Delete Fixed Array Data block */
if(H5FA__dblock_delete(hdr, dxpl_id, hdr->dblk_addr) < 0)
H5E_THROW(H5E_CANTDELETE, "unable to delete fixed array data block")
diff --git a/src/H5FScache.c b/src/H5FScache.c
index 1d27972..c04ac7c 100644
--- a/src/H5FScache.c
+++ b/src/H5FScache.c
@@ -483,7 +483,7 @@ H5FS__cache_hdr_pre_serialize(const H5F_t *f, hid_t dxpl_id, void *_thing,
* Note that while we may alter the contents of the free space
* header in cases 1) and 2), there is no need to mark the header
* as dirty, as the metadata cache would not be attempting to
- * serialize the header if it though it was clean.
+ * serialize the header if it thought it was clean.
*/
if(fspace->serial_sect_count > 0 && H5F_addr_defined(fspace->addr)) {
/* Sanity check */
diff --git a/src/H5Fprivate.h b/src/H5Fprivate.h
index 19a8117..35c7b5a 100644
--- a/src/H5Fprivate.h
+++ b/src/H5Fprivate.h
@@ -473,9 +473,9 @@
#define H5F_ACS_USE_MDC_LOGGING_NAME "use_mdc_logging" /* Whether to use metadata cache logging */
#define H5F_ACS_MDC_LOG_LOCATION_NAME "mdc_log_location" /* Name of metadata cache log location */
#define H5F_ACS_START_MDC_LOG_ON_ACCESS_NAME "start_mdc_log_on_access" /* Whether logging starts on file create/open */
-#define H5F_ACS_CORE_WRITE_TRACKING_FLAG_NAME "core_write_tracking_flag" /* Whether or not core VFD backing store write tracking is enabled */
+#define H5F_ACS_CORE_WRITE_TRACKING_FLAG_NAME "core_write_tracking_flag" /* Whether or not core VFD backing store write tracking is enabled */
#define H5F_ACS_EVICT_ON_CLOSE_FLAG_NAME "evict_on_close_flag" /* Whether or not the metadata cache will evict objects on close */
-#define H5F_ACS_CORE_WRITE_TRACKING_PAGE_SIZE_NAME "core_write_tracking_page_size" /* The page size in kiB when core VFD write tracking is enabled */
+#define H5F_ACS_CORE_WRITE_TRACKING_PAGE_SIZE_NAME "core_write_tracking_page_size" /* The page size in kiB when core VFD write tracking is enabled */
#define H5F_ACS_COLL_MD_WRITE_FLAG_NAME "collective_metadata_write" /* property indicating whether metadata writes are done collectively or not */
/* ======================== File Mount properties ====================*/
diff --git a/src/H5Fsuper_cache.c b/src/H5Fsuper_cache.c
index f445303..2592b90 100644
--- a/src/H5Fsuper_cache.c
+++ b/src/H5Fsuper_cache.c
@@ -107,7 +107,7 @@ const H5AC_class_t H5AC_SUPERBLOCK[1] = {{
H5F__cache_superblock_image_len, /* 'image_len' callback */
H5F__cache_superblock_pre_serialize,/* 'pre_serialize' callback */
H5F__cache_superblock_serialize, /* 'serialize' callback */
- NULL, /* 'notify' callback */
+ NULL, /* 'notify' callback */
H5F__cache_superblock_free_icr, /* 'free_icr' callback */
NULL, /* 'clear' callback */
NULL, /* 'fsf_size' callback */
diff --git a/src/H5HFiblock.c b/src/H5HFiblock.c
index 341f423..bb31002 100644
--- a/src/H5HFiblock.c
+++ b/src/H5HFiblock.c
@@ -451,14 +451,11 @@ H5HF_man_iblock_root_create(H5HF_hdr_t *hdr, hid_t dxpl_id, size_t min_dblock_si
/* destroy flush dependency between direct block and header */
if(H5AC_destroy_flush_dependency(dblock->hdr, dblock) < 0)
- HGOTO_ERROR(H5E_HEAP, H5E_CANTUNDEPEND, FAIL, \
- "unable to destroy flush dependency")
+ HGOTO_ERROR(H5E_HEAP, H5E_CANTUNDEPEND, FAIL, "unable to destroy flush dependency")
/* create flush dependency between direct block and new root indirect block */
if(H5AC_create_flush_dependency(dblock->parent, dblock) < 0)
- HGOTO_ERROR(H5E_HEAP, H5E_CANTDEPEND, FAIL, \
- "unable to create flush dependency")
-
+ HGOTO_ERROR(H5E_HEAP, H5E_CANTDEPEND, FAIL, "unable to create flush dependency")
if(H5HF_man_iblock_attach(iblock, 0, hdr->man_dtable.table_addr) < 0)
HGOTO_ERROR(H5E_HEAP, H5E_CANTATTACH, FAIL, "can't attach root direct block to parent indirect block")
diff --git a/src/H5HG.c b/src/H5HG.c
index c33b85f..e8eb2eb 100644
--- a/src/H5HG.c
+++ b/src/H5HG.c
@@ -155,7 +155,7 @@ H5HG_create(H5F_t *f, hid_t dxpl_id, size_t size)
H5_CHECK_OVERFLOW(size, size_t, hsize_t);
if(HADDR_UNDEF == (addr = H5MF_alloc(f, H5FD_MEM_GHEAP, dxpl_id, (hsize_t)size)))
HGOTO_ERROR(H5E_HEAP, H5E_CANTINIT, HADDR_UNDEF, "unable to allocate file space for global heap")
- if(NULL == (heap = H5FL_MALLOC(H5HG_heap_t)))
+ if(NULL == (heap = H5FL_CALLOC(H5HG_heap_t)))
HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, HADDR_UNDEF, "memory allocation failed")
heap->addr = addr;
heap->size = size;
diff --git a/src/H5O.c b/src/H5O.c
index d1806a1..f12bfed 100644
--- a/src/H5O.c
+++ b/src/H5O.c
@@ -1388,6 +1388,8 @@ H5O_create(H5F_t *f, hid_t dxpl_id, size_t size_hint, size_t initial_rc,
/* Cache object header */
if(H5AC_insert_entry(f, dxpl_id, H5AC_OHDR, oh_addr, oh, insert_flags) < 0)
HGOTO_ERROR_TAG(H5E_OHDR, H5E_CANTINSERT, FAIL, "unable to cache object header")
+
+ /* Reset object header pointer, now that it's been inserted into the cache */
oh = NULL;
/* Reset metadata tag in dxpl_id */
@@ -1403,7 +1405,7 @@ H5O_create(H5F_t *f, hid_t dxpl_id, size_t size_hint, size_t initial_rc,
done:
if(ret_value < 0 && oh)
- if(H5O_free(oh) < 0)
+ if(H5O__free(oh) < 0)
HDONE_ERROR(H5E_OHDR, H5E_CANTFREE, FAIL, "unable to destroy object header data")
FUNC_LEAVE_NOAPI(ret_value)
@@ -1978,7 +1980,7 @@ H5O_assert(oh);
done:
if(ret_value == NULL && oh)
- if(H5AC_unprotect(loc->file, dxpl_id, H5AC_OHDR, loc->addr, oh, H5AC__NO_FLAGS_SET) < 0)
+ if(H5O_unprotect(loc, dxpl_id, oh, H5AC__NO_FLAGS_SET) < 0)
HDONE_ERROR(H5E_OHDR, H5E_CANTUNPROTECT, NULL, "unable to release object header")
FUNC_LEAVE_NOAPI_TAG(ret_value, NULL)
@@ -3627,7 +3629,7 @@ done:
/*-------------------------------------------------------------------------
- * Function: H5O_free
+ * Function: H5O__free
*
* Purpose: Destroys an object header.
*
@@ -3640,14 +3642,16 @@ done:
*-------------------------------------------------------------------------
*/
herr_t
-H5O_free(H5O_t *oh)
+H5O__free(H5O_t *oh)
{
unsigned u; /* Local index variable */
+ herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
/* check args */
HDassert(oh);
+ HDassert(0 == oh->rc);
/* Destroy chunks */
if(oh->chunk) {
@@ -3682,5 +3686,5 @@ H5O_free(H5O_t *oh)
oh = H5FL_FREE(H5O_t, oh);
FUNC_LEAVE_NOAPI(SUCCEED)
-} /* end H5O_free() */
+} /* end H5O__free() */
diff --git a/src/H5Oalloc.c b/src/H5Oalloc.c
index 69b4b11..33d2e9d 100644
--- a/src/H5Oalloc.c
+++ b/src/H5Oalloc.c
@@ -644,9 +644,9 @@ H5O_alloc_extend_chunk(H5F_t *f, hid_t dxpl_id, H5O_t *oh, unsigned chunkno,
old_size = oh->chunk[chunkno].size;
oh->chunk[chunkno].size += delta + extra_prfx_size;
oh->chunk[chunkno].image = H5FL_BLK_REALLOC(chunk_image, old_image, oh->chunk[chunkno].size);
- oh->chunk[chunkno].gap = 0;
if(NULL == oh->chunk[chunkno].image)
- HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "memory allocation failed")
+ HGOTO_ERROR(H5E_OHDR, H5E_CANTALLOC, FAIL, "can't reallocate extended object header chunk")
+ oh->chunk[chunkno].gap = 0;
/* Wipe new space for chunk */
HDmemset(oh->chunk[chunkno].image + old_size, 0, oh->chunk[chunkno].size - old_size);
@@ -664,8 +664,8 @@ H5O_alloc_extend_chunk(H5F_t *f, hid_t dxpl_id, H5O_t *oh, unsigned chunkno,
oh->mesg[u].raw = oh->chunk[chunkno].image + extra_prfx_size + (oh->mesg[u].raw - old_image);
/* Find continuation message which points to this chunk and adjust chunk's size */
- /* (Chunk 0 doesn't have a continuation message that points to it and
- * it's size is directly encoded in the object header) */
+ /* (Chunk 0 doesn't have a continuation message that points to it,
+ * its size is directly encoded in the object header) */
if(chunkno > 0 && (H5O_CONT_ID == oh->mesg[u].type->id) &&
(((H5O_cont_t *)(oh->mesg[u].native))->chunkno == chunkno)) {
H5O_chunk_proxy_t *chk_proxy2 = NULL; /* Chunk that continuation message is in */
@@ -891,7 +891,7 @@ H5O_alloc_new_chunk(H5F_t *f, hid_t dxpl_id, H5O_t *oh, size_t size, size_t *new
/*
* The total chunk size must include the requested space plus enough
* for the message header. This must be at least some minimum and
- * aligned propertly.
+ * aligned properly.
*/
size = MAX(H5O_MIN_SIZE, size + (size_t)H5O_SIZEOF_MSGHDR_OH(oh));
HDassert(size == H5O_ALIGN_OH(oh, size));
@@ -903,20 +903,18 @@ H5O_alloc_new_chunk(H5F_t *f, hid_t dxpl_id, H5O_t *oh, size_t size, size_t *new
*/
size += H5O_SIZEOF_CHKHDR_OH(oh);
- /* allocate space in file to hold the new chunk */
+ /* Allocate space in file to hold the new chunk */
new_chunk_addr = H5MF_alloc(f, H5FD_MEM_OHDR, dxpl_id, (hsize_t)size);
- if(HADDR_UNDEF == new_chunk_addr)
- HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "unable to allocate space for new chunk")
+ if(!H5F_addr_defined(new_chunk_addr))
+ HGOTO_ERROR(H5E_OHDR, H5E_CANTALLOC, FAIL, "unable to allocate space for new chunk")
- /*
- * Create the new chunk giving it a file address.
- */
+ /* Create the new chunk giving it a file address. */
if(oh->nchunks >= oh->alloc_nchunks) {
size_t na = MAX(H5O_NCHUNKS, oh->alloc_nchunks * 2); /* Double # of chunks allocated */
H5O_chunk_t *x;
if(NULL == (x = H5FL_SEQ_REALLOC(H5O_chunk_t, oh->chunk, na)))
- HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "memory allocation failed")
+ HGOTO_ERROR(H5E_OHDR, H5E_CANTALLOC, FAIL, "can't allocate larger chunk array, na = %zu", na)
oh->alloc_nchunks = na;
oh->chunk = x;
} /* end if */
@@ -927,7 +925,7 @@ H5O_alloc_new_chunk(H5F_t *f, hid_t dxpl_id, H5O_t *oh, size_t size, size_t *new
oh->chunk[chunkno].size = size;
oh->chunk[chunkno].gap = 0;
if(NULL == (oh->chunk[chunkno].image = p = H5FL_BLK_CALLOC(chunk_image, size)))
- HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "memory allocation failed")
+ HGOTO_ERROR(H5E_OHDR, H5E_CANTALLOC, FAIL, "can't allocate image for chunk, size = %zu", size)
/* If this is a later version of the object header format, put the magic
* # at the beginning of the chunk image.
@@ -1112,8 +1110,7 @@ done:
*
* Purpose: Allocate enough space in the object header for this message.
*
- * Return: Success: Index of message
- * Failure: Negative
+ * Return: Non-negative on success/Negative on failure
*
* Programmer: Robb Matzke
* matzke@llnl.gov
@@ -1165,7 +1162,7 @@ H5O_alloc(H5F_t *f, hid_t dxpl_id, H5O_t *oh, const H5O_msg_class_t *type,
htri_t tri_result; /* Status from attempting to extend chunk */
if((tri_result = H5O_alloc_extend_chunk(f, dxpl_id, oh, chunkno, raw_size, &idx)) < 0)
- HGOTO_ERROR(H5E_OHDR, H5E_CANTEXTEND, FAIL, "H5O_alloc_extend_chunk failed unexpectedly")
+ HGOTO_ERROR(H5E_OHDR, H5E_CANTEXTEND, FAIL, "can't extend existing chunk")
if(tri_result == TRUE)
break;
} /* end for */
diff --git a/src/H5Ocache.c b/src/H5Ocache.c
index 3803978..0bb0bdf 100644
--- a/src/H5Ocache.c
+++ b/src/H5Ocache.c
@@ -376,7 +376,7 @@ H5O__cache_deserialize(const void *_image, size_t len, void *_udata,
done:
/* Release the [possibly partially initialized] object header on errors */
if(!ret_value && oh)
- if(H5O_free(oh) < 0)
+ if(H5O__free(oh) < 0)
HDONE_ERROR(H5E_OHDR, H5E_CANTRELEASE, NULL, "unable to destroy object header data")
FUNC_LEAVE_NOAPI(ret_value)
@@ -604,7 +604,7 @@ H5O__cache_free_icr(void *_thing)
HDassert(oh->cache_info.type == H5AC_OHDR);
/* Destroy object header */
- if(H5O_free(oh) < 0)
+ if(H5O__free(oh) < 0)
HGOTO_ERROR(H5E_OHDR, H5E_CANTRELEASE, FAIL, "can't destroy object header")
done:
diff --git a/src/H5Ocopy.c b/src/H5Ocopy.c
index 0ee8cfd..d056ae8 100644
--- a/src/H5Ocopy.c
+++ b/src/H5Ocopy.c
@@ -858,6 +858,10 @@ H5O_copy_header_real(const H5O_loc_t *oloc_src, H5O_loc_t *oloc_dst /*out*/,
oh_dst->nlink += (unsigned)addr_map->inc_ref_count;
} /* end if */
+ /* Retag all copied metadata to apply the destination object's tag */
+ if(H5AC_retag_copied_metadata(oloc_dst->file, oloc_dst->addr) < 0)
+ HGOTO_ERROR(H5E_CACHE, H5E_CANTTAG, FAIL, "unable to re-tag metadata entries")
+
/* Set metadata tag for destination object's object header */
H5_BEGIN_TAG(dxpl_id, oloc_dst->addr, FAIL);
@@ -870,10 +874,6 @@ H5O_copy_header_real(const H5O_loc_t *oloc_src, H5O_loc_t *oloc_dst /*out*/,
/* Reset metadat tag */
H5_END_TAG(FAIL);
- /* Retag all copied metadata to apply the destination object's tag */
- if(H5AC_retag_copied_metadata(oloc_dst->file, oloc_dst->addr) < 0)
- HGOTO_ERROR(H5E_CACHE, H5E_CANTTAG, FAIL, "unable to re-tag metadata entries")
-
/* Set obj_type and udata, if requested */
if(obj_type) {
HDassert(udata);
@@ -892,7 +892,7 @@ done:
/* Free destination object header on failure */
if(ret_value < 0 && oh_dst && !inserted) {
- if(H5O_free(oh_dst) < 0)
+ if(H5O__free(oh_dst) < 0)
HDONE_ERROR(H5E_OHDR, H5E_CANTFREE, FAIL, "unable to destroy object header data")
if(H5O_loc_reset(oloc_dst) < 0)
HDONE_ERROR(H5E_OHDR, H5E_CANTFREE, FAIL, "unable to destroy object header data")
diff --git a/src/H5Opkg.h b/src/H5Opkg.h
index e40d28a..a719872 100644
--- a/src/H5Opkg.h
+++ b/src/H5Opkg.h
@@ -535,7 +535,7 @@ H5_DLL const H5O_obj_class_t * H5O_obj_class(const H5O_loc_t *loc, hid_t dxpl_id
H5_DLL int H5O_link_oh(H5F_t *f, int adjust, hid_t dxpl_id, H5O_t *oh, hbool_t *deleted);
H5_DLL herr_t H5O_inc_rc(H5O_t *oh);
H5_DLL herr_t H5O_dec_rc(H5O_t *oh);
-H5_DLL herr_t H5O_free(H5O_t *oh);
+H5_DLL herr_t H5O__free(H5O_t *oh);
/* Object header message routines */
H5_DLL herr_t H5O_msg_alloc(H5F_t *f, hid_t dxpl_id, H5O_t *oh,
diff --git a/src/H5SM.c b/src/H5SM.c
index 0b72e40..730e9e0 100644
--- a/src/H5SM.c
+++ b/src/H5SM.c
@@ -148,7 +148,7 @@ H5SM_init(H5F_t *f, H5P_genplist_t * fc_plist, const H5O_loc_t *ext_loc, hid_t d
HGOTO_ERROR(H5E_SOHM, H5E_CANTSET, FAIL, "unable to set ring value")
/* Initialize master table */
- if(NULL == (table = H5FL_MALLOC(H5SM_master_table_t)))
+ if(NULL == (table = H5FL_CALLOC(H5SM_master_table_t)))
HGOTO_ERROR(H5E_SOHM, H5E_CANTALLOC, FAIL, "memory allocation failed for SOHM table")
table->num_indexes = H5F_SOHM_NINDEXES(f);
table->table_size = H5SM_TABLE_SIZE(f);
@@ -657,7 +657,7 @@ H5SM_create_list(H5F_t *f, H5SM_index_header_t *header, hid_t dxpl_id)
num_entries = header->list_max;
/* Allocate list in memory */
- if(NULL == (list = H5FL_MALLOC(H5SM_list_t)))
+ if(NULL == (list = H5FL_CALLOC(H5SM_list_t)))
HGOTO_ERROR(H5E_SOHM, H5E_NOSPACE, HADDR_UNDEF, "file allocation failed for SOHM list")
if(NULL == (list->messages = (H5SM_sohm_t *)H5FL_ARR_CALLOC(H5SM_sohm_t, num_entries)))
HGOTO_ERROR(H5E_SOHM, H5E_NOSPACE, HADDR_UNDEF, "file allocation failed for SOHM list")
diff --git a/src/H5Zszip.c b/src/H5Zszip.c
index 2c2ed07..557e923 100644
--- a/src/H5Zszip.c
+++ b/src/H5Zszip.c
@@ -298,7 +298,7 @@ H5Z_filter_szip (unsigned flags, size_t cd_nelmts, const unsigned cd_values[],
/* Check arguments */
if (cd_nelmts!=4)
- HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, 0, "invalid deflate aggression level")
+ HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, 0, "invalid number of filter parameters")
/* Copy the filter parameters into the szip parameter block */
H5_CHECKED_ASSIGN(sz_param.options_mask, int, cd_values[H5Z_SZIP_PARM_MASK], unsigned);
diff --git a/src/H5system.c b/src/H5system.c
index e17373c..ab08d2c 100644
--- a/src/H5system.c
+++ b/src/H5system.c
@@ -1106,5 +1106,5 @@ H5_combine_path(const char* path1, const char* path2, char **full_name /*out*/)
done:
FUNC_LEAVE_NOAPI(ret_value)
-} /* end H5_combine_name() */
+} /* end H5_combine_path() */
diff --git a/test/cache.c b/test/cache.c
index 361d598..c89a1c7 100644
--- a/test/cache.c
+++ b/test/cache.c
@@ -244,7 +244,7 @@ smoke_check_1(int express_test)
TESTING("smoke check #1 -- all clean, ins, dest, ren, 4/2 MB cache");
- switch ( express_test )
+ switch (express_test)
{
case 0:
max_index = (10 * 1024) - 1;
@@ -267,20 +267,20 @@ smoke_check_1(int express_test)
pass = TRUE;
- if ( show_progress ) /* 1 */
+ if(show_progress) /* 1 */
HDfprintf(stdout, "%s() - %0d -- pass = %d\n",
FUNC, mile_stone++, (int)pass);
reset_entries();
- if ( show_progress ) /* 2 */
+ if(show_progress) /* 2 */
HDfprintf(stdout, "%s() - %0d -- pass = %d\n",
FUNC, mile_stone++, (int)pass);
file_ptr = setup_cache((size_t)(4 * 1024 * 1024),
(size_t)(2 * 1024 * 1024));
- if ( show_progress ) /* 3 */
+ if(show_progress) /* 3 */
HDfprintf(stdout, "%s() - %0d -- pass = %d\n",
FUNC, mile_stone++, (int)pass);
@@ -299,7 +299,7 @@ smoke_check_1(int express_test)
/* dirty_destroys */ dirty_destroys,
/* dirty_unprotects */ dirty_unprotects);
- if ( show_progress ) /* 4 */
+ if(show_progress) /* 4 */
HDfprintf(stdout, "%s() - %0d -- pass = %d\n",
FUNC, mile_stone++, (int)pass);
@@ -318,7 +318,7 @@ smoke_check_1(int express_test)
/* dirty_destroys */ dirty_destroys,
/* dirty_unprotects */ dirty_unprotects);
- if ( show_progress ) /* 5 */
+ if(show_progress) /* 5 */
HDfprintf(stdout, "%s() - %0d -- pass = %d\n",
FUNC, mile_stone++, (int)pass);
@@ -337,7 +337,7 @@ smoke_check_1(int express_test)
/* dirty_destroys */ dirty_destroys,
/* dirty_unprotects */ dirty_unprotects);
- if ( show_progress ) /* 6 */
+ if(show_progress) /* 6 */
HDfprintf(stdout, "%s() - %0d -- pass = %d\n",
FUNC, mile_stone++, (int)pass);
@@ -348,7 +348,7 @@ smoke_check_1(int express_test)
/* dump_stats */ FALSE,
/* dump_detailed_stats */ FALSE);
- if ( show_progress ) /* 7 */
+ if(show_progress) /* 7 */
HDfprintf(stdout, "%s() - %0d -- pass = %d\n",
FUNC, mile_stone++, (int)pass);
@@ -362,7 +362,7 @@ smoke_check_1(int express_test)
/* do_inserts */ TRUE,
/* dirty_unprotects */ dirty_unprotects);
- if ( show_progress ) /* 8 */
+ if(show_progress) /* 8 */
HDfprintf(stdout, "%s() - %0d -- pass = %d\n",
FUNC, mile_stone++, (int)pass);
@@ -373,7 +373,7 @@ smoke_check_1(int express_test)
/* dump_stats */ FALSE,
/* dump_detailed_stats */ FALSE);
- if ( show_progress ) /* 9 */
+ if(show_progress) /* 9 */
HDfprintf(stdout, "%s() - %0d -- pass = %d\n",
FUNC, mile_stone++, (int)pass);
@@ -387,22 +387,22 @@ smoke_check_1(int express_test)
/* do_inserts */ TRUE,
/* dirty_unprotects */ dirty_unprotects);
- if ( show_progress ) /* 10 */
+ if(show_progress) /* 10 */
HDfprintf(stdout, "%s() - %0d -- pass = %d\n",
FUNC, mile_stone++, (int)pass);
takedown_cache(file_ptr, display_stats, TRUE);
- if ( show_progress ) /* 11 */
+ if(show_progress) /* 11 */
HDfprintf(stdout, "%s() - %0d -- pass = %d\n",
FUNC, mile_stone++, (int)pass);
verify_clean();
verify_unprotected();
- if ( pass ) { PASSED(); } else { H5_FAILED(); }
+ if(pass) { PASSED(); } else { H5_FAILED(); }
- if ( ! pass ) {
+ if(!pass) {
HDfprintf(stdout, "%s(): failure_mssg = \"%s\".\n",
FUNC, failure_mssg);
@@ -443,7 +443,7 @@ smoke_check_2(int express_test)
TESTING("smoke check #2 -- ~1/2 dirty, ins, dest, ren, 4/2 MB cache");
- switch ( express_test )
+ switch (express_test)
{
case 0:
max_index = (10 * 1024) - 1;
@@ -466,20 +466,20 @@ smoke_check_2(int express_test)
pass = TRUE;
- if ( show_progress ) /* 1 */
+ if(show_progress) /* 1 */
HDfprintf(stdout, "%s() - %0d -- pass = %d\n",
FUNC, mile_stone++, (int)pass);
reset_entries();
- if ( show_progress ) /* 2 */
+ if(show_progress) /* 2 */
HDfprintf(stdout, "%s() - %0d -- pass = %d\n",
FUNC, mile_stone++, (int)pass);
file_ptr = setup_cache((size_t)(4 * 1024 * 1024),
(size_t)(2 * 1024 * 1024));
- if ( show_progress ) /* 3 */
+ if(show_progress) /* 3 */
HDfprintf(stdout, "%s() - %0d -- pass = %d\n",
FUNC, mile_stone++, (int)pass);
@@ -498,7 +498,7 @@ smoke_check_2(int express_test)
/* dirty_destroys */ dirty_destroys,
/* dirty_unprotects */ dirty_unprotects);
- if ( show_progress ) /* 4 */
+ if(show_progress) /* 4 */
HDfprintf(stdout, "%s() - %0d -- pass = %d\n",
FUNC, mile_stone++, (int)pass);
@@ -517,7 +517,7 @@ smoke_check_2(int express_test)
/* dirty_destroys */ dirty_destroys,
/* dirty_unprotects */ dirty_unprotects);
- if ( show_progress ) /* 5 */
+ if(show_progress) /* 5 */
HDfprintf(stdout, "%s() - %0d -- pass = %d\n",
FUNC, mile_stone++, (int)pass);
@@ -536,7 +536,7 @@ smoke_check_2(int express_test)
/* dirty_destroys */ dirty_destroys,
/* dirty_unprotects */ dirty_unprotects);
- if ( show_progress ) /* 6 */
+ if(show_progress) /* 6 */
HDfprintf(stdout, "%s() - %0d -- pass = %d\n",
FUNC, mile_stone++, (int)pass);
@@ -547,7 +547,7 @@ smoke_check_2(int express_test)
/* dump_stats */ FALSE,
/* dump_detailed_stats */ FALSE);
- if ( show_progress ) /* 7 */
+ if(show_progress) /* 7 */
HDfprintf(stdout, "%s() - %0d -- pass = %d\n",
FUNC, mile_stone++, (int)pass);
@@ -561,7 +561,7 @@ smoke_check_2(int express_test)
/* do_inserts */ TRUE,
/* dirty_unprotects */ dirty_unprotects);
- if ( show_progress ) /* 8 */
+ if(show_progress) /* 8 */
HDfprintf(stdout, "%s() - %0d -- pass = %d\n",
FUNC, mile_stone++, (int)pass);
@@ -572,7 +572,7 @@ smoke_check_2(int express_test)
/* dump_stats */ FALSE,
/* dump_detailed_stats */ FALSE);
- if ( show_progress ) /* 9 */
+ if(show_progress) /* 9 */
HDfprintf(stdout, "%s() - %0d -- pass = %d\n",
FUNC, mile_stone++, (int)pass);
@@ -586,22 +586,22 @@ smoke_check_2(int express_test)
/* do_inserts */ TRUE,
/* dirty_unprotects */ dirty_unprotects);
- if ( show_progress ) /* 10 */
+ if(show_progress) /* 10 */
HDfprintf(stdout, "%s() - %0d -- pass = %d\n",
FUNC, mile_stone++, (int)pass);
takedown_cache(file_ptr, display_stats, TRUE);
- if ( show_progress ) /* 11 */
+ if(show_progress) /* 11 */
HDfprintf(stdout, "%s() - %0d -- pass = %d\n",
FUNC, mile_stone++, (int)pass);
verify_clean();
verify_unprotected();
- if ( pass ) { PASSED(); } else { H5_FAILED(); }
+ if(pass) { PASSED(); } else { H5_FAILED(); }
- if ( ! pass ) {
+ if(!pass) {
HDfprintf(stdout, "%s(): failure_mssg = \"%s\".\n",
FUNC, failure_mssg);
@@ -641,7 +641,7 @@ smoke_check_3(int express_test)
TESTING("smoke check #3 -- all clean, ins, dest, ren, 2/1 KB cache");
- switch ( express_test )
+ switch (express_test)
{
case 0:
max_index = (10 * 1024) - 1;
@@ -664,20 +664,20 @@ smoke_check_3(int express_test)
pass = TRUE;
- if ( show_progress ) /* 1 */
+ if(show_progress) /* 1 */
HDfprintf(stdout, "%s() - %0d -- pass = %d\n",
FUNC, mile_stone++, (int)pass);
reset_entries();
- if ( show_progress ) /* 2 */
+ if(show_progress) /* 2 */
HDfprintf(stdout, "%s() - %0d -- pass = %d\n",
FUNC, mile_stone++, (int)pass);
file_ptr = setup_cache((size_t)(2 * 1024),
(size_t)(1 * 1024));
- if ( show_progress ) /* 3 */
+ if(show_progress) /* 3 */
HDfprintf(stdout, "%s() - %0d -- pass = %d\n",
FUNC, mile_stone++, (int)pass);
@@ -696,7 +696,7 @@ smoke_check_3(int express_test)
/* dirty_destroys */ dirty_destroys,
/* dirty_unprotects */ dirty_unprotects);
- if ( show_progress ) /* 4 */
+ if(show_progress) /* 4 */
HDfprintf(stdout, "%s() - %0d -- pass = %d\n",
FUNC, mile_stone++, (int)pass);
@@ -715,7 +715,7 @@ smoke_check_3(int express_test)
/* dirty_destroys */ dirty_destroys,
/* dirty_unprotects */ dirty_unprotects);
- if ( show_progress ) /* 5 */
+ if(show_progress) /* 5 */
HDfprintf(stdout, "%s() - %0d -- pass = %d\n",
FUNC, mile_stone++, (int)pass);
@@ -734,7 +734,7 @@ smoke_check_3(int express_test)
/* dirty_destroys */ dirty_destroys,
/* dirty_unprotects */ dirty_unprotects);
- if ( show_progress ) /* 6 */
+ if(show_progress) /* 6 */
HDfprintf(stdout, "%s() - %0d -- pass = %d\n",
FUNC, mile_stone++, (int)pass);
@@ -745,7 +745,7 @@ smoke_check_3(int express_test)
/* dump_stats */ FALSE,
/* dump_detailed_stats */ FALSE);
- if ( show_progress ) /* 7 */
+ if(show_progress) /* 7 */
HDfprintf(stdout, "%s() - %0d -- pass = %d\n",
FUNC, mile_stone++, (int)pass);
@@ -759,7 +759,7 @@ smoke_check_3(int express_test)
/* do_inserts */ TRUE,
/* dirty_unprotects */ dirty_unprotects);
- if ( show_progress ) /* 8 */
+ if(show_progress) /* 8 */
HDfprintf(stdout, "%s() - %0d -- pass = %d\n",
FUNC, mile_stone++, (int)pass);
@@ -770,7 +770,7 @@ smoke_check_3(int express_test)
/* dump_stats */ FALSE,
/* dump_detailed_stats */ FALSE);
- if ( show_progress ) /* 9 */
+ if(show_progress) /* 9 */
HDfprintf(stdout, "%s() - %0d -- pass = %d\n",
FUNC, mile_stone++, (int)pass);
@@ -784,22 +784,22 @@ smoke_check_3(int express_test)
/* do_inserts */ TRUE,
/* dirty_unprotects */ dirty_unprotects);
- if ( show_progress ) /* 10 */
+ if(show_progress) /* 10 */
HDfprintf(stdout, "%s() - %0d -- pass = %d\n",
FUNC, mile_stone++, (int)pass);
takedown_cache(file_ptr, display_stats, TRUE);
- if ( show_progress ) /* 11 */
+ if(show_progress) /* 11 */
HDfprintf(stdout, "%s() - %0d -- pass = %d\n",
FUNC, mile_stone++, (int)pass);
verify_clean();
verify_unprotected();
- if ( pass ) { PASSED(); } else { H5_FAILED(); }
+ if(pass) { PASSED(); } else { H5_FAILED(); }
- if ( ! pass ) {
+ if(!pass) {
HDfprintf(stdout, "%s(): failure_mssg = \"%s\".\n",
FUNC, failure_mssg);
@@ -840,7 +840,7 @@ smoke_check_4(int express_test)
TESTING("smoke check #4 -- ~1/2 dirty, ins, dest, ren, 2/1 KB cache");
- switch ( express_test )
+ switch (express_test)
{
case 0:
max_index = (10 * 1024) - 1;
@@ -863,20 +863,20 @@ smoke_check_4(int express_test)
pass = TRUE;
- if ( show_progress ) /* 1 */
+ if(show_progress) /* 1 */
HDfprintf(stdout, "%s() - %0d -- pass = %d\n",
FUNC, mile_stone++, (int)pass);
reset_entries();
- if ( show_progress ) /* 2 */
+ if(show_progress) /* 2 */
HDfprintf(stdout, "%s() - %0d -- pass = %d\n",
FUNC, mile_stone++, (int)pass);
file_ptr = setup_cache((size_t)(2 * 1024),
(size_t)(1 * 1024));
- if ( show_progress ) /* 3 */
+ if(show_progress) /* 3 */
HDfprintf(stdout, "%s() - %0d -- pass = %d\n",
FUNC, mile_stone++, (int)pass);
@@ -895,7 +895,7 @@ smoke_check_4(int express_test)
/* dirty_destroys */ dirty_destroys,
/* dirty_unprotects */ dirty_unprotects);
- if ( show_progress ) /* 4 */
+ if(show_progress) /* 4 */
HDfprintf(stdout, "%s() - %0d -- pass = %d\n",
FUNC, mile_stone++, (int)pass);
@@ -914,7 +914,7 @@ smoke_check_4(int express_test)
/* dirty_destroys */ dirty_destroys,
/* dirty_unprotects */ dirty_unprotects);
- if ( show_progress ) /* 5 */
+ if(show_progress) /* 5 */
HDfprintf(stdout, "%s() - %0d -- pass = %d\n",
FUNC, mile_stone++, (int)pass);
@@ -933,7 +933,7 @@ smoke_check_4(int express_test)
/* dirty_destroys */ dirty_destroys,
/* dirty_unprotects */ dirty_unprotects);
- if ( show_progress ) /* 6 */
+ if(show_progress) /* 6 */
HDfprintf(stdout, "%s() - %0d -- pass = %d\n",
FUNC, mile_stone++, (int)pass);
@@ -944,7 +944,7 @@ smoke_check_4(int express_test)
/* dump_stats */ FALSE,
/* dump_detailed_stats */ FALSE);
- if ( show_progress ) /* 7 */
+ if(show_progress) /* 7 */
HDfprintf(stdout, "%s() - %0d -- pass = %d\n",
FUNC, mile_stone++, (int)pass);
@@ -958,7 +958,7 @@ smoke_check_4(int express_test)
/* do_inserts */ TRUE,
/* dirty_unprotects */ dirty_unprotects);
- if ( show_progress ) /* 8 */
+ if(show_progress) /* 8 */
HDfprintf(stdout, "%s() - %0d -- pass = %d\n",
FUNC, mile_stone++, (int)pass);
@@ -969,7 +969,7 @@ smoke_check_4(int express_test)
/* dump_stats */ FALSE,
/* dump_detailed_stats */ FALSE);
- if ( show_progress ) /* 9 */
+ if(show_progress) /* 9 */
HDfprintf(stdout, "%s() - %0d -- pass = %d\n",
FUNC, mile_stone++, (int)pass);
@@ -983,22 +983,22 @@ smoke_check_4(int express_test)
/* do_inserts */ TRUE,
/* dirty_unprotects */ dirty_unprotects);
- if ( show_progress ) /* 10 */
+ if(show_progress) /* 10 */
HDfprintf(stdout, "%s() - %0d -- pass = %d\n",
FUNC, mile_stone++, (int)pass);
takedown_cache(file_ptr, display_stats, TRUE);
- if ( show_progress ) /* 11 */
+ if(show_progress) /* 11 */
HDfprintf(stdout, "%s() - %0d -- pass = %d\n",
FUNC, mile_stone++, (int)pass);
verify_clean();
verify_unprotected();
- if ( pass ) { PASSED(); } else { H5_FAILED(); }
+ if(pass) { PASSED(); } else { H5_FAILED(); }
- if ( ! pass ) {
+ if(!pass) {
HDfprintf(stdout, "%s(): failure_mssg = \"%s\".\n",
FUNC, failure_mssg);
@@ -1087,7 +1087,7 @@ smoke_check_5(int express_test)
TESTING("smoke check #5 -- all clean, ins, prot, unprot, AR cache 1");
- switch ( express_test )
+ switch (express_test)
{
case 0:
max_index = (10 * 1024) - 1;
@@ -1110,13 +1110,13 @@ smoke_check_5(int express_test)
pass = TRUE;
- if ( show_progress ) /* 1 */
+ if(show_progress) /* 1 */
HDfprintf(stdout, "%s() - %0d -- pass = %d\n",
FUNC, mile_stone++, (int)pass);
reset_entries();
- if ( show_progress ) /* 2 */
+ if(show_progress) /* 2 */
HDfprintf(stdout, "%s() - %0d -- pass = %d\n",
FUNC, mile_stone++, (int)pass);
@@ -1124,18 +1124,18 @@ smoke_check_5(int express_test)
(size_t)(1 * 1024));
cache_ptr = file_ptr->shared->cache;
- if ( pass ) {
+ if(pass) {
result = H5C_set_cache_auto_resize_config(cache_ptr, &auto_size_ctl);
- if ( result != SUCCEED ) {
+ if(result != SUCCEED) {
pass = FALSE;
failure_mssg = "H5C_set_cache_auto_resize_config failed 1.\n";
}
}
- if ( show_progress ) /* 3 */
+ if(show_progress) /* 3 */
HDfprintf(stdout, "%s() - %0d -- pass = %d\n",
FUNC, mile_stone++, (int)pass);
@@ -1147,7 +1147,7 @@ smoke_check_5(int express_test)
/* display_detailed_stats */ FALSE,
/* do_inserts */ FALSE);
- if ( show_progress ) /* 4 */
+ if(show_progress) /* 4 */
HDfprintf(stdout, "%s() - %0d -- pass = %d\n",
FUNC, mile_stone++, (int)pass);
@@ -1159,7 +1159,7 @@ smoke_check_5(int express_test)
/* display_detailed_stats */ FALSE,
/* do_inserts */ FALSE);
- if ( show_progress ) /* 5 */
+ if(show_progress) /* 5 */
HDfprintf(stdout, "%s() - %0d -- pass = %d\n",
FUNC, mile_stone++, (int)pass);
@@ -1171,7 +1171,7 @@ smoke_check_5(int express_test)
/* display_detailed_stats */ FALSE,
/* do_inserts */ TRUE);
- if ( show_progress ) /* 6 */
+ if(show_progress) /* 6 */
HDfprintf(stdout, "%s() - %0d -- pass = %d\n",
FUNC, mile_stone++, (int)pass);
@@ -1182,7 +1182,7 @@ smoke_check_5(int express_test)
/* dump_stats */ FALSE,
/* dump_detailed_stats */ FALSE);
- if ( show_progress ) /* 7 */
+ if(show_progress) /* 7 */
HDfprintf(stdout, "%s() - %0d -- pass = %d\n",
FUNC, mile_stone++, (int)pass);
@@ -1195,7 +1195,7 @@ smoke_check_5(int express_test)
/* do_inserts */ TRUE,
/* dirty_unprotects */ dirty_unprotects);
- if ( show_progress ) /* 8 */
+ if(show_progress) /* 8 */
HDfprintf(stdout, "%s() - %0d -- pass = %d\n",
FUNC, mile_stone++, (int)pass);
@@ -1206,7 +1206,7 @@ smoke_check_5(int express_test)
/* dump_stats */ FALSE,
/* dump_detailed_stats */ FALSE);
- if ( show_progress ) /* 9 */
+ if(show_progress) /* 9 */
HDfprintf(stdout, "%s() - %0d -- pass = %d\n",
FUNC, mile_stone++, (int)pass);
@@ -1219,22 +1219,22 @@ smoke_check_5(int express_test)
/* do_inserts */ TRUE,
/* dirty_unprotects */ dirty_unprotects);
- if ( show_progress ) /* 10 */
+ if(show_progress) /* 10 */
HDfprintf(stdout, "%s() - %0d -- pass = %d\n",
FUNC, mile_stone++, (int)pass);
takedown_cache(file_ptr, display_stats, TRUE);
- if ( show_progress ) /* 11 */
+ if(show_progress) /* 11 */
HDfprintf(stdout, "%s() - %0d -- pass = %d\n",
FUNC, mile_stone++, (int)pass);
verify_clean();
verify_unprotected();
- if ( pass ) { PASSED(); } else { H5_FAILED(); }
+ if(pass) { PASSED(); } else { H5_FAILED(); }
- if ( ! pass ) {
+ if(!pass) {
HDfprintf(stdout, "%s(): failure_mssg = \"%s\".\n",
FUNC, failure_mssg);
@@ -1325,7 +1325,7 @@ smoke_check_6(int express_test)
pass = TRUE;
- switch ( express_test )
+ switch (express_test)
{
case 0:
max_index = (10 * 1024) - 1;
@@ -1346,13 +1346,13 @@ smoke_check_6(int express_test)
break;
}
- if ( show_progress ) /* 1 */
+ if(show_progress) /* 1 */
HDfprintf(stdout, "%s() - %0d -- pass = %d\n",
FUNC, mile_stone++, (int)pass);
reset_entries();
- if ( show_progress ) /* 2 */
+ if(show_progress) /* 2 */
HDfprintf(stdout, "%s() - %0d -- pass = %d\n",
FUNC, mile_stone++, (int)pass);
@@ -1360,18 +1360,18 @@ smoke_check_6(int express_test)
(size_t)(1 * 1024));
cache_ptr = file_ptr->shared->cache;
- if ( pass ) {
+ if(pass) {
result = H5C_set_cache_auto_resize_config(cache_ptr, &auto_size_ctl);
- if ( result != SUCCEED ) {
+ if(result != SUCCEED) {
pass = FALSE;
failure_mssg = "H5C_set_cache_auto_resize_config failed 1.\n";
}
}
- if ( show_progress ) /* 3 */
+ if(show_progress) /* 3 */
HDfprintf(stdout, "%s() - %0d -- pass = %d\n",
FUNC, mile_stone++, (int)pass);
@@ -1383,7 +1383,7 @@ smoke_check_6(int express_test)
/* display_detailed_stats */ FALSE,
/* do_inserts */ FALSE);
- if ( show_progress ) /* 4 */
+ if(show_progress) /* 4 */
HDfprintf(stdout, "%s() - %0d -- pass = %d\n",
FUNC, mile_stone++, (int)pass);
@@ -1395,7 +1395,7 @@ smoke_check_6(int express_test)
/* display_detailed_stats */ FALSE,
/* do_inserts */ FALSE);
- if ( show_progress ) /* 5 */
+ if(show_progress) /* 5 */
HDfprintf(stdout, "%s() - %0d -- pass = %d\n",
FUNC, mile_stone++, (int)pass);
@@ -1407,7 +1407,7 @@ smoke_check_6(int express_test)
/* display_detailed_stats */ FALSE,
/* do_inserts */ TRUE);
- if ( show_progress ) /* 6 */
+ if(show_progress) /* 6 */
HDfprintf(stdout, "%s() - %0d -- pass = %d\n",
FUNC, mile_stone++, (int)pass);
@@ -1418,7 +1418,7 @@ smoke_check_6(int express_test)
/* dump_stats */ FALSE,
/* dump_detailed_stats */ FALSE);
- if ( show_progress ) /* 7 */
+ if(show_progress) /* 7 */
HDfprintf(stdout, "%s() - %0d -- pass = %d\n",
FUNC, mile_stone++, (int)pass);
@@ -1431,7 +1431,7 @@ smoke_check_6(int express_test)
/* do_inserts */ TRUE,
/* dirty_unprotects */ dirty_unprotects);
- if ( show_progress ) /* 8 */
+ if(show_progress) /* 8 */
HDfprintf(stdout, "%s() - %0d -- pass = %d\n",
FUNC, mile_stone++, (int)pass);
@@ -1442,7 +1442,7 @@ smoke_check_6(int express_test)
/* dump_stats */ FALSE,
/* dump_detailed_stats */ FALSE);
- if ( show_progress ) /* 9 */
+ if(show_progress) /* 9 */
HDfprintf(stdout, "%s() - %0d -- pass = %d\n",
FUNC, mile_stone++, (int)pass);
@@ -1455,22 +1455,22 @@ smoke_check_6(int express_test)
/* do_inserts */ TRUE,
/* dirty_unprotects */ dirty_unprotects);
- if ( show_progress ) /* 10 */
+ if(show_progress) /* 10 */
HDfprintf(stdout, "%s() - %0d -- pass = %d\n",
FUNC, mile_stone++, (int)pass);
takedown_cache(file_ptr, display_stats, TRUE);
- if ( show_progress ) /* 11 */
+ if(show_progress) /* 11 */
HDfprintf(stdout, "%s() - %0d -- pass = %d\n",
FUNC, mile_stone++, (int)pass);
verify_clean();
verify_unprotected();
- if ( pass ) { PASSED(); } else { H5_FAILED(); }
+ if(pass) { PASSED(); } else { H5_FAILED(); }
- if ( ! pass ) {
+ if(!pass) {
HDfprintf(stdout, "%s(): failure_mssg = \"%s\".\n",
FUNC, failure_mssg);
@@ -1560,7 +1560,7 @@ smoke_check_7(int express_test)
TESTING("smoke check #7 -- all clean, ins, prot, unprot, AR cache 2");
- switch ( express_test )
+ switch (express_test)
{
case 0:
max_index = (10 * 1024) - 1;
@@ -1583,13 +1583,13 @@ smoke_check_7(int express_test)
pass = TRUE;
- if ( show_progress ) /* 1 */
+ if(show_progress) /* 1 */
HDfprintf(stdout, "%s() - %0d -- pass = %d\n",
FUNC, mile_stone++, (int)pass);
reset_entries();
- if ( show_progress ) /* 2 */
+ if(show_progress) /* 2 */
HDfprintf(stdout, "%s() - %0d -- pass = %d\n",
FUNC, mile_stone++, (int)pass);
@@ -1597,18 +1597,18 @@ smoke_check_7(int express_test)
(size_t)(1 * 1024));
cache_ptr = file_ptr->shared->cache;
- if ( pass ) {
+ if(pass) {
result = H5C_set_cache_auto_resize_config(cache_ptr, &auto_size_ctl);
- if ( result != SUCCEED ) {
+ if(result != SUCCEED) {
pass = FALSE;
failure_mssg = "H5C_set_cache_auto_resize_config failed 1.\n";
}
}
- if ( show_progress ) /* 3 */
+ if(show_progress) /* 3 */
HDfprintf(stdout, "%s() - %0d -- pass = %d\n",
FUNC, mile_stone++, (int)pass);
@@ -1620,7 +1620,7 @@ smoke_check_7(int express_test)
/* display_detailed_stats */ FALSE,
/* do_inserts */ FALSE);
- if ( show_progress ) /* 4 */
+ if(show_progress) /* 4 */
HDfprintf(stdout, "%s() - %0d -- pass = %d\n",
FUNC, mile_stone++, (int)pass);
@@ -1632,7 +1632,7 @@ smoke_check_7(int express_test)
/* display_detailed_stats */ FALSE,
/* do_inserts */ FALSE);
- if ( show_progress ) /* 5 */
+ if(show_progress) /* 5 */
HDfprintf(stdout, "%s() - %0d -- pass = %d\n",
FUNC, mile_stone++, (int)pass);
@@ -1644,7 +1644,7 @@ smoke_check_7(int express_test)
/* display_detailed_stats */ FALSE,
/* do_inserts */ TRUE);
- if ( show_progress ) /* 6 */
+ if(show_progress) /* 6 */
HDfprintf(stdout, "%s() - %0d -- pass = %d\n",
FUNC, mile_stone++, (int)pass);
@@ -1655,7 +1655,7 @@ smoke_check_7(int express_test)
/* dump_stats */ FALSE,
/* dump_detailed_stats */ FALSE);
- if ( show_progress ) /* 7 */
+ if(show_progress) /* 7 */
HDfprintf(stdout, "%s() - %0d -- pass = %d\n",
FUNC, mile_stone++, (int)pass);
@@ -1668,7 +1668,7 @@ smoke_check_7(int express_test)
/* do_inserts */ TRUE,
/* dirty_unprotects */ dirty_unprotects);
- if ( show_progress ) /* 8 */
+ if(show_progress) /* 8 */
HDfprintf(stdout, "%s() - %0d -- pass = %d\n",
FUNC, mile_stone++, (int)pass);
@@ -1679,7 +1679,7 @@ smoke_check_7(int express_test)
/* dump_stats */ FALSE,
/* dump_detailed_stats */ FALSE);
- if ( show_progress ) /* 9 */
+ if(show_progress) /* 9 */
HDfprintf(stdout, "%s() - %0d -- pass = %d\n",
FUNC, mile_stone++, (int)pass);
@@ -1692,22 +1692,22 @@ smoke_check_7(int express_test)
/* do_inserts */ TRUE,
/* dirty_unprotects */ dirty_unprotects);
- if ( show_progress ) /* 10 */
+ if(show_progress) /* 10 */
HDfprintf(stdout, "%s() - %0d -- pass = %d\n",
FUNC, mile_stone++, (int)pass);
takedown_cache(file_ptr, display_stats, TRUE);
- if ( show_progress ) /* 11 */
+ if(show_progress) /* 11 */
HDfprintf(stdout, "%s() - %0d -- pass = %d\n",
FUNC, mile_stone++, (int)pass);
verify_clean();
verify_unprotected();
- if ( pass ) { PASSED(); } else { H5_FAILED(); }
+ if(pass) { PASSED(); } else { H5_FAILED(); }
- if ( ! pass ) {
+ if(!pass) {
HDfprintf(stdout, "%s(): failure_mssg = \"%s\".\n",
FUNC, failure_mssg);
@@ -1797,7 +1797,7 @@ smoke_check_8(int express_test)
TESTING("smoke check #8 -- ~1/2 dirty, ins, prot, unprot, AR cache 2");
- switch ( express_test )
+ switch (express_test)
{
case 0:
max_index = (10 * 1024) - 1;
@@ -1820,31 +1820,31 @@ smoke_check_8(int express_test)
pass = TRUE;
- if ( show_progress ) /* 1 */
+ if(show_progress) /* 1 */
HDfprintf(stdout, "%s() - %0d -- pass = %d\n",
FUNC, mile_stone++, (int)pass);
reset_entries();
- if ( show_progress ) /* 2 */
+ if(show_progress) /* 2 */
HDfprintf(stdout, "%s() - %0d -- pass = %d\n",
FUNC, mile_stone++, (int)pass);
file_ptr = setup_cache((size_t)(2 * 1024), (size_t)(1 * 1024));
cache_ptr = file_ptr->shared->cache;
- if ( pass ) {
+ if(pass) {
result = H5C_set_cache_auto_resize_config(cache_ptr, &auto_size_ctl);
- if ( result != SUCCEED ) {
+ if(result != SUCCEED) {
pass = FALSE;
failure_mssg = "H5C_set_cache_auto_resize_config failed 1.\n";
}
}
- if ( show_progress ) /* 3 */
+ if(show_progress) /* 3 */
HDfprintf(stdout, "%s() - %0d -- pass = %d\n",
FUNC, mile_stone++, (int)pass);
@@ -1856,7 +1856,7 @@ smoke_check_8(int express_test)
/* display_detailed_stats */ FALSE,
/* do_inserts */ FALSE);
- if ( show_progress ) /* 4 */
+ if(show_progress) /* 4 */
HDfprintf(stdout, "%s() - %0d -- pass = %d\n",
FUNC, mile_stone++, (int)pass);
@@ -1868,7 +1868,7 @@ smoke_check_8(int express_test)
/* display_detailed_stats */ FALSE,
/* do_inserts */ FALSE);
- if ( show_progress ) /* 5 */
+ if(show_progress) /* 5 */
HDfprintf(stdout, "%s() - %0d -- pass = %d\n",
FUNC, mile_stone++, (int)pass);
@@ -1880,7 +1880,7 @@ smoke_check_8(int express_test)
/* display_detailed_stats */ FALSE,
/* do_inserts */ TRUE);
- if ( show_progress ) /* 6 */
+ if(show_progress) /* 6 */
HDfprintf(stdout, "%s() - %0d -- pass = %d\n",
FUNC, mile_stone++, (int)pass);
@@ -1891,7 +1891,7 @@ smoke_check_8(int express_test)
/* dump_stats */ FALSE,
/* dump_detailed_stats */ FALSE);
- if ( show_progress ) /* 7 */
+ if(show_progress) /* 7 */
HDfprintf(stdout, "%s() - %0d -- pass = %d\n",
FUNC, mile_stone++, (int)pass);
@@ -1904,7 +1904,7 @@ smoke_check_8(int express_test)
/* do_inserts */ TRUE,
/* dirty_unprotects */ dirty_unprotects);
- if ( show_progress ) /* 8 */
+ if(show_progress) /* 8 */
HDfprintf(stdout, "%s() - %0d -- pass = %d\n",
FUNC, mile_stone++, (int)pass);
@@ -1915,7 +1915,7 @@ smoke_check_8(int express_test)
/* dump_stats */ FALSE,
/* dump_detailed_stats */ FALSE);
- if ( show_progress ) /* 9 */
+ if(show_progress) /* 9 */
HDfprintf(stdout, "%s() - %0d -- pass = %d\n",
FUNC, mile_stone++, (int)pass);
@@ -1928,22 +1928,22 @@ smoke_check_8(int express_test)
/* do_inserts */ TRUE,
/* dirty_unprotects */ dirty_unprotects);
- if ( show_progress ) /* 10 */
+ if(show_progress) /* 10 */
HDfprintf(stdout, "%s() - %0d -- pass = %d\n",
FUNC, mile_stone++, (int)pass);
takedown_cache(file_ptr, display_stats, TRUE);
- if ( show_progress ) /* 11 */
+ if(show_progress) /* 11 */
HDfprintf(stdout, "%s() - %0d -- pass = %d\n",
FUNC, mile_stone++, (int)pass);
verify_clean();
verify_unprotected();
- if ( pass ) { PASSED(); } else { H5_FAILED(); }
+ if(pass) { PASSED(); } else { H5_FAILED(); }
- if ( ! pass ) {
+ if(!pass) {
HDfprintf(stdout, "%s(): failure_mssg = \"%s\".\n",
FUNC, failure_mssg);
@@ -1994,7 +1994,7 @@ smoke_check_9(int express_test)
TESTING("smoke check #9 -- all clean, ins, dest, ren, 4/2 MB, corked");
- switch ( express_test )
+ switch (express_test)
{
case 0:
max_index = (10 * 1024) - 1;
@@ -2017,13 +2017,13 @@ smoke_check_9(int express_test)
pass = TRUE;
- if ( show_progress ) /* 1 */
+ if(show_progress) /* 1 */
HDfprintf(stdout, "%s() - %0d -- pass = %d\n",
FUNC, mile_stone++, (int)pass);
reset_entries();
- if ( show_progress ) /* 2 */
+ if(show_progress) /* 2 */
HDfprintf(stdout, "%s() - %0d -- pass = %d\n",
FUNC, mile_stone++, (int)pass);
@@ -2033,22 +2033,22 @@ smoke_check_9(int express_test)
/* disable evictions */
- if ( show_progress ) /* 3 */
+ if(show_progress) /* 3 */
HDfprintf(stdout, "%s() - %0d -- pass = %d\n",
FUNC, mile_stone++, (int)pass);
- if ( pass ) {
+ if(pass) {
result = H5C_set_evictions_enabled(cache_ptr, FALSE);
- if ( result < 0 ) {
+ if(result < 0) {
pass = FALSE;
failure_mssg = "can't disable evictions 1.\n";
}
}
- if ( show_progress ) /* 4 */
+ if(show_progress) /* 4 */
HDfprintf(stdout, "%s() - %0d -- pass = %d -- evictions disabled\n",
FUNC, mile_stone++, (int)pass);
@@ -2069,22 +2069,22 @@ smoke_check_9(int express_test)
/* enable evictions */
- if ( show_progress ) /* 5 */
+ if(show_progress) /* 5 */
HDfprintf(stdout, "%s() - %0d -- pass = %d\n",
FUNC, mile_stone++, (int)pass);
- if ( pass ) {
+ if(pass) {
result = H5C_set_evictions_enabled(cache_ptr, TRUE);
- if ( result < 0 ) {
+ if(result < 0) {
pass = FALSE;
failure_mssg = "can't enable evictions 1.\n";
}
}
- if ( show_progress ) /* 6 */
+ if(show_progress) /* 6 */
HDfprintf(stdout, "%s() - %0d -- pass = %d -- evictions enabled \n",
FUNC, mile_stone++, (int)pass);
@@ -2103,22 +2103,22 @@ smoke_check_9(int express_test)
/* dirty_destroys */ dirty_destroys,
/* dirty_unprotects */ dirty_unprotects);
- if ( show_progress ) /* 7 */
+ if(show_progress) /* 7 */
HDfprintf(stdout, "%s() - %0d -- pass = %d\n",
FUNC, mile_stone++, (int)pass);
- if ( pass ) {
+ if(pass) {
result = H5C_set_evictions_enabled(cache_ptr, FALSE);
- if ( result < 0 ) {
+ if(result < 0) {
pass = FALSE;
failure_mssg = "can't disable evictions 2.\n";
}
}
- if ( show_progress ) /* 8 */
+ if(show_progress) /* 8 */
HDfprintf(stdout, "%s() - %0d -- pass = %d -- evictions disabled \n",
FUNC, mile_stone++, (int)pass);
@@ -2137,22 +2137,22 @@ smoke_check_9(int express_test)
/* dirty_destroys */ dirty_destroys,
/* dirty_unprotects */ dirty_unprotects);
- if ( show_progress ) /* 9 */
+ if(show_progress) /* 9 */
HDfprintf(stdout, "%s() - %0d -- pass = %d\n",
FUNC, mile_stone++, (int)pass);
- if ( pass ) {
+ if(pass) {
result = H5C_set_evictions_enabled(cache_ptr, TRUE);
- if ( result < 0 ) {
+ if(result < 0) {
pass = FALSE;
failure_mssg = "can't enable evictions 2.\n";
}
}
- if ( show_progress ) /* 10 */
+ if(show_progress) /* 10 */
HDfprintf(stdout, "%s() - %0d -- pass = %d -- evictions enabled \n",
FUNC, mile_stone++, (int)pass);
@@ -2163,22 +2163,22 @@ smoke_check_9(int express_test)
/* dump_stats */ FALSE,
/* dump_detailed_stats */ FALSE);
- if ( show_progress ) /* 11 */
+ if(show_progress) /* 11 */
HDfprintf(stdout, "%s() - %0d -- pass = %d\n",
FUNC, mile_stone++, (int)pass);
- if ( pass ) {
+ if(pass) {
result = H5C_set_evictions_enabled(cache_ptr, FALSE);
- if ( result < 0 ) {
+ if(result < 0) {
pass = FALSE;
failure_mssg = "can't disable evictions 3.\n";
}
}
- if ( show_progress ) /* 12 */
+ if(show_progress) /* 12 */
HDfprintf(stdout, "%s() - %0d -- pass = %d -- evictions disabled\n",
FUNC, mile_stone++, (int)pass);
@@ -2192,7 +2192,7 @@ smoke_check_9(int express_test)
/* do_inserts */ TRUE,
/* dirty_unprotects */ dirty_unprotects);
- if ( show_progress ) /* 13 */
+ if(show_progress) /* 13 */
HDfprintf(stdout, "%s() - %0d -- pass = %d\n",
FUNC, mile_stone++, (int)pass);
@@ -2203,22 +2203,22 @@ smoke_check_9(int express_test)
/* dump_stats */ FALSE,
/* dump_detailed_stats */ FALSE);
- if ( show_progress ) /* 14 */
+ if(show_progress) /* 14 */
HDfprintf(stdout, "%s() - %0d -- pass = %d\n",
FUNC, mile_stone++, (int)pass);
- if ( pass ) {
+ if(pass) {
result = H5C_set_evictions_enabled(cache_ptr, TRUE);
- if ( result < 0 ) {
+ if(result < 0) {
pass = FALSE;
failure_mssg = "can't enable evictions 3.\n";
}
}
- if ( show_progress ) /* 15 */
+ if(show_progress) /* 15 */
HDfprintf(stdout, "%s() - %0d -- pass = %d -- evictions enabled\n",
FUNC, mile_stone++, (int)pass);
@@ -2232,15 +2232,15 @@ smoke_check_9(int express_test)
/* do_inserts */ TRUE,
/* dirty_unprotects */ dirty_unprotects);
- if ( show_progress ) /* 16 */
+ if(show_progress) /* 16 */
HDfprintf(stdout, "%s() - %0d -- pass = %d\n",
FUNC, mile_stone++, (int)pass);
- if ( pass ) {
+ if(pass) {
result = H5C_set_evictions_enabled(cache_ptr, FALSE);
- if ( result < 0 ) {
+ if(result < 0) {
pass = FALSE;
failure_mssg = "can't disable evictions 4.\n";
@@ -2248,22 +2248,22 @@ smoke_check_9(int express_test)
}
- if ( show_progress ) /* 17 */
+ if(show_progress) /* 17 */
HDfprintf(stdout, "%s() - %0d -- pass = %d -- evictions disabled\n",
FUNC, mile_stone++, (int)pass);
takedown_cache(file_ptr, display_stats, TRUE);
- if ( show_progress ) /* 18 */
+ if(show_progress) /* 18 */
HDfprintf(stdout, "%s() - %0d -- pass = %d\n",
FUNC, mile_stone++, (int)pass);
verify_clean();
verify_unprotected();
- if ( pass ) { PASSED(); } else { H5_FAILED(); }
+ if(pass) { PASSED(); } else { H5_FAILED(); }
- if ( ! pass ) {
+ if(!pass) {
HDfprintf(stdout, "%s(): failure_mssg = \"%s\".\n",
FUNC, failure_mssg);
@@ -2314,7 +2314,7 @@ smoke_check_10(int express_test)
TESTING("smoke check #10 -- ~1/2 dirty, ins, dest, ren, 4/2 MB, corked");
- switch ( express_test )
+ switch (express_test)
{
case 0:
max_index = (10 * 1024) - 1;
@@ -2337,13 +2337,13 @@ smoke_check_10(int express_test)
pass = TRUE;
- if ( show_progress ) /* 1 */
+ if(show_progress) /* 1 */
HDfprintf(stdout, "%s() - %0d -- pass = %d\n",
FUNC, mile_stone++, (int)pass);
reset_entries();
- if ( show_progress ) /* 2 */
+ if(show_progress) /* 2 */
HDfprintf(stdout, "%s() - %0d -- pass = %d\n",
FUNC, mile_stone++, (int)pass);
@@ -2351,7 +2351,7 @@ smoke_check_10(int express_test)
(size_t)(2 * 1024 * 1024));
cache_ptr = file_ptr->shared->cache;
- if ( show_progress ) /* 3 */
+ if(show_progress) /* 3 */
HDfprintf(stdout, "%s() - %0d -- pass = %d -- evictions enabled\n",
FUNC, mile_stone++, (int)pass);
@@ -2370,22 +2370,22 @@ smoke_check_10(int express_test)
/* dirty_destroys */ dirty_destroys,
/* dirty_unprotects */ dirty_unprotects);
- if ( show_progress ) /* 4 */
+ if(show_progress) /* 4 */
HDfprintf(stdout, "%s() - %0d -- pass = %d\n",
FUNC, mile_stone++, (int)pass);
- if ( pass ) {
+ if(pass) {
result = H5C_set_evictions_enabled(cache_ptr, FALSE);
- if ( result < 0 ) {
+ if(result < 0) {
pass = FALSE;
failure_mssg = "can't disable evictions 1.\n";
}
}
- if ( show_progress ) /* 5 */
+ if(show_progress) /* 5 */
HDfprintf(stdout, "%s() - %0d -- pass = %d -- evictions disabled\n",
FUNC, mile_stone++, (int)pass);
@@ -2404,22 +2404,22 @@ smoke_check_10(int express_test)
/* dirty_destroys */ dirty_destroys,
/* dirty_unprotects */ dirty_unprotects);
- if ( show_progress ) /* 6 */
+ if(show_progress) /* 6 */
HDfprintf(stdout, "%s() - %0d -- pass = %d\n",
FUNC, mile_stone++, (int)pass);
- if ( pass ) {
+ if(pass) {
result = H5C_set_evictions_enabled(cache_ptr, TRUE);
- if ( result < 0 ) {
+ if(result < 0) {
pass = FALSE;
failure_mssg = "can't enable evictions 1.\n";
}
}
- if ( show_progress ) /* 7 */
+ if(show_progress) /* 7 */
HDfprintf(stdout, "%s() - %0d -- pass = %d -- evictions enabled\n",
FUNC, mile_stone++, (int)pass);
@@ -2438,22 +2438,22 @@ smoke_check_10(int express_test)
/* dirty_destroys */ dirty_destroys,
/* dirty_unprotects */ dirty_unprotects);
- if ( show_progress ) /* 8 */
+ if(show_progress) /* 8 */
HDfprintf(stdout, "%s() - %0d -- pass = %d\n",
FUNC, mile_stone++, (int)pass);
- if ( pass ) {
+ if(pass) {
result = H5C_set_evictions_enabled(cache_ptr, FALSE);
- if ( result < 0 ) {
+ if(result < 0) {
pass = FALSE;
failure_mssg = "can't disable evictions 2.\n";
}
}
- if ( show_progress ) /* 9 */
+ if(show_progress) /* 9 */
HDfprintf(stdout, "%s() - %0d -- pass = %d -- evictions disabled\n",
FUNC, mile_stone++, (int)pass);
@@ -2464,22 +2464,22 @@ smoke_check_10(int express_test)
/* dump_stats */ FALSE,
/* dump_detailed_stats */ FALSE);
- if ( show_progress ) /* 10 */
+ if(show_progress) /* 10 */
HDfprintf(stdout, "%s() - %0d -- pass = %d\n",
FUNC, mile_stone++, (int)pass);
- if ( pass ) {
+ if(pass) {
result = H5C_set_evictions_enabled(cache_ptr, TRUE);
- if ( result < 0 ) {
+ if(result < 0) {
pass = FALSE;
failure_mssg = "can't enable evictions 2.\n";
}
}
- if ( show_progress ) /* 11 */
+ if(show_progress) /* 11 */
HDfprintf(stdout, "%s() - %0d -- pass = %d -- evictions enabled\n",
FUNC, mile_stone++, (int)pass);
@@ -2493,22 +2493,22 @@ smoke_check_10(int express_test)
/* do_inserts */ TRUE,
/* dirty_unprotects */ dirty_unprotects);
- if ( show_progress ) /* 12 */
+ if(show_progress) /* 12 */
HDfprintf(stdout, "%s() - %0d -- pass = %d\n",
FUNC, mile_stone++, (int)pass);
- if ( pass ) {
+ if(pass) {
result = H5C_set_evictions_enabled(cache_ptr, FALSE);
- if ( result < 0 ) {
+ if(result < 0) {
pass = FALSE;
failure_mssg = "can't disable evictions 3.\n";
}
}
- if ( show_progress ) /* 13 */
+ if(show_progress) /* 13 */
HDfprintf(stdout, "%s() - %0d -- pass = %d -- evictions disabled\n",
FUNC, mile_stone++, (int)pass);
@@ -2519,22 +2519,22 @@ smoke_check_10(int express_test)
/* dump_stats */ FALSE,
/* dump_detailed_stats */ FALSE);
- if ( show_progress ) /* 14 */
+ if(show_progress) /* 14 */
HDfprintf(stdout, "%s() - %0d -- pass = %d\n",
FUNC, mile_stone++, (int)pass);
- if ( pass ) {
+ if(pass) {
result = H5C_set_evictions_enabled(cache_ptr, TRUE);
- if ( result < 0 ) {
+ if(result < 0) {
pass = FALSE;
failure_mssg = "can't enable evictions 3.\n";
}
}
- if ( show_progress ) /* 15 */
+ if(show_progress) /* 15 */
HDfprintf(stdout, "%s() - %0d -- pass = %d -- evictions enabled\n",
FUNC, mile_stone++, (int)pass);
@@ -2548,37 +2548,37 @@ smoke_check_10(int express_test)
/* do_inserts */ TRUE,
/* dirty_unprotects */ dirty_unprotects);
- if ( show_progress ) /* 16 */
+ if(show_progress) /* 16 */
HDfprintf(stdout, "%s() - %0d -- pass = %d\n",
FUNC, mile_stone++, (int)pass);
- if ( pass ) {
+ if(pass) {
result = H5C_set_evictions_enabled(cache_ptr, FALSE);
- if ( result < 0 ) {
+ if(result < 0) {
pass = FALSE;
failure_mssg = "can't disable evictions 4.\n";
}
}
- if ( show_progress ) /* 17 */
+ if(show_progress) /* 17 */
HDfprintf(stdout, "%s() - %0d -- pass = %d -- evictions disabled\n",
FUNC, mile_stone++, (int)pass);
takedown_cache(file_ptr, display_stats, TRUE);
- if ( show_progress ) /* 18 */
+ if(show_progress) /* 18 */
HDfprintf(stdout, "%s() - %0d -- pass = %d\n",
FUNC, mile_stone++, (int)pass);
verify_clean();
verify_unprotected();
- if ( pass ) { PASSED(); } else { H5_FAILED(); }
+ if(pass) { PASSED(); } else { H5_FAILED(); }
- if ( ! pass ) {
+ if(!pass) {
HDfprintf(stdout, "%s(): failure_mssg = \"%s\".\n",
FUNC, failure_mssg);
@@ -2630,7 +2630,7 @@ express_test)
#if H5C_MAINTAIN_CLEAN_AND_DIRTY_LRU_LISTS
- switch ( express_test )
+ switch (express_test)
{
case 0:
max_index = (10 * 1024) - 1;
@@ -2653,20 +2653,20 @@ express_test)
pass = TRUE;
- if ( show_progress ) /* 1 */
+ if(show_progress) /* 1 */
HDfprintf(stdout, "%s() - %0d -- pass = %d\n",
FUNC, mile_stone++, (int)pass);
reset_entries();
- if ( show_progress ) /* 2 */
+ if(show_progress) /* 2 */
HDfprintf(stdout, "%s() - %0d -- pass = %d\n",
FUNC, mile_stone++, (int)pass);
file_ptr = setup_cache((size_t)(1 * 1024 * 1024),
(size_t)(0));
- if ( show_progress ) /* 3 */
+ if(show_progress) /* 3 */
HDfprintf(stdout, "%s() - %0d -- pass = %d\n",
FUNC, mile_stone++, (int)pass);
@@ -2685,7 +2685,7 @@ express_test)
/* dirty_destroys */ TRUE,
/* dirty_unprotects */ TRUE);
- if ( show_progress ) /* 4 */
+ if(show_progress) /* 4 */
HDfprintf(stdout, "%s() - %0d -- pass = %d\n",
FUNC, mile_stone++, (int)pass);
@@ -2706,7 +2706,7 @@ express_test)
/* dirty_destroys */ FALSE,
/* dirty_unprotects */ NO_CHANGE);
- if ( show_progress ) /* 5 */
+ if(show_progress) /* 5 */
HDfprintf(stdout, "%s() - %0d -- pass = %d\n",
FUNC, mile_stone++, (int)pass);
@@ -2727,7 +2727,7 @@ express_test)
/* dirty_destroys */ TRUE,
/* dirty_unprotects */ TRUE);
- if ( show_progress ) /* 6 */
+ if(show_progress) /* 6 */
HDfprintf(stdout, "%s() - %0d -- pass = %d\n",
FUNC, mile_stone++, (int)pass);
@@ -2738,7 +2738,7 @@ express_test)
/* dump_stats */ FALSE,
/* dump_detailed_stats */ FALSE);
- if ( show_progress ) /* 7 */
+ if(show_progress) /* 7 */
HDfprintf(stdout, "%s() - %0d -- pass = %d\n",
FUNC, mile_stone++, (int)pass);
@@ -2752,7 +2752,7 @@ express_test)
/* do_inserts */ TRUE,
/* dirty_unprotects */ TRUE);
- if ( show_progress ) /* 8 */
+ if(show_progress) /* 8 */
HDfprintf(stdout, "%s() - %0d -- pass = %d\n",
FUNC, mile_stone++, (int)pass);
@@ -2770,22 +2770,22 @@ express_test)
write_permitted = TRUE;
- if ( show_progress ) /* 9 */
+ if(show_progress) /* 9 */
HDfprintf(stdout, "%s() - %0d -- pass = %d\n",
FUNC, mile_stone++, (int)pass);
takedown_cache(file_ptr, display_stats, TRUE);
- if ( show_progress ) /* 10 */
+ if(show_progress) /* 10 */
HDfprintf(stdout, "%s() - %0d -- pass = %d\n",
FUNC, mile_stone++, (int)pass);
verify_clean();
verify_unprotected();
- if ( pass ) { PASSED(); } else { H5_FAILED(); }
+ if(pass) { PASSED(); } else { H5_FAILED(); }
- if ( ! pass ) {
+ if(!pass) {
HDfprintf(stdout, "%s(): failure_mssg = \"%s\".\n",
FUNC, failure_mssg);
@@ -2857,7 +2857,7 @@ check_insert_entry(void)
* used to be the case.)
*/
- if ( pass ) {
+ if(pass) {
reset_entries();
@@ -2866,7 +2866,7 @@ check_insert_entry(void)
cache_ptr = file_ptr->shared->cache;
}
- if ( pass ) {
+ if(pass) {
insert_entry(file_ptr, entry_type, 0, H5C__NO_FLAGS_SET);
insert_entry(file_ptr, entry_type, 1, H5C__SET_FLUSH_MARKER_FLAG);
@@ -2878,7 +2878,7 @@ check_insert_entry(void)
i = 0;
base_addr = entries[0];
- while ( ( pass ) && ( i < 4 ) )
+ while(pass && (i < 4))
{
entry_ptr = &(base_addr[i]);
@@ -2888,39 +2888,39 @@ check_insert_entry(void)
&in_cache, &is_dirty, &is_protected,
&is_pinned, NULL, NULL, NULL);
- if ( result < 0 ) {
+ if(result < 0) {
pass = FALSE;
failure_mssg = "H5C_get_entry_status() reports failure.";
}
- if ( pass ) {
+ if(pass) {
/* check the universals */
- if ( ( ! in_cache ) || ( ! is_dirty ) || ( is_protected ) ||
- ( entry_size != entry_sizes[entry_type] ) ) {
+ if((!in_cache) || (!is_dirty) || (is_protected) ||
+ (entry_size != entry_sizes[entry_type])) {
pass = FALSE;
failure_mssg = "Unexpected insert results 1.";
}
}
- if ( pass ) {
+ if(pass) {
/* verify that the pinned flag got set correctly */
- if ( ( i == 2 ) || ( i == 3 ) ) {
+ if((i == 2) || (i == 3)) {
- if ( ! is_pinned ) {
+ if(!is_pinned) {
pass = FALSE;
failure_mssg = "Unexpected insert results 2.";
}
- } else if ( is_pinned ) {
+ } else if(is_pinned) {
pass = FALSE;
failure_mssg = "Unexpected insert results 3.";
- } else if ( is_pinned != ((entry_ptr->header).is_pinned) ) {
+ } else if(is_pinned != ((entry_ptr->header).is_pinned)) {
pass = FALSE;
failure_mssg = "Unexpected insert results 4.";
@@ -2931,38 +2931,38 @@ check_insert_entry(void)
* Now start looking at the cache data structures directly.
*/
- if ( pass ) {
+ if(pass) {
/* Verify that the flush marker got set correctly */
- if ( ( i == 1 ) || ( i == 3 ) ) {
+ if((i == 1) || (i == 3)) {
- if ( ! ((entry_ptr->header).flush_marker) ) {
+ if(!((entry_ptr->header).flush_marker)) {
pass = FALSE;
failure_mssg = "Unexpected insert results 5.";
}
- } else if ( (entry_ptr->header).flush_marker ) {
+ } else if((entry_ptr->header).flush_marker) {
pass = FALSE;
failure_mssg = "Unexpected insert results 6.";
}
}
- if ( pass ) {
+ if(pass) {
/* Verify that pinned entries are in the pinned entry list */
- if ( (entry_ptr->header).is_pinned ) {
+ if((entry_ptr->header).is_pinned) {
search_ptr = cache_ptr->pel_head_ptr;
- while ( ( search_ptr != NULL ) &&
- ( search_ptr !=
- (struct H5C_cache_entry_t *)entry_ptr ) )
+ while((search_ptr != NULL) &&
+ (search_ptr !=
+ (struct H5C_cache_entry_t *)entry_ptr))
{
search_ptr = search_ptr->next;
}
- if ( search_ptr == NULL ) {
+ if(search_ptr == NULL) {
pass = FALSE;
failure_mssg = "Unexpected insert results 7.";
@@ -2970,21 +2970,21 @@ check_insert_entry(void)
}
}
- if ( pass ) {
+ if(pass) {
/* Verify that unpinned entries are in the LRU list */
- if ( ! ((entry_ptr->header).is_pinned) ) {
+ if(!((entry_ptr->header).is_pinned)) {
search_ptr = cache_ptr->LRU_head_ptr;
- while ( ( search_ptr != NULL ) &&
- ( search_ptr !=
- (struct H5C_cache_entry_t *)entry_ptr ) )
+ while((search_ptr != NULL) &&
+ (search_ptr !=
+ (struct H5C_cache_entry_t *)entry_ptr))
{
search_ptr = search_ptr->next;
}
- if ( search_ptr == NULL ) {
+ if(search_ptr == NULL) {
pass = FALSE;
failure_mssg = "Unexpected insert results 8.";
@@ -2993,21 +2993,21 @@ check_insert_entry(void)
}
#if H5C_MAINTAIN_CLEAN_AND_DIRTY_LRU_LISTS
- if ( pass ) {
+ if(pass) {
/* Verify that unpinned entries are in the dirty LRU list */
- if ( ! ((entry_ptr->header).is_pinned) ) {
+ if(!((entry_ptr->header).is_pinned)) {
search_ptr = cache_ptr->dLRU_head_ptr;
- while ( ( search_ptr != NULL ) &&
- ( search_ptr !=
- (struct H5C_cache_entry_t *)entry_ptr ) )
+ while((search_ptr != NULL) &&
+ (search_ptr !=
+ (struct H5C_cache_entry_t *)entry_ptr))
{
search_ptr = search_ptr->aux_next;
}
- if ( search_ptr == NULL ) {
+ if(search_ptr == NULL) {
pass = FALSE;
failure_mssg = "Unexpected insert results 9.";
@@ -3025,24 +3025,24 @@ check_insert_entry(void)
* as expected.
*/
- if ( pass ) {
-
- if ( ( cache_ptr->index_len != 4 ) ||
- ( cache_ptr->index_size != 4 * entry_sizes[entry_type] ) ||
- ( cache_ptr->slist_len != 4 ) ||
- ( cache_ptr->slist_size != 4 * entry_sizes[entry_type] ) ||
- ( cache_ptr->pl_len != 0 ) ||
- ( cache_ptr->pl_size != (size_t)0 ) ||
- ( cache_ptr->pel_len != 2 ) ||
- ( cache_ptr->pel_size != 2 * entry_sizes[entry_type] ) ||
- ( cache_ptr->LRU_list_len != 2 ) ||
- ( cache_ptr->LRU_list_size != 2 * entry_sizes[entry_type] ) ||
+ if(pass) {
+
+ if((cache_ptr->index_len != 4) ||
+ (cache_ptr->index_size != 4 * entry_sizes[entry_type]) ||
+ (cache_ptr->slist_len != 4) ||
+ (cache_ptr->slist_size != 4 * entry_sizes[entry_type]) ||
+ (cache_ptr->pl_len != 0) ||
+ (cache_ptr->pl_size != (size_t)0) ||
+ (cache_ptr->pel_len != 2) ||
+ (cache_ptr->pel_size != 2 * entry_sizes[entry_type]) ||
+ (cache_ptr->LRU_list_len != 2) ||
+ (cache_ptr->LRU_list_size != 2 * entry_sizes[entry_type]) ||
#if H5C_MAINTAIN_CLEAN_AND_DIRTY_LRU_LISTS
- ( cache_ptr->dLRU_list_len != 2 ) ||
- ( cache_ptr->dLRU_list_size != 2 * entry_sizes[entry_type] ) ||
+ (cache_ptr->dLRU_list_len != 2) ||
+ (cache_ptr->dLRU_list_size != 2 * entry_sizes[entry_type]) ||
#endif /* H5C_MAINTAIN_CLEAN_AND_DIRTY_LRU_LISTS */
- ( cache_ptr->cLRU_list_len != 0 ) ||
- ( cache_ptr->cLRU_list_size != (size_t)0 ) ) {
+ (cache_ptr->cLRU_list_len != 0) ||
+ (cache_ptr->cLRU_list_size != (size_t)0)) {
pass = FALSE;
failure_mssg = "Unexpected insert results 10.";
@@ -3053,21 +3053,21 @@ check_insert_entry(void)
* stats are collected.
*/
#if H5C_COLLECT_CACHE_STATS
- if ( pass ) {
-
- if ( ( cache_ptr->insertions[entry_type] != 4 ) ||
- ( cache_ptr->pinned_insertions[entry_type] != 2 ) ||
- ( cache_ptr->pins[entry_type] != 2 ) ||
- ( cache_ptr->unpins[entry_type] != 0 ) ||
- ( cache_ptr->dirty_pins[entry_type] != 0 ) ||
- ( cache_ptr->max_index_len != 4 ) ||
- ( cache_ptr->max_index_size != 4 * entry_sizes[entry_type] ) ||
- ( cache_ptr->max_slist_len != 4 ) ||
- ( cache_ptr->max_slist_size != 4 * entry_sizes[entry_type] ) ||
- ( cache_ptr->max_pl_len != 0 ) ||
- ( cache_ptr->max_pl_size != (size_t)0 ) ||
- ( cache_ptr->max_pel_len != 2 ) ||
- ( cache_ptr->max_pel_size != 2 * entry_sizes[entry_type] ) ) {
+ if(pass) {
+
+ if((cache_ptr->insertions[entry_type] != 4) ||
+ (cache_ptr->pinned_insertions[entry_type] != 2) ||
+ (cache_ptr->pins[entry_type] != 2) ||
+ (cache_ptr->unpins[entry_type] != 0) ||
+ (cache_ptr->dirty_pins[entry_type] != 0) ||
+ (cache_ptr->max_index_len != 4) ||
+ (cache_ptr->max_index_size != 4 * entry_sizes[entry_type]) ||
+ (cache_ptr->max_slist_len != 4) ||
+ (cache_ptr->max_slist_size != 4 * entry_sizes[entry_type]) ||
+ (cache_ptr->max_pl_len != 0) ||
+ (cache_ptr->max_pl_size != (size_t)0) ||
+ (cache_ptr->max_pel_len != 2) ||
+ (cache_ptr->max_pel_size != 2 * entry_sizes[entry_type])) {
pass = FALSE;
failure_mssg = "Unexpected insert results 11.";
@@ -3077,20 +3077,20 @@ check_insert_entry(void)
/* Unpin the pinned entries so we can take down the cache cleanly. */
- if ( pass ) {
+ if(pass) {
unpin_entry(entry_type, 2);
unpin_entry(entry_type, 3);
}
- if ( pass ) {
+ if(pass) {
takedown_cache(file_ptr, FALSE, FALSE);
}
- if ( pass ) { PASSED(); } else { H5_FAILED(); }
+ if(pass) { PASSED(); } else { H5_FAILED(); }
- if ( ! pass ) {
+ if(!pass) {
HDfprintf(stdout, "%s(): failure_mssg = \"%s\".\n",
FUNC, failure_mssg);
@@ -3131,7 +3131,7 @@ check_flush_cache(void)
* place.
*/
- if ( pass ) {
+ if(pass) {
reset_entries();
@@ -3143,7 +3143,7 @@ check_flush_cache(void)
* checking in this case, so simply check the return values.
*/
- if ( pass ) {
+ if(pass) {
check_flush_cache__empty_cache(file_ptr);
}
@@ -3152,29 +3152,29 @@ check_flush_cache(void)
* Start with a clean entry, with no flags set.
*/
- if ( pass ) {
+ if(pass) {
check_flush_cache__single_entry(file_ptr);
}
- if ( pass ) {
+ if(pass) {
check_flush_cache__multi_entry(file_ptr);
}
- if ( pass ) {
+ if(pass) {
check_flush_cache__flush_ops(file_ptr);
}
- if ( pass ) {
+ if(pass) {
takedown_cache(file_ptr, FALSE, FALSE);
}
- if ( pass ) { PASSED(); } else { H5_FAILED(); }
+ if(pass) { PASSED(); } else { H5_FAILED(); }
- if ( ! pass ) {
+ if(!pass) {
HDfprintf(stdout, "%s(): failure_mssg = \"%s\".\n",
FUNC, failure_mssg);
@@ -3207,13 +3207,13 @@ check_flush_cache__empty_cache(H5F_t * file_ptr)
H5C_t * cache_ptr = file_ptr->shared->cache;
herr_t result;
- if ( cache_ptr == NULL ) {
+ if(cache_ptr == NULL) {
pass = FALSE;
failure_mssg = "cache_ptr NULL on entry to empty cache case.";
}
- else if ( ( cache_ptr->index_len != 0 ) ||
- ( cache_ptr->index_size != 0 ) ) {
+ else if((cache_ptr->index_len != 0) ||
+ (cache_ptr->index_size != 0)) {
pass = FALSE;
failure_mssg = "cache not empty at beginning of empty cache case.";
@@ -3224,33 +3224,33 @@ check_flush_cache__empty_cache(H5F_t * file_ptr)
* checking in this case, so simply check the return values.
*/
- if ( pass ) {
+ if(pass) {
result = H5C_flush_cache(file_ptr, H5AC_ind_read_dxpl_id, H5C__NO_FLAGS_SET);
- if ( result < 0 ) {
+ if(result < 0) {
pass = FALSE;
failure_mssg = "flush with flags = 0x00 failed on empty cache.\n";
}
}
- if ( pass ) {
+ if(pass) {
result = H5C_flush_cache(file_ptr, H5AC_ind_read_dxpl_id, H5C__FLUSH_INVALIDATE_FLAG);
- if ( result < 0 ) {
+ if(result < 0) {
pass = FALSE;
failure_mssg = "flush with flags = 0x04 failed on empty cache.\n";
}
}
- if ( pass ) {
+ if(pass) {
result = H5C_flush_cache(file_ptr, H5AC_ind_read_dxpl_id, H5C__FLUSH_CLEAR_ONLY_FLAG);
- if ( result < 0 ) {
+ if(result < 0) {
pass = FALSE;
failure_mssg = "flush with flags = 0x08 failed on empty cache.\n";
@@ -3258,11 +3258,11 @@ check_flush_cache__empty_cache(H5F_t * file_ptr)
}
- if ( pass ) {
+ if(pass) {
result = H5C_flush_cache(file_ptr, H5AC_ind_read_dxpl_id, H5C__FLUSH_MARKED_ENTRIES_FLAG);
- if ( result < 0 ) {
+ if(result < 0) {
pass = FALSE;
failure_mssg = "flush with flags = 0x10 failed on empty cache.\n";
@@ -3296,19 +3296,19 @@ check_flush_cache__multi_entry(H5F_t * file_ptr)
{
H5C_t *cache_ptr = file_ptr->shared->cache;
- if ( cache_ptr == NULL ) {
+ if(cache_ptr == NULL) {
pass = FALSE;
failure_mssg = "cache_ptr NULL on entry to multi entry case.";
}
- else if ( ( cache_ptr->index_len != 0 ) ||
- ( cache_ptr->index_size != 0 ) ) {
+ else if((cache_ptr->index_len != 0) ||
+ (cache_ptr->index_size != 0)) {
pass = FALSE;
failure_mssg = "cache not empty at beginning of multi entry case.";
}
- if ( pass )
+ if(pass)
{
int test_num = 1;
unsigned int flush_flags = H5C__NO_FLAGS_SET;
@@ -3402,7 +3402,7 @@ check_flush_cache__multi_entry(H5F_t * file_ptr)
}
- if ( pass )
+ if(pass)
{
int test_num = 2;
unsigned int flush_flags = H5C__FLUSH_INVALIDATE_FLAG;
@@ -3496,7 +3496,7 @@ check_flush_cache__multi_entry(H5F_t * file_ptr)
}
- if ( pass )
+ if(pass)
{
int test_num = 3;
unsigned int flush_flags = H5C__FLUSH_CLEAR_ONLY_FLAG;
@@ -3590,7 +3590,7 @@ check_flush_cache__multi_entry(H5F_t * file_ptr)
}
- if ( pass )
+ if(pass)
{
int test_num = 4;
unsigned int flush_flags = H5C__FLUSH_MARKED_ENTRIES_FLAG;
@@ -3684,7 +3684,7 @@ check_flush_cache__multi_entry(H5F_t * file_ptr)
}
- if ( pass )
+ if(pass)
{
int test_num = 5;
unsigned int flush_flags = H5C__FLUSH_INVALIDATE_FLAG |
@@ -3779,7 +3779,7 @@ check_flush_cache__multi_entry(H5F_t * file_ptr)
}
- if ( pass )
+ if(pass)
{
int test_num = 6;
unsigned int flush_flags = H5C__FLUSH_INVALIDATE_FLAG |
@@ -3874,7 +3874,7 @@ check_flush_cache__multi_entry(H5F_t * file_ptr)
}
- if ( pass )
+ if(pass)
{
int test_num = 7;
unsigned int flush_flags = H5C__FLUSH_CLEAR_ONLY_FLAG |
@@ -3969,7 +3969,7 @@ check_flush_cache__multi_entry(H5F_t * file_ptr)
}
- if ( pass )
+ if(pass)
{
int test_num = 8;
unsigned int flush_flags = H5C__FLUSH_INVALIDATE_FLAG |
@@ -4066,7 +4066,7 @@ check_flush_cache__multi_entry(H5F_t * file_ptr)
/* verify that all other flags are ignored */
- if ( pass )
+ if(pass)
{
int test_num = 9;
unsigned int flush_flags = (unsigned)
@@ -4168,7 +4168,7 @@ check_flush_cache__multi_entry(H5F_t * file_ptr)
* of the flush routine to unravel collections of pinned entries.
*/
- if ( pass )
+ if(pass)
{
int test_num = 1;
unsigned int flush_flags = H5C__NO_FLAGS_SET;
@@ -4314,7 +4314,7 @@ check_flush_cache__multi_entry(H5F_t * file_ptr)
}
- if ( pass )
+ if(pass)
{
int test_num = 2;
unsigned int flush_flags = H5C__FLUSH_INVALIDATE_FLAG;
@@ -4443,7 +4443,7 @@ check_flush_cache__multi_entry(H5F_t * file_ptr)
flush_flags, spec_size, spec);
}
- if ( pass )
+ if(pass)
{
int test_num = 3;
unsigned int flush_flags = H5C__FLUSH_INVALIDATE_FLAG |
@@ -4565,7 +4565,7 @@ check_flush_cache__multi_entry(H5F_t * file_ptr)
}
- if ( pass )
+ if(pass)
{
int test_num = 4;
unsigned int flush_flags = H5C__FLUSH_INVALIDATE_FLAG |
@@ -4695,7 +4695,7 @@ check_flush_cache__multi_entry(H5F_t * file_ptr)
}
- if ( pass )
+ if(pass)
{
int test_num = 5;
unsigned int flush_flags = H5C__FLUSH_INVALIDATE_FLAG |
@@ -4863,7 +4863,7 @@ check_flush_cache__multi_entry_test(H5F_t * file_ptr,
test_num);
#endif /* JRM */
- if ( cache_ptr == NULL ) {
+ if(cache_ptr == NULL) {
pass = FALSE;
HDsnprintf(msg, (size_t)128,
@@ -4871,8 +4871,8 @@ check_flush_cache__multi_entry_test(H5F_t * file_ptr,
test_num);
failure_mssg = msg;
}
- else if ( ( cache_ptr->index_len != 0 ) ||
- ( cache_ptr->index_size != 0 ) ) {
+ else if((cache_ptr->index_len != 0) ||
+ (cache_ptr->index_size != 0)) {
pass = FALSE;
@@ -4881,7 +4881,7 @@ check_flush_cache__multi_entry_test(H5F_t * file_ptr,
test_num);
failure_mssg = msg;
}
- else if ( ( spec_size < 1 ) || ( spec == NULL ) ) {
+ else if((spec_size < 1) || (spec == NULL)) {
pass = FALSE;
HDsnprintf(msg, (size_t)128,
@@ -4891,13 +4891,13 @@ check_flush_cache__multi_entry_test(H5F_t * file_ptr,
}
i = 0;
- while ( ( pass ) && ( i < spec_size ) )
+ while(pass && (i < spec_size))
{
- if ( ( spec[i].entry_num != i ) ||
- ( spec[i].entry_type < 0 ) ||
- ( spec[i].entry_type >= NUMBER_OF_ENTRY_TYPES ) ||
- ( spec[i].entry_index < 0 ) ||
- ( spec[i].entry_index > max_indices[spec[i].entry_type] ) ) {
+ if((spec[i].entry_num != i) ||
+ (spec[i].entry_type < 0) ||
+ (spec[i].entry_type >= NUMBER_OF_ENTRY_TYPES) ||
+ (spec[i].entry_index < 0) ||
+ (spec[i].entry_index > max_indices[spec[i].entry_type])) {
pass = FALSE;
HDsnprintf(msg, (size_t)128,
@@ -4909,9 +4909,9 @@ check_flush_cache__multi_entry_test(H5F_t * file_ptr,
}
i = 0;
- while ( ( pass ) && ( i < spec_size ) )
+ while(pass && (i < spec_size))
{
- if ( spec[i].insert_flag ) {
+ if(spec[i].insert_flag) {
insert_entry(file_ptr, spec[i].entry_type, spec[i].entry_index,
spec[i].flags);
@@ -4929,11 +4929,11 @@ check_flush_cache__multi_entry_test(H5F_t * file_ptr,
i++;
}
- if ( pass ) {
+ if(pass) {
result = H5C_flush_cache(file_ptr, H5AC_ind_read_dxpl_id, flush_flags);
- if ( result < 0 ) {
+ if(result < 0) {
pass = FALSE;
HDsnprintf(msg, (size_t)128,
@@ -4944,14 +4944,14 @@ check_flush_cache__multi_entry_test(H5F_t * file_ptr,
}
i = 0;
- while ( ( pass ) && ( i < spec_size ) )
+ while(pass && (i < spec_size))
{
base_addr = entries[spec[i].entry_type];
entry_ptr = &(base_addr[spec[i].entry_index]);
- if ( ( entry_ptr->deserialized != spec[i].expected_deserialized ) ||
- ( entry_ptr->serialized != spec[i].expected_serialized ) ||
- ( entry_ptr->destroyed != spec[i].expected_destroyed ) ) {
+ if((entry_ptr->deserialized != spec[i].expected_deserialized) ||
+ (entry_ptr->serialized != spec[i].expected_serialized) ||
+ (entry_ptr->destroyed != spec[i].expected_destroyed)) {
#if 0 /* This is useful debugging code. Lets keep it around. */
@@ -4975,24 +4975,24 @@ check_flush_cache__multi_entry_test(H5F_t * file_ptr,
i++;
}
- if ( pass ) {
+ if(pass) {
- if ( ( ( (flush_flags & H5C__FLUSH_INVALIDATE_FLAG) == 0 )
+ if((((flush_flags & H5C__FLUSH_INVALIDATE_FLAG) == 0)
&&
- ( ( cache_ptr->index_len != spec_size )
+ ((cache_ptr->index_len != spec_size)
||
- ( cache_ptr->index_size != total_entry_size )
- )
- )
+ (cache_ptr->index_size != total_entry_size)
+ )
+ )
||
- ( ( (flush_flags & H5C__FLUSH_INVALIDATE_FLAG) != 0 )
+ (((flush_flags & H5C__FLUSH_INVALIDATE_FLAG) != 0)
&&
- ( ( cache_ptr->index_len != 0 )
+ ((cache_ptr->index_len != 0)
||
- ( cache_ptr->index_size != 0 )
- )
- )
- ) {
+ (cache_ptr->index_size != 0)
+ )
+ )
+ ) {
pass = FALSE;
HDsnprintf(msg, (size_t)128,
@@ -5003,11 +5003,11 @@ check_flush_cache__multi_entry_test(H5F_t * file_ptr,
}
/* clean up the cache to prep for the next test */
- if ( pass ) {
+ if(pass) {
result = H5C_flush_cache(file_ptr, H5AC_ind_read_dxpl_id, H5C__FLUSH_INVALIDATE_FLAG);
- if ( result < 0 ) {
+ if(result < 0) {
pass = FALSE;
HDsnprintf(msg, (size_t)128,
@@ -5015,8 +5015,8 @@ check_flush_cache__multi_entry_test(H5F_t * file_ptr,
test_num);
failure_mssg = msg;
}
- else if ( ( cache_ptr->index_len != 0 ) ||
- ( cache_ptr->index_size != 0 ) ) {
+ else if((cache_ptr->index_len != 0) ||
+ (cache_ptr->index_size != 0)) {
pass = FALSE;
HDsnprintf(msg, (size_t)128,
@@ -5028,7 +5028,7 @@ check_flush_cache__multi_entry_test(H5F_t * file_ptr,
}
i = 0;
- while ( ( pass ) && ( i < spec_size ) )
+ while(pass && (i < spec_size))
{
base_addr = entries[spec[i].entry_type];
entry_ptr = &(base_addr[spec[i].entry_index]);
@@ -5083,7 +5083,7 @@ check_flush_cache__pe_multi_entry_test(H5F_t * file_ptr,
test_num);
#endif /* JRM */
- if ( cache_ptr == NULL ) {
+ if(cache_ptr == NULL) {
pass = FALSE;
HDsnprintf(msg, (size_t)128,
@@ -5091,8 +5091,8 @@ check_flush_cache__pe_multi_entry_test(H5F_t * file_ptr,
test_num);
failure_mssg = msg;
}
- else if ( ( cache_ptr->index_len != 0 ) ||
- ( cache_ptr->index_size != 0 ) ) {
+ else if((cache_ptr->index_len != 0) ||
+ (cache_ptr->index_size != 0)) {
pass = FALSE;
@@ -5101,7 +5101,7 @@ check_flush_cache__pe_multi_entry_test(H5F_t * file_ptr,
test_num);
failure_mssg = msg;
}
- else if ( ( spec_size < 1 ) || ( spec == NULL ) ) {
+ else if((spec_size < 1) || (spec == NULL)) {
pass = FALSE;
HDsnprintf(msg, (size_t)128,
@@ -5111,15 +5111,15 @@ check_flush_cache__pe_multi_entry_test(H5F_t * file_ptr,
}
i = 0;
- while ( ( pass ) && ( i < spec_size ) )
+ while(pass && (i < spec_size))
{
- if ( ( spec[i].entry_num != i ) ||
- ( spec[i].entry_type < 0 ) ||
- ( spec[i].entry_type >= NUMBER_OF_ENTRY_TYPES ) ||
- ( spec[i].entry_index < 0 ) ||
- ( spec[i].entry_index > max_indices[spec[i].entry_type] ) ||
- ( spec[i].num_pins < 0 ) ||
- ( spec[i].num_pins > MAX_PINS ) ) {
+ if((spec[i].entry_num != i) ||
+ (spec[i].entry_type < 0) ||
+ (spec[i].entry_type >= NUMBER_OF_ENTRY_TYPES) ||
+ (spec[i].entry_index < 0) ||
+ (spec[i].entry_index > max_indices[spec[i].entry_type]) ||
+ (spec[i].num_pins < 0) ||
+ (spec[i].num_pins > MAX_PINS)) {
pass = FALSE;
HDsnprintf(msg, (size_t)128,
@@ -5131,9 +5131,9 @@ check_flush_cache__pe_multi_entry_test(H5F_t * file_ptr,
}
i = 0;
- while ( ( pass ) && ( i < spec_size ) )
+ while(pass && (i < spec_size))
{
- if ( spec[i].insert_flag ) {
+ if(spec[i].insert_flag) {
insert_entry(file_ptr, spec[i].entry_type, spec[i].entry_index,
spec[i].flags);
@@ -5148,7 +5148,7 @@ check_flush_cache__pe_multi_entry_test(H5F_t * file_ptr,
total_entry_size += entry_sizes[spec[i].entry_type];
- for ( j = 0; j < spec[i].num_pins; j++ )
+ for (j = 0; j < spec[i].num_pins; j++)
{
create_pinned_entry_dependency(file_ptr,
spec[i].entry_type,
@@ -5160,11 +5160,11 @@ check_flush_cache__pe_multi_entry_test(H5F_t * file_ptr,
i++;
}
- if ( pass ) {
+ if(pass) {
result = H5C_flush_cache(file_ptr, H5AC_ind_read_dxpl_id, flush_flags);
- if ( result < 0 ) {
+ if(result < 0) {
pass = FALSE;
HDsnprintf(msg, (size_t)128,
@@ -5175,14 +5175,14 @@ check_flush_cache__pe_multi_entry_test(H5F_t * file_ptr,
}
i = 0;
- while ( ( pass ) && ( i < spec_size ) )
+ while(pass && (i < spec_size))
{
base_addr = entries[spec[i].entry_type];
entry_ptr = &(base_addr[spec[i].entry_index]);
- if ( ( entry_ptr->deserialized != spec[i].expected_deserialized ) ||
- ( entry_ptr->serialized != spec[i].expected_serialized ) ||
- ( entry_ptr->destroyed != spec[i].expected_destroyed ) ) {
+ if((entry_ptr->deserialized != spec[i].expected_deserialized) ||
+ (entry_ptr->serialized != spec[i].expected_serialized) ||
+ (entry_ptr->destroyed != spec[i].expected_destroyed)) {
#if 0 /* This is useful debugging code. Lets keep it around. */
@@ -5206,24 +5206,24 @@ check_flush_cache__pe_multi_entry_test(H5F_t * file_ptr,
i++;
}
- if ( pass ) {
+ if(pass) {
- if ( ( ( (flush_flags & H5C__FLUSH_INVALIDATE_FLAG) == 0 )
+ if((((flush_flags & H5C__FLUSH_INVALIDATE_FLAG) == 0)
&&
- ( ( cache_ptr->index_len != spec_size )
+ ((cache_ptr->index_len != spec_size)
||
- ( cache_ptr->index_size != total_entry_size )
- )
- )
+ (cache_ptr->index_size != total_entry_size)
+ )
+ )
||
- ( ( (flush_flags & H5C__FLUSH_INVALIDATE_FLAG) != 0 )
+ (((flush_flags & H5C__FLUSH_INVALIDATE_FLAG) != 0)
&&
- ( ( cache_ptr->index_len != 0 )
+ ((cache_ptr->index_len != 0)
||
- ( cache_ptr->index_size != 0 )
- )
- )
- ) {
+ (cache_ptr->index_size != 0)
+ )
+ )
+ ) {
pass = FALSE;
HDsnprintf(msg, (size_t)128,
@@ -5234,11 +5234,11 @@ check_flush_cache__pe_multi_entry_test(H5F_t * file_ptr,
}
/* clean up the cache to prep for the next test */
- if ( pass ) {
+ if(pass) {
result = H5C_flush_cache(file_ptr, H5AC_ind_read_dxpl_id, H5C__FLUSH_INVALIDATE_FLAG);
- if ( result < 0 ) {
+ if(result < 0) {
pass = FALSE;
HDsnprintf(msg, (size_t)128,
@@ -5246,8 +5246,8 @@ check_flush_cache__pe_multi_entry_test(H5F_t * file_ptr,
test_num);
failure_mssg = msg;
}
- else if ( ( cache_ptr->index_len != 0 ) ||
- ( cache_ptr->index_size != 0 ) ) {
+ else if((cache_ptr->index_len != 0) ||
+ (cache_ptr->index_size != 0)) {
pass = FALSE;
HDsnprintf(msg, (size_t)128,
@@ -5259,7 +5259,7 @@ check_flush_cache__pe_multi_entry_test(H5F_t * file_ptr,
}
i = 0;
- while ( ( pass ) && ( i < spec_size ) )
+ while(pass && (i < spec_size))
{
base_addr = entries[spec[i].entry_type];
entry_ptr = &(base_addr[spec[i].entry_index]);
@@ -5302,19 +5302,19 @@ check_flush_cache__flush_ops(H5F_t * file_ptr)
{
H5C_t *cache_ptr = file_ptr->shared->cache;
- if ( cache_ptr == NULL ) {
+ if(cache_ptr == NULL) {
pass = FALSE;
failure_mssg = "cache_ptr NULL on entry to flush ops test.";
}
- else if ( ( cache_ptr->index_len != 0 ) ||
- ( cache_ptr->index_size != 0 ) ) {
+ else if((cache_ptr->index_len != 0) ||
+ (cache_ptr->index_size != 0)) {
pass = FALSE;
failure_mssg = "cache not empty at beginning of flush ops test.";
}
- if ( pass ) /* test #1 */
+ if(pass) /* test #1 */
{
/* start with a very simple test, in which there are two entries
* resident in cache, and the second entry dirties the first in
@@ -5418,7 +5418,7 @@ check_flush_cache__flush_ops(H5F_t * file_ptr)
checks);
}
- if ( pass ) /* test #2 */
+ if(pass) /* test #2 */
{
/* Same as test 1, only this time set the flush invalidate flag.
* Note that we must repeat all tests with the flush invalidate flag
@@ -5525,7 +5525,7 @@ check_flush_cache__flush_ops(H5F_t * file_ptr)
checks);
}
- if ( pass ) /* test #3 */
+ if(pass) /* test #3 */
{
/* Single entry test verifying that the cache can handle the case in
* which the call back function resizes the entry for which it has
@@ -5601,7 +5601,7 @@ check_flush_cache__flush_ops(H5F_t * file_ptr)
checks);
}
- if ( pass ) /* test #4 */
+ if(pass) /* test #4 */
{
/* Repeat test #4 with the flush invalidate flag.
*
@@ -5679,7 +5679,7 @@ check_flush_cache__flush_ops(H5F_t * file_ptr)
checks);
}
- if ( pass ) /* test #5 & #6 */
+ if(pass) /* test #5 & #6 */
{
/* Single entry test verifying that the cache can handle the case in
* which the call back function first resizes and then moves the
@@ -5774,7 +5774,7 @@ check_flush_cache__flush_ops(H5F_t * file_ptr)
* matter in this case. But we will do similar tests later with
* other entries in the cache.
*/
- if ( pass ) {
+ if(pass) {
spec[0].flush_ops[1].flag = TRUE;
test_num = 6;
@@ -5793,7 +5793,7 @@ check_flush_cache__flush_ops(H5F_t * file_ptr)
}
}
- if ( pass ) /* test #7 & #8 */
+ if(pass) /* test #7 & #8 */
{
/* Run tests 5 & 6 again, using the flush invalidate flag on the
* second test.
@@ -5892,7 +5892,7 @@ check_flush_cache__flush_ops(H5F_t * file_ptr)
* other entries in the cache.
*/
- if ( pass ) {
+ if(pass) {
test_num = 8;
flush_flags = H5C__FLUSH_INVALIDATE_FLAG;
@@ -5915,7 +5915,7 @@ check_flush_cache__flush_ops(H5F_t * file_ptr)
}
}
- if ( pass ) /* test #9 & #10 */
+ if(pass) /* test #9 & #10 */
{
/* Single entry test verifying that the cache can handle the case in
* which the call back function both resizes and moves the entry
@@ -6004,7 +6004,7 @@ check_flush_cache__flush_ops(H5F_t * file_ptr)
* matter in this case. But we will do similar tests later with
* other entries in the cache.
*/
- if ( pass ) {
+ if(pass) {
spec[0].flush_ops[1].flag = TRUE;
test_num = 10;
@@ -6023,7 +6023,7 @@ check_flush_cache__flush_ops(H5F_t * file_ptr)
}
}
- if ( pass ) /* test #11 & #12 */
+ if(pass) /* test #11 & #12 */
{
/* Repeat the previous test with the flush invalidate flag on the
* second test.
@@ -6115,7 +6115,7 @@ check_flush_cache__flush_ops(H5F_t * file_ptr)
* matter in this case. But we will do similar tests later with
* other entries in the cache.
*/
- if ( pass ) {
+ if(pass) {
test_num = 12;
flush_flags = H5C__FLUSH_INVALIDATE_FLAG;
@@ -6139,7 +6139,7 @@ check_flush_cache__flush_ops(H5F_t * file_ptr)
}
}
- if ( pass ) /* test #13 */
+ if(pass) /* test #13 */
{
/* Test the ability of the cache to handle the case in which
* the flush function of an entry that is resident in cache
@@ -6233,7 +6233,7 @@ check_flush_cache__flush_ops(H5F_t * file_ptr)
checks);
}
- if ( pass ) /* test #14 */
+ if(pass) /* test #14 */
{
/* Repeat previous test with the flush invalidate flag.
*
@@ -6329,7 +6329,7 @@ check_flush_cache__flush_ops(H5F_t * file_ptr)
checks);
}
- if ( pass ) /* test #15 */
+ if(pass) /* test #15 */
{
/* Test the ability of the cache to handle the case in which
* the flush function of an entry that is resident in cache
@@ -6424,7 +6424,7 @@ check_flush_cache__flush_ops(H5F_t * file_ptr)
checks);
}
- if ( pass ) /* test #16 */
+ if(pass) /* test #16 */
{
/* Repeat previous test with the flush invalidate flag.
*
@@ -6519,7 +6519,7 @@ check_flush_cache__flush_ops(H5F_t * file_ptr)
checks);
}
- if ( pass ) /* test #17 & #18 */
+ if(pass) /* test #17 & #18 */
{
/* Test the ability of the cache to handle the case in which
* the flush function of an entry that is resident in cache
@@ -6621,7 +6621,7 @@ check_flush_cache__flush_ops(H5F_t * file_ptr)
* the moved entries are moved forward in the slist. In the second
* they are moved backwards.
*/
- if ( pass ) {
+ if(pass) {
test_num = 18;
spec[0].flush_ops[2].flag = TRUE;
@@ -6643,7 +6643,7 @@ check_flush_cache__flush_ops(H5F_t * file_ptr)
}
}
- if ( pass ) /* test #19 & #20 */
+ if(pass) /* test #19 & #20 */
{
/* Repeat the above test with the flush invalidate flag on the
* second test.
@@ -6748,7 +6748,7 @@ check_flush_cache__flush_ops(H5F_t * file_ptr)
* the moved entries are moved forward in the slist. In the second
* they are moved backwards.
*/
- if ( pass ) {
+ if(pass) {
test_num = 20;
flush_flags = H5C__FLUSH_INVALIDATE_FLAG;
@@ -6778,7 +6778,7 @@ check_flush_cache__flush_ops(H5F_t * file_ptr)
}
}
- if ( pass ) /* test #21 */
+ if(pass) /* test #21 */
{
/* Now mix things up a bit.
*
@@ -6993,7 +6993,7 @@ check_flush_cache__flush_ops(H5F_t * file_ptr)
reset_entries();
}
- if ( pass ) /* test #22 */
+ if(pass) /* test #22 */
{
/* Mix things up some more.
*
@@ -7260,7 +7260,7 @@ check_flush_cache__flush_ops(H5F_t * file_ptr)
reset_entries();
}
- if ( pass ) /* test #23 */
+ if(pass) /* test #23 */
{
/* Repeat test #23 with the flush invalidate flag set.
*
@@ -7530,7 +7530,7 @@ check_flush_cache__flush_ops(H5F_t * file_ptr)
*
* Now create some tests mixing flush ops and pins.
*/
- if ( pass ) /* test #24 */
+ if(pass) /* test #24 */
{
/* Pico entries 50 and 150 pin pico entry 100, and also dirty
* pico entry 100 on flush.
@@ -7661,7 +7661,7 @@ check_flush_cache__flush_ops(H5F_t * file_ptr)
checks);
}
- if ( pass ) /* test #25 */
+ if(pass) /* test #25 */
{
/* Repeat the previous test with the flush invalidate flag.
*
@@ -7794,7 +7794,7 @@ check_flush_cache__flush_ops(H5F_t * file_ptr)
checks);
}
- if ( pass ) /* test #26 */
+ if(pass) /* test #26 */
{
/* This one is complex.
*
@@ -8224,7 +8224,7 @@ check_flush_cache__flush_ops(H5F_t * file_ptr)
reset_entries();
}
- if ( pass ) /* test #27 */
+ if(pass) /* test #27 */
{
/* Repeat test #26 with the flush invalidate flag.
*
@@ -8658,7 +8658,7 @@ check_flush_cache__flush_ops(H5F_t * file_ptr)
reset_entries();
}
- if ( pass ) /* test #28 */
+ if(pass) /* test #28 */
{
/* Test the expected fheap case, in which an entry dirties
* and resizes itself, and dirties an entry which it has
@@ -8848,7 +8848,7 @@ check_flush_cache__flush_ops(H5F_t * file_ptr)
reset_entries();
}
- if ( pass ) /* test #29 */
+ if(pass) /* test #29 */
{
/* Repeat test #28 with the flush invalidate flag.
*
@@ -9090,7 +9090,7 @@ check_flush_cache__flush_op_test(H5F_t * file_ptr,
test_num);
#endif
- if ( cache_ptr == NULL ) {
+ if(cache_ptr == NULL) {
pass = FALSE;
HDsnprintf(msg, (size_t)128,
@@ -9098,8 +9098,8 @@ check_flush_cache__flush_op_test(H5F_t * file_ptr,
test_num);
failure_mssg = msg;
}
- else if ( ( cache_ptr->index_len != 0 ) ||
- ( cache_ptr->index_size != 0 ) ) {
+ else if((cache_ptr->index_len != 0) ||
+ (cache_ptr->index_size != 0)) {
pass = FALSE;
@@ -9108,7 +9108,7 @@ check_flush_cache__flush_op_test(H5F_t * file_ptr,
test_num);
failure_mssg = msg;
}
- else if ( ( spec_size < 1 ) || ( spec == NULL ) ) {
+ else if((spec_size < 1) || (spec == NULL)) {
pass = FALSE;
HDsnprintf(msg, (size_t)128,
@@ -9118,17 +9118,17 @@ check_flush_cache__flush_op_test(H5F_t * file_ptr,
}
i = 0;
- while ( ( pass ) && ( i < spec_size ) )
+ while(pass && (i < spec_size))
{
- if ( ( spec[i].entry_num != i ) ||
- ( spec[i].entry_type < 0 ) ||
- ( spec[i].entry_type >= NUMBER_OF_ENTRY_TYPES ) ||
- ( spec[i].entry_index < 0 ) ||
- ( spec[i].entry_index > max_indices[spec[i].entry_type] ) ||
- ( spec[i].num_pins < 0 ) ||
- ( spec[i].num_pins > MAX_PINS ) ||
- ( spec[i].num_flush_ops < 0 ) ||
- ( spec[i].num_flush_ops > MAX_FLUSH_OPS ) ) {
+ if((spec[i].entry_num != i) ||
+ (spec[i].entry_type < 0) ||
+ (spec[i].entry_type >= NUMBER_OF_ENTRY_TYPES) ||
+ (spec[i].entry_index < 0) ||
+ (spec[i].entry_index > max_indices[spec[i].entry_type]) ||
+ (spec[i].num_pins < 0) ||
+ (spec[i].num_pins > MAX_PINS) ||
+ (spec[i].num_flush_ops < 0) ||
+ (spec[i].num_flush_ops > MAX_FLUSH_OPS)) {
pass = FALSE;
HDsnprintf(msg, (size_t)128,
@@ -9140,36 +9140,36 @@ check_flush_cache__flush_op_test(H5F_t * file_ptr,
}
i = 0;
- while ( ( pass ) && ( i < check_size ) )
+ while(pass && (i < check_size))
{
- if ( ( check[i].entry_num != i ) ||
- ( check[i].entry_type < 0 ) ||
- ( check[i].entry_type >= NUMBER_OF_ENTRY_TYPES ) ||
- ( check[i].entry_index < 0 ) ||
- ( check[i].entry_index > max_indices[check[i].entry_type] ) ||
+ if((check[i].entry_num != i) ||
+ (check[i].entry_type < 0) ||
+ (check[i].entry_type >= NUMBER_OF_ENTRY_TYPES) ||
+ (check[i].entry_index < 0) ||
+ (check[i].entry_index > max_indices[check[i].entry_type]) ||
#ifndef H5_HAVE_STDBOOL_H
/* Check for nonsense values if hbool_t is an integral
* type instead of a real Boolean.
*/
- ( ( check[i].in_cache != TRUE ) &&
- ( check[i].in_cache != FALSE ) ) ||
- ( ( check[i].at_main_addr != TRUE ) &&
- ( check[i].at_main_addr != FALSE ) ) ||
- ( ( check[i].is_dirty != TRUE ) &&
- ( check[i].is_dirty != FALSE ) ) ||
- ( ( check[i].is_protected != TRUE ) &&
- ( check[i].is_protected != FALSE ) ) ||
- ( ( check[i].is_pinned != TRUE ) &&
- ( check[i].is_pinned != FALSE ) ) ||
- ( ( check[i].expected_deserialized != TRUE ) &&
- ( check[i].expected_deserialized != FALSE ) ) ||
- ( ( check[i].expected_serialized != TRUE ) &&
- ( check[i].expected_serialized != FALSE ) ) ||
- ( ( check[i].expected_destroyed != TRUE ) &&
- ( check[i].expected_destroyed != FALSE ) ) ||
+ ((check[i].in_cache != TRUE) &&
+ (check[i].in_cache != FALSE)) ||
+ ((check[i].at_main_addr != TRUE) &&
+ (check[i].at_main_addr != FALSE)) ||
+ ((check[i].is_dirty != TRUE) &&
+ (check[i].is_dirty != FALSE)) ||
+ ((check[i].is_protected != TRUE) &&
+ (check[i].is_protected != FALSE)) ||
+ ((check[i].is_pinned != TRUE) &&
+ (check[i].is_pinned != FALSE)) ||
+ ((check[i].expected_deserialized != TRUE) &&
+ (check[i].expected_deserialized != FALSE)) ||
+ ((check[i].expected_serialized != TRUE) &&
+ (check[i].expected_serialized != FALSE)) ||
+ ((check[i].expected_destroyed != TRUE) &&
+ (check[i].expected_destroyed != FALSE)) ||
#endif /* H5_HAVE_STDBOOL_H */
- ( check[i].expected_size <= (size_t)0 )
- ) {
+ (check[i].expected_size <= (size_t)0)
+ ) {
pass = FALSE;
HDsnprintf(msg, (size_t)128,
@@ -9181,9 +9181,9 @@ check_flush_cache__flush_op_test(H5F_t * file_ptr,
}
i = 0;
- while ( ( pass ) && ( i < spec_size ) )
+ while(pass && (i < spec_size))
{
- if ( spec[i].insert_flag ) {
+ if(spec[i].insert_flag) {
insert_entry(file_ptr, spec[i].entry_type, spec[i].entry_index,
spec[i].flags);
@@ -9200,7 +9200,7 @@ check_flush_cache__flush_op_test(H5F_t * file_ptr,
spec[i].flags);
}
- for ( j = 0; j < spec[i].num_pins; j++ )
+ for (j = 0; j < spec[i].num_pins; j++)
{
create_pinned_entry_dependency(file_ptr,
spec[i].entry_type,
@@ -9209,7 +9209,7 @@ check_flush_cache__flush_op_test(H5F_t * file_ptr,
spec[i].pin_idx[j]);
}
- for ( j = 0; j < spec[i].num_flush_ops; j++ )
+ for (j = 0; j < spec[i].num_flush_ops; j++)
{
add_flush_op(spec[i].entry_type,
spec[i].entry_index,
@@ -9224,10 +9224,10 @@ check_flush_cache__flush_op_test(H5F_t * file_ptr,
i++;
}
- if ( pass ) {
+ if(pass) {
- if ( ( cache_ptr->index_len != init_expected_index_len ) ||
- ( cache_ptr->index_size != init_expected_index_size ) ) {
+ if((cache_ptr->index_len != init_expected_index_len) ||
+ (cache_ptr->index_size != init_expected_index_size)) {
pass = FALSE;
HDsnprintf(msg, (size_t)128,
@@ -9237,11 +9237,11 @@ check_flush_cache__flush_op_test(H5F_t * file_ptr,
}
}
- if ( pass ) {
+ if(pass) {
result = H5C_flush_cache(file_ptr, H5AC_ind_read_dxpl_id, flush_flags);
- if ( result < 0 ) {
+ if(result < 0) {
pass = FALSE;
HDsnprintf(msg, (size_t)128,
@@ -9253,14 +9253,14 @@ check_flush_cache__flush_op_test(H5F_t * file_ptr,
i = 0;
- while ( ( pass ) && ( i < spec_size ) )
+ while(pass && (i < spec_size))
{
base_addr = entries[spec[i].entry_type];
entry_ptr = &(base_addr[spec[i].entry_index]);
- if ( ( entry_ptr->deserialized != spec[i].expected_deserialized ) ||
- ( entry_ptr->serialized != spec[i].expected_serialized ) ||
- ( entry_ptr->destroyed != spec[i].expected_destroyed ) ) {
+ if((entry_ptr->deserialized != spec[i].expected_deserialized) ||
+ (entry_ptr->serialized != spec[i].expected_serialized) ||
+ (entry_ptr->destroyed != spec[i].expected_destroyed)) {
#if 0 /* This is useful debugging code. Lets keep it around. */
@@ -9286,14 +9286,14 @@ check_flush_cache__flush_op_test(H5F_t * file_ptr,
i++;
}
- if ( pass ) {
+ if(pass) {
i = 0;
- while ( ( pass ) && ( i < check_size ) )
+ while(pass && (i < check_size))
{
- if ( check[i].in_cache != entry_in_cache(cache_ptr,
+ if(check[i].in_cache != entry_in_cache(cache_ptr,
check[i].entry_type,
- check[i].entry_index) ) {
+ check[i].entry_index)) {
pass = FALSE;
HDsnprintf(msg, (size_t)128,
@@ -9305,87 +9305,87 @@ check_flush_cache__flush_op_test(H5F_t * file_ptr,
base_addr = entries[check[i].entry_type];
entry_ptr = &(base_addr[check[i].entry_index]);
- if ( ( entry_ptr->size != check[i].expected_size ) ||
- ( ( ! entry_ptr->header.destroy_in_progress ) &&
- ( check[i].in_cache ) &&
- ( entry_ptr->header.size != check[i].expected_size ) ) ||
- ( entry_ptr->at_main_addr != check[i].at_main_addr ) ||
- ( entry_ptr->is_dirty != check[i].is_dirty ) ||
- ( entry_ptr->header.is_dirty != check[i].is_dirty ) ||
- ( entry_ptr->is_protected != check[i].is_protected ) ||
- ( entry_ptr->header.is_protected != check[i].is_protected ) ||
- ( entry_ptr->is_pinned != check[i].is_pinned ) ||
- ( entry_ptr->header.is_pinned != check[i].is_pinned ) ||
- ( entry_ptr->deserialized != check[i].expected_deserialized ) ||
- ( entry_ptr->serialized != check[i].expected_serialized ) ||
- ( entry_ptr->destroyed != check[i].expected_destroyed ) ) {
+ if((entry_ptr->size != check[i].expected_size) ||
+ ((!entry_ptr->header.destroy_in_progress) &&
+ (check[i].in_cache) &&
+ (entry_ptr->header.size != check[i].expected_size)) ||
+ (entry_ptr->at_main_addr != check[i].at_main_addr) ||
+ (entry_ptr->is_dirty != check[i].is_dirty) ||
+ (entry_ptr->header.is_dirty != check[i].is_dirty) ||
+ (entry_ptr->is_protected != check[i].is_protected) ||
+ (entry_ptr->header.is_protected != check[i].is_protected) ||
+ (entry_ptr->is_pinned != check[i].is_pinned) ||
+ (entry_ptr->header.is_pinned != check[i].is_pinned) ||
+ (entry_ptr->deserialized != check[i].expected_deserialized) ||
+ (entry_ptr->serialized != check[i].expected_serialized) ||
+ (entry_ptr->destroyed != check[i].expected_destroyed)) {
#if 0 /* This is useful debugging code. Lets keep it around for a while. */
- if ( entry_ptr->size != check[i].expected_size ) {
+ if(entry_ptr->size != check[i].expected_size) {
HDfprintf(stdout, "entry_ptr->size (expected) = %d (%d).\n",
(int)(entry_ptr->size),
(int)(check[i].expected_size));
}
- if ( ( ! entry_ptr->header.destroy_in_progress ) &&
- ( check[i].in_cache ) &&
- ( entry_ptr->header.size != check[i].expected_size ) ) {
+ if((!entry_ptr->header.destroy_in_progress) &&
+ (check[i].in_cache) &&
+ (entry_ptr->header.size != check[i].expected_size)) {
HDfprintf(stdout,
"(!destroy in progress and in cache and size (expected) = %d (%d).\n",
(int)(entry_ptr->header.size),
(int)(check[i].expected_size));
}
- if ( entry_ptr->at_main_addr != check[i].at_main_addr ) {
+ if(entry_ptr->at_main_addr != check[i].at_main_addr) {
HDfprintf(stdout, "(%d,%d) at main addr (expected) = %d (%d).\n",
(int)(check[i].entry_type),
(int)(check[i].entry_index),
(int)(entry_ptr->at_main_addr),
(int)(check[i].at_main_addr));
}
- if ( entry_ptr->is_dirty != check[i].is_dirty ) {
+ if(entry_ptr->is_dirty != check[i].is_dirty) {
HDfprintf(stdout, "entry_ptr->is_dirty (expected) = %d (%d).\n",
(int)(entry_ptr->is_dirty),
(int)(check[i].is_dirty));
}
- if ( entry_ptr->header.is_dirty != check[i].is_dirty ) {
+ if(entry_ptr->header.is_dirty != check[i].is_dirty) {
HDfprintf(stdout, "entry_ptr->header.is_dirty (expected) = %d (%d).\n",
(int)(entry_ptr->header.is_dirty),
(int)(check[i].is_dirty));
}
- if ( entry_ptr->is_protected != check[i].is_protected ) {
+ if(entry_ptr->is_protected != check[i].is_protected) {
HDfprintf(stdout, "entry_ptr->is_protected (expected) = %d (%d).\n",
(int)(entry_ptr->is_protected),
(int)(check[i].is_protected));
}
- if ( entry_ptr->header.is_protected != check[i].is_protected ) {
+ if(entry_ptr->header.is_protected != check[i].is_protected) {
HDfprintf(stdout, "entry_ptr->header.is_protected (expected) = %d (%d).\n",
(int)(entry_ptr->is_protected),
(int)(check[i].is_protected));
}
- if ( entry_ptr->is_pinned != check[i].is_pinned ) {
+ if(entry_ptr->is_pinned != check[i].is_pinned) {
HDfprintf(stdout, "entry_ptr->is_pinned (expected) = %d (%d).\n",
(int)(entry_ptr->is_pinned),
(int)(check[i].is_pinned));
}
- if ( entry_ptr->header.is_pinned != check[i].is_pinned ) {
+ if(entry_ptr->header.is_pinned != check[i].is_pinned) {
HDfprintf(stdout, "entry_ptr->header.is_pinned (expected) = %d (%d).\n",
(int)(entry_ptr->header.is_pinned),
(int)(check[i].is_pinned));
}
- if ( entry_ptr->deserialized !=
- check[i].expected_deserialized ) {
+ if(entry_ptr->deserialized !=
+ check[i].expected_deserialized) {
HDfprintf(stdout,
"entry_ptr->deserialized (expected) = %d (%d).\n",
(int)(entry_ptr->deserialized),
(int)(check[i].expected_deserialized));
}
- if ( entry_ptr->serialized != check[i].expected_serialized ) {
+ if(entry_ptr->serialized != check[i].expected_serialized) {
HDfprintf(stdout,
"entry_ptr->serialized (expected) = %d (%d).\n",
(int)(entry_ptr->serialized),
(int)(check[i].expected_serialized));
}
- if ( entry_ptr->destroyed != check[i].expected_destroyed ) {
+ if(entry_ptr->destroyed != check[i].expected_destroyed) {
HDfprintf(stdout, "entry_ptr->destroyed (expected) = %d (%d).\n",
(int)(entry_ptr->destroyed),
(int)(check[i].expected_destroyed));
@@ -9401,24 +9401,24 @@ check_flush_cache__flush_op_test(H5F_t * file_ptr,
}
}
- if ( pass ) {
+ if(pass) {
- if ( ( ( (flush_flags & H5C__FLUSH_INVALIDATE_FLAG) == 0 )
+ if((((flush_flags & H5C__FLUSH_INVALIDATE_FLAG) == 0)
&&
- ( ( cache_ptr->index_len != expected_index_len )
+ ((cache_ptr->index_len != expected_index_len)
||
- ( cache_ptr->index_size != expected_index_size )
- )
- )
+ (cache_ptr->index_size != expected_index_size)
+ )
+ )
||
- ( ( (flush_flags & H5C__FLUSH_INVALIDATE_FLAG) != 0 )
+ (((flush_flags & H5C__FLUSH_INVALIDATE_FLAG) != 0)
&&
- ( ( cache_ptr->index_len != 0 )
+ ((cache_ptr->index_len != 0)
||
- ( cache_ptr->index_size != 0 )
- )
- )
- ) {
+ (cache_ptr->index_size != 0)
+ )
+ )
+ ) {
pass = FALSE;
HDsnprintf(msg, (size_t)128,
@@ -9429,11 +9429,11 @@ check_flush_cache__flush_op_test(H5F_t * file_ptr,
}
/* clean up the cache to prep for the next test */
- if ( pass ) {
+ if(pass) {
result = H5C_flush_cache(file_ptr, H5AC_ind_read_dxpl_id, H5C__FLUSH_INVALIDATE_FLAG);
- if ( result < 0 ) {
+ if(result < 0) {
pass = FALSE;
HDsnprintf(msg, (size_t)128,
@@ -9441,10 +9441,10 @@ check_flush_cache__flush_op_test(H5F_t * file_ptr,
test_num);
failure_mssg = msg;
}
- else if ( ( cache_ptr->index_len != 0 ) ||
- ( cache_ptr->index_size != 0 ) ||
- ( cache_ptr->clean_index_size != 0 ) ||
- ( cache_ptr->dirty_index_size != 0 ) ) {
+ else if((cache_ptr->index_len != 0) ||
+ (cache_ptr->index_size != 0) ||
+ (cache_ptr->clean_index_size != 0) ||
+ (cache_ptr->dirty_index_size != 0)) {
pass = FALSE;
HDsnprintf(msg, (size_t)128,
@@ -9456,7 +9456,7 @@ check_flush_cache__flush_op_test(H5F_t * file_ptr,
}
i = 0;
- while ( ( pass ) && ( i < spec_size ) )
+ while(pass && (i < spec_size))
{
base_addr = entries[spec[i].entry_type];
entry_ptr = &(base_addr[spec[i].entry_index]);
@@ -9471,7 +9471,7 @@ check_flush_cache__flush_op_test(H5F_t * file_ptr,
}
i = 0;
- while ( ( pass ) && ( i < check_size ) )
+ while(pass && (i < check_size))
{
base_addr = entries[check[i].entry_type];
entry_ptr = &(base_addr[check[i].entry_index]);
@@ -9590,21 +9590,21 @@ check_flush_cache__flush_op_eviction_test(H5F_t * file_ptr)
{ LARGE_ENTRY_TYPE, 13, LARGE_ENTRY_SIZE, TRUE, TRUE, TRUE, FALSE, FALSE, TRUE, FALSE, FALSE, {0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0}, 0, 0, 0, -1, FALSE}
};
- if ( pass ) {
+ if(pass) {
- if ( cache_ptr == NULL ) {
+ if(cache_ptr == NULL) {
pass = FALSE;
failure_mssg = "cache_ptr NULL on entry to flush ops test.";
}
- else if ( ( cache_ptr->index_len != 0 ) ||
- ( cache_ptr->index_size != 0 ) ) {
+ else if((cache_ptr->index_len != 0) ||
+ (cache_ptr->index_size != 0)) {
pass = FALSE;
failure_mssg = "cache not empty at start of flush ops eviction test.";
}
- else if ( ( cache_ptr->max_cache_size != (2 * 1024 * 1024 ) ) ||
- ( cache_ptr->min_clean_size != (1 * 1024 * 1024 ) ) ) {
+ else if((cache_ptr->max_cache_size != (2 * 1024 * 1024)) ||
+ (cache_ptr->min_clean_size != (1 * 1024 * 1024))) {
pass = FALSE;
failure_mssg =
@@ -9620,7 +9620,7 @@ check_flush_cache__flush_op_eviction_test(H5F_t * file_ptr)
}
}
- if ( pass ) {
+ if(pass) {
/* the basic idea in this test is to insert a bunch of entries
* with flush operations associated with them, and then load
@@ -9684,17 +9684,17 @@ check_flush_cache__flush_op_eviction_test(H5F_t * file_ptr)
protect_entry(file_ptr, VARIABLE_ENTRY_TYPE, 9);
unprotect_entry(file_ptr, VARIABLE_ENTRY_TYPE, 9, H5C__NO_FLAGS_SET);
- if ( ( cache_ptr->index_len != 10 ) ||
- ( cache_ptr->index_size != (4 * (VARIABLE_ENTRY_SIZE / 4)) +
+ if((cache_ptr->index_len != 10) ||
+ (cache_ptr->index_size != (4 * (VARIABLE_ENTRY_SIZE / 4)) +
(2 * (VARIABLE_ENTRY_SIZE / 2)) +
- (4 * VARIABLE_ENTRY_SIZE) ) ) {
+ (4 * VARIABLE_ENTRY_SIZE))) {
pass = FALSE;
failure_mssg = "unexpected size/len in flush op eviction test 1.";
}
}
- if ( pass ) {
+ if(pass) {
/* Now set up the pinning relationships:
*
@@ -9753,7 +9753,7 @@ check_flush_cache__flush_op_eviction_test(H5F_t * file_ptr)
VARIABLE_ENTRY_TYPE, 8, FALSE, (size_t)0, NULL);
}
- if ( pass ) {
+ if(pass) {
/* to summarize, at present the following variable size entries
* are in cache with the following characteristics:
@@ -9793,26 +9793,26 @@ check_flush_cache__flush_op_eviction_test(H5F_t * file_ptr)
*/
/* Now fill up the cache with other, unrelated entries */
- for ( i = 0; i < 31; i++ )
+ for (i = 0; i < 31; i++)
{
protect_entry(file_ptr, MONSTER_ENTRY_TYPE, i);
unprotect_entry(file_ptr, MONSTER_ENTRY_TYPE, i, H5C__DIRTIED_FLAG);
}
- for ( i = 0; i < 1; i++ )
+ for (i = 0; i < 1; i++)
{
protect_entry(file_ptr, LARGE_ENTRY_TYPE, i);
unprotect_entry(file_ptr, LARGE_ENTRY_TYPE, i, H5C__DIRTIED_FLAG);
}
/* The cache should now be exactly full */
- if ( ( cache_ptr->index_len != 42 ) ||
- ( cache_ptr->index_size != 2 * 1024 * 1024 ) ||
- ( cache_ptr->index_size != ((4 * VARIABLE_ENTRY_SIZE / 4) +
+ if((cache_ptr->index_len != 42) ||
+ (cache_ptr->index_size != 2 * 1024 * 1024) ||
+ (cache_ptr->index_size != ((4 * VARIABLE_ENTRY_SIZE / 4) +
(2 * VARIABLE_ENTRY_SIZE / 2) +
(4 * VARIABLE_ENTRY_SIZE) +
(31 * MONSTER_ENTRY_SIZE) +
- (1 * LARGE_ENTRY_SIZE)) ) ) {
+ (1 * LARGE_ENTRY_SIZE)))) {
pass = FALSE;
failure_mssg = "unexpected size/len in flush op eviction test 2.";
@@ -9829,7 +9829,7 @@ check_flush_cache__flush_op_eviction_test(H5F_t * file_ptr)
}
- if ( pass ) {
+ if(pass) {
/* Now load a large entry. This should result in the eviction
* of (VET,2), and the increase in the size of (VET, 0) from .25
@@ -9877,17 +9877,17 @@ check_flush_cache__flush_op_eviction_test(H5F_t * file_ptr)
protect_entry(file_ptr, LARGE_ENTRY_TYPE, 1);
unprotect_entry(file_ptr, LARGE_ENTRY_TYPE, 1, H5C__DIRTIED_FLAG);
- if ( ( cache_ptr->index_len != 42 ) ||
- ( cache_ptr->index_size != (2 * 1024 * 1024) -
+ if((cache_ptr->index_len != 42) ||
+ (cache_ptr->index_size != (2 * 1024 * 1024) -
(VARIABLE_ENTRY_SIZE) +
(VARIABLE_ENTRY_SIZE / 2) +
- (LARGE_ENTRY_SIZE) ) ||
- ( cache_ptr->index_size != ((1 * (3 * VARIABLE_ENTRY_SIZE / 4)) +
+ (LARGE_ENTRY_SIZE)) ||
+ (cache_ptr->index_size != ((1 * (3 * VARIABLE_ENTRY_SIZE / 4)) +
(3 * VARIABLE_ENTRY_SIZE / 4) +
(2 * VARIABLE_ENTRY_SIZE / 2) +
(3 * VARIABLE_ENTRY_SIZE) +
(31 * MONSTER_ENTRY_SIZE) +
- (2 * LARGE_ENTRY_SIZE)) ) ) {
+ (2 * LARGE_ENTRY_SIZE)))) {
pass = FALSE;
failure_mssg = "unexpected size/len in flush op eviction test 3.";
}
@@ -9899,7 +9899,7 @@ check_flush_cache__flush_op_eviction_test(H5F_t * file_ptr)
expected);
}
- if ( pass ) {
+ if(pass) {
/* Now load another large entry. This should result in the eviction
* of (VET, 4), the increase in the size of (VET, 0) from .75
@@ -9947,16 +9947,16 @@ check_flush_cache__flush_op_eviction_test(H5F_t * file_ptr)
protect_entry(file_ptr, LARGE_ENTRY_TYPE, 2);
unprotect_entry(file_ptr, LARGE_ENTRY_TYPE, 2, H5C__DIRTIED_FLAG);
- if ( ( cache_ptr->index_len != 42 ) ||
- ( cache_ptr->index_size != (2 * 1024 * 1024) -
+ if((cache_ptr->index_len != 42) ||
+ (cache_ptr->index_size != (2 * 1024 * 1024) -
(2 * VARIABLE_ENTRY_SIZE) +
(3 * VARIABLE_ENTRY_SIZE / 4) +
- (2 * LARGE_ENTRY_SIZE) ) ||
- ( cache_ptr->index_size != ((3 * VARIABLE_ENTRY_SIZE / 4) +
+ (2 * LARGE_ENTRY_SIZE)) ||
+ (cache_ptr->index_size != ((3 * VARIABLE_ENTRY_SIZE / 4) +
(2 * VARIABLE_ENTRY_SIZE / 2) +
(3 * VARIABLE_ENTRY_SIZE) +
(31 * MONSTER_ENTRY_SIZE) +
- (3 * LARGE_ENTRY_SIZE)) ) ) {
+ (3 * LARGE_ENTRY_SIZE)))) {
pass = FALSE;
failure_mssg = "unexpected size/len in flush op eviction test 4.";
@@ -9969,7 +9969,7 @@ check_flush_cache__flush_op_eviction_test(H5F_t * file_ptr)
expected);
}
- if ( pass ) {
+ if(pass) {
/* load two more large entries. This should result in (VET, 5) being
* flushed, and increasing its size from 1/4 VARIABLE_ENTRY_SIZE to
@@ -10029,17 +10029,17 @@ check_flush_cache__flush_op_eviction_test(H5F_t * file_ptr)
unprotect_entry(file_ptr, LARGE_ENTRY_TYPE, 4, H5C__DIRTIED_FLAG);
/* verify cache size */
- if ( ( cache_ptr->index_len != 43 ) ||
- ( cache_ptr->index_size != (2 * 1024 * 1024) -
+ if((cache_ptr->index_len != 43) ||
+ (cache_ptr->index_size != (2 * 1024 * 1024) -
(3 * VARIABLE_ENTRY_SIZE) +
(1 * VARIABLE_ENTRY_SIZE / 4) +
(3 * VARIABLE_ENTRY_SIZE / 4) +
- (4 * LARGE_ENTRY_SIZE) ) ||
- ( cache_ptr->index_size != ((2 * VARIABLE_ENTRY_SIZE / 4) +
+ (4 * LARGE_ENTRY_SIZE)) ||
+ (cache_ptr->index_size != ((2 * VARIABLE_ENTRY_SIZE / 4) +
(3 * VARIABLE_ENTRY_SIZE / 2) +
(2 * VARIABLE_ENTRY_SIZE) +
(31 * MONSTER_ENTRY_SIZE) +
- (5 * LARGE_ENTRY_SIZE)) ) ) {
+ (5 * LARGE_ENTRY_SIZE)))) {
pass = FALSE;
failure_mssg = "unexpected size/len in flush op eviction test 5.";
@@ -10052,7 +10052,7 @@ check_flush_cache__flush_op_eviction_test(H5F_t * file_ptr)
expected);
}
- if ( pass ) {
+ if(pass) {
/* now touch all the non VARIABLE_ENTRY_TYPE entries in the
* cache to bring all the VARIABLE_ENTRY_TYPE entries to the
@@ -10061,30 +10061,30 @@ check_flush_cache__flush_op_eviction_test(H5F_t * file_ptr)
* Note that we don't have to worry about (VET, 0) and (VET, 9)
* as they are pinned and thus not in the LRU list to begin with.
*/
- for ( i = 0; i < 31; i++ )
+ for (i = 0; i < 31; i++)
{
protect_entry(file_ptr, MONSTER_ENTRY_TYPE, i);
unprotect_entry(file_ptr, MONSTER_ENTRY_TYPE, i, H5C__DIRTIED_FLAG);
}
- for ( i = 0; i < 5; i++ )
+ for (i = 0; i < 5; i++)
{
protect_entry(file_ptr, LARGE_ENTRY_TYPE, i);
unprotect_entry(file_ptr, LARGE_ENTRY_TYPE, i, H5C__DIRTIED_FLAG);
}
/* verify cache size */
- if ( ( cache_ptr->index_len != 43 ) ||
- ( cache_ptr->index_size != (2 * 1024 * 1024) -
+ if((cache_ptr->index_len != 43) ||
+ (cache_ptr->index_size != (2 * 1024 * 1024) -
(3 * VARIABLE_ENTRY_SIZE) +
(1 * VARIABLE_ENTRY_SIZE / 4) +
(3 * VARIABLE_ENTRY_SIZE / 4) +
- (4 * LARGE_ENTRY_SIZE) ) ||
- ( cache_ptr->index_size != ((2 * VARIABLE_ENTRY_SIZE / 4) +
+ (4 * LARGE_ENTRY_SIZE)) ||
+ (cache_ptr->index_size != ((2 * VARIABLE_ENTRY_SIZE / 4) +
(3 * VARIABLE_ENTRY_SIZE / 2) +
(2 * VARIABLE_ENTRY_SIZE) +
(31 * MONSTER_ENTRY_SIZE) +
- (5 * LARGE_ENTRY_SIZE)) ) ) {
+ (5 * LARGE_ENTRY_SIZE)))) {
pass = FALSE;
failure_mssg = "unexpected size/len in flush op eviction test 6.";
@@ -10097,7 +10097,7 @@ check_flush_cache__flush_op_eviction_test(H5F_t * file_ptr)
expected);
}
- if ( pass ) {
+ if(pass) {
/* Now load three more large entries. This should result
* in the evictions of (VET, 1), (VET, 3), and (VET, 5), and the
@@ -10142,23 +10142,23 @@ check_flush_cache__flush_op_eviction_test(H5F_t * file_ptr)
num_large_entries = 8;
- for ( i = 5; i < 8; i++ )
+ for (i = 5; i < 8; i++)
{
protect_entry(file_ptr, LARGE_ENTRY_TYPE, i);
unprotect_entry(file_ptr, LARGE_ENTRY_TYPE, i, H5C__DIRTIED_FLAG);
}
/* verify cache size */
- if ( ( cache_ptr->index_len != 43 ) ||
- ( cache_ptr->index_size != (2 * 1024 * 1024) -
+ if((cache_ptr->index_len != 43) ||
+ (cache_ptr->index_size != (2 * 1024 * 1024) -
(4 * VARIABLE_ENTRY_SIZE) +
(1 * VARIABLE_ENTRY_SIZE / 4) +
(3 * VARIABLE_ENTRY_SIZE / 4) +
- (7 * LARGE_ENTRY_SIZE) ) ||
- ( cache_ptr->index_size != ((2 * VARIABLE_ENTRY_SIZE / 2) +
+ (7 * LARGE_ENTRY_SIZE)) ||
+ (cache_ptr->index_size != ((2 * VARIABLE_ENTRY_SIZE / 2) +
(2 * VARIABLE_ENTRY_SIZE) +
(31 * MONSTER_ENTRY_SIZE) +
- (8 * LARGE_ENTRY_SIZE)) ) ) {
+ (8 * LARGE_ENTRY_SIZE)))) {
pass = FALSE;
failure_mssg = "unexpected size/len in flush op eviction test 7.";
@@ -10171,7 +10171,7 @@ check_flush_cache__flush_op_eviction_test(H5F_t * file_ptr)
expected);
}
- if ( pass ) {
+ if(pass) {
/* load another large entry. (VET, 6) should be evicted.
*
@@ -10209,22 +10209,22 @@ check_flush_cache__flush_op_eviction_test(H5F_t * file_ptr)
num_large_entries = 9;
- for ( i = 8; i < 9; i++ )
+ for (i = 8; i < 9; i++)
{
protect_entry(file_ptr, LARGE_ENTRY_TYPE, i);
unprotect_entry(file_ptr, LARGE_ENTRY_TYPE, i, H5C__DIRTIED_FLAG);
}
/* verify cache size */
- if ( ( cache_ptr->index_len != 43 ) ||
- ( cache_ptr->index_size != (2 * 1024 * 1024) -
+ if((cache_ptr->index_len != 43) ||
+ (cache_ptr->index_size != (2 * 1024 * 1024) -
(3 * VARIABLE_ENTRY_SIZE) -
(VARIABLE_ENTRY_SIZE / 2) +
- (8 * LARGE_ENTRY_SIZE) ) ||
- ( cache_ptr->index_size != ((1 * VARIABLE_ENTRY_SIZE / 2) +
+ (8 * LARGE_ENTRY_SIZE)) ||
+ (cache_ptr->index_size != ((1 * VARIABLE_ENTRY_SIZE / 2) +
(2 * VARIABLE_ENTRY_SIZE) +
(31 * MONSTER_ENTRY_SIZE) +
- (9 * LARGE_ENTRY_SIZE)) ) ) {
+ (9 * LARGE_ENTRY_SIZE)))) {
pass = FALSE;
failure_mssg = "unexpected size/len in flush op eviction test 8.";
@@ -10237,7 +10237,7 @@ check_flush_cache__flush_op_eviction_test(H5F_t * file_ptr)
expected);
}
- if ( pass ) {
+ if(pass) {
/* Load another large entry.
*
@@ -10278,20 +10278,20 @@ check_flush_cache__flush_op_eviction_test(H5F_t * file_ptr)
num_large_entries = 10;
- for ( i = 9; i < 10; i++ )
+ for (i = 9; i < 10; i++)
{
protect_entry(file_ptr, LARGE_ENTRY_TYPE, i);
unprotect_entry(file_ptr, LARGE_ENTRY_TYPE, i, H5C__DIRTIED_FLAG);
}
/* verify cache size */
- if ( ( cache_ptr->index_len != 43 ) ||
- ( cache_ptr->index_size != (2 * 1024 * 1024) -
+ if((cache_ptr->index_len != 43) ||
+ (cache_ptr->index_size != (2 * 1024 * 1024) -
(4 * VARIABLE_ENTRY_SIZE) +
- (9 * LARGE_ENTRY_SIZE) ) ||
- ( cache_ptr->index_size != ((2 * VARIABLE_ENTRY_SIZE) +
+ (9 * LARGE_ENTRY_SIZE)) ||
+ (cache_ptr->index_size != ((2 * VARIABLE_ENTRY_SIZE) +
(31 * MONSTER_ENTRY_SIZE) +
- (10 * LARGE_ENTRY_SIZE)) ) ) {
+ (10 * LARGE_ENTRY_SIZE)))) {
pass = FALSE;
failure_mssg = "unexpected size/len in flush op eviction test 9.";
@@ -10304,7 +10304,7 @@ check_flush_cache__flush_op_eviction_test(H5F_t * file_ptr)
expected);
}
- if ( pass ) {
+ if(pass) {
/* Again, touch all the non VARIABLE_ENTRY_TYPE entries in the
* cache to bring all the VARIABLE_ENTRY_TYPE entries to the
@@ -10313,26 +10313,26 @@ check_flush_cache__flush_op_eviction_test(H5F_t * file_ptr)
* Both (VET, 0) and (VET, 7) have been unpinned, so they are
* now in the LRU list.
*/
- for ( i = 0; i < 31; i++ )
+ for (i = 0; i < 31; i++)
{
protect_entry(file_ptr, MONSTER_ENTRY_TYPE, i);
unprotect_entry(file_ptr, MONSTER_ENTRY_TYPE, i, H5C__DIRTIED_FLAG);
}
- for ( i = 0; i < 10; i++ )
+ for (i = 0; i < 10; i++)
{
protect_entry(file_ptr, LARGE_ENTRY_TYPE, i);
unprotect_entry(file_ptr, LARGE_ENTRY_TYPE, i, H5C__DIRTIED_FLAG);
}
/* verify cache size */
- if ( ( cache_ptr->index_len != 43 ) ||
- ( cache_ptr->index_size != (2 * 1024 * 1024) -
+ if((cache_ptr->index_len != 43) ||
+ (cache_ptr->index_size != (2 * 1024 * 1024) -
(4 * VARIABLE_ENTRY_SIZE) +
- (9 * LARGE_ENTRY_SIZE) ) ||
- ( cache_ptr->index_size != ((2 * VARIABLE_ENTRY_SIZE) +
+ (9 * LARGE_ENTRY_SIZE)) ||
+ (cache_ptr->index_size != ((2 * VARIABLE_ENTRY_SIZE) +
(31 * MONSTER_ENTRY_SIZE) +
- (10 * LARGE_ENTRY_SIZE)) ) ) {
+ (10 * LARGE_ENTRY_SIZE)))) {
pass = FALSE;
failure_mssg = "unexpected size/len in flush op eviction test 10.";
@@ -10345,7 +10345,7 @@ check_flush_cache__flush_op_eviction_test(H5F_t * file_ptr)
expected);
}
- if ( pass ) {
+ if(pass) {
/* load two more large entries. Things get a bit complicated here,
* so I'll go through the operation step by step.
@@ -10470,28 +10470,28 @@ check_flush_cache__flush_op_eviction_test(H5F_t * file_ptr)
/* a newly loaded entry is not inserted in the cache until after
* space has been made for it. Thus (LET, 11) will not be flushed.
*/
- for ( i = num_variable_entries;
+ for (i = num_variable_entries;
i < num_variable_entries + num_monster_entries + num_large_entries - 1;
- i++ )
+ i++)
{
expected[i].is_dirty = FALSE;
expected[i].serialized = TRUE;
}
- for ( i = 10; i < 12; i++ )
+ for (i = 10; i < 12; i++)
{
protect_entry(file_ptr, LARGE_ENTRY_TYPE, i);
unprotect_entry(file_ptr, LARGE_ENTRY_TYPE, i, H5C__DIRTIED_FLAG);
}
/* verify cache size */
- if ( ( cache_ptr->index_len != 44 ) ||
- ( cache_ptr->index_size != (2 * 1024 * 1024) -
+ if((cache_ptr->index_len != 44) ||
+ (cache_ptr->index_size != (2 * 1024 * 1024) -
(2 * VARIABLE_ENTRY_SIZE) -
- (10 * LARGE_ENTRY_SIZE) ) ||
- ( cache_ptr->index_size != ((2 * VARIABLE_ENTRY_SIZE) +
+ (10 * LARGE_ENTRY_SIZE)) ||
+ (cache_ptr->index_size != ((2 * VARIABLE_ENTRY_SIZE) +
(30 * MONSTER_ENTRY_SIZE) +
- (12 * LARGE_ENTRY_SIZE)) ) ) {
+ (12 * LARGE_ENTRY_SIZE)))) {
pass = FALSE;
failure_mssg = "unexpected size/len in flush op eviction test 11.";
@@ -10504,7 +10504,7 @@ check_flush_cache__flush_op_eviction_test(H5F_t * file_ptr)
expected);
}
- if ( pass ) {
+ if(pass) {
/* protect and unprotect VET 8 to move it to the top of the LRU */
protect_entry(file_ptr, VARIABLE_ENTRY_TYPE, 8);
@@ -10521,34 +10521,34 @@ check_flush_cache__flush_op_eviction_test(H5F_t * file_ptr)
/* skip MET 0 in first pass so that we evict VET 9 when we
* reload MET 0
*/
- for ( i = 1; i < num_monster_entries; i++ )
+ for (i = 1; i < num_monster_entries; i++)
{
protect_entry(file_ptr, MONSTER_ENTRY_TYPE, i);
unprotect_entry(file_ptr, MONSTER_ENTRY_TYPE, i, H5C__DIRTIED_FLAG);
}
- for ( i = 0; i < num_large_entries; i++ )
+ for (i = 0; i < num_large_entries; i++)
{
protect_entry(file_ptr, LARGE_ENTRY_TYPE, i);
unprotect_entry(file_ptr, LARGE_ENTRY_TYPE, i, H5C__DIRTIED_FLAG);
}
- for ( i = 0; i < num_monster_entries; i++ )
+ for (i = 0; i < num_monster_entries; i++)
{
protect_entry(file_ptr, MONSTER_ENTRY_TYPE, i);
unprotect_entry(file_ptr, MONSTER_ENTRY_TYPE, i, H5C__DIRTIED_FLAG);
}
- for ( i = 0; i < num_large_entries; i++ )
+ for (i = 0; i < num_large_entries; i++)
{
protect_entry(file_ptr, LARGE_ENTRY_TYPE, i);
unprotect_entry(file_ptr, LARGE_ENTRY_TYPE, i, H5C__DIRTIED_FLAG);
}
/* update the expected array to mark all these entries dirty again. */
- for ( i = num_variable_entries;
+ for (i = num_variable_entries;
i < num_variable_entries + num_monster_entries + num_large_entries - 1;
- i++ )
+ i++)
{
expected[i].is_dirty = TRUE;
}
@@ -10570,13 +10570,13 @@ check_flush_cache__flush_op_eviction_test(H5F_t * file_ptr)
/* verify cache size */
- if ( ( cache_ptr->index_len != 44 ) ||
- ( cache_ptr->index_size != (2 * 1024 * 1024) -
+ if((cache_ptr->index_len != 44) ||
+ (cache_ptr->index_size != (2 * 1024 * 1024) -
(5 * VARIABLE_ENTRY_SIZE) +
- (11 * LARGE_ENTRY_SIZE) ) ||
- ( cache_ptr->index_size != ((1 * VARIABLE_ENTRY_SIZE) +
+ (11 * LARGE_ENTRY_SIZE)) ||
+ (cache_ptr->index_size != ((1 * VARIABLE_ENTRY_SIZE) +
(31 * MONSTER_ENTRY_SIZE) +
- (12 * LARGE_ENTRY_SIZE)) ) ) {
+ (12 * LARGE_ENTRY_SIZE)))) {
pass = FALSE;
failure_mssg = "unexpected size/len in flush op eviction test 12.";
@@ -10595,7 +10595,7 @@ check_flush_cache__flush_op_eviction_test(H5F_t * file_ptr)
expected);
}
- if ( pass ) {
+ if(pass) {
/* Load two more large entries.
*
@@ -10645,27 +10645,27 @@ check_flush_cache__flush_op_eviction_test(H5F_t * file_ptr)
/* a newly loaded entry is not inserted in the cache until after
* space has been made for it. Thus (LET, 13) will not be flushed.
*/
- for ( i = num_variable_entries;
+ for (i = num_variable_entries;
i < num_variable_entries + num_monster_entries + num_large_entries - 1;
- i++ )
+ i++)
{
expected[i].is_dirty = FALSE;
expected[i].serialized = TRUE;
}
- for ( i = 12; i < 14; i++ )
+ for (i = 12; i < 14; i++)
{
protect_entry(file_ptr, LARGE_ENTRY_TYPE, i);
unprotect_entry(file_ptr, LARGE_ENTRY_TYPE, i, H5C__DIRTIED_FLAG);
}
/* verify cache size */
- if ( ( cache_ptr->index_len != 45 ) ||
- ( cache_ptr->index_size != (2 * 1024 * 1024) -
+ if((cache_ptr->index_len != 45) ||
+ (cache_ptr->index_size != (2 * 1024 * 1024) -
(6 * VARIABLE_ENTRY_SIZE) +
- (13 * LARGE_ENTRY_SIZE) ) ||
- ( cache_ptr->index_size != ((31 * MONSTER_ENTRY_SIZE) +
- (14 * LARGE_ENTRY_SIZE)) ) ) {
+ (13 * LARGE_ENTRY_SIZE)) ||
+ (cache_ptr->index_size != ((31 * MONSTER_ENTRY_SIZE) +
+ (14 * LARGE_ENTRY_SIZE)))) {
pass = FALSE;
failure_mssg = "unexpected size/len in flush op eviction test 13.";
@@ -10690,17 +10690,17 @@ check_flush_cache__flush_op_eviction_test(H5F_t * file_ptr)
* flush the cache and end the test.
*/
- if ( pass ) {
+ if(pass) {
result = H5C_flush_cache(file_ptr, H5AC_ind_read_dxpl_id, H5C__FLUSH_INVALIDATE_FLAG);
- if ( result < 0 ) {
+ if(result < 0) {
pass = FALSE;
failure_mssg = "Cache flush invalidate failed after flush op eviction test";
}
- else if ( ( cache_ptr->index_len != 0 ) ||
- ( cache_ptr->index_size != 0 ) ) {
+ else if((cache_ptr->index_len != 0) ||
+ (cache_ptr->index_size != 0)) {
pass = FALSE;
failure_mssg = "Unexpected cache len/size after cleanup of flush op eviction test";
@@ -10717,78 +10717,78 @@ check_flush_cache__flush_op_eviction_test(H5F_t * file_ptr)
* to start testing the stats whenever it is convenient to do
* so.
*/
- if ( pass ) {
-
- if ( ( cache_ptr->insertions[VARIABLE_ENTRY_TYPE] != 0 ) ||
- ( cache_ptr->pinned_insertions[VARIABLE_ENTRY_TYPE] != 0 ) ||
- ( cache_ptr->clears[VARIABLE_ENTRY_TYPE] != 0 ) ||
- ( cache_ptr->flushes[VARIABLE_ENTRY_TYPE] != 8 ) ||
- ( cache_ptr->evictions[VARIABLE_ENTRY_TYPE] != 11 ) ||
- ( cache_ptr->take_ownerships[VARIABLE_ENTRY_TYPE] != 0 ) ||
- ( cache_ptr->moves[VARIABLE_ENTRY_TYPE] != 1 ) ||
- ( cache_ptr->entry_flush_moves[VARIABLE_ENTRY_TYPE] != 0 ) ||
- ( cache_ptr->cache_flush_moves[VARIABLE_ENTRY_TYPE] != 0 ) ||
- ( cache_ptr->pins[VARIABLE_ENTRY_TYPE] != 2 ) ||
- ( cache_ptr->unpins[VARIABLE_ENTRY_TYPE] != 2 ) ||
- ( cache_ptr->dirty_pins[VARIABLE_ENTRY_TYPE] != 2 ) ||
- ( cache_ptr->pinned_flushes[VARIABLE_ENTRY_TYPE] != 0 ) ||
- ( cache_ptr->pinned_clears[VARIABLE_ENTRY_TYPE] != 0 ) ||
- ( cache_ptr->size_increases[VARIABLE_ENTRY_TYPE] != 3 ) ||
- ( cache_ptr->size_decreases[VARIABLE_ENTRY_TYPE] != 6 ) ||
- ( cache_ptr->entry_flush_size_changes[VARIABLE_ENTRY_TYPE] != 1 ) ||
- ( cache_ptr->cache_flush_size_changes[VARIABLE_ENTRY_TYPE] != 0 ) ) {
+ if(pass) {
+
+ if((cache_ptr->insertions[VARIABLE_ENTRY_TYPE] != 0) ||
+ (cache_ptr->pinned_insertions[VARIABLE_ENTRY_TYPE] != 0) ||
+ (cache_ptr->clears[VARIABLE_ENTRY_TYPE] != 0) ||
+ (cache_ptr->flushes[VARIABLE_ENTRY_TYPE] != 8) ||
+ (cache_ptr->evictions[VARIABLE_ENTRY_TYPE] != 11) ||
+ (cache_ptr->take_ownerships[VARIABLE_ENTRY_TYPE] != 0) ||
+ (cache_ptr->moves[VARIABLE_ENTRY_TYPE] != 1) ||
+ (cache_ptr->entry_flush_moves[VARIABLE_ENTRY_TYPE] != 0) ||
+ (cache_ptr->cache_flush_moves[VARIABLE_ENTRY_TYPE] != 0) ||
+ (cache_ptr->pins[VARIABLE_ENTRY_TYPE] != 2) ||
+ (cache_ptr->unpins[VARIABLE_ENTRY_TYPE] != 2) ||
+ (cache_ptr->dirty_pins[VARIABLE_ENTRY_TYPE] != 2) ||
+ (cache_ptr->pinned_flushes[VARIABLE_ENTRY_TYPE] != 0) ||
+ (cache_ptr->pinned_clears[VARIABLE_ENTRY_TYPE] != 0) ||
+ (cache_ptr->size_increases[VARIABLE_ENTRY_TYPE] != 3) ||
+ (cache_ptr->size_decreases[VARIABLE_ENTRY_TYPE] != 6) ||
+ (cache_ptr->entry_flush_size_changes[VARIABLE_ENTRY_TYPE] != 1) ||
+ (cache_ptr->cache_flush_size_changes[VARIABLE_ENTRY_TYPE] != 0)) {
pass = FALSE;
failure_mssg = "Unexpected variable size entry stats in check_flush_cache__flush_op_eviction_test().";
}
}
- if ( pass ) {
+ if(pass) {
- if ( ( cache_ptr->insertions[LARGE_ENTRY_TYPE] != 0 ) ||
- ( cache_ptr->pinned_insertions[LARGE_ENTRY_TYPE] != 0 ) ||
- ( cache_ptr->clears[LARGE_ENTRY_TYPE] != 0 ) ||
- ( cache_ptr->flushes[LARGE_ENTRY_TYPE] != 25 ) ||
- ( cache_ptr->evictions[LARGE_ENTRY_TYPE] != 14 ) ||
- ( cache_ptr->take_ownerships[LARGE_ENTRY_TYPE] != 0 ) ||
- ( cache_ptr->moves[LARGE_ENTRY_TYPE] != 0 ) ||
- ( cache_ptr->entry_flush_moves[LARGE_ENTRY_TYPE] != 0 ) ||
- ( cache_ptr->cache_flush_moves[LARGE_ENTRY_TYPE] != 0 ) ||
- ( cache_ptr->pins[LARGE_ENTRY_TYPE] != 0 ) ||
- ( cache_ptr->unpins[LARGE_ENTRY_TYPE] != 0 ) ||
- ( cache_ptr->dirty_pins[LARGE_ENTRY_TYPE] != 0 ) ||
- ( cache_ptr->pinned_flushes[LARGE_ENTRY_TYPE] != 0 ) ||
- ( cache_ptr->pinned_clears[LARGE_ENTRY_TYPE] != 0 ) ||
- ( cache_ptr->size_increases[LARGE_ENTRY_TYPE] != 0 ) ||
- ( cache_ptr->size_decreases[LARGE_ENTRY_TYPE] != 0 ) ||
- ( cache_ptr->entry_flush_size_changes[LARGE_ENTRY_TYPE] != 0 ) ||
- ( cache_ptr->cache_flush_size_changes[LARGE_ENTRY_TYPE] != 0 ) ) {
+ if((cache_ptr->insertions[LARGE_ENTRY_TYPE] != 0) ||
+ (cache_ptr->pinned_insertions[LARGE_ENTRY_TYPE] != 0) ||
+ (cache_ptr->clears[LARGE_ENTRY_TYPE] != 0) ||
+ (cache_ptr->flushes[LARGE_ENTRY_TYPE] != 25) ||
+ (cache_ptr->evictions[LARGE_ENTRY_TYPE] != 14) ||
+ (cache_ptr->take_ownerships[LARGE_ENTRY_TYPE] != 0) ||
+ (cache_ptr->moves[LARGE_ENTRY_TYPE] != 0) ||
+ (cache_ptr->entry_flush_moves[LARGE_ENTRY_TYPE] != 0) ||
+ (cache_ptr->cache_flush_moves[LARGE_ENTRY_TYPE] != 0) ||
+ (cache_ptr->pins[LARGE_ENTRY_TYPE] != 0) ||
+ (cache_ptr->unpins[LARGE_ENTRY_TYPE] != 0) ||
+ (cache_ptr->dirty_pins[LARGE_ENTRY_TYPE] != 0) ||
+ (cache_ptr->pinned_flushes[LARGE_ENTRY_TYPE] != 0) ||
+ (cache_ptr->pinned_clears[LARGE_ENTRY_TYPE] != 0) ||
+ (cache_ptr->size_increases[LARGE_ENTRY_TYPE] != 0) ||
+ (cache_ptr->size_decreases[LARGE_ENTRY_TYPE] != 0) ||
+ (cache_ptr->entry_flush_size_changes[LARGE_ENTRY_TYPE] != 0) ||
+ (cache_ptr->cache_flush_size_changes[LARGE_ENTRY_TYPE] != 0)) {
pass = FALSE;
failure_mssg = "Unexpected large entry stats in check_flush_cache__flush_op_eviction_test().";
}
}
- if ( pass ) {
+ if(pass) {
- if ( ( cache_ptr->insertions[MONSTER_ENTRY_TYPE] != 0 ) ||
- ( cache_ptr->pinned_insertions[MONSTER_ENTRY_TYPE] != 0 ) ||
- ( cache_ptr->clears[MONSTER_ENTRY_TYPE] != 0 ) ||
- ( cache_ptr->flushes[MONSTER_ENTRY_TYPE] != 62 ) ||
- ( cache_ptr->evictions[MONSTER_ENTRY_TYPE] != 32 ) ||
- ( cache_ptr->take_ownerships[MONSTER_ENTRY_TYPE] != 0 ) ||
- ( cache_ptr->moves[MONSTER_ENTRY_TYPE] != 0 ) ||
- ( cache_ptr->entry_flush_moves[MONSTER_ENTRY_TYPE] != 0 ) ||
- ( cache_ptr->cache_flush_moves[MONSTER_ENTRY_TYPE] != 0 ) ||
- ( cache_ptr->pins[MONSTER_ENTRY_TYPE] != 0 ) ||
- ( cache_ptr->unpins[MONSTER_ENTRY_TYPE] != 0 ) ||
- ( cache_ptr->dirty_pins[MONSTER_ENTRY_TYPE] != 0 ) ||
- ( cache_ptr->pinned_flushes[MONSTER_ENTRY_TYPE] != 0 ) ||
- ( cache_ptr->pinned_clears[MONSTER_ENTRY_TYPE] != 0 ) ||
- ( cache_ptr->size_increases[MONSTER_ENTRY_TYPE] != 0 ) ||
- ( cache_ptr->size_decreases[MONSTER_ENTRY_TYPE] != 0 ) ||
- ( cache_ptr->entry_flush_size_changes[MONSTER_ENTRY_TYPE] != 0 ) ||
- ( cache_ptr->cache_flush_size_changes[MONSTER_ENTRY_TYPE] != 0 ) ) {
+ if((cache_ptr->insertions[MONSTER_ENTRY_TYPE] != 0) ||
+ (cache_ptr->pinned_insertions[MONSTER_ENTRY_TYPE] != 0) ||
+ (cache_ptr->clears[MONSTER_ENTRY_TYPE] != 0) ||
+ (cache_ptr->flushes[MONSTER_ENTRY_TYPE] != 62) ||
+ (cache_ptr->evictions[MONSTER_ENTRY_TYPE] != 32) ||
+ (cache_ptr->take_ownerships[MONSTER_ENTRY_TYPE] != 0) ||
+ (cache_ptr->moves[MONSTER_ENTRY_TYPE] != 0) ||
+ (cache_ptr->entry_flush_moves[MONSTER_ENTRY_TYPE] != 0) ||
+ (cache_ptr->cache_flush_moves[MONSTER_ENTRY_TYPE] != 0) ||
+ (cache_ptr->pins[MONSTER_ENTRY_TYPE] != 0) ||
+ (cache_ptr->unpins[MONSTER_ENTRY_TYPE] != 0) ||
+ (cache_ptr->dirty_pins[MONSTER_ENTRY_TYPE] != 0) ||
+ (cache_ptr->pinned_flushes[MONSTER_ENTRY_TYPE] != 0) ||
+ (cache_ptr->pinned_clears[MONSTER_ENTRY_TYPE] != 0) ||
+ (cache_ptr->size_increases[MONSTER_ENTRY_TYPE] != 0) ||
+ (cache_ptr->size_decreases[MONSTER_ENTRY_TYPE] != 0) ||
+ (cache_ptr->entry_flush_size_changes[MONSTER_ENTRY_TYPE] != 0) ||
+ (cache_ptr->cache_flush_size_changes[MONSTER_ENTRY_TYPE] != 0)) {
pass = FALSE;
failure_mssg = "Unexpected monster entry stats in check_flush_cache__flush_op_eviction_test().";
@@ -10796,7 +10796,7 @@ check_flush_cache__flush_op_eviction_test(H5F_t * file_ptr)
}
#endif /* H5C_COLLECT_CACHE_STATS */
- if ( pass ) {
+ if(pass) {
reset_entries();
}
@@ -10834,19 +10834,19 @@ check_flush_cache__single_entry(H5F_t * file_ptr)
{
H5C_t * cache_ptr = file_ptr->shared->cache;
- if ( cache_ptr == NULL ) {
+ if(cache_ptr == NULL) {
pass = FALSE;
failure_mssg = "cache_ptr NULL on entry to single entry case.";
}
- else if ( ( cache_ptr->index_len != 0 ) ||
- ( cache_ptr->index_size != 0 ) ) {
+ else if((cache_ptr->index_len != 0) ||
+ (cache_ptr->index_size != 0)) {
pass = FALSE;
failure_mssg = "cache not empty at beginning of single entry case.";
}
- if ( pass ) {
+ if(pass) {
check_flush_cache__single_entry_test
(
@@ -10860,10 +10860,10 @@ check_flush_cache__single_entry(H5F_t * file_ptr)
/* expected_deserialized */ TRUE,
/* expected_serialized */ FALSE,
/* expected_destroyed */ FALSE
- );
+ );
}
- if ( pass ) {
+ if(pass) {
check_flush_cache__single_entry_test
(
@@ -10877,10 +10877,10 @@ check_flush_cache__single_entry(H5F_t * file_ptr)
/* expected_deserialized */ TRUE,
/* expected_serialized */ TRUE,
/* expected_destroyed */ FALSE
- );
+ );
}
- if ( pass ) {
+ if(pass) {
check_flush_cache__single_entry_test
(
@@ -10894,10 +10894,10 @@ check_flush_cache__single_entry(H5F_t * file_ptr)
/* expected_deserialized */ TRUE,
/* expected_serialized */ FALSE,
/* expected_destroyed */ FALSE
- );
+ );
}
- if ( pass ) {
+ if(pass) {
check_flush_cache__single_entry_test
(
@@ -10911,10 +10911,10 @@ check_flush_cache__single_entry(H5F_t * file_ptr)
/* expected_deserialized */ TRUE,
/* expected_serialized */ FALSE,
/* expected_destroyed */ FALSE
- );
+ );
}
- if ( pass ) {
+ if(pass) {
check_flush_cache__single_entry_test
(
@@ -10928,10 +10928,10 @@ check_flush_cache__single_entry(H5F_t * file_ptr)
/* expected_deserialized */ TRUE,
/* expected_serialized */ FALSE,
/* expected_destroyed */ TRUE
- );
+ );
}
- if ( pass ) {
+ if(pass) {
check_flush_cache__single_entry_test
(
@@ -10945,10 +10945,10 @@ check_flush_cache__single_entry(H5F_t * file_ptr)
/* expected_deserialized */ TRUE,
/* expected_serialized */ TRUE,
/* expected_destroyed */ TRUE
- );
+ );
}
- if ( pass ) {
+ if(pass) {
check_flush_cache__single_entry_test
(
@@ -10962,10 +10962,10 @@ check_flush_cache__single_entry(H5F_t * file_ptr)
/* expected_deserialized */ TRUE,
/* expected_serialized */ FALSE,
/* expected_destroyed */ FALSE
- );
+ );
}
- if ( pass ) {
+ if(pass) {
check_flush_cache__single_entry_test
(
@@ -10979,10 +10979,10 @@ check_flush_cache__single_entry(H5F_t * file_ptr)
/* expected_deserialized */ TRUE,
/* expected_serialized */ FALSE,
/* expected_destroyed */ FALSE
- );
+ );
}
- if ( pass ) {
+ if(pass) {
check_flush_cache__single_entry_test
(
@@ -10997,10 +10997,10 @@ check_flush_cache__single_entry(H5F_t * file_ptr)
/* expected_deserialized */ TRUE,
/* expected_serialized */ FALSE,
/* expected_destroyed */ TRUE
- );
+ );
}
- if ( pass ) {
+ if(pass) {
check_flush_cache__single_entry_test
(
@@ -11015,10 +11015,10 @@ check_flush_cache__single_entry(H5F_t * file_ptr)
/* expected_deserialized */ TRUE,
/* expected_serialized */ FALSE,
/* expected_destroyed */ TRUE
- );
+ );
}
- if ( pass ) {
+ if(pass) {
check_flush_cache__single_entry_test
(
@@ -11033,10 +11033,10 @@ check_flush_cache__single_entry(H5F_t * file_ptr)
/* expected_deserialized */ TRUE,
/* expected_serialized */ FALSE,
/* expected_destroyed */ FALSE
- );
+ );
}
- if ( pass ) {
+ if(pass) {
check_flush_cache__single_entry_test
(
@@ -11051,10 +11051,10 @@ check_flush_cache__single_entry(H5F_t * file_ptr)
/* expected_deserialized */ TRUE,
/* expected_serialized */ FALSE,
/* expected_destroyed */ FALSE
- );
+ );
}
- if ( pass ) {
+ if(pass) {
check_flush_cache__single_entry_test
(
@@ -11069,10 +11069,10 @@ check_flush_cache__single_entry(H5F_t * file_ptr)
/* expected_deserialized */ TRUE,
/* expected_serialized */ FALSE,
/* expected_destroyed */ TRUE
- );
+ );
}
- if ( pass ) {
+ if(pass) {
check_flush_cache__single_entry_test
(
@@ -11087,10 +11087,10 @@ check_flush_cache__single_entry(H5F_t * file_ptr)
/* expected_deserialized */ TRUE,
/* expected_serialized */ TRUE,
/* expected_destroyed */ TRUE
- );
+ );
}
- if ( pass ) {
+ if(pass) {
check_flush_cache__single_entry_test
(
@@ -11106,10 +11106,10 @@ check_flush_cache__single_entry(H5F_t * file_ptr)
/* expected_deserialized */ TRUE,
/* expected_serialized */ FALSE,
/* expected_destroyed */ TRUE
- );
+ );
}
- if ( pass ) {
+ if(pass) {
check_flush_cache__single_entry_test
(
@@ -11125,10 +11125,10 @@ check_flush_cache__single_entry(H5F_t * file_ptr)
/* expected_deserialized */ TRUE,
/* expected_serialized */ FALSE,
/* expected_destroyed */ TRUE
- );
+ );
}
- if ( pass ) {
+ if(pass) {
check_flush_cache__single_entry_test
(
@@ -11142,10 +11142,10 @@ check_flush_cache__single_entry(H5F_t * file_ptr)
/* expected_deserialized */ TRUE,
/* expected_serialized */ FALSE,
/* expected_destroyed */ FALSE
- );
+ );
}
- if ( pass ) {
+ if(pass) {
check_flush_cache__single_entry_test
(
@@ -11159,10 +11159,10 @@ check_flush_cache__single_entry(H5F_t * file_ptr)
/* expected_deserialized */ TRUE,
/* expected_serialized */ TRUE,
/* expected_destroyed */ FALSE
- );
+ );
}
- if ( pass ) {
+ if(pass) {
check_flush_cache__single_entry_test
(
@@ -11176,10 +11176,10 @@ check_flush_cache__single_entry(H5F_t * file_ptr)
/* expected_deserialized */ TRUE,
/* expected_serialized */ FALSE,
/* expected_destroyed */ FALSE
- );
+ );
}
- if ( pass ) {
+ if(pass) {
check_flush_cache__single_entry_test
(
@@ -11193,10 +11193,10 @@ check_flush_cache__single_entry(H5F_t * file_ptr)
/* expected_deserialized */ TRUE,
/* expected_serialized */ FALSE,
/* expected_destroyed */ FALSE
- );
+ );
}
- if ( pass ) {
+ if(pass) {
check_flush_cache__single_entry_test
(
@@ -11210,10 +11210,10 @@ check_flush_cache__single_entry(H5F_t * file_ptr)
/* expected_deserialized */ TRUE,
/* expected_serialized */ FALSE,
/* expected_destroyed */ TRUE
- );
+ );
}
- if ( pass ) {
+ if(pass) {
check_flush_cache__single_entry_test
(
@@ -11227,10 +11227,10 @@ check_flush_cache__single_entry(H5F_t * file_ptr)
/* expected_deserialized */ TRUE,
/* expected_serialized */ TRUE,
/* expected_destroyed */ TRUE
- );
+ );
}
- if ( pass ) {
+ if(pass) {
check_flush_cache__single_entry_test
(
@@ -11244,10 +11244,10 @@ check_flush_cache__single_entry(H5F_t * file_ptr)
/* expected_deserialized */ TRUE,
/* expected_serialized */ FALSE,
/* expected_destroyed */ FALSE
- );
+ );
}
- if ( pass ) {
+ if(pass) {
check_flush_cache__single_entry_test
(
@@ -11261,10 +11261,10 @@ check_flush_cache__single_entry(H5F_t * file_ptr)
/* expected_deserialized */ TRUE,
/* expected_serialized */ TRUE,
/* expected_destroyed */ FALSE
- );
+ );
}
- if ( pass ) {
+ if(pass) {
check_flush_cache__single_entry_test
(
@@ -11279,10 +11279,10 @@ check_flush_cache__single_entry(H5F_t * file_ptr)
/* expected_deserialized */ TRUE,
/* expected_serialized */ FALSE,
/* expected_destroyed */ TRUE
- );
+ );
}
- if ( pass ) {
+ if(pass) {
check_flush_cache__single_entry_test
(
@@ -11297,10 +11297,10 @@ check_flush_cache__single_entry(H5F_t * file_ptr)
/* expected_deserialized */ TRUE,
/* expected_serialized */ FALSE,
/* expected_destroyed */ TRUE
- );
+ );
}
- if ( pass ) {
+ if(pass) {
check_flush_cache__single_entry_test
(
@@ -11315,10 +11315,10 @@ check_flush_cache__single_entry(H5F_t * file_ptr)
/* expected_deserialized */ TRUE,
/* expected_serialized */ FALSE,
/* expected_destroyed */ FALSE
- );
+ );
}
- if ( pass ) {
+ if(pass) {
check_flush_cache__single_entry_test
(
@@ -11333,10 +11333,10 @@ check_flush_cache__single_entry(H5F_t * file_ptr)
/* expected_deserialized */ TRUE,
/* expected_serialized */ FALSE,
/* expected_destroyed */ FALSE
- );
+ );
}
- if ( pass ) {
+ if(pass) {
check_flush_cache__single_entry_test
(
@@ -11351,10 +11351,10 @@ check_flush_cache__single_entry(H5F_t * file_ptr)
/* expected_deserialized */ TRUE,
/* expected_serialized */ FALSE,
/* expected_destroyed */ TRUE
- );
+ );
}
- if ( pass ) {
+ if(pass) {
check_flush_cache__single_entry_test
(
@@ -11369,10 +11369,10 @@ check_flush_cache__single_entry(H5F_t * file_ptr)
/* expected_deserialized */ TRUE,
/* expected_serialized */ TRUE,
/* expected_destroyed */ TRUE
- );
+ );
}
- if ( pass ) {
+ if(pass) {
check_flush_cache__single_entry_test
(
@@ -11388,10 +11388,10 @@ check_flush_cache__single_entry(H5F_t * file_ptr)
/* expected_deserialized */ TRUE,
/* expected_serialized */ FALSE,
/* expected_destroyed */ TRUE
- );
+ );
}
- if ( pass ) {
+ if(pass) {
check_flush_cache__single_entry_test
(
@@ -11407,10 +11407,10 @@ check_flush_cache__single_entry(H5F_t * file_ptr)
/* expected_deserialized */ TRUE,
/* expected_serialized */ FALSE,
/* expected_destroyed */ TRUE
- );
+ );
}
- if ( pass ) {
+ if(pass) {
check_flush_cache__single_entry_test
(
@@ -11424,10 +11424,10 @@ check_flush_cache__single_entry(H5F_t * file_ptr)
/* expected_deserialized */ FALSE,
/* expected_serialized */ TRUE,
/* expected_destroyed */ FALSE
- );
+ );
}
- if ( pass ) {
+ if(pass) {
check_flush_cache__single_entry_test
(
@@ -11441,10 +11441,10 @@ check_flush_cache__single_entry(H5F_t * file_ptr)
/* expected_deserialized */ FALSE,
/* expected_serialized */ TRUE,
/* expected_destroyed */ FALSE
- );
+ );
}
- if ( pass ) {
+ if(pass) {
check_flush_cache__single_entry_test
(
@@ -11458,10 +11458,10 @@ check_flush_cache__single_entry(H5F_t * file_ptr)
/* expected_deserialized */ FALSE,
/* expected_serialized */ FALSE,
/* expected_destroyed */ FALSE
- );
+ );
}
- if ( pass ) {
+ if(pass) {
check_flush_cache__single_entry_test
(
@@ -11475,10 +11475,10 @@ check_flush_cache__single_entry(H5F_t * file_ptr)
/* expected_deserialized */ FALSE,
/* expected_serialized */ FALSE,
/* expected_destroyed */ FALSE
- );
+ );
}
- if ( pass ) {
+ if(pass) {
check_flush_cache__single_entry_test
(
@@ -11492,10 +11492,10 @@ check_flush_cache__single_entry(H5F_t * file_ptr)
/* expected_deserialized */ FALSE,
/* expected_serialized */ TRUE,
/* expected_destroyed */ TRUE
- );
+ );
}
- if ( pass ) {
+ if(pass) {
check_flush_cache__single_entry_test
(
@@ -11509,10 +11509,10 @@ check_flush_cache__single_entry(H5F_t * file_ptr)
/* expected_deserialized */ FALSE,
/* expected_serialized */ TRUE,
/* expected_destroyed */ TRUE
- );
+ );
}
- if ( pass ) {
+ if(pass) {
check_flush_cache__single_entry_test
(
@@ -11526,10 +11526,10 @@ check_flush_cache__single_entry(H5F_t * file_ptr)
/* expected_deserialized */ FALSE,
/* expected_serialized */ FALSE,
/* expected_destroyed */ FALSE
- );
+ );
}
- if ( pass ) {
+ if(pass) {
check_flush_cache__single_entry_test
(
@@ -11543,10 +11543,10 @@ check_flush_cache__single_entry(H5F_t * file_ptr)
/* expected_deserialized */ FALSE,
/* expected_serialized */ FALSE,
/* expected_destroyed */ FALSE
- );
+ );
}
- if ( pass ) {
+ if(pass) {
check_flush_cache__single_entry_test
(
@@ -11561,10 +11561,10 @@ check_flush_cache__single_entry(H5F_t * file_ptr)
/* expected_deserialized */ FALSE,
/* expected_serialized */ FALSE,
/* expected_destroyed */ TRUE
- );
+ );
}
- if ( pass ) {
+ if(pass) {
check_flush_cache__single_entry_test
(
@@ -11579,10 +11579,10 @@ check_flush_cache__single_entry(H5F_t * file_ptr)
/* expected_deserialized */ FALSE,
/* expected_serialized */ FALSE,
/* expected_destroyed */ TRUE
- );
+ );
}
- if ( pass ) {
+ if(pass) {
check_flush_cache__single_entry_test
(
@@ -11597,10 +11597,10 @@ check_flush_cache__single_entry(H5F_t * file_ptr)
/* expected_deserialized */ FALSE,
/* expected_serialized */ FALSE,
/* expected_destroyed */ FALSE
- );
+ );
}
- if ( pass ) {
+ if(pass) {
check_flush_cache__single_entry_test
(
@@ -11615,10 +11615,10 @@ check_flush_cache__single_entry(H5F_t * file_ptr)
/* expected_deserialized */ FALSE,
/* expected_serialized */ FALSE,
/* expected_destroyed */ FALSE
- );
+ );
}
- if ( pass ) {
+ if(pass) {
check_flush_cache__single_entry_test
(
@@ -11633,10 +11633,10 @@ check_flush_cache__single_entry(H5F_t * file_ptr)
/* expected_deserialized */ FALSE,
/* expected_serialized */ TRUE,
/* expected_destroyed */ TRUE
- );
+ );
}
- if ( pass ) {
+ if(pass) {
check_flush_cache__single_entry_test
(
@@ -11651,10 +11651,10 @@ check_flush_cache__single_entry(H5F_t * file_ptr)
/* expected_deserialized */ FALSE,
/* expected_serialized */ TRUE,
/* expected_destroyed */ TRUE
- );
+ );
}
- if ( pass ) {
+ if(pass) {
check_flush_cache__single_entry_test
(
@@ -11670,10 +11670,10 @@ check_flush_cache__single_entry(H5F_t * file_ptr)
/* expected_deserialized */ FALSE,
/* expected_serialized */ FALSE,
/* expected_destroyed */ TRUE
- );
+ );
}
- if ( pass ) {
+ if(pass) {
check_flush_cache__single_entry_test
(
@@ -11689,10 +11689,10 @@ check_flush_cache__single_entry(H5F_t * file_ptr)
/* expected_deserialized */ FALSE,
/* expected_serialized */ FALSE,
/* expected_destroyed */ TRUE
- );
+ );
}
- if ( pass ) {
+ if(pass) {
check_flush_cache__single_entry_test
(
@@ -11706,10 +11706,10 @@ check_flush_cache__single_entry(H5F_t * file_ptr)
/* expected_deserialized */ FALSE,
/* expected_serialized */ TRUE,
/* expected_destroyed */ FALSE
- );
+ );
}
- if ( pass ) {
+ if(pass) {
check_flush_cache__single_entry_test
(
@@ -11723,10 +11723,10 @@ check_flush_cache__single_entry(H5F_t * file_ptr)
/* expected_deserialized */ FALSE,
/* expected_serialized */ TRUE,
/* expected_destroyed */ FALSE
- );
+ );
}
- if ( pass ) {
+ if(pass) {
check_flush_cache__single_entry_test
(
@@ -11740,10 +11740,10 @@ check_flush_cache__single_entry(H5F_t * file_ptr)
/* expected_deserialized */ FALSE,
/* expected_serialized */ FALSE,
/* expected_destroyed */ FALSE
- );
+ );
}
- if ( pass ) {
+ if(pass) {
check_flush_cache__single_entry_test
(
@@ -11757,10 +11757,10 @@ check_flush_cache__single_entry(H5F_t * file_ptr)
/* expected_deserialized */ FALSE,
/* expected_serialized */ FALSE,
/* expected_destroyed */ FALSE
- );
+ );
}
- if ( pass ) {
+ if(pass) {
check_flush_cache__single_entry_test
(
@@ -11774,10 +11774,10 @@ check_flush_cache__single_entry(H5F_t * file_ptr)
/* expected_deserialized */ FALSE,
/* expected_serialized */ TRUE,
/* expected_destroyed */ TRUE
- );
+ );
}
- if ( pass ) {
+ if(pass) {
check_flush_cache__single_entry_test
(
@@ -11791,10 +11791,10 @@ check_flush_cache__single_entry(H5F_t * file_ptr)
/* expected_deserialized */ FALSE,
/* expected_serialized */ TRUE,
/* expected_destroyed */ TRUE
- );
+ );
}
- if ( pass ) {
+ if(pass) {
check_flush_cache__single_entry_test
(
@@ -11808,10 +11808,10 @@ check_flush_cache__single_entry(H5F_t * file_ptr)
/* expected_deserialized */ FALSE,
/* expected_serialized */ TRUE,
/* expected_destroyed */ FALSE
- );
+ );
}
- if ( pass ) {
+ if(pass) {
check_flush_cache__single_entry_test
(
@@ -11825,10 +11825,10 @@ check_flush_cache__single_entry(H5F_t * file_ptr)
/* expected_deserialized */ FALSE,
/* expected_serialized */ TRUE,
/* expected_destroyed */ FALSE
- );
+ );
}
- if ( pass ) {
+ if(pass) {
check_flush_cache__single_entry_test
(
@@ -11843,10 +11843,10 @@ check_flush_cache__single_entry(H5F_t * file_ptr)
/* expected_deserialized */ FALSE,
/* expected_serialized */ FALSE,
/* expected_destroyed */ TRUE
- );
+ );
}
- if ( pass ) {
+ if(pass) {
check_flush_cache__single_entry_test
(
@@ -11861,10 +11861,10 @@ check_flush_cache__single_entry(H5F_t * file_ptr)
/* expected_deserialized */ FALSE,
/* expected_serialized */ FALSE,
/* expected_destroyed */ TRUE
- );
+ );
}
- if ( pass ) {
+ if(pass) {
check_flush_cache__single_entry_test
(
@@ -11879,10 +11879,10 @@ check_flush_cache__single_entry(H5F_t * file_ptr)
/* expected_deserialized */ FALSE,
/* expected_serialized */ FALSE,
/* expected_destroyed */ FALSE
- );
+ );
}
- if ( pass ) {
+ if(pass) {
check_flush_cache__single_entry_test
(
@@ -11897,10 +11897,10 @@ check_flush_cache__single_entry(H5F_t * file_ptr)
/* expected_deserialized */ FALSE,
/* expected_serialized */ FALSE,
/* expected_destroyed */ FALSE
- );
+ );
}
- if ( pass ) {
+ if(pass) {
check_flush_cache__single_entry_test
(
@@ -11915,10 +11915,10 @@ check_flush_cache__single_entry(H5F_t * file_ptr)
/* expected_deserialized */ FALSE,
/* expected_serialized */ TRUE,
/* expected_destroyed */ TRUE
- );
+ );
}
- if ( pass ) {
+ if(pass) {
check_flush_cache__single_entry_test
(
@@ -11933,10 +11933,10 @@ check_flush_cache__single_entry(H5F_t * file_ptr)
/* expected_deserialized */ FALSE,
/* expected_serialized */ TRUE,
/* expected_destroyed */ TRUE
- );
+ );
}
- if ( pass ) {
+ if(pass) {
check_flush_cache__single_entry_test
(
@@ -11952,10 +11952,10 @@ check_flush_cache__single_entry(H5F_t * file_ptr)
/* expected_deserialized */ FALSE,
/* expected_serialized */ FALSE,
/* expected_destroyed */ TRUE
- );
+ );
}
- if ( pass ) {
+ if(pass) {
check_flush_cache__single_entry_test
(
@@ -11971,7 +11971,7 @@ check_flush_cache__single_entry(H5F_t * file_ptr)
/* expected_deserialized */ FALSE,
/* expected_serialized */ FALSE,
/* expected_destroyed */ TRUE
- );
+ );
}
@@ -12034,7 +12034,7 @@ check_flush_cache__single_entry(H5F_t * file_ptr)
* H5C__SET_FLUSH_MARKER_FLAG apply here as well.
*/
- if ( pass ) {
+ if(pass) {
int i;
struct pinned_single_entry_test_spec
@@ -12315,7 +12315,7 @@ check_flush_cache__single_entry(H5F_t * file_ptr)
{ 256, PICO_ENTRY_TYPE, 0, TRUE, TRUE, TRUE, TRUE, TRUE, H5C__SET_FLUSH_MARKER_FLAG, H5C__FLUSH_MARKED_ENTRIES_FLAG | H5C__FLUSH_CLEAR_ONLY_FLAG, FALSE, FALSE } };
i = 0;
- while ( ( pass ) && ( i < 256 ) )
+ while(pass && (i < 256))
{
check_flush_cache__pinned_single_entry_test
(
@@ -12332,7 +12332,7 @@ check_flush_cache__single_entry(H5F_t * file_ptr)
/* flush_flags */ spec[i].flush_flags,
/* expected_serialized */ spec[i].expected_serialized,
/* expected_destroyed */ spec[i].expected_destroyed
- );
+ );
i++;
}
}
@@ -12375,7 +12375,7 @@ check_flush_cache__single_entry_test(H5F_t * file_ptr,
test_entry_t * base_addr;
test_entry_t * entry_ptr = NULL;
- if ( cache_ptr == NULL ) {
+ if(cache_ptr == NULL) {
pass = FALSE;
HDsnprintf(msg, (size_t)128,
@@ -12383,8 +12383,8 @@ check_flush_cache__single_entry_test(H5F_t * file_ptr,
test_num);
failure_mssg = msg;
}
- else if ( ( cache_ptr->index_len != 0 ) ||
- ( cache_ptr->index_size != 0 ) ) {
+ else if((cache_ptr->index_len != 0) ||
+ (cache_ptr->index_size != 0)) {
pass = FALSE;
HDsnprintf(msg, (size_t)128,
@@ -12392,8 +12392,8 @@ check_flush_cache__single_entry_test(H5F_t * file_ptr,
test_num);
failure_mssg = msg;
}
- else if ( ( entry_type < 0 ) || ( entry_type >= NUMBER_OF_ENTRY_TYPES ) ||
- ( entry_idx < 0 ) || ( entry_idx > max_indices[entry_type] ) ) {
+ else if((entry_type < 0) || (entry_type >= NUMBER_OF_ENTRY_TYPES) ||
+ (entry_idx < 0) || (entry_idx > max_indices[entry_type])) {
pass = FALSE;
HDsnprintf(msg, (size_t)128,
@@ -12402,12 +12402,12 @@ check_flush_cache__single_entry_test(H5F_t * file_ptr,
failure_mssg = msg;
}
- if ( pass ) {
+ if(pass) {
base_addr = entries[entry_type];
entry_ptr = &(base_addr[entry_idx]);
- if ( insert_flag ) {
+ if(insert_flag) {
insert_entry(file_ptr, entry_type, entry_idx, flags);
@@ -12419,11 +12419,11 @@ check_flush_cache__single_entry_test(H5F_t * file_ptr,
}
}
- if ( pass ) {
+ if(pass) {
result = H5C_flush_cache(file_ptr, H5AC_ind_read_dxpl_id, flush_flags);
- if ( result < 0 ) {
+ if(result < 0) {
pass = FALSE;
HDsnprintf(msg, (size_t)128,
@@ -12431,9 +12431,9 @@ check_flush_cache__single_entry_test(H5F_t * file_ptr,
flush_flags, test_num);
failure_mssg = msg;
}
- else if ( ( entry_ptr->deserialized != expected_deserialized ) ||
- ( entry_ptr->serialized != expected_serialized ) ||
- ( entry_ptr->destroyed != expected_destroyed ) ) {
+ else if((entry_ptr->deserialized != expected_deserialized) ||
+ (entry_ptr->serialized != expected_serialized) ||
+ (entry_ptr->destroyed != expected_destroyed)) {
#if 0 /* This is useful debugging code -- lets keep it for a while */
HDfprintf(stdout,
@@ -12451,22 +12451,22 @@ check_flush_cache__single_entry_test(H5F_t * file_ptr,
test_num);
failure_mssg = msg;
}
- else if ( ( ( (flush_flags & H5C__FLUSH_INVALIDATE_FLAG) == 0 )
+ else if((((flush_flags & H5C__FLUSH_INVALIDATE_FLAG) == 0)
&&
- ( ( cache_ptr->index_len != 1 )
+ ((cache_ptr->index_len != 1)
||
- ( cache_ptr->index_size != entry_sizes[entry_type] )
- )
- )
+ (cache_ptr->index_size != entry_sizes[entry_type])
+ )
+ )
||
- ( ( (flush_flags & H5C__FLUSH_INVALIDATE_FLAG) != 0 )
+ (((flush_flags & H5C__FLUSH_INVALIDATE_FLAG) != 0)
&&
- ( ( cache_ptr->index_len != 0 )
+ ((cache_ptr->index_len != 0)
||
- ( cache_ptr->index_size != 0 )
- )
- )
- ) {
+ (cache_ptr->index_size != 0)
+ )
+ )
+ ) {
pass = FALSE;
HDsnprintf(msg, (size_t)128,
@@ -12478,11 +12478,11 @@ check_flush_cache__single_entry_test(H5F_t * file_ptr,
/* clean up the cache to prep for the next test */
- if ( pass ) {
+ if(pass) {
result = H5C_flush_cache(file_ptr, H5AC_ind_read_dxpl_id, H5C__FLUSH_INVALIDATE_FLAG);
- if ( result < 0 ) {
+ if(result < 0) {
pass = FALSE;
HDsnprintf(msg, (size_t)128,
@@ -12490,8 +12490,8 @@ check_flush_cache__single_entry_test(H5F_t * file_ptr,
test_num);
failure_mssg = msg;
}
- else if ( ( cache_ptr->index_len != 0 ) ||
- ( cache_ptr->index_size != 0 ) ) {
+ else if((cache_ptr->index_len != 0) ||
+ (cache_ptr->index_size != 0)) {
pass = FALSE;
HDsnprintf(msg, (size_t)128,
@@ -12557,7 +12557,7 @@ check_flush_cache__pinned_single_entry_test(H5F_t * file_ptr,
test_entry_t * base_addr;
test_entry_t * entry_ptr = NULL;
- if ( cache_ptr == NULL ) {
+ if(cache_ptr == NULL) {
pass = FALSE;
HDsnprintf(msg, (size_t)128,
@@ -12565,8 +12565,8 @@ check_flush_cache__pinned_single_entry_test(H5F_t * file_ptr,
test_num);
failure_mssg = msg;
}
- else if ( ( cache_ptr->index_len != 0 ) ||
- ( cache_ptr->index_size != 0 ) ) {
+ else if((cache_ptr->index_len != 0) ||
+ (cache_ptr->index_size != 0)) {
pass = FALSE;
HDsnprintf(msg, (size_t)128,
@@ -12574,8 +12574,8 @@ check_flush_cache__pinned_single_entry_test(H5F_t * file_ptr,
test_num);
failure_mssg = msg;
}
- else if ( ( entry_type < 0 ) || ( entry_type >= NUMBER_OF_ENTRY_TYPES ) ||
- ( entry_idx < 0 ) || ( entry_idx > max_indices[entry_type] ) ) {
+ else if((entry_type < 0) || (entry_type >= NUMBER_OF_ENTRY_TYPES) ||
+ (entry_idx < 0) || (entry_idx > max_indices[entry_type])) {
pass = FALSE;
HDsnprintf(msg, (size_t)128,
@@ -12584,14 +12584,14 @@ check_flush_cache__pinned_single_entry_test(H5F_t * file_ptr,
failure_mssg = msg;
}
- if ( pass ) {
+ if(pass) {
base_addr = entries[entry_type];
entry_ptr = &(base_addr[entry_idx]);
protect_entry(file_ptr, entry_type, entry_idx);
- if ( pop_mark_dirty_prot ) {
+ if(pop_mark_dirty_prot) {
mark_entry_dirty(entry_type, entry_idx);
}
@@ -12600,22 +12600,22 @@ check_flush_cache__pinned_single_entry_test(H5F_t * file_ptr,
(unprot_dirty_flag ? H5C__DIRTIED_FLAG : H5C__NO_FLAGS_SET) |
(flags | H5C__PIN_ENTRY_FLAG));
- if ( mark_dirty ) {
+ if(mark_dirty) {
mark_entry_dirty(entry_type, entry_idx);
}
- if ( pop_mark_dirty_pinned ) {
+ if(pop_mark_dirty_pinned) {
mark_entry_dirty(entry_type, entry_idx);
}
}
- if ( pass ) {
+ if(pass) {
result = H5C_flush_cache(file_ptr, H5AC_ind_read_dxpl_id, flush_flags);
- if ( result < 0 ) {
+ if(result < 0) {
pass = FALSE;
HDsnprintf(msg, (size_t)128,
@@ -12623,9 +12623,9 @@ check_flush_cache__pinned_single_entry_test(H5F_t * file_ptr,
flush_flags, test_num);
failure_mssg = msg;
}
- else if ( ( entry_ptr->deserialized != expected_deserialized ) ||
- ( entry_ptr->serialized != expected_serialized ) ||
- ( entry_ptr->destroyed != expected_destroyed ) ) {
+ else if((entry_ptr->deserialized != expected_deserialized) ||
+ (entry_ptr->serialized != expected_serialized) ||
+ (entry_ptr->destroyed != expected_destroyed)) {
#if 0 /* this is useful debugging code -- keep it around */
HDfprintf(stdout,
"desrlzd = %d(%d), srlzd = %d(%d), dest = %d(%d)\n",
@@ -12642,22 +12642,22 @@ check_flush_cache__pinned_single_entry_test(H5F_t * file_ptr,
test_num);
failure_mssg = msg;
}
- else if ( ( ( (flush_flags & H5C__FLUSH_INVALIDATE_FLAG) == 0 )
+ else if((((flush_flags & H5C__FLUSH_INVALIDATE_FLAG) == 0)
&&
- ( ( cache_ptr->index_len != 1 )
+ ((cache_ptr->index_len != 1)
||
- ( cache_ptr->index_size != entry_sizes[entry_type] )
- )
- )
+ (cache_ptr->index_size != entry_sizes[entry_type])
+ )
+ )
||
- ( ( (flush_flags & H5C__FLUSH_INVALIDATE_FLAG) != 0 )
+ (((flush_flags & H5C__FLUSH_INVALIDATE_FLAG) != 0)
&&
- ( ( cache_ptr->index_len != 0 )
+ ((cache_ptr->index_len != 0)
||
- ( cache_ptr->index_size != 0 )
- )
- )
- ) {
+ (cache_ptr->index_size != 0)
+ )
+ )
+ ) {
pass = FALSE;
HDsnprintf(msg, (size_t)128,
@@ -12669,9 +12669,9 @@ check_flush_cache__pinned_single_entry_test(H5F_t * file_ptr,
/* clean up the cache to prep for the next test */
- if ( pass ) {
+ if(pass) {
- if ( unprotect_unpin ) {
+ if(unprotect_unpin) {
protect_entry(file_ptr, entry_type, entry_idx);
@@ -12686,11 +12686,11 @@ check_flush_cache__pinned_single_entry_test(H5F_t * file_ptr,
}
}
- if ( pass ) {
+ if(pass) {
result = H5C_flush_cache(file_ptr, H5AC_ind_read_dxpl_id, H5C__FLUSH_INVALIDATE_FLAG);
- if ( result < 0 ) {
+ if(result < 0) {
pass = FALSE;
HDsnprintf(msg, (size_t)128,
@@ -12698,8 +12698,8 @@ check_flush_cache__pinned_single_entry_test(H5F_t * file_ptr,
test_num);
failure_mssg = msg;
}
- else if ( ( cache_ptr->index_len != 0 ) ||
- ( cache_ptr->index_size != 0 ) ) {
+ else if((cache_ptr->index_len != 0) ||
+ (cache_ptr->index_size != 0)) {
pass = FALSE;
HDsnprintf(msg, (size_t)128,
@@ -12753,14 +12753,14 @@ check_get_entry_status(void)
pass = TRUE;
- if ( pass ) {
+ if(pass) {
reset_entries();
file_ptr = setup_cache((size_t)(2 * 1024 * 1024),
(size_t)(1 * 1024 * 1024));
- if ( file_ptr == NULL ) {
+ if(file_ptr == NULL) {
pass = FALSE;
failure_mssg = "file_ptr NULL from setup_cache.";
@@ -12774,7 +12774,7 @@ check_get_entry_status(void)
}
}
- if ( pass ) {
+ if(pass) {
/* entry not in cache -- only in_cache should be touched by
* the call. Thus, only check that boolean.
@@ -12783,14 +12783,14 @@ check_get_entry_status(void)
result = H5C_get_entry_status(file_ptr, entry_ptr->addr, &entry_size,
&in_cache, &is_dirty, &is_protected, &is_pinned, NULL, NULL, NULL);
- if ( result < 0 ) {
+ if(result < 0) {
pass = FALSE;
HDsnprintf(msg, (size_t)128,
"H5C_get_entry_status() reports failure 1.");
failure_mssg = msg;
- } else if ( in_cache ) {
+ } else if(in_cache) {
pass = FALSE;
HDsnprintf(msg, (size_t)128, "Unexpected status 1.");
@@ -12798,7 +12798,7 @@ check_get_entry_status(void)
}
}
- if ( pass ) {
+ if(pass) {
protect_entry(file_ptr, 0, 0);
@@ -12806,19 +12806,19 @@ check_get_entry_status(void)
}
- if ( pass ) {
+ if(pass) {
result = H5C_get_entry_status(file_ptr, entry_ptr->addr, &entry_size,
&in_cache, &is_dirty, &is_protected, &is_pinned, NULL, NULL, NULL);
- if ( result < 0 ) {
+ if(result < 0) {
pass = FALSE;
HDsnprintf(msg, (size_t)128,
"H5C_get_entry_status() reports failure 2.");
failure_mssg = msg;
- } else if ( !in_cache || is_dirty || is_protected || is_pinned ) {
+ } else if(!in_cache || is_dirty || is_protected || is_pinned) {
pass = FALSE;
HDsnprintf(msg, (size_t)128, "Unexpected status 2.");
@@ -12826,25 +12826,25 @@ check_get_entry_status(void)
}
}
- if ( pass ) {
+ if(pass) {
protect_entry(file_ptr, 0, 0);
}
- if ( pass ) {
+ if(pass) {
result = H5C_get_entry_status(file_ptr, entry_ptr->addr, &entry_size,
&in_cache, &is_dirty, &is_protected, &is_pinned, NULL, NULL, NULL);
- if ( result < 0 ) {
+ if(result < 0) {
pass = FALSE;
HDsnprintf(msg, (size_t)128,
"H5C_get_entry_status() reports failure 3.");
failure_mssg = msg;
- } else if ( !in_cache || is_dirty || !is_protected || is_pinned ) {
+ } else if(!in_cache || is_dirty || !is_protected || is_pinned) {
pass = FALSE;
HDsnprintf(msg, (size_t)128, "Unexpected status 3.");
@@ -12852,25 +12852,25 @@ check_get_entry_status(void)
}
}
- if ( pass ) {
+ if(pass) {
unprotect_entry(file_ptr, 0, 0, H5C__PIN_ENTRY_FLAG);
}
- if ( pass ) {
+ if(pass) {
result = H5C_get_entry_status(file_ptr, entry_ptr->addr, &entry_size,
&in_cache, &is_dirty, &is_protected, &is_pinned, NULL, NULL, NULL);
- if ( result < 0 ) {
+ if(result < 0) {
pass = FALSE;
HDsnprintf(msg, (size_t)128,
"H5C_get_entry_status() reports failure 4.");
failure_mssg = msg;
- } else if ( !in_cache || is_dirty || is_protected || !is_pinned ) {
+ } else if(!in_cache || is_dirty || is_protected || !is_pinned) {
pass = FALSE;
HDsnprintf(msg, (size_t)128, "Unexpected status 4.");
@@ -12878,25 +12878,25 @@ check_get_entry_status(void)
}
}
- if ( pass ) {
+ if(pass) {
mark_entry_dirty(0, 0);
}
- if ( pass ) {
+ if(pass) {
result = H5C_get_entry_status(file_ptr, entry_ptr->addr, &entry_size,
&in_cache, &is_dirty, &is_protected, &is_pinned, NULL, NULL, NULL);
- if ( result < 0 ) {
+ if(result < 0) {
pass = FALSE;
HDsnprintf(msg, (size_t)128,
"H5C_get_entry_status() reports failure 5.");
failure_mssg = msg;
- } else if ( !in_cache || !is_dirty || is_protected || !is_pinned ) {
+ } else if(!in_cache || !is_dirty || is_protected || !is_pinned) {
pass = FALSE;
HDsnprintf(msg, (size_t)128, "Unexpected status 5.");
@@ -12904,25 +12904,25 @@ check_get_entry_status(void)
}
}
- if ( pass ) {
+ if(pass) {
unpin_entry(0, 0);
}
- if ( pass ) {
+ if(pass) {
result = H5C_get_entry_status(file_ptr, entry_ptr->addr, &entry_size,
&in_cache, &is_dirty, &is_protected, &is_pinned, NULL, NULL, NULL);
- if ( result < 0 ) {
+ if(result < 0) {
pass = FALSE;
HDsnprintf(msg, (size_t)128,
"H5C_get_entry_status() reports failure 6.");
failure_mssg = msg;
- } else if ( !in_cache || !is_dirty || is_protected || is_pinned ) {
+ } else if(!in_cache || !is_dirty || is_protected || is_pinned) {
pass = FALSE;
HDsnprintf(msg, (size_t)128, "Unexpected status 6.");
@@ -12930,14 +12930,14 @@ check_get_entry_status(void)
}
}
- if ( pass ) {
+ if(pass) {
takedown_cache(file_ptr, FALSE, FALSE);
}
- if ( pass ) { PASSED(); } else { H5_FAILED(); }
+ if(pass) { PASSED(); } else { H5_FAILED(); }
- if ( ! pass ) {
+ if(!pass) {
HDfprintf(stdout, "%s(): failure_mssg = \"%s\".\n",
FUNC, failure_mssg);
@@ -12982,7 +12982,7 @@ check_expunge_entry(void)
pass = TRUE;
- if ( pass ) {
+ if(pass) {
reset_entries();
@@ -12993,7 +12993,7 @@ check_expunge_entry(void)
entry_ptr = &(base_addr[0]);
}
- if ( pass ) {
+ if(pass) {
/* entry not in cache -- only in_cache should be touched by
* the status call. Thus, only check that boolean.
@@ -13003,22 +13003,22 @@ check_expunge_entry(void)
&in_cache, &is_dirty, &is_protected,
&is_pinned, NULL, NULL, NULL);
- if ( result < 0 ) {
+ if(result < 0) {
pass = FALSE;
HDsnprintf(msg, (size_t)128,
"H5C_get_entry_status() reports failure 1.");
failure_mssg = msg;
- } else if ( in_cache ) {
+ } else if(in_cache) {
pass = FALSE;
HDsnprintf(msg, (size_t)128, "Unexpected status 1.");
failure_mssg = msg;
- } else if ( ( entry_ptr->deserialized ) ||
- ( entry_ptr->serialized ) ||
- ( entry_ptr->destroyed ) ) {
+ } else if((entry_ptr->deserialized) ||
+ (entry_ptr->serialized) ||
+ (entry_ptr->destroyed)) {
pass = FALSE;
HDsnprintf(msg, (size_t)128, "Unexpected entry history 1.");
@@ -13031,7 +13031,7 @@ check_expunge_entry(void)
* it without marking it dirty.
*/
- if ( pass ) {
+ if(pass) {
protect_entry(file_ptr, 0, 0);
@@ -13039,27 +13039,27 @@ check_expunge_entry(void)
}
- if ( pass ) {
+ if(pass) {
result = H5C_get_entry_status(file_ptr, entry_ptr->addr, &entry_size,
&in_cache, &is_dirty, &is_protected, &is_pinned, NULL, NULL, NULL);
- if ( result < 0 ) {
+ if(result < 0) {
pass = FALSE;
HDsnprintf(msg, (size_t)128,
"H5C_get_entry_status() reports failure 2.");
failure_mssg = msg;
- } else if ( !in_cache || is_dirty || is_protected || is_pinned ) {
+ } else if(!in_cache || is_dirty || is_protected || is_pinned) {
pass = FALSE;
HDsnprintf(msg, (size_t)128, "Unexpected status 2.");
failure_mssg = msg;
- } else if ( ( ! entry_ptr->deserialized ) ||
- ( entry_ptr->serialized ) ||
- ( entry_ptr->destroyed ) ) {
+ } else if((!entry_ptr->deserialized) ||
+ (entry_ptr->serialized) ||
+ (entry_ptr->destroyed)) {
pass = FALSE;
HDsnprintf(msg, (size_t)128, "Unexpected entry history 2.");
@@ -13072,13 +13072,13 @@ check_expunge_entry(void)
* Also verify that the entry was loaded and destroyed, but
* not flushed.
*/
- if ( pass ) {
+ if(pass) {
expunge_entry(file_ptr, 0, 0);
}
- if ( pass ) {
+ if(pass) {
/* entry shouldn't be in cache -- only in_cache should be touched
* by the status call. Thus, only check that boolean.
@@ -13087,22 +13087,22 @@ check_expunge_entry(void)
result = H5C_get_entry_status(file_ptr, entry_ptr->addr, &entry_size,
&in_cache, &is_dirty, &is_protected, &is_pinned, NULL, NULL, NULL);
- if ( result < 0 ) {
+ if(result < 0) {
pass = FALSE;
HDsnprintf(msg, (size_t)128,
"H5C_get_entry_status() reports failure 3.");
failure_mssg = msg;
- } else if ( in_cache ) {
+ } else if(in_cache) {
pass = FALSE;
HDsnprintf(msg, (size_t)128, "Unexpected status 3.");
failure_mssg = msg;
- } else if ( ( ! entry_ptr->deserialized ) ||
- ( entry_ptr->serialized ) ||
- ( ! entry_ptr->destroyed ) ) {
+ } else if((!entry_ptr->deserialized) ||
+ (entry_ptr->serialized) ||
+ (!entry_ptr->destroyed)) {
pass = FALSE;
HDsnprintf(msg, (size_t)128, "Unexpected entry history 3.");
@@ -13118,7 +13118,7 @@ check_expunge_entry(void)
base_addr = entries[0];
entry_ptr = &(base_addr[1]);
- if ( pass ) {
+ if(pass) {
/* entry not in cache -- only in_cache should be touched by
* the status call. Thus, only check that boolean.
@@ -13128,22 +13128,22 @@ check_expunge_entry(void)
&in_cache, &is_dirty, &is_protected,
&is_pinned, NULL, NULL, NULL);
- if ( result < 0 ) {
+ if(result < 0) {
pass = FALSE;
HDsnprintf(msg, (size_t)128,
"H5C_get_entry_status() reports failure 4.");
failure_mssg = msg;
- } else if ( in_cache ) {
+ } else if(in_cache) {
pass = FALSE;
HDsnprintf(msg, (size_t)128, "Unexpected status 4.");
failure_mssg = msg;
- } else if ( ( entry_ptr->deserialized ) ||
- ( entry_ptr->serialized ) ||
- ( entry_ptr->destroyed ) ) {
+ } else if((entry_ptr->deserialized) ||
+ (entry_ptr->serialized) ||
+ (entry_ptr->destroyed)) {
pass = FALSE;
HDsnprintf(msg, (size_t)128, "Unexpected entry history 4.");
@@ -13156,7 +13156,7 @@ check_expunge_entry(void)
* it with the dirty flag set.
*/
- if ( pass ) {
+ if(pass) {
protect_entry(file_ptr, 0, 1);
@@ -13164,28 +13164,28 @@ check_expunge_entry(void)
}
- if ( pass ) {
+ if(pass) {
result = H5C_get_entry_status(file_ptr, entry_ptr->addr, &entry_size,
&in_cache, &is_dirty, &is_protected,
&is_pinned, NULL, NULL, NULL);
- if ( result < 0 ) {
+ if(result < 0) {
pass = FALSE;
HDsnprintf(msg, (size_t)128,
"H5C_get_entry_status() reports failure 5.");
failure_mssg = msg;
- } else if ( !in_cache || !is_dirty || is_protected || is_pinned ) {
+ } else if(!in_cache || !is_dirty || is_protected || is_pinned) {
pass = FALSE;
HDsnprintf(msg, (size_t)128, "Unexpected status 5.");
failure_mssg = msg;
- } else if ( ( ! entry_ptr->deserialized ) ||
- ( entry_ptr->serialized ) ||
- ( entry_ptr->destroyed ) ) {
+ } else if((!entry_ptr->deserialized) ||
+ (entry_ptr->serialized) ||
+ (entry_ptr->destroyed)) {
pass = FALSE;
HDsnprintf(msg, (size_t)128, "Unexpected entry history 5.");
@@ -13198,13 +13198,13 @@ check_expunge_entry(void)
* Also verify that the entry was loaded and destroyed, but not
* flushed.
*/
- if ( pass ) {
+ if(pass) {
expunge_entry(file_ptr, 0, 1);
}
- if ( pass ) {
+ if(pass) {
/* entry shouldn't be in cache -- only in_cache should be touched
* by the status call. Thus, only check that boolean.
@@ -13214,22 +13214,22 @@ check_expunge_entry(void)
&in_cache, &is_dirty, &is_protected,
&is_pinned, NULL, NULL, NULL);
- if ( result < 0 ) {
+ if(result < 0) {
pass = FALSE;
HDsnprintf(msg, (size_t)128,
"H5C_get_entry_status() reports failure 6.");
failure_mssg = msg;
- } else if ( in_cache ) {
+ } else if(in_cache) {
pass = FALSE;
HDsnprintf(msg, (size_t)128, "Unexpected status 6.");
failure_mssg = msg;
- } else if ( ( ! entry_ptr->deserialized ) ||
- ( entry_ptr->serialized ) ||
- ( ! entry_ptr->destroyed ) ) {
+ } else if((!entry_ptr->deserialized) ||
+ (entry_ptr->serialized) ||
+ (!entry_ptr->destroyed)) {
pass = FALSE;
HDsnprintf(msg, (size_t)128, "Unexpected entry history 6.");
@@ -13238,14 +13238,14 @@ check_expunge_entry(void)
}
}
- if ( pass ) {
+ if(pass) {
takedown_cache(file_ptr, FALSE, FALSE);
}
- if ( pass ) { PASSED(); } else { H5_FAILED(); }
+ if(pass) { PASSED(); } else { H5_FAILED(); }
- if ( ! pass ) {
+ if(!pass) {
HDfprintf(stdout, "%s(): failure_mssg = \"%s\".\n",
FUNC, failure_mssg);
@@ -13307,7 +13307,7 @@ check_multiple_read_protect(void)
* Also, verify internal state of read protects at every step.
*/
- if ( pass ) {
+ if(pass) {
reset_entries();
@@ -13319,9 +13319,9 @@ check_multiple_read_protect(void)
entry_ptr = &((entries[0])[0]);
- if ( ( entry_ptr->header.is_protected ) ||
- ( entry_ptr->header.is_read_only ) ||
- ( entry_ptr->header.ro_ref_count != 0 ) ) {
+ if((entry_ptr->header.is_protected) ||
+ (entry_ptr->header.is_read_only) ||
+ (entry_ptr->header.ro_ref_count != 0)) {
pass = FALSE;
failure_mssg = "Unexpected ro protected status 1.\n";
@@ -13329,22 +13329,22 @@ check_multiple_read_protect(void)
}
#if H5C_COLLECT_CACHE_STATS
- if ( ( cache_ptr->write_protects[0] != 0 ) ||
- ( cache_ptr->read_protects[0] != 0 ) ||
- ( cache_ptr->max_read_protects[0] != 0 ) ) {
+ if((cache_ptr->write_protects[0] != 0) ||
+ (cache_ptr->read_protects[0] != 0) ||
+ (cache_ptr->max_read_protects[0] != 0)) {
pass = FALSE;
failure_mssg = "Unexpected protect stats 1.\n";
}
#endif /* H5C_COLLECT_CACHE_STATS */
- if ( pass )
+ if(pass)
{
protect_entry_ro(file_ptr, 0, 0);
- if ( ( ! ( entry_ptr->header.is_protected ) ) ||
- ( ! ( entry_ptr->header.is_read_only ) ) ||
- ( entry_ptr->header.ro_ref_count != 1 ) ) {
+ if((!(entry_ptr->header.is_protected)) ||
+ (!(entry_ptr->header.is_read_only)) ||
+ (entry_ptr->header.ro_ref_count != 1)) {
pass = FALSE;
failure_mssg = "Unexpected ro protected status 2.\n";
@@ -13352,22 +13352,22 @@ check_multiple_read_protect(void)
}
#if H5C_COLLECT_CACHE_STATS
- if ( ( cache_ptr->write_protects[0] != 0 ) ||
- ( cache_ptr->read_protects[0] != 1 ) ||
- ( cache_ptr->max_read_protects[0] != 1 ) ) {
+ if((cache_ptr->write_protects[0] != 0) ||
+ (cache_ptr->read_protects[0] != 1) ||
+ (cache_ptr->max_read_protects[0] != 1)) {
pass = FALSE;
failure_mssg = "Unexpected protect stats 2.\n";
}
#endif /* H5C_COLLECT_CACHE_STATS */
- if ( pass )
+ if(pass)
{
protect_entry_ro(file_ptr, 0, 0);
- if ( ( ! ( entry_ptr->header.is_protected ) ) ||
- ( ! ( entry_ptr->header.is_read_only ) ) ||
- ( entry_ptr->header.ro_ref_count != 2 ) ) {
+ if((!(entry_ptr->header.is_protected)) ||
+ (!(entry_ptr->header.is_read_only)) ||
+ (entry_ptr->header.ro_ref_count != 2)) {
pass = FALSE;
failure_mssg = "Unexpected ro protected status 3.\n";
@@ -13375,22 +13375,22 @@ check_multiple_read_protect(void)
}
#if H5C_COLLECT_CACHE_STATS
- if ( ( cache_ptr->write_protects[0] != 0 ) ||
- ( cache_ptr->read_protects[0] != 2 ) ||
- ( cache_ptr->max_read_protects[0] != 2 ) ) {
+ if((cache_ptr->write_protects[0] != 0) ||
+ (cache_ptr->read_protects[0] != 2) ||
+ (cache_ptr->max_read_protects[0] != 2)) {
pass = FALSE;
failure_mssg = "Unexpected protect stats 3.\n";
}
#endif /* H5C_COLLECT_CACHE_STATS */
- if ( pass )
+ if(pass)
{
unprotect_entry(file_ptr, 0, 0, H5C__NO_FLAGS_SET);
- if ( ( ! ( entry_ptr->header.is_protected ) ) ||
- ( ! ( entry_ptr->header.is_read_only ) ) ||
- ( entry_ptr->header.ro_ref_count != 1 ) ) {
+ if((!(entry_ptr->header.is_protected)) ||
+ (!(entry_ptr->header.is_read_only)) ||
+ (entry_ptr->header.ro_ref_count != 1)) {
pass = FALSE;
failure_mssg = "Unexpected ro protected status 4.\n";
@@ -13398,22 +13398,22 @@ check_multiple_read_protect(void)
}
#if H5C_COLLECT_CACHE_STATS
- if ( ( cache_ptr->write_protects[0] != 0 ) ||
- ( cache_ptr->read_protects[0] != 2 ) ||
- ( cache_ptr->max_read_protects[0] != 2 ) ) {
+ if((cache_ptr->write_protects[0] != 0) ||
+ (cache_ptr->read_protects[0] != 2) ||
+ (cache_ptr->max_read_protects[0] != 2)) {
pass = FALSE;
failure_mssg = "Unexpected protect stats 4.\n";
}
#endif /* H5C_COLLECT_CACHE_STATS */
- if ( pass )
+ if(pass)
{
protect_entry_ro(file_ptr, 0, 0);
- if ( ( ! ( entry_ptr->header.is_protected ) ) ||
- ( ! ( entry_ptr->header.is_read_only ) ) ||
- ( entry_ptr->header.ro_ref_count != 2 ) ) {
+ if((!(entry_ptr->header.is_protected)) ||
+ (!(entry_ptr->header.is_read_only)) ||
+ (entry_ptr->header.ro_ref_count != 2)) {
pass = FALSE;
failure_mssg = "Unexpected ro protected status 5.\n";
@@ -13421,22 +13421,22 @@ check_multiple_read_protect(void)
}
#if H5C_COLLECT_CACHE_STATS
- if ( ( cache_ptr->write_protects[0] != 0 ) ||
- ( cache_ptr->read_protects[0] != 3 ) ||
- ( cache_ptr->max_read_protects[0] != 2 ) ) {
+ if((cache_ptr->write_protects[0] != 0) ||
+ (cache_ptr->read_protects[0] != 3) ||
+ (cache_ptr->max_read_protects[0] != 2)) {
pass = FALSE;
failure_mssg = "Unexpected protect stats 5.\n";
}
#endif /* H5C_COLLECT_CACHE_STATS */
- if ( pass )
+ if(pass)
{
protect_entry_ro(file_ptr, 0, 0);
- if ( ( ! ( entry_ptr->header.is_protected ) ) ||
- ( ! ( entry_ptr->header.is_read_only ) ) ||
- ( entry_ptr->header.ro_ref_count != 3 ) ) {
+ if((!(entry_ptr->header.is_protected)) ||
+ (!(entry_ptr->header.is_read_only)) ||
+ (entry_ptr->header.ro_ref_count != 3)) {
pass = FALSE;
failure_mssg = "Unexpected ro protected status 6.\n";
@@ -13444,22 +13444,22 @@ check_multiple_read_protect(void)
}
#if H5C_COLLECT_CACHE_STATS
- if ( ( cache_ptr->write_protects[0] != 0 ) ||
- ( cache_ptr->read_protects[0] != 4 ) ||
- ( cache_ptr->max_read_protects[0] != 3 ) ) {
+ if((cache_ptr->write_protects[0] != 0) ||
+ (cache_ptr->read_protects[0] != 4) ||
+ (cache_ptr->max_read_protects[0] != 3)) {
pass = FALSE;
failure_mssg = "Unexpected protect stats 6.\n";
}
#endif /* H5C_COLLECT_CACHE_STATS */
- if ( pass )
+ if(pass)
{
unprotect_entry(file_ptr, 0, 0, H5C__NO_FLAGS_SET);
- if ( ( ! ( entry_ptr->header.is_protected ) ) ||
- ( ! ( entry_ptr->header.is_read_only ) ) ||
- ( entry_ptr->header.ro_ref_count != 2 ) ) {
+ if((!(entry_ptr->header.is_protected)) ||
+ (!(entry_ptr->header.is_read_only)) ||
+ (entry_ptr->header.ro_ref_count != 2)) {
pass = FALSE;
failure_mssg = "Unexpected ro protected status 7.\n";
@@ -13467,22 +13467,22 @@ check_multiple_read_protect(void)
}
#if H5C_COLLECT_CACHE_STATS
- if ( ( cache_ptr->write_protects[0] != 0 ) ||
- ( cache_ptr->read_protects[0] != 4 ) ||
- ( cache_ptr->max_read_protects[0] != 3 ) ) {
+ if((cache_ptr->write_protects[0] != 0) ||
+ (cache_ptr->read_protects[0] != 4) ||
+ (cache_ptr->max_read_protects[0] != 3)) {
pass = FALSE;
failure_mssg = "Unexpected protect stats 7.\n";
}
#endif /* H5C_COLLECT_CACHE_STATS */
- if ( pass )
+ if(pass)
{
unprotect_entry(file_ptr, 0, 0, H5C__NO_FLAGS_SET);
- if ( ( ! ( entry_ptr->header.is_protected ) ) ||
- ( ! ( entry_ptr->header.is_read_only ) ) ||
- ( entry_ptr->header.ro_ref_count != 1 ) ) {
+ if((!(entry_ptr->header.is_protected)) ||
+ (!(entry_ptr->header.is_read_only)) ||
+ (entry_ptr->header.ro_ref_count != 1)) {
pass = FALSE;
failure_mssg = "Unexpected ro protected status 8.\n";
@@ -13490,22 +13490,22 @@ check_multiple_read_protect(void)
}
#if H5C_COLLECT_CACHE_STATS
- if ( ( cache_ptr->write_protects[0] != 0 ) ||
- ( cache_ptr->read_protects[0] != 4 ) ||
- ( cache_ptr->max_read_protects[0] != 3 ) ) {
+ if((cache_ptr->write_protects[0] != 0) ||
+ (cache_ptr->read_protects[0] != 4) ||
+ (cache_ptr->max_read_protects[0] != 3)) {
pass = FALSE;
failure_mssg = "Unexpected protect stats 8.\n";
}
#endif /* H5C_COLLECT_CACHE_STATS */
- if ( pass )
+ if(pass)
{
unprotect_entry(file_ptr, 0, 0, H5C__NO_FLAGS_SET);
- if ( ( entry_ptr->header.is_protected ) ||
- ( entry_ptr->header.is_read_only ) ||
- ( entry_ptr->header.ro_ref_count != 0 ) ) {
+ if((entry_ptr->header.is_protected) ||
+ (entry_ptr->header.is_read_only) ||
+ (entry_ptr->header.ro_ref_count != 0)) {
pass = FALSE;
failure_mssg = "Unexpected ro protected status 9.\n";
@@ -13513,9 +13513,9 @@ check_multiple_read_protect(void)
}
#if H5C_COLLECT_CACHE_STATS
- if ( ( cache_ptr->write_protects[0] != 0 ) ||
- ( cache_ptr->read_protects[0] != 4 ) ||
- ( cache_ptr->max_read_protects[0] != 3 ) ) {
+ if((cache_ptr->write_protects[0] != 0) ||
+ (cache_ptr->read_protects[0] != 4) ||
+ (cache_ptr->max_read_protects[0] != 3)) {
pass = FALSE;
failure_mssg = "Unexpected protect stats 9.\n";
@@ -13527,13 +13527,13 @@ check_multiple_read_protect(void)
* that the stats are getting collected properly here as well.
*/
- if ( pass )
+ if(pass)
{
protect_entry(file_ptr, 0, 0);
- if ( ( ! ( entry_ptr->header.is_protected ) ) ||
- ( entry_ptr->header.is_read_only ) ||
- ( entry_ptr->header.ro_ref_count != 0 ) ) {
+ if((!(entry_ptr->header.is_protected)) ||
+ (entry_ptr->header.is_read_only) ||
+ (entry_ptr->header.ro_ref_count != 0)) {
pass = FALSE;
failure_mssg = "Unexpected ro protected status 10.\n";
@@ -13541,22 +13541,22 @@ check_multiple_read_protect(void)
}
#if H5C_COLLECT_CACHE_STATS
- if ( ( cache_ptr->write_protects[0] != 1 ) ||
- ( cache_ptr->read_protects[0] != 4 ) ||
- ( cache_ptr->max_read_protects[0] != 3 ) ) {
+ if((cache_ptr->write_protects[0] != 1) ||
+ (cache_ptr->read_protects[0] != 4) ||
+ (cache_ptr->max_read_protects[0] != 3)) {
pass = FALSE;
failure_mssg = "Unexpected protect stats 10.\n";
}
#endif /* H5C_COLLECT_CACHE_STATS */
- if ( pass )
+ if(pass)
{
unprotect_entry(file_ptr, 0, 0, H5C__NO_FLAGS_SET);
- if ( ( entry_ptr->header.is_protected ) ||
- ( entry_ptr->header.is_read_only ) ||
- ( entry_ptr->header.ro_ref_count != 0 ) ) {
+ if((entry_ptr->header.is_protected) ||
+ (entry_ptr->header.is_read_only) ||
+ (entry_ptr->header.ro_ref_count != 0)) {
pass = FALSE;
failure_mssg = "Unexpected ro protected status 11.\n";
@@ -13564,9 +13564,9 @@ check_multiple_read_protect(void)
}
#if H5C_COLLECT_CACHE_STATS
- if ( ( cache_ptr->write_protects[0] != 1 ) ||
- ( cache_ptr->read_protects[0] != 4 ) ||
- ( cache_ptr->max_read_protects[0] != 3 ) ) {
+ if((cache_ptr->write_protects[0] != 1) ||
+ (cache_ptr->read_protects[0] != 4) ||
+ (cache_ptr->max_read_protects[0] != 3)) {
pass = FALSE;
failure_mssg = "Unexpected protect stats 11.\n";
@@ -13582,7 +13582,7 @@ check_multiple_read_protect(void)
* at the end to ensure that all is at it should be.
*/
- if ( pass ) {
+ if(pass) {
protect_entry(file_ptr, 0, 2); /* (0,2) write */
protect_entry_ro(file_ptr, 0, 4); /* (0,4) read only (1) */
@@ -13609,16 +13609,16 @@ check_multiple_read_protect(void)
unprotect_entry(file_ptr, 0, 1, /* (0,1) unprotect */
H5C__NO_FLAGS_SET);
- if ( pass ) {
+ if(pass) {
entry_ptr = &((entries[0])[4]);
- if ( H5C_pin_protected_entry((void *)entry_ptr) < 0 ) {
+ if(H5C_pin_protected_entry((void *)entry_ptr) < 0) {
pass = FALSE;
failure_mssg = "H5C_pin_protected_entry() failed.\n";
- } else if ( ! (entry_ptr->header.is_pinned) ) {
+ } else if(!(entry_ptr->header.is_pinned)) {
pass = FALSE;
failure_mssg = "entry (0,4) not pinned.\n";
@@ -13636,7 +13636,7 @@ check_multiple_read_protect(void)
unprotect_entry(file_ptr, 0, 4, /* (0,4) read only (1) */
H5C__UNPIN_ENTRY_FLAG);
- if ( ( pass ) && ( entry_ptr->header.is_pinned ) ) {
+ if(pass && (entry_ptr->header.is_pinned)) {
pass = FALSE;
failure_mssg = "enty (0,4) still pinned.\n";
@@ -13652,9 +13652,9 @@ check_multiple_read_protect(void)
}
#if H5C_COLLECT_CACHE_STATS
- if ( ( cache_ptr->write_protects[0] != 5 ) ||
- ( cache_ptr->read_protects[0] != 9 ) ||
- ( cache_ptr->max_read_protects[0] != 3 ) ) {
+ if((cache_ptr->write_protects[0] != 5) ||
+ (cache_ptr->read_protects[0] != 9) ||
+ (cache_ptr->max_read_protects[0] != 3)) {
pass = FALSE;
failure_mssg = "Unexpected protect stats 11.\n";
@@ -13662,14 +13662,14 @@ check_multiple_read_protect(void)
#endif /* H5C_COLLECT_CACHE_STATS */
- if ( pass ) {
+ if(pass) {
takedown_cache(file_ptr, FALSE, FALSE);
}
- if ( pass ) { PASSED(); } else { H5_FAILED(); }
+ if(pass) { PASSED(); } else { H5_FAILED(); }
- if ( ! pass ) {
+ if(!pass) {
HDfprintf(stdout, "%s: failure_mssg = \"%s\".\n",
FUNC, failure_mssg);
@@ -13759,7 +13759,7 @@ check_move_entry(void)
* list.
*/
- if ( pass ) {
+ if(pass) {
reset_entries();
@@ -13768,20 +13768,20 @@ check_move_entry(void)
}
i = 0;
- while ( ( pass ) && ( i < 4 ) )
+ while(pass && (i < 4))
{
check_move_entry__run_test(file_ptr, i, &(test_specs[i]));
i++;
}
- if ( pass ) {
+ if(pass) {
takedown_cache(file_ptr, FALSE, FALSE);
}
- if ( pass ) { PASSED(); } else { H5_FAILED(); }
+ if(pass) { PASSED(); } else { H5_FAILED(); }
- if ( ! pass ) {
+ if(!pass) {
HDfprintf(stdout, "%s(): failure_mssg = \"%s\".\n",
FUNC, failure_mssg);
@@ -13823,7 +13823,7 @@ check_move_entry__run_test(H5F_t * file_ptr,
test_entry_t * entry_ptr = NULL;
H5C_cache_entry_t * test_ptr = NULL;
- if ( cache_ptr == NULL ) {
+ if(cache_ptr == NULL) {
pass = FALSE;
HDsnprintf(msg, (size_t)128,
@@ -13831,7 +13831,7 @@ check_move_entry__run_test(H5F_t * file_ptr,
test_num);
failure_mssg = msg;
- } else if ( spec_ptr == NULL ) {
+ } else if(spec_ptr == NULL) {
pass = FALSE;
HDsnprintf(msg, (size_t)128,
@@ -13841,16 +13841,16 @@ check_move_entry__run_test(H5F_t * file_ptr,
}
- if ( pass ) {
+ if(pass) {
base_addr = entries[spec_ptr->entry_type];
entry_ptr = &(base_addr[spec_ptr->entry_index]);
- if ( ( entry_ptr->self != entry_ptr ) ||
- ( ( entry_ptr->cache_ptr != cache_ptr ) &&
- ( entry_ptr->cache_ptr != NULL ) ) ||
- ( ! ( entry_ptr->at_main_addr ) ) ||
- ( entry_ptr->addr != entry_ptr->main_addr ) ) {
+ if((entry_ptr->self != entry_ptr) ||
+ ((entry_ptr->cache_ptr != cache_ptr) &&
+ (entry_ptr->cache_ptr != NULL)) ||
+ (!(entry_ptr->at_main_addr)) ||
+ (entry_ptr->addr != entry_ptr->main_addr)) {
pass = FALSE;
HDsnprintf(msg, (size_t)128,
@@ -13858,13 +13858,13 @@ check_move_entry__run_test(H5F_t * file_ptr,
test_num);
failure_mssg = msg;
- } else if ( spec_ptr->is_pinned ) {
+ } else if(spec_ptr->is_pinned) {
flags |= H5C__PIN_ENTRY_FLAG;
}
}
- if ( pass ) {
+ if(pass) {
protect_entry(file_ptr, spec_ptr->entry_type, spec_ptr->entry_index);
@@ -13877,16 +13877,16 @@ check_move_entry__run_test(H5F_t * file_ptr,
}
- if ( pass ) {
+ if(pass) {
/* verify that the move took place, and that the cache's internal
* structures are as expected. Note that some sanity checking is
* done by move_entry(), so we don't have to repeat it here.
*/
- if ( spec_ptr->is_pinned ) {
+ if(spec_ptr->is_pinned) {
- if ( ! ( entry_ptr->header.is_pinned ) ) {
+ if(!(entry_ptr->header.is_pinned)) {
pass = FALSE;
HDsnprintf(msg, (size_t)128,
@@ -13895,17 +13895,17 @@ check_move_entry__run_test(H5F_t * file_ptr,
failure_mssg = msg;
}
- if ( pass ) {
+ if(pass) {
test_ptr = cache_ptr->pel_head_ptr;
- while ( ( test_ptr != NULL ) &&
- ( test_ptr != (H5C_cache_entry_t *)entry_ptr ) )
+ while((test_ptr != NULL) &&
+ (test_ptr != (H5C_cache_entry_t *)entry_ptr))
{
test_ptr = test_ptr->next;
}
- if ( test_ptr == NULL ) {
+ if(test_ptr == NULL) {
pass = FALSE;
HDsnprintf(msg, (size_t)128,
@@ -13919,7 +13919,7 @@ check_move_entry__run_test(H5F_t * file_ptr,
} else {
- if ( entry_ptr->header.is_pinned ) {
+ if(entry_ptr->header.is_pinned) {
pass = FALSE;
HDsnprintf(msg, (size_t)128,
@@ -13928,8 +13928,8 @@ check_move_entry__run_test(H5F_t * file_ptr,
failure_mssg = msg;
}
- if ( ( entry_ptr->header.prev != NULL ) ||
- ( cache_ptr->LRU_head_ptr != (H5C_cache_entry_t *)entry_ptr ) )
+ if((entry_ptr->header.prev != NULL) ||
+ (cache_ptr->LRU_head_ptr != (H5C_cache_entry_t *)entry_ptr))
{
pass = FALSE;
HDsnprintf(msg, (size_t)128,
@@ -13981,14 +13981,14 @@ check_pin_protected_entry(void)
* to unpin it, and then destroy the cache.
*/
- if ( pass ) {
+ if(pass) {
reset_entries();
file_ptr = setup_cache((size_t)(2 * 1024 * 1024),
(size_t)(1 * 1024 * 1024));
- if ( file_ptr == NULL ) {
+ if(file_ptr == NULL) {
pass = FALSE;
failure_mssg = "file_ptr NULL from setup_cache.";
@@ -13996,27 +13996,27 @@ check_pin_protected_entry(void)
}
}
- if ( pass ) {
+ if(pass) {
protect_entry(file_ptr, 0, 0);
}
- if ( pass ) {
+ if(pass) {
base_addr = entries[0];
entry_ptr = &(base_addr[0]);
result = H5C_pin_protected_entry((void *)entry_ptr);
- if ( result < 0 ) {
+ if(result < 0) {
pass = FALSE;
HDsnprintf(msg, (size_t)128,
"H5C_pin_protected_entry() reports failure.");
failure_mssg = msg;
- } else if ( ! ( entry_ptr->header.is_pinned ) ) {
+ } else if(!(entry_ptr->header.is_pinned)) {
pass = FALSE;
HDsnprintf(msg, (size_t)128, "entry not pinned when it should be.");
@@ -14030,14 +14030,14 @@ check_pin_protected_entry(void)
unprotect_entry(file_ptr, 0, 0, H5C__UNPIN_ENTRY_FLAG);
- if ( pass ) {
+ if(pass) {
takedown_cache(file_ptr, FALSE, FALSE);
}
- if ( pass ) { PASSED(); } else { H5_FAILED(); }
+ if(pass) { PASSED(); } else { H5_FAILED(); }
- if ( ! pass ) {
+ if(!pass) {
HDfprintf(stdout, "%s(): failure_mssg = \"%s\".\n",
FUNC, failure_mssg);
@@ -14113,13 +14113,13 @@ check_resize_entry(void)
/* tests with only one entry in the cache: */
- if ( pass ) {
+ if(pass) {
reset_entries();
file_ptr = setup_cache((size_t)(2 * 1024 * 1024),
(size_t)(1 * 1024 * 1024));
- if ( file_ptr == NULL ) {
+ if(file_ptr == NULL) {
pass = FALSE;
failure_mssg = "file_ptr NULL from setup_cache.";
@@ -14135,12 +14135,12 @@ check_resize_entry(void)
}
}
- if ( pass ) {
+ if(pass) {
- if ( ( cache_ptr->index_len != 0 ) ||
- ( cache_ptr->index_size != 0 ) ||
- ( cache_ptr->slist_len != 0 ) ||
- ( cache_ptr->slist_size != 0 ) ) {
+ if((cache_ptr->index_len != 0) ||
+ (cache_ptr->index_size != 0) ||
+ (cache_ptr->slist_len != 0) ||
+ (cache_ptr->slist_size != 0)) {
pass = FALSE;
HDsnprintf(msg, (size_t)128, "Unexpected cache status 1.");
@@ -14149,18 +14149,18 @@ check_resize_entry(void)
}
}
- if ( pass ) {
+ if(pass) {
protect_entry(file_ptr, LARGE_ENTRY_TYPE, 0);
}
- if ( pass ) {
+ if(pass) {
- if ( ( cache_ptr->index_len != 1 ) ||
- ( cache_ptr->index_size != LARGE_ENTRY_SIZE ) ||
- ( cache_ptr->slist_len != 0 ) ||
- ( cache_ptr->slist_size != 0 ) ) {
+ if((cache_ptr->index_len != 1) ||
+ (cache_ptr->index_size != LARGE_ENTRY_SIZE) ||
+ (cache_ptr->slist_len != 0) ||
+ (cache_ptr->slist_size != 0)) {
pass = FALSE;
@@ -14170,29 +14170,29 @@ check_resize_entry(void)
}
}
- if ( pass ) {
+ if(pass) {
result = H5C_get_entry_status(file_ptr, entry_ptr->addr,
&reported_entry_size, &in_cache,
&is_dirty, &is_protected, &is_pinned,
NULL, NULL, NULL);
- if ( result < 0 ) {
+ if(result < 0) {
pass = FALSE;
HDsnprintf(msg, (size_t)128,
"H5C_get_entry_status() reports failure 1.");
failure_mssg = msg;
- } else if ( !in_cache || is_dirty || !is_protected || is_pinned ) {
+ } else if(!in_cache || is_dirty || !is_protected || is_pinned) {
pass = FALSE;
HDsnprintf(msg, (size_t)128, "Unexpected status 1.");
failure_mssg = msg;
- } else if ( ( ! entry_ptr->deserialized ) ||
- ( entry_ptr->serialized ) ||
- ( entry_ptr->destroyed ) ) {
+ } else if((!entry_ptr->deserialized) ||
+ (entry_ptr->serialized) ||
+ (entry_ptr->destroyed)) {
pass = FALSE;
HDsnprintf(msg, (size_t)128, "Unexpected entry history 1.");
@@ -14201,11 +14201,11 @@ check_resize_entry(void)
}
}
- if ( pass ) {
+ if(pass) {
result = H5C_resize_entry((void *)entry_ptr, (LARGE_ENTRY_SIZE / 2));
- if ( result < 0 ) {
+ if(result < 0) {
pass = FALSE;
HDsnprintf(msg, (size_t)128, "error(s) in H5C_resize_entry().");
@@ -14216,7 +14216,7 @@ check_resize_entry(void)
result = H5C_unprotect(file_ptr, H5AC_ind_read_dxpl_id,
entry_ptr->addr, (void *)entry_ptr, H5C__DIRTIED_FLAG);
- if ( result < 0 ) {
+ if(result < 0) {
pass = FALSE;
HDsnprintf(msg, (size_t)128, "H5C_unprotect() reports failure 1.");
@@ -14234,12 +14234,12 @@ check_resize_entry(void)
}
}
- if ( pass ) {
+ if(pass) {
- if ( ( cache_ptr->index_len != 1 ) ||
- ( cache_ptr->index_size != (LARGE_ENTRY_SIZE / 2) ) ||
- ( cache_ptr->slist_len != 1 ) ||
- ( cache_ptr->slist_size != (LARGE_ENTRY_SIZE / 2) ) ) {
+ if((cache_ptr->index_len != 1) ||
+ (cache_ptr->index_size != (LARGE_ENTRY_SIZE / 2)) ||
+ (cache_ptr->slist_len != 1) ||
+ (cache_ptr->slist_size != (LARGE_ENTRY_SIZE / 2))) {
pass = FALSE;
HDsnprintf(msg, (size_t)128, "Unexpected cache status 3.");
@@ -14248,30 +14248,30 @@ check_resize_entry(void)
}
}
- if ( pass ) {
+ if(pass) {
result = H5C_get_entry_status(file_ptr, entry_ptr->addr,
&reported_entry_size, &in_cache,
&is_dirty, &is_protected, &is_pinned,
NULL, NULL, NULL);
- if ( result < 0 ) {
+ if(result < 0) {
pass = FALSE;
HDsnprintf(msg, (size_t)128,
"H5C_get_entry_status() reports failure 2.");
failure_mssg = msg;
- } else if ( !in_cache || !is_dirty || is_protected || is_pinned ||
- ( reported_entry_size != (LARGE_ENTRY_SIZE / 2) ) ) {
+ } else if(!in_cache || !is_dirty || is_protected || is_pinned ||
+ (reported_entry_size != (LARGE_ENTRY_SIZE / 2))) {
pass = FALSE;
HDsnprintf(msg, (size_t)128, "Unexpected status 2.");
failure_mssg = msg;
- } else if ( ( ! entry_ptr->deserialized ) ||
- ( entry_ptr->serialized ) ||
- ( entry_ptr->destroyed ) ) {
+ } else if((!entry_ptr->deserialized) ||
+ (entry_ptr->serialized) ||
+ (entry_ptr->destroyed)) {
pass = FALSE;
HDsnprintf(msg, (size_t)128, "Unexpected entry history 2.");
@@ -14280,17 +14280,17 @@ check_resize_entry(void)
}
}
- if ( pass ) {
+ if(pass) {
protect_entry(file_ptr, LARGE_ENTRY_TYPE, 0);
}
- if ( pass ) {
+ if(pass) {
result = H5C_resize_entry((void *)entry_ptr, LARGE_ENTRY_SIZE);
- if ( result < 0 ) {
+ if(result < 0) {
pass = FALSE;
HDsnprintf(msg, (size_t)128, "error(s) in H5C_resize_entry().");
@@ -14301,7 +14301,7 @@ check_resize_entry(void)
result = H5C_unprotect(file_ptr, H5AC_ind_read_dxpl_id,
entry_ptr->addr, (void *)entry_ptr, H5C__DIRTIED_FLAG);
- if ( result < 0 ) {
+ if(result < 0) {
pass = FALSE;
HDsnprintf(msg, (size_t)128, "H5C_unprotect() reports failure 2.");
@@ -14319,12 +14319,12 @@ check_resize_entry(void)
}
}
- if ( pass ) {
+ if(pass) {
- if ( ( cache_ptr->index_len != 1 ) ||
- ( cache_ptr->index_size != LARGE_ENTRY_SIZE ) ||
- ( cache_ptr->slist_len != 1 ) ||
- ( cache_ptr->slist_size != LARGE_ENTRY_SIZE ) ) {
+ if((cache_ptr->index_len != 1) ||
+ (cache_ptr->index_size != LARGE_ENTRY_SIZE) ||
+ (cache_ptr->slist_len != 1) ||
+ (cache_ptr->slist_size != LARGE_ENTRY_SIZE)) {
pass = FALSE;
HDsnprintf(msg, (size_t)128, "Unexpected cache status 4.");
@@ -14333,30 +14333,30 @@ check_resize_entry(void)
}
}
- if ( pass ) {
+ if(pass) {
result = H5C_get_entry_status(file_ptr, entry_ptr->addr,
&reported_entry_size, &in_cache,
&is_dirty, &is_protected, &is_pinned,
NULL, NULL, NULL);
- if ( result < 0 ) {
+ if(result < 0) {
pass = FALSE;
HDsnprintf(msg, (size_t)128,
"H5C_get_entry_status() reports failure 3.");
failure_mssg = msg;
- } else if ( !in_cache || !is_dirty || is_protected || is_pinned ||
- ( reported_entry_size != LARGE_ENTRY_SIZE ) ) {
+ } else if(!in_cache || !is_dirty || is_protected || is_pinned ||
+ (reported_entry_size != LARGE_ENTRY_SIZE)) {
pass = FALSE;
HDsnprintf(msg, (size_t)128, "Unexpected status 3.");
failure_mssg = msg;
- } else if ( ( ! entry_ptr->deserialized ) ||
- ( entry_ptr->serialized ) ||
- ( entry_ptr->destroyed ) ) {
+ } else if((!entry_ptr->deserialized) ||
+ (entry_ptr->serialized) ||
+ (entry_ptr->destroyed)) {
pass = FALSE;
HDsnprintf(msg, (size_t)128, "Unexpected entry history 3.");
@@ -14365,7 +14365,7 @@ check_resize_entry(void)
}
}
- if ( pass ) {
+ if(pass) {
protect_entry(file_ptr, LARGE_ENTRY_TYPE, 0);
@@ -14373,11 +14373,11 @@ check_resize_entry(void)
}
- if ( pass ) {
+ if(pass) {
result = H5C_resize_entry((void *)entry_ptr, (LARGE_ENTRY_SIZE / 4));
- if ( result < 0 ) {
+ if(result < 0) {
pass = FALSE;
HDsnprintf(msg, (size_t)128,
@@ -14387,12 +14387,12 @@ check_resize_entry(void)
}
}
- if ( pass ) {
+ if(pass) {
- if ( ( cache_ptr->index_len != 1 ) ||
- ( cache_ptr->index_size != (LARGE_ENTRY_SIZE / 4) ) ||
- ( cache_ptr->slist_len != 1 ) ||
- ( cache_ptr->slist_size != (LARGE_ENTRY_SIZE / 4) ) ) {
+ if((cache_ptr->index_len != 1) ||
+ (cache_ptr->index_size != (LARGE_ENTRY_SIZE / 4)) ||
+ (cache_ptr->slist_len != 1) ||
+ (cache_ptr->slist_size != (LARGE_ENTRY_SIZE / 4))) {
pass = FALSE;
HDsnprintf(msg, (size_t)128, "Unexpected cache status 5.");
@@ -14401,30 +14401,30 @@ check_resize_entry(void)
}
}
- if ( pass ) {
+ if(pass) {
result = H5C_get_entry_status(file_ptr, entry_ptr->addr,
&reported_entry_size, &in_cache,
&is_dirty, &is_protected, &is_pinned,
NULL, NULL, NULL);
- if ( result < 0 ) {
+ if(result < 0) {
pass = FALSE;
HDsnprintf(msg, (size_t)128,
"H5C_get_entry_status() reports failure 4.");
failure_mssg = msg;
- } else if ( !in_cache || !is_dirty || is_protected || ! is_pinned ||
- ( reported_entry_size != (LARGE_ENTRY_SIZE / 4) ) ) {
+ } else if(!in_cache || !is_dirty || is_protected || !is_pinned ||
+ (reported_entry_size != (LARGE_ENTRY_SIZE / 4))) {
pass = FALSE;
HDsnprintf(msg, (size_t)128, "Unexpected status 4.");
failure_mssg = msg;
- } else if ( ( ! entry_ptr->deserialized ) ||
- ( entry_ptr->serialized ) ||
- ( entry_ptr->destroyed ) ) {
+ } else if((!entry_ptr->deserialized) ||
+ (entry_ptr->serialized) ||
+ (entry_ptr->destroyed)) {
pass = FALSE;
HDsnprintf(msg, (size_t)128, "Unexpected entry history 4.");
@@ -14433,11 +14433,11 @@ check_resize_entry(void)
}
}
- if ( pass ) {
+ if(pass) {
result = H5C_resize_entry((void *)entry_ptr, LARGE_ENTRY_SIZE);
- if ( result < 0 ) {
+ if(result < 0) {
pass = FALSE;
HDsnprintf(msg, (size_t)128,
@@ -14447,12 +14447,12 @@ check_resize_entry(void)
}
}
- if ( pass ) {
+ if(pass) {
- if ( ( cache_ptr->index_len != 1 ) ||
- ( cache_ptr->index_size != LARGE_ENTRY_SIZE ) ||
- ( cache_ptr->slist_len != 1 ) ||
- ( cache_ptr->slist_size != LARGE_ENTRY_SIZE ) ) {
+ if((cache_ptr->index_len != 1) ||
+ (cache_ptr->index_size != LARGE_ENTRY_SIZE) ||
+ (cache_ptr->slist_len != 1) ||
+ (cache_ptr->slist_size != LARGE_ENTRY_SIZE)) {
pass = FALSE;
HDsnprintf(msg, (size_t)128, "Unexpected cache status 6.");
@@ -14461,30 +14461,30 @@ check_resize_entry(void)
}
}
- if ( pass ) {
+ if(pass) {
result = H5C_get_entry_status(file_ptr, entry_ptr->addr,
&reported_entry_size, &in_cache,
&is_dirty, &is_protected, &is_pinned,
NULL, NULL, NULL);
- if ( result < 0 ) {
+ if(result < 0) {
pass = FALSE;
HDsnprintf(msg, (size_t)128,
"H5C_get_entry_status() reports failure 5.");
failure_mssg = msg;
- } else if ( !in_cache || !is_dirty || is_protected || ! is_pinned ||
- ( reported_entry_size != LARGE_ENTRY_SIZE ) ) {
+ } else if(!in_cache || !is_dirty || is_protected || !is_pinned ||
+ (reported_entry_size != LARGE_ENTRY_SIZE)) {
pass = FALSE;
HDsnprintf(msg, (size_t)128, "Unexpected status 5.");
failure_mssg = msg;
- } else if ( ( ! entry_ptr->deserialized ) ||
- ( entry_ptr->serialized ) ||
- ( entry_ptr->destroyed ) ) {
+ } else if((!entry_ptr->deserialized) ||
+ (entry_ptr->serialized) ||
+ (entry_ptr->destroyed)) {
pass = FALSE;
HDsnprintf(msg, (size_t)128, "Unexpected entry history 5.");
@@ -14493,7 +14493,7 @@ check_resize_entry(void)
}
}
- if ( pass ) {
+ if(pass) {
protect_entry(file_ptr, LARGE_ENTRY_TYPE, 0);
@@ -14502,28 +14502,28 @@ check_resize_entry(void)
}
- if ( pass ) {
+ if(pass) {
result = H5C_get_entry_status(file_ptr, entry_ptr->addr, &entry_size,
&in_cache, &is_dirty, &is_protected,
&is_pinned, NULL, NULL, NULL);
- if ( result < 0 ) {
+ if(result < 0) {
pass = FALSE;
HDsnprintf(msg, (size_t)128,
"H5C_get_entry_status() reports failure 6.");
failure_mssg = msg;
- } else if ( in_cache ) {
+ } else if(in_cache) {
pass = FALSE;
HDsnprintf(msg, (size_t)128, "Unexpected status 6.");
failure_mssg = msg;
- } else if ( ( ! entry_ptr->deserialized ) ||
- ( entry_ptr->serialized ) ||
- ( ! entry_ptr->destroyed ) ) {
+ } else if((!entry_ptr->deserialized) ||
+ (entry_ptr->serialized) ||
+ (!entry_ptr->destroyed)) {
pass = FALSE;
HDsnprintf(msg, (size_t)128, "Unexpected entry history 6.");
@@ -14532,12 +14532,12 @@ check_resize_entry(void)
}
}
- if ( pass ) {
+ if(pass) {
- if ( ( cache_ptr->index_len != 0 ) ||
- ( cache_ptr->index_size != 0 ) ||
- ( cache_ptr->slist_len != 0 ) ||
- ( cache_ptr->slist_size != 0 ) ) {
+ if((cache_ptr->index_len != 0) ||
+ (cache_ptr->index_size != 0) ||
+ (cache_ptr->slist_len != 0) ||
+ (cache_ptr->slist_size != 0)) {
pass = FALSE;
HDsnprintf(msg, (size_t)128, "Unexpected cache status 7.");
@@ -14549,12 +14549,12 @@ check_resize_entry(void)
/* now repeat the above tests with several entries in the cache: */
- if ( pass ) {
+ if(pass) {
- if ( ( cache_ptr->index_len != 0 ) ||
- ( cache_ptr->index_size != 0 ) ||
- ( cache_ptr->slist_len != 0 ) ||
- ( cache_ptr->slist_size != 0 ) ) {
+ if((cache_ptr->index_len != 0) ||
+ (cache_ptr->index_size != 0) ||
+ (cache_ptr->slist_len != 0) ||
+ (cache_ptr->slist_size != 0)) {
pass = FALSE;
HDsnprintf(msg, (size_t)128, "Unexpected cache status 8.");
@@ -14566,7 +14566,7 @@ check_resize_entry(void)
entry_size = LARGE_ENTRY_SIZE;
}
- if ( pass ) {
+ if(pass) {
protect_entry(file_ptr, LARGE_ENTRY_TYPE, 0);
unprotect_entry(file_ptr, LARGE_ENTRY_TYPE, 0, H5C__NO_FLAGS_SET);
@@ -14579,12 +14579,12 @@ check_resize_entry(void)
}
- if ( pass ) {
+ if(pass) {
- if ( ( cache_ptr->index_len != 3 ) ||
- ( cache_ptr->index_size != 3 * LARGE_ENTRY_SIZE ) ||
- ( cache_ptr->slist_len != 1 ) ||
- ( cache_ptr->slist_size != LARGE_ENTRY_SIZE ) ) {
+ if((cache_ptr->index_len != 3) ||
+ (cache_ptr->index_size != 3 * LARGE_ENTRY_SIZE) ||
+ (cache_ptr->slist_len != 1) ||
+ (cache_ptr->slist_size != LARGE_ENTRY_SIZE)) {
pass = FALSE;
@@ -14594,18 +14594,18 @@ check_resize_entry(void)
}
}
- if ( pass ) {
+ if(pass) {
protect_entry(file_ptr, LARGE_ENTRY_TYPE, 3);
}
- if ( pass ) {
+ if(pass) {
- if ( ( cache_ptr->index_len != 4 ) ||
- ( cache_ptr->index_size != 4 * LARGE_ENTRY_SIZE ) ||
- ( cache_ptr->slist_len != 1 ) ||
- ( cache_ptr->slist_size != LARGE_ENTRY_SIZE ) ) {
+ if((cache_ptr->index_len != 4) ||
+ (cache_ptr->index_size != 4 * LARGE_ENTRY_SIZE) ||
+ (cache_ptr->slist_len != 1) ||
+ (cache_ptr->slist_size != LARGE_ENTRY_SIZE)) {
pass = FALSE;
@@ -14615,29 +14615,29 @@ check_resize_entry(void)
}
}
- if ( pass ) {
+ if(pass) {
result = H5C_get_entry_status(file_ptr, entry_ptr->addr,
&reported_entry_size, &in_cache,
&is_dirty, &is_protected, &is_pinned,
NULL, NULL, NULL);
- if ( result < 0 ) {
+ if(result < 0) {
pass = FALSE;
HDsnprintf(msg, (size_t)128,
"H5C_get_entry_status() reports failure 7.");
failure_mssg = msg;
- } else if ( !in_cache || is_dirty || !is_protected || is_pinned ) {
+ } else if(!in_cache || is_dirty || !is_protected || is_pinned) {
pass = FALSE;
HDsnprintf(msg, (size_t)128, "Unexpected status 7.");
failure_mssg = msg;
- } else if ( ( ! entry_ptr->deserialized ) ||
- ( entry_ptr->serialized ) ||
- ( entry_ptr->destroyed ) ) {
+ } else if((!entry_ptr->deserialized) ||
+ (entry_ptr->serialized) ||
+ (entry_ptr->destroyed)) {
pass = FALSE;
HDsnprintf(msg, (size_t)128, "Unexpected entry history 7.");
@@ -14646,11 +14646,11 @@ check_resize_entry(void)
}
}
- if ( pass ) {
+ if(pass) {
result = H5C_resize_entry((void *)entry_ptr, (LARGE_ENTRY_SIZE / 2));
- if ( result < 0 ) {
+ if(result < 0) {
pass = FALSE;
HDsnprintf(msg, (size_t)128, "error(s) in H5C_resize_entry().");
@@ -14661,7 +14661,7 @@ check_resize_entry(void)
result = H5C_unprotect(file_ptr, H5AC_ind_read_dxpl_id,
entry_ptr->addr, (void *)entry_ptr, H5C__DIRTIED_FLAG);
- if ( result < 0 ) {
+ if(result < 0) {
pass = FALSE;
HDsnprintf(msg, (size_t)128, "H5C_unprotect() reports failure 3.");
@@ -14679,14 +14679,14 @@ check_resize_entry(void)
}
}
- if ( pass ) {
+ if(pass) {
- if ( ( cache_ptr->index_len != 4 ) ||
- ( cache_ptr->index_size !=
- ((3 * LARGE_ENTRY_SIZE) + (LARGE_ENTRY_SIZE / 2)) ) ||
- ( cache_ptr->slist_len != 2 ) ||
- ( cache_ptr->slist_size !=
- (LARGE_ENTRY_SIZE + (LARGE_ENTRY_SIZE / 2)) ) ) {
+ if((cache_ptr->index_len != 4) ||
+ (cache_ptr->index_size !=
+ ((3 * LARGE_ENTRY_SIZE) + (LARGE_ENTRY_SIZE / 2))) ||
+ (cache_ptr->slist_len != 2) ||
+ (cache_ptr->slist_size !=
+ (LARGE_ENTRY_SIZE + (LARGE_ENTRY_SIZE / 2)))) {
pass = FALSE;
HDsnprintf(msg, (size_t)128, "Unexpected cache status 11.");
@@ -14695,30 +14695,30 @@ check_resize_entry(void)
}
}
- if ( pass ) {
+ if(pass) {
result = H5C_get_entry_status(file_ptr, entry_ptr->addr,
&reported_entry_size, &in_cache,
&is_dirty, &is_protected, &is_pinned,
NULL, NULL, NULL);
- if ( result < 0 ) {
+ if(result < 0) {
pass = FALSE;
HDsnprintf(msg, (size_t)128,
"H5C_get_entry_status() reports failure 8.");
failure_mssg = msg;
- } else if ( !in_cache || !is_dirty || is_protected || is_pinned ||
- ( reported_entry_size != (LARGE_ENTRY_SIZE / 2) ) ) {
+ } else if(!in_cache || !is_dirty || is_protected || is_pinned ||
+ (reported_entry_size != (LARGE_ENTRY_SIZE / 2))) {
pass = FALSE;
HDsnprintf(msg, (size_t)128, "Unexpected status 8.");
failure_mssg = msg;
- } else if ( ( ! entry_ptr->deserialized ) ||
- ( entry_ptr->serialized ) ||
- ( entry_ptr->destroyed ) ) {
+ } else if((!entry_ptr->deserialized) ||
+ (entry_ptr->serialized) ||
+ (entry_ptr->destroyed)) {
pass = FALSE;
HDsnprintf(msg, (size_t)128, "Unexpected entry history 8.");
@@ -14727,17 +14727,17 @@ check_resize_entry(void)
}
}
- if ( pass ) {
+ if(pass) {
protect_entry(file_ptr, LARGE_ENTRY_TYPE, 3);
}
- if ( pass ) {
+ if(pass) {
result = H5C_resize_entry((void *)entry_ptr, LARGE_ENTRY_SIZE);
- if ( result < 0 ) {
+ if(result < 0) {
pass = FALSE;
HDsnprintf(msg, (size_t)128, "error(s) in H5C_resize_entry().");
@@ -14748,7 +14748,7 @@ check_resize_entry(void)
result = H5C_unprotect(file_ptr, H5AC_ind_read_dxpl_id,
entry_ptr->addr, (void *)entry_ptr, H5C__DIRTIED_FLAG);
- if ( result < 0 ) {
+ if(result < 0) {
pass = FALSE;
HDsnprintf(msg, (size_t)128, "H5C_unprotect() reports failure 4.");
@@ -14766,12 +14766,12 @@ check_resize_entry(void)
}
}
- if ( pass ) {
+ if(pass) {
- if ( ( cache_ptr->index_len != 4 ) ||
- ( cache_ptr->index_size != 4 * LARGE_ENTRY_SIZE ) ||
- ( cache_ptr->slist_len != 2 ) ||
- ( cache_ptr->slist_size != 2 * LARGE_ENTRY_SIZE ) ) {
+ if((cache_ptr->index_len != 4) ||
+ (cache_ptr->index_size != 4 * LARGE_ENTRY_SIZE) ||
+ (cache_ptr->slist_len != 2) ||
+ (cache_ptr->slist_size != 2 * LARGE_ENTRY_SIZE)) {
pass = FALSE;
HDsnprintf(msg, (size_t)128, "Unexpected cache status 12.");
@@ -14780,30 +14780,30 @@ check_resize_entry(void)
}
}
- if ( pass ) {
+ if(pass) {
result = H5C_get_entry_status(file_ptr, entry_ptr->addr,
&reported_entry_size, &in_cache,
&is_dirty, &is_protected, &is_pinned,
NULL, NULL, NULL);
- if ( result < 0 ) {
+ if(result < 0) {
pass = FALSE;
HDsnprintf(msg, (size_t)128,
"H5C_get_entry_status() reports failure 9.");
failure_mssg = msg;
- } else if ( !in_cache || !is_dirty || is_protected || is_pinned ||
- ( reported_entry_size != LARGE_ENTRY_SIZE ) ) {
+ } else if(!in_cache || !is_dirty || is_protected || is_pinned ||
+ (reported_entry_size != LARGE_ENTRY_SIZE)) {
pass = FALSE;
HDsnprintf(msg, (size_t)128, "Unexpected status 9.");
failure_mssg = msg;
- } else if ( ( ! entry_ptr->deserialized ) ||
- ( entry_ptr->serialized ) ||
- ( entry_ptr->destroyed ) ) {
+ } else if((!entry_ptr->deserialized) ||
+ (entry_ptr->serialized) ||
+ (entry_ptr->destroyed)) {
pass = FALSE;
HDsnprintf(msg, (size_t)128, "Unexpected entry history 9.");
@@ -14812,7 +14812,7 @@ check_resize_entry(void)
}
}
- if ( pass ) {
+ if(pass) {
protect_entry(file_ptr, LARGE_ENTRY_TYPE, 3);
@@ -14820,11 +14820,11 @@ check_resize_entry(void)
}
- if ( pass ) {
+ if(pass) {
result = H5C_resize_entry((void *)entry_ptr, (LARGE_ENTRY_SIZE / 4));
- if ( result < 0 ) {
+ if(result < 0) {
pass = FALSE;
HDsnprintf(msg, (size_t)128,
@@ -14834,14 +14834,14 @@ check_resize_entry(void)
}
}
- if ( pass ) {
+ if(pass) {
- if ( ( cache_ptr->index_len != 4 ) ||
- ( cache_ptr->index_size !=
- ((3 * LARGE_ENTRY_SIZE) + (LARGE_ENTRY_SIZE / 4)) ) ||
- ( cache_ptr->slist_len != 2 ) ||
- ( cache_ptr->slist_size !=
- (LARGE_ENTRY_SIZE + (LARGE_ENTRY_SIZE / 4)) ) ) {
+ if((cache_ptr->index_len != 4) ||
+ (cache_ptr->index_size !=
+ ((3 * LARGE_ENTRY_SIZE) + (LARGE_ENTRY_SIZE / 4))) ||
+ (cache_ptr->slist_len != 2) ||
+ (cache_ptr->slist_size !=
+ (LARGE_ENTRY_SIZE + (LARGE_ENTRY_SIZE / 4)))) {
pass = FALSE;
HDsnprintf(msg, (size_t)128, "Unexpected cache status 13.");
@@ -14850,30 +14850,30 @@ check_resize_entry(void)
}
}
- if ( pass ) {
+ if(pass) {
result = H5C_get_entry_status(file_ptr, entry_ptr->addr,
&reported_entry_size, &in_cache,
&is_dirty, &is_protected, &is_pinned,
NULL, NULL, NULL);
- if ( result < 0 ) {
+ if(result < 0) {
pass = FALSE;
HDsnprintf(msg, (size_t)128,
"H5C_get_entry_status() reports failure 10.");
failure_mssg = msg;
- } else if ( !in_cache || !is_dirty || is_protected || ! is_pinned ||
- ( reported_entry_size != (LARGE_ENTRY_SIZE / 4) ) ) {
+ } else if(!in_cache || !is_dirty || is_protected || !is_pinned ||
+ (reported_entry_size != (LARGE_ENTRY_SIZE / 4))) {
pass = FALSE;
HDsnprintf(msg, (size_t)128, "Unexpected status 10.");
failure_mssg = msg;
- } else if ( ( ! entry_ptr->deserialized ) ||
- ( entry_ptr->serialized ) ||
- ( entry_ptr->destroyed ) ) {
+ } else if((!entry_ptr->deserialized) ||
+ (entry_ptr->serialized) ||
+ (entry_ptr->destroyed)) {
pass = FALSE;
HDsnprintf(msg, (size_t)128, "Unexpected entry history 10.");
@@ -14882,11 +14882,11 @@ check_resize_entry(void)
}
}
- if ( pass ) {
+ if(pass) {
result = H5C_resize_entry((void *)entry_ptr, LARGE_ENTRY_SIZE);
- if ( result < 0 ) {
+ if(result < 0) {
pass = FALSE;
HDsnprintf(msg, (size_t)128,
@@ -14896,12 +14896,12 @@ check_resize_entry(void)
}
}
- if ( pass ) {
+ if(pass) {
- if ( ( cache_ptr->index_len != 4 ) ||
- ( cache_ptr->index_size != (4 * LARGE_ENTRY_SIZE) ) ||
- ( cache_ptr->slist_len != 2 ) ||
- ( cache_ptr->slist_size != (2 * LARGE_ENTRY_SIZE) ) ) {
+ if((cache_ptr->index_len != 4) ||
+ (cache_ptr->index_size != (4 * LARGE_ENTRY_SIZE)) ||
+ (cache_ptr->slist_len != 2) ||
+ (cache_ptr->slist_size != (2 * LARGE_ENTRY_SIZE))) {
pass = FALSE;
HDsnprintf(msg, (size_t)128, "Unexpected cache status 14.");
@@ -14910,30 +14910,30 @@ check_resize_entry(void)
}
}
- if ( pass ) {
+ if(pass) {
result = H5C_get_entry_status(file_ptr, entry_ptr->addr,
&reported_entry_size, &in_cache,
&is_dirty, &is_protected, &is_pinned,
NULL, NULL, NULL);
- if ( result < 0 ) {
+ if(result < 0) {
pass = FALSE;
HDsnprintf(msg, (size_t)128,
"H5C_get_entry_status() reports failure 11.");
failure_mssg = msg;
- } else if ( !in_cache || !is_dirty || is_protected || ! is_pinned ||
- ( reported_entry_size != LARGE_ENTRY_SIZE ) ) {
+ } else if(!in_cache || !is_dirty || is_protected || !is_pinned ||
+ (reported_entry_size != LARGE_ENTRY_SIZE)) {
pass = FALSE;
HDsnprintf(msg, (size_t)128, "Unexpected status 11.");
failure_mssg = msg;
- } else if ( ( ! entry_ptr->deserialized ) ||
- ( entry_ptr->serialized ) ||
- ( entry_ptr->destroyed ) ) {
+ } else if((!entry_ptr->deserialized) ||
+ (entry_ptr->serialized) ||
+ (entry_ptr->destroyed)) {
pass = FALSE;
HDsnprintf(msg, (size_t)128, "Unexpected entry history 11.");
@@ -14942,7 +14942,7 @@ check_resize_entry(void)
}
}
- if ( pass ) {
+ if(pass) {
protect_entry(file_ptr, LARGE_ENTRY_TYPE, 3);
@@ -14951,28 +14951,28 @@ check_resize_entry(void)
}
- if ( pass ) {
+ if(pass) {
result = H5C_get_entry_status(file_ptr, entry_ptr->addr, &entry_size,
&in_cache, &is_dirty, &is_protected,
&is_pinned, NULL, NULL, NULL);
- if ( result < 0 ) {
+ if(result < 0) {
pass = FALSE;
HDsnprintf(msg, (size_t)128,
"H5C_get_entry_status() reports failure 12.");
failure_mssg = msg;
- } else if ( in_cache ) {
+ } else if(in_cache) {
pass = FALSE;
HDsnprintf(msg, (size_t)128, "Unexpected status 12.");
failure_mssg = msg;
- } else if ( ( ! entry_ptr->deserialized ) ||
- ( entry_ptr->serialized ) ||
- ( ! entry_ptr->destroyed ) ) {
+ } else if((!entry_ptr->deserialized) ||
+ (entry_ptr->serialized) ||
+ (!entry_ptr->destroyed)) {
pass = FALSE;
HDsnprintf(msg, (size_t)128, "Unexpected entry history 12.");
@@ -14981,12 +14981,12 @@ check_resize_entry(void)
}
}
- if ( pass ) {
+ if(pass) {
- if ( ( cache_ptr->index_len != 3 ) ||
- ( cache_ptr->index_size != (3 * LARGE_ENTRY_SIZE) ) ||
- ( cache_ptr->slist_len != 1 ) ||
- ( cache_ptr->slist_size != LARGE_ENTRY_SIZE ) ) {
+ if((cache_ptr->index_len != 3) ||
+ (cache_ptr->index_size != (3 * LARGE_ENTRY_SIZE)) ||
+ (cache_ptr->slist_len != 1) ||
+ (cache_ptr->slist_size != LARGE_ENTRY_SIZE)) {
pass = FALSE;
HDsnprintf(msg, (size_t)128, "Unexpected cache status 15.");
@@ -14995,7 +14995,7 @@ check_resize_entry(void)
}
}
- if ( pass ) {
+ if(pass) {
protect_entry(file_ptr, LARGE_ENTRY_TYPE, 2);
unprotect_entry(file_ptr, LARGE_ENTRY_TYPE, 2, H5C__DELETED_FLAG);
@@ -15008,12 +15008,12 @@ check_resize_entry(void)
}
- if ( pass ) {
+ if(pass) {
- if ( ( cache_ptr->index_len != 0 ) ||
- ( cache_ptr->index_size != 0 ) ||
- ( cache_ptr->slist_len != 0 ) ||
- ( cache_ptr->slist_size != 0 ) ) {
+ if((cache_ptr->index_len != 0) ||
+ (cache_ptr->index_size != 0) ||
+ (cache_ptr->slist_len != 0) ||
+ (cache_ptr->slist_size != 0)) {
pass = FALSE;
HDsnprintf(msg, (size_t)128, "Unexpected cache status 16.");
@@ -15022,14 +15022,14 @@ check_resize_entry(void)
}
}
- if ( pass ) {
+ if(pass) {
takedown_cache(file_ptr, FALSE, FALSE);
}
- if ( pass ) { PASSED(); } else { H5_FAILED(); }
+ if(pass) { PASSED(); } else { H5_FAILED(); }
- if ( ! pass ) {
+ if(!pass) {
HDfprintf(stdout, "%s(): failure_mssg = \"%s\".\n",
FUNC, failure_mssg);
@@ -15111,18 +15111,18 @@ check_evictions_enabled(void)
pass = TRUE;
- if ( show_progress ) /* 1 */
+ if(show_progress) /* 1 */
HDfprintf(stdout, "%s() - %0d -- pass = %d\n",
FUNC, mile_stone++, (int)pass);
/* create the cache */
- if ( pass ) {
+ if(pass) {
reset_entries();
file_ptr = setup_cache((size_t)(1 * 1024 * 1024),
- (size_t)( 512 * 1024));
- if ( file_ptr == NULL ) {
+ (size_t)( 512 * 1024));
+ if(file_ptr == NULL) {
pass = FALSE;
failure_mssg = "file_ptr NULL from setup_cache.";
@@ -15136,18 +15136,18 @@ check_evictions_enabled(void)
}
}
- if ( show_progress ) /* 2 */
+ if(show_progress) /* 2 */
HDfprintf(stdout, "%s() - %0d -- pass = %d\n",
FUNC, mile_stone++, (int)pass);
/* verify that it is empty */
- if ( pass ) {
+ if(pass) {
- if ( ( cache_ptr->index_len != 0 ) ||
- ( cache_ptr->index_size != 0 ) ||
- ( cache_ptr->slist_len != 0 ) ||
- ( cache_ptr->slist_size != 0 ) ||
- ( cache_ptr->evictions_enabled != TRUE ) ) {
+ if((cache_ptr->index_len != 0) ||
+ (cache_ptr->index_size != 0) ||
+ (cache_ptr->slist_len != 0) ||
+ (cache_ptr->slist_size != 0) ||
+ (cache_ptr->evictions_enabled != TRUE)) {
pass = FALSE;
HDsnprintf(msg, (size_t)128, "Unexpected cache status 1.");
@@ -15156,16 +15156,16 @@ check_evictions_enabled(void)
}
}
- if ( show_progress ) /* 3 */
+ if(show_progress) /* 3 */
HDfprintf(stdout, "%s() - %0d -- pass = %d\n",
FUNC, mile_stone++, (int)pass);
/* verify that H5C_get_evictions_enabled() returns the expected value */
- if ( pass ) {
+ if(pass) {
result = H5C_get_evictions_enabled(cache_ptr, &evictions_enabled);
- if ( ( result != SUCCEED ) || ( evictions_enabled != TRUE ) ) {
+ if((result != SUCCEED) || (evictions_enabled != TRUE)) {
pass = FALSE;
HDsnprintf(msg, (size_t)128, "Unexpected evictions enabled 1.");
@@ -15173,14 +15173,14 @@ check_evictions_enabled(void)
}
}
- if ( show_progress ) /* 4 */
+ if(show_progress) /* 4 */
HDfprintf(stdout, "%s() - %0d -- pass = %d\n",
FUNC, mile_stone++, (int)pass);
- if ( pass ) {
+ if(pass) {
/* fill the cache */
- for ( i = 0; i < 16 ; i++ )
+ for (i = 0; i < 16 ; i++)
{
protect_entry(file_ptr, MONSTER_ENTRY_TYPE, i);
unprotect_entry(file_ptr, MONSTER_ENTRY_TYPE, i, H5C__NO_FLAGS_SET);
@@ -15188,18 +15188,18 @@ check_evictions_enabled(void)
}
- if ( show_progress ) /* 5 */
+ if(show_progress) /* 5 */
HDfprintf(stdout, "%s() - %0d -- pass = %d\n",
FUNC, mile_stone++, (int)pass);
/* verify that the cache is full */
- if ( pass ) {
+ if(pass) {
- if ( ( cache_ptr->index_len != 16 ) ||
- ( cache_ptr->index_size != 16 * MONSTER_ENTRY_SIZE ) ||
- ( cache_ptr->slist_len != 0 ) ||
- ( cache_ptr->slist_size != 0 ) ||
- ( cache_ptr->evictions_enabled != TRUE ) ) {
+ if((cache_ptr->index_len != 16) ||
+ (cache_ptr->index_size != 16 * MONSTER_ENTRY_SIZE) ||
+ (cache_ptr->slist_len != 0) ||
+ (cache_ptr->slist_size != 0) ||
+ (cache_ptr->evictions_enabled != TRUE)) {
pass = FALSE;
@@ -15209,11 +15209,11 @@ check_evictions_enabled(void)
}
}
- if ( show_progress ) /* 6 */
+ if(show_progress) /* 6 */
HDfprintf(stdout, "%s() - %0d -- pass = %d\n",
FUNC, mile_stone++, (int)pass);
- if ( pass ) {
+ if(pass) {
/* protect and unprotect another entry */
protect_entry(file_ptr, MONSTER_ENTRY_TYPE, 16);
@@ -15221,18 +15221,18 @@ check_evictions_enabled(void)
}
- if ( show_progress ) /* 7 */
+ if(show_progress) /* 7 */
HDfprintf(stdout, "%s() - %0d -- pass = %d\n",
FUNC, mile_stone++, (int)pass);
/* verify that an entry has been evicted */
- if ( pass ) {
+ if(pass) {
- if ( ( cache_ptr->index_len != 16 ) ||
- ( cache_ptr->index_size != 16 * MONSTER_ENTRY_SIZE ) ||
- ( cache_ptr->slist_len != 0 ) ||
- ( cache_ptr->slist_size != 0 ) ||
- ( cache_ptr->evictions_enabled != TRUE ) ) {
+ if((cache_ptr->index_len != 16) ||
+ (cache_ptr->index_size != 16 * MONSTER_ENTRY_SIZE) ||
+ (cache_ptr->slist_len != 0) ||
+ (cache_ptr->slist_size != 0) ||
+ (cache_ptr->evictions_enabled != TRUE)) {
pass = FALSE;
HDsnprintf(msg, (size_t)128, "Unexpected cache status 3.");
@@ -15241,11 +15241,11 @@ check_evictions_enabled(void)
}
}
- if ( show_progress ) /* 8 */
+ if(show_progress) /* 8 */
HDfprintf(stdout, "%s() - %0d -- pass = %d\n",
FUNC, mile_stone++, (int)pass);
- if ( pass ) {
+ if(pass) {
entry_ptr = &(base_addr[0]);
@@ -15253,22 +15253,22 @@ check_evictions_enabled(void)
NULL, &in_cache, NULL, NULL, NULL,
NULL, NULL, NULL);
- if ( result < 0 ) {
+ if(result < 0) {
pass = FALSE;
HDsnprintf(msg, (size_t)128,
"H5C_get_entry_status() reports failure 1.");
failure_mssg = msg;
- } else if ( in_cache ) {
+ } else if(in_cache) {
pass = FALSE;
HDsnprintf(msg, (size_t)128, "Unexpected status 1.");
failure_mssg = msg;
- } else if ( ( ! entry_ptr->deserialized ) ||
- ( entry_ptr->serialized ) ||
- ( ! entry_ptr->destroyed ) ) {
+ } else if((!entry_ptr->deserialized) ||
+ (entry_ptr->serialized) ||
+ (!entry_ptr->destroyed)) {
pass = FALSE;
HDsnprintf(msg, (size_t)128, "Unexpected entry history 1.");
@@ -15277,29 +15277,29 @@ check_evictions_enabled(void)
}
}
- if ( show_progress ) /* 9 */
+ if(show_progress) /* 9 */
HDfprintf(stdout, "%s() - %0d -- pass = %d\n",
FUNC, mile_stone++, (int)pass);
- if ( pass ) {
+ if(pass) {
/* insert an entry */
insert_entry(file_ptr, MONSTER_ENTRY_TYPE, 17, H5C__NO_FLAGS_SET);
}
- if ( show_progress ) /* 10 */
+ if(show_progress) /* 10 */
HDfprintf(stdout, "%s() - %0d -- pass = %d\n",
FUNC, mile_stone++, (int)pass);
/* verify that another entry has been evicted */
- if ( pass ) {
+ if(pass) {
- if ( ( cache_ptr->index_len != 16 ) ||
- ( cache_ptr->index_size != 16 * MONSTER_ENTRY_SIZE ) ||
- ( cache_ptr->slist_len != 1 ) ||
- ( cache_ptr->slist_size != MONSTER_ENTRY_SIZE ) ||
- ( cache_ptr->evictions_enabled != TRUE ) ) {
+ if((cache_ptr->index_len != 16) ||
+ (cache_ptr->index_size != 16 * MONSTER_ENTRY_SIZE) ||
+ (cache_ptr->slist_len != 1) ||
+ (cache_ptr->slist_size != MONSTER_ENTRY_SIZE) ||
+ (cache_ptr->evictions_enabled != TRUE)) {
pass = FALSE;
HDsnprintf(msg, (size_t)128, "Unexpected cache status 4.");
@@ -15308,33 +15308,33 @@ check_evictions_enabled(void)
}
}
- if ( show_progress ) /* 11 */
+ if(show_progress) /* 11 */
HDfprintf(stdout, "%s() - %0d -- pass = %d\n",
FUNC, mile_stone++, (int)pass);
- if ( pass ) {
+ if(pass) {
entry_ptr = &(base_addr[1]);
result = H5C_get_entry_status(file_ptr, entry_ptr->addr,
NULL, &in_cache, NULL, NULL, NULL, NULL, NULL, NULL);
- if ( result < 0 ) {
+ if(result < 0) {
pass = FALSE;
HDsnprintf(msg, (size_t)128,
"H5C_get_entry_status() reports failure 2.");
failure_mssg = msg;
- } else if ( in_cache ) {
+ } else if(in_cache) {
pass = FALSE;
HDsnprintf(msg, (size_t)128, "Unexpected status 2.");
failure_mssg = msg;
- } else if ( ( ! entry_ptr->deserialized ) ||
- ( entry_ptr->serialized ) ||
- ( ! entry_ptr->destroyed ) ) {
+ } else if((!entry_ptr->deserialized) ||
+ (entry_ptr->serialized) ||
+ (!entry_ptr->destroyed)) {
pass = FALSE;
HDsnprintf(msg, (size_t)128, "Unexpected entry history 2.");
@@ -15343,16 +15343,16 @@ check_evictions_enabled(void)
}
}
- if ( show_progress ) /* 12 */
+ if(show_progress) /* 12 */
HDfprintf(stdout, "%s() - %0d -- pass = %d\n",
FUNC, mile_stone++, (int)pass);
/* disable evictions */
- if ( pass ) {
+ if(pass) {
result = H5C_set_evictions_enabled(cache_ptr, FALSE);
- if ( result != SUCCEED ) {
+ if(result != SUCCEED) {
pass = FALSE;
HDsnprintf(msg, (size_t)128, "can't disable evictions 1.");
@@ -15360,18 +15360,18 @@ check_evictions_enabled(void)
}
}
- if ( show_progress ) /* 13 */
+ if(show_progress) /* 13 */
HDfprintf(stdout, "%s() - %0d -- pass = %d\n",
FUNC, mile_stone++, (int)pass);
/* verify that evictions are disabled */
- if ( pass ) {
+ if(pass) {
- if ( ( cache_ptr->index_len != 16 ) ||
- ( cache_ptr->index_size != 16 * MONSTER_ENTRY_SIZE ) ||
- ( cache_ptr->slist_len != 1 ) ||
- ( cache_ptr->slist_size != MONSTER_ENTRY_SIZE ) ||
- ( cache_ptr->evictions_enabled != FALSE ) ) {
+ if((cache_ptr->index_len != 16) ||
+ (cache_ptr->index_size != 16 * MONSTER_ENTRY_SIZE) ||
+ (cache_ptr->slist_len != 1) ||
+ (cache_ptr->slist_size != MONSTER_ENTRY_SIZE) ||
+ (cache_ptr->evictions_enabled != FALSE)) {
pass = FALSE;
HDsnprintf(msg, (size_t)128, "Unexpected cache status 5.");
@@ -15380,11 +15380,11 @@ check_evictions_enabled(void)
}
}
- if ( show_progress ) /* 14 */
+ if(show_progress) /* 14 */
HDfprintf(stdout, "%s() - %0d -- pass = %d\n",
FUNC, mile_stone++, (int)pass);
- if ( pass ) {
+ if(pass) {
/* protect and unprotect another entry */
protect_entry(file_ptr, MONSTER_ENTRY_TYPE, 18);
@@ -15392,18 +15392,18 @@ check_evictions_enabled(void)
}
- if ( show_progress ) /* 15 */
+ if(show_progress) /* 15 */
HDfprintf(stdout, "%s() - %0d -- pass = %d\n",
FUNC, mile_stone++, (int)pass);
/* verify that no entry has been evicted */
- if ( pass ) {
+ if(pass) {
- if ( ( cache_ptr->index_len != 17 ) ||
- ( cache_ptr->index_size != 17 * MONSTER_ENTRY_SIZE ) ||
- ( cache_ptr->slist_len != 1 ) ||
- ( cache_ptr->slist_size != MONSTER_ENTRY_SIZE ) ||
- ( cache_ptr->evictions_enabled != FALSE ) ) {
+ if((cache_ptr->index_len != 17) ||
+ (cache_ptr->index_size != 17 * MONSTER_ENTRY_SIZE) ||
+ (cache_ptr->slist_len != 1) ||
+ (cache_ptr->slist_size != MONSTER_ENTRY_SIZE) ||
+ (cache_ptr->evictions_enabled != FALSE)) {
pass = FALSE;
HDsnprintf(msg, (size_t)128, "Unexpected cache status 6.");
@@ -15412,29 +15412,29 @@ check_evictions_enabled(void)
}
}
- if ( show_progress ) /* 16 */
+ if(show_progress) /* 16 */
HDfprintf(stdout, "%s() - %0d -- pass = %d\n",
FUNC, mile_stone++, (int)pass);
- if ( pass ) {
+ if(pass) {
/* insert another entry */
insert_entry(file_ptr, MONSTER_ENTRY_TYPE, 19, H5C__NO_FLAGS_SET);
}
- if ( show_progress ) /* 17 */
+ if(show_progress) /* 17 */
HDfprintf(stdout, "%s() - %0d -- pass = %d\n",
FUNC, mile_stone++, (int)pass);
/* verify that no entry has been evicted */
- if ( pass ) {
+ if(pass) {
- if ( ( cache_ptr->index_len != 18 ) ||
- ( cache_ptr->index_size != 18 * MONSTER_ENTRY_SIZE ) ||
- ( cache_ptr->slist_len != 2 ) ||
- ( cache_ptr->slist_size != 2 * MONSTER_ENTRY_SIZE ) ||
- ( cache_ptr->evictions_enabled != FALSE ) ) {
+ if((cache_ptr->index_len != 18) ||
+ (cache_ptr->index_size != 18 * MONSTER_ENTRY_SIZE) ||
+ (cache_ptr->slist_len != 2) ||
+ (cache_ptr->slist_size != 2 * MONSTER_ENTRY_SIZE) ||
+ (cache_ptr->evictions_enabled != FALSE)) {
pass = FALSE;
HDsnprintf(msg, (size_t)128, "Unexpected cache status 7.");
@@ -15443,16 +15443,16 @@ check_evictions_enabled(void)
}
}
- if ( show_progress ) /* 18 */
+ if(show_progress) /* 18 */
HDfprintf(stdout, "%s() - %0d -- pass = %d\n",
FUNC, mile_stone++, (int)pass);
/* re-enable evictions */
- if ( pass ) {
+ if(pass) {
result = H5C_set_evictions_enabled(cache_ptr, TRUE);
- if ( result != SUCCEED ) {
+ if(result != SUCCEED) {
pass = FALSE;
HDsnprintf(msg, (size_t)128, "can't enable evictions 1.");
@@ -15460,11 +15460,11 @@ check_evictions_enabled(void)
}
}
- if ( show_progress ) /* 19 */
+ if(show_progress) /* 19 */
HDfprintf(stdout, "%s() - %0d -- pass = %d\n",
FUNC, mile_stone++, (int)pass);
- if ( pass ) {
+ if(pass) {
/* protect and unprotect an entry that is in the cache */
protect_entry(file_ptr, MONSTER_ENTRY_TYPE, 19);
@@ -15472,18 +15472,18 @@ check_evictions_enabled(void)
}
- if ( show_progress ) /* 20 */
+ if(show_progress) /* 20 */
HDfprintf(stdout, "%s() - %0d -- pass = %d\n",
FUNC, mile_stone++, (int)pass);
/* verify that no entries have been evicted */
- if ( pass ) {
+ if(pass) {
- if ( ( cache_ptr->index_len != 18 ) ||
- ( cache_ptr->index_size != 18 * MONSTER_ENTRY_SIZE ) ||
- ( cache_ptr->slist_len != 2 ) ||
- ( cache_ptr->slist_size != 2 * MONSTER_ENTRY_SIZE ) ||
- ( cache_ptr->evictions_enabled != TRUE ) ) {
+ if((cache_ptr->index_len != 18) ||
+ (cache_ptr->index_size != 18 * MONSTER_ENTRY_SIZE) ||
+ (cache_ptr->slist_len != 2) ||
+ (cache_ptr->slist_size != 2 * MONSTER_ENTRY_SIZE) ||
+ (cache_ptr->evictions_enabled != TRUE)) {
pass = FALSE;
HDsnprintf(msg, (size_t)128, "Unexpected cache status 8.");
@@ -15492,11 +15492,11 @@ check_evictions_enabled(void)
}
}
- if ( show_progress ) /* 21 */
+ if(show_progress) /* 21 */
HDfprintf(stdout, "%s() - %0d -- pass = %d\n",
FUNC, mile_stone++, (int)pass);
- if ( pass ) {
+ if(pass) {
/* protect and unprotect an entry that isn't in the cache */
protect_entry(file_ptr, MONSTER_ENTRY_TYPE, 20);
@@ -15504,7 +15504,7 @@ check_evictions_enabled(void)
}
- if ( show_progress ) /* 22 */
+ if(show_progress) /* 22 */
HDfprintf(stdout, "%s() - %0d -- pass = %d\n",
FUNC, mile_stone++, (int)pass);
@@ -15512,13 +15512,13 @@ check_evictions_enabled(void)
* cache back down to its normal size.
*/
- if ( pass ) {
+ if(pass) {
- if ( ( cache_ptr->index_len != 16 ) ||
- ( cache_ptr->index_size != 16 * MONSTER_ENTRY_SIZE ) ||
- ( cache_ptr->slist_len != 2 ) ||
- ( cache_ptr->slist_size != 2 * MONSTER_ENTRY_SIZE ) ||
- ( cache_ptr->evictions_enabled != TRUE ) ) {
+ if((cache_ptr->index_len != 16) ||
+ (cache_ptr->index_size != 16 * MONSTER_ENTRY_SIZE) ||
+ (cache_ptr->slist_len != 2) ||
+ (cache_ptr->slist_size != 2 * MONSTER_ENTRY_SIZE) ||
+ (cache_ptr->evictions_enabled != TRUE)) {
pass = FALSE;
HDsnprintf(msg, (size_t)128, "Unexpected cache status 9.");
@@ -15527,33 +15527,33 @@ check_evictions_enabled(void)
}
}
- if ( show_progress ) /* 23 */
+ if(show_progress) /* 23 */
HDfprintf(stdout, "%s() - %0d -- pass = %d\n",
FUNC, mile_stone++, (int)pass);
- if ( pass ) {
+ if(pass) {
entry_ptr = &(base_addr[2]);
result = H5C_get_entry_status(file_ptr, entry_ptr->addr,
NULL, &in_cache, NULL, NULL, NULL, NULL, NULL, NULL);
- if ( result < 0 ) {
+ if(result < 0) {
pass = FALSE;
HDsnprintf(msg, (size_t)128,
"H5C_get_entry_status() reports failure 3.");
failure_mssg = msg;
- } else if ( in_cache ) {
+ } else if(in_cache) {
pass = FALSE;
HDsnprintf(msg, (size_t)128, "Unexpected status 3.");
failure_mssg = msg;
- } else if ( ( ! entry_ptr->deserialized ) ||
- ( entry_ptr->serialized ) ||
- ( ! entry_ptr->destroyed ) ) {
+ } else if((!entry_ptr->deserialized) ||
+ (entry_ptr->serialized) ||
+ (!entry_ptr->destroyed)) {
pass = FALSE;
HDsnprintf(msg, (size_t)128, "Unexpected entry history 3.");
@@ -15562,33 +15562,33 @@ check_evictions_enabled(void)
}
}
- if ( show_progress ) /* 24 */
+ if(show_progress) /* 24 */
HDfprintf(stdout, "%s() - %0d -- pass = %d\n",
FUNC, mile_stone++, (int)pass);
- if ( pass ) {
+ if(pass) {
entry_ptr = &(base_addr[3]);
result = H5C_get_entry_status(file_ptr, entry_ptr->addr,
NULL, &in_cache, NULL, NULL, NULL, NULL, NULL, NULL);
- if ( result < 0 ) {
+ if(result < 0) {
pass = FALSE;
HDsnprintf(msg, (size_t)128,
"H5C_get_entry_status() reports failure 4.");
failure_mssg = msg;
- } else if ( in_cache ) {
+ } else if(in_cache) {
pass = FALSE;
HDsnprintf(msg, (size_t)128, "Unexpected status 4.");
failure_mssg = msg;
- } else if ( ( ! entry_ptr->deserialized ) ||
- ( entry_ptr->serialized ) ||
- ( ! entry_ptr->destroyed ) ) {
+ } else if((!entry_ptr->deserialized) ||
+ (entry_ptr->serialized) ||
+ (!entry_ptr->destroyed)) {
pass = FALSE;
HDsnprintf(msg, (size_t)128, "Unexpected entry history 4.");
@@ -15597,16 +15597,16 @@ check_evictions_enabled(void)
}
}
- if ( show_progress ) /* 25 */
+ if(show_progress) /* 25 */
HDfprintf(stdout, "%s() - %0d -- pass = %d\n",
FUNC, mile_stone++, (int)pass);
/* disable evictions again */
- if ( pass ) {
+ if(pass) {
result = H5C_set_evictions_enabled(cache_ptr, FALSE);
- if ( result != SUCCEED ) {
+ if(result != SUCCEED) {
pass = FALSE;
HDsnprintf(msg, (size_t)128, "can't disable evictions 2.");
@@ -15614,11 +15614,11 @@ check_evictions_enabled(void)
}
}
- if ( show_progress ) /* 26 */
+ if(show_progress) /* 26 */
HDfprintf(stdout, "%s() - %0d -- pass = %d\n",
FUNC, mile_stone++, (int)pass);
- if ( pass ) {
+ if(pass) {
/* protect and unprotect an entry that isn't in the cache, forcing
* the cache to grow.
@@ -15628,18 +15628,18 @@ check_evictions_enabled(void)
}
- if ( show_progress ) /* 27 */
+ if(show_progress) /* 27 */
HDfprintf(stdout, "%s() - %0d -- pass = %d\n",
FUNC, mile_stone++, (int)pass);
/* verify that the cache has grown */
- if ( pass ) {
+ if(pass) {
- if ( ( cache_ptr->index_len != 17 ) ||
- ( cache_ptr->index_size != 17 * MONSTER_ENTRY_SIZE ) ||
- ( cache_ptr->slist_len != 2 ) ||
- ( cache_ptr->slist_size != 2 * MONSTER_ENTRY_SIZE ) ||
- ( cache_ptr->evictions_enabled != FALSE ) ) {
+ if((cache_ptr->index_len != 17) ||
+ (cache_ptr->index_size != 17 * MONSTER_ENTRY_SIZE) ||
+ (cache_ptr->slist_len != 2) ||
+ (cache_ptr->slist_size != 2 * MONSTER_ENTRY_SIZE) ||
+ (cache_ptr->evictions_enabled != FALSE)) {
pass = FALSE;
HDsnprintf(msg, (size_t)128, "Unexpected cache status 10.");
@@ -15648,16 +15648,16 @@ check_evictions_enabled(void)
}
}
- if ( show_progress ) /* 28 */
+ if(show_progress) /* 28 */
HDfprintf(stdout, "%s() - %0d -- pass = %d\n",
FUNC, mile_stone++, (int)pass);
/* re-enable evictions again */
- if ( pass ) {
+ if(pass) {
result = H5C_set_evictions_enabled(cache_ptr, TRUE);
- if ( result != SUCCEED ) {
+ if(result != SUCCEED) {
pass = FALSE;
HDsnprintf(msg, (size_t)128, "can't enable evictions 2.");
@@ -15665,29 +15665,29 @@ check_evictions_enabled(void)
}
}
- if ( show_progress ) /* 29 */
+ if(show_progress) /* 29 */
HDfprintf(stdout, "%s() - %0d -- pass = %d\n",
FUNC, mile_stone++, (int)pass);
- if ( pass ) {
+ if(pass) {
/* insert an entry */
insert_entry(file_ptr, MONSTER_ENTRY_TYPE, 22, H5C__NO_FLAGS_SET);
}
- if ( show_progress ) /* 30 */
+ if(show_progress) /* 30 */
HDfprintf(stdout, "%s() - %0d -- pass = %d\n",
FUNC, mile_stone++, (int)pass);
/* verify that the cache has returned to its maximum size */
- if ( pass ) {
+ if(pass) {
- if ( ( cache_ptr->index_len != 16 ) ||
- ( cache_ptr->index_size != 16 * MONSTER_ENTRY_SIZE ) ||
- ( cache_ptr->slist_len != 3 ) ||
- ( cache_ptr->slist_size != 3 * MONSTER_ENTRY_SIZE ) ||
- ( cache_ptr->evictions_enabled != TRUE ) ) {
+ if((cache_ptr->index_len != 16) ||
+ (cache_ptr->index_size != 16 * MONSTER_ENTRY_SIZE) ||
+ (cache_ptr->slist_len != 3) ||
+ (cache_ptr->slist_size != 3 * MONSTER_ENTRY_SIZE) ||
+ (cache_ptr->evictions_enabled != TRUE)) {
pass = FALSE;
HDsnprintf(msg, (size_t)128, "Unexpected cache status 11.");
@@ -15696,33 +15696,33 @@ check_evictions_enabled(void)
}
}
- if ( show_progress ) /* 31 */
+ if(show_progress) /* 31 */
HDfprintf(stdout, "%s() - %0d -- pass = %d\n",
FUNC, mile_stone++, (int)pass);
- if ( pass ) {
+ if(pass) {
entry_ptr = &(base_addr[4]);
result = H5C_get_entry_status(file_ptr, entry_ptr->addr,
NULL, &in_cache, NULL, NULL, NULL, NULL, NULL, NULL);
- if ( result < 0 ) {
+ if(result < 0) {
pass = FALSE;
HDsnprintf(msg, (size_t)128,
"H5C_get_entry_status() reports failure 5.");
failure_mssg = msg;
- } else if ( in_cache ) {
+ } else if(in_cache) {
pass = FALSE;
HDsnprintf(msg, (size_t)128, "Unexpected status 5.");
failure_mssg = msg;
- } else if ( ( ! entry_ptr->deserialized ) ||
- ( entry_ptr->serialized ) ||
- ( ! entry_ptr->destroyed ) ) {
+ } else if((!entry_ptr->deserialized) ||
+ ( entry_ptr->serialized) ||
+ (!entry_ptr->destroyed)) {
pass = FALSE;
HDsnprintf(msg, (size_t)128, "Unexpected entry history 5.");
@@ -15731,16 +15731,16 @@ check_evictions_enabled(void)
}
}
- if ( show_progress ) /* 32 */
+ if(show_progress) /* 32 */
HDfprintf(stdout, "%s() - %0d -- pass = %d\n",
FUNC, mile_stone++, (int)pass);
/* disable evictions one last time before we shut down */
- if ( pass ) {
+ if(pass) {
result = H5C_set_evictions_enabled(cache_ptr, FALSE);
- if ( result != SUCCEED ) {
+ if(result != SUCCEED) {
pass = FALSE;
HDsnprintf(msg, (size_t)128, "can't disable evictions 3.");
@@ -15748,22 +15748,22 @@ check_evictions_enabled(void)
}
}
- if ( show_progress ) /* 33 */
+ if(show_progress) /* 33 */
HDfprintf(stdout, "%s() - %0d -- pass = %d\n",
FUNC, mile_stone++, (int)pass);
- if ( pass ) {
+ if(pass) {
takedown_cache(file_ptr, FALSE, FALSE);
}
- if ( show_progress ) /* 34 */
+ if(show_progress) /* 34 */
HDfprintf(stdout, "%s() - %0d -- pass = %d\n",
FUNC, mile_stone++, (int)pass);
- if ( pass ) { PASSED(); } else { H5_FAILED(); }
+ if(pass) { PASSED(); } else { H5_FAILED(); }
- if ( ! pass ) {
+ if(!pass) {
HDfprintf(stdout, "%s(): failure_mssg = \"%s\".\n",
FUNC, failure_mssg);
@@ -15804,7 +15804,7 @@ check_flush_protected_err(void)
* succeed.
*/
- if ( pass ) {
+ if(pass) {
reset_entries();
@@ -15813,7 +15813,7 @@ check_flush_protected_err(void)
protect_entry(file_ptr, 0, 0);
- if ( H5C_flush_cache(file_ptr, H5AC_ind_read_dxpl_id, H5C__NO_FLAGS_SET) >= 0 ) {
+ if(H5C_flush_cache(file_ptr, H5AC_ind_read_dxpl_id, H5C__NO_FLAGS_SET) >= 0) {
pass = FALSE;
failure_mssg = "flush succeeded on cache with protected entry.\n";
@@ -15822,7 +15822,7 @@ check_flush_protected_err(void)
unprotect_entry(file_ptr, 0, 0, H5C__DIRTIED_FLAG);
- if ( H5C_flush_cache(file_ptr, H5AC_ind_read_dxpl_id, H5C__NO_FLAGS_SET) < 0 ) {
+ if(H5C_flush_cache(file_ptr, H5AC_ind_read_dxpl_id, H5C__NO_FLAGS_SET) < 0) {
pass = FALSE;
failure_mssg = "flush failed after unprotect.\n";
@@ -15834,9 +15834,9 @@ check_flush_protected_err(void)
}
}
- if ( pass ) { PASSED(); } else { H5_FAILED(); }
+ if(pass) { PASSED(); } else { H5_FAILED(); }
- if ( ! pass ) {
+ if(!pass) {
HDfprintf(stdout, "%s(): failure_mssg = \"%s\".\n",
FUNC, failure_mssg);
@@ -15879,7 +15879,7 @@ check_destroy_pinned_err(void)
* succeed.
*/
- if ( pass ) {
+ if(pass) {
reset_entries();
@@ -15889,7 +15889,7 @@ check_destroy_pinned_err(void)
protect_entry(file_ptr, 0, 0);
unprotect_entry(file_ptr, 0, 0, H5C__PIN_ENTRY_FLAG);
- if ( H5C_dest(file_ptr, H5AC_ind_read_dxpl_id) >= 0 ) {
+ if(H5C_dest(file_ptr, H5AC_ind_read_dxpl_id) >= 0) {
pass = FALSE;
failure_mssg = "destroy succeeded on cache with pinned entry.\n";
@@ -15898,7 +15898,7 @@ check_destroy_pinned_err(void)
unpin_entry(0, 0);
- if ( H5C_dest(file_ptr, H5AC_ind_read_dxpl_id) < 0 ) {
+ if(H5C_dest(file_ptr, H5AC_ind_read_dxpl_id) < 0) {
pass = FALSE;
failure_mssg = "destroy failed after unpin.\n";
@@ -15908,7 +15908,7 @@ check_destroy_pinned_err(void)
}
}
- if ( saved_cache != NULL ) {
+ if(saved_cache != NULL) {
file_ptr->shared->cache = saved_cache;
saved_cache = NULL;
@@ -15923,9 +15923,9 @@ check_destroy_pinned_err(void)
}
- if ( pass ) { PASSED(); } else { H5_FAILED(); }
+ if(pass) { PASSED(); } else { H5_FAILED(); }
- if ( ! pass ) {
+ if(!pass) {
HDfprintf(stdout, "%s(): failure_mssg = \"%s\".\n",
FUNC, failure_mssg);
@@ -15966,7 +15966,7 @@ check_destroy_protected_err(void)
* succeed.
*/
- if ( pass ) {
+ if(pass) {
reset_entries();
@@ -15975,7 +15975,7 @@ check_destroy_protected_err(void)
protect_entry(file_ptr, 0, 0);
- if ( H5C_dest(file_ptr, H5AC_ind_read_dxpl_id) >= 0 ) {
+ if(H5C_dest(file_ptr, H5AC_ind_read_dxpl_id) >= 0) {
pass = FALSE;
failure_mssg = "destroy succeeded on cache with protected entry.\n";
@@ -15984,7 +15984,7 @@ check_destroy_protected_err(void)
unprotect_entry(file_ptr, 0, 0, H5C__DIRTIED_FLAG);
- if ( H5C_dest(file_ptr, H5AC_ind_read_dxpl_id) < 0 ) {
+ if(H5C_dest(file_ptr, H5AC_ind_read_dxpl_id) < 0) {
pass = FALSE;
failure_mssg = "destroy failed after unprotect.\n";
@@ -15994,7 +15994,7 @@ check_destroy_protected_err(void)
}
}
- if ( saved_cache != NULL ) {
+ if(saved_cache != NULL) {
file_ptr->shared->cache = saved_cache;
saved_cache = NULL;
@@ -16008,9 +16008,9 @@ check_destroy_protected_err(void)
takedown_cache(NULL, FALSE, FALSE);
}
- if ( pass ) { PASSED(); } else { H5_FAILED(); }
+ if(pass) { PASSED(); } else { H5_FAILED(); }
- if ( ! pass ) {
+ if(!pass) {
HDfprintf(stdout, "%s(): failure_mssg = \"%s\".\n",
FUNC, failure_mssg);
@@ -16054,7 +16054,7 @@ check_duplicate_insert_err(void)
* destroy the cache -- should succeed.
*/
- if ( pass ) {
+ if(pass) {
reset_entries();
@@ -16063,7 +16063,7 @@ check_duplicate_insert_err(void)
protect_entry(file_ptr, 0, 0);
- if ( pass ) {
+ if(pass) {
base_addr = entries[0];
entry_ptr = &(base_addr[0]);
@@ -16072,7 +16072,7 @@ check_duplicate_insert_err(void)
&(types[0]), entry_ptr->addr,
(void *)entry_ptr, H5C__NO_FLAGS_SET);
- if ( result >= 0 ) {
+ if(result >= 0) {
pass = FALSE;
failure_mssg = "insert of duplicate entry succeeded.\n";
@@ -16086,9 +16086,9 @@ check_duplicate_insert_err(void)
}
}
- if ( pass ) { PASSED(); } else { H5_FAILED(); }
+ if(pass) { PASSED(); } else { H5_FAILED(); }
- if ( ! pass ) {
+ if(!pass) {
HDfprintf(stdout, "%s(): failure_mssg = \"%s\".\n",
FUNC, failure_mssg);
@@ -16134,7 +16134,7 @@ check_move_err(void)
* fail. Destroy the cache -- should succeed.
*/
- if ( pass ) {
+ if(pass) {
reset_entries();
@@ -16151,38 +16151,38 @@ check_move_err(void)
entry_1_0_ptr = &((entries[1])[0]);
}
- if ( pass ) {
+ if(pass) {
result = H5C_move_entry(cache_ptr, &(types[0]),
entry_0_0_ptr->addr, entry_0_1_ptr->addr);
- if ( result >= 0 ) {
+ if(result >= 0) {
pass = FALSE;
failure_mssg = "move to addr of same type succeeded.\n";
}
}
- if ( pass ) {
+ if(pass) {
result = H5C_move_entry(cache_ptr, &(types[0]),
entry_0_0_ptr->addr, entry_1_0_ptr->addr);
- if ( result >= 0 ) {
+ if(result >= 0) {
pass = FALSE;
failure_mssg = "move to addr of different type succeeded.\n";
}
}
- if ( pass ) {
+ if(pass) {
takedown_cache(file_ptr, FALSE, FALSE);
}
- if ( pass ) { PASSED(); } else { H5_FAILED(); }
+ if(pass) { PASSED(); } else { H5_FAILED(); }
- if ( ! pass ) {
+ if(!pass) {
HDfprintf(stdout, "%s: failure_mssg = \"%s\".\n",
FUNC, failure_mssg);
@@ -16228,7 +16228,7 @@ check_double_pin_err(void)
* -- should succeed.
*/
- if ( pass ) {
+ if(pass) {
reset_entries();
@@ -16244,12 +16244,12 @@ check_double_pin_err(void)
entry_ptr = &((entries[0])[0]);
}
- if ( pass ) {
+ if(pass) {
result = H5C_unprotect(file_ptr, H5AC_ind_read_dxpl_id,
entry_ptr->addr, (void *)entry_ptr, H5C__PIN_ENTRY_FLAG);
- if ( result > 0 ) {
+ if(result > 0) {
pass = FALSE;
failure_mssg =
@@ -16261,14 +16261,14 @@ check_double_pin_err(void)
}
}
- if ( pass ) {
+ if(pass) {
takedown_cache(file_ptr, FALSE, FALSE);
}
- if ( pass ) { PASSED(); } else { H5_FAILED(); }
+ if(pass) { PASSED(); } else { H5_FAILED(); }
- if ( ! pass ) {
+ if(!pass) {
HDfprintf(stdout, "%s: failure_mssg = \"%s\".\n",
FUNC, failure_mssg);
@@ -16316,7 +16316,7 @@ check_double_unpin_err(void)
* Destroy the cache -- should succeed.
*/
- if ( pass ) {
+ if(pass) {
reset_entries();
@@ -16328,12 +16328,12 @@ check_double_unpin_err(void)
entry_ptr = &((entries[0])[0]);
}
- if ( pass ) {
+ if(pass) {
result = H5C_unprotect(file_ptr, H5AC_ind_read_dxpl_id,
entry_ptr->addr, (void *)entry_ptr, H5C__UNPIN_ENTRY_FLAG);
- if ( result > 0 ) {
+ if(result > 0) {
pass = FALSE;
failure_mssg =
@@ -16345,11 +16345,11 @@ check_double_unpin_err(void)
}
}
- if ( pass ) {
+ if(pass) {
result = H5C_unpin_entry((void *)entry_ptr);
- if ( result > 0 ) {
+ if(result > 0) {
pass = FALSE;
failure_mssg =
@@ -16358,14 +16358,14 @@ check_double_unpin_err(void)
}
}
- if ( pass ) {
+ if(pass) {
takedown_cache(file_ptr, FALSE, FALSE);
}
- if ( pass ) { PASSED(); } else { H5_FAILED(); }
+ if(pass) { PASSED(); } else { H5_FAILED(); }
- if ( ! pass ) {
+ if(!pass) {
HDfprintf(stdout, "%s: failure_mssg = \"%s\".\n",
FUNC, failure_mssg);
@@ -16417,7 +16417,7 @@ check_pin_entry_errs(void)
* Destroy the cache -- should succeed.
*/
- if ( pass ) {
+ if(pass) {
reset_entries();
@@ -16431,11 +16431,11 @@ check_pin_entry_errs(void)
entry_ptr = &((entries[0])[0]);
}
- if ( pass ) {
+ if(pass) {
result = H5C_pin_protected_entry((void *)entry_ptr);
- if ( result > 0 ) {
+ if(result > 0) {
pass = FALSE;
failure_mssg =
@@ -16451,11 +16451,11 @@ check_pin_entry_errs(void)
}
}
- if ( pass ) {
+ if(pass) {
result = H5C_pin_protected_entry((void *)entry_ptr);
- if ( result > 0 ) {
+ if(result > 0) {
pass = FALSE;
failure_mssg =
@@ -16468,14 +16468,14 @@ check_pin_entry_errs(void)
}
}
- if ( pass ) {
+ if(pass) {
takedown_cache(file_ptr, FALSE, FALSE);
}
- if ( pass ) { PASSED(); } else { H5_FAILED(); }
+ if(pass) { PASSED(); } else { H5_FAILED(); }
- if ( ! pass ) {
+ if(!pass) {
HDfprintf(stdout, "%s: failure_mssg = \"%s\".\n",
FUNC, failure_mssg);
@@ -16516,7 +16516,7 @@ check_double_protect_err(void)
* destroy the cache -- should succeed.
*/
- if ( pass ) {
+ if(pass) {
reset_entries();
@@ -16528,32 +16528,32 @@ check_double_protect_err(void)
entry_ptr = &((entries[0])[0]);
}
- if ( pass ) {
+ if(pass) {
cache_entry_ptr = (H5C_cache_entry_t *)H5C_protect(file_ptr, H5AC_ind_read_dxpl_id,
&(types[0]), entry_ptr->addr,
&entry_ptr->addr, H5C__NO_FLAGS_SET);
- if ( cache_entry_ptr != NULL ) {
+ if(cache_entry_ptr != NULL) {
pass = FALSE;
failure_mssg = "attempt to protect a protected entry succeeded.\n";
}
}
- if ( pass ) {
+ if(pass) {
unprotect_entry(file_ptr, 0, 0, H5C__NO_FLAGS_SET);
}
- if ( pass ) {
+ if(pass) {
takedown_cache(file_ptr, FALSE, FALSE);
}
- if ( pass ) { PASSED(); } else { H5_FAILED(); }
+ if(pass) { PASSED(); } else { H5_FAILED(); }
- if ( ! pass ) {
+ if(!pass) {
HDfprintf(stdout, "%s: failure_mssg = \"%s\".\n",
FUNC, failure_mssg);
@@ -16594,7 +16594,7 @@ check_double_unprotect_err(void)
* -- should succeed.
*/
- if ( pass ) {
+ if(pass) {
reset_entries();
@@ -16608,12 +16608,12 @@ check_double_unprotect_err(void)
entry_ptr = &((entries[0])[0]);
}
- if ( pass ) {
+ if(pass) {
result = H5C_unprotect(file_ptr, H5AC_ind_read_dxpl_id,
entry_ptr->addr, (void *)entry_ptr, H5C__NO_FLAGS_SET);
- if ( result > 0 ) {
+ if(result > 0) {
pass = FALSE;
failure_mssg =
@@ -16621,14 +16621,14 @@ check_double_unprotect_err(void)
}
}
- if ( pass ) {
+ if(pass) {
takedown_cache(file_ptr, FALSE, FALSE);
}
- if ( pass ) { PASSED(); } else { H5_FAILED(); }
+ if(pass) { PASSED(); } else { H5_FAILED(); }
- if ( ! pass ) {
+ if(!pass) {
HDfprintf(stdout, "%s: failure_mssg = \"%s\".\n",
FUNC, failure_mssg);
@@ -16673,7 +16673,7 @@ check_mark_entry_dirty_errs(void)
* Destroy the cache -- should succeed.
*/
- if ( pass ) {
+ if(pass) {
reset_entries();
@@ -16687,12 +16687,12 @@ check_mark_entry_dirty_errs(void)
entry_ptr = &((entries[0])[0]);
}
- if ( pass ) {
+ if(pass) {
result = H5C_mark_entry_dirty((void *)entry_ptr);
- if ( result > 0 ) {
+ if(result > 0) {
pass = FALSE;
failure_mssg =
@@ -16700,14 +16700,14 @@ check_mark_entry_dirty_errs(void)
}
}
- if ( pass ) {
+ if(pass) {
takedown_cache(file_ptr, FALSE, FALSE);
}
- if ( pass ) { PASSED(); } else { H5_FAILED(); }
+ if(pass) { PASSED(); } else { H5_FAILED(); }
- if ( ! pass ) {
+ if(!pass) {
HDfprintf(stdout, "%s: failure_mssg = \"%s\".\n",
FUNC, failure_mssg);
@@ -16759,7 +16759,7 @@ check_expunge_entry_errs(void)
* Destroy the cache -- should succeed.
*/
- if ( pass ) {
+ if(pass) {
reset_entries();
@@ -16772,12 +16772,12 @@ check_expunge_entry_errs(void)
}
- if ( pass ) {
+ if(pass) {
result = H5C_expunge_entry(file_ptr, H5AC_ind_read_dxpl_id,
&(types[0]), entry_ptr->addr, H5C__NO_FLAGS_SET);
- if ( result > 0 ) {
+ if(result > 0) {
pass = FALSE;
failure_mssg =
@@ -16790,12 +16790,12 @@ check_expunge_entry_errs(void)
}
}
- if ( pass ) {
+ if(pass) {
result = H5C_expunge_entry(file_ptr, H5AC_ind_read_dxpl_id,
&(types[0]), entry_ptr->addr, H5C__NO_FLAGS_SET);
- if ( result > 0 ) {
+ if(result > 0) {
pass = FALSE;
failure_mssg =
@@ -16808,12 +16808,12 @@ check_expunge_entry_errs(void)
}
}
- if ( pass ) {
+ if(pass) {
result = H5C_expunge_entry(file_ptr, H5AC_ind_read_dxpl_id,
&(types[0]), entry_ptr->addr, H5C__NO_FLAGS_SET);
- if ( result < 0 ) {
+ if(result < 0) {
pass = FALSE;
failure_mssg =
@@ -16823,14 +16823,14 @@ check_expunge_entry_errs(void)
}
- if ( pass ) {
+ if(pass) {
takedown_cache(file_ptr, FALSE, FALSE);
}
- if ( pass ) { PASSED(); } else { H5_FAILED(); }
+ if(pass) { PASSED(); } else { H5_FAILED(); }
- if ( ! pass ) {
+ if(!pass) {
HDfprintf(stdout, "%s: failure_mssg = \"%s\".\n",
FUNC, failure_mssg);
@@ -16877,7 +16877,7 @@ check_resize_entry_errs(void)
* This should succeed.
*/
- if ( pass ) {
+ if(pass) {
reset_entries();
@@ -16890,11 +16890,11 @@ check_resize_entry_errs(void)
}
- if ( pass ) {
+ if(pass) {
result = H5C_resize_entry((void *)entry_ptr, (size_t)1);
- if ( result < 0 ) {
+ if(result < 0) {
pass = FALSE;
failure_mssg =
@@ -16907,11 +16907,11 @@ check_resize_entry_errs(void)
}
}
- if ( pass ) {
+ if(pass) {
result = H5C_resize_entry((void *)entry_ptr, (size_t)0);
- if ( result >= 0 ) {
+ if(result >= 0) {
pass = FALSE;
failure_mssg =
@@ -16924,14 +16924,14 @@ check_resize_entry_errs(void)
}
}
- if ( pass ) {
+ if(pass) {
takedown_cache(file_ptr, FALSE, FALSE);
}
- if ( pass ) { PASSED(); } else { H5_FAILED(); }
+ if(pass) { PASSED(); } else { H5_FAILED(); }
- if ( ! pass ) {
+ if(!pass) {
HDfprintf(stdout, "%s: failure_mssg = \"%s\".\n",
FUNC, failure_mssg);
@@ -16972,7 +16972,7 @@ check_unprotect_ro_dirty_err(void)
* -- should succeed.
*/
- if ( pass ) {
+ if(pass) {
reset_entries();
@@ -16984,12 +16984,12 @@ check_unprotect_ro_dirty_err(void)
entry_ptr = &((entries[0])[0]);
}
- if ( pass ) {
+ if(pass) {
result = H5C_unprotect(file_ptr, H5AC_ind_read_dxpl_id,
entry_ptr->addr, (void *)entry_ptr, H5C__DIRTIED_FLAG);
- if ( result >= 0 ) {
+ if(result >= 0) {
pass = FALSE;
failure_mssg =
@@ -16997,13 +16997,13 @@ check_unprotect_ro_dirty_err(void)
}
}
- if ( pass ) {
+ if(pass) {
unprotect_entry(file_ptr, 0, 0, H5C__NO_FLAGS_SET);
}
- if ( pass ) {
+ if(pass) {
takedown_cache(file_ptr, FALSE, FALSE);
}
@@ -17014,7 +17014,7 @@ check_unprotect_ro_dirty_err(void)
* This should succeed.
*/
- if ( pass ) {
+ if(pass) {
reset_entries();
@@ -17027,12 +17027,12 @@ check_unprotect_ro_dirty_err(void)
entry_ptr = &((entries[0])[0]);
}
- if ( pass ) {
+ if(pass) {
result = H5C_unprotect(file_ptr, H5AC_ind_read_dxpl_id,
entry_ptr->addr, (void *)entry_ptr, H5C__DIRTIED_FLAG);
- if ( result > 0 ) {
+ if(result > 0) {
pass = FALSE;
failure_mssg =
@@ -17040,21 +17040,21 @@ check_unprotect_ro_dirty_err(void)
}
}
- if ( pass ) {
+ if(pass) {
unprotect_entry(file_ptr, 0, 0, H5C__NO_FLAGS_SET);
unprotect_entry(file_ptr, 0, 0, H5C__NO_FLAGS_SET);
}
- if ( pass ) {
+ if(pass) {
takedown_cache(file_ptr, FALSE, FALSE);
}
- if ( pass ) { PASSED(); } else { H5_FAILED(); }
+ if(pass) { PASSED(); } else { H5_FAILED(); }
- if ( ! pass ) {
+ if(!pass) {
HDfprintf(stdout, "%s: failure_mssg = \"%s\".\n",
FUNC, failure_mssg);
@@ -17100,7 +17100,7 @@ check_protect_ro_rw_err(void)
* Unprotect the entry and destroy the cache -- should succeed.
*/
- if ( pass ) {
+ if(pass) {
reset_entries();
@@ -17112,32 +17112,32 @@ check_protect_ro_rw_err(void)
entry_ptr = &((entries[0])[0]);
}
- if ( pass ) {
+ if(pass) {
thing_ptr = (H5C_cache_entry_t *)H5C_protect(file_ptr, H5AC_ind_read_dxpl_id,
&(types[0]), entry_ptr->addr,
&entry_ptr->addr, H5C__NO_FLAGS_SET);
- if ( thing_ptr != NULL ) {
+ if(thing_ptr != NULL) {
pass = FALSE;
failure_mssg = "attempt to protect a ro entry rw succeeded.\n";
}
}
- if ( pass ) {
+ if(pass) {
unprotect_entry(file_ptr, 0, 0, H5C__NO_FLAGS_SET);
}
- if ( pass ) {
+ if(pass) {
takedown_cache(file_ptr, FALSE, FALSE);
}
- if ( pass ) { PASSED(); } else { H5_FAILED(); }
+ if(pass) { PASSED(); } else { H5_FAILED(); }
- if ( ! pass ) {
+ if(!pass) {
HDfprintf(stdout, "%s: failure_mssg = \"%s\".\n",
FUNC, failure_mssg);
@@ -17191,7 +17191,7 @@ check_check_evictions_enabled_err(void)
* Unprotect the entry and destroy the cache -- should succeed.
*/
- if ( pass ) {
+ if(pass) {
reset_entries();
@@ -17200,33 +17200,33 @@ check_check_evictions_enabled_err(void)
cache_ptr = file_ptr->shared->cache;
}
- if ( pass ) {
+ if(pass) {
result = H5C_get_evictions_enabled(NULL, &evictions_enabled);
- if ( result == SUCCEED ) {
+ if(result == SUCCEED) {
pass = FALSE;
failure_mssg = "H5C_get_evictions_enabled succeeded() 1.\n";
}
}
- if ( pass ) {
+ if(pass) {
result = H5C_get_evictions_enabled(cache_ptr, NULL);
- if ( result == SUCCEED ) {
+ if(result == SUCCEED) {
pass = FALSE;
failure_mssg = "H5C_get_evictions_enabled succeeded() 2.\n";
}
}
- if ( pass ) {
+ if(pass) {
result = H5C_set_evictions_enabled(cache_ptr, TRUE);
- if ( result != SUCCEED ) {
+ if(result != SUCCEED) {
pass = FALSE;
failure_mssg = "H5C_set_evictions_enabled failed().\n";
@@ -17234,31 +17234,31 @@ check_check_evictions_enabled_err(void)
}
}
- if ( pass ) {
+ if(pass) {
(cache_ptr->resize_ctl).incr_mode = H5C_incr__threshold;
result = H5C_get_evictions_enabled(cache_ptr, FALSE);
- if ( result == SUCCEED ) {
+ if(result == SUCCEED) {
pass = FALSE;
failure_mssg = "H5C_get_evictions_enabled succeeded() 1.\n";
- } else if ( cache_ptr->evictions_enabled == TRUE ) {
+ } else if(cache_ptr->evictions_enabled == TRUE) {
}
(cache_ptr->resize_ctl).incr_mode = H5C_incr__off;
}
- if ( pass ) {
+ if(pass) {
(cache_ptr->resize_ctl).decr_mode = H5C_decr__threshold;
result = H5C_get_evictions_enabled(cache_ptr, FALSE);
- if ( result == SUCCEED ) {
+ if(result == SUCCEED) {
pass = FALSE;
failure_mssg = "H5C_get_evictions_enabled succeeded() 2.\n";
@@ -17268,14 +17268,14 @@ check_check_evictions_enabled_err(void)
}
- if ( cache_ptr ) {
+ if(cache_ptr) {
takedown_cache(file_ptr, FALSE, FALSE);
}
- if ( pass ) { PASSED(); } else { H5_FAILED(); }
+ if(pass) { PASSED(); } else { H5_FAILED(); }
- if ( ! pass ) {
+ if(!pass) {
HDfprintf(stdout, "%s: failure_mssg = \"%s\".\n",
FUNC, failure_mssg);
@@ -17377,343 +17377,325 @@ check_auto_cache_resize(hbool_t cork_ageout)
pass = TRUE;
- if ( show_progress ) HDfprintf(stderr, "check point %d\n", checkpoint++);
+ if(show_progress) HDfprintf(stderr, "check point %d\n", checkpoint++);
/* allocate a cache, enable automatic cache resizing, and then force
* the cache through all its operational modes. Verify that all
* performs as expected.
*/
- if ( pass ) {
-
+ if(pass) {
reset_entries();
- file_ptr = setup_cache((size_t)(2 * 1024),
- (size_t)(1 * 1024));
+ file_ptr = setup_cache((size_t)(2 * 1024), (size_t)(1 * 1024));
cache_ptr = file_ptr->shared->cache;
}
- if ( pass ) {
-
+ if(pass) {
result = H5C_set_cache_auto_resize_config(cache_ptr, &auto_size_ctl);
-
- if ( result != SUCCEED ) {
-
+ if(result != SUCCEED) {
pass = FALSE;
failure_mssg = "H5C_set_cache_auto_resize_config failed 1.\n";
}
}
- if ( pass ) {
-
- if ( ( cache_ptr->max_cache_size != (512 * 1024) ) ||
- ( cache_ptr->min_clean_size != (256 * 1024) ) ) {
+ if(pass) {
+ if((cache_ptr->max_cache_size != (512 * 1024)) ||
+ (cache_ptr->min_clean_size != (256 * 1024))) {
pass = FALSE;
failure_mssg = "bad cache size after initialization.\n";
}
}
- if ( show_progress ) HDfprintf(stderr, "check point %d\n", checkpoint++);
+ if(show_progress) HDfprintf(stderr, "check point %d\n", checkpoint++);
/* force low hit rate with cache not full -- should result in not
* full status.
*/
- if ( pass ) {
-
+ if(pass) {
rpt_fcn_called = FALSE;
i = 0;
- while ( ( pass ) && ( i < 1000 ) )
- {
+ while(pass && (i < 1000)) {
protect_entry(file_ptr, PICO_ENTRY_TYPE, i);
- if ( pass ) {
+ if(pass)
unprotect_entry(file_ptr, PICO_ENTRY_TYPE, i, H5C__NO_FLAGS_SET);
- }
i++;
}
- if ( ( ! rpt_fcn_called ) ||
- ( rpt_status != not_full ) ||
- ( cache_ptr->max_cache_size != (512 * 1024) ) ||
- ( cache_ptr->min_clean_size != (256 * 1024) ) ) {
+ if((!rpt_fcn_called) ||
+ (rpt_status != not_full) ||
+ (cache_ptr->max_cache_size != (512 * 1024)) ||
+ (cache_ptr->min_clean_size != (256 * 1024))) {
pass = FALSE;
failure_mssg = "Unexpected cache size change results 1.\n";
}
}
- if ( show_progress ) HDfprintf(stderr, "check point %d\n", checkpoint++);
+ if(show_progress) HDfprintf(stderr, "check point %d\n", checkpoint++);
/* force low hit rate with cache full -- should result in increase
* of cache size from .5 to 1 meg.
*/
- if ( pass ) {
+ if(pass) {
rpt_fcn_called = FALSE;
i = 0;
- while ( ( pass ) && ( i < 1000 ) )
+ while(pass && (i < 1000))
{
protect_entry(file_ptr, MONSTER_ENTRY_TYPE, i);
- if ( pass ) {
+ if(pass)
unprotect_entry(file_ptr, MONSTER_ENTRY_TYPE, i, H5C__NO_FLAGS_SET);
- }
i++;
}
- if ( ( ! rpt_fcn_called ) ||
- ( rpt_status != increase ) ||
- ( cache_ptr->max_cache_size != (1 * 1024 * 1024) ) ||
- ( cache_ptr->min_clean_size != (512 * 1024) ) ) {
+ if((!rpt_fcn_called) ||
+ (rpt_status != increase) ||
+ (cache_ptr->max_cache_size != (1 * 1024 * 1024)) ||
+ (cache_ptr->min_clean_size != (512 * 1024))) {
pass = FALSE;
failure_mssg = "Unexpected cache size change results 2.\n";
}
}
- if ( show_progress ) HDfprintf(stderr, "check point %d\n", checkpoint++);
+ if(show_progress) HDfprintf(stderr, "check point %d\n", checkpoint++);
/* force low hit rate with cache not full -- should result in not
* full status.
*/
- if ( pass ) {
+ if(pass) {
rpt_fcn_called = FALSE;
i = 0;
- while ( ( pass ) && ( i < 1000 ) )
+ while(pass && (i < 1000))
{
protect_entry(file_ptr, PICO_ENTRY_TYPE, i);
- if ( pass ) {
+ if(pass)
unprotect_entry(file_ptr, PICO_ENTRY_TYPE, i, H5C__NO_FLAGS_SET);
- }
i++;
}
- if ( ( ! rpt_fcn_called ) ||
- ( rpt_status != not_full ) ||
- ( cache_ptr->max_cache_size != (1 * 1024 * 1024) ) ||
- ( cache_ptr->min_clean_size != (512 * 1024) ) ) {
+ if((!rpt_fcn_called) ||
+ (rpt_status != not_full) ||
+ (cache_ptr->max_cache_size != (1 * 1024 * 1024)) ||
+ (cache_ptr->min_clean_size != (512 * 1024))) {
pass = FALSE;
failure_mssg = "Unexpected cache size change results 3.\n";
}
}
- if ( show_progress ) HDfprintf(stderr, "check point %d\n", checkpoint++);
+ if(show_progress) HDfprintf(stderr, "check point %d\n", checkpoint++);
/* force low hit rate with cache full again -- should result in increase
* of cache size from 1 to 2 meg.
*/
- if ( pass ) {
+ if(pass) {
rpt_fcn_called = FALSE;
i = 0;
- while ( ( pass ) && ( i < 1000 ) )
+ while(pass && (i < 1000))
{
protect_entry(file_ptr, MONSTER_ENTRY_TYPE, i);
- if ( pass ) {
+ if(pass)
unprotect_entry(file_ptr, MONSTER_ENTRY_TYPE, i, H5C__NO_FLAGS_SET);
- }
i++;
}
- if ( ( ! rpt_fcn_called ) ||
- ( rpt_status != increase ) ||
- ( cache_ptr->max_cache_size != (2 * 1024 * 1024) ) ||
- ( cache_ptr->min_clean_size != (1 * 1024 * 1024) ) ) {
+ if((!rpt_fcn_called) ||
+ (rpt_status != increase) ||
+ (cache_ptr->max_cache_size != (2 * 1024 * 1024)) ||
+ (cache_ptr->min_clean_size != (1 * 1024 * 1024))) {
pass = FALSE;
failure_mssg = "Unexpected cache size change results 4.\n";
}
}
- if ( show_progress ) HDfprintf(stderr, "check point %d\n", checkpoint++);
+ if(show_progress) HDfprintf(stderr, "check point %d\n", checkpoint++);
/* force low hit rate with cache full again -- should result in increase
* of cache size from 2 to 4 meg.
*/
- if ( pass ) {
+ if(pass) {
rpt_fcn_called = FALSE;
i = 0;
- while ( ( pass ) && ( i < 1000 ) )
+ while(pass && (i < 1000))
{
protect_entry(file_ptr, MONSTER_ENTRY_TYPE, i);
- if ( pass ) {
+ if(pass)
unprotect_entry(file_ptr, MONSTER_ENTRY_TYPE, i, H5C__NO_FLAGS_SET);
- }
i++;
}
- if ( ( ! rpt_fcn_called ) ||
- ( rpt_status != increase ) ||
- ( cache_ptr->max_cache_size != (4 * 1024 * 1024) ) ||
- ( cache_ptr->min_clean_size != (2 * 1024 * 1024) ) ) {
+ if((!rpt_fcn_called) ||
+ (rpt_status != increase) ||
+ (cache_ptr->max_cache_size != (4 * 1024 * 1024)) ||
+ (cache_ptr->min_clean_size != (2 * 1024 * 1024))) {
pass = FALSE;
failure_mssg = "Unexpected cache size change results 5.\n";
}
}
- if ( show_progress ) HDfprintf(stderr, "check point %d\n", checkpoint++);
+ if(show_progress) HDfprintf(stderr, "check point %d\n", checkpoint++);
/* force low hit rate with cache full again -- should result in increase
* of cache size from 4 to 8 meg.
*/
- if ( pass ) {
+ if(pass) {
rpt_fcn_called = FALSE;
i = 0;
- while ( ( pass ) && ( i < 1000 ) )
+ while(pass && (i < 1000))
{
protect_entry(file_ptr, MONSTER_ENTRY_TYPE, i);
- if ( pass ) {
+ if(pass)
unprotect_entry(file_ptr, MONSTER_ENTRY_TYPE, i, H5C__NO_FLAGS_SET);
- }
i++;
}
- if ( ( ! rpt_fcn_called ) ||
- ( rpt_status != increase ) ||
- ( cache_ptr->max_cache_size != (8 * 1024 * 1024) ) ||
- ( cache_ptr->min_clean_size != (4 * 1024 * 1024) ) ) {
+ if((!rpt_fcn_called) ||
+ (rpt_status != increase) ||
+ (cache_ptr->max_cache_size != (8 * 1024 * 1024)) ||
+ (cache_ptr->min_clean_size != (4 * 1024 * 1024))) {
pass = FALSE;
failure_mssg = "Unexpected cache size change results 6.\n";
}
}
- if ( show_progress ) HDfprintf(stderr, "check point %d\n", checkpoint++);
+ if(show_progress) HDfprintf(stderr, "check point %d\n", checkpoint++);
/* force low hit rate with cache full again -- should result in increase
* of cache size from 8 to 12 meg. Note that max increase reduced the
* size of the increase.
*/
- if ( pass ) {
+ if(pass) {
rpt_fcn_called = FALSE;
i = 0;
- while ( ( pass ) && ( i < 1000 ) )
+ while(pass && (i < 1000))
{
protect_entry(file_ptr, MONSTER_ENTRY_TYPE, i);
- if ( pass ) {
+ if(pass)
unprotect_entry(file_ptr, MONSTER_ENTRY_TYPE, i, H5C__NO_FLAGS_SET);
- }
i++;
}
- if ( ( ! rpt_fcn_called ) ||
- ( rpt_status != increase ) ||
- ( cache_ptr->max_cache_size != (12 * 1024 * 1024) ) ||
- ( cache_ptr->min_clean_size != (6 * 1024 * 1024) ) ) {
+ if((!rpt_fcn_called) ||
+ (rpt_status != increase) ||
+ (cache_ptr->max_cache_size != (12 * 1024 * 1024)) ||
+ (cache_ptr->min_clean_size != (6 * 1024 * 1024))) {
pass = FALSE;
failure_mssg = "Unexpected cache size change results 7.\n";
}
}
- if ( show_progress ) HDfprintf(stderr, "check point %d\n", checkpoint++);
+ if(show_progress) HDfprintf(stderr, "check point %d\n", checkpoint++);
/* force low hit rate with cache full again -- should result in increase
* of cache size from 12 to 14 meg.
*/
- if ( pass ) {
+ if(pass) {
rpt_fcn_called = FALSE;
i = 0;
- while ( ( pass ) && ( i < 1000 ) )
+ while(pass && (i < 1000))
{
protect_entry(file_ptr, MONSTER_ENTRY_TYPE, i);
- if ( pass ) {
+ if(pass)
unprotect_entry(file_ptr, MONSTER_ENTRY_TYPE, i, H5C__NO_FLAGS_SET);
- }
i++;
}
- if ( ( ! rpt_fcn_called ) ||
- ( rpt_status != increase ) ||
- ( cache_ptr->max_cache_size != (14 * 1024 * 1024) ) ||
- ( cache_ptr->min_clean_size != (7 * 1024 * 1024) ) ) {
+ if((!rpt_fcn_called) ||
+ (rpt_status != increase) ||
+ (cache_ptr->max_cache_size != (14 * 1024 * 1024)) ||
+ (cache_ptr->min_clean_size != (7 * 1024 * 1024))) {
pass = FALSE;
failure_mssg = "Unexpected cache size change results 8.\n";
}
}
- if ( show_progress ) HDfprintf(stderr, "check point %d\n", checkpoint++);
+ if(show_progress) HDfprintf(stderr, "check point %d\n", checkpoint++);
/* force low hit rate with cache full and at maximum size -- should
* in no change in size and a result of at_max_size.
*/
- if ( pass ) {
+ if(pass) {
rpt_fcn_called = FALSE;
i = 0;
- while ( ( pass ) && ( i < 1000 ) )
+ while(pass && (i < 1000))
{
protect_entry(file_ptr, MONSTER_ENTRY_TYPE, i);
- if ( pass ) {
+ if(pass)
unprotect_entry(file_ptr, MONSTER_ENTRY_TYPE, i, H5C__NO_FLAGS_SET);
- }
i++;
}
- if ( ( ! rpt_fcn_called ) ||
- ( rpt_status != at_max_size ) ||
- ( cache_ptr->max_cache_size != (14 * 1024 * 1024) ) ||
- ( cache_ptr->min_clean_size != (7 * 1024 * 1024) ) ) {
+ if((!rpt_fcn_called) ||
+ (rpt_status != at_max_size) ||
+ (cache_ptr->max_cache_size != (14 * 1024 * 1024)) ||
+ (cache_ptr->min_clean_size != (7 * 1024 * 1024))) {
pass = FALSE;
failure_mssg = "Unexpected cache size change results 9.\n";
}
}
- if ( show_progress ) HDfprintf(stderr, "check point %d\n", checkpoint++);
+ if(show_progress) HDfprintf(stderr, "check point %d\n", checkpoint++);
/* force high hit rate with cache full and at maximum size -- should
* result in a decrease from 14 to 13 Meg -- note that max decrease
* reduced the size of the reduction
*/
- if ( pass ) {
+ if(pass) {
rpt_fcn_called = FALSE;
i = 0;
- while ( ( pass ) && ( i < 1000 ) )
+ while(pass && (i < 1000))
{
protect_entry(file_ptr, MONSTER_ENTRY_TYPE, 0);
- if ( pass ) {
+ if(pass)
unprotect_entry(file_ptr, MONSTER_ENTRY_TYPE, 0, H5C__NO_FLAGS_SET);
- }
i++;
}
- if ( ( ! rpt_fcn_called ) ||
- ( rpt_status != decrease ) ||
- ( cache_ptr->max_cache_size != (13 * 1024 * 1024) ) ||
- ( cache_ptr->min_clean_size != (6 * 1024 * 1024 + 512 * 1024) ) ) {
+ if((!rpt_fcn_called) ||
+ (rpt_status != decrease) ||
+ (cache_ptr->max_cache_size != (13 * 1024 * 1024)) ||
+ (cache_ptr->min_clean_size != (6 * 1024 * 1024 + 512 * 1024))) {
pass = FALSE;
failure_mssg = "Unexpected cache size change results 10.\n";
}
}
- if ( show_progress ) HDfprintf(stderr, "check point %d\n", checkpoint++);
+ if(show_progress) HDfprintf(stderr, "check point %d\n", checkpoint++);
/* the current cache configuration is inconvenient for testing cache
* size reduction, so lets change it some something easier to work
* with.
*/
- if ( pass ) {
+ if(pass) {
auto_size_ctl.version = H5C__CURR_AUTO_SIZE_CTL_VER;
auto_size_ctl.rpt_fcn = test_rpt_fcn;
@@ -17757,306 +17739,295 @@ check_auto_cache_resize(hbool_t cork_ageout)
auto_size_ctl.empty_reserve = 0.05f;
result = H5C_set_cache_auto_resize_config(cache_ptr, &auto_size_ctl);
-
- if ( result != SUCCEED ) {
-
+ if(result != SUCCEED) {
pass = FALSE;
failure_mssg = "H5C_set_cache_auto_resize_config failed 2.\n";
}
}
- if ( pass ) {
+ if(pass) {
- if ( ( cache_ptr->max_cache_size != (4 * 1000 * 1000 + 10) ) ||
- ( cache_ptr->min_clean_size != (400 * 1000 + 1) ) ) {
+ if((cache_ptr->max_cache_size != (4 * 1000 * 1000 + 10)) ||
+ (cache_ptr->min_clean_size != (400 * 1000 + 1))) {
pass = FALSE;
failure_mssg = "bad cache size after set resize re-config 1.\n";
}
}
- if ( show_progress ) HDfprintf(stderr, "check point %d\n", checkpoint++);
+ if(show_progress) HDfprintf(stderr, "check point %d\n", checkpoint++);
/* force high hit rate -- should result in a decrease from ~4 to ~3
* M -- note that max decrease reduces the size of the reduction
*/
- if ( pass ) {
+ if(pass) {
rpt_fcn_called = FALSE;
i = 0;
- while ( ( pass ) && ( i < 1000 ) )
+ while(pass && (i < 1000))
{
protect_entry(file_ptr, MONSTER_ENTRY_TYPE, 0);
- if ( pass ) {
+ if(pass)
unprotect_entry(file_ptr, MONSTER_ENTRY_TYPE, 0, H5C__NO_FLAGS_SET);
- }
i++;
}
- if ( ( ! rpt_fcn_called ) ||
- ( rpt_status != decrease ) ||
- ( cache_ptr->max_cache_size != (3 * 1000 * 1000 + 10) ) ||
- ( cache_ptr->min_clean_size != (300 * 1000 + 1) ) ) {
+ if((!rpt_fcn_called) ||
+ (rpt_status != decrease) ||
+ (cache_ptr->max_cache_size != (3 * 1000 * 1000 + 10)) ||
+ (cache_ptr->min_clean_size != (300 * 1000 + 1))) {
pass = FALSE;
failure_mssg = "Unexpected cache size change results 11.\n";
}
}
- if ( show_progress ) HDfprintf(stderr, "check point %d\n", checkpoint++);
+ if(show_progress) HDfprintf(stderr, "check point %d\n", checkpoint++);
/* force high hit rate again -- should result in a decrease from ~3
* to ~2 M -- again note that max decrease reduces the size of the
* reduction.
*/
- if ( pass ) {
+ if(pass) {
rpt_fcn_called = FALSE;
i = 0;
- while ( ( pass ) && ( i < 1000 ) )
+ while(pass && (i < 1000))
{
protect_entry(file_ptr, MONSTER_ENTRY_TYPE, 0);
- if ( pass ) {
+ if(pass)
unprotect_entry(file_ptr, MONSTER_ENTRY_TYPE, 0, H5C__NO_FLAGS_SET);
- }
i++;
}
- if ( ( ! rpt_fcn_called ) ||
- ( rpt_status != decrease ) ||
- ( cache_ptr->max_cache_size != (2 * 1000 * 1000 + 10) ) ||
- ( cache_ptr->min_clean_size != (200 * 1000 + 1) ) ) {
+ if((!rpt_fcn_called) ||
+ (rpt_status != decrease) ||
+ (cache_ptr->max_cache_size != (2 * 1000 * 1000 + 10)) ||
+ (cache_ptr->min_clean_size != (200 * 1000 + 1))) {
pass = FALSE;
failure_mssg = "Unexpected cache size change results 12.\n";
}
}
- if ( show_progress ) HDfprintf(stderr, "check point %d\n", checkpoint++);
+ if(show_progress) HDfprintf(stderr, "check point %d\n", checkpoint++);
/* force high hit rate again -- should result in a decrease from ~2
* to ~1 M -- again note that max decrease reduces the size of the
* reduction, but only by five bites.
*/
- if ( pass ) {
+ if(pass) {
rpt_fcn_called = FALSE;
i = 0;
- while ( ( pass ) && ( i < 1000 ) )
+ while(pass && (i < 1000))
{
protect_entry(file_ptr, MONSTER_ENTRY_TYPE, 0);
- if ( pass ) {
+ if(pass)
unprotect_entry(file_ptr, MONSTER_ENTRY_TYPE, 0, H5C__NO_FLAGS_SET);
- }
i++;
}
- if ( ( ! rpt_fcn_called ) ||
- ( rpt_status != decrease ) ||
- ( cache_ptr->max_cache_size != (1 * 1000 * 1000 + 10) ) ||
- ( cache_ptr->min_clean_size != (100 * 1000 + 1) ) ) {
+ if((!rpt_fcn_called) ||
+ (rpt_status != decrease) ||
+ (cache_ptr->max_cache_size != (1 * 1000 * 1000 + 10)) ||
+ (cache_ptr->min_clean_size != (100 * 1000 + 1))) {
pass = FALSE;
failure_mssg = "Unexpected cache size change results 13.\n";
}
}
- if ( show_progress ) HDfprintf(stderr, "check point %d\n", checkpoint++);
+ if(show_progress) HDfprintf(stderr, "check point %d\n", checkpoint++);
/* force high hit rate again -- should result in a decrease from ~1
* to ~0.5 M -- max decrease is no longer a factor. New size is five
* bytes above the minimum.
*/
- if ( pass ) {
+ if(pass) {
rpt_fcn_called = FALSE;
i = 0;
- while ( ( pass ) && ( i < 1000 ) )
+ while(pass && (i < 1000))
{
protect_entry(file_ptr, MONSTER_ENTRY_TYPE, 0);
- if ( pass ) {
+ if(pass)
unprotect_entry(file_ptr, MONSTER_ENTRY_TYPE, 0, H5C__NO_FLAGS_SET);
- }
i++;
}
- if ( ( ! rpt_fcn_called ) ||
- ( rpt_status != decrease ) ||
- ( cache_ptr->max_cache_size != (500 * 1000 + 5) ) ||
- ( cache_ptr->min_clean_size != (50 * 1000) ) ) {
+ if((!rpt_fcn_called) ||
+ (rpt_status != decrease) ||
+ (cache_ptr->max_cache_size != (500 * 1000 + 5)) ||
+ (cache_ptr->min_clean_size != (50 * 1000))) {
pass = FALSE;
failure_mssg = "Unexpected cache size change results 14.\n";
}
}
- if ( show_progress ) HDfprintf(stderr, "check point %d\n", checkpoint++);
+ if(show_progress) HDfprintf(stderr, "check point %d\n", checkpoint++);
/* force high hit rate again -- should result in a decrease of five
* bytes to the minimum cache size.
*/
- if ( pass ) {
+ if(pass) {
rpt_fcn_called = FALSE;
i = 0;
- while ( ( pass ) && ( i < 1000 ) )
+ while(pass && (i < 1000))
{
protect_entry(file_ptr, MONSTER_ENTRY_TYPE, 0);
- if ( pass ) {
+ if(pass)
unprotect_entry(file_ptr, MONSTER_ENTRY_TYPE, 0, H5C__NO_FLAGS_SET);
- }
i++;
}
- if ( ( ! rpt_fcn_called ) ||
- ( rpt_status != decrease ) ||
- ( cache_ptr->max_cache_size != (500 * 1000) ) ||
- ( cache_ptr->min_clean_size != (50 * 1000) ) ) {
+ if((!rpt_fcn_called) ||
+ (rpt_status != decrease) ||
+ (cache_ptr->max_cache_size != (500 * 1000)) ||
+ (cache_ptr->min_clean_size != (50 * 1000))) {
pass = FALSE;
failure_mssg = "Unexpected cache size change results 15.\n";
}
}
- if ( show_progress ) HDfprintf(stderr, "check point %d\n", checkpoint++);
+ if(show_progress) HDfprintf(stderr, "check point %d\n", checkpoint++);
/* force high hit rate again -- Already at minimum size so no change in
* cache size and result should be at_min_size.
*/
- if ( pass ) {
+ if(pass) {
rpt_fcn_called = FALSE;
i = 0;
- while ( ( pass ) && ( i < 1000 ) )
+ while(pass && (i < 1000))
{
protect_entry(file_ptr, MONSTER_ENTRY_TYPE, 0);
- if ( pass ) {
+ if(pass)
unprotect_entry(file_ptr, MONSTER_ENTRY_TYPE, 0, H5C__NO_FLAGS_SET);
- }
i++;
}
- if ( ( ! rpt_fcn_called ) ||
- ( rpt_status != at_min_size ) ||
- ( cache_ptr->max_cache_size != (500 * 1000) ) ||
- ( cache_ptr->min_clean_size != (50 * 1000) ) ) {
+ if((!rpt_fcn_called) ||
+ (rpt_status != at_min_size) ||
+ (cache_ptr->max_cache_size != (500 * 1000)) ||
+ (cache_ptr->min_clean_size != (50 * 1000))) {
pass = FALSE;
failure_mssg = "Unexpected cache size change results 16.\n";
}
}
- if ( show_progress ) HDfprintf(stderr, "check point %d\n", checkpoint++);
+ if(show_progress) HDfprintf(stderr, "check point %d\n", checkpoint++);
/* force in range hit rate -- should be no change in cache size,
* and result should be in_spec.
*/
- if ( pass ) {
+ if(pass) {
rpt_fcn_called = FALSE;
i = 0;
- while ( ( pass ) && ( i < 900 ) )
+ while(pass && (i < 900))
{
protect_entry(file_ptr, MONSTER_ENTRY_TYPE, 0);
- if ( pass ) {
+ if(pass)
unprotect_entry(file_ptr, MONSTER_ENTRY_TYPE, 0, H5C__NO_FLAGS_SET);
- }
i++;
}
- while ( ( pass ) && ( i < 1000 ) )
+ while(pass && (i < 1000))
{
protect_entry(file_ptr, MONSTER_ENTRY_TYPE, i + 1000);
- if ( pass ) {
+ if(pass)
unprotect_entry(file_ptr, MONSTER_ENTRY_TYPE, i + 1000, H5C__NO_FLAGS_SET);
- }
i++;
}
- if ( ( ! rpt_fcn_called ) ||
- ( rpt_status != in_spec ) ||
- ( cache_ptr->max_cache_size != (500 * 1000) ) ||
- ( cache_ptr->min_clean_size != (50 * 1000) ) ) {
+ if((!rpt_fcn_called) ||
+ (rpt_status != in_spec) ||
+ (cache_ptr->max_cache_size != (500 * 1000)) ||
+ (cache_ptr->min_clean_size != (50 * 1000))) {
pass = FALSE;
failure_mssg = "Unexpected cache size change results 17.\n";
}
}
- if ( show_progress ) HDfprintf(stderr, "check point %d\n", checkpoint++);
+ if(show_progress) HDfprintf(stderr, "check point %d\n", checkpoint++);
/* force low hit rate with cache full -- should
* increase cache size from .5 to 1 M.
*/
- if ( pass ) {
+ if(pass) {
rpt_fcn_called = FALSE;
i = 0;
- while ( ( pass ) && ( i < 1000 ) )
+ while(pass && (i < 1000))
{
protect_entry(file_ptr, MONSTER_ENTRY_TYPE, i);
- if ( pass ) {
+ if(pass)
unprotect_entry(file_ptr, MONSTER_ENTRY_TYPE, i, H5C__NO_FLAGS_SET);
- }
i++;
}
- if ( ( ! rpt_fcn_called ) ||
- ( rpt_status != increase ) ||
- ( cache_ptr->max_cache_size != (1 * 1000 * 1000) ) ||
- ( cache_ptr->min_clean_size != (100 * 1000) ) ) {
+ if((!rpt_fcn_called) ||
+ (rpt_status != increase) ||
+ (cache_ptr->max_cache_size != (1 * 1000 * 1000)) ||
+ (cache_ptr->min_clean_size != (100 * 1000))) {
pass = FALSE;
failure_mssg = "Unexpected cache size change results 18.\n";
}
}
- if ( show_progress ) HDfprintf(stderr, "check point %d\n", checkpoint++);
+ if(show_progress) HDfprintf(stderr, "check point %d\n", checkpoint++);
/* force high hit rate -- should result in a decrease to the
* minimum cache size.
*/
- if ( pass ) {
+ if(pass) {
rpt_fcn_called = FALSE;
i = 0;
- while ( ( pass ) && ( i < 1000 ) )
+ while(pass && (i < 1000))
{
protect_entry(file_ptr, MONSTER_ENTRY_TYPE, 0);
- if ( pass ) {
+ if(pass)
unprotect_entry(file_ptr, MONSTER_ENTRY_TYPE, 0, H5C__NO_FLAGS_SET);
- }
i++;
}
+
- if ( ( ! rpt_fcn_called ) ||
- ( rpt_status != decrease ) ||
- ( cache_ptr->max_cache_size != (500 * 1000) ) ||
- ( cache_ptr->min_clean_size != (50 * 1000) ) ) {
+ if((!rpt_fcn_called) ||
+ (rpt_status != decrease) ||
+ (cache_ptr->max_cache_size != (500 * 1000)) ||
+ (cache_ptr->min_clean_size != (50 * 1000))) {
pass = FALSE;
failure_mssg = "Unexpected cache size change results 19.\n";
}
}
- if ( show_progress ) HDfprintf(stderr, "check point %d\n", checkpoint++);
+ if(show_progress) HDfprintf(stderr, "check point %d\n", checkpoint++);
/******************************************************************
* now do some tests with the maximum increase and decrease sizes
* disabled.
******************************************************************/
- if ( pass ) {
+ if(pass) {
auto_size_ctl.version = H5C__CURR_AUTO_SIZE_CTL_VER;
auto_size_ctl.rpt_fcn = test_rpt_fcn;
@@ -18100,141 +18071,135 @@ check_auto_cache_resize(hbool_t cork_ageout)
auto_size_ctl.empty_reserve = 0.05f;
result = H5C_set_cache_auto_resize_config(cache_ptr, &auto_size_ctl);
-
- if ( result != SUCCEED ) {
-
+ if(result != SUCCEED) {
pass = FALSE;
failure_mssg = "H5C_set_cache_auto_resize_config failed 3.\n";
}
}
- if ( pass ) {
+ if(pass) {
- if ( ( cache_ptr->max_cache_size != (4 * 1024 * 1024) ) ||
- ( cache_ptr->min_clean_size != (2 * 1024 * 1024) ) ) {
+ if((cache_ptr->max_cache_size != (4 * 1024 * 1024)) ||
+ (cache_ptr->min_clean_size != (2 * 1024 * 1024))) {
pass = FALSE;
failure_mssg = "bad cache size after set resize re-config 2.\n";
}
}
- if ( show_progress ) HDfprintf(stderr, "check point %d\n", checkpoint++);
+ if(show_progress) HDfprintf(stderr, "check point %d\n", checkpoint++);
/* force high hit rate -- should result in a decrease to the
* minimum cache size.
*/
- if ( pass ) {
+ if(pass) {
rpt_fcn_called = FALSE;
i = 0;
- while ( ( pass ) && ( i < 1000 ) )
+ while(pass && (i < 1000))
{
protect_entry(file_ptr, MONSTER_ENTRY_TYPE, 0);
- if ( pass ) {
+ if(pass)
unprotect_entry(file_ptr, MONSTER_ENTRY_TYPE, 0, H5C__NO_FLAGS_SET);
- }
i++;
}
- if ( ( ! rpt_fcn_called ) ||
- ( rpt_status != decrease ) ||
- ( cache_ptr->max_cache_size != (1 * 1024 * 1024) ) ||
- ( cache_ptr->min_clean_size != (512 * 1024) ) ) {
+ if((!rpt_fcn_called) ||
+ (rpt_status != decrease) ||
+ (cache_ptr->max_cache_size != (1 * 1024 * 1024)) ||
+ (cache_ptr->min_clean_size != (512 * 1024))) {
pass = FALSE;
failure_mssg = "Unexpected cache size change results 20.\n";
}
}
- if ( show_progress ) HDfprintf(stderr, "check point %d\n", checkpoint++);
+ if(show_progress) HDfprintf(stderr, "check point %d\n", checkpoint++);
/* force low hit rate with cache full -- should increase cache size
* from 1 to 4 Meg.
*/
- if ( pass ) {
+ if(pass) {
rpt_fcn_called = FALSE;
i = 0;
- while ( ( pass ) && ( i < 1000 ) )
+ while(pass && (i < 1000))
{
protect_entry(file_ptr, MONSTER_ENTRY_TYPE, i);
- if ( pass ) {
+ if(pass)
unprotect_entry(file_ptr, MONSTER_ENTRY_TYPE, i, H5C__NO_FLAGS_SET);
- }
i++;
}
- if ( ( ! rpt_fcn_called ) ||
- ( rpt_status != increase ) ||
- ( cache_ptr->max_cache_size != (4 * 1024 * 1024) ) ||
- ( cache_ptr->min_clean_size != (2 * 1024 * 1024) ) ) {
+ if((!rpt_fcn_called) ||
+ (rpt_status != increase) ||
+ (cache_ptr->max_cache_size != (4 * 1024 * 1024)) ||
+ (cache_ptr->min_clean_size != (2 * 1024 * 1024))) {
pass = FALSE;
failure_mssg = "Unexpected cache size change results 21.\n";
}
}
- if ( show_progress ) HDfprintf(stderr, "check point %d\n", checkpoint++);
+ if(show_progress) HDfprintf(stderr, "check point %d\n", checkpoint++);
/* force low hit rate again with cache full -- should increase cache
* size from 4 to 16 Meg.
*/
- if ( pass ) {
+ if(pass) {
rpt_fcn_called = FALSE;
i = 0;
- while ( ( pass ) && ( i < 1000 ) )
+ while(pass && (i < 1000))
{
protect_entry(file_ptr, MONSTER_ENTRY_TYPE, i);
- if ( pass ) {
+ if(pass)
unprotect_entry(file_ptr, MONSTER_ENTRY_TYPE, i, H5C__NO_FLAGS_SET);
- }
i++;
}
- if ( ( ! rpt_fcn_called ) ||
- ( rpt_status != increase ) ||
- ( cache_ptr->max_cache_size != (16 * 1024 * 1024) ) ||
- ( cache_ptr->min_clean_size != ( 8 * 1024 * 1024) ) ) {
+ if((!rpt_fcn_called) ||
+ (rpt_status != increase) ||
+ (cache_ptr->max_cache_size != (16 * 1024 * 1024)) ||
+ (cache_ptr->min_clean_size != (8 * 1024 * 1024))) {
pass = FALSE;
failure_mssg = "Unexpected cache size change results 22.\n";
}
}
- if ( show_progress ) HDfprintf(stderr, "check point %d\n", checkpoint++);
+ if(show_progress) HDfprintf(stderr, "check point %d\n", checkpoint++);
/* force high hit rate -- should result in a decrease cache size from
* 16 to 4 Meg.
*/
- if ( pass ) {
+ if(pass) {
rpt_fcn_called = FALSE;
i = 0;
- while ( ( pass ) && ( i < 1000 ) )
+ while(pass && (i < 1000))
{
protect_entry(file_ptr, MONSTER_ENTRY_TYPE, 0);
- if ( pass ) {
+ if(pass)
unprotect_entry(file_ptr, MONSTER_ENTRY_TYPE, 0, H5C__NO_FLAGS_SET);
- }
i++;
}
- if ( ( ! rpt_fcn_called ) ||
- ( rpt_status != decrease ) ||
- ( cache_ptr->max_cache_size != (4 * 1024 * 1024) ) ||
- ( cache_ptr->min_clean_size != (2 * 1024 * 1024) ) ) {
+ if((!rpt_fcn_called) ||
+ (rpt_status != decrease) ||
+ (cache_ptr->max_cache_size != (4 * 1024 * 1024)) ||
+ (cache_ptr->min_clean_size != (2 * 1024 * 1024))) {
pass = FALSE;
failure_mssg = "Unexpected cache size change results 23.\n";
}
}
- if ( show_progress ) HDfprintf(stderr, "check point %d\n", checkpoint++);
+ if(show_progress) HDfprintf(stderr, "check point %d\n", checkpoint++);
/******************************************************************
* We have tested the threshold increment and decrement modes.
@@ -18243,7 +18208,7 @@ check_auto_cache_resize(hbool_t cork_ageout)
* Reconfigure the cache for this testing.
******************************************************************/
- if ( pass ) {
+ if(pass) {
auto_size_ctl.version = H5C__CURR_AUTO_SIZE_CTL_VER;
auto_size_ctl.rpt_fcn = test_rpt_fcn;
@@ -18288,29 +18253,28 @@ check_auto_cache_resize(hbool_t cork_ageout)
auto_size_ctl.empty_reserve = 0.05f;
result = H5C_set_cache_auto_resize_config(cache_ptr, &auto_size_ctl);
-
- if ( result != SUCCEED ) {
-
+ if(result != SUCCEED) {
pass = FALSE;
failure_mssg = "H5C_set_cache_auto_resize_config failed 4.\n";
}
}
- if ( pass ) {
+ if(pass) {
- if ( ( cache_ptr->max_cache_size != (8 * 1024 * 1024) ) ||
- ( cache_ptr->min_clean_size != (4 * 1024 * 1024) ) ) {
+ if((cache_ptr->max_cache_size != (8 * 1024 * 1024)) ||
+ (cache_ptr->min_clean_size != (4 * 1024 * 1024))) {
pass = FALSE;
failure_mssg = "bad cache size after set resize re-config 3.\n";
}
}
- if ( show_progress ) HDfprintf(stderr, "check point %d\n", checkpoint++);
+ if(show_progress) HDfprintf(stderr, "check point %d\n", checkpoint++);
if(cork_ageout)
cork_entry_type(file_ptr, MEDIUM_ENTRY_TYPE);
+
/* fill the cache with 1024 byte entries -- nothing should happen
* for three epochs while the markers are inserted into the cache
*
@@ -18318,341 +18282,305 @@ check_auto_cache_resize(hbool_t cork_ageout)
* increase its size. Since we are already at max size, it will
* not be able to.
*/
- if ( pass ) { /* first epoch */
-
+ if(pass) { /* first epoch */
rpt_fcn_called = FALSE;
i = 0;
- while ( ( pass ) && ( i < 1000 ) )
- {
+ while(pass && (i < 1000)) {
protect_entry(file_ptr, MEDIUM_ENTRY_TYPE, i);
- if ( pass ) {
+ if(pass)
unprotect_entry(file_ptr, MEDIUM_ENTRY_TYPE, i, H5C__NO_FLAGS_SET);
- }
i++;
}
- if ( ( ! rpt_fcn_called ) ||
- ( rpt_status != at_max_size ) ||
- ( cache_ptr->max_cache_size != (8 * 1024 * 1024) ) ||
- ( cache_ptr->min_clean_size != (4 * 1024 * 1024) ) ) {
+ if((!rpt_fcn_called) ||
+ (rpt_status != at_max_size) ||
+ (cache_ptr->max_cache_size != (8 * 1024 * 1024)) ||
+ (cache_ptr->min_clean_size != (4 * 1024 * 1024))) {
pass = FALSE;
failure_mssg = "Unexpected cache size change results 24.\n";
}
}
- if ( show_progress ) HDfprintf(stderr, "check point %d\n", checkpoint++);
-
- if ( pass ) { /* second epoch */
+ if(show_progress) HDfprintf(stderr, "check point %d\n", checkpoint++);
+ if(pass) { /* second epoch */
rpt_fcn_called = FALSE;
i = 1000;
- while ( ( pass ) && ( i < 2000 ) )
- {
+ while(pass && (i < 2000)) {
protect_entry(file_ptr, MEDIUM_ENTRY_TYPE, i);
- if ( pass ) {
+ if(pass)
unprotect_entry(file_ptr, MEDIUM_ENTRY_TYPE, i, H5C__NO_FLAGS_SET);
- }
i++;
}
- if ( ( ! rpt_fcn_called ) ||
- ( rpt_status != at_max_size ) ||
- ( cache_ptr->max_cache_size != (8 * 1024 * 1024) ) ||
- ( cache_ptr->min_clean_size != (4 * 1024 * 1024) ) ) {
+ if((!rpt_fcn_called) ||
+ (rpt_status != at_max_size) ||
+ (cache_ptr->max_cache_size != (8 * 1024 * 1024)) ||
+ (cache_ptr->min_clean_size != (4 * 1024 * 1024))) {
pass = FALSE;
failure_mssg = "Unexpected cache size change results 25.\n";
}
}
- if ( show_progress ) HDfprintf(stderr, "check point %d\n", checkpoint++);
-
- if ( pass ) { /* third epoch */
+ if(show_progress) HDfprintf(stderr, "check point %d\n", checkpoint++);
+ if(pass) { /* third epoch */
rpt_fcn_called = FALSE;
i = 2000;
- while ( ( pass ) && ( i < 3000 ) )
- {
+ while(pass && (i < 3000)) {
protect_entry(file_ptr, MEDIUM_ENTRY_TYPE, i);
- if ( pass ) {
+ if(pass)
unprotect_entry(file_ptr, MEDIUM_ENTRY_TYPE, i, H5C__NO_FLAGS_SET);
- }
i++;
}
- if ( ( ! rpt_fcn_called ) ||
- ( rpt_status != at_max_size ) ||
- ( cache_ptr->max_cache_size != (8 * 1024 * 1024) ) ||
- ( cache_ptr->min_clean_size != (4 * 1024 * 1024) ) ) {
+ if((!rpt_fcn_called) ||
+ (rpt_status != at_max_size) ||
+ (cache_ptr->max_cache_size != (8 * 1024 * 1024)) ||
+ (cache_ptr->min_clean_size != (4 * 1024 * 1024))) {
pass = FALSE;
failure_mssg = "Unexpected cache size change results 26.\n";
}
}
- if ( show_progress ) HDfprintf(stderr, "check point %d\n", checkpoint++);
+ if(show_progress) HDfprintf(stderr, "check point %d\n", checkpoint++);
/* fourth epoch -- If the hit rate were above the lower threshold,
* we would see cache size reduction now. However, nothing will
* happen until we get the hit rate above the lower threshold.
*/
- if ( pass ) {
-
+ if(pass) {
rpt_fcn_called = FALSE;
i = 3000;
- while ( ( pass ) && ( i < 4000 ) )
- {
+ while(pass && (i < 4000)) {
protect_entry(file_ptr, MEDIUM_ENTRY_TYPE, i);
- if ( pass ) {
+ if(pass)
unprotect_entry(file_ptr, MEDIUM_ENTRY_TYPE, i, H5C__NO_FLAGS_SET);
- }
i++;
}
- if ( ( ! rpt_fcn_called ) ||
- ( rpt_status != at_max_size ) ||
- ( cache_ptr->max_cache_size != (8 * 1024 * 1024) ) ||
- ( cache_ptr->min_clean_size != (4 * 1024 * 1024) ) ) {
+ if((!rpt_fcn_called) ||
+ (rpt_status != at_max_size) ||
+ (cache_ptr->max_cache_size != (8 * 1024 * 1024)) ||
+ (cache_ptr->min_clean_size != (4 * 1024 * 1024))) {
pass = FALSE;
failure_mssg = "Unexpected cache size change results 27.\n";
}
}
- if ( show_progress ) HDfprintf(stderr, "check point %d\n", checkpoint++);
+ if(show_progress) HDfprintf(stderr, "check point %d\n", checkpoint++);
/* fifth epoch -- force the hit rate to 100%. We should see cache size
* reduction now.
*/
- if ( pass ) {
-
+ if(pass) {
rpt_fcn_called = FALSE;
i = 3000;
- while ( ( pass ) && ( i < 4000 ) )
- {
+ while(pass && (i < 4000)) {
protect_entry(file_ptr, MEDIUM_ENTRY_TYPE, i);
- if ( pass ) {
+ if(pass)
unprotect_entry(file_ptr, MEDIUM_ENTRY_TYPE, i, H5C__NO_FLAGS_SET);
- }
i++;
}
- if ( ( ! rpt_fcn_called ) ||
- ( rpt_status != decrease ) ||
- ( cache_ptr->max_cache_size != (2001 * 1024) ) ||
- ( cache_ptr->min_clean_size != (int)(2001 * 512) ) ) {
+ if((!rpt_fcn_called) ||
+ (rpt_status != decrease) ||
+ (cache_ptr->max_cache_size != (2001 * 1024)) ||
+ (cache_ptr->min_clean_size != (int)(2001 * 512))) {
pass = FALSE;
failure_mssg = "Unexpected cache size change results 28.\n";
}
}
- if ( show_progress ) HDfprintf(stderr, "check point %d\n", checkpoint++);
+ if(show_progress) HDfprintf(stderr, "check point %d\n", checkpoint++);
/* sixth epoch -- force the hit rate to 100% again.
*/
- if ( pass ) {
-
+ if(pass) {
rpt_fcn_called = FALSE;
i = 3000;
- while ( ( pass ) && ( i < 4000 ) )
- {
+ while(pass && (i < 4000)) {
protect_entry(file_ptr, MEDIUM_ENTRY_TYPE, i);
- if ( pass ) {
+ if(pass)
unprotect_entry(file_ptr, MEDIUM_ENTRY_TYPE, i, H5C__NO_FLAGS_SET);
- }
i++;
}
- if ( ( ! rpt_fcn_called ) ||
- ( rpt_status != decrease ) ||
- ( cache_ptr->max_cache_size != (1001 * 1024) ) ||
- ( cache_ptr->min_clean_size != (int)(1001 * 512) ) ) {
+ if((!rpt_fcn_called) ||
+ (rpt_status != decrease) ||
+ (cache_ptr->max_cache_size != (1001 * 1024)) ||
+ (cache_ptr->min_clean_size != (int)(1001 * 512))) {
pass = FALSE;
failure_mssg = "Unexpected cache size change results 29.\n";
}
}
- if ( show_progress ) HDfprintf(stderr, "check point %d\n", checkpoint++);
+ if(show_progress) HDfprintf(stderr, "check point %d\n", checkpoint++);
/* seventh epoch -- force the hit rate to 100% again.
*/
- if ( pass ) {
-
+ if(pass) {
rpt_fcn_called = FALSE;
i = 3000;
- while ( ( pass ) && ( i < 4000 ) )
- {
+ while(pass && (i < 4000)) {
protect_entry(file_ptr, MEDIUM_ENTRY_TYPE, i);
- if ( pass ) {
+ if(pass)
unprotect_entry(file_ptr, MEDIUM_ENTRY_TYPE, i, H5C__NO_FLAGS_SET);
- }
i++;
}
- if ( ( ! rpt_fcn_called ) ||
- ( rpt_status != decrease ) ||
- ( cache_ptr->max_cache_size != (1000 * 1024) ) ||
- ( cache_ptr->min_clean_size != (int)(1000 * 512) ) ) {
+ if((!rpt_fcn_called) ||
+ (rpt_status != decrease) ||
+ (cache_ptr->max_cache_size != (1000 * 1024)) ||
+ (cache_ptr->min_clean_size != (int)(1000 * 512))) {
pass = FALSE;
failure_mssg = "Unexpected cache size change results 30.\n";
}
}
- if ( show_progress ) HDfprintf(stderr, "check point %d\n", checkpoint++);
+ if(show_progress) HDfprintf(stderr, "check point %d\n", checkpoint++);
/* eigth epoch -- force the hit rate to 100% again -- should be steady
* state.
*/
- if ( pass ) {
-
+ if(pass) {
rpt_fcn_called = FALSE;
i = 3000;
- while ( ( pass ) && ( i < 4000 ) )
- {
+ while(pass && (i < 4000)) {
protect_entry(file_ptr, MEDIUM_ENTRY_TYPE, i);
- if ( pass ) {
+ if(pass)
unprotect_entry(file_ptr, MEDIUM_ENTRY_TYPE, i, H5C__NO_FLAGS_SET);
- }
i++;
}
- if ( ( ! rpt_fcn_called ) ||
- ( rpt_status != in_spec ) ||
- ( cache_ptr->max_cache_size != (1000 * 1024) ) ||
- ( cache_ptr->min_clean_size != (int)(1000 * 512) ) ) {
+ if((!rpt_fcn_called) ||
+ (rpt_status != in_spec) ||
+ (cache_ptr->max_cache_size != (1000 * 1024)) ||
+ (cache_ptr->min_clean_size != (int)(1000 * 512))) {
pass = FALSE;
failure_mssg = "Unexpected cache size change results 31.\n";
}
}
- if ( show_progress ) HDfprintf(stderr, "check point %d\n", checkpoint++);
+ if(show_progress) HDfprintf(stderr, "check point %d\n", checkpoint++);
/* now just bang on one entry -- after three epochs, this should
* get all entries other than the one evicted, and the cache size
* should be decreased to the minimum.
*/
- if ( pass ) { /* ninth epoch */
-
+ if(pass) { /* ninth epoch */
rpt_fcn_called = FALSE;
i = 0;
- while ( ( pass ) && ( i < 1000 ) )
- {
+ while(pass && (i < 1000)) {
protect_entry(file_ptr, MONSTER_ENTRY_TYPE, 0);
- if ( pass ) {
+ if(pass)
unprotect_entry(file_ptr, MONSTER_ENTRY_TYPE, 0, H5C__NO_FLAGS_SET);
- }
i++;
}
- if ( ( ! rpt_fcn_called ) ||
- ( rpt_status != in_spec ) ||
- ( cache_ptr->max_cache_size != (1000 * 1024) ) ||
- ( cache_ptr->min_clean_size != (int)(1000 * 512) ) ) {
+ if((!rpt_fcn_called) ||
+ (rpt_status != in_spec) ||
+ (cache_ptr->max_cache_size != (1000 * 1024)) ||
+ (cache_ptr->min_clean_size != (int)(1000 * 512))) {
pass = FALSE;
failure_mssg = "Unexpected cache size change results 32.\n";
}
}
- if ( show_progress ) HDfprintf(stderr, "check point %d\n", checkpoint++);
-
- if ( pass ) { /* tenth epoch */
+ if(show_progress) HDfprintf(stderr, "check point %d\n", checkpoint++);
+ if(pass) { /* tenth epoch */
rpt_fcn_called = FALSE;
i = 0;
- while ( ( pass ) && ( i < 1000 ) )
- {
+ while(pass && (i < 1000)) {
protect_entry(file_ptr, MONSTER_ENTRY_TYPE, 0);
- if ( pass ) {
+ if(pass)
unprotect_entry(file_ptr, MONSTER_ENTRY_TYPE, 0, H5C__NO_FLAGS_SET);
- }
i++;
}
- if ( ( ! rpt_fcn_called ) ||
- ( rpt_status != in_spec ) ||
- ( cache_ptr->max_cache_size != (1000 * 1024) ) ||
- ( cache_ptr->min_clean_size != (int)(1000 * 512) ) ) {
+ if((!rpt_fcn_called) ||
+ (rpt_status != in_spec) ||
+ (cache_ptr->max_cache_size != (1000 * 1024)) ||
+ (cache_ptr->min_clean_size != (int)(1000 * 512))) {
pass = FALSE;
failure_mssg = "Unexpected cache size change results 33.\n";
}
}
- if ( show_progress ) HDfprintf(stderr, "check point %d\n", checkpoint++);
-
- if ( pass ) { /* eleventh epoch -- cache size reduction */
+ if(show_progress) HDfprintf(stderr, "check point %d\n", checkpoint++);
+ if(pass) { /* eleventh epoch -- cache size reduction */
rpt_fcn_called = FALSE;
i = 0;
- while ( ( pass ) && ( i < 1000 ) )
- {
+ while(pass && (i < 1000)) {
protect_entry(file_ptr, MONSTER_ENTRY_TYPE, 0);
- if ( pass ) {
+ if(pass)
unprotect_entry(file_ptr, MONSTER_ENTRY_TYPE, 0, H5C__NO_FLAGS_SET);
- }
i++;
}
- if ( ( ! rpt_fcn_called ) ||
- ( rpt_status != decrease ) ||
- ( cache_ptr->max_cache_size != (512 * 1024) ) ||
- ( cache_ptr->min_clean_size != (256 * 1024) ) ||
- ( cache_ptr->index_len != 2 ) ||
- ( cache_ptr->index_size !=
- MONSTER_ENTRY_SIZE + MEDIUM_ENTRY_SIZE ) ) {
+ if((!rpt_fcn_called) ||
+ (rpt_status != decrease) ||
+ (cache_ptr->max_cache_size != (512 * 1024)) ||
+ (cache_ptr->min_clean_size != (256 * 1024)) ||
+ (cache_ptr->index_len != 2) ||
+ (cache_ptr->index_size !=
+ MONSTER_ENTRY_SIZE + MEDIUM_ENTRY_SIZE)) {
pass = FALSE;
failure_mssg = "Unexpected cache size change results 34.\n";
}
}
- if ( show_progress ) HDfprintf(stderr, "check point %d\n", checkpoint++);
-
- if ( pass ) { /* twelth epoch -- at minimum size so no more ageouts */
+ if(show_progress) HDfprintf(stderr, "check point %d\n", checkpoint++);
+ if(pass) { /* twelth epoch -- at minimum size so no more ageouts */
rpt_fcn_called = FALSE;
i = 0;
- while ( ( pass ) && ( i < 1000 ) )
- {
+ while(pass && (i < 1000)) {
protect_entry(file_ptr, MONSTER_ENTRY_TYPE, 0);
- if ( pass ) {
+ if(pass)
unprotect_entry(file_ptr, MONSTER_ENTRY_TYPE, 0, H5C__NO_FLAGS_SET);
- }
i++;
}
- if ( ( ! rpt_fcn_called ) ||
- ( rpt_status != at_min_size ) ||
- ( cache_ptr->max_cache_size != (512 * 1024) ) ||
- ( cache_ptr->min_clean_size != (256 * 1024) ) ||
- ( cache_ptr->index_len != 2 ) ||
- ( cache_ptr->index_size !=
- MONSTER_ENTRY_SIZE + MEDIUM_ENTRY_SIZE ) ) {
+ if((!rpt_fcn_called) ||
+ (rpt_status != at_min_size) ||
+ (cache_ptr->max_cache_size != (512 * 1024)) ||
+ (cache_ptr->min_clean_size != (256 * 1024)) ||
+ (cache_ptr->index_len != 2) ||
+ (cache_ptr->index_size !=
+ MONSTER_ENTRY_SIZE + MEDIUM_ENTRY_SIZE)) {
pass = FALSE;
failure_mssg = "Unexpected cache size change results 35.\n";
}
}
- if ( show_progress ) HDfprintf(stderr, "check point %d\n", checkpoint++);
+ if(show_progress) HDfprintf(stderr, "check point %d\n", checkpoint++);
if(cork_ageout)
uncork_entry_type(file_ptr, MEDIUM_ENTRY_TYPE);
@@ -18663,7 +18591,7 @@ check_auto_cache_resize(hbool_t cork_ageout)
* the structure of the test a bit.
*/
- if ( pass ) {
+ if(pass) {
auto_size_ctl.version = H5C__CURR_AUTO_SIZE_CTL_VER;
auto_size_ctl.rpt_fcn = test_rpt_fcn;
@@ -18709,24 +18637,24 @@ check_auto_cache_resize(hbool_t cork_ageout)
result = H5C_set_cache_auto_resize_config(cache_ptr, &auto_size_ctl);
- if ( result != SUCCEED ) {
+ if(result != SUCCEED) {
pass = FALSE;
failure_mssg = "H5C_set_cache_auto_resize_config failed 5.\n";
}
}
- if ( pass ) {
+ if(pass) {
- if ( ( cache_ptr->max_cache_size != (8 * 1024 * 1024) ) ||
- ( cache_ptr->min_clean_size != (4 * 1024 * 1024) ) ) {
+ if((cache_ptr->max_cache_size != (8 * 1024 * 1024)) ||
+ (cache_ptr->min_clean_size != (4 * 1024 * 1024))) {
pass = FALSE;
failure_mssg = "bad cache size after set resize re-config 4.\n";
}
}
- if ( show_progress ) HDfprintf(stderr, "check point %d\n", checkpoint++);
+ if(show_progress) HDfprintf(stderr, "check point %d\n", checkpoint++);
/* fill the cache with 1024 byte entries -- nothing should happen
@@ -18736,462 +18664,446 @@ check_auto_cache_resize(hbool_t cork_ageout)
* increase its size. Since we are already at max size, it will
* not be able to.
*/
- if ( pass ) { /* first epoch */
+ if(pass) { /* first epoch */
rpt_fcn_called = FALSE;
i = 0;
- while ( ( pass ) && ( i < 1000 ) )
+ while(pass && (i < 1000))
{
protect_entry(file_ptr, MEDIUM_ENTRY_TYPE, i);
- if ( pass ) {
+ if(pass)
unprotect_entry(file_ptr, MEDIUM_ENTRY_TYPE, i, H5C__NO_FLAGS_SET);
- }
i++;
}
- if ( ( ! rpt_fcn_called ) ||
- ( rpt_status != at_max_size ) ||
- ( cache_ptr->max_cache_size != (8 * 1024 * 1024) ) ||
- ( cache_ptr->min_clean_size != (4 * 1024 * 1024) ) ) {
+ if((!rpt_fcn_called) ||
+ (rpt_status != at_max_size) ||
+ (cache_ptr->max_cache_size != (8 * 1024 * 1024)) ||
+ (cache_ptr->min_clean_size != (4 * 1024 * 1024))) {
pass = FALSE;
failure_mssg = "Unexpected cache size change results 36.\n";
}
}
- if ( show_progress ) HDfprintf(stderr, "check point %d\n", checkpoint++);
+ if(show_progress) HDfprintf(stderr, "check point %d\n", checkpoint++);
- if ( pass ) { /* second epoch */
+ if(pass) { /* second epoch */
rpt_fcn_called = FALSE;
i = 1000;
- while ( ( pass ) && ( i < 2000 ) )
+ while(pass && (i < 2000))
{
protect_entry(file_ptr, MEDIUM_ENTRY_TYPE, i);
- if ( pass ) {
+ if(pass)
unprotect_entry(file_ptr, MEDIUM_ENTRY_TYPE, i, H5C__NO_FLAGS_SET);
- }
i++;
}
- if ( ( ! rpt_fcn_called ) ||
- ( rpt_status != at_max_size ) ||
- ( cache_ptr->max_cache_size != (8 * 1024 * 1024) ) ||
- ( cache_ptr->min_clean_size != (4 * 1024 * 1024) ) ) {
+ if((!rpt_fcn_called) ||
+ (rpt_status != at_max_size) ||
+ (cache_ptr->max_cache_size != (8 * 1024 * 1024)) ||
+ (cache_ptr->min_clean_size != (4 * 1024 * 1024))) {
pass = FALSE;
failure_mssg = "Unexpected cache size change results 37.\n";
}
}
- if ( show_progress ) HDfprintf(stderr, "check point %d\n", checkpoint++);
+ if(show_progress) HDfprintf(stderr, "check point %d\n", checkpoint++);
- if ( pass ) { /* third epoch */
+ if(pass) { /* third epoch */
rpt_fcn_called = FALSE;
i = 2000;
- while ( ( pass ) && ( i < 3000 ) )
+ while(pass && (i < 3000))
{
protect_entry(file_ptr, MEDIUM_ENTRY_TYPE, i);
- if ( pass ) {
+ if(pass)
unprotect_entry(file_ptr, MEDIUM_ENTRY_TYPE, i, H5C__NO_FLAGS_SET);
- }
i++;
}
- if ( ( ! rpt_fcn_called ) ||
- ( rpt_status != at_max_size ) ||
- ( cache_ptr->max_cache_size != (8 * 1024 * 1024) ) ||
- ( cache_ptr->min_clean_size != (4 * 1024 * 1024) ) ) {
+ if((!rpt_fcn_called) ||
+ (rpt_status != at_max_size) ||
+ (cache_ptr->max_cache_size != (8 * 1024 * 1024)) ||
+ (cache_ptr->min_clean_size != (4 * 1024 * 1024))) {
pass = FALSE;
failure_mssg = "Unexpected cache size change results 38.\n";
}
}
- if ( show_progress ) HDfprintf(stderr, "check point %d\n", checkpoint++);
+ if(show_progress) HDfprintf(stderr, "check point %d\n", checkpoint++);
/* fourth epoch -- If the hit rate were above the lower threshold,
* we would see cache size reduction now. However, nothing will
* happen until we get the hit rate above the lower threshold.
*/
- if ( pass ) {
+ if(pass) {
rpt_fcn_called = FALSE;
i = 3000;
- while ( ( pass ) && ( i < 4000 ) )
+ while(pass && (i < 4000))
{
protect_entry(file_ptr, MEDIUM_ENTRY_TYPE, i);
- if ( pass ) {
+ if(pass)
unprotect_entry(file_ptr, MEDIUM_ENTRY_TYPE, i, H5C__NO_FLAGS_SET);
- }
i++;
}
- if ( ( ! rpt_fcn_called ) ||
- ( rpt_status != at_max_size ) ||
- ( cache_ptr->max_cache_size != (8 * 1024 * 1024) ) ||
- ( cache_ptr->min_clean_size != (4 * 1024 * 1024) ) ) {
+ if((!rpt_fcn_called) ||
+ (rpt_status != at_max_size) ||
+ (cache_ptr->max_cache_size != (8 * 1024 * 1024)) ||
+ (cache_ptr->min_clean_size != (4 * 1024 * 1024))) {
pass = FALSE;
failure_mssg = "Unexpected cache size change results 39.\n";
}
}
- if ( show_progress ) HDfprintf(stderr, "check point %d\n", checkpoint++);
+ if(show_progress) HDfprintf(stderr, "check point %d\n", checkpoint++);
/* fifth epoch -- force the hit rate to 100%. We should see cache size
* reduction now.
*/
- if ( pass ) {
+ if(pass) {
rpt_fcn_called = FALSE;
i = 3000;
- while ( ( pass ) && ( i < 4000 ) )
+ while(pass && (i < 4000))
{
protect_entry(file_ptr, MEDIUM_ENTRY_TYPE, i);
- if ( pass ) {
+ if(pass)
unprotect_entry(file_ptr, MEDIUM_ENTRY_TYPE, i, H5C__NO_FLAGS_SET);
- }
i++;
}
- if ( ( ! rpt_fcn_called ) ||
- ( rpt_status != decrease ) ||
- ( cache_ptr->max_cache_size != (7 * 1024 * 1024) ) ||
- ( cache_ptr->min_clean_size != (7 * 512 * 1024) ) ) {
+ if((!rpt_fcn_called) ||
+ (rpt_status != decrease) ||
+ (cache_ptr->max_cache_size != (7 * 1024 * 1024)) ||
+ (cache_ptr->min_clean_size != (7 * 512 * 1024))) {
pass = FALSE;
failure_mssg = "Unexpected cache size change results 40.\n";
}
}
- if ( show_progress ) HDfprintf(stderr, "check point %d\n", checkpoint++);
+ if(show_progress) HDfprintf(stderr, "check point %d\n", checkpoint++);
/* sixth epoch -- force the hit rate to 100% again.
*/
- if ( pass ) {
+ if(pass) {
rpt_fcn_called = FALSE;
i = 2000;
- while ( ( pass ) && ( i < 3000 ) )
+ while(pass && (i < 3000))
{
protect_entry(file_ptr, MEDIUM_ENTRY_TYPE, i);
- if ( pass ) {
+ if(pass)
unprotect_entry(file_ptr, MEDIUM_ENTRY_TYPE, i, H5C__NO_FLAGS_SET);
- }
i++;
}
- if ( ( ! rpt_fcn_called ) ||
- ( rpt_status != decrease ) ||
- ( cache_ptr->max_cache_size != (6 * 1024 * 1024) ) ||
- ( cache_ptr->min_clean_size != (6 * 512 * 1024) ) ) {
+ if((!rpt_fcn_called) ||
+ (rpt_status != decrease) ||
+ (cache_ptr->max_cache_size != (6 * 1024 * 1024)) ||
+ (cache_ptr->min_clean_size != (6 * 512 * 1024))) {
pass = FALSE;
failure_mssg = "Unexpected cache size change results 41.\n";
}
}
- if ( show_progress ) HDfprintf(stderr, "check point %d\n", checkpoint++);
+ if(show_progress) HDfprintf(stderr, "check point %d\n", checkpoint++);
/* seventh epoch -- keep hit rate at 100%, and keep 2K entries active.
*/
- if ( pass ) {
+ if(pass) {
rpt_fcn_called = FALSE;
i = 3000;
- while ( ( pass ) && ( i < 4000 ) )
+ while(pass && (i < 4000))
{
protect_entry(file_ptr, MEDIUM_ENTRY_TYPE, i);
- if ( pass ) {
+ if(pass)
unprotect_entry(file_ptr, MEDIUM_ENTRY_TYPE, i, H5C__NO_FLAGS_SET);
- }
i++;
}
- if ( ( ! rpt_fcn_called ) ||
- ( rpt_status != decrease ) ||
- ( cache_ptr->max_cache_size != (5 * 1024 * 1024) ) ||
- ( cache_ptr->min_clean_size != (5 * 512 * 1024) ) ) {
+ if((!rpt_fcn_called) ||
+ (rpt_status != decrease) ||
+ (cache_ptr->max_cache_size != (5 * 1024 * 1024)) ||
+ (cache_ptr->min_clean_size != (5 * 512 * 1024))) {
pass = FALSE;
failure_mssg = "Unexpected cache size change results 42.\n";
}
}
- if ( show_progress ) HDfprintf(stderr, "check point %d\n", checkpoint++);
+ if(show_progress) HDfprintf(stderr, "check point %d\n", checkpoint++);
/* eigth epoch -- still 100% hit rate
*/
- if ( pass ) {
+ if(pass) {
rpt_fcn_called = FALSE;
i = 2000;
- while ( ( pass ) && ( i < 3000 ) )
+ while(pass && (i < 3000))
{
protect_entry(file_ptr, MEDIUM_ENTRY_TYPE, i);
- if ( pass ) {
+ if(pass)
unprotect_entry(file_ptr, MEDIUM_ENTRY_TYPE, i, H5C__NO_FLAGS_SET);
- }
i++;
}
- if ( ( ! rpt_fcn_called ) ||
- ( rpt_status != decrease ) ||
- ( cache_ptr->max_cache_size != (4 * 1024 * 1024) ) ||
- ( cache_ptr->min_clean_size != (4 * 512 * 1024) ) ) {
+ if((!rpt_fcn_called) ||
+ (rpt_status != decrease) ||
+ (cache_ptr->max_cache_size != (4 * 1024 * 1024)) ||
+ (cache_ptr->min_clean_size != (4 * 512 * 1024))) {
pass = FALSE;
failure_mssg = "Unexpected cache size change results 43.\n";
}
}
- if ( show_progress ) HDfprintf(stderr, "check point %d\n", checkpoint++);
+ if(show_progress) HDfprintf(stderr, "check point %d\n", checkpoint++);
/* ninth epoch --hit rate at 100%.
*/
- if ( pass ) {
+ if(pass) {
rpt_fcn_called = FALSE;
i = 3000;
- while ( ( pass ) && ( i < 4000 ) )
+ while(pass && (i < 4000))
{
protect_entry(file_ptr, MEDIUM_ENTRY_TYPE, i);
- if ( pass ) {
+ if(pass)
unprotect_entry(file_ptr, MEDIUM_ENTRY_TYPE, i, H5C__NO_FLAGS_SET);
- }
i++;
}
- if ( ( ! rpt_fcn_called ) ||
- ( rpt_status != decrease ) ||
- ( cache_ptr->max_cache_size != (3 * 1024 * 1024) ) ||
- ( cache_ptr->min_clean_size != (3 * 512 * 1024) ) ) {
+ if((!rpt_fcn_called) ||
+ (rpt_status != decrease) ||
+ (cache_ptr->max_cache_size != (3 * 1024 * 1024)) ||
+ (cache_ptr->min_clean_size != (3 * 512 * 1024))) {
pass = FALSE;
failure_mssg = "Unexpected cache size change results 44.\n";
}
}
- if ( show_progress ) HDfprintf(stderr, "check point %d\n", checkpoint++);
+ if(show_progress) HDfprintf(stderr, "check point %d\n", checkpoint++);
/* tenth epoch -- still 100% hit rate
*/
- if ( pass ) {
+ if(pass) {
rpt_fcn_called = FALSE;
i = 2000;
- while ( ( pass ) && ( i < 3000 ) )
+ while(pass && (i < 3000))
{
protect_entry(file_ptr, MEDIUM_ENTRY_TYPE, i);
- if ( pass ) {
+ if(pass)
unprotect_entry(file_ptr, MEDIUM_ENTRY_TYPE, i, H5C__NO_FLAGS_SET);
- }
i++;
}
- if ( ( ! rpt_fcn_called ) ||
- ( rpt_status != decrease ) ||
- ( cache_ptr->max_cache_size != (2 * 1024 * 1024) ) ||
- ( cache_ptr->min_clean_size != (2 * 512 * 1024) ) ) {
+ if((!rpt_fcn_called) ||
+ (rpt_status != decrease) ||
+ (cache_ptr->max_cache_size != (2 * 1024 * 1024)) ||
+ (cache_ptr->min_clean_size != (2 * 512 * 1024))) {
pass = FALSE;
failure_mssg = "Unexpected cache size change results 45.\n";
}
}
- if ( show_progress ) HDfprintf(stderr, "check point %d\n", checkpoint++);
+ if(show_progress) HDfprintf(stderr, "check point %d\n", checkpoint++);
/* eleventh epoch -- hit rate at 100% -- starting to stableize
*/
- if ( pass ) {
+ if(pass) {
rpt_fcn_called = FALSE;
i = 3000;
- while ( ( pass ) && ( i < 4000 ) )
+ while(pass && (i < 4000))
{
protect_entry(file_ptr, MEDIUM_ENTRY_TYPE, i);
- if ( pass ) {
+ if(pass)
unprotect_entry(file_ptr, MEDIUM_ENTRY_TYPE, i, H5C__NO_FLAGS_SET);
- }
i++;
}
- if ( ( ! rpt_fcn_called ) ||
- ( rpt_status != decrease ) ||
- ( cache_ptr->max_cache_size != (2000 * 1024) ) ||
- ( cache_ptr->min_clean_size != (int)(2000 * 512) ) ) {
+ if((!rpt_fcn_called) ||
+ (rpt_status != decrease) ||
+ (cache_ptr->max_cache_size != (2000 * 1024)) ||
+ (cache_ptr->min_clean_size != (int)(2000 * 512))) {
pass = FALSE;
failure_mssg = "Unexpected cache size change results 46.\n";
}
}
- if ( show_progress ) HDfprintf(stderr, "check point %d\n", checkpoint++);
+ if(show_progress) HDfprintf(stderr, "check point %d\n", checkpoint++);
/* twelth epoch -- force the hit rate to 100% again -- should be steady
* state.
*/
- if ( pass ) {
+ if(pass) {
rpt_fcn_called = FALSE;
i = 2000;
- while ( ( pass ) && ( i < 3000 ) )
+ while(pass && (i < 3000))
{
protect_entry(file_ptr, MEDIUM_ENTRY_TYPE, i);
- if ( pass ) {
+ if(pass)
unprotect_entry(file_ptr, MEDIUM_ENTRY_TYPE, i, H5C__NO_FLAGS_SET);
- }
i++;
}
- if ( ( ! rpt_fcn_called ) ||
- ( rpt_status != in_spec ) ||
- ( cache_ptr->max_cache_size != (2000 * 1024) ) ||
- ( cache_ptr->min_clean_size != (int)(2000 * 512) ) ) {
+ if((!rpt_fcn_called) ||
+ (rpt_status != in_spec) ||
+ (cache_ptr->max_cache_size != (2000 * 1024)) ||
+ (cache_ptr->min_clean_size != (int)(2000 * 512))) {
pass = FALSE;
failure_mssg = "Unexpected cache size change results 47.\n";
}
}
- if ( show_progress ) HDfprintf(stderr, "check point %d\n", checkpoint++);
+ if(show_progress) HDfprintf(stderr, "check point %d\n", checkpoint++);
/* now just bang on one entry -- after three epochs, this should
* get all entries other than the one evicted, and the cache size
* should be decreased to the minimum.
*/
- if ( pass ) { /* thirteenth epoch */
+ if(pass) { /* thirteenth epoch */
rpt_fcn_called = FALSE;
i = 0;
- while ( ( pass ) && ( i < 1000 ) )
+ while(pass && (i < 1000))
{
protect_entry(file_ptr, MONSTER_ENTRY_TYPE, 0);
- if ( pass ) {
+ if(pass)
unprotect_entry(file_ptr, MONSTER_ENTRY_TYPE, 0, H5C__NO_FLAGS_SET);
- }
i++;
}
- if ( ( ! rpt_fcn_called ) ||
- ( rpt_status != in_spec ) ||
- ( cache_ptr->max_cache_size != (2000 * 1024) ) ||
- ( cache_ptr->min_clean_size != (int)(2000 * 512) ) ) {
+ if((!rpt_fcn_called) ||
+ (rpt_status != in_spec) ||
+ (cache_ptr->max_cache_size != (2000 * 1024)) ||
+ (cache_ptr->min_clean_size != (int)(2000 * 512))) {
pass = FALSE;
failure_mssg = "Unexpected cache size change results 48.\n";
}
}
- if ( show_progress ) HDfprintf(stderr, "check point %d\n", checkpoint++);
+ if(show_progress) HDfprintf(stderr, "check point %d\n", checkpoint++);
- if ( pass ) { /* fourteenth epoch */
+ if(pass) { /* fourteenth epoch */
rpt_fcn_called = FALSE;
i = 0;
- while ( ( pass ) && ( i < 1000 ) )
+ while(pass && (i < 1000))
{
protect_entry(file_ptr, MONSTER_ENTRY_TYPE, 0);
- if ( pass ) {
+ if(pass)
unprotect_entry(file_ptr, MONSTER_ENTRY_TYPE, 0, H5C__NO_FLAGS_SET);
- }
i++;
}
- if ( ( ! rpt_fcn_called ) ||
- ( rpt_status != decrease ) ||
- ( cache_ptr->max_cache_size !=
- (1001 * 1024 + MONSTER_ENTRY_SIZE) ) ||
- ( cache_ptr->min_clean_size !=
- (1001 * 512 + MONSTER_ENTRY_SIZE / 2) ) ) {
+ if((!rpt_fcn_called) ||
+ (rpt_status != decrease) ||
+ (cache_ptr->max_cache_size !=
+ (1001 * 1024 + MONSTER_ENTRY_SIZE)) ||
+ (cache_ptr->min_clean_size !=
+ (1001 * 512 + MONSTER_ENTRY_SIZE / 2))) {
pass = FALSE;
failure_mssg = "Unexpected cache size change results 49.\n";
}
}
- if ( show_progress ) HDfprintf(stderr, "check point %d\n", checkpoint++);
+ if(show_progress) HDfprintf(stderr, "check point %d\n", checkpoint++);
- if ( pass ) { /* fifteenth epoch -- cache size reduction */
+ if(pass) { /* fifteenth epoch -- cache size reduction */
rpt_fcn_called = FALSE;
i = 0;
- while ( ( pass ) && ( i < 1000 ) )
+ while(pass && (i < 1000))
{
protect_entry(file_ptr, MONSTER_ENTRY_TYPE, 0);
- if ( pass ) {
+ if(pass)
unprotect_entry(file_ptr, MONSTER_ENTRY_TYPE, 0, H5C__NO_FLAGS_SET);
- }
i++;
}
- if ( ( ! rpt_fcn_called ) ||
- ( rpt_status != decrease ) ||
- ( cache_ptr->max_cache_size != (512 * 1024) ) ||
- ( cache_ptr->min_clean_size != (256 * 1024) ) ||
- ( cache_ptr->index_len != 2 ) ||
- ( cache_ptr->index_size !=
- MONSTER_ENTRY_SIZE + MEDIUM_ENTRY_SIZE ) ) {
+ if((!rpt_fcn_called) ||
+ (rpt_status != decrease) ||
+ (cache_ptr->max_cache_size != (512 * 1024)) ||
+ (cache_ptr->min_clean_size != (256 * 1024)) ||
+ (cache_ptr->index_len != 2) ||
+ (cache_ptr->index_size !=
+ MONSTER_ENTRY_SIZE + MEDIUM_ENTRY_SIZE)) {
pass = FALSE;
failure_mssg = "Unexpected cache size change results 50.\n";
}
}
- if ( show_progress ) HDfprintf(stderr, "check point %d\n", checkpoint++);
+ if(show_progress) HDfprintf(stderr, "check point %d\n", checkpoint++);
- if ( pass ) { /* sixteenth epoch -- at minimum size so no more ageouts */
+ if(pass) { /* sixteenth epoch -- at minimum size so no more ageouts */
rpt_fcn_called = FALSE;
i = 0;
- while ( ( pass ) && ( i < 1000 ) )
+ while(pass && (i < 1000))
{
protect_entry(file_ptr, MONSTER_ENTRY_TYPE, 0);
- if ( pass ) {
+ if(pass)
unprotect_entry(file_ptr, MONSTER_ENTRY_TYPE, 0, H5C__NO_FLAGS_SET);
- }
i++;
}
- if ( ( ! rpt_fcn_called ) ||
- ( rpt_status != at_min_size ) ||
- ( cache_ptr->max_cache_size != (512 * 1024) ) ||
- ( cache_ptr->min_clean_size != (256 * 1024) ) ||
- ( cache_ptr->index_len != 2 ) ||
- ( cache_ptr->index_size !=
- MONSTER_ENTRY_SIZE + MEDIUM_ENTRY_SIZE ) ) {
+ if((!rpt_fcn_called) ||
+ (rpt_status != at_min_size) ||
+ (cache_ptr->max_cache_size != (512 * 1024)) ||
+ (cache_ptr->min_clean_size != (256 * 1024)) ||
+ (cache_ptr->index_len != 2) ||
+ (cache_ptr->index_size !=
+ MONSTER_ENTRY_SIZE + MEDIUM_ENTRY_SIZE)) {
pass = FALSE;
failure_mssg = "Unexpected cache size change results 51.\n";
}
}
- if ( show_progress ) HDfprintf(stderr, "check point %d\n", checkpoint++);
+ if(show_progress) HDfprintf(stderr, "check point %d\n", checkpoint++);
/* repeat the test yet again, this time with empty reserve enabled.
* Again, some structural changes in the test are necessary.
*/
- if ( pass ) {
+ if(pass) {
auto_size_ctl.version = H5C__CURR_AUTO_SIZE_CTL_VER;
auto_size_ctl.rpt_fcn = test_rpt_fcn;
@@ -19237,24 +19149,24 @@ check_auto_cache_resize(hbool_t cork_ageout)
result = H5C_set_cache_auto_resize_config(cache_ptr, &auto_size_ctl);
- if ( result != SUCCEED ) {
+ if(result != SUCCEED) {
pass = FALSE;
failure_mssg = "H5C_set_cache_auto_resize_config failed 6.\n";
}
}
- if ( pass ) {
+ if(pass) {
- if ( ( cache_ptr->max_cache_size != (8 * 1024 * 1024) ) ||
- ( cache_ptr->min_clean_size != (4 * 1024 * 1024) ) ) {
+ if((cache_ptr->max_cache_size != (8 * 1024 * 1024)) ||
+ (cache_ptr->min_clean_size != (4 * 1024 * 1024))) {
pass = FALSE;
failure_mssg = "bad cache size after set resize re-config 5.\n";
}
}
- if ( show_progress ) HDfprintf(stderr, "check point %d\n", checkpoint++);
+ if(show_progress) HDfprintf(stderr, "check point %d\n", checkpoint++);
/* fill the cache with 1024 byte entries -- nothing should happen
@@ -19264,341 +19176,329 @@ check_auto_cache_resize(hbool_t cork_ageout)
* increase its size. Since we are already at max size, it will
* not be able to.
*/
- if ( pass ) { /* first epoch */
+ if(pass) { /* first epoch */
rpt_fcn_called = FALSE;
i = 0;
- while ( ( pass ) && ( i < 1000 ) )
+ while(pass && (i < 1000))
{
protect_entry(file_ptr, MEDIUM_ENTRY_TYPE, i);
- if ( pass ) {
+ if(pass)
unprotect_entry(file_ptr, MEDIUM_ENTRY_TYPE, i, H5C__NO_FLAGS_SET);
- }
i++;
}
- if ( ( ! rpt_fcn_called ) ||
- ( rpt_status != at_max_size ) ||
- ( cache_ptr->max_cache_size != (8 * 1024 * 1024) ) ||
- ( cache_ptr->min_clean_size != (4 * 1024 * 1024) ) ) {
+ if((!rpt_fcn_called) ||
+ (rpt_status != at_max_size) ||
+ (cache_ptr->max_cache_size != (8 * 1024 * 1024)) ||
+ (cache_ptr->min_clean_size != (4 * 1024 * 1024))) {
pass = FALSE;
failure_mssg = "Unexpected cache size change results 52.\n";
}
}
- if ( show_progress ) HDfprintf(stderr, "check point %d\n", checkpoint++);
+ if(show_progress) HDfprintf(stderr, "check point %d\n", checkpoint++);
- if ( pass ) { /* second epoch */
+ if(pass) { /* second epoch */
rpt_fcn_called = FALSE;
i = 1000;
- while ( ( pass ) && ( i < 2000 ) )
+ while(pass && (i < 2000))
{
protect_entry(file_ptr, MEDIUM_ENTRY_TYPE, i);
- if ( pass ) {
+ if(pass)
unprotect_entry(file_ptr, MEDIUM_ENTRY_TYPE, i, H5C__NO_FLAGS_SET);
- }
i++;
}
- if ( ( ! rpt_fcn_called ) ||
- ( rpt_status != at_max_size ) ||
- ( cache_ptr->max_cache_size != (8 * 1024 * 1024) ) ||
- ( cache_ptr->min_clean_size != (4 * 1024 * 1024) ) ) {
+ if((!rpt_fcn_called) ||
+ (rpt_status != at_max_size) ||
+ (cache_ptr->max_cache_size != (8 * 1024 * 1024)) ||
+ (cache_ptr->min_clean_size != (4 * 1024 * 1024))) {
pass = FALSE;
failure_mssg = "Unexpected cache size change results 53.\n";
}
}
- if ( show_progress ) HDfprintf(stderr, "check point %d\n", checkpoint++);
+ if(show_progress) HDfprintf(stderr, "check point %d\n", checkpoint++);
- if ( pass ) { /* third epoch */
+ if(pass) { /* third epoch */
rpt_fcn_called = FALSE;
i = 2000;
- while ( ( pass ) && ( i < 3000 ) )
+ while(pass && (i < 3000))
{
protect_entry(file_ptr, MEDIUM_ENTRY_TYPE, i);
- if ( pass ) {
+ if(pass)
unprotect_entry(file_ptr, MEDIUM_ENTRY_TYPE, i, H5C__NO_FLAGS_SET);
- }
i++;
}
- if ( ( ! rpt_fcn_called ) ||
- ( rpt_status != at_max_size ) ||
- ( cache_ptr->max_cache_size != (8 * 1024 * 1024) ) ||
- ( cache_ptr->min_clean_size != (4 * 1024 * 1024) ) ) {
+ if((!rpt_fcn_called) ||
+ (rpt_status != at_max_size) ||
+ (cache_ptr->max_cache_size != (8 * 1024 * 1024)) ||
+ (cache_ptr->min_clean_size != (4 * 1024 * 1024))) {
pass = FALSE;
failure_mssg = "Unexpected cache size change results 54.\n";
}
}
- if ( show_progress ) HDfprintf(stderr, "check point %d\n", checkpoint++);
+ if(show_progress) HDfprintf(stderr, "check point %d\n", checkpoint++);
/* fourth epoch -- If the hit rate were above the lower threshold,
* we would see cache size reduction now. However, nothing will
* happen until we get the hit rate above the lower threshold.
*/
- if ( pass ) {
+ if(pass) {
rpt_fcn_called = FALSE;
i = 3000;
- while ( ( pass ) && ( i < 4000 ) )
+ while(pass && (i < 4000))
{
protect_entry(file_ptr, MEDIUM_ENTRY_TYPE, i);
- if ( pass ) {
+ if(pass)
unprotect_entry(file_ptr, MEDIUM_ENTRY_TYPE, i, H5C__NO_FLAGS_SET);
- }
i++;
}
- if ( ( ! rpt_fcn_called ) ||
- ( rpt_status != at_max_size ) ||
- ( cache_ptr->max_cache_size != (8 * 1024 * 1024) ) ||
- ( cache_ptr->min_clean_size != (4 * 1024 * 1024) ) ) {
+ if((!rpt_fcn_called) ||
+ (rpt_status != at_max_size) ||
+ (cache_ptr->max_cache_size != (8 * 1024 * 1024)) ||
+ (cache_ptr->min_clean_size != (4 * 1024 * 1024))) {
pass = FALSE;
failure_mssg = "Unexpected cache size change results 55.\n";
}
}
- if ( show_progress ) HDfprintf(stderr, "check point %d\n", checkpoint++);
+ if(show_progress) HDfprintf(stderr, "check point %d\n", checkpoint++);
/* fifth epoch -- force the hit rate to 100%. We should see cache size
* reduction now.
*/
- if ( pass ) {
+ if(pass) {
rpt_fcn_called = FALSE;
i = 3000;
- while ( ( pass ) && ( i < 4000 ) )
+ while(pass && (i < 4000))
{
protect_entry(file_ptr, MEDIUM_ENTRY_TYPE, i);
- if ( pass ) {
+ if(pass)
unprotect_entry(file_ptr, MEDIUM_ENTRY_TYPE, i, H5C__NO_FLAGS_SET);
- }
i++;
}
- if ( ( ! rpt_fcn_called ) ||
- ( rpt_status != decrease ) ||
- ( cache_ptr->max_cache_size != (4002 * 1024) ) ||
- ( cache_ptr->min_clean_size != (int)(4002 * 512) ) ) {
+ if((!rpt_fcn_called) ||
+ (rpt_status != decrease) ||
+ (cache_ptr->max_cache_size != (4002 * 1024)) ||
+ (cache_ptr->min_clean_size != (int)(4002 * 512))) {
pass = FALSE;
failure_mssg = "Unexpected cache size change results 56.\n";
}
}
- if ( show_progress ) HDfprintf(stderr, "check point %d\n", checkpoint++);
+ if(show_progress) HDfprintf(stderr, "check point %d\n", checkpoint++);
/* sixth epoch -- force the hit rate to 100% again.
*/
- if ( pass ) {
+ if(pass) {
rpt_fcn_called = FALSE;
i = 3000;
- while ( ( pass ) && ( i < 4000 ) )
+ while(pass && (i < 4000))
{
protect_entry(file_ptr, MEDIUM_ENTRY_TYPE, i);
- if ( pass ) {
+ if(pass)
unprotect_entry(file_ptr, MEDIUM_ENTRY_TYPE, i, H5C__NO_FLAGS_SET);
- }
i++;
}
- if ( ( ! rpt_fcn_called ) ||
- ( rpt_status != decrease ) ||
- ( cache_ptr->max_cache_size != (2002 * 1024) ) ||
- ( cache_ptr->min_clean_size != (int)(2002 * 512) ) ) {
+ if((!rpt_fcn_called) ||
+ (rpt_status != decrease) ||
+ (cache_ptr->max_cache_size != (2002 * 1024)) ||
+ (cache_ptr->min_clean_size != (int)(2002 * 512))) {
pass = FALSE;
failure_mssg = "Unexpected cache size change results 57.\n";
}
}
- if ( show_progress ) HDfprintf(stderr, "check point %d\n", checkpoint++);
+ if(show_progress) HDfprintf(stderr, "check point %d\n", checkpoint++);
/* seventh epoch -- force the hit rate to 100% again.
*/
- if ( pass ) {
+ if(pass) {
rpt_fcn_called = FALSE;
i = 3000;
- while ( ( pass ) && ( i < 4000 ) )
+ while(pass && (i < 4000))
{
protect_entry(file_ptr, MEDIUM_ENTRY_TYPE, i);
- if ( pass ) {
+ if(pass)
unprotect_entry(file_ptr, MEDIUM_ENTRY_TYPE, i, H5C__NO_FLAGS_SET);
- }
i++;
}
- if ( ( ! rpt_fcn_called ) ||
- ( rpt_status != decrease ) ||
- ( cache_ptr->max_cache_size != (2000 * 1024) ) ||
- ( cache_ptr->min_clean_size != (int)(2000 * 512) ) ) {
+ if((!rpt_fcn_called) ||
+ (rpt_status != decrease) ||
+ (cache_ptr->max_cache_size != (2000 * 1024)) ||
+ (cache_ptr->min_clean_size != (int)(2000 * 512))) {
pass = FALSE;
failure_mssg = "Unexpected cache size change results 58.\n";
}
}
- if ( show_progress ) HDfprintf(stderr, "check point %d\n", checkpoint++);
+ if(show_progress) HDfprintf(stderr, "check point %d\n", checkpoint++);
/* eigth epoch -- force the hit rate to 100% again -- should be steady
* state.
*/
- if ( pass ) {
+ if(pass) {
rpt_fcn_called = FALSE;
i = 3000;
- while ( ( pass ) && ( i < 4000 ) )
+ while(pass && (i < 4000))
{
protect_entry(file_ptr, MEDIUM_ENTRY_TYPE, i);
- if ( pass ) {
+ if(pass)
unprotect_entry(file_ptr, MEDIUM_ENTRY_TYPE, i, H5C__NO_FLAGS_SET);
- }
i++;
}
- if ( ( ! rpt_fcn_called ) ||
- ( rpt_status != in_spec ) ||
- ( cache_ptr->max_cache_size != (2000 * 1024) ) ||
- ( cache_ptr->min_clean_size != (int)(2000 * 512) ) ) {
+ if((!rpt_fcn_called) ||
+ (rpt_status != in_spec) ||
+ (cache_ptr->max_cache_size != (2000 * 1024)) ||
+ (cache_ptr->min_clean_size != (int)(2000 * 512))) {
pass = FALSE;
failure_mssg = "Unexpected cache size change results 59.\n";
}
}
- if ( show_progress ) HDfprintf(stderr, "check point %d\n", checkpoint++);
+ if(show_progress) HDfprintf(stderr, "check point %d\n", checkpoint++);
/* now just bang on one entry -- after three epochs, this should
* get all entries other than the one evicted, and the cache size
* should be decreased to the minimum.
*/
- if ( pass ) { /* ninth epoch */
+ if(pass) { /* ninth epoch */
rpt_fcn_called = FALSE;
i = 0;
- while ( ( pass ) && ( i < 1000 ) )
+ while(pass && (i < 1000))
{
protect_entry(file_ptr, MONSTER_ENTRY_TYPE, 0);
- if ( pass ) {
+ if(pass)
unprotect_entry(file_ptr, MONSTER_ENTRY_TYPE, 0, H5C__NO_FLAGS_SET);
- }
i++;
}
- if ( ( ! rpt_fcn_called ) ||
- ( rpt_status != in_spec ) ||
- ( cache_ptr->max_cache_size != (2000 * 1024) ) ||
- ( cache_ptr->min_clean_size != (int)(2000 * 512) ) ) {
+ if((!rpt_fcn_called) ||
+ (rpt_status != in_spec) ||
+ (cache_ptr->max_cache_size != (2000 * 1024)) ||
+ (cache_ptr->min_clean_size != (int)(2000 * 512))) {
pass = FALSE;
failure_mssg = "Unexpected cache size change results 60.\n";
}
}
- if ( show_progress ) HDfprintf(stderr, "check point %d\n", checkpoint++);
+ if(show_progress) HDfprintf(stderr, "check point %d\n", checkpoint++);
- if ( pass ) { /* tenth epoch */
+ if(pass) { /* tenth epoch */
rpt_fcn_called = FALSE;
i = 0;
- while ( ( pass ) && ( i < 1000 ) )
+ while(pass && (i < 1000))
{
protect_entry(file_ptr, MONSTER_ENTRY_TYPE, 0);
- if ( pass ) {
+ if(pass)
unprotect_entry(file_ptr, MONSTER_ENTRY_TYPE, 0, H5C__NO_FLAGS_SET);
- }
i++;
}
- if ( ( ! rpt_fcn_called ) ||
- ( rpt_status != in_spec ) ||
- ( cache_ptr->max_cache_size != (2000 * 1024) ) ||
- ( cache_ptr->min_clean_size != (2000 * 512) ) ) {
+ if((!rpt_fcn_called) ||
+ (rpt_status != in_spec) ||
+ (cache_ptr->max_cache_size != (2000 * 1024)) ||
+ (cache_ptr->min_clean_size != (2000 * 512))) {
pass = FALSE;
failure_mssg = "Unexpected cache size change results 61.\n";
}
}
- if ( show_progress ) HDfprintf(stderr, "check point %d\n", checkpoint++);
+ if(show_progress) HDfprintf(stderr, "check point %d\n", checkpoint++);
- if ( pass ) { /* eleventh epoch -- cache size reduction */
+ if(pass) { /* eleventh epoch -- cache size reduction */
rpt_fcn_called = FALSE;
i = 0;
- while ( ( pass ) && ( i < 1000 ) )
+ while(pass && (i < 1000))
{
protect_entry(file_ptr, MONSTER_ENTRY_TYPE, 0);
- if ( pass ) {
+ if(pass)
unprotect_entry(file_ptr, MONSTER_ENTRY_TYPE, 0, H5C__NO_FLAGS_SET);
- }
i++;
}
- if ( ( ! rpt_fcn_called ) ||
- ( rpt_status != decrease ) ||
- ( cache_ptr->max_cache_size != (512 * 1024) ) ||
- ( cache_ptr->min_clean_size != (256 * 1024) ) ||
- ( cache_ptr->index_len != 2 ) ||
- ( cache_ptr->index_size !=
- MONSTER_ENTRY_SIZE + MEDIUM_ENTRY_SIZE ) ) {
+ if((!rpt_fcn_called) ||
+ (rpt_status != decrease) ||
+ (cache_ptr->max_cache_size != (512 * 1024)) ||
+ (cache_ptr->min_clean_size != (256 * 1024)) ||
+ (cache_ptr->index_len != 2) ||
+ (cache_ptr->index_size !=
+ MONSTER_ENTRY_SIZE + MEDIUM_ENTRY_SIZE)) {
pass = FALSE;
failure_mssg = "Unexpected cache size change results 62.\n";
}
}
- if ( show_progress ) HDfprintf(stderr, "check point %d\n", checkpoint++);
+ if(show_progress) HDfprintf(stderr, "check point %d\n", checkpoint++);
- if ( pass ) { /* twelth epoch -- at minimum size so no more ageouts */
+ if(pass) { /* twelth epoch -- at minimum size so no more ageouts */
rpt_fcn_called = FALSE;
i = 0;
- while ( ( pass ) && ( i < 1000 ) )
+ while(pass && (i < 1000))
{
protect_entry(file_ptr, MONSTER_ENTRY_TYPE, 0);
- if ( pass ) {
+ if(pass)
unprotect_entry(file_ptr, MONSTER_ENTRY_TYPE, 0, H5C__NO_FLAGS_SET);
- }
i++;
}
- if ( ( ! rpt_fcn_called ) ||
- ( rpt_status != at_min_size ) ||
- ( cache_ptr->max_cache_size != (512 * 1024) ) ||
- ( cache_ptr->min_clean_size != (256 * 1024) ) ||
- ( cache_ptr->index_len != 2 ) ||
- ( cache_ptr->index_size !=
- MONSTER_ENTRY_SIZE + MEDIUM_ENTRY_SIZE ) ) {
+ if((!rpt_fcn_called) ||
+ (rpt_status != at_min_size) ||
+ (cache_ptr->max_cache_size != (512 * 1024)) ||
+ (cache_ptr->min_clean_size != (256 * 1024)) ||
+ (cache_ptr->index_len != 2) ||
+ (cache_ptr->index_size !=
+ MONSTER_ENTRY_SIZE + MEDIUM_ENTRY_SIZE)) {
pass = FALSE;
failure_mssg = "Unexpected cache size change results 63.\n";
}
}
- if ( show_progress ) HDfprintf(stderr, "check point %d\n", checkpoint++);
+ if(show_progress) HDfprintf(stderr, "check point %d\n", checkpoint++);
/* Repeat the test again, this time using the age out with threshold
@@ -19607,7 +19507,7 @@ check_auto_cache_resize(hbool_t cork_ageout)
* Again, there are some minor structural changes in the test.
*/
- if ( pass ) {
+ if(pass) {
auto_size_ctl.version = H5C__CURR_AUTO_SIZE_CTL_VER;
auto_size_ctl.rpt_fcn = test_rpt_fcn;
@@ -19655,217 +19555,208 @@ check_auto_cache_resize(hbool_t cork_ageout)
auto_size_ctl.empty_reserve = 0.05f;
result = H5C_set_cache_auto_resize_config(cache_ptr, &auto_size_ctl);
-
- if ( result != SUCCEED ) {
-
+ if(result != SUCCEED) {
pass = FALSE;
failure_mssg = "H5C_set_cache_auto_resize_config failed 7.\n";
}
}
- if ( pass ) {
+ if(pass) {
- if ( ( cache_ptr->max_cache_size != (8 * 1024 * 1024) ) ||
- ( cache_ptr->min_clean_size != (4 * 1024 * 1024) ) ) {
+ if((cache_ptr->max_cache_size != (8 * 1024 * 1024)) ||
+ (cache_ptr->min_clean_size != (4 * 1024 * 1024))) {
pass = FALSE;
failure_mssg = "bad cache size after set resize re-config 6.\n";
}
}
- if ( show_progress ) HDfprintf(stderr, "check point %d\n", checkpoint++);
+ if(show_progress) HDfprintf(stderr, "check point %d\n", checkpoint++);
/* fill the cache with 4K byte entries -- increment mode is off,
* so cache size reduction should kick in as soon as we get the
* hit rate above .999.
*/
- if ( pass ) { /* first epoch -- hit rate 0 */
+ if(pass) { /* first epoch -- hit rate 0 */
rpt_fcn_called = FALSE;
i = 0;
- while ( ( pass ) && ( i < 1000 ) )
+ while(pass && (i < 1000))
{
protect_entry(file_ptr, LARGE_ENTRY_TYPE, i);
- if ( pass ) {
+ if(pass)
unprotect_entry(file_ptr, LARGE_ENTRY_TYPE, i, H5C__NO_FLAGS_SET);
- }
i++;
}
- if ( ( ! rpt_fcn_called ) ||
- ( rpt_status != in_spec ) ||
- ( cache_ptr->max_cache_size != (8 * 1024 * 1024) ) ||
- ( cache_ptr->min_clean_size != (4 * 1024 * 1024) ) ) {
+ if((!rpt_fcn_called) ||
+ (rpt_status != in_spec) ||
+ (cache_ptr->max_cache_size != (8 * 1024 * 1024)) ||
+ (cache_ptr->min_clean_size != (4 * 1024 * 1024))) {
pass = FALSE;
failure_mssg = "Unexpected cache size change results 64.\n";
}
}
- if ( show_progress ) HDfprintf(stderr, "check point %d\n", checkpoint++);
+ if(show_progress) HDfprintf(stderr, "check point %d\n", checkpoint++);
- if ( pass ) { /* second epoch -- hit rate 0 */
+ if(pass) { /* second epoch -- hit rate 0 */
rpt_fcn_called = FALSE;
i = 1000;
- while ( ( pass ) && ( i < 2000 ) )
+ while(pass && (i < 2000))
{
protect_entry(file_ptr, LARGE_ENTRY_TYPE, i);
- if ( pass ) {
+ if(pass)
unprotect_entry(file_ptr, LARGE_ENTRY_TYPE, i, H5C__NO_FLAGS_SET);
- }
i++;
}
- if ( ( ! rpt_fcn_called ) ||
- ( rpt_status != in_spec ) ||
- ( cache_ptr->max_cache_size != (8 * 1024 * 1024) ) ||
- ( cache_ptr->min_clean_size != (4 * 1024 * 1024) ) ) {
+ if((!rpt_fcn_called) ||
+ (rpt_status != in_spec) ||
+ (cache_ptr->max_cache_size != (8 * 1024 * 1024)) ||
+ (cache_ptr->min_clean_size != (4 * 1024 * 1024))) {
pass = FALSE;
failure_mssg = "Unexpected cache size change results 65.\n";
}
}
- if ( show_progress ) HDfprintf(stderr, "check point %d\n", checkpoint++);
+ if(show_progress) HDfprintf(stderr, "check point %d\n", checkpoint++);
- if ( pass ) { /* third epoch -- hit rate 1.0 -- should see decrease */
+ if(pass) { /* third epoch -- hit rate 1.0 -- should see decrease */
rpt_fcn_called = FALSE;
i = 0;
- while ( ( pass ) && ( i < 1000 ) )
+ while(pass && (i < 1000))
{
protect_entry(file_ptr, LARGE_ENTRY_TYPE, i);
- if ( pass ) {
+ if(pass)
unprotect_entry(file_ptr, LARGE_ENTRY_TYPE, i, H5C__NO_FLAGS_SET);
- }
i++;
}
- if ( ( ! rpt_fcn_called ) ||
- ( rpt_status != decrease ) ||
- ( cache_ptr->max_cache_size != (1001 * LARGE_ENTRY_SIZE) ) ||
- ( cache_ptr->min_clean_size != (1001 * LARGE_ENTRY_SIZE / 2) ) ) {
+ if((!rpt_fcn_called) ||
+ (rpt_status != decrease) ||
+ (cache_ptr->max_cache_size != (1001 * LARGE_ENTRY_SIZE)) ||
+ (cache_ptr->min_clean_size != (1001 * LARGE_ENTRY_SIZE / 2))) {
pass = FALSE;
failure_mssg = "Unexpected cache size change results 66.\n";
}
}
- if ( show_progress ) HDfprintf(stderr, "check point %d\n", checkpoint++);
+ if(show_progress) HDfprintf(stderr, "check point %d\n", checkpoint++);
/* fourth epoch -- load up the cache again -- hit rate 0 */
- if ( pass ) {
+ if(pass) {
rpt_fcn_called = FALSE;
i = 0;
- while ( ( pass ) && ( i < 1000 ) )
+ while(pass && (i < 1000))
{
protect_entry(file_ptr, MEDIUM_ENTRY_TYPE, i);
- if ( pass ) {
+ if(pass)
unprotect_entry(file_ptr, MEDIUM_ENTRY_TYPE, i, H5C__NO_FLAGS_SET);
- }
i++;
}
- if ( ( ! rpt_fcn_called ) ||
- ( rpt_status != in_spec ) ||
- ( cache_ptr->max_cache_size != (1001 * LARGE_ENTRY_SIZE) ) ||
- ( cache_ptr->min_clean_size != (1001 * LARGE_ENTRY_SIZE / 2) ) ) {
+ if((!rpt_fcn_called) ||
+ (rpt_status != in_spec) ||
+ (cache_ptr->max_cache_size != (1001 * LARGE_ENTRY_SIZE)) ||
+ (cache_ptr->min_clean_size != (1001 * LARGE_ENTRY_SIZE / 2))) {
pass = FALSE;
failure_mssg = "Unexpected cache size change results 67.\n";
}
}
- if ( show_progress ) HDfprintf(stderr, "check point %d\n", checkpoint++);
+ if(show_progress) HDfprintf(stderr, "check point %d\n", checkpoint++);
/* fifth epoch -- still loading up the cache -- hit rate 0 */
- if ( pass ) {
+ if(pass) {
rpt_fcn_called = FALSE;
i = 1000;
- while ( ( pass ) && ( i < 2000 ) )
+ while(pass && (i < 2000))
{
protect_entry(file_ptr, MEDIUM_ENTRY_TYPE, i);
- if ( pass ) {
+ if(pass)
unprotect_entry(file_ptr, MEDIUM_ENTRY_TYPE, i, H5C__NO_FLAGS_SET);
- }
i++;
}
- if ( ( ! rpt_fcn_called ) ||
- ( rpt_status != in_spec ) ||
- ( cache_ptr->max_cache_size != (1001 * LARGE_ENTRY_SIZE) ) ||
- ( cache_ptr->min_clean_size != (1001 * LARGE_ENTRY_SIZE / 2) ) ) {
+ if((!rpt_fcn_called) ||
+ (rpt_status != in_spec) ||
+ (cache_ptr->max_cache_size != (1001 * LARGE_ENTRY_SIZE)) ||
+ (cache_ptr->min_clean_size != (1001 * LARGE_ENTRY_SIZE / 2))) {
pass = FALSE;
failure_mssg = "Unexpected cache size change results 68.\n";
}
}
- if ( show_progress ) HDfprintf(stderr, "check point %d\n", checkpoint++);
+ if(show_progress) HDfprintf(stderr, "check point %d\n", checkpoint++);
/* sixth epoch -- force hit rate to .998 -- should be no reduction */
- if ( pass ) {
+ if(pass) {
rpt_fcn_called = FALSE;
i = 1002;
- while ( ( pass ) && ( i < 2002 ) )
+ while(pass && (i < 2002))
{
protect_entry(file_ptr, MEDIUM_ENTRY_TYPE, i);
- if ( pass ) {
+ if(pass)
unprotect_entry(file_ptr, MEDIUM_ENTRY_TYPE, i, H5C__NO_FLAGS_SET);
- }
i++;
}
- if ( ( ! rpt_fcn_called ) ||
- ( rpt_status != in_spec ) ||
- ( cache_ptr->max_cache_size != (1001 * LARGE_ENTRY_SIZE) ) ||
- ( cache_ptr->min_clean_size != (1001 * LARGE_ENTRY_SIZE / 2) ) ) {
+ if((!rpt_fcn_called) ||
+ (rpt_status != in_spec) ||
+ (cache_ptr->max_cache_size != (1001 * LARGE_ENTRY_SIZE)) ||
+ (cache_ptr->min_clean_size != (1001 * LARGE_ENTRY_SIZE / 2))) {
pass = FALSE;
failure_mssg = "Unexpected cache size change results 69.\n";
}
}
- if ( show_progress ) HDfprintf(stderr, "check point %d\n", checkpoint++);
+ if(show_progress) HDfprintf(stderr, "check point %d\n", checkpoint++);
/* seventh epoch -- force hit rate to .999 -- should see reduction
*/
- if ( pass ) {
+ if(pass) {
rpt_fcn_called = FALSE;
i = 1003;
- while ( ( pass ) && ( i < 2003 ) )
+ while(pass && (i < 2003))
{
protect_entry(file_ptr, MEDIUM_ENTRY_TYPE, i);
- if ( pass ) {
+ if(pass)
unprotect_entry(file_ptr, MEDIUM_ENTRY_TYPE, i, H5C__NO_FLAGS_SET);
- }
i++;
}
- if ( ( ! rpt_fcn_called ) ||
- ( rpt_status != decrease ) ||
- ( cache_ptr->max_cache_size != (1000 * MEDIUM_ENTRY_SIZE) ) ||
- ( cache_ptr->min_clean_size != (1000 * MEDIUM_ENTRY_SIZE / 2) ) ) {
+ if((!rpt_fcn_called) ||
+ (rpt_status != decrease) ||
+ (cache_ptr->max_cache_size != (1000 * MEDIUM_ENTRY_SIZE)) ||
+ (cache_ptr->min_clean_size != (1000 * MEDIUM_ENTRY_SIZE / 2))) {
pass = FALSE;
failure_mssg = "Unexpected cache size change results 70.\n";
}
}
- if ( show_progress ) HDfprintf(stderr, "check point %d\n", checkpoint++);
+ if(show_progress) HDfprintf(stderr, "check point %d\n", checkpoint++);
/* We have now tested all the major ageout modes individually.
@@ -19873,7 +19764,7 @@ check_auto_cache_resize(hbool_t cork_ageout)
* and/or bugs.
*/
- if ( pass ) {
+ if(pass) {
auto_size_ctl.version = H5C__CURR_AUTO_SIZE_CTL_VER;
auto_size_ctl.rpt_fcn = test_rpt_fcn;
@@ -19918,81 +19809,77 @@ check_auto_cache_resize(hbool_t cork_ageout)
auto_size_ctl.empty_reserve = 0.5f; /* for ease of testing */
result = H5C_set_cache_auto_resize_config(cache_ptr, &auto_size_ctl);
-
- if ( result != SUCCEED ) {
-
+ if(result != SUCCEED) {
pass = FALSE;
failure_mssg = "H5C_set_cache_auto_resize_config failed 8.\n";
}
}
- if ( pass ) {
+ if(pass) {
- if ( ( cache_ptr->max_cache_size != (8 * 1000 * 1024) ) ||
- ( cache_ptr->min_clean_size != (4 * 1000 * 1024) ) ) {
+ if((cache_ptr->max_cache_size != (8 * 1000 * 1024)) ||
+ (cache_ptr->min_clean_size != (4 * 1000 * 1024))) {
pass = FALSE;
failure_mssg = "bad cache size after set resize re-config 7.\n";
}
}
- if ( show_progress ) HDfprintf(stderr, "check point %d\n", checkpoint++);
+ if(show_progress) HDfprintf(stderr, "check point %d\n", checkpoint++);
/* fill the cache with 4K byte entries -- increment mode is threshold,
* so the decrease code will not be executed until the hit rate exceeds
* .75.
*/
- if ( pass ) { /* first epoch -- hit rate 0 */
+ if(pass) { /* first epoch -- hit rate 0 */
rpt_fcn_called = FALSE;
i = 0;
- while ( ( pass ) && ( i < 1000 ) )
+ while(pass && (i < 1000))
{
protect_entry(file_ptr, LARGE_ENTRY_TYPE, i);
- if ( pass ) {
+ if(pass)
unprotect_entry(file_ptr, LARGE_ENTRY_TYPE, i, H5C__NO_FLAGS_SET);
- }
i++;
}
- if ( ( ! rpt_fcn_called ) ||
- ( rpt_status != at_max_size ) ||
- ( cache_ptr->max_cache_size != (8 * 1000 * 1024) ) ||
- ( cache_ptr->min_clean_size != (4 * 1000 * 1024) ) ) {
+ if((!rpt_fcn_called) ||
+ (rpt_status != at_max_size) ||
+ (cache_ptr->max_cache_size != (8 * 1000 * 1024)) ||
+ (cache_ptr->min_clean_size != (4 * 1000 * 1024))) {
pass = FALSE;
failure_mssg = "Unexpected cache size change results 71.\n";
}
}
- if ( show_progress ) HDfprintf(stderr, "check point %d\n", checkpoint++);
+ if(show_progress) HDfprintf(stderr, "check point %d\n", checkpoint++);
- if ( pass ) { /* second epoch -- hit rate 0 */
+ if(pass) { /* second epoch -- hit rate 0 */
rpt_fcn_called = FALSE;
i = 1000;
- while ( ( pass ) && ( i < 2000 ) )
+ while(pass && (i < 2000))
{
protect_entry(file_ptr, LARGE_ENTRY_TYPE, i);
- if ( pass ) {
+ if(pass)
unprotect_entry(file_ptr, LARGE_ENTRY_TYPE, i, H5C__NO_FLAGS_SET);
- }
i++;
}
- if ( ( ! rpt_fcn_called ) ||
- ( rpt_status != at_max_size ) ||
- ( cache_ptr->max_cache_size != (8 * 1000 * 1024) ) ||
- ( cache_ptr->min_clean_size != (4 * 1000 * 1024) ) ) {
+ if((!rpt_fcn_called) ||
+ (rpt_status != at_max_size) ||
+ (cache_ptr->max_cache_size != (8 * 1000 * 1024)) ||
+ (cache_ptr->min_clean_size != (4 * 1000 * 1024))) {
pass = FALSE;
failure_mssg = "Unexpected cache size change results 72.\n";
}
}
- if ( show_progress ) HDfprintf(stderr, "check point %d\n", checkpoint++);
+ if(show_progress) HDfprintf(stderr, "check point %d\n", checkpoint++);
/* third epoch -- force the hit rate to 1.0. Should be no change
* in the cache size due to the combination of the empty reserve
@@ -20002,420 +19889,406 @@ check_auto_cache_resize(hbool_t cork_ageout)
*
* In this epoch, all we should see is a reduction in the index size.
*/
- if ( pass ) {
+ if(pass) {
rpt_fcn_called = FALSE;
i = 0;
- while ( ( pass ) && ( i < 1000 ) )
+ while(pass && (i < 1000))
{
protect_entry(file_ptr, LARGE_ENTRY_TYPE, i);
- if ( pass ) {
+ if(pass)
unprotect_entry(file_ptr, LARGE_ENTRY_TYPE, i, H5C__NO_FLAGS_SET);
- }
i++;
}
- if ( ( ! rpt_fcn_called ) ||
- ( rpt_status != in_spec ) ||
- ( cache_ptr->max_cache_size != (8 * 1000 * 1024) ) ||
- ( cache_ptr->min_clean_size != (4 * 1000 * 1024) ) ||
- ( cache_ptr->index_size != (7 * 1000 * 1024) ) ) {
+ if((!rpt_fcn_called) ||
+ (rpt_status != in_spec) ||
+ (cache_ptr->max_cache_size != (8 * 1000 * 1024)) ||
+ (cache_ptr->min_clean_size != (4 * 1000 * 1024)) ||
+ (cache_ptr->index_size != (7 * 1000 * 1024))) {
pass = FALSE;
failure_mssg = "Unexpected cache size change results 73.\n";
}
}
- if ( show_progress ) HDfprintf(stderr, "check point %d\n", checkpoint++);
+ if(show_progress) HDfprintf(stderr, "check point %d\n", checkpoint++);
/* fourth epoch -- hit rate still 1.0. Index size should decrease,
* but otherwise no change expected.
*/
- if ( pass ) {
+ if(pass) {
rpt_fcn_called = FALSE;
i = 0;
- while ( ( pass ) && ( i < 1000 ) )
+ while(pass && (i < 1000))
{
protect_entry(file_ptr, LARGE_ENTRY_TYPE, i);
- if ( pass ) {
+ if(pass)
unprotect_entry(file_ptr, LARGE_ENTRY_TYPE, i, H5C__NO_FLAGS_SET);
- }
i++;
}
- if ( ( ! rpt_fcn_called ) ||
- ( rpt_status != in_spec ) ||
- ( cache_ptr->max_cache_size != (8 * 1000 * 1024) ) ||
- ( cache_ptr->min_clean_size != (4 * 1000 * 1024) ) ||
- ( cache_ptr->index_size != (6 * 1000 * 1024) ) ) {
+ if((!rpt_fcn_called) ||
+ (rpt_status != in_spec) ||
+ (cache_ptr->max_cache_size != (8 * 1000 * 1024)) ||
+ (cache_ptr->min_clean_size != (4 * 1000 * 1024)) ||
+ (cache_ptr->index_size != (6 * 1000 * 1024))) {
pass = FALSE;
failure_mssg = "Unexpected cache size change results 74.\n";
}
}
- if ( show_progress ) HDfprintf(stderr, "check point %d\n", checkpoint++);
+ if(show_progress) HDfprintf(stderr, "check point %d\n", checkpoint++);
/* fifth epoch -- hit rate still 1.0. Index size should decrease,
* but otherwise no change expected.
*/
- if ( pass ) {
+ if(pass) {
rpt_fcn_called = FALSE;
i = 0;
- while ( ( pass ) && ( i < 1000 ) )
+ while(pass && (i < 1000))
{
protect_entry(file_ptr, LARGE_ENTRY_TYPE, i);
- if ( pass ) {
+ if(pass)
unprotect_entry(file_ptr, LARGE_ENTRY_TYPE, i, H5C__NO_FLAGS_SET);
- }
i++;
}
- if ( ( ! rpt_fcn_called ) ||
- ( rpt_status != in_spec ) ||
- ( cache_ptr->max_cache_size != (8 * 1000 * 1024) ) ||
- ( cache_ptr->min_clean_size != (4 * 1000 * 1024) ) ||
- ( cache_ptr->index_size != (5 * 1000 * 1024) ) ) {
+ if((!rpt_fcn_called) ||
+ (rpt_status != in_spec) ||
+ (cache_ptr->max_cache_size != (8 * 1000 * 1024)) ||
+ (cache_ptr->min_clean_size != (4 * 1000 * 1024)) ||
+ (cache_ptr->index_size != (5 * 1000 * 1024))) {
pass = FALSE;
failure_mssg = "Unexpected cache size change results 75.\n";
}
}
- if ( show_progress ) HDfprintf(stderr, "check point %d\n", checkpoint++);
+ if(show_progress) HDfprintf(stderr, "check point %d\n", checkpoint++);
/* sixth epoch -- hit rate still 1.0. Index size should decrease,
* but otherwise no change expected. Note that the cache size is
* now just on the edge of meeting the clean reserve.
*/
- if ( pass ) {
+ if(pass) {
rpt_fcn_called = FALSE;
i = 0;
- while ( ( pass ) && ( i < 1000 ) )
+ while(pass && (i < 1000))
{
protect_entry(file_ptr, LARGE_ENTRY_TYPE, i);
- if ( pass ) {
+ if(pass)
unprotect_entry(file_ptr, LARGE_ENTRY_TYPE, i, H5C__NO_FLAGS_SET);
- }
i++;
}
- if ( ( ! rpt_fcn_called ) ||
- ( rpt_status != in_spec ) ||
- ( cache_ptr->max_cache_size != (8 * 1000 * 1024) ) ||
- ( cache_ptr->min_clean_size != (4 * 1000 * 1024) ) ||
- ( cache_ptr->index_size != (4 * 1000 * 1024) ) ) {
+ if((!rpt_fcn_called) ||
+ (rpt_status != in_spec) ||
+ (cache_ptr->max_cache_size != (8 * 1000 * 1024)) ||
+ (cache_ptr->min_clean_size != (4 * 1000 * 1024)) ||
+ (cache_ptr->index_size != (4 * 1000 * 1024))) {
pass = FALSE;
failure_mssg = "Unexpected cache size change results 76.\n";
}
}
- if ( show_progress ) HDfprintf(stderr, "check point %d\n", checkpoint++);
+ if(show_progress) HDfprintf(stderr, "check point %d\n", checkpoint++);
/* seventh epoch -- hit rate still 1.0. No change in index size expected.
*/
- if ( pass ) {
+ if(pass) {
rpt_fcn_called = FALSE;
i = 0;
- while ( ( pass ) && ( i < 1000 ) )
+ while(pass && (i < 1000))
{
protect_entry(file_ptr, LARGE_ENTRY_TYPE, i);
- if ( pass ) {
+ if(pass)
unprotect_entry(file_ptr, LARGE_ENTRY_TYPE, i, H5C__NO_FLAGS_SET);
- }
i++;
}
- if ( ( ! rpt_fcn_called ) ||
- ( rpt_status != in_spec ) ||
- ( cache_ptr->max_cache_size != (8 * 1000 * 1024) ) ||
- ( cache_ptr->min_clean_size != (4 * 1000 * 1024) ) ||
- ( cache_ptr->index_size != (4 * 1000 * 1024) ) ) {
+ if((!rpt_fcn_called) ||
+ (rpt_status != in_spec) ||
+ (cache_ptr->max_cache_size != (8 * 1000 * 1024)) ||
+ (cache_ptr->min_clean_size != (4 * 1000 * 1024)) ||
+ (cache_ptr->index_size != (4 * 1000 * 1024))) {
pass = FALSE;
failure_mssg = "Unexpected cache size change results 77.\n";
}
}
- if ( show_progress ) HDfprintf(stderr, "check point %d\n", checkpoint++);
+ if(show_progress) HDfprintf(stderr, "check point %d\n", checkpoint++);
/* eighth epoch -- start loading 1 KB entries. Hit rate 0 so
* decrease code shouldn't be called.
*/
- if ( pass ) {
+ if(pass) {
rpt_fcn_called = FALSE;
i = 0;
- while ( ( pass ) && ( i < 1000 ) )
+ while(pass && (i < 1000))
{
protect_entry(file_ptr, MEDIUM_ENTRY_TYPE, i);
- if ( pass ) {
+ if(pass)
unprotect_entry(file_ptr, MEDIUM_ENTRY_TYPE, i, H5C__NO_FLAGS_SET);
- }
i++;
}
- if ( ( ! rpt_fcn_called ) ||
- ( rpt_status != at_max_size ) ||
- ( cache_ptr->max_cache_size != (8 * 1000 * 1024) ) ||
- ( cache_ptr->min_clean_size != (4 * 1000 * 1024) ) ||
- ( cache_ptr->index_size != (5 * 1000 * 1024) ) ) {
+ if((!rpt_fcn_called) ||
+ (rpt_status != at_max_size) ||
+ (cache_ptr->max_cache_size != (8 * 1000 * 1024)) ||
+ (cache_ptr->min_clean_size != (4 * 1000 * 1024)) ||
+ (cache_ptr->index_size != (5 * 1000 * 1024))) {
pass = FALSE;
failure_mssg = "Unexpected cache size change results 78.\n";
}
}
- if ( show_progress ) HDfprintf(stderr, "check point %d\n", checkpoint++);
+ if(show_progress) HDfprintf(stderr, "check point %d\n", checkpoint++);
/* ninth epoch -- access the 1 KB entries again, driving the hit rate
* to 1.0. Decrease code should be triggered, but the max decrease
* should prevent the empty reserve from being met in this epoch.
*/
- if ( pass ) {
+ if(pass) {
rpt_fcn_called = FALSE;
i = 0;
- while ( ( pass ) && ( i < 1000 ) )
+ while(pass && (i < 1000))
{
protect_entry(file_ptr, MEDIUM_ENTRY_TYPE, i);
- if ( pass ) {
+ if(pass)
unprotect_entry(file_ptr, MEDIUM_ENTRY_TYPE, i, H5C__NO_FLAGS_SET);
- }
i++;
}
- if ( ( ! rpt_fcn_called ) ||
- ( rpt_status != in_spec ) ||
- ( cache_ptr->max_cache_size != (8 * 1000 * 1024) ) ||
- ( cache_ptr->min_clean_size != (4 * 1000 * 1024) ) ||
- ( cache_ptr->index_size != (4 * 1000 * 1024) ) ) {
+ if((!rpt_fcn_called) ||
+ (rpt_status != in_spec) ||
+ (cache_ptr->max_cache_size != (8 * 1000 * 1024)) ||
+ (cache_ptr->min_clean_size != (4 * 1000 * 1024)) ||
+ (cache_ptr->index_size != (4 * 1000 * 1024))) {
pass = FALSE;
failure_mssg = "Unexpected cache size change results 79.\n";
}
}
- if ( show_progress ) HDfprintf(stderr, "check point %d\n", checkpoint++);
+ if(show_progress) HDfprintf(stderr, "check point %d\n", checkpoint++);
/* tenth epoch -- access the 1 KB entries yet again, forcing hit rate
* to 1.0. Decrease code should be triggered, and the empty reserve
* should finally be met.
*/
- if ( pass ) {
+ if(pass) {
rpt_fcn_called = FALSE;
i = 0;
- while ( ( pass ) && ( i < 1000 ) )
+ while(pass && (i < 1000))
{
protect_entry(file_ptr, MEDIUM_ENTRY_TYPE, i);
- if ( pass ) {
+ if(pass)
unprotect_entry(file_ptr, MEDIUM_ENTRY_TYPE, i, H5C__NO_FLAGS_SET);
- }
i++;
}
- if ( ( ! rpt_fcn_called ) ||
- ( rpt_status != decrease ) ||
- ( cache_ptr->max_cache_size != (7 * 1000 * 1024) ) ||
- ( cache_ptr->min_clean_size != (7 * 1000 * 1024 / 2) ) ||
- ( cache_ptr->index_size != (3 * 1000 * 1024) ) ) {
+ if((!rpt_fcn_called) ||
+ (rpt_status != decrease) ||
+ (cache_ptr->max_cache_size != (7 * 1000 * 1024)) ||
+ (cache_ptr->min_clean_size != (7 * 1000 * 1024 / 2)) ||
+ (cache_ptr->index_size != (3 * 1000 * 1024))) {
pass = FALSE;
failure_mssg = "Unexpected cache size change results 80.\n";
}
}
- if ( show_progress ) HDfprintf(stderr, "check point %d\n", checkpoint++);
+ if(show_progress) HDfprintf(stderr, "check point %d\n", checkpoint++);
/* eleventh epoch -- access the 1 KB entries yet again, forcing hit rate
* to 1.0. Decrease code should be triggered, and the empty reserve
* should be met again.
*/
- if ( pass ) {
+ if(pass) {
rpt_fcn_called = FALSE;
i = 0;
- while ( ( pass ) && ( i < 1000 ) )
+ while(pass && (i < 1000))
{
protect_entry(file_ptr, MEDIUM_ENTRY_TYPE, i);
- if ( pass ) {
+ if(pass)
unprotect_entry(file_ptr, MEDIUM_ENTRY_TYPE, i, H5C__NO_FLAGS_SET);
- }
i++;
}
- if ( ( ! rpt_fcn_called ) ||
- ( rpt_status != decrease ) ||
- ( cache_ptr->max_cache_size != (6 * 1000 * 1024) ) ||
- ( cache_ptr->min_clean_size != (3 * 1000 * 1024) ) ||
- ( cache_ptr->index_size != (2 * 1000 * 1024) ) ) {
+ if((!rpt_fcn_called) ||
+ (rpt_status != decrease) ||
+ (cache_ptr->max_cache_size != (6 * 1000 * 1024)) ||
+ (cache_ptr->min_clean_size != (3 * 1000 * 1024)) ||
+ (cache_ptr->index_size != (2 * 1000 * 1024))) {
pass = FALSE;
failure_mssg = "Unexpected cache size change results 81.\n";
}
}
- if ( show_progress ) HDfprintf(stderr, "check point %d\n", checkpoint++);
+ if(show_progress) HDfprintf(stderr, "check point %d\n", checkpoint++);
/* twelth epoch -- hit rate 1.0 -- decrease as before.
*/
- if ( pass ) {
+ if(pass) {
rpt_fcn_called = FALSE;
i = 0;
- while ( ( pass ) && ( i < 1000 ) )
+ while(pass && (i < 1000))
{
protect_entry(file_ptr, MEDIUM_ENTRY_TYPE, i);
- if ( pass ) {
+ if(pass)
unprotect_entry(file_ptr, MEDIUM_ENTRY_TYPE, i, H5C__NO_FLAGS_SET);
- }
i++;
}
- if ( ( ! rpt_fcn_called ) ||
- ( rpt_status != decrease ) ||
- ( cache_ptr->max_cache_size != (5 * 1000 * 1024) ) ||
- ( cache_ptr->min_clean_size != (5 * 1000 * 1024 / 2) ) ||
- ( cache_ptr->index_size != (1 * 1000 * 1024) ) ) {
+ if((!rpt_fcn_called) ||
+ (rpt_status != decrease) ||
+ (cache_ptr->max_cache_size != (5 * 1000 * 1024)) ||
+ (cache_ptr->min_clean_size != (5 * 1000 * 1024 / 2)) ||
+ (cache_ptr->index_size != (1 * 1000 * 1024))) {
pass = FALSE;
failure_mssg = "Unexpected cache size change results 82.\n";
}
}
- if ( show_progress ) HDfprintf(stderr, "check point %d\n", checkpoint++);
+ if(show_progress) HDfprintf(stderr, "check point %d\n", checkpoint++);
/* thirteenth epoch -- hit rate 1.0 -- decrease as before.
*/
- if ( pass ) {
+ if(pass) {
rpt_fcn_called = FALSE;
i = 0;
- while ( ( pass ) && ( i < 1000 ) )
+ while(pass && (i < 1000))
{
protect_entry(file_ptr, MEDIUM_ENTRY_TYPE, i);
- if ( pass ) {
+ if(pass)
unprotect_entry(file_ptr, MEDIUM_ENTRY_TYPE, i, H5C__NO_FLAGS_SET);
- }
i++;
}
- if ( ( ! rpt_fcn_called ) ||
- ( rpt_status != decrease ) ||
- ( cache_ptr->max_cache_size != (4 * 1000 * 1024) ) ||
- ( cache_ptr->min_clean_size != (2 * 1000 * 1024) ) ||
- ( cache_ptr->index_size != (1 * 1000 * 1024) ) ) {
+ if((!rpt_fcn_called) ||
+ (rpt_status != decrease) ||
+ (cache_ptr->max_cache_size != (4 * 1000 * 1024)) ||
+ (cache_ptr->min_clean_size != (2 * 1000 * 1024)) ||
+ (cache_ptr->index_size != (1 * 1000 * 1024))) {
pass = FALSE;
failure_mssg = "Unexpected cache size change results 83.\n";
}
}
- if ( show_progress ) HDfprintf(stderr, "check point %d\n", checkpoint++);
+ if(show_progress) HDfprintf(stderr, "check point %d\n", checkpoint++);
/* fourteenth epoch -- hit rate 1.0 -- decrease as before.
*/
- if ( pass ) {
+ if(pass) {
rpt_fcn_called = FALSE;
i = 0;
- while ( ( pass ) && ( i < 1000 ) )
+ while(pass && (i < 1000))
{
protect_entry(file_ptr, MEDIUM_ENTRY_TYPE, i);
- if ( pass ) {
+ if(pass)
unprotect_entry(file_ptr, MEDIUM_ENTRY_TYPE, i, H5C__NO_FLAGS_SET);
- }
i++;
}
- if ( ( ! rpt_fcn_called ) ||
- ( rpt_status != decrease ) ||
- ( cache_ptr->max_cache_size != (3 * 1000 * 1024) ) ||
- ( cache_ptr->min_clean_size != (3 * 1000 * 1024 / 2) ) ||
- ( cache_ptr->index_size != (1 * 1000 * 1024) ) ) {
+ if((!rpt_fcn_called) ||
+ (rpt_status != decrease) ||
+ (cache_ptr->max_cache_size != (3 * 1000 * 1024)) ||
+ (cache_ptr->min_clean_size != (3 * 1000 * 1024 / 2)) ||
+ (cache_ptr->index_size != (1 * 1000 * 1024))) {
pass = FALSE;
failure_mssg = "Unexpected cache size change results 84.\n";
}
}
- if ( show_progress ) HDfprintf(stderr, "check point %d\n", checkpoint++);
+ if(show_progress) HDfprintf(stderr, "check point %d\n", checkpoint++);
/* fifteenth epoch -- hit rate 1.0 -- decrease as before.
*/
- if ( pass ) {
+ if(pass) {
rpt_fcn_called = FALSE;
i = 0;
- while ( ( pass ) && ( i < 1000 ) )
+ while(pass && (i < 1000))
{
protect_entry(file_ptr, MEDIUM_ENTRY_TYPE, i);
- if ( pass ) {
+ if(pass)
unprotect_entry(file_ptr, MEDIUM_ENTRY_TYPE, i, H5C__NO_FLAGS_SET);
- }
i++;
}
- if ( ( ! rpt_fcn_called ) ||
- ( rpt_status != decrease ) ||
- ( cache_ptr->max_cache_size != (2 * 1000 * 1024) ) ||
- ( cache_ptr->min_clean_size != (1 * 1000 * 1024) ) ||
- ( cache_ptr->index_size != (1 * 1000 * 1024) ) ) {
+ if((!rpt_fcn_called) ||
+ (rpt_status != decrease) ||
+ (cache_ptr->max_cache_size != (2 * 1000 * 1024)) ||
+ (cache_ptr->min_clean_size != (1 * 1000 * 1024)) ||
+ (cache_ptr->index_size != (1 * 1000 * 1024))) {
pass = FALSE;
failure_mssg = "Unexpected cache size change results 85.\n";
}
}
- if ( show_progress ) HDfprintf(stderr, "check point %d\n", checkpoint++);
+ if(show_progress) HDfprintf(stderr, "check point %d\n", checkpoint++);
/* sixteenth epoch -- hit rate 1.0 -- should be stable now
*/
- if ( pass ) {
+ if(pass) {
rpt_fcn_called = FALSE;
i = 0;
- while ( ( pass ) && ( i < 1000 ) )
+ while(pass && (i < 1000))
{
protect_entry(file_ptr, MEDIUM_ENTRY_TYPE, i);
- if ( pass ) {
+ if(pass)
unprotect_entry(file_ptr, MEDIUM_ENTRY_TYPE, i, H5C__NO_FLAGS_SET);
- }
i++;
}
- if ( ( ! rpt_fcn_called ) ||
- ( rpt_status != in_spec ) ||
- ( cache_ptr->max_cache_size != (2 * 1000 * 1024) ) ||
- ( cache_ptr->min_clean_size != (1 * 1000 * 1024) ) ||
- ( cache_ptr->index_size != (1 * 1000 * 1024) ) ) {
+ if((!rpt_fcn_called) ||
+ (rpt_status != in_spec) ||
+ (cache_ptr->max_cache_size != (2 * 1000 * 1024)) ||
+ (cache_ptr->min_clean_size != (1 * 1000 * 1024)) ||
+ (cache_ptr->index_size != (1 * 1000 * 1024))) {
pass = FALSE;
failure_mssg = "Unexpected cache size change results 86.\n";
}
}
- if ( show_progress ) HDfprintf(stderr, "check point %d\n", checkpoint++);
+ if(show_progress) HDfprintf(stderr, "check point %d\n", checkpoint++);
/* now test the flash cache size increment code. At least at present,
@@ -20429,7 +20302,7 @@ check_auto_cache_resize(hbool_t cork_ageout)
* code increases the cache size when and as expected.
*/
- if ( show_progress ) HDfprintf(stderr, "check point %d\n", checkpoint++);
+ if(show_progress) HDfprintf(stderr, "check point %d\n", checkpoint++);
/* Place the cache in a known state via a flush-destroy on the cache
* to clear out all entries, and then a reset on all the entries.
@@ -20438,20 +20311,18 @@ check_auto_cache_resize(hbool_t cork_ageout)
* modes. Verify that all perform as expected.
*/
- if ( pass ) {
-
+ if(pass) {
flush_cache(file_ptr, TRUE, FALSE, FALSE);
-
reset_entries();
}
- if ( show_progress ) HDfprintf(stderr, "check point %d\n", checkpoint++);
+ if(show_progress) HDfprintf(stderr, "check point %d\n", checkpoint++);
/* now repeat the above tests using the add space flash cache size
* increment algorithm.
*/
- if ( pass ) {
+ if(pass) {
auto_size_ctl.version = H5C__CURR_AUTO_SIZE_CTL_VER;
auto_size_ctl.rpt_fcn = test_rpt_fcn;
@@ -20496,154 +20367,148 @@ check_auto_cache_resize(hbool_t cork_ageout)
auto_size_ctl.empty_reserve = 0.5f; /* for ease of testing */
result = H5C_set_cache_auto_resize_config(cache_ptr, &auto_size_ctl);
-
- if ( result != SUCCEED ) {
-
+ if(result != SUCCEED) {
pass = FALSE;
failure_mssg = "H5C_set_cache_auto_resize_config failed 12.\n";
}
}
- if ( pass ) {
+ if(pass) {
- if ( ( cache_ptr->max_cache_size != (64 * 1024) ) ||
- ( cache_ptr->min_clean_size != (32 * 1024) ) ||
- ( cache_ptr->index_len != 0 ) ||
- ( cache_ptr->index_size != 0 ) ||
- ( cache_ptr->cache_accesses != 0 ) ) {
+ if((cache_ptr->max_cache_size != (64 * 1024)) ||
+ (cache_ptr->min_clean_size != (32 * 1024)) ||
+ (cache_ptr->index_len != 0) ||
+ (cache_ptr->index_size != 0) ||
+ (cache_ptr->cache_accesses != 0)) {
pass = FALSE;
failure_mssg = "Unexpected cache config (0).\n";
}
}
- if ( show_progress ) HDfprintf(stderr, "check point %d\n", checkpoint++);
+ if(show_progress) HDfprintf(stderr, "check point %d\n", checkpoint++);
/* Load a huge entry into the cache */
- if ( pass ) {
+ if(pass) {
protect_entry(file_ptr, HUGE_ENTRY_TYPE, 0);
- if ( pass ) {
+ if(pass)
unprotect_entry(file_ptr, HUGE_ENTRY_TYPE, 0, H5C__NO_FLAGS_SET);
- }
- if ( ( pass ) &&
- ( ( ( cache_ptr->max_cache_size != (64 * 1024) ) ||
- ( cache_ptr->min_clean_size != (32 * 1024) ) ||
- ( cache_ptr->index_len != 1 ) ||
- ( cache_ptr->index_size != HUGE_ENTRY_SIZE ) ||
- ( cache_ptr->cache_accesses != 1 ) ) ) ) {
+ if(pass &&
+ (((cache_ptr->max_cache_size != (64 * 1024)) ||
+ (cache_ptr->min_clean_size != (32 * 1024)) ||
+ (cache_ptr->index_len != 1) ||
+ (cache_ptr->index_size != HUGE_ENTRY_SIZE) ||
+ (cache_ptr->cache_accesses != 1)))) {
pass = FALSE;
failure_mssg = "Unexpected cache config (1).\n";
}
}
- if ( show_progress ) HDfprintf(stderr, "check point %d\n", checkpoint++);
+ if(show_progress) HDfprintf(stderr, "check point %d\n", checkpoint++);
/* Now load a monster entry. Since a monster entry is larger than
* half the size of the cache, and there is not sufficient space
* for a monster entry in the cache, we will add space to the
* cache to make room for the entry.
*/
- if ( pass ) {
+ if(pass) {
protect_entry(file_ptr, MONSTER_ENTRY_TYPE, 0);
- if ( pass ) {
+ if(pass)
unprotect_entry(file_ptr, MONSTER_ENTRY_TYPE, 0, H5C__NO_FLAGS_SET);
- }
- if ( ( pass ) &&
- ( ( ( cache_ptr->max_cache_size != (80 * 1024) ) ||
- ( cache_ptr->min_clean_size != (40 * 1024) ) ||
- ( cache_ptr->index_len != 2 ) ||
- ( cache_ptr->index_size != (HUGE_ENTRY_SIZE +
- MONSTER_ENTRY_SIZE) ) ||
- ( cache_ptr->cache_accesses != 1 ) ) ) ) {
+ if(pass &&
+ (((cache_ptr->max_cache_size != (80 * 1024)) ||
+ (cache_ptr->min_clean_size != (40 * 1024)) ||
+ (cache_ptr->index_len != 2) ||
+ (cache_ptr->index_size != (HUGE_ENTRY_SIZE +
+ MONSTER_ENTRY_SIZE)) ||
+ (cache_ptr->cache_accesses != 1)))) {
pass = FALSE;
failure_mssg = "Unexpected cache config (2).\n";
}
}
- if ( show_progress ) HDfprintf(stderr, "check point %d\n", checkpoint++);
+ if(show_progress) HDfprintf(stderr, "check point %d\n", checkpoint++);
/* Load a second monster entry. Since the monster entry is larger
* than half the size of the cache yet again, and there is not
* sufficient space for the monster entry in the cache, we again
* add space to the cache to make space for the entry.
*/
- if ( pass ) {
+ if(pass) {
protect_entry(file_ptr, MONSTER_ENTRY_TYPE, 1);
unprotect_entry(file_ptr, MONSTER_ENTRY_TYPE, 1, H5C__NO_FLAGS_SET);
- if ( ( pass ) &&
- ( ( ( cache_ptr->max_cache_size != (144 * 1024) ) ||
- ( cache_ptr->min_clean_size != ( 72 * 1024) ) ||
- ( cache_ptr->index_len != 3 ) ||
- ( cache_ptr->index_size != ((2 * MONSTER_ENTRY_SIZE) +
- HUGE_ENTRY_SIZE) ) ||
- ( cache_ptr->cache_accesses != 1 ) ) ) ) {
+ if(pass &&
+ (((cache_ptr->max_cache_size != (144 * 1024)) ||
+ (cache_ptr->min_clean_size != (72 * 1024)) ||
+ (cache_ptr->index_len != 3) ||
+ (cache_ptr->index_size != ((2 * MONSTER_ENTRY_SIZE) +
+ HUGE_ENTRY_SIZE)) ||
+ (cache_ptr->cache_accesses != 1)))) {
pass = FALSE;
failure_mssg = "Unexpected cache config (3).\n";
}
}
- if ( show_progress ) HDfprintf(stderr, "check point %d\n", checkpoint++);
+ if(show_progress) HDfprintf(stderr, "check point %d\n", checkpoint++);
/* Load a third moster entry. Should be no cache size increase this
* time.
*/
- if ( pass ) {
+ if(pass) {
protect_entry(file_ptr, MONSTER_ENTRY_TYPE, 2);
unprotect_entry(file_ptr, MONSTER_ENTRY_TYPE, 2, H5C__NO_FLAGS_SET);
- if ( ( pass ) &&
- ( ( ( cache_ptr->max_cache_size != (144 * 1024) ) ||
- ( cache_ptr->min_clean_size != ( 72 * 1024) ) ||
- ( cache_ptr->index_len != 2 ) ||
- ( cache_ptr->index_size != (2 * MONSTER_ENTRY_SIZE) ) ||
- ( cache_ptr->cache_accesses != 2 ) ) ) ) {
+ if(pass &&
+ (((cache_ptr->max_cache_size != (144 * 1024)) ||
+ (cache_ptr->min_clean_size != (72 * 1024)) ||
+ (cache_ptr->index_len != 2) ||
+ (cache_ptr->index_size != (2 * MONSTER_ENTRY_SIZE)) ||
+ (cache_ptr->cache_accesses != 2)))) {
pass = FALSE;
failure_mssg = "Unexpected cache config (4).\n";
}
}
- if ( show_progress ) HDfprintf(stderr, "check point %d\n", checkpoint++);
+ if(show_progress) HDfprintf(stderr, "check point %d\n", checkpoint++);
/* delete existing entries to prepare for next test, and reset
* the size of the cache.
*/
- if ( pass ) {
+ if(pass) {
expunge_entry(file_ptr, MONSTER_ENTRY_TYPE, 1);
expunge_entry(file_ptr, MONSTER_ENTRY_TYPE, 2);
- if ( pass ) {
+ if(pass) {
result = H5C_set_cache_auto_resize_config(cache_ptr, &auto_size_ctl);
-
- if ( result != SUCCEED ) {
-
+ if(result != SUCCEED) {
pass = FALSE;
failure_mssg = "H5C_set_cache_auto_resize_config failed 13.\n";
}
}
- if ( ( pass ) &&
- ( ( ( cache_ptr->max_cache_size != (64 * 1024) ) ||
- ( cache_ptr->min_clean_size != (32 * 1024) ) ||
- ( cache_ptr->index_len != 0 ) ||
- ( cache_ptr->index_size != 0 ) ||
- ( cache_ptr->cache_accesses != 0 ) ) ) ) {
+ if(pass &&
+ (((cache_ptr->max_cache_size != (64 * 1024)) ||
+ (cache_ptr->min_clean_size != (32 * 1024)) ||
+ (cache_ptr->index_len != 0) ||
+ (cache_ptr->index_size != 0) ||
+ (cache_ptr->cache_accesses != 0)))) {
pass = FALSE;
failure_mssg = "Unexpected cache config (5).\n";
@@ -20654,10 +20519,10 @@ check_auto_cache_resize(hbool_t cork_ageout)
* entries to the cache, not protects.
*/
- if ( show_progress ) HDfprintf(stderr, "check point %d\n", checkpoint++);
+ if(show_progress) HDfprintf(stderr, "check point %d\n", checkpoint++);
/* insert a huge entry into the cache */
- if ( pass ) {
+ if(pass) {
insert_entry(file_ptr, HUGE_ENTRY_TYPE, 1, H5C__NO_FLAGS_SET);
@@ -20667,94 +20532,94 @@ check_auto_cache_resize(hbool_t cork_ageout)
protect_entry(file_ptr, HUGE_ENTRY_TYPE, 1);
unprotect_entry(file_ptr, HUGE_ENTRY_TYPE, 1, H5C__NO_FLAGS_SET);
- if ( ( pass ) &&
- ( ( ( cache_ptr->max_cache_size != (64 * 1024) ) ||
- ( cache_ptr->min_clean_size != (32 * 1024) ) ||
- ( cache_ptr->index_len != 1 ) ||
- ( cache_ptr->index_size != HUGE_ENTRY_SIZE ) ||
- ( cache_ptr->cache_accesses != 2 ) ) ) ) {
+ if(pass &&
+ (((cache_ptr->max_cache_size != (64 * 1024)) ||
+ (cache_ptr->min_clean_size != (32 * 1024)) ||
+ (cache_ptr->index_len != 1) ||
+ (cache_ptr->index_size != HUGE_ENTRY_SIZE) ||
+ (cache_ptr->cache_accesses != 2)))) {
pass = FALSE;
failure_mssg = "Unexpected cache config (6).\n";
}
}
- if ( show_progress ) HDfprintf(stderr, "check point %d\n", checkpoint++);
+ if(show_progress) HDfprintf(stderr, "check point %d\n", checkpoint++);
/* Now insert a monster entry. Since a monster entry is larger than
* half the size of the cache, and there is not sufficient space
* for a monster entry in the cache, we will add space to the
* cache to make room for the entry.
*/
- if ( pass ) {
+ if(pass) {
insert_entry(file_ptr, MONSTER_ENTRY_TYPE, 4, H5C__NO_FLAGS_SET);
- if ( ( pass ) &&
- ( ( ( cache_ptr->max_cache_size != (80 * 1024) ) ||
- ( cache_ptr->min_clean_size != (40 * 1024) ) ||
- ( cache_ptr->index_len != 2 ) ||
- ( cache_ptr->index_size !=
- HUGE_ENTRY_SIZE + MONSTER_ENTRY_SIZE ) ||
- ( cache_ptr->cache_accesses != 0 ) ) ) ) {
+ if(pass &&
+ (((cache_ptr->max_cache_size != (80 * 1024)) ||
+ (cache_ptr->min_clean_size != (40 * 1024)) ||
+ (cache_ptr->index_len != 2) ||
+ (cache_ptr->index_size !=
+ HUGE_ENTRY_SIZE + MONSTER_ENTRY_SIZE) ||
+ (cache_ptr->cache_accesses != 0)))) {
pass = FALSE;
failure_mssg = "Unexpected cache config (7).\n";
}
}
- if ( show_progress ) HDfprintf(stderr, "check point %d\n", checkpoint++);
+ if(show_progress) HDfprintf(stderr, "check point %d\n", checkpoint++);
/* Insert a second monster entry. Cache size should increase again.
*/
- if ( pass ) {
+ if(pass) {
insert_entry(file_ptr, MONSTER_ENTRY_TYPE, 5, H5C__NO_FLAGS_SET);
- if ( ( pass ) &&
- ( ( ( cache_ptr->max_cache_size != (144 * 1024) ) ||
- ( cache_ptr->min_clean_size != ( 72 * 1024) ) ||
- ( cache_ptr->index_len != 3 ) ||
- ( cache_ptr->index_size !=
- 2 * MONSTER_ENTRY_SIZE + HUGE_ENTRY_SIZE ) ||
- ( cache_ptr->cache_accesses != 0 ) ) ) ) {
+ if(pass &&
+ (((cache_ptr->max_cache_size != (144 * 1024)) ||
+ (cache_ptr->min_clean_size != (72 * 1024)) ||
+ (cache_ptr->index_len != 3) ||
+ (cache_ptr->index_size !=
+ 2 * MONSTER_ENTRY_SIZE + HUGE_ENTRY_SIZE) ||
+ (cache_ptr->cache_accesses != 0)))) {
pass = FALSE;
failure_mssg = "Unexpected cache config (8).\n";
}
}
- if ( show_progress ) HDfprintf(stderr, "check point %d\n", checkpoint++);
+ if(show_progress) HDfprintf(stderr, "check point %d\n", checkpoint++);
/* Insert a third monster entry. Should be no cache size increase this
* time.
*/
- if ( pass ) {
+ if(pass) {
protect_entry(file_ptr, MONSTER_ENTRY_TYPE, 6);
unprotect_entry(file_ptr, MONSTER_ENTRY_TYPE, 6, H5C__NO_FLAGS_SET);
- if ( ( pass ) &&
- ( ( ( cache_ptr->max_cache_size != (144 * 1024) ) ||
- ( cache_ptr->min_clean_size != ( 72 * 1024) ) ||
- ( cache_ptr->index_len != 2 ) ||
- ( cache_ptr->index_size != (2 * MONSTER_ENTRY_SIZE) ) ||
- ( cache_ptr->cache_accesses != 1 ) ) ) ) {
+ if(pass &&
+ (((cache_ptr->max_cache_size != (144 * 1024)) ||
+ (cache_ptr->min_clean_size != (72 * 1024)) ||
+ (cache_ptr->index_len != 2) ||
+ (cache_ptr->index_size != (2 * MONSTER_ENTRY_SIZE)) ||
+ (cache_ptr->cache_accesses != 1)))) {
pass = FALSE;
failure_mssg = "Unexpected cache config (9).\n";
}
}
- if ( show_progress ) HDfprintf(stderr, "check point %d\n", checkpoint++);
+ if(show_progress) HDfprintf(stderr, "check point %d\n", checkpoint++);
/* delete existing entries to prepare for next test, and reset
* the size of the cache. We must also change the size of the needed
* variable entries before we run the test, so will protect and
* unprotect them now so as to get the correct initial size.
*/
- if ( pass ) {
+ if(pass) {
expunge_entry(file_ptr, MONSTER_ENTRY_TYPE, 5);
expunge_entry(file_ptr, MONSTER_ENTRY_TYPE, 6);
@@ -20778,34 +20643,34 @@ check_auto_cache_resize(hbool_t cork_ageout)
flush_cache(file_ptr, TRUE, FALSE, FALSE);
- if ( pass ) {
+ if(pass) {
auto_size_ctl.initial_size = 6 * 1024;
result = H5C_set_cache_auto_resize_config(cache_ptr, &auto_size_ctl);
- if ( result != SUCCEED ) {
+ if(result != SUCCEED) {
pass = FALSE;
failure_mssg = "H5C_set_cache_auto_resize_config failed 13.\n";
}
}
- if ( ( pass ) &&
- ( ( ( cache_ptr->max_cache_size != (6 * 1024) ) ||
- ( cache_ptr->min_clean_size != (3 * 1024) ) ||
- ( cache_ptr->index_len != 0 ) ||
- ( cache_ptr->index_size != 0 ) ||
- ( cache_ptr->cache_accesses != 0 ) ) ) ) {
+ if(pass &&
+ (((cache_ptr->max_cache_size != (6 * 1024)) ||
+ (cache_ptr->min_clean_size != (3 * 1024)) ||
+ (cache_ptr->index_len != 0) ||
+ (cache_ptr->index_size != 0) ||
+ (cache_ptr->cache_accesses != 0)))) {
pass = FALSE;
failure_mssg = "Unexpected cache config (10).\n";
}
}
- if ( show_progress ) HDfprintf(stderr, "check point %d\n", checkpoint++);
+ if(show_progress) HDfprintf(stderr, "check point %d\n", checkpoint++);
/* Now load the variable entries into the cache */
- if ( pass ) {
+ if(pass) {
protect_entry(file_ptr, VARIABLE_ENTRY_TYPE, 10);
unprotect_entry(file_ptr, VARIABLE_ENTRY_TYPE, 10, H5C__NO_FLAGS_SET);
@@ -20819,122 +20684,122 @@ check_auto_cache_resize(hbool_t cork_ageout)
protect_entry(file_ptr, VARIABLE_ENTRY_TYPE, 13);
unprotect_entry(file_ptr, VARIABLE_ENTRY_TYPE, 13, H5C__NO_FLAGS_SET);
- if ( ( pass ) &&
- ( ( ( cache_ptr->max_cache_size != (6 * 1024) ) ||
- ( cache_ptr->min_clean_size != (3 * 1024) ) ||
- ( cache_ptr->index_len != 4 ) ||
- ( cache_ptr->index_size != 4 * 1024 ) ||
- ( cache_ptr->cache_accesses != 4 ) ) ) ) {
+ if(pass &&
+ (((cache_ptr->max_cache_size != (6 * 1024)) ||
+ (cache_ptr->min_clean_size != (3 * 1024)) ||
+ (cache_ptr->index_len != 4) ||
+ (cache_ptr->index_size != 4 * 1024) ||
+ (cache_ptr->cache_accesses != 4)))) {
pass = FALSE;
failure_mssg = "Unexpected cache config (11).\n";
}
}
- if ( show_progress ) HDfprintf(stderr, "check point %d\n", checkpoint++);
+ if(show_progress) HDfprintf(stderr, "check point %d\n", checkpoint++);
/* protect a variable entry, and re-size it to 3K. Should be
* no effect on the size of the cache.
*/
- if ( pass ) {
+ if(pass) {
protect_entry(file_ptr, VARIABLE_ENTRY_TYPE, 10);
resize_entry(file_ptr, VARIABLE_ENTRY_TYPE, 10, (3 * 1024), TRUE);
unprotect_entry(file_ptr, VARIABLE_ENTRY_TYPE, 10, H5C__DIRTIED_FLAG);
- if ( ( pass ) &&
- ( ( ( cache_ptr->max_cache_size != (6 * 1024) ) ||
- ( cache_ptr->min_clean_size != (3 * 1024) ) ||
- ( cache_ptr->index_len != 4 ) ||
- ( cache_ptr->index_size != 6 * 1024 ) ||
- ( cache_ptr->cache_accesses != 5 ) ) ) ) {
+ if(pass &&
+ (((cache_ptr->max_cache_size != (6 * 1024)) ||
+ (cache_ptr->min_clean_size != (3 * 1024)) ||
+ (cache_ptr->index_len != 4) ||
+ (cache_ptr->index_size != 6 * 1024) ||
+ (cache_ptr->cache_accesses != 5)))) {
pass = FALSE;
failure_mssg = "Unexpected cache config (12).\n";
}
}
- if ( show_progress ) HDfprintf(stderr, "check point %d\n", checkpoint++);
+ if(show_progress) HDfprintf(stderr, "check point %d\n", checkpoint++);
/* protect the variable entry again, and re-size it to 10K. Should
* resize the cache to 13 KB. Note that cache_accesses will be 0
* in this case, since cache_accesses is incremented on the protect.
*/
- if ( pass ) {
+ if(pass) {
protect_entry(file_ptr, VARIABLE_ENTRY_TYPE, 10);
resize_entry(file_ptr, VARIABLE_ENTRY_TYPE, 10, (10 * 1024), TRUE);
unprotect_entry(file_ptr, VARIABLE_ENTRY_TYPE, 10, H5C__DIRTIED_FLAG);
- if ( ( pass ) &&
- ( ( ( cache_ptr->max_cache_size != (13 * 1024) ) ||
- ( cache_ptr->min_clean_size != (13 * 512) ) ||
- ( cache_ptr->index_len != 4 ) ||
- ( cache_ptr->index_size != 13 * 1024 ) ||
- ( cache_ptr->cache_accesses != 0 ) ) ) ) {
+ if(pass &&
+ (((cache_ptr->max_cache_size != (13 * 1024)) ||
+ (cache_ptr->min_clean_size != (13 * 512)) ||
+ (cache_ptr->index_len != 4) ||
+ (cache_ptr->index_size != 13 * 1024) ||
+ (cache_ptr->cache_accesses != 0)))) {
pass = FALSE;
failure_mssg = "Unexpected cache config (13).\n";
}
}
- if ( show_progress ) HDfprintf(stderr, "check point %d\n", checkpoint++);
+ if(show_progress) HDfprintf(stderr, "check point %d\n", checkpoint++);
/* protect a second variable entry, and re-size it to 10K. Should
* resize to 22 KB.
*/
- if ( pass ) {
+ if(pass) {
protect_entry(file_ptr, VARIABLE_ENTRY_TYPE, 11);
resize_entry(file_ptr, VARIABLE_ENTRY_TYPE, 11, (10 * 1024), TRUE);
unprotect_entry(file_ptr, VARIABLE_ENTRY_TYPE, 11, H5C__DIRTIED_FLAG);
- if ( ( pass ) &&
- ( ( ( cache_ptr->max_cache_size != (22 * 1024) ) ||
- ( cache_ptr->min_clean_size != (11 * 1024) ) ||
- ( cache_ptr->index_len != 4 ) ||
- ( cache_ptr->index_size != 22 * 1024 ) ||
- ( cache_ptr->cache_accesses != 0 ) ) ) ) {
+ if(pass &&
+ (((cache_ptr->max_cache_size != (22 * 1024)) ||
+ (cache_ptr->min_clean_size != (11 * 1024)) ||
+ (cache_ptr->index_len != 4) ||
+ (cache_ptr->index_size != 22 * 1024) ||
+ (cache_ptr->cache_accesses != 0)))) {
pass = FALSE;
failure_mssg = "Unexpected cache config (14).\n";
}
}
- if ( show_progress ) HDfprintf(stderr, "check point %d\n", checkpoint++);
+ if(show_progress) HDfprintf(stderr, "check point %d\n", checkpoint++);
/* protect a third variable entry, and re-size it to 10K. Should
* be no change in cache size.
*/
- if ( pass ) {
+ if(pass) {
protect_entry(file_ptr, VARIABLE_ENTRY_TYPE, 12);
resize_entry(file_ptr, VARIABLE_ENTRY_TYPE, 12, (10 * 1024), TRUE);
unprotect_entry(file_ptr, VARIABLE_ENTRY_TYPE, 12, H5C__DIRTIED_FLAG);
- if ( ( pass ) &&
- ( ( ( cache_ptr->max_cache_size != (22 * 1024) ) ||
- ( cache_ptr->min_clean_size != (11 * 1024) ) ||
- ( cache_ptr->index_len != 4 ) ||
- ( cache_ptr->index_size != 31 * 1024 ) ||
- ( cache_ptr->cache_accesses != 1 ) ) ) ) {
+ if(pass &&
+ (((cache_ptr->max_cache_size != (22 * 1024)) ||
+ (cache_ptr->min_clean_size != (11 * 1024)) ||
+ (cache_ptr->index_len != 4) ||
+ (cache_ptr->index_size != 31 * 1024) ||
+ (cache_ptr->cache_accesses != 1)))) {
pass = FALSE;
failure_mssg = "Unexpected cache config (15).\n";
}
}
- if ( show_progress ) HDfprintf(stderr, "check point %d\n", checkpoint++);
+ if(show_progress) HDfprintf(stderr, "check point %d\n", checkpoint++);
/* re-size the variable entries back down to their initial size, and
* restore the cache to its initial size as well, in preparation
* for the next test.
*/
- if ( pass ) {
+ if(pass) {
protect_entry(file_ptr, VARIABLE_ENTRY_TYPE, 10);
resize_entry(file_ptr, VARIABLE_ENTRY_TYPE, 10, (1 * 1024), TRUE);
@@ -20948,116 +20813,116 @@ check_auto_cache_resize(hbool_t cork_ageout)
resize_entry(file_ptr, VARIABLE_ENTRY_TYPE, 12, (1 * 1024), TRUE);
unprotect_entry(file_ptr, VARIABLE_ENTRY_TYPE, 12, H5C__DIRTIED_FLAG);
- if ( pass ) {
+ if(pass) {
auto_size_ctl.initial_size = 6 * 1024;
result = H5C_set_cache_auto_resize_config(cache_ptr, &auto_size_ctl);
- if ( result != SUCCEED ) {
+ if(result != SUCCEED) {
pass = FALSE;
failure_mssg = "H5C_set_cache_auto_resize_config failed 14.\n";
}
}
- if ( ( pass ) &&
- ( ( ( cache_ptr->max_cache_size != (6 * 1024) ) ||
- ( cache_ptr->min_clean_size != (3 * 1024) ) ||
- ( cache_ptr->index_len != 4 ) ||
- ( cache_ptr->index_size != 4 * 1024 ) ||
- ( cache_ptr->cache_accesses != 0 ) ) ) ) {
+ if(pass &&
+ (((cache_ptr->max_cache_size != (6 * 1024)) ||
+ (cache_ptr->min_clean_size != (3 * 1024)) ||
+ (cache_ptr->index_len != 4) ||
+ (cache_ptr->index_size != 4 * 1024) ||
+ (cache_ptr->cache_accesses != 0)))) {
pass = FALSE;
failure_mssg = "Unexpected cache config (16).\n";
}
}
- if ( show_progress ) HDfprintf(stderr, "check point %d\n", checkpoint++);
+ if(show_progress) HDfprintf(stderr, "check point %d\n", checkpoint++);
/* Now test flash cache resizes with pinned entries...
*/
- if ( pass ) {
+ if(pass) {
protect_entry(file_ptr, VARIABLE_ENTRY_TYPE, 10);
unprotect_entry(file_ptr, VARIABLE_ENTRY_TYPE, 10, H5C__PIN_ENTRY_FLAG);
resize_entry(file_ptr, VARIABLE_ENTRY_TYPE, 10, 2 * 1024, TRUE);
- if ( ( pass ) &&
- ( ( ( cache_ptr->max_cache_size != (6 * 1024) ) ||
- ( cache_ptr->min_clean_size != (6 * 512) ) ||
- ( cache_ptr->index_len != 4 ) ||
- ( cache_ptr->index_size != 5 * 1024 ) ||
- ( cache_ptr->cache_accesses != 1 ) ) ) ) {
+ if(pass &&
+ (((cache_ptr->max_cache_size != (6 * 1024)) ||
+ (cache_ptr->min_clean_size != (6 * 512)) ||
+ (cache_ptr->index_len != 4) ||
+ (cache_ptr->index_size != 5 * 1024) ||
+ (cache_ptr->cache_accesses != 1)))) {
pass = FALSE;
failure_mssg = "Unexpected cache config (17).\n";
}
}
- if ( show_progress ) HDfprintf(stderr, "check point %d\n", checkpoint++);
+ if(show_progress) HDfprintf(stderr, "check point %d\n", checkpoint++);
- if ( pass ) {
+ if(pass) {
resize_entry(file_ptr, VARIABLE_ENTRY_TYPE, 10, 10 * 1024, TRUE);
- if ( ( pass ) &&
- ( ( ( cache_ptr->max_cache_size != (13 * 1024) ) ||
- ( cache_ptr->min_clean_size != (13 * 512) ) ||
- ( cache_ptr->index_len != 4 ) ||
- ( cache_ptr->index_size != 13 * 1024 ) ||
- ( cache_ptr->cache_accesses != 0 ) ) ) ) {
+ if(pass &&
+ (((cache_ptr->max_cache_size != (13 * 1024)) ||
+ (cache_ptr->min_clean_size != (13 * 512)) ||
+ (cache_ptr->index_len != 4) ||
+ (cache_ptr->index_size != 13 * 1024) ||
+ (cache_ptr->cache_accesses != 0)))) {
pass = FALSE;
failure_mssg = "Unexpected cache config (18).\n";
}
}
- if ( show_progress ) HDfprintf(stderr, "check point %d\n", checkpoint++);
+ if(show_progress) HDfprintf(stderr, "check point %d\n", checkpoint++);
- if ( pass ) {
+ if(pass) {
protect_entry(file_ptr, VARIABLE_ENTRY_TYPE, 11);
unprotect_entry(file_ptr, VARIABLE_ENTRY_TYPE, 11, H5C__PIN_ENTRY_FLAG);
resize_entry(file_ptr, VARIABLE_ENTRY_TYPE, 11, 10 * 1024, TRUE);
- if ( ( pass ) &&
- ( ( ( cache_ptr->max_cache_size != (22 * 1024) ) ||
- ( cache_ptr->min_clean_size != (11 * 1024) ) ||
- ( cache_ptr->index_len != 4 ) ||
- ( cache_ptr->index_size != 22 * 1024 ) ||
- ( cache_ptr->cache_accesses != 0 ) ) ) ) {
+ if(pass &&
+ (((cache_ptr->max_cache_size != (22 * 1024)) ||
+ (cache_ptr->min_clean_size != (11 * 1024)) ||
+ (cache_ptr->index_len != 4) ||
+ (cache_ptr->index_size != 22 * 1024) ||
+ (cache_ptr->cache_accesses != 0)))) {
pass = FALSE;
failure_mssg = "Unexpected cache config (19).\n";
}
}
- if ( show_progress ) HDfprintf(stderr, "check point %d\n", checkpoint++);
+ if(show_progress) HDfprintf(stderr, "check point %d\n", checkpoint++);
- if ( pass ) {
+ if(pass) {
protect_entry(file_ptr, VARIABLE_ENTRY_TYPE, 12);
unprotect_entry(file_ptr, VARIABLE_ENTRY_TYPE, 12, H5C__PIN_ENTRY_FLAG);
resize_entry(file_ptr, VARIABLE_ENTRY_TYPE, 12, 10 * 1024, TRUE);
- if ( ( pass ) &&
- ( ( ( cache_ptr->max_cache_size != (22 * 1024) ) ||
- ( cache_ptr->min_clean_size != (11 * 1024) ) ||
- ( cache_ptr->index_len != 4 ) ||
- ( cache_ptr->index_size != 31 * 1024 ) ||
- ( cache_ptr->cache_accesses != 1 ) ) ) ) {
+ if(pass &&
+ (((cache_ptr->max_cache_size != (22 * 1024)) ||
+ (cache_ptr->min_clean_size != (11 * 1024)) ||
+ (cache_ptr->index_len != 4) ||
+ (cache_ptr->index_size != 31 * 1024) ||
+ (cache_ptr->cache_accesses != 1)))) {
pass = FALSE;
failure_mssg = "Unexpected cache config (20).\n";
}
}
- if ( show_progress ) HDfprintf(stderr, "check point %d\n", checkpoint++);
+ if(show_progress) HDfprintf(stderr, "check point %d\n", checkpoint++);
/* Unpin the entries. Note that no entries are evicted as we don't
* load any entries.
*/
- if ( pass ) {
+ if(pass) {
protect_entry(file_ptr, VARIABLE_ENTRY_TYPE, 10);
unprotect_entry(file_ptr, VARIABLE_ENTRY_TYPE, 10, H5C__UNPIN_ENTRY_FLAG);
@@ -21068,25 +20933,25 @@ check_auto_cache_resize(hbool_t cork_ageout)
protect_entry(file_ptr, VARIABLE_ENTRY_TYPE, 12);
unprotect_entry(file_ptr, VARIABLE_ENTRY_TYPE, 12, H5C__UNPIN_ENTRY_FLAG);
- if ( ( pass ) &&
- ( ( ( cache_ptr->max_cache_size != (22 * 1024) ) ||
- ( cache_ptr->min_clean_size != (11 * 1024) ) ||
- ( cache_ptr->index_len != 4 ) ||
- ( cache_ptr->index_size != 31 * 1024 ) ||
- ( cache_ptr->cache_accesses != 4 ) ) ) ) {
+ if(pass &&
+ (((cache_ptr->max_cache_size != (22 * 1024)) ||
+ (cache_ptr->min_clean_size != (11 * 1024)) ||
+ (cache_ptr->index_len != 4) ||
+ (cache_ptr->index_size != 31 * 1024) ||
+ (cache_ptr->cache_accesses != 4)))) {
pass = FALSE;
failure_mssg = "Unexpected cache config (21).\n";
}
}
- if ( show_progress ) HDfprintf(stderr, "check point %d\n", checkpoint++);
+ if(show_progress) HDfprintf(stderr, "check point %d\n", checkpoint++);
/* re-size the variable entries back down to their initial size, and
* restore the cache to its initial size as well, in preparation
* for the next test.
*/
- if ( pass ) {
+ if(pass) {
protect_entry(file_ptr, VARIABLE_ENTRY_TYPE, 10);
resize_entry(file_ptr, VARIABLE_ENTRY_TYPE, 10, (1 * 1024), TRUE);
@@ -21100,112 +20965,112 @@ check_auto_cache_resize(hbool_t cork_ageout)
resize_entry(file_ptr, VARIABLE_ENTRY_TYPE, 12, (1 * 1024), TRUE);
unprotect_entry(file_ptr, VARIABLE_ENTRY_TYPE, 12, H5C__DIRTIED_FLAG);
- if ( pass ) {
+ if(pass) {
auto_size_ctl.initial_size = 6 * 1024;
result = H5C_set_cache_auto_resize_config(cache_ptr, &auto_size_ctl);
- if ( result != SUCCEED ) {
+ if(result != SUCCEED) {
pass = FALSE;
failure_mssg = "H5C_set_cache_auto_resize_config failed 15.\n";
}
}
- if ( ( pass ) &&
- ( ( ( cache_ptr->max_cache_size != (6 * 1024) ) ||
- ( cache_ptr->min_clean_size != (3 * 1024) ) ||
- ( cache_ptr->index_len != 4 ) ||
- ( cache_ptr->index_size != 4 * 1024 ) ||
- ( cache_ptr->cache_accesses != 0 ) ) ) ) {
+ if(pass &&
+ (((cache_ptr->max_cache_size != (6 * 1024)) ||
+ (cache_ptr->min_clean_size != (3 * 1024)) ||
+ (cache_ptr->index_len != 4) ||
+ (cache_ptr->index_size != 4 * 1024) ||
+ (cache_ptr->cache_accesses != 0)))) {
pass = FALSE;
failure_mssg = "Unexpected cache config (22).\n";
}
}
- if ( pass ) {
+ if(pass) {
protect_entry(file_ptr, VARIABLE_ENTRY_TYPE, 10);
unprotect_entry(file_ptr, VARIABLE_ENTRY_TYPE, 10, H5C__PIN_ENTRY_FLAG);
resize_entry(file_ptr, VARIABLE_ENTRY_TYPE, 10, 2 * 1024, TRUE);
- if ( ( pass ) &&
- ( ( ( cache_ptr->max_cache_size != (6 * 1024) ) ||
- ( cache_ptr->min_clean_size != (6 * 512) ) ||
- ( cache_ptr->index_len != 4 ) ||
- ( cache_ptr->index_size != 5 * 1024 ) ||
- ( cache_ptr->cache_accesses != 1 ) ) ) ) {
+ if(pass &&
+ (((cache_ptr->max_cache_size != (6 * 1024)) ||
+ (cache_ptr->min_clean_size != (6 * 512)) ||
+ (cache_ptr->index_len != 4) ||
+ (cache_ptr->index_size != 5 * 1024) ||
+ (cache_ptr->cache_accesses != 1)))) {
pass = FALSE;
failure_mssg = "Unexpected cache config (23).\n";
}
}
- if ( show_progress ) HDfprintf(stderr, "check point %d\n", checkpoint++);
+ if(show_progress) HDfprintf(stderr, "check point %d\n", checkpoint++);
- if ( pass ) {
+ if(pass) {
resize_entry(file_ptr, VARIABLE_ENTRY_TYPE, 10, 10 * 1024, TRUE);
- if ( ( pass ) &&
- ( ( ( cache_ptr->max_cache_size != (13 * 1024) ) ||
- ( cache_ptr->min_clean_size != (13 * 512) ) ||
- ( cache_ptr->index_len != 4 ) ||
- ( cache_ptr->index_size != 13 * 1024 ) ||
- ( cache_ptr->cache_accesses != 0 ) ) ) ) {
+ if(pass &&
+ (((cache_ptr->max_cache_size != (13 * 1024)) ||
+ (cache_ptr->min_clean_size != (13 * 512)) ||
+ (cache_ptr->index_len != 4) ||
+ (cache_ptr->index_size != 13 * 1024) ||
+ (cache_ptr->cache_accesses != 0)))) {
pass = FALSE;
failure_mssg = "Unexpected cache config (24).\n";
}
}
- if ( show_progress ) HDfprintf(stderr, "check point %d\n", checkpoint++);
+ if(show_progress) HDfprintf(stderr, "check point %d\n", checkpoint++);
- if ( pass ) {
+ if(pass) {
protect_entry(file_ptr, VARIABLE_ENTRY_TYPE, 11);
unprotect_entry(file_ptr, VARIABLE_ENTRY_TYPE, 11, H5C__PIN_ENTRY_FLAG);
resize_entry(file_ptr, VARIABLE_ENTRY_TYPE, 11, 10 * 1024, TRUE);
- if ( ( pass ) &&
- ( ( ( cache_ptr->max_cache_size != (22 * 1024) ) ||
- ( cache_ptr->min_clean_size != (11 * 1024) ) ||
- ( cache_ptr->index_len != 4 ) ||
- ( cache_ptr->index_size != 22 * 1024 ) ||
- ( cache_ptr->cache_accesses != 0 ) ) ) ) {
+ if(pass &&
+ (((cache_ptr->max_cache_size != (22 * 1024)) ||
+ (cache_ptr->min_clean_size != (11 * 1024)) ||
+ (cache_ptr->index_len != 4) ||
+ (cache_ptr->index_size != 22 * 1024) ||
+ (cache_ptr->cache_accesses != 0)))) {
pass = FALSE;
failure_mssg = "Unexpected cache config (25).\n";
}
}
- if ( show_progress ) HDfprintf(stderr, "check point %d\n", checkpoint++);
+ if(show_progress) HDfprintf(stderr, "check point %d\n", checkpoint++);
- if ( pass ) {
+ if(pass) {
protect_entry(file_ptr, VARIABLE_ENTRY_TYPE, 12);
unprotect_entry(file_ptr, VARIABLE_ENTRY_TYPE, 12, H5C__PIN_ENTRY_FLAG);
resize_entry(file_ptr, VARIABLE_ENTRY_TYPE, 12, 10 * 1024, TRUE);
- if ( ( pass ) &&
- ( ( ( cache_ptr->max_cache_size != (22 * 1024) ) ||
- ( cache_ptr->min_clean_size != (11 * 1024) ) ||
- ( cache_ptr->index_len != 4 ) ||
- ( cache_ptr->index_size != 31 * 1024 ) ||
- ( cache_ptr->cache_accesses != 1 ) ) ) ) {
+ if(pass &&
+ (((cache_ptr->max_cache_size != (22 * 1024)) ||
+ (cache_ptr->min_clean_size != (11 * 1024)) ||
+ (cache_ptr->index_len != 4) ||
+ (cache_ptr->index_size != 31 * 1024) ||
+ (cache_ptr->cache_accesses != 1)))) {
pass = FALSE;
failure_mssg = "Unexpected cache config (26).\n";
}
}
- if ( show_progress ) HDfprintf(stderr, "check point %d\n", checkpoint++);
+ if(show_progress) HDfprintf(stderr, "check point %d\n", checkpoint++);
/* Unpin the entries. Note that no entries are evicted as we don't
* load any entries.
*/
- if ( pass ) {
+ if(pass) {
protect_entry(file_ptr, VARIABLE_ENTRY_TYPE, 10);
unprotect_entry(file_ptr, VARIABLE_ENTRY_TYPE, 10, H5C__UNPIN_ENTRY_FLAG);
@@ -21216,12 +21081,12 @@ check_auto_cache_resize(hbool_t cork_ageout)
protect_entry(file_ptr, VARIABLE_ENTRY_TYPE, 12);
unprotect_entry(file_ptr, VARIABLE_ENTRY_TYPE, 12, H5C__UNPIN_ENTRY_FLAG);
- if ( ( pass ) &&
- ( ( ( cache_ptr->max_cache_size != (22 * 1024) ) ||
- ( cache_ptr->min_clean_size != (11 * 1024) ) ||
- ( cache_ptr->index_len != 4 ) ||
- ( cache_ptr->index_size != 31 * 1024 ) ||
- ( cache_ptr->cache_accesses != 4 ) ) ) ) {
+ if(pass &&
+ (((cache_ptr->max_cache_size != (22 * 1024)) ||
+ (cache_ptr->min_clean_size != (11 * 1024)) ||
+ (cache_ptr->index_len != 4) ||
+ (cache_ptr->index_size != 31 * 1024) ||
+ (cache_ptr->cache_accesses != 4)))) {
pass = FALSE;
failure_mssg = "Unexpected cache config (27).\n";
@@ -21231,32 +21096,32 @@ check_auto_cache_resize(hbool_t cork_ageout)
/* We have finished a basic check of the flash cache size increment
* code. Tidy up for a more extensive test...
*/
- if ( pass ) {
+ if(pass) {
expunge_entry(file_ptr, VARIABLE_ENTRY_TYPE, 10);
expunge_entry(file_ptr, VARIABLE_ENTRY_TYPE, 11);
expunge_entry(file_ptr, VARIABLE_ENTRY_TYPE, 12);
expunge_entry(file_ptr, VARIABLE_ENTRY_TYPE, 13);
- if ( ( pass ) &&
- ( ( ( cache_ptr->max_cache_size != (22 * 1024) ) ||
- ( cache_ptr->min_clean_size != (11 * 1024) ) ||
- ( cache_ptr->index_len != 0 ) ||
- ( cache_ptr->index_size != 0 ) ||
- ( cache_ptr->cache_accesses != 4 ) ) ) ) {
+ if(pass &&
+ (((cache_ptr->max_cache_size != (22 * 1024)) ||
+ (cache_ptr->min_clean_size != (11 * 1024)) ||
+ (cache_ptr->index_len != 0) ||
+ (cache_ptr->index_size != 0) ||
+ (cache_ptr->cache_accesses != 4)))) {
pass = FALSE;
failure_mssg = "Unexpected cache config (28).\n";
}
}
- if ( show_progress ) HDfprintf(stderr, "check point %d\n", checkpoint++);
+ if(show_progress) HDfprintf(stderr, "check point %d\n", checkpoint++);
/* ...and then reconfigure. Note that we change the flash_multiple
* and flash_threshold just to make sure that such changed perform
* as expected.
*/
- if ( pass ) {
+ if(pass) {
auto_size_ctl.version = H5C__CURR_AUTO_SIZE_CTL_VER;
auto_size_ctl.rpt_fcn = test_rpt_fcn;
@@ -21301,86 +21166,84 @@ check_auto_cache_resize(hbool_t cork_ageout)
auto_size_ctl.empty_reserve = 0.5f; /* for ease of testing */
result = H5C_set_cache_auto_resize_config(cache_ptr, &auto_size_ctl);
-
- if ( result != SUCCEED ) {
-
+ if(result != SUCCEED) {
pass = FALSE;
failure_mssg = "H5C_set_cache_auto_resize_config failed 15.\n";
}
}
- if ( show_progress ) HDfprintf(stderr, "check point %d\n", checkpoint++);
+ if(show_progress) HDfprintf(stderr, "check point %d\n", checkpoint++);
- if ( pass ) {
+ if(pass) {
- if ( ( cache_ptr->max_cache_size != (4 * 1024) ) ||
- ( cache_ptr->min_clean_size != (4 * 512) ) ||
- ( cache_ptr->index_len != 0 ) ||
- ( cache_ptr->index_size != 0 ) ||
- ( cache_ptr->cache_accesses != 0 ) ) {
+ if((cache_ptr->max_cache_size != (4 * 1024)) ||
+ (cache_ptr->min_clean_size != (4 * 512)) ||
+ (cache_ptr->index_len != 0) ||
+ (cache_ptr->index_size != 0) ||
+ (cache_ptr->cache_accesses != 0)) {
pass = FALSE;
failure_mssg = "bad cache after initialization 15.\n";
}
}
- if ( show_progress ) HDfprintf(stderr, "check point %d\n", checkpoint++);
+ if(show_progress) HDfprintf(stderr, "check point %d\n", checkpoint++);
/* protect and unprotect a large entry -- no change in cache size since
* a large entry will just fill the available space in the cache.
*/
- if ( pass ) {
+ if(pass) {
rpt_fcn_called = FALSE;
protect_entry(file_ptr, LARGE_ENTRY_TYPE, 0);
unprotect_entry(file_ptr, LARGE_ENTRY_TYPE, 0, H5C__NO_FLAGS_SET);
- if ( ( pass ) &&
- ( ( ( cache_ptr->max_cache_size != (4 * 1024) ) ||
- ( cache_ptr->min_clean_size != (4 * 512) ) ||
- ( cache_ptr->index_len != 1 ) ||
- ( cache_ptr->index_size != LARGE_ENTRY_SIZE ) ||
- ( cache_ptr->cache_accesses != 1 ) ||
- ( rpt_fcn_called == TRUE ) ) ) ) {
+ if(pass &&
+ (((cache_ptr->max_cache_size != (4 * 1024)) ||
+ (cache_ptr->min_clean_size != (4 * 512)) ||
+ (cache_ptr->index_len != 1) ||
+ (cache_ptr->index_size != LARGE_ENTRY_SIZE) ||
+ (cache_ptr->cache_accesses != 1) ||
+ (rpt_fcn_called == TRUE)))) {
pass = FALSE;
failure_mssg = "Unexpected cache config (29).\n";
}
}
- if ( show_progress ) HDfprintf(stderr, "check point %d\n", checkpoint++);
+ if(show_progress) HDfprintf(stderr, "check point %d\n", checkpoint++);
/* protect and unprotect another a large entry -- should trigger a
* flash cache size increase to 12 KB (remember that flash_multiple is
* set to 2.0).
*/
- if ( pass ) {
+ if(pass) {
rpt_fcn_called = FALSE;
protect_entry(file_ptr, LARGE_ENTRY_TYPE, 1);
unprotect_entry(file_ptr, LARGE_ENTRY_TYPE, 1, H5C__NO_FLAGS_SET);
- if ( ( pass ) &&
- ( ( ( cache_ptr->max_cache_size != (12 * 1024) ) ||
- ( cache_ptr->min_clean_size != (12 * 512) ) ||
- ( cache_ptr->index_len != 2 ) ||
- ( cache_ptr->index_size != 2 * LARGE_ENTRY_SIZE ) ||
- ( cache_ptr->cache_accesses != 1 ) ||
- ( rpt_fcn_called != TRUE ) ) ) ) {
+ if(pass &&
+ (((cache_ptr->max_cache_size != (12 * 1024)) ||
+ (cache_ptr->min_clean_size != (12 * 512)) ||
+ (cache_ptr->index_len != 2) ||
+ (cache_ptr->index_size != 2 * LARGE_ENTRY_SIZE) ||
+ (cache_ptr->cache_accesses != 1) ||
+ (rpt_fcn_called != TRUE)))) {
pass = FALSE;
failure_mssg = "Unexpected cache config (30).\n";
}
}
- if ( show_progress ) HDfprintf(stderr, "check point %d\n", checkpoint++);
+ if(show_progress) HDfprintf(stderr, "check point %d\n", checkpoint++);
/* protect and unprotect two more large entries -- shouldnt trigger a
* flash cache size increase.
*/
- if ( pass ) {
+ if(pass) {
rpt_fcn_called = FALSE;
@@ -21389,120 +21252,119 @@ check_auto_cache_resize(hbool_t cork_ageout)
protect_entry(file_ptr, LARGE_ENTRY_TYPE, 3);
unprotect_entry(file_ptr, LARGE_ENTRY_TYPE, 3, H5C__NO_FLAGS_SET);
- if ( ( pass ) &&
- ( ( ( cache_ptr->max_cache_size != (12 * 1024) ) ||
- ( cache_ptr->min_clean_size != (12 * 512) ) ||
- ( cache_ptr->index_len != 3 ) ||
- ( cache_ptr->index_size != 3 * LARGE_ENTRY_SIZE ) ||
- ( cache_ptr->cache_accesses != 3 ) ||
- ( rpt_fcn_called != FALSE ) ) ) ) {
+ if(pass &&
+ (((cache_ptr->max_cache_size != (12 * 1024)) ||
+ (cache_ptr->min_clean_size != (12 * 512)) ||
+ (cache_ptr->index_len != 3) ||
+ (cache_ptr->index_size != 3 * LARGE_ENTRY_SIZE) ||
+ (cache_ptr->cache_accesses != 3) ||
+ (rpt_fcn_called != FALSE)))) {
pass = FALSE;
failure_mssg = "Unexpected cache config (31).\n";
}
}
- if ( show_progress ) HDfprintf(stderr, "check point %d\n", checkpoint++);
+ if(show_progress) HDfprintf(stderr, "check point %d\n", checkpoint++);
/* do many accesses of a single entry to talk the cache into reducing
* its size to the minimum.
*/
- if ( pass ) {
+ if(pass) {
rpt_fcn_called = FALSE;
i = 0;
- while ( ( pass ) && ( i < 1000 ) )
+ while(pass && (i < 1000))
{
protect_entry(file_ptr, TINY_ENTRY_TYPE, 0);
- if ( pass ) {
+ if(pass)
unprotect_entry(file_ptr, TINY_ENTRY_TYPE, 0, H5C__NO_FLAGS_SET);
- }
i++;
}
- if ( ( ! rpt_fcn_called ) ||
- ( cache_ptr->max_cache_size != (4 * 1024) ) ||
- ( cache_ptr->min_clean_size != (2 * 1024) ) ||
- ( cache_ptr->index_size != (1 * TINY_ENTRY_SIZE) ) ) {
+ if((!rpt_fcn_called) ||
+ (cache_ptr->max_cache_size != (4 * 1024)) ||
+ (cache_ptr->min_clean_size != (2 * 1024)) ||
+ (cache_ptr->index_size != (1 * TINY_ENTRY_SIZE))) {
pass = FALSE;
failure_mssg = "Unexpected cache config (32).\n";
}
}
- if ( show_progress ) HDfprintf(stderr, "check point %d\n", checkpoint++);
+ if(show_progress) HDfprintf(stderr, "check point %d\n", checkpoint++);
/* Force another flash increase */
- if ( pass ) {
+ if(pass) {
rpt_fcn_called = FALSE;
protect_entry(file_ptr, LARGE_ENTRY_TYPE, 0);
unprotect_entry(file_ptr, LARGE_ENTRY_TYPE, 0, H5C__NO_FLAGS_SET);
- if ( ( pass ) &&
- ( ( ( cache_ptr->max_cache_size != (4 * 1024 + 128) ) ||
- ( cache_ptr->min_clean_size != (2 * 1024 + 64) ) ||
- ( cache_ptr->index_len != 2 ) ||
- ( cache_ptr->index_size !=
- LARGE_ENTRY_SIZE + TINY_ENTRY_SIZE ) ||
- ( cache_ptr->cache_accesses != 1 ) ||
- ( rpt_fcn_called == FALSE ) ||
- ( rpt_status != flash_increase ) ) ) ) {
+ if(pass &&
+ (((cache_ptr->max_cache_size != (4 * 1024 + 128)) ||
+ (cache_ptr->min_clean_size != (2 * 1024 + 64)) ||
+ (cache_ptr->index_len != 2) ||
+ (cache_ptr->index_size !=
+ LARGE_ENTRY_SIZE + TINY_ENTRY_SIZE) ||
+ (cache_ptr->cache_accesses != 1) ||
+ (rpt_fcn_called == FALSE) ||
+ (rpt_status != flash_increase)))) {
pass = FALSE;
failure_mssg = "Unexpected cache config (33).\n";
}
}
- if ( show_progress ) HDfprintf(stderr, "check point %d\n", checkpoint++);
+ if(show_progress) HDfprintf(stderr, "check point %d\n", checkpoint++);
/* force regular size increase up to maximum */
- if ( pass ) {
+ if(pass) {
rpt_fcn_called = FALSE;
i = 0;
- while ( ( pass ) && ( i < 500 ) )
+ while(pass && (i < 500))
{
protect_entry(file_ptr, TINY_ENTRY_TYPE, i);
- if ( pass ) {
+ if(pass)
unprotect_entry(file_ptr, TINY_ENTRY_TYPE, i, H5C__NO_FLAGS_SET);
- }
i++;
}
- if ( ( cache_ptr->max_cache_size != (20 * 1024) ) ||
- ( cache_ptr->min_clean_size != (10 * 1024) ) ||
- ( rpt_fcn_called == FALSE ) ||
- ( rpt_status != at_max_size ) ) {
+ if((cache_ptr->max_cache_size != (20 * 1024)) ||
+ (cache_ptr->min_clean_size != (10 * 1024)) ||
+ (rpt_fcn_called == FALSE) ||
+ (rpt_status != at_max_size)) {
pass = FALSE;
failure_mssg = "Unexpected cache config (34).\n";
}
}
- if ( show_progress ) HDfprintf(stderr, "check point %d\n", checkpoint++);
+ if(show_progress) HDfprintf(stderr, "check point %d\n", checkpoint++);
- if ( pass ) {
+ if(pass) {
takedown_cache(file_ptr, FALSE, FALSE);
}
- if ( show_progress ) HDfprintf(stderr, "check point %d\n", checkpoint++);
+ if(show_progress) HDfprintf(stderr, "check point %d\n", checkpoint++);
- if ( pass ) { PASSED(); } else { H5_FAILED(); }
+ if(pass) {
+ PASSED();
+ } /* end if */
+ else {
+ H5_FAILED();
+ } /* end else */
- if ( ! pass ) {
-
- HDfprintf(stdout, "%s: failure_mssg = \"%s\".\n",
- FUNC, failure_mssg);
- }
+ if(!pass)
+ HDfprintf(stdout, "%s: failure_mssg = \"%s\".\n", FUNC, failure_mssg);
return (unsigned)!pass;
-
} /* check_auto_cache_resize() */
@@ -21585,21 +21447,21 @@ check_auto_cache_resize_disable(void)
pass = TRUE;
- if ( show_progress ) HDfprintf(stderr, "check point %d\n", checkpoint++);
+ if(show_progress) HDfprintf(stderr, "check point %d\n", checkpoint++);
/* allocate a cache, enable automatic cache resizing, and then force
* the cache through all its operational modes. Verify that all
* performs as expected.
*/
- if ( pass ) {
+ if(pass) {
reset_entries();
file_ptr = setup_cache((size_t)(2 * 1024),
(size_t)(1 * 1024));
- if ( file_ptr == NULL ) {
+ if(file_ptr == NULL) {
pass = FALSE;
failure_mssg = "file_ptr NULL from setup_cache.";
@@ -21611,28 +21473,28 @@ check_auto_cache_resize_disable(void)
}
}
- if ( pass ) {
+ if(pass) {
result = H5C_set_cache_auto_resize_config(cache_ptr, &auto_size_ctl);
- if ( result != SUCCEED ) {
+ if(result != SUCCEED) {
pass = FALSE;
failure_mssg = "H5C_set_cache_auto_resize_config failed 1.\n";
}
}
- if ( pass ) {
+ if(pass) {
- if ( ( cache_ptr->max_cache_size != (512 * 1024) ) ||
- ( cache_ptr->min_clean_size != (256 * 1024) ) ) {
+ if((cache_ptr->max_cache_size != (512 * 1024)) ||
+ (cache_ptr->min_clean_size != (256 * 1024))) {
pass = FALSE;
failure_mssg = "bad cache size after initialization.\n";
}
}
- if ( show_progress ) HDfprintf(stderr, "check point %d\n", checkpoint++);
+ if(show_progress) HDfprintf(stderr, "check point %d\n", checkpoint++);
/******************************************************************
@@ -21642,7 +21504,7 @@ check_auto_cache_resize_disable(void)
* modes.
******************************************************************/
- if ( pass ) {
+ if(pass) {
auto_size_ctl.version = H5C__CURR_AUTO_SIZE_CTL_VER;
auto_size_ctl.rpt_fcn = test_rpt_fcn;
@@ -21688,119 +21550,119 @@ check_auto_cache_resize_disable(void)
result = H5C_set_cache_auto_resize_config(cache_ptr, &auto_size_ctl);
- if ( result != SUCCEED ) {
+ if(result != SUCCEED) {
pass = FALSE;
failure_mssg = "H5C_set_cache_auto_resize_config failed 2.\n";
}
}
- if ( pass ) {
+ if(pass) {
- if ( ( cache_ptr->max_cache_size != (4 * 1024 * 1024) ) ||
- ( cache_ptr->min_clean_size != (2 * 1024 * 1024) ) ) {
+ if((cache_ptr->max_cache_size != (4 * 1024 * 1024)) ||
+ (cache_ptr->min_clean_size != (2 * 1024 * 1024))) {
pass = FALSE;
failure_mssg = "bad cache size after set resize re-config 1.\n";
}
}
- if ( show_progress ) HDfprintf(stderr, "check point %d\n", checkpoint++);
+ if(show_progress) HDfprintf(stderr, "check point %d\n", checkpoint++);
/* force low hit rate with cache full -- increase disabled so should
* be no change in cache size, and result should be increase_disabled.
*/
- if ( pass ) {
+ if(pass) {
rpt_fcn_called = FALSE;
i = 0;
- while ( ( pass ) && ( i < 1000 ) )
+ while(pass && (i < 1000))
{
protect_entry(file_ptr, MONSTER_ENTRY_TYPE, i);
- if ( pass ) {
+ if(pass) {
unprotect_entry(file_ptr, MONSTER_ENTRY_TYPE, i, H5C__NO_FLAGS_SET);
}
i++;
}
- if ( ( ! rpt_fcn_called ) ||
- ( cache_ptr->size_increase_possible ) ||
- ( rpt_status != increase_disabled ) ||
- ( cache_ptr->max_cache_size != (4 * 1024 * 1024) ) ||
- ( cache_ptr->min_clean_size != (2 * 1024 * 1024) ) ) {
+ if((!rpt_fcn_called) ||
+ (cache_ptr->size_increase_possible) ||
+ (rpt_status != increase_disabled) ||
+ (cache_ptr->max_cache_size != (4 * 1024 * 1024)) ||
+ (cache_ptr->min_clean_size != (2 * 1024 * 1024))) {
pass = FALSE;
failure_mssg = "Unexpected cache size change results 1.\n";
}
}
- if ( show_progress ) HDfprintf(stderr, "check point %d\n", checkpoint++);
+ if(show_progress) HDfprintf(stderr, "check point %d\n", checkpoint++);
/* force high hit rate -- make sure that we haven't disabled decreases.
* should result in a decrease cache size from 4 to 2 Meg.
*/
- if ( pass ) {
+ if(pass) {
rpt_fcn_called = FALSE;
i = 0;
- while ( ( pass ) && ( i < 1000 ) )
+ while(pass && (i < 1000))
{
protect_entry(file_ptr, MONSTER_ENTRY_TYPE, 0);
- if ( pass ) {
+ if(pass) {
unprotect_entry(file_ptr, MONSTER_ENTRY_TYPE, 0, H5C__NO_FLAGS_SET);
}
i++;
}
- if ( ( ! rpt_fcn_called ) ||
- ( rpt_status != decrease ) ||
- ( cache_ptr->max_cache_size != (2 * 1024 * 1024) ) ||
- ( cache_ptr->min_clean_size != (1 * 1024 * 1024) ) ) {
+ if((!rpt_fcn_called) ||
+ (rpt_status != decrease) ||
+ (cache_ptr->max_cache_size != (2 * 1024 * 1024)) ||
+ (cache_ptr->min_clean_size != (1 * 1024 * 1024))) {
pass = FALSE;
failure_mssg = "Unexpected cache size change results 2.\n";
}
}
- if ( show_progress ) HDfprintf(stderr, "check point %d\n", checkpoint++);
+ if(show_progress) HDfprintf(stderr, "check point %d\n", checkpoint++);
/* force low hit rate again -- increase disabled so should
* be no change in cache size, and result should be increase_disabled.
*/
- if ( pass ) {
+ if(pass) {
rpt_fcn_called = FALSE;
i = 0;
- while ( ( pass ) && ( i < 1000 ) )
+ while(pass && (i < 1000))
{
protect_entry(file_ptr, MONSTER_ENTRY_TYPE, i);
- if ( pass ) {
+ if(pass) {
unprotect_entry(file_ptr, MONSTER_ENTRY_TYPE, i, H5C__NO_FLAGS_SET);
}
i++;
}
- if ( ( ! rpt_fcn_called ) ||
- ( cache_ptr->size_increase_possible ) ||
- ( rpt_status != increase_disabled ) ||
- ( cache_ptr->max_cache_size != (2 * 1024 * 1024) ) ||
- ( cache_ptr->min_clean_size != (1 * 1024 * 1024) ) ) {
+ if((!rpt_fcn_called) ||
+ (cache_ptr->size_increase_possible) ||
+ (rpt_status != increase_disabled) ||
+ (cache_ptr->max_cache_size != (2 * 1024 * 1024)) ||
+ (cache_ptr->min_clean_size != (1 * 1024 * 1024))) {
pass = FALSE;
failure_mssg = "Unexpected cache size change results 3.\n";
}
}
- if ( show_progress ) HDfprintf(stderr, "check point %d\n", checkpoint++);
+ if(show_progress) HDfprintf(stderr, "check point %d\n", checkpoint++);
/* Repeat the above tests, disabling increase through the lower
* threshold instead of the increment.
*/
- if ( pass ) {
+ if(pass) {
auto_size_ctl.version = H5C__CURR_AUTO_SIZE_CTL_VER;
auto_size_ctl.rpt_fcn = test_rpt_fcn;
@@ -21845,119 +21707,119 @@ check_auto_cache_resize_disable(void)
result = H5C_set_cache_auto_resize_config(cache_ptr, &auto_size_ctl);
- if ( result != SUCCEED ) {
+ if(result != SUCCEED) {
pass = FALSE;
failure_mssg = "H5C_set_cache_auto_resize_config failed 3.\n";
}
}
- if ( pass ) {
+ if(pass) {
- if ( ( cache_ptr->max_cache_size != (4 * 1024 * 1024) ) ||
- ( cache_ptr->min_clean_size != (2 * 1024 * 1024) ) ) {
+ if((cache_ptr->max_cache_size != (4 * 1024 * 1024)) ||
+ (cache_ptr->min_clean_size != (2 * 1024 * 1024))) {
pass = FALSE;
failure_mssg = "bad cache size after set resize re-config 2.\n";
}
}
- if ( show_progress ) HDfprintf(stderr, "check point %d\n", checkpoint++);
+ if(show_progress) HDfprintf(stderr, "check point %d\n", checkpoint++);
/* force low hit rate with cache full -- increase disabled so should
* be no change in cache size, and result should be in_spec.
*/
- if ( pass ) {
+ if(pass) {
rpt_fcn_called = FALSE;
i = 0;
- while ( ( pass ) && ( i < 1000 ) )
+ while(pass && (i < 1000))
{
protect_entry(file_ptr, MONSTER_ENTRY_TYPE, i);
- if ( pass ) {
+ if(pass) {
unprotect_entry(file_ptr, MONSTER_ENTRY_TYPE, i, H5C__NO_FLAGS_SET);
}
i++;
}
- if ( ( ! rpt_fcn_called ) ||
- ( cache_ptr->size_increase_possible ) ||
- ( rpt_status != in_spec ) ||
- ( cache_ptr->max_cache_size != (4 * 1024 * 1024) ) ||
- ( cache_ptr->min_clean_size != (2 * 1024 * 1024) ) ) {
+ if((!rpt_fcn_called) ||
+ (cache_ptr->size_increase_possible) ||
+ (rpt_status != in_spec) ||
+ (cache_ptr->max_cache_size != (4 * 1024 * 1024)) ||
+ (cache_ptr->min_clean_size != (2 * 1024 * 1024))) {
pass = FALSE;
failure_mssg = "Unexpected cache size change results 4.\n";
}
}
- if ( show_progress ) HDfprintf(stderr, "check point %d\n", checkpoint++);
+ if(show_progress) HDfprintf(stderr, "check point %d\n", checkpoint++);
/* force high hit rate -- make sure that we haven't disabled decreases.
* should result in a decrease cache size from 4 to 2 Meg.
*/
- if ( pass ) {
+ if(pass) {
rpt_fcn_called = FALSE;
i = 0;
- while ( ( pass ) && ( i < 1000 ) )
+ while(pass && (i < 1000))
{
protect_entry(file_ptr, MONSTER_ENTRY_TYPE, 0);
- if ( pass ) {
+ if(pass) {
unprotect_entry(file_ptr, MONSTER_ENTRY_TYPE, 0, H5C__NO_FLAGS_SET);
}
i++;
}
- if ( ( ! rpt_fcn_called ) ||
- ( rpt_status != decrease ) ||
- ( cache_ptr->max_cache_size != (2 * 1024 * 1024) ) ||
- ( cache_ptr->min_clean_size != (1 * 1024 * 1024) ) ) {
+ if((!rpt_fcn_called) ||
+ (rpt_status != decrease) ||
+ (cache_ptr->max_cache_size != (2 * 1024 * 1024)) ||
+ (cache_ptr->min_clean_size != (1 * 1024 * 1024))) {
pass = FALSE;
failure_mssg = "Unexpected cache size change results 5.\n";
}
}
- if ( show_progress ) HDfprintf(stderr, "check point %d\n", checkpoint++);
+ if(show_progress) HDfprintf(stderr, "check point %d\n", checkpoint++);
/* force low hit rate again -- increase disabled so should
* be no change in cache size, and result should be increase_disabled.
*/
- if ( pass ) {
+ if(pass) {
rpt_fcn_called = FALSE;
i = 0;
- while ( ( pass ) && ( i < 1000 ) )
+ while(pass && (i < 1000))
{
protect_entry(file_ptr, MONSTER_ENTRY_TYPE, i);
- if ( pass ) {
+ if(pass) {
unprotect_entry(file_ptr, MONSTER_ENTRY_TYPE, i, H5C__NO_FLAGS_SET);
}
i++;
}
- if ( ( ! rpt_fcn_called ) ||
- ( cache_ptr->size_increase_possible ) ||
- ( rpt_status != in_spec ) ||
- ( cache_ptr->max_cache_size != (2 * 1024 * 1024) ) ||
- ( cache_ptr->min_clean_size != (1 * 1024 * 1024) ) ) {
+ if((!rpt_fcn_called) ||
+ (cache_ptr->size_increase_possible) ||
+ (rpt_status != in_spec) ||
+ (cache_ptr->max_cache_size != (2 * 1024 * 1024)) ||
+ (cache_ptr->min_clean_size != (1 * 1024 * 1024))) {
pass = FALSE;
failure_mssg = "Unexpected cache size change results 6.\n";
}
}
- if ( show_progress ) HDfprintf(stderr, "check point %d\n", checkpoint++);
+ if(show_progress) HDfprintf(stderr, "check point %d\n", checkpoint++);
/* Repeat the above tests yet again, disabling increase through the
* incr_mode.
*/
- if ( pass ) {
+ if(pass) {
auto_size_ctl.version = H5C__CURR_AUTO_SIZE_CTL_VER;
auto_size_ctl.rpt_fcn = test_rpt_fcn;
@@ -22003,118 +21865,118 @@ check_auto_cache_resize_disable(void)
result = H5C_set_cache_auto_resize_config(cache_ptr, &auto_size_ctl);
- if ( result != SUCCEED ) {
+ if(result != SUCCEED) {
pass = FALSE;
failure_mssg = "H5C_set_cache_auto_resize_config failed 4.\n";
}
}
- if ( pass ) {
+ if(pass) {
- if ( ( cache_ptr->max_cache_size != (4 * 1024 * 1024) ) ||
- ( cache_ptr->min_clean_size != (2 * 1024 * 1024) ) ) {
+ if((cache_ptr->max_cache_size != (4 * 1024 * 1024)) ||
+ (cache_ptr->min_clean_size != (2 * 1024 * 1024))) {
pass = FALSE;
failure_mssg = "bad cache size after set resize re-config 3.\n";
}
}
- if ( show_progress ) HDfprintf(stderr, "check point %d\n", checkpoint++);
+ if(show_progress) HDfprintf(stderr, "check point %d\n", checkpoint++);
/* force low hit rate with cache full -- increase disabled so should
* be no change in cache size, and result should be in_spec.
*/
- if ( pass ) {
+ if(pass) {
rpt_fcn_called = FALSE;
i = 0;
- while ( ( pass ) && ( i < 1000 ) )
+ while(pass && (i < 1000))
{
protect_entry(file_ptr, MONSTER_ENTRY_TYPE, i);
- if ( pass ) {
+ if(pass) {
unprotect_entry(file_ptr, MONSTER_ENTRY_TYPE, i, H5C__NO_FLAGS_SET);
}
i++;
}
- if ( ( ! rpt_fcn_called ) ||
- ( cache_ptr->size_increase_possible ) ||
- ( rpt_status != in_spec ) ||
- ( cache_ptr->max_cache_size != (4 * 1024 * 1024) ) ||
- ( cache_ptr->min_clean_size != (2 * 1024 * 1024) ) ) {
+ if((!rpt_fcn_called) ||
+ (cache_ptr->size_increase_possible) ||
+ (rpt_status != in_spec) ||
+ (cache_ptr->max_cache_size != (4 * 1024 * 1024)) ||
+ (cache_ptr->min_clean_size != (2 * 1024 * 1024))) {
pass = FALSE;
failure_mssg = "Unexpected cache size change results 7.\n";
}
}
- if ( show_progress ) HDfprintf(stderr, "check point %d\n", checkpoint++);
+ if(show_progress) HDfprintf(stderr, "check point %d\n", checkpoint++);
/* force high hit rate -- make sure that we haven't disabled decreases.
* should result in a decrease cache size from 4 to 2 Meg.
*/
- if ( pass ) {
+ if(pass) {
rpt_fcn_called = FALSE;
i = 0;
- while ( ( pass ) && ( i < 1000 ) )
+ while(pass && (i < 1000))
{
protect_entry(file_ptr, MONSTER_ENTRY_TYPE, 0);
- if ( pass ) {
+ if(pass) {
unprotect_entry(file_ptr, MONSTER_ENTRY_TYPE, 0, H5C__NO_FLAGS_SET);
}
i++;
}
- if ( ( ! rpt_fcn_called ) ||
- ( rpt_status != decrease ) ||
- ( cache_ptr->max_cache_size != (2 * 1024 * 1024) ) ||
- ( cache_ptr->min_clean_size != (1 * 1024 * 1024) ) ) {
+ if((!rpt_fcn_called) ||
+ (rpt_status != decrease) ||
+ (cache_ptr->max_cache_size != (2 * 1024 * 1024)) ||
+ (cache_ptr->min_clean_size != (1 * 1024 * 1024))) {
pass = FALSE;
failure_mssg = "Unexpected cache size change results 8.\n";
}
}
- if ( show_progress ) HDfprintf(stderr, "check point %d\n", checkpoint++);
+ if(show_progress) HDfprintf(stderr, "check point %d\n", checkpoint++);
/* force low hit rate again -- increase disabled so should
* be no change in cache size, and result should be increase_disabled.
*/
- if ( pass ) {
+ if(pass) {
rpt_fcn_called = FALSE;
i = 0;
- while ( ( pass ) && ( i < 1000 ) )
+ while(pass && (i < 1000))
{
protect_entry(file_ptr, MONSTER_ENTRY_TYPE, i);
- if ( pass ) {
+ if(pass) {
unprotect_entry(file_ptr, MONSTER_ENTRY_TYPE, i, H5C__NO_FLAGS_SET);
}
i++;
}
- if ( ( ! rpt_fcn_called ) ||
- ( cache_ptr->size_increase_possible ) ||
- ( rpt_status != in_spec ) ||
- ( cache_ptr->max_cache_size != (2 * 1024 * 1024) ) ||
- ( cache_ptr->min_clean_size != (1 * 1024 * 1024) ) ) {
+ if((!rpt_fcn_called) ||
+ (cache_ptr->size_increase_possible) ||
+ (rpt_status != in_spec) ||
+ (cache_ptr->max_cache_size != (2 * 1024 * 1024)) ||
+ (cache_ptr->min_clean_size != (1 * 1024 * 1024))) {
pass = FALSE;
failure_mssg = "Unexpected cache size change results 9.\n";
}
}
- if ( show_progress ) HDfprintf(stderr, "check point %d\n", checkpoint++);
+ if(show_progress) HDfprintf(stderr, "check point %d\n", checkpoint++);
/* Now, disable size decreases, and repeat the above tests.
*/
- if ( pass ) {
+ if(pass) {
auto_size_ctl.version = H5C__CURR_AUTO_SIZE_CTL_VER;
auto_size_ctl.rpt_fcn = test_rpt_fcn;
@@ -22160,118 +22022,118 @@ check_auto_cache_resize_disable(void)
result = H5C_set_cache_auto_resize_config(cache_ptr, &auto_size_ctl);
- if ( result != SUCCEED ) {
+ if(result != SUCCEED) {
pass = FALSE;
failure_mssg = "H5C_set_cache_auto_resize_config failed 5.\n";
}
}
- if ( show_progress ) HDfprintf(stderr, "check point %d\n", checkpoint++);
+ if(show_progress) HDfprintf(stderr, "check point %d\n", checkpoint++);
- if ( pass ) {
+ if(pass) {
- if ( ( cache_ptr->max_cache_size != (4 * 1024 * 1024) ) ||
- ( cache_ptr->min_clean_size != (2 * 1024 * 1024) ) ) {
+ if((cache_ptr->max_cache_size != (4 * 1024 * 1024)) ||
+ (cache_ptr->min_clean_size != (2 * 1024 * 1024))) {
pass = FALSE;
failure_mssg = "bad cache size after set resize re-config 4.\n";
}
}
- if ( show_progress ) HDfprintf(stderr, "check point %d\n", checkpoint++);
+ if(show_progress) HDfprintf(stderr, "check point %d\n", checkpoint++);
/* force high hit rate -- should be no change in cache size,
* and result should be decrease_disabled.
*/
- if ( pass ) {
+ if(pass) {
rpt_fcn_called = FALSE;
i = 0;
- while ( ( pass ) && ( i < 1000 ) )
+ while(pass && (i < 1000))
{
protect_entry(file_ptr, MONSTER_ENTRY_TYPE, 0);
- if ( pass ) {
+ if(pass) {
unprotect_entry(file_ptr, MONSTER_ENTRY_TYPE, 0, H5C__NO_FLAGS_SET);
}
i++;
}
- if ( ( ! rpt_fcn_called ) ||
- ( rpt_status != decrease_disabled ) ||
- ( cache_ptr->max_cache_size != (4 * 1024 * 1024) ) ||
- ( cache_ptr->min_clean_size != (2 * 1024 * 1024) ) ) {
+ if((!rpt_fcn_called) ||
+ (rpt_status != decrease_disabled) ||
+ (cache_ptr->max_cache_size != (4 * 1024 * 1024)) ||
+ (cache_ptr->min_clean_size != (2 * 1024 * 1024))) {
pass = FALSE;
failure_mssg = "Unexpected cache size change results 10.\n";
}
}
- if ( show_progress ) HDfprintf(stderr, "check point %d\n", checkpoint++);
+ if(show_progress) HDfprintf(stderr, "check point %d\n", checkpoint++);
/* force low hit rate -- cache size should increase from 4 to 6 Meg.
*/
- if ( pass ) {
+ if(pass) {
rpt_fcn_called = FALSE;
i = 0;
- while ( ( pass ) && ( i < 1000 ) )
+ while(pass && (i < 1000))
{
protect_entry(file_ptr, MONSTER_ENTRY_TYPE, i);
- if ( pass ) {
+ if(pass) {
unprotect_entry(file_ptr, MONSTER_ENTRY_TYPE, i, H5C__NO_FLAGS_SET);
}
i++;
}
- if ( ( ! rpt_fcn_called ) ||
- ( rpt_status != increase ) ||
- ( cache_ptr->max_cache_size != (6 * 1024 * 1024) ) ||
- ( cache_ptr->min_clean_size != (3 * 1024 * 1024) ) ) {
+ if((!rpt_fcn_called) ||
+ (rpt_status != increase) ||
+ (cache_ptr->max_cache_size != (6 * 1024 * 1024)) ||
+ (cache_ptr->min_clean_size != (3 * 1024 * 1024))) {
pass = FALSE;
failure_mssg = "Unexpected cache size change results 11.\n";
}
}
- if ( show_progress ) HDfprintf(stderr, "check point %d\n", checkpoint++);
+ if(show_progress) HDfprintf(stderr, "check point %d\n", checkpoint++);
/* force high hit rate again -- should be no change in cache size,
* and result should be decrease_disabled.
*/
- if ( pass ) {
+ if(pass) {
rpt_fcn_called = FALSE;
i = 0;
- while ( ( pass ) && ( i < 1000 ) )
+ while(pass && (i < 1000))
{
protect_entry(file_ptr, MONSTER_ENTRY_TYPE, 0);
- if ( pass ) {
+ if(pass) {
unprotect_entry(file_ptr, MONSTER_ENTRY_TYPE, 0, H5C__NO_FLAGS_SET);
}
i++;
}
- if ( ( ! rpt_fcn_called ) ||
- ( rpt_status != decrease_disabled ) ||
- ( cache_ptr->max_cache_size != (6 * 1024 * 1024) ) ||
- ( cache_ptr->min_clean_size != (3 * 1024 * 1024) ) ) {
+ if((!rpt_fcn_called) ||
+ (rpt_status != decrease_disabled) ||
+ (cache_ptr->max_cache_size != (6 * 1024 * 1024)) ||
+ (cache_ptr->min_clean_size != (3 * 1024 * 1024))) {
pass = FALSE;
failure_mssg = "Unexpected cache size change results 12.\n";
}
}
- if ( show_progress ) HDfprintf(stderr, "check point %d\n", checkpoint++);
+ if(show_progress) HDfprintf(stderr, "check point %d\n", checkpoint++);
/* Repeat the above tests, disabling decrease through the upper
* threshold instead of the decrement.
*/
- if ( pass ) {
+ if(pass) {
auto_size_ctl.version = H5C__CURR_AUTO_SIZE_CTL_VER;
auto_size_ctl.rpt_fcn = test_rpt_fcn;
@@ -22317,117 +22179,117 @@ check_auto_cache_resize_disable(void)
result = H5C_set_cache_auto_resize_config(cache_ptr, &auto_size_ctl);
- if ( result != SUCCEED ) {
+ if(result != SUCCEED) {
pass = FALSE;
failure_mssg = "H5C_set_cache_auto_resize_config failed 6.\n";
}
}
- if ( pass ) {
+ if(pass) {
- if ( ( cache_ptr->max_cache_size != (4 * 1024 * 1024) ) ||
- ( cache_ptr->min_clean_size != (2 * 1024 * 1024) ) ) {
+ if((cache_ptr->max_cache_size != (4 * 1024 * 1024)) ||
+ (cache_ptr->min_clean_size != (2 * 1024 * 1024))) {
pass = FALSE;
failure_mssg = "bad cache size after set resize re-config 5.\n";
}
}
- if ( show_progress ) HDfprintf(stderr, "check point %d\n", checkpoint++);
+ if(show_progress) HDfprintf(stderr, "check point %d\n", checkpoint++);
/* force high hit rate -- should be no change in cache size,
* and result should be in_spec.
*/
- if ( pass ) {
+ if(pass) {
rpt_fcn_called = FALSE;
i = 0;
- while ( ( pass ) && ( i < 1000 ) )
+ while(pass && (i < 1000))
{
protect_entry(file_ptr, MONSTER_ENTRY_TYPE, 0);
- if ( pass ) {
+ if(pass) {
unprotect_entry(file_ptr, MONSTER_ENTRY_TYPE, 0, H5C__NO_FLAGS_SET);
}
i++;
}
- if ( ( ! rpt_fcn_called ) ||
- ( cache_ptr->size_decrease_possible ) ||
- ( rpt_status != in_spec ) ||
- ( cache_ptr->max_cache_size != (4 * 1024 * 1024) ) ||
- ( cache_ptr->min_clean_size != (2 * 1024 * 1024) ) ) {
+ if((!rpt_fcn_called) ||
+ (cache_ptr->size_decrease_possible) ||
+ (rpt_status != in_spec) ||
+ (cache_ptr->max_cache_size != (4 * 1024 * 1024)) ||
+ (cache_ptr->min_clean_size != (2 * 1024 * 1024))) {
pass = FALSE;
failure_mssg = "Unexpected cache size change results 13.\n";
}
}
- if ( show_progress ) HDfprintf(stderr, "check point %d\n", checkpoint++);
+ if(show_progress) HDfprintf(stderr, "check point %d\n", checkpoint++);
/* force low hit rate -- cache size should increase from 4 to 6 Meg.
*/
- if ( pass ) {
+ if(pass) {
rpt_fcn_called = FALSE;
i = 0;
- while ( ( pass ) && ( i < 1000 ) )
+ while(pass && (i < 1000))
{
protect_entry(file_ptr, MONSTER_ENTRY_TYPE, i);
- if ( pass ) {
+ if(pass) {
unprotect_entry(file_ptr, MONSTER_ENTRY_TYPE, i, H5C__NO_FLAGS_SET);
}
i++;
}
- if ( ( ! rpt_fcn_called ) ||
- ( rpt_status != increase ) ||
- ( cache_ptr->max_cache_size != (6 * 1024 * 1024) ) ||
- ( cache_ptr->min_clean_size != (3 * 1024 * 1024) ) ) {
+ if((!rpt_fcn_called) ||
+ (rpt_status != increase) ||
+ (cache_ptr->max_cache_size != (6 * 1024 * 1024)) ||
+ (cache_ptr->min_clean_size != (3 * 1024 * 1024))) {
pass = FALSE;
failure_mssg = "Unexpected cache size change results 14.\n";
}
}
- if ( show_progress ) HDfprintf(stderr, "check point %d\n", checkpoint++);
+ if(show_progress) HDfprintf(stderr, "check point %d\n", checkpoint++);
/* force high hit rate again -- should be no change in cache size,
* and result should be in_spec.
*/
- if ( pass ) {
+ if(pass) {
rpt_fcn_called = FALSE;
i = 0;
- while ( ( pass ) && ( i < 1000 ) )
+ while(pass && (i < 1000))
{
protect_entry(file_ptr, MONSTER_ENTRY_TYPE, 0);
- if ( pass ) {
+ if(pass) {
unprotect_entry(file_ptr, MONSTER_ENTRY_TYPE, 0, H5C__NO_FLAGS_SET);
}
i++;
}
- if ( ( ! rpt_fcn_called ) ||
- ( cache_ptr->size_decrease_possible ) ||
- ( rpt_status != in_spec ) ||
- ( cache_ptr->max_cache_size != (6 * 1024 * 1024) ) ||
- ( cache_ptr->min_clean_size != (3 * 1024 * 1024) ) ) {
+ if((!rpt_fcn_called) ||
+ (cache_ptr->size_decrease_possible) ||
+ (rpt_status != in_spec) ||
+ (cache_ptr->max_cache_size != (6 * 1024 * 1024)) ||
+ (cache_ptr->min_clean_size != (3 * 1024 * 1024))) {
pass = FALSE;
failure_mssg = "Unexpected cache size change results 15.\n";
}
}
- if ( show_progress ) HDfprintf(stderr, "check point %d\n", checkpoint++);
+ if(show_progress) HDfprintf(stderr, "check point %d\n", checkpoint++);
/* Repeat the above tests, disabling decrease through the decr_mode.
*/
- if ( pass ) {
+ if(pass) {
auto_size_ctl.version = H5C__CURR_AUTO_SIZE_CTL_VER;
auto_size_ctl.rpt_fcn = test_rpt_fcn;
@@ -22473,119 +22335,119 @@ check_auto_cache_resize_disable(void)
result = H5C_set_cache_auto_resize_config(cache_ptr, &auto_size_ctl);
- if ( result != SUCCEED ) {
+ if(result != SUCCEED) {
pass = FALSE;
failure_mssg = "H5C_set_cache_auto_resize_config failed 7.\n";
}
}
- if ( pass ) {
+ if(pass) {
- if ( ( cache_ptr->max_cache_size != (4 * 1024 * 1024) ) ||
- ( cache_ptr->min_clean_size != (2 * 1024 * 1024) ) ) {
+ if((cache_ptr->max_cache_size != (4 * 1024 * 1024)) ||
+ (cache_ptr->min_clean_size != (2 * 1024 * 1024))) {
pass = FALSE;
failure_mssg = "bad cache size after set resize re-config 6.\n";
}
}
- if ( show_progress ) HDfprintf(stderr, "check point %d\n", checkpoint++);
+ if(show_progress) HDfprintf(stderr, "check point %d\n", checkpoint++);
/* force high hit rate -- should be no change in cache size,
* and result should be in_spec.
*/
- if ( pass ) {
+ if(pass) {
rpt_fcn_called = FALSE;
i = 0;
- while ( ( pass ) && ( i < 1000 ) )
+ while(pass && (i < 1000))
{
protect_entry(file_ptr, MONSTER_ENTRY_TYPE, 0);
- if ( pass ) {
+ if(pass) {
unprotect_entry(file_ptr, MONSTER_ENTRY_TYPE, 0, H5C__NO_FLAGS_SET);
}
i++;
}
- if ( ( ! rpt_fcn_called ) ||
- ( cache_ptr->size_decrease_possible ) ||
- ( rpt_status != in_spec ) ||
- ( cache_ptr->max_cache_size != (4 * 1024 * 1024) ) ||
- ( cache_ptr->min_clean_size != (2 * 1024 * 1024) ) ) {
+ if((!rpt_fcn_called) ||
+ (cache_ptr->size_decrease_possible) ||
+ (rpt_status != in_spec) ||
+ (cache_ptr->max_cache_size != (4 * 1024 * 1024)) ||
+ (cache_ptr->min_clean_size != (2 * 1024 * 1024))) {
pass = FALSE;
failure_mssg = "Unexpected cache size change results 16.\n";
}
}
- if ( show_progress ) HDfprintf(stderr, "check point %d\n", checkpoint++);
+ if(show_progress) HDfprintf(stderr, "check point %d\n", checkpoint++);
/* force low hit rate -- cache size should increase from 4 to 6 Meg.
*/
- if ( pass ) {
+ if(pass) {
rpt_fcn_called = FALSE;
i = 0;
- while ( ( pass ) && ( i < 1000 ) )
+ while(pass && (i < 1000))
{
protect_entry(file_ptr, MONSTER_ENTRY_TYPE, i);
- if ( pass ) {
+ if(pass) {
unprotect_entry(file_ptr, MONSTER_ENTRY_TYPE, i, H5C__NO_FLAGS_SET);
}
i++;
}
- if ( ( ! rpt_fcn_called ) ||
- ( rpt_status != increase ) ||
- ( cache_ptr->max_cache_size != (6 * 1024 * 1024) ) ||
- ( cache_ptr->min_clean_size != (3 * 1024 * 1024) ) ) {
+ if((!rpt_fcn_called) ||
+ (rpt_status != increase) ||
+ (cache_ptr->max_cache_size != (6 * 1024 * 1024)) ||
+ (cache_ptr->min_clean_size != (3 * 1024 * 1024))) {
pass = FALSE;
failure_mssg = "Unexpected cache size change results 17.\n";
}
}
- if ( show_progress ) HDfprintf(stderr, "check point %d\n", checkpoint++);
+ if(show_progress) HDfprintf(stderr, "check point %d\n", checkpoint++);
/* force high hit rate again -- should be no change in cache size,
* and result should be in_spec.
*/
- if ( pass ) {
+ if(pass) {
rpt_fcn_called = FALSE;
i = 0;
- while ( ( pass ) && ( i < 1000 ) )
+ while(pass && (i < 1000))
{
protect_entry(file_ptr, MONSTER_ENTRY_TYPE, 0);
- if ( pass ) {
+ if(pass) {
unprotect_entry(file_ptr, MONSTER_ENTRY_TYPE, 0, H5C__NO_FLAGS_SET);
}
i++;
}
- if ( ( ! rpt_fcn_called ) ||
- ( cache_ptr->size_decrease_possible ) ||
- ( rpt_status != in_spec ) ||
- ( cache_ptr->max_cache_size != (6 * 1024 * 1024) ) ||
- ( cache_ptr->min_clean_size != (3 * 1024 * 1024) ) ) {
+ if((!rpt_fcn_called) ||
+ (cache_ptr->size_decrease_possible) ||
+ (rpt_status != in_spec) ||
+ (cache_ptr->max_cache_size != (6 * 1024 * 1024)) ||
+ (cache_ptr->min_clean_size != (3 * 1024 * 1024))) {
pass = FALSE;
failure_mssg = "Unexpected cache size change results 18.\n";
}
}
- if ( show_progress ) HDfprintf(stderr, "check point %d\n", checkpoint++);
+ if(show_progress) HDfprintf(stderr, "check point %d\n", checkpoint++);
/* Now do tests disabling size decrement in age out mode.
*
* Start by disabling size decrement by setting max_decrement to zero.
*/
- if ( pass ) {
+ if(pass) {
auto_size_ctl.version = H5C__CURR_AUTO_SIZE_CTL_VER;
auto_size_ctl.rpt_fcn = test_rpt_fcn;
@@ -22631,188 +22493,188 @@ check_auto_cache_resize_disable(void)
result = H5C_set_cache_auto_resize_config(cache_ptr, &auto_size_ctl);
- if ( result != SUCCEED ) {
+ if(result != SUCCEED) {
pass = FALSE;
failure_mssg = "H5C_set_cache_auto_resize_config failed 8.\n";
}
}
- if ( pass ) {
+ if(pass) {
- if ( ( cache_ptr->max_cache_size != (4 * 1024 * 1024) ) ||
- ( cache_ptr->min_clean_size != (2 * 1024 * 1024) ) ) {
+ if((cache_ptr->max_cache_size != (4 * 1024 * 1024)) ||
+ (cache_ptr->min_clean_size != (2 * 1024 * 1024))) {
pass = FALSE;
failure_mssg = "bad cache size after set resize re-config 7.\n";
}
}
- if ( show_progress ) HDfprintf(stderr, "check point %d\n", checkpoint++);
+ if(show_progress) HDfprintf(stderr, "check point %d\n", checkpoint++);
- if ( pass ) {
+ if(pass) {
/* flush the cache and destroy all entries so we start from a known point */
flush_cache(file_ptr, TRUE, FALSE, FALSE);
}
- if ( show_progress ) HDfprintf(stderr, "check point %d\n", checkpoint++);
+ if(show_progress) HDfprintf(stderr, "check point %d\n", checkpoint++);
/* load up the cache with small entries. Note that it will take an
* epoch for the ageout code to initialize itself if it is enabled.
*/
- if ( pass ) {
+ if(pass) {
rpt_fcn_called = FALSE;
i = 0;
- while ( ( pass ) && ( i < 1000 ) )
+ while(pass && (i < 1000))
{
protect_entry(file_ptr, SMALL_ENTRY_TYPE, i);
- if ( pass ) {
+ if(pass) {
unprotect_entry(file_ptr, SMALL_ENTRY_TYPE, i, H5C__NO_FLAGS_SET);
}
i++;
}
- if ( ( ! rpt_fcn_called ) ||
- ( cache_ptr->size_decrease_possible ) ||
- ( rpt_status != not_full ) ||
- ( cache_ptr->max_cache_size != (4 * 1024 * 1024) ) ||
- ( cache_ptr->min_clean_size != (2 * 1024 * 1024) ) ) {
+ if((!rpt_fcn_called) ||
+ (cache_ptr->size_decrease_possible) ||
+ (rpt_status != not_full) ||
+ (cache_ptr->max_cache_size != (4 * 1024 * 1024)) ||
+ (cache_ptr->min_clean_size != (2 * 1024 * 1024))) {
pass = FALSE;
failure_mssg = "Unexpected cache size change results 19.\n";
}
}
- if ( show_progress ) HDfprintf(stderr, "check point %d\n", checkpoint++);
+ if(show_progress) HDfprintf(stderr, "check point %d\n", checkpoint++);
/* Load up some more small entries.
*/
- if ( pass ) {
+ if(pass) {
rpt_fcn_called = FALSE;
i = 1000;
- while ( ( pass ) && ( i < 2000 ) )
+ while(pass && (i < 2000))
{
protect_entry(file_ptr, SMALL_ENTRY_TYPE, i);
- if ( pass ) {
+ if(pass) {
unprotect_entry(file_ptr, SMALL_ENTRY_TYPE, i, H5C__NO_FLAGS_SET);
}
i++;
}
- if ( ( ! rpt_fcn_called ) ||
- ( cache_ptr->size_decrease_possible ) ||
- ( rpt_status != not_full ) ||
- ( cache_ptr->max_cache_size != (4 * 1024 * 1024) ) ||
- ( cache_ptr->min_clean_size != (2 * 1024 * 1024) ) ) {
+ if((!rpt_fcn_called) ||
+ (cache_ptr->size_decrease_possible) ||
+ (rpt_status != not_full) ||
+ (cache_ptr->max_cache_size != (4 * 1024 * 1024)) ||
+ (cache_ptr->min_clean_size != (2 * 1024 * 1024))) {
pass = FALSE;
failure_mssg = "Unexpected cache size change results 20.\n";
}
}
- if ( show_progress ) HDfprintf(stderr, "check point %d\n", checkpoint++);
+ if(show_progress) HDfprintf(stderr, "check point %d\n", checkpoint++);
/* Now force a high hit rate so that the size increase code is
* is satisfied. We would see a decrease here if decrease were
* possible.
*/
- if ( pass ) {
+ if(pass) {
rpt_fcn_called = FALSE;
i = 0;
- while ( ( pass ) && ( i < 1000 ) )
+ while(pass && (i < 1000))
{
protect_entry(file_ptr, SMALL_ENTRY_TYPE, i);
- if ( pass ) {
+ if(pass) {
unprotect_entry(file_ptr, SMALL_ENTRY_TYPE, i, H5C__NO_FLAGS_SET);
}
i++;
}
- if ( ( ! rpt_fcn_called ) ||
- ( cache_ptr->size_decrease_possible ) ||
- ( rpt_status != decrease_disabled ) ||
- ( cache_ptr->max_cache_size != (4 * 1024 * 1024) ) ||
- ( cache_ptr->min_clean_size != (2 * 1024 * 1024) ) ) {
+ if((!rpt_fcn_called) ||
+ (cache_ptr->size_decrease_possible) ||
+ (rpt_status != decrease_disabled) ||
+ (cache_ptr->max_cache_size != (4 * 1024 * 1024)) ||
+ (cache_ptr->min_clean_size != (2 * 1024 * 1024))) {
pass = FALSE;
failure_mssg = "Unexpected cache size change results 21.\n";
}
}
- if ( show_progress ) HDfprintf(stderr, "check point %d\n", checkpoint++);
+ if(show_progress) HDfprintf(stderr, "check point %d\n", checkpoint++);
/* force low hit rate -- cache size should increase from 4 to 6 Meg.
*/
- if ( pass ) {
+ if(pass) {
rpt_fcn_called = FALSE;
i = 0;
- while ( ( pass ) && ( i < 1000 ) )
+ while(pass && (i < 1000))
{
protect_entry(file_ptr, MONSTER_ENTRY_TYPE, i);
- if ( pass ) {
+ if(pass) {
unprotect_entry(file_ptr, MONSTER_ENTRY_TYPE, i, H5C__NO_FLAGS_SET);
}
i++;
}
- if ( ( ! rpt_fcn_called ) ||
- ( rpt_status != increase ) ||
- ( cache_ptr->max_cache_size != (6 * 1024 * 1024) ) ||
- ( cache_ptr->min_clean_size != (3 * 1024 * 1024) ) ) {
+ if((!rpt_fcn_called) ||
+ (rpt_status != increase) ||
+ (cache_ptr->max_cache_size != (6 * 1024 * 1024)) ||
+ (cache_ptr->min_clean_size != (3 * 1024 * 1024))) {
pass = FALSE;
failure_mssg = "Unexpected cache size change results 22.\n";
}
}
- if ( show_progress ) HDfprintf(stderr, "check point %d\n", checkpoint++);
+ if(show_progress) HDfprintf(stderr, "check point %d\n", checkpoint++);
/* just bang on a single entry. This will see to it that there are
* many entries that could be aged out were decreases enabled.
* Should be no change in cache size, and result should be
* decrease_disabled.
*/
- if ( pass ) {
+ if(pass) {
rpt_fcn_called = FALSE;
i = 0;
- while ( ( pass ) && ( i < 1000 ) )
+ while(pass && (i < 1000))
{
protect_entry(file_ptr, MONSTER_ENTRY_TYPE, 0);
- if ( pass ) {
+ if(pass) {
unprotect_entry(file_ptr, MONSTER_ENTRY_TYPE, 0, H5C__NO_FLAGS_SET);
}
i++;
}
- if ( ( ! rpt_fcn_called ) ||
- ( cache_ptr->size_decrease_possible ) ||
- ( rpt_status != decrease_disabled ) ||
- ( cache_ptr->max_cache_size != (6 * 1024 * 1024) ) ||
- ( cache_ptr->min_clean_size != (3 * 1024 * 1024) ) ) {
+ if((!rpt_fcn_called) ||
+ (cache_ptr->size_decrease_possible) ||
+ (rpt_status != decrease_disabled) ||
+ (cache_ptr->max_cache_size != (6 * 1024 * 1024)) ||
+ (cache_ptr->min_clean_size != (3 * 1024 * 1024))) {
pass = FALSE;
failure_mssg = "Unexpected cache size change results 23.\n";
}
}
- if ( show_progress ) HDfprintf(stderr, "check point %d\n", checkpoint++);
+ if(show_progress) HDfprintf(stderr, "check point %d\n", checkpoint++);
/* Now disable size decrement in age out mode via the empty reserve.
*/
- if ( pass ) {
+ if(pass) {
auto_size_ctl.version = H5C__CURR_AUTO_SIZE_CTL_VER;
auto_size_ctl.rpt_fcn = test_rpt_fcn;
@@ -22858,183 +22720,183 @@ check_auto_cache_resize_disable(void)
result = H5C_set_cache_auto_resize_config(cache_ptr, &auto_size_ctl);
- if ( result != SUCCEED ) {
+ if(result != SUCCEED) {
pass = FALSE;
failure_mssg = "H5C_set_cache_auto_resize_config failed 9.\n";
}
}
- if ( pass ) {
+ if(pass) {
- if ( ( cache_ptr->max_cache_size != (4 * 1024 * 1024) ) ||
- ( cache_ptr->min_clean_size != (2 * 1024 * 1024) ) ) {
+ if((cache_ptr->max_cache_size != (4 * 1024 * 1024)) ||
+ (cache_ptr->min_clean_size != (2 * 1024 * 1024))) {
pass = FALSE;
failure_mssg = "bad cache size after set resize re-config 8.\n";
}
}
- if ( show_progress ) HDfprintf(stderr, "check point %d\n", checkpoint++);
+ if(show_progress) HDfprintf(stderr, "check point %d\n", checkpoint++);
- if ( pass ) {
+ if(pass) {
/* flush the cache and destroy all entries so we start from a known point */
flush_cache(file_ptr, TRUE, FALSE, FALSE);
}
- if ( show_progress ) HDfprintf(stderr, "check point %d\n", checkpoint++);
+ if(show_progress) HDfprintf(stderr, "check point %d\n", checkpoint++);
/* load up the cache with small entries. Note that it will take an
* epoch for the ageout code to initialize itself if it is enabled.
*/
- if ( pass ) {
+ if(pass) {
rpt_fcn_called = FALSE;
i = 0;
- while ( ( pass ) && ( i < 1000 ) )
+ while(pass && (i < 1000))
{
protect_entry(file_ptr, SMALL_ENTRY_TYPE, i);
- if ( pass ) {
+ if(pass) {
unprotect_entry(file_ptr, SMALL_ENTRY_TYPE, i, H5C__NO_FLAGS_SET);
}
i++;
}
- if ( ( ! rpt_fcn_called ) ||
- ( cache_ptr->size_decrease_possible ) ||
- ( rpt_status != not_full ) ||
- ( cache_ptr->max_cache_size != (4 * 1024 * 1024) ) ||
- ( cache_ptr->min_clean_size != (2 * 1024 * 1024) ) ) {
+ if((!rpt_fcn_called) ||
+ (cache_ptr->size_decrease_possible) ||
+ (rpt_status != not_full) ||
+ (cache_ptr->max_cache_size != (4 * 1024 * 1024)) ||
+ (cache_ptr->min_clean_size != (2 * 1024 * 1024))) {
pass = FALSE;
failure_mssg = "Unexpected cache size change results 24.\n";
}
}
- if ( show_progress ) HDfprintf(stderr, "check point %d\n", checkpoint++);
+ if(show_progress) HDfprintf(stderr, "check point %d\n", checkpoint++);
/* Load up some more small entries.
*/
- if ( pass ) {
+ if(pass) {
rpt_fcn_called = FALSE;
i = 1000;
- while ( ( pass ) && ( i < 2000 ) )
+ while(pass && (i < 2000))
{
protect_entry(file_ptr, SMALL_ENTRY_TYPE, i);
- if ( pass ) {
+ if(pass) {
unprotect_entry(file_ptr, SMALL_ENTRY_TYPE, i, H5C__NO_FLAGS_SET);
}
i++;
}
- if ( ( ! rpt_fcn_called ) ||
- ( cache_ptr->size_decrease_possible ) ||
- ( rpt_status != not_full ) ||
- ( cache_ptr->max_cache_size != (4 * 1024 * 1024) ) ||
- ( cache_ptr->min_clean_size != (2 * 1024 * 1024) ) ) {
+ if((!rpt_fcn_called) ||
+ (cache_ptr->size_decrease_possible) ||
+ (rpt_status != not_full) ||
+ (cache_ptr->max_cache_size != (4 * 1024 * 1024)) ||
+ (cache_ptr->min_clean_size != (2 * 1024 * 1024))) {
pass = FALSE;
failure_mssg = "Unexpected cache size change results 25.\n";
}
}
- if ( show_progress ) HDfprintf(stderr, "check point %d\n", checkpoint++);
+ if(show_progress) HDfprintf(stderr, "check point %d\n", checkpoint++);
/* Now force a high hit rate so that the size increase code is
* is satisfied. We would see a decrease here if decrease were
* possible.
*/
- if ( pass ) {
+ if(pass) {
rpt_fcn_called = FALSE;
i = 0;
- while ( ( pass ) && ( i < 1000 ) )
+ while(pass && (i < 1000))
{
protect_entry(file_ptr, SMALL_ENTRY_TYPE, i);
- if ( pass ) {
+ if(pass) {
unprotect_entry(file_ptr, SMALL_ENTRY_TYPE, i, H5C__NO_FLAGS_SET);
}
i++;
}
- if ( ( ! rpt_fcn_called ) ||
- ( cache_ptr->size_decrease_possible ) ||
- ( rpt_status != decrease_disabled ) ||
- ( cache_ptr->max_cache_size != (4 * 1024 * 1024) ) ||
- ( cache_ptr->min_clean_size != (2 * 1024 * 1024) ) ) {
+ if((!rpt_fcn_called) ||
+ (cache_ptr->size_decrease_possible) ||
+ (rpt_status != decrease_disabled) ||
+ (cache_ptr->max_cache_size != (4 * 1024 * 1024)) ||
+ (cache_ptr->min_clean_size != (2 * 1024 * 1024))) {
pass = FALSE;
failure_mssg = "Unexpected cache size change results 26.\n";
}
}
- if ( show_progress ) HDfprintf(stderr, "check point %d\n", checkpoint++);
+ if(show_progress) HDfprintf(stderr, "check point %d\n", checkpoint++);
/* force low hit rate -- cache size should increase from 4 to 6 Meg.
*/
- if ( pass ) {
+ if(pass) {
rpt_fcn_called = FALSE;
i = 0;
- while ( ( pass ) && ( i < 1000 ) )
+ while(pass && (i < 1000))
{
protect_entry(file_ptr, MONSTER_ENTRY_TYPE, i);
- if ( pass ) {
+ if(pass) {
unprotect_entry(file_ptr, MONSTER_ENTRY_TYPE, i, H5C__NO_FLAGS_SET);
}
i++;
}
- if ( ( ! rpt_fcn_called ) ||
- ( rpt_status != increase ) ||
- ( cache_ptr->max_cache_size != (6 * 1024 * 1024) ) ||
- ( cache_ptr->min_clean_size != (3 * 1024 * 1024) ) ) {
+ if((!rpt_fcn_called) ||
+ (rpt_status != increase) ||
+ (cache_ptr->max_cache_size != (6 * 1024 * 1024)) ||
+ (cache_ptr->min_clean_size != (3 * 1024 * 1024))) {
pass = FALSE;
failure_mssg = "Unexpected cache size change results 27.\n";
}
}
- if ( show_progress ) HDfprintf(stderr, "check point %d\n", checkpoint++);
+ if(show_progress) HDfprintf(stderr, "check point %d\n", checkpoint++);
/* just bang on a single entry. This will see to it that there are
* many entries that could be aged out were decreases enabled.
* Should be no change in cache size, and result should be
* decrease_disabled.
*/
- if ( pass ) {
+ if(pass) {
rpt_fcn_called = FALSE;
i = 0;
- while ( ( pass ) && ( i < 1000 ) )
+ while(pass && (i < 1000))
{
protect_entry(file_ptr, MONSTER_ENTRY_TYPE, 0);
- if ( pass ) {
+ if(pass) {
unprotect_entry(file_ptr, MONSTER_ENTRY_TYPE, 0, H5C__NO_FLAGS_SET);
}
i++;
}
- if ( ( ! rpt_fcn_called ) ||
- ( cache_ptr->size_decrease_possible ) ||
- ( rpt_status != decrease_disabled ) ||
- ( cache_ptr->max_cache_size != (6 * 1024 * 1024) ) ||
- ( cache_ptr->min_clean_size != (3 * 1024 * 1024) ) ) {
+ if((!rpt_fcn_called) ||
+ (cache_ptr->size_decrease_possible) ||
+ (rpt_status != decrease_disabled) ||
+ (cache_ptr->max_cache_size != (6 * 1024 * 1024)) ||
+ (cache_ptr->min_clean_size != (3 * 1024 * 1024))) {
pass = FALSE;
failure_mssg = "Unexpected cache size change results 28.\n";
}
}
- if ( show_progress ) HDfprintf(stderr, "check point %d\n", checkpoint++);
+ if(show_progress) HDfprintf(stderr, "check point %d\n", checkpoint++);
/* Now work with age out with threshold. One can argue that we should
* repeat the above age out tests with age out with threshold, but the
@@ -23046,7 +22908,7 @@ check_auto_cache_resize_disable(void)
* to 1.0. Test this now.
*/
- if ( pass ) {
+ if(pass) {
auto_size_ctl.version = H5C__CURR_AUTO_SIZE_CTL_VER;
auto_size_ctl.rpt_fcn = test_rpt_fcn;
@@ -23092,92 +22954,92 @@ check_auto_cache_resize_disable(void)
result = H5C_set_cache_auto_resize_config(cache_ptr, &auto_size_ctl);
- if ( result != SUCCEED ) {
+ if(result != SUCCEED) {
pass = FALSE;
failure_mssg = "H5C_set_cache_auto_resize_config failed 10.\n";
}
}
- if ( pass ) {
+ if(pass) {
- if ( ( cache_ptr->max_cache_size != (4 * 1024 * 1024) ) ||
- ( cache_ptr->min_clean_size != (2 * 1024 * 1024) ) ) {
+ if((cache_ptr->max_cache_size != (4 * 1024 * 1024)) ||
+ (cache_ptr->min_clean_size != (2 * 1024 * 1024))) {
pass = FALSE;
failure_mssg = "bad cache size after set resize re-config 9.\n";
}
}
- if ( show_progress ) HDfprintf(stderr, "check point %d\n", checkpoint++);
+ if(show_progress) HDfprintf(stderr, "check point %d\n", checkpoint++);
- if ( pass ) {
+ if(pass) {
/* flush the cache and destroy all entries so we start from a known point */
flush_cache(file_ptr, TRUE, FALSE, FALSE);
}
- if ( show_progress ) HDfprintf(stderr, "check point %d\n", checkpoint++);
+ if(show_progress) HDfprintf(stderr, "check point %d\n", checkpoint++);
/* load up the cache with small entries. Note that it will take an
* epoch for the ageout code to initialize itself if it is enabled.
*/
- if ( pass ) {
+ if(pass) {
rpt_fcn_called = FALSE;
i = 0;
- while ( ( pass ) && ( i < 1000 ) )
+ while(pass && (i < 1000))
{
protect_entry(file_ptr, SMALL_ENTRY_TYPE, i);
- if ( pass ) {
+ if(pass) {
unprotect_entry(file_ptr, SMALL_ENTRY_TYPE, i, H5C__NO_FLAGS_SET);
}
i++;
}
- if ( ( ! rpt_fcn_called ) ||
- ( cache_ptr->size_decrease_possible ) ||
- ( rpt_status != not_full ) ||
- ( cache_ptr->max_cache_size != (4 * 1024 * 1024) ) ||
- ( cache_ptr->min_clean_size != (2 * 1024 * 1024) ) ) {
+ if((!rpt_fcn_called) ||
+ (cache_ptr->size_decrease_possible) ||
+ (rpt_status != not_full) ||
+ (cache_ptr->max_cache_size != (4 * 1024 * 1024)) ||
+ (cache_ptr->min_clean_size != (2 * 1024 * 1024))) {
pass = FALSE;
failure_mssg = "Unexpected cache size change results 29.\n";
}
}
- if ( show_progress ) HDfprintf(stderr, "check point %d\n", checkpoint++);
+ if(show_progress) HDfprintf(stderr, "check point %d\n", checkpoint++);
/* Load up some more small entries.
*/
- if ( pass ) {
+ if(pass) {
rpt_fcn_called = FALSE;
i = 1000;
- while ( ( pass ) && ( i < 2000 ) )
+ while(pass && (i < 2000))
{
protect_entry(file_ptr, SMALL_ENTRY_TYPE, i);
- if ( pass ) {
+ if(pass) {
unprotect_entry(file_ptr, SMALL_ENTRY_TYPE, i, H5C__NO_FLAGS_SET);
}
i++;
}
- if ( ( ! rpt_fcn_called ) ||
- ( cache_ptr->size_decrease_possible ) ||
- ( rpt_status != not_full ) ||
- ( cache_ptr->max_cache_size != (4 * 1024 * 1024) ) ||
- ( cache_ptr->min_clean_size != (2 * 1024 * 1024) ) ) {
+ if((!rpt_fcn_called) ||
+ (cache_ptr->size_decrease_possible) ||
+ (rpt_status != not_full) ||
+ (cache_ptr->max_cache_size != (4 * 1024 * 1024)) ||
+ (cache_ptr->min_clean_size != (2 * 1024 * 1024))) {
pass = FALSE;
failure_mssg = "Unexpected cache size change results 30.\n";
}
}
- if ( show_progress ) HDfprintf(stderr, "check point %d\n", checkpoint++);
+ if(show_progress) HDfprintf(stderr, "check point %d\n", checkpoint++);
/* Now force a high hit rate so that the size increase code is
* is satisfied. We would see a decrease here if decrease were
@@ -23185,62 +23047,62 @@ check_auto_cache_resize_disable(void)
*
* rpt_status should be decrease_disabled.
*/
- if ( pass ) {
+ if(pass) {
rpt_fcn_called = FALSE;
i = 0;
- while ( ( pass ) && ( i < 1000 ) )
+ while(pass && (i < 1000))
{
protect_entry(file_ptr, SMALL_ENTRY_TYPE, i);
- if ( pass ) {
+ if(pass) {
unprotect_entry(file_ptr, SMALL_ENTRY_TYPE, i, H5C__NO_FLAGS_SET);
}
i++;
}
- if ( ( ! rpt_fcn_called ) ||
- ( cache_ptr->size_decrease_possible ) ||
- ( rpt_status != decrease_disabled ) ||
- ( cache_ptr->max_cache_size != (4 * 1024 * 1024) ) ||
- ( cache_ptr->min_clean_size != (2 * 1024 * 1024) ) ||
- ( cache_ptr->index_len != 2000 ) ||
- ( cache_ptr->index_size != 2000 * SMALL_ENTRY_SIZE ) ) {
+ if((!rpt_fcn_called) ||
+ (cache_ptr->size_decrease_possible) ||
+ (rpt_status != decrease_disabled) ||
+ (cache_ptr->max_cache_size != (4 * 1024 * 1024)) ||
+ (cache_ptr->min_clean_size != (2 * 1024 * 1024)) ||
+ (cache_ptr->index_len != 2000) ||
+ (cache_ptr->index_size != 2000 * SMALL_ENTRY_SIZE)) {
pass = FALSE;
failure_mssg = "Unexpected cache size change results 31.\n";
}
}
- if ( show_progress ) HDfprintf(stderr, "check point %d\n", checkpoint++);
+ if(show_progress) HDfprintf(stderr, "check point %d\n", checkpoint++);
/* force low hit rate -- cache size should increase from 4 to 6 Meg.
*/
- if ( pass ) {
+ if(pass) {
rpt_fcn_called = FALSE;
i = 0;
- while ( ( pass ) && ( i < 1000 ) )
+ while(pass && (i < 1000))
{
protect_entry(file_ptr, MONSTER_ENTRY_TYPE, i);
- if ( pass ) {
+ if(pass) {
unprotect_entry(file_ptr, MONSTER_ENTRY_TYPE, i, H5C__NO_FLAGS_SET);
}
i++;
}
- if ( ( ! rpt_fcn_called ) ||
- ( rpt_status != increase ) ||
- ( cache_ptr->max_cache_size != (6 * 1024 * 1024) ) ||
- ( cache_ptr->min_clean_size != (3 * 1024 * 1024) ) ) {
+ if((!rpt_fcn_called) ||
+ (rpt_status != increase) ||
+ (cache_ptr->max_cache_size != (6 * 1024 * 1024)) ||
+ (cache_ptr->min_clean_size != (3 * 1024 * 1024))) {
pass = FALSE;
failure_mssg = "Unexpected cache size change results 32.\n";
}
}
- if ( show_progress ) HDfprintf(stderr, "check point %d\n", checkpoint++);
+ if(show_progress) HDfprintf(stderr, "check point %d\n", checkpoint++);
/* just bang on a single entry. This keeps the hit rate high, and sees
* to it that there are many entries that could be aged out were
@@ -23249,32 +23111,32 @@ check_auto_cache_resize_disable(void)
* Should be no change in cache size, and result should be
* decrease_disabled.
*/
- if ( pass ) {
+ if(pass) {
rpt_fcn_called = FALSE;
i = 0;
- while ( ( pass ) && ( i < 1000 ) )
+ while(pass && (i < 1000))
{
protect_entry(file_ptr, MONSTER_ENTRY_TYPE, 999);
- if ( pass ) {
+ if(pass) {
unprotect_entry(file_ptr, MONSTER_ENTRY_TYPE, 999, H5C__NO_FLAGS_SET);
}
i++;
}
- if ( ( ! rpt_fcn_called ) ||
- ( cache_ptr->size_decrease_possible ) ||
- ( rpt_status != decrease_disabled ) ||
- ( cache_ptr->max_cache_size != (6 * 1024 * 1024) ) ||
- ( cache_ptr->min_clean_size != (3 * 1024 * 1024) ) ) {
+ if((!rpt_fcn_called) ||
+ (cache_ptr->size_decrease_possible) ||
+ (rpt_status != decrease_disabled) ||
+ (cache_ptr->max_cache_size != (6 * 1024 * 1024)) ||
+ (cache_ptr->min_clean_size != (3 * 1024 * 1024))) {
pass = FALSE;
failure_mssg = "Unexpected cache size change results 33.\n";
}
}
- if ( show_progress ) HDfprintf(stderr, "check point %d\n", checkpoint++);
+ if(show_progress) HDfprintf(stderr, "check point %d\n", checkpoint++);
/*********************************************************************
@@ -23284,7 +23146,7 @@ check_auto_cache_resize_disable(void)
* check them all.
*********************************************************************/
- if ( pass ) {
+ if(pass) {
auto_size_ctl.version = H5C__CURR_AUTO_SIZE_CTL_VER;
auto_size_ctl.rpt_fcn = test_rpt_fcn;
@@ -23330,88 +23192,88 @@ check_auto_cache_resize_disable(void)
result = H5C_set_cache_auto_resize_config(cache_ptr, &auto_size_ctl);
- if ( result != SUCCEED ) {
+ if(result != SUCCEED) {
pass = FALSE;
failure_mssg = "H5C_set_cache_auto_resize_config failed 11.\n";
}
}
- if ( pass ) {
+ if(pass) {
- if ( ( cache_ptr->max_cache_size != (2 * 1024 * 1024) ) ||
- ( cache_ptr->min_clean_size != (1 * 1024 * 1024) ) ) {
+ if((cache_ptr->max_cache_size != (2 * 1024 * 1024)) ||
+ (cache_ptr->min_clean_size != (1 * 1024 * 1024))) {
pass = FALSE;
failure_mssg = "bad cache size after set resize re-config 10.\n";
}
}
- if ( show_progress ) HDfprintf(stderr, "check point %d\n", checkpoint++);
+ if(show_progress) HDfprintf(stderr, "check point %d\n", checkpoint++);
/* force low hit rate -- should be no response as the auto-resize
* code should be disabled.
*/
- if ( pass ) {
+ if(pass) {
rpt_fcn_called = FALSE;
i = 0;
- while ( ( pass ) && ( i < 1000 ) )
+ while(pass && (i < 1000))
{
protect_entry(file_ptr, MONSTER_ENTRY_TYPE, i);
- if ( pass ) {
+ if(pass) {
unprotect_entry(file_ptr, MONSTER_ENTRY_TYPE, i, H5C__NO_FLAGS_SET);
}
i++;
}
- if ( ( rpt_fcn_called ) ||
- ( cache_ptr->resize_enabled ) ||
- ( cache_ptr->size_increase_possible ) ||
- ( cache_ptr->size_decrease_possible ) ||
- ( cache_ptr->max_cache_size != (2 * 1024 * 1024) ) ||
- ( cache_ptr->min_clean_size != (1 * 1024 * 1024) ) ) {
+ if((rpt_fcn_called) ||
+ (cache_ptr->resize_enabled) ||
+ (cache_ptr->size_increase_possible) ||
+ (cache_ptr->size_decrease_possible) ||
+ (cache_ptr->max_cache_size != (2 * 1024 * 1024)) ||
+ (cache_ptr->min_clean_size != (1 * 1024 * 1024))) {
pass = FALSE;
failure_mssg = "Unexpected cache size change results 34.\n";
}
}
- if ( show_progress ) HDfprintf(stderr, "check point %d\n", checkpoint++);
+ if(show_progress) HDfprintf(stderr, "check point %d\n", checkpoint++);
/* force high hit rate -- should be no response as the auto-resize
* code should be disabled.
*/
- if ( pass ) {
+ if(pass) {
rpt_fcn_called = FALSE;
i = 0;
- while ( ( pass ) && ( i < 1000 ) )
+ while(pass && (i < 1000))
{
protect_entry(file_ptr, MONSTER_ENTRY_TYPE, 0);
- if ( pass ) {
+ if(pass) {
unprotect_entry(file_ptr, MONSTER_ENTRY_TYPE, 0, H5C__NO_FLAGS_SET);
}
i++;
}
- if ( ( rpt_fcn_called ) ||
- ( cache_ptr->resize_enabled ) ||
- ( cache_ptr->size_increase_possible ) ||
- ( cache_ptr->size_decrease_possible ) ||
- ( cache_ptr->max_cache_size != (2 * 1024 * 1024) ) ||
- ( cache_ptr->min_clean_size != (1 * 1024 * 1024) ) ) {
+ if((rpt_fcn_called) ||
+ (cache_ptr->resize_enabled) ||
+ (cache_ptr->size_increase_possible) ||
+ (cache_ptr->size_decrease_possible) ||
+ (cache_ptr->max_cache_size != (2 * 1024 * 1024)) ||
+ (cache_ptr->min_clean_size != (1 * 1024 * 1024))) {
pass = FALSE;
failure_mssg = "Unexpected cache size change results 35.\n";
}
}
- if ( show_progress ) HDfprintf(stderr, "check point %d\n", checkpoint++);
+ if(show_progress) HDfprintf(stderr, "check point %d\n", checkpoint++);
- if ( pass ) {
+ if(pass) {
auto_size_ctl.version = H5C__CURR_AUTO_SIZE_CTL_VER;
auto_size_ctl.rpt_fcn = test_rpt_fcn;
@@ -23457,88 +23319,88 @@ check_auto_cache_resize_disable(void)
result = H5C_set_cache_auto_resize_config(cache_ptr, &auto_size_ctl);
- if ( result != SUCCEED ) {
+ if(result != SUCCEED) {
pass = FALSE;
failure_mssg = "H5C_set_cache_auto_resize_config failed 12.\n";
}
}
- if ( pass ) {
+ if(pass) {
- if ( ( cache_ptr->max_cache_size != (4 * 1024 * 1024) ) ||
- ( cache_ptr->min_clean_size != (1 * 1024 * 1024) ) ) {
+ if((cache_ptr->max_cache_size != (4 * 1024 * 1024)) ||
+ (cache_ptr->min_clean_size != (1 * 1024 * 1024))) {
pass = FALSE;
failure_mssg = "bad cache size after set resize re-config 11.\n";
}
}
- if ( show_progress ) HDfprintf(stderr, "check point %d\n", checkpoint++);
+ if(show_progress) HDfprintf(stderr, "check point %d\n", checkpoint++);
/* force low hit rate -- should be no response as the auto-resize
* code should be disabled.
*/
- if ( pass ) {
+ if(pass) {
rpt_fcn_called = FALSE;
i = 0;
- while ( ( pass ) && ( i < 1000 ) )
+ while(pass && (i < 1000))
{
protect_entry(file_ptr, MONSTER_ENTRY_TYPE, i);
- if ( pass ) {
+ if(pass) {
unprotect_entry(file_ptr, MONSTER_ENTRY_TYPE, i, H5C__NO_FLAGS_SET);
}
i++;
}
- if ( ( rpt_fcn_called ) ||
- ( cache_ptr->resize_enabled ) ||
- ( cache_ptr->size_increase_possible ) ||
- ( cache_ptr->size_decrease_possible ) ||
- ( cache_ptr->max_cache_size != (4 * 1024 * 1024) ) ||
- ( cache_ptr->min_clean_size != (1 * 1024 * 1024) ) ) {
+ if((rpt_fcn_called) ||
+ (cache_ptr->resize_enabled) ||
+ (cache_ptr->size_increase_possible) ||
+ (cache_ptr->size_decrease_possible) ||
+ (cache_ptr->max_cache_size != (4 * 1024 * 1024)) ||
+ (cache_ptr->min_clean_size != (1 * 1024 * 1024))) {
pass = FALSE;
failure_mssg = "Unexpected cache size change results 36.\n";
}
}
- if ( show_progress ) HDfprintf(stderr, "check point %d\n", checkpoint++);
+ if(show_progress) HDfprintf(stderr, "check point %d\n", checkpoint++);
/* force high hit rate -- should be no response as the auto-resize
* code should be disabled.
*/
- if ( pass ) {
+ if(pass) {
rpt_fcn_called = FALSE;
i = 0;
- while ( ( pass ) && ( i < 1000 ) )
+ while(pass && (i < 1000))
{
protect_entry(file_ptr, MONSTER_ENTRY_TYPE, 0);
- if ( pass ) {
+ if(pass) {
unprotect_entry(file_ptr, MONSTER_ENTRY_TYPE, 0, H5C__NO_FLAGS_SET);
}
i++;
}
- if ( ( rpt_fcn_called ) ||
- ( cache_ptr->resize_enabled ) ||
- ( cache_ptr->size_increase_possible ) ||
- ( cache_ptr->size_decrease_possible ) ||
- ( cache_ptr->max_cache_size != (4 * 1024 * 1024) ) ||
- ( cache_ptr->min_clean_size != (1 * 1024 * 1024) ) ) {
+ if((rpt_fcn_called) ||
+ (cache_ptr->resize_enabled) ||
+ (cache_ptr->size_increase_possible) ||
+ (cache_ptr->size_decrease_possible) ||
+ (cache_ptr->max_cache_size != (4 * 1024 * 1024)) ||
+ (cache_ptr->min_clean_size != (1 * 1024 * 1024))) {
pass = FALSE;
failure_mssg = "Unexpected cache size change results 37.\n";
}
}
- if ( show_progress ) HDfprintf(stderr, "check point %d\n", checkpoint++);
+ if(show_progress) HDfprintf(stderr, "check point %d\n", checkpoint++);
- if ( pass ) {
+ if(pass) {
auto_size_ctl.version = H5C__CURR_AUTO_SIZE_CTL_VER;
auto_size_ctl.rpt_fcn = test_rpt_fcn;
@@ -23584,88 +23446,88 @@ check_auto_cache_resize_disable(void)
result = H5C_set_cache_auto_resize_config(cache_ptr, &auto_size_ctl);
- if ( result != SUCCEED ) {
+ if(result != SUCCEED) {
pass = FALSE;
failure_mssg = "H5C_set_cache_auto_resize_config failed 13.\n";
}
}
- if ( pass ) {
+ if(pass) {
- if ( ( cache_ptr->max_cache_size != (6 * 1024 * 1024) ) ||
- ( cache_ptr->min_clean_size != (3 * 1024 * 1024) ) ) {
+ if((cache_ptr->max_cache_size != (6 * 1024 * 1024)) ||
+ (cache_ptr->min_clean_size != (3 * 1024 * 1024))) {
pass = FALSE;
failure_mssg = "bad cache size after set resize re-config 12.\n";
}
}
- if ( show_progress ) HDfprintf(stderr, "check point %d\n", checkpoint++);
+ if(show_progress) HDfprintf(stderr, "check point %d\n", checkpoint++);
/* force low hit rate -- should be no response as the auto-resize
* code should be disabled.
*/
- if ( pass ) {
+ if(pass) {
rpt_fcn_called = FALSE;
i = 0;
- while ( ( pass ) && ( i < 1000 ) )
+ while(pass && (i < 1000))
{
protect_entry(file_ptr, MONSTER_ENTRY_TYPE, i);
- if ( pass ) {
+ if(pass) {
unprotect_entry(file_ptr, MONSTER_ENTRY_TYPE, i, H5C__NO_FLAGS_SET);
}
i++;
}
- if ( ( rpt_fcn_called ) ||
- ( cache_ptr->resize_enabled ) ||
- ( cache_ptr->size_increase_possible ) ||
- ( cache_ptr->size_decrease_possible ) ||
- ( cache_ptr->max_cache_size != (6 * 1024 * 1024) ) ||
- ( cache_ptr->min_clean_size != (3 * 1024 * 1024) ) ) {
+ if((rpt_fcn_called) ||
+ (cache_ptr->resize_enabled) ||
+ (cache_ptr->size_increase_possible) ||
+ (cache_ptr->size_decrease_possible) ||
+ (cache_ptr->max_cache_size != (6 * 1024 * 1024)) ||
+ (cache_ptr->min_clean_size != (3 * 1024 * 1024))) {
pass = FALSE;
failure_mssg = "Unexpected cache size change results 38.\n";
}
}
- if ( show_progress ) HDfprintf(stderr, "check point %d\n", checkpoint++);
+ if(show_progress) HDfprintf(stderr, "check point %d\n", checkpoint++);
/* force high hit rate -- should be no response as the auto-resize
* code should be disabled.
*/
- if ( pass ) {
+ if(pass) {
rpt_fcn_called = FALSE;
i = 0;
- while ( ( pass ) && ( i < 1000 ) )
+ while(pass && (i < 1000))
{
protect_entry(file_ptr, MONSTER_ENTRY_TYPE, 0);
- if ( pass ) {
+ if(pass) {
unprotect_entry(file_ptr, MONSTER_ENTRY_TYPE, 0, H5C__NO_FLAGS_SET);
}
i++;
}
- if ( ( rpt_fcn_called ) ||
- ( cache_ptr->resize_enabled ) ||
- ( cache_ptr->size_increase_possible ) ||
- ( cache_ptr->size_decrease_possible ) ||
- ( cache_ptr->max_cache_size != (6 * 1024 * 1024) ) ||
- ( cache_ptr->min_clean_size != (3 * 1024 * 1024) ) ) {
+ if((rpt_fcn_called) ||
+ (cache_ptr->resize_enabled) ||
+ (cache_ptr->size_increase_possible) ||
+ (cache_ptr->size_decrease_possible) ||
+ (cache_ptr->max_cache_size != (6 * 1024 * 1024)) ||
+ (cache_ptr->min_clean_size != (3 * 1024 * 1024))) {
pass = FALSE;
failure_mssg = "Unexpected cache size change results 39.\n";
}
}
- if ( show_progress ) HDfprintf(stderr, "check point %d\n", checkpoint++);
+ if(show_progress) HDfprintf(stderr, "check point %d\n", checkpoint++);
- if ( pass ) {
+ if(pass) {
auto_size_ctl.version = H5C__CURR_AUTO_SIZE_CTL_VER;
auto_size_ctl.rpt_fcn = test_rpt_fcn;
@@ -23711,88 +23573,88 @@ check_auto_cache_resize_disable(void)
result = H5C_set_cache_auto_resize_config(cache_ptr, &auto_size_ctl);
- if ( result != SUCCEED ) {
+ if(result != SUCCEED) {
pass = FALSE;
failure_mssg = "H5C_set_cache_auto_resize_config failed 14.\n";
}
}
- if ( pass ) {
+ if(pass) {
- if ( ( cache_ptr->max_cache_size != (4 * 1024 * 1024) ) ||
- ( cache_ptr->min_clean_size != (1 * 1024 * 1024) ) ) {
+ if((cache_ptr->max_cache_size != (4 * 1024 * 1024)) ||
+ (cache_ptr->min_clean_size != (1 * 1024 * 1024))) {
pass = FALSE;
failure_mssg = "bad cache size after set resize re-config 13.\n";
}
}
- if ( show_progress ) HDfprintf(stderr, "check point %d\n", checkpoint++);
+ if(show_progress) HDfprintf(stderr, "check point %d\n", checkpoint++);
/* force low hit rate -- should be no response as the auto-resize
* code should be disabled.
*/
- if ( pass ) {
+ if(pass) {
rpt_fcn_called = FALSE;
i = 0;
- while ( ( pass ) && ( i < 1000 ) )
+ while(pass && (i < 1000))
{
protect_entry(file_ptr, MONSTER_ENTRY_TYPE, i);
- if ( pass ) {
+ if(pass) {
unprotect_entry(file_ptr, MONSTER_ENTRY_TYPE, i, H5C__NO_FLAGS_SET);
}
i++;
}
- if ( ( rpt_fcn_called ) ||
- ( cache_ptr->resize_enabled ) ||
- ( cache_ptr->size_increase_possible ) ||
- ( cache_ptr->size_decrease_possible ) ||
- ( cache_ptr->max_cache_size != (4 * 1024 * 1024) ) ||
- ( cache_ptr->min_clean_size != (1 * 1024 * 1024) ) ) {
+ if((rpt_fcn_called) ||
+ (cache_ptr->resize_enabled) ||
+ (cache_ptr->size_increase_possible) ||
+ (cache_ptr->size_decrease_possible) ||
+ (cache_ptr->max_cache_size != (4 * 1024 * 1024)) ||
+ (cache_ptr->min_clean_size != (1 * 1024 * 1024))) {
pass = FALSE;
failure_mssg = "Unexpected cache size change results 40.\n";
}
}
- if ( show_progress ) HDfprintf(stderr, "check point %d\n", checkpoint++);
+ if(show_progress) HDfprintf(stderr, "check point %d\n", checkpoint++);
/* force high hit rate -- should be no response as the auto-resize
* code should be disabled.
*/
- if ( pass ) {
+ if(pass) {
rpt_fcn_called = FALSE;
i = 0;
- while ( ( pass ) && ( i < 1000 ) )
+ while(pass && (i < 1000))
{
protect_entry(file_ptr, MONSTER_ENTRY_TYPE, 0);
- if ( pass ) {
+ if(pass) {
unprotect_entry(file_ptr, MONSTER_ENTRY_TYPE, 0, H5C__NO_FLAGS_SET);
}
i++;
}
- if ( ( rpt_fcn_called ) ||
- ( cache_ptr->resize_enabled ) ||
- ( cache_ptr->size_increase_possible ) ||
- ( cache_ptr->size_decrease_possible ) ||
- ( cache_ptr->max_cache_size != (4 * 1024 * 1024) ) ||
- ( cache_ptr->min_clean_size != (1 * 1024 * 1024) ) ) {
+ if((rpt_fcn_called) ||
+ (cache_ptr->resize_enabled) ||
+ (cache_ptr->size_increase_possible) ||
+ (cache_ptr->size_decrease_possible) ||
+ (cache_ptr->max_cache_size != (4 * 1024 * 1024)) ||
+ (cache_ptr->min_clean_size != (1 * 1024 * 1024))) {
pass = FALSE;
failure_mssg = "Unexpected cache size change results 41.\n";
}
}
- if ( show_progress ) HDfprintf(stderr, "check point %d\n", checkpoint++);
+ if(show_progress) HDfprintf(stderr, "check point %d\n", checkpoint++);
- if ( pass ) {
+ if(pass) {
auto_size_ctl.version = H5C__CURR_AUTO_SIZE_CTL_VER;
auto_size_ctl.rpt_fcn = test_rpt_fcn;
@@ -23839,88 +23701,88 @@ check_auto_cache_resize_disable(void)
result = H5C_set_cache_auto_resize_config(cache_ptr, &auto_size_ctl);
- if ( result != SUCCEED ) {
+ if(result != SUCCEED) {
pass = FALSE;
failure_mssg = "H5C_set_cache_auto_resize_config failed 15.\n";
}
}
- if ( pass ) {
+ if(pass) {
- if ( ( cache_ptr->max_cache_size != (4 * 1024 * 1024) ) ||
- ( cache_ptr->min_clean_size != (2 * 1024 * 1024) ) ) {
+ if((cache_ptr->max_cache_size != (4 * 1024 * 1024)) ||
+ (cache_ptr->min_clean_size != (2 * 1024 * 1024))) {
pass = FALSE;
failure_mssg = "bad cache size after set resize re-config 14.\n";
}
}
- if ( show_progress ) HDfprintf(stderr, "check point %d\n", checkpoint++);
+ if(show_progress) HDfprintf(stderr, "check point %d\n", checkpoint++);
/* force low hit rate -- should be no response as the auto-resize
* code should be disabled.
*/
- if ( pass ) {
+ if(pass) {
rpt_fcn_called = FALSE;
i = 0;
- while ( ( pass ) && ( i < 1000 ) )
+ while(pass && (i < 1000))
{
protect_entry(file_ptr, MONSTER_ENTRY_TYPE, i);
- if ( pass ) {
+ if(pass) {
unprotect_entry(file_ptr, MONSTER_ENTRY_TYPE, i, H5C__NO_FLAGS_SET);
}
i++;
}
- if ( ( rpt_fcn_called ) ||
- ( cache_ptr->resize_enabled ) ||
- ( cache_ptr->size_increase_possible ) ||
- ( cache_ptr->size_decrease_possible ) ||
- ( cache_ptr->max_cache_size != (4 * 1024 * 1024) ) ||
- ( cache_ptr->min_clean_size != (2 * 1024 * 1024) ) ) {
+ if((rpt_fcn_called) ||
+ (cache_ptr->resize_enabled) ||
+ (cache_ptr->size_increase_possible) ||
+ (cache_ptr->size_decrease_possible) ||
+ (cache_ptr->max_cache_size != (4 * 1024 * 1024)) ||
+ (cache_ptr->min_clean_size != (2 * 1024 * 1024))) {
pass = FALSE;
failure_mssg = "Unexpected cache size change results 42.\n";
}
}
- if ( show_progress ) HDfprintf(stderr, "check point %d\n", checkpoint++);
+ if(show_progress) HDfprintf(stderr, "check point %d\n", checkpoint++);
/* force high hit rate -- should be no response as the auto-resize
* code should be disabled.
*/
- if ( pass ) {
+ if(pass) {
rpt_fcn_called = FALSE;
i = 0;
- while ( ( pass ) && ( i < 1000 ) )
+ while(pass && (i < 1000))
{
protect_entry(file_ptr, MONSTER_ENTRY_TYPE, 0);
- if ( pass ) {
+ if(pass) {
unprotect_entry(file_ptr, MONSTER_ENTRY_TYPE, 0, H5C__NO_FLAGS_SET);
}
i++;
}
- if ( ( rpt_fcn_called ) ||
- ( cache_ptr->resize_enabled ) ||
- ( cache_ptr->size_increase_possible ) ||
- ( cache_ptr->size_decrease_possible ) ||
- ( cache_ptr->max_cache_size != (4 * 1024 * 1024) ) ||
- ( cache_ptr->min_clean_size != (2 * 1024 * 1024) ) ) {
+ if((rpt_fcn_called) ||
+ (cache_ptr->resize_enabled) ||
+ (cache_ptr->size_increase_possible) ||
+ (cache_ptr->size_decrease_possible) ||
+ (cache_ptr->max_cache_size != (4 * 1024 * 1024)) ||
+ (cache_ptr->min_clean_size != (2 * 1024 * 1024))) {
pass = FALSE;
failure_mssg = "Unexpected cache size change results 43.\n";
}
}
- if ( show_progress ) HDfprintf(stderr, "check point %d\n", checkpoint++);
+ if(show_progress) HDfprintf(stderr, "check point %d\n", checkpoint++);
- if ( pass ) {
+ if(pass) {
auto_size_ctl.version = H5C__CURR_AUTO_SIZE_CTL_VER;
auto_size_ctl.rpt_fcn = test_rpt_fcn;
@@ -23967,86 +23829,86 @@ check_auto_cache_resize_disable(void)
result = H5C_set_cache_auto_resize_config(cache_ptr, &auto_size_ctl);
- if ( result != SUCCEED ) {
+ if(result != SUCCEED) {
pass = FALSE;
failure_mssg = "H5C_set_cache_auto_resize_config failed 16.\n";
}
}
- if ( pass ) {
+ if(pass) {
- if ( ( cache_ptr->max_cache_size != (4 * 1024 * 1024) ) ||
- ( cache_ptr->min_clean_size != (2 * 1024 * 1024) ) ) {
+ if((cache_ptr->max_cache_size != (4 * 1024 * 1024)) ||
+ (cache_ptr->min_clean_size != (2 * 1024 * 1024))) {
pass = FALSE;
failure_mssg = "bad cache size after set resize re-config 15.\n";
}
}
- if ( show_progress ) HDfprintf(stderr, "check point %d\n", checkpoint++);
+ if(show_progress) HDfprintf(stderr, "check point %d\n", checkpoint++);
/* force low hit rate -- should be no response as the auto-resize
* code should be disabled.
*/
- if ( pass ) {
+ if(pass) {
rpt_fcn_called = FALSE;
i = 0;
- while ( ( pass ) && ( i < 1000 ) )
+ while(pass && (i < 1000))
{
protect_entry(file_ptr, MONSTER_ENTRY_TYPE, i);
- if ( pass ) {
+ if(pass) {
unprotect_entry(file_ptr, MONSTER_ENTRY_TYPE, i, H5C__NO_FLAGS_SET);
}
i++;
}
- if ( ( rpt_fcn_called ) ||
- ( cache_ptr->resize_enabled ) ||
- ( cache_ptr->size_increase_possible ) ||
- ( cache_ptr->size_decrease_possible ) ||
- ( cache_ptr->max_cache_size != (4 * 1024 * 1024) ) ||
- ( cache_ptr->min_clean_size != (2 * 1024 * 1024) ) ) {
+ if((rpt_fcn_called) ||
+ (cache_ptr->resize_enabled) ||
+ (cache_ptr->size_increase_possible) ||
+ (cache_ptr->size_decrease_possible) ||
+ (cache_ptr->max_cache_size != (4 * 1024 * 1024)) ||
+ (cache_ptr->min_clean_size != (2 * 1024 * 1024))) {
pass = FALSE;
failure_mssg = "Unexpected cache size change results 44.\n";
}
}
- if ( show_progress ) HDfprintf(stderr, "check point %d\n", checkpoint++);
+ if(show_progress) HDfprintf(stderr, "check point %d\n", checkpoint++);
/* force high hit rate -- should be no response as the auto-resize
* code should be disabled.
*/
- if ( pass ) {
+ if(pass) {
rpt_fcn_called = FALSE;
i = 0;
- while ( ( pass ) && ( i < 1000 ) )
+ while(pass && (i < 1000))
{
protect_entry(file_ptr, MONSTER_ENTRY_TYPE, 0);
- if ( pass ) {
+ if(pass) {
unprotect_entry(file_ptr, MONSTER_ENTRY_TYPE, 0, H5C__NO_FLAGS_SET);
}
i++;
}
- if ( ( rpt_fcn_called ) ||
- ( cache_ptr->resize_enabled ) ||
- ( cache_ptr->size_increase_possible ) ||
- ( cache_ptr->size_decrease_possible ) ||
- ( cache_ptr->max_cache_size != (4 * 1024 * 1024) ) ||
- ( cache_ptr->min_clean_size != (2 * 1024 * 1024) ) ) {
+ if((rpt_fcn_called) ||
+ (cache_ptr->resize_enabled) ||
+ (cache_ptr->size_increase_possible) ||
+ (cache_ptr->size_decrease_possible) ||
+ (cache_ptr->max_cache_size != (4 * 1024 * 1024)) ||
+ (cache_ptr->min_clean_size != (2 * 1024 * 1024))) {
pass = FALSE;
failure_mssg = "Unexpected cache size change results 45.\n";
}
}
- if ( show_progress ) HDfprintf(stderr, "check point %d\n", checkpoint++);
+ if(show_progress) HDfprintf(stderr, "check point %d\n", checkpoint++);
/* Now test the flash cache size increment code to verify that it
@@ -24076,7 +23938,7 @@ check_auto_cache_resize_disable(void)
* code enabled.
*/
- if ( pass ) {
+ if(pass) {
auto_size_ctl.version = H5C__CURR_AUTO_SIZE_CTL_VER;
auto_size_ctl.rpt_fcn = test_rpt_fcn;
@@ -24123,17 +23985,17 @@ check_auto_cache_resize_disable(void)
result = H5C_set_cache_auto_resize_config(cache_ptr, &auto_size_ctl);
- if ( result != SUCCEED ) {
+ if(result != SUCCEED) {
pass = FALSE;
failure_mssg = "H5C_set_cache_auto_resize_config failed 17.\n";
}
}
- if ( pass ) {
+ if(pass) {
- if ( ( cache_ptr->max_cache_size != (64 * 1024) ) ||
- ( cache_ptr->min_clean_size != (32 * 1024) ) ) {
+ if((cache_ptr->max_cache_size != (64 * 1024)) ||
+ (cache_ptr->min_clean_size != (32 * 1024))) {
pass = FALSE;
failure_mssg = "bad cache size after set resize re-config 16.\n";
@@ -24144,19 +24006,19 @@ check_auto_cache_resize_disable(void)
* size. Protect and unprotect an entry to allow the cache to evict
* entries and get within bounds
*/
- if ( pass ) {
+ if(pass) {
rpt_fcn_called = FALSE;
protect_entry(file_ptr, LARGE_ENTRY_TYPE, 0);
unprotect_entry(file_ptr, LARGE_ENTRY_TYPE, 0, H5C__NO_FLAGS_SET);
- if ( ( pass ) &&
- ( ( ( cache_ptr->max_cache_size != (64 * 1024) ) ||
- ( cache_ptr->min_clean_size != (32 * 1024) ) ||
- ( cache_ptr->index_len != 1 ) ||
- ( cache_ptr->index_size != LARGE_ENTRY_SIZE ) ||
- ( rpt_fcn_called != FALSE ) ) ) ) {
+ if(pass &&
+ (((cache_ptr->max_cache_size != (64 * 1024)) ||
+ (cache_ptr->min_clean_size != (32 * 1024)) ||
+ (cache_ptr->index_len != 1) ||
+ (cache_ptr->index_size != LARGE_ENTRY_SIZE) ||
+ (rpt_fcn_called != FALSE)))) {
HDfprintf(stdout, "\nmax_cache_size = %ld.\n",
(long)(cache_ptr->max_cache_size));
@@ -24174,7 +24036,7 @@ check_auto_cache_resize_disable(void)
}
}
- if ( show_progress ) HDfprintf(stderr, "check point %d\n", checkpoint++);
+ if(show_progress) HDfprintf(stderr, "check point %d\n", checkpoint++);
/* Now protect and unprotect a monster entry. If the flash cache
* size increment code was active, this would trigger an increase.
@@ -24183,19 +24045,19 @@ check_auto_cache_resize_disable(void)
* This finishes the additional tests needed for the flash cache
* size increase code.
*/
- if ( pass ) {
+ if(pass) {
rpt_fcn_called = FALSE;
protect_entry(file_ptr, MONSTER_ENTRY_TYPE, 0);
unprotect_entry(file_ptr, MONSTER_ENTRY_TYPE, 0, H5C__NO_FLAGS_SET);
- if ( ( pass ) &&
- ( ( ( cache_ptr->max_cache_size != (64 * 1024) ) ||
- ( cache_ptr->min_clean_size != (32 * 1024) ) ||
- ( cache_ptr->index_len != 1 ) ||
- ( cache_ptr->index_size != MONSTER_ENTRY_SIZE ) ||
- ( rpt_fcn_called != FALSE ) ) ) ) {
+ if(pass &&
+ (((cache_ptr->max_cache_size != (64 * 1024)) ||
+ (cache_ptr->min_clean_size != (32 * 1024)) ||
+ (cache_ptr->index_len != 1) ||
+ (cache_ptr->index_size != MONSTER_ENTRY_SIZE) ||
+ (rpt_fcn_called != FALSE)))) {
HDfprintf(stdout, "\nmax_cache_size = %ld.\n",
(long)(cache_ptr->max_cache_size));
@@ -24213,18 +24075,18 @@ check_auto_cache_resize_disable(void)
}
}
- if ( show_progress ) HDfprintf(stderr, "check point %d\n", checkpoint++);
+ if(show_progress) HDfprintf(stderr, "check point %d\n", checkpoint++);
- if ( pass ) {
+ if(pass) {
takedown_cache(file_ptr, FALSE, FALSE);
}
- if ( show_progress ) HDfprintf(stderr, "check point %d\n", checkpoint++);
+ if(show_progress) HDfprintf(stderr, "check point %d\n", checkpoint++);
- if ( pass ) { PASSED(); } else { H5_FAILED(); }
+ if(pass) { PASSED(); } else { H5_FAILED(); }
- if ( ! pass ) {
+ if(!pass) {
HDfprintf(stdout, "%s: failure_mssg = \"%s\".\n",
FUNC, failure_mssg);
@@ -24311,9 +24173,9 @@ check_auto_cache_resize_epoch_markers(void)
pass = TRUE;
- if ( show_progress ) HDfprintf(stderr, "check point %d\n", checkpoint++);
+ if(show_progress) HDfprintf(stderr, "check point %d\n", checkpoint++);
- if ( pass ) {
+ if(pass) {
reset_entries();
@@ -24322,34 +24184,34 @@ check_auto_cache_resize_epoch_markers(void)
cache_ptr = file_ptr->shared->cache;
}
- if ( pass ) {
+ if(pass) {
result = H5C_set_cache_auto_resize_config(cache_ptr, &auto_size_ctl);
- if ( result != SUCCEED ) {
+ if(result != SUCCEED) {
pass = FALSE;
failure_mssg = "H5C_set_cache_auto_resize_config failed 1.\n";
}
}
- if ( pass ) {
+ if(pass) {
- if ( ( cache_ptr->max_cache_size != (512 * 1024) ) ||
- ( cache_ptr->min_clean_size != (256 * 1024) ) ) {
+ if((cache_ptr->max_cache_size != (512 * 1024)) ||
+ (cache_ptr->min_clean_size != (256 * 1024))) {
pass = FALSE;
failure_mssg = "bad cache size after initialization.\n";
}
}
- if ( show_progress ) HDfprintf(stderr, "check point %d\n", checkpoint++);
+ if(show_progress) HDfprintf(stderr, "check point %d\n", checkpoint++);
/* Now make sure that we are managing the epoch markers correctly.
*/
- if ( pass ) {
+ if(pass) {
auto_size_ctl.version = H5C__CURR_AUTO_SIZE_CTL_VER;
auto_size_ctl.rpt_fcn = test_rpt_fcn;
@@ -24395,87 +24257,87 @@ check_auto_cache_resize_epoch_markers(void)
result = H5C_set_cache_auto_resize_config(cache_ptr, &auto_size_ctl);
- if ( result != SUCCEED ) {
+ if(result != SUCCEED) {
pass = FALSE;
failure_mssg = "H5C_set_cache_auto_resize_config failed 2.\n";
}
}
- if ( pass ) {
+ if(pass) {
- if ( ( cache_ptr->max_cache_size != (8 * 1024 * 1024) ) ||
- ( cache_ptr->min_clean_size != (4 * 1024 * 1024) ) ) {
+ if((cache_ptr->max_cache_size != (8 * 1024 * 1024)) ||
+ (cache_ptr->min_clean_size != (4 * 1024 * 1024))) {
pass = FALSE;
failure_mssg = "bad cache size after set resize re-config 1.\n";
}
}
- if ( show_progress ) HDfprintf(stderr, "check point %d\n", checkpoint++);
+ if(show_progress) HDfprintf(stderr, "check point %d\n", checkpoint++);
/* Since we just created the cache, there should be no epoch markers
* active. Verify that this is true.
*/
- if ( pass ) {
+ if(pass) {
- if ( cache_ptr->epoch_markers_active != 0 ) {
+ if(cache_ptr->epoch_markers_active != 0) {
pass = FALSE;
failure_mssg = "Unexpected # of epoch markers 1.\n";
}
}
- if ( pass ) {
+ if(pass) {
rpt_fcn_called = FALSE;
i = 0;
- while ( ( pass ) && ( i < 1000 ) )
+ while(pass && (i < 1000))
{
protect_entry(file_ptr, MEDIUM_ENTRY_TYPE, i);
- if ( pass ) {
+ if(pass) {
unprotect_entry(file_ptr, MEDIUM_ENTRY_TYPE, i, H5C__NO_FLAGS_SET);
}
i++;
}
- if ( ( ! rpt_fcn_called ) ||
- ( rpt_status != in_spec ) ||
- ( cache_ptr->max_cache_size != (8 * 1024 * 1024) ) ||
- ( cache_ptr->min_clean_size != (4 * 1024 * 1024) ) ||
- ( cache_ptr->index_size != (1 * 1000 * MEDIUM_ENTRY_SIZE) ) ) {
+ if((!rpt_fcn_called) ||
+ (rpt_status != in_spec) ||
+ (cache_ptr->max_cache_size != (8 * 1024 * 1024)) ||
+ (cache_ptr->min_clean_size != (4 * 1024 * 1024)) ||
+ (cache_ptr->index_size != (1 * 1000 * MEDIUM_ENTRY_SIZE))) {
pass = FALSE;
failure_mssg = "Unexpected cache size change results 0.\n";
}
}
- if ( show_progress ) HDfprintf(stderr, "check point %d\n", checkpoint++);
+ if(show_progress) HDfprintf(stderr, "check point %d\n", checkpoint++);
- if ( pass ) {
+ if(pass) {
j = 2;
- while ( ( pass ) && ( j <= 10 ) )
+ while(pass && (j <= 10))
{
rpt_fcn_called = FALSE;
i = (j - 2) * 1000;
- while ( ( pass ) && ( i < (j - 1) * 1000 ) )
+ while(pass && (i < (j - 1) * 1000))
{
protect_entry(file_ptr, SMALL_ENTRY_TYPE, i);
- if ( pass ) {
+ if(pass) {
unprotect_entry(file_ptr, SMALL_ENTRY_TYPE, i, H5C__NO_FLAGS_SET);
}
i++;
}
- if ( ( ! rpt_fcn_called ) ||
- ( rpt_status != in_spec ) ||
- ( cache_ptr->epoch_markers_active != j ) ) {
+ if((!rpt_fcn_called) ||
+ (rpt_status != in_spec) ||
+ (cache_ptr->epoch_markers_active != j)) {
pass = FALSE;
failure_mssg = "Unexpected # of epoch markers 2.\n";
@@ -24485,45 +24347,45 @@ check_auto_cache_resize_epoch_markers(void)
}
}
- if ( show_progress ) HDfprintf(stderr, "check point %d\n", checkpoint++);
+ if(show_progress) HDfprintf(stderr, "check point %d\n", checkpoint++);
/* we now have a full complement of epoch markers -- see if
* we get the expected reduction.
*/
- if ( pass ) {
+ if(pass) {
rpt_fcn_called = FALSE;
i = 9000;
- while ( ( pass ) && ( i < 10000 ) )
+ while(pass && (i < 10000))
{
protect_entry(file_ptr, SMALL_ENTRY_TYPE, i);
- if ( pass ) {
+ if(pass) {
unprotect_entry(file_ptr, SMALL_ENTRY_TYPE, i, H5C__NO_FLAGS_SET);
}
i++;
}
- if ( ( ! rpt_fcn_called ) ||
- ( rpt_status != decrease ) ||
- ( cache_ptr->max_cache_size !=
- (10 * 1000 * SMALL_ENTRY_SIZE + MEDIUM_ENTRY_SIZE) ) ||
- ( cache_ptr->min_clean_size !=
- ((10 * 1000 * SMALL_ENTRY_SIZE + MEDIUM_ENTRY_SIZE) / 2) ) ||
- ( cache_ptr->index_size !=
- (10 * 1000 * SMALL_ENTRY_SIZE + MEDIUM_ENTRY_SIZE) ) ) {
+ if((!rpt_fcn_called) ||
+ (rpt_status != decrease) ||
+ (cache_ptr->max_cache_size !=
+ (10 * 1000 * SMALL_ENTRY_SIZE + MEDIUM_ENTRY_SIZE)) ||
+ (cache_ptr->min_clean_size !=
+ ((10 * 1000 * SMALL_ENTRY_SIZE + MEDIUM_ENTRY_SIZE) / 2)) ||
+ (cache_ptr->index_size !=
+ (10 * 1000 * SMALL_ENTRY_SIZE + MEDIUM_ENTRY_SIZE))) {
pass = FALSE;
failure_mssg = "Unexpected cache size change results 1.\n";
}
}
- if ( show_progress ) HDfprintf(stderr, "check point %d\n", checkpoint++);
+ if(show_progress) HDfprintf(stderr, "check point %d\n", checkpoint++);
/* now reduce the epochs before eviction, and see if the cache
* deletes the extra markers
*/
- if ( pass ) {
+ if(pass) {
auto_size_ctl.version = H5C__CURR_AUTO_SIZE_CTL_VER;
auto_size_ctl.rpt_fcn = test_rpt_fcn;
@@ -24569,30 +24431,30 @@ check_auto_cache_resize_epoch_markers(void)
result = H5C_set_cache_auto_resize_config(cache_ptr, &auto_size_ctl);
- if ( result != SUCCEED ) {
+ if(result != SUCCEED) {
pass = FALSE;
failure_mssg = "H5C_set_cache_auto_resize_config failed 3.\n";
}
}
- if ( pass ) {
+ if(pass) {
- if ( ( cache_ptr->max_cache_size != (8 * 1024 * 1024) ) ||
- ( cache_ptr->min_clean_size != (4 * 1024 * 1024) ) ) {
+ if((cache_ptr->max_cache_size != (8 * 1024 * 1024)) ||
+ (cache_ptr->min_clean_size != (4 * 1024 * 1024))) {
pass = FALSE;
failure_mssg = "bad cache size after set resize re-config 2.\n";
}
}
- if ( show_progress ) HDfprintf(stderr, "check point %d\n", checkpoint++);
+ if(show_progress) HDfprintf(stderr, "check point %d\n", checkpoint++);
/* There should be exactly one active epoch marker at present.
*/
- if ( pass ) {
+ if(pass) {
- if ( cache_ptr->epoch_markers_active != 1 ) {
+ if(cache_ptr->epoch_markers_active != 1) {
pass = FALSE;
failure_mssg = "Unexpected # of epoch markers 3.\n";
@@ -24603,38 +24465,38 @@ check_auto_cache_resize_epoch_markers(void)
* not accessed in this epoch gets evicted, and the cache size
* is reduced.
*/
- if ( pass ) {
+ if(pass) {
rpt_fcn_called = FALSE;
i = 9000;
- while ( ( pass ) && ( i < 10000 ) )
+ while(pass && (i < 10000))
{
protect_entry(file_ptr, SMALL_ENTRY_TYPE, i);
- if ( pass ) {
+ if(pass) {
unprotect_entry(file_ptr, SMALL_ENTRY_TYPE, i, H5C__NO_FLAGS_SET);
}
i++;
}
- if ( ( ! rpt_fcn_called ) ||
- ( rpt_status != decrease ) ||
- ( cache_ptr->max_cache_size != (512 * 1024) ) ||
- ( cache_ptr->min_clean_size != (256 * 1024) ) ||
- ( cache_ptr->index_size != (1 * 1000 * SMALL_ENTRY_SIZE) ) ) {
+ if((!rpt_fcn_called) ||
+ (rpt_status != decrease) ||
+ (cache_ptr->max_cache_size != (512 * 1024)) ||
+ (cache_ptr->min_clean_size != (256 * 1024)) ||
+ (cache_ptr->index_size != (1 * 1000 * SMALL_ENTRY_SIZE))) {
pass = FALSE;
failure_mssg = "Unexpected cache size change results 2.\n";
}
}
- if ( show_progress ) HDfprintf(stderr, "check point %d\n", checkpoint++);
+ if(show_progress) HDfprintf(stderr, "check point %d\n", checkpoint++);
/* There should be exactly one active epoch marker at present...
*/
- if ( pass ) {
+ if(pass) {
- if ( cache_ptr->epoch_markers_active != 1 ) {
+ if(cache_ptr->epoch_markers_active != 1) {
pass = FALSE;
failure_mssg = "Unexpected # of epoch markers 4.\n";
@@ -24644,7 +24506,7 @@ check_auto_cache_resize_epoch_markers(void)
/* shift the decrement mode to threshold, and verify that we remove
* all epoch markers.
*/
- if ( pass ) {
+ if(pass) {
auto_size_ctl.version = H5C__CURR_AUTO_SIZE_CTL_VER;
auto_size_ctl.rpt_fcn = test_rpt_fcn;
@@ -24690,17 +24552,17 @@ check_auto_cache_resize_epoch_markers(void)
result = H5C_set_cache_auto_resize_config(cache_ptr, &auto_size_ctl);
- if ( result != SUCCEED ) {
+ if(result != SUCCEED) {
pass = FALSE;
failure_mssg = "H5C_set_cache_auto_resize_config failed 4.\n";
}
}
- if ( pass ) {
+ if(pass) {
- if ( ( cache_ptr->max_cache_size != (8 * 1024 * 1024) ) ||
- ( cache_ptr->min_clean_size != (4 * 1024 * 1024) ) ) {
+ if((cache_ptr->max_cache_size != (8 * 1024 * 1024)) ||
+ (cache_ptr->min_clean_size != (4 * 1024 * 1024))) {
pass = FALSE;
failure_mssg = "bad cache size after set resize re-config 3.\n";
@@ -24709,21 +24571,21 @@ check_auto_cache_resize_epoch_markers(void)
/* ... and now there should be none.
*/
- if ( pass ) {
+ if(pass) {
- if ( cache_ptr->epoch_markers_active != 0 ) {
+ if(cache_ptr->epoch_markers_active != 0) {
pass = FALSE;
failure_mssg = "Unexpected # of epoch markers 5.\n";
}
}
- if ( show_progress ) HDfprintf(stderr, "check point %d\n", checkpoint++);
+ if(show_progress) HDfprintf(stderr, "check point %d\n", checkpoint++);
/* shift the decrement mode to age out with threshold. Set epochs
* before eviction to 10 again.
*/
- if ( pass ) {
+ if(pass) {
auto_size_ctl.version = H5C__CURR_AUTO_SIZE_CTL_VER;
auto_size_ctl.rpt_fcn = test_rpt_fcn;
@@ -24769,7 +24631,7 @@ check_auto_cache_resize_epoch_markers(void)
result = H5C_set_cache_auto_resize_config(cache_ptr, &auto_size_ctl);
- if ( result != SUCCEED ) {
+ if(result != SUCCEED) {
pass = FALSE;
failure_mssg = "H5C_set_cache_auto_resize_config failed 5.\n";
@@ -24778,39 +24640,39 @@ check_auto_cache_resize_epoch_markers(void)
/* Verify that there are no active epoch markers.
*/
- if ( pass ) {
+ if(pass) {
- if ( cache_ptr->epoch_markers_active != 0 ) {
+ if(cache_ptr->epoch_markers_active != 0) {
pass = FALSE;
failure_mssg = "Unexpected # of epoch markers 6.\n";
}
}
- if ( show_progress ) HDfprintf(stderr, "check point %d\n", checkpoint++);
+ if(show_progress) HDfprintf(stderr, "check point %d\n", checkpoint++);
/* build up a full set of epoch markers. */
- if ( pass ) {
+ if(pass) {
j = 1;
- while ( ( pass ) && ( j <= 10 ) )
+ while(pass && (j <= 10))
{
rpt_fcn_called = FALSE;
i = (j - 1) * 1000;
- while ( ( pass ) && ( i < j * 1000 ) )
+ while(pass && (i < j * 1000))
{
protect_entry(file_ptr, SMALL_ENTRY_TYPE, i);
- if ( pass ) {
+ if(pass) {
unprotect_entry(file_ptr, SMALL_ENTRY_TYPE, i, H5C__NO_FLAGS_SET);
}
i++;
}
- if ( ( ! rpt_fcn_called ) ||
- ( rpt_status != in_spec ) ||
- ( cache_ptr->epoch_markers_active != j ) ) {
+ if((!rpt_fcn_called) ||
+ (rpt_status != in_spec) ||
+ (cache_ptr->epoch_markers_active != j)) {
pass = FALSE;
failure_mssg = "Unexpected # of epoch markers 7.\n";
@@ -24820,13 +24682,13 @@ check_auto_cache_resize_epoch_markers(void)
}
}
- if ( show_progress ) HDfprintf(stderr, "check point %d\n", checkpoint++);
+ if(show_progress) HDfprintf(stderr, "check point %d\n", checkpoint++);
/* Verify that there are now 10 active epoch markers.
*/
- if ( pass ) {
+ if(pass) {
- if ( cache_ptr->epoch_markers_active != 10 ) {
+ if(cache_ptr->epoch_markers_active != 10) {
pass = FALSE;
failure_mssg = "Unexpected # of epoch markers 8.\n";
@@ -24836,7 +24698,7 @@ check_auto_cache_resize_epoch_markers(void)
/* shift the decrement mode to off. This should cause all epoch
* markers to be removed.
*/
- if ( pass ) {
+ if(pass) {
auto_size_ctl.version = H5C__CURR_AUTO_SIZE_CTL_VER;
auto_size_ctl.rpt_fcn = test_rpt_fcn;
@@ -24882,7 +24744,7 @@ check_auto_cache_resize_epoch_markers(void)
result = H5C_set_cache_auto_resize_config(cache_ptr, &auto_size_ctl);
- if ( result != SUCCEED ) {
+ if(result != SUCCEED) {
pass = FALSE;
failure_mssg = "H5C_set_cache_auto_resize_config failed 6.\n";
@@ -24891,44 +24753,44 @@ check_auto_cache_resize_epoch_markers(void)
/* Verify that there are now no active epoch markers.
*/
- if ( pass ) {
+ if(pass) {
- if ( cache_ptr->epoch_markers_active != 0 ) {
+ if(cache_ptr->epoch_markers_active != 0) {
pass = FALSE;
failure_mssg = "Unexpected # of epoch markers 9.\n";
}
}
- if ( show_progress ) HDfprintf(stderr, "check point %d\n", checkpoint++);
+ if(show_progress) HDfprintf(stderr, "check point %d\n", checkpoint++);
/* verify that we still have the expected number of entries in the cache,
* and that the cache is of the expected size.
*/
- if ( pass ) {
+ if(pass) {
- if ( ( cache_ptr->max_cache_size != (8 * 1024 * 1024) ) ||
- ( cache_ptr->min_clean_size != (4 * 1024 * 1024) )||
- ( cache_ptr->index_size != (10 * 1000 * SMALL_ENTRY_SIZE) ) ||
- ( cache_ptr->index_len != 10000 ) ) {
+ if((cache_ptr->max_cache_size != (8 * 1024 * 1024)) ||
+ (cache_ptr->min_clean_size != (4 * 1024 * 1024))||
+ (cache_ptr->index_size != (10 * 1000 * SMALL_ENTRY_SIZE)) ||
+ (cache_ptr->index_len != 10000)) {
pass = FALSE;
failure_mssg = "Unexpected cache size change results 3.\n";
}
}
- if ( show_progress ) HDfprintf(stderr, "check point %d\n", checkpoint++);
+ if(show_progress) HDfprintf(stderr, "check point %d\n", checkpoint++);
- if ( pass ) {
+ if(pass) {
takedown_cache(file_ptr, FALSE, FALSE);
}
- if ( show_progress ) HDfprintf(stderr, "check point %d\n", checkpoint++);
+ if(show_progress) HDfprintf(stderr, "check point %d\n", checkpoint++);
- if ( pass ) { PASSED(); } else { H5_FAILED(); }
+ if(pass) { PASSED(); } else { H5_FAILED(); }
- if ( ! pass ) {
+ if(!pass) {
HDfprintf(stdout, "%s: failure_mssg = \"%s\".\n",
FUNC, failure_mssg);
@@ -25025,7 +24887,7 @@ check_auto_cache_resize_input_errs(void)
* and that the configuration is not modified.
*/
- if ( pass ) {
+ if(pass) {
reset_entries();
@@ -25034,46 +24896,46 @@ check_auto_cache_resize_input_errs(void)
cache_ptr = file_ptr->shared->cache;
}
- if ( pass ) {
+ if(pass) {
result = H5C_set_cache_auto_resize_config(cache_ptr, &ref_auto_size_ctl);
- if ( result != SUCCEED ) {
+ if(result != SUCCEED) {
pass = FALSE;
failure_mssg = "H5C_set_cache_auto_resize_config failed 1.\n";
}
}
- if ( pass ) {
+ if(pass) {
- if ( ( cache_ptr->max_cache_size != (512 * 1024) ) ||
- ( cache_ptr->min_clean_size != (256 * 1024) ) ) {
+ if((cache_ptr->max_cache_size != (512 * 1024)) ||
+ (cache_ptr->min_clean_size != (256 * 1024))) {
pass = FALSE;
failure_mssg = "bad cache size after initialization.\n";
}
}
- if ( pass ) {
+ if(pass) {
result = H5C_get_cache_auto_resize_config(cache_ptr,
&test_auto_size_ctl);
- if ( result != SUCCEED ) {
+ if(result != SUCCEED) {
pass = FALSE;
failure_mssg = "H5C_get_cache_auto_resize_config failed 1.";
- } else if ( ! resize_configs_are_equal(&test_auto_size_ctl, \
- &ref_auto_size_ctl, FALSE) ) {
+ } else if(!resize_configs_are_equal(&test_auto_size_ctl, \
+ &ref_auto_size_ctl, FALSE)) {
pass = FALSE;
failure_mssg = "Unexpected auto resize config 1.";
}
}
- if ( pass ) {
+ if(pass) {
invalid_auto_size_ctl.version = H5C__CURR_AUTO_SIZE_CTL_VER;
invalid_auto_size_ctl.rpt_fcn = NULL;
@@ -25119,7 +24981,7 @@ check_auto_cache_resize_input_errs(void)
result = H5C_set_cache_auto_resize_config(NULL, &invalid_auto_size_ctl);
- if ( result != FAIL ) {
+ if(result != FAIL) {
pass = FALSE;
failure_mssg =
@@ -25127,18 +24989,18 @@ check_auto_cache_resize_input_errs(void)
}
}
- if ( pass ) {
+ if(pass) {
result = H5C_get_cache_auto_resize_config(cache_ptr,
&test_auto_size_ctl);
- if ( result != SUCCEED ) {
+ if(result != SUCCEED) {
pass = FALSE;
failure_mssg = "H5C_get_cache_auto_resize_config failed 2.";
- } else if ( ! resize_configs_are_equal(&test_auto_size_ctl, \
- &ref_auto_size_ctl, FALSE) ) {
+ } else if(!resize_configs_are_equal(&test_auto_size_ctl, \
+ &ref_auto_size_ctl, FALSE)) {
pass = FALSE;
failure_mssg = "Unexpected auto resize config 2.";
@@ -25148,7 +25010,7 @@ check_auto_cache_resize_input_errs(void)
/* check bad version rejection. */
- if ( pass ) {
+ if(pass) {
invalid_auto_size_ctl.version = -1; /* INVALID */
invalid_auto_size_ctl.rpt_fcn = NULL;
@@ -25194,7 +25056,7 @@ check_auto_cache_resize_input_errs(void)
result = H5C_set_cache_auto_resize_config(cache_ptr, &invalid_auto_size_ctl);
- if ( result != FAIL ) {
+ if(result != FAIL) {
pass = FALSE;
failure_mssg =
@@ -25202,18 +25064,18 @@ check_auto_cache_resize_input_errs(void)
}
}
- if ( pass ) {
+ if(pass) {
result = H5C_get_cache_auto_resize_config(cache_ptr,
&test_auto_size_ctl);
- if ( result != SUCCEED ) {
+ if(result != SUCCEED) {
pass = FALSE;
failure_mssg = "H5C_get_cache_auto_resize_config failed 3.";
- } else if ( ! resize_configs_are_equal(&test_auto_size_ctl, \
- &ref_auto_size_ctl, FALSE) ) {
+ } else if(!resize_configs_are_equal(&test_auto_size_ctl, \
+ &ref_auto_size_ctl, FALSE)) {
pass = FALSE;
failure_mssg = "Unexpected auto resize config 3.";
@@ -25223,7 +25085,7 @@ check_auto_cache_resize_input_errs(void)
/* check bad initial size rejection */
- if ( pass ) {
+ if(pass) {
invalid_auto_size_ctl.version = H5C__CURR_AUTO_SIZE_CTL_VER;
invalid_auto_size_ctl.rpt_fcn = NULL;
@@ -25270,7 +25132,7 @@ check_auto_cache_resize_input_errs(void)
result = H5C_set_cache_auto_resize_config(cache_ptr, &invalid_auto_size_ctl);
- if ( result != FAIL ) {
+ if(result != FAIL) {
pass = FALSE;
failure_mssg =
@@ -25278,25 +25140,25 @@ check_auto_cache_resize_input_errs(void)
}
}
- if ( pass ) {
+ if(pass) {
result = H5C_get_cache_auto_resize_config(cache_ptr,
&test_auto_size_ctl);
- if ( result != SUCCEED ) {
+ if(result != SUCCEED) {
pass = FALSE;
failure_mssg = "H5C_get_cache_auto_resize_config failed 4.";
- } else if ( ! resize_configs_are_equal(&test_auto_size_ctl, \
- &ref_auto_size_ctl, FALSE) ) {
+ } else if(!resize_configs_are_equal(&test_auto_size_ctl, \
+ &ref_auto_size_ctl, FALSE)) {
pass = FALSE;
failure_mssg = "Unexpected auto resize config 4.";
}
}
- if ( pass ) {
+ if(pass) {
invalid_auto_size_ctl.version = H5C__CURR_AUTO_SIZE_CTL_VER;
invalid_auto_size_ctl.rpt_fcn = NULL;
@@ -25343,7 +25205,7 @@ check_auto_cache_resize_input_errs(void)
result = H5C_set_cache_auto_resize_config(cache_ptr, &invalid_auto_size_ctl);
- if ( result != FAIL ) {
+ if(result != FAIL) {
pass = FALSE;
failure_mssg =
@@ -25351,18 +25213,18 @@ check_auto_cache_resize_input_errs(void)
}
}
- if ( pass ) {
+ if(pass) {
result = H5C_get_cache_auto_resize_config(cache_ptr,
&test_auto_size_ctl);
- if ( result != SUCCEED ) {
+ if(result != SUCCEED) {
pass = FALSE;
failure_mssg = "H5C_get_cache_auto_resize_config failed 5.";
- } else if ( ! resize_configs_are_equal(&test_auto_size_ctl, \
- &ref_auto_size_ctl, FALSE) ) {
+ } else if(!resize_configs_are_equal(&test_auto_size_ctl, \
+ &ref_auto_size_ctl, FALSE)) {
pass = FALSE;
failure_mssg = "Unexpected auto resize config 5.";
@@ -25372,7 +25234,7 @@ check_auto_cache_resize_input_errs(void)
/* test for invalid min clean fraction rejection. */
- if ( pass ) {
+ if(pass) {
invalid_auto_size_ctl.version = H5C__CURR_AUTO_SIZE_CTL_VER;
invalid_auto_size_ctl.rpt_fcn = NULL;
@@ -25418,7 +25280,7 @@ check_auto_cache_resize_input_errs(void)
result = H5C_set_cache_auto_resize_config(cache_ptr, &invalid_auto_size_ctl);
- if ( result != FAIL ) {
+ if(result != FAIL) {
pass = FALSE;
failure_mssg =
@@ -25426,25 +25288,25 @@ check_auto_cache_resize_input_errs(void)
}
}
- if ( pass ) {
+ if(pass) {
result = H5C_get_cache_auto_resize_config(cache_ptr,
&test_auto_size_ctl);
- if ( result != SUCCEED ) {
+ if(result != SUCCEED) {
pass = FALSE;
failure_mssg = "H5C_get_cache_auto_resize_config failed 6.";
- } else if ( ! resize_configs_are_equal(&test_auto_size_ctl, \
- &ref_auto_size_ctl, FALSE) ) {
+ } else if(!resize_configs_are_equal(&test_auto_size_ctl, \
+ &ref_auto_size_ctl, FALSE)) {
pass = FALSE;
failure_mssg = "Unexpected auto resize config 6.";
}
}
- if ( pass ) {
+ if(pass) {
invalid_auto_size_ctl.version = H5C__CURR_AUTO_SIZE_CTL_VER;
invalid_auto_size_ctl.rpt_fcn = NULL;
@@ -25490,7 +25352,7 @@ check_auto_cache_resize_input_errs(void)
result = H5C_set_cache_auto_resize_config(cache_ptr, &invalid_auto_size_ctl);
- if ( result != FAIL ) {
+ if(result != FAIL) {
pass = FALSE;
failure_mssg =
@@ -25498,18 +25360,18 @@ check_auto_cache_resize_input_errs(void)
}
}
- if ( pass ) {
+ if(pass) {
result = H5C_get_cache_auto_resize_config(cache_ptr,
&test_auto_size_ctl);
- if ( result != SUCCEED ) {
+ if(result != SUCCEED) {
pass = FALSE;
failure_mssg = "H5C_get_cache_auto_resize_config failed 7.";
- } else if ( ! resize_configs_are_equal(&test_auto_size_ctl, \
- &ref_auto_size_ctl, FALSE) ) {
+ } else if(!resize_configs_are_equal(&test_auto_size_ctl, \
+ &ref_auto_size_ctl, FALSE)) {
pass = FALSE;
failure_mssg = "Unexpected auto resize config 7.";
@@ -25519,7 +25381,7 @@ check_auto_cache_resize_input_errs(void)
/* test for invalid max_size and/or min_size rejection */
- if ( pass ) {
+ if(pass) {
invalid_auto_size_ctl.version = H5C__CURR_AUTO_SIZE_CTL_VER;
invalid_auto_size_ctl.rpt_fcn = NULL;
@@ -25566,7 +25428,7 @@ check_auto_cache_resize_input_errs(void)
result = H5C_set_cache_auto_resize_config(cache_ptr, &invalid_auto_size_ctl);
- if ( result != FAIL ) {
+ if(result != FAIL) {
pass = FALSE;
failure_mssg =
@@ -25574,25 +25436,25 @@ check_auto_cache_resize_input_errs(void)
}
}
- if ( pass ) {
+ if(pass) {
result = H5C_get_cache_auto_resize_config(cache_ptr,
&test_auto_size_ctl);
- if ( result != SUCCEED ) {
+ if(result != SUCCEED) {
pass = FALSE;
failure_mssg = "H5C_get_cache_auto_resize_config failed 8.";
- } else if ( ! resize_configs_are_equal(&test_auto_size_ctl, \
- &ref_auto_size_ctl, FALSE) ) {
+ } else if(!resize_configs_are_equal(&test_auto_size_ctl, \
+ &ref_auto_size_ctl, FALSE)) {
pass = FALSE;
failure_mssg = "Unexpected auto resize config 8.";
}
}
- if ( pass ) {
+ if(pass) {
invalid_auto_size_ctl.version = H5C__CURR_AUTO_SIZE_CTL_VER;
invalid_auto_size_ctl.rpt_fcn = NULL;
@@ -25638,7 +25500,7 @@ check_auto_cache_resize_input_errs(void)
result = H5C_set_cache_auto_resize_config(cache_ptr, &invalid_auto_size_ctl);
- if ( result != FAIL ) {
+ if(result != FAIL) {
pass = FALSE;
failure_mssg =
@@ -25646,25 +25508,25 @@ check_auto_cache_resize_input_errs(void)
}
}
- if ( pass ) {
+ if(pass) {
result = H5C_get_cache_auto_resize_config(cache_ptr,
&test_auto_size_ctl);
- if ( result != SUCCEED ) {
+ if(result != SUCCEED) {
pass = FALSE;
failure_mssg = "H5C_get_cache_auto_resize_config failed 9.";
- } else if ( ! resize_configs_are_equal(&test_auto_size_ctl, \
- &ref_auto_size_ctl, FALSE) ) {
+ } else if(!resize_configs_are_equal(&test_auto_size_ctl, \
+ &ref_auto_size_ctl, FALSE)) {
pass = FALSE;
failure_mssg = "Unexpected auto resize config 9.";
}
}
- if ( pass ) {
+ if(pass) {
invalid_auto_size_ctl.version = H5C__CURR_AUTO_SIZE_CTL_VER;
invalid_auto_size_ctl.rpt_fcn = NULL;
@@ -25710,7 +25572,7 @@ check_auto_cache_resize_input_errs(void)
result = H5C_set_cache_auto_resize_config(cache_ptr, &invalid_auto_size_ctl);
- if ( result != FAIL ) {
+ if(result != FAIL) {
pass = FALSE;
failure_mssg =
@@ -25718,18 +25580,18 @@ check_auto_cache_resize_input_errs(void)
}
}
- if ( pass ) {
+ if(pass) {
result = H5C_get_cache_auto_resize_config(cache_ptr,
&test_auto_size_ctl);
- if ( result != SUCCEED ) {
+ if(result != SUCCEED) {
pass = FALSE;
failure_mssg = "H5C_get_cache_auto_resize_config failed 10.";
- } else if ( ! resize_configs_are_equal(&test_auto_size_ctl, \
- &ref_auto_size_ctl, FALSE) ) {
+ } else if(!resize_configs_are_equal(&test_auto_size_ctl, \
+ &ref_auto_size_ctl, FALSE)) {
pass = FALSE;
failure_mssg = "Unexpected auto resize config 10.";
@@ -25739,7 +25601,7 @@ check_auto_cache_resize_input_errs(void)
/* test for invalid epoch_length rejection */
- if ( pass ) {
+ if(pass) {
invalid_auto_size_ctl.version = H5C__CURR_AUTO_SIZE_CTL_VER;
invalid_auto_size_ctl.rpt_fcn = NULL;
@@ -25785,7 +25647,7 @@ check_auto_cache_resize_input_errs(void)
result = H5C_set_cache_auto_resize_config(cache_ptr, &invalid_auto_size_ctl);
- if ( result != FAIL ) {
+ if(result != FAIL) {
pass = FALSE;
failure_mssg =
@@ -25793,25 +25655,25 @@ check_auto_cache_resize_input_errs(void)
}
}
- if ( pass ) {
+ if(pass) {
result = H5C_get_cache_auto_resize_config(cache_ptr,
&test_auto_size_ctl);
- if ( result != SUCCEED ) {
+ if(result != SUCCEED) {
pass = FALSE;
failure_mssg = "H5C_get_cache_auto_resize_config failed 11.";
- } else if ( ! resize_configs_are_equal(&test_auto_size_ctl, \
- &ref_auto_size_ctl, FALSE) ) {
+ } else if(!resize_configs_are_equal(&test_auto_size_ctl, \
+ &ref_auto_size_ctl, FALSE)) {
pass = FALSE;
failure_mssg = "Unexpected auto resize config 11.";
}
}
- if ( pass ) {
+ if(pass) {
invalid_auto_size_ctl.version = H5C__CURR_AUTO_SIZE_CTL_VER;
invalid_auto_size_ctl.rpt_fcn = NULL;
@@ -25857,7 +25719,7 @@ check_auto_cache_resize_input_errs(void)
result = H5C_set_cache_auto_resize_config(cache_ptr, &invalid_auto_size_ctl);
- if ( result != FAIL ) {
+ if(result != FAIL) {
pass = FALSE;
failure_mssg =
@@ -25865,18 +25727,18 @@ check_auto_cache_resize_input_errs(void)
}
}
- if ( pass ) {
+ if(pass) {
result = H5C_get_cache_auto_resize_config(cache_ptr,
&test_auto_size_ctl);
- if ( result != SUCCEED ) {
+ if(result != SUCCEED) {
pass = FALSE;
failure_mssg = "H5C_get_cache_auto_resize_config failed 12.";
- } else if ( ! resize_configs_are_equal(&test_auto_size_ctl, \
- &ref_auto_size_ctl, FALSE) ) {
+ } else if(!resize_configs_are_equal(&test_auto_size_ctl, \
+ &ref_auto_size_ctl, FALSE)) {
pass = FALSE;
failure_mssg = "Unexpected auto resize config 12.";
@@ -25886,7 +25748,7 @@ check_auto_cache_resize_input_errs(void)
/* test for bad incr_mode rejection */
- if ( pass ) {
+ if(pass) {
invalid_auto_size_ctl.version = H5C__CURR_AUTO_SIZE_CTL_VER;
invalid_auto_size_ctl.rpt_fcn = NULL;
@@ -25933,7 +25795,7 @@ check_auto_cache_resize_input_errs(void)
result = H5C_set_cache_auto_resize_config(cache_ptr, &invalid_auto_size_ctl);
- if ( result != FAIL ) {
+ if(result != FAIL) {
pass = FALSE;
failure_mssg =
@@ -25941,25 +25803,25 @@ check_auto_cache_resize_input_errs(void)
}
}
- if ( pass ) {
+ if(pass) {
result = H5C_get_cache_auto_resize_config(cache_ptr,
&test_auto_size_ctl);
- if ( result != SUCCEED ) {
+ if(result != SUCCEED) {
pass = FALSE;
failure_mssg = "H5C_get_cache_auto_resize_config failed 13.";
- } else if ( ! resize_configs_are_equal(&test_auto_size_ctl, \
- &ref_auto_size_ctl, FALSE) ) {
+ } else if(!resize_configs_are_equal(&test_auto_size_ctl, \
+ &ref_auto_size_ctl, FALSE)) {
pass = FALSE;
failure_mssg = "Unexpected auto resize config 13.";
}
}
- if ( pass ) {
+ if(pass) {
invalid_auto_size_ctl.version = H5C__CURR_AUTO_SIZE_CTL_VER;
invalid_auto_size_ctl.rpt_fcn = NULL;
@@ -26006,7 +25868,7 @@ check_auto_cache_resize_input_errs(void)
result = H5C_set_cache_auto_resize_config(cache_ptr, &invalid_auto_size_ctl);
- if ( result != FAIL ) {
+ if(result != FAIL) {
pass = FALSE;
failure_mssg =
@@ -26014,18 +25876,18 @@ check_auto_cache_resize_input_errs(void)
}
}
- if ( pass ) {
+ if(pass) {
result = H5C_get_cache_auto_resize_config(cache_ptr,
&test_auto_size_ctl);
- if ( result != SUCCEED ) {
+ if(result != SUCCEED) {
pass = FALSE;
failure_mssg = "H5C_get_cache_auto_resize_config failed 14.";
- } else if ( ! resize_configs_are_equal(&test_auto_size_ctl, \
- &ref_auto_size_ctl, FALSE) ) {
+ } else if(!resize_configs_are_equal(&test_auto_size_ctl, \
+ &ref_auto_size_ctl, FALSE)) {
pass = FALSE;
failure_mssg = "Unexpected auto resize config 14.";
@@ -26035,7 +25897,7 @@ check_auto_cache_resize_input_errs(void)
/* check for bad upper and/or lower threshold rejection */
- if ( pass ) {
+ if(pass) {
invalid_auto_size_ctl.version = H5C__CURR_AUTO_SIZE_CTL_VER;
invalid_auto_size_ctl.rpt_fcn = NULL;
@@ -26081,7 +25943,7 @@ check_auto_cache_resize_input_errs(void)
result = H5C_set_cache_auto_resize_config(cache_ptr, &invalid_auto_size_ctl);
- if ( result != FAIL ) {
+ if(result != FAIL) {
pass = FALSE;
failure_mssg =
@@ -26089,25 +25951,25 @@ check_auto_cache_resize_input_errs(void)
}
}
- if ( pass ) {
+ if(pass) {
result = H5C_get_cache_auto_resize_config(cache_ptr,
&test_auto_size_ctl);
- if ( result != SUCCEED ) {
+ if(result != SUCCEED) {
pass = FALSE;
failure_mssg = "H5C_get_cache_auto_resize_config failed 15.";
- } else if ( ! resize_configs_are_equal(&test_auto_size_ctl, \
- &ref_auto_size_ctl, FALSE) ) {
+ } else if(!resize_configs_are_equal(&test_auto_size_ctl, \
+ &ref_auto_size_ctl, FALSE)) {
pass = FALSE;
failure_mssg = "Unexpected auto resize config 15.";
}
}
- if ( pass ) {
+ if(pass) {
invalid_auto_size_ctl.version = H5C__CURR_AUTO_SIZE_CTL_VER;
invalid_auto_size_ctl.rpt_fcn = NULL;
@@ -26153,7 +26015,7 @@ check_auto_cache_resize_input_errs(void)
result = H5C_set_cache_auto_resize_config(cache_ptr, &invalid_auto_size_ctl);
- if ( result != FAIL ) {
+ if(result != FAIL) {
pass = FALSE;
failure_mssg =
@@ -26161,25 +26023,25 @@ check_auto_cache_resize_input_errs(void)
}
}
- if ( pass ) {
+ if(pass) {
result = H5C_get_cache_auto_resize_config(cache_ptr,
&test_auto_size_ctl);
- if ( result != SUCCEED ) {
+ if(result != SUCCEED) {
pass = FALSE;
failure_mssg = "H5C_get_cache_auto_resize_config failed 16.";
- } else if ( ! resize_configs_are_equal(&test_auto_size_ctl, \
- &ref_auto_size_ctl, FALSE) ) {
+ } else if(!resize_configs_are_equal(&test_auto_size_ctl, \
+ &ref_auto_size_ctl, FALSE)) {
pass = FALSE;
failure_mssg = "Unexpected auto resize config 16.";
}
}
- if ( pass ) {
+ if(pass) {
invalid_auto_size_ctl.version = H5C__CURR_AUTO_SIZE_CTL_VER;
invalid_auto_size_ctl.rpt_fcn = NULL;
@@ -26225,7 +26087,7 @@ check_auto_cache_resize_input_errs(void)
result = H5C_set_cache_auto_resize_config(cache_ptr, &invalid_auto_size_ctl);
- if ( result != FAIL ) {
+ if(result != FAIL) {
pass = FALSE;
failure_mssg =
@@ -26233,18 +26095,18 @@ check_auto_cache_resize_input_errs(void)
}
}
- if ( pass ) {
+ if(pass) {
result = H5C_get_cache_auto_resize_config(cache_ptr,
&test_auto_size_ctl);
- if ( result != SUCCEED ) {
+ if(result != SUCCEED) {
pass = FALSE;
failure_mssg = "H5C_get_cache_auto_resize_config failed 17.";
- } else if ( ! resize_configs_are_equal(&test_auto_size_ctl, \
- &ref_auto_size_ctl, FALSE) ) {
+ } else if(!resize_configs_are_equal(&test_auto_size_ctl, \
+ &ref_auto_size_ctl, FALSE)) {
pass = FALSE;
failure_mssg = "Unexpected auto resize config 17.";
@@ -26254,7 +26116,7 @@ check_auto_cache_resize_input_errs(void)
/* test for bad increment rejection */
- if ( pass ) {
+ if(pass) {
invalid_auto_size_ctl.version = H5C__CURR_AUTO_SIZE_CTL_VER;
invalid_auto_size_ctl.rpt_fcn = NULL;
@@ -26301,7 +26163,7 @@ check_auto_cache_resize_input_errs(void)
result = H5C_set_cache_auto_resize_config(cache_ptr, &invalid_auto_size_ctl);
- if ( result != FAIL ) {
+ if(result != FAIL) {
pass = FALSE;
failure_mssg =
@@ -26309,18 +26171,18 @@ check_auto_cache_resize_input_errs(void)
}
}
- if ( pass ) {
+ if(pass) {
result = H5C_get_cache_auto_resize_config(cache_ptr,
&test_auto_size_ctl);
- if ( result != SUCCEED ) {
+ if(result != SUCCEED) {
pass = FALSE;
failure_mssg = "H5C_get_cache_auto_resize_config failed 18.";
- } else if ( ! resize_configs_are_equal(&test_auto_size_ctl, \
- &ref_auto_size_ctl, FALSE) ) {
+ } else if(!resize_configs_are_equal(&test_auto_size_ctl, \
+ &ref_auto_size_ctl, FALSE)) {
pass = FALSE;
failure_mssg = "Unexpected auto resize config 18.";
@@ -26329,7 +26191,7 @@ check_auto_cache_resize_input_errs(void)
/* test for bad flash_incr_mode rejection */
- if ( pass ) {
+ if(pass) {
invalid_auto_size_ctl.version = H5C__CURR_AUTO_SIZE_CTL_VER;
invalid_auto_size_ctl.rpt_fcn = NULL;
@@ -26376,7 +26238,7 @@ check_auto_cache_resize_input_errs(void)
result = H5C_set_cache_auto_resize_config(cache_ptr, &invalid_auto_size_ctl);
- if ( result != FAIL ) {
+ if(result != FAIL) {
pass = FALSE;
failure_mssg =
@@ -26384,18 +26246,18 @@ check_auto_cache_resize_input_errs(void)
}
}
- if ( pass ) {
+ if(pass) {
result = H5C_get_cache_auto_resize_config(cache_ptr,
&test_auto_size_ctl);
- if ( result != SUCCEED ) {
+ if(result != SUCCEED) {
pass = FALSE;
failure_mssg = "H5C_get_cache_auto_resize_config failed 19.";
- } else if ( ! resize_configs_are_equal(&test_auto_size_ctl, \
- &ref_auto_size_ctl, FALSE) ) {
+ } else if(!resize_configs_are_equal(&test_auto_size_ctl, \
+ &ref_auto_size_ctl, FALSE)) {
pass = FALSE;
failure_mssg = "Unexpected auto resize config 19.";
@@ -26404,7 +26266,7 @@ check_auto_cache_resize_input_errs(void)
/* test for bad flash_multiple rejection */
- if ( pass ) {
+ if(pass) {
invalid_auto_size_ctl.version = H5C__CURR_AUTO_SIZE_CTL_VER;
invalid_auto_size_ctl.rpt_fcn = NULL;
@@ -26451,7 +26313,7 @@ check_auto_cache_resize_input_errs(void)
result = H5C_set_cache_auto_resize_config(cache_ptr, &invalid_auto_size_ctl);
- if ( result != FAIL ) {
+ if(result != FAIL) {
pass = FALSE;
failure_mssg =
@@ -26459,25 +26321,25 @@ check_auto_cache_resize_input_errs(void)
}
}
- if ( pass ) {
+ if(pass) {
result = H5C_get_cache_auto_resize_config(cache_ptr,
&test_auto_size_ctl);
- if ( result != SUCCEED ) {
+ if(result != SUCCEED) {
pass = FALSE;
failure_mssg = "H5C_get_cache_auto_resize_config failed 20.";
- } else if ( ! resize_configs_are_equal(&test_auto_size_ctl, \
- &ref_auto_size_ctl, FALSE) ) {
+ } else if(!resize_configs_are_equal(&test_auto_size_ctl, \
+ &ref_auto_size_ctl, FALSE)) {
pass = FALSE;
failure_mssg = "Unexpected auto resize config 20.";
}
}
- if ( pass ) {
+ if(pass) {
invalid_auto_size_ctl.version = H5C__CURR_AUTO_SIZE_CTL_VER;
invalid_auto_size_ctl.rpt_fcn = NULL;
@@ -26524,7 +26386,7 @@ check_auto_cache_resize_input_errs(void)
result = H5C_set_cache_auto_resize_config(cache_ptr, &invalid_auto_size_ctl);
- if ( result != FAIL ) {
+ if(result != FAIL) {
pass = FALSE;
failure_mssg =
@@ -26532,18 +26394,18 @@ check_auto_cache_resize_input_errs(void)
}
}
- if ( pass ) {
+ if(pass) {
result = H5C_get_cache_auto_resize_config(cache_ptr,
&test_auto_size_ctl);
- if ( result != SUCCEED ) {
+ if(result != SUCCEED) {
pass = FALSE;
failure_mssg = "H5C_get_cache_auto_resize_config failed 21.";
- } else if ( ! resize_configs_are_equal(&test_auto_size_ctl, \
- &ref_auto_size_ctl, FALSE) ) {
+ } else if(!resize_configs_are_equal(&test_auto_size_ctl, \
+ &ref_auto_size_ctl, FALSE)) {
pass = FALSE;
failure_mssg = "Unexpected auto resize config 21.";
@@ -26552,7 +26414,7 @@ check_auto_cache_resize_input_errs(void)
/* test for bad flash_threshold rejection */
- if ( pass ) {
+ if(pass) {
invalid_auto_size_ctl.version = H5C__CURR_AUTO_SIZE_CTL_VER;
invalid_auto_size_ctl.rpt_fcn = NULL;
@@ -26599,7 +26461,7 @@ check_auto_cache_resize_input_errs(void)
result = H5C_set_cache_auto_resize_config(cache_ptr, &invalid_auto_size_ctl);
- if ( result != FAIL ) {
+ if(result != FAIL) {
pass = FALSE;
failure_mssg =
@@ -26607,25 +26469,25 @@ check_auto_cache_resize_input_errs(void)
}
}
- if ( pass ) {
+ if(pass) {
result = H5C_get_cache_auto_resize_config(cache_ptr,
&test_auto_size_ctl);
- if ( result != SUCCEED ) {
+ if(result != SUCCEED) {
pass = FALSE;
failure_mssg = "H5C_get_cache_auto_resize_config failed 22.";
- } else if ( ! resize_configs_are_equal(&test_auto_size_ctl, \
- &ref_auto_size_ctl, FALSE) ) {
+ } else if(!resize_configs_are_equal(&test_auto_size_ctl, \
+ &ref_auto_size_ctl, FALSE)) {
pass = FALSE;
failure_mssg = "Unexpected auto resize config 22.";
}
}
- if ( pass ) {
+ if(pass) {
invalid_auto_size_ctl.version = H5C__CURR_AUTO_SIZE_CTL_VER;
invalid_auto_size_ctl.rpt_fcn = NULL;
@@ -26672,7 +26534,7 @@ check_auto_cache_resize_input_errs(void)
result = H5C_set_cache_auto_resize_config(cache_ptr, &invalid_auto_size_ctl);
- if ( result != FAIL ) {
+ if(result != FAIL) {
pass = FALSE;
failure_mssg =
@@ -26680,18 +26542,18 @@ check_auto_cache_resize_input_errs(void)
}
}
- if ( pass ) {
+ if(pass) {
result = H5C_get_cache_auto_resize_config(cache_ptr,
&test_auto_size_ctl);
- if ( result != SUCCEED ) {
+ if(result != SUCCEED) {
pass = FALSE;
failure_mssg = "H5C_get_cache_auto_resize_config failed 23.";
- } else if ( ! resize_configs_are_equal(&test_auto_size_ctl, \
- &ref_auto_size_ctl, FALSE) ) {
+ } else if(!resize_configs_are_equal(&test_auto_size_ctl, \
+ &ref_auto_size_ctl, FALSE)) {
pass = FALSE;
failure_mssg = "Unexpected auto resize config 23.";
@@ -26701,7 +26563,7 @@ check_auto_cache_resize_input_errs(void)
/* test for bad decr_mode rejection */
- if ( pass ) {
+ if(pass) {
invalid_auto_size_ctl.version = H5C__CURR_AUTO_SIZE_CTL_VER;
invalid_auto_size_ctl.rpt_fcn = NULL;
@@ -26748,7 +26610,7 @@ check_auto_cache_resize_input_errs(void)
result = H5C_set_cache_auto_resize_config(cache_ptr, &invalid_auto_size_ctl);
- if ( result != FAIL ) {
+ if(result != FAIL) {
pass = FALSE;
failure_mssg =
@@ -26756,25 +26618,25 @@ check_auto_cache_resize_input_errs(void)
}
}
- if ( pass ) {
+ if(pass) {
result = H5C_get_cache_auto_resize_config(cache_ptr,
&test_auto_size_ctl);
- if ( result != SUCCEED ) {
+ if(result != SUCCEED) {
pass = FALSE;
failure_mssg = "H5C_get_cache_auto_resize_config failed 24.";
- } else if ( ! resize_configs_are_equal(&test_auto_size_ctl, \
- &ref_auto_size_ctl, FALSE) ) {
+ } else if(!resize_configs_are_equal(&test_auto_size_ctl, \
+ &ref_auto_size_ctl, FALSE)) {
pass = FALSE;
failure_mssg = "Unexpected auto resize config 24.";
}
}
- if ( pass ) {
+ if(pass) {
invalid_auto_size_ctl.version = H5C__CURR_AUTO_SIZE_CTL_VER;
invalid_auto_size_ctl.rpt_fcn = NULL;
@@ -26821,7 +26683,7 @@ check_auto_cache_resize_input_errs(void)
result = H5C_set_cache_auto_resize_config(cache_ptr, &invalid_auto_size_ctl);
- if ( result != FAIL ) {
+ if(result != FAIL) {
pass = FALSE;
failure_mssg =
@@ -26829,18 +26691,18 @@ check_auto_cache_resize_input_errs(void)
}
}
- if ( pass ) {
+ if(pass) {
result = H5C_get_cache_auto_resize_config(cache_ptr,
&test_auto_size_ctl);
- if ( result != SUCCEED ) {
+ if(result != SUCCEED) {
pass = FALSE;
failure_mssg = "H5C_get_cache_auto_resize_config failed 25.";
- } else if ( ! resize_configs_are_equal(&test_auto_size_ctl, \
- &ref_auto_size_ctl, FALSE) ) {
+ } else if(!resize_configs_are_equal(&test_auto_size_ctl, \
+ &ref_auto_size_ctl, FALSE)) {
pass = FALSE;
failure_mssg = "Unexpected auto resize config 25.";
@@ -26850,7 +26712,7 @@ check_auto_cache_resize_input_errs(void)
/* check for bad decrement rejection */
- if ( pass ) {
+ if(pass) {
invalid_auto_size_ctl.version = H5C__CURR_AUTO_SIZE_CTL_VER;
invalid_auto_size_ctl.rpt_fcn = NULL;
@@ -26896,7 +26758,7 @@ check_auto_cache_resize_input_errs(void)
result = H5C_set_cache_auto_resize_config(cache_ptr, &invalid_auto_size_ctl);
- if ( result != FAIL ) {
+ if(result != FAIL) {
pass = FALSE;
failure_mssg =
@@ -26904,25 +26766,25 @@ check_auto_cache_resize_input_errs(void)
}
}
- if ( pass ) {
+ if(pass) {
result = H5C_get_cache_auto_resize_config(cache_ptr,
&test_auto_size_ctl);
- if ( result != SUCCEED ) {
+ if(result != SUCCEED) {
pass = FALSE;
failure_mssg = "H5C_get_cache_auto_resize_config failed 26.";
- } else if ( ! resize_configs_are_equal(&test_auto_size_ctl, \
- &ref_auto_size_ctl, FALSE) ) {
+ } else if(!resize_configs_are_equal(&test_auto_size_ctl, \
+ &ref_auto_size_ctl, FALSE)) {
pass = FALSE;
failure_mssg = "Unexpected auto resize config 26.";
}
}
- if ( pass ) {
+ if(pass) {
invalid_auto_size_ctl.version = H5C__CURR_AUTO_SIZE_CTL_VER;
invalid_auto_size_ctl.rpt_fcn = NULL;
@@ -26968,7 +26830,7 @@ check_auto_cache_resize_input_errs(void)
result = H5C_set_cache_auto_resize_config(cache_ptr, &invalid_auto_size_ctl);
- if ( result != FAIL ) {
+ if(result != FAIL) {
pass = FALSE;
failure_mssg =
@@ -26976,18 +26838,18 @@ check_auto_cache_resize_input_errs(void)
}
}
- if ( pass ) {
+ if(pass) {
result = H5C_get_cache_auto_resize_config(cache_ptr,
&test_auto_size_ctl);
- if ( result != SUCCEED ) {
+ if(result != SUCCEED) {
pass = FALSE;
failure_mssg = "H5C_get_cache_auto_resize_config failed 27.";
- } else if ( ! resize_configs_are_equal(&test_auto_size_ctl, \
- &ref_auto_size_ctl, FALSE) ) {
+ } else if(!resize_configs_are_equal(&test_auto_size_ctl, \
+ &ref_auto_size_ctl, FALSE)) {
pass = FALSE;
failure_mssg = "Unexpected auto resize config 27.";
@@ -26997,7 +26859,7 @@ check_auto_cache_resize_input_errs(void)
/* check for rejection of bad epochs_before_eviction */
- if ( pass ) {
+ if(pass) {
invalid_auto_size_ctl.version = H5C__CURR_AUTO_SIZE_CTL_VER;
invalid_auto_size_ctl.rpt_fcn = NULL;
@@ -27043,32 +26905,32 @@ check_auto_cache_resize_input_errs(void)
result = H5C_set_cache_auto_resize_config(cache_ptr, &invalid_auto_size_ctl);
- if ( result != FAIL ) {
+ if(result != FAIL) {
pass = FALSE;
failure_mssg = "H5C_set_cache_auto_resize_config accepted bad epochs_before_eviction 1.\n";
}
}
- if ( pass ) {
+ if(pass) {
result = H5C_get_cache_auto_resize_config(cache_ptr,
&test_auto_size_ctl);
- if ( result != SUCCEED ) {
+ if(result != SUCCEED) {
pass = FALSE;
failure_mssg = "H5C_get_cache_auto_resize_config failed 28.";
- } else if ( ! resize_configs_are_equal(&test_auto_size_ctl, \
- &ref_auto_size_ctl, FALSE) ) {
+ } else if(!resize_configs_are_equal(&test_auto_size_ctl, \
+ &ref_auto_size_ctl, FALSE)) {
pass = FALSE;
failure_mssg = "Unexpected auto resize config 28.";
}
}
- if ( pass ) {
+ if(pass) {
invalid_auto_size_ctl.version = H5C__CURR_AUTO_SIZE_CTL_VER;
invalid_auto_size_ctl.rpt_fcn = NULL;
@@ -27115,25 +26977,25 @@ check_auto_cache_resize_input_errs(void)
result = H5C_set_cache_auto_resize_config(cache_ptr, &invalid_auto_size_ctl);
- if ( result != FAIL ) {
+ if(result != FAIL) {
pass = FALSE;
failure_mssg = "H5C_set_cache_auto_resize_config accepted bad epochs_before_eviction 2.\n";
}
}
- if ( pass ) {
+ if(pass) {
result = H5C_get_cache_auto_resize_config(cache_ptr,
&test_auto_size_ctl);
- if ( result != SUCCEED ) {
+ if(result != SUCCEED) {
pass = FALSE;
failure_mssg = "H5C_get_cache_auto_resize_config failed 29.";
- } else if ( ! resize_configs_are_equal(&test_auto_size_ctl, \
- &ref_auto_size_ctl, FALSE) ) {
+ } else if(!resize_configs_are_equal(&test_auto_size_ctl, \
+ &ref_auto_size_ctl, FALSE)) {
pass = FALSE;
failure_mssg = "Unexpected auto resize config 29.";
@@ -27143,7 +27005,7 @@ check_auto_cache_resize_input_errs(void)
/* Check for bad apply_empty_reserve rejection */
- if ( pass ) {
+ if(pass) {
invalid_auto_size_ctl.version = H5C__CURR_AUTO_SIZE_CTL_VER;
invalid_auto_size_ctl.rpt_fcn = NULL;
@@ -27189,32 +27051,32 @@ check_auto_cache_resize_input_errs(void)
result = H5C_set_cache_auto_resize_config(cache_ptr, &invalid_auto_size_ctl);
- if ( result != FAIL ) {
+ if(result != FAIL) {
pass = FALSE;
failure_mssg = "H5C_set_cache_auto_resize_config accepted bad empty_reserve 1.\n";
}
}
- if ( pass ) {
+ if(pass) {
result = H5C_get_cache_auto_resize_config(cache_ptr,
&test_auto_size_ctl);
- if ( result != SUCCEED ) {
+ if(result != SUCCEED) {
pass = FALSE;
failure_mssg = "H5C_get_cache_auto_resize_config failed 30.";
- } else if ( ! resize_configs_are_equal(&test_auto_size_ctl, \
- &ref_auto_size_ctl, FALSE) ) {
+ } else if(!resize_configs_are_equal(&test_auto_size_ctl, \
+ &ref_auto_size_ctl, FALSE)) {
pass = FALSE;
failure_mssg = "Unexpected auto resize config 30.";
}
}
- if ( pass ) {
+ if(pass) {
invalid_auto_size_ctl.version = H5C__CURR_AUTO_SIZE_CTL_VER;
invalid_auto_size_ctl.rpt_fcn = NULL;
@@ -27261,25 +27123,25 @@ check_auto_cache_resize_input_errs(void)
result = H5C_set_cache_auto_resize_config(cache_ptr, &invalid_auto_size_ctl);
- if ( result != FAIL ) {
+ if(result != FAIL) {
pass = FALSE;
failure_mssg = "H5C_set_cache_auto_resize_config accepted bad empty_reserve 2.\n";
}
}
- if ( pass ) {
+ if(pass) {
result = H5C_get_cache_auto_resize_config(cache_ptr,
&test_auto_size_ctl);
- if ( result != SUCCEED ) {
+ if(result != SUCCEED) {
pass = FALSE;
failure_mssg = "H5C_get_cache_auto_resize_config failed 31.";
- } else if ( ! resize_configs_are_equal(&test_auto_size_ctl, \
- &ref_auto_size_ctl, FALSE) ) {
+ } else if(!resize_configs_are_equal(&test_auto_size_ctl, \
+ &ref_auto_size_ctl, FALSE)) {
pass = FALSE;
failure_mssg = "Unexpected auto resize config 31.";
@@ -27291,11 +27153,11 @@ check_auto_cache_resize_input_errs(void)
* H5C_get_cache_auto_resize_config invalid data.
*/
- if ( pass ) {
+ if(pass) {
result = H5C_get_cache_auto_resize_config(NULL, &test_auto_size_ctl);
- if ( result != FAIL ) {
+ if(result != FAIL) {
pass = FALSE;
failure_mssg =
@@ -27303,12 +27165,12 @@ check_auto_cache_resize_input_errs(void)
}
}
- if ( pass ) {
+ if(pass) {
result = H5C_get_cache_auto_resize_config((const H5C_t *)&test_auto_size_ctl,
&test_auto_size_ctl);
- if ( result != FAIL ) {
+ if(result != FAIL) {
pass = FALSE;
failure_mssg =
@@ -27316,11 +27178,11 @@ check_auto_cache_resize_input_errs(void)
}
}
- if ( pass ) {
+ if(pass) {
result = H5C_get_cache_auto_resize_config(cache_ptr, NULL);
- if ( result != FAIL ) {
+ if(result != FAIL) {
pass = FALSE;
failure_mssg =
@@ -27328,14 +27190,14 @@ check_auto_cache_resize_input_errs(void)
}
}
- if ( cache_ptr ) {
+ if(cache_ptr) {
takedown_cache(file_ptr, FALSE, FALSE);
}
- if ( pass ) { PASSED(); } else { H5_FAILED(); }
+ if(pass) { PASSED(); } else { H5_FAILED(); }
- if ( ! pass ) {
+ if(!pass) {
HDfprintf(stdout, "%s: failure_mssg = \"%s\".\n",
FUNC, failure_mssg);
@@ -27436,7 +27298,7 @@ check_auto_cache_resize_aux_fcns(void)
/* allocate a cache, and then test the various auxilary functions.
*/
- if ( pass ) {
+ if(pass) {
reset_entries();
@@ -27445,21 +27307,21 @@ check_auto_cache_resize_aux_fcns(void)
cache_ptr = file_ptr->shared->cache;
}
- if ( pass ) {
+ if(pass) {
result = H5C_set_cache_auto_resize_config(cache_ptr, &auto_size_ctl);
- if ( result != SUCCEED ) {
+ if(result != SUCCEED) {
pass = FALSE;
failure_mssg = "H5C_set_cache_auto_resize_config failed 1.\n";
}
}
- if ( pass ) {
+ if(pass) {
- if ( ( cache_ptr->max_cache_size != (1 * 1024 * 1024) ) ||
- ( cache_ptr->min_clean_size != (512 * 1024) ) ) {
+ if((cache_ptr->max_cache_size != (1 * 1024 * 1024)) ||
+ (cache_ptr->min_clean_size != (512 * 1024))) {
pass = FALSE;
failure_mssg = "bad cache size after initialization.\n";
@@ -27470,26 +27332,26 @@ check_auto_cache_resize_aux_fcns(void)
* H5C_reset_cache_hit_rate_stats() pair.
*/
- if ( pass ) {
+ if(pass) {
- if ( ( H5C_get_cache_hit_rate(NULL, &hit_rate) != FAIL ) ||
- ( H5C_get_cache_hit_rate(cache_ptr, NULL) != FAIL ) ) {
+ if((H5C_get_cache_hit_rate(NULL, &hit_rate) != FAIL) ||
+ (H5C_get_cache_hit_rate(cache_ptr, NULL) != FAIL)) {
pass = FALSE;
failure_mssg = "H5C_get_cache_hit_rate accepts bad params.\n";
}
}
- if ( pass ) {
+ if(pass) {
result = H5C_get_cache_hit_rate(cache_ptr, &hit_rate);
- if ( result != SUCCEED ) {
+ if(result != SUCCEED) {
pass = FALSE;
failure_mssg = "H5C_get_cache_hit_rate failed.\n";
- } else if ( !H5_DBL_ABS_EQUAL(hit_rate, (double)0.0f) ) { /* i.e. hit_rate != 0.0 */
+ } else if(!H5_DBL_ABS_EQUAL(hit_rate, (double)0.0f)) { /* i.e. hit_rate != 0.0 */
pass = FALSE;
failure_mssg =
@@ -27497,15 +27359,15 @@ check_auto_cache_resize_aux_fcns(void)
}
}
- if ( pass ) {
+ if(pass) {
rpt_fcn_called = FALSE;
i = 0;
- while ( ( pass ) && ( i < 1000 ) )
+ while(pass && (i < 1000))
{
protect_entry(file_ptr, PICO_ENTRY_TYPE, i);
- if ( pass ) {
+ if(pass) {
unprotect_entry(file_ptr, PICO_ENTRY_TYPE, i, H5C__NO_FLAGS_SET);
}
@@ -27513,28 +27375,28 @@ check_auto_cache_resize_aux_fcns(void)
}
}
- if ( pass ) {
+ if(pass) {
result = H5C_get_cache_hit_rate(cache_ptr, &hit_rate);
- if ( result != SUCCEED ) {
+ if(result != SUCCEED) {
pass = FALSE;
failure_mssg = "H5C_get_cache_hit_rate failed.\n";
- } else if ( !H5_DBL_ABS_EQUAL(hit_rate, (double)0.0f) ) { /* i.e. hit_rate != 0.0 */
+ } else if(!H5_DBL_ABS_EQUAL(hit_rate, (double)0.0f)) { /* i.e. hit_rate != 0.0 */
pass = FALSE;
failure_mssg =
"H5C_get_cache_hit_rate returned unexpected hit rate 2.\n";
- } else if ( ( cache_ptr->cache_accesses != 1000 ) ||
- ( cache_ptr->cache_hits != 0 ) ) {
+ } else if((cache_ptr->cache_accesses != 1000) ||
+ (cache_ptr->cache_hits != 0)) {
pass = FALSE;
failure_mssg = "Unexpected cache hit rate stats.\n";
- } else if ( rpt_fcn_called ) {
+ } else if(rpt_fcn_called) {
pass = FALSE;
failure_mssg = "Report function called?.\n";
@@ -27542,15 +27404,15 @@ check_auto_cache_resize_aux_fcns(void)
}
}
- if ( pass ) {
+ if(pass) {
rpt_fcn_called = FALSE;
i = 0;
- while ( ( pass ) && ( i < 1000 ) )
+ while(pass && (i < 1000))
{
protect_entry(file_ptr, PICO_ENTRY_TYPE, 0);
- if ( pass ) {
+ if(pass) {
unprotect_entry(file_ptr, PICO_ENTRY_TYPE, 0, H5C__NO_FLAGS_SET);
}
@@ -27558,28 +27420,28 @@ check_auto_cache_resize_aux_fcns(void)
}
}
- if ( pass ) {
+ if(pass) {
result = H5C_get_cache_hit_rate(cache_ptr, &hit_rate);
- if ( result != SUCCEED ) {
+ if(result != SUCCEED) {
pass = FALSE;
failure_mssg = "H5C_get_cache_hit_rate failed.\n";
- } else if ( ! H5_DBL_ABS_EQUAL(hit_rate, (double)0.5f) ) { /* i.e. hit_rate != 0.5 */
+ } else if(!H5_DBL_ABS_EQUAL(hit_rate, (double)0.5f)) { /* i.e. hit_rate != 0.5 */
pass = FALSE;
failure_mssg =
"H5C_get_cache_hit_rate returned unexpected hit rate 3.\n";
- } else if ( ( cache_ptr->cache_accesses != 2000 ) ||
- ( cache_ptr->cache_hits != 1000 ) ) {
+ } else if((cache_ptr->cache_accesses != 2000) ||
+ (cache_ptr->cache_hits != 1000)) {
pass = FALSE;
failure_mssg = "Unexpected cache hit rate stats.\n";
- } else if ( rpt_fcn_called ) {
+ } else if(rpt_fcn_called) {
pass = FALSE;
failure_mssg = "Report function called?.\n";
@@ -27587,18 +27449,18 @@ check_auto_cache_resize_aux_fcns(void)
}
}
- if ( pass ) {
+ if(pass) {
result = H5C_reset_cache_hit_rate_stats(NULL);
- if ( result != FAIL ) {
+ if(result != FAIL) {
pass = FALSE;
failure_mssg =
"H5C_reset_cache_hit_rate_stats accepted NULL cache_ptr.\n";
- } else if ( ( cache_ptr->cache_accesses != 2000 ) ||
- ( cache_ptr->cache_hits != 1000 ) ) {
+ } else if((cache_ptr->cache_accesses != 2000) ||
+ (cache_ptr->cache_hits != 1000)) {
pass = FALSE;
failure_mssg =
@@ -27606,17 +27468,17 @@ check_auto_cache_resize_aux_fcns(void)
}
}
- if ( pass ) {
+ if(pass) {
result = H5C_reset_cache_hit_rate_stats(cache_ptr);
- if ( result != SUCCEED ) {
+ if(result != SUCCEED) {
pass = FALSE;
failure_mssg = "H5C_reset_cache_hit_rate_stats failed.\n";
- } else if ( ( cache_ptr->cache_accesses != 0 ) ||
- ( cache_ptr->cache_hits != 0 ) ) {
+ } else if((cache_ptr->cache_accesses != 0) ||
+ (cache_ptr->cache_hits != 0)) {
pass = FALSE;
failure_mssg = "Unexpected cache hit rate stats.\n";
@@ -27624,15 +27486,15 @@ check_auto_cache_resize_aux_fcns(void)
}
}
- if ( pass ) {
+ if(pass) {
rpt_fcn_called = FALSE;
i = 0;
- while ( ( pass ) && ( i < 1000 ) )
+ while(pass && (i < 1000))
{
protect_entry(file_ptr, PICO_ENTRY_TYPE, i + 500);
- if ( pass ) {
+ if(pass) {
unprotect_entry(file_ptr, PICO_ENTRY_TYPE, i + 500, H5C__NO_FLAGS_SET);
}
@@ -27641,28 +27503,28 @@ check_auto_cache_resize_aux_fcns(void)
}
- if ( pass ) {
+ if(pass) {
result = H5C_get_cache_hit_rate(cache_ptr, &hit_rate);
- if ( result != SUCCEED ) {
+ if(result != SUCCEED) {
pass = FALSE;
failure_mssg = "H5C_get_cache_hit_rate failed.\n";
- } else if ( ! H5_DBL_ABS_EQUAL(hit_rate, (double)0.5F) ) { /* i.e. hit_rate != 0.5 */
+ } else if(!H5_DBL_ABS_EQUAL(hit_rate, (double)0.5F)) { /* i.e. hit_rate != 0.5 */
pass = FALSE;
failure_mssg =
"H5C_get_cache_hit_rate returned unexpected hit rate 4.\n";
- } else if ( ( cache_ptr->cache_accesses != 1000 ) ||
- ( cache_ptr->cache_hits != 500 ) ) {
+ } else if((cache_ptr->cache_accesses != 1000) ||
+ (cache_ptr->cache_hits != 500)) {
pass = FALSE;
failure_mssg = "Unexpected cache hit rate stats.\n";
- } else if ( rpt_fcn_called ) {
+ } else if(rpt_fcn_called) {
pass = FALSE;
failure_mssg = "Report function called?.\n";
@@ -27676,19 +27538,19 @@ check_auto_cache_resize_aux_fcns(void)
* H5C_get_cache_size().
***************************************************/
- if ( pass ) {
+ if(pass) {
result = H5C_get_cache_size(NULL, &max_size, &min_clean_size,
&cur_size, &cur_num_entries);
- if ( result != FAIL ) {
+ if(result != FAIL) {
pass = FALSE;
failure_mssg = "H5C_get_cache_size accepted NULL cache_ptr.\n";
}
}
- if ( pass ) {
+ if(pass) {
max_size = 0;
min_clean_size = 0;
@@ -27698,30 +27560,30 @@ check_auto_cache_resize_aux_fcns(void)
result = H5C_get_cache_size(cache_ptr, &max_size, &min_clean_size,
&cur_size, &cur_num_entries);
- if ( result != SUCCEED ) {
+ if(result != SUCCEED) {
pass = FALSE;
failure_mssg = "H5C_get_cache_size failed 1.\n";
- } else if ( max_size != (1 * 1024 * 1024) ) {
+ } else if(max_size != (1 * 1024 * 1024)) {
pass = FALSE;
failure_mssg =
"H5C_get_cache_size reports unexpected max_size 1.\n";
- } else if ( min_clean_size != (512 * 1024) ) {
+ } else if(min_clean_size != (512 * 1024)) {
pass = FALSE;
failure_mssg =
"H5C_get_cache_size reports unexpected min_clean_size 1.\n";
- } else if ( cur_size != (1500 * PICO_ENTRY_SIZE) ) {
+ } else if(cur_size != (1500 * PICO_ENTRY_SIZE)) {
pass = FALSE;
failure_mssg =
"H5C_get_cache_size reports unexpected cur_size 1.\n";
- } else if ( cur_num_entries != 1500 ) {
+ } else if(cur_num_entries != 1500) {
pass = FALSE;
failure_mssg =
@@ -27732,16 +27594,16 @@ check_auto_cache_resize_aux_fcns(void)
/* read a larger entry so that cur_size and cur_num_entries will be
* different.
*/
- if ( pass ) {
+ if(pass) {
protect_entry(file_ptr, MONSTER_ENTRY_TYPE, 0);
}
- if ( pass ) {
+ if(pass) {
unprotect_entry(file_ptr, MONSTER_ENTRY_TYPE, 0, H5C__NO_FLAGS_SET);
}
- if ( pass ) {
+ if(pass) {
max_size = 0;
min_clean_size = 0;
@@ -27751,31 +27613,31 @@ check_auto_cache_resize_aux_fcns(void)
result = H5C_get_cache_size(cache_ptr, &max_size, &min_clean_size,
&cur_size, &cur_num_entries);
- if ( result != SUCCEED ) {
+ if(result != SUCCEED) {
pass = FALSE;
failure_mssg = "H5C_get_cache_size failed 2.\n";
- } else if ( max_size != (1 * 1024 * 1024) ) {
+ } else if(max_size != (1 * 1024 * 1024)) {
pass = FALSE;
failure_mssg =
"H5C_get_cache_size reports unexpected max_size 2.\n";
- } else if ( min_clean_size != (512 * 1024) ) {
+ } else if(min_clean_size != (512 * 1024)) {
pass = FALSE;
failure_mssg =
"H5C_get_cache_size reports unexpected min_clean_size 2.\n";
- } else if ( cur_size !=
- ((1500 * PICO_ENTRY_SIZE) + MONSTER_ENTRY_SIZE) ) {
+ } else if(cur_size !=
+ ((1500 * PICO_ENTRY_SIZE) + MONSTER_ENTRY_SIZE)) {
pass = FALSE;
failure_mssg =
"H5C_get_cache_size reports unexpected cur_size 2.\n";
- } else if ( cur_num_entries != 1501 ) {
+ } else if(cur_num_entries != 1501) {
pass = FALSE;
failure_mssg =
@@ -27783,18 +27645,18 @@ check_auto_cache_resize_aux_fcns(void)
}
}
- if ( pass ) {
+ if(pass) {
max_size = 0;
result = H5C_get_cache_size(cache_ptr, &max_size, NULL, NULL, NULL);
- if ( result != SUCCEED ) {
+ if(result != SUCCEED) {
pass = FALSE;
failure_mssg = "H5C_get_cache_size failed 3.\n";
- } else if ( max_size != (1 * 1024 * 1024) ) {
+ } else if(max_size != (1 * 1024 * 1024)) {
pass = FALSE;
failure_mssg =
@@ -27803,19 +27665,19 @@ check_auto_cache_resize_aux_fcns(void)
}
}
- if ( pass ) {
+ if(pass) {
min_clean_size = 0;
result = H5C_get_cache_size(cache_ptr, NULL, &min_clean_size,
NULL, NULL);
- if ( result != SUCCEED ) {
+ if(result != SUCCEED) {
pass = FALSE;
failure_mssg = "H5C_get_cache_size failed 4.\n";
- } else if ( min_clean_size != (512 * 1024) ) {
+ } else if(min_clean_size != (512 * 1024)) {
pass = FALSE;
failure_mssg =
@@ -27824,19 +27686,19 @@ check_auto_cache_resize_aux_fcns(void)
}
}
- if ( pass ) {
+ if(pass) {
cur_size = 0;
result = H5C_get_cache_size(cache_ptr, NULL, NULL, &cur_size, NULL);
- if ( result != SUCCEED ) {
+ if(result != SUCCEED) {
pass = FALSE;
failure_mssg = "H5C_get_cache_size failed 5.\n";
- } else if ( cur_size !=
- ((1500 * PICO_ENTRY_SIZE) + MONSTER_ENTRY_SIZE) ) {
+ } else if(cur_size !=
+ ((1500 * PICO_ENTRY_SIZE) + MONSTER_ENTRY_SIZE)) {
pass = FALSE;
failure_mssg =
@@ -27845,19 +27707,19 @@ check_auto_cache_resize_aux_fcns(void)
}
}
- if ( pass ) {
+ if(pass) {
cur_num_entries = 0;
result = H5C_get_cache_size(cache_ptr, NULL, NULL, NULL,
&cur_num_entries);
- if ( result != SUCCEED ) {
+ if(result != SUCCEED) {
pass = FALSE;
failure_mssg = "H5C_get_cache_size failed 6.\n";
- } else if ( cur_num_entries != 1501 ) {
+ } else if(cur_num_entries != 1501) {
pass = FALSE;
failure_mssg =
@@ -27866,14 +27728,14 @@ check_auto_cache_resize_aux_fcns(void)
}
}
- if ( cache_ptr ) {
+ if(cache_ptr) {
takedown_cache(file_ptr, FALSE, FALSE);
}
- if ( pass ) { PASSED(); } else { H5_FAILED(); }
+ if(pass) { PASSED(); } else { H5_FAILED(); }
- if ( ! pass ) {
+ if(!pass) {
HDfprintf(stdout, "%s: failure_mssg = \"%s\".\n",
FUNC, failure_mssg);
@@ -28092,7 +27954,7 @@ check_metadata_blizzard_absence(hbool_t fill_via_insertion)
reset_entries();
- if (fill_via_insertion) {
+ if(fill_via_insertion) {
TESTING("to ensure metadata blizzard absence when inserting");
@@ -28101,11 +27963,11 @@ check_metadata_blizzard_absence(hbool_t fill_via_insertion)
TESTING("to ensure metadata blizzard absence on protect/unprotect");
}
- if ( show_progress) /* 0 */
+ if(show_progress) /* 0 */
HDfprintf(stdout, "\n%s: check point %d -- pass %d\n",
FUNC, checkpoint++, pass);
- if ( pass ) {
+ if(pass) {
/* Set up the cache.
*
@@ -28115,7 +27977,7 @@ check_metadata_blizzard_absence(hbool_t fill_via_insertion)
file_ptr = setup_cache((size_t)(50 * entry_size), /* max_cache_size */
(size_t)(25 * entry_size)); /* min_clean_size */
- if ( file_ptr == NULL) {
+ if(file_ptr == NULL) {
pass = FALSE;
failure_mssg = "bad return from cache intialization.\n";
@@ -28125,7 +27987,7 @@ check_metadata_blizzard_absence(hbool_t fill_via_insertion)
cache_ptr = file_ptr->shared->cache;
}
- if ( show_progress) /* 1 */
+ if(show_progress) /* 1 */
HDfprintf(stdout, "%s: check point %d -- pass %d\n",
FUNC, checkpoint++, pass);
@@ -28145,7 +28007,7 @@ check_metadata_blizzard_absence(hbool_t fill_via_insertion)
* ========================================================================
*/
- if ( pass ) {
+ if(pass) {
/* Insert 26 entries (indexes 0 through 25) into the cache.
*
@@ -28158,7 +28020,7 @@ check_metadata_blizzard_absence(hbool_t fill_via_insertion)
for (entry_idx = 0; entry_idx < 26; entry_idx++) {
- if (fill_via_insertion) {
+ if(fill_via_insertion) {
insert_entry(file_ptr, /* H5F_t * file_ptr */
entry_type, /* int32_t type */
entry_idx, /* int32_t idx */
@@ -28189,7 +28051,7 @@ check_metadata_blizzard_absence(hbool_t fill_via_insertion)
}
}
- if ( show_progress) /* 2 */
+ if(show_progress) /* 2 */
HDfprintf(stdout, "%s: check point %d -- pass %d\n",
FUNC, checkpoint++, pass);
@@ -28209,7 +28071,7 @@ check_metadata_blizzard_absence(hbool_t fill_via_insertion)
* ========================================================================
*/
- if ( pass ) {
+ if(pass) {
/* Insert the 27th entry (index = 26) into the cache.
*
@@ -28217,7 +28079,7 @@ check_metadata_blizzard_absence(hbool_t fill_via_insertion)
* before the insertion because it doesn't satisfy the min_clean_size
* constraint.
*/
- if (fill_via_insertion) {
+ if(fill_via_insertion) {
insert_entry(file_ptr, /* H5F_t * file_ptr */
entry_type, /* int32_t type */
entry_idx++, /* int32_t idx */
@@ -28259,11 +28121,11 @@ check_metadata_blizzard_absence(hbool_t fill_via_insertion)
expected); /* expected */
}
- if ( show_progress) /* 3 */
+ if(show_progress) /* 3 */
HDfprintf(stdout, "%s: check point %d -- pass %d\n",
FUNC, checkpoint++, pass);
- if ( pass ) {
+ if(pass) {
/* Insert the 28th entry (index = 27) into the cache.
*
@@ -28271,7 +28133,7 @@ check_metadata_blizzard_absence(hbool_t fill_via_insertion)
* recently used entry before the insertion as it again does not
* satisfy the min_clean_size constraint.
*/
- if (fill_via_insertion) {
+ if(fill_via_insertion) {
insert_entry(file_ptr, /* H5F_t * file_ptr */
entry_type, /* int32_t type */
entry_idx++, /* int32_t idx */
@@ -28313,17 +28175,17 @@ check_metadata_blizzard_absence(hbool_t fill_via_insertion)
expected); /* expected */
}
- if ( show_progress) /* 4 */
+ if(show_progress) /* 4 */
HDfprintf(stdout, "%s: check point %d -- pass %d\n",
FUNC, checkpoint++, pass);
- if ( pass ) {
+ if(pass) {
/* Fill out the rest of the cache with entries */
/* Verify expected status of entries after each insertion */
for (entry_idx = entry_idx; entry_idx < 50; entry_idx++) {
- if (fill_via_insertion) {
+ if(fill_via_insertion) {
insert_entry(file_ptr, /* H5F_t * file_ptr */
entry_type, /* int32_t type */
entry_idx, /* int32_t idx */
@@ -28359,14 +28221,14 @@ check_metadata_blizzard_absence(hbool_t fill_via_insertion)
}
/* Verify that the cache is now full */
- if ( cache_ptr->cache_full != TRUE ) {
+ if(cache_ptr->cache_full != TRUE) {
pass = FALSE;
failure_mssg = "cache not completely filled.\n";
}
}
- if ( show_progress) /* 5 */
+ if(show_progress) /* 5 */
HDfprintf(stdout, "%s: check point %d -- pass %d\n",
FUNC, checkpoint++, pass);
@@ -28388,14 +28250,14 @@ check_metadata_blizzard_absence(hbool_t fill_via_insertion)
* ========================================================================
*/
- if ( pass ) {
+ if(pass) {
/* Insert the 51st entry (index = 50) into the cache.
*
* The cache is full prior to the insertion, so it will
* have to evict in order to make room for the new entry.
*/
- if (fill_via_insertion) {
+ if(fill_via_insertion) {
insert_entry(file_ptr, /* H5F_t * file_ptr */
entry_type, /* int32_t type */
entry_idx++, /* int32_t idx */
@@ -28441,12 +28303,12 @@ check_metadata_blizzard_absence(hbool_t fill_via_insertion)
expected); /* expected */
}
- if ( show_progress) /* 6 */
+ if(show_progress) /* 6 */
HDfprintf(stdout, "%s: check point %d -- pass %d\n",
FUNC, checkpoint++, pass);
- if ( pass ) {
+ if(pass) {
/* Insert 49 more entries (indices 51-99) into the cache.
*
@@ -28458,7 +28320,7 @@ check_metadata_blizzard_absence(hbool_t fill_via_insertion)
*/
for (entry_idx = entry_idx; entry_idx < 100; entry_idx++) {
- if (fill_via_insertion) {
+ if(fill_via_insertion) {
insert_entry(file_ptr, /* H5F_t * file_ptr */
entry_type, /* int32_t type */
entry_idx, /* int32_t idx */
@@ -28487,7 +28349,7 @@ check_metadata_blizzard_absence(hbool_t fill_via_insertion)
* insertions in this loop, then the insertion will
* have resulted in a flush of the entry inserted
* 25 insertions ago. */
- if (entry_idx < 75) {
+ if(entry_idx < 75) {
expected[entry_idx - 25].is_dirty = FALSE;
expected[entry_idx - 25].serialized = TRUE;
@@ -28513,7 +28375,7 @@ check_metadata_blizzard_absence(hbool_t fill_via_insertion)
}
}
- if ( show_progress) /* 7 */
+ if(show_progress) /* 7 */
HDfprintf(stdout, "%s: check point %d -- pass %d\n",
FUNC, checkpoint++, pass);
@@ -28538,7 +28400,7 @@ check_metadata_blizzard_absence(hbool_t fill_via_insertion)
* ========================================================================
*/
- if ( pass ) {
+ if(pass) {
/* Flush the cache.
*
@@ -28573,11 +28435,11 @@ check_metadata_blizzard_absence(hbool_t fill_via_insertion)
expected); /* expected */
}
- if ( show_progress) /* 8 */
+ if(show_progress) /* 8 */
HDfprintf(stdout, "%s: check point %d -- pass %d\n",
FUNC, checkpoint++, pass);
- if ( pass ) {
+ if(pass) {
/* Insert 26 entries (indexes 100 through 125) into the cache.
*
@@ -28588,7 +28450,7 @@ check_metadata_blizzard_absence(hbool_t fill_via_insertion)
for (entry_idx = 100; entry_idx < 126; entry_idx++) {
- if (fill_via_insertion) {
+ if(fill_via_insertion) {
insert_entry(file_ptr, /* H5F_t * file_ptr */
entry_type, /* int32_t type */
entry_idx, /* int32_t idx */
@@ -28622,14 +28484,14 @@ check_metadata_blizzard_absence(hbool_t fill_via_insertion)
}
}
- if ( show_progress) /* 9 */
+ if(show_progress) /* 9 */
HDfprintf(stdout, "%s: check point %d -- pass %d\n",
FUNC, checkpoint++, pass);
- if ( pass ) {
+ if(pass) {
/* Insert the 127th entry (index = 126) into the cache. */
- if (fill_via_insertion) {
+ if(fill_via_insertion) {
insert_entry(file_ptr, /* H5F_t * file_ptr */
entry_type, /* int32_t type */
entry_idx++, /* int32_t idx */
@@ -28673,16 +28535,16 @@ check_metadata_blizzard_absence(hbool_t fill_via_insertion)
expected); /* expected */
}
- if ( show_progress) /* 10 */
+ if(show_progress) /* 10 */
HDfprintf(stdout, "%s: check point %d -- pass %d\n",
FUNC, checkpoint++, pass);
- if ( pass ) {
+ if(pass) {
/* Insert entries w/ indices 127 through 149 into the cache */
for (entry_idx = 127; entry_idx < 150; entry_idx++) {
- if (fill_via_insertion) {
+ if(fill_via_insertion) {
insert_entry(file_ptr, /* H5F_t * file_ptr */
entry_type, /* int32_t type */
entry_idx, /* int32_t idx */
@@ -28721,22 +28583,22 @@ check_metadata_blizzard_absence(hbool_t fill_via_insertion)
}
- if ( show_progress) /* 11 */
+ if(show_progress) /* 11 */
HDfprintf(stdout, "%s: check point %d -- pass %d\n",
FUNC, checkpoint++, pass);
- if ( cache_ptr ) {
+ if(cache_ptr) {
/* We're done with testing. We can take down the cache. */
takedown_cache(file_ptr, FALSE, FALSE);
reset_entries();
}
- if ( show_progress) /* 12 */
+ if(show_progress) /* 12 */
HDfprintf(stdout, "%s: check point %d -- pass %d\n",
FUNC, checkpoint++, pass);
- if ( pass ) { PASSED(); } else { H5_FAILED(); }
+ if(pass) { PASSED(); } else { H5_FAILED(); }
return (unsigned)!pass;
@@ -28788,12 +28650,12 @@ check_flush_deps(void)
cache_ptr = file_ptr->shared->cache;
base_addr = entries[entry_type];
- if ( !pass ) CACHE_ERROR("setup_cache failed")
+ if(!pass) CACHE_ERROR("setup_cache failed")
/* Insert entries to work with into the cache */
for(u = 0; u < 5; u++) {
insert_entry(file_ptr, entry_type, (int32_t)u, H5C__NO_FLAGS_SET);
- if ( !pass ) CACHE_ERROR("insert_entry failed")
+ if(!pass) CACHE_ERROR("insert_entry failed")
/* Change expected values, and verify the status of the entries
* after each insertion
@@ -28806,7 +28668,7 @@ check_flush_deps(void)
(int)u, /* int tag */
(int)5, /* int num_entries */
expected); /* struct expected_entry_staus[] */
- if ( !pass ) CACHE_ERROR("verify_entry_status failed")
+ if(!pass) CACHE_ERROR("verify_entry_status failed")
} /* end for */
/* Test Case #1 - Single flush dependency relationship */
@@ -28817,7 +28679,7 @@ check_flush_deps(void)
test_entry_t * entry_ptr;
protect_entry(file_ptr, entry_type, 1);
- if ( !pass ) CACHE_ERROR("protect_entry failed")
+ if(!pass) CACHE_ERROR("protect_entry failed")
/* Check the parent's entry status */
entry_ptr = &(base_addr[1]);
@@ -28836,7 +28698,7 @@ check_flush_deps(void)
CACHE_ERROR("invalid entry status")
create_flush_dependency(entry_type, 1, entry_type, 0);
- if ( !pass ) CACHE_ERROR("create_flush_dependency failed")
+ if(!pass) CACHE_ERROR("create_flush_dependency failed")
/* Check the parent's entry status */
entry_ptr = &(base_addr[1]);
@@ -28870,19 +28732,19 @@ check_flush_deps(void)
(int)0, /* int tag */
(int)5, /* int num_entries */
expected); /* struct expected_entry_staus[] */
- if ( !pass ) CACHE_ERROR("verify_entry_status failed")
+ if(!pass) CACHE_ERROR("verify_entry_status failed")
}
/* Destroy flush dependency between entries 0 (child) & 1 (parent) */
{
destroy_flush_dependency(entry_type, 1, entry_type, 0);
- if ( !pass ) CACHE_ERROR("destroy_flush_dependency failed")
+ if(!pass) CACHE_ERROR("destroy_flush_dependency failed")
unprotect_entry(file_ptr, /* H5F_t * file_ptr */
entry_type, /* int32_t type */
1, /* int32_t idx */
H5C__NO_FLAGS_SET); /* unsigned int flags */
- if ( !pass ) CACHE_ERROR("unprotect_entry failed")
+ if(!pass) CACHE_ERROR("unprotect_entry failed")
/* Change expected values, and verify the status of the entries
* after destroy flush dependency
@@ -28898,7 +28760,7 @@ check_flush_deps(void)
(int)0, /* int tag */
(int)5, /* int num_entries */
expected); /* struct expected_entry_staus[] */
- if ( !pass ) CACHE_ERROR("verify_entry_status failed")
+ if(!pass) CACHE_ERROR("verify_entry_status failed")
}
/* Test Case #2 - Multiple children for one parent flush dependency relationship */
@@ -28906,13 +28768,13 @@ check_flush_deps(void)
/* Create flush dependency between entries 0, 1 (children) & 2 (parent) */
{
protect_entry(file_ptr, entry_type, 2);
- if ( !pass ) CACHE_ERROR("protect_entry failed")
+ if(!pass) CACHE_ERROR("protect_entry failed")
create_flush_dependency(entry_type, 2, entry_type, 0);
- if ( !pass ) CACHE_ERROR("create_flush_dependency failed")
+ if(!pass) CACHE_ERROR("create_flush_dependency failed")
create_flush_dependency(entry_type, 2, entry_type, 1);
- if ( !pass ) CACHE_ERROR("create_flush_dependency failed")
+ if(!pass) CACHE_ERROR("create_flush_dependency failed")
/* Change expected values, and verify the status of the entries
* after creating flush dependency
@@ -28933,22 +28795,22 @@ check_flush_deps(void)
(int)0, /* int tag */
(int)5, /* int num_entries */
expected); /* struct expected_entry_staus[] */
- if ( !pass ) CACHE_ERROR("verify_entry_status failed")
+ if(!pass) CACHE_ERROR("verify_entry_status failed")
}
/* Destroy flush dependency between entries 0, 1 (children) & 2 (parent) */
{
destroy_flush_dependency(entry_type, 2, entry_type, 0);
- if ( !pass ) CACHE_ERROR("destroy_flush_dependency failed")
+ if(!pass) CACHE_ERROR("destroy_flush_dependency failed")
destroy_flush_dependency(entry_type, 2, entry_type, 1);
- if ( !pass ) CACHE_ERROR("destroy_flush_dependency failed")
+ if(!pass) CACHE_ERROR("destroy_flush_dependency failed")
unprotect_entry(file_ptr, /* H5F_t * file_ptr */
entry_type, /* int32_t type */
2, /* int32_t idx */
H5C__NO_FLAGS_SET); /* unsigned int flags */
- if ( !pass ) CACHE_ERROR("unprotect_entry failed")
+ if(!pass) CACHE_ERROR("unprotect_entry failed")
/* Change expected values, and verify the status of the entries
* after destroy flush dependency
@@ -28965,7 +28827,7 @@ check_flush_deps(void)
(int)0, /* int tag */
(int)5, /* int num_entries */
expected); /* struct expected_entry_staus[] */
- if ( !pass ) CACHE_ERROR("verify_entry_status failed")
+ if(!pass) CACHE_ERROR("verify_entry_status failed")
}
/* Test Case #3a1 - Single chain of flush dependencies, 4 entries tall
@@ -28975,10 +28837,10 @@ check_flush_deps(void)
/* Create flush dependency between entries (child) 0->1->2->3 (parent) */
{
protect_entry(file_ptr, entry_type, 1);
- if ( !pass ) CACHE_ERROR("protect_entry failed")
+ if(!pass) CACHE_ERROR("protect_entry failed")
create_flush_dependency(entry_type, 1, entry_type, 0);
- if ( !pass ) CACHE_ERROR("create_flush_dependency failed")
+ if(!pass) CACHE_ERROR("create_flush_dependency failed")
/* Change expected values, and verify the status of the entries
* after creating flush dependency
@@ -28996,13 +28858,13 @@ check_flush_deps(void)
(int)0, /* int tag */
(int)5, /* int num_entries */
expected); /* struct expected_entry_staus[] */
- if ( !pass ) CACHE_ERROR("verify_entry_status failed")
+ if(!pass) CACHE_ERROR("verify_entry_status failed")
protect_entry(file_ptr, entry_type, 2);
- if ( !pass ) CACHE_ERROR("protect_entry failed")
+ if(!pass) CACHE_ERROR("protect_entry failed")
create_flush_dependency(entry_type, 2, entry_type, 1);
- if ( !pass ) CACHE_ERROR("create_flush_dependency failed")
+ if(!pass) CACHE_ERROR("create_flush_dependency failed")
/* Change expected values, and verify the status of the entries
* after creating flush dependency
@@ -29020,13 +28882,13 @@ check_flush_deps(void)
(int)0, /* int tag */
(int)5, /* int num_entries */
expected); /* struct expected_entry_staus[] */
- if ( !pass ) CACHE_ERROR("verify_entry_status failed")
+ if(!pass) CACHE_ERROR("verify_entry_status failed")
protect_entry(file_ptr, entry_type, 3);
- if ( !pass ) CACHE_ERROR("protect_entry failed")
+ if(!pass) CACHE_ERROR("protect_entry failed")
create_flush_dependency(entry_type, 3, entry_type, 2);
- if ( !pass ) CACHE_ERROR("create_flush_dependency failed")
+ if(!pass) CACHE_ERROR("create_flush_dependency failed")
/* Change expected values, and verify the status of the entries
* after creating flush dependency
@@ -29044,19 +28906,19 @@ check_flush_deps(void)
(int)0, /* int tag */
(int)5, /* int num_entries */
expected); /* struct expected_entry_staus[] */
- if ( !pass ) CACHE_ERROR("verify_entry_status failed")
+ if(!pass) CACHE_ERROR("verify_entry_status failed")
}
/* Destroy flush dependency between entries, from the "top down" */
{
destroy_flush_dependency(entry_type, 3, entry_type, 2);
- if ( !pass ) CACHE_ERROR("destroy_flush_dependency failed")
+ if(!pass) CACHE_ERROR("destroy_flush_dependency failed")
unprotect_entry(file_ptr, /* H5F_t * file_ptr */
entry_type, /* int32_t type */
3, /* int32_t idx */
H5C__NO_FLAGS_SET); /* unsigned int flags */
- if ( !pass ) CACHE_ERROR("unprotect_entry failed")
+ if(!pass) CACHE_ERROR("unprotect_entry failed")
/* Change expected values, and verify the status of the entries
* after destroying flush dependency
@@ -29072,16 +28934,16 @@ check_flush_deps(void)
(int)0, /* int tag */
(int)5, /* int num_entries */
expected); /* struct expected_entry_staus[] */
- if ( !pass ) CACHE_ERROR("verify_entry_status failed")
+ if(!pass) CACHE_ERROR("verify_entry_status failed")
destroy_flush_dependency(entry_type, 2, entry_type, 1);
- if ( !pass ) CACHE_ERROR("destroy_flush_dependency failed")
+ if(!pass) CACHE_ERROR("destroy_flush_dependency failed")
unprotect_entry(file_ptr, /* H5F_t * file_ptr */
entry_type, /* int32_t type */
2, /* int32_t idx */
H5C__NO_FLAGS_SET); /* unsigned int flags */
- if ( !pass ) CACHE_ERROR("unprotect_entry failed")
+ if(!pass) CACHE_ERROR("unprotect_entry failed")
/* Change expected values, and verify the status of the entries
* after destroying flush dependency
@@ -29097,16 +28959,16 @@ check_flush_deps(void)
(int)0, /* int tag */
(int)5, /* int num_entries */
expected); /* struct expected_entry_staus[] */
- if ( !pass ) CACHE_ERROR("verify_entry_status failed")
+ if(!pass) CACHE_ERROR("verify_entry_status failed")
destroy_flush_dependency(entry_type, 1, entry_type, 0);
- if ( !pass ) CACHE_ERROR("destroy_flush_dependency failed")
+ if(!pass) CACHE_ERROR("destroy_flush_dependency failed")
unprotect_entry(file_ptr, /* H5F_t * file_ptr */
entry_type, /* int32_t type */
1, /* int32_t idx */
H5C__NO_FLAGS_SET); /* unsigned int flags */
- if ( !pass ) CACHE_ERROR("unprotect_entry failed")
+ if(!pass) CACHE_ERROR("unprotect_entry failed")
/* Change expected values, and verify the status of the entries
* after destroying flush dependency
@@ -29122,7 +28984,7 @@ check_flush_deps(void)
(int)0, /* int tag */
(int)5, /* int num_entries */
expected); /* struct expected_entry_staus[] */
- if ( !pass ) CACHE_ERROR("verify_entry_status failed")
+ if(!pass) CACHE_ERROR("verify_entry_status failed")
}
/* Test Case #3a2 - Single chain of flush dependencies, 4 entries tall
@@ -29132,10 +28994,10 @@ check_flush_deps(void)
/* Create flush dependency between entries (child) 0->1->2->3 (parent) */
{
protect_entry(file_ptr, entry_type, 1);
- if ( !pass ) CACHE_ERROR("protect_entry failed")
+ if(!pass) CACHE_ERROR("protect_entry failed")
create_flush_dependency(entry_type, 1, entry_type, 0);
- if ( !pass ) CACHE_ERROR("create_flush_dependency failed")
+ if(!pass) CACHE_ERROR("create_flush_dependency failed")
/* Change expected values, and verify the status of the entries
* after creating flush dependency
@@ -29153,13 +29015,13 @@ check_flush_deps(void)
(int)0, /* int tag */
(int)5, /* int num_entries */
expected); /* struct expected_entry_staus[] */
- if ( !pass ) CACHE_ERROR("verify_entry_status failed")
+ if(!pass) CACHE_ERROR("verify_entry_status failed")
protect_entry(file_ptr, entry_type, 2);
- if ( !pass ) CACHE_ERROR("protect_entry failed")
+ if(!pass) CACHE_ERROR("protect_entry failed")
create_flush_dependency(entry_type, 2, entry_type, 1);
- if ( !pass ) CACHE_ERROR("create_flush_dependency failed")
+ if(!pass) CACHE_ERROR("create_flush_dependency failed")
/* Change expected values, and verify the status of the entries
* after creating flush dependency
@@ -29177,13 +29039,13 @@ check_flush_deps(void)
(int)0, /* int tag */
(int)5, /* int num_entries */
expected); /* struct expected_entry_staus[] */
- if ( !pass ) CACHE_ERROR("verify_entry_status failed")
+ if(!pass) CACHE_ERROR("verify_entry_status failed")
protect_entry(file_ptr, entry_type, 3);
- if ( !pass ) CACHE_ERROR("protect_entry failed")
+ if(!pass) CACHE_ERROR("protect_entry failed")
create_flush_dependency(entry_type, 3, entry_type, 2);
- if ( !pass ) CACHE_ERROR("create_flush_dependency failed")
+ if(!pass) CACHE_ERROR("create_flush_dependency failed")
/* Change expected values, and verify the status of the entries
* after creating flush dependency
@@ -29201,19 +29063,19 @@ check_flush_deps(void)
(int)0, /* int tag */
(int)5, /* int num_entries */
expected); /* struct expected_entry_staus[] */
- if ( !pass ) CACHE_ERROR("verify_entry_status failed")
+ if(!pass) CACHE_ERROR("verify_entry_status failed")
}
/* Destroy flush dependency between entries, from the "bottom up" */
{
destroy_flush_dependency(entry_type, 1, entry_type, 0);
- if ( !pass ) CACHE_ERROR("destroy_flush_dependency failed")
+ if(!pass) CACHE_ERROR("destroy_flush_dependency failed")
unprotect_entry(file_ptr, /* H5F_t * file_ptr */
entry_type, /* int32_t type */
1, /* int32_t idx */
H5C__NO_FLAGS_SET); /* unsigned int flags */
- if ( !pass ) CACHE_ERROR("unprotect_entry failed")
+ if(!pass) CACHE_ERROR("unprotect_entry failed")
/* Change expected values, and verify the status of the entries
* after destroying flush dependency
@@ -29229,16 +29091,16 @@ check_flush_deps(void)
(int)0, /* int tag */
(int)5, /* int num_entries */
expected); /* struct expected_entry_staus[] */
- if ( !pass ) CACHE_ERROR("verify_entry_status failed")
+ if(!pass) CACHE_ERROR("verify_entry_status failed")
destroy_flush_dependency(entry_type, 2, entry_type, 1);
- if ( !pass ) CACHE_ERROR("destroy_flush_dependency failed")
+ if(!pass) CACHE_ERROR("destroy_flush_dependency failed")
unprotect_entry(file_ptr, /* H5F_t * file_ptr */
entry_type, /* int32_t type */
2, /* int32_t idx */
H5C__NO_FLAGS_SET); /* unsigned int flags */
- if ( !pass ) CACHE_ERROR("unprotect_entry failed")
+ if(!pass) CACHE_ERROR("unprotect_entry failed")
/* Change expected values, and verify the status of the entries
* after destroying flush dependency
@@ -29254,16 +29116,16 @@ check_flush_deps(void)
(int)0, /* int tag */
(int)5, /* int num_entries */
expected); /* struct expected_entry_staus[] */
- if ( !pass ) CACHE_ERROR("verify_entry_status failed")
+ if(!pass) CACHE_ERROR("verify_entry_status failed")
destroy_flush_dependency(entry_type, 3, entry_type, 2);
- if ( !pass ) CACHE_ERROR("destroy_flush_dependency failed")
+ if(!pass) CACHE_ERROR("destroy_flush_dependency failed")
unprotect_entry(file_ptr, /* H5F_t * file_ptr */
entry_type, /* int32_t type */
3, /* int32_t idx */
H5C__NO_FLAGS_SET); /* unsigned int flags */
- if ( !pass ) CACHE_ERROR("unprotect_entry failed")
+ if(!pass) CACHE_ERROR("unprotect_entry failed")
/* Change expected values, and verify the status of the entries
* after destroying flush dependency
@@ -29279,7 +29141,7 @@ check_flush_deps(void)
(int)0, /* int tag */
(int)5, /* int num_entries */
expected); /* struct expected_entry_staus[] */
- if ( !pass ) CACHE_ERROR("verify_entry_status failed")
+ if(!pass) CACHE_ERROR("verify_entry_status failed")
}
/* Test Case #3b1 - Single chain of flush dependencies, 4 entries tall
@@ -29289,10 +29151,10 @@ check_flush_deps(void)
/* Create flush dependency between entries (child) 0->1->2->3 (parent) */
{
protect_entry(file_ptr, entry_type, 3);
- if ( !pass ) CACHE_ERROR("protect_entry failed")
+ if(!pass) CACHE_ERROR("protect_entry failed")
create_flush_dependency(entry_type, 3, entry_type, 2);
- if ( !pass ) CACHE_ERROR("create_flush_dependency failed")
+ if(!pass) CACHE_ERROR("create_flush_dependency failed")
/* Change expected values, and verify the status of the entries
* after creating flush dependency
@@ -29310,13 +29172,13 @@ check_flush_deps(void)
(int)0, /* int tag */
(int)5, /* int num_entries */
expected); /* struct expected_entry_staus[] */
- if ( !pass ) CACHE_ERROR("verify_entry_status failed")
+ if(!pass) CACHE_ERROR("verify_entry_status failed")
protect_entry(file_ptr, entry_type, 2);
- if ( !pass ) CACHE_ERROR("protect_entry failed")
+ if(!pass) CACHE_ERROR("protect_entry failed")
create_flush_dependency(entry_type, 2, entry_type, 1);
- if ( !pass ) CACHE_ERROR("create_flush_dependency failed")
+ if(!pass) CACHE_ERROR("create_flush_dependency failed")
/* Change expected values, and verify the status of the entries
* after creating flush dependency
@@ -29334,13 +29196,13 @@ check_flush_deps(void)
(int)0, /* int tag */
(int)5, /* int num_entries */
expected); /* struct expected_entry_staus[] */
- if ( !pass ) CACHE_ERROR("verify_entry_status failed")
+ if(!pass) CACHE_ERROR("verify_entry_status failed")
protect_entry(file_ptr, entry_type, 1);
- if ( !pass ) CACHE_ERROR("protect_entry failed")
+ if(!pass) CACHE_ERROR("protect_entry failed")
create_flush_dependency(entry_type, 1, entry_type, 0);
- if ( !pass ) CACHE_ERROR("create_flush_dependency failed")
+ if(!pass) CACHE_ERROR("create_flush_dependency failed")
/* Change expected values, and verify the status of the entries
* after creating flush dependency
@@ -29358,19 +29220,19 @@ check_flush_deps(void)
(int)0, /* int tag */
(int)5, /* int num_entries */
expected); /* struct expected_entry_staus[] */
- if ( !pass ) CACHE_ERROR("verify_entry_status failed")
+ if(!pass) CACHE_ERROR("verify_entry_status failed")
}
/* Destroy flush dependency between entries, from the "top down" */
{
destroy_flush_dependency(entry_type, 3, entry_type, 2);
- if ( !pass ) CACHE_ERROR("destroy_flush_dependency failed")
+ if(!pass) CACHE_ERROR("destroy_flush_dependency failed")
unprotect_entry(file_ptr, /* H5F_t * file_ptr */
entry_type, /* int32_t type */
3, /* int32_t idx */
H5C__NO_FLAGS_SET); /* unsigned int flags */
- if ( !pass ) CACHE_ERROR("unprotect_entry failed")
+ if(!pass) CACHE_ERROR("unprotect_entry failed")
/* Change expected values, and verify the status of the entries
* after destroying flush dependency
@@ -29386,16 +29248,16 @@ check_flush_deps(void)
(int)0, /* int tag */
(int)5, /* int num_entries */
expected); /* struct expected_entry_staus[] */
- if ( !pass ) CACHE_ERROR("verify_entry_status failed")
+ if(!pass) CACHE_ERROR("verify_entry_status failed")
destroy_flush_dependency(entry_type, 2, entry_type, 1);
- if ( !pass ) CACHE_ERROR("destroy_flush_dependency failed")
+ if(!pass) CACHE_ERROR("destroy_flush_dependency failed")
unprotect_entry(file_ptr, /* H5F_t * file_ptr */
entry_type, /* int32_t type */
2, /* int32_t idx */
H5C__NO_FLAGS_SET); /* unsigned int flags */
- if ( !pass ) CACHE_ERROR("unprotect_entry failed")
+ if(!pass) CACHE_ERROR("unprotect_entry failed")
/* Change expected values, and verify the status of the entries
* after destroying flush dependency
@@ -29411,16 +29273,16 @@ check_flush_deps(void)
(int)0, /* int tag */
(int)5, /* int num_entries */
expected); /* struct expected_entry_staus[] */
- if ( !pass ) CACHE_ERROR("verify_entry_status failed")
+ if(!pass) CACHE_ERROR("verify_entry_status failed")
destroy_flush_dependency(entry_type, 1, entry_type, 0);
- if ( !pass ) CACHE_ERROR("destroy_flush_dependency failed")
+ if(!pass) CACHE_ERROR("destroy_flush_dependency failed")
unprotect_entry(file_ptr, /* H5F_t * file_ptr */
entry_type, /* int32_t type */
1, /* int32_t idx */
H5C__NO_FLAGS_SET); /* unsigned int flags */
- if ( !pass ) CACHE_ERROR("unprotect_entry failed")
+ if(!pass) CACHE_ERROR("unprotect_entry failed")
/* Change expected values, and verify the status of the entries
* after destroying flush dependency
@@ -29436,7 +29298,7 @@ check_flush_deps(void)
(int)0, /* int tag */
(int)5, /* int num_entries */
expected); /* struct expected_entry_staus[] */
- if ( !pass ) CACHE_ERROR("verify_entry_status failed")
+ if(!pass) CACHE_ERROR("verify_entry_status failed")
}
/* Test Case #3b2 - Single chain of flush dependencies, 4 entries tall
@@ -29446,10 +29308,10 @@ check_flush_deps(void)
/* Create flush dependency between entries (child) 0->1->2->3 (parent) */
{
protect_entry(file_ptr, entry_type, 3);
- if ( !pass ) CACHE_ERROR("protect_entry failed")
+ if(!pass) CACHE_ERROR("protect_entry failed")
create_flush_dependency(entry_type, 3, entry_type, 2);
- if ( !pass ) CACHE_ERROR("create_flush_dependency failed")
+ if(!pass) CACHE_ERROR("create_flush_dependency failed")
/* Change expected values, and verify the status of the entries
* after creating flush dependency
@@ -29467,13 +29329,13 @@ check_flush_deps(void)
(int)0, /* int tag */
(int)5, /* int num_entries */
expected); /* struct expected_entry_staus[] */
- if ( !pass ) CACHE_ERROR("verify_entry_status failed")
+ if(!pass) CACHE_ERROR("verify_entry_status failed")
protect_entry(file_ptr, entry_type, 2);
- if ( !pass ) CACHE_ERROR("protect_entry failed")
+ if(!pass) CACHE_ERROR("protect_entry failed")
create_flush_dependency(entry_type, 2, entry_type, 1);
- if ( !pass ) CACHE_ERROR("create_flush_dependency failed")
+ if(!pass) CACHE_ERROR("create_flush_dependency failed")
/* Change expected values, and verify the status of the entries
* after creating flush dependency
@@ -29491,13 +29353,13 @@ check_flush_deps(void)
(int)0, /* int tag */
(int)5, /* int num_entries */
expected); /* struct expected_entry_staus[] */
- if ( !pass ) CACHE_ERROR("verify_entry_status failed")
+ if(!pass) CACHE_ERROR("verify_entry_status failed")
protect_entry(file_ptr, entry_type, 1);
- if ( !pass ) CACHE_ERROR("protect_entry failed")
+ if(!pass) CACHE_ERROR("protect_entry failed")
create_flush_dependency(entry_type, 1, entry_type, 0);
- if ( !pass ) CACHE_ERROR("create_flush_dependency failed")
+ if(!pass) CACHE_ERROR("create_flush_dependency failed")
/* Change expected values, and verify the status of the entries
* after creating flush dependency
@@ -29515,19 +29377,19 @@ check_flush_deps(void)
(int)0, /* int tag */
(int)5, /* int num_entries */
expected); /* struct expected_entry_staus[] */
- if ( !pass ) CACHE_ERROR("verify_entry_status failed")
+ if(!pass) CACHE_ERROR("verify_entry_status failed")
}
/* Destroy flush dependency between entries, from the "bottom up" */
{
destroy_flush_dependency(entry_type, 1, entry_type, 0);
- if ( !pass ) CACHE_ERROR("destroy_flush_dependency failed")
+ if(!pass) CACHE_ERROR("destroy_flush_dependency failed")
unprotect_entry(file_ptr, /* H5F_t * file_ptr */
entry_type, /* int32_t type */
1, /* int32_t idx */
H5C__NO_FLAGS_SET); /* unsigned int flags */
- if ( !pass ) CACHE_ERROR("unprotect_entry failed")
+ if(!pass) CACHE_ERROR("unprotect_entry failed")
/* Change expected values, and verify the status of the entries
* after destroying flush dependency
@@ -29543,16 +29405,16 @@ check_flush_deps(void)
(int)0, /* int tag */
(int)5, /* int num_entries */
expected); /* struct expected_entry_staus[] */
- if ( !pass ) CACHE_ERROR("verify_entry_status failed")
+ if(!pass) CACHE_ERROR("verify_entry_status failed")
destroy_flush_dependency(entry_type, 2, entry_type, 1);
- if ( !pass ) CACHE_ERROR("destroy_flush_dependency failed")
+ if(!pass) CACHE_ERROR("destroy_flush_dependency failed")
unprotect_entry(file_ptr, /* H5F_t * file_ptr */
entry_type, /* int32_t type */
2, /* int32_t idx */
H5C__NO_FLAGS_SET); /* unsigned int flags */
- if ( !pass ) CACHE_ERROR("unprotect_entry failed")
+ if(!pass) CACHE_ERROR("unprotect_entry failed")
/* Change expected values, and verify the status of the entries
* after destroying flush dependency
@@ -29568,16 +29430,16 @@ check_flush_deps(void)
(int)0, /* int tag */
(int)5, /* int num_entries */
expected); /* struct expected_entry_staus[] */
- if ( !pass ) CACHE_ERROR("verify_entry_status failed")
+ if(!pass) CACHE_ERROR("verify_entry_status failed")
destroy_flush_dependency(entry_type, 3, entry_type, 2);
- if ( !pass ) CACHE_ERROR("destroy_flush_dependency failed")
+ if(!pass) CACHE_ERROR("destroy_flush_dependency failed")
unprotect_entry(file_ptr, /* H5F_t * file_ptr */
entry_type, /* int32_t type */
3, /* int32_t idx */
H5C__NO_FLAGS_SET); /* unsigned int flags */
- if ( !pass ) CACHE_ERROR("unprotect_entry failed")
+ if(!pass) CACHE_ERROR("unprotect_entry failed")
/* Change expected values, and verify the status of the entries
* after destroying flush dependency
@@ -29593,7 +29455,7 @@ check_flush_deps(void)
(int)0, /* int tag */
(int)5, /* int num_entries */
expected); /* struct expected_entry_staus[] */
- if ( !pass ) CACHE_ERROR("verify_entry_status failed")
+ if(!pass) CACHE_ERROR("verify_entry_status failed")
}
/* Test Case #4 - Multiple children for a single parent */
@@ -29601,11 +29463,11 @@ check_flush_deps(void)
/* Create flush dependency between entries (child) 0,1,2,3->4 (parent) */
{
protect_entry(file_ptr, entry_type, 4);
- if ( !pass ) CACHE_ERROR("protect_entry failed")
+ if(!pass) CACHE_ERROR("protect_entry failed")
for(u = 0; u < 4; u++) {
create_flush_dependency(entry_type, 4, entry_type, (int32_t)u);
- if ( !pass ) CACHE_ERROR("create_flush_dependency failed")
+ if(!pass) CACHE_ERROR("create_flush_dependency failed")
/* Change expected values, and verify the status of the entries
* after creating flush dependency
@@ -29623,7 +29485,7 @@ check_flush_deps(void)
(int)0, /* int tag */
(int)5, /* int num_entries */
expected); /* struct expected_entry_staus[] */
- if ( !pass ) CACHE_ERROR("verify_entry_status failed")
+ if(!pass) CACHE_ERROR("verify_entry_status failed")
} /* end for */
}
@@ -29631,7 +29493,7 @@ check_flush_deps(void)
{
for(u = 0; u < 4; u++) {
destroy_flush_dependency(entry_type, 4, entry_type, (int32_t)u);
- if ( !pass ) CACHE_ERROR("destroy_flush_dependency failed")
+ if(!pass) CACHE_ERROR("destroy_flush_dependency failed")
/* Change expected values, and verify the status of the entries
* after destroying flush dependency
@@ -29646,7 +29508,7 @@ check_flush_deps(void)
entry_type, /* int32_t type */
4, /* int32_t idx */
H5C__NO_FLAGS_SET); /* unsigned int flags */
- if ( !pass ) CACHE_ERROR("unprotect_entry failed")
+ if(!pass) CACHE_ERROR("unprotect_entry failed")
/* Change expected values, and verify the status of the entries
* after destroying flush dependency
@@ -29660,7 +29522,7 @@ check_flush_deps(void)
(int)0, /* int tag */
(int)5, /* int num_entries */
expected); /* struct expected_entry_staus[] */
- if ( !pass ) CACHE_ERROR("verify_entry_status failed")
+ if(!pass) CACHE_ERROR("verify_entry_status failed")
} /* end for */
}
@@ -29673,10 +29535,10 @@ check_flush_deps(void)
*/
{
protect_entry(file_ptr, entry_type, 1);
- if ( !pass ) CACHE_ERROR("protect_entry failed")
+ if(!pass) CACHE_ERROR("protect_entry failed")
create_flush_dependency(entry_type, 1, entry_type, 0);
- if ( !pass ) CACHE_ERROR("create_flush_dependency failed")
+ if(!pass) CACHE_ERROR("create_flush_dependency failed")
/* Change expected values, and verify the status of the entries
* after creating flush dependency
@@ -29694,13 +29556,13 @@ check_flush_deps(void)
(int)0, /* int tag */
(int)5, /* int num_entries */
expected); /* struct expected_entry_staus[] */
- if ( !pass ) CACHE_ERROR("verify_entry_status failed")
+ if(!pass) CACHE_ERROR("verify_entry_status failed")
protect_entry(file_ptr, entry_type, 4);
- if ( !pass ) CACHE_ERROR("protect_entry failed")
+ if(!pass) CACHE_ERROR("protect_entry failed")
create_flush_dependency(entry_type, 4, entry_type, 3);
- if ( !pass ) CACHE_ERROR("create_flush_dependency failed")
+ if(!pass) CACHE_ERROR("create_flush_dependency failed")
/* Change expected values, and verify the status of the entries
* after creating flush dependency
@@ -29718,13 +29580,13 @@ check_flush_deps(void)
(int)0, /* int tag */
(int)5, /* int num_entries */
expected); /* struct expected_entry_staus[] */
- if ( !pass ) CACHE_ERROR("verify_entry_status failed")
+ if(!pass) CACHE_ERROR("verify_entry_status failed")
protect_entry(file_ptr, entry_type, 0);
- if ( !pass ) CACHE_ERROR("protect_entry failed")
+ if(!pass) CACHE_ERROR("protect_entry failed")
create_flush_dependency(entry_type, 0, entry_type, 4);
- if ( !pass ) CACHE_ERROR("create_flush_dependency failed")
+ if(!pass) CACHE_ERROR("create_flush_dependency failed")
/* Change expected values, and verify the status of the entries
* after creating flush dependency
@@ -29742,20 +29604,20 @@ check_flush_deps(void)
(int)0, /* int tag */
(int)5, /* int num_entries */
expected); /* struct expected_entry_staus[] */
- if ( !pass ) CACHE_ERROR("verify_entry_status failed")
+ if(!pass) CACHE_ERROR("verify_entry_status failed")
}
/* Destroy flush dependency between entries, detaching 3->4 from 0 first */
{
destroy_flush_dependency(entry_type, 0, entry_type, 4);
- if ( !pass ) CACHE_ERROR("destroy_flush_dependency failed")
+ if(!pass) CACHE_ERROR("destroy_flush_dependency failed")
unprotect_entry(file_ptr, /* H5F_t * file_ptr */
entry_type, /* int32_t type */
0, /* int32_t idx */
H5C__NO_FLAGS_SET); /* unsigned int flags */
- if ( !pass ) CACHE_ERROR("unprotect_entry failed")
+ if(!pass) CACHE_ERROR("unprotect_entry failed")
/* Change expected values, and verify the status of the entries
* after destroying flush dependency
@@ -29771,16 +29633,16 @@ check_flush_deps(void)
(int)0, /* int tag */
(int)5, /* int num_entries */
expected); /* struct expected_entry_staus[] */
- if ( !pass ) CACHE_ERROR("verify_entry_status failed")
+ if(!pass) CACHE_ERROR("verify_entry_status failed")
destroy_flush_dependency(entry_type, 4, entry_type, 3);
- if ( !pass ) CACHE_ERROR("destroy_flush_dependency failed")
+ if(!pass) CACHE_ERROR("destroy_flush_dependency failed")
unprotect_entry(file_ptr, /* H5F_t * file_ptr */
entry_type, /* int32_t type */
4, /* int32_t idx */
H5C__NO_FLAGS_SET); /* unsigned int flags */
- if ( !pass ) CACHE_ERROR("unprotect_entry failed")
+ if(!pass) CACHE_ERROR("unprotect_entry failed")
/* Change expected values, and verify the status of the entries
* after destroying flush dependency
@@ -29796,16 +29658,16 @@ check_flush_deps(void)
(int)0, /* int tag */
(int)5, /* int num_entries */
expected); /* struct expected_entry_staus[] */
- if ( !pass ) CACHE_ERROR("verify_entry_status failed")
+ if(!pass) CACHE_ERROR("verify_entry_status failed")
destroy_flush_dependency(entry_type, 1, entry_type, 0);
- if ( !pass ) CACHE_ERROR("destroy_flush_dependency failed")
+ if(!pass) CACHE_ERROR("destroy_flush_dependency failed")
unprotect_entry(file_ptr, /* H5F_t * file_ptr */
entry_type, /* int32_t type */
1, /* int32_t idx */
H5C__NO_FLAGS_SET); /* unsigned int flags */
- if ( !pass ) CACHE_ERROR("unprotect_entry failed")
+ if(!pass) CACHE_ERROR("unprotect_entry failed")
/* Change expected values, and verify the status of the entries
* after destroying flush dependency
@@ -29821,7 +29683,7 @@ check_flush_deps(void)
(int)0, /* int tag */
(int)5, /* int num_entries */
expected); /* struct expected_entry_staus[] */
- if ( !pass ) CACHE_ERROR("verify_entry_status failed")
+ if(!pass) CACHE_ERROR("verify_entry_status failed")
}
/* Test Case #5b - Join two flush dependency chains together, creating a
@@ -29833,10 +29695,10 @@ check_flush_deps(void)
*/
{
protect_entry(file_ptr, entry_type, 1);
- if ( !pass ) CACHE_ERROR("protect_entry failed")
+ if(!pass) CACHE_ERROR("protect_entry failed")
create_flush_dependency(entry_type, 1, entry_type, 0);
- if ( !pass ) CACHE_ERROR("create_flush_dependency failed")
+ if(!pass) CACHE_ERROR("create_flush_dependency failed")
/* Change expected values, and verify the status of the entries
* after creating flush dependency
@@ -29854,13 +29716,13 @@ check_flush_deps(void)
(int)0, /* int tag */
(int)5, /* int num_entries */
expected); /* struct expected_entry_staus[] */
- if ( !pass ) CACHE_ERROR("verify_entry_status failed")
+ if(!pass) CACHE_ERROR("verify_entry_status failed")
protect_entry(file_ptr, entry_type, 2);
- if ( !pass ) CACHE_ERROR("protect_entry failed")
+ if(!pass) CACHE_ERROR("protect_entry failed")
create_flush_dependency(entry_type, 2, entry_type, 1);
- if ( !pass ) CACHE_ERROR("create_flush_dependency failed")
+ if(!pass) CACHE_ERROR("create_flush_dependency failed")
/* Change expected values, and verify the status of the entries
* after creating flush dependency
@@ -29878,13 +29740,13 @@ check_flush_deps(void)
(int)0, /* int tag */
(int)5, /* int num_entries */
expected); /* struct expected_entry_staus[] */
- if ( !pass ) CACHE_ERROR("verify_entry_status failed")
+ if(!pass) CACHE_ERROR("verify_entry_status failed")
protect_entry(file_ptr, entry_type, 4);
- if ( !pass ) CACHE_ERROR("protect_entry failed")
+ if(!pass) CACHE_ERROR("protect_entry failed")
create_flush_dependency(entry_type, 4, entry_type, 3);
- if ( !pass ) CACHE_ERROR("create_flush_dependency failed")
+ if(!pass) CACHE_ERROR("create_flush_dependency failed")
/* Change expected values, and verify the status of the entries
* after creating flush dependency
@@ -29902,10 +29764,10 @@ check_flush_deps(void)
(int)0, /* int tag */
(int)5, /* int num_entries */
expected); /* struct expected_entry_staus[] */
- if ( !pass ) CACHE_ERROR("verify_entry_status failed")
+ if(!pass) CACHE_ERROR("verify_entry_status failed")
create_flush_dependency(entry_type, 1, entry_type, 4);
- if ( !pass ) CACHE_ERROR("create_flush_dependency failed")
+ if(!pass) CACHE_ERROR("create_flush_dependency failed")
/* Change expected values, and verify the status of the entries
* after creating flush dependency
@@ -29921,14 +29783,14 @@ check_flush_deps(void)
(int)0, /* int tag */
(int)5, /* int num_entries */
expected); /* struct expected_entry_staus[] */
- if ( !pass ) CACHE_ERROR("verify_entry_status failed")
+ if(!pass) CACHE_ERROR("verify_entry_status failed")
}
/* Destroy flush dependency between entries, detaching 3->4 from 1 first */
{
destroy_flush_dependency(entry_type, 1, entry_type, 4);
- if ( !pass ) CACHE_ERROR("destroy_flush_dependency failed")
+ if(!pass) CACHE_ERROR("destroy_flush_dependency failed")
/* Change expected values, and verify the status of the entries
* after destroying flush dependency
@@ -29942,16 +29804,16 @@ check_flush_deps(void)
(int)0, /* int tag */
(int)5, /* int num_entries */
expected); /* struct expected_entry_staus[] */
- if ( !pass ) CACHE_ERROR("verify_entry_status failed")
+ if(!pass) CACHE_ERROR("verify_entry_status failed")
destroy_flush_dependency(entry_type, 4, entry_type, 3);
- if ( !pass ) CACHE_ERROR("destroy_flush_dependency failed")
+ if(!pass) CACHE_ERROR("destroy_flush_dependency failed")
unprotect_entry(file_ptr, /* H5F_t * file_ptr */
entry_type, /* int32_t type */
4, /* int32_t idx */
H5C__NO_FLAGS_SET); /* unsigned int flags */
- if ( !pass ) CACHE_ERROR("unprotect_entry failed")
+ if(!pass) CACHE_ERROR("unprotect_entry failed")
/* Change expected values, and verify the status of the entries
* after destroying flush dependency
@@ -29967,16 +29829,16 @@ check_flush_deps(void)
(int)0, /* int tag */
(int)5, /* int num_entries */
expected); /* struct expected_entry_staus[] */
- if ( !pass ) CACHE_ERROR("verify_entry_status failed")
+ if(!pass) CACHE_ERROR("verify_entry_status failed")
destroy_flush_dependency(entry_type, 2, entry_type, 1);
- if ( !pass ) CACHE_ERROR("destroy_flush_dependency failed")
+ if(!pass) CACHE_ERROR("destroy_flush_dependency failed")
unprotect_entry(file_ptr, /* H5F_t * file_ptr */
entry_type, /* int32_t type */
2, /* int32_t idx */
H5C__NO_FLAGS_SET); /* unsigned int flags */
- if ( !pass ) CACHE_ERROR("unprotect_entry failed")
+ if(!pass) CACHE_ERROR("unprotect_entry failed")
/* Change expected values, and verify the status of the entries
* after destroying flush dependency
@@ -29992,16 +29854,16 @@ check_flush_deps(void)
(int)0, /* int tag */
(int)5, /* int num_entries */
expected); /* struct expected_entry_staus[] */
- if ( !pass ) CACHE_ERROR("verify_entry_status failed")
+ if(!pass) CACHE_ERROR("verify_entry_status failed")
destroy_flush_dependency(entry_type, 1, entry_type, 0);
- if ( !pass ) CACHE_ERROR("destroy_flush_dependency failed")
+ if(!pass) CACHE_ERROR("destroy_flush_dependency failed")
unprotect_entry(file_ptr, /* H5F_t * file_ptr */
entry_type, /* int32_t type */
1, /* int32_t idx */
H5C__NO_FLAGS_SET); /* unsigned int flags */
- if ( !pass ) CACHE_ERROR("unprotect_entry failed")
+ if(!pass) CACHE_ERROR("unprotect_entry failed")
/* Change expected values, and verify the status of the entries
* after destroying flush dependency
@@ -30017,7 +29879,7 @@ check_flush_deps(void)
(int)0, /* int tag */
(int)5, /* int num_entries */
expected); /* struct expected_entry_staus[] */
- if ( !pass ) CACHE_ERROR("verify_entry_status failed")
+ if(!pass) CACHE_ERROR("verify_entry_status failed")
}
/* Test Case #5c - Join two flush dependency chains together, creating a
@@ -30029,10 +29891,10 @@ check_flush_deps(void)
*/
{
protect_entry(file_ptr, entry_type, 1);
- if ( !pass ) CACHE_ERROR("protect_entry failed")
+ if(!pass) CACHE_ERROR("protect_entry failed")
create_flush_dependency(entry_type, 1, entry_type, 0);
- if ( !pass ) CACHE_ERROR("create_flush_dependency failed")
+ if(!pass) CACHE_ERROR("create_flush_dependency failed")
/* Change expected values, and verify the status of the entries
* after creating flush dependency
@@ -30050,13 +29912,13 @@ check_flush_deps(void)
(int)0, /* int tag */
(int)5, /* int num_entries */
expected); /* struct expected_entry_staus[] */
- if ( !pass ) CACHE_ERROR("verify_entry_status failed")
+ if(!pass) CACHE_ERROR("verify_entry_status failed")
protect_entry(file_ptr, entry_type, 2);
- if ( !pass ) CACHE_ERROR("protect_entry failed")
+ if(!pass) CACHE_ERROR("protect_entry failed")
create_flush_dependency(entry_type, 2, entry_type, 1);
- if ( !pass ) CACHE_ERROR("create_flush_dependency failed")
+ if(!pass) CACHE_ERROR("create_flush_dependency failed")
/* Change expected values, and verify the status of the entries
* after creating flush dependency
@@ -30074,13 +29936,13 @@ check_flush_deps(void)
(int)0, /* int tag */
(int)5, /* int num_entries */
expected); /* struct expected_entry_staus[] */
- if ( !pass ) CACHE_ERROR("verify_entry_status failed")
+ if(!pass) CACHE_ERROR("verify_entry_status failed")
protect_entry(file_ptr, entry_type, 4);
- if ( !pass ) CACHE_ERROR("protect_entry failed")
+ if(!pass) CACHE_ERROR("protect_entry failed")
create_flush_dependency(entry_type, 4, entry_type, 3);
- if ( !pass ) CACHE_ERROR("create_flush_dependency failed")
+ if(!pass) CACHE_ERROR("create_flush_dependency failed")
/* Change expected values, and verify the status of the entries
* after creating flush dependency
@@ -30098,10 +29960,10 @@ check_flush_deps(void)
(int)0, /* int tag */
(int)5, /* int num_entries */
expected); /* struct expected_entry_staus[] */
- if ( !pass ) CACHE_ERROR("verify_entry_status failed")
+ if(!pass) CACHE_ERROR("verify_entry_status failed")
create_flush_dependency(entry_type, 2, entry_type, 4);
- if ( !pass ) CACHE_ERROR("create_flush_dependency failed")
+ if(!pass) CACHE_ERROR("create_flush_dependency failed")
/* Change expected values, and verify the status of the entries
* after creating flush dependency
@@ -30117,14 +29979,14 @@ check_flush_deps(void)
(int)0, /* int tag */
(int)5, /* int num_entries */
expected); /* struct expected_entry_staus[] */
- if ( !pass ) CACHE_ERROR("verify_entry_status failed")
+ if(!pass) CACHE_ERROR("verify_entry_status failed")
}
/* Destroy flush dependency between entries, detaching 3->4 from 2 first */
{
destroy_flush_dependency(entry_type, 2, entry_type, 4);
- if ( !pass ) CACHE_ERROR("destroy_flush_dependency failed")
+ if(!pass) CACHE_ERROR("destroy_flush_dependency failed")
/* Change expected values, and verify the status of the entries
* after destroying flush dependency
@@ -30138,16 +30000,16 @@ check_flush_deps(void)
(int)0, /* int tag */
(int)5, /* int num_entries */
expected); /* struct expected_entry_staus[] */
- if ( !pass ) CACHE_ERROR("verify_entry_status failed")
+ if(!pass) CACHE_ERROR("verify_entry_status failed")
destroy_flush_dependency(entry_type, 4, entry_type, 3);
- if ( !pass ) CACHE_ERROR("destroy_flush_dependency failed")
+ if(!pass) CACHE_ERROR("destroy_flush_dependency failed")
unprotect_entry(file_ptr, /* H5F_t * file_ptr */
entry_type, /* int32_t type */
4, /* int32_t idx */
H5C__NO_FLAGS_SET); /* unsigned int flags */
- if ( !pass ) CACHE_ERROR("unprotect_entry failed")
+ if(!pass) CACHE_ERROR("unprotect_entry failed")
/* Change expected values, and verify the status of the entries
* after destroying flush dependency
@@ -30163,16 +30025,16 @@ check_flush_deps(void)
(int)0, /* int tag */
(int)5, /* int num_entries */
expected); /* struct expected_entry_staus[] */
- if ( !pass ) CACHE_ERROR("verify_entry_status failed")
+ if(!pass) CACHE_ERROR("verify_entry_status failed")
destroy_flush_dependency(entry_type, 2, entry_type, 1);
- if ( !pass ) CACHE_ERROR("destroy_flush_dependency failed")
+ if(!pass) CACHE_ERROR("destroy_flush_dependency failed")
unprotect_entry(file_ptr, /* H5F_t * file_ptr */
entry_type, /* int32_t type */
2, /* int32_t idx */
H5C__NO_FLAGS_SET); /* unsigned int flags */
- if ( !pass ) CACHE_ERROR("unprotect_entry failed")
+ if(!pass) CACHE_ERROR("unprotect_entry failed")
/* Change expected values, and verify the status of the entries
* after destroying flush dependency
@@ -30188,16 +30050,16 @@ check_flush_deps(void)
(int)0, /* int tag */
(int)5, /* int num_entries */
expected); /* struct expected_entry_staus[] */
- if ( !pass ) CACHE_ERROR("verify_entry_status failed")
+ if(!pass) CACHE_ERROR("verify_entry_status failed")
destroy_flush_dependency(entry_type, 1, entry_type, 0);
- if ( !pass ) CACHE_ERROR("destroy_flush_dependency failed")
+ if(!pass) CACHE_ERROR("destroy_flush_dependency failed")
unprotect_entry(file_ptr, /* H5F_t * file_ptr */
entry_type, /* int32_t type */
1, /* int32_t idx */
H5C__NO_FLAGS_SET); /* unsigned int flags */
- if ( !pass ) CACHE_ERROR("unprotect_entry failed")
+ if(!pass) CACHE_ERROR("unprotect_entry failed")
/* Change expected values, and verify the status of the entries
* after destroying flush dependency
@@ -30213,7 +30075,7 @@ check_flush_deps(void)
(int)0, /* int tag */
(int)5, /* int num_entries */
expected); /* struct expected_entry_staus[] */
- if ( !pass ) CACHE_ERROR("verify_entry_status failed")
+ if(!pass) CACHE_ERROR("verify_entry_status failed")
}
/* Test Case #6a - Make certain that flush dependency relationship with parent
@@ -30223,13 +30085,13 @@ check_flush_deps(void)
/* Create flush dependency between entries 0 (child) & 1 (parent) */
{
protect_entry(file_ptr, entry_type, 1);
- if ( !pass ) CACHE_ERROR("protect_entry failed")
+ if(!pass) CACHE_ERROR("protect_entry failed")
pin_entry(entry_type, 1);
- if ( !pass ) CACHE_ERROR("pin_entry failed")
+ if(!pass) CACHE_ERROR("pin_entry failed")
create_flush_dependency(entry_type, 1, entry_type, 0);
- if ( !pass ) CACHE_ERROR("create_flush_dependency failed")
+ if(!pass) CACHE_ERROR("create_flush_dependency failed")
/* Change expected values, and verify the status of the entries
* after creating flush dependency
@@ -30247,22 +30109,22 @@ check_flush_deps(void)
(int)0, /* int tag */
(int)5, /* int num_entries */
expected); /* struct expected_entry_staus[] */
- if ( !pass ) CACHE_ERROR("verify_entry_status failed")
+ if(!pass) CACHE_ERROR("verify_entry_status failed")
}
/* Unpin entry & destroy flush dependency between entries 0 (child) & 1 (parent) */
{
destroy_flush_dependency(entry_type, 1, entry_type, 0);
- if ( !pass ) CACHE_ERROR("destroy_flush_dependency failed")
+ if(!pass) CACHE_ERROR("destroy_flush_dependency failed")
unpin_entry(entry_type, 1);
- if ( !pass ) CACHE_ERROR("unpin_entry failed")
+ if(!pass) CACHE_ERROR("unpin_entry failed")
unprotect_entry(file_ptr, /* H5F_t * file_ptr */
entry_type, /* int32_t type */
1, /* int32_t idx */
H5C__NO_FLAGS_SET); /* unsigned int flags */
- if ( !pass ) CACHE_ERROR("unprotect_entry failed")
+ if(!pass) CACHE_ERROR("unprotect_entry failed")
/* Change expected values, and verify the status of the entries
* after destroy flush dependency
@@ -30278,7 +30140,7 @@ check_flush_deps(void)
(int)0, /* int tag */
(int)5, /* int num_entries */
expected); /* struct expected_entry_staus[] */
- if ( !pass ) CACHE_ERROR("verify_entry_status failed")
+ if(!pass) CACHE_ERROR("verify_entry_status failed")
}
/* Test Case #6b - Make certain that flush dependency relationship with parent
@@ -30288,13 +30150,13 @@ check_flush_deps(void)
/* Create flush dependency between entries 0 (child) & 1 (parent) */
{
protect_entry(file_ptr, entry_type, 1);
- if ( !pass ) CACHE_ERROR("protect_entry failed")
+ if(!pass) CACHE_ERROR("protect_entry failed")
pin_entry(entry_type, 1);
- if ( !pass ) CACHE_ERROR("pin_entry failed")
+ if(!pass) CACHE_ERROR("pin_entry failed")
create_flush_dependency(entry_type, 1, entry_type, 0);
- if ( !pass ) CACHE_ERROR("create_flush_dependency failed")
+ if(!pass) CACHE_ERROR("create_flush_dependency failed")
/* Change expected values, and verify the status of the entries
* after creating flush dependency
@@ -30312,29 +30174,29 @@ check_flush_deps(void)
(int)0, /* int tag */
(int)5, /* int num_entries */
expected); /* struct expected_entry_staus[] */
- if ( !pass ) CACHE_ERROR("verify_entry_status failed")
+ if(!pass) CACHE_ERROR("verify_entry_status failed")
}
/* Unpin entry & destroy flush dependency between entries 0 (child) & 1 (parent) */
{
unpin_entry(entry_type, 1);
- if ( !pass ) CACHE_ERROR("unpin_entry failed")
+ if(!pass) CACHE_ERROR("unpin_entry failed")
/* Verify the status */
verify_entry_status(cache_ptr, /* H5C_t * cache_ptr */
(int)0, /* int tag */
(int)5, /* int num_entries */
expected); /* struct expected_entry_staus[] */
- if ( !pass ) CACHE_ERROR("verify_entry_status failed")
+ if(!pass) CACHE_ERROR("verify_entry_status failed")
destroy_flush_dependency(entry_type, 1, entry_type, 0);
- if ( !pass ) CACHE_ERROR("destroy_flush_dependency failed")
+ if(!pass) CACHE_ERROR("destroy_flush_dependency failed")
unprotect_entry(file_ptr, /* H5F_t * file_ptr */
entry_type, /* int32_t type */
1, /* int32_t idx */
H5C__NO_FLAGS_SET); /* unsigned int flags */
- if ( !pass ) CACHE_ERROR("unprotect_entry failed")
+ if(!pass) CACHE_ERROR("unprotect_entry failed")
/* Change expected values, and verify the status of the entries
* after destroy flush dependency
@@ -30350,7 +30212,7 @@ check_flush_deps(void)
(int)0, /* int tag */
(int)5, /* int num_entries */
expected); /* struct expected_entry_staus[] */
- if ( !pass ) CACHE_ERROR("verify_entry_status failed")
+ if(!pass) CACHE_ERROR("verify_entry_status failed")
}
/* Test Case #7 - Simple multiple parents
@@ -30360,10 +30222,10 @@ check_flush_deps(void)
*/
{
protect_entry(file_ptr, entry_type, 1);
- if ( !pass ) CACHE_ERROR("protect_entry failed")
+ if(!pass) CACHE_ERROR("protect_entry failed")
create_flush_dependency(entry_type, 1, entry_type, 0);
- if ( !pass ) CACHE_ERROR("create_flush_dependency failed")
+ if(!pass) CACHE_ERROR("create_flush_dependency failed")
/* Change expected values, and verify the status of the entries
* after creating flush dependency
@@ -30381,13 +30243,13 @@ check_flush_deps(void)
(int)0, /* int tag */
(int)5, /* int num_entries */
expected); /* struct expected_entry_staus[] */
- if ( !pass ) CACHE_ERROR("verify_entry_status failed")
+ if(!pass) CACHE_ERROR("verify_entry_status failed")
protect_entry(file_ptr, entry_type, 2);
- if ( !pass ) CACHE_ERROR("protect_entry failed")
+ if(!pass) CACHE_ERROR("protect_entry failed")
create_flush_dependency(entry_type, 2, entry_type, 0);
- if ( !pass ) CACHE_ERROR("create_flush_dependency failed")
+ if(!pass) CACHE_ERROR("create_flush_dependency failed")
/* Change expected values, and verify the status of the entries
* after creating flush dependency
@@ -30405,19 +30267,19 @@ check_flush_deps(void)
(int)0, /* int tag */
(int)5, /* int num_entries */
expected); /* struct expected_entry_staus[] */
- if ( !pass ) CACHE_ERROR("verify_entry_status failed")
+ if(!pass) CACHE_ERROR("verify_entry_status failed")
}
/* Destroy flush dependency between entries */
{
destroy_flush_dependency(entry_type, 1, entry_type, 0);
- if ( !pass ) CACHE_ERROR("destroy_flush_dependency failed")
+ if(!pass) CACHE_ERROR("destroy_flush_dependency failed")
unprotect_entry(file_ptr, /* H5F_t * file_ptr */
entry_type, /* int32_t type */
1, /* int32_t idx */
H5C__NO_FLAGS_SET); /* unsigned int flags */
- if ( !pass ) CACHE_ERROR("unprotect_entry failed")
+ if(!pass) CACHE_ERROR("unprotect_entry failed")
/* Change expected values, and verify the status of the entries
* after destroying flush dependency
@@ -30435,16 +30297,16 @@ check_flush_deps(void)
(int)0, /* int tag */
(int)5, /* int num_entries */
expected); /* struct expected_entry_staus[] */
- if ( !pass ) CACHE_ERROR("verify_entry_status failed")
+ if(!pass) CACHE_ERROR("verify_entry_status failed")
destroy_flush_dependency(entry_type, 2, entry_type, 0);
- if ( !pass ) CACHE_ERROR("destroy_flush_dependency failed")
+ if(!pass) CACHE_ERROR("destroy_flush_dependency failed")
unprotect_entry(file_ptr, /* H5F_t * file_ptr */
entry_type, /* int32_t type */
2, /* int32_t idx */
H5C__NO_FLAGS_SET); /* unsigned int flags */
- if ( !pass ) CACHE_ERROR("unprotect_entry failed")
+ if(!pass) CACHE_ERROR("unprotect_entry failed")
/* Change expected values, and verify the status of the entries
* after destroying flush dependency
@@ -30460,7 +30322,7 @@ check_flush_deps(void)
(int)0, /* int tag */
(int)5, /* int num_entries */
expected); /* struct expected_entry_staus[] */
- if ( !pass ) CACHE_ERROR("verify_entry_status failed")
+ if(!pass) CACHE_ERROR("verify_entry_status failed")
}
@@ -30468,7 +30330,7 @@ done:
if(file_ptr)
takedown_cache(file_ptr, FALSE, FALSE);
- if ( pass )
+ if(pass)
PASSED()
else {
H5_FAILED();
@@ -30513,12 +30375,12 @@ check_flush_deps_err(void)
/* Allocate a cache */
reset_entries();
file_ptr = setup_cache((size_t)(2 * 1024), (size_t)(1 * 1024));
- if ( !pass ) CACHE_ERROR("setup_cache failed")
+ if(!pass) CACHE_ERROR("setup_cache failed")
/* Insert entries to work with into the cache */
for(u = 0; u < 10; u++) {
insert_entry(file_ptr, entry_type, (int32_t)u, H5C__NO_FLAGS_SET);
- if ( !pass ) CACHE_ERROR("insert_entry failed")
+ if(!pass) CACHE_ERROR("insert_entry failed")
} /* end for */
/* Various test cases */
@@ -30526,152 +30388,152 @@ check_flush_deps_err(void)
/* Verify that parent entry in flush dependency must be protected */
case 0:
result = H5C_create_flush_dependency(&((entries[entry_type])[0]), &((entries[entry_type])[1]));
- if( result != FAIL ) CACHE_ERROR("Creating flush dependency with unprotected entry succeeded")
+ if(result != FAIL) CACHE_ERROR("Creating flush dependency with unprotected entry succeeded")
break;
/* Verify that entry can't have flush dependency on itself */
case 1:
protect_entry(file_ptr, entry_type, 0);
- if ( !pass ) CACHE_ERROR("protect_entry failed")
+ if(!pass) CACHE_ERROR("protect_entry failed")
result = H5C_create_flush_dependency(&((entries[entry_type])[0]), &((entries[entry_type])[0]));
- if( result != FAIL ) CACHE_ERROR("Creating flush dependency with parent == child")
+ if(result != FAIL) CACHE_ERROR("Creating flush dependency with parent == child")
unprotect_entry(file_ptr, /* H5F_t * file_ptr */
entry_type, /* int32_t type */
0, /* int32_t idx */
H5C__NO_FLAGS_SET); /* unsigned int flags */
- if ( !pass ) CACHE_ERROR("unprotect_entry failed")
+ if(!pass) CACHE_ERROR("unprotect_entry failed")
break;
/* Verify that parent entry must be protected */
case 2:
result = H5C_destroy_flush_dependency(&((entries[entry_type])[0]), &((entries[entry_type])[1]));
- if( result != FAIL ) CACHE_ERROR("Destroying [non-existant] dependency when parent isn't protected")
+ if(result != FAIL) CACHE_ERROR("Destroying [non-existant] dependency when parent isn't protected")
break;
/* Verify that parent entry has flush dependency */
case 3:
protect_entry(file_ptr, entry_type, 0);
- if ( !pass ) CACHE_ERROR("protect_entry failed")
+ if(!pass) CACHE_ERROR("protect_entry failed")
result = H5C_destroy_flush_dependency(&((entries[entry_type])[0]), &((entries[entry_type])[1]));
- if( result != FAIL ) CACHE_ERROR("Destroying dependency when parent isn't in relationship")
+ if(result != FAIL) CACHE_ERROR("Destroying dependency when parent isn't in relationship")
unprotect_entry(file_ptr, /* H5F_t * file_ptr */
entry_type, /* int32_t type */
0, /* int32_t idx */
H5C__NO_FLAGS_SET); /* unsigned int flags */
- if ( !pass ) CACHE_ERROR("unprotect_entry failed")
+ if(!pass) CACHE_ERROR("unprotect_entry failed")
break;
/* Verify that child entry is in flush dependency relationship */
case 4:
protect_entry(file_ptr, entry_type, 0);
- if ( !pass ) CACHE_ERROR("protect_entry failed")
+ if(!pass) CACHE_ERROR("protect_entry failed")
create_flush_dependency(entry_type, 0, entry_type, 1);
- if ( !pass ) CACHE_ERROR("create_flush_dependency failed")
+ if(!pass) CACHE_ERROR("create_flush_dependency failed")
result = H5C_destroy_flush_dependency(&((entries[entry_type])[0]), &((entries[entry_type])[2]));
- if( result != FAIL ) CACHE_ERROR("Destroying dependency when child isn't in relationship")
+ if(result != FAIL) CACHE_ERROR("Destroying dependency when child isn't in relationship")
destroy_flush_dependency(entry_type, 0, entry_type, 1);
- if ( !pass ) CACHE_ERROR("destroy_flush_dependency failed")
+ if(!pass) CACHE_ERROR("destroy_flush_dependency failed")
unprotect_entry(file_ptr, /* H5F_t * file_ptr */
entry_type, /* int32_t type */
0, /* int32_t idx */
H5C__NO_FLAGS_SET); /* unsigned int flags */
- if ( !pass ) CACHE_ERROR("unprotect_entry failed")
+ if(!pass) CACHE_ERROR("unprotect_entry failed")
break;
/* Verify that parent has child as direct descendant */
case 5:
protect_entry(file_ptr, entry_type, 0);
- if ( !pass ) CACHE_ERROR("protect_entry failed")
+ if(!pass) CACHE_ERROR("protect_entry failed")
create_flush_dependency(entry_type, 0, entry_type, 1);
- if ( !pass ) CACHE_ERROR("create_flush_dependency failed")
+ if(!pass) CACHE_ERROR("create_flush_dependency failed")
protect_entry(file_ptr, entry_type, 1);
- if ( !pass ) CACHE_ERROR("protect_entry failed")
+ if(!pass) CACHE_ERROR("protect_entry failed")
create_flush_dependency(entry_type, 1, entry_type, 2);
- if ( !pass ) CACHE_ERROR("create_flush_dependency failed")
+ if(!pass) CACHE_ERROR("create_flush_dependency failed")
protect_entry(file_ptr, entry_type, 3);
- if ( !pass ) CACHE_ERROR("protect_entry failed")
+ if(!pass) CACHE_ERROR("protect_entry failed")
create_flush_dependency(entry_type, 3, entry_type, 4);
- if ( !pass ) CACHE_ERROR("create_flush_dependency failed")
+ if(!pass) CACHE_ERROR("create_flush_dependency failed")
result = H5C_destroy_flush_dependency(&((entries[entry_type])[0]), &((entries[entry_type])[4]));
- if( result != FAIL ) CACHE_ERROR("Destroying dependency when child is not a direct descendant has no children at child's height")
+ if(result != FAIL) CACHE_ERROR("Destroying dependency when child is not a direct descendant has no children at child's height")
destroy_flush_dependency(entry_type, 0, entry_type, 1);
- if ( !pass ) CACHE_ERROR("destroy_flush_dependency failed")
+ if(!pass) CACHE_ERROR("destroy_flush_dependency failed")
unprotect_entry(file_ptr, /* H5F_t * file_ptr */
entry_type, /* int32_t type */
0, /* int32_t idx */
H5C__NO_FLAGS_SET); /* unsigned int flags */
- if ( !pass ) CACHE_ERROR("unprotect_entry failed")
+ if(!pass) CACHE_ERROR("unprotect_entry failed")
destroy_flush_dependency(entry_type, 1, entry_type, 2);
- if ( !pass ) CACHE_ERROR("destroy_flush_dependency failed")
+ if(!pass) CACHE_ERROR("destroy_flush_dependency failed")
unprotect_entry(file_ptr, /* H5F_t * file_ptr */
entry_type, /* int32_t type */
1, /* int32_t idx */
H5C__NO_FLAGS_SET); /* unsigned int flags */
- if ( !pass ) CACHE_ERROR("unprotect_entry failed")
+ if(!pass) CACHE_ERROR("unprotect_entry failed")
destroy_flush_dependency(entry_type, 3, entry_type, 4);
- if ( !pass ) CACHE_ERROR("destroy_flush_dependency failed")
+ if(!pass) CACHE_ERROR("destroy_flush_dependency failed")
unprotect_entry(file_ptr, /* H5F_t * file_ptr */
entry_type, /* int32_t type */
3, /* int32_t idx */
H5C__NO_FLAGS_SET); /* unsigned int flags */
- if ( !pass ) CACHE_ERROR("unprotect_entry failed")
+ if(!pass) CACHE_ERROR("unprotect_entry failed")
break;
/* Verify that child entry is child of parent */
case 6:
protect_entry(file_ptr, entry_type, 0);
- if ( !pass ) CACHE_ERROR("protect_entry failed")
+ if(!pass) CACHE_ERROR("protect_entry failed")
create_flush_dependency(entry_type, 0, entry_type, 1);
- if ( !pass ) CACHE_ERROR("create_flush_dependency failed")
+ if(!pass) CACHE_ERROR("create_flush_dependency failed")
protect_entry(file_ptr, entry_type, 2);
- if ( !pass ) CACHE_ERROR("protect_entry failed")
+ if(!pass) CACHE_ERROR("protect_entry failed")
create_flush_dependency(entry_type, 2, entry_type, 3);
- if ( !pass ) CACHE_ERROR("create_flush_dependency failed")
+ if(!pass) CACHE_ERROR("create_flush_dependency failed")
result = H5C_destroy_flush_dependency(&((entries[entry_type])[0]), &((entries[entry_type])[3]));
- if( result != FAIL ) CACHE_ERROR("Destroying dependency when child isn't in relationship")
+ if(result != FAIL) CACHE_ERROR("Destroying dependency when child isn't in relationship")
destroy_flush_dependency(entry_type, 0, entry_type, 1);
- if ( !pass ) CACHE_ERROR("destroy_flush_dependency failed")
+ if(!pass) CACHE_ERROR("destroy_flush_dependency failed")
unprotect_entry(file_ptr, /* H5F_t * file_ptr */
entry_type, /* int32_t type */
0, /* int32_t idx */
H5C__NO_FLAGS_SET); /* unsigned int flags */
- if ( !pass ) CACHE_ERROR("unprotect_entry failed")
+ if(!pass) CACHE_ERROR("unprotect_entry failed")
destroy_flush_dependency(entry_type, 2, entry_type, 3);
- if ( !pass ) CACHE_ERROR("destroy_flush_dependency failed")
+ if(!pass) CACHE_ERROR("destroy_flush_dependency failed")
unprotect_entry(file_ptr, /* H5F_t * file_ptr */
entry_type, /* int32_t type */
2, /* int32_t idx */
H5C__NO_FLAGS_SET); /* unsigned int flags */
- if ( !pass ) CACHE_ERROR("unprotect_entry failed")
+ if(!pass) CACHE_ERROR("unprotect_entry failed")
break;
default:
@@ -30679,7 +30541,7 @@ check_flush_deps_err(void)
} /* end switch */
takedown_cache(file_ptr, FALSE, FALSE);
- if ( !pass ) CACHE_ERROR("takedown_cache failed")
+ if(!pass) CACHE_ERROR("takedown_cache failed")
file_ptr = NULL;
} /* end for */
@@ -30688,7 +30550,7 @@ done:
if(file_ptr)
takedown_cache(file_ptr, FALSE, FALSE);
- if ( pass )
+ if(pass)
PASSED()
else {
H5_FAILED();
@@ -30744,12 +30606,12 @@ check_flush_deps_order(void)
file_ptr = setup_cache((size_t)(2 * 1024), (size_t)(1 * 1024));
cache_ptr = file_ptr->shared->cache;
- if ( !pass ) CACHE_ERROR("setup_cache failed")
+ if(!pass) CACHE_ERROR("setup_cache failed")
/* Insert entries to work with into the cache */
for(u = 0; u < 5; u++) {
insert_entry(file_ptr, entry_type, (int32_t)u, H5C__NO_FLAGS_SET);
- if ( !pass ) CACHE_ERROR("insert_entry failed")
+ if(!pass) CACHE_ERROR("insert_entry failed")
/* Change expected values, and verify the status of the entries
* after each insertion
@@ -30762,7 +30624,7 @@ check_flush_deps_order(void)
(int)u, /* int tag */
(int)5, /* int num_entries */
expected); /* struct expected_entry_staus[] */
- if ( !pass ) CACHE_ERROR("verify_entry_status failed")
+ if(!pass) CACHE_ERROR("verify_entry_status failed")
} /* end for */
/* Test Case #1a - Single flush dependency relationship, increasing addr order */
@@ -30770,10 +30632,10 @@ check_flush_deps_order(void)
/* Create flush dependency between entries 0 (child) & 1 (parent) */
{
protect_entry(file_ptr, entry_type, 1);
- if ( !pass ) CACHE_ERROR("protect_entry failed")
+ if(!pass) CACHE_ERROR("protect_entry failed")
create_flush_dependency(entry_type, 1, entry_type, 0);
- if ( !pass ) CACHE_ERROR("create_flush_dependency failed")
+ if(!pass) CACHE_ERROR("create_flush_dependency failed")
/* Change expected values, and verify the status of the entries
* after creating flush dependency
@@ -30791,7 +30653,7 @@ check_flush_deps_order(void)
(int)0, /* int tag */
(int)5, /* int num_entries */
expected); /* struct expected_entry_staus[] */
- if ( !pass ) CACHE_ERROR("verify_entry_status failed")
+ if(!pass) CACHE_ERROR("verify_entry_status failed")
}
/* Flush the cache and verify that the entries were flushed in correct order */
@@ -30807,13 +30669,13 @@ check_flush_deps_order(void)
entry_type, /* int32_t type */
1, /* int32_t idx */
H5C__NO_FLAGS_SET); /* unsigned int flags */
- if ( !pass ) CACHE_ERROR("unprotect_entry failed")
+ if(!pass) CACHE_ERROR("unprotect_entry failed")
/* Reset index for tracking flush order */
flush_order = 0;
result = H5C_flush_cache(file_ptr, H5AC_ind_read_dxpl_id, H5C__NO_FLAGS_SET);
- if( result < 0 ) CACHE_ERROR("flushing entries with flush dependendices")
+ if(result < 0) CACHE_ERROR("flushing entries with flush dependendices")
/* Change expected values, and verify the status of the entries
* after destroy flush dependency
@@ -30838,13 +30700,13 @@ check_flush_deps_order(void)
(int)0, /* int tag */
(int)5, /* int num_entries */
expected); /* struct expected_entry_staus[] */
- if ( !pass ) CACHE_ERROR("verify_entry_status failed")
+ if(!pass) CACHE_ERROR("verify_entry_status failed")
}
/* Destroy flush dependency between entries 0 (child) & 1 (parent) */
{
destroy_flush_dependency(entry_type, 1, entry_type, 0);
- if ( !pass ) CACHE_ERROR("destroy_flush_dependency failed")
+ if(!pass) CACHE_ERROR("destroy_flush_dependency failed")
/* Change expected values, and verify the status of the entries
* after destroy flush dependency
@@ -30858,7 +30720,7 @@ check_flush_deps_order(void)
(int)0, /* int tag */
(int)5, /* int num_entries */
expected); /* struct expected_entry_staus[] */
- if ( !pass ) CACHE_ERROR("verify_entry_status failed")
+ if(!pass) CACHE_ERROR("verify_entry_status failed")
}
/* Test Case #1b - Single flush dependency relationship, decreasing addr order */
@@ -30866,10 +30728,10 @@ check_flush_deps_order(void)
/* Create flush dependency between entries 0 (child) & 1 (parent) */
{
protect_entry(file_ptr, entry_type, 0);
- if ( !pass ) CACHE_ERROR("protect_entry failed")
+ if(!pass) CACHE_ERROR("protect_entry failed")
create_flush_dependency(entry_type, 0, entry_type, 1);
- if ( !pass ) CACHE_ERROR("create_flush_dependency failed")
+ if(!pass) CACHE_ERROR("create_flush_dependency failed")
/* Change expected values, and verify the status of the entries
* after creating flush dependency
@@ -30886,7 +30748,7 @@ check_flush_deps_order(void)
(int)0, /* int tag */
(int)5, /* int num_entries */
expected); /* struct expected_entry_staus[] */
- if ( !pass ) CACHE_ERROR("verify_entry_status failed")
+ if(!pass) CACHE_ERROR("verify_entry_status failed")
}
/* Flush the cache and verify that the entries were flushed in correct order */
@@ -30902,12 +30764,12 @@ check_flush_deps_order(void)
entry_type, /* int32_t type */
0, /* int32_t idx */
H5C__NO_FLAGS_SET); /* unsigned int flags */
- if ( !pass ) CACHE_ERROR("unprotect_entry failed")
+ if(!pass) CACHE_ERROR("unprotect_entry failed")
/* Mark entries 0 & 1 dirty, so they are flushed */
dirty_entry(file_ptr, entry_type, 0, TRUE);
dirty_entry(file_ptr, entry_type, 1, FALSE);
- if ( !pass ) CACHE_ERROR("dirty_entry failed")
+ if(!pass) CACHE_ERROR("dirty_entry failed")
/* Reset 'serialized' flag & 'flush_order' value in expected array */
expected[0].serialized = FALSE;
@@ -30919,7 +30781,7 @@ check_flush_deps_order(void)
flush_order = 0;
result = H5C_flush_cache(file_ptr, H5AC_ind_read_dxpl_id, H5C__NO_FLAGS_SET);
- if( result < 0 ) CACHE_ERROR("flushing entries with flush dependendices")
+ if(result < 0) CACHE_ERROR("flushing entries with flush dependendices")
/* Change expected values, and verify the status of the entries
* after destroy flush dependency
@@ -30937,13 +30799,13 @@ check_flush_deps_order(void)
(int)0, /* int tag */
(int)5, /* int num_entries */
expected); /* struct expected_entry_staus[] */
- if ( !pass ) CACHE_ERROR("verify_entry_status failed")
+ if(!pass) CACHE_ERROR("verify_entry_status failed")
}
/* Destroy flush dependency between entries 0 (child) & 1 (parent) */
{
destroy_flush_dependency(entry_type, 0, entry_type, 1);
- if ( !pass ) CACHE_ERROR("destroy_flush_dependency failed")
+ if(!pass) CACHE_ERROR("destroy_flush_dependency failed")
/* Change expected values, and verify the status of the entries
* after destroy flush dependency
@@ -30957,7 +30819,7 @@ check_flush_deps_order(void)
(int)0, /* int tag */
(int)5, /* int num_entries */
expected); /* struct expected_entry_staus[] */
- if ( !pass ) CACHE_ERROR("verify_entry_status failed")
+ if(!pass) CACHE_ERROR("verify_entry_status failed")
}
/* Test Case #2a - Multiple children for one parent flush dependency relationship
@@ -30967,13 +30829,13 @@ check_flush_deps_order(void)
/* Create flush dependency between entries 0, 1 (children) & 2 (parent) */
{
protect_entry(file_ptr, entry_type, 2);
- if ( !pass ) CACHE_ERROR("protect_entry failed")
+ if(!pass) CACHE_ERROR("protect_entry failed")
create_flush_dependency(entry_type, 2, entry_type, 0);
- if ( !pass ) CACHE_ERROR("create_flush_dependency failed")
+ if(!pass) CACHE_ERROR("create_flush_dependency failed")
create_flush_dependency(entry_type, 2, entry_type, 1);
- if ( !pass ) CACHE_ERROR("create_flush_dependency failed")
+ if(!pass) CACHE_ERROR("create_flush_dependency failed")
/* Change expected values, and verify the status of the entries
* after creating flush dependency
@@ -30993,7 +30855,7 @@ check_flush_deps_order(void)
(int)0, /* int tag */
(int)5, /* int num_entries */
expected); /* struct expected_entry_staus[] */
- if ( !pass ) CACHE_ERROR("verify_entry_status failed")
+ if(!pass) CACHE_ERROR("verify_entry_status failed")
}
/* Flush the cache and verify that the entries were flushed in correct order */
@@ -31011,13 +30873,13 @@ check_flush_deps_order(void)
entry_type, /* int32_t type */
2, /* int32_t idx */
H5C__NO_FLAGS_SET); /* unsigned int flags */
- if ( !pass ) CACHE_ERROR("unprotect_entry failed")
+ if(!pass) CACHE_ERROR("unprotect_entry failed")
/* Mark entries 0, 1 & 2 dirty, so they are flushed */
dirty_entry(file_ptr, entry_type, 0, FALSE);
dirty_entry(file_ptr, entry_type, 1, FALSE);
dirty_entry(file_ptr, entry_type, 2, TRUE);
- if ( !pass ) CACHE_ERROR("dirty_entry failed")
+ if(!pass) CACHE_ERROR("dirty_entry failed")
/* Reset 'serialized' flag & 'flush_order' value in expected array */
expected[0].serialized = FALSE;
@@ -31031,7 +30893,7 @@ check_flush_deps_order(void)
flush_order = 0;
result = H5C_flush_cache(file_ptr, H5AC_ind_read_dxpl_id, H5C__NO_FLAGS_SET);
- if( result < 0 ) CACHE_ERROR("flushing entries with flush dependendices")
+ if(result < 0) CACHE_ERROR("flushing entries with flush dependendices")
/* Change expected values, and verify the status of the entries
* after destroy flush dependency
@@ -31052,16 +30914,16 @@ check_flush_deps_order(void)
(int)0, /* int tag */
(int)5, /* int num_entries */
expected); /* struct expected_entry_staus[] */
- if ( !pass ) CACHE_ERROR("verify_entry_status failed")
+ if(!pass) CACHE_ERROR("verify_entry_status failed")
}
/* Destroy flush dependency between entries 0, 1 (children) & 2 (parent) */
{
destroy_flush_dependency(entry_type, 2, entry_type, 0);
- if ( !pass ) CACHE_ERROR("destroy_flush_dependency failed")
+ if(!pass) CACHE_ERROR("destroy_flush_dependency failed")
destroy_flush_dependency(entry_type, 2, entry_type, 1);
- if ( !pass ) CACHE_ERROR("destroy_flush_dependency failed")
+ if(!pass) CACHE_ERROR("destroy_flush_dependency failed")
/* Change expected values, and verify the status of the entries
* after destroy flush dependency
@@ -31076,7 +30938,7 @@ check_flush_deps_order(void)
(int)0, /* int tag */
(int)5, /* int num_entries */
expected); /* struct expected_entry_staus[] */
- if ( !pass ) CACHE_ERROR("verify_entry_status failed")
+ if(!pass) CACHE_ERROR("verify_entry_status failed")
}
/* Test Case #2b - Multiple children for one parent flush dependency relationship
@@ -31086,13 +30948,13 @@ check_flush_deps_order(void)
/* Create flush dependency between entries 1, 2 (children) & 0 (parent) */
{
protect_entry(file_ptr, entry_type, 0);
- if ( !pass ) CACHE_ERROR("protect_entry failed")
+ if(!pass) CACHE_ERROR("protect_entry failed")
create_flush_dependency(entry_type, 0, entry_type, 1);
- if ( !pass ) CACHE_ERROR("create_flush_dependency failed")
+ if(!pass) CACHE_ERROR("create_flush_dependency failed")
create_flush_dependency(entry_type, 0, entry_type, 2);
- if ( !pass ) CACHE_ERROR("create_flush_dependency failed")
+ if(!pass) CACHE_ERROR("create_flush_dependency failed")
/* Change expected values, and verify the status of the entries
* after creating flush dependency
@@ -31112,7 +30974,7 @@ check_flush_deps_order(void)
(int)0, /* int tag */
(int)5, /* int num_entries */
expected); /* struct expected_entry_staus[] */
- if ( !pass ) CACHE_ERROR("verify_entry_status failed")
+ if(!pass) CACHE_ERROR("verify_entry_status failed")
}
/* Flush the cache and verify that the entries were flushed in correct order */
@@ -31130,13 +30992,13 @@ check_flush_deps_order(void)
entry_type, /* int32_t type */
0, /* int32_t idx */
H5C__NO_FLAGS_SET); /* unsigned int flags */
- if ( !pass ) CACHE_ERROR("unprotect_entry failed")
+ if(!pass) CACHE_ERROR("unprotect_entry failed")
/* Mark entries 0, 1 & 2 dirty, so they are flushed */
dirty_entry(file_ptr, entry_type, 0, TRUE);
dirty_entry(file_ptr, entry_type, 1, FALSE);
dirty_entry(file_ptr, entry_type, 2, FALSE);
- if ( !pass ) CACHE_ERROR("dirty_entry failed")
+ if(!pass) CACHE_ERROR("dirty_entry failed")
/* Reset 'serialized' flag & 'flush_order' value in expected array */
expected[0].serialized = FALSE;
@@ -31150,7 +31012,7 @@ check_flush_deps_order(void)
flush_order = 0;
result = H5C_flush_cache(file_ptr, H5AC_ind_read_dxpl_id, H5C__NO_FLAGS_SET);
- if( result < 0 ) CACHE_ERROR("flushing entries with flush dependendices")
+ if(result < 0) CACHE_ERROR("flushing entries with flush dependendices")
/* Change expected values, and verify the status of the entries
* after destroy flush dependency
@@ -31171,16 +31033,16 @@ check_flush_deps_order(void)
(int)0, /* int tag */
(int)5, /* int num_entries */
expected); /* struct expected_entry_staus[] */
- if ( !pass ) CACHE_ERROR("verify_entry_status failed")
+ if(!pass) CACHE_ERROR("verify_entry_status failed")
}
/* Destroy flush dependency between entries 1, 2 (children) & 0 (parent) */
{
destroy_flush_dependency(entry_type, 0, entry_type, 1);
- if ( !pass ) CACHE_ERROR("destroy_flush_dependency failed")
+ if(!pass) CACHE_ERROR("destroy_flush_dependency failed")
destroy_flush_dependency(entry_type, 0, entry_type, 2);
- if ( !pass ) CACHE_ERROR("destroy_flush_dependency failed")
+ if(!pass) CACHE_ERROR("destroy_flush_dependency failed")
/* Change expected values, and verify the status of the entries
* after destroy flush dependency
@@ -31195,7 +31057,7 @@ check_flush_deps_order(void)
(int)0, /* int tag */
(int)5, /* int num_entries */
expected); /* struct expected_entry_staus[] */
- if ( !pass ) CACHE_ERROR("verify_entry_status failed")
+ if(!pass) CACHE_ERROR("verify_entry_status failed")
}
/* Test Case #3a - Single chain of flush dependencies, 4 entries tall,
@@ -31205,10 +31067,10 @@ check_flush_deps_order(void)
/* Create flush dependency between entries (child) 0->1->2->3 (parent) */
{
protect_entry(file_ptr, entry_type, 1);
- if ( !pass ) CACHE_ERROR("protect_entry failed")
+ if(!pass) CACHE_ERROR("protect_entry failed")
create_flush_dependency(entry_type, 1, entry_type, 0);
- if ( !pass ) CACHE_ERROR("create_flush_dependency failed")
+ if(!pass) CACHE_ERROR("create_flush_dependency failed")
/* Change expected values, and verify the status of the entries
* after creating flush dependency
@@ -31225,13 +31087,13 @@ check_flush_deps_order(void)
(int)0, /* int tag */
(int)5, /* int num_entries */
expected); /* struct expected_entry_staus[] */
- if ( !pass ) CACHE_ERROR("verify_entry_status failed")
+ if(!pass) CACHE_ERROR("verify_entry_status failed")
protect_entry(file_ptr, entry_type, 2);
- if ( !pass ) CACHE_ERROR("protect_entry failed")
+ if(!pass) CACHE_ERROR("protect_entry failed")
create_flush_dependency(entry_type, 2, entry_type, 1);
- if ( !pass ) CACHE_ERROR("create_flush_dependency failed")
+ if(!pass) CACHE_ERROR("create_flush_dependency failed")
/* Change expected values, and verify the status of the entries
* after creating flush dependency
@@ -31248,13 +31110,13 @@ check_flush_deps_order(void)
(int)0, /* int tag */
(int)5, /* int num_entries */
expected); /* struct expected_entry_staus[] */
- if ( !pass ) CACHE_ERROR("verify_entry_status failed")
+ if(!pass) CACHE_ERROR("verify_entry_status failed")
protect_entry(file_ptr, entry_type, 3);
- if ( !pass ) CACHE_ERROR("protect_entry failed")
+ if(!pass) CACHE_ERROR("protect_entry failed")
create_flush_dependency(entry_type, 3, entry_type, 2);
- if ( !pass ) CACHE_ERROR("create_flush_dependency failed")
+ if(!pass) CACHE_ERROR("create_flush_dependency failed")
/* Change expected values, and verify the status of the entries
* after creating flush dependency
@@ -31271,7 +31133,7 @@ check_flush_deps_order(void)
(int)0, /* int tag */
(int)5, /* int num_entries */
expected); /* struct expected_entry_staus[] */
- if ( !pass ) CACHE_ERROR("verify_entry_status failed")
+ if(!pass) CACHE_ERROR("verify_entry_status failed")
}
/* Flush the cache and verify that the entries were flushed in correct order */
@@ -31291,26 +31153,26 @@ check_flush_deps_order(void)
entry_type, /* int32_t type */
1, /* int32_t idx */
H5C__NO_FLAGS_SET); /* unsigned int flags */
- if ( !pass ) CACHE_ERROR("unprotect_entry failed")
+ if(!pass) CACHE_ERROR("unprotect_entry failed")
unprotect_entry(file_ptr, /* H5F_t * file_ptr */
entry_type, /* int32_t type */
2, /* int32_t idx */
H5C__NO_FLAGS_SET); /* unsigned int flags */
- if ( !pass ) CACHE_ERROR("unprotect_entry failed")
+ if(!pass) CACHE_ERROR("unprotect_entry failed")
unprotect_entry(file_ptr, /* H5F_t * file_ptr */
entry_type, /* int32_t type */
3, /* int32_t idx */
H5C__NO_FLAGS_SET); /* unsigned int flags */
- if ( !pass ) CACHE_ERROR("unprotect_entry failed")
+ if(!pass) CACHE_ERROR("unprotect_entry failed")
/* Mark entries 0-3 dirty, so they are flushed */
dirty_entry(file_ptr, entry_type, 0, FALSE);
dirty_entry(file_ptr, entry_type, 1, TRUE);
dirty_entry(file_ptr, entry_type, 2, TRUE);
dirty_entry(file_ptr, entry_type, 3, TRUE);
- if ( !pass ) CACHE_ERROR("dirty_entry failed")
+ if(!pass) CACHE_ERROR("dirty_entry failed")
/* Reset 'serialized' flag & 'flush_order' value in expected array */
expected[0].serialized = FALSE;
@@ -31326,7 +31188,7 @@ check_flush_deps_order(void)
flush_order = 0;
result = H5C_flush_cache(file_ptr, H5AC_ind_read_dxpl_id, H5C__NO_FLAGS_SET);
- if( result < 0 ) CACHE_ERROR("flushing entries with flush dependendices")
+ if(result < 0) CACHE_ERROR("flushing entries with flush dependendices")
/* Change expected values, and verify the status of the entries
* after destroy flush dependency
@@ -31351,13 +31213,13 @@ check_flush_deps_order(void)
(int)0, /* int tag */
(int)5, /* int num_entries */
expected); /* struct expected_entry_staus[] */
- if ( !pass ) CACHE_ERROR("verify_entry_status failed")
+ if(!pass) CACHE_ERROR("verify_entry_status failed")
}
/* Destroy flush dependency between entries, from the "top down" */
{
destroy_flush_dependency(entry_type, 3, entry_type, 2);
- if ( !pass ) CACHE_ERROR("destroy_flush_dependency failed")
+ if(!pass) CACHE_ERROR("destroy_flush_dependency failed")
/* Change expected values, and verify the status of the entries
* after destroying flush dependency
@@ -31371,10 +31233,10 @@ check_flush_deps_order(void)
(int)0, /* int tag */
(int)5, /* int num_entries */
expected); /* struct expected_entry_staus[] */
- if ( !pass ) CACHE_ERROR("verify_entry_status failed")
+ if(!pass) CACHE_ERROR("verify_entry_status failed")
destroy_flush_dependency(entry_type, 2, entry_type, 1);
- if ( !pass ) CACHE_ERROR("destroy_flush_dependency failed")
+ if(!pass) CACHE_ERROR("destroy_flush_dependency failed")
/* Change expected values, and verify the status of the entries
* after destroying flush dependency
@@ -31388,10 +31250,10 @@ check_flush_deps_order(void)
(int)0, /* int tag */
(int)5, /* int num_entries */
expected); /* struct expected_entry_staus[] */
- if ( !pass ) CACHE_ERROR("verify_entry_status failed")
+ if(!pass) CACHE_ERROR("verify_entry_status failed")
destroy_flush_dependency(entry_type, 1, entry_type, 0);
- if ( !pass ) CACHE_ERROR("destroy_flush_dependency failed")
+ if(!pass) CACHE_ERROR("destroy_flush_dependency failed")
/* Change expected values, and verify the status of the entries
* after destroying flush dependency
@@ -31405,7 +31267,7 @@ check_flush_deps_order(void)
(int)0, /* int tag */
(int)5, /* int num_entries */
expected); /* struct expected_entry_staus[] */
- if ( !pass ) CACHE_ERROR("verify_entry_status failed")
+ if(!pass) CACHE_ERROR("verify_entry_status failed")
}
/* Test Case #3b - Single chain of flush dependencies, 4 entries tall
@@ -31415,10 +31277,10 @@ check_flush_deps_order(void)
/* Create flush dependency between entries (child) 0->1->2->3 (parent) */
{
protect_entry(file_ptr, entry_type, 0);
- if ( !pass ) CACHE_ERROR("protect_entry failed")
+ if(!pass) CACHE_ERROR("protect_entry failed")
create_flush_dependency(entry_type, 0, entry_type, 1);
- if ( !pass ) CACHE_ERROR("create_flush_dependency failed")
+ if(!pass) CACHE_ERROR("create_flush_dependency failed")
/* Change expected values, and verify the status of the entries
* after creating flush dependency
@@ -31435,13 +31297,13 @@ check_flush_deps_order(void)
(int)0, /* int tag */
(int)5, /* int num_entries */
expected); /* struct expected_entry_staus[] */
- if ( !pass ) CACHE_ERROR("verify_entry_status failed")
+ if(!pass) CACHE_ERROR("verify_entry_status failed")
protect_entry(file_ptr, entry_type, 1);
- if ( !pass ) CACHE_ERROR("protect_entry failed")
+ if(!pass) CACHE_ERROR("protect_entry failed")
create_flush_dependency(entry_type, 1, entry_type, 2);
- if ( !pass ) CACHE_ERROR("create_flush_dependency failed")
+ if(!pass) CACHE_ERROR("create_flush_dependency failed")
/* Change expected values, and verify the status of the entries
* after creating flush dependency
@@ -31458,13 +31320,13 @@ check_flush_deps_order(void)
(int)0, /* int tag */
(int)5, /* int num_entries */
expected); /* struct expected_entry_staus[] */
- if ( !pass ) CACHE_ERROR("verify_entry_status failed")
+ if(!pass) CACHE_ERROR("verify_entry_status failed")
protect_entry(file_ptr, entry_type, 2);
- if ( !pass ) CACHE_ERROR("protect_entry failed")
+ if(!pass) CACHE_ERROR("protect_entry failed")
create_flush_dependency(entry_type, 2, entry_type, 3);
- if ( !pass ) CACHE_ERROR("create_flush_dependency failed")
+ if(!pass) CACHE_ERROR("create_flush_dependency failed")
/* Change expected values, and verify the status of the entries
* after creating flush dependency
@@ -31481,7 +31343,7 @@ check_flush_deps_order(void)
(int)0, /* int tag */
(int)5, /* int num_entries */
expected); /* struct expected_entry_staus[] */
- if ( !pass ) CACHE_ERROR("verify_entry_status failed")
+ if(!pass) CACHE_ERROR("verify_entry_status failed")
}
/* Flush the cache and verify that the entries were flushed in correct order */
@@ -31501,26 +31363,26 @@ check_flush_deps_order(void)
entry_type, /* int32_t type */
0, /* int32_t idx */
H5C__NO_FLAGS_SET); /* unsigned int flags */
- if ( !pass ) CACHE_ERROR("unprotect_entry failed")
+ if(!pass) CACHE_ERROR("unprotect_entry failed")
unprotect_entry(file_ptr, /* H5F_t * file_ptr */
entry_type, /* int32_t type */
1, /* int32_t idx */
H5C__NO_FLAGS_SET); /* unsigned int flags */
- if ( !pass ) CACHE_ERROR("unprotect_entry failed")
+ if(!pass) CACHE_ERROR("unprotect_entry failed")
unprotect_entry(file_ptr, /* H5F_t * file_ptr */
entry_type, /* int32_t type */
2, /* int32_t idx */
H5C__NO_FLAGS_SET); /* unsigned int flags */
- if ( !pass ) CACHE_ERROR("unprotect_entry failed")
+ if(!pass) CACHE_ERROR("unprotect_entry failed")
/* Mark entries 0-3 dirty, so they are flushed */
dirty_entry(file_ptr, entry_type, 0, TRUE);
dirty_entry(file_ptr, entry_type, 1, TRUE);
dirty_entry(file_ptr, entry_type, 2, TRUE);
dirty_entry(file_ptr, entry_type, 3, FALSE);
- if ( !pass ) CACHE_ERROR("dirty_entry failed")
+ if(!pass) CACHE_ERROR("dirty_entry failed")
/* Reset 'serialized' flag & 'flush_order' value in expected array */
expected[0].serialized = FALSE;
@@ -31536,7 +31398,7 @@ check_flush_deps_order(void)
flush_order = 0;
result = H5C_flush_cache(file_ptr, H5AC_ind_read_dxpl_id, H5C__NO_FLAGS_SET);
- if( result < 0 ) CACHE_ERROR("flushing entries with flush dependendices")
+ if(result < 0) CACHE_ERROR("flushing entries with flush dependendices")
/* Change expected values, and verify the status of the entries
* after destroy flush dependency
@@ -31562,13 +31424,13 @@ check_flush_deps_order(void)
(int)0, /* int tag */
(int)5, /* int num_entries */
expected); /* struct expected_entry_staus[] */
- if ( !pass ) CACHE_ERROR("verify_entry_status failed")
+ if(!pass) CACHE_ERROR("verify_entry_status failed")
}
/* Destroy flush dependency between entries, from the "bottom up" */
{
destroy_flush_dependency(entry_type, 2, entry_type, 3);
- if ( !pass ) CACHE_ERROR("destroy_flush_dependency failed")
+ if(!pass) CACHE_ERROR("destroy_flush_dependency failed")
/* Change expected values, and verify the status of the entries
* after destroying flush dependency
@@ -31582,10 +31444,10 @@ check_flush_deps_order(void)
(int)0, /* int tag */
(int)5, /* int num_entries */
expected); /* struct expected_entry_staus[] */
- if ( !pass ) CACHE_ERROR("verify_entry_status failed")
+ if(!pass) CACHE_ERROR("verify_entry_status failed")
destroy_flush_dependency(entry_type, 1, entry_type, 2);
- if ( !pass ) CACHE_ERROR("destroy_flush_dependency failed")
+ if(!pass) CACHE_ERROR("destroy_flush_dependency failed")
/* Change expected values, and verify the status of the entries
* after destroying flush dependency
@@ -31599,10 +31461,10 @@ check_flush_deps_order(void)
(int)0, /* int tag */
(int)5, /* int num_entries */
expected); /* struct expected_entry_staus[] */
- if ( !pass ) CACHE_ERROR("verify_entry_status failed")
+ if(!pass) CACHE_ERROR("verify_entry_status failed")
destroy_flush_dependency(entry_type, 0, entry_type, 1);
- if ( !pass ) CACHE_ERROR("destroy_flush_dependency failed")
+ if(!pass) CACHE_ERROR("destroy_flush_dependency failed")
/* Change expected values, and verify the status of the entries
* after destroying flush dependency
@@ -31616,7 +31478,7 @@ check_flush_deps_order(void)
(int)0, /* int tag */
(int)5, /* int num_entries */
expected); /* struct expected_entry_staus[] */
- if ( !pass ) CACHE_ERROR("verify_entry_status failed")
+ if(!pass) CACHE_ERROR("verify_entry_status failed")
}
/* Test Case #4a - Multiple children for a single parent, increasing addr order */
@@ -31624,11 +31486,11 @@ check_flush_deps_order(void)
/* Create flush dependency between entries (child) 0,1,2,3->4 (parent) */
{
protect_entry(file_ptr, entry_type, 4);
- if ( !pass ) CACHE_ERROR("protect_entry failed")
+ if(!pass) CACHE_ERROR("protect_entry failed")
for(u = 0; u < 4; u++) {
create_flush_dependency(entry_type, 4, entry_type, (int32_t)u);
- if ( !pass ) CACHE_ERROR("create_flush_dependency failed")
+ if(!pass) CACHE_ERROR("create_flush_dependency failed")
/* Change expected values, and verify the status of the entries
* after creating flush dependency
@@ -31645,7 +31507,7 @@ check_flush_deps_order(void)
(int)0, /* int tag */
(int)5, /* int num_entries */
expected); /* struct expected_entry_staus[] */
- if ( !pass ) CACHE_ERROR("verify_entry_status failed")
+ if(!pass) CACHE_ERROR("verify_entry_status failed")
} /* end for */
}
@@ -31668,7 +31530,7 @@ check_flush_deps_order(void)
entry_type, /* int32_t type */
4, /* int32_t idx */
H5C__NO_FLAGS_SET); /* unsigned int flags */
- if ( !pass ) CACHE_ERROR("unprotect_entry failed")
+ if(!pass) CACHE_ERROR("unprotect_entry failed")
/* Mark entries 0-4 dirty, so they are flushed */
dirty_entry(file_ptr, entry_type, 0, FALSE);
@@ -31676,7 +31538,7 @@ check_flush_deps_order(void)
dirty_entry(file_ptr, entry_type, 2, FALSE);
dirty_entry(file_ptr, entry_type, 3, FALSE);
dirty_entry(file_ptr, entry_type, 4, TRUE);
- if ( !pass ) CACHE_ERROR("dirty_entry failed")
+ if(!pass) CACHE_ERROR("dirty_entry failed")
/* Reset 'serialized' flag & 'flush_order' value in expected array */
expected[0].serialized = FALSE;
@@ -31694,7 +31556,7 @@ check_flush_deps_order(void)
flush_order = 0;
result = H5C_flush_cache(file_ptr, H5AC_ind_read_dxpl_id, H5C__NO_FLAGS_SET);
- if( result < 0 ) CACHE_ERROR("flushing entries with flush dependendices")
+ if(result < 0) CACHE_ERROR("flushing entries with flush dependendices")
/* Change expected values, and verify the status of the entries
* after destroy flush dependency
@@ -31721,14 +31583,14 @@ check_flush_deps_order(void)
(int)0, /* int tag */
(int)5, /* int num_entries */
expected); /* struct expected_entry_staus[] */
- if ( !pass ) CACHE_ERROR("verify_entry_status failed")
+ if(!pass) CACHE_ERROR("verify_entry_status failed")
}
/* Destroy flush dependency between entries */
{
for(u = 0; u < 4; u++) {
destroy_flush_dependency(entry_type, 4, entry_type, (int32_t)u);
- if ( !pass ) CACHE_ERROR("destroy_flush_dependency failed")
+ if(!pass) CACHE_ERROR("destroy_flush_dependency failed")
/* Change expected values, and verify the status of the entries
* after destroying flush dependency
@@ -31749,7 +31611,7 @@ check_flush_deps_order(void)
(int)0, /* int tag */
(int)5, /* int num_entries */
expected); /* struct expected_entry_staus[] */
- if ( !pass ) CACHE_ERROR("verify_entry_status failed")
+ if(!pass) CACHE_ERROR("verify_entry_status failed")
} /* end for */
}
@@ -31758,11 +31620,11 @@ check_flush_deps_order(void)
/* Create flush dependency between entries (child) 0,1,2,3->4 (parent) */
{
protect_entry(file_ptr, entry_type, 0);
- if ( !pass ) CACHE_ERROR("protect_entry failed")
+ if(!pass) CACHE_ERROR("protect_entry failed")
for(u = 1; u < 5; u++) {
create_flush_dependency(entry_type, 0, entry_type, (int32_t)u);
- if ( !pass ) CACHE_ERROR("create_flush_dependency failed")
+ if(!pass) CACHE_ERROR("create_flush_dependency failed")
/* Change expected values, and verify the status of the entries
* after creating flush dependency
@@ -31779,7 +31641,7 @@ check_flush_deps_order(void)
(int)0, /* int tag */
(int)5, /* int num_entries */
expected); /* struct expected_entry_staus[] */
- if ( !pass ) CACHE_ERROR("verify_entry_status failed")
+ if(!pass) CACHE_ERROR("verify_entry_status failed")
} /* end for */
}
@@ -31802,7 +31664,7 @@ check_flush_deps_order(void)
entry_type, /* int32_t type */
0, /* int32_t idx */
H5C__NO_FLAGS_SET); /* unsigned int flags */
- if ( !pass ) CACHE_ERROR("unprotect_entry failed")
+ if(!pass) CACHE_ERROR("unprotect_entry failed")
/* Mark entries 0-4 dirty, so they are flushed */
dirty_entry(file_ptr, entry_type, 0, TRUE);
@@ -31810,7 +31672,7 @@ check_flush_deps_order(void)
dirty_entry(file_ptr, entry_type, 2, FALSE);
dirty_entry(file_ptr, entry_type, 3, FALSE);
dirty_entry(file_ptr, entry_type, 4, FALSE);
- if ( !pass ) CACHE_ERROR("dirty_entry failed")
+ if(!pass) CACHE_ERROR("dirty_entry failed")
/* Reset 'serialized' flag & 'flush_order' value in expected array */
expected[0].serialized = FALSE;
@@ -31828,7 +31690,7 @@ check_flush_deps_order(void)
flush_order = 0;
result = H5C_flush_cache(file_ptr, H5AC_ind_read_dxpl_id, H5C__NO_FLAGS_SET);
- if( result < 0 ) CACHE_ERROR("flushing entries with flush dependendices")
+ if(result < 0) CACHE_ERROR("flushing entries with flush dependendices")
/* Change expected values, and verify the status of the entries
* after destroy flush dependency
@@ -31855,14 +31717,14 @@ check_flush_deps_order(void)
(int)0, /* int tag */
(int)5, /* int num_entries */
expected); /* struct expected_entry_staus[] */
- if ( !pass ) CACHE_ERROR("verify_entry_status failed")
+ if(!pass) CACHE_ERROR("verify_entry_status failed")
}
/* Destroy flush dependency between entries */
{
for(u = 1; u < 5; u++) {
destroy_flush_dependency(entry_type, 0, entry_type, (int32_t)u);
- if ( !pass ) CACHE_ERROR("destroy_flush_dependency failed")
+ if(!pass) CACHE_ERROR("destroy_flush_dependency failed")
/* Change expected values, and verify the status of the entries
* after destroying flush dependency
@@ -31883,7 +31745,7 @@ check_flush_deps_order(void)
(int)0, /* int tag */
(int)5, /* int num_entries */
expected); /* struct expected_entry_staus[] */
- if ( !pass ) CACHE_ERROR("verify_entry_status failed")
+ if(!pass) CACHE_ERROR("verify_entry_status failed")
} /* end for */
}
@@ -31896,10 +31758,10 @@ check_flush_deps_order(void)
*/
{
protect_entry(file_ptr, entry_type, 1);
- if ( !pass ) CACHE_ERROR("protect_entry failed")
+ if(!pass) CACHE_ERROR("protect_entry failed")
create_flush_dependency(entry_type, 1, entry_type, 0);
- if ( !pass ) CACHE_ERROR("create_flush_dependency failed")
+ if(!pass) CACHE_ERROR("create_flush_dependency failed")
/* Change expected values, and verify the status of the entries
* after creating flush dependency
@@ -31916,13 +31778,13 @@ check_flush_deps_order(void)
(int)0, /* int tag */
(int)5, /* int num_entries */
expected); /* struct expected_entry_staus[] */
- if ( !pass ) CACHE_ERROR("verify_entry_status failed")
+ if(!pass) CACHE_ERROR("verify_entry_status failed")
protect_entry(file_ptr, entry_type, 4);
- if ( !pass ) CACHE_ERROR("protect_entry failed")
+ if(!pass) CACHE_ERROR("protect_entry failed")
create_flush_dependency(entry_type, 4, entry_type, 3);
- if ( !pass ) CACHE_ERROR("create_flush_dependency failed")
+ if(!pass) CACHE_ERROR("create_flush_dependency failed")
/* Change expected values, and verify the status of the entries
* after creating flush dependency
@@ -31939,13 +31801,13 @@ check_flush_deps_order(void)
(int)0, /* int tag */
(int)5, /* int num_entries */
expected); /* struct expected_entry_staus[] */
- if ( !pass ) CACHE_ERROR("verify_entry_status failed")
+ if(!pass) CACHE_ERROR("verify_entry_status failed")
protect_entry(file_ptr, entry_type, 0);
- if ( !pass ) CACHE_ERROR("protect_entry failed")
+ if(!pass) CACHE_ERROR("protect_entry failed")
create_flush_dependency(entry_type, 0, entry_type, 4);
- if ( !pass ) CACHE_ERROR("create_flush_dependency failed")
+ if(!pass) CACHE_ERROR("create_flush_dependency failed")
/* Change expected values, and verify the status of the entries
* after creating flush dependency
@@ -31962,7 +31824,7 @@ check_flush_deps_order(void)
(int)0, /* int tag */
(int)5, /* int num_entries */
expected); /* struct expected_entry_staus[] */
- if ( !pass ) CACHE_ERROR("verify_entry_status failed")
+ if(!pass) CACHE_ERROR("verify_entry_status failed")
}
@@ -31984,26 +31846,26 @@ check_flush_deps_order(void)
entry_type, /* int32_t type */
0, /* int32_t idx */
H5C__NO_FLAGS_SET); /* unsigned int flags */
- if ( !pass ) CACHE_ERROR("unprotect_entry failed")
+ if(!pass) CACHE_ERROR("unprotect_entry failed")
unprotect_entry(file_ptr, /* H5F_t * file_ptr */
entry_type, /* int32_t type */
1, /* int32_t idx */
H5C__NO_FLAGS_SET); /* unsigned int flags */
- if ( !pass ) CACHE_ERROR("unprotect_entry failed")
+ if(!pass) CACHE_ERROR("unprotect_entry failed")
unprotect_entry(file_ptr, /* H5F_t * file_ptr */
entry_type, /* int32_t type */
4, /* int32_t idx */
H5C__NO_FLAGS_SET); /* unsigned int flags */
- if ( !pass ) CACHE_ERROR("unprotect_entry failed")
+ if(!pass) CACHE_ERROR("unprotect_entry failed")
/* Mark entries 0 & 1, 3 & 4 dirty, so they are flushed */
dirty_entry(file_ptr, entry_type, 0, TRUE);
dirty_entry(file_ptr, entry_type, 1, TRUE);
dirty_entry(file_ptr, entry_type, 3, FALSE);
dirty_entry(file_ptr, entry_type, 4, TRUE);
- if ( !pass ) CACHE_ERROR("dirty_entry failed")
+ if(!pass) CACHE_ERROR("dirty_entry failed")
/* Reset 'serialized' flag & 'flush_order' value in expected array */
expected[0].serialized = FALSE;
@@ -32021,7 +31883,7 @@ check_flush_deps_order(void)
flush_order = 0;
result = H5C_flush_cache(file_ptr, H5AC_ind_read_dxpl_id, H5C__NO_FLAGS_SET);
- if( result < 0 ) CACHE_ERROR("flushing entries with flush dependendices")
+ if(result < 0) CACHE_ERROR("flushing entries with flush dependendices")
/* Change expected values, and verify the status of the entries
* after destroy flush dependency
@@ -32049,13 +31911,13 @@ check_flush_deps_order(void)
(int)0, /* int tag */
(int)5, /* int num_entries */
expected); /* struct expected_entry_staus[] */
- if ( !pass ) CACHE_ERROR("verify_entry_status failed")
+ if(!pass) CACHE_ERROR("verify_entry_status failed")
}
/* Destroy flush dependency between entries, detaching 3->4 from 0 first */
{
destroy_flush_dependency(entry_type, 0, entry_type, 4);
- if ( !pass ) CACHE_ERROR("destroy_flush_dependency failed")
+ if(!pass) CACHE_ERROR("destroy_flush_dependency failed")
/* Change expected values, and verify the status of the entries
* after destroying flush dependency
@@ -32069,10 +31931,10 @@ check_flush_deps_order(void)
(int)0, /* int tag */
(int)5, /* int num_entries */
expected); /* struct expected_entry_staus[] */
- if ( !pass ) CACHE_ERROR("verify_entry_status failed")
+ if(!pass) CACHE_ERROR("verify_entry_status failed")
destroy_flush_dependency(entry_type, 4, entry_type, 3);
- if ( !pass ) CACHE_ERROR("destroy_flush_dependency failed")
+ if(!pass) CACHE_ERROR("destroy_flush_dependency failed")
/* Change expected values, and verify the status of the entries
* after destroying flush dependency
@@ -32086,10 +31948,10 @@ check_flush_deps_order(void)
(int)0, /* int tag */
(int)5, /* int num_entries */
expected); /* struct expected_entry_staus[] */
- if ( !pass ) CACHE_ERROR("verify_entry_status failed")
+ if(!pass) CACHE_ERROR("verify_entry_status failed")
destroy_flush_dependency(entry_type, 1, entry_type, 0);
- if ( !pass ) CACHE_ERROR("destroy_flush_dependency failed")
+ if(!pass) CACHE_ERROR("destroy_flush_dependency failed")
/* Change expected values, and verify the status of the entries
* after destroying flush dependency
@@ -32103,7 +31965,7 @@ check_flush_deps_order(void)
(int)0, /* int tag */
(int)5, /* int num_entries */
expected); /* struct expected_entry_staus[] */
- if ( !pass ) CACHE_ERROR("verify_entry_status failed")
+ if(!pass) CACHE_ERROR("verify_entry_status failed")
}
/* Test Case #5b - Join two flush dependency chains together, creating a
@@ -32115,10 +31977,10 @@ check_flush_deps_order(void)
*/
{
protect_entry(file_ptr, entry_type, 1);
- if ( !pass ) CACHE_ERROR("protect_entry failed")
+ if(!pass) CACHE_ERROR("protect_entry failed")
create_flush_dependency(entry_type, 1, entry_type, 0);
- if ( !pass ) CACHE_ERROR("create_flush_dependency failed")
+ if(!pass) CACHE_ERROR("create_flush_dependency failed")
/* Change expected values, and verify the status of the entries
* after creating flush dependency
@@ -32135,13 +31997,13 @@ check_flush_deps_order(void)
(int)0, /* int tag */
(int)5, /* int num_entries */
expected); /* struct expected_entry_staus[] */
- if ( !pass ) CACHE_ERROR("verify_entry_status failed")
+ if(!pass) CACHE_ERROR("verify_entry_status failed")
protect_entry(file_ptr, entry_type, 2);
- if ( !pass ) CACHE_ERROR("protect_entry failed")
+ if(!pass) CACHE_ERROR("protect_entry failed")
create_flush_dependency(entry_type, 2, entry_type, 1);
- if ( !pass ) CACHE_ERROR("create_flush_dependency failed")
+ if(!pass) CACHE_ERROR("create_flush_dependency failed")
/* Change expected values, and verify the status of the entries
* after creating flush dependency
@@ -32158,13 +32020,13 @@ check_flush_deps_order(void)
(int)0, /* int tag */
(int)5, /* int num_entries */
expected); /* struct expected_entry_staus[] */
- if ( !pass ) CACHE_ERROR("verify_entry_status failed")
+ if(!pass) CACHE_ERROR("verify_entry_status failed")
protect_entry(file_ptr, entry_type, 4);
- if ( !pass ) CACHE_ERROR("protect_entry failed")
+ if(!pass) CACHE_ERROR("protect_entry failed")
create_flush_dependency(entry_type, 4, entry_type, 3);
- if ( !pass ) CACHE_ERROR("create_flush_dependency failed")
+ if(!pass) CACHE_ERROR("create_flush_dependency failed")
/* Change expected values, and verify the status of the entries
* after creating flush dependency
@@ -32181,10 +32043,10 @@ check_flush_deps_order(void)
(int)0, /* int tag */
(int)5, /* int num_entries */
expected); /* struct expected_entry_staus[] */
- if ( !pass ) CACHE_ERROR("verify_entry_status failed")
+ if(!pass) CACHE_ERROR("verify_entry_status failed")
create_flush_dependency(entry_type, 1, entry_type, 4);
- if ( !pass ) CACHE_ERROR("create_flush_dependency failed")
+ if(!pass) CACHE_ERROR("create_flush_dependency failed")
/* Change expected values, and verify the status of the entries
* after creating flush dependency
@@ -32199,7 +32061,7 @@ check_flush_deps_order(void)
(int)0, /* int tag */
(int)5, /* int num_entries */
expected); /* struct expected_entry_staus[] */
- if ( !pass ) CACHE_ERROR("verify_entry_status failed")
+ if(!pass) CACHE_ERROR("verify_entry_status failed")
}
@@ -32222,19 +32084,19 @@ check_flush_deps_order(void)
entry_type, /* int32_t type */
1, /* int32_t idx */
H5C__NO_FLAGS_SET); /* unsigned int flags */
- if ( !pass ) CACHE_ERROR("unprotect_entry failed")
+ if(!pass) CACHE_ERROR("unprotect_entry failed")
unprotect_entry(file_ptr, /* H5F_t * file_ptr */
entry_type, /* int32_t type */
2, /* int32_t idx */
H5C__NO_FLAGS_SET); /* unsigned int flags */
- if ( !pass ) CACHE_ERROR("unprotect_entry failed")
+ if(!pass) CACHE_ERROR("unprotect_entry failed")
unprotect_entry(file_ptr, /* H5F_t * file_ptr */
entry_type, /* int32_t type */
4, /* int32_t idx */
H5C__NO_FLAGS_SET); /* unsigned int flags */
- if ( !pass ) CACHE_ERROR("unprotect_entry failed")
+ if(!pass) CACHE_ERROR("unprotect_entry failed")
/* Mark entries 0-4 dirty, so they are flushed */
dirty_entry(file_ptr, entry_type, 0, FALSE);
@@ -32242,7 +32104,7 @@ check_flush_deps_order(void)
dirty_entry(file_ptr, entry_type, 2, TRUE);
dirty_entry(file_ptr, entry_type, 3, FALSE);
dirty_entry(file_ptr, entry_type, 4, TRUE);
- if ( !pass ) CACHE_ERROR("dirty_entry failed")
+ if(!pass) CACHE_ERROR("dirty_entry failed")
/* Reset 'serialized' flag & 'flush_order' value in expected array */
expected[0].serialized = FALSE;
@@ -32260,7 +32122,7 @@ check_flush_deps_order(void)
flush_order = 0;
result = H5C_flush_cache(file_ptr, H5AC_ind_read_dxpl_id, H5C__NO_FLAGS_SET);
- if( result < 0 ) CACHE_ERROR("flushing entries with flush dependendices")
+ if(result < 0) CACHE_ERROR("flushing entries with flush dependendices")
/* Change expected values, and verify the status of the entries
* after destroy flush dependency
@@ -32290,13 +32152,13 @@ check_flush_deps_order(void)
(int)0, /* int tag */
(int)5, /* int num_entries */
expected); /* struct expected_entry_staus[] */
- if ( !pass ) CACHE_ERROR("verify_entry_status failed")
+ if(!pass) CACHE_ERROR("verify_entry_status failed")
}
/* Destroy flush dependency between entries, detaching 3->4 from 1 first */
{
destroy_flush_dependency(entry_type, 1, entry_type, 4);
- if ( !pass ) CACHE_ERROR("destroy_flush_dependency failed")
+ if(!pass) CACHE_ERROR("destroy_flush_dependency failed")
/* Change expected values, and verify the status of the entries
* after destroying flush dependency
@@ -32309,10 +32171,10 @@ check_flush_deps_order(void)
(int)0, /* int tag */
(int)5, /* int num_entries */
expected); /* struct expected_entry_staus[] */
- if ( !pass ) CACHE_ERROR("verify_entry_status failed")
+ if(!pass) CACHE_ERROR("verify_entry_status failed")
destroy_flush_dependency(entry_type, 4, entry_type, 3);
- if ( !pass ) CACHE_ERROR("destroy_flush_dependency failed")
+ if(!pass) CACHE_ERROR("destroy_flush_dependency failed")
/* Change expected values, and verify the status of the entries
* after destroying flush dependency
@@ -32326,10 +32188,10 @@ check_flush_deps_order(void)
(int)0, /* int tag */
(int)5, /* int num_entries */
expected); /* struct expected_entry_staus[] */
- if ( !pass ) CACHE_ERROR("verify_entry_status failed")
+ if(!pass) CACHE_ERROR("verify_entry_status failed")
destroy_flush_dependency(entry_type, 2, entry_type, 1);
- if ( !pass ) CACHE_ERROR("destroy_flush_dependency failed")
+ if(!pass) CACHE_ERROR("destroy_flush_dependency failed")
/* Change expected values, and verify the status of the entries
* after destroying flush dependency
@@ -32343,10 +32205,10 @@ check_flush_deps_order(void)
(int)0, /* int tag */
(int)5, /* int num_entries */
expected); /* struct expected_entry_staus[] */
- if ( !pass ) CACHE_ERROR("verify_entry_status failed")
+ if(!pass) CACHE_ERROR("verify_entry_status failed")
destroy_flush_dependency(entry_type, 1, entry_type, 0);
- if ( !pass ) CACHE_ERROR("destroy_flush_dependency failed")
+ if(!pass) CACHE_ERROR("destroy_flush_dependency failed")
/* Change expected values, and verify the status of the entries
* after destroying flush dependency
@@ -32360,7 +32222,7 @@ check_flush_deps_order(void)
(int)0, /* int tag */
(int)5, /* int num_entries */
expected); /* struct expected_entry_staus[] */
- if ( !pass ) CACHE_ERROR("verify_entry_status failed")
+ if(!pass) CACHE_ERROR("verify_entry_status failed")
}
/* Test Case #5c - Join two flush dependency chains together, creating a
@@ -32372,10 +32234,10 @@ check_flush_deps_order(void)
*/
{
protect_entry(file_ptr, entry_type, 1);
- if ( !pass ) CACHE_ERROR("protect_entry failed")
+ if(!pass) CACHE_ERROR("protect_entry failed")
create_flush_dependency(entry_type, 1, entry_type, 0);
- if ( !pass ) CACHE_ERROR("create_flush_dependency failed")
+ if(!pass) CACHE_ERROR("create_flush_dependency failed")
/* Change expected values, and verify the status of the entries
* after creating flush dependency
@@ -32392,13 +32254,13 @@ check_flush_deps_order(void)
(int)0, /* int tag */
(int)5, /* int num_entries */
expected); /* struct expected_entry_staus[] */
- if ( !pass ) CACHE_ERROR("verify_entry_status failed")
+ if(!pass) CACHE_ERROR("verify_entry_status failed")
protect_entry(file_ptr, entry_type, 2);
- if ( !pass ) CACHE_ERROR("protect_entry failed")
+ if(!pass) CACHE_ERROR("protect_entry failed")
create_flush_dependency(entry_type, 2, entry_type, 1);
- if ( !pass ) CACHE_ERROR("create_flush_dependency failed")
+ if(!pass) CACHE_ERROR("create_flush_dependency failed")
/* Change expected values, and verify the status of the entries
* after creating flush dependency
@@ -32415,13 +32277,13 @@ check_flush_deps_order(void)
(int)0, /* int tag */
(int)5, /* int num_entries */
expected); /* struct expected_entry_staus[] */
- if ( !pass ) CACHE_ERROR("verify_entry_status failed")
+ if(!pass) CACHE_ERROR("verify_entry_status failed")
protect_entry(file_ptr, entry_type, 4);
- if ( !pass ) CACHE_ERROR("protect_entry failed")
+ if(!pass) CACHE_ERROR("protect_entry failed")
create_flush_dependency(entry_type, 4, entry_type, 3);
- if ( !pass ) CACHE_ERROR("create_flush_dependency failed")
+ if(!pass) CACHE_ERROR("create_flush_dependency failed")
/* Change expected values, and verify the status of the entries
* after creating flush dependency
@@ -32438,10 +32300,10 @@ check_flush_deps_order(void)
(int)0, /* int tag */
(int)5, /* int num_entries */
expected); /* struct expected_entry_staus[] */
- if ( !pass ) CACHE_ERROR("verify_entry_status failed")
+ if(!pass) CACHE_ERROR("verify_entry_status failed")
create_flush_dependency(entry_type, 2, entry_type, 4);
- if ( !pass ) CACHE_ERROR("create_flush_dependency failed")
+ if(!pass) CACHE_ERROR("create_flush_dependency failed")
/* Change expected values, and verify the status of the entries
* after creating flush dependency
@@ -32456,7 +32318,7 @@ check_flush_deps_order(void)
(int)0, /* int tag */
(int)5, /* int num_entries */
expected); /* struct expected_entry_staus[] */
- if ( !pass ) CACHE_ERROR("verify_entry_status failed")
+ if(!pass) CACHE_ERROR("verify_entry_status failed")
}
@@ -32479,19 +32341,19 @@ check_flush_deps_order(void)
entry_type, /* int32_t type */
1, /* int32_t idx */
H5C__NO_FLAGS_SET); /* unsigned int flags */
- if ( !pass ) CACHE_ERROR("unprotect_entry failed")
+ if(!pass) CACHE_ERROR("unprotect_entry failed")
unprotect_entry(file_ptr, /* H5F_t * file_ptr */
entry_type, /* int32_t type */
2, /* int32_t idx */
H5C__NO_FLAGS_SET); /* unsigned int flags */
- if ( !pass ) CACHE_ERROR("unprotect_entry failed")
+ if(!pass) CACHE_ERROR("unprotect_entry failed")
unprotect_entry(file_ptr, /* H5F_t * file_ptr */
entry_type, /* int32_t type */
4, /* int32_t idx */
H5C__NO_FLAGS_SET); /* unsigned int flags */
- if ( !pass ) CACHE_ERROR("unprotect_entry failed")
+ if(!pass) CACHE_ERROR("unprotect_entry failed")
/* Mark entries 0-4 dirty, so they are flushed */
dirty_entry(file_ptr, entry_type, 0, FALSE);
@@ -32499,7 +32361,7 @@ check_flush_deps_order(void)
dirty_entry(file_ptr, entry_type, 2, TRUE);
dirty_entry(file_ptr, entry_type, 3, FALSE);
dirty_entry(file_ptr, entry_type, 4, TRUE);
- if ( !pass ) CACHE_ERROR("dirty_entry failed")
+ if(!pass) CACHE_ERROR("dirty_entry failed")
/* Reset 'serialized' flag & 'flush_order' value in expected array */
expected[0].serialized = FALSE;
@@ -32517,7 +32379,7 @@ check_flush_deps_order(void)
flush_order = 0;
result = H5C_flush_cache(file_ptr, H5AC_ind_read_dxpl_id, H5C__NO_FLAGS_SET);
- if( result < 0 ) CACHE_ERROR("flushing entries with flush dependendices")
+ if(result < 0) CACHE_ERROR("flushing entries with flush dependendices")
/* Change expected values, and verify the status of the entries
* after destroy flush dependency
@@ -32547,13 +32409,13 @@ check_flush_deps_order(void)
(int)0, /* int tag */
(int)5, /* int num_entries */
expected); /* struct expected_entry_staus[] */
- if ( !pass ) CACHE_ERROR("verify_entry_status failed")
+ if(!pass) CACHE_ERROR("verify_entry_status failed")
}
/* Destroy flush dependency between entries, detaching 3->4 from 2 first */
{
destroy_flush_dependency(entry_type, 2, entry_type, 4);
- if ( !pass ) CACHE_ERROR("destroy_flush_dependency failed")
+ if(!pass) CACHE_ERROR("destroy_flush_dependency failed")
/* Change expected values, and verify the status of the entries
* after destroying flush dependency
@@ -32566,10 +32428,10 @@ check_flush_deps_order(void)
(int)0, /* int tag */
(int)5, /* int num_entries */
expected); /* struct expected_entry_staus[] */
- if ( !pass ) CACHE_ERROR("verify_entry_status failed")
+ if(!pass) CACHE_ERROR("verify_entry_status failed")
destroy_flush_dependency(entry_type, 4, entry_type, 3);
- if ( !pass ) CACHE_ERROR("destroy_flush_dependency failed")
+ if(!pass) CACHE_ERROR("destroy_flush_dependency failed")
/* Change expected values, and verify the status of the entries
* after destroying flush dependency
@@ -32583,10 +32445,10 @@ check_flush_deps_order(void)
(int)0, /* int tag */
(int)5, /* int num_entries */
expected); /* struct expected_entry_staus[] */
- if ( !pass ) CACHE_ERROR("verify_entry_status failed")
+ if(!pass) CACHE_ERROR("verify_entry_status failed")
destroy_flush_dependency(entry_type, 2, entry_type, 1);
- if ( !pass ) CACHE_ERROR("destroy_flush_dependency failed")
+ if(!pass) CACHE_ERROR("destroy_flush_dependency failed")
/* Change expected values, and verify the status of the entries
* after destroying flush dependency
@@ -32600,10 +32462,10 @@ check_flush_deps_order(void)
(int)0, /* int tag */
(int)5, /* int num_entries */
expected); /* struct expected_entry_staus[] */
- if ( !pass ) CACHE_ERROR("verify_entry_status failed")
+ if(!pass) CACHE_ERROR("verify_entry_status failed")
destroy_flush_dependency(entry_type, 1, entry_type, 0);
- if ( !pass ) CACHE_ERROR("destroy_flush_dependency failed")
+ if(!pass) CACHE_ERROR("destroy_flush_dependency failed")
/* Change expected values, and verify the status of the entries
* after destroying flush dependency
@@ -32617,7 +32479,7 @@ check_flush_deps_order(void)
(int)0, /* int tag */
(int)5, /* int num_entries */
expected); /* struct expected_entry_staus[] */
- if ( !pass ) CACHE_ERROR("verify_entry_status failed")
+ if(!pass) CACHE_ERROR("verify_entry_status failed")
}
/* Test Case #6a - Interlocked multiple parents, increasing addr order
@@ -32628,10 +32490,10 @@ check_flush_deps_order(void)
*/
{
protect_entry(file_ptr, entry_type, 1);
- if ( !pass ) CACHE_ERROR("protect_entry failed")
+ if(!pass) CACHE_ERROR("protect_entry failed")
create_flush_dependency(entry_type, 1, entry_type, 0);
- if ( !pass ) CACHE_ERROR("create_flush_dependency failed")
+ if(!pass) CACHE_ERROR("create_flush_dependency failed")
/* Change expected values, and verify the status of the entries
* after creating flush dependency
@@ -32648,13 +32510,13 @@ check_flush_deps_order(void)
(int)0, /* int tag */
(int)5, /* int num_entries */
expected); /* struct expected_entry_staus[] */
- if ( !pass ) CACHE_ERROR("verify_entry_status failed")
+ if(!pass) CACHE_ERROR("verify_entry_status failed")
protect_entry(file_ptr, entry_type, 2);
- if ( !pass ) CACHE_ERROR("protect_entry failed")
+ if(!pass) CACHE_ERROR("protect_entry failed")
create_flush_dependency(entry_type, 2, entry_type, 0);
- if ( !pass ) CACHE_ERROR("create_flush_dependency failed")
+ if(!pass) CACHE_ERROR("create_flush_dependency failed")
/* Change expected values, and verify the status of the entries
* after creating flush dependency
@@ -32671,10 +32533,10 @@ check_flush_deps_order(void)
(int)0, /* int tag */
(int)5, /* int num_entries */
expected); /* struct expected_entry_staus[] */
- if ( !pass ) CACHE_ERROR("verify_entry_status failed")
+ if(!pass) CACHE_ERROR("verify_entry_status failed")
create_flush_dependency(entry_type, 2, entry_type, 1);
- if ( !pass ) CACHE_ERROR("create_flush_dependency failed")
+ if(!pass) CACHE_ERROR("create_flush_dependency failed")
/* Change expected values, and verify the status of the entries
* after creating flush dependency
@@ -32689,13 +32551,13 @@ check_flush_deps_order(void)
(int)0, /* int tag */
(int)5, /* int num_entries */
expected); /* struct expected_entry_staus[] */
- if ( !pass ) CACHE_ERROR("verify_entry_status failed")
+ if(!pass) CACHE_ERROR("verify_entry_status failed")
protect_entry(file_ptr, entry_type, 3);
- if ( !pass ) CACHE_ERROR("protect_entry failed")
+ if(!pass) CACHE_ERROR("protect_entry failed")
create_flush_dependency(entry_type, 3, entry_type, 0);
- if ( !pass ) CACHE_ERROR("create_flush_dependency failed")
+ if(!pass) CACHE_ERROR("create_flush_dependency failed")
/* Change expected values, and verify the status of the entries
* after creating flush dependency
@@ -32712,10 +32574,10 @@ check_flush_deps_order(void)
(int)0, /* int tag */
(int)5, /* int num_entries */
expected); /* struct expected_entry_staus[] */
- if ( !pass ) CACHE_ERROR("verify_entry_status failed")
+ if(!pass) CACHE_ERROR("verify_entry_status failed")
create_flush_dependency(entry_type, 3, entry_type, 1);
- if ( !pass ) CACHE_ERROR("create_flush_dependency failed")
+ if(!pass) CACHE_ERROR("create_flush_dependency failed")
/* Change expected values, and verify the status of the entries
* after creating flush dependency
@@ -32730,10 +32592,10 @@ check_flush_deps_order(void)
(int)0, /* int tag */
(int)5, /* int num_entries */
expected); /* struct expected_entry_staus[] */
- if ( !pass ) CACHE_ERROR("verify_entry_status failed")
+ if(!pass) CACHE_ERROR("verify_entry_status failed")
create_flush_dependency(entry_type, 3, entry_type, 2);
- if ( !pass ) CACHE_ERROR("create_flush_dependency failed")
+ if(!pass) CACHE_ERROR("create_flush_dependency failed")
/* Change expected values, and verify the status of the entries
* after creating flush dependency
@@ -32748,7 +32610,7 @@ check_flush_deps_order(void)
(int)0, /* int tag */
(int)5, /* int num_entries */
expected); /* struct expected_entry_staus[] */
- if ( !pass ) CACHE_ERROR("verify_entry_status failed")
+ if(!pass) CACHE_ERROR("verify_entry_status failed")
}
@@ -32769,26 +32631,26 @@ check_flush_deps_order(void)
entry_type, /* int32_t type */
1, /* int32_t idx */
H5C__NO_FLAGS_SET); /* unsigned int flags */
- if ( !pass ) CACHE_ERROR("unprotect_entry failed")
+ if(!pass) CACHE_ERROR("unprotect_entry failed")
unprotect_entry(file_ptr, /* H5F_t * file_ptr */
entry_type, /* int32_t type */
2, /* int32_t idx */
H5C__NO_FLAGS_SET); /* unsigned int flags */
- if ( !pass ) CACHE_ERROR("unprotect_entry failed")
+ if(!pass) CACHE_ERROR("unprotect_entry failed")
unprotect_entry(file_ptr, /* H5F_t * file_ptr */
entry_type, /* int32_t type */
3, /* int32_t idx */
H5C__NO_FLAGS_SET); /* unsigned int flags */
- if ( !pass ) CACHE_ERROR("unprotect_entry failed")
+ if(!pass) CACHE_ERROR("unprotect_entry failed")
/* Mark entries 0-3 dirty, so they are flushed */
dirty_entry(file_ptr, entry_type, 0, FALSE);
dirty_entry(file_ptr, entry_type, 1, TRUE);
dirty_entry(file_ptr, entry_type, 2, TRUE);
dirty_entry(file_ptr, entry_type, 3, FALSE);
- if ( !pass ) CACHE_ERROR("dirty_entry failed")
+ if(!pass) CACHE_ERROR("dirty_entry failed")
/* Reset 'flushed' flag & 'flush_order' value in expected array */
expected[0].serialized = FALSE;
@@ -32804,7 +32666,7 @@ check_flush_deps_order(void)
flush_order = 0;
result = H5C_flush_cache(file_ptr, H5AC_ind_read_dxpl_id, H5C__NO_FLAGS_SET);
- if( result < 0 ) CACHE_ERROR("flushing entries with flush dependendices")
+ if(result < 0) CACHE_ERROR("flushing entries with flush dependendices")
/* Change expected values, and verify the status of the entries
* after destroy flush dependency
@@ -32831,13 +32693,13 @@ check_flush_deps_order(void)
(int)0, /* int tag */
(int)5, /* int num_entries */
expected); /* struct expected_entry_staus[] */
- if ( !pass ) CACHE_ERROR("verify_entry_status failed")
+ if(!pass) CACHE_ERROR("verify_entry_status failed")
}
/* Destroy flush dependency between entries, in reverse order */
{
destroy_flush_dependency(entry_type, 3, entry_type, 2);
- if ( !pass ) CACHE_ERROR("destroy_flush_dependency failed")
+ if(!pass) CACHE_ERROR("destroy_flush_dependency failed")
/* Change expected values, and verify the status of the entries
* after destroying flush dependency
@@ -32850,10 +32712,10 @@ check_flush_deps_order(void)
(int)0, /* int tag */
(int)5, /* int num_entries */
expected); /* struct expected_entry_staus[] */
- if ( !pass ) CACHE_ERROR("verify_entry_status failed")
+ if(!pass) CACHE_ERROR("verify_entry_status failed")
destroy_flush_dependency(entry_type, 3, entry_type, 1);
- if ( !pass ) CACHE_ERROR("destroy_flush_dependency failed")
+ if(!pass) CACHE_ERROR("destroy_flush_dependency failed")
/* Change expected values, and verify the status of the entries
* after destroying flush dependency
@@ -32866,10 +32728,10 @@ check_flush_deps_order(void)
(int)0, /* int tag */
(int)5, /* int num_entries */
expected); /* struct expected_entry_staus[] */
- if ( !pass ) CACHE_ERROR("verify_entry_status failed")
+ if(!pass) CACHE_ERROR("verify_entry_status failed")
destroy_flush_dependency(entry_type, 3, entry_type, 0);
- if ( !pass ) CACHE_ERROR("destroy_flush_dependency failed")
+ if(!pass) CACHE_ERROR("destroy_flush_dependency failed")
/* Change expected values, and verify the status of the entries
* after destroying flush dependency
@@ -32883,10 +32745,10 @@ check_flush_deps_order(void)
(int)0, /* int tag */
(int)5, /* int num_entries */
expected); /* struct expected_entry_staus[] */
- if ( !pass ) CACHE_ERROR("verify_entry_status failed")
+ if(!pass) CACHE_ERROR("verify_entry_status failed")
destroy_flush_dependency(entry_type, 2, entry_type, 1);
- if ( !pass ) CACHE_ERROR("destroy_flush_dependency failed")
+ if(!pass) CACHE_ERROR("destroy_flush_dependency failed")
/* Change expected values, and verify the status of the entries
* after destroying flush dependency
@@ -32899,10 +32761,10 @@ check_flush_deps_order(void)
(int)0, /* int tag */
(int)5, /* int num_entries */
expected); /* struct expected_entry_staus[] */
- if ( !pass ) CACHE_ERROR("verify_entry_status failed")
+ if(!pass) CACHE_ERROR("verify_entry_status failed")
destroy_flush_dependency(entry_type, 2, entry_type, 0);
- if ( !pass ) CACHE_ERROR("destroy_flush_dependency failed")
+ if(!pass) CACHE_ERROR("destroy_flush_dependency failed")
/* Change expected values, and verify the status of the entries
* after destroying flush dependency
@@ -32916,10 +32778,10 @@ check_flush_deps_order(void)
(int)0, /* int tag */
(int)5, /* int num_entries */
expected); /* struct expected_entry_staus[] */
- if ( !pass ) CACHE_ERROR("verify_entry_status failed")
+ if(!pass) CACHE_ERROR("verify_entry_status failed")
destroy_flush_dependency(entry_type, 1, entry_type, 0);
- if ( !pass ) CACHE_ERROR("destroy_flush_dependency failed")
+ if(!pass) CACHE_ERROR("destroy_flush_dependency failed")
/* Change expected values, and verify the status of the entries
* after destroying flush dependency
@@ -32933,7 +32795,7 @@ check_flush_deps_order(void)
(int)0, /* int tag */
(int)5, /* int num_entries */
expected); /* struct expected_entry_staus[] */
- if ( !pass ) CACHE_ERROR("verify_entry_status failed")
+ if(!pass) CACHE_ERROR("verify_entry_status failed")
}
/* Test Case #6b - Interlocked multiple parents, decreasing addr order
@@ -32944,10 +32806,10 @@ check_flush_deps_order(void)
*/
{
protect_entry(file_ptr, entry_type, 2);
- if ( !pass ) CACHE_ERROR("protect_entry failed")
+ if(!pass) CACHE_ERROR("protect_entry failed")
create_flush_dependency(entry_type, 2, entry_type, 3);
- if ( !pass ) CACHE_ERROR("create_flush_dependency failed")
+ if(!pass) CACHE_ERROR("create_flush_dependency failed")
/* Change expected values, and verify the status of the entries
* after creating flush dependency
@@ -32964,13 +32826,13 @@ check_flush_deps_order(void)
(int)0, /* int tag */
(int)5, /* int num_entries */
expected); /* struct expected_entry_staus[] */
- if ( !pass ) CACHE_ERROR("verify_entry_status failed")
+ if(!pass) CACHE_ERROR("verify_entry_status failed")
protect_entry(file_ptr, entry_type, 1);
- if ( !pass ) CACHE_ERROR("protect_entry failed")
+ if(!pass) CACHE_ERROR("protect_entry failed")
create_flush_dependency(entry_type, 1, entry_type, 3);
- if ( !pass ) CACHE_ERROR("create_flush_dependency failed")
+ if(!pass) CACHE_ERROR("create_flush_dependency failed")
/* Change expected values, and verify the status of the entries
* after creating flush dependency
@@ -32987,10 +32849,10 @@ check_flush_deps_order(void)
(int)0, /* int tag */
(int)5, /* int num_entries */
expected); /* struct expected_entry_staus[] */
- if ( !pass ) CACHE_ERROR("verify_entry_status failed")
+ if(!pass) CACHE_ERROR("verify_entry_status failed")
create_flush_dependency(entry_type, 1, entry_type, 2);
- if ( !pass ) CACHE_ERROR("create_flush_dependency failed")
+ if(!pass) CACHE_ERROR("create_flush_dependency failed")
/* Change expected values, and verify the status of the entries
* after creating flush dependency
@@ -33005,13 +32867,13 @@ check_flush_deps_order(void)
(int)0, /* int tag */
(int)5, /* int num_entries */
expected); /* struct expected_entry_staus[] */
- if ( !pass ) CACHE_ERROR("verify_entry_status failed")
+ if(!pass) CACHE_ERROR("verify_entry_status failed")
protect_entry(file_ptr, entry_type, 0);
- if ( !pass ) CACHE_ERROR("protect_entry failed")
+ if(!pass) CACHE_ERROR("protect_entry failed")
create_flush_dependency(entry_type, 0, entry_type, 3);
- if ( !pass ) CACHE_ERROR("create_flush_dependency failed")
+ if(!pass) CACHE_ERROR("create_flush_dependency failed")
/* Change expected values, and verify the status of the entries
* after creating flush dependency
@@ -33028,10 +32890,10 @@ check_flush_deps_order(void)
(int)0, /* int tag */
(int)5, /* int num_entries */
expected); /* struct expected_entry_staus[] */
- if ( !pass ) CACHE_ERROR("verify_entry_status failed")
+ if(!pass) CACHE_ERROR("verify_entry_status failed")
create_flush_dependency(entry_type, 0, entry_type, 2);
- if ( !pass ) CACHE_ERROR("create_flush_dependency failed")
+ if(!pass) CACHE_ERROR("create_flush_dependency failed")
/* Change expected values, and verify the status of the entries
* after creating flush dependency
@@ -33046,10 +32908,10 @@ check_flush_deps_order(void)
(int)0, /* int tag */
(int)5, /* int num_entries */
expected); /* struct expected_entry_staus[] */
- if ( !pass ) CACHE_ERROR("verify_entry_status failed")
+ if(!pass) CACHE_ERROR("verify_entry_status failed")
create_flush_dependency(entry_type, 0, entry_type, 1);
- if ( !pass ) CACHE_ERROR("create_flush_dependency failed")
+ if(!pass) CACHE_ERROR("create_flush_dependency failed")
/* Change expected values, and verify the status of the entries
* after creating flush dependency
@@ -33064,7 +32926,7 @@ check_flush_deps_order(void)
(int)0, /* int tag */
(int)5, /* int num_entries */
expected); /* struct expected_entry_staus[] */
- if ( !pass ) CACHE_ERROR("verify_entry_status failed")
+ if(!pass) CACHE_ERROR("verify_entry_status failed")
}
@@ -33085,26 +32947,26 @@ check_flush_deps_order(void)
entry_type, /* int32_t type */
0, /* int32_t idx */
H5C__NO_FLAGS_SET); /* unsigned int flags */
- if ( !pass ) CACHE_ERROR("unprotect_entry failed")
+ if(!pass) CACHE_ERROR("unprotect_entry failed")
unprotect_entry(file_ptr, /* H5F_t * file_ptr */
entry_type, /* int32_t type */
1, /* int32_t idx */
H5C__NO_FLAGS_SET); /* unsigned int flags */
- if ( !pass ) CACHE_ERROR("unprotect_entry failed")
+ if(!pass) CACHE_ERROR("unprotect_entry failed")
unprotect_entry(file_ptr, /* H5F_t * file_ptr */
entry_type, /* int32_t type */
2, /* int32_t idx */
H5C__NO_FLAGS_SET); /* unsigned int flags */
- if ( !pass ) CACHE_ERROR("unprotect_entry failed")
+ if(!pass) CACHE_ERROR("unprotect_entry failed")
/* Mark entries 0-3 dirty, so they are flushed */
dirty_entry(file_ptr, entry_type, 0, FALSE);
dirty_entry(file_ptr, entry_type, 1, TRUE);
dirty_entry(file_ptr, entry_type, 2, TRUE);
dirty_entry(file_ptr, entry_type, 3, FALSE);
- if ( !pass ) CACHE_ERROR("dirty_entry failed")
+ if(!pass) CACHE_ERROR("dirty_entry failed")
/* Reset 'flushed' flag & 'flush_order' value in expected array */
expected[0].serialized = FALSE;
@@ -33120,7 +32982,7 @@ check_flush_deps_order(void)
flush_order = 0;
result = H5C_flush_cache(file_ptr, H5AC_ind_read_dxpl_id, H5C__NO_FLAGS_SET);
- if( result < 0 ) CACHE_ERROR("flushing entries with flush dependendices")
+ if(result < 0) CACHE_ERROR("flushing entries with flush dependendices")
/* Change expected values, and verify the status of the entries
* after destroy flush dependency
@@ -33147,13 +33009,13 @@ check_flush_deps_order(void)
(int)0, /* int tag */
(int)5, /* int num_entries */
expected); /* struct expected_entry_staus[] */
- if ( !pass ) CACHE_ERROR("verify_entry_status failed")
+ if(!pass) CACHE_ERROR("verify_entry_status failed")
}
/* Destroy flush dependency between entries, in reverse order */
{
destroy_flush_dependency(entry_type, 0, entry_type, 1);
- if ( !pass ) CACHE_ERROR("destroy_flush_dependency failed")
+ if(!pass) CACHE_ERROR("destroy_flush_dependency failed")
/* Change expected values, and verify the status of the entries
* after destroying flush dependency
@@ -33166,10 +33028,10 @@ check_flush_deps_order(void)
(int)0, /* int tag */
(int)5, /* int num_entries */
expected); /* struct expected_entry_staus[] */
- if ( !pass ) CACHE_ERROR("verify_entry_status failed")
+ if(!pass) CACHE_ERROR("verify_entry_status failed")
destroy_flush_dependency(entry_type, 0, entry_type, 2);
- if ( !pass ) CACHE_ERROR("destroy_flush_dependency failed")
+ if(!pass) CACHE_ERROR("destroy_flush_dependency failed")
/* Change expected values, and verify the status of the entries
* after destroying flush dependency
@@ -33182,10 +33044,10 @@ check_flush_deps_order(void)
(int)0, /* int tag */
(int)5, /* int num_entries */
expected); /* struct expected_entry_staus[] */
- if ( !pass ) CACHE_ERROR("verify_entry_status failed")
+ if(!pass) CACHE_ERROR("verify_entry_status failed")
destroy_flush_dependency(entry_type, 0, entry_type, 3);
- if ( !pass ) CACHE_ERROR("destroy_flush_dependency failed")
+ if(!pass) CACHE_ERROR("destroy_flush_dependency failed")
/* Change expected values, and verify the status of the entries
* after destroying flush dependency
@@ -33199,10 +33061,10 @@ check_flush_deps_order(void)
(int)0, /* int tag */
(int)5, /* int num_entries */
expected); /* struct expected_entry_staus[] */
- if ( !pass ) CACHE_ERROR("verify_entry_status failed")
+ if(!pass) CACHE_ERROR("verify_entry_status failed")
destroy_flush_dependency(entry_type, 1, entry_type, 2);
- if ( !pass ) CACHE_ERROR("destroy_flush_dependency failed")
+ if(!pass) CACHE_ERROR("destroy_flush_dependency failed")
/* Change expected values, and verify the status of the entries
* after destroying flush dependency
@@ -33215,10 +33077,10 @@ check_flush_deps_order(void)
(int)0, /* int tag */
(int)5, /* int num_entries */
expected); /* struct expected_entry_staus[] */
- if ( !pass ) CACHE_ERROR("verify_entry_status failed")
+ if(!pass) CACHE_ERROR("verify_entry_status failed")
destroy_flush_dependency(entry_type, 1, entry_type, 3);
- if ( !pass ) CACHE_ERROR("destroy_flush_dependency failed")
+ if(!pass) CACHE_ERROR("destroy_flush_dependency failed")
/* Change expected values, and verify the status of the entries
* after destroying flush dependency
@@ -33232,10 +33094,10 @@ check_flush_deps_order(void)
(int)0, /* int tag */
(int)5, /* int num_entries */
expected); /* struct expected_entry_staus[] */
- if ( !pass ) CACHE_ERROR("verify_entry_status failed")
+ if(!pass) CACHE_ERROR("verify_entry_status failed")
destroy_flush_dependency(entry_type, 2, entry_type, 3);
- if ( !pass ) CACHE_ERROR("destroy_flush_dependency failed")
+ if(!pass) CACHE_ERROR("destroy_flush_dependency failed")
/* Change expected values, and verify the status of the entries
* after destroying flush dependency
@@ -33249,7 +33111,7 @@ check_flush_deps_order(void)
(int)0, /* int tag */
(int)5, /* int num_entries */
expected); /* struct expected_entry_staus[] */
- if ( !pass ) CACHE_ERROR("verify_entry_status failed")
+ if(!pass) CACHE_ERROR("verify_entry_status failed")
}
@@ -33257,7 +33119,7 @@ done:
if(file_ptr)
takedown_cache(file_ptr, FALSE, FALSE);
- if ( pass )
+ if(pass)
PASSED()
else {
H5_FAILED();
@@ -33311,16 +33173,16 @@ check_notify_cb(void)
reset_entries();
file_ptr = setup_cache((size_t)(2 * 1024), (size_t)(1 * 1024));
- if ( !file_ptr ) CACHE_ERROR("setup_cache returned NULL")
+ if(!file_ptr) CACHE_ERROR("setup_cache returned NULL")
cache_ptr = file_ptr->shared->cache;
base_addr = entries[entry_type];
- if ( !pass ) CACHE_ERROR("setup_cache failed")
+ if(!pass) CACHE_ERROR("setup_cache failed")
/* Insert entries to work with into the cache */
for(u = 0; u < 5; u++) {
insert_entry(file_ptr, entry_type, (int32_t)u, H5C__NO_FLAGS_SET);
- if ( !pass ) CACHE_ERROR("insert_entry failed")
+ if(!pass) CACHE_ERROR("insert_entry failed")
/* Change expected values, and verify the status of the entries
* after each insertion
@@ -33333,7 +33195,7 @@ check_notify_cb(void)
(int)u, /* int tag */
(int)5, /* int num_entries */
expected); /* struct expected_entry_staus[] */
- if ( !pass ) CACHE_ERROR("verify_entry_status failed")
+ if(!pass) CACHE_ERROR("verify_entry_status failed")
/* Check the entry's 'after insert' count */
entry_ptr = &(base_addr[u]);
@@ -33346,7 +33208,7 @@ check_notify_cb(void)
/* Remove entries from the cache */
for(u = 0; u < 5; u++) {
expunge_entry(file_ptr, entry_type, (int32_t)u);
- if ( !pass ) CACHE_ERROR("expunge_entry failed")
+ if(!pass) CACHE_ERROR("expunge_entry failed")
/* Change expected values, and verify the status of the entries
* after each expunge
@@ -33361,7 +33223,7 @@ check_notify_cb(void)
(int)u, /* int tag */
(int)5, /* int num_entries */
expected); /* struct expected_entry_staus[] */
- if ( !pass ) CACHE_ERROR("verify_entry_status failed")
+ if(!pass) CACHE_ERROR("verify_entry_status failed")
/* Check the entry's 'before evict' count */
entry_ptr = &(base_addr[u]);
@@ -33374,7 +33236,7 @@ check_notify_cb(void)
/* Protect entries to bring them into the cache */
for(u = 0; u < 5; u++) {
protect_entry(file_ptr, entry_type, (int32_t)u);
- if ( !pass ) CACHE_ERROR("protect_entry failed")
+ if(!pass) CACHE_ERROR("protect_entry failed")
/* Change expected values, and verify the status of the entries
* after each insertion
@@ -33389,7 +33251,7 @@ check_notify_cb(void)
(int)u, /* int tag */
(int)5, /* int num_entries */
expected); /* struct expected_entry_staus[] */
- if ( !pass ) CACHE_ERROR("verify_entry_status failed")
+ if(!pass) CACHE_ERROR("verify_entry_status failed")
/* Check the entry's 'after insert' count */
entry_ptr = &(base_addr[u]);
@@ -33402,7 +33264,7 @@ check_notify_cb(void)
/* Unprotect entries, evicting them from the cache */
for(u = 0; u < 5; u++) {
unprotect_entry(file_ptr, entry_type, (int32_t)u, H5C__DIRTIED_FLAG);
- if ( !pass ) CACHE_ERROR("unprotect_entry failed")
+ if(!pass) CACHE_ERROR("unprotect_entry failed")
/* Change expected values, and verify the status of the entries
* after each insertion
@@ -33416,7 +33278,7 @@ check_notify_cb(void)
(int)u, /* int tag */
(int)5, /* int num_entries */
expected); /* struct expected_entry_staus[] */
- if ( !pass ) CACHE_ERROR("verify_entry_status failed")
+ if(!pass) CACHE_ERROR("verify_entry_status failed")
/* Check the entry's 'after insert' count */
entry_ptr = &(base_addr[u]);
@@ -33429,7 +33291,7 @@ check_notify_cb(void)
/* Remove entries from the cache */
for(u = 0; u < 5; u++) {
expunge_entry(file_ptr, entry_type, (int32_t)u);
- if ( !pass ) CACHE_ERROR("expunge_entry failed")
+ if(!pass) CACHE_ERROR("expunge_entry failed")
/* Change expected values, and verify the status of the entries
* after each expunge
@@ -33444,7 +33306,7 @@ check_notify_cb(void)
(int)u, /* int tag */
(int)5, /* int num_entries */
expected); /* struct expected_entry_staus[] */
- if ( !pass ) CACHE_ERROR("verify_entry_status failed")
+ if(!pass) CACHE_ERROR("verify_entry_status failed")
/* Check the entry's 'before evict' count */
entry_ptr = &(base_addr[u]);
@@ -33457,7 +33319,7 @@ check_notify_cb(void)
done:
takedown_cache(file_ptr, FALSE, FALSE);
- if ( pass )
+ if(pass)
PASSED()
else {
H5_FAILED();
@@ -33663,7 +33525,7 @@ check_metadata_cork(hbool_t fill_via_insertion)
reset_entries();
- if (fill_via_insertion) {
+ if(fill_via_insertion) {
TESTING("to ensure cork/uncork metadata when inserting");
@@ -33672,11 +33534,11 @@ check_metadata_cork(hbool_t fill_via_insertion)
TESTING("to ensure cork/uncork metadata on protect/unprotect");
}
- if ( show_progress) /* 0 */
+ if(show_progress) /* 0 */
HDfprintf(stdout, "\n%s: check point %d -- pass %d\n",
fcn_name, checkpoint++, pass);
- if ( pass ) {
+ if(pass) {
/* Set up the cache.
*
@@ -33686,7 +33548,7 @@ check_metadata_cork(hbool_t fill_via_insertion)
file_ptr = setup_cache((size_t)(50 * entry_size), /* max_cache_size */
(size_t)(25 * entry_size)); /* min_clean_size */
- if ( file_ptr == NULL) {
+ if(file_ptr == NULL) {
pass = FALSE;
failure_mssg = "bad return from cache intialization.\n";
@@ -33699,7 +33561,7 @@ check_metadata_cork(hbool_t fill_via_insertion)
/* Cork the cache entry type */
cork_entry_type(file_ptr, entry_type);
- if ( show_progress) /* 1 */
+ if(show_progress) /* 1 */
HDfprintf(stdout, "%s: check point %d -- pass %d\n",
fcn_name, checkpoint++, pass);
@@ -33716,12 +33578,12 @@ check_metadata_cork(hbool_t fill_via_insertion)
* ========================================================================
*/
- if ( pass ) {
+ if(pass) {
/* Insert 26 entries (indexes 0 through 25) into the cache. */
for (entry_idx = 0; entry_idx < 26; entry_idx++) {
- if (fill_via_insertion) {
+ if(fill_via_insertion) {
insert_entry(file_ptr, /* H5F_t * file_ptr */
entry_type, /* int32_t type */
entry_idx, /* int32_t idx */
@@ -33753,7 +33615,7 @@ check_metadata_cork(hbool_t fill_via_insertion)
}
}
- if ( show_progress) /* 2 */
+ if(show_progress) /* 2 */
HDfprintf(stdout, "%s: check point %d -- pass %d\n",
fcn_name, checkpoint++, pass);
@@ -33770,10 +33632,10 @@ check_metadata_cork(hbool_t fill_via_insertion)
* ========================================================================
*/
- if ( pass ) {
+ if(pass) {
/* Insert the 27th entry (index = 26) into the cache. */
- if (fill_via_insertion) {
+ if(fill_via_insertion) {
insert_entry(file_ptr, /* H5F_t * file_ptr */
entry_type, /* int32_t type */
entry_idx++, /* int32_t idx */
@@ -33810,14 +33672,14 @@ check_metadata_cork(hbool_t fill_via_insertion)
}
- if ( show_progress) /* 3 */
+ if(show_progress) /* 3 */
HDfprintf(stdout, "%s: check point %d -- pass %d\n",
fcn_name, checkpoint++, pass);
- if ( pass ) {
+ if(pass) {
/* Insert the 28th entry (index = 27) into the cache. */
- if (fill_via_insertion) {
+ if(fill_via_insertion) {
insert_entry(file_ptr, /* H5F_t * file_ptr */
entry_type, /* int32_t type */
entry_idx++, /* int32_t idx */
@@ -33852,17 +33714,17 @@ check_metadata_cork(hbool_t fill_via_insertion)
}
- if ( show_progress) /* 4 */
+ if(show_progress) /* 4 */
HDfprintf(stdout, "%s: check point %d -- pass %d\n",
fcn_name, checkpoint++, pass);
- if ( pass ) {
+ if(pass) {
/* Fill out the rest of the cache with entries */
/* Verify expected status of entries after each insertion */
for (entry_idx = entry_idx; entry_idx < 50; entry_idx++) {
- if (fill_via_insertion) {
+ if(fill_via_insertion) {
insert_entry(file_ptr, /* H5F_t * file_ptr */
entry_type, /* int32_t type */
entry_idx, /* int32_t idx */
@@ -33894,14 +33756,14 @@ check_metadata_cork(hbool_t fill_via_insertion)
}
/* Verify that the cache is now full */
- if ( cache_ptr->cache_full != TRUE ) {
+ if(cache_ptr->cache_full != TRUE) {
pass = FALSE;
failure_mssg = "cache not completely filled.\n";
}
}
- if ( show_progress) /* 5 */
+ if(show_progress) /* 5 */
HDfprintf(stdout, "%s: check point %d -- pass %d\n",
fcn_name, checkpoint++, pass);
@@ -33915,16 +33777,16 @@ check_metadata_cork(hbool_t fill_via_insertion)
* ========================================================================
*/
- if ( show_progress) /* 6 */
+ if(show_progress) /* 6 */
HDfprintf(stdout, "%s: check point %d -- pass %d\n",
fcn_name, checkpoint++, pass);
- if ( pass ) {
+ if(pass) {
/* Insert 50 more entries (indices 50-99) into the cache. */
for (entry_idx = entry_idx; entry_idx < 100; entry_idx++) {
- if (fill_via_insertion) {
+ if(fill_via_insertion) {
insert_entry(file_ptr, /* H5F_t * file_ptr */
entry_type, /* int32_t type */
entry_idx, /* int32_t idx */
@@ -33954,7 +33816,7 @@ check_metadata_cork(hbool_t fill_via_insertion)
}
}
- if ( show_progress) /* 7 */
+ if(show_progress) /* 7 */
HDfprintf(stdout, "%s: check point %d -- pass %d\n",
fcn_name, checkpoint++, pass);
@@ -33970,7 +33832,7 @@ check_metadata_cork(hbool_t fill_via_insertion)
* ========================================================================
*/
- if ( pass ) {
+ if(pass) {
/* Flush the cache.
*
@@ -34000,12 +33862,12 @@ check_metadata_cork(hbool_t fill_via_insertion)
expected); /* expected */
}
- if ( show_progress) /* 8 */
+ if(show_progress) /* 8 */
HDfprintf(stdout, "%s: check point %d -- pass %d\n",
fcn_name, checkpoint++, pass);
- if ( pass ) {
+ if(pass) {
/* Will evict 50 clean "corked" entries all at once when inserting the 100th entry */
for(i = 0; i < 51; i++) {
@@ -34015,7 +33877,7 @@ check_metadata_cork(hbool_t fill_via_insertion)
}
/* Insert the 100th entry */
- if (fill_via_insertion) {
+ if(fill_via_insertion) {
insert_entry(file_ptr, /* H5F_t * file_ptr */
entry_type, /* int32_t type */
100, /* int32_t idx */
@@ -34046,17 +33908,17 @@ check_metadata_cork(hbool_t fill_via_insertion)
}
- if ( show_progress) /* 9 */
+ if(show_progress) /* 9 */
HDfprintf(stdout, "%s: check point %d -- pass %d\n",
fcn_name, checkpoint++, pass);
- if ( pass ) {
+ if(pass) {
/* Insert 25 more corked entries (indexes 101 through 125) into the cache. */
/* Clean entry will be evicted one a time */
for (entry_idx = 101; entry_idx < 126; entry_idx++) {
- if (fill_via_insertion) {
+ if(fill_via_insertion) {
insert_entry(file_ptr, /* H5F_t * file_ptr */
entry_type, /* int32_t type */
entry_idx, /* int32_t idx */
@@ -34093,15 +33955,15 @@ check_metadata_cork(hbool_t fill_via_insertion)
}
- if ( show_progress) /* 10 */
+ if(show_progress) /* 10 */
HDfprintf(stdout, "%s: check point %d -- pass %d\n",
fcn_name, checkpoint++, pass);
- if ( pass ) {
+ if(pass) {
/* Insert the 127th entry (index = 126) into the cache. */
- if (fill_via_insertion) {
+ if(fill_via_insertion) {
insert_entry(file_ptr, /* H5F_t * file_ptr */
entry_type, /* int32_t type */
126, /* int32_t idx */
@@ -34135,17 +33997,17 @@ check_metadata_cork(hbool_t fill_via_insertion)
}
- if ( show_progress) /* 11 */
+ if(show_progress) /* 11 */
HDfprintf(stdout, "%s: check point %d -- pass %d\n",
fcn_name, checkpoint++, pass);
- if ( pass ) {
+ if(pass) {
/* Insert entries w/ indices 127 through 149 into the cache */
for (entry_idx = 127; entry_idx < 150; entry_idx++) {
- if (fill_via_insertion) {
+ if(fill_via_insertion) {
insert_entry(file_ptr, /* H5F_t * file_ptr */
entry_type, /* int32_t type */
entry_idx, /* int32_t idx */
@@ -34182,7 +34044,7 @@ check_metadata_cork(hbool_t fill_via_insertion)
}
- if ( show_progress) /* 12 */
+ if(show_progress) /* 12 */
HDfprintf(stdout, "%s: check point %d -- pass %d\n",
fcn_name, checkpoint++, pass);
@@ -34191,11 +34053,11 @@ check_metadata_cork(hbool_t fill_via_insertion)
takedown_cache(file_ptr, FALSE, FALSE);
reset_entries();
- if ( show_progress) /* 13 */
+ if(show_progress) /* 13 */
HDfprintf(stdout, "%s: check point %d -- pass %d\n",
fcn_name, checkpoint++, pass);
- if ( pass ) { PASSED(); } else { H5_FAILED(); }
+ if(pass) { PASSED(); } else { H5_FAILED(); }
return (unsigned)!pass;
@@ -34246,7 +34108,7 @@ check_entry_deletions_during_scans(void)
* place.
*/
- if ( pass ) {
+ if(pass) {
reset_entries();
@@ -34260,22 +34122,22 @@ check_entry_deletions_during_scans(void)
* a different entry could cause problems.
*/
- if ( pass ) {
+ if(pass) {
cedds__expunge_dirty_entry_in_flush_test(file_ptr);
}
- if ( pass ) {
+ if(pass) {
cedds__H5C_make_space_in_cache(file_ptr);
}
- if ( pass ) {
+ if(pass) {
cedds__H5C__autoadjust__ageout__evict_aged_out_entries(file_ptr);
}
- if ( pass ) {
+ if(pass) {
cedds__H5C_flush_invalidate_cache__bucket_scan(file_ptr);
}
@@ -34284,9 +34146,9 @@ check_entry_deletions_during_scans(void)
takedown_cache(file_ptr, FALSE, FALSE);
- if ( pass ) { PASSED(); } else { H5_FAILED(); }
+ if(pass) { PASSED(); } else { H5_FAILED(); }
- if ( ! pass ) {
+ if(!pass) {
HDfprintf(stdout, "%s(): failure_mssg = \"%s\".\n",
FUNC, failure_mssg);
@@ -34347,21 +34209,21 @@ cedds__expunge_dirty_entry_in_flush_test(H5F_t * file_ptr)
{ HUGE_ENTRY_TYPE, 3, HUGE_ENTRY_SIZE, TRUE, TRUE, TRUE, FALSE, FALSE, TRUE, FALSE, FALSE, {-1,-1,-1,-1,-1,-1,-1,-1}, {-1,-1,-1,-1,-1,-1,-1,-1}, 0, 0, 0, -1, FALSE}
};
- if ( pass ) {
+ if(pass) {
- if ( cache_ptr == NULL ) {
+ if(cache_ptr == NULL) {
pass = FALSE;
failure_mssg = "cache_ptr NULL on entry to cedds expunge dirty entry in flush test.";
}
- else if ( ( cache_ptr->index_len != 0 ) ||
- ( cache_ptr->index_size != 0 ) ) {
+ else if((cache_ptr->index_len != 0) ||
+ (cache_ptr->index_size != 0)) {
pass = FALSE;
failure_mssg = "cache not empty on entry to cedds expunge dirty entry in flush test.";
}
- else if ( ( cache_ptr->max_cache_size != (2 * 1024 * 1024 ) ) ||
- ( cache_ptr->min_clean_size != (1 * 1024 * 1024 ) ) ) {
+ else if((cache_ptr->max_cache_size != (2 * 1024 * 1024)) ||
+ (cache_ptr->min_clean_size != (1 * 1024 * 1024))) {
pass = FALSE;
failure_mssg =
@@ -34377,7 +34239,7 @@ cedds__expunge_dirty_entry_in_flush_test(H5F_t * file_ptr)
}
}
- if ( pass ) {
+ if(pass) {
/* The basic idea of this test is to setup the cache such
* that:
@@ -34401,14 +34263,14 @@ cedds__expunge_dirty_entry_in_flush_test(H5F_t * file_ptr)
/* Load four huge entries into the cache. Recall that huge entries
* are one fourth the size of monster entries (16 KB vs. 64 KB).
*/
- for ( i = 0; i < 4; i++ ) {
+ for (i = 0; i < 4; i++) {
protect_entry(file_ptr, HUGE_ENTRY_TYPE, i);
unprotect_entry(file_ptr, HUGE_ENTRY_TYPE, i, H5C__DIRTIED_FLAG);
}
- if ( ( cache_ptr->index_len != 4 ) ||
- ( cache_ptr->index_size != (4 * HUGE_ENTRY_SIZE) ) ) {
+ if((cache_ptr->index_len != 4) ||
+ (cache_ptr->index_size != (4 * HUGE_ENTRY_SIZE))) {
pass = FALSE;
@@ -34416,7 +34278,7 @@ cedds__expunge_dirty_entry_in_flush_test(H5F_t * file_ptr)
}
}
- if ( pass ) {
+ if(pass) {
/* Next, set up the flush operation:
*
@@ -34428,7 +34290,7 @@ cedds__expunge_dirty_entry_in_flush_test(H5F_t * file_ptr)
}
- if ( pass ) {
+ if(pass) {
/* to summarize, at present the following entries
* are in cache with the following characteristics:
@@ -34455,17 +34317,17 @@ cedds__expunge_dirty_entry_in_flush_test(H5F_t * file_ptr)
/* flush the cache to run the test. In the process, clean up after test. */
- if ( pass ) {
+ if(pass) {
result = H5C_flush_cache(file_ptr, H5AC_ind_read_dxpl_id, H5C__FLUSH_INVALIDATE_FLAG);
- if ( result < 0 ) {
+ if(result < 0) {
pass = FALSE;
failure_mssg = "Cache flush invalidate failed in cedds expunge dirty entry in flush test";
}
- else if ( ( cache_ptr->index_len != 0 ) ||
- ( cache_ptr->index_size != 0 ) ) {
+ else if((cache_ptr->index_len != 0) ||
+ (cache_ptr->index_size != 0)) {
pass = FALSE;
failure_mssg = "Unexpected cache len/size after cedds expunge dirty entry in flush test";
@@ -34477,37 +34339,37 @@ cedds__expunge_dirty_entry_in_flush_test(H5F_t * file_ptr)
/* If we are collecting stats, check to see if we get the expected
* values.
*/
- if ( pass ) {
-
- if ( ( cache_ptr->insertions[HUGE_ENTRY_TYPE] != 0 ) ||
- ( cache_ptr->pinned_insertions[HUGE_ENTRY_TYPE] != 0 ) ||
- ( cache_ptr->clears[HUGE_ENTRY_TYPE] != 1 ) ||
- ( cache_ptr->flushes[HUGE_ENTRY_TYPE] != 3 ) ||
- ( cache_ptr->evictions[HUGE_ENTRY_TYPE] != 4 ) ||
- ( cache_ptr->take_ownerships[HUGE_ENTRY_TYPE] != 0 ) ||
- ( cache_ptr->moves[HUGE_ENTRY_TYPE] != 0 ) ||
- ( cache_ptr->entry_flush_moves[HUGE_ENTRY_TYPE] != 0 ) ||
- ( cache_ptr->cache_flush_moves[HUGE_ENTRY_TYPE] != 0 ) ||
- ( cache_ptr->pins[HUGE_ENTRY_TYPE] != 0 ) ||
- ( cache_ptr->unpins[HUGE_ENTRY_TYPE] != 0 ) ||
- ( cache_ptr->dirty_pins[HUGE_ENTRY_TYPE] != 0 ) ||
- ( cache_ptr->pinned_flushes[HUGE_ENTRY_TYPE] != 0 ) ||
- ( cache_ptr->pinned_clears[HUGE_ENTRY_TYPE] != 0 ) ||
- ( cache_ptr->size_increases[HUGE_ENTRY_TYPE] != 0 ) ||
- ( cache_ptr->size_decreases[HUGE_ENTRY_TYPE] != 0 ) ||
- ( cache_ptr->entry_flush_size_changes[HUGE_ENTRY_TYPE] != 0 ) ||
- ( cache_ptr->cache_flush_size_changes[HUGE_ENTRY_TYPE] != 0 ) ) {
+ if(pass) {
+
+ if((cache_ptr->insertions[HUGE_ENTRY_TYPE] != 0) ||
+ (cache_ptr->pinned_insertions[HUGE_ENTRY_TYPE] != 0) ||
+ (cache_ptr->clears[HUGE_ENTRY_TYPE] != 1) ||
+ (cache_ptr->flushes[HUGE_ENTRY_TYPE] != 3) ||
+ (cache_ptr->evictions[HUGE_ENTRY_TYPE] != 4) ||
+ (cache_ptr->take_ownerships[HUGE_ENTRY_TYPE] != 0) ||
+ (cache_ptr->moves[HUGE_ENTRY_TYPE] != 0) ||
+ (cache_ptr->entry_flush_moves[HUGE_ENTRY_TYPE] != 0) ||
+ (cache_ptr->cache_flush_moves[HUGE_ENTRY_TYPE] != 0) ||
+ (cache_ptr->pins[HUGE_ENTRY_TYPE] != 0) ||
+ (cache_ptr->unpins[HUGE_ENTRY_TYPE] != 0) ||
+ (cache_ptr->dirty_pins[HUGE_ENTRY_TYPE] != 0) ||
+ (cache_ptr->pinned_flushes[HUGE_ENTRY_TYPE] != 0) ||
+ (cache_ptr->pinned_clears[HUGE_ENTRY_TYPE] != 0) ||
+ (cache_ptr->size_increases[HUGE_ENTRY_TYPE] != 0) ||
+ (cache_ptr->size_decreases[HUGE_ENTRY_TYPE] != 0) ||
+ (cache_ptr->entry_flush_size_changes[HUGE_ENTRY_TYPE] != 0) ||
+ (cache_ptr->cache_flush_size_changes[HUGE_ENTRY_TYPE] != 0)) {
pass = FALSE;
failure_mssg = "Unexpected huge size entry stats in cedds__expunge_dirty_entry_in_flush_test().";
}
}
- if ( pass ) {
+ if(pass) {
- if ( ( cache_ptr->slist_scan_restarts != 1 ) ||
- ( cache_ptr->LRU_scan_restarts != 0 ) ||
- ( cache_ptr->hash_bucket_scan_restarts != 0 ) ) {
+ if((cache_ptr->slist_scan_restarts != 1) ||
+ (cache_ptr->LRU_scan_restarts != 0) ||
+ (cache_ptr->hash_bucket_scan_restarts != 0)) {
pass = FALSE;
failure_mssg = "unexpected scan restart stats in cedds__expunge_dirty_entry_in_flush_test().";
@@ -34515,12 +34377,12 @@ cedds__expunge_dirty_entry_in_flush_test(H5F_t * file_ptr)
}
#endif /* H5C_COLLECT_CACHE_STATS */
- if ( pass ) {
+ if(pass) {
reset_entries();
}
- if ( pass ) {
+ if(pass) {
/* reset cache min clean size to its expected value */
cache_ptr->min_clean_size = (1 * 1024 * 1024);
@@ -34617,21 +34479,21 @@ cedds__H5C_make_space_in_cache(H5F_t * file_ptr)
{ MONSTER_ENTRY_TYPE, 31, MONSTER_ENTRY_SIZE, TRUE, TRUE, TRUE, FALSE, FALSE, TRUE, FALSE, FALSE, {-1,-1,-1,-1,-1,-1,-1,-1}, {-1,-1,-1,-1,-1,-1,-1,-1}, 0, 0, 0, -1, FALSE},
};
- if ( pass ) {
+ if(pass) {
- if ( cache_ptr == NULL ) {
+ if(cache_ptr == NULL) {
pass = FALSE;
failure_mssg = "cache_ptr NULL on entry to cedds for H5C_make_space_in_cache() test.";
}
- else if ( ( cache_ptr->index_len != 0 ) ||
- ( cache_ptr->index_size != 0 ) ) {
+ else if((cache_ptr->index_len != 0) ||
+ (cache_ptr->index_size != 0)) {
pass = FALSE;
failure_mssg = "cache not empty at start of flush ops eviction test.";
}
- else if ( ( cache_ptr->max_cache_size != (2 * 1024 * 1024 ) ) ||
- ( cache_ptr->min_clean_size != (1 * 1024 * 1024 ) ) ) {
+ else if((cache_ptr->max_cache_size != (2 * 1024 * 1024)) ||
+ (cache_ptr->min_clean_size != (1 * 1024 * 1024))) {
pass = FALSE;
failure_mssg =
@@ -34647,7 +34509,7 @@ cedds__H5C_make_space_in_cache(H5F_t * file_ptr)
}
}
- if ( pass ) {
+ if(pass) {
/* The basic idea of this test is to setup the cache such
* that:
@@ -34675,14 +34537,14 @@ cedds__H5C_make_space_in_cache(H5F_t * file_ptr)
/* Load four huge entries into the cache. Recall that huge entries
* are one fourth the size of monster entries (16 KB vs. 64 KB).
*/
- for ( i = 0; i < 4; i++ ) {
+ for (i = 0; i < 4; i++) {
protect_entry(file_ptr, HUGE_ENTRY_TYPE, i);
unprotect_entry(file_ptr, HUGE_ENTRY_TYPE, i, H5C__DIRTIED_FLAG);
}
- if ( ( cache_ptr->index_len != 4 ) ||
- ( cache_ptr->index_size != (4 * HUGE_ENTRY_SIZE) ) ) {
+ if((cache_ptr->index_len != 4) ||
+ (cache_ptr->index_size != (4 * HUGE_ENTRY_SIZE))) {
pass = FALSE;
@@ -34690,7 +34552,7 @@ cedds__H5C_make_space_in_cache(H5F_t * file_ptr)
}
}
- if ( pass ) {
+ if(pass) {
/* Next, set up the flush operation:
*
@@ -34702,7 +34564,7 @@ cedds__H5C_make_space_in_cache(H5F_t * file_ptr)
}
- if ( pass ) {
+ if(pass) {
/* to summarize, at present the following entries
* are in cache with the following characteristics:
@@ -34726,17 +34588,17 @@ cedds__H5C_make_space_in_cache(H5F_t * file_ptr)
/* Now fill up the cache with other, unrelated entries. Recall
* that the cache size is 2 MB and 31 * 64 KB + 4 * 16 KP == 2 MB.
*/
- for ( i = 0; i < 31; i++ )
+ for (i = 0; i < 31; i++)
{
protect_entry(file_ptr, MONSTER_ENTRY_TYPE, i);
unprotect_entry(file_ptr, MONSTER_ENTRY_TYPE, i, H5C__DIRTIED_FLAG);
}
/* The cache should now be exactly full */
- if ( ( cache_ptr->index_len != 35 ) ||
- ( cache_ptr->index_size != 2 * 1024 * 1024 ) ||
- ( cache_ptr->index_size != ((4 * HUGE_ENTRY_SIZE) +
- (31 * MONSTER_ENTRY_SIZE)) ) ) {
+ if((cache_ptr->index_len != 35) ||
+ (cache_ptr->index_size != 2 * 1024 * 1024) ||
+ (cache_ptr->index_size != ((4 * HUGE_ENTRY_SIZE) +
+ (31 * MONSTER_ENTRY_SIZE)))) {
pass = FALSE;
failure_mssg = "unexpected size/len in H5C__make_space_in_cache() test (2)";
@@ -34748,7 +34610,7 @@ cedds__H5C_make_space_in_cache(H5F_t * file_ptr)
}
}
- if ( pass ) {
+ if(pass) {
/* now load another monster entry. This should cause
* H5C__make_space_in_cache() to be called. (HET 0) is dirty, and is at
@@ -34763,14 +34625,14 @@ cedds__H5C_make_space_in_cache(H5F_t * file_ptr)
* monster entry (MET, 31).
*
* Verify this. If H5C_make_space_in_cache() chokes, failure will
- * be detected in protect_entry(). Thus end the "if ( pass )" clause
+ * be detected in protect_entry(). Thus end the "if(pass)" clause
* there so the error message will not be overwritten.
*/
protect_entry(file_ptr, MONSTER_ENTRY_TYPE, 31);
}
- if ( pass ) {
+ if(pass) {
/* if the protect succeeded, unprotect and verify that all is at
* it should be.
@@ -34779,9 +34641,9 @@ cedds__H5C_make_space_in_cache(H5F_t * file_ptr)
unprotect_entry(file_ptr, MONSTER_ENTRY_TYPE, 31, H5C__DIRTIED_FLAG);
/* The cache should now be exactly full */
- if ( ( cache_ptr->index_len != 32 ) ||
- ( cache_ptr->index_size != 2 * 1024 * 1024 ) ||
- ( cache_ptr->index_size != (32 * MONSTER_ENTRY_SIZE) ) ) {
+ if((cache_ptr->index_len != 32) ||
+ (cache_ptr->index_size != 2 * 1024 * 1024) ||
+ (cache_ptr->index_size != (32 * MONSTER_ENTRY_SIZE))) {
pass = FALSE;
failure_mssg = "unexpected size/len in H5C__make_space_in_cache() test (3)";
@@ -34791,7 +34653,7 @@ cedds__H5C_make_space_in_cache(H5F_t * file_ptr)
/* modify the expected table to match the new situation, and
* then call verify_entry_status().
*/
- for ( i = 0; i < num_huge_entries; i++ )
+ for (i = 0; i < num_huge_entries; i++)
{
expected[i].in_cache = FALSE;
expected[i].is_dirty = FALSE;
@@ -34803,7 +34665,7 @@ cedds__H5C_make_space_in_cache(H5F_t * file_ptr)
expected[1].is_dirty = TRUE;
expected[1].serialized = FALSE;
- for ( i = num_huge_entries; i < num_huge_entries + num_monster_entries - 1; i++ )
+ for (i = num_huge_entries; i < num_huge_entries + num_monster_entries - 1; i++)
{
expected[i].is_dirty = FALSE;
expected[i].serialized = TRUE;
@@ -34816,17 +34678,17 @@ cedds__H5C_make_space_in_cache(H5F_t * file_ptr)
/* flush the cache and end the test. */
- if ( pass ) {
+ if(pass) {
result = H5C_flush_cache(file_ptr, H5AC_ind_read_dxpl_id, H5C__FLUSH_INVALIDATE_FLAG);
- if ( result < 0 ) {
+ if(result < 0) {
pass = FALSE;
failure_mssg = "Cache flush invalidate failed after flush op eviction test";
}
- else if ( ( cache_ptr->index_len != 0 ) ||
- ( cache_ptr->index_size != 0 ) ) {
+ else if((cache_ptr->index_len != 0) ||
+ (cache_ptr->index_size != 0)) {
pass = FALSE;
failure_mssg = "Unexpected cache len/size after cleanup of flush op eviction test";
@@ -34839,63 +34701,63 @@ cedds__H5C_make_space_in_cache(H5F_t * file_ptr)
* values.
*/
- if ( pass ) {
-
- if ( ( cache_ptr->insertions[HUGE_ENTRY_TYPE] != 0 ) ||
- ( cache_ptr->pinned_insertions[HUGE_ENTRY_TYPE] != 0 ) ||
- ( cache_ptr->clears[HUGE_ENTRY_TYPE] != 1 ) ||
- ( cache_ptr->flushes[HUGE_ENTRY_TYPE] != 3 ) ||
- ( cache_ptr->evictions[HUGE_ENTRY_TYPE] != 4 ) ||
- ( cache_ptr->take_ownerships[HUGE_ENTRY_TYPE] != 0 ) ||
- ( cache_ptr->moves[HUGE_ENTRY_TYPE] != 0 ) ||
- ( cache_ptr->entry_flush_moves[HUGE_ENTRY_TYPE] != 0 ) ||
- ( cache_ptr->cache_flush_moves[HUGE_ENTRY_TYPE] != 0 ) ||
- ( cache_ptr->pins[HUGE_ENTRY_TYPE] != 0 ) ||
- ( cache_ptr->unpins[HUGE_ENTRY_TYPE] != 0 ) ||
- ( cache_ptr->dirty_pins[HUGE_ENTRY_TYPE] != 0 ) ||
- ( cache_ptr->pinned_flushes[HUGE_ENTRY_TYPE] != 0 ) ||
- ( cache_ptr->pinned_clears[HUGE_ENTRY_TYPE] != 0 ) ||
- ( cache_ptr->size_increases[HUGE_ENTRY_TYPE] != 0 ) ||
- ( cache_ptr->size_decreases[HUGE_ENTRY_TYPE] != 0 ) ||
- ( cache_ptr->entry_flush_size_changes[HUGE_ENTRY_TYPE] != 0 ) ||
- ( cache_ptr->cache_flush_size_changes[HUGE_ENTRY_TYPE] != 0 ) ) {
+ if(pass) {
+
+ if((cache_ptr->insertions[HUGE_ENTRY_TYPE] != 0) ||
+ (cache_ptr->pinned_insertions[HUGE_ENTRY_TYPE] != 0) ||
+ (cache_ptr->clears[HUGE_ENTRY_TYPE] != 1) ||
+ (cache_ptr->flushes[HUGE_ENTRY_TYPE] != 3) ||
+ (cache_ptr->evictions[HUGE_ENTRY_TYPE] != 4) ||
+ (cache_ptr->take_ownerships[HUGE_ENTRY_TYPE] != 0) ||
+ (cache_ptr->moves[HUGE_ENTRY_TYPE] != 0) ||
+ (cache_ptr->entry_flush_moves[HUGE_ENTRY_TYPE] != 0) ||
+ (cache_ptr->cache_flush_moves[HUGE_ENTRY_TYPE] != 0) ||
+ (cache_ptr->pins[HUGE_ENTRY_TYPE] != 0) ||
+ (cache_ptr->unpins[HUGE_ENTRY_TYPE] != 0) ||
+ (cache_ptr->dirty_pins[HUGE_ENTRY_TYPE] != 0) ||
+ (cache_ptr->pinned_flushes[HUGE_ENTRY_TYPE] != 0) ||
+ (cache_ptr->pinned_clears[HUGE_ENTRY_TYPE] != 0) ||
+ (cache_ptr->size_increases[HUGE_ENTRY_TYPE] != 0) ||
+ (cache_ptr->size_decreases[HUGE_ENTRY_TYPE] != 0) ||
+ (cache_ptr->entry_flush_size_changes[HUGE_ENTRY_TYPE] != 0) ||
+ (cache_ptr->cache_flush_size_changes[HUGE_ENTRY_TYPE] != 0)) {
pass = FALSE;
failure_mssg = "Unexpected large entry stats in cedds__H5C_make_space_in_cache().";
}
}
- if ( pass ) {
+ if(pass) {
- if ( ( cache_ptr->insertions[MONSTER_ENTRY_TYPE] != 0 ) ||
- ( cache_ptr->pinned_insertions[MONSTER_ENTRY_TYPE] != 0 ) ||
- ( cache_ptr->clears[MONSTER_ENTRY_TYPE] != 0 ) ||
- ( cache_ptr->flushes[MONSTER_ENTRY_TYPE] != 32 ) ||
- ( cache_ptr->evictions[MONSTER_ENTRY_TYPE] != 32 ) ||
- ( cache_ptr->take_ownerships[MONSTER_ENTRY_TYPE] != 0 ) ||
- ( cache_ptr->moves[MONSTER_ENTRY_TYPE] != 0 ) ||
- ( cache_ptr->entry_flush_moves[MONSTER_ENTRY_TYPE] != 0 ) ||
- ( cache_ptr->cache_flush_moves[MONSTER_ENTRY_TYPE] != 0 ) ||
- ( cache_ptr->pins[MONSTER_ENTRY_TYPE] != 0 ) ||
- ( cache_ptr->unpins[MONSTER_ENTRY_TYPE] != 0 ) ||
- ( cache_ptr->dirty_pins[MONSTER_ENTRY_TYPE] != 0 ) ||
- ( cache_ptr->pinned_flushes[MONSTER_ENTRY_TYPE] != 0 ) ||
- ( cache_ptr->pinned_clears[MONSTER_ENTRY_TYPE] != 0 ) ||
- ( cache_ptr->size_increases[MONSTER_ENTRY_TYPE] != 0 ) ||
- ( cache_ptr->size_decreases[MONSTER_ENTRY_TYPE] != 0 ) ||
- ( cache_ptr->entry_flush_size_changes[MONSTER_ENTRY_TYPE] != 0 ) ||
- ( cache_ptr->cache_flush_size_changes[MONSTER_ENTRY_TYPE] != 0 ) ) {
+ if((cache_ptr->insertions[MONSTER_ENTRY_TYPE] != 0) ||
+ (cache_ptr->pinned_insertions[MONSTER_ENTRY_TYPE] != 0) ||
+ (cache_ptr->clears[MONSTER_ENTRY_TYPE] != 0) ||
+ (cache_ptr->flushes[MONSTER_ENTRY_TYPE] != 32) ||
+ (cache_ptr->evictions[MONSTER_ENTRY_TYPE] != 32) ||
+ (cache_ptr->take_ownerships[MONSTER_ENTRY_TYPE] != 0) ||
+ (cache_ptr->moves[MONSTER_ENTRY_TYPE] != 0) ||
+ (cache_ptr->entry_flush_moves[MONSTER_ENTRY_TYPE] != 0) ||
+ (cache_ptr->cache_flush_moves[MONSTER_ENTRY_TYPE] != 0) ||
+ (cache_ptr->pins[MONSTER_ENTRY_TYPE] != 0) ||
+ (cache_ptr->unpins[MONSTER_ENTRY_TYPE] != 0) ||
+ (cache_ptr->dirty_pins[MONSTER_ENTRY_TYPE] != 0) ||
+ (cache_ptr->pinned_flushes[MONSTER_ENTRY_TYPE] != 0) ||
+ (cache_ptr->pinned_clears[MONSTER_ENTRY_TYPE] != 0) ||
+ (cache_ptr->size_increases[MONSTER_ENTRY_TYPE] != 0) ||
+ (cache_ptr->size_decreases[MONSTER_ENTRY_TYPE] != 0) ||
+ (cache_ptr->entry_flush_size_changes[MONSTER_ENTRY_TYPE] != 0) ||
+ (cache_ptr->cache_flush_size_changes[MONSTER_ENTRY_TYPE] != 0)) {
pass = FALSE;
failure_mssg = "Unexpected monster entry stats in cedds__H5C_make_space_in_cache().";
}
}
- if ( pass ) {
+ if(pass) {
- if ( ( cache_ptr->slist_scan_restarts != 0 ) ||
- ( cache_ptr->LRU_scan_restarts != 1 ) ||
- ( cache_ptr->hash_bucket_scan_restarts != 0 ) ) {
+ if((cache_ptr->slist_scan_restarts != 0) ||
+ (cache_ptr->LRU_scan_restarts != 1) ||
+ (cache_ptr->hash_bucket_scan_restarts != 0)) {
pass = FALSE;
failure_mssg = "unexpected scan restart stats in cedds__H5C_make_space_in_cache().";
@@ -34903,12 +34765,12 @@ cedds__H5C_make_space_in_cache(H5F_t * file_ptr)
}
#endif /* H5C_COLLECT_CACHE_STATS */
- if ( pass ) {
+ if(pass) {
reset_entries();
}
- if ( pass ) {
+ if(pass) {
/* reset cache min clean size to its expected value */
cache_ptr->min_clean_size = (1 * 1024 * 1024);
@@ -35045,21 +34907,21 @@ cedds__H5C__autoadjust__ageout__evict_aged_out_entries(H5F_t * file_ptr)
/* double empty_reserve = */ 0.05f
};
- if ( pass ) {
+ if(pass) {
- if ( cache_ptr == NULL ) {
+ if(cache_ptr == NULL) {
pass = FALSE;
failure_mssg = "cache_ptr NULL on entry to cedds for H5C__autoadjust__ageout__evict_aged_out_entries() test.";
}
- else if ( ( cache_ptr->index_len != 0 ) ||
- ( cache_ptr->index_size != 0 ) ) {
+ else if((cache_ptr->index_len != 0) ||
+ (cache_ptr->index_size != 0)) {
pass = FALSE;
failure_mssg = "cache not empty at start cedds for H5C__autoadjust__ageout__evict_aged_out_entries() test.";
}
- else if ( ( cache_ptr->max_cache_size != (2 * 1024 * 1024 ) ) ||
- ( cache_ptr->min_clean_size != (1 * 1024 * 1024 ) ) ) {
+ else if((cache_ptr->max_cache_size != (2 * 1024 * 1024)) ||
+ (cache_ptr->min_clean_size != (1 * 1024 * 1024))) {
pass = FALSE;
failure_mssg =
@@ -35076,14 +34938,14 @@ cedds__H5C__autoadjust__ageout__evict_aged_out_entries(H5F_t * file_ptr)
}
/* save the initial resize configuration so we can restore it later */
- if ( pass ) {
+ if(pass) {
saved_auto_size_ctl.version = H5C__CURR_AUTO_SIZE_CTL_VER;
result = H5C_get_cache_auto_resize_config(cache_ptr,
&saved_auto_size_ctl);
- if ( result != SUCCEED ) {
+ if(result != SUCCEED) {
pass = FALSE;
failure_mssg = "H5C_get_cache_auto_resize_config failed.";
@@ -35092,18 +34954,18 @@ cedds__H5C__autoadjust__ageout__evict_aged_out_entries(H5F_t * file_ptr)
}
/* set the resize configuration we will be using in the test */
- if ( pass ) {
+ if(pass) {
result = H5C_set_cache_auto_resize_config(cache_ptr, &test_auto_size_ctl);
- if ( result != SUCCEED ) {
+ if(result != SUCCEED) {
pass = FALSE;
failure_mssg = "H5C_set_cache_auto_resize_config failed 1.\n";
}
}
- if ( pass ) {
+ if(pass) {
/* The basic idea of this test is to setup the cache such
* that:
@@ -35134,14 +34996,14 @@ cedds__H5C__autoadjust__ageout__evict_aged_out_entries(H5F_t * file_ptr)
*
* Recall that the cache size is 2 MB and 32 * 64 KB == 2 MB.
*/
- for ( i = 1; i < 32; i++ )
+ for (i = 1; i < 32; i++)
{
protect_entry(file_ptr, MONSTER_ENTRY_TYPE, i);
unprotect_entry(file_ptr, MONSTER_ENTRY_TYPE, i, H5C__NO_FLAGS_SET);
}
}
- if ( pass ) {
+ if(pass) {
/* Next, set up the flush operation:
*
@@ -35153,7 +35015,7 @@ cedds__H5C__autoadjust__ageout__evict_aged_out_entries(H5F_t * file_ptr)
}
- if ( pass ) {
+ if(pass) {
/* to summarize, at present the following entries
* are in cache with the following characteristics:
@@ -35171,9 +35033,9 @@ cedds__H5C__autoadjust__ageout__evict_aged_out_entries(H5F_t * file_ptr)
*/
/* The cache should now be exactly full */
- if ( ( cache_ptr->index_len != 32 ) ||
- ( cache_ptr->index_size != 2 * 1024 * 1024 ) ||
- ( cache_ptr->index_size != (32 * MONSTER_ENTRY_SIZE) ) ) {
+ if((cache_ptr->index_len != 32) ||
+ (cache_ptr->index_size != 2 * 1024 * 1024) ||
+ (cache_ptr->index_size != (32 * MONSTER_ENTRY_SIZE))) {
pass = FALSE;
failure_mssg = "unexpected size/len in H5C__autoadjust__ageout__evict_aged_out_entries() test (1)";
@@ -35186,7 +35048,7 @@ cedds__H5C__autoadjust__ageout__evict_aged_out_entries(H5F_t * file_ptr)
}
/* protect and unprotect (MET, 31) repeatedly until the end of the first epoch */
- while ( ( pass ) && ( cache_ptr->cache_accesses > 0 ) ) {
+ while(pass && (cache_ptr->cache_accesses > 0)) {
protect_entry(file_ptr, MONSTER_ENTRY_TYPE, 31);
unprotect_entry(file_ptr, MONSTER_ENTRY_TYPE, 31, H5C__NO_FLAGS_SET);
@@ -35194,7 +35056,7 @@ cedds__H5C__autoadjust__ageout__evict_aged_out_entries(H5F_t * file_ptr)
/* at this point, an epoch marker entry should have been inserted into the LRU */
- if ( pass ) {
+ if(pass) {
/* protect and unprotect (MET, 31) again to get cache_accesses > 0 */
protect_entry(file_ptr, MONSTER_ENTRY_TYPE, 31);
@@ -35202,7 +35064,7 @@ cedds__H5C__autoadjust__ageout__evict_aged_out_entries(H5F_t * file_ptr)
}
/* protect and unprotect (MET, 31) repeatedly until the end of the second epoch */
- while ( ( pass ) && ( cache_ptr->cache_accesses > 0 ) ) {
+ while(pass && (cache_ptr->cache_accesses > 0)) {
protect_entry(file_ptr, MONSTER_ENTRY_TYPE, 31);
unprotect_entry(file_ptr, MONSTER_ENTRY_TYPE, 31, H5C__NO_FLAGS_SET);
@@ -35214,10 +35076,10 @@ cedds__H5C__autoadjust__ageout__evict_aged_out_entries(H5F_t * file_ptr)
* moved to the head of the LRU by the ageout algorithm.)
*/
- if ( pass ) {
+ if(pass) {
- if ( ( cache_ptr->index_len != 2 ) ||
- ( cache_ptr->index_size != 2 * MONSTER_ENTRY_SIZE ) ) {
+ if((cache_ptr->index_len != 2) ||
+ (cache_ptr->index_size != 2 * MONSTER_ENTRY_SIZE)) {
pass = FALSE;
failure_mssg = "unexpected size/len in H5C__autoadjust__ageout__evict_aged_out_entries() test (2)";
@@ -35231,7 +35093,7 @@ cedds__H5C__autoadjust__ageout__evict_aged_out_entries(H5F_t * file_ptr)
expected[0].is_dirty = FALSE;
expected[0].serialized = TRUE;
- for ( i = 1; i < 31; i++ )
+ for (i = 1; i < 31; i++)
{
expected[i].in_cache = FALSE;
expected[i].is_dirty = FALSE;
@@ -35243,14 +35105,14 @@ cedds__H5C__autoadjust__ageout__evict_aged_out_entries(H5F_t * file_ptr)
}
/* restore the initial resize configuration */
- if ( pass ) {
+ if(pass) {
saved_auto_size_ctl.set_initial_size = TRUE;
saved_auto_size_ctl.initial_size = 2 * 1024 * 1024;
result = H5C_set_cache_auto_resize_config(cache_ptr, &saved_auto_size_ctl);
- if ( result != SUCCEED ) {
+ if(result != SUCCEED) {
pass = FALSE;
failure_mssg = "H5C_set_cache_auto_resize_config failed 2.\n";
@@ -35259,17 +35121,17 @@ cedds__H5C__autoadjust__ageout__evict_aged_out_entries(H5F_t * file_ptr)
/* flush the cache and end the test. */
- if ( pass ) {
+ if(pass) {
result = H5C_flush_cache(file_ptr, H5AC_ind_read_dxpl_id, H5C__FLUSH_INVALIDATE_FLAG);
- if ( result < 0 ) {
+ if(result < 0) {
pass = FALSE;
failure_mssg = "Cache flush invalidate failed after flush op eviction test";
}
- else if ( ( cache_ptr->index_len != 0 ) ||
- ( cache_ptr->index_size != 0 ) ) {
+ else if((cache_ptr->index_len != 0) ||
+ (cache_ptr->index_size != 0)) {
pass = FALSE;
failure_mssg = "Unexpected cache len/size after cleanup of flush op eviction test";
@@ -35282,37 +35144,37 @@ cedds__H5C__autoadjust__ageout__evict_aged_out_entries(H5F_t * file_ptr)
* values.
*/
- if ( pass ) {
-
- if ( ( cache_ptr->insertions[MONSTER_ENTRY_TYPE] != 0 ) ||
- ( cache_ptr->pinned_insertions[MONSTER_ENTRY_TYPE] != 0 ) ||
- ( cache_ptr->clears[MONSTER_ENTRY_TYPE] != 0 ) ||
- ( cache_ptr->flushes[MONSTER_ENTRY_TYPE] != 1 ) ||
- ( cache_ptr->evictions[MONSTER_ENTRY_TYPE] != 32 ) ||
- ( cache_ptr->take_ownerships[MONSTER_ENTRY_TYPE] != 0 ) ||
- ( cache_ptr->moves[MONSTER_ENTRY_TYPE] != 0 ) ||
- ( cache_ptr->entry_flush_moves[MONSTER_ENTRY_TYPE] != 0 ) ||
- ( cache_ptr->cache_flush_moves[MONSTER_ENTRY_TYPE] != 0 ) ||
- ( cache_ptr->pins[MONSTER_ENTRY_TYPE] != 0 ) ||
- ( cache_ptr->unpins[MONSTER_ENTRY_TYPE] != 0 ) ||
- ( cache_ptr->dirty_pins[MONSTER_ENTRY_TYPE] != 0 ) ||
- ( cache_ptr->pinned_flushes[MONSTER_ENTRY_TYPE] != 0 ) ||
- ( cache_ptr->pinned_clears[MONSTER_ENTRY_TYPE] != 0 ) ||
- ( cache_ptr->size_increases[MONSTER_ENTRY_TYPE] != 0 ) ||
- ( cache_ptr->size_decreases[MONSTER_ENTRY_TYPE] != 0 ) ||
- ( cache_ptr->entry_flush_size_changes[MONSTER_ENTRY_TYPE] != 0 ) ||
- ( cache_ptr->cache_flush_size_changes[MONSTER_ENTRY_TYPE] != 0 ) ) {
+ if(pass) {
+
+ if((cache_ptr->insertions[MONSTER_ENTRY_TYPE] != 0) ||
+ (cache_ptr->pinned_insertions[MONSTER_ENTRY_TYPE] != 0) ||
+ (cache_ptr->clears[MONSTER_ENTRY_TYPE] != 0) ||
+ (cache_ptr->flushes[MONSTER_ENTRY_TYPE] != 1) ||
+ (cache_ptr->evictions[MONSTER_ENTRY_TYPE] != 32) ||
+ (cache_ptr->take_ownerships[MONSTER_ENTRY_TYPE] != 0) ||
+ (cache_ptr->moves[MONSTER_ENTRY_TYPE] != 0) ||
+ (cache_ptr->entry_flush_moves[MONSTER_ENTRY_TYPE] != 0) ||
+ (cache_ptr->cache_flush_moves[MONSTER_ENTRY_TYPE] != 0) ||
+ (cache_ptr->pins[MONSTER_ENTRY_TYPE] != 0) ||
+ (cache_ptr->unpins[MONSTER_ENTRY_TYPE] != 0) ||
+ (cache_ptr->dirty_pins[MONSTER_ENTRY_TYPE] != 0) ||
+ (cache_ptr->pinned_flushes[MONSTER_ENTRY_TYPE] != 0) ||
+ (cache_ptr->pinned_clears[MONSTER_ENTRY_TYPE] != 0) ||
+ (cache_ptr->size_increases[MONSTER_ENTRY_TYPE] != 0) ||
+ (cache_ptr->size_decreases[MONSTER_ENTRY_TYPE] != 0) ||
+ (cache_ptr->entry_flush_size_changes[MONSTER_ENTRY_TYPE] != 0) ||
+ (cache_ptr->cache_flush_size_changes[MONSTER_ENTRY_TYPE] != 0)) {
pass = FALSE;
failure_mssg = "Unexpected monster entry stats in cedds__H5C__autoadjust__ageout__evict_aged_out_entries().";
}
}
- if ( pass ) {
+ if(pass) {
- if ( ( cache_ptr->slist_scan_restarts != 0 ) ||
- ( cache_ptr->LRU_scan_restarts != 1 ) ||
- ( cache_ptr->hash_bucket_scan_restarts != 0 ) ) {
+ if((cache_ptr->slist_scan_restarts != 0) ||
+ (cache_ptr->LRU_scan_restarts != 1) ||
+ (cache_ptr->hash_bucket_scan_restarts != 0)) {
pass = FALSE;
failure_mssg = "unexpected scan restart stats in cedds__H5C__autoadjust__ageout__evict_aged_out_entries().";
@@ -35320,12 +35182,12 @@ cedds__H5C__autoadjust__ageout__evict_aged_out_entries(H5F_t * file_ptr)
}
#endif /* H5C_COLLECT_CACHE_STATS */
- if ( pass ) {
+ if(pass) {
reset_entries();
}
- if ( pass ) {
+ if(pass) {
/* reset cache min clean size to its expected value */
cache_ptr->min_clean_size = (1 * 1024 * 1024);
@@ -35343,7 +35205,7 @@ cedds__H5C__autoadjust__ageout__evict_aged_out_entries(H5F_t * file_ptr)
* the removal from the cache of the next item in
* its scans of hash buckets.
*
- * !!!!!!!!!! WARNING !!!!!!!!!!
+ * !!!!!!!!!!WARNING !!!!!!!!!!
*
* This test may fail to function correctly if the hash
* table size or hash function is altered.
@@ -35436,21 +35298,21 @@ cedds__H5C_flush_invalidate_cache__bucket_scan(H5F_t * file_ptr)
{ MONSTER_ENTRY_TYPE, 31, MONSTER_ENTRY_SIZE, TRUE, TRUE, TRUE, FALSE, FALSE, TRUE, FALSE, FALSE, {MONSTER_ENTRY_TYPE,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0}, 1, 0, 0, -1, FALSE},
};
- if ( pass ) {
+ if(pass) {
- if ( cache_ptr == NULL ) {
+ if(cache_ptr == NULL) {
pass = FALSE;
failure_mssg = "cache_ptr NULL on entry to cedds for H5C__autoadjust__ageout__evict_aged_out_entries() test.";
}
- else if ( ( cache_ptr->index_len != 0 ) ||
- ( cache_ptr->index_size != 0 ) ) {
+ else if((cache_ptr->index_len != 0) ||
+ (cache_ptr->index_size != 0)) {
pass = FALSE;
failure_mssg = "cache not empty at start cedds for H5C__autoadjust__ageout__evict_aged_out_entries() test.";
}
- else if ( ( cache_ptr->max_cache_size != (2 * 1024 * 1024 ) ) ||
- ( cache_ptr->min_clean_size != (1 * 1024 * 1024 ) ) ) {
+ else if((cache_ptr->max_cache_size != (2 * 1024 * 1024)) ||
+ (cache_ptr->min_clean_size != (1 * 1024 * 1024))) {
pass = FALSE;
failure_mssg =
@@ -35467,7 +35329,7 @@ cedds__H5C_flush_invalidate_cache__bucket_scan(H5F_t * file_ptr)
}
- if ( pass ) {
+ if(pass) {
/* reset the stats before we start. If stats are enabled, we will
* check to see if they are as expected at the end.
@@ -35483,14 +35345,14 @@ cedds__H5C_flush_invalidate_cache__bucket_scan(H5F_t * file_ptr)
protect_entry(file_ptr, MONSTER_ENTRY_TYPE, 0);
unprotect_entry(file_ptr, MONSTER_ENTRY_TYPE, 0, H5C__DIRTIED_FLAG);
- for ( i = 8; i <= 24; i += 8 )
+ for (i = 8; i <= 24; i += 8)
{
protect_entry(file_ptr, MONSTER_ENTRY_TYPE, i);
unprotect_entry(file_ptr, MONSTER_ENTRY_TYPE, i, H5C__NO_FLAGS_SET);
}
}
- if ( pass ) {
+ if(pass) {
/* verify that the above entries hash to the same bucket */
base_addr = entries[MONSTER_ENTRY_TYPE];
@@ -35501,12 +35363,12 @@ cedds__H5C_flush_invalidate_cache__bucket_scan(H5F_t * file_ptr)
expected_hash_bucket = H5C__HASH_FCN(entry_addr);
- for ( i = 8; i <= 24; i += 8 ) {
+ for (i = 8; i <= 24; i += 8) {
entry_ptr = &(base_addr[i]);
entry_addr = entry_ptr->header.addr;
- if ( expected_hash_bucket != H5C__HASH_FCN(entry_addr) ) {
+ if(expected_hash_bucket != H5C__HASH_FCN(entry_addr)) {
pass = FALSE;
failure_mssg = "Test entries don't map to same bucket -- hash table size or hash fcn change?";
@@ -35514,7 +35376,7 @@ cedds__H5C_flush_invalidate_cache__bucket_scan(H5F_t * file_ptr)
}
}
- if ( pass ) {
+ if(pass) {
/* setup the expunge flush operation:
*
@@ -35525,7 +35387,7 @@ cedds__H5C_flush_invalidate_cache__bucket_scan(H5F_t * file_ptr)
MONSTER_ENTRY_TYPE, 8, FALSE, (size_t)0, NULL);
}
- if ( pass ) {
+ if(pass) {
/* load the entry that will have a flush dependencey with (MET, 0),
* thus preventing it from being flushed on the first pass through
@@ -35536,7 +35398,7 @@ cedds__H5C_flush_invalidate_cache__bucket_scan(H5F_t * file_ptr)
unprotect_entry(file_ptr, MONSTER_ENTRY_TYPE, 31, H5C__DIRTIED_FLAG);
}
- if ( pass ) {
+ if(pass) {
/* verify that the dirty entry doesn't map to the same
* hash bucket as the clean entries.
@@ -35545,14 +35407,14 @@ cedds__H5C_flush_invalidate_cache__bucket_scan(H5F_t * file_ptr)
entry_ptr = &(base_addr[31]);
entry_addr = entry_ptr->header.addr;
- if ( expected_hash_bucket == H5C__HASH_FCN(entry_addr) ) {
+ if(expected_hash_bucket == H5C__HASH_FCN(entry_addr)) {
pass = FALSE;
failure_mssg = "Dirty entry maps to same hash bucket as clean entries?!?!";
}
}
- if ( pass ) {
+ if(pass) {
/* Next, create the flush dependency requiring (MET, 31) to
* be flushed prior to (MET, 0).
@@ -35564,7 +35426,7 @@ cedds__H5C_flush_invalidate_cache__bucket_scan(H5F_t * file_ptr)
}
- if ( pass ) {
+ if(pass) {
/* Then, setup the flush operation to take down the flush
* dependency when (MET, 31) is flushed.
@@ -35577,13 +35439,13 @@ cedds__H5C_flush_invalidate_cache__bucket_scan(H5F_t * file_ptr)
}
- if ( pass ) {
+ if(pass) {
/* verify the expected status of all entries we have loaded to date: */
verify_entry_status(cache_ptr, 0, 5, expected);
}
- if ( pass ) {
+ if(pass) {
/* now do some protect / unprotect cycles to force the
* entries into the desired order in the hash bucket.
@@ -35591,14 +35453,14 @@ cedds__H5C_flush_invalidate_cache__bucket_scan(H5F_t * file_ptr)
* hash bucket list on lookup.
*/
- for ( i = 24; i >= 0; i -= 8 )
+ for (i = 24; i >= 0; i -= 8)
{
protect_entry(file_ptr, MONSTER_ENTRY_TYPE, i);
unprotect_entry(file_ptr, MONSTER_ENTRY_TYPE, i, H5C__NO_FLAGS_SET);
}
}
- if ( pass ) {
+ if(pass) {
/* scan the hash bucket to verify that the expected entries appear
* in the expected order.
@@ -35607,23 +35469,23 @@ cedds__H5C_flush_invalidate_cache__bucket_scan(H5F_t * file_ptr)
i = 0;
- while ( ( pass ) && ( i <= 24 ) )
+ while(pass && (i <= 24))
{
entry_ptr = &(base_addr[i]);
- if ( scan_ptr == NULL ) {
+ if(scan_ptr == NULL) {
pass = FALSE;
failure_mssg = "premature end of hash bucket list?!?!";
- } else if ( ( scan_ptr == NULL ) ||
- ( scan_ptr != &(entry_ptr->header) ) ) {
+ } else if((scan_ptr == NULL) ||
+ (scan_ptr != &(entry_ptr->header))) {
pass = FALSE;
failure_mssg = "bad test hash bucket setup?!?!";
}
- if ( pass ) {
+ if(pass) {
scan_ptr = scan_ptr->ht_next;
i += 8;
@@ -35634,17 +35496,17 @@ cedds__H5C_flush_invalidate_cache__bucket_scan(H5F_t * file_ptr)
/* test setup complete -- flush the cache to run and end the test. */
- if ( pass ) {
+ if(pass) {
result = H5C_flush_cache(file_ptr, H5AC_ind_read_dxpl_id, H5C__FLUSH_INVALIDATE_FLAG);
- if ( result < 0 ) {
+ if(result < 0) {
pass = FALSE;
failure_mssg = "Cache flush invalidate failed after flush op eviction test";
}
- else if ( ( cache_ptr->index_len != 0 ) ||
- ( cache_ptr->index_size != 0 ) ) {
+ else if((cache_ptr->index_len != 0) ||
+ (cache_ptr->index_size != 0)) {
pass = FALSE;
failure_mssg = "Unexpected cache len/size after cleanup of flush op eviction test";
@@ -35657,37 +35519,37 @@ cedds__H5C_flush_invalidate_cache__bucket_scan(H5F_t * file_ptr)
* values.
*/
- if ( pass ) {
-
- if ( ( cache_ptr->insertions[MONSTER_ENTRY_TYPE] != 0 ) ||
- ( cache_ptr->pinned_insertions[MONSTER_ENTRY_TYPE] != 0 ) ||
- ( cache_ptr->clears[MONSTER_ENTRY_TYPE] != 0 ) ||
- ( cache_ptr->flushes[MONSTER_ENTRY_TYPE] != 2 ) ||
- ( cache_ptr->evictions[MONSTER_ENTRY_TYPE] != 5 ) ||
- ( cache_ptr->take_ownerships[MONSTER_ENTRY_TYPE] != 0 ) ||
- ( cache_ptr->moves[MONSTER_ENTRY_TYPE] != 0 ) ||
- ( cache_ptr->entry_flush_moves[MONSTER_ENTRY_TYPE] != 0 ) ||
- ( cache_ptr->cache_flush_moves[MONSTER_ENTRY_TYPE] != 0 ) ||
- ( cache_ptr->pins[MONSTER_ENTRY_TYPE] != 1 ) ||
- ( cache_ptr->unpins[MONSTER_ENTRY_TYPE] != 1 ) ||
- ( cache_ptr->dirty_pins[MONSTER_ENTRY_TYPE] != 0 ) ||
- ( cache_ptr->pinned_flushes[MONSTER_ENTRY_TYPE] != 0 ) ||
- ( cache_ptr->pinned_clears[MONSTER_ENTRY_TYPE] != 0 ) ||
- ( cache_ptr->size_increases[MONSTER_ENTRY_TYPE] != 0 ) ||
- ( cache_ptr->size_decreases[MONSTER_ENTRY_TYPE] != 0 ) ||
- ( cache_ptr->entry_flush_size_changes[MONSTER_ENTRY_TYPE] != 0 ) ||
- ( cache_ptr->cache_flush_size_changes[MONSTER_ENTRY_TYPE] != 0 ) ) {
+ if(pass) {
+
+ if((cache_ptr->insertions[MONSTER_ENTRY_TYPE] != 0) ||
+ (cache_ptr->pinned_insertions[MONSTER_ENTRY_TYPE] != 0) ||
+ (cache_ptr->clears[MONSTER_ENTRY_TYPE] != 0) ||
+ (cache_ptr->flushes[MONSTER_ENTRY_TYPE] != 2) ||
+ (cache_ptr->evictions[MONSTER_ENTRY_TYPE] != 5) ||
+ (cache_ptr->take_ownerships[MONSTER_ENTRY_TYPE] != 0) ||
+ (cache_ptr->moves[MONSTER_ENTRY_TYPE] != 0) ||
+ (cache_ptr->entry_flush_moves[MONSTER_ENTRY_TYPE] != 0) ||
+ (cache_ptr->cache_flush_moves[MONSTER_ENTRY_TYPE] != 0) ||
+ (cache_ptr->pins[MONSTER_ENTRY_TYPE] != 1) ||
+ (cache_ptr->unpins[MONSTER_ENTRY_TYPE] != 1) ||
+ (cache_ptr->dirty_pins[MONSTER_ENTRY_TYPE] != 0) ||
+ (cache_ptr->pinned_flushes[MONSTER_ENTRY_TYPE] != 0) ||
+ (cache_ptr->pinned_clears[MONSTER_ENTRY_TYPE] != 0) ||
+ (cache_ptr->size_increases[MONSTER_ENTRY_TYPE] != 0) ||
+ (cache_ptr->size_decreases[MONSTER_ENTRY_TYPE] != 0) ||
+ (cache_ptr->entry_flush_size_changes[MONSTER_ENTRY_TYPE] != 0) ||
+ (cache_ptr->cache_flush_size_changes[MONSTER_ENTRY_TYPE] != 0)) {
pass = FALSE;
failure_mssg = "Unexpected monster entry stats in cedds__H5C_flush_invalidate_cache__bucket_scan().";
}
}
- if ( pass ) {
+ if(pass) {
- if ( ( cache_ptr->slist_scan_restarts != 0 ) ||
- ( cache_ptr->LRU_scan_restarts != 0 ) ||
- ( cache_ptr->hash_bucket_scan_restarts != 1 ) ) {
+ if((cache_ptr->slist_scan_restarts != 0) ||
+ (cache_ptr->LRU_scan_restarts != 0) ||
+ (cache_ptr->hash_bucket_scan_restarts != 1)) {
pass = FALSE;
failure_mssg = "unexpected scan restart stats in cedds__H5C_flush_invalidate_cache__bucket_scan().";
@@ -35695,12 +35557,12 @@ cedds__H5C_flush_invalidate_cache__bucket_scan(H5F_t * file_ptr)
}
#endif /* H5C_COLLECT_CACHE_STATS */
- if ( pass ) {
+ if(pass) {
reset_entries();
}
- if ( pass ) {
+ if(pass) {
/* reset cache min clean size to its expected value */
cache_ptr->min_clean_size = (1 * 1024 * 1024);
@@ -35753,21 +35615,21 @@ check_stats(void)
file_ptr = setup_cache((size_t)(2 * 1024 * 1024),
(size_t)(1 * 1024 * 1024));
- if ( pass ) {
+ if(pass) {
check_stats__smoke_check_1(file_ptr);
}
- if ( pass ) {
+ if(pass) {
takedown_cache(file_ptr, FALSE, FALSE);
}
- if ( pass ) { PASSED(); } else { H5_FAILED(); }
+ if(pass) { PASSED(); } else { H5_FAILED(); }
- if ( ! pass ) {
+ if(!pass) {
HDfprintf(stdout, "%s(): failure_mssg = \"%s\".\n",
FUNC, failure_mssg);
@@ -35820,21 +35682,21 @@ check_stats__smoke_check_1(H5F_t * file_ptr)
int i;
herr_t result;
- if ( pass ) {
+ if(pass) {
- if ( cache_ptr == NULL ) {
+ if(cache_ptr == NULL) {
pass = FALSE;
failure_mssg = "cache_ptr NULL on entry to check_stats__smoke_check_1().";
}
- else if ( ( cache_ptr->index_len != 0 ) ||
- ( cache_ptr->index_size != 0 ) ) {
+ else if((cache_ptr->index_len != 0) ||
+ (cache_ptr->index_size != 0)) {
pass = FALSE;
failure_mssg = "cache not empty on entry to check_stats__smoke_check_1().";
}
- else if ( ( cache_ptr->max_cache_size != (2 * 1024 * 1024 ) ) ||
- ( cache_ptr->min_clean_size != (1 * 1024 * 1024 ) ) ) {
+ else if((cache_ptr->max_cache_size != (2 * 1024 * 1024)) ||
+ (cache_ptr->min_clean_size != (1 * 1024 * 1024))) {
pass = FALSE;
failure_mssg =
@@ -35850,73 +35712,73 @@ check_stats__smoke_check_1(H5F_t * file_ptr)
}
}
- if ( pass ) {
+ if(pass) {
/* first fill the cache with monster entryies via insertion */
- for ( i = 0; i < 32; i++ )
+ for (i = 0; i < 32; i++)
insert_entry(file_ptr, MONSTER_ENTRY_TYPE, i, H5C__NO_FLAGS_SET);
}
- if ( pass ) {
-
- if ( ( cache_ptr->hits[MONSTER_ENTRY_TYPE] != 0 ) ||
- ( cache_ptr->misses[MONSTER_ENTRY_TYPE] != 0 ) ||
- ( cache_ptr->write_protects[MONSTER_ENTRY_TYPE] != 0 ) ||
- ( cache_ptr->read_protects[MONSTER_ENTRY_TYPE] != 0 ) ||
- ( cache_ptr->max_read_protects[MONSTER_ENTRY_TYPE] != 0 ) ||
- ( cache_ptr->insertions[MONSTER_ENTRY_TYPE] != 32 ) ||
- ( cache_ptr->pinned_insertions[MONSTER_ENTRY_TYPE] != 0 ) ||
- ( cache_ptr->clears[MONSTER_ENTRY_TYPE] != 0 ) ||
- ( cache_ptr->flushes[MONSTER_ENTRY_TYPE] != 0 ) ||
- ( cache_ptr->evictions[MONSTER_ENTRY_TYPE] != 0 ) ||
- ( cache_ptr->take_ownerships[MONSTER_ENTRY_TYPE] != 0 ) ||
- ( cache_ptr->moves[MONSTER_ENTRY_TYPE] != 0 ) ||
- ( cache_ptr->entry_flush_moves[MONSTER_ENTRY_TYPE] != 0 ) ||
- ( cache_ptr->cache_flush_moves[MONSTER_ENTRY_TYPE] != 0 ) ||
- ( cache_ptr->pins[MONSTER_ENTRY_TYPE] != 0 ) ||
- ( cache_ptr->unpins[MONSTER_ENTRY_TYPE] != 0 ) ||
- ( cache_ptr->dirty_pins[MONSTER_ENTRY_TYPE] != 0 ) ||
- ( cache_ptr->pinned_flushes[MONSTER_ENTRY_TYPE] != 0 ) ||
- ( cache_ptr->pinned_clears[MONSTER_ENTRY_TYPE] != 0 ) ||
- ( cache_ptr->size_increases[MONSTER_ENTRY_TYPE] != 0 ) ||
- ( cache_ptr->size_decreases[MONSTER_ENTRY_TYPE] != 0 ) ||
- ( cache_ptr->entry_flush_size_changes[MONSTER_ENTRY_TYPE] != 0 ) ||
- ( cache_ptr->cache_flush_size_changes[MONSTER_ENTRY_TYPE] != 0 ) ) {
+ if(pass) {
+
+ if((cache_ptr->hits[MONSTER_ENTRY_TYPE] != 0) ||
+ (cache_ptr->misses[MONSTER_ENTRY_TYPE] != 0) ||
+ (cache_ptr->write_protects[MONSTER_ENTRY_TYPE] != 0) ||
+ (cache_ptr->read_protects[MONSTER_ENTRY_TYPE] != 0) ||
+ (cache_ptr->max_read_protects[MONSTER_ENTRY_TYPE] != 0) ||
+ (cache_ptr->insertions[MONSTER_ENTRY_TYPE] != 32) ||
+ (cache_ptr->pinned_insertions[MONSTER_ENTRY_TYPE] != 0) ||
+ (cache_ptr->clears[MONSTER_ENTRY_TYPE] != 0) ||
+ (cache_ptr->flushes[MONSTER_ENTRY_TYPE] != 0) ||
+ (cache_ptr->evictions[MONSTER_ENTRY_TYPE] != 0) ||
+ (cache_ptr->take_ownerships[MONSTER_ENTRY_TYPE] != 0) ||
+ (cache_ptr->moves[MONSTER_ENTRY_TYPE] != 0) ||
+ (cache_ptr->entry_flush_moves[MONSTER_ENTRY_TYPE] != 0) ||
+ (cache_ptr->cache_flush_moves[MONSTER_ENTRY_TYPE] != 0) ||
+ (cache_ptr->pins[MONSTER_ENTRY_TYPE] != 0) ||
+ (cache_ptr->unpins[MONSTER_ENTRY_TYPE] != 0) ||
+ (cache_ptr->dirty_pins[MONSTER_ENTRY_TYPE] != 0) ||
+ (cache_ptr->pinned_flushes[MONSTER_ENTRY_TYPE] != 0) ||
+ (cache_ptr->pinned_clears[MONSTER_ENTRY_TYPE] != 0) ||
+ (cache_ptr->size_increases[MONSTER_ENTRY_TYPE] != 0) ||
+ (cache_ptr->size_decreases[MONSTER_ENTRY_TYPE] != 0) ||
+ (cache_ptr->entry_flush_size_changes[MONSTER_ENTRY_TYPE] != 0) ||
+ (cache_ptr->cache_flush_size_changes[MONSTER_ENTRY_TYPE] != 0)) {
pass = FALSE;
failure_mssg = "Unexpected monster size entry stats in check_stats__smoke_check_1(1).";
}
}
- if ( pass ) {
-
- if ( ( cache_ptr->total_ht_insertions != 32 ) ||
- ( cache_ptr->total_ht_deletions != 0 ) ||
- ( cache_ptr->successful_ht_searches != 0 ) ||
- ( cache_ptr->total_successful_ht_search_depth != 0 ) ||
- ( cache_ptr->failed_ht_searches != 32 ) ||
- ( cache_ptr->total_failed_ht_search_depth != 48 ) ||
- ( cache_ptr->max_index_len != 32 ) ||
- ( cache_ptr->max_index_size != 2 * 1024 * 1024 ) ||
- ( cache_ptr->max_clean_index_size != 0 ) ||
- ( cache_ptr->max_dirty_index_size != 2 * 1024 * 1024 ) ||
- ( cache_ptr->max_slist_len != 32 ) ||
- ( cache_ptr->max_slist_size != 2 * 1024 * 1024 ) ||
- ( cache_ptr->max_pl_len != 0 ) ||
- ( cache_ptr->max_pl_size != 0 ) ||
- ( cache_ptr->max_pel_len != 0 ) ||
- ( cache_ptr->max_pel_size != 0 ) ||
- ( cache_ptr->calls_to_msic != 0 ) ||
- ( cache_ptr->total_entries_skipped_in_msic != 0 ) ||
- ( cache_ptr->total_entries_scanned_in_msic != 0 ) ||
- ( cache_ptr->max_entries_skipped_in_msic != 0 ) ||
- ( cache_ptr->max_entries_scanned_in_msic != 0 ) ||
- ( cache_ptr->entries_scanned_to_make_space != 0 ) ||
- ( cache_ptr->slist_scan_restarts != 0 ) ||
- ( cache_ptr->LRU_scan_restarts != 0 ) ||
- ( cache_ptr->hash_bucket_scan_restarts != 0 ) ) {
+ if(pass) {
+
+ if((cache_ptr->total_ht_insertions != 32) ||
+ (cache_ptr->total_ht_deletions != 0) ||
+ (cache_ptr->successful_ht_searches != 0) ||
+ (cache_ptr->total_successful_ht_search_depth != 0) ||
+ (cache_ptr->failed_ht_searches != 32) ||
+ (cache_ptr->total_failed_ht_search_depth != 48) ||
+ (cache_ptr->max_index_len != 32) ||
+ (cache_ptr->max_index_size != 2 * 1024 * 1024) ||
+ (cache_ptr->max_clean_index_size != 0) ||
+ (cache_ptr->max_dirty_index_size != 2 * 1024 * 1024) ||
+ (cache_ptr->max_slist_len != 32) ||
+ (cache_ptr->max_slist_size != 2 * 1024 * 1024) ||
+ (cache_ptr->max_pl_len != 0) ||
+ (cache_ptr->max_pl_size != 0) ||
+ (cache_ptr->max_pel_len != 0) ||
+ (cache_ptr->max_pel_size != 0) ||
+ (cache_ptr->calls_to_msic != 0) ||
+ (cache_ptr->total_entries_skipped_in_msic != 0) ||
+ (cache_ptr->total_entries_scanned_in_msic != 0) ||
+ (cache_ptr->max_entries_skipped_in_msic != 0) ||
+ (cache_ptr->max_entries_scanned_in_msic != 0) ||
+ (cache_ptr->entries_scanned_to_make_space != 0) ||
+ (cache_ptr->slist_scan_restarts != 0) ||
+ (cache_ptr->LRU_scan_restarts != 0) ||
+ (cache_ptr->hash_bucket_scan_restarts != 0)) {
pass = FALSE;
failure_mssg = "Unexpected cache stats in check_stats__smoke_check_1(1).";
@@ -35924,16 +35786,16 @@ check_stats__smoke_check_1(H5F_t * file_ptr)
}
#if H5C_COLLECT_CACHE_ENTRY_STATS
- if ( pass ) {
+ if(pass) {
/* Note that most entry level stats are only updated on entry eviction */
- if ( ( cache_ptr->max_accesses[MONSTER_ENTRY_TYPE] != 0 ) ||
- ( cache_ptr->min_accesses[MONSTER_ENTRY_TYPE] != 1000000 ) || /* initial value */
- ( cache_ptr->max_clears[MONSTER_ENTRY_TYPE] != 0 ) ||
- ( cache_ptr->max_flushes[MONSTER_ENTRY_TYPE] != 0 ) ||
- ( cache_ptr->max_size[MONSTER_ENTRY_TYPE] != 64 * 1024 ) ||
- ( cache_ptr->max_pins[MONSTER_ENTRY_TYPE] != 0 ) ) {
+ if((cache_ptr->max_accesses[MONSTER_ENTRY_TYPE] != 0) ||
+ (cache_ptr->min_accesses[MONSTER_ENTRY_TYPE] != 1000000) || /* initial value */
+ (cache_ptr->max_clears[MONSTER_ENTRY_TYPE] != 0) ||
+ (cache_ptr->max_flushes[MONSTER_ENTRY_TYPE] != 0) ||
+ (cache_ptr->max_size[MONSTER_ENTRY_TYPE] != 64 * 1024) ||
+ (cache_ptr->max_pins[MONSTER_ENTRY_TYPE] != 0)) {
pass = FALSE;
failure_mssg = "Unexpected monster entry level stats in check_stats__smoke_check_1(1).";
@@ -35941,78 +35803,78 @@ check_stats__smoke_check_1(H5F_t * file_ptr)
}
#endif /* H5C_COLLECT_CACHE_ENTRY_STATS */
- if ( pass ) {
+ if(pass) {
/* protect and unprotect each entry once. Note
* that all entries are already dirty, as they
* entered the cache via insertion
*/
- for ( i = 0; i < 32; i++ )
+ for (i = 0; i < 32; i++)
{
protect_entry(file_ptr, MONSTER_ENTRY_TYPE, i);
unprotect_entry(file_ptr, MONSTER_ENTRY_TYPE, i, H5C__NO_FLAGS_SET);
}
}
- if ( pass ) {
-
- if ( ( cache_ptr->hits[MONSTER_ENTRY_TYPE] != 32 ) ||
- ( cache_ptr->misses[MONSTER_ENTRY_TYPE] != 0 ) ||
- ( cache_ptr->write_protects[MONSTER_ENTRY_TYPE] != 32 ) ||
- ( cache_ptr->read_protects[MONSTER_ENTRY_TYPE] != 0 ) ||
- ( cache_ptr->max_read_protects[MONSTER_ENTRY_TYPE] != 0 ) ||
- ( cache_ptr->insertions[MONSTER_ENTRY_TYPE] != 32 ) ||
- ( cache_ptr->pinned_insertions[MONSTER_ENTRY_TYPE] != 0 ) ||
- ( cache_ptr->clears[MONSTER_ENTRY_TYPE] != 0 ) ||
- ( cache_ptr->flushes[MONSTER_ENTRY_TYPE] != 0 ) ||
- ( cache_ptr->evictions[MONSTER_ENTRY_TYPE] != 0 ) ||
- ( cache_ptr->take_ownerships[MONSTER_ENTRY_TYPE] != 0 ) ||
- ( cache_ptr->moves[MONSTER_ENTRY_TYPE] != 0 ) ||
- ( cache_ptr->entry_flush_moves[MONSTER_ENTRY_TYPE] != 0 ) ||
- ( cache_ptr->cache_flush_moves[MONSTER_ENTRY_TYPE] != 0 ) ||
- ( cache_ptr->pins[MONSTER_ENTRY_TYPE] != 0 ) ||
- ( cache_ptr->unpins[MONSTER_ENTRY_TYPE] != 0 ) ||
- ( cache_ptr->dirty_pins[MONSTER_ENTRY_TYPE] != 0 ) ||
- ( cache_ptr->pinned_flushes[MONSTER_ENTRY_TYPE] != 0 ) ||
- ( cache_ptr->pinned_clears[MONSTER_ENTRY_TYPE] != 0 ) ||
- ( cache_ptr->size_increases[MONSTER_ENTRY_TYPE] != 0 ) ||
- ( cache_ptr->size_decreases[MONSTER_ENTRY_TYPE] != 0 ) ||
- ( cache_ptr->entry_flush_size_changes[MONSTER_ENTRY_TYPE] != 0 ) ||
- ( cache_ptr->cache_flush_size_changes[MONSTER_ENTRY_TYPE] != 0 ) ) {
+ if(pass) {
+
+ if((cache_ptr->hits[MONSTER_ENTRY_TYPE] != 32) ||
+ (cache_ptr->misses[MONSTER_ENTRY_TYPE] != 0) ||
+ (cache_ptr->write_protects[MONSTER_ENTRY_TYPE] != 32) ||
+ (cache_ptr->read_protects[MONSTER_ENTRY_TYPE] != 0) ||
+ (cache_ptr->max_read_protects[MONSTER_ENTRY_TYPE] != 0) ||
+ (cache_ptr->insertions[MONSTER_ENTRY_TYPE] != 32) ||
+ (cache_ptr->pinned_insertions[MONSTER_ENTRY_TYPE] != 0) ||
+ (cache_ptr->clears[MONSTER_ENTRY_TYPE] != 0) ||
+ (cache_ptr->flushes[MONSTER_ENTRY_TYPE] != 0) ||
+ (cache_ptr->evictions[MONSTER_ENTRY_TYPE] != 0) ||
+ (cache_ptr->take_ownerships[MONSTER_ENTRY_TYPE] != 0) ||
+ (cache_ptr->moves[MONSTER_ENTRY_TYPE] != 0) ||
+ (cache_ptr->entry_flush_moves[MONSTER_ENTRY_TYPE] != 0) ||
+ (cache_ptr->cache_flush_moves[MONSTER_ENTRY_TYPE] != 0) ||
+ (cache_ptr->pins[MONSTER_ENTRY_TYPE] != 0) ||
+ (cache_ptr->unpins[MONSTER_ENTRY_TYPE] != 0) ||
+ (cache_ptr->dirty_pins[MONSTER_ENTRY_TYPE] != 0) ||
+ (cache_ptr->pinned_flushes[MONSTER_ENTRY_TYPE] != 0) ||
+ (cache_ptr->pinned_clears[MONSTER_ENTRY_TYPE] != 0) ||
+ (cache_ptr->size_increases[MONSTER_ENTRY_TYPE] != 0) ||
+ (cache_ptr->size_decreases[MONSTER_ENTRY_TYPE] != 0) ||
+ (cache_ptr->entry_flush_size_changes[MONSTER_ENTRY_TYPE] != 0) ||
+ (cache_ptr->cache_flush_size_changes[MONSTER_ENTRY_TYPE] != 0)) {
pass = FALSE;
failure_mssg = "Unexpected monster size entry stats in check_stats__smoke_check_1(2).";
}
}
- if ( pass ) {
-
- if ( ( cache_ptr->total_ht_insertions != 32 ) ||
- ( cache_ptr->total_ht_deletions != 0 ) ||
- ( cache_ptr->successful_ht_searches != 32 ) ||
- ( cache_ptr->total_successful_ht_search_depth != 96 ) ||
- ( cache_ptr->failed_ht_searches != 32 ) ||
- ( cache_ptr->total_failed_ht_search_depth != 48 ) ||
- ( cache_ptr->max_index_len != 32 ) ||
- ( cache_ptr->max_index_size != 2 * 1024 * 1024 ) ||
- ( cache_ptr->max_clean_index_size != 0 ) ||
- ( cache_ptr->max_dirty_index_size != 2 * 1024 * 1024 ) ||
- ( cache_ptr->max_slist_len != 32 ) ||
- ( cache_ptr->max_slist_size != 2 * 1024 * 1024 ) ||
- ( cache_ptr->max_pl_len != 1 ) ||
- ( cache_ptr->max_pl_size != 64 * 1024 ) ||
- ( cache_ptr->max_pel_len != 0 ) ||
- ( cache_ptr->max_pel_size != 0 ) ||
- ( cache_ptr->calls_to_msic != 0 ) ||
- ( cache_ptr->total_entries_skipped_in_msic != 0 ) ||
- ( cache_ptr->total_entries_scanned_in_msic != 0 ) ||
- ( cache_ptr->max_entries_skipped_in_msic != 0 ) ||
- ( cache_ptr->max_entries_scanned_in_msic != 0 ) ||
- ( cache_ptr->entries_scanned_to_make_space != 0 ) ||
- ( cache_ptr->slist_scan_restarts != 0 ) ||
- ( cache_ptr->LRU_scan_restarts != 0 ) ||
- ( cache_ptr->hash_bucket_scan_restarts != 0 ) ) {
+ if(pass) {
+
+ if((cache_ptr->total_ht_insertions != 32) ||
+ (cache_ptr->total_ht_deletions != 0) ||
+ (cache_ptr->successful_ht_searches != 32) ||
+ (cache_ptr->total_successful_ht_search_depth != 96) ||
+ (cache_ptr->failed_ht_searches != 32) ||
+ (cache_ptr->total_failed_ht_search_depth != 48) ||
+ (cache_ptr->max_index_len != 32) ||
+ (cache_ptr->max_index_size != 2 * 1024 * 1024) ||
+ (cache_ptr->max_clean_index_size != 0) ||
+ (cache_ptr->max_dirty_index_size != 2 * 1024 * 1024) ||
+ (cache_ptr->max_slist_len != 32) ||
+ (cache_ptr->max_slist_size != 2 * 1024 * 1024) ||
+ (cache_ptr->max_pl_len != 1) ||
+ (cache_ptr->max_pl_size != 64 * 1024) ||
+ (cache_ptr->max_pel_len != 0) ||
+ (cache_ptr->max_pel_size != 0) ||
+ (cache_ptr->calls_to_msic != 0) ||
+ (cache_ptr->total_entries_skipped_in_msic != 0) ||
+ (cache_ptr->total_entries_scanned_in_msic != 0) ||
+ (cache_ptr->max_entries_skipped_in_msic != 0) ||
+ (cache_ptr->max_entries_scanned_in_msic != 0) ||
+ (cache_ptr->entries_scanned_to_make_space != 0) ||
+ (cache_ptr->slist_scan_restarts != 0) ||
+ (cache_ptr->LRU_scan_restarts != 0) ||
+ (cache_ptr->hash_bucket_scan_restarts != 0)) {
pass = FALSE;
failure_mssg = "Unexpected cache stats in check_stats__smoke_check_1(2).";
@@ -36020,16 +35882,16 @@ check_stats__smoke_check_1(H5F_t * file_ptr)
}
#if H5C_COLLECT_CACHE_ENTRY_STATS
- if ( pass ) {
+ if(pass) {
/* Note that most entry level stats are only updated on entry eviction */
- if ( ( cache_ptr->max_accesses[MONSTER_ENTRY_TYPE] != 0 ) ||
- ( cache_ptr->min_accesses[MONSTER_ENTRY_TYPE] != 1000000 ) || /* initial value */
- ( cache_ptr->max_clears[MONSTER_ENTRY_TYPE] != 0 ) ||
- ( cache_ptr->max_flushes[MONSTER_ENTRY_TYPE] != 0 ) ||
- ( cache_ptr->max_size[MONSTER_ENTRY_TYPE] != 64 * 1024 ) ||
- ( cache_ptr->max_pins[MONSTER_ENTRY_TYPE] != 0 ) ) {
+ if((cache_ptr->max_accesses[MONSTER_ENTRY_TYPE] != 0) ||
+ (cache_ptr->min_accesses[MONSTER_ENTRY_TYPE] != 1000000) || /* initial value */
+ (cache_ptr->max_clears[MONSTER_ENTRY_TYPE] != 0) ||
+ (cache_ptr->max_flushes[MONSTER_ENTRY_TYPE] != 0) ||
+ (cache_ptr->max_size[MONSTER_ENTRY_TYPE] != 64 * 1024) ||
+ (cache_ptr->max_pins[MONSTER_ENTRY_TYPE] != 0)) {
pass = FALSE;
failure_mssg = "Unexpected monster entry level stats in check_stats__smoke_check_1(2).";
@@ -36037,7 +35899,7 @@ check_stats__smoke_check_1(H5F_t * file_ptr)
}
#endif /* H5C_COLLECT_CACHE_ENTRY_STATS */
- if ( pass ) {
+ if(pass) {
/* protect and unprotect an entry that is not currently
* in the cache. Since the cache is full and all entries
@@ -36048,64 +35910,64 @@ check_stats__smoke_check_1(H5F_t * file_ptr)
unprotect_entry(file_ptr, MONSTER_ENTRY_TYPE, 32, H5C__DIRTIED_FLAG);
}
- if ( pass ) {
-
- if ( ( cache_ptr->hits[MONSTER_ENTRY_TYPE] != 32 ) ||
- ( cache_ptr->misses[MONSTER_ENTRY_TYPE] != 1 ) ||
- ( cache_ptr->write_protects[MONSTER_ENTRY_TYPE] != 33 ) ||
- ( cache_ptr->read_protects[MONSTER_ENTRY_TYPE] != 0 ) ||
- ( cache_ptr->max_read_protects[MONSTER_ENTRY_TYPE] != 0 ) ||
- ( cache_ptr->insertions[MONSTER_ENTRY_TYPE] != 32 ) ||
- ( cache_ptr->pinned_insertions[MONSTER_ENTRY_TYPE] != 0 ) ||
- ( cache_ptr->clears[MONSTER_ENTRY_TYPE] != 0 ) ||
- ( cache_ptr->flushes[MONSTER_ENTRY_TYPE] != 32 ) ||
- ( cache_ptr->evictions[MONSTER_ENTRY_TYPE] != 1 ) ||
- ( cache_ptr->take_ownerships[MONSTER_ENTRY_TYPE] != 0 ) ||
- ( cache_ptr->moves[MONSTER_ENTRY_TYPE] != 0 ) ||
- ( cache_ptr->entry_flush_moves[MONSTER_ENTRY_TYPE] != 0 ) ||
- ( cache_ptr->cache_flush_moves[MONSTER_ENTRY_TYPE] != 0 ) ||
- ( cache_ptr->pins[MONSTER_ENTRY_TYPE] != 0 ) ||
- ( cache_ptr->unpins[MONSTER_ENTRY_TYPE] != 0 ) ||
- ( cache_ptr->dirty_pins[MONSTER_ENTRY_TYPE] != 0 ) ||
- ( cache_ptr->pinned_flushes[MONSTER_ENTRY_TYPE] != 0 ) ||
- ( cache_ptr->pinned_clears[MONSTER_ENTRY_TYPE] != 0 ) ||
- ( cache_ptr->size_increases[MONSTER_ENTRY_TYPE] != 0 ) ||
- ( cache_ptr->size_decreases[MONSTER_ENTRY_TYPE] != 0 ) ||
- ( cache_ptr->entry_flush_size_changes[MONSTER_ENTRY_TYPE] != 0 ) ||
- ( cache_ptr->cache_flush_size_changes[MONSTER_ENTRY_TYPE] != 0 ) ) {
+ if(pass) {
+
+ if((cache_ptr->hits[MONSTER_ENTRY_TYPE] != 32) ||
+ (cache_ptr->misses[MONSTER_ENTRY_TYPE] != 1) ||
+ (cache_ptr->write_protects[MONSTER_ENTRY_TYPE] != 33) ||
+ (cache_ptr->read_protects[MONSTER_ENTRY_TYPE] != 0) ||
+ (cache_ptr->max_read_protects[MONSTER_ENTRY_TYPE] != 0) ||
+ (cache_ptr->insertions[MONSTER_ENTRY_TYPE] != 32) ||
+ (cache_ptr->pinned_insertions[MONSTER_ENTRY_TYPE] != 0) ||
+ (cache_ptr->clears[MONSTER_ENTRY_TYPE] != 0) ||
+ (cache_ptr->flushes[MONSTER_ENTRY_TYPE] != 32) ||
+ (cache_ptr->evictions[MONSTER_ENTRY_TYPE] != 1) ||
+ (cache_ptr->take_ownerships[MONSTER_ENTRY_TYPE] != 0) ||
+ (cache_ptr->moves[MONSTER_ENTRY_TYPE] != 0) ||
+ (cache_ptr->entry_flush_moves[MONSTER_ENTRY_TYPE] != 0) ||
+ (cache_ptr->cache_flush_moves[MONSTER_ENTRY_TYPE] != 0) ||
+ (cache_ptr->pins[MONSTER_ENTRY_TYPE] != 0) ||
+ (cache_ptr->unpins[MONSTER_ENTRY_TYPE] != 0) ||
+ (cache_ptr->dirty_pins[MONSTER_ENTRY_TYPE] != 0) ||
+ (cache_ptr->pinned_flushes[MONSTER_ENTRY_TYPE] != 0) ||
+ (cache_ptr->pinned_clears[MONSTER_ENTRY_TYPE] != 0) ||
+ (cache_ptr->size_increases[MONSTER_ENTRY_TYPE] != 0) ||
+ (cache_ptr->size_decreases[MONSTER_ENTRY_TYPE] != 0) ||
+ (cache_ptr->entry_flush_size_changes[MONSTER_ENTRY_TYPE] != 0) ||
+ (cache_ptr->cache_flush_size_changes[MONSTER_ENTRY_TYPE] != 0)) {
pass = FALSE;
failure_mssg = "Unexpected monster size entry stats in check_stats__smoke_check_1(3).";
}
}
- if ( pass ) {
-
- if ( ( cache_ptr->total_ht_insertions != 33 ) ||
- ( cache_ptr->total_ht_deletions != 1 ) ||
- ( cache_ptr->successful_ht_searches != 32 ) ||
- ( cache_ptr->total_successful_ht_search_depth != 96 ) ||
- ( cache_ptr->failed_ht_searches != 33 ) ||
- ( cache_ptr->total_failed_ht_search_depth != 52 ) ||
- ( cache_ptr->max_index_len != 32 ) ||
- ( cache_ptr->max_index_size != 2 * 1024 * 1024 ) ||
- ( cache_ptr->max_clean_index_size != 2 * 1024 * 1024 ) ||
- ( cache_ptr->max_dirty_index_size != 2 * 1024 * 1024 ) ||
- ( cache_ptr->max_slist_len != 32 ) ||
- ( cache_ptr->max_slist_size != 2 * 1024 * 1024 ) ||
- ( cache_ptr->max_pl_len != 1 ) ||
- ( cache_ptr->max_pl_size != 64 * 1024 ) ||
- ( cache_ptr->max_pel_len != 0 ) ||
- ( cache_ptr->max_pel_size != 0 ) ||
- ( cache_ptr->calls_to_msic != 1 ) ||
- ( cache_ptr->total_entries_skipped_in_msic != 0 ) ||
- ( cache_ptr->total_entries_scanned_in_msic != 33 ) ||
- ( cache_ptr->max_entries_skipped_in_msic != 0 ) ||
- ( cache_ptr->max_entries_scanned_in_msic != 33 ) ||
- ( cache_ptr->entries_scanned_to_make_space != 33 ) ||
- ( cache_ptr->slist_scan_restarts != 0 ) ||
- ( cache_ptr->LRU_scan_restarts != 0 ) ||
- ( cache_ptr->hash_bucket_scan_restarts != 0 ) ) {
+ if(pass) {
+
+ if((cache_ptr->total_ht_insertions != 33) ||
+ (cache_ptr->total_ht_deletions != 1) ||
+ (cache_ptr->successful_ht_searches != 32) ||
+ (cache_ptr->total_successful_ht_search_depth != 96) ||
+ (cache_ptr->failed_ht_searches != 33) ||
+ (cache_ptr->total_failed_ht_search_depth != 52) ||
+ (cache_ptr->max_index_len != 32) ||
+ (cache_ptr->max_index_size != 2 * 1024 * 1024) ||
+ (cache_ptr->max_clean_index_size != 2 * 1024 * 1024) ||
+ (cache_ptr->max_dirty_index_size != 2 * 1024 * 1024) ||
+ (cache_ptr->max_slist_len != 32) ||
+ (cache_ptr->max_slist_size != 2 * 1024 * 1024) ||
+ (cache_ptr->max_pl_len != 1) ||
+ (cache_ptr->max_pl_size != 64 * 1024) ||
+ (cache_ptr->max_pel_len != 0) ||
+ (cache_ptr->max_pel_size != 0) ||
+ (cache_ptr->calls_to_msic != 1) ||
+ (cache_ptr->total_entries_skipped_in_msic != 0) ||
+ (cache_ptr->total_entries_scanned_in_msic != 33) ||
+ (cache_ptr->max_entries_skipped_in_msic != 0) ||
+ (cache_ptr->max_entries_scanned_in_msic != 33) ||
+ (cache_ptr->entries_scanned_to_make_space != 33) ||
+ (cache_ptr->slist_scan_restarts != 0) ||
+ (cache_ptr->LRU_scan_restarts != 0) ||
+ (cache_ptr->hash_bucket_scan_restarts != 0)) {
pass = FALSE;
failure_mssg = "Unexpected cache stats in check_stats__smoke_check_1(3).";
@@ -36113,16 +35975,16 @@ check_stats__smoke_check_1(H5F_t * file_ptr)
}
#if H5C_COLLECT_CACHE_ENTRY_STATS
- if ( pass ) {
+ if(pass) {
/* Note that most entry level stats are only updated on entry eviction */
- if ( ( cache_ptr->max_accesses[MONSTER_ENTRY_TYPE] != 1 ) ||
- ( cache_ptr->min_accesses[MONSTER_ENTRY_TYPE] != 1 ) ||
- ( cache_ptr->max_clears[MONSTER_ENTRY_TYPE] != 0 ) ||
- ( cache_ptr->max_flushes[MONSTER_ENTRY_TYPE] != 1 ) ||
- ( cache_ptr->max_size[MONSTER_ENTRY_TYPE] != 64 * 1024 ) ||
- ( cache_ptr->max_pins[MONSTER_ENTRY_TYPE] != 0 ) ) {
+ if((cache_ptr->max_accesses[MONSTER_ENTRY_TYPE] != 1) ||
+ (cache_ptr->min_accesses[MONSTER_ENTRY_TYPE] != 1) ||
+ (cache_ptr->max_clears[MONSTER_ENTRY_TYPE] != 0) ||
+ (cache_ptr->max_flushes[MONSTER_ENTRY_TYPE] != 1) ||
+ (cache_ptr->max_size[MONSTER_ENTRY_TYPE] != 64 * 1024) ||
+ (cache_ptr->max_pins[MONSTER_ENTRY_TYPE] != 0)) {
pass = FALSE;
failure_mssg = "Unexpected monster entry level stats in check_stats__smoke_check_1(3).";
@@ -36130,7 +35992,7 @@ check_stats__smoke_check_1(H5F_t * file_ptr)
}
#endif /* H5C_COLLECT_CACHE_ENTRY_STATS */
- if ( pass ) {
+ if(pass) {
/* protect and unprotect dirty (MET, 1), and then flush destroy
* the cache.
@@ -36141,17 +36003,17 @@ check_stats__smoke_check_1(H5F_t * file_ptr)
/* flush the cache to end the test and collect all entry stats */
- if ( pass ) {
+ if(pass) {
result = H5C_flush_cache(file_ptr, H5AC_ind_read_dxpl_id, H5C__FLUSH_INVALIDATE_FLAG);
- if ( result < 0 ) {
+ if(result < 0) {
pass = FALSE;
failure_mssg = "Cache flush invalidate failed in check_stats__smoke_check_1()";
}
- else if ( ( cache_ptr->index_len != 0 ) ||
- ( cache_ptr->index_size != 0 ) ) {
+ else if((cache_ptr->index_len != 0) ||
+ (cache_ptr->index_size != 0)) {
pass = FALSE;
failure_mssg = "Unexpected cache len/size after check_stats__smoke_check_1()";
@@ -36159,64 +36021,64 @@ check_stats__smoke_check_1(H5F_t * file_ptr)
}
}
- if ( pass ) {
+ if(pass) {
- if ( ( cache_ptr->hits[MONSTER_ENTRY_TYPE] != 33 ) ||
- ( cache_ptr->misses[MONSTER_ENTRY_TYPE] != 1 ) ||
- ( cache_ptr->write_protects[MONSTER_ENTRY_TYPE] != 34 ) ||
- ( cache_ptr->read_protects[MONSTER_ENTRY_TYPE] != 0 ) ||
- ( cache_ptr->max_read_protects[MONSTER_ENTRY_TYPE] != 0 ) ||
- ( cache_ptr->insertions[MONSTER_ENTRY_TYPE] != 32 ) ||
- ( cache_ptr->pinned_insertions[MONSTER_ENTRY_TYPE] != 0 ) ||
- ( cache_ptr->clears[MONSTER_ENTRY_TYPE] != 0 ) ||
- ( cache_ptr->flushes[MONSTER_ENTRY_TYPE] != 34 ) ||
- ( cache_ptr->evictions[MONSTER_ENTRY_TYPE] != 33 ) ||
- ( cache_ptr->take_ownerships[MONSTER_ENTRY_TYPE] != 0 ) ||
- ( cache_ptr->moves[MONSTER_ENTRY_TYPE] != 0 ) ||
- ( cache_ptr->entry_flush_moves[MONSTER_ENTRY_TYPE] != 0 ) ||
- ( cache_ptr->cache_flush_moves[MONSTER_ENTRY_TYPE] != 0 ) ||
- ( cache_ptr->pins[MONSTER_ENTRY_TYPE] != 0 ) ||
- ( cache_ptr->unpins[MONSTER_ENTRY_TYPE] != 0 ) ||
- ( cache_ptr->dirty_pins[MONSTER_ENTRY_TYPE] != 0 ) ||
- ( cache_ptr->pinned_flushes[MONSTER_ENTRY_TYPE] != 0 ) ||
- ( cache_ptr->pinned_clears[MONSTER_ENTRY_TYPE] != 0 ) ||
- ( cache_ptr->size_increases[MONSTER_ENTRY_TYPE] != 0 ) ||
- ( cache_ptr->size_decreases[MONSTER_ENTRY_TYPE] != 0 ) ||
- ( cache_ptr->entry_flush_size_changes[MONSTER_ENTRY_TYPE] != 0 ) ||
- ( cache_ptr->cache_flush_size_changes[MONSTER_ENTRY_TYPE] != 0 ) ) {
+ if((cache_ptr->hits[MONSTER_ENTRY_TYPE] != 33) ||
+ (cache_ptr->misses[MONSTER_ENTRY_TYPE] != 1) ||
+ (cache_ptr->write_protects[MONSTER_ENTRY_TYPE] != 34) ||
+ (cache_ptr->read_protects[MONSTER_ENTRY_TYPE] != 0) ||
+ (cache_ptr->max_read_protects[MONSTER_ENTRY_TYPE] != 0) ||
+ (cache_ptr->insertions[MONSTER_ENTRY_TYPE] != 32) ||
+ (cache_ptr->pinned_insertions[MONSTER_ENTRY_TYPE] != 0) ||
+ (cache_ptr->clears[MONSTER_ENTRY_TYPE] != 0) ||
+ (cache_ptr->flushes[MONSTER_ENTRY_TYPE] != 34) ||
+ (cache_ptr->evictions[MONSTER_ENTRY_TYPE] != 33) ||
+ (cache_ptr->take_ownerships[MONSTER_ENTRY_TYPE] != 0) ||
+ (cache_ptr->moves[MONSTER_ENTRY_TYPE] != 0) ||
+ (cache_ptr->entry_flush_moves[MONSTER_ENTRY_TYPE] != 0) ||
+ (cache_ptr->cache_flush_moves[MONSTER_ENTRY_TYPE] != 0) ||
+ (cache_ptr->pins[MONSTER_ENTRY_TYPE] != 0) ||
+ (cache_ptr->unpins[MONSTER_ENTRY_TYPE] != 0) ||
+ (cache_ptr->dirty_pins[MONSTER_ENTRY_TYPE] != 0) ||
+ (cache_ptr->pinned_flushes[MONSTER_ENTRY_TYPE] != 0) ||
+ (cache_ptr->pinned_clears[MONSTER_ENTRY_TYPE] != 0) ||
+ (cache_ptr->size_increases[MONSTER_ENTRY_TYPE] != 0) ||
+ (cache_ptr->size_decreases[MONSTER_ENTRY_TYPE] != 0) ||
+ (cache_ptr->entry_flush_size_changes[MONSTER_ENTRY_TYPE] != 0) ||
+ (cache_ptr->cache_flush_size_changes[MONSTER_ENTRY_TYPE] != 0)) {
pass = FALSE;
failure_mssg = "Unexpected monster size entry stats in check_stats__smoke_check_1(4).";
}
}
- if ( pass ) {
-
- if ( ( cache_ptr->total_ht_insertions != 33 ) ||
- ( cache_ptr->total_ht_deletions != 33 ) ||
- ( cache_ptr->successful_ht_searches != 33 ) ||
- ( cache_ptr->total_successful_ht_search_depth != 99 ) ||
- ( cache_ptr->failed_ht_searches != 33 ) ||
- ( cache_ptr->total_failed_ht_search_depth != 52 ) ||
- ( cache_ptr->max_index_len != 32 ) ||
- ( cache_ptr->max_index_size != 2 * 1024 * 1024 ) ||
- ( cache_ptr->max_clean_index_size != 2 * 1024 * 1024 ) ||
- ( cache_ptr->max_dirty_index_size != 2 * 1024 * 1024 ) ||
- ( cache_ptr->max_slist_len != 32 ) ||
- ( cache_ptr->max_slist_size != 2 * 1024 * 1024 ) ||
- ( cache_ptr->max_pl_len != 1 ) ||
- ( cache_ptr->max_pl_size != 64 * 1024 ) ||
- ( cache_ptr->max_pel_len != 0 ) ||
- ( cache_ptr->max_pel_size != 0 ) ||
- ( cache_ptr->calls_to_msic != 1 ) ||
- ( cache_ptr->total_entries_skipped_in_msic != 0 ) ||
- ( cache_ptr->total_entries_scanned_in_msic != 33 ) ||
- ( cache_ptr->max_entries_skipped_in_msic != 0 ) ||
- ( cache_ptr->max_entries_scanned_in_msic != 33 ) ||
- ( cache_ptr->entries_scanned_to_make_space != 33 ) ||
- ( cache_ptr->slist_scan_restarts != 0 ) ||
- ( cache_ptr->LRU_scan_restarts != 0 ) ||
- ( cache_ptr->hash_bucket_scan_restarts != 0 ) ) {
+ if(pass) {
+
+ if((cache_ptr->total_ht_insertions != 33) ||
+ (cache_ptr->total_ht_deletions != 33) ||
+ (cache_ptr->successful_ht_searches != 33) ||
+ (cache_ptr->total_successful_ht_search_depth != 99) ||
+ (cache_ptr->failed_ht_searches != 33) ||
+ (cache_ptr->total_failed_ht_search_depth != 52) ||
+ (cache_ptr->max_index_len != 32) ||
+ (cache_ptr->max_index_size != 2 * 1024 * 1024) ||
+ (cache_ptr->max_clean_index_size != 2 * 1024 * 1024) ||
+ (cache_ptr->max_dirty_index_size != 2 * 1024 * 1024) ||
+ (cache_ptr->max_slist_len != 32) ||
+ (cache_ptr->max_slist_size != 2 * 1024 * 1024) ||
+ (cache_ptr->max_pl_len != 1) ||
+ (cache_ptr->max_pl_size != 64 * 1024) ||
+ (cache_ptr->max_pel_len != 0) ||
+ (cache_ptr->max_pel_size != 0) ||
+ (cache_ptr->calls_to_msic != 1) ||
+ (cache_ptr->total_entries_skipped_in_msic != 0) ||
+ (cache_ptr->total_entries_scanned_in_msic != 33) ||
+ (cache_ptr->max_entries_skipped_in_msic != 0) ||
+ (cache_ptr->max_entries_scanned_in_msic != 33) ||
+ (cache_ptr->entries_scanned_to_make_space != 33) ||
+ (cache_ptr->slist_scan_restarts != 0) ||
+ (cache_ptr->LRU_scan_restarts != 0) ||
+ (cache_ptr->hash_bucket_scan_restarts != 0)) {
pass = FALSE;
failure_mssg = "Unexpected cache stats in check_stats__smoke_check_1(4).";
@@ -36224,16 +36086,16 @@ check_stats__smoke_check_1(H5F_t * file_ptr)
}
#if H5C_COLLECT_CACHE_ENTRY_STATS
- if ( pass ) {
+ if(pass) {
/* Note that most entry level stats are only updated on entry eviction */
- if ( ( cache_ptr->max_accesses[MONSTER_ENTRY_TYPE] != 2 ) ||
- ( cache_ptr->min_accesses[MONSTER_ENTRY_TYPE] != 1 ) ||
- ( cache_ptr->max_clears[MONSTER_ENTRY_TYPE] != 0 ) ||
- ( cache_ptr->max_flushes[MONSTER_ENTRY_TYPE] != 2 ) ||
- ( cache_ptr->max_size[MONSTER_ENTRY_TYPE] != 64 * 1024 ) ||
- ( cache_ptr->max_pins[MONSTER_ENTRY_TYPE] != 0 ) ) {
+ if((cache_ptr->max_accesses[MONSTER_ENTRY_TYPE] != 2) ||
+ (cache_ptr->min_accesses[MONSTER_ENTRY_TYPE] != 1) ||
+ (cache_ptr->max_clears[MONSTER_ENTRY_TYPE] != 0) ||
+ (cache_ptr->max_flushes[MONSTER_ENTRY_TYPE] != 2) ||
+ (cache_ptr->max_size[MONSTER_ENTRY_TYPE] != 64 * 1024) ||
+ (cache_ptr->max_pins[MONSTER_ENTRY_TYPE] != 0)) {
pass = FALSE;
failure_mssg = "Unexpected monster entry level stats in check_stats__smoke_check_1(4).";
@@ -36241,12 +36103,12 @@ check_stats__smoke_check_1(H5F_t * file_ptr)
}
#endif /* H5C_COLLECT_CACHE_ENTRY_STATS */
- if ( pass ) {
+ if(pass) {
reset_entries();
}
- if ( pass ) {
+ if(pass) {
/* reset cache min clean size to its expected value */
cache_ptr->min_clean_size = (1 * 1024 * 1024);
@@ -36285,7 +36147,7 @@ main(void)
printf(" express_test = %d\n", express_test);
printf("=========================================\n");
- if ( create_entry_arrays() < 0 ) {
+ if(create_entry_arrays() < 0) {
printf("ERROR: Unable to create entries arrays. Aborting.\n");
return EXIT_FAILURE;
@@ -36349,7 +36211,7 @@ main(void)
/* can't fail, returns void */
free_entry_arrays();
- if ( nerrs > 0 )
+ if(nerrs > 0)
return EXIT_FAILURE;
else
return EXIT_SUCCESS;
diff --git a/test/cache_common.c b/test/cache_common.c
index 21f0366..e0efb24 100644
--- a/test/cache_common.c
+++ b/test/cache_common.c
@@ -3076,57 +3076,46 @@ setup_cache(size_t max_cache_size,
haddr_t actual_base_addr;
hid_t fapl_id = H5P_DEFAULT;
- if ( show_progress ) /* 1 */
+ if(show_progress) /* 1 */
HDfprintf(stdout, "%s() - %0d -- pass = %d\n",
FUNC, mile_stone++, (int)pass);
saved_fid = -1;
/* setup the file name */
- if ( pass ) {
-
- if ( h5_fixname(FILENAME[0], H5P_DEFAULT, filename, sizeof(filename))
- == NULL ) {
-
+ if(pass) {
+ if(NULL == h5_fixname(FILENAME[0], H5P_DEFAULT, filename, sizeof(filename))) {
pass = FALSE;
failure_mssg = "h5_fixname() failed.\n";
}
}
- if ( show_progress ) /* 2 */
+ if(show_progress) /* 2 */
HDfprintf(stdout, "%s() - %0d -- pass = %d\n",
FUNC, mile_stone++, (int)pass);
- if ( ( pass ) && ( try_core_file_driver ) ) {
-
- if ( (fapl_id = H5Pcreate(H5P_FILE_ACCESS)) == FAIL ) {
-
+ if(pass && try_core_file_driver) {
+ if((fapl_id = H5Pcreate(H5P_FILE_ACCESS)) == FAIL) {
pass = FALSE;
failure_mssg = "H5Pcreate(H5P_FILE_ACCESS) failed.\n";
}
- else if ( H5Pset_fapl_core(fapl_id, MAX_ADDR, FALSE) < 0 ) {
-
+ else if(H5Pset_fapl_core(fapl_id, MAX_ADDR, FALSE) < 0) {
H5Pclose(fapl_id);
fapl_id = H5P_DEFAULT;
pass = FALSE;
failure_mssg = "H5P_set_fapl_core() failed.\n";
}
- else if ( (fid = H5Fcreate(filename, H5F_ACC_TRUNC, H5P_DEFAULT, fapl_id))
- < 0 ) {
-
+ else if((fid = H5Fcreate(filename, H5F_ACC_TRUNC, H5P_DEFAULT, fapl_id)) < 0) {
core_file_driver_failed = TRUE;
- if ( verbose ) {
+ if(verbose)
HDfprintf(stdout, "%s: H5Fcreate() with CFD failed.\n", FUNC);
- }
-
} else {
-
saved_fapl_id = fapl_id;
}
}
- if ( show_progress ) /* 3 */
+ if(show_progress) /* 3 */
HDfprintf(stdout, "%s() - %0d -- pass = %d\n",
FUNC, mile_stone++, (int)pass);
@@ -3134,63 +3123,49 @@ setup_cache(size_t max_cache_size,
* with the core file driver failed, try again with a regular file.
* If this fails, we are cooked.
*/
- if ( ( pass ) && ( fid < 0 ) ) {
-
+ if(pass && fid < 0) {
fid = H5Fcreate(filename, H5F_ACC_TRUNC, H5P_DEFAULT, fapl_id);
-
saved_fid = fid;
- if ( fid < 0 ) {
-
+ if(fid < 0) {
pass = FALSE;
failure_mssg = "H5Fcreate() failed.";
- if ( verbose ) {
+ if(verbose)
HDfprintf(stdout, "%s: H5Fcreate() failed.\n", FUNC);
- }
}
}
- if ( show_progress ) /* 4 */
+ if(show_progress) /* 4 */
HDfprintf(stdout, "%s() - %0d -- pass = %d\n",
FUNC, mile_stone++, (int)pass);
- if ( pass ) {
-
- HDassert( fid >= 0 );
-
+ if(pass) {
+ HDassert(fid >= 0);
saved_fid = fid;
-
- if ( H5Fflush(fid, H5F_SCOPE_GLOBAL) < 0 ) {
-
+ if(H5Fflush(fid, H5F_SCOPE_GLOBAL) < 0) {
pass = FALSE;
failure_mssg = "H5Fflush() failed.";
- if ( verbose ) {
+ if(verbose)
HDfprintf(stdout, "%s: H5Fflush() failed.\n", FUNC);
- }
-
} else {
-
file_ptr = (H5F_t *)H5I_object_verify(fid, H5I_FILE);
-
- if ( file_ptr == NULL ) {
-
+ if(file_ptr == NULL) {
pass = FALSE;
failure_mssg = "Can't get file_ptr.";
- if ( verbose ) {
+ if(verbose)
HDfprintf(stdout, "%s: H5Fflush() failed.\n", FUNC);
- }
}
}
}
- if ( show_progress ) /* 5 */
+ if(show_progress) /* 5 */
HDfprintf(stdout, "%s() - %0d -- pass = %d\n",
FUNC, mile_stone++, (int)pass);
- if ( pass ) {
+ if(pass) {
/* A bit of fancy footwork here:
*
@@ -3220,10 +3195,8 @@ setup_cache(size_t max_cache_size,
* instance, and then close the file normally.
*/
- HDassert( saved_cache == NULL );
-
+ HDassert(saved_cache == NULL);
saved_cache = file_ptr->shared->cache;
-
file_ptr->shared->cache = NULL;
cache_ptr = H5C_create(max_cache_size,
@@ -3238,52 +3211,41 @@ setup_cache(size_t max_cache_size,
file_ptr->shared->cache = cache_ptr;
}
- if ( show_progress ) /* 6 */
+ if(show_progress) /* 6 */
HDfprintf(stdout, "%s() - %0d -- pass = %d\n",
FUNC, mile_stone++, (int)pass);
- if ( pass ) {
-
- if ( cache_ptr == NULL ) {
-
+ if(pass) {
+ if(cache_ptr == NULL) {
pass = FALSE;
failure_mssg = "H5C_create() failed.";
- if ( verbose ) {
+ if(verbose)
HDfprintf(stdout, "%s: H5C_create() failed.\n", FUNC);
- }
-
- } else if ( cache_ptr->magic != H5C__H5C_T_MAGIC ) {
-
+ } else if(cache_ptr->magic != H5C__H5C_T_MAGIC) {
pass = FALSE;
failure_mssg = "Bad cache_ptr magic.";
- if ( verbose ) {
+ if(verbose)
HDfprintf(stdout, "%s: Bad cache_ptr magic.\n", FUNC);
- }
}
}
- if ( show_progress ) /* 7 */
+ if(show_progress) /* 7 */
HDfprintf(stdout, "%s() - %0d -- pass = %d\n",
FUNC, mile_stone++, (int)pass);
- if ( pass ) { /* allocate space for test entries */
-
+ if(pass) { /* allocate space for test entries */
actual_base_addr = H5MF_alloc(file_ptr, H5FD_MEM_DEFAULT, H5AC_ind_read_dxpl_id,
(hsize_t)(ADDR_SPACE_SIZE + BASE_ADDR));
- if ( actual_base_addr == HADDR_UNDEF ) {
-
+ if(actual_base_addr == HADDR_UNDEF) {
pass = FALSE;
failure_mssg = "H5MF_alloc() failed.";
- if ( verbose ) {
+ if(verbose)
HDfprintf(stdout, "%s: H5MF_alloc() failed.\n", FUNC);
- }
-
- } else if ( actual_base_addr > BASE_ADDR ) {
-
+ } else if(actual_base_addr > BASE_ADDR) {
/* If this happens, must increase BASE_ADDR so that the
* actual_base_addr is <= BASE_ADDR. This should only happen
* if the size of the superblock is increase.
@@ -3291,21 +3253,18 @@ setup_cache(size_t max_cache_size,
pass = FALSE;
failure_mssg = "actual_base_addr > BASE_ADDR";
- if ( verbose ) {
- HDfprintf(stdout, "%s: actual_base_addr > BASE_ADDR.\n",
- FUNC);
- }
+ if(verbose)
+ HDfprintf(stdout, "%s: actual_base_addr > BASE_ADDR.\n", FUNC);
}
saved_actual_base_addr = actual_base_addr;
}
- if ( show_progress ) /* 8 */
+ if(show_progress) /* 8 */
HDfprintf(stdout, "%s() - %0d -- pass = %d\n",
FUNC, mile_stone++, (int)pass);
- if ( pass ) {
-
+ if(pass) {
/* Need to set this else all cache tests will fail */
cache_ptr->ignore_tags = TRUE;
@@ -3313,7 +3272,7 @@ setup_cache(size_t max_cache_size,
ret_val = file_ptr;
}
- if ( show_progress ) /* 9 */
+ if(show_progress) /* 9 */
HDfprintf(stdout, "%s() - %0d -- pass = %d\n",
FUNC, mile_stone++, (int)pass);
@@ -3568,14 +3527,15 @@ flush_cache(H5F_t * file_ptr,
*
* Return: void
*
- * Programmer: Vailin Choi; Jan 2014
+ * Programmer: Vailin Choi
+ * Jan 2014
*
*-------------------------------------------------------------------------
*/
void
-cork_entry_type(H5F_t * file_ptr, int32_t type)
+cork_entry_type(H5F_t *file_ptr, int32_t type)
{
- H5C_t * cache_ptr;
+ H5C_t *cache_ptr;
haddr_t baddrs;
herr_t result;
@@ -3592,9 +3552,9 @@ cork_entry_type(H5F_t * file_ptr, int32_t type)
pass = FALSE;
failure_mssg = "error in H5C_cork().";
- }
- }
- return;
+ } /* end if */
+ } /* end if */
+
} /* cork_entry_type() */
@@ -3607,14 +3567,15 @@ cork_entry_type(H5F_t * file_ptr, int32_t type)
*
* Return: void
*
- * Programmer: Vailin Choi; Jan 2014
+ * Programmer: Vailin Choi
+ * Jan 2014
*
*-------------------------------------------------------------------------
*/
void
-uncork_entry_type(H5F_t * file_ptr, int32_t type)
+uncork_entry_type(H5F_t *file_ptr, int32_t type)
{
- H5C_t * cache_ptr;
+ H5C_t *cache_ptr;
haddr_t baddrs;
herr_t result;
@@ -3631,9 +3592,9 @@ uncork_entry_type(H5F_t * file_ptr, int32_t type)
pass = FALSE;
failure_mssg = "error in H5C_cork().";
- }
- }
- return;
+ } /* end if */
+ } /* end if */
+
} /* uncork_entry_type() */
@@ -3934,11 +3895,8 @@ move_entry(H5C_t * cache_ptr,
*
*-------------------------------------------------------------------------
*/
-
void
-protect_entry(H5F_t * file_ptr,
- int32_t type,
- int32_t idx)
+protect_entry(H5F_t * file_ptr, int32_t type, int32_t idx)
{
H5C_t * cache_ptr;
test_entry_t * base_addr;
@@ -3947,29 +3905,28 @@ protect_entry(H5F_t * file_ptr,
hid_t xfer = H5AC_ind_read_dxpl_id;
H5C_cache_entry_t * cache_entry_ptr;
- if ( pass ) {
-
+ if(pass) {
cache_ptr = file_ptr->shared->cache;
- HDassert( cache_ptr );
- HDassert( ( 0 <= type ) && ( type < NUMBER_OF_ENTRY_TYPES ) );
- HDassert( ( 0 <= idx ) && ( idx <= max_indices[type] ) );
+ HDassert(cache_ptr);
+ HDassert((0 <= type) && (type < NUMBER_OF_ENTRY_TYPES));
+ HDassert((0 <= idx) && (idx <= max_indices[type]));
base_addr = entries[type];
entry_ptr = &(base_addr[idx]);
baddrs = base_addrs[type];
- HDassert( entry_ptr->index == idx );
- HDassert( entry_ptr->type == type );
- HDassert( entry_ptr == entry_ptr->self );
- HDassert( !(entry_ptr->is_protected) );
+ HDassert(entry_ptr->index == idx);
+ HDassert(entry_ptr->type == type);
+ HDassert(entry_ptr == entry_ptr->self);
+ HDassert(!(entry_ptr->is_protected));
/* Set the base address of the entry type into the property list as tag */
/* Use to cork entries for the object */
if(H5AC_tag(xfer, baddrs, NULL) < 0) {
pass = FALSE;
failure_mssg = "error in H5P_set().";
- }
+ } /* end if */
cache_entry_ptr = (H5C_cache_entry_t *)H5C_protect(file_ptr, xfer,
&(types[type]), entry_ptr->addr, &entry_ptr->addr,
@@ -4006,7 +3963,8 @@ protect_entry(H5F_t * file_ptr,
pass = FALSE;
failure_mssg = "error in H5C_protect().";
- } else {
+ } /* end if */
+ else {
HDassert( ( entry_ptr->cache_ptr == NULL ) ||
( entry_ptr->cache_ptr == cache_ptr ) );
@@ -4015,15 +3973,13 @@ protect_entry(H5F_t * file_ptr,
entry_ptr->file_ptr = file_ptr;
entry_ptr->is_protected = TRUE;
- }
+ } /* end else */
if(entry_ptr->header.is_corked)
entry_ptr->is_corked = TRUE;
- HDassert( ((entry_ptr->header).type)->id == type );
- }
-
- return;
+ HDassert(((entry_ptr->header).type)->id == type);
+ } /* end if */
} /* protect_entry() */
@@ -4369,7 +4325,6 @@ unprotect_entry(H5F_t * file_ptr,
*
*-------------------------------------------------------------------------
*/
-
void
row_major_scan_forward(H5F_t * file_ptr,
int32_t max_index,
@@ -4391,343 +4346,274 @@ row_major_scan_forward(H5F_t * file_ptr,
int32_t idx;
int32_t local_max_index;
- if ( verbose )
+ if(verbose)
HDfprintf(stdout, "%s(): entering.\n", FUNC);
- if ( pass ) {
-
+ if(pass) {
cache_ptr = file_ptr->shared->cache;
+ HDassert(cache_ptr != NULL);
+ HDassert(lag >= 10);
- HDassert( cache_ptr != NULL );
-
- HDassert( lag >= 10 );
-
- if ( reset_stats ) {
-
+ if(reset_stats)
H5C_stats__reset(cache_ptr);
- }
- }
+ } /* end if */
- while ( ( pass ) && ( type < NUMBER_OF_ENTRY_TYPES ) )
- {
+ while(pass && type < NUMBER_OF_ENTRY_TYPES) {
idx = -lag;
local_max_index = MIN(max_index, max_indices[type]);
-
- while ( ( pass ) && ( idx <= (local_max_index + lag) ) )
- {
+ while(pass && idx <= (local_max_index + lag)) {
int32_t tmp_idx;
- if ( verbose ) {
-
+ if(verbose)
HDfprintf(stdout, "%d:%d: ", type, idx);
- }
tmp_idx = idx + lag;
- if ( ( pass ) && ( do_inserts ) && ( tmp_idx >= 0 ) &&
- ( tmp_idx <= local_max_index ) &&
- ( (tmp_idx % 2) == 0 ) &&
- ( ! entry_in_cache(cache_ptr, type, tmp_idx) ) ) {
+ if(pass && do_inserts && (tmp_idx >= 0) && (tmp_idx <= local_max_index) &&
+ ((tmp_idx % 2) == 0 ) && !entry_in_cache(cache_ptr, type, tmp_idx)) {
- if ( verbose )
+ if(verbose)
HDfprintf(stdout, "1(i, %d, %d) ", type, tmp_idx);
insert_entry(file_ptr, type, tmp_idx, H5C__NO_FLAGS_SET);
-
HDassert(cache_ptr->slist_size == cache_ptr->dirty_index_size);
- }
+ } /* end if */
tmp_idx--;
- if ( ( pass ) && ( tmp_idx >= 0 ) &&
- ( tmp_idx <= local_max_index ) &&
- ( ( tmp_idx % 3 ) == 0 ) ) {
+ if(pass && (tmp_idx >= 0) && (tmp_idx <= local_max_index) &&
+ (tmp_idx % 3) == 0) {
- if ( verbose )
+ if(verbose)
HDfprintf(stdout, "2(p, %d, %d) ", type, tmp_idx);
protect_entry(file_ptr, type, tmp_idx);
-
HDassert(cache_ptr->slist_size == cache_ptr->dirty_index_size);
- }
+ } /* end if */
tmp_idx--;
- if ( ( pass ) && ( tmp_idx >= 0 ) &&
- ( tmp_idx <= local_max_index ) &&
- ( ( tmp_idx % 3 ) == 0 ) ) {
+ if(pass && (tmp_idx >= 0) && (tmp_idx <= local_max_index) &&
+ (tmp_idx % 3) == 0) {
- if ( verbose )
+ if(verbose)
HDfprintf(stdout, "3(u, %d, %d) ", type, tmp_idx);
unprotect_entry(file_ptr, type, tmp_idx, H5C__NO_FLAGS_SET);
-
HDassert(cache_ptr->slist_size == cache_ptr->dirty_index_size);
- }
+ } /* end if */
/* (don't decrement tmp_idx) */
- if ( ( pass ) && ( do_moves ) && ( tmp_idx >= 0 ) &&
- ( tmp_idx <= local_max_index ) &&
- ( ( tmp_idx % 3 ) == 0 ) ) {
+ if(pass && do_moves && (tmp_idx >= 0) && (tmp_idx <= local_max_index) &&
+ (tmp_idx % 3) == 0) {
- if ( verbose )
- HDfprintf(stdout, "4(r, %d, %d, %d) ",
- type, tmp_idx, (int)move_to_main_addr);
+ if(verbose)
+ HDfprintf(stdout, "4(r, %d, %d, %d) ", type, tmp_idx, (int)move_to_main_addr);
move_entry(cache_ptr, type, tmp_idx, move_to_main_addr);
-
HDassert(cache_ptr->slist_size == cache_ptr->dirty_index_size);
- }
+ } /* end if */
tmp_idx--;
- if ( ( pass ) && ( tmp_idx >= 0 ) &&
- ( tmp_idx <= local_max_index ) &&
- ( ( tmp_idx % 5 ) == 0 ) ) {
+ if(pass && (tmp_idx >= 0) && (tmp_idx <= local_max_index) &&
+ (tmp_idx % 5) == 0) {
- if ( verbose )
+ if(verbose)
HDfprintf(stdout, "5(p, %d, %d) ", type, tmp_idx);
protect_entry(file_ptr, type, tmp_idx);
-
HDassert(cache_ptr->slist_size == cache_ptr->dirty_index_size);
- }
+ } /* end if */
tmp_idx -= 2;
- if ( ( pass ) && ( tmp_idx >= 0 ) &&
- ( tmp_idx <= local_max_index ) &&
- ( ( tmp_idx % 5 ) == 0 ) ) {
+ if(pass && (tmp_idx >= 0) && (tmp_idx <= local_max_index) &&
+ (tmp_idx % 5) == 0) {
- if ( verbose )
+ if(verbose)
HDfprintf(stdout, "6(u, %d, %d) ", type, tmp_idx);
unprotect_entry(file_ptr, type, tmp_idx, H5C__NO_FLAGS_SET);
-
HDassert(cache_ptr->slist_size == cache_ptr->dirty_index_size);
- }
+ } /* end if */
- if ( do_mult_ro_protects )
- {
+ if(do_mult_ro_protects) {
/* (don't decrement tmp_idx) */
- if ( ( pass ) && ( tmp_idx >= 0 ) &&
- ( tmp_idx < local_max_index ) &&
- ( tmp_idx % 9 == 0 ) ) {
+ if(pass && (tmp_idx >= 0) && (tmp_idx < local_max_index) &&
+ (tmp_idx % 9) == 0) {
- if ( verbose )
+ if(verbose)
HDfprintf(stdout, "7(p-ro, %d, %d) ", type, tmp_idx);
protect_entry_ro(file_ptr, type, tmp_idx);
-
HDassert(cache_ptr->slist_size == cache_ptr->dirty_index_size);
- }
+ } /* end if */
tmp_idx--;
- if ( ( pass ) && ( tmp_idx >= 0 ) &&
- ( tmp_idx < local_max_index ) &&
- ( tmp_idx % 11 == 0 ) ) {
+ if(pass && (tmp_idx >= 0) && (tmp_idx < local_max_index) &&
+ (tmp_idx % 11) == 0) {
- if ( verbose )
+ if(verbose)
HDfprintf(stdout, "8(p-ro, %d, %d) ", type, tmp_idx);
protect_entry_ro(file_ptr, type, tmp_idx);
-
HDassert(cache_ptr->slist_size == cache_ptr->dirty_index_size);
- }
+ } /* end if */
tmp_idx--;
- if ( ( pass ) && ( tmp_idx >= 0 ) &&
- ( tmp_idx < local_max_index ) &&
- ( tmp_idx % 13 == 0 ) ) {
+ if(pass && (tmp_idx >= 0) && (tmp_idx < local_max_index) &&
+ (tmp_idx % 13) == 0) {
- if ( verbose )
+ if(verbose)
HDfprintf(stdout, "9(p-ro, %d, %d) ", type, tmp_idx);
protect_entry_ro(file_ptr, type, tmp_idx);
-
HDassert(cache_ptr->slist_size == cache_ptr->dirty_index_size);
- }
+ } /* end if */
/* (don't decrement tmp_idx) */
- if ( ( pass ) && ( tmp_idx >= 0 ) &&
- ( tmp_idx < local_max_index ) &&
- ( tmp_idx % 9 == 0 ) ) {
+ if(pass && (tmp_idx >= 0) && (tmp_idx < local_max_index) &&
+ (tmp_idx % 9) == 0) {
- if ( verbose )
+ if(verbose)
HDfprintf(stdout, "10(u-ro, %d, %d) ", type, tmp_idx);
unprotect_entry(file_ptr, type, tmp_idx, H5C__NO_FLAGS_SET);
-
HDassert(cache_ptr->slist_size == cache_ptr->dirty_index_size);
- }
+ } /* end if */
tmp_idx--;
- if ( ( pass ) && ( tmp_idx >= 0 ) &&
- ( tmp_idx < local_max_index ) &&
- ( tmp_idx % 11 == 0 ) ) {
+ if(pass && (tmp_idx >= 0) && (tmp_idx < local_max_index) &&
+ (tmp_idx % 11) == 0) {
- if ( verbose )
+ if(verbose)
HDfprintf(stdout, "11(u-ro, %d, %d) ", type, tmp_idx);
unprotect_entry(file_ptr, type, tmp_idx, H5C__NO_FLAGS_SET);
-
HDassert(cache_ptr->slist_size == cache_ptr->dirty_index_size);
- }
+ } /* end if */
tmp_idx--;
- if ( ( pass ) && ( tmp_idx >= 0 ) &&
- ( tmp_idx < local_max_index ) &&
- ( tmp_idx % 13 == 0 ) ) {
+ if(pass && (tmp_idx >= 0) && (tmp_idx < local_max_index) &&
+ (tmp_idx % 13) == 0) {
- if ( verbose )
+ if(verbose)
HDfprintf(stdout, "12(u-ro, %d, %d) ", type, tmp_idx);
unprotect_entry(file_ptr, type, tmp_idx, H5C__NO_FLAGS_SET);
-
HDassert(cache_ptr->slist_size == cache_ptr->dirty_index_size);
- }
+ } /* end if */
} /* if ( do_mult_ro_protects ) */
- if ( ( pass ) && ( idx >= 0 ) && ( idx <= local_max_index ) ) {
-
- if ( verbose )
+ if(pass && (idx >= 0) && (idx <= local_max_index)) {
+ if(verbose)
HDfprintf(stdout, "13(p, %d, %d) ", type, idx);
protect_entry(file_ptr, type, idx);
-
HDassert(cache_ptr->slist_size == cache_ptr->dirty_index_size);
- }
+ } /* end if */
tmp_idx = idx - lag + 2;
- if ( ( pass ) && ( tmp_idx >= 0 ) &&
- ( tmp_idx <= local_max_index ) &&
- ( ( tmp_idx % 7 ) == 0 ) ) {
+ if(pass && (tmp_idx >= 0) && (tmp_idx <= local_max_index) &&
+ (tmp_idx % 7) == 0) {
- if ( verbose )
+ if(verbose)
HDfprintf(stdout, "14(u, %d, %d) ", type, tmp_idx);
unprotect_entry(file_ptr, type, tmp_idx, H5C__NO_FLAGS_SET);
-
HDassert(cache_ptr->slist_size == cache_ptr->dirty_index_size);
- }
+ } /* end if */
tmp_idx--;
- if ( ( pass ) && ( tmp_idx >= 0 ) &&
- ( tmp_idx <= local_max_index ) &&
- ( ( tmp_idx % 7 ) == 0 ) ) {
+ if(pass && (tmp_idx >= 0) && (tmp_idx <= local_max_index) &&
+ (tmp_idx % 7) == 0) {
- if ( verbose )
+ if(verbose)
HDfprintf(stdout, "15(p, %d, %d) ", type, tmp_idx);
protect_entry(file_ptr, type, tmp_idx);
-
HDassert(cache_ptr->slist_size == cache_ptr->dirty_index_size);
- }
-
-
- if ( do_destroys ) {
+ } /* end if */
+ if(do_destroys) {
tmp_idx = idx - lag;
- if ( ( pass ) && ( tmp_idx >= 0 ) &&
- ( tmp_idx <= local_max_index ) ) {
-
- switch ( tmp_idx %4 ) {
-
+ if(pass && (tmp_idx >= 0) && (tmp_idx <= local_max_index)) {
+ switch(tmp_idx % 4) {
case 0: /* we just did an insert */
-
- if ( verbose )
+ if(verbose)
HDfprintf(stdout, "16(u, %d, %d) ", type, tmp_idx);
unprotect_entry(file_ptr, type, tmp_idx, H5C__NO_FLAGS_SET);
-
HDassert(cache_ptr->slist_size == cache_ptr->dirty_index_size);
break;
case 1:
- if ( (entries[type])[tmp_idx].is_dirty ) {
-
- if ( verbose )
+ if((entries[type])[tmp_idx].is_dirty) {
+ if(verbose)
HDfprintf(stdout, "17(u, %d, %d) ", type, tmp_idx);
unprotect_entry(file_ptr, type, tmp_idx, H5C__NO_FLAGS_SET);
-
HDassert(cache_ptr->slist_size == cache_ptr->dirty_index_size);
- } else {
-
- if ( verbose )
+ } /* end if */
+ else {
+ if(verbose)
HDfprintf(stdout, "18(u, %d, %d) ", type, tmp_idx);
- unprotect_entry(file_ptr, type, tmp_idx,
- (dirty_unprotects ? H5C__DIRTIED_FLAG : H5C__NO_FLAGS_SET));
-
+ unprotect_entry(file_ptr, type, tmp_idx, (dirty_unprotects ? H5C__DIRTIED_FLAG : H5C__NO_FLAGS_SET));
HDassert(cache_ptr->slist_size == cache_ptr->dirty_index_size);
- }
+ } /* end else */
break;
case 2: /* we just did an insert */
-
- if ( verbose )
+ if(verbose)
HDfprintf(stdout, "19(u-del, %d, %d) ", type, tmp_idx);
unprotect_entry(file_ptr, type, tmp_idx, H5C__DELETED_FLAG);
-
HDassert(cache_ptr->slist_size == cache_ptr->dirty_index_size);
break;
case 3:
- if ( (entries[type])[tmp_idx].is_dirty ) {
-
- if ( verbose )
+ if((entries[type])[tmp_idx].is_dirty) {
+ if(verbose)
HDfprintf(stdout, "20(u-del, %d, %d) ", type, tmp_idx);
unprotect_entry(file_ptr, type, tmp_idx, H5C__DELETED_FLAG);
-
HDassert(cache_ptr->slist_size == cache_ptr->dirty_index_size);
- } else {
-
- if ( verbose )
+ } /* end if */
+ else {
+ if(verbose)
HDfprintf(stdout, "21(u-del, %d, %d) ", type, tmp_idx);
- unprotect_entry(file_ptr, type, tmp_idx,
- (dirty_destroys ? H5C__DIRTIED_FLAG : H5C__NO_FLAGS_SET)
- | H5C__DELETED_FLAG);
-
+ unprotect_entry(file_ptr, type, tmp_idx, (dirty_destroys ? H5C__DIRTIED_FLAG : H5C__NO_FLAGS_SET) | H5C__DELETED_FLAG);
HDassert(cache_ptr->slist_size == cache_ptr->dirty_index_size);
- }
+ } /* end else */
break;
default:
HDassert(0); /* this can't happen... */
break;
- }
- }
-
- } else {
-
+ } /* end switch */
+ } /* end if */
+ } /* end if */
+ else {
tmp_idx = idx - lag;
- if ( ( pass ) && ( tmp_idx >= 0 ) &&
- ( tmp_idx <= local_max_index ) ) {
-
- if ( verbose )
+ if(pass && (tmp_idx >= 0) && (tmp_idx <= local_max_index)) {
+ if(verbose)
HDfprintf(stdout, "22(u, %d, %d) ", type, tmp_idx);
- unprotect_entry(file_ptr, type, tmp_idx,
- (dirty_unprotects ? H5C__DIRTIED_FLAG : H5C__NO_FLAGS_SET));
-
+ unprotect_entry(file_ptr, type, tmp_idx, (dirty_unprotects ? H5C__DIRTIED_FLAG : H5C__NO_FLAGS_SET));
HDassert(cache_ptr->slist_size == cache_ptr->dirty_index_size);
- }
- }
+ } /* end if */
+ } /* end elsef */
- if ( verbose )
+ if(verbose)
HDfprintf(stdout, "\n");
idx++;
- }
- type++;
- }
+ } /* end while */
- if ( ( pass ) && ( display_stats ) ) {
+ type++;
+ } /* end while */
+ if(pass && display_stats)
H5C_stats(cache_ptr, "test cache", display_detailed_stats);
- }
-
- return;
} /* row_major_scan_forward() */
diff --git a/test/cache_tagging.c b/test/cache_tagging.c
index 3bf8790..b18ac47 100644
--- a/test/cache_tagging.c
+++ b/test/cache_tagging.c
@@ -115,7 +115,6 @@ print_entry_type_to_screen(int id)
HDfprintf(stdout, "Type = ");
switch (id) {
-
case H5AC_BT_ID:
HDfprintf(stdout, "v1 B-tree Node");
break;
@@ -206,11 +205,9 @@ print_entry_type_to_screen(int id)
default:
HDfprintf(stdout, "BADNESS: *Unknown*");
break;
-
} /* end switch */
HDfprintf(stdout, " (%d)", id);
-
} /* print_entry_type_to_screen */
@@ -229,20 +226,21 @@ print_entry_type_to_screen(int id)
*
*-------------------------------------------------------------------------
*/
-static int print_index(hid_t fid) {
-
- H5F_t * f = NULL; /* File Pointer */
- H5C_t * cache_ptr = NULL; /* Cache Pointer */
- int i = 0; /* Iterator */
+static int print_index(hid_t fid)
+{
+ H5F_t *f; /* File Pointer */
+ H5C_t *cache_ptr; /* Cache Pointer */
+ int i; /* Iterator */
H5C_cache_entry_t *next_entry_ptr = NULL; /* entry pointer */
/* Get Internal File / Cache Pointers */
- if ( NULL == (f = (H5F_t *)H5I_object(fid)) ) TEST_ERROR;
+ if(NULL == (f = (H5F_t *)H5I_object(fid)))
+ TEST_ERROR;
cache_ptr = f->shared->cache;
/* Initial (debugging) loop */
printf("CACHE SNAPSHOT:\n");
- for (i = 0; i < H5C__HASH_TABLE_LEN; i++) {
+ for(i = 0; i < H5C__HASH_TABLE_LEN; i++) {
next_entry_ptr = cache_ptr->index[i];
while (next_entry_ptr != NULL) {
@@ -252,18 +250,16 @@ static int print_index(hid_t fid) {
printf("Protected = %d, ", (int)next_entry_ptr->is_protected);
print_entry_type_to_screen(next_entry_ptr->type->id);
printf("\n");
- next_entry_ptr = next_entry_ptr->ht_next;
- } /* end if */
+ next_entry_ptr = next_entry_ptr->ht_next;
+ } /* end while */
} /* end for */
printf("\n");
return 0;
error:
-
return -1;
-
} /* print_index */
@@ -281,23 +277,23 @@ error:
* Programmer: Mike McGreevy
* January 25, 2010
*
- * Modifications:
- *
*-------------------------------------------------------------------------
*/
-static int verify_no_unknown_tags(hid_t fid)
+static int
+verify_no_unknown_tags(hid_t fid)
{
- H5F_t * f = NULL; /* File Pointer */
- H5C_t * cache_ptr = NULL; /* Cache Pointer */
- int i = 0; /* Iterator */
+ H5F_t *f; /* File Pointer */
+ H5C_t *cache_ptr; /* Cache Pointer */
+ int i; /* Iterator */
H5C_cache_entry_t *next_entry_ptr = NULL; /* entry pointer */
/* Get Internal File / Cache Pointers */
- if ( NULL == (f = (H5F_t *)H5I_object(fid)) ) TEST_ERROR;
+ if(NULL == (f = (H5F_t *)H5I_object(fid)))
+ TEST_ERROR;
cache_ptr = f->shared->cache;
- for (i = 0; i < H5C__HASH_TABLE_LEN; i++) {
+ for(i = 0; i < H5C__HASH_TABLE_LEN; i++) {
next_entry_ptr = cache_ptr->index[i];
@@ -306,10 +302,8 @@ static int verify_no_unknown_tags(hid_t fid)
if ( next_entry_ptr->tag != H5AC__IGNORE_TAG ) TEST_ERROR;
next_entry_ptr = next_entry_ptr->ht_next;
-
- } /* end if */
-
- } /* for */
+ } /* end while */
+ } /* end for */
return 0;
@@ -333,23 +327,22 @@ error:
* Programmer: Mike McGreevy
* February 3, 2010
*
- * Modifications:
- *
*-------------------------------------------------------------------------
*/
-static int mark_all_entries_investigated(hid_t fid)
+static int
+mark_all_entries_investigated(hid_t fid)
{
-
- H5F_t * f = NULL; /* File Pointer */
- H5C_t * cache_ptr = NULL; /* Cache Pointer */
- int i = 0; /* Iterator */
+ H5F_t *f; /* File Pointer */
+ H5C_t *cache_ptr; /* Cache Pointer */
+ int i; /* Iterator */
H5C_cache_entry_t *next_entry_ptr = NULL; /* entry pointer */
/* Get Internal File / Cache Pointers */
- if ( NULL == (f = (H5F_t *)H5I_object(fid)) ) TEST_ERROR;
+ if(NULL == (f = (H5F_t *)H5I_object(fid)))
+ TEST_ERROR;
cache_ptr = f->shared->cache;
- for (i = 0; i < H5C__HASH_TABLE_LEN; i++) {
+ for(i = 0; i < H5C__HASH_TABLE_LEN; i++) {
next_entry_ptr = cache_ptr->index[i];
@@ -362,9 +355,7 @@ static int mark_all_entries_investigated(hid_t fid)
} /* end if */
next_entry_ptr = next_entry_ptr->ht_next;
-
- } /* end if */
-
+ } /* end while */
} /* for */
return 0;
@@ -390,23 +381,23 @@ error:
* Programmer: Mike McGreevy
* January 25, 2010
*
- * Modifications:
- *
*-------------------------------------------------------------------------
*/
-static int verify_tag(hid_t fid, int id, haddr_t tag)
+static int
+verify_tag(hid_t fid, int id, haddr_t tag)
{
- int i = 0; /* Iterator */
int found = FALSE; /* If Entry Found */
- H5F_t * f = NULL; /* File Pointer */
- H5C_t * cache_ptr = NULL; /* Cache Pointer */
+ H5F_t *f; /* File Pointer */
+ H5C_t *cache_ptr; /* Cache Pointer */
+ int i; /* Iterator */
H5C_cache_entry_t *next_entry_ptr = NULL; /* entry pointer */
/* Get Internal File / Cache Pointers */
- if ( NULL == (f = (H5F_t *)H5I_object(fid)) ) TEST_ERROR;
+ if(NULL == (f = (H5F_t *)H5I_object(fid)))
+ TEST_ERROR;
cache_ptr = f->shared->cache;
- for (i = 0; i < H5C__HASH_TABLE_LEN; i++) {
+ for(i = 0; i < H5C__HASH_TABLE_LEN; i++) {
next_entry_ptr = cache_ptr->index[i];
@@ -443,13 +434,14 @@ error:
return -1;
} /* verify_tag */
-static int evict_entries(hid_t fid)
+static int
+evict_entries(hid_t fid)
{
-
- H5F_t * f = NULL; /* File Pointer */
+ H5F_t *f; /* File Pointer */
/* Get Internal File / Cache Pointers */
- if ( NULL == (f = (H5F_t *)H5I_object(fid)) ) TEST_ERROR;
+ if(NULL == (f = (H5F_t *)H5I_object(fid)))
+ TEST_ERROR;
/* Mark all entries investigated */
mark_all_entries_investigated(fid);
@@ -462,9 +454,7 @@ static int evict_entries(hid_t fid)
return 0;
error:
-
return -1;
-
} /* evict entries */
@@ -481,8 +471,6 @@ error:
* Programmer: Mike McGreevy
* January 25, 2010
*
- * Modifications:
- *
*-------------------------------------------------------------------------
*/
static int get_new_object_header_tag(hid_t fid, haddr_t *tag)
@@ -544,8 +532,6 @@ error:
* Programmer: Mike McGreevy
* January 25, 2010
*
- * Modifications:
- *
*-------------------------------------------------------------------------
*/
static unsigned
@@ -607,7 +593,6 @@ check_file_creation_tags(hid_t fcpl_id, int type)
error:
return 1;
-
} /* check_file_creation_tags */
@@ -622,8 +607,6 @@ error:
* Programmer: Mike McGreevy
* January 25, 2010
*
- * Modifications:
- *
*-------------------------------------------------------------------------
*/
static unsigned
@@ -730,8 +713,6 @@ error:
* Programmer: Mike McGreevy
* January 27, 2010
*
- * Modifications:
- *
*-------------------------------------------------------------------------
*/
static unsigned
@@ -835,8 +816,6 @@ error:
* Programmer: Mike McGreevy
* March 2, 2010
*
- * Modifications:
- *
*-------------------------------------------------------------------------
*/
static unsigned
@@ -849,8 +828,8 @@ check_multi_group_creation_tags(hid_t fcpl, int type)
char gname[10]; /* group name buffer */
int i = 0; /* iterator */
hid_t fapl = -1; /* File access prop list */
- haddr_t g_tag = 0; /* Group tag value */
- haddr_t root_tag = 0; /* Root group tag value */
+ haddr_t g_tag = 0; /* Group tag value */
+ haddr_t root_tag = 0; /* Root group tag value */
haddr_t sbe_tag = 0; /* Root group tag value */
/* Testing Macro */
@@ -887,9 +866,9 @@ check_multi_group_creation_tags(hid_t fcpl, int type)
/* Clear Metadata Tags (don't care about them for this test */
mark_all_entries_investigated(fid);
- /* ============ */
- /* Create Group */
- /* ============ */
+ /* ============= */
+ /* Create Groups */
+ /* ============= */
for (i = 0; i < MULTIGROUPS; i++) {
@@ -959,8 +938,6 @@ error:
* Programmer: Mike McGreevy
* March 2, 2010
*
- * Modifications:
- *
*-------------------------------------------------------------------------
*/
static unsigned
@@ -1027,14 +1004,12 @@ check_link_iteration_tags(void)
if ( verbose ) print_index(fid);
/* Verify 112 symbol table nodes belonging to the root group */
- for (i = 0; i < 112; i++) {
+ for (i = 0; i < 112; i++)
if ( verify_tag(fid, H5AC_SNODE_ID, root_tag) < 0 ) TEST_ERROR;
- }
/* Verify 9 b-tree nodes belonging to the root group */
- for (i = 0; i < 9; i++) {
+ for (i = 0; i < 9; i++)
if ( verify_tag(fid, H5AC_BT_ID, root_tag) < 0 ) TEST_ERROR;
- }
/* verify no other entries present */
if ( verify_no_unknown_tags(fid) < 0 ) TEST_ERROR;
@@ -1070,8 +1045,6 @@ error:
* Programmer: Mike McGreevy
* March 2, 2010
*
- * Modifications:
- *
*-------------------------------------------------------------------------
*/
static unsigned
@@ -1240,8 +1213,6 @@ error:
* Programmer: Mike McGreevy
* January 27, 2010
*
- * Modifications:
- *
*-------------------------------------------------------------------------
*/
static unsigned
@@ -1352,8 +1323,6 @@ error:
* Programmer: Mike McGreevy
* February 24, 2010
*
- * Modifications:
- *
*-------------------------------------------------------------------------
*/
static unsigned
@@ -1492,8 +1461,6 @@ error:
* Programmer: Mike McGreevy
* February 24, 2010
*
- * Modifications:
- *
*-------------------------------------------------------------------------
*/
static unsigned
@@ -1634,10 +1601,6 @@ error:
* Programmer: Mike McGreevy
* March 3, 2010
*
- * Modifications:
- * Vailin Choi; July 2012
- * Add verify_tag() calls because H5FD_FLMAP_DICHOTOMY is now the default free-list mapping.
- *
*-------------------------------------------------------------------------
*/
static unsigned
@@ -1699,12 +1662,9 @@ check_attribute_rename_tags(hid_t fcpl, int type)
if ( (aid = H5Acreate2(gid, ATTRNAME, H5T_NATIVE_INT, sid, H5P_DEFAULT, H5P_DEFAULT)) < 0 ) TEST_ERROR;
/* fill out data buffer */
- for(i = 0; i < DIMS; i++) {
- for(j = 0; j < DIMS; j++) {
-
+ for(i = 0; i < DIMS; i++)
+ for(j = 0; j < DIMS; j++)
data[(DIMS * i) + j] = k++;
- } /* end for */
- } /* end for */
/* Write to attribute */
if ( H5Awrite(aid, H5T_NATIVE_INT, data) < 0 ) TEST_ERROR;
@@ -1814,10 +1774,6 @@ error:
* Programmer: Mike McGreevy
* March 3, 2010
*
- * Modifications:
- * Vailin Choi; July 2012
- * Add verify_tag() call because H5FD_FLMAP_DICHOTOMY is now the default free-list mapping.
- *
*-------------------------------------------------------------------------
*/
static unsigned
@@ -1879,12 +1835,9 @@ check_attribute_delete_tags(hid_t fcpl, int type)
if ( (aid = H5Acreate2(gid, ATTRNAME, H5T_NATIVE_INT, sid, H5P_DEFAULT, H5P_DEFAULT)) < 0 ) TEST_ERROR;
/* fill out data buffer */
- for(i = 0;i < DIMS; i++) {
- for(j = 0;j < DIMS; j++) {
-
+ for(i = 0;i < DIMS; i++)
+ for(j = 0;j < DIMS; j++)
data[(DIMS * i) + j] = k++;
- } /* end for */
- } /* end for */
/* Write to attribute */
if ( (H5Awrite(aid, H5T_NATIVE_INT, data)) < 0 ) TEST_ERROR;
@@ -1969,8 +1922,6 @@ error:
* Programmer: Mike McGreevy
* February 10, 2010
*
- * Modifications:
- *
*-------------------------------------------------------------------------
*/
static unsigned
@@ -2104,8 +2055,6 @@ error:
* Programmer: Mike McGreevy
* March 1, 2010
*
- * Modifications:
- *
*-------------------------------------------------------------------------
*/
static unsigned
@@ -2243,8 +2192,6 @@ error:
* Programmer: Mike McGreevy
* February 10, 2010
*
- * Modifications:
- *
*-------------------------------------------------------------------------
*/
static unsigned
@@ -2374,8 +2321,6 @@ error:
* Programmer: Mike McGreevy
* February 10, 2010
*
- * Modifications:
- *
*-------------------------------------------------------------------------
*/
static unsigned
@@ -2520,8 +2465,6 @@ error:
* Programmer: Mike McGreevy
* March 3, 2010
*
- * Modifications:
- *
*-------------------------------------------------------------------------
*/
static unsigned
@@ -2598,12 +2541,9 @@ check_attribute_write_tags(hid_t fcpl, int type)
/* =========================== */
/* fill out data buffer */
- for(i = 0; i < DIMS; i++) {
- for(j = 0;j < DIMS; j++) {
-
+ for(i = 0; i < DIMS; i++)
+ for(j = 0;j < DIMS; j++)
data[(DIMS * i) + j] = k++;
- } /* end for */
- } /* end for */
/* Write attribute */
if ( (H5Awrite(aid, H5T_NATIVE_INT, data)) < 0 ) TEST_ERROR;
@@ -2682,8 +2622,6 @@ error:
* Programmer: Mike McGreevy
* February 10, 2010
*
- * Modifications:
- *
*-------------------------------------------------------------------------
*/
static unsigned
@@ -2754,12 +2692,9 @@ check_dataset_read_tags(hid_t fcpl, int type)
if ( get_new_object_header_tag(fid, &d_tag) < 0 ) TEST_ERROR;
/* fill out data buffer */
- for(i = 0; i < DIMS; i++) {
- for(j = 0; j < DIMS; j++) {
-
+ for(i = 0; i < DIMS; i++)
+ for(j = 0; j < DIMS; j++)
data[(DIMS * i) + j] = k++;
- } /* end for */
- } /* end for */
/* Write to dataset */
if( (H5Dwrite(did, H5T_NATIVE_INT, sid, sid, H5P_DEFAULT, data)) < 0 ) TEST_ERROR;
@@ -2827,8 +2762,6 @@ error:
* Programmer: Mike McGreevy
* February 24, 2010
*
- * Modifications:
- *
*-------------------------------------------------------------------------
*/
static unsigned
@@ -2900,12 +2833,9 @@ check_dataset_size_retrieval(hid_t fcpl, int type)
if ( get_new_object_header_tag(fid, &d_tag) < 0 ) TEST_ERROR;
/* fill out data buffer */
- for(i = 0; i < DIMS; i++) {
- for(j = 0; j < DIMS; j++) {
-
+ for(i = 0; i < DIMS; i++)
+ for(j = 0; j < DIMS; j++)
data[(DIMS * i) + j] = k++;
- } /* end for */
- } /* end for */
/* Write to dataset */
if( (H5Dwrite(did, H5T_NATIVE_INT, sid, sid, H5P_DEFAULT, data)) < 0 ) TEST_ERROR;
@@ -2973,8 +2903,6 @@ error:
* Programmer: Mike McGreevy
* February 24, 2010
*
- * Modifications:
- *
*-------------------------------------------------------------------------
*/
static unsigned
@@ -3047,12 +2975,9 @@ check_dataset_extend_tags(hid_t fcpl, int type)
if ( get_new_object_header_tag(fid, &d_tag) < 0 ) TEST_ERROR;
/* fill out data buffer */
- for(i = 0; i < DIMS; i++) {
- for(j = 0; j < DIMS; j++) {
-
+ for(i = 0; i < DIMS; i++)
+ for(j = 0; j < DIMS; j++)
data[(DIMS * i) + j] = k++;
- } /* end for */
- } /* end for */
/* Write to dataset */
if( (H5Dwrite(did, H5T_NATIVE_INT, sid, sid, H5P_DEFAULT, data)) < 0 ) TEST_ERROR;
@@ -3120,8 +3045,6 @@ error:
* Programmer: Mike McGreevy
* March 1, 2010
*
- * Modifications:
- *
*-------------------------------------------------------------------------
*/
static unsigned
@@ -3234,8 +3157,6 @@ error:
* Programmer: Mike McGreevy
* March 3, 2010
*
- * Modifications:
- *
*-------------------------------------------------------------------------
*/
static unsigned
@@ -3311,12 +3232,12 @@ check_object_copy_tags(hid_t fcpl, int type)
if ( verify_tag(fid, H5AC_LHEAP_PRFX_ID, root_tag) < 0 ) TEST_ERROR;
if ( verify_tag(fid, H5AC_BT_ID, root_tag) < 0 ) TEST_ERROR;
- /* Verify dataset's tagged metadata */
+ /* Verify group's tagged metadata */
if ( verify_tag(fid, H5AC_OHDR_ID, g_tag) < 0 ) TEST_ERROR;
if ( verify_tag(fid, H5AC_BT_ID, g_tag) < 0 ) TEST_ERROR;
if ( verify_tag(fid, H5AC_LHEAP_PRFX_ID, g_tag) < 0 ) TEST_ERROR;
- /* Verify copied dataset's tagged metadata */
+ /* Verify copied group's tagged metadata */
if ( get_new_object_header_tag(fid, &copy_tag) < 0 ) TEST_ERROR;
if ( verify_tag(fid, H5AC_BT_ID, copy_tag) < 0 ) TEST_ERROR;
if ( verify_tag(fid, H5AC_LHEAP_PRFX_ID, copy_tag) < 0 ) TEST_ERROR;
@@ -3353,8 +3274,6 @@ error:
* Programmer: Mike McGreevy
* March 1, 2010
*
- * Modifications:
- *
*-------------------------------------------------------------------------
*/
static unsigned
@@ -3436,12 +3355,9 @@ check_link_removal_tags(hid_t fcpl, int type)
if ( get_new_object_header_tag(fid, &d_tag) < 0 ) TEST_ERROR;
/* fill out data buffer */
- for(i = 0; i < DIMS; i++) {
- for(j = 0; j < DIMS; j++) {
-
+ for(i = 0; i < DIMS; i++)
+ for(j = 0; j < DIMS; j++)
data[(DIMS * i) + j] = k++;
- } /* end for */
- } /* end for */
/* Write to dataset */
if( (H5Dwrite(did, H5T_NATIVE_INT, sid, sid, H5P_DEFAULT, data)) < 0 ) TEST_ERROR;
@@ -3519,8 +3435,6 @@ error:
* Programmer: Mike McGreevy
* March 2, 2010
*
- * Modifications:
- *
*-------------------------------------------------------------------------
*/
static unsigned
@@ -3603,12 +3517,9 @@ check_link_getname_tags(hid_t fcpl, int type)
if ( get_new_object_header_tag(fid, &d_tag) < 0 ) TEST_ERROR;
/* fill out data buffer */
- for(i = 0; i < DIMS; i++) {
- for(j = 0; j < DIMS; j++) {
-
+ for(i = 0; i < DIMS; i++)
+ for(j = 0; j < DIMS; j++)
data[(DIMS * i) + j] = k++;
- } /* end for */
- } /* end for */
/* Write to dataset */
if( (H5Dwrite(did, H5T_NATIVE_INT, sid, sid, H5P_DEFAULT, data)) < 0 ) TEST_ERROR;
@@ -3678,8 +3589,6 @@ error:
* Programmer: Mike McGreevy
* February 24, 2010
*
- * Modifications:
- *
*-------------------------------------------------------------------------
*/
static unsigned
@@ -3787,8 +3696,6 @@ error:
* Programmer: Mike McGreevy
* February 24, 2010
*
- * Modifications:
- *
*-------------------------------------------------------------------------
*/
static unsigned
@@ -3901,8 +3808,6 @@ error:
* Programmer: Mike McGreevy
* May 27, 2010
*
- * Modifications:
- *
*-------------------------------------------------------------------------
*/
static unsigned
@@ -3917,7 +3822,7 @@ check_invalid_tag_application(void)
/* Testing Macro */
TESTING("failure on invalid tag application");
- #if H5C_DO_TAGGING_SANITY_CHECKS
+#if H5C_DO_TAGGING_SANITY_CHECKS
/* Create a test file */
if ( (fid = H5Fcreate(FILENAME, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT)) < 0 ) TEST_ERROR;
@@ -3958,10 +3863,10 @@ check_invalid_tag_application(void)
/* Finished Test. Print status and return. */
PASSED();
- #else
+#else
SKIPPED();
printf(" test skipped because sanity checking on tag value is disabled.\n");
- #endif
+#endif
return 0;
@@ -3982,11 +3887,8 @@ error:
* Programmer: Mike McGreevy
* January 15, 2009
*
- * Modifications:
- *
*-------------------------------------------------------------------------
*/
-
int
main(void)
{
diff --git a/test/evict_on_close.c b/test/evict_on_close.c
index b7482dd..3124371 100644
--- a/test/evict_on_close.c
+++ b/test/evict_on_close.c
@@ -91,26 +91,23 @@ verify_tag_not_in_cache(H5F_t *f, haddr_t tag)
{
H5C_t *cache_ptr = NULL; /* cache pointer */
int i = 0; /* iterator */
- H5C_cache_entry_t *entry_ptr = NULL; /* entry pointer */
+ /* Get Internal Cache Pointers */
cache_ptr = f->shared->cache;
for(i = 0; i < H5C__HASH_TABLE_LEN; i++) {
+ H5C_cache_entry_t *entry_ptr; /* entry pointer */
entry_ptr = cache_ptr->index[i];
-
while(entry_ptr != NULL) {
-
if(tag == entry_ptr->tag)
return TRUE;
else
entry_ptr = entry_ptr->ht_next;
-
} /* end while */
} /* end for */
return FALSE;
-
} /* end verify_tag_not_in_cache() */
diff --git a/test/tmisc.c b/test/tmisc.c
index 011486a..f93500d 100644
--- a/test/tmisc.c
+++ b/test/tmisc.c
@@ -466,7 +466,7 @@ static void test_misc2_write_attribute(void)
CHECK(ret, FAIL, "H5Dvlen_reclaim");
ret = H5Aclose(att1);
- CHECK(ret, FAIL, "HAclose");
+ CHECK(ret, FAIL, "H5Aclose");
ret = H5Gclose(root1);
CHECK(ret, FAIL, "H5Gclose");
@@ -492,7 +492,7 @@ static void test_misc2_write_attribute(void)
CHECK(ret, FAIL, "H5Dvlen_reclaim");
ret = H5Aclose(att2);
- CHECK(ret, FAIL, "HAclose");
+ CHECK(ret, FAIL, "H5Aclose");
ret = H5Gclose(root2);
CHECK(ret, FAIL, "H5Gclose");
@@ -2928,18 +2928,18 @@ test_misc18(void)
CHECK(aid, FAIL, "H5Acreate2");
ret = H5Aclose(aid);
- CHECK(ret, FAIL, "HAclose");
+ CHECK(ret, FAIL, "H5Aclose");
/* Create & close attribute on second dataset */
aid = H5Acreate2(did2, attr_name, H5T_STD_U32LE, sid, H5P_DEFAULT, H5P_DEFAULT);
CHECK(aid, FAIL, "H5Acreate2");
ret = H5Aclose(aid);
- CHECK(ret, FAIL, "HAclose");
+ CHECK(ret, FAIL, "H5Aclose");
/* Flush file, to 'fix' size of dataset object headers */
ret = H5Fflush(fid,H5F_SCOPE_GLOBAL);
- CHECK(ret, FAIL, "HAclose");
+ CHECK(ret, FAIL, "H5Fflush");
} /* end for */
/* Get object information for dataset #1 now */
diff --git a/tools/lib/h5diff_attr.c b/tools/lib/h5diff_attr.c
index 2cda28c..b29e360 100644
--- a/tools/lib/h5diff_attr.c
+++ b/tools/lib/h5diff_attr.c
@@ -106,11 +106,9 @@ static void table_attrs_free( table_attrs_t *table )
*------------------------------------------------------------------------*/
static void table_attr_mark_exist(unsigned *exist, char *name, table_attrs_t *table)
{
- size_t curr_val;
-
- match_attr_t *new_attrs;
-
if(table->nattrs == table->size) {
+ match_attr_t *new_attrs;
+
table->size = MAX(1, table->size * 2);
new_attrs = (match_attr_t *)HDrealloc(table->attrs, table->size * sizeof(match_attr_t));
if(new_attrs)
@@ -118,6 +116,8 @@ static void table_attr_mark_exist(unsigned *exist, char *name, table_attrs_t *ta
} /* end if */
if(table->nattrs < table->size) {
+ size_t curr_val;
+
curr_val = table->nattrs;
table->attrs[curr_val].exist[0] = exist[0];
table->attrs[curr_val].exist[1] = exist[1];
@@ -168,36 +168,34 @@ static herr_t build_match_list_attrs(hid_t loc1_id, hid_t loc2_id, table_attrs_t
/*--------------------------------------------------
* build the list
*/
- while (curr1 < oinfo1.num_attrs && curr2 < oinfo2.num_attrs) {
+ while(curr1 < oinfo1.num_attrs && curr2 < oinfo2.num_attrs) {
/*------------------
* open attribute1 */
- if ((attr1_id = H5Aopen_by_idx(loc1_id, ".", H5_INDEX_NAME, H5_ITER_INC,
- (hsize_t) curr1, H5P_DEFAULT, H5P_DEFAULT)) < 0)
+ if((attr1_id = H5Aopen_by_idx(loc1_id, ".", H5_INDEX_NAME, H5_ITER_INC, (hsize_t)curr1, H5P_DEFAULT, H5P_DEFAULT)) < 0)
goto error;
/* get name */
- if (H5Aget_name(attr1_id, (size_t) ATTR_NAME_MAX, name1) < 0)
+ if(H5Aget_name(attr1_id, (size_t)ATTR_NAME_MAX, name1) < 0)
goto error;
/*------------------
* open attribute2 */
- if ((attr2_id = H5Aopen_by_idx(loc2_id, ".", H5_INDEX_NAME, H5_ITER_INC,
- (hsize_t) curr2, H5P_DEFAULT, H5P_DEFAULT)) < 0)
+ if((attr2_id = H5Aopen_by_idx(loc2_id, ".", H5_INDEX_NAME, H5_ITER_INC, (hsize_t)curr2, H5P_DEFAULT, H5P_DEFAULT)) < 0)
goto error;
/* get name */
- if (H5Aget_name(attr2_id, (size_t) ATTR_NAME_MAX, name2) < 0)
+ if(H5Aget_name(attr2_id, (size_t)ATTR_NAME_MAX, name2) < 0)
goto error;
/* criteria is string compare */
cmp = HDstrcmp(name1, name2);
- if (cmp == 0) {
+ if(cmp == 0) {
infile[0] = 1;
infile[1] = 1;
table_attr_mark_exist(infile, name1, table_lp);
curr1++;
curr2++;
}
- else if (cmp < 0) {
+ else if(cmp < 0) {
infile[0] = 1;
infile[1] = 0;
table_attr_mark_exist(infile, name1, table_lp);
@@ -222,14 +220,13 @@ static herr_t build_match_list_attrs(hid_t loc1_id, hid_t loc2_id, table_attrs_t
/* list1 did not end */
infile[0] = 1;
infile[1] = 0;
- while (curr1 < oinfo1.num_attrs) {
+ while(curr1 < oinfo1.num_attrs) {
/*------------------
* open attribute1 */
- if ((attr1_id = H5Aopen_by_idx(loc1_id, ".", H5_INDEX_NAME, H5_ITER_INC,
- (hsize_t) curr1, H5P_DEFAULT, H5P_DEFAULT)) < 0)
+ if((attr1_id = H5Aopen_by_idx(loc1_id, ".", H5_INDEX_NAME, H5_ITER_INC, (hsize_t)curr1, H5P_DEFAULT, H5P_DEFAULT)) < 0)
goto error;
/* get name */
- if (H5Aget_name(attr1_id, (size_t) ATTR_NAME_MAX, name1) < 0)
+ if(H5Aget_name(attr1_id, (size_t)ATTR_NAME_MAX, name1) < 0)
goto error;
table_attr_mark_exist(infile, name1, table_lp);
@@ -244,14 +241,13 @@ static herr_t build_match_list_attrs(hid_t loc1_id, hid_t loc2_id, table_attrs_t
/* list2 did not end */
infile[0] = 0;
infile[1] = 1;
- while (curr2 < oinfo2.num_attrs) {
+ while(curr2 < oinfo2.num_attrs) {
/*------------------
* open attribute2 */
- if ((attr2_id = H5Aopen_by_idx(loc2_id, ".", H5_INDEX_NAME, H5_ITER_INC,
- (hsize_t) curr2, H5P_DEFAULT, H5P_DEFAULT)) < 0)
+ if((attr2_id = H5Aopen_by_idx(loc2_id, ".", H5_INDEX_NAME, H5_ITER_INC, (hsize_t)curr2, H5P_DEFAULT, H5P_DEFAULT)) < 0)
goto error;
/* get name */
- if (H5Aget_name(attr2_id, (size_t) ATTR_NAME_MAX, name2) < 0)
+ if(H5Aget_name(attr2_id, (size_t)ATTR_NAME_MAX, name2) < 0)
goto error;
table_attr_mark_exist(infile, name2, table_lp);
@@ -265,25 +261,22 @@ static herr_t build_match_list_attrs(hid_t loc1_id, hid_t loc2_id, table_attrs_t
/*------------------------------------------------------
* print the list
*/
- if (options->m_verbose_level == 2) {
+ if(options->m_verbose_level == 2) {
/* if '-v2' is detected */
parallel_print(" obj1 obj2\n");
parallel_print(" --------------------------------------\n");
- for (i = 0; i < (unsigned int) table_lp->nattrs; i++) {
+ for(i = 0; i < (unsigned int) table_lp->nattrs; i++) {
char c1, c2;
c1 = (table_lp->attrs[i].exist[0]) ? 'x' : ' ';
c2 = (table_lp->attrs[i].exist[1]) ? 'x' : ' ';
- parallel_print("%5c %6c %-15s\n", c1, c2,
- table_lp->attrs[i].name);
+ parallel_print("%5c %6c %-15s\n", c1, c2, table_lp->attrs[i].name);
} /* end for */
}
- if (options->m_verbose_level >= 1) {
- parallel_print(
- "Attributes status: %d common, %d only in obj1, %d only in obj2\n",
+ if(options->m_verbose_level >= 1)
+ parallel_print("Attributes status: %d common, %d only in obj1, %d only in obj2\n",
table_lp->nattrs - table_lp->nattrs_only1 - table_lp->nattrs_only2,
table_lp->nattrs_only1, table_lp->nattrs_only2);
- }
*table_out = table_lp;
@@ -331,8 +324,8 @@ hsize_t diff_attr(hid_t loc1_id,
hid_t space2_id=-1; /* space ID */
hid_t ftype1_id=-1; /* file data type ID */
hid_t ftype2_id=-1; /* file data type ID */
- int vstrtype1=0; /* ftype1 is a variable string */
- int vstrtype2=0; /* ftype2 is a variable string */
+ int vstrtype1=0; /* ftype1 is a variable string */
+ int vstrtype2=0; /* ftype2 is a variable string */
hid_t mtype1_id=-1; /* memory data type ID */
hid_t mtype2_id=-1; /* memory data type ID */
size_t msize1; /* memory size of memory type */
@@ -356,39 +349,39 @@ hsize_t diff_attr(hid_t loc1_id,
int j;
table_attrs_t * match_list_attrs = NULL;
- if (build_match_list_attrs(loc1_id, loc2_id, &match_list_attrs, options) < 0)
+ if(build_match_list_attrs(loc1_id, loc2_id, &match_list_attrs, options) < 0)
goto error;
/* if detect any unique extra attr */
- if (match_list_attrs->nattrs_only1 || match_list_attrs->nattrs_only2) {
+ if(match_list_attrs->nattrs_only1 || match_list_attrs->nattrs_only2) {
/* exit will be 1 */
options->contents = 0;
}
- for (u = 0; u < (unsigned) match_list_attrs->nattrs; u++) {
- if ((match_list_attrs->attrs[u].exist[0]) && (match_list_attrs->attrs[u].exist[1])) {
+ for(u = 0; u < (unsigned)match_list_attrs->nattrs; u++) {
+ if((match_list_attrs->attrs[u].exist[0]) && (match_list_attrs->attrs[u].exist[1])) {
name1 = name2 = match_list_attrs->attrs[u].name;
/*--------------
* attribute 1 */
- if ((attr1_id = H5Aopen(loc1_id, name1, H5P_DEFAULT)) < 0)
+ if((attr1_id = H5Aopen(loc1_id, name1, H5P_DEFAULT)) < 0)
goto error;
/*--------------
* attribute 2 */
- if ((attr2_id = H5Aopen(loc2_id, name2, H5P_DEFAULT)) < 0)
+ if((attr2_id = H5Aopen(loc2_id, name2, H5P_DEFAULT)) < 0)
goto error;
/* get the datatypes */
- if ((ftype1_id = H5Aget_type(attr1_id)) < 0)
+ if((ftype1_id = H5Aget_type(attr1_id)) < 0)
goto error;
vstrtype1 = H5Tis_variable_str(ftype1_id);
- if ((ftype2_id = H5Aget_type(attr2_id)) < 0)
+ if((ftype2_id = H5Aget_type(attr2_id)) < 0)
goto error;
vstrtype2 = H5Tis_variable_str(ftype2_id);
/* no compare if either one but not both are variable string type */
if (vstrtype1 != vstrtype2) {
- if ((options->m_verbose || options->m_list_not_cmp))
+ if((options->m_verbose || options->m_list_not_cmp))
parallel_print("Not comparable: one of attribute <%s/%s> or <%s/%s> is of variable length type\n",
path1, name1, path2, name2);
options->not_cmp = 1;
@@ -404,25 +397,25 @@ hsize_t diff_attr(hid_t loc1_id,
continue;
}
- if ((mtype1_id = h5tools_get_native_type(ftype1_id)) < 0)
+ if((mtype1_id = h5tools_get_native_type(ftype1_id)) < 0)
goto error;
- if ((mtype2_id = h5tools_get_native_type(ftype2_id)) < 0)
+ if((mtype2_id = h5tools_get_native_type(ftype2_id)) < 0)
goto error;
- if ((msize1 = H5Tget_size(mtype1_id)) == 0)
+ if((msize1 = H5Tget_size(mtype1_id)) == 0)
goto error;
- if ((msize2 = H5Tget_size(mtype2_id)) == 0)
+ if((msize2 = H5Tget_size(mtype2_id)) == 0)
goto error;
/* get the dataspace */
- if ((space1_id = H5Aget_space(attr1_id)) < 0)
+ if((space1_id = H5Aget_space(attr1_id)) < 0)
goto error;
- if ((space2_id = H5Aget_space(attr2_id)) < 0)
+ if((space2_id = H5Aget_space(attr2_id)) < 0)
goto error;
/* get dimensions */
- if ((rank1 = H5Sget_simple_extent_dims(space1_id, dims1, NULL)) < 0)
+ if((rank1 = H5Sget_simple_extent_dims(space1_id, dims1, NULL)) < 0)
goto error;
- if ((rank2 = H5Sget_simple_extent_dims(space2_id, dims2, NULL)) < 0)
+ if((rank2 = H5Sget_simple_extent_dims(space2_id, dims2, NULL)) < 0)
goto error;
/*----------------------------------------------------------------------
@@ -432,23 +425,23 @@ hsize_t diff_attr(hid_t loc1_id,
/* pass dims1 and dims2 for maxdims as well since attribute's maxdims
* are always same */
- if (diff_can_type(ftype1_id, ftype2_id, rank1, rank2, dims1, dims2,
+ if(diff_can_type(ftype1_id, ftype2_id, rank1, rank2, dims1, dims2,
dims1, dims2, name1, name2, options, 0) != 1) {
- if (H5Tclose(ftype1_id) < 0)
+ if(H5Tclose(ftype1_id) < 0)
goto error;
- if (H5Tclose(ftype2_id) < 0)
+ if(H5Tclose(ftype2_id) < 0)
goto error;
- if (H5Sclose(space1_id) < 0)
+ if(H5Sclose(space1_id) < 0)
goto error;
- if (H5Sclose(space2_id) < 0)
+ if(H5Sclose(space2_id) < 0)
goto error;
- if (H5Aclose(attr1_id) < 0)
+ if(H5Aclose(attr1_id) < 0)
goto error;
- if (H5Aclose(attr2_id) < 0)
+ if(H5Aclose(attr2_id) < 0)
goto error;
- if (H5Tclose(mtype1_id) < 0)
+ if(H5Tclose(mtype1_id) < 0)
goto error;
- if (H5Tclose(mtype2_id) < 0)
+ if(H5Tclose(mtype2_id) < 0)
goto error;
continue;
@@ -458,7 +451,7 @@ hsize_t diff_attr(hid_t loc1_id,
* "upgrade" the smaller memory size
*------------------------------------------------------------------
*/
- if (FAIL == match_up_memsize(ftype1_id, ftype2_id, &mtype1_id,
+ if(FAIL == match_up_memsize(ftype1_id, ftype2_id, &mtype1_id,
&mtype2_id, &msize1, &msize2))
goto error;
@@ -467,26 +460,24 @@ hsize_t diff_attr(hid_t loc1_id,
*----------------------------------------------------------------------
*/
nelmts1 = 1;
- for (j = 0; j < rank1; j++)
+ for(j = 0; j < rank1; j++)
nelmts1 *= dims1[j];
buf1 = (void *)HDmalloc((size_t)(nelmts1 * msize1));
buf2 = (void *)HDmalloc((size_t)(nelmts1 * msize2));
- if (buf1 == NULL || buf2 == NULL) {
+ if(buf1 == NULL || buf2 == NULL) {
parallel_print("cannot read into memory\n");
goto error;
}
- if (H5Aread(attr1_id, mtype1_id, buf1) < 0) {
- parallel_print("Failed reading attribute1 %s/%s\n", path1,
- name1);
+ if(H5Aread(attr1_id, mtype1_id, buf1) < 0) {
+ parallel_print("Failed reading attribute1 %s/%s\n", path1, name1);
goto error;
}
else
buf1hasdata = TRUE;
- if (H5Aread(attr2_id, mtype2_id, buf2) < 0) {
- parallel_print("Failed reading attribute2 %s/%s\n", path2,
- name2);
+ if(H5Aread(attr2_id, mtype2_id, buf2) < 0) {
+ parallel_print("Failed reading attribute2 %s/%s\n", path2, name2);
goto error;
}
else
@@ -503,7 +494,7 @@ hsize_t diff_attr(hid_t loc1_id,
/* always print name */
/* verbose (-v) and report (-r) mode */
- if (options->m_verbose || options->m_report) {
+ if(options->m_verbose || options->m_report) {
do_print_attrname("attribute", np1, np2);
nfound = diff_array(buf1, buf2, nelmts1, (hsize_t) 0, rank1,
@@ -511,7 +502,7 @@ hsize_t diff_attr(hid_t loc1_id,
print_found(nfound);
}
/* quiet mode (-q), just count differences */
- else if (options->m_quiet) {
+ else if(options->m_quiet) {
nfound = diff_array(buf1, buf2, nelmts1, (hsize_t) 0, rank1,
dims1, options, np1, np2, mtype1_id, attr1_id, attr2_id);
}
@@ -534,31 +525,31 @@ hsize_t diff_attr(hid_t loc1_id,
/* Free buf1 and buf2, check both VLEN-data VLEN-string to reclaim any
* VLEN memory first */
- if (TRUE == h5tools_detect_vlen(mtype1_id))
+ if(TRUE == h5tools_detect_vlen(mtype1_id))
H5Dvlen_reclaim(mtype1_id, space1_id, H5P_DEFAULT, buf1);
HDfree(buf1);
buf1 = NULL;
- if (TRUE == h5tools_detect_vlen(mtype2_id))
+ if(TRUE == h5tools_detect_vlen(mtype2_id))
H5Dvlen_reclaim(mtype2_id, space2_id, H5P_DEFAULT, buf2);
HDfree(buf2);
buf2 = NULL;
- if (H5Tclose(ftype1_id) < 0)
+ if(H5Tclose(ftype1_id) < 0)
goto error;
- if (H5Tclose(ftype2_id) < 0)
+ if(H5Tclose(ftype2_id) < 0)
goto error;
- if (H5Sclose(space1_id) < 0)
+ if(H5Sclose(space1_id) < 0)
goto error;
- if (H5Sclose(space2_id) < 0)
+ if(H5Sclose(space2_id) < 0)
goto error;
- if (H5Aclose(attr1_id) < 0)
+ if(H5Aclose(attr1_id) < 0)
goto error;
- if (H5Aclose(attr2_id) < 0)
+ if(H5Aclose(attr2_id) < 0)
goto error;
- if (H5Tclose(mtype1_id) < 0)
+ if(H5Tclose(mtype1_id) < 0)
goto error;
- if (H5Tclose(mtype2_id) < 0)
+ if(H5Tclose(mtype2_id) < 0)
goto error;
nfound_total += nfound;
diff --git a/tools/lib/h5tools_str.c b/tools/lib/h5tools_str.c
index 6d9a041..72f28ba 100644
--- a/tools/lib/h5tools_str.c
+++ b/tools/lib/h5tools_str.c
@@ -737,6 +737,7 @@ h5tools_str_indent(h5tools_str_t *str, const h5tool_format_t *info,
* 32-bit or more. For every kind of native integers, I changed the code
* to make it zero if PACKED_DATA_OFFSET is greater than or equal to the
* size of integer.
+ *
*-------------------------------------------------------------------------
*/
char *