Fix AddressSanitizer issues in cache test (#5235)

Fix usages of stack variables after function return by
removing extraneous H5CX_push/pop operations and hoisting
a stack variable to a higher scope
This commit is contained in:
jhendersonHDF
2025-01-15 14:58:39 -06:00
committed by GitHub
parent 6de897bc5c
commit c83ca7dff3
+70 -384
View File
@@ -222,7 +222,7 @@ static unsigned check_stats(unsigned paged);
static void check_stats__smoke_check_1(H5F_t *file_ptr);
#endif /* H5C_COLLECT_CACHE_STATS */
static H5F_t *setup_cache(size_t max_cache_size, size_t min_clean_size, unsigned paged);
static H5F_t *setup_cache(size_t max_cache_size, size_t min_clean_size, unsigned paged, H5CX_node_t *api_ctx);
static void takedown_cache(H5F_t *file_ptr, bool dump_stats, bool dump_detailed_stats);
@@ -298,14 +298,11 @@ smoke_check_1(int express_test, unsigned paged)
if (show_progress) /* 2 */
fprintf(stdout, "%s() - %0d -- pass = %d\n", __func__, mile_stone++, (int)pass);
file_ptr = setup_cache((size_t)(4 * 1024 * 1024), (size_t)(2 * 1024 * 1024), paged);
file_ptr = setup_cache((size_t)(4 * 1024 * 1024), (size_t)(2 * 1024 * 1024), paged, &api_ctx);
if (show_progress) /* 3 */
fprintf(stdout, "%s() - %0d -- pass = %d\n", __func__, mile_stone++, (int)pass);
/* Push API context */
H5CX_push(&api_ctx);
row_major_scan_forward(/* file_ptr */ file_ptr,
/* max_index */ max_index,
/* lag */ lag,
@@ -426,9 +423,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() */
@@ -499,14 +493,11 @@ smoke_check_2(int express_test, unsigned paged)
if (show_progress) /* 2 */
fprintf(stdout, "%s() - %0d -- pass = %d\n", __func__, mile_stone++, (int)pass);
file_ptr = setup_cache((size_t)(4 * 1024 * 1024), (size_t)(2 * 1024 * 1024), paged);
file_ptr = setup_cache((size_t)(4 * 1024 * 1024), (size_t)(2 * 1024 * 1024), paged, &api_ctx);
if (show_progress) /* 3 */
fprintf(stdout, "%s() - %0d -- pass = %d\n", __func__, mile_stone++, (int)pass);
/* Push API context */
H5CX_push(&api_ctx);
row_major_scan_forward(/* file_ptr */ file_ptr,
/* max_index */ max_index,
/* lag */ lag,
@@ -627,9 +618,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() */
@@ -699,14 +687,11 @@ smoke_check_3(int express_test, unsigned paged)
if (show_progress) /* 2 */
fprintf(stdout, "%s() - %0d -- pass = %d\n", __func__, mile_stone++, (int)pass);
file_ptr = setup_cache((size_t)(2 * 1024), (size_t)(1 * 1024), paged);
file_ptr = setup_cache((size_t)(2 * 1024), (size_t)(1 * 1024), paged, &api_ctx);
if (show_progress) /* 3 */
fprintf(stdout, "%s() - %0d -- pass = %d\n", __func__, mile_stone++, (int)pass);
/* Push API context */
H5CX_push(&api_ctx);
row_major_scan_forward(/* file_ptr */ file_ptr,
/* max_index */ max_index,
/* lag */ lag,
@@ -827,9 +812,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() */
@@ -900,14 +882,11 @@ smoke_check_4(int express_test, unsigned paged)
if (show_progress) /* 2 */
fprintf(stdout, "%s() - %0d -- pass = %d\n", __func__, mile_stone++, (int)pass);
file_ptr = setup_cache((size_t)(2 * 1024), (size_t)(1 * 1024), paged);
file_ptr = setup_cache((size_t)(2 * 1024), (size_t)(1 * 1024), paged, &api_ctx);
if (show_progress) /* 3 */
fprintf(stdout, "%s() - %0d -- pass = %d\n", __func__, mile_stone++, (int)pass);
/* Push API context */
H5CX_push(&api_ctx);
row_major_scan_forward(/* file_ptr */ file_ptr,
/* max_index */ max_index,
/* lag */ lag,
@@ -1028,9 +1007,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() */
@@ -1141,12 +1117,9 @@ smoke_check_5(int express_test, unsigned paged)
if (show_progress) /* 2 */
fprintf(stdout, "%s() - %0d -- pass = %d\n", __func__, mile_stone++, (int)pass);
file_ptr = setup_cache((size_t)(2 * 1024), (size_t)(1 * 1024), paged);
file_ptr = setup_cache((size_t)(2 * 1024), (size_t)(1 * 1024), paged, &api_ctx);
cache_ptr = file_ptr->shared->cache;
/* Push API context */
H5CX_push(&api_ctx);
if (pass) {
result = H5C_set_cache_auto_resize_config(cache_ptr, &auto_size_ctl);
@@ -1258,9 +1231,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() */
@@ -1371,12 +1341,9 @@ smoke_check_6(int express_test, unsigned paged)
if (show_progress) /* 2 */
fprintf(stdout, "%s() - %0d -- pass = %d\n", __func__, mile_stone++, (int)pass);
file_ptr = setup_cache((size_t)(2 * 1024), (size_t)(1 * 1024), paged);
file_ptr = setup_cache((size_t)(2 * 1024), (size_t)(1 * 1024), paged, &api_ctx);
cache_ptr = file_ptr->shared->cache;
/* Push API context */
H5CX_push(&api_ctx);
if (pass) {
result = H5C_set_cache_auto_resize_config(cache_ptr, &auto_size_ctl);
@@ -1488,9 +1455,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() */
@@ -1602,12 +1566,9 @@ smoke_check_7(int express_test, unsigned paged)
if (show_progress) /* 2 */
fprintf(stdout, "%s() - %0d -- pass = %d\n", __func__, mile_stone++, (int)pass);
file_ptr = setup_cache((size_t)(2 * 1024), (size_t)(1 * 1024), paged);
file_ptr = setup_cache((size_t)(2 * 1024), (size_t)(1 * 1024), paged, &api_ctx);
cache_ptr = file_ptr->shared->cache;
/* Push API context */
H5CX_push(&api_ctx);
if (pass) {
result = H5C_set_cache_auto_resize_config(cache_ptr, &auto_size_ctl);
@@ -1719,9 +1680,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() */
@@ -1833,12 +1791,9 @@ smoke_check_8(int express_test, unsigned paged)
if (show_progress) /* 2 */
fprintf(stdout, "%s() - %0d -- pass = %d\n", __func__, mile_stone++, (int)pass);
file_ptr = setup_cache((size_t)(2 * 1024), (size_t)(1 * 1024), paged);
file_ptr = setup_cache((size_t)(2 * 1024), (size_t)(1 * 1024), paged, &api_ctx);
cache_ptr = file_ptr->shared->cache;
/* Push API context */
H5CX_push(&api_ctx);
if (pass) {
result = H5C_set_cache_auto_resize_config(cache_ptr, &auto_size_ctl);
@@ -1950,9 +1905,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() */
@@ -2029,15 +1981,12 @@ smoke_check_9(int express_test, unsigned paged)
if (show_progress) /* 2 */
fprintf(stdout, "%s() - %0d -- pass = %d\n", __func__, mile_stone++, (int)pass);
file_ptr = setup_cache((size_t)(4 * 1024 * 1024), (size_t)(2 * 1024 * 1024), paged);
file_ptr = setup_cache((size_t)(4 * 1024 * 1024), (size_t)(2 * 1024 * 1024), paged, &api_ctx);
cache_ptr = file_ptr->shared->cache;
if (show_progress) /* 3 */
fprintf(stdout, "%s() - %0d -- pass = %d\n", __func__, mile_stone++, (int)pass);
/* Push API context */
H5CX_push(&api_ctx);
/* disable evictions */
if (pass) {
@@ -2260,9 +2209,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() */
@@ -2339,12 +2285,9 @@ smoke_check_10(int express_test, unsigned paged)
if (show_progress) /* 2 */
fprintf(stdout, "%s() - %0d -- pass = %d\n", __func__, mile_stone++, (int)pass);
file_ptr = setup_cache((size_t)(4 * 1024 * 1024), (size_t)(2 * 1024 * 1024), paged);
file_ptr = setup_cache((size_t)(4 * 1024 * 1024), (size_t)(2 * 1024 * 1024), paged, &api_ctx);
cache_ptr = file_ptr->shared->cache;
/* Push API context */
H5CX_push(&api_ctx);
if (show_progress) /* 3 */
fprintf(stdout, "%s() - %0d -- pass = %d -- evictions enabled\n", __func__, mile_stone++, (int)pass);
@@ -2566,9 +2509,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() */
@@ -2643,14 +2583,11 @@ write_permitted_check(int
if (show_progress) /* 2 */
fprintf(stdout, "%s() - %0d -- pass = %d\n", __func__, mile_stone++, (int)pass);
file_ptr = setup_cache((size_t)(1 * 1024 * 1024), (size_t)0, paged);
file_ptr = setup_cache((size_t)(1 * 1024 * 1024), (size_t)0, paged, &api_ctx);
if (show_progress) /* 3 */
fprintf(stdout, "%s() - %0d -- pass = %d\n", __func__, mile_stone++, (int)pass);
/* Push API context */
H5CX_push(&api_ctx);
row_major_scan_forward(/* file_ptr */ file_ptr,
/* max_index */ max_index,
/* lag */ lag,
@@ -2769,9 +2706,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();
@@ -2838,13 +2772,10 @@ check_insert_entry(unsigned paged)
reset_entries();
file_ptr = setup_cache((size_t)(2 * 1024 * 1024), (size_t)(1 * 1024 * 1024), paged);
file_ptr = setup_cache((size_t)(2 * 1024 * 1024), (size_t)(1 * 1024 * 1024), paged, &api_ctx);
cache_ptr = file_ptr->shared->cache;
}
/* Push API context */
H5CX_push(&api_ctx);
if (pass) {
insert_entry(file_ptr, entry_type, 0, H5C__NO_FLAGS_SET);
@@ -3037,9 +2968,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() */
@@ -3076,12 +3004,9 @@ check_flush_cache(unsigned paged)
reset_entries();
file_ptr = setup_cache((size_t)(2 * 1024 * 1024), (size_t)(1 * 1024 * 1024), paged);
file_ptr = setup_cache((size_t)(2 * 1024 * 1024), (size_t)(1 * 1024 * 1024), paged, &api_ctx);
}
/* Push API context */
H5CX_push(&api_ctx);
/* first test behaviour on an empty cache. Can't do much sanity
* checking in this case, so simply check the return values.
*/
@@ -3127,9 +3052,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() */
@@ -9590,7 +9512,7 @@ check_get_entry_status(unsigned paged)
reset_entries();
file_ptr = setup_cache((size_t)(2 * 1024 * 1024), (size_t)(1 * 1024 * 1024), paged);
file_ptr = setup_cache((size_t)(2 * 1024 * 1024), (size_t)(1 * 1024 * 1024), paged, &api_ctx);
if (file_ptr == NULL) {
@@ -9604,9 +9526,6 @@ check_get_entry_status(unsigned paged)
}
}
/* Push API context */
H5CX_push(&api_ctx);
if (pass) {
/* entry not in cache -- only in_cache should be touched by
@@ -9769,9 +9688,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() */
@@ -9811,15 +9727,12 @@ check_expunge_entry(unsigned paged)
reset_entries();
file_ptr = setup_cache((size_t)(2 * 1024 * 1024), (size_t)(1 * 1024 * 1024), paged);
file_ptr = setup_cache((size_t)(2 * 1024 * 1024), (size_t)(1 * 1024 * 1024), paged, &api_ctx);
base_addr = entries[0];
entry_ptr = &(base_addr[0]);
}
/* Push API context */
H5CX_push(&api_ctx);
if (pass) {
/* entry not in cache -- only in_cache should be touched by
@@ -10050,9 +9963,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() */
@@ -10108,7 +10018,7 @@ check_multiple_read_protect(unsigned paged)
reset_entries();
file_ptr = setup_cache((size_t)(2 * 1024), (size_t)(1 * 1024), paged);
file_ptr = setup_cache((size_t)(2 * 1024), (size_t)(1 * 1024), paged, &api_ctx);
#if H5C_COLLECT_CACHE_STATS
cache_ptr = file_ptr->shared->cache;
#endif /* H5C_COLLECT_CACHE_STATS */
@@ -10123,9 +10033,6 @@ check_multiple_read_protect(unsigned paged)
}
}
/* Push API context */
H5CX_push(&api_ctx);
#if H5C_COLLECT_CACHE_STATS
if ((cache_ptr->write_protects[0] != 0) || (cache_ptr->read_protects[0] != 0) ||
(cache_ptr->max_read_protects[0] != 0)) {
@@ -10440,9 +10347,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() */
@@ -10519,12 +10423,9 @@ check_move_entry(unsigned paged)
reset_entries();
file_ptr = setup_cache((size_t)(2 * 1024 * 1024), (size_t)(1 * 1024 * 1024), paged);
file_ptr = setup_cache((size_t)(2 * 1024 * 1024), (size_t)(1 * 1024 * 1024), paged, &api_ctx);
}
/* Push API context */
H5CX_push(&api_ctx);
u = 0;
while (pass && (u < NELMTS(test_specs))) {
check_move_entry__run_test(file_ptr, u, &(test_specs[u]));
@@ -10542,9 +10443,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() */
@@ -10733,7 +10631,7 @@ check_pin_protected_entry(unsigned paged)
reset_entries();
file_ptr = setup_cache((size_t)(2 * 1024 * 1024), (size_t)(1 * 1024 * 1024), paged);
file_ptr = setup_cache((size_t)(2 * 1024 * 1024), (size_t)(1 * 1024 * 1024), paged, &api_ctx);
if (file_ptr == NULL) {
@@ -10742,9 +10640,6 @@ check_pin_protected_entry(unsigned paged)
}
}
/* Push API context */
H5CX_push(&api_ctx);
if (pass) {
protect_entry(file_ptr, 0, 0);
@@ -10794,9 +10689,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() */
@@ -10870,7 +10762,7 @@ check_resize_entry(unsigned paged)
reset_entries();
file_ptr = setup_cache((size_t)(2 * 1024 * 1024), (size_t)(1 * 1024 * 1024), paged);
file_ptr = setup_cache((size_t)(2 * 1024 * 1024), (size_t)(1 * 1024 * 1024), paged, &api_ctx);
if (file_ptr == NULL) {
@@ -10886,9 +10778,6 @@ check_resize_entry(unsigned paged)
}
}
/* Push API context */
H5CX_push(&api_ctx);
if (pass) {
if ((cache_ptr->index_len != 0) || (cache_ptr->index_size != 0) || (cache_ptr->slist_len != 0) ||
@@ -11659,9 +11548,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() */
@@ -11742,7 +11628,7 @@ check_evictions_enabled(unsigned paged)
reset_entries();
file_ptr = setup_cache((size_t)(1 * 1024 * 1024), (size_t)(512 * 1024), paged);
file_ptr = setup_cache((size_t)(1 * 1024 * 1024), (size_t)(512 * 1024), paged, &api_ctx);
if (file_ptr == NULL) {
@@ -11756,9 +11642,6 @@ check_evictions_enabled(unsigned paged)
}
}
/* Push API context */
H5CX_push(&api_ctx);
if (show_progress) /* 2 */
fprintf(stdout, "%s() - %0d -- pass = %d\n", __func__, mile_stone++, (int)pass);
@@ -12306,9 +12189,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() */
@@ -12343,13 +12223,10 @@ check_flush_protected_err(unsigned paged)
*/
reset_entries();
file_ptr = setup_cache((size_t)(2 * 1024), (size_t)(1 * 1024), paged);
file_ptr = setup_cache((size_t)(2 * 1024), (size_t)(1 * 1024), paged, &api_ctx);
if (pass)
cache_ptr = file_ptr->shared->cache;
/* Push API context */
H5CX_push(&api_ctx);
if (pass)
protect_entry(file_ptr, 0, 0);
@@ -12395,9 +12272,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() */
@@ -12433,12 +12307,9 @@ check_destroy_pinned_err(unsigned paged)
reset_entries();
file_ptr = setup_cache((size_t)(2 * 1024), (size_t)(1 * 1024), paged);
file_ptr = setup_cache((size_t)(2 * 1024), (size_t)(1 * 1024), paged, &api_ctx);
}
/* Push API context */
H5CX_push(&api_ctx);
if (pass) {
protect_entry(file_ptr, 0, 0);
unprotect_entry(file_ptr, 0, 0, H5C__PIN_ENTRY_FLAG);
@@ -12485,9 +12356,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() */
@@ -12524,12 +12392,9 @@ check_destroy_protected_err(unsigned paged)
reset_entries();
file_ptr = setup_cache((size_t)(2 * 1024), (size_t)(1 * 1024), paged);
file_ptr = setup_cache((size_t)(2 * 1024), (size_t)(1 * 1024), paged, &api_ctx);
}
/* Push API context */
H5CX_push(&api_ctx);
if (pass) {
/* Note: normally this call would go just before the series of
* flushes prior to file close -- in particular, all entries
@@ -12584,9 +12449,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() */
@@ -12626,12 +12488,9 @@ check_duplicate_insert_err(unsigned paged)
reset_entries();
file_ptr = setup_cache((size_t)(2 * 1024), (size_t)(1 * 1024), paged);
file_ptr = setup_cache((size_t)(2 * 1024), (size_t)(1 * 1024), paged, &api_ctx);
}
/* Push API context */
H5CX_push(&api_ctx);
if (pass) {
protect_entry(file_ptr, 0, 0);
@@ -12669,9 +12528,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() */
@@ -12711,12 +12567,9 @@ check_double_pin_err(unsigned paged)
reset_entries();
file_ptr = setup_cache((size_t)(2 * 1024), (size_t)(1 * 1024), paged);
file_ptr = setup_cache((size_t)(2 * 1024), (size_t)(1 * 1024), paged, &api_ctx);
}
/* Push API context */
H5CX_push(&api_ctx);
if (pass) {
protect_entry(file_ptr, 0, 0);
@@ -12759,9 +12612,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() */
@@ -12803,12 +12653,9 @@ check_double_unpin_err(unsigned paged)
reset_entries();
file_ptr = setup_cache((size_t)(2 * 1024), (size_t)(1 * 1024), paged);
file_ptr = setup_cache((size_t)(2 * 1024), (size_t)(1 * 1024), paged, &api_ctx);
}
/* Push API context */
H5CX_push(&api_ctx);
if (pass) {
protect_entry(file_ptr, 0, 0);
@@ -12858,9 +12705,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() */
@@ -12906,12 +12750,9 @@ check_pin_entry_errs(unsigned paged)
reset_entries();
file_ptr = setup_cache((size_t)(2 * 1024), (size_t)(1 * 1024), paged);
file_ptr = setup_cache((size_t)(2 * 1024), (size_t)(1 * 1024), paged, &api_ctx);
}
/* Push API context */
H5CX_push(&api_ctx);
if (pass) {
protect_entry(file_ptr, 0, 0);
@@ -12971,9 +12812,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() */
@@ -13012,12 +12850,9 @@ check_double_protect_err(unsigned paged)
reset_entries();
file_ptr = setup_cache((size_t)(2 * 1024), (size_t)(1 * 1024), paged);
file_ptr = setup_cache((size_t)(2 * 1024), (size_t)(1 * 1024), paged, &api_ctx);
}
/* Push API context */
H5CX_push(&api_ctx);
if (pass) {
protect_entry(file_ptr, 0, 0);
@@ -13058,9 +12893,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() */
@@ -13099,12 +12931,9 @@ check_double_unprotect_err(unsigned paged)
reset_entries();
file_ptr = setup_cache((size_t)(2 * 1024), (size_t)(1 * 1024), paged);
file_ptr = setup_cache((size_t)(2 * 1024), (size_t)(1 * 1024), paged, &api_ctx);
}
/* Push API context */
H5CX_push(&api_ctx);
if (pass) {
protect_entry(file_ptr, 0, 0);
@@ -13141,9 +12970,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() */
@@ -13186,12 +13012,9 @@ check_mark_entry_dirty_errs(unsigned paged)
reset_entries();
file_ptr = setup_cache((size_t)(2 * 1024), (size_t)(1 * 1024), paged);
file_ptr = setup_cache((size_t)(2 * 1024), (size_t)(1 * 1024), paged, &api_ctx);
}
/* Push API context */
H5CX_push(&api_ctx);
if (pass) {
protect_entry(file_ptr, 0, 0);
@@ -13228,9 +13051,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() */
@@ -13276,12 +13096,9 @@ check_expunge_entry_errs(unsigned paged)
reset_entries();
file_ptr = setup_cache((size_t)(2 * 1024), (size_t)(1 * 1024), paged);
file_ptr = setup_cache((size_t)(2 * 1024), (size_t)(1 * 1024), paged, &api_ctx);
}
/* Push API context */
H5CX_push(&api_ctx);
if (pass) {
entry_ptr = &((entries[0])[0]);
@@ -13346,9 +13163,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() */
@@ -13389,13 +13203,10 @@ check_move_entry_errs(unsigned paged)
if (pass) {
reset_entries();
file_ptr = setup_cache((size_t)(2 * 1024), (size_t)(1 * 1024), paged);
file_ptr = setup_cache((size_t)(2 * 1024), (size_t)(1 * 1024), paged, &api_ctx);
cache_ptr = file_ptr->shared->cache;
}
/* Push API context */
H5CX_push(&api_ctx);
if (pass) {
insert_entry(file_ptr, 0, 0, H5C__NO_FLAGS_SET);
insert_entry(file_ptr, 0, 1, H5C__NO_FLAGS_SET);
@@ -13427,9 +13238,6 @@ check_move_entry_errs(unsigned paged)
if (pass)
takedown_cache(file_ptr, false, false);
/* Pop API context */
H5CX_pop(false);
/* Allocate a cache, protect an entry R/O, and then call
* H5C_move_entry() to move it -- this should fail.
*
@@ -13440,13 +13248,10 @@ check_move_entry_errs(unsigned paged)
if (pass) {
reset_entries();
file_ptr = setup_cache((size_t)(2 * 1024), (size_t)(1 * 1024), paged);
file_ptr = setup_cache((size_t)(2 * 1024), (size_t)(1 * 1024), paged, &api_ctx);
cache_ptr = file_ptr->shared->cache;
}
/* Push API context */
H5CX_push(&api_ctx);
if (pass) {
insert_entry(file_ptr, 0, 0, H5C__NO_FLAGS_SET);
protect_entry_ro(file_ptr, 0, 0);
@@ -13476,9 +13281,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() */
@@ -13523,12 +13325,9 @@ check_resize_entry_errs(unsigned paged)
reset_entries();
file_ptr = setup_cache((size_t)(2 * 1024), (size_t)(1 * 1024), paged);
file_ptr = setup_cache((size_t)(2 * 1024), (size_t)(1 * 1024), paged, &api_ctx);
}
/* Push API context */
H5CX_push(&api_ctx);
if (pass) {
entry_ptr = &((entries[0])[0]);
@@ -13582,9 +13381,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() */
@@ -13623,12 +13419,9 @@ check_unprotect_ro_dirty_err(unsigned paged)
reset_entries();
file_ptr = setup_cache((size_t)(2 * 1024), (size_t)(1 * 1024), paged);
file_ptr = setup_cache((size_t)(2 * 1024), (size_t)(1 * 1024), paged, &api_ctx);
}
/* Push API context */
H5CX_push(&api_ctx);
if (pass) {
protect_entry_ro(file_ptr, 0, 0);
@@ -13656,9 +13449,6 @@ check_unprotect_ro_dirty_err(unsigned paged)
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.
@@ -13669,12 +13459,9 @@ check_unprotect_ro_dirty_err(unsigned paged)
reset_entries();
file_ptr = setup_cache((size_t)(2 * 1024), (size_t)(1 * 1024), paged);
file_ptr = setup_cache((size_t)(2 * 1024), (size_t)(1 * 1024), paged, &api_ctx);
}
/* Push API context */
H5CX_push(&api_ctx);
if (pass) {
protect_entry_ro(file_ptr, 0, 0);
protect_entry_ro(file_ptr, 0, 0);
@@ -13716,9 +13503,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() */
@@ -13758,12 +13542,9 @@ check_protect_ro_rw_err(unsigned paged)
reset_entries();
file_ptr = setup_cache((size_t)(2 * 1024), (size_t)(1 * 1024), paged);
file_ptr = setup_cache((size_t)(2 * 1024), (size_t)(1 * 1024), paged, &api_ctx);
}
/* Push API context */
H5CX_push(&api_ctx);
if (pass) {
protect_entry_ro(file_ptr, 0, 0);
@@ -13804,9 +13585,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() */
@@ -13844,16 +13622,13 @@ check_protect_retries(unsigned paged)
reset_entries();
file_ptr = setup_cache((size_t)(2 * 1024), (size_t)(1 * 1024), paged);
file_ptr = setup_cache((size_t)(2 * 1024), (size_t)(1 * 1024), paged, &api_ctx);
/* Set up read attempts for verifying checksum */
file_ptr->shared->read_attempts = 10;
file_ptr->shared->retries_nbins = 1;
}
/* Push API context */
H5CX_push(&api_ctx);
/* Test only for this type which has a speculative load */
type = VARIABLE_ENTRY_TYPE;
idx = 0;
@@ -13937,9 +13712,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() */
@@ -13987,13 +13759,10 @@ check_check_evictions_enabled_err(unsigned paged)
reset_entries();
file_ptr = setup_cache((size_t)(2 * 1024), (size_t)(1 * 1024), paged);
file_ptr = setup_cache((size_t)(2 * 1024), (size_t)(1 * 1024), paged, &api_ctx);
cache_ptr = file_ptr->shared->cache;
}
/* Push API context */
H5CX_push(&api_ctx);
if (pass) {
result = H5C_get_evictions_enabled(NULL, &evictions_enabled);
@@ -14076,9 +13845,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() */
@@ -14178,13 +13944,10 @@ check_auto_cache_resize(bool cork_ageout, unsigned paged)
if (pass) {
reset_entries();
file_ptr = setup_cache((size_t)(2 * 1024), (size_t)(1 * 1024), paged);
file_ptr = setup_cache((size_t)(2 * 1024), (size_t)(1 * 1024), paged, &api_ctx);
cache_ptr = file_ptr->shared->cache;
}
/* Push API context */
H5CX_push(&api_ctx);
if (pass) {
result = H5C_set_cache_auto_resize_config(cache_ptr, &auto_size_ctl);
if (result != SUCCEED) {
@@ -17944,9 +17707,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() */
@@ -18032,7 +17792,7 @@ check_auto_cache_resize_disable(unsigned paged)
reset_entries();
file_ptr = setup_cache((size_t)(2 * 1024), (size_t)(1 * 1024), paged);
file_ptr = setup_cache((size_t)(2 * 1024), (size_t)(1 * 1024), paged, &api_ctx);
if (file_ptr == NULL) {
@@ -18045,9 +17805,6 @@ check_auto_cache_resize_disable(unsigned paged)
}
}
/* Push API context */
H5CX_push(&api_ctx);
if (pass) {
result = H5C_set_cache_auto_resize_config(cache_ptr, &auto_size_ctl);
@@ -20543,9 +20300,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() */
@@ -20627,13 +20381,10 @@ check_auto_cache_resize_epoch_markers(unsigned paged)
reset_entries();
file_ptr = setup_cache((size_t)(2 * 1024), (size_t)(1 * 1024), paged);
file_ptr = setup_cache((size_t)(2 * 1024), (size_t)(1 * 1024), paged, &api_ctx);
cache_ptr = file_ptr->shared->cache;
}
/* Push API context */
H5CX_push(&api_ctx);
if (pass) {
result = H5C_set_cache_auto_resize_config(cache_ptr, &auto_size_ctl);
@@ -21231,9 +20982,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() */
@@ -21317,13 +21065,10 @@ check_auto_cache_resize_input_errs(unsigned paged)
reset_entries();
file_ptr = setup_cache((size_t)(2 * 1024), (size_t)(1 * 1024), paged);
file_ptr = setup_cache((size_t)(2 * 1024), (size_t)(1 * 1024), paged, &api_ctx);
cache_ptr = file_ptr->shared->cache;
}
/* Push API context */
H5CX_push(&api_ctx);
if (pass) {
result = H5C_set_cache_auto_resize_config(cache_ptr, &ref_auto_size_ctl);
@@ -23448,9 +23193,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() */
@@ -23538,13 +23280,10 @@ check_auto_cache_resize_aux_fcns(unsigned paged)
reset_entries();
file_ptr = setup_cache((size_t)(2 * 1024), (size_t)(1 * 1024), paged);
file_ptr = setup_cache((size_t)(2 * 1024), (size_t)(1 * 1024), paged, &api_ctx);
cache_ptr = file_ptr->shared->cache;
}
/* Push API context */
H5CX_push(&api_ctx);
if (pass) {
result = H5C_set_cache_auto_resize_config(cache_ptr, &auto_size_ctl);
@@ -23940,9 +23679,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() */
@@ -24049,7 +23785,7 @@ check_metadata_blizzard_absence(bool fill_via_insertion, unsigned paged)
* The max_cache_size should have room for 50 entries.
* The min_clean_size is half of that, or 25 entries.
*/
file_ptr = setup_cache((size_t)(50 * entry_size), (size_t)(25 * entry_size), paged);
file_ptr = setup_cache((size_t)(50 * entry_size), (size_t)(25 * entry_size), paged, &api_ctx);
if (file_ptr == NULL) {
@@ -24060,9 +23796,6 @@ check_metadata_blizzard_absence(bool fill_via_insertion, unsigned paged)
cache_ptr = file_ptr->shared->cache;
}
/* Push API context */
H5CX_push(&api_ctx);
if (show_progress) /* 1 */
fprintf(stdout, "%s: check point %d -- pass %d\n", __func__, checkpoint++, pass);
@@ -24675,9 +24408,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() */
@@ -24726,16 +24456,13 @@ check_flush_deps(unsigned paged)
*/
reset_entries();
file_ptr = setup_cache((size_t)(2 * 1024), (size_t)(1 * 1024), paged);
file_ptr = setup_cache((size_t)(2 * 1024), (size_t)(1 * 1024), paged, &api_ctx);
cache_ptr = file_ptr->shared->cache;
base_addr = entries[entry_type];
if (!pass)
CACHE_ERROR("setup_cache failed")
/* Push API context */
H5CX_push(&api_ctx);
/* Insert entries to work with into the cache */
for (u = 0; u < 5; u++) {
insert_entry(file_ptr, entry_type, (int32_t)u, H5C__NO_FLAGS_SET);
@@ -26602,9 +26329,6 @@ done:
fprintf(stdout, "%s.\n", failure_mssg);
} /* end else */
/* Pop API context */
H5CX_pop(false);
return (unsigned)!pass;
} /* check_flush_deps() */
@@ -26642,13 +26366,10 @@ check_flush_deps_err(unsigned paged)
/* Allocate a cache */
reset_entries();
file_ptr = setup_cache((size_t)(2 * 1024), (size_t)(1 * 1024), paged);
file_ptr = setup_cache((size_t)(2 * 1024), (size_t)(1 * 1024), paged, &api_ctx);
if (!pass)
CACHE_ERROR("setup_cache failed")
/* Push API context */
H5CX_push(&api_ctx);
/* Insert entries to work with into the cache */
for (u = 0; u < 10; u++) {
insert_entry(file_ptr, entry_type, (int32_t)u, H5C__NO_FLAGS_SET);
@@ -26856,20 +26577,16 @@ check_flush_deps_err(unsigned paged)
} /* end switch */
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) {
if (file_ptr)
takedown_cache(file_ptr, false, false);
/* Pop API context */
H5CX_pop(false);
}
if (pass)
PASSED();
@@ -26926,15 +26643,12 @@ check_flush_deps_order(unsigned paged)
*/
reset_entries();
file_ptr = setup_cache((size_t)(2 * 1024), (size_t)(1 * 1024), paged);
file_ptr = setup_cache((size_t)(2 * 1024), (size_t)(1 * 1024), paged, &api_ctx);
cache_ptr = file_ptr->shared->cache;
if (!pass)
CACHE_ERROR("setup_cache failed")
/* Push API context */
H5CX_push(&api_ctx);
/* Insert entries to work with into the cache */
for (u = 0; u < 5; u++) {
insert_entry(file_ptr, entry_type, (int32_t)u, H5C__NO_FLAGS_SET);
@@ -29609,9 +29323,6 @@ done:
fprintf(stdout, "%s.\n", failure_mssg);
} /* end else */
/* Pop API context */
H5CX_pop(false);
return (unsigned)!pass;
} /* check_flush_deps_order() */
@@ -29660,7 +29371,7 @@ check_notify_cb(unsigned paged)
*/
reset_entries();
file_ptr = setup_cache((size_t)(2 * 1024), (size_t)(1 * 1024), paged);
file_ptr = setup_cache((size_t)(2 * 1024), (size_t)(1 * 1024), paged, &api_ctx);
if (!file_ptr)
CACHE_ERROR("setup_cache returned NULL")
cache_ptr = file_ptr->shared->cache;
@@ -29669,9 +29380,6 @@ check_notify_cb(unsigned paged)
if (!pass)
CACHE_ERROR("setup_cache failed")
/* Push API context */
H5CX_push(&api_ctx);
/* Insert entries to work with into the cache */
for (u = 0; u < 5; u++) {
insert_entry(file_ptr, entry_type, (int32_t)u, H5C__NO_FLAGS_SET);
@@ -29829,9 +29537,6 @@ done:
fprintf(stdout, "%s.\n", failure_mssg);
} /* end else */
/* Pop API context */
H5CX_pop(false);
return (unsigned)!pass;
} /* check_notify_cb() */
@@ -29921,7 +29626,7 @@ check_metadata_cork(bool fill_via_insertion, unsigned paged)
* The max_cache_size should have room for 50 entries.
* The min_clean_size is half of that, or 25 entries.
*/
file_ptr = setup_cache((size_t)(50 * entry_size), (size_t)(25 * entry_size), paged);
file_ptr = setup_cache((size_t)(50 * entry_size), (size_t)(25 * entry_size), paged, &api_ctx);
if (file_ptr == NULL) {
@@ -29932,9 +29637,6 @@ check_metadata_cork(bool fill_via_insertion, unsigned paged)
cache_ptr = file_ptr->shared->cache;
}
/* Push API context */
H5CX_push(&api_ctx);
/* Cork the cache entry type */
cork_entry_type(file_ptr, entry_type);
@@ -30423,9 +30125,6 @@ check_metadata_cork(bool fill_via_insertion, unsigned paged)
H5_FAILED();
}
/* Pop API context */
H5CX_pop(false);
return (unsigned)!pass;
} /* check_metadata_cork() */
@@ -30474,12 +30173,9 @@ check_entry_deletions_during_scans(unsigned paged)
reset_entries();
file_ptr = setup_cache((size_t)(2 * 1024 * 1024), (size_t)(1 * 1024 * 1024), paged);
file_ptr = setup_cache((size_t)(2 * 1024 * 1024), (size_t)(1 * 1024 * 1024), paged, &api_ctx);
}
/* Push API context */
H5CX_push(&api_ctx);
/* run the tests. This set of tests is somewhat eclectic, as
* we are trying to test all locations where the deletion of
* an entry from the cache as a side effect of the fluch of
@@ -30520,9 +30216,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() */
@@ -31895,10 +31588,7 @@ check_stats(unsigned paged)
reset_entries();
file_ptr = setup_cache((size_t)(2 * 1024 * 1024), (size_t)(1 * 1024 * 1024), paged);
/* Push API context */
H5CX_push(&api_ctx);
file_ptr = setup_cache((size_t)(2 * 1024 * 1024), (size_t)(1 * 1024 * 1024), paged, &api_ctx);
if (pass) {
@@ -31922,9 +31612,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();
@@ -32367,20 +32054,19 @@ check_write_permitted(const H5F_t H5_ATTR_UNUSED *f, bool *write_permitted_ptr)
*****************************************************************************/
H5F_t *
setup_cache(size_t max_cache_size, size_t min_clean_size, unsigned paged)
setup_cache(size_t max_cache_size, size_t min_clean_size, unsigned paged, H5CX_node_t *api_ctx)
{
char filename[512];
bool show_progress = false;
bool verbose = true;
int mile_stone = 1;
hid_t fid = H5I_INVALID_HID;
H5F_t *file_ptr = NULL;
H5C_t *cache_ptr = NULL;
H5F_t *ret_val = NULL;
haddr_t actual_base_addr;
hid_t fapl_id = H5P_DEFAULT;
hid_t fcpl_id = H5P_DEFAULT;
H5CX_node_t api_ctx = {{0}, NULL}; /* API context node to push */
char filename[512];
bool show_progress = false;
bool verbose = true;
int mile_stone = 1;
hid_t fid = H5I_INVALID_HID;
H5F_t *file_ptr = NULL;
H5C_t *cache_ptr = NULL;
H5F_t *ret_val = NULL;
haddr_t actual_base_addr;
hid_t fapl_id = H5P_DEFAULT;
hid_t fcpl_id = H5P_DEFAULT;
if (show_progress) /* 1 */
fprintf(stdout, "%s() - %0d -- pass = %d\n", __func__, mile_stone++, (int)pass);
@@ -32471,7 +32157,7 @@ setup_cache(size_t max_cache_size, size_t min_clean_size, unsigned paged)
} /* end if */
/* Push API context */
H5CX_push(&api_ctx);
H5CX_push(api_ctx);
if (show_progress) /* 4 */
fprintf(stdout, "%s() - %0d -- pass = %d\n", __func__, mile_stone++, (int)pass);