diff options
author | Quincey Koziol <koziol@hdfgroup.org> | 2010-05-27 22:57:29 (GMT) |
---|---|---|
committer | Quincey Koziol <koziol@hdfgroup.org> | 2010-05-27 22:57:29 (GMT) |
commit | e4246519c9d59a5f837f2b1009471533b729b778 (patch) | |
tree | 0ed23bfb58157edccfa11487a6c9f293b9e97670 /test/cache.c | |
parent | fc3de1ec794584b1bdc6e615d8d2afc15f5bb5ec (diff) | |
download | hdf5-e4246519c9d59a5f837f2b1009471533b729b778.zip hdf5-e4246519c9d59a5f837f2b1009471533b729b778.tar.gz hdf5-e4246519c9d59a5f837f2b1009471533b729b778.tar.bz2 |
[svn-r18920] Description:
Bring r18917 from trunk to 1.8 branch:
Bring r18911 (plus some adaptions to match the code on the trunk)
from the metadata journaling "merging" branch to the trunk:
More general changes to align trunk with eventual changes from
metadata journaling branch.
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
Diffstat (limited to 'test/cache.c')
-rw-r--r-- | test/cache.c | 246 |
1 files changed, 109 insertions, 137 deletions
diff --git a/test/cache.c b/test/cache.c index 8bf191d..58764cc 100644 --- a/test/cache.c +++ b/test/cache.c @@ -25,6 +25,7 @@ #include "H5ACprivate.h" #include "cache_common.h" + /* private typedef declarations: */ struct flush_cache_test_spec @@ -101,7 +102,7 @@ struct move_entry_test_spec hbool_t is_pinned; }; - + /* private function declarations: */ static unsigned smoke_check_1(void); @@ -271,7 +272,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, @@ -289,7 +290,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, @@ -307,7 +308,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, @@ -2732,7 +2733,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; @@ -2879,7 +2879,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. @@ -2909,7 +2908,6 @@ check_insert_entry(void) } } - /* Finally, if stats collection is enabled, verify that the expected * stats are collected. */ @@ -2936,7 +2934,6 @@ check_insert_entry(void) } #endif /* H5C_COLLECT_CACHE_STATS */ - /* Unpin the pinned entries so we can take down the cache cleanly. */ if ( pass ) { @@ -3221,92 +3218,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 } }; @@ -4932,14 +4929,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]; @@ -5160,14 +5157,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]; @@ -9760,12 +9757,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] = @@ -10016,13 +10013,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 */ @@ -10101,7 +10098,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."; } @@ -10265,13 +10261,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 */ @@ -10330,7 +10326,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 */ @@ -10391,7 +10387,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 */ @@ -10456,7 +10452,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 */ @@ -10491,13 +10487,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 */ @@ -10586,8 +10582,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; @@ -10600,7 +10596,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 */ @@ -10632,13 +10628,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. */ @@ -10710,8 +10706,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; @@ -10724,7 +10720,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 */ @@ -10746,7 +10742,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. */ @@ -13278,7 +13275,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), @@ -13289,7 +13286,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.", @@ -14708,10 +14705,6 @@ check_pin_protected_entry(void) * Programmer: John Mainzer * 7/7/06 * - * Modifications: - * - * None. - * *------------------------------------------------------------------------- */ @@ -17174,13 +17167,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 - * *------------------------------------------------------------------------- */ @@ -17259,16 +17245,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. - * *------------------------------------------------------------------------- */ @@ -17652,10 +17628,6 @@ check_resize_entry_errs(void) * Programmer: John Mainzer * 4/3/07 * - * Modifications: - * - * None. - * *------------------------------------------------------------------------- */ @@ -18008,9 +17980,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. * *------------------------------------------------------------------------- */ @@ -21471,19 +21443,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); @@ -21549,8 +21521,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 ) && @@ -21574,8 +21546,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 ) && @@ -21598,8 +21570,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 ) && @@ -21622,8 +21594,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 ) && @@ -21647,16 +21619,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 ) { @@ -21799,16 +21771,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 ) { @@ -22229,9 +22201,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 * *------------------------------------------------------------------------- */ @@ -28309,7 +28281,7 @@ check_auto_cache_resize_aux_fcns(void) pass = FALSE; failure_mssg = "H5C_get_cache_hit_rate failed.\n"; - } else if ( HDfabs(hit_rate - 0.5) > FP_EPSILON ) { /* i.e. hit_rate != 0.5 */ + } else if ( ! DBL_REL_EQUAL(hit_rate, 0.5, FP_EPSILON) ) { /* i.e. hit_rate != 0.5 */ pass = FALSE; failure_mssg = @@ -28392,7 +28364,7 @@ check_auto_cache_resize_aux_fcns(void) pass = FALSE; failure_mssg = "H5C_get_cache_hit_rate failed.\n"; - } else if ( HDfabs(hit_rate - 0.5) > FP_EPSILON ) { /* i.e. hit_rate != 0.5 */ + } else if ( ! DBL_REL_EQUAL(hit_rate, 0.5, FP_EPSILON) ) { /* i.e. hit_rate != 0.5 */ pass = FALSE; failure_mssg = |