diff options
author | Quincey Koziol <koziol@hdfgroup.org> | 2012-06-20 15:27:37 (GMT) |
---|---|---|
committer | Quincey Koziol <koziol@hdfgroup.org> | 2012-06-20 15:27:37 (GMT) |
commit | 243942105f21773689d449606e1763740ef6cd61 (patch) | |
tree | d5e8f445aeddf795b3ba8b6aecabc68938b18ec7 /test/cache.c | |
parent | b4c2be19afc2095b73a3c3f1fc37932cc08335db (diff) | |
download | hdf5-243942105f21773689d449606e1763740ef6cd61.zip hdf5-243942105f21773689d449606e1763740ef6cd61.tar.gz hdf5-243942105f21773689d449606e1763740ef6cd61.tar.bz2 |
[svn-r22480] Description:inactive/metadata_journaling
Bring changes from "trunk merging" branch back to this feature
branch, to make further work on the branch easier.
Tested on:
N/A - this branch is not compilable currently.
Diffstat (limited to 'test/cache.c')
-rw-r--r-- | test/cache.c | 689 |
1 files changed, 421 insertions, 268 deletions
diff --git a/test/cache.c b/test/cache.c index b56888b..63d1437 100644 --- a/test/cache.c +++ b/test/cache.c @@ -103,17 +103,17 @@ struct move_entry_test_spec /* private function declarations: */ -static unsigned smoke_check_1(void); -static unsigned smoke_check_2(void); -static unsigned smoke_check_3(void); -static unsigned smoke_check_4(void); -static unsigned smoke_check_5(void); -static unsigned smoke_check_6(void); -static unsigned smoke_check_7(void); -static unsigned smoke_check_8(void); -static unsigned smoke_check_9(void); -static unsigned smoke_check_10(void); -static unsigned write_permitted_check(void); +static unsigned smoke_check_1(int express_test); +static unsigned smoke_check_2(int express_test); +static unsigned smoke_check_3(int express_test); +static unsigned smoke_check_4(int express_test); +static unsigned smoke_check_5(int express_test); +static unsigned smoke_check_6(int express_test); +static unsigned smoke_check_7(int express_test); +static unsigned smoke_check_8(int express_test); +static unsigned smoke_check_9(int express_test); +static unsigned smoke_check_10(int express_test); +static unsigned write_permitted_check(int express_test); static unsigned check_insert_entry(void); static unsigned check_flush_cache(void); static void check_flush_cache__empty_cache(H5F_t * file_ptr); @@ -225,7 +225,7 @@ static unsigned check_auto_cache_resize_aux_fcns(void); */ static unsigned -smoke_check_1(void) +smoke_check_1(int express_test) { const char * fcn_name = "smoke_check_1"; hbool_t show_progress = FALSE; @@ -412,7 +412,7 @@ smoke_check_1(void) fcn_name); } - return !pass; + return (unsigned)!pass; } /* smoke_check_1() */ @@ -440,7 +440,7 @@ smoke_check_1(void) */ static unsigned -smoke_check_2(void) +smoke_check_2(int express_test) { const char * fcn_name = "smoke_check_2"; hbool_t show_progress = FALSE; @@ -627,7 +627,7 @@ smoke_check_2(void) fcn_name); } - return !pass; + return (unsigned)!pass; } /* smoke_check_2() */ @@ -654,7 +654,7 @@ smoke_check_2(void) */ static unsigned -smoke_check_3(void) +smoke_check_3(int express_test) { const char * fcn_name = "smoke_check_3"; hbool_t show_progress = FALSE; @@ -841,7 +841,7 @@ smoke_check_3(void) fcn_name); } - return !pass; + return (unsigned)!pass; } /* smoke_check_3() */ @@ -869,7 +869,7 @@ smoke_check_3(void) */ static unsigned -smoke_check_4(void) +smoke_check_4(int express_test) { const char * fcn_name = "smoke_check_4"; hbool_t show_progress = FALSE; @@ -1056,7 +1056,7 @@ smoke_check_4(void) fcn_name); } - return !pass; + return (unsigned)!pass; } /* smoke_check_4() */ @@ -1084,7 +1084,7 @@ smoke_check_4(void) */ static unsigned -smoke_check_5(void) +smoke_check_5(int express_test) { const char * fcn_name = "smoke_check_5"; herr_t result; @@ -1308,7 +1308,7 @@ smoke_check_5(void) fcn_name); } - return !pass; + return (unsigned)!pass; } /* smoke_check_5() */ @@ -1336,7 +1336,7 @@ smoke_check_5(void) */ static unsigned -smoke_check_6(void) +smoke_check_6(int express_test) { const char * fcn_name = "smoke_check_6"; herr_t result; @@ -1560,7 +1560,7 @@ smoke_check_6(void) fcn_name); } - return !pass; + return (unsigned)!pass; } /* smoke_check_6() */ @@ -1588,7 +1588,7 @@ smoke_check_6(void) */ static unsigned -smoke_check_7(void) +smoke_check_7(int express_test) { const char * fcn_name = "smoke_check_7"; herr_t result; @@ -1813,7 +1813,7 @@ smoke_check_7(void) fcn_name); } - return !pass; + return (unsigned)!pass; } /* smoke_check_7() */ @@ -1841,7 +1841,7 @@ smoke_check_7(void) */ static unsigned -smoke_check_8(void) +smoke_check_8(int express_test) { const char * fcn_name = "smoke_check_8"; herr_t result; @@ -1939,8 +1939,7 @@ smoke_check_8(void) HDfprintf(stdout, "%s() - %0d -- pass = %d\n", fcn_name, mile_stone++, (int)pass); - 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 ) { @@ -2066,7 +2065,7 @@ smoke_check_8(void) fcn_name); } - return !pass; + return (unsigned)!pass; } /* smoke_check_8() */ @@ -2095,7 +2094,7 @@ smoke_check_8(void) */ static unsigned -smoke_check_9(void) +smoke_check_9(int express_test) { const char * fcn_name = "smoke_check_9"; herr_t result; @@ -2396,7 +2395,7 @@ smoke_check_9(void) fcn_name); } - return !pass; + return (unsigned)!pass; } /* smoke_check_9() */ @@ -2425,7 +2424,7 @@ smoke_check_9(void) */ static unsigned -smoke_check_10(void) +smoke_check_10(int express_test) { const char * fcn_name = "smoke_check_10"; herr_t result; @@ -2721,7 +2720,7 @@ smoke_check_10(void) fcn_name); } - return !pass; + return (unsigned)!pass; } /* smoke_check_10() */ @@ -2746,7 +2745,7 @@ smoke_check_10(void) */ static unsigned -write_permitted_check(void) +write_permitted_check(int express_test) { #if H5C_MAINTAIN_CLEAN_AND_DIRTY_LRU_LISTS @@ -2943,7 +2942,7 @@ write_permitted_check(void) #endif /* H5C_MAINTAIN_CLEAN_AND_DIRTY_LRU_LISTS */ - return !pass; + return (unsigned)!pass; } /* write_permitted_check() */ @@ -3250,7 +3249,7 @@ check_insert_entry(void) fcn_name); } - return !pass; + return (unsigned)!pass; } /* check_insert_entry() */ @@ -3344,7 +3343,7 @@ check_flush_cache(void) fcn_name); } - return !pass; + return (unsigned)!pass; } /* check_flush_cache() */ @@ -12853,8 +12852,8 @@ check_get_entry_status(void) hbool_t is_pinned; size_t entry_size; H5F_t * file_ptr = NULL; - test_entry_t * base_addr; - test_entry_t * entry_ptr; + test_entry_t * base_addr = NULL; + test_entry_t * entry_ptr = NULL; TESTING("H5C_get_entry_status() functionality"); @@ -12869,8 +12868,18 @@ check_get_entry_status(void) file_ptr = setup_cache((size_t)(2 * 1024 * 1024), (size_t)(1 * 1024 * 1024)); - base_addr = entries[0]; - entry_ptr = &(base_addr[0]); + if ( file_ptr == NULL ) { + + pass = FALSE; + failure_mssg = "file_ptr NULL from setup_cache."; + + } + else { + + base_addr = entries[0]; + entry_ptr = &(base_addr[0]); + + } } if ( pass ) { @@ -12897,9 +12906,13 @@ check_get_entry_status(void) } } - protect_entry(file_ptr, 0, 0); + if ( pass ) { - unprotect_entry(file_ptr, 0, 0, H5C__NO_FLAGS_SET); + protect_entry(file_ptr, 0, 0); + + unprotect_entry(file_ptr, 0, 0, H5C__NO_FLAGS_SET); + + } if ( pass ) { @@ -12921,7 +12934,11 @@ check_get_entry_status(void) } } - protect_entry(file_ptr, 0, 0); + if ( pass ) { + + protect_entry(file_ptr, 0, 0); + + } if ( pass ) { @@ -12943,7 +12960,11 @@ check_get_entry_status(void) } } - unprotect_entry(file_ptr, 0, 0, H5C__PIN_ENTRY_FLAG); + if ( pass ) { + + unprotect_entry(file_ptr, 0, 0, H5C__PIN_ENTRY_FLAG); + + } if ( pass ) { @@ -12965,7 +12986,11 @@ check_get_entry_status(void) } } - mark_entry_dirty(0, 0); + if ( pass ) { + + mark_entry_dirty(0, 0); + + } if ( pass ) { @@ -12987,7 +13012,11 @@ check_get_entry_status(void) } } - unpin_entry(0, 0); + if ( pass ) { + + unpin_entry(0, 0); + + } if ( pass ) { @@ -13029,7 +13058,7 @@ check_get_entry_status(void) fcn_name); } - return !pass; + return (unsigned)!pass; } /* check_get_entry_status() */ @@ -13120,9 +13149,13 @@ check_expunge_entry(void) * it without marking it dirty. */ - protect_entry(file_ptr, 0, 0); + if ( pass ) { - unprotect_entry(file_ptr, 0, 0, H5C__NO_FLAGS_SET); + protect_entry(file_ptr, 0, 0); + + unprotect_entry(file_ptr, 0, 0, H5C__NO_FLAGS_SET); + + } if ( pass ) { @@ -13157,7 +13190,11 @@ check_expunge_entry(void) * Also verify that the entry was loaded and destroyed, but * not flushed. */ - expunge_entry(file_ptr, 0, 0); + if ( pass ) { + + expunge_entry(file_ptr, 0, 0); + + } if ( pass ) { @@ -13237,9 +13274,13 @@ check_expunge_entry(void) * it with the dirty flag set. */ - protect_entry(file_ptr, 0, 1); + if ( pass ) { + + protect_entry(file_ptr, 0, 1); + + unprotect_entry(file_ptr, 0, 1, H5C__DIRTIED_FLAG); - unprotect_entry(file_ptr, 0, 1, H5C__DIRTIED_FLAG); + } if ( pass ) { @@ -13275,7 +13316,11 @@ check_expunge_entry(void) * Also verify that the entry was loaded and destroyed, but not * flushed. */ - expunge_entry(file_ptr, 0, 1); + if ( pass ) { + + expunge_entry(file_ptr, 0, 1); + + } if ( pass ) { @@ -13331,7 +13376,7 @@ check_expunge_entry(void) fcn_name); } - return !pass; + return (unsigned)!pass; } /* check_expunge_entry() */ @@ -13761,7 +13806,7 @@ check_multiple_read_protect(void) fcn_name); } - return !pass; + return (unsigned)!pass; } /* check_multiple_read_protect() */ @@ -13883,7 +13928,7 @@ check_move_entry(void) fcn_name); } - return !pass; + return (unsigned)!pass; } /* check_move_entry() */ @@ -13961,14 +14006,18 @@ check_move_entry__run_test(H5F_t * file_ptr, } } - protect_entry(file_ptr, spec_ptr->entry_type, spec_ptr->entry_index); + if ( pass ) { + + protect_entry(file_ptr, spec_ptr->entry_type, spec_ptr->entry_index); + + if(spec_ptr->is_dirty) + flags |= H5C__DIRTIED_FLAG; - if(spec_ptr->is_dirty) - flags |= H5C__DIRTIED_FLAG; + unprotect_entry(file_ptr, spec_ptr->entry_type, spec_ptr->entry_index, flags); - unprotect_entry(file_ptr, spec_ptr->entry_type, spec_ptr->entry_index, flags); + move_entry(cache_ptr, spec_ptr->entry_type, spec_ptr->entry_index, FALSE); - move_entry(cache_ptr, spec_ptr->entry_type, spec_ptr->entry_index, FALSE); + } if ( pass ) { @@ -14083,9 +14132,20 @@ check_pin_protected_entry(void) file_ptr = setup_cache((size_t)(2 * 1024 * 1024), (size_t)(1 * 1024 * 1024)); + + if ( file_ptr == NULL ) { + + pass = FALSE; + failure_mssg = "file_ptr NULL from setup_cache."; + + } } - protect_entry(file_ptr, 0, 0); + if ( pass ) { + + protect_entry(file_ptr, 0, 0); + + } if ( pass ) { @@ -14135,7 +14195,7 @@ check_pin_protected_entry(void) fcn_name); } - return !pass; + return (unsigned)!pass; } /* check_pin_protected_entry() */ @@ -14214,11 +14274,20 @@ check_resize_entry(void) file_ptr = setup_cache((size_t)(2 * 1024 * 1024), (size_t)(1 * 1024 * 1024)); - cache_ptr = file_ptr->shared->cache; + if ( file_ptr == NULL ) { - base_addr = entries[LARGE_ENTRY_TYPE]; - entry_ptr = &(base_addr[0]); - entry_size = LARGE_ENTRY_SIZE; + pass = FALSE; + failure_mssg = "file_ptr NULL from setup_cache."; + + } + else + { + cache_ptr = file_ptr->shared->cache; + + base_addr = entries[LARGE_ENTRY_TYPE]; + entry_ptr = &(base_addr[0]); + entry_size = LARGE_ENTRY_SIZE; + } } if ( pass ) { @@ -14235,7 +14304,11 @@ check_resize_entry(void) } } - protect_entry(file_ptr, LARGE_ENTRY_TYPE, 0); + if ( pass ) { + + protect_entry(file_ptr, LARGE_ENTRY_TYPE, 0); + + } if ( pass ) { @@ -14361,7 +14434,11 @@ check_resize_entry(void) } } - protect_entry(file_ptr, LARGE_ENTRY_TYPE, 0); + if ( pass ) { + + protect_entry(file_ptr, LARGE_ENTRY_TYPE, 0); + + } if ( pass ) { @@ -14442,9 +14519,13 @@ check_resize_entry(void) } } - protect_entry(file_ptr, LARGE_ENTRY_TYPE, 0); + if ( pass ) { + + protect_entry(file_ptr, LARGE_ENTRY_TYPE, 0); - unprotect_entry(file_ptr, LARGE_ENTRY_TYPE, 0, H5C__PIN_ENTRY_FLAG); + unprotect_entry(file_ptr, LARGE_ENTRY_TYPE, 0, H5C__PIN_ENTRY_FLAG); + + } if ( pass ) { @@ -14564,10 +14645,14 @@ check_resize_entry(void) } } - protect_entry(file_ptr, LARGE_ENTRY_TYPE, 0); + if ( pass ) { - unprotect_entry(file_ptr, LARGE_ENTRY_TYPE, 0, - H5C__UNPIN_ENTRY_FLAG | H5C__DELETED_FLAG); + protect_entry(file_ptr, LARGE_ENTRY_TYPE, 0); + + unprotect_entry(file_ptr, LARGE_ENTRY_TYPE, 0, + H5C__UNPIN_ENTRY_FLAG | H5C__DELETED_FLAG); + + } if ( pass ) { @@ -14614,7 +14699,7 @@ check_resize_entry(void) } - /* now repreat the above tests with several entries in the cache: */ + /* now repeat the above tests with several entries in the cache: */ if ( pass ) { @@ -14633,14 +14718,18 @@ check_resize_entry(void) entry_size = LARGE_ENTRY_SIZE; } - protect_entry(file_ptr, LARGE_ENTRY_TYPE, 0); - unprotect_entry(file_ptr, LARGE_ENTRY_TYPE, 0, H5C__NO_FLAGS_SET); + if ( pass ) { - protect_entry(file_ptr, LARGE_ENTRY_TYPE, 1); - unprotect_entry(file_ptr, LARGE_ENTRY_TYPE, 1, H5C__DIRTIED_FLAG); + protect_entry(file_ptr, LARGE_ENTRY_TYPE, 0); + unprotect_entry(file_ptr, LARGE_ENTRY_TYPE, 0, H5C__NO_FLAGS_SET); - protect_entry(file_ptr, LARGE_ENTRY_TYPE, 2); - unprotect_entry(file_ptr, LARGE_ENTRY_TYPE, 2, H5C__NO_FLAGS_SET); + protect_entry(file_ptr, LARGE_ENTRY_TYPE, 1); + unprotect_entry(file_ptr, LARGE_ENTRY_TYPE, 1, H5C__DIRTIED_FLAG); + + protect_entry(file_ptr, LARGE_ENTRY_TYPE, 2); + unprotect_entry(file_ptr, LARGE_ENTRY_TYPE, 2, H5C__NO_FLAGS_SET); + + } if ( pass ) { @@ -14657,7 +14746,11 @@ check_resize_entry(void) } } - protect_entry(file_ptr, LARGE_ENTRY_TYPE, 3); + if ( pass ) { + + protect_entry(file_ptr, LARGE_ENTRY_TYPE, 3); + + } if ( pass ) { @@ -14785,7 +14878,11 @@ check_resize_entry(void) } } - protect_entry(file_ptr, LARGE_ENTRY_TYPE, 3); + if ( pass ) { + + protect_entry(file_ptr, LARGE_ENTRY_TYPE, 3); + + } if ( pass ) { @@ -14866,9 +14963,13 @@ check_resize_entry(void) } } - protect_entry(file_ptr, LARGE_ENTRY_TYPE, 3); + if ( pass ) { - unprotect_entry(file_ptr, LARGE_ENTRY_TYPE, 3, H5C__PIN_ENTRY_FLAG); + protect_entry(file_ptr, LARGE_ENTRY_TYPE, 3); + + unprotect_entry(file_ptr, LARGE_ENTRY_TYPE, 3, H5C__PIN_ENTRY_FLAG); + + } if ( pass ) { @@ -14990,10 +15091,14 @@ check_resize_entry(void) } } - protect_entry(file_ptr, LARGE_ENTRY_TYPE, 3); + if ( pass ) { + + protect_entry(file_ptr, LARGE_ENTRY_TYPE, 3); - unprotect_entry(file_ptr, LARGE_ENTRY_TYPE, 3, - H5C__UNPIN_ENTRY_FLAG | H5C__DELETED_FLAG); + unprotect_entry(file_ptr, LARGE_ENTRY_TYPE, 3, + H5C__UNPIN_ENTRY_FLAG | H5C__DELETED_FLAG); + + } if ( pass ) { @@ -15039,15 +15144,18 @@ check_resize_entry(void) } } - protect_entry(file_ptr, LARGE_ENTRY_TYPE, 2); - unprotect_entry(file_ptr, LARGE_ENTRY_TYPE, 2, H5C__DELETED_FLAG); + if ( pass ) { + + protect_entry(file_ptr, LARGE_ENTRY_TYPE, 2); + unprotect_entry(file_ptr, LARGE_ENTRY_TYPE, 2, H5C__DELETED_FLAG); - protect_entry(file_ptr, LARGE_ENTRY_TYPE, 1); - unprotect_entry(file_ptr, LARGE_ENTRY_TYPE, 1, H5C__DELETED_FLAG); + protect_entry(file_ptr, LARGE_ENTRY_TYPE, 1); + unprotect_entry(file_ptr, LARGE_ENTRY_TYPE, 1, H5C__DELETED_FLAG); - protect_entry(file_ptr, LARGE_ENTRY_TYPE, 0); - unprotect_entry(file_ptr, LARGE_ENTRY_TYPE, 0, H5C__DELETED_FLAG); + protect_entry(file_ptr, LARGE_ENTRY_TYPE, 0); + unprotect_entry(file_ptr, LARGE_ENTRY_TYPE, 0, H5C__DELETED_FLAG); + } if ( pass ) { @@ -15083,7 +15191,7 @@ check_resize_entry(void) fcn_name); } - return !pass; + return (unsigned)!pass; } /* check_resize_entry() */ @@ -15119,7 +15227,7 @@ check_evictions_enabled(void) size_t entry_size; H5F_t * file_ptr = NULL; H5C_t * cache_ptr = NULL; - test_entry_t * base_addr; + test_entry_t * base_addr = NULL; test_entry_t * entry_ptr; TESTING("evictions enabled/disabled functionality"); @@ -15174,10 +15282,19 @@ check_evictions_enabled(void) file_ptr = setup_cache((size_t)(1 * 1024 * 1024), (size_t)( 512 * 1024)); - cache_ptr = file_ptr->shared->cache; + if ( file_ptr == NULL ) { + + pass = FALSE; + failure_mssg = "file_ptr NULL from setup_cache."; + + } + else + { + cache_ptr = file_ptr->shared->cache; - base_addr = entries[MONSTER_ENTRY_TYPE]; - entry_size = MONSTER_ENTRY_SIZE; + base_addr = entries[MONSTER_ENTRY_TYPE]; + entry_size = MONSTER_ENTRY_SIZE; + } } if ( show_progress ) /* 2 */ @@ -15221,11 +15338,15 @@ check_evictions_enabled(void) HDfprintf(stdout, "%s() - %0d -- pass = %d\n", fcn_name, mile_stone++, (int)pass); - /* fill the cache */ - 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); + if ( pass ) { + + /* fill the cache */ + 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); + } + } if ( show_progress ) /* 5 */ @@ -15253,9 +15374,13 @@ check_evictions_enabled(void) HDfprintf(stdout, "%s() - %0d -- pass = %d\n", fcn_name, mile_stone++, (int)pass); - /* protect and unprotect another entry */ - protect_entry(file_ptr, MONSTER_ENTRY_TYPE, 16); - unprotect_entry(file_ptr, MONSTER_ENTRY_TYPE, 16, H5C__NO_FLAGS_SET); + if ( pass ) { + + /* protect and unprotect another entry */ + protect_entry(file_ptr, MONSTER_ENTRY_TYPE, 16); + unprotect_entry(file_ptr, MONSTER_ENTRY_TYPE, 16, H5C__NO_FLAGS_SET); + + } if ( show_progress ) /* 7 */ HDfprintf(stdout, "%s() - %0d -- pass = %d\n", @@ -15316,8 +15441,12 @@ check_evictions_enabled(void) HDfprintf(stdout, "%s() - %0d -- pass = %d\n", fcn_name, mile_stone++, (int)pass); - /* insert an entry */ - insert_entry(file_ptr, MONSTER_ENTRY_TYPE, 17, H5C__NO_FLAGS_SET); + if ( pass ) { + + /* insert an entry */ + insert_entry(file_ptr, MONSTER_ENTRY_TYPE, 17, H5C__NO_FLAGS_SET); + + } if ( show_progress ) /* 10 */ HDfprintf(stdout, "%s() - %0d -- pass = %d\n", @@ -15415,9 +15544,13 @@ check_evictions_enabled(void) HDfprintf(stdout, "%s() - %0d -- pass = %d\n", fcn_name, mile_stone++, (int)pass); - /* protect and unprotect another entry */ - protect_entry(file_ptr, MONSTER_ENTRY_TYPE, 18); - unprotect_entry(file_ptr, MONSTER_ENTRY_TYPE, 18, H5C__NO_FLAGS_SET); + if ( pass ) { + + /* protect and unprotect another entry */ + protect_entry(file_ptr, MONSTER_ENTRY_TYPE, 18); + unprotect_entry(file_ptr, MONSTER_ENTRY_TYPE, 18, H5C__NO_FLAGS_SET); + + } if ( show_progress ) /* 15 */ HDfprintf(stdout, "%s() - %0d -- pass = %d\n", @@ -15443,8 +15576,12 @@ check_evictions_enabled(void) HDfprintf(stdout, "%s() - %0d -- pass = %d\n", fcn_name, mile_stone++, (int)pass); - /* insert another entry */ - insert_entry(file_ptr, MONSTER_ENTRY_TYPE, 19, H5C__NO_FLAGS_SET); + if ( pass ) { + + /* insert another entry */ + insert_entry(file_ptr, MONSTER_ENTRY_TYPE, 19, H5C__NO_FLAGS_SET); + + } if ( show_progress ) /* 17 */ HDfprintf(stdout, "%s() - %0d -- pass = %d\n", @@ -15487,9 +15624,13 @@ check_evictions_enabled(void) HDfprintf(stdout, "%s() - %0d -- pass = %d\n", fcn_name, mile_stone++, (int)pass); - /* protect and unprotect an entry that is in the cache */ - protect_entry(file_ptr, MONSTER_ENTRY_TYPE, 19); - unprotect_entry(file_ptr, MONSTER_ENTRY_TYPE, 19, H5C__NO_FLAGS_SET); + if ( pass ) { + + /* protect and unprotect an entry that is in the cache */ + protect_entry(file_ptr, MONSTER_ENTRY_TYPE, 19); + unprotect_entry(file_ptr, MONSTER_ENTRY_TYPE, 19, H5C__NO_FLAGS_SET); + + } if ( show_progress ) /* 20 */ HDfprintf(stdout, "%s() - %0d -- pass = %d\n", @@ -15515,9 +15656,13 @@ check_evictions_enabled(void) HDfprintf(stdout, "%s() - %0d -- pass = %d\n", fcn_name, mile_stone++, (int)pass); - /* protect and unprotect an entry that isn't in the cache */ - protect_entry(file_ptr, MONSTER_ENTRY_TYPE, 20); - unprotect_entry(file_ptr, MONSTER_ENTRY_TYPE, 20, H5C__NO_FLAGS_SET); + if ( pass ) { + + /* protect and unprotect an entry that isn't in the cache */ + protect_entry(file_ptr, MONSTER_ENTRY_TYPE, 20); + unprotect_entry(file_ptr, MONSTER_ENTRY_TYPE, 20, H5C__NO_FLAGS_SET); + + } if ( show_progress ) /* 22 */ HDfprintf(stdout, "%s() - %0d -- pass = %d\n", @@ -15633,12 +15778,15 @@ check_evictions_enabled(void) HDfprintf(stdout, "%s() - %0d -- pass = %d\n", fcn_name, mile_stone++, (int)pass); - /* protect and unprotect an entry that isn't in the cache, forcing - * the cache to grow. - */ - protect_entry(file_ptr, MONSTER_ENTRY_TYPE, 21); - unprotect_entry(file_ptr, MONSTER_ENTRY_TYPE, 21, H5C__NO_FLAGS_SET); + if ( pass ) { + + /* protect and unprotect an entry that isn't in the cache, forcing + * the cache to grow. + */ + protect_entry(file_ptr, MONSTER_ENTRY_TYPE, 21); + unprotect_entry(file_ptr, MONSTER_ENTRY_TYPE, 21, H5C__NO_FLAGS_SET); + } if ( show_progress ) /* 27 */ HDfprintf(stdout, "%s() - %0d -- pass = %d\n", @@ -15681,8 +15829,12 @@ check_evictions_enabled(void) HDfprintf(stdout, "%s() - %0d -- pass = %d\n", fcn_name, mile_stone++, (int)pass); - /* insert an entry */ - insert_entry(file_ptr, MONSTER_ENTRY_TYPE, 22, H5C__NO_FLAGS_SET); + if ( pass ) { + + /* insert an entry */ + insert_entry(file_ptr, MONSTER_ENTRY_TYPE, 22, H5C__NO_FLAGS_SET); + + } if ( show_progress ) /* 30 */ HDfprintf(stdout, "%s() - %0d -- pass = %d\n", @@ -15784,7 +15936,7 @@ check_evictions_enabled(void) fcn_name); } - return !pass; + return (unsigned)!pass; } /* check_evictions_enabled() */ @@ -15867,7 +16019,7 @@ check_flush_protected_err(void) fcn_name); } - return !pass; + return (unsigned)!pass; } /* check_flush_protected_err() */ @@ -15968,7 +16120,7 @@ check_destroy_pinned_err(void) fcn_name); } - return !pass; + return (unsigned)!pass; } /* check_destroy_pinned_err() */ @@ -16063,7 +16215,7 @@ check_destroy_protected_err(void) fcn_name); } - return !pass; + return (unsigned)!pass; } /* check_destroy_protected_err() */ @@ -16088,7 +16240,7 @@ static unsigned check_duplicate_insert_err(void) { const char * fcn_name = "check_duplicate_insert_err"; - herr_t result; + herr_t result = -1; H5F_t * file_ptr = NULL; test_entry_t * base_addr; test_entry_t * entry_ptr; @@ -16151,7 +16303,7 @@ check_duplicate_insert_err(void) fcn_name); } - return !pass; + return (unsigned)!pass; } /* check_duplicate_insert_err() */ @@ -16255,7 +16407,7 @@ check_move_err(void) fcn_name); } - return !pass; + return (unsigned)!pass; } /* check_move_err() */ @@ -16352,7 +16504,7 @@ check_double_pin_err(void) fcn_name); } - return !pass; + return (unsigned)!pass; } /* check_double_pin_err() */ @@ -16460,7 +16612,7 @@ check_double_unpin_err(void) fcn_name); } - return !pass; + return (unsigned)!pass; } /* check_double_unpin_err() */ @@ -16580,7 +16732,7 @@ check_pin_entry_errs(void) fcn_name); } - return !pass; + return (unsigned)!pass; } /* check_pin_entry_errs() */ @@ -16632,7 +16784,7 @@ check_double_protect_err(void) if ( pass ) { - cache_entry_ptr = H5C_protect(file_ptr, H5P_DATASET_XFER_DEFAULT, + cache_entry_ptr = (H5C_cache_entry_t *)H5C_protect(file_ptr, H5P_DATASET_XFER_DEFAULT, &(types[0]), entry_ptr->addr, &entry_ptr->addr, H5C__NO_FLAGS_SET); @@ -16668,7 +16820,7 @@ check_double_protect_err(void) fcn_name); } - return !pass; + return (unsigned)!pass; } /* check_double_protect_err() */ @@ -16754,7 +16906,7 @@ check_double_unprotect_err(void) fcn_name); } - return !pass; + return (unsigned)!pass; } /* check_double_unprotect_err() */ @@ -16843,7 +16995,7 @@ check_mark_entry_dirty_errs(void) fcn_name); } - return !pass; + return (unsigned)!pass; } /* check_mark_entry_dirty_errs() */ @@ -16976,7 +17128,7 @@ check_expunge_entry_errs(void) fcn_name); } - return !pass; + return (unsigned)!pass; } /* check_expunge_entry_errs() */ @@ -17087,7 +17239,7 @@ check_resize_entry_errs(void) fcn_name); } - return !pass; + return (unsigned)!pass; } /* check_resize_entry_errs() */ @@ -17222,7 +17374,7 @@ check_unprotect_ro_dirty_err(void) fcn_name); } - return !pass; + return (unsigned)!pass; } /* check_unprotect_ro_dirty_err() */ @@ -17279,7 +17431,7 @@ check_protect_ro_rw_err(void) if ( pass ) { - thing_ptr = H5C_protect(file_ptr, H5P_DATASET_XFER_DEFAULT, + thing_ptr = (H5C_cache_entry_t *)H5C_protect(file_ptr, H5P_DATASET_XFER_DEFAULT, &(types[0]), entry_ptr->addr, &entry_ptr->addr, H5C__NO_FLAGS_SET); @@ -17315,7 +17467,7 @@ check_protect_ro_rw_err(void) fcn_name); } - return !pass; + return (unsigned)!pass; } /* check_protect_ro_rw_err() */ @@ -17443,7 +17595,7 @@ check_check_evictions_enabled_err(void) } - if ( pass ) { + if ( cache_ptr ) { takedown_cache(file_ptr, FALSE, FALSE); } @@ -17463,7 +17615,7 @@ check_check_evictions_enabled_err(void) fcn_name); } - return !pass; + return (unsigned)!pass; } /* check_evictions_enabled_err() */ @@ -20628,6 +20780,10 @@ check_auto_cache_resize(void) 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 ) { auto_size_ctl.version = H5C__CURR_AUTO_SIZE_CTL_VER; @@ -20837,6 +20993,7 @@ check_auto_cache_resize(void) if ( pass ) { insert_entry(file_ptr, HUGE_ENTRY_TYPE, 1, H5C__NO_FLAGS_SET); + /* protect and unprotect a couple times to increment cache_accesses */ protect_entry(file_ptr, HUGE_ENTRY_TYPE, 1); unprotect_entry(file_ptr, HUGE_ENTRY_TYPE, 1, H5C__NO_FLAGS_SET); @@ -21684,7 +21841,7 @@ check_auto_cache_resize(void) fcn_name); } - return !pass; + return (unsigned)!pass; } /* check_auto_cache_resize() */ @@ -21784,7 +21941,17 @@ check_auto_cache_resize_disable(void) file_ptr = setup_cache((size_t)(2 * 1024), (size_t)(1 * 1024)); - cache_ptr = file_ptr->shared->cache; + + if ( file_ptr == NULL ) { + + pass = FALSE; + failure_mssg = "file_ptr NULL from setup_cache."; + + } + else { + + cache_ptr = file_ptr->shared->cache; + } } if ( pass ) { @@ -22826,8 +22993,12 @@ check_auto_cache_resize_disable(void) if ( show_progress ) HDfprintf(stderr, "check point %d\n", checkpoint++); - /* flush the cache and destroy all entries so we start from a known point */ - flush_cache(file_ptr, TRUE, FALSE, FALSE); + 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++); @@ -23049,8 +23220,12 @@ check_auto_cache_resize_disable(void) if ( show_progress ) HDfprintf(stderr, "check point %d\n", checkpoint++); - /* flush the cache and destroy all entries so we start from a known point */ - flush_cache(file_ptr, TRUE, FALSE, FALSE); + 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++); @@ -23279,8 +23454,12 @@ check_auto_cache_resize_disable(void) if ( show_progress ) HDfprintf(stderr, "check point %d\n", checkpoint++); - /* flush the cache and destroy all entries so we start from a known point */ - flush_cache(file_ptr, TRUE, FALSE, FALSE); + 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++); @@ -24401,7 +24580,7 @@ check_auto_cache_resize_disable(void) fcn_name); } - return !pass; + return (unsigned)!pass; } /* check_auto_cache_resize_disable() */ @@ -25115,7 +25294,7 @@ check_auto_cache_resize_epoch_markers(void) fcn_name); } - return !pass; + return (unsigned)!pass; } /* check_auto_cache_resize_epoch_markers() */ @@ -25141,34 +25320,6 @@ check_auto_cache_resize_epoch_markers(void) *------------------------------------------------------------------------- */ -#define RESIZE_CONFIGS_ARE_EQUAL(a, b, compare_init) \ -( ( (a).version == (b).version ) && \ - ( (a).rpt_fcn == (b).rpt_fcn ) && \ - ( ( ! compare_init ) || \ - ( (a).set_initial_size == (b).set_initial_size ) ) && \ - ( ( ! compare_init ) || \ - ( (a).initial_size == (b).initial_size ) ) && \ - ( 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 ) && \ - ( 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 ) && \ - ( 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 ) && \ - ( 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 ) && \ - ( DBL_REL_EQUAL((a).empty_reserve, (b).empty_reserve, 0.00001 ) ) ) - static unsigned check_auto_cache_resize_input_errs(void) { @@ -25277,8 +25428,8 @@ check_auto_cache_resize_input_errs(void) 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."; @@ -25349,8 +25500,8 @@ check_auto_cache_resize_input_errs(void) 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."; @@ -25424,8 +25575,8 @@ check_auto_cache_resize_input_errs(void) 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."; @@ -25500,8 +25651,8 @@ check_auto_cache_resize_input_errs(void) 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."; @@ -25573,8 +25724,8 @@ check_auto_cache_resize_input_errs(void) 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."; @@ -25648,8 +25799,8 @@ check_auto_cache_resize_input_errs(void) 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."; @@ -25720,8 +25871,8 @@ check_auto_cache_resize_input_errs(void) 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."; @@ -25796,8 +25947,8 @@ check_auto_cache_resize_input_errs(void) 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."; @@ -25868,8 +26019,8 @@ check_auto_cache_resize_input_errs(void) 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."; @@ -25940,8 +26091,8 @@ check_auto_cache_resize_input_errs(void) 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."; @@ -26015,8 +26166,8 @@ check_auto_cache_resize_input_errs(void) 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."; @@ -26087,8 +26238,8 @@ check_auto_cache_resize_input_errs(void) 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."; @@ -26163,8 +26314,8 @@ check_auto_cache_resize_input_errs(void) 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."; @@ -26236,8 +26387,8 @@ check_auto_cache_resize_input_errs(void) 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."; @@ -26311,8 +26462,8 @@ check_auto_cache_resize_input_errs(void) 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."; @@ -26383,8 +26534,8 @@ check_auto_cache_resize_input_errs(void) 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."; @@ -26455,8 +26606,8 @@ check_auto_cache_resize_input_errs(void) 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."; @@ -26531,8 +26682,8 @@ check_auto_cache_resize_input_errs(void) 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."; @@ -26606,8 +26757,8 @@ check_auto_cache_resize_input_errs(void) 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."; @@ -26681,8 +26832,8 @@ check_auto_cache_resize_input_errs(void) 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."; @@ -26754,8 +26905,8 @@ check_auto_cache_resize_input_errs(void) 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."; @@ -26829,8 +26980,8 @@ check_auto_cache_resize_input_errs(void) 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."; @@ -26902,8 +27053,8 @@ check_auto_cache_resize_input_errs(void) 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."; @@ -26978,8 +27129,8 @@ check_auto_cache_resize_input_errs(void) 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."; @@ -27051,8 +27202,8 @@ check_auto_cache_resize_input_errs(void) 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."; @@ -27126,8 +27277,8 @@ check_auto_cache_resize_input_errs(void) 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."; @@ -27198,8 +27349,8 @@ check_auto_cache_resize_input_errs(void) 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."; @@ -27272,8 +27423,8 @@ check_auto_cache_resize_input_errs(void) 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."; @@ -27344,8 +27495,8 @@ check_auto_cache_resize_input_errs(void) 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."; @@ -27418,8 +27569,8 @@ check_auto_cache_resize_input_errs(void) 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."; @@ -27490,8 +27641,8 @@ check_auto_cache_resize_input_errs(void) 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."; @@ -27540,7 +27691,7 @@ check_auto_cache_resize_input_errs(void) } } - if ( pass ) { + if ( cache_ptr ) { takedown_cache(file_ptr, FALSE, FALSE); } @@ -27560,7 +27711,7 @@ check_auto_cache_resize_input_errs(void) fcn_name); } - return !pass; + return (unsigned)!pass; } /* check_auto_cache_resize_input_errs() */ @@ -27711,7 +27862,7 @@ check_auto_cache_resize_aux_fcns(void) pass = FALSE; failure_mssg = "H5C_get_cache_hit_rate failed.\n"; - } else if ( hit_rate != 0.0 ) { + } else if ( hit_rate > FP_EPSILON ) { /* i.e. hit_rate != 0.0 */ pass = FALSE; failure_mssg = @@ -27744,7 +27895,7 @@ check_auto_cache_resize_aux_fcns(void) pass = FALSE; failure_mssg = "H5C_get_cache_hit_rate failed.\n"; - } else if ( hit_rate != 0.0 ) { + } else if ( hit_rate > FP_EPSILON ) { /* i.e. hit_rate != 0.0 */ pass = FALSE; failure_mssg = @@ -27789,7 +27940,7 @@ check_auto_cache_resize_aux_fcns(void) pass = FALSE; failure_mssg = "H5C_get_cache_hit_rate failed.\n"; - } else if ( ! DBL_REL_EQUAL(hit_rate, 0.5, 0.00001) ) { + } else if ( ! DBL_REL_EQUAL(hit_rate, 0.5, FP_EPSILON) ) { /* i.e. hit_rate != 0.5 */ pass = FALSE; failure_mssg = @@ -27872,7 +28023,7 @@ check_auto_cache_resize_aux_fcns(void) pass = FALSE; failure_mssg = "H5C_get_cache_hit_rate failed.\n"; - } else if ( ! DBL_REL_EQUAL(hit_rate, 0.5, 0.00001) ) { + } else if ( ! DBL_REL_EQUAL(hit_rate, 0.5, FP_EPSILON) ) { /* i.e. hit_rate != 0.5 */ pass = FALSE; failure_mssg = @@ -28128,7 +28279,7 @@ check_auto_cache_resize_aux_fcns(void) } } - if ( pass ) { + if ( cache_ptr ) { takedown_cache(file_ptr, FALSE, FALSE); } @@ -28148,7 +28299,7 @@ check_auto_cache_resize_aux_fcns(void) fcn_name); } - return !pass; + return (unsigned)!pass; } /* check_auto_cache_resize_aux_fcns() */ @@ -28178,6 +28329,7 @@ main(void) hbool_t core_file_driver_recommended = FALSE; const char *envval = NULL; unsigned nerrs = 0; + int express_test; core_file_driver_recommended = recommend_core_file_driver(); @@ -28243,17 +28395,18 @@ main(void) printf("\n"); } - nerrs += smoke_check_1(); - nerrs += smoke_check_2(); - nerrs += smoke_check_3(); - nerrs += smoke_check_4(); - nerrs += smoke_check_5(); - nerrs += smoke_check_6(); - nerrs += smoke_check_7(); - nerrs += smoke_check_8(); - nerrs += smoke_check_9(); - nerrs += smoke_check_10(); - nerrs += write_permitted_check(); + nerrs += smoke_check_1(express_test); + nerrs += smoke_check_2(express_test); + nerrs += smoke_check_3(express_test); + nerrs += smoke_check_4(express_test); + nerrs += smoke_check_5(express_test); + nerrs += smoke_check_6(express_test); + nerrs += smoke_check_7(express_test); + nerrs += smoke_check_8(express_test); + nerrs += smoke_check_9(express_test); + nerrs += smoke_check_10(express_test); + + nerrs += write_permitted_check(express_test); /* for shorter tests, the overhead of using the core file driver doesn't * seem to allow us to realize any significant time saveings. Thus |