summaryrefslogtreecommitdiffstats
path: root/test/cache.c
diff options
context:
space:
mode:
authorQuincey Koziol <koziol@hdfgroup.org>2010-05-05 13:39:56 (GMT)
committerQuincey Koziol <koziol@hdfgroup.org>2010-05-05 13:39:56 (GMT)
commit74c8b68acab0fc2408740e7a38a2ab2bcdf58f57 (patch)
treed0d2da7ac1ea824f0ef78e757ace31a85bc4b6aa /test/cache.c
parent4c0421ba76a7615cc02f43b8f3778f5d6a1f4d68 (diff)
downloadhdf5-74c8b68acab0fc2408740e7a38a2ab2bcdf58f57.zip
hdf5-74c8b68acab0fc2408740e7a38a2ab2bcdf58f57.tar.gz
hdf5-74c8b68acab0fc2408740e7a38a2ab2bcdf58f57.tar.bz2
[svn-r18702] Description:
Bring r18672 from metadata journaling "merging" branch to trunk: Mostly changes to move to only using one 'user data' parameter for calls to H5AC_protect(), along with some minor reformatting code cleanups. Tested on: FreeBSD/32 6.3 (duty) in debug mode FreeBSD/64 6.3 (liberty) w/C++ & FORTRAN, in debug mode Linux/32 2.6 (jam) w/PGI compilers, w/default API=1.8.x, w/C++ & FORTRAN, w/threadsafe, in debug mode Linux/64-amd64 2.6 (amani) w/Intel compilers, w/default API=1.6.x, w/C++ & FORTRAN, in production mode Solaris/32 2.10 (linew) w/deprecated symbols disabled, w/C++ & FORTRAN, w/szip filter, in production mode Linux/64-ia64 2.6 (cobalt) w/Intel compilers, w/C++ & FORTRAN, in production mode Linux/64-amd64 2.6 (abe) w/parallel, w/FORTRAN, in production mode Mac OS X/32 10.6.3 (amazon) in debug mode Mac OS X/32 10.6.3 (amazon) w/C++ & FORTRAN, w/threadsafe, in production mode
Diffstat (limited to 'test/cache.c')
-rw-r--r--test/cache.c97
1 files changed, 47 insertions, 50 deletions
diff --git a/test/cache.c b/test/cache.c
index e02f14a..364ec75 100644
--- a/test/cache.c
+++ b/test/cache.c
@@ -256,7 +256,7 @@ smoke_check_1(void)
/* flush and destroy all entries in the cache: */
- flush_cache(/* file_ptr */ file_ptr,
+ flush_cache(/* file_ptr */ file_ptr,
/* destroy_entries */ TRUE,
/* dump_stats */ FALSE,
/* dump_detailed_stats */ FALSE);
@@ -281,7 +281,7 @@ smoke_check_1(void)
/* flush all entries in the cache: */
- flush_cache(/* file_ptr */ file_ptr,
+ flush_cache(/* file_ptr */ file_ptr,
/* destroy_entries */ FALSE,
/* dump_stats */ FALSE,
/* dump_detailed_stats */ FALSE);
@@ -472,7 +472,7 @@ smoke_check_2(void)
/* flush all entries in the cache: */
- flush_cache(/* file_ptr */ file_ptr,
+ flush_cache(/* file_ptr */ file_ptr,
/* destroy_entries */ FALSE,
/* dump_stats */ FALSE,
/* dump_detailed_stats */ FALSE);
@@ -963,8 +963,8 @@ smoke_check_5(void)
/* enum H5C_cache_flash_incr_mode */
/* flash_incr_mode = */ H5C_flash_incr__off,
- /* double flash_multiple = */ 2.0,
- /* double flash_threshold = */ 0.5,
+ /* double flash_multiple = */ 2.0,
+ /* double flash_threshold = */ 0.5,
/* enum H5C_cache_decr_mode decr_mode = */ H5C_decr__threshold,
@@ -1205,8 +1205,8 @@ smoke_check_6(void)
/* enum H5C_cache_flash_incr_mode */
/* flash_incr_mode = */ H5C_flash_incr__off,
- /* double flash_multiple = */ 2.0,
- /* double flash_threshold = */ 0.5,
+ /* double flash_multiple = */ 2.0,
+ /* double flash_threshold = */ 0.5,
/* enum H5C_cache_decr_mode decr_mode = */ H5C_decr__threshold,
@@ -1444,8 +1444,8 @@ smoke_check_7(void)
/* enum H5C_cache_flash_incr_mode */
/* flash_incr_mode = */ H5C_flash_incr__off,
- /* double flash_multiple = */ 2.0,
- /* double flash_threshold = */ 0.5,
+ /* double flash_multiple = */ 2.0,
+ /* double flash_threshold = */ 0.5,
/* enum H5C_cache_decr_mode decr_mode = */
@@ -1684,8 +1684,8 @@ smoke_check_8(void)
/* enum H5C_cache_flash_incr_mode */
/* flash_incr_mode = */ H5C_flash_incr__off,
- /* double flash_multiple = */ 2.0,
- /* double flash_threshold = */ 0.5,
+ /* double flash_multiple = */ 2.0,
+ /* double flash_threshold = */ 0.5,
/* enum H5C_cache_decr_mode decr_mode = */
@@ -4973,7 +4973,7 @@ check_flush_cache__multi_entry_test(H5F_t * file_ptr,
struct flush_cache_test_spec spec[])
{
/* const char * fcn_name = "check_flush_cache__multi_entry_test"; */
- H5C_t * cache_ptr = file_ptr->shared->cache;
+ H5C_t * cache_ptr = file_ptr->shared->cache;
static char msg[128];
herr_t result;
int i;
@@ -6053,8 +6053,8 @@ check_flush_cache__flush_ops(H5F_t * file_ptr)
* which the call back function both resizes and renames the entry
* for which it has been called.
*
- * Again, we run this entry twice, as the first run moves the entry to its
- * alternate address, and the second moves it back.
+ * Again, we run this entry twice, as the first run moves the entry
+ * to its alternate address, and the second moves it back.
*/
int test_num = 9; /* and 10 */
unsigned int flush_flags = H5C__NO_FLAGS_SET;
@@ -9246,7 +9246,7 @@ check_flush_cache__flush_op_test(H5F_t * file_ptr,
struct fo_flush_entry_check check[])
{
const char * fcn_name = "check_flush_cache__flush_op_test";
- H5C_t *cache_ptr = file_ptr->shared->cache;
+ H5C_t * cache_ptr = file_ptr->shared->cache;
static char msg[128];
hbool_t show_progress = FALSE;
hbool_t verbose = FALSE;
@@ -13331,7 +13331,7 @@ check_flush_cache__pinned_single_entry_test(H5F_t * file_ptr,
hbool_t expected_destroyed)
{
/* const char *fcn_name = "check_flush_cache__pinned_single_entry_test"; */
- H5C_t *cache_ptr = file_ptr->shared->cache;
+ H5C_t * cache_ptr = file_ptr->shared->cache;
static char msg[128];
hbool_t expected_loaded = TRUE;
herr_t result;
@@ -13837,10 +13837,10 @@ check_expunge_entry(void)
if ( result < 0 ) {
- pass = FALSE;
- HDsnprintf(msg, (size_t)128,
- "H5C_get_entry_status() reports failure 2.");
- failure_mssg = msg;
+ 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 ) {
@@ -13881,10 +13881,10 @@ check_expunge_entry(void)
if ( result < 0 ) {
- pass = FALSE;
- HDsnprintf(msg, (size_t)128,
- "H5C_get_entry_status() reports failure 3.");
- failure_mssg = msg;
+ pass = FALSE;
+ HDsnprintf(msg, (size_t)128,
+ "H5C_get_entry_status() reports failure 3.");
+ failure_mssg = msg;
} else if ( in_cache ) {
@@ -13923,10 +13923,10 @@ check_expunge_entry(void)
if ( result < 0 ) {
- pass = FALSE;
- HDsnprintf(msg, (size_t)128,
- "H5C_get_entry_status() reports failure 4.");
- failure_mssg = msg;
+ pass = FALSE;
+ HDsnprintf(msg, (size_t)128,
+ "H5C_get_entry_status() reports failure 4.");
+ failure_mssg = msg;
} else if ( in_cache ) {
@@ -14611,7 +14611,7 @@ check_rename_entry__run_test(H5F_t * file_ptr,
struct rename_entry_test_spec * spec_ptr)
{
/* const char * fcn_name = "check_rename_entry__run_test"; */
- H5C_t *cache_ptr = file_ptr->shared->cache;
+ H5C_t * cache_ptr = file_ptr->shared->cache;
static char msg[128];
unsigned int flags = H5C__NO_FLAGS_SET;
test_entry_t * base_addr;
@@ -15898,7 +15898,7 @@ check_evictions_enabled(void)
HDfprintf(stdout, "%s() - %0d -- pass = %d\n",
fcn_name, mile_stone++, (int)pass);
- /* verivy that it is empty */
+ /* verify that it is empty */
if ( pass ) {
if ( ( cache_ptr->index_len != 0 ) ||
@@ -15985,7 +15985,7 @@ check_evictions_enabled(void)
HDfprintf(stdout, "%s() - %0d -- pass = %d\n",
fcn_name, mile_stone++, (int)pass);
- /* verify that the an entry has been evicted */
+ /* verify that an entry has been evicted */
if ( pass ) {
if ( ( cache_ptr->index_len != 16 ) ||
@@ -17320,7 +17320,7 @@ check_double_protect_err(void)
if ( pass ) {
cache_entry_ptr = (H5C_cache_entry_t *)H5C_protect(file_ptr, H5P_DATASET_XFER_DEFAULT, H5P_DATASET_XFER_DEFAULT,
- &(types[0]), entry_ptr->addr, NULL, NULL, H5C__NO_FLAGS_SET);
+ &(types[0]), entry_ptr->addr, NULL, H5C__NO_FLAGS_SET);
if ( cache_entry_ptr != NULL ) {
@@ -17977,7 +17977,7 @@ check_protect_ro_rw_err(void)
if ( pass ) {
thing_ptr = (H5C_cache_entry_t *)H5C_protect(file_ptr, H5P_DATASET_XFER_DEFAULT, H5P_DATASET_XFER_DEFAULT,
- &(types[0]), entry_ptr->addr, NULL, NULL, H5C__NO_FLAGS_SET);
+ &(types[0]), entry_ptr->addr, NULL, H5C__NO_FLAGS_SET);
if ( thing_ptr != NULL ) {
@@ -18223,8 +18223,8 @@ check_auto_cache_resize(void)
/* enum H5C_cache_flash_incr_mode */
/* flash_incr_mode = */ H5C_flash_incr__off,
- /* double flash_multiple = */ 2.0,
- /* double flash_threshold = */ 0.5,
+ /* double flash_multiple = */ 2.0,
+ /* double flash_threshold = */ 0.5,
/* enum H5C_cache_decr_mode decr_mode = */ H5C_decr__threshold,
@@ -18621,7 +18621,6 @@ check_auto_cache_resize(void)
auto_size_ctl.flash_multiple = 2.0;
auto_size_ctl.flash_threshold = 0.5;
-
auto_size_ctl.decr_mode = H5C_decr__threshold;
auto_size_ctl.upper_hr_threshold = 0.995;
@@ -18975,7 +18974,6 @@ check_auto_cache_resize(void)
auto_size_ctl.flash_multiple = 2.0;
auto_size_ctl.flash_threshold = 0.5;
-
auto_size_ctl.decr_mode = H5C_decr__threshold;
auto_size_ctl.upper_hr_threshold = 0.995;
@@ -19439,7 +19437,7 @@ check_auto_cache_resize(void)
}
}
- 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
@@ -21526,7 +21524,7 @@ check_auto_cache_resize(void)
if ( show_progress ) HDfprintf(stderr, "check point %d\n", checkpoint++);
- /* Load a second moster entry. Since the monster entry is larger
+ /* 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.
@@ -22816,7 +22814,6 @@ check_auto_cache_resize_disable(void)
auto_size_ctl.decr_mode = H5C_decr__threshold;
auto_size_ctl.upper_hr_threshold = 0.995;
-
auto_size_ctl.decrement = 0.5;
auto_size_ctl.apply_max_decrement = FALSE;
@@ -25071,6 +25068,7 @@ check_auto_cache_resize_disable(void)
if ( show_progress ) HDfprintf(stderr, "check point %d\n", checkpoint++);
+
/* Now test the flash cache size increment code to verify that it
* is disabled when it should be.
*
@@ -25098,7 +25096,6 @@ check_auto_cache_resize_disable(void)
* code enabled.
*/
-
if ( pass ) {
auto_size_ctl.version = H5C__CURR_AUTO_SIZE_CTL_VER;
@@ -25314,8 +25311,8 @@ check_auto_cache_resize_epoch_markers(void)
/* enum H5C_cache_flash_incr_mode */
/* flash_incr_mode = */ H5C_flash_incr__off,
- /* double flash_multiple = */ 2.0,
- /* double flash_threshold = */ 0.5,
+ /* double flash_multiple = */ 2.0,
+ /* double flash_threshold = */ 0.5,
/* enum H5C_cache_decr_mode decr_mode = */ H5C_decr__threshold,
@@ -25984,9 +25981,9 @@ check_auto_cache_resize_epoch_markers(void)
* Modifications:
*
* Added code to verify that errors in the flash cache size
- * increment related fields are caught as well.
+ * increment related fields are caught as well.
*
- * JRM -- 1/17/08
+ * JRM -- 1/17/08
*
*-------------------------------------------------------------------------
*/
@@ -26084,8 +26081,8 @@ check_auto_cache_resize_input_errs(void)
/* enum H5C_cache_flash_incr_mode */
/* flash_incr_mode = */ H5C_flash_incr__off,
- /* double flash_multiple = */ 2.0,
- /* double flash_threshold = */ 0.5,
+ /* double flash_multiple = */ 2.0,
+ /* double flash_threshold = */ 0.5,
/* enum H5C_cache_decr_mode decr_mode = */ H5C_decr__threshold,
@@ -27418,7 +27415,6 @@ check_auto_cache_resize_input_errs(void)
}
}
-
/* test for bad flash_incr_mode rejection */
if ( pass ) {
@@ -27790,6 +27786,7 @@ check_auto_cache_resize_input_errs(void)
}
}
+
/* test for bad decr_mode rejection */
if ( pass ) {
@@ -28501,8 +28498,8 @@ check_auto_cache_resize_aux_fcns(void)
/* enum H5C_cache_flash_incr_mode */
/* flash_incr_mode = */ H5C_flash_incr__off,
- /* double flash_multiple = */ 2.0,
- /* double flash_threshold = */ 0.5,
+ /* double flash_multiple = */ 2.0,
+ /* double flash_threshold = */ 0.5,
/* enum H5C_cache_decr_mode decr_mode = */ H5C_decr__off,