summaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorQuincey Koziol <koziol@hdfgroup.org>2010-05-05 13:39:56 (GMT)
committerQuincey Koziol <koziol@hdfgroup.org>2010-05-05 13:39:56 (GMT)
commit74c8b68acab0fc2408740e7a38a2ab2bcdf58f57 (patch)
treed0d2da7ac1ea824f0ef78e757ace31a85bc4b6aa /test
parent4c0421ba76a7615cc02f43b8f3778f5d6a1f4d68 (diff)
downloadhdf5-74c8b68acab0fc2408740e7a38a2ab2bcdf58f57.zip
hdf5-74c8b68acab0fc2408740e7a38a2ab2bcdf58f57.tar.gz
hdf5-74c8b68acab0fc2408740e7a38a2ab2bcdf58f57.tar.bz2
[svn-r18702] Description:
Bring r18672 from metadata journaling "merging" branch to trunk: Mostly changes to move to only using one 'user data' parameter for calls to H5AC_protect(), along with some minor reformatting code cleanups. Tested on: FreeBSD/32 6.3 (duty) in debug mode FreeBSD/64 6.3 (liberty) w/C++ & FORTRAN, in debug mode Linux/32 2.6 (jam) w/PGI compilers, w/default API=1.8.x, w/C++ & FORTRAN, w/threadsafe, in debug mode Linux/64-amd64 2.6 (amani) w/Intel compilers, w/default API=1.6.x, w/C++ & FORTRAN, in production mode Solaris/32 2.10 (linew) w/deprecated symbols disabled, w/C++ & FORTRAN, w/szip filter, in production mode Linux/64-ia64 2.6 (cobalt) w/Intel compilers, w/C++ & FORTRAN, in production mode Linux/64-amd64 2.6 (abe) w/parallel, w/FORTRAN, in production mode Mac OS X/32 10.6.3 (amazon) in debug mode Mac OS X/32 10.6.3 (amazon) w/C++ & FORTRAN, w/threadsafe, in production mode
Diffstat (limited to 'test')
-rw-r--r--test/cache.c97
-rw-r--r--test/cache_api.c9
-rw-r--r--test/cache_common.c302
-rw-r--r--test/cache_common.h36
-rw-r--r--test/earray.c8
5 files changed, 134 insertions, 318 deletions
diff --git a/test/cache.c b/test/cache.c
index e02f14a..364ec75 100644
--- a/test/cache.c
+++ b/test/cache.c
@@ -256,7 +256,7 @@ smoke_check_1(void)
/* flush and destroy all entries in the cache: */
- flush_cache(/* file_ptr */ file_ptr,
+ flush_cache(/* file_ptr */ file_ptr,
/* destroy_entries */ TRUE,
/* dump_stats */ FALSE,
/* dump_detailed_stats */ FALSE);
@@ -281,7 +281,7 @@ smoke_check_1(void)
/* flush all entries in the cache: */
- flush_cache(/* file_ptr */ file_ptr,
+ flush_cache(/* file_ptr */ file_ptr,
/* destroy_entries */ FALSE,
/* dump_stats */ FALSE,
/* dump_detailed_stats */ FALSE);
@@ -472,7 +472,7 @@ smoke_check_2(void)
/* flush all entries in the cache: */
- flush_cache(/* file_ptr */ file_ptr,
+ flush_cache(/* file_ptr */ file_ptr,
/* destroy_entries */ FALSE,
/* dump_stats */ FALSE,
/* dump_detailed_stats */ FALSE);
@@ -963,8 +963,8 @@ smoke_check_5(void)
/* enum H5C_cache_flash_incr_mode */
/* flash_incr_mode = */ H5C_flash_incr__off,
- /* double flash_multiple = */ 2.0,
- /* double flash_threshold = */ 0.5,
+ /* double flash_multiple = */ 2.0,
+ /* double flash_threshold = */ 0.5,
/* enum H5C_cache_decr_mode decr_mode = */ H5C_decr__threshold,
@@ -1205,8 +1205,8 @@ smoke_check_6(void)
/* enum H5C_cache_flash_incr_mode */
/* flash_incr_mode = */ H5C_flash_incr__off,
- /* double flash_multiple = */ 2.0,
- /* double flash_threshold = */ 0.5,
+ /* double flash_multiple = */ 2.0,
+ /* double flash_threshold = */ 0.5,
/* enum H5C_cache_decr_mode decr_mode = */ H5C_decr__threshold,
@@ -1444,8 +1444,8 @@ smoke_check_7(void)
/* enum H5C_cache_flash_incr_mode */
/* flash_incr_mode = */ H5C_flash_incr__off,
- /* double flash_multiple = */ 2.0,
- /* double flash_threshold = */ 0.5,
+ /* double flash_multiple = */ 2.0,
+ /* double flash_threshold = */ 0.5,
/* enum H5C_cache_decr_mode decr_mode = */
@@ -1684,8 +1684,8 @@ smoke_check_8(void)
/* enum H5C_cache_flash_incr_mode */
/* flash_incr_mode = */ H5C_flash_incr__off,
- /* double flash_multiple = */ 2.0,
- /* double flash_threshold = */ 0.5,
+ /* double flash_multiple = */ 2.0,
+ /* double flash_threshold = */ 0.5,
/* enum H5C_cache_decr_mode decr_mode = */
@@ -4973,7 +4973,7 @@ check_flush_cache__multi_entry_test(H5F_t * file_ptr,
struct flush_cache_test_spec spec[])
{
/* const char * fcn_name = "check_flush_cache__multi_entry_test"; */
- H5C_t * cache_ptr = file_ptr->shared->cache;
+ H5C_t * cache_ptr = file_ptr->shared->cache;
static char msg[128];
herr_t result;
int i;
@@ -6053,8 +6053,8 @@ check_flush_cache__flush_ops(H5F_t * file_ptr)
* which the call back function both resizes and renames the entry
* for which it has been called.
*
- * Again, we run this entry twice, as the first run moves the entry to its
- * alternate address, and the second moves it back.
+ * Again, we run this entry twice, as the first run moves the entry
+ * to its alternate address, and the second moves it back.
*/
int test_num = 9; /* and 10 */
unsigned int flush_flags = H5C__NO_FLAGS_SET;
@@ -9246,7 +9246,7 @@ check_flush_cache__flush_op_test(H5F_t * file_ptr,
struct fo_flush_entry_check check[])
{
const char * fcn_name = "check_flush_cache__flush_op_test";
- H5C_t *cache_ptr = file_ptr->shared->cache;
+ H5C_t * cache_ptr = file_ptr->shared->cache;
static char msg[128];
hbool_t show_progress = FALSE;
hbool_t verbose = FALSE;
@@ -13331,7 +13331,7 @@ check_flush_cache__pinned_single_entry_test(H5F_t * file_ptr,
hbool_t expected_destroyed)
{
/* const char *fcn_name = "check_flush_cache__pinned_single_entry_test"; */
- H5C_t *cache_ptr = file_ptr->shared->cache;
+ H5C_t * cache_ptr = file_ptr->shared->cache;
static char msg[128];
hbool_t expected_loaded = TRUE;
herr_t result;
@@ -13837,10 +13837,10 @@ check_expunge_entry(void)
if ( result < 0 ) {
- pass = FALSE;
- HDsnprintf(msg, (size_t)128,
- "H5C_get_entry_status() reports failure 2.");
- failure_mssg = msg;
+ pass = FALSE;
+ HDsnprintf(msg, (size_t)128,
+ "H5C_get_entry_status() reports failure 2.");
+ failure_mssg = msg;
} else if ( !in_cache || is_dirty || is_protected || is_pinned ) {
@@ -13881,10 +13881,10 @@ check_expunge_entry(void)
if ( result < 0 ) {
- pass = FALSE;
- HDsnprintf(msg, (size_t)128,
- "H5C_get_entry_status() reports failure 3.");
- failure_mssg = msg;
+ pass = FALSE;
+ HDsnprintf(msg, (size_t)128,
+ "H5C_get_entry_status() reports failure 3.");
+ failure_mssg = msg;
} else if ( in_cache ) {
@@ -13923,10 +13923,10 @@ check_expunge_entry(void)
if ( result < 0 ) {
- pass = FALSE;
- HDsnprintf(msg, (size_t)128,
- "H5C_get_entry_status() reports failure 4.");
- failure_mssg = msg;
+ pass = FALSE;
+ HDsnprintf(msg, (size_t)128,
+ "H5C_get_entry_status() reports failure 4.");
+ failure_mssg = msg;
} else if ( in_cache ) {
@@ -14611,7 +14611,7 @@ check_rename_entry__run_test(H5F_t * file_ptr,
struct rename_entry_test_spec * spec_ptr)
{
/* const char * fcn_name = "check_rename_entry__run_test"; */
- H5C_t *cache_ptr = file_ptr->shared->cache;
+ H5C_t * cache_ptr = file_ptr->shared->cache;
static char msg[128];
unsigned int flags = H5C__NO_FLAGS_SET;
test_entry_t * base_addr;
@@ -15898,7 +15898,7 @@ check_evictions_enabled(void)
HDfprintf(stdout, "%s() - %0d -- pass = %d\n",
fcn_name, mile_stone++, (int)pass);
- /* verivy that it is empty */
+ /* verify that it is empty */
if ( pass ) {
if ( ( cache_ptr->index_len != 0 ) ||
@@ -15985,7 +15985,7 @@ check_evictions_enabled(void)
HDfprintf(stdout, "%s() - %0d -- pass = %d\n",
fcn_name, mile_stone++, (int)pass);
- /* verify that the an entry has been evicted */
+ /* verify that an entry has been evicted */
if ( pass ) {
if ( ( cache_ptr->index_len != 16 ) ||
@@ -17320,7 +17320,7 @@ check_double_protect_err(void)
if ( pass ) {
cache_entry_ptr = (H5C_cache_entry_t *)H5C_protect(file_ptr, H5P_DATASET_XFER_DEFAULT, H5P_DATASET_XFER_DEFAULT,
- &(types[0]), entry_ptr->addr, NULL, NULL, H5C__NO_FLAGS_SET);
+ &(types[0]), entry_ptr->addr, NULL, H5C__NO_FLAGS_SET);
if ( cache_entry_ptr != NULL ) {
@@ -17977,7 +17977,7 @@ check_protect_ro_rw_err(void)
if ( pass ) {
thing_ptr = (H5C_cache_entry_t *)H5C_protect(file_ptr, H5P_DATASET_XFER_DEFAULT, H5P_DATASET_XFER_DEFAULT,
- &(types[0]), entry_ptr->addr, NULL, NULL, H5C__NO_FLAGS_SET);
+ &(types[0]), entry_ptr->addr, NULL, H5C__NO_FLAGS_SET);
if ( thing_ptr != NULL ) {
@@ -18223,8 +18223,8 @@ check_auto_cache_resize(void)
/* enum H5C_cache_flash_incr_mode */
/* flash_incr_mode = */ H5C_flash_incr__off,
- /* double flash_multiple = */ 2.0,
- /* double flash_threshold = */ 0.5,
+ /* double flash_multiple = */ 2.0,
+ /* double flash_threshold = */ 0.5,
/* enum H5C_cache_decr_mode decr_mode = */ H5C_decr__threshold,
@@ -18621,7 +18621,6 @@ check_auto_cache_resize(void)
auto_size_ctl.flash_multiple = 2.0;
auto_size_ctl.flash_threshold = 0.5;
-
auto_size_ctl.decr_mode = H5C_decr__threshold;
auto_size_ctl.upper_hr_threshold = 0.995;
@@ -18975,7 +18974,6 @@ check_auto_cache_resize(void)
auto_size_ctl.flash_multiple = 2.0;
auto_size_ctl.flash_threshold = 0.5;
-
auto_size_ctl.decr_mode = H5C_decr__threshold;
auto_size_ctl.upper_hr_threshold = 0.995;
@@ -19439,7 +19437,7 @@ check_auto_cache_resize(void)
}
}
- if ( show_progress ) HDfprintf(stderr, "*check point %d\n", checkpoint++);
+ if ( show_progress ) HDfprintf(stderr, "check point %d\n", checkpoint++);
/* now just bang on one entry -- after three epochs, this should
* get all entries other than the one evicted, and the cache size
@@ -21526,7 +21524,7 @@ check_auto_cache_resize(void)
if ( show_progress ) HDfprintf(stderr, "check point %d\n", checkpoint++);
- /* Load a second moster entry. Since the monster entry is larger
+ /* Load a second monster entry. Since the monster entry is larger
* than half the size of the cache yet again, and there is not
* sufficient space for the monster entry in the cache, we again
* add space to the cache to make space for the entry.
@@ -22816,7 +22814,6 @@ check_auto_cache_resize_disable(void)
auto_size_ctl.decr_mode = H5C_decr__threshold;
auto_size_ctl.upper_hr_threshold = 0.995;
-
auto_size_ctl.decrement = 0.5;
auto_size_ctl.apply_max_decrement = FALSE;
@@ -25071,6 +25068,7 @@ check_auto_cache_resize_disable(void)
if ( show_progress ) HDfprintf(stderr, "check point %d\n", checkpoint++);
+
/* Now test the flash cache size increment code to verify that it
* is disabled when it should be.
*
@@ -25098,7 +25096,6 @@ check_auto_cache_resize_disable(void)
* code enabled.
*/
-
if ( pass ) {
auto_size_ctl.version = H5C__CURR_AUTO_SIZE_CTL_VER;
@@ -25314,8 +25311,8 @@ check_auto_cache_resize_epoch_markers(void)
/* enum H5C_cache_flash_incr_mode */
/* flash_incr_mode = */ H5C_flash_incr__off,
- /* double flash_multiple = */ 2.0,
- /* double flash_threshold = */ 0.5,
+ /* double flash_multiple = */ 2.0,
+ /* double flash_threshold = */ 0.5,
/* enum H5C_cache_decr_mode decr_mode = */ H5C_decr__threshold,
@@ -25984,9 +25981,9 @@ check_auto_cache_resize_epoch_markers(void)
* Modifications:
*
* Added code to verify that errors in the flash cache size
- * increment related fields are caught as well.
+ * increment related fields are caught as well.
*
- * JRM -- 1/17/08
+ * JRM -- 1/17/08
*
*-------------------------------------------------------------------------
*/
@@ -26084,8 +26081,8 @@ check_auto_cache_resize_input_errs(void)
/* enum H5C_cache_flash_incr_mode */
/* flash_incr_mode = */ H5C_flash_incr__off,
- /* double flash_multiple = */ 2.0,
- /* double flash_threshold = */ 0.5,
+ /* double flash_multiple = */ 2.0,
+ /* double flash_threshold = */ 0.5,
/* enum H5C_cache_decr_mode decr_mode = */ H5C_decr__threshold,
@@ -27418,7 +27415,6 @@ check_auto_cache_resize_input_errs(void)
}
}
-
/* test for bad flash_incr_mode rejection */
if ( pass ) {
@@ -27790,6 +27786,7 @@ check_auto_cache_resize_input_errs(void)
}
}
+
/* test for bad decr_mode rejection */
if ( pass ) {
@@ -28501,8 +28498,8 @@ check_auto_cache_resize_aux_fcns(void)
/* enum H5C_cache_flash_incr_mode */
/* flash_incr_mode = */ H5C_flash_incr__off,
- /* double flash_multiple = */ 2.0,
- /* double flash_threshold = */ 0.5,
+ /* double flash_multiple = */ 2.0,
+ /* double flash_threshold = */ 0.5,
/* enum H5C_cache_decr_mode decr_mode = */ H5C_decr__off,
diff --git a/test/cache_api.c b/test/cache_api.c
index 796e303..e7ba7bd 100644
--- a/test/cache_api.c
+++ b/test/cache_api.c
@@ -25,6 +25,7 @@
#include "H5ACprivate.h"
#include "cache_common.h"
+
/* global variable declarations: */
/* macro definitions */
@@ -197,8 +198,7 @@ check_fapl_mdc_api_calls(void)
H5AC_cache_config_t default_config = H5AC__DEFAULT_CACHE_CONFIG;
H5AC_cache_config_t mod_config =
{
- /* int version = */
- H5AC__CURR_CACHE_CONFIG_VERSION,
+ /* int version = */ H5AC__CURR_CACHE_CONFIG_VERSION,
/* hbool_t rpt_fcn_enabled = */ FALSE,
/* hbool_t open_trace_file = */ FALSE,
/* hbool_t close_trace_file = */ FALSE,
@@ -356,9 +356,9 @@ check_fapl_mdc_api_calls(void)
pass = FALSE;
failure_mssg = "Can't get file_ptr.\n";
- } else {
+ } else {
- cache_ptr = file_ptr->shared->cache;
+ cache_ptr = file_ptr->shared->cache;
}
}
@@ -2021,6 +2021,7 @@ mdc_api_call_smoke_check(int express_test)
} /* mdc_api_call_smoke_check() */
+
/* The following array of invalid external MDC cache configurations is
* used to test error rejection in the MDC related API calls.
*/
diff --git a/test/cache_common.c b/test/cache_common.c
index 0c94a22..4326616 100644
--- a/test/cache_common.c
+++ b/test/cache_common.c
@@ -26,7 +26,7 @@
#include "H5MFprivate.h"
#include "cache_common.h"
-
+
/* global variable declarations: */
const char *FILENAME[] = {
@@ -293,8 +293,7 @@ static herr_t clear(H5F_t * f, void * thing, hbool_t dest);
static herr_t destroy(H5F_t * f, void * thing);
static herr_t flush(H5F_t *f, hid_t dxpl_id, hbool_t dest,
haddr_t addr, void *thing, unsigned UNUSED * flags_ptr);
-static void * load(H5F_t *f, hid_t dxpl_id, haddr_t addr,
- const void *udata1, void *udata2);
+static void * load(H5F_t *f, hid_t dxpl_id, haddr_t addr, void *udata);
static herr_t size(H5F_t * f, void * thing, size_t * size_ptr);
static herr_t notify(H5C_notify_action_t action, void *thing);
static void execute_flush_op(H5F_t *file_ptr, struct test_entry_t *entry_ptr,
@@ -316,8 +315,6 @@ static void execute_flush_op(H5F_t *file_ptr, struct test_entry_t *entry_ptr,
* Programmer: John Mainzer
* 6/10/04
*
- * Modifications:
- *
*-------------------------------------------------------------------------
*/
void
@@ -430,8 +427,6 @@ type_and_index_to_addr(int32_t type,
#endif
-/* Call back functions: */
-
/*-------------------------------------------------------------------------
*
* Function: check_if_write_permitted
@@ -449,8 +444,6 @@ type_and_index_to_addr(int32_t type,
*
* Programmer: John Mainzer, 5/15/04
*
- * Modifications:
- *
*-------------------------------------------------------------------------
*/
@@ -987,8 +980,7 @@ void *
load(H5F_t UNUSED *f,
hid_t UNUSED dxpl_id,
haddr_t addr,
- const void UNUSED *udata1,
- void UNUSED *udata2)
+ void UNUSED *udata)
{
int32_t type;
int32_t idx;
@@ -1033,80 +1025,69 @@ load(H5F_t UNUSED *f,
} /* load() */
void *
-pico_load(H5F_t *f, hid_t dxpl_id, haddr_t addr,
- const void *udata1, void *udata2)
+pico_load(H5F_t *f, hid_t dxpl_id, haddr_t addr, void *udata)
{
- return(load(f, dxpl_id, addr, udata1, udata2));
+ return(load(f, dxpl_id, addr, udata));
}
void *
-nano_load(H5F_t *f, hid_t dxpl_id, haddr_t addr,
- const void *udata1, void *udata2)
+nano_load(H5F_t *f, hid_t dxpl_id, haddr_t addr, void *udata)
{
- return(load(f, dxpl_id, addr, udata1, udata2));
+ return(load(f, dxpl_id, addr, udata));
}
void *
-micro_load(H5F_t *f, hid_t dxpl_id, haddr_t addr,
- const void *udata1, void *udata2)
+micro_load(H5F_t *f, hid_t dxpl_id, haddr_t addr, void *udata)
{
- return(load(f, dxpl_id, addr, udata1, udata2));
+ return(load(f, dxpl_id, addr, udata));
}
void *
-tiny_load(H5F_t *f, hid_t dxpl_id, haddr_t addr,
- const void *udata1, void *udata2)
+tiny_load(H5F_t *f, hid_t dxpl_id, haddr_t addr, void *udata)
{
- return(load(f, dxpl_id, addr, udata1, udata2));
+ return(load(f, dxpl_id, addr, udata));
}
void *
-small_load(H5F_t *f, hid_t dxpl_id, haddr_t addr,
- const void *udata1, void *udata2)
+small_load(H5F_t *f, hid_t dxpl_id, haddr_t addr, void *udata)
{
- return(load(f, dxpl_id, addr, udata1, udata2));
+ return(load(f, dxpl_id, addr, udata));
}
void *
-medium_load(H5F_t *f, hid_t dxpl_id, haddr_t addr,
- const void *udata1, void *udata2)
+medium_load(H5F_t *f, hid_t dxpl_id, haddr_t addr, void *udata)
{
- return(load(f, dxpl_id, addr, udata1, udata2));
+ return(load(f, dxpl_id, addr, udata));
}
void *
-large_load(H5F_t *f, hid_t dxpl_id, haddr_t addr,
- const void *udata1, void *udata2)
+large_load(H5F_t *f, hid_t dxpl_id, haddr_t addr, void *udata)
{
- return(load(f, dxpl_id, addr, udata1, udata2));
+ return(load(f, dxpl_id, addr, udata));
}
void *
-huge_load(H5F_t *f, hid_t dxpl_id, haddr_t addr,
- const void *udata1, void *udata2)
+huge_load(H5F_t *f, hid_t dxpl_id, haddr_t addr, void *udata)
{
- return(load(f, dxpl_id, addr, udata1, udata2));
+ return(load(f, dxpl_id, addr, udata));
}
void *
-monster_load(H5F_t *f, hid_t dxpl_id, haddr_t addr,
- const void *udata1, void *udata2)
+monster_load(H5F_t *f, hid_t dxpl_id, haddr_t addr, void *udata)
{
- return(load(f, dxpl_id, addr, udata1, udata2));
+ return(load(f, dxpl_id, addr, udata));
}
void *
-variable_load(H5F_t *f, hid_t dxpl_id, haddr_t addr,
- const void *udata1, void *udata2)
+variable_load(H5F_t *f, hid_t dxpl_id, haddr_t addr, void *udata)
{
- return(load(f, dxpl_id, addr, udata1, udata2));
+ return(load(f, dxpl_id, addr, udata));
}
void *
-notify_load(H5F_t *f, hid_t dxpl_id, haddr_t addr,
- const void *udata1, void *udata2)
+notify_load(H5F_t *f, hid_t dxpl_id, haddr_t addr, void *udata)
{
- return(load(f, dxpl_id, addr, udata1, udata2));
+ return(load(f, dxpl_id, addr, udata));
}
@@ -1316,8 +1297,6 @@ notify_notify(H5C_notify_action_t action, void *thing)
* Programmer: John Mainzer
* 9/1/06
*
- * Modifications:
- *
*-------------------------------------------------------------------------
*/
@@ -1390,8 +1369,6 @@ add_flush_op(int target_type,
* Programmer: John Mainzer
* 6/10/04
*
- * Modifications:
- *
*-------------------------------------------------------------------------
*/
@@ -1471,10 +1448,6 @@ create_pinned_entry_dependency(H5F_t * file_ptr,
* Programmer: John Mainzer
* 6/10/04
*
- * Modifications:
- *
- * None.
- *
*-------------------------------------------------------------------------
*/
@@ -1548,10 +1521,6 @@ dirty_entry(H5F_t * file_ptr,
* Programmer: John Mainzer
* 9/1/06
*
- * Modifications:
- *
- * None.
- *
*-------------------------------------------------------------------------
*/
@@ -1665,12 +1634,6 @@ execute_flush_op(H5F_t * file_ptr,
* Programmer: John Mainzer
* 6/10/04
*
- * Modifications:
- *
- * JRM - 10/12/04
- * Removed references to local_H5C_t, as we now get direct
- * access to the definition of H5C_t via H5Cpkg.h.
- *
*-------------------------------------------------------------------------
*/
@@ -1719,16 +1682,6 @@ entry_in_cache(H5C_t * cache_ptr,
* Programmer: John Mainzer
* 6/10/04
*
- * Modifications:
- *
- * JRM -- 3/31/06
- * Added initialization for new pinned entry test related
- * fields.
- *
- * JRM -- 4/1/07
- * Added initialization for the new is_read_only, and
- * ro_ref_count fields.
- *
*-------------------------------------------------------------------------
*/
@@ -1883,10 +1836,6 @@ reset_entries(void)
* Programmer: John Mainzer
* 6/10/04
*
- * Modifications:
- *
- * None.
- *
*-------------------------------------------------------------------------
*/
@@ -1950,23 +1899,19 @@ resize_entry(H5F_t * file_ptr,
/*-------------------------------------------------------------------------
- * Function: resize_pinned_entry
+ * Function: resize_pinned_entry
*
- * Purpose: Given a pointer to a cache, an entry type, an index, and
+ * Purpose: Given a pointer to a cache, an entry type, an index, and
* a new size, change the size of the target pinned entry
* to match the supplied new size.
*
- * Do nothing if pass is false on entry.
+ * Do nothing if pass is false on entry.
*
- * Return: void
+ * Return: void
*
- * Programmer: John Mainzer
+ * Programmer: John Mainzer
* 1/11/08
*
- * Modifications:
- *
- * None.
- *
*-------------------------------------------------------------------------
*/
@@ -1974,7 +1919,7 @@ void
resize_pinned_entry(H5C_t * cache_ptr,
int32_t type,
int32_t idx,
- size_t new_size)
+ size_t new_size)
{
herr_t result;
test_entry_t * base_addr;
@@ -1990,7 +1935,7 @@ resize_pinned_entry(H5C_t * cache_ptr,
if ( ! entry_in_cache(cache_ptr, type, idx) ) {
- pass = FALSE;
+ pass = FALSE;
failure_mssg = "entry not in cache.";
} else {
@@ -2009,23 +1954,23 @@ resize_pinned_entry(H5C_t * cache_ptr,
} else {
- entry_ptr->size = new_size;
+ entry_ptr->size = new_size;
result = H5C_resize_pinned_entry((void *)entry_ptr,
new_size);
- if ( result != SUCCEED ) {
+ if ( result != SUCCEED ) {
- pass = FALSE;
- failure_mssg = "error(s) in H5C_resize_pinned_entry().";
+ pass = FALSE;
+ failure_mssg = "error(s) in H5C_resize_pinned_entry().";
- } else {
+ } else {
- HDassert( entry_ptr->size = (entry_ptr->header).size );
+ HDassert( entry_ptr->size = (entry_ptr->header).size );
}
- }
- }
+ }
+ }
}
return;
@@ -2046,8 +1991,6 @@ resize_pinned_entry(H5C_t * cache_ptr,
* Programmer: John Mainzer
* 6/10/04
*
- * Modifications:
- *
*-------------------------------------------------------------------------
*/
@@ -2106,8 +2049,6 @@ verify_clean(void)
* Programmer: John Mainzer
* 10/8/04
*
- * Modifications:
- *
*-------------------------------------------------------------------------
*/
@@ -2134,7 +2075,7 @@ verify_entry_status(H5C_t * cache_ptr,
( expected[i].is_pinned ) ) ) {
pass = FALSE;
- sprintf(msg, "Contradictory data in expected[%d].\n", i);
+ sprintf(msg, "%d: Contradictory data in expected[%d].\n", tag, i);
failure_mssg = msg;
}
@@ -2467,8 +2408,6 @@ verify_entry_status(H5C_t * cache_ptr,
* Programmer: John Mainzer
* 6/10/04
*
- * Modifications:
- *
*-------------------------------------------------------------------------
*/
@@ -2541,10 +2480,10 @@ setup_cache(size_t max_cache_size,
hbool_t verbose = TRUE;
int mile_stone = 1;
hid_t fid = -1;
- haddr_t actual_base_addr;
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;
if ( show_progress ) /* 1 */
@@ -2892,17 +2831,12 @@ takedown_cache(H5F_t * file_ptr,
*
* Purpose: Expunge the entry indicated by the type and index.
*
- * Do nothing if pass is FALSE on entry.
*
* Return: void
*
* Programmer: John Mainzer
* 7/6/06
*
- * Modifications:
- *
- * None.
- *
*-------------------------------------------------------------------------
*/
@@ -2965,8 +2899,6 @@ expunge_entry(H5F_t * file_ptr,
* Programmer: John Mainzer
* 6/23/04
*
- * Modifications:
- *
*-------------------------------------------------------------------------
*/
@@ -3052,24 +2984,6 @@ flush_cache(H5F_t * file_ptr,
* Programmer: John Mainzer
* 6/16/04
*
- * Modifications:
- *
- * JRM -- 1/13/05
- * Updated function for the flags parameter in
- * H5C_insert_entry(), and to allow access to this parameter.
- *
- * JRM -- 6/17/05
- * The interface no longer permits clean inserts.
- * Accordingly, the dirty parameter is no longer meaningfull.
- *
- * JRM -- 4/5/06
- * Added code to initialize the new cache_ptr field of the
- * test_entry_t structure.
- *
- * JRM -- 8/10/06
- * Updated to reflect the fact that entries can now be
- * inserted pinned.
- *
*-------------------------------------------------------------------------
*/
@@ -3171,10 +3085,6 @@ insert_entry(H5F_t * file_ptr,
* Programmer: John Mainzer
* 3/28/06
*
- * Modifications:
- *
- * None.
- *
*-------------------------------------------------------------------------
*/
@@ -3206,11 +3116,11 @@ mark_pinned_entry_dirty(int32_t type,
entry_ptr->is_dirty = TRUE;
- if ( size_changed ) {
+ if ( size_changed ) {
- /* update entry size now to keep the sanity checks happy */
- entry_ptr->size = new_size;
- }
+ /* update entry size now to keep the sanity checks happy */
+ entry_ptr->size = new_size;
+ }
result = H5C_mark_pinned_entry_dirty((void *)entry_ptr,
size_changed,
@@ -3224,20 +3134,20 @@ mark_pinned_entry_dirty(int32_t type,
( entry_ptr->addr != entry_ptr->header.addr ) ) {
#if 0 /* This is useful debugging code -- keep it around */
- HDfprintf(stdout, "result = %ld.\n", (long)result);
- HDfprintf(stdout, "entry_ptr->header.is_dirty = %d.\n",
- (int)(entry_ptr->header.is_dirty));
- HDfprintf(stdout, "entry_ptr->header.is_pinned = %d.\n",
- (int)(entry_ptr->header.is_pinned));
- HDfprintf(stdout,
- "(entry_ptr->header.type != &(types[type])) = %d.\n",
- (int)(entry_ptr->header.type != &(types[type])));
- HDfprintf(stdout,
- "entry_ptr->size = %ld, entry_ptr->header.size = %ld.\n",
- (long)(entry_ptr->size), (long)(entry_ptr->header.size));
- HDfprintf(stdout,
- "entry_ptr->addr = %ld, entry_ptr->header.addr = %ld.\n",
- (long)(entry_ptr->addr), (long)(entry_ptr->header.addr));
+ HDfprintf(stdout, "result = %ld.\n", (long)result);
+ HDfprintf(stdout, "entry_ptr->header.is_dirty = %d.\n",
+ (int)(entry_ptr->header.is_dirty));
+ HDfprintf(stdout, "entry_ptr->header.is_pinned = %d.\n",
+ (int)(entry_ptr->header.is_pinned));
+ HDfprintf(stdout,
+ "(entry_ptr->header.type != &(types[type])) = %d.\n",
+ (int)(entry_ptr->header.type != &(types[type])));
+ HDfprintf(stdout,
+ "entry_ptr->size = %ld, entry_ptr->header.size = %ld.\n",
+ (long)(entry_ptr->size), (long)(entry_ptr->header.size));
+ HDfprintf(stdout,
+ "entry_ptr->addr = %ld, entry_ptr->header.addr = %ld.\n",
+ (long)(entry_ptr->addr), (long)(entry_ptr->header.addr));
#endif
pass = FALSE;
failure_mssg = "error in H5C_mark_pinned_entry_dirty().";
@@ -3265,10 +3175,6 @@ mark_pinned_entry_dirty(int32_t type,
* Programmer: John Mainzer
* 5/17/06
*
- * Modifications:
- *
- * None.
- *
*-------------------------------------------------------------------------
*/
@@ -3349,12 +3255,6 @@ mark_pinned_or_protected_entry_dirty(int32_t type,
* Programmer: John Mainzer
* 6/21/04
*
- * Modifications:
- *
- * JRM -- 6/17/05
- * Updated code to reflect the fact that renames automatically
- * dirty entries.
- *
*-------------------------------------------------------------------------
*/
@@ -3453,12 +3353,6 @@ rename_entry(H5C_t * cache_ptr,
* Programmer: John Mainzer
* 6/11/04
*
- * Modifications:
- *
- * - Modified call to H5C_protect to pass H5C__NO_FLAGS_SET in the
- * new flags parameter.
- * JRM -- 3/28/07
- *
*-------------------------------------------------------------------------
*/
@@ -3490,7 +3384,7 @@ protect_entry(H5F_t * file_ptr,
HDassert( !(entry_ptr->is_protected) );
cache_entry_ptr = (H5C_cache_entry_t *)H5C_protect(file_ptr, H5P_DATASET_XFER_DEFAULT, H5P_DATASET_XFER_DEFAULT,
- &(types[type]), entry_ptr->addr, NULL, NULL, H5C__NO_FLAGS_SET);
+ &(types[type]), entry_ptr->addr, NULL, H5C__NO_FLAGS_SET);
if ( ( cache_entry_ptr != (void *)entry_ptr ) ||
( !(entry_ptr->header.is_protected) ) ||
@@ -3554,10 +3448,6 @@ protect_entry(H5F_t * file_ptr,
* Programmer: John Mainzer
* 4/1/07
*
- * Modifications:
- *
- * - None.
- *
*-------------------------------------------------------------------------
*/
@@ -3591,7 +3481,7 @@ protect_entry_ro(H5F_t * file_ptr,
( entry_ptr->ro_ref_count > 0 ) ) );
cache_entry_ptr = (H5C_cache_entry_t *)H5C_protect(file_ptr, H5P_DATASET_XFER_DEFAULT, H5P_DATASET_XFER_DEFAULT,
- &(types[type]), entry_ptr->addr, NULL, NULL, H5C__READ_ONLY_FLAG);
+ &(types[type]), entry_ptr->addr, NULL, H5C__READ_ONLY_FLAG);
if ( ( cache_entry_ptr != (void *)entry_ptr ) ||
( !(entry_ptr->header.is_protected) ) ||
@@ -3696,10 +3586,6 @@ pin_entry(int32_t type,
* Programmer: John Mainzer
* 3/28/06
*
- * Modifications:
- *
- * None.
- *
*-------------------------------------------------------------------------
*/
@@ -3767,26 +3653,6 @@ unpin_entry(int32_t type,
* Programmer: John Mainzer
* 6/12/04
*
- * Modifications:
- *
- * JRM -- 1/7/05
- * Updated for the replacement of the deleted parameter in
- * H5C_unprotect() with the new flags parameter.
- *
- * JRM - 6/17/05
- * Modified function to use the new dirtied parameter of
- * H5C_unprotect().
- *
- * JRM -- 9/8/05
- * Update for new entry size parameter in H5C_unprotect().
- * We don't use them here for now.
- *
- * JRM -- 3/31/06
- * Update for pinned entries.
- *
- * JRM -- 4/1/07
- * Updated for new multiple read protects.
- *
*-------------------------------------------------------------------------
*/
@@ -3942,10 +3808,6 @@ unprotect_entry(H5F_t * file_ptr,
* Programmer: John Mainzer
* 8/31/06
*
- * Modifications:
- *
- * None.
- *
*-------------------------------------------------------------------------
*/
@@ -3957,7 +3819,6 @@ unprotect_entry_with_size_change(H5F_t * file_ptr,
size_t new_size)
{
const char * fcn_name = "unprotect_entry_with_size_change()";
- H5C_t *cache_ptr;
herr_t result;
hbool_t dirty_flag_set;
hbool_t pin_flag_set;
@@ -3967,10 +3828,13 @@ unprotect_entry_with_size_change(H5F_t * file_ptr,
test_entry_t * entry_ptr;
if ( pass ) {
+#ifndef NDEBUG
+ H5C_t * cache_ptr;
cache_ptr = file_ptr->shared->cache;
HDassert( cache_ptr );
+#endif /* NDEBUG */
HDassert( ( 0 <= type ) && ( type < NUMBER_OF_ENTRY_TYPES ) );
HDassert( ( 0 <= idx ) && ( idx <= max_indices[type] ) );
HDassert( new_size <= entry_sizes[type] );
@@ -4084,12 +3948,6 @@ unprotect_entry_with_size_change(H5F_t * file_ptr,
* Programmer: John Mainzer
* 6/12/04
*
- * Modifications:
- *
- * JRM -- 4/4/07
- * Added code supporting multiple read only protects.
- * Note that this increased the minimum lag to 10.
- *
*-------------------------------------------------------------------------
*/
@@ -4401,13 +4259,6 @@ row_major_scan_forward(H5F_t * file_ptr,
* Programmer: John Mainzer
* 10/21/04
*
- * Modifications:
- *
- * JRM -- 1/21/05
- * Added the max_index parameter to allow the caller to
- * throttle the size of the inner loop, and thereby the
- * execution time of the function.
- *
*-------------------------------------------------------------------------
*/
@@ -4822,13 +4673,6 @@ row_major_scan_backward(H5F_t * file_ptr,
* Programmer: John Mainzer
* 10/21/04
*
- * Modifications:
- *
- * JRM -- 1/21/05
- * Added the max_index parameter to allow the caller to
- * throttle the size of the inner loop, and thereby the
- * execution time of the function.
- *
*-------------------------------------------------------------------------
*/
@@ -5043,13 +4887,6 @@ col_major_scan_forward(H5F_t * file_ptr,
* Programmer: John Mainzer
* 19/25/04
*
- * Modifications:
- *
- * JRM -- 1/21/05
- * Added the max_index parameter to allow the caller to
- * throttle the size of the inner loop, and thereby the
- * execution time of the function.
- *
*-------------------------------------------------------------------------
*/
@@ -5169,8 +5006,6 @@ hl_col_major_scan_forward(H5F_t * file_ptr,
* Programmer: John Mainzer
* 6/23/04
*
- * Modifications:
- *
*-------------------------------------------------------------------------
*/
@@ -5287,13 +5122,6 @@ col_major_scan_backward(H5F_t * file_ptr,
* Programmer: John Mainzer
* 10/25/04
*
- * Modifications:
- *
- * JRM -- 1/21/05
- * Added the max_index parameter to allow the caller to
- * throttle the size of the inner loop, and thereby the
- * execution time of the function.
- *
*-------------------------------------------------------------------------
*/
diff --git a/test/cache_common.h b/test/cache_common.h
index 9a7ac9f..3714f6e 100644
--- a/test/cache_common.h
+++ b/test/cache_common.h
@@ -37,7 +37,7 @@
/* Macro to make error reporting easier */
#define CACHE_ERROR(s) {failure_mssg = "Line #" H5_TOSTRING(__LINE__) ": " s ; pass = FALSE; goto done;}
-#define NO_CHANGE -1
+#define NO_CHANGE -1
/* with apologies for the abuse of terminology... */
@@ -81,6 +81,7 @@
#define MAX_ENTRIES (10 * 1024)
+
/* The choice of the BASE_ADDR below is arbitrary -- it just has to be
* larger than the superblock.
*/
@@ -598,28 +599,17 @@ herr_t notify_flush(H5F_t *f, hid_t dxpl_id, hbool_t dest,
haddr_t addr, void *thing, unsigned * flags_ptr);
-void * pico_load(H5F_t *f, hid_t dxpl_id, haddr_t addr,
- const void *udata1, void *udata2);
-void * nano_load(H5F_t *f, hid_t dxpl_id, haddr_t addr,
- const void *udata1, void *udata2);
-void * micro_load(H5F_t *f, hid_t dxpl_id, haddr_t addr,
- const void *udata1, void *udata2);
-void * tiny_load(H5F_t *f, hid_t dxpl_id, haddr_t addr,
- const void *udata1, void *udata2);
-void * small_load(H5F_t *f, hid_t dxpl_id, haddr_t addr,
- const void *udata1, void *udata2);
-void * medium_load(H5F_t *f, hid_t dxpl_id, haddr_t addr,
- const void *udata1, void *udata2);
-void * large_load(H5F_t *f, hid_t dxpl_id, haddr_t addr,
- const void *udata1, void *udata2);
-void * huge_load(H5F_t *f, hid_t dxpl_id, haddr_t addr,
- const void *udata1, void *udata2);
-void * monster_load(H5F_t *f, hid_t dxpl_id, haddr_t addr,
- const void *udata1, void *udata2);
-void * variable_load(H5F_t *f, hid_t dxpl_id, haddr_t addr,
- const void *udata1, void *udata2);
-void * notify_load(H5F_t *f, hid_t dxpl_id, haddr_t addr,
- const void *udata1, void *udata2);
+void * pico_load(H5F_t *f, hid_t dxpl_id, haddr_t addr, void *udata);
+void * nano_load(H5F_t *f, hid_t dxpl_id, haddr_t addr, void *udata);
+void * micro_load(H5F_t *f, hid_t dxpl_id, haddr_t addr, void *udata);
+void * tiny_load(H5F_t *f, hid_t dxpl_id, haddr_t addr, void *udata);
+void * small_load(H5F_t *f, hid_t dxpl_id, haddr_t addr, void *udata);
+void * medium_load(H5F_t *f, hid_t dxpl_id, haddr_t addr, void *udata);
+void * large_load(H5F_t *f, hid_t dxpl_id, haddr_t addr, void *udata);
+void * huge_load(H5F_t *f, hid_t dxpl_id, haddr_t addr, void *udata);
+void * monster_load(H5F_t *f, hid_t dxpl_id, haddr_t addr, void *udata);
+void * variable_load(H5F_t *f, hid_t dxpl_id, haddr_t addr, void *udata);
+void * notify_load(H5F_t *f, hid_t dxpl_id, haddr_t addr, void *udata);
herr_t pico_size(H5F_t * f, void * thing, size_t * size_ptr);
diff --git a/test/earray.c b/test/earray.c
index c1584f9..fe9e9c1 100644
--- a/test/earray.c
+++ b/test/earray.c
@@ -1532,7 +1532,7 @@ test_flush_depend(hid_t fapl, H5EA_create_t *cparam, earray_test_param_t UNUSED
TEST_ERROR
/* Protect the base entry */
- if(NULL == (base_entry = (earray_test_t *)H5AC_protect(f, H5P_DATASET_XFER_DEFAULT, H5AC_EARRAY_TEST, base_addr, NULL, NULL, H5AC_WRITE)))
+ if(NULL == (base_entry = (earray_test_t *)H5AC_protect(f, H5P_DATASET_XFER_DEFAULT, H5AC_EARRAY_TEST, base_addr, NULL, H5AC_WRITE)))
TEST_ERROR
/* Unprotect & unpin the base entry */
@@ -1544,7 +1544,7 @@ test_flush_depend(hid_t fapl, H5EA_create_t *cparam, earray_test_param_t UNUSED
TEST_ERROR
/* Protect the test entry */
- if(NULL == (entry1 = (earray_test_t *)H5AC_protect(f, H5P_DATASET_XFER_DEFAULT, H5AC_EARRAY_TEST, addr1, NULL, NULL, H5AC_WRITE)))
+ if(NULL == (entry1 = (earray_test_t *)H5AC_protect(f, H5P_DATASET_XFER_DEFAULT, H5AC_EARRAY_TEST, addr1, NULL, H5AC_WRITE)))
TEST_ERROR
/* Unprotect & unpin the test entry */
@@ -1556,7 +1556,7 @@ test_flush_depend(hid_t fapl, H5EA_create_t *cparam, earray_test_param_t UNUSED
TEST_ERROR
/* Protect the test entry */
- if(NULL == (entry2 = (earray_test_t *)H5AC_protect(f, H5P_DATASET_XFER_DEFAULT, H5AC_EARRAY_TEST, addr2, NULL, NULL, H5AC_WRITE)))
+ if(NULL == (entry2 = (earray_test_t *)H5AC_protect(f, H5P_DATASET_XFER_DEFAULT, H5AC_EARRAY_TEST, addr2, NULL, H5AC_WRITE)))
TEST_ERROR
/* Unprotect & unpin the test entry */
@@ -1568,7 +1568,7 @@ test_flush_depend(hid_t fapl, H5EA_create_t *cparam, earray_test_param_t UNUSED
TEST_ERROR
/* Protect the test entry */
- if(NULL == (entry3 = (earray_test_t *)H5AC_protect(f, H5P_DATASET_XFER_DEFAULT, H5AC_EARRAY_TEST, addr3, NULL, NULL, H5AC_WRITE)))
+ if(NULL == (entry3 = (earray_test_t *)H5AC_protect(f, H5P_DATASET_XFER_DEFAULT, H5AC_EARRAY_TEST, addr3, NULL, H5AC_WRITE)))
TEST_ERROR
/* Unprotect & unpin the test entry */