diff --git a/test/cache.c b/test/cache.c index f3599e8158d..7a0d007dfe2 100644 --- a/test/cache.c +++ b/test/cache.c @@ -406,6 +406,9 @@ smoke_check_1(int express_test, unsigned paged) if (show_progress) /* 10 */ fprintf(stdout, "%s() - %0d -- pass = %d\n", __func__, mile_stone++, (int)pass); + /* Pop API context */ + H5CX_pop(false); + takedown_cache(file_ptr, display_stats, true); if (show_progress) /* 11 */ @@ -426,9 +429,6 @@ smoke_check_1(int express_test, unsigned paged) fprintf(stdout, "%s(): failure_mssg = \"%s\".\n", __func__, failure_mssg); } - /* Pop API context */ - H5CX_pop(false); - return (unsigned)!pass; } /* smoke_check_1() */ @@ -607,6 +607,9 @@ smoke_check_2(int express_test, unsigned paged) if (show_progress) /* 10 */ fprintf(stdout, "%s() - %0d -- pass = %d\n", __func__, mile_stone++, (int)pass); + /* Pop API context */ + H5CX_pop(false); + takedown_cache(file_ptr, display_stats, true); if (show_progress) /* 11 */ @@ -627,9 +630,6 @@ smoke_check_2(int express_test, unsigned paged) fprintf(stdout, "%s(): failure_mssg = \"%s\".\n", __func__, failure_mssg); } - /* Pop API context */ - H5CX_pop(false); - return (unsigned)!pass; } /* smoke_check_2() */ @@ -807,6 +807,9 @@ smoke_check_3(int express_test, unsigned paged) if (show_progress) /* 10 */ fprintf(stdout, "%s() - %0d -- pass = %d\n", __func__, mile_stone++, (int)pass); + /* Pop API context */ + H5CX_pop(false); + takedown_cache(file_ptr, display_stats, true); if (show_progress) /* 11 */ @@ -827,9 +830,6 @@ smoke_check_3(int express_test, unsigned paged) fprintf(stdout, "%s(): failure_mssg = \"%s\".\n", __func__, failure_mssg); } - /* Pop API context */ - H5CX_pop(false); - return (unsigned)!pass; } /* smoke_check_3() */ @@ -1008,6 +1008,9 @@ smoke_check_4(int express_test, unsigned paged) if (show_progress) /* 10 */ fprintf(stdout, "%s() - %0d -- pass = %d\n", __func__, mile_stone++, (int)pass); + /* Pop API context */ + H5CX_pop(false); + takedown_cache(file_ptr, display_stats, true); if (show_progress) /* 11 */ @@ -1028,9 +1031,6 @@ smoke_check_4(int express_test, unsigned paged) fprintf(stdout, "%s(): failure_mssg = \"%s\".\n", __func__, failure_mssg); } - /* Pop API context */ - H5CX_pop(false); - return (unsigned)!pass; } /* smoke_check_4() */ @@ -1238,6 +1238,9 @@ smoke_check_5(int express_test, unsigned paged) if (show_progress) /* 10 */ fprintf(stdout, "%s() - %0d -- pass = %d\n", __func__, mile_stone++, (int)pass); + /* Pop API context */ + H5CX_pop(false); + takedown_cache(file_ptr, display_stats, true); if (show_progress) /* 11 */ @@ -1258,9 +1261,6 @@ smoke_check_5(int express_test, unsigned paged) fprintf(stdout, "%s(): failure_mssg = \"%s\".\n", __func__, failure_mssg); } - /* Pop API context */ - H5CX_pop(false); - return (unsigned)!pass; } /* smoke_check_5() */ @@ -1468,6 +1468,9 @@ smoke_check_6(int express_test, unsigned paged) if (show_progress) /* 10 */ fprintf(stdout, "%s() - %0d -- pass = %d\n", __func__, mile_stone++, (int)pass); + /* Pop API context */ + H5CX_pop(false); + takedown_cache(file_ptr, display_stats, true); if (show_progress) /* 11 */ @@ -1488,9 +1491,6 @@ smoke_check_6(int express_test, unsigned paged) fprintf(stdout, "%s(): failure_mssg = \"%s\".\n", __func__, failure_mssg); } - /* Pop API context */ - H5CX_pop(false); - return (unsigned)!pass; } /* smoke_check_6() */ @@ -1699,6 +1699,9 @@ smoke_check_7(int express_test, unsigned paged) if (show_progress) /* 10 */ fprintf(stdout, "%s() - %0d -- pass = %d\n", __func__, mile_stone++, (int)pass); + /* Pop API context */ + H5CX_pop(false); + takedown_cache(file_ptr, display_stats, true); if (show_progress) /* 11 */ @@ -1719,9 +1722,6 @@ smoke_check_7(int express_test, unsigned paged) fprintf(stdout, "%s(): failure_mssg = \"%s\".\n", __func__, failure_mssg); } - /* Pop API context */ - H5CX_pop(false); - return (unsigned)!pass; } /* smoke_check_7() */ @@ -1930,6 +1930,9 @@ smoke_check_8(int express_test, unsigned paged) if (show_progress) /* 10 */ fprintf(stdout, "%s() - %0d -- pass = %d\n", __func__, mile_stone++, (int)pass); + /* Pop API context */ + H5CX_pop(false); + takedown_cache(file_ptr, display_stats, true); if (show_progress) /* 11 */ @@ -1950,9 +1953,6 @@ smoke_check_8(int express_test, unsigned paged) fprintf(stdout, "%s(): failure_mssg = \"%s\".\n", __func__, failure_mssg); } - /* Pop API context */ - H5CX_pop(false); - return (unsigned)!pass; } /* smoke_check_8() */ @@ -2240,6 +2240,9 @@ smoke_check_9(int express_test, unsigned paged) if (show_progress) /* 17 */ fprintf(stdout, "%s() - %0d -- pass = %d -- evictions disabled\n", __func__, mile_stone++, (int)pass); + /* Pop API context */ + H5CX_pop(false); + takedown_cache(file_ptr, display_stats, true); if (show_progress) /* 18 */ @@ -2260,9 +2263,6 @@ smoke_check_9(int express_test, unsigned paged) fprintf(stdout, "%s(): failure_mssg = \"%s\".\n", __func__, failure_mssg); } - /* Pop API context */ - H5CX_pop(false); - return (unsigned)!pass; } /* smoke_check_9() */ @@ -2546,6 +2546,9 @@ smoke_check_10(int express_test, unsigned paged) if (show_progress) /* 17 */ fprintf(stdout, "%s() - %0d -- pass = %d -- evictions disabled\n", __func__, mile_stone++, (int)pass); + /* Pop API context */ + H5CX_pop(false); + takedown_cache(file_ptr, display_stats, true); if (show_progress) /* 18 */ @@ -2566,9 +2569,6 @@ smoke_check_10(int express_test, unsigned paged) fprintf(stdout, "%s(): failure_mssg = \"%s\".\n", __func__, failure_mssg); } - /* Pop API context */ - H5CX_pop(false); - return (unsigned)!pass; } /* smoke_check_10() */ @@ -2749,6 +2749,9 @@ write_permitted_check(int if (show_progress) /* 9 */ fprintf(stdout, "%s() - %0d -- pass = %d\n", __func__, mile_stone++, (int)pass); + /* Pop API context */ + H5CX_pop(false); + takedown_cache(file_ptr, display_stats, true); if (show_progress) /* 10 */ @@ -2769,9 +2772,6 @@ write_permitted_check(int fprintf(stdout, "%s(): failure_mssg = \"%s\".\n", __func__, failure_mssg); } - /* Pop API context */ - H5CX_pop(false); - #else /* H5C_MAINTAIN_CLEAN_AND_DIRTY_LRU_LISTS */ SKIPPED(); @@ -3020,6 +3020,9 @@ check_insert_entry(unsigned paged) unpin_entry(entry_type, 1); } + /* Pop API context */ + H5CX_pop(false); + if (pass) { takedown_cache(file_ptr, false, false); @@ -3037,9 +3040,6 @@ check_insert_entry(unsigned paged) fprintf(stdout, "%s(): failure_mssg = \"%s\".\n", __func__, failure_mssg); } - /* Pop API context */ - H5CX_pop(false); - return (unsigned)!pass; } /* check_insert_entry() */ @@ -3110,6 +3110,9 @@ check_flush_cache(unsigned paged) check_flush_cache__flush_ops(file_ptr); } + /* Pop API context */ + H5CX_pop(false); + if (pass) { takedown_cache(file_ptr, false, false); @@ -3127,9 +3130,6 @@ check_flush_cache(unsigned paged) fprintf(stdout, "%s(): failure_mssg = \"%s\".\n", __func__, failure_mssg); } - /* Pop API context */ - H5CX_pop(false); - return (unsigned)!pass; } /* check_flush_cache() */ @@ -9752,6 +9752,9 @@ check_get_entry_status(unsigned paged) } } + /* Pop API context */ + H5CX_pop(false); + if (pass) { takedown_cache(file_ptr, false, false); @@ -9769,9 +9772,6 @@ check_get_entry_status(unsigned paged) fprintf(stdout, "%s(): failure_mssg = \"%s\".\n", __func__, failure_mssg); } - /* Pop API context */ - H5CX_pop(false); - return (unsigned)!pass; } /* check_get_entry_status() */ @@ -10033,6 +10033,9 @@ check_expunge_entry(unsigned paged) } } + /* Pop API context */ + H5CX_pop(false); + if (pass) { takedown_cache(file_ptr, false, false); @@ -10050,9 +10053,6 @@ check_expunge_entry(unsigned paged) fprintf(stdout, "%s(): failure_mssg = \"%s\".\n", __func__, failure_mssg); } - /* Pop API context */ - H5CX_pop(false); - return (unsigned)!pass; } /* check_expunge_entry() */ @@ -10423,6 +10423,9 @@ check_multiple_read_protect(unsigned paged) } #endif /* H5C_COLLECT_CACHE_STATS */ + /* Pop API context */ + H5CX_pop(false); + if (pass) { takedown_cache(file_ptr, false, false); @@ -10440,9 +10443,6 @@ check_multiple_read_protect(unsigned paged) fprintf(stdout, "%s: failure_mssg = \"%s\".\n", __func__, failure_mssg); } - /* Pop API context */ - H5CX_pop(false); - return (unsigned)!pass; } /* check_multiple_read_protect() */ @@ -10531,6 +10531,9 @@ check_move_entry(unsigned paged) u++; } + /* Pop API context */ + H5CX_pop(false); + if (pass) takedown_cache(file_ptr, false, false); @@ -10542,9 +10545,6 @@ check_move_entry(unsigned paged) if (!pass) fprintf(stdout, "%s(): failure_mssg = \"%s\".\n", __func__, failure_mssg); - /* Pop API context */ - H5CX_pop(false); - return (unsigned)!pass; } /* check_move_entry() */ @@ -10777,6 +10777,9 @@ check_pin_protected_entry(unsigned paged) unprotect_entry(file_ptr, 0, 0, H5C__UNPIN_ENTRY_FLAG); + /* Pop API context */ + H5CX_pop(false); + if (pass) { takedown_cache(file_ptr, false, false); @@ -10794,9 +10797,6 @@ check_pin_protected_entry(unsigned paged) fprintf(stdout, "%s(): failure_mssg = \"%s\".\n", __func__, failure_mssg); } - /* Pop API context */ - H5CX_pop(false); - return (unsigned)!pass; } /* check_pin_protected_entry() */ @@ -11642,6 +11642,9 @@ check_resize_entry(unsigned paged) } } + /* Pop API context */ + H5CX_pop(false); + if (pass) { takedown_cache(file_ptr, false, false); @@ -11659,9 +11662,6 @@ check_resize_entry(unsigned paged) fprintf(stdout, "%s(): failure_mssg = \"%s\".\n", __func__, failure_mssg); } - /* Pop API context */ - H5CX_pop(false); - return (unsigned)!pass; } /* check_resize_entry() */ @@ -12286,6 +12286,9 @@ check_evictions_enabled(unsigned paged) if (show_progress) /* 33 */ fprintf(stdout, "%s() - %0d -- pass = %d\n", __func__, mile_stone++, (int)pass); + /* Pop API context */ + H5CX_pop(false); + if (pass) { takedown_cache(file_ptr, false, false); @@ -12306,9 +12309,6 @@ check_evictions_enabled(unsigned paged) fprintf(stdout, "%s(): failure_mssg = \"%s\".\n", __func__, failure_mssg); } - /* Pop API context */ - H5CX_pop(false); - return (unsigned)!pass; } /* check_evictions_enabled() */ @@ -12381,6 +12381,9 @@ check_flush_protected_err(unsigned paged) H5C_FLUSH_CACHE(file_ptr, H5C__NO_FLAGS_SET, "flush failed after unprotect.\n") } + /* Pop API context */ + H5CX_pop(false); + takedown_cache(file_ptr, false, false); if (pass) { @@ -12395,9 +12398,6 @@ check_flush_protected_err(unsigned paged) fprintf(stdout, "%s(): failure_mssg = \"%s\".\n", __func__, failure_mssg); } - /* Pop API context */ - H5CX_pop(false); - return (unsigned)!pass; } /* check_flush_protected_err() */ @@ -12468,12 +12468,19 @@ check_destroy_pinned_err(unsigned paged) saved_cache = NULL; } /* end if */ + /* Pop API context */ + H5CX_pop(false); + /* call takedown_cache() with a NULL file_ptr parameter. * This causes the function to close and delete the file, * while skipping the call to H5C_dest(). */ takedown_cache(NULL, false, false); } /* end if */ + else { + /* Pop API context */ + H5CX_pop(false); + } if (pass) { PASSED(); @@ -12485,9 +12492,6 @@ check_destroy_pinned_err(unsigned paged) if (!pass) fprintf(stdout, "%s(): failure_mssg = \"%s\".\n", __func__, failure_mssg); - /* Pop API context */ - H5CX_pop(false); - return (unsigned)!pass; } /* check_destroy_pinned_err() */ @@ -12567,12 +12571,19 @@ check_destroy_protected_err(unsigned paged) saved_cache = NULL; } /* end if */ + /* Pop API context */ + H5CX_pop(false); + /* call takedown_cache() with a NULL file_ptr parameter. * This causes the function to close and delete the file, * while skipping the call to H5C_dest(). */ takedown_cache(NULL, false, false); } /* end if */ + else { + /* Pop API context */ + H5CX_pop(false); + } if (pass) { PASSED(); @@ -12584,9 +12595,6 @@ check_destroy_protected_err(unsigned paged) if (!pass) fprintf(stdout, "%s(): failure_mssg = \"%s\".\n", __func__, failure_mssg); - /* Pop API context */ - H5CX_pop(false); - return (unsigned)!pass; } /* check_destroy_protected_err() */ @@ -12643,6 +12651,9 @@ check_duplicate_insert_err(unsigned paged) result = H5C_insert_entry(file_ptr, types[0], entry_ptr->addr, (void *)entry_ptr, H5C__NO_FLAGS_SET); + /* Pop API context */ + H5CX_pop(false); + if (result >= 0) { pass = false; @@ -12656,6 +12667,10 @@ check_duplicate_insert_err(unsigned paged) } } } + else { + /* Pop API context */ + H5CX_pop(false); + } if (pass) { PASSED(); @@ -12669,9 +12684,6 @@ check_duplicate_insert_err(unsigned paged) fprintf(stdout, "%s(): failure_mssg = \"%s\".\n", __func__, failure_mssg); } - /* Pop API context */ - H5CX_pop(false); - return (unsigned)!pass; } /* check_duplicate_insert_err() */ @@ -12742,6 +12754,9 @@ check_double_pin_err(unsigned paged) } } + /* Pop API context */ + H5CX_pop(false); + if (pass) { takedown_cache(file_ptr, false, false); @@ -12759,9 +12774,6 @@ check_double_pin_err(unsigned paged) fprintf(stdout, "%s: failure_mssg = \"%s\".\n", __func__, failure_mssg); } - /* Pop API context */ - H5CX_pop(false); - return (unsigned)!pass; } /* check_double_pin_err() */ @@ -12841,6 +12853,9 @@ check_double_unpin_err(unsigned paged) } } + /* Pop API context */ + H5CX_pop(false); + if (pass) { takedown_cache(file_ptr, false, false); @@ -12858,9 +12873,6 @@ check_double_unpin_err(unsigned paged) fprintf(stdout, "%s: failure_mssg = \"%s\".\n", __func__, failure_mssg); } - /* Pop API context */ - H5CX_pop(false); - return (unsigned)!pass; } /* check_double_unpin_err() */ @@ -12954,6 +12966,9 @@ check_pin_entry_errs(unsigned paged) } } + /* Pop API context */ + H5CX_pop(false); + if (pass) { takedown_cache(file_ptr, false, false); @@ -12971,9 +12986,6 @@ check_pin_entry_errs(unsigned paged) fprintf(stdout, "%s: failure_mssg = \"%s\".\n", __func__, failure_mssg); } - /* Pop API context */ - H5CX_pop(false); - return (unsigned)!pass; } /* check_pin_entry_errs() */ @@ -13041,6 +13053,9 @@ check_double_protect_err(unsigned paged) unprotect_entry(file_ptr, 0, 0, H5C__NO_FLAGS_SET); } + /* Pop API context */ + H5CX_pop(false); + if (pass) { takedown_cache(file_ptr, false, false); @@ -13058,9 +13073,6 @@ check_double_protect_err(unsigned paged) fprintf(stdout, "%s: failure_mssg = \"%s\".\n", __func__, failure_mssg); } - /* Pop API context */ - H5CX_pop(false); - return (unsigned)!pass; } /* check_double_protect_err() */ @@ -13124,6 +13136,9 @@ check_double_unprotect_err(unsigned paged) } } + /* Pop API context */ + H5CX_pop(false); + if (pass) { takedown_cache(file_ptr, false, false); @@ -13141,9 +13156,6 @@ check_double_unprotect_err(unsigned paged) fprintf(stdout, "%s: failure_mssg = \"%s\".\n", __func__, failure_mssg); } - /* Pop API context */ - H5CX_pop(false); - return (unsigned)!pass; } /* check_double_unprotect_err() */ @@ -13211,6 +13223,9 @@ check_mark_entry_dirty_errs(unsigned paged) } } + /* Pop API context */ + H5CX_pop(false); + if (pass) { takedown_cache(file_ptr, false, false); @@ -13228,9 +13243,6 @@ check_mark_entry_dirty_errs(unsigned paged) fprintf(stdout, "%s: failure_mssg = \"%s\".\n", __func__, failure_mssg); } - /* Pop API context */ - H5CX_pop(false); - return (unsigned)!pass; } /* check_mark_entry_dirty_errs() */ @@ -13329,6 +13341,9 @@ check_expunge_entry_errs(unsigned paged) } } + /* Pop API context */ + H5CX_pop(false); + if (pass) { takedown_cache(file_ptr, false, false); @@ -13346,9 +13361,6 @@ check_expunge_entry_errs(unsigned paged) fprintf(stdout, "%s: failure_mssg = \"%s\".\n", __func__, failure_mssg); } - /* Pop API context */ - H5CX_pop(false); - return (unsigned)!pass; } /* check_expunge_entry_errs() */ @@ -13424,12 +13436,12 @@ check_move_entry_errs(unsigned paged) } /* end if */ } /* end if */ - if (pass) - takedown_cache(file_ptr, false, false); - /* Pop API context */ H5CX_pop(false); + if (pass) + takedown_cache(file_ptr, false, false); + /* Allocate a cache, protect an entry R/O, and then call * H5C_move_entry() to move it -- this should fail. * @@ -13465,6 +13477,9 @@ check_move_entry_errs(unsigned paged) unprotect_entry(file_ptr, 0, 0, H5C__NO_FLAGS_SET); } /* end if */ + /* Pop API context */ + H5CX_pop(false); + if (pass) takedown_cache(file_ptr, false, false); @@ -13476,9 +13491,6 @@ check_move_entry_errs(unsigned paged) fprintf(stdout, "%s: failure_mssg = \"%s\".\n", __func__, failure_mssg); } /* end else */ - /* Pop API context */ - H5CX_pop(false); - return (unsigned)!pass; } /* check_move_entry_errs() */ @@ -13565,6 +13577,9 @@ check_resize_entry_errs(unsigned paged) } } + /* Pop API context */ + H5CX_pop(false); + if (pass) { takedown_cache(file_ptr, false, false); @@ -13582,9 +13597,6 @@ check_resize_entry_errs(unsigned paged) fprintf(stdout, "%s: failure_mssg = \"%s\".\n", __func__, failure_mssg); } - /* Pop API context */ - H5CX_pop(false); - return (unsigned)!pass; } /* check_resize_entry_errs() */ @@ -13651,14 +13663,14 @@ check_unprotect_ro_dirty_err(unsigned paged) unprotect_entry(file_ptr, 0, 0, H5C__NO_FLAGS_SET); } + /* Pop API context */ + H5CX_pop(false); + if (pass) { takedown_cache(file_ptr, false, false); } - /* Pop API context */ - H5CX_pop(false); - /* allocate a another cache, protect an entry read only twice, and * then unprotect it with the dirtied flag set. This should fail. * Unprotect it with no flags set twice and then destroy the cache. @@ -13699,6 +13711,9 @@ check_unprotect_ro_dirty_err(unsigned paged) unprotect_entry(file_ptr, 0, 0, H5C__NO_FLAGS_SET); } + /* Pop API context */ + H5CX_pop(false); + if (pass) { takedown_cache(file_ptr, false, false); @@ -13716,9 +13731,6 @@ check_unprotect_ro_dirty_err(unsigned paged) fprintf(stdout, "%s: failure_mssg = \"%s\".\n", __func__, failure_mssg); } - /* Pop API context */ - H5CX_pop(false); - return (unsigned)!pass; } /* check_unprotect_ro_dirty_err() */ @@ -13787,6 +13799,9 @@ check_protect_ro_rw_err(unsigned paged) unprotect_entry(file_ptr, 0, 0, H5C__NO_FLAGS_SET); } + /* Pop API context */ + H5CX_pop(false); + if (pass) { takedown_cache(file_ptr, false, false); @@ -13804,9 +13819,6 @@ check_protect_ro_rw_err(unsigned paged) fprintf(stdout, "%s: failure_mssg = \"%s\".\n", __func__, failure_mssg); } - /* Pop API context */ - H5CX_pop(false); - return (unsigned)!pass; } /* check_protect_ro_rw_err() */ @@ -13922,6 +13934,9 @@ check_protect_retries(unsigned paged) pass = false; } + /* Pop API context */ + H5CX_pop(false); + takedown_cache(file_ptr, false, false); reset_entries(); @@ -13937,9 +13952,6 @@ check_protect_retries(unsigned paged) fprintf(stdout, "%s: failure_msg = \"%s\".\n", __func__, failure_mssg); } - /* Pop API context */ - H5CX_pop(false); - return (unsigned)!pass; } /* check_protect_retries() */ @@ -14059,6 +14071,9 @@ check_check_evictions_enabled_err(unsigned paged) (cache_ptr->resize_ctl).decr_mode = H5C_decr__off; } + /* Pop API context */ + H5CX_pop(false); + if (cache_ptr) { takedown_cache(file_ptr, false, false); @@ -14076,9 +14091,6 @@ check_check_evictions_enabled_err(unsigned paged) fprintf(stdout, "%s: failure_mssg = \"%s\".\n", __func__, failure_mssg); } - /* Pop API context */ - H5CX_pop(false); - return (unsigned)!pass; } /* check_evictions_enabled_err() */ @@ -17926,6 +17938,9 @@ check_auto_cache_resize(bool cork_ageout, unsigned paged) if (show_progress) fprintf(stderr, "check point %d\n", checkpoint++); + /* Pop API context */ + H5CX_pop(false); + if (pass) { takedown_cache(file_ptr, false, false); @@ -17944,9 +17959,6 @@ check_auto_cache_resize(bool cork_ageout, unsigned paged) if (!pass) fprintf(stdout, "%s: failure_mssg = \"%s\".\n", __func__, failure_mssg); - /* Pop API context */ - H5CX_pop(false); - return (unsigned)!pass; } /* check_auto_cache_resize() */ @@ -20523,6 +20535,9 @@ check_auto_cache_resize_disable(unsigned paged) if (show_progress) fprintf(stderr, "check point %d\n", checkpoint++); + /* Pop API context */ + H5CX_pop(false); + if (pass) { takedown_cache(file_ptr, false, false); @@ -20543,9 +20558,6 @@ check_auto_cache_resize_disable(unsigned paged) fprintf(stdout, "%s: failure_mssg = \"%s\".\n", __func__, failure_mssg); } - /* Pop API context */ - H5CX_pop(false); - return (unsigned)!pass; } /* check_auto_cache_resize_disable() */ @@ -21211,6 +21223,9 @@ check_auto_cache_resize_epoch_markers(unsigned paged) if (show_progress) fprintf(stderr, "check point %d\n", checkpoint++); + /* Pop API context */ + H5CX_pop(false); + if (pass) { takedown_cache(file_ptr, false, false); @@ -21231,9 +21246,6 @@ check_auto_cache_resize_epoch_markers(unsigned paged) fprintf(stdout, "%s: failure_mssg = \"%s\".\n", __func__, failure_mssg); } - /* Pop API context */ - H5CX_pop(false); - return (unsigned)!pass; } /* check_auto_cache_resize_epoch_markers() */ @@ -23431,6 +23443,9 @@ check_auto_cache_resize_input_errs(unsigned paged) } } + /* Pop API context */ + H5CX_pop(false); + if (cache_ptr) { takedown_cache(file_ptr, false, false); @@ -23448,9 +23463,6 @@ check_auto_cache_resize_input_errs(unsigned paged) fprintf(stdout, "%s: failure_mssg = \"%s\".\n", __func__, failure_mssg); } - /* Pop API context */ - H5CX_pop(false); - return (unsigned)!pass; } /* check_auto_cache_resize_input_errs() */ @@ -23923,6 +23935,9 @@ check_auto_cache_resize_aux_fcns(unsigned paged) } } + /* Pop API context */ + H5CX_pop(false); + if (cache_ptr) { takedown_cache(file_ptr, false, false); @@ -23940,9 +23955,6 @@ check_auto_cache_resize_aux_fcns(unsigned paged) fprintf(stdout, "%s: failure_mssg = \"%s\".\n", __func__, failure_mssg); } - /* Pop API context */ - H5CX_pop(false); - return (unsigned)!pass; } /* check_auto_cache_resize_aux_fcns() */ @@ -24656,6 +24668,9 @@ check_metadata_blizzard_absence(bool fill_via_insertion, unsigned paged) if (show_progress) /* 11 */ fprintf(stdout, "%s: check point %d -- pass %d\n", __func__, checkpoint++, pass); + /* Pop API context */ + H5CX_pop(false); + if (cache_ptr) { /* We're done with testing. We can take down the cache. */ @@ -24675,9 +24690,6 @@ check_metadata_blizzard_absence(bool fill_via_insertion, unsigned paged) H5_FAILED(); } - /* Pop API context */ - H5CX_pop(false); - return (unsigned)!pass; } /* check_metadata_blizzard_absence() */ @@ -26592,6 +26604,9 @@ check_flush_deps(unsigned paged) } done: + /* Pop API context */ + H5CX_pop(false); + if (file_ptr) takedown_cache(file_ptr, false, false); @@ -26602,9 +26617,6 @@ check_flush_deps(unsigned paged) fprintf(stdout, "%s.\n", failure_mssg); } /* end else */ - /* Pop API context */ - H5CX_pop(false); - return (unsigned)!pass; } /* check_flush_deps() */ @@ -26855,20 +26867,23 @@ check_flush_deps_err(unsigned paged) CACHE_ERROR("Unknown test case!") } /* end switch */ + /* Pop API context */ + H5CX_pop(false); + takedown_cache(file_ptr, false, false); - if (!pass) + if (!pass) { + file_ptr = NULL; CACHE_ERROR("takedown_cache failed") + } file_ptr = NULL; - - /* Pop API context */ - H5CX_pop(false); } /* end for */ done: if (file_ptr) { - takedown_cache(file_ptr, false, false); /* Pop API context */ H5CX_pop(false); + + takedown_cache(file_ptr, false, false); } if (pass) @@ -29599,6 +29614,9 @@ check_flush_deps_order(unsigned paged) } done: + /* Pop API context */ + H5CX_pop(false); + if (file_ptr) takedown_cache(file_ptr, false, false); @@ -29609,9 +29627,6 @@ check_flush_deps_order(unsigned paged) fprintf(stdout, "%s.\n", failure_mssg); } /* end else */ - /* Pop API context */ - H5CX_pop(false); - return (unsigned)!pass; } /* check_flush_deps_order() */ @@ -29820,6 +29835,9 @@ check_notify_cb(unsigned paged) } /* end for */ done: + /* Pop API context */ + H5CX_pop(false); + takedown_cache(file_ptr, false, false); if (pass) @@ -29829,9 +29847,6 @@ check_notify_cb(unsigned paged) fprintf(stdout, "%s.\n", failure_mssg); } /* end else */ - /* Pop API context */ - H5CX_pop(false); - return (unsigned)!pass; } /* check_notify_cb() */ @@ -30407,6 +30422,9 @@ check_metadata_cork(bool fill_via_insertion, unsigned paged) if (show_progress) /* 12 */ fprintf(stdout, "%s: check point %d -- pass %d\n", fcn_name, checkpoint++, pass); + /* Pop API context */ + H5CX_pop(false); + /* We're done with testing. We can take down the cache. */ takedown_cache(file_ptr, false, false); reset_entries(); @@ -30423,9 +30441,6 @@ check_metadata_cork(bool fill_via_insertion, unsigned paged) H5_FAILED(); } - /* Pop API context */ - H5CX_pop(false); - return (unsigned)!pass; } /* check_metadata_cork() */ @@ -30506,6 +30521,9 @@ check_entry_deletions_during_scans(unsigned paged) cedds__H5C_flush_invalidate_cache__bucket_scan(file_ptr); } + /* Pop API context */ + H5CX_pop(false); + takedown_cache(file_ptr, false, false); if (pass) { @@ -30520,9 +30538,6 @@ check_entry_deletions_during_scans(unsigned paged) fprintf(stdout, "%s(): failure_mssg = \"%s\".\n", __func__, failure_mssg); } - /* Pop API context */ - H5CX_pop(false); - return (unsigned)!pass; } /* check_entry_deletions_during_scans() */ @@ -31905,6 +31920,9 @@ check_stats(unsigned paged) check_stats__smoke_check_1(file_ptr); } + /* Pop API context */ + H5CX_pop(false); + if (pass) { takedown_cache(file_ptr, false, false); @@ -31922,9 +31940,6 @@ check_stats(unsigned paged) fprintf(stdout, "%s(): failure_mssg = \"%s\".\n", __func__, failure_mssg); } - /* Pop API context */ - H5CX_pop(false); - #else /* H5C_COLLECT_CACHE_STATS */ SKIPPED();