diff options
author | Quincey Koziol <koziol@hdfgroup.org> | 2010-05-27 13:11:55 (GMT) |
---|---|---|
committer | Quincey Koziol <koziol@hdfgroup.org> | 2010-05-27 13:11:55 (GMT) |
commit | 71d4644df239df3ea2f9013d54b93dd68cf9392b (patch) | |
tree | 3dd68f12ebbeb7f68a773c50420f9868f0009454 /test/cache.c | |
parent | 817f42c3bb8c0090a12dc78a9c537cbaefb2dd93 (diff) | |
download | hdf5-71d4644df239df3ea2f9013d54b93dd68cf9392b.zip hdf5-71d4644df239df3ea2f9013d54b93dd68cf9392b.tar.gz hdf5-71d4644df239df3ea2f9013d54b93dd68cf9392b.tar.bz2 |
[svn-r18911] Description:
More general changes to align trunk with eventual changes from
metadata journaling branch.
Tested on:
Mac OS X/32 10.6.3 (amazon) w/debug, production & parallel
(h5committest not required on this branch)
Diffstat (limited to 'test/cache.c')
-rw-r--r-- | test/cache.c | 266 |
1 files changed, 119 insertions, 147 deletions
diff --git a/test/cache.c b/test/cache.c index 17636cc..68ff400 100644 --- a/test/cache.c +++ b/test/cache.c @@ -24,6 +24,7 @@ #include "H5ACprivate.h" #include "cache_common.h" + /* private typedef declarations: */ struct flush_cache_test_spec @@ -100,7 +101,7 @@ struct move_entry_test_spec hbool_t is_pinned; }; - + /* private function declarations: */ static void smoke_check_1(void); @@ -272,7 +273,7 @@ smoke_check_1(void) /* verbose */ FALSE, /* reset_stats */ TRUE, /* display_stats */ display_stats, - /* display_detailed_stats */ TRUE, + /* display_detailed_stats */ FALSE, /* do_inserts */ TRUE, /* do_moves */ TRUE, /* move_to_main_addr */ FALSE, @@ -290,7 +291,7 @@ smoke_check_1(void) /* verbose */ FALSE, /* reset_stats */ TRUE, /* display_stats */ display_stats, - /* display_detailed_stats */ TRUE, + /* display_detailed_stats */ FALSE, /* do_inserts */ FALSE, /* do_moves */ TRUE, /* move_to_main_addr */ TRUE, @@ -308,7 +309,7 @@ smoke_check_1(void) /* verbose */ FALSE, /* reset_stats */ TRUE, /* display_stats */ display_stats, - /* display_detailed_stats */ TRUE, + /* display_detailed_stats */ FALSE, /* do_inserts */ TRUE, /* do_moves */ TRUE, /* move_to_main_addr */ FALSE, @@ -2758,7 +2759,6 @@ check_insert_entry(void) insert_entry(file_ptr, entry_type, 3, (H5C__SET_FLUSH_MARKER_FLAG | H5C__PIN_ENTRY_FLAG)); } - /* Verify that the entries are inserted as desired. */ i = 0; @@ -2776,7 +2776,7 @@ check_insert_entry(void) if ( result < 0 ) { pass = FALSE; - failure_mssg = "H5AC_get_entry_status() reports failure."; + failure_mssg = "H5C_get_entry_status() reports failure."; } if ( pass ) { @@ -2812,7 +2812,7 @@ check_insert_entry(void) } } - /* Thats all we can get from H5AC_get_entry_status(). + /* Thats all we can get from H5C_get_entry_status(). * Now start looking at the cache data structures directly. */ @@ -2905,7 +2905,6 @@ check_insert_entry(void) } /* while */ - /* So much for looking at the individual entries. Now verify * that the various counts and sized in the cache header are * as expected. @@ -2935,7 +2934,6 @@ check_insert_entry(void) } } - /* Finally, if stats collection is enabled, verify that the expected * stats are collected. */ @@ -2962,7 +2960,6 @@ check_insert_entry(void) } #endif /* H5C_COLLECT_CACHE_STATS */ - /* Unpin the pinned entries so we can take down the cache cleanly. */ if ( pass ) { @@ -3211,92 +3208,92 @@ check_flush_cache__multi_entry(H5F_t * file_ptr) struct flush_cache_test_spec spec[8] = { { - /* entry_num = */ 0, - /* entry_type = */ PICO_ENTRY_TYPE, - /* entry_index = */ 100, - /* insert_flag = */ FALSE, - /* flags = */ H5C__NO_FLAGS_SET, + /* entry_num = */ 0, + /* entry_type = */ PICO_ENTRY_TYPE, + /* entry_index = */ 100, + /* insert_flag = */ FALSE, + /* flags = */ H5C__NO_FLAGS_SET, /* expected_loaded = */ TRUE, /* expected_cleared = */ FALSE, /* expected_flushed = */ FALSE, - /* expected_destroyed = */ FALSE + /* expected_destroyed = */ FALSE }, { - /* entry_num = */ 1, - /* entry_type = */ PICO_ENTRY_TYPE, - /* entry_index = */ 75, - /* insert_flag = */ FALSE, - /* flags = */ H5C__DIRTIED_FLAG, + /* entry_num = */ 1, + /* entry_type = */ PICO_ENTRY_TYPE, + /* entry_index = */ 75, + /* insert_flag = */ FALSE, + /* flags = */ H5C__DIRTIED_FLAG, /* expected_loaded = */ TRUE, /* expected_cleared = */ FALSE, /* expected_flushed = */ TRUE, - /* expected_destroyed = */ FALSE + /* expected_destroyed = */ FALSE }, { - /* entry_num = */ 2, - /* entry_type = */ PICO_ENTRY_TYPE, - /* entry_index = */ 25, - /* insert_flag = */ TRUE, - /* flags = */ H5C__NO_FLAGS_SET, + /* entry_num = */ 2, + /* entry_type = */ PICO_ENTRY_TYPE, + /* entry_index = */ 25, + /* insert_flag = */ TRUE, + /* flags = */ H5C__NO_FLAGS_SET, /* expected_loaded = */ FALSE, /* expected_cleared = */ FALSE, /* expected_flushed = */ TRUE, - /* expected_destroyed = */ FALSE + /* expected_destroyed = */ FALSE }, { - /* entry_num = */ 3, - /* entry_type = */ PICO_ENTRY_TYPE, - /* entry_index = */ 50, - /* insert_flag = */ TRUE, + /* entry_num = */ 3, + /* entry_type = */ PICO_ENTRY_TYPE, + /* entry_index = */ 50, + /* insert_flag = */ TRUE, /* flags = */ H5C__DIRTIED_FLAG, /* expected_loaded = */ FALSE, /* expected_cleared = */ FALSE, /* expected_flushed = */ TRUE, - /* expected_destroyed = */ FALSE + /* expected_destroyed = */ FALSE }, { - /* entry_num = */ 4, - /* entry_type = */ MONSTER_ENTRY_TYPE, - /* entry_index = */ 10, - /* insert_flag = */ FALSE, - /* flags = */ H5C__SET_FLUSH_MARKER_FLAG, + /* entry_num = */ 4, + /* entry_type = */ MONSTER_ENTRY_TYPE, + /* entry_index = */ 10, + /* insert_flag = */ FALSE, + /* flags = */ H5C__SET_FLUSH_MARKER_FLAG, /* expected_loaded = */ TRUE, /* expected_cleared = */ FALSE, /* expected_flushed = */ FALSE, - /* expected_destroyed = */ FALSE + /* expected_destroyed = */ FALSE }, { - /* entry_num = */ 5, - /* entry_type = */ MONSTER_ENTRY_TYPE, - /* entry_index = */ 20, - /* insert_flag = */ FALSE, - /* flags = */ H5C__DIRTIED_FLAG | H5C__SET_FLUSH_MARKER_FLAG, + /* entry_num = */ 5, + /* entry_type = */ MONSTER_ENTRY_TYPE, + /* entry_index = */ 20, + /* insert_flag = */ FALSE, + /* flags = */ H5C__DIRTIED_FLAG | H5C__SET_FLUSH_MARKER_FLAG, /* expected_loaded = */ TRUE, /* expected_cleared = */ FALSE, /* expected_flushed = */ TRUE, - /* expected_destroyed = */ FALSE + /* expected_destroyed = */ FALSE }, { - /* entry_num = */ 6, - /* entry_type = */ MONSTER_ENTRY_TYPE, - /* entry_index = */ 30, - /* insert_flag = */ TRUE, - /* flags = */ H5C__SET_FLUSH_MARKER_FLAG, + /* entry_num = */ 6, + /* entry_type = */ MONSTER_ENTRY_TYPE, + /* entry_index = */ 30, + /* insert_flag = */ TRUE, + /* flags = */ H5C__SET_FLUSH_MARKER_FLAG, /* expected_loaded = */ FALSE, /* expected_cleared = */ FALSE, /* expected_flushed = */ TRUE, - /* expected_destroyed = */ FALSE + /* expected_destroyed = */ FALSE }, { - /* entry_num = */ 7, - /* entry_type = */ MONSTER_ENTRY_TYPE, - /* entry_index = */ 40, - /* insert_flag = */ TRUE, + /* entry_num = */ 7, + /* entry_type = */ MONSTER_ENTRY_TYPE, + /* entry_index = */ 40, + /* insert_flag = */ TRUE, /* flags = */ H5C__DIRTIED_FLAG | H5C__SET_FLUSH_MARKER_FLAG, /* expected_loaded = */ FALSE, /* expected_cleared = */ FALSE, /* expected_flushed = */ TRUE, - /* expected_destroyed = */ FALSE + /* expected_destroyed = */ FALSE } }; @@ -4922,14 +4919,14 @@ check_flush_cache__multi_entry_test(H5F_t * file_ptr, if ( spec[i].insert_flag ) { insert_entry(file_ptr, spec[i].entry_type, spec[i].entry_index, - spec[i].flags); + spec[i].flags); } else { protect_entry(file_ptr, spec[i].entry_type, spec[i].entry_index); unprotect_entry(file_ptr, spec[i].entry_type, spec[i].entry_index, - spec[i].flags); + spec[i].flags); } total_entry_size += entry_sizes[spec[i].entry_type]; @@ -5150,14 +5147,14 @@ check_flush_cache__pe_multi_entry_test(H5F_t * file_ptr, if ( spec[i].insert_flag ) { insert_entry(file_ptr, spec[i].entry_type, spec[i].entry_index, - spec[i].flags); + spec[i].flags); } else { protect_entry(file_ptr, spec[i].entry_type, spec[i].entry_index); unprotect_entry(file_ptr, spec[i].entry_type, spec[i].entry_index, - spec[i].flags); + spec[i].flags); } total_entry_size += entry_sizes[spec[i].entry_type]; @@ -9635,12 +9632,12 @@ static void check_flush_cache__flush_op_eviction_test(H5F_t * file_ptr) { /* const char * fcn_name = "check_flush_cache__flush_op_eviction_test"; */ + H5C_t * cache_ptr = file_ptr->shared->cache; int i; int num_variable_entries = 8; int num_monster_entries = 31; int num_large_entries = 0; herr_t result; - H5C_t * cache_ptr = file_ptr->shared->cache; test_entry_t * entry_ptr; test_entry_t * base_addr; struct expected_entry_status expected[8 + 31 + 14] = @@ -9887,13 +9884,13 @@ check_flush_cache__flush_op_eviction_test(H5F_t * file_ptr) 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); + unprotect_entry(file_ptr, MONSTER_ENTRY_TYPE, i, H5C__DIRTIED_FLAG); } 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); + unprotect_entry(file_ptr, LARGE_ENTRY_TYPE, i, H5C__DIRTIED_FLAG); } /* The cache should now be exactly full */ @@ -9972,7 +9969,6 @@ check_flush_cache__flush_op_eviction_test(H5F_t * file_ptr) (3 * VARIABLE_ENTRY_SIZE) + (31 * MONSTER_ENTRY_SIZE) + (2 * LARGE_ENTRY_SIZE)) ) ) { - pass = FALSE; failure_mssg = "unexpected size/len in flush op eviction test 3."; } @@ -10136,13 +10132,13 @@ check_flush_cache__flush_op_eviction_test(H5F_t * file_ptr) 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); + unprotect_entry(file_ptr, MONSTER_ENTRY_TYPE, i, H5C__DIRTIED_FLAG); } 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); + unprotect_entry(file_ptr, LARGE_ENTRY_TYPE, i, H5C__DIRTIED_FLAG); } /* verify cache size */ @@ -10201,7 +10197,7 @@ check_flush_cache__flush_op_eviction_test(H5F_t * file_ptr) 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); + unprotect_entry(file_ptr, LARGE_ENTRY_TYPE, i, H5C__DIRTIED_FLAG); } /* verify cache size */ @@ -10262,7 +10258,7 @@ check_flush_cache__flush_op_eviction_test(H5F_t * file_ptr) 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); + unprotect_entry(file_ptr, LARGE_ENTRY_TYPE, i, H5C__DIRTIED_FLAG); } /* verify cache size */ @@ -10327,7 +10323,7 @@ check_flush_cache__flush_op_eviction_test(H5F_t * file_ptr) 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); + unprotect_entry(file_ptr, LARGE_ENTRY_TYPE, i, H5C__DIRTIED_FLAG); } /* verify cache size */ @@ -10362,13 +10358,13 @@ check_flush_cache__flush_op_eviction_test(H5F_t * file_ptr) 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); + unprotect_entry(file_ptr, MONSTER_ENTRY_TYPE, i, H5C__DIRTIED_FLAG); } 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); + unprotect_entry(file_ptr, LARGE_ENTRY_TYPE, i, H5C__DIRTIED_FLAG); } /* verify cache size */ @@ -10457,8 +10453,8 @@ check_flush_cache__flush_op_eviction_test(H5F_t * file_ptr) num_large_entries = 12; - /* 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. + /* 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; i < num_variable_entries + num_monster_entries + num_large_entries - 1; @@ -10471,7 +10467,7 @@ check_flush_cache__flush_op_eviction_test(H5F_t * file_ptr) 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); + unprotect_entry(file_ptr, LARGE_ENTRY_TYPE, i, H5C__DIRTIED_FLAG); } /* verify cache size */ @@ -10503,13 +10499,13 @@ check_flush_cache__flush_op_eviction_test(H5F_t * file_ptr) 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); + unprotect_entry(file_ptr, MONSTER_ENTRY_TYPE, i, H5C__DIRTIED_FLAG); } 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); + unprotect_entry(file_ptr, LARGE_ENTRY_TYPE, i, H5C__DIRTIED_FLAG); } /* update the expected array to mark all these entries dirty again. */ @@ -10581,8 +10577,8 @@ check_flush_cache__flush_op_eviction_test(H5F_t * file_ptr) num_large_entries = 14; - /* 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. + /* 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; i < num_variable_entries + num_monster_entries + num_large_entries - 1; @@ -10595,7 +10591,7 @@ check_flush_cache__flush_op_eviction_test(H5F_t * file_ptr) 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); + unprotect_entry(file_ptr, LARGE_ENTRY_TYPE, i, H5C__DIRTIED_FLAG); } /* verify cache size */ @@ -10617,7 +10613,8 @@ check_flush_cache__flush_op_eviction_test(H5F_t * file_ptr) expected); } - /* at this point we have cycled all the variable size entries through the cache. + /* at this point we have cycled all the variable size entries through + * the cache. * * flush the cache and end the test. */ @@ -12631,7 +12628,7 @@ check_flush_cache__pinned_single_entry_test(H5F_t * file_ptr, ( entry_ptr->cleared != expected_cleared ) || ( entry_ptr->flushed != expected_flushed ) || ( entry_ptr->destroyed != expected_destroyed ) ) { - +#if 0 /* this is useful debugging code -- keep it around */ HDfprintf(stdout, "loaded = %d(%d), clrd = %d(%d), flshd = %d(%d), dest = %d(%d)\n", (int)(entry_ptr->loaded), @@ -12642,7 +12639,7 @@ check_flush_cache__pinned_single_entry_test(H5F_t * file_ptr, (int)expected_flushed, (int)(entry_ptr->destroyed), (int)expected_destroyed); - +#endif pass = FALSE; HDsnprintf(msg, (size_t)128, "Unexpected entry status after flush in pinned single entry test #%d.", @@ -14015,10 +14012,6 @@ check_pin_protected_entry(void) * Programmer: John Mainzer * 7/7/06 * - * Modifications: - * - * None. - * *------------------------------------------------------------------------- */ @@ -16392,13 +16385,6 @@ check_pin_entry_errs(void) * Programmer: John Mainzer * 6/24/04 * - * Modifications: - * - * - Modified call to H5C_protect() to pass H5C__NO_FLAGS_SET in the - * the new flags parameter. - * - * JRM -- 3/28/07 - * *------------------------------------------------------------------------- */ @@ -16477,16 +16463,6 @@ check_double_protect_err(void) * Programmer: John Mainzer * 6/24/04 * - * Modifications: - * - * JRM -- 6/17/05 - * Modified function to use the new dirtied parameter in - * H5C_unprotect(). - * - * JRM -- 9/8/05 - * Updated function for the new size change parameter in - * H5C_unprotect(). We don't use them for now. - * *------------------------------------------------------------------------- */ @@ -16870,10 +16846,6 @@ check_resize_entry_errs(void) * Programmer: John Mainzer * 4/3/07 * - * Modifications: - * - * None. - * *------------------------------------------------------------------------- */ @@ -17226,9 +17198,9 @@ check_check_evictions_enabled_err(void) * * Modifications: * - * John Mainzer 1/8/08 - * Added a basic set of tests for the flash cache size - * increment code. + * John Mainzer 1/8/08 + * Added a basic set of tests for the flash cache size + * increment code. * *------------------------------------------------------------------------- */ @@ -20688,19 +20660,19 @@ check_auto_cache_resize(void) protect_entry(file_ptr, VARIABLE_ENTRY_TYPE, 10); resize_entry(file_ptr, VARIABLE_ENTRY_TYPE, 10, 1024, TRUE); - unprotect_entry(file_ptr, VARIABLE_ENTRY_TYPE, 10, H5C__DIRTIED_FLAG); + unprotect_entry(file_ptr, VARIABLE_ENTRY_TYPE, 10, H5C__DIRTIED_FLAG); protect_entry(file_ptr, VARIABLE_ENTRY_TYPE, 11); resize_entry(file_ptr, VARIABLE_ENTRY_TYPE, 11, 1024, TRUE); - unprotect_entry(file_ptr, VARIABLE_ENTRY_TYPE, 11, H5C__DIRTIED_FLAG); + unprotect_entry(file_ptr, VARIABLE_ENTRY_TYPE, 11, H5C__DIRTIED_FLAG); protect_entry(file_ptr, VARIABLE_ENTRY_TYPE, 12); resize_entry(file_ptr, VARIABLE_ENTRY_TYPE, 12, 1024, TRUE); - unprotect_entry(file_ptr, VARIABLE_ENTRY_TYPE, 12, H5C__DIRTIED_FLAG); + unprotect_entry(file_ptr, VARIABLE_ENTRY_TYPE, 12, H5C__DIRTIED_FLAG); protect_entry(file_ptr, VARIABLE_ENTRY_TYPE, 13); resize_entry(file_ptr, VARIABLE_ENTRY_TYPE, 13, 1024, TRUE); - unprotect_entry(file_ptr, VARIABLE_ENTRY_TYPE, 13, H5C__DIRTIED_FLAG); + unprotect_entry(file_ptr, VARIABLE_ENTRY_TYPE, 13, H5C__DIRTIED_FLAG); flush_cache(file_ptr, TRUE, FALSE, FALSE); @@ -20766,8 +20738,8 @@ check_auto_cache_resize(void) 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); + resize_entry(file_ptr, VARIABLE_ENTRY_TYPE, 10, (3 * 1024), TRUE); + unprotect_entry(file_ptr, VARIABLE_ENTRY_TYPE, 10, H5C__DIRTIED_FLAG); if ( ( pass ) && @@ -20791,8 +20763,8 @@ check_auto_cache_resize(void) 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); + resize_entry(file_ptr, VARIABLE_ENTRY_TYPE, 10, (10 * 1024), TRUE); + unprotect_entry(file_ptr, VARIABLE_ENTRY_TYPE, 10, H5C__DIRTIED_FLAG); if ( ( pass ) && @@ -20815,8 +20787,8 @@ check_auto_cache_resize(void) 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); + resize_entry(file_ptr, VARIABLE_ENTRY_TYPE, 11, (10 * 1024), TRUE); + unprotect_entry(file_ptr, VARIABLE_ENTRY_TYPE, 11, H5C__DIRTIED_FLAG); if ( ( pass ) && @@ -20839,8 +20811,8 @@ check_auto_cache_resize(void) 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); + resize_entry(file_ptr, VARIABLE_ENTRY_TYPE, 12, (10 * 1024), TRUE); + unprotect_entry(file_ptr, VARIABLE_ENTRY_TYPE, 12, H5C__DIRTIED_FLAG); if ( ( pass ) && @@ -20864,16 +20836,16 @@ check_auto_cache_resize(void) if ( pass ) { protect_entry(file_ptr, VARIABLE_ENTRY_TYPE, 10); - resize_entry(file_ptr, VARIABLE_ENTRY_TYPE, 10, 1 * 1024, TRUE); - unprotect_entry(file_ptr, VARIABLE_ENTRY_TYPE, 10, H5C__DIRTIED_FLAG); + resize_entry(file_ptr, VARIABLE_ENTRY_TYPE, 10, (1 * 1024), TRUE); + unprotect_entry(file_ptr, VARIABLE_ENTRY_TYPE, 10, H5C__DIRTIED_FLAG); protect_entry(file_ptr, VARIABLE_ENTRY_TYPE, 11); - resize_entry(file_ptr, VARIABLE_ENTRY_TYPE, 11, 1 * 1024, TRUE); - unprotect_entry(file_ptr, VARIABLE_ENTRY_TYPE, 11, H5C__DIRTIED_FLAG); + resize_entry(file_ptr, VARIABLE_ENTRY_TYPE, 11, (1 * 1024), TRUE); + unprotect_entry(file_ptr, VARIABLE_ENTRY_TYPE, 11, H5C__DIRTIED_FLAG); protect_entry(file_ptr, VARIABLE_ENTRY_TYPE, 12); - resize_entry(file_ptr, VARIABLE_ENTRY_TYPE, 12, 1 * 1024, TRUE); - unprotect_entry(file_ptr, VARIABLE_ENTRY_TYPE, 12, H5C__DIRTIED_FLAG); + resize_entry(file_ptr, VARIABLE_ENTRY_TYPE, 12, (1 * 1024), TRUE); + unprotect_entry(file_ptr, VARIABLE_ENTRY_TYPE, 12, H5C__DIRTIED_FLAG); if ( pass ) { @@ -21016,16 +20988,16 @@ check_auto_cache_resize(void) if ( pass ) { protect_entry(file_ptr, VARIABLE_ENTRY_TYPE, 10); - resize_entry(file_ptr, VARIABLE_ENTRY_TYPE, 10, 1 * 1024, TRUE); - unprotect_entry(file_ptr, VARIABLE_ENTRY_TYPE, 10, H5C__DIRTIED_FLAG); + resize_entry(file_ptr, VARIABLE_ENTRY_TYPE, 10, (1 * 1024), TRUE); + unprotect_entry(file_ptr, VARIABLE_ENTRY_TYPE, 10, H5C__DIRTIED_FLAG); protect_entry(file_ptr, VARIABLE_ENTRY_TYPE, 11); - resize_entry(file_ptr, VARIABLE_ENTRY_TYPE, 11, 1 * 1024, TRUE); - unprotect_entry(file_ptr, VARIABLE_ENTRY_TYPE, 11, H5C__DIRTIED_FLAG); + resize_entry(file_ptr, VARIABLE_ENTRY_TYPE, 11, (1 * 1024), TRUE); + unprotect_entry(file_ptr, VARIABLE_ENTRY_TYPE, 11, H5C__DIRTIED_FLAG); protect_entry(file_ptr, VARIABLE_ENTRY_TYPE, 12); - resize_entry(file_ptr, VARIABLE_ENTRY_TYPE, 12, 1 * 1024, TRUE); - unprotect_entry(file_ptr, VARIABLE_ENTRY_TYPE, 12, H5C__DIRTIED_FLAG); + resize_entry(file_ptr, VARIABLE_ENTRY_TYPE, 12, (1 * 1024), TRUE); + unprotect_entry(file_ptr, VARIABLE_ENTRY_TYPE, 12, H5C__DIRTIED_FLAG); if ( pass ) { @@ -21446,9 +21418,9 @@ check_auto_cache_resize(void) * * Modifications: * - * Added code to include the flash cache size increment - * code in this test. - * JRM -- 1/10/08 + * Added code to include the flash cache size increment + * code in this test. + * JRM -- 1/10/08 * *------------------------------------------------------------------------- */ @@ -24874,26 +24846,26 @@ check_auto_cache_resize_epoch_markers(void) ( (a).set_initial_size == (b).set_initial_size ) ) && \ ( ( ! compare_init ) || \ ( (a).initial_size == (b).initial_size ) ) && \ - ( (a).min_clean_fraction == (b).min_clean_fraction ) && \ + ( DBL_REL_EQUAL((a).min_clean_fraction, (b).min_clean_fraction, 0.00001 ) ) && \ ( (a).max_size == (b).max_size ) && \ ( (a).min_size == (b).min_size ) && \ ( (a).epoch_length == (b).epoch_length ) && \ ( (a).incr_mode == (b).incr_mode ) && \ - ( (a).lower_hr_threshold == (b).lower_hr_threshold ) && \ - ( (a).increment == (b).increment ) && \ + ( DBL_REL_EQUAL((a).lower_hr_threshold, (b).lower_hr_threshold, 0.00001 ) ) && \ + ( DBL_REL_EQUAL((a).increment, (b).increment, 0.00001 ) ) && \ ( (a).apply_max_increment == (b).apply_max_increment ) && \ ( (a).max_increment == (b).max_increment ) && \ ( (a).flash_incr_mode == (b).flash_incr_mode ) && \ - ( (a).flash_multiple == (b).flash_multiple ) && \ - ( (a).flash_threshold == (b).flash_threshold ) && \ + ( DBL_REL_EQUAL((a).flash_multiple, (b).flash_multiple, 0.00001 ) ) && \ + ( DBL_REL_EQUAL((a).flash_threshold, (b).flash_threshold, 0.00001 ) ) && \ ( (a).decr_mode == (b).decr_mode ) && \ - ( (a).upper_hr_threshold == (b).upper_hr_threshold ) && \ - ( (a).decrement == (b).decrement ) && \ + ( DBL_REL_EQUAL((a).upper_hr_threshold, (b).upper_hr_threshold, 0.00001 ) ) && \ + ( DBL_REL_EQUAL((a).decrement, (b).decrement, 0.00001 ) ) && \ ( (a).apply_max_decrement == (b).apply_max_decrement ) && \ ( (a).max_decrement == (b).max_decrement ) && \ ( (a).epochs_before_eviction == (b).epochs_before_eviction ) && \ ( (a).apply_empty_reserve == (b).apply_empty_reserve ) && \ - ( (a).empty_reserve == (b).empty_reserve ) ) + ( DBL_REL_EQUAL((a).empty_reserve, (b).empty_reserve, 0.00001 ) ) ) static void check_auto_cache_resize_input_errs(void) @@ -27504,7 +27476,7 @@ check_auto_cache_resize_aux_fcns(void) pass = FALSE; failure_mssg = "H5C_get_cache_hit_rate failed.\n"; - } else if ( hit_rate != 0.5 ) { + } else if ( ! DBL_REL_EQUAL(hit_rate, 0.5, 0.00001) ) { pass = FALSE; failure_mssg = @@ -27587,7 +27559,7 @@ check_auto_cache_resize_aux_fcns(void) pass = FALSE; failure_mssg = "H5C_get_cache_hit_rate failed.\n"; - } else if ( hit_rate != 0.5 ) { + } else if ( ! DBL_REL_EQUAL(hit_rate, 0.5, 0.00001) ) { pass = FALSE; failure_mssg = |