diff options
Diffstat (limited to 'test/cache.c')
-rw-r--r-- | test/cache.c | 97 |
1 files changed, 47 insertions, 50 deletions
diff --git a/test/cache.c b/test/cache.c index c68f758..0c44a6b 100644 --- a/test/cache.c +++ b/test/cache.c @@ -252,7 +252,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); @@ -277,7 +277,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); @@ -468,7 +468,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); @@ -959,8 +959,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, @@ -1201,8 +1201,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, @@ -1440,8 +1440,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 = */ @@ -1680,8 +1680,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 = */ @@ -4969,7 +4969,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; @@ -6049,8 +6049,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; @@ -9242,7 +9242,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; @@ -13326,7 +13326,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; @@ -13832,10 +13832,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 ) { @@ -13876,10 +13876,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 ) { @@ -13918,10 +13918,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 ) { @@ -14606,7 +14606,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; @@ -15883,7 +15883,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 ) || @@ -15970,7 +15970,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 ) || @@ -17304,7 +17304,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 ) { @@ -17961,7 +17961,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 ) { @@ -18207,8 +18207,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, @@ -18605,7 +18605,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; @@ -18959,7 +18958,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; @@ -19423,7 +19421,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 @@ -21510,7 +21508,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. @@ -22800,7 +22798,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; @@ -25055,6 +25052,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. * @@ -25082,7 +25080,6 @@ check_auto_cache_resize_disable(void) * code enabled. */ - if ( pass ) { auto_size_ctl.version = H5C__CURR_AUTO_SIZE_CTL_VER; @@ -25298,8 +25295,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, @@ -25968,9 +25965,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 * *------------------------------------------------------------------------- */ @@ -26040,8 +26037,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, @@ -27374,7 +27371,6 @@ check_auto_cache_resize_input_errs(void) } } - /* test for bad flash_incr_mode rejection */ if ( pass ) { @@ -27746,6 +27742,7 @@ check_auto_cache_resize_input_errs(void) } } + /* test for bad decr_mode rejection */ if ( pass ) { @@ -28457,8 +28454,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, |