summaryrefslogtreecommitdiffstats
path: root/test/cache_api.c
diff options
context:
space:
mode:
authorDana Robinson <derobins@hdfgroup.org>2016-05-24 14:46:42 (GMT)
committerDana Robinson <derobins@hdfgroup.org>2016-05-24 14:46:42 (GMT)
commitdd85db8cd290fec2706501346cb633e84814c2e9 (patch)
treee9178b35ef768726684648950e8417e76e4d4627 /test/cache_api.c
parent741f836b981b22a2a714ca497cc862c56d07535f (diff)
downloadhdf5-dd85db8cd290fec2706501346cb633e84814c2e9.zip
hdf5-dd85db8cd290fec2706501346cb633e84814c2e9.tar.gz
hdf5-dd85db8cd290fec2706501346cb633e84814c2e9.tar.bz2
[svn-r29957] Changes to cache_api.c
- Cleaned up mixed tabs and spaces that mis-aligned brackets. - Test functions now return hbool_t to match the global pass variable. - Main now returns EXIT_SUCCESS/EXIT_FAILURE. - The invalid_configs array is now allocated dynamically instead of statically. This reduces the frame size, removing some warnings and making it easier for platforms/compilers that have frame size issues (e.g.: zOS). Tested on: 64-bit Ubuntu Linux w/ gcc 5.3.1 Autotools serial
Diffstat (limited to 'test/cache_api.c')
-rw-r--r--test/cache_api.c1798
1 files changed, 388 insertions, 1410 deletions
diff --git a/test/cache_api.c b/test/cache_api.c
index eb4a7cc..59bb49d 100644
--- a/test/cache_api.c
+++ b/test/cache_api.c
@@ -33,15 +33,18 @@
/* private function declarations: */
-static unsigned check_fapl_mdc_api_calls(void);
+static hbool_t check_fapl_mdc_api_calls(void);
-static unsigned check_file_mdc_api_calls(void);
+static hbool_t check_file_mdc_api_calls(void);
-static unsigned mdc_api_call_smoke_check(int express_test);
+static hbool_t mdc_api_call_smoke_check(int express_test);
-static unsigned check_fapl_mdc_api_errs(void);
+static H5AC_cache_config_t * init_invalid_configs(void);
+
+static hbool_t check_fapl_mdc_api_errs(void);
+
+static hbool_t check_file_mdc_api_errs(void);
-static unsigned check_file_mdc_api_errs(void);
/**************************************************************************/
@@ -51,24 +54,24 @@ static unsigned check_file_mdc_api_errs(void);
/**************************************************************************/
/*-------------------------------------------------------------------------
- * Function: check_fapl_mdc_api_calls()
+ * Function: check_fapl_mdc_api_calls()
*
- * Purpose: Verify that the file access property list related
- * metadata cache related API calls are functioning
- * correctly.
+ * Purpose: Verify that the file access property list related
+ * metadata cache related API calls are functioning
+ * correctly.
*
- * Since we have tested the H5C code elsewhere, it should
- * be sufficient to verify that the desired configuration
- * data is getting to the cache.
+ * Since we have tested the H5C code elsewhere, it should
+ * be sufficient to verify that the desired configuration
+ * data is getting to the cache.
*
- * Return: void
+ * Return: Test pass status (TRUE/FALSE)
*
- * Programmer: John Mainzer
+ * Programmer: John Mainzer
* 4/12/04
*
*-------------------------------------------------------------------------
*/
-static unsigned
+static hbool_t
check_fapl_mdc_api_calls(void)
{
char filename[512];
@@ -131,13 +134,13 @@ check_fapl_mdc_api_calls(void)
if ( pass ) {
- fapl_id = H5Pcreate(H5P_FILE_ACCESS);
+ fapl_id = H5Pcreate(H5P_FILE_ACCESS);
- if ( fapl_id < 0 ) {
+ if ( fapl_id < 0 ) {
- pass = FALSE;
+ pass = FALSE;
failure_mssg = "H5Pcreate(H5P_FILE_ACCESS) failed.\n";
- }
+ }
}
if ( pass ) {
@@ -149,7 +152,7 @@ check_fapl_mdc_api_calls(void)
if ( result < 0 ) {
pass = FALSE;
- failure_mssg = "H5Pget_mdc_config() failed.\n";
+ failure_mssg = "H5Pget_mdc_config() failed.\n";
} else if (!CACHE_CONFIGS_EQUAL(default_config, scratch, TRUE, TRUE)) {
@@ -170,7 +173,7 @@ check_fapl_mdc_api_calls(void)
if ( result < 0 ) {
pass = FALSE;
- failure_mssg = "H5Pset_mdc_config() failed.\n";
+ failure_mssg = "H5Pset_mdc_config() failed.\n";
}
}
@@ -183,7 +186,7 @@ check_fapl_mdc_api_calls(void)
if ( result < 0 ) {
pass = FALSE;
- failure_mssg = "H5Pget_mdc_config() failed.\n";
+ failure_mssg = "H5Pget_mdc_config() failed.\n";
} else if ( ! CACHE_CONFIGS_EQUAL(mod_config, scratch, TRUE, TRUE) ) {
@@ -197,7 +200,7 @@ check_fapl_mdc_api_calls(void)
if ( H5Pclose(fapl_id) < 0 ) {
pass = FALSE;
- failure_mssg = "H5Pclose() failed.\n";
+ failure_mssg = "H5Pclose() failed.\n";
}
}
@@ -239,11 +242,11 @@ check_fapl_mdc_api_calls(void)
if ( file_ptr == NULL ) {
pass = FALSE;
- failure_mssg = "Can't get file_ptr.\n";
+ failure_mssg = "Can't get file_ptr.\n";
- } else {
+ } else {
- cache_ptr = file_ptr->shared->cache;
+ cache_ptr = file_ptr->shared->cache;
}
}
@@ -262,10 +265,9 @@ check_fapl_mdc_api_calls(void)
/* conpare the cache's internal configuration with the expected value */
if ( pass ) {
- if ( ! resize_configs_are_equal(&default_auto_size_ctl, \
+ if ( ! resize_configs_are_equal(&default_auto_size_ctl, \
&cache_ptr->resize_ctl, TRUE) ) {
-
pass = FALSE;
failure_mssg = "Unexpected value(s) in cache resize_ctl 1.\n";
}
@@ -295,7 +297,7 @@ check_fapl_mdc_api_calls(void)
if ( result < 0 ) {
pass = FALSE;
- failure_mssg = "H5Pget_mdc_config() failed.\n";
+ failure_mssg = "H5Pget_mdc_config() failed.\n";
} else if (!CACHE_CONFIGS_EQUAL(default_config, scratch, TRUE, TRUE)) {
@@ -305,22 +307,22 @@ check_fapl_mdc_api_calls(void)
} else if ( H5Pclose(fapl_id) < 0 ) {
pass = FALSE;
- failure_mssg = "H5Pclose() failed.\n";
+ failure_mssg = "H5Pclose() failed.\n";
}
}
/* close the file and delete it */
if ( pass ) {
- if ( H5Fclose(file_id) < 0 ) {
+ if ( H5Fclose(file_id) < 0 ) {
pass = FALSE;
- failure_mssg = "H5Fclose() failed.\n";
+ failure_mssg = "H5Fclose() failed.\n";
} else if ( HDremove(filename) < 0 ) {
pass = FALSE;
- failure_mssg = "HDremove() failed.\n";
+ failure_mssg = "HDremove() failed.\n";
}
}
@@ -335,13 +337,13 @@ check_fapl_mdc_api_calls(void)
/* Create a FAPL */
if ( pass ) {
- fapl_id = H5Pcreate(H5P_FILE_ACCESS);
+ fapl_id = H5Pcreate(H5P_FILE_ACCESS);
- if ( fapl_id < 0 ) {
+ if ( fapl_id < 0 ) {
- pass = FALSE;
+ pass = FALSE;
failure_mssg = "H5Pcreate(H5P_FILE_ACCESS) failed.\n";
- }
+ }
}
/* Modify the initial mdc configuration in the FAPL. */
@@ -353,7 +355,7 @@ check_fapl_mdc_api_calls(void)
if ( result < 0 ) {
pass = FALSE;
- failure_mssg = "H5Pset_mdc_config() failed.\n";
+ failure_mssg = "H5Pset_mdc_config() failed.\n";
}
}
@@ -388,7 +390,7 @@ check_fapl_mdc_api_calls(void)
if ( file_ptr == NULL ) {
pass = FALSE;
- failure_mssg = "Can't get file_ptr.\n";
+ failure_mssg = "Can't get file_ptr.\n";
} else {
@@ -411,10 +413,9 @@ check_fapl_mdc_api_calls(void)
/* conpare the cache's internal configuration with the expected value */
if ( pass ) {
- if ( ! resize_configs_are_equal(&mod_auto_size_ctl, \
+ if ( ! resize_configs_are_equal(&mod_auto_size_ctl, \
&cache_ptr->resize_ctl, TRUE) ) {
-
pass = FALSE;
failure_mssg = "Unexpected value(s) in cache resize_ctl 2.\n";
}
@@ -444,7 +445,7 @@ check_fapl_mdc_api_calls(void)
if ( result < 0 ) {
pass = FALSE;
- failure_mssg = "H5Pget_mdc_config() failed.\n";
+ failure_mssg = "H5Pget_mdc_config() failed.\n";
} else if ( ! CACHE_CONFIGS_EQUAL(mod_config, scratch, TRUE, TRUE) ) {
@@ -454,7 +455,7 @@ check_fapl_mdc_api_calls(void)
} else if ( H5Pclose(test_fapl_id) < 0 ) {
pass = FALSE;
- failure_mssg = "H5Pclose() failed.\n";
+ failure_mssg = "H5Pclose() failed.\n";
}
}
@@ -464,30 +465,38 @@ check_fapl_mdc_api_calls(void)
if ( H5Pclose(fapl_id) < 0 ) {
pass = FALSE;
- failure_mssg = "H5Pclose() failed.\n";
+ failure_mssg = "H5Pclose() failed.\n";
}
}
/* close the file and delete it */
if ( pass ) {
- if ( H5Fclose(file_id) < 0 ) {
+ if ( H5Fclose(file_id) < 0 ) {
pass = FALSE;
- failure_mssg = "H5Fclose() failed.\n";
+ failure_mssg = "H5Fclose() failed.\n";
} else if ( HDremove(filename) < 0 ) {
pass = FALSE;
- failure_mssg = "HDremove() failed.\n";
+ failure_mssg = "HDremove() failed.\n";
}
}
- if ( pass ) { PASSED(); } else { H5_FAILED(); }
+ if ( pass ) {
+
+ PASSED();
+
+ } else {
+
+ H5_FAILED();
+ }
+
+ if ( ! pass ) {
- if ( ! pass )
- HDfprintf(stdout, "%s: failure_mssg = \"%s\".\n",
- FUNC, failure_mssg);
+ HDfprintf(stdout, "%s: failure_mssg = \"%s\".\n", FUNC, failure_mssg);
+ }
return !pass;
@@ -495,30 +504,27 @@ check_fapl_mdc_api_calls(void)
/*-------------------------------------------------------------------------
- * Function: check_file_mdc_api_calls()
+ * Function: check_file_mdc_api_calls()
*
- * Purpose: Verify that the file related metadata cache API calls are
- * functioning correctly.
+ * Purpose: Verify that the file related metadata cache API calls are
+ * functioning correctly.
*
- * Since we have tested the H5C code elsewhere, it should
- * be sufficient to verify that the desired configuration
- * data is getting in and out of the cache. Similarly,
- * we need only verify that the cache monitoring calls
- * return the data that the cache thinks they should return.
- * We shouldn't need to verify data correctness beyond that
- * point.
+ * Since we have tested the H5C code elsewhere, it should
+ * be sufficient to verify that the desired configuration
+ * data is getting in and out of the cache. Similarly,
+ * we need only verify that the cache monitoring calls
+ * return the data that the cache thinks they should return.
+ * We shouldn't need to verify data correctness beyond that
+ * point.
*
- * Return: void
+ * Return: Test pass status (TRUE/FALSE)
*
- * Programmer: John Mainzer
+ * Programmer: John Mainzer
* 4/14/04
*
- * Modifications:
- *
*-------------------------------------------------------------------------
*/
-
-static unsigned
+static hbool_t
check_file_mdc_api_calls(void)
{
char filename[512];
@@ -822,23 +828,31 @@ check_file_mdc_api_calls(void)
/* close the file and delete it */
if ( pass ) {
- if ( H5Fclose(file_id) < 0 ) {
+ if ( H5Fclose(file_id) < 0 ) {
pass = FALSE;
- failure_mssg = "H5Fclose() failed.\n";
+ failure_mssg = "H5Fclose() failed.\n";
} else if ( HDremove(filename) < 0 ) {
pass = FALSE;
- failure_mssg = "HDremove() failed.\n";
+ failure_mssg = "HDremove() failed.\n";
}
}
- if ( pass ) { PASSED(); } else { H5_FAILED(); }
+ if ( pass ) {
+
+ PASSED();
- if ( ! pass )
- HDfprintf(stdout, "%s: failure_mssg = \"%s\".\n",
- FUNC, failure_mssg);
+ } else {
+
+ H5_FAILED();
+ }
+
+ if ( ! pass ) {
+
+ HDfprintf(stdout, "%s: failure_mssg = \"%s\".\n", FUNC, failure_mssg);
+ }
return !pass;
@@ -848,17 +862,16 @@ check_file_mdc_api_calls(void)
/*-------------------------------------------------------------------------
* Function: mdc_api_call_smoke_check()
*
- * Purpose:
+ * Purpose: Initial basic functional test to see if there are problems
+ * with the cache API calls.
*
- * Return: void
+ * NOTE: This test takes some time to run and checks the
+ * HDF5TestExpress environment variable.
*
- * Programmer: John Mainzer
- * 4/14/04
- *
- * Modifications:
+ * Return: Test pass status (TRUE/FALSE)
*
- * JRM -- 7/12/06
- * Added progress reporting code.
+ * Programmer: John Mainzer
+ * 4/14/04
*
*-------------------------------------------------------------------------
*/
@@ -868,7 +881,7 @@ check_file_mdc_api_calls(void)
#define NUM_DSETS 6
#define NUM_RANDOM_ACCESSES 200000
-static unsigned
+static hbool_t
mdc_api_call_smoke_check(int express_test)
{
char filename[512];
@@ -1497,24 +1510,32 @@ mdc_api_call_smoke_check(int express_test)
/* close the file and delete it */
if ( pass ) {
- if ( H5Fclose(file_id) < 0 ) {
+ if ( H5Fclose(file_id) < 0 ) {
pass = FALSE;
- failure_mssg = "H5Fclose() failed.\n";
+ failure_mssg = "H5Fclose() failed.\n";
}
else if ( HDremove(filename) < 0 ) {
pass = FALSE;
- failure_mssg = "HDremove() failed.\n";
+ failure_mssg = "HDremove() failed.\n";
}
}
- if ( pass ) { PASSED(); } else { H5_FAILED(); }
+ if ( pass ) {
+
+ PASSED();
+
+ } else {
- if ( ! pass )
- HDfprintf(stdout, "%s: failure_mssg = \"%s\".\n",
- FUNC, failure_mssg);
+ H5_FAILED();
+ }
+
+ if ( ! pass ) {
+
+ HDfprintf(stdout, "%s: failure_mssg = \"%s\".\n", FUNC, failure_mssg);
+ }
return !pass;
@@ -1522,1295 +1543,216 @@ mdc_api_call_smoke_check(int express_test)
-/* The following array of invalid external MDC cache configurations is
- * used to test error rejection in the MDC related API calls.
+/*-------------------------------------------------------------------------
+ * Function: init_invalid_configs()
+ *
+ * Purpose: Initialize an array of invalid external MDC configurations
+ * that will be used to test error rejection in the MDC-
+ * related API calls.
+ *
+ * Note: It is assumed that boolean parameters are only set
+ * to TRUE/FALSE.
*
- * Note: It is assumed that boolean parameters are only set to TRUE/FALSE.
+ * Return: Success: Pointer to an array of cache configurations.
+ * Failure: NULL
+ *
+ * Programmer: Dana Robinson
+ * Spring 2016
+ *
+ *-------------------------------------------------------------------------
*/
#define NUM_INVALID_CONFIGS 36
+static H5AC_cache_config_t * invalid_configs = NULL;
+
+static H5AC_cache_config_t *
+init_invalid_configs(void) {
+
+ int i;
+ H5AC_cache_config_t * configs = NULL;
+
+ /* Allocate memory */
+ if ( NULL == (configs = (H5AC_cache_config_t *)HDcalloc(
+ NUM_INVALID_CONFIGS, sizeof(H5AC_cache_config_t) ) ) ) {
+
+ return NULL;
+ }
+
+ /* Set defaults for all configs */
+ for ( i = 0; i < NUM_INVALID_CONFIGS; i++ ) {
+
+ configs[i].version = H5C__CURR_AUTO_SIZE_CTL_VER;
+ configs[i].rpt_fcn_enabled = FALSE;
+ configs[i].open_trace_file = FALSE;
+ configs[i].close_trace_file = FALSE;
+ /* trace file name set to all ASCII NUL by calloc() */
+ configs[i].evictions_enabled = TRUE;
+ configs[i].set_initial_size = TRUE;
+ configs[i].initial_size = (1 * 1024 * 1024);
+ configs[i].min_clean_fraction = 0.25F;
+ configs[i].max_size = (16 * 1024 * 1024);
+ configs[i].min_size = (1 * 1024 * 1024);
+ configs[i].epoch_length = 50000;
+ configs[i].incr_mode = H5C_incr__threshold;
+ configs[i].lower_hr_threshold = 0.9F;
+ configs[i].increment = 2.0F;
+ configs[i].apply_max_increment = TRUE;
+ configs[i].max_increment = (4 * 1024 * 1024);
+ configs[i].flash_incr_mode = H5C_flash_incr__off;
+ configs[i].flash_multiple = 2.0F;
+ configs[i].flash_threshold = 0.5F;
+ configs[i].decr_mode = H5C_decr__age_out_with_threshold;
+ configs[i].upper_hr_threshold = 0.999F;
+ configs[i].decrement = 0.9F;
+ configs[i].apply_max_decrement = TRUE;
+ configs[i].max_decrement = (1 * 1024 * 1024);
+ configs[i].epochs_before_eviction = 3;
+ configs[i].apply_empty_reserve = TRUE;
+ configs[i].empty_reserve = 0.1F;
+ configs[i].dirty_bytes_threshold = (256 * 1024);
+ configs[i].metadata_write_strategy = H5AC__DEFAULT_METADATA_WRITE_STRATEGY;
+ }
+
+ /* Set badness for each config */
-H5AC_cache_config_t invalid_configs[NUM_INVALID_CONFIGS] =
-{
- {
/* 0 -- bad version */
- /* int version = */ -1,
- /* hbool_t rpt_fcn_enabled = */ FALSE,
- /* hbool_t open_trace_file = */ FALSE,
- /* hbool_t close_trace_file = */ FALSE,
- /* char trace_file_name[] = */ "",
- /* hbool_t evictions_enabled = */ TRUE,
- /* hbool_t set_initial_size = */ TRUE,
- /* size_t initial_size = */ (1 * 1024 * 1024),
- /* double min_clean_fraction = */ 0.25f,
- /* size_t max_size = */ (16 * 1024 * 1024),
- /* size_t min_size = */ ( 1 * 1024 * 1024),
- /* long int epoch_length = */ 50000,
- /* enum H5C_cache_incr_mode incr_mode = */ H5C_incr__threshold,
- /* double lower_hr_threshold = */ 0.9f,
- /* double increment = */ 2.0f,
- /* hbool_t apply_max_increment = */ TRUE,
- /* size_t max_increment = */ (4 * 1024 * 1024),
- /* enum H5C_cache_flash_incr_mode */
- /* flash_incr_mode = */ H5C_flash_incr__off,
- /* double flash_multiple = */ 2.0f,
- /* double flash_threshold = */ 0.5f,
- /* enum H5C_cache_decr_mode decr_mode = */ H5C_decr__age_out_with_threshold,
- /* double upper_hr_threshold = */ 0.999f,
- /* double decrement = */ 0.9f,
- /* hbool_t apply_max_decrement = */ TRUE,
- /* size_t max_decrement = */ (1 * 1024 * 1024),
- /* int epochs_before_eviction = */ 3,
- /* hbool_t apply_empty_reserve = */ TRUE,
- /* double empty_reserve = */ 0.1f,
- /* int dirty_bytes_threshold = */ (256 * 1024),
- /* int metadata_write_strategy = */
- H5AC__DEFAULT_METADATA_WRITE_STRATEGY
- },
- {
+ configs[0].version = -1;
+
/* 1 -- open_trace_file == TRUE and empty trace_file_name */
- /* int version = */ H5C__CURR_AUTO_SIZE_CTL_VER,
- /* hbool_t rpt_fcn_enabled = */ FALSE,
- /* hbool_t open_trace_file = */ TRUE,
- /* hbool_t close_trace_file = */ FALSE,
- /* char trace_file_name[] = */ "",
- /* hbool_t evictions_enabled = */ TRUE,
- /* hbool_t set_initial_size = */ TRUE,
- /* size_t initial_size = */ (1 * 1024 * 1024),
- /* double min_clean_fraction = */ 0.25f,
- /* size_t max_size = */ (16 * 1024 * 1024),
- /* size_t min_size = */ ( 1 * 1024 * 1024),
- /* long int epoch_length = */ 50000,
- /* enum H5C_cache_incr_mode incr_mode = */ H5C_incr__threshold,
- /* double lower_hr_threshold = */ 0.9f,
- /* double increment = */ 2.0f,
- /* hbool_t apply_max_increment = */ TRUE,
- /* size_t max_increment = */ (4 * 1024 * 1024),
- /* enum H5C_cache_flash_incr_mode */
- /* flash_incr_mode = */ H5C_flash_incr__off,
- /* double flash_multiple = */ 2.0f,
- /* double flash_threshold = */ 0.5f,
- /* enum H5C_cache_decr_mode decr_mode = */ H5C_decr__age_out_with_threshold,
- /* double upper_hr_threshold = */ 0.999f,
- /* double decrement = */ 0.9f,
- /* hbool_t apply_max_decrement = */ TRUE,
- /* size_t max_decrement = */ (1 * 1024 * 1024),
- /* int epochs_before_eviction = */ 3,
- /* hbool_t apply_empty_reserve = */ TRUE,
- /* double empty_reserve = */ 0.1f,
- /* int dirty_bytes_threshold = */ (256 * 1024),
- /* int metadata_write_strategy = */
- H5AC__DEFAULT_METADATA_WRITE_STRATEGY
- },
- {
+ configs[1].open_trace_file = TRUE;
+ /* trace file name set to all ASCII NUL by calloc() */
+
/* 2 -- max_size too big */
- /* int version = */ H5C__CURR_AUTO_SIZE_CTL_VER,
- /* hbool_t rpt_fcn_enabled = */ FALSE,
- /* hbool_t open_trace_file = */ FALSE,
- /* hbool_t close_trace_file = */ FALSE,
- /* char trace_file_name[] = */ "",
- /* hbool_t evictions_enabled = */ TRUE,
- /* hbool_t set_initial_size = */ TRUE,
- /* size_t initial_size = */ (1 * 1024 * 1024),
- /* double min_clean_fraction = */ 0.25f,
- /* size_t max_size = */ H5C__MAX_MAX_CACHE_SIZE + 1,
- /* size_t min_size = */ ( 1 * 1024 * 1024),
- /* long int epoch_length = */ 50000,
- /* enum H5C_cache_incr_mode incr_mode = */ H5C_incr__threshold,
- /* double lower_hr_threshold = */ 0.9f,
- /* double increment = */ 2.0f,
- /* hbool_t apply_max_increment = */ TRUE,
- /* size_t max_increment = */ (4 * 1024 * 1024),
- /* enum H5C_cache_flash_incr_mode */
- /* flash_incr_mode = */ H5C_flash_incr__off,
- /* double flash_multiple = */ 2.0f,
- /* double flash_threshold = */ 0.5f,
- /* enum H5C_cache_decr_mode decr_mode = */ H5C_decr__age_out_with_threshold,
- /* double upper_hr_threshold = */ 0.999f,
- /* double decrement = */ 0.9f,
- /* hbool_t apply_max_decrement = */ TRUE,
- /* size_t max_decrement = */ (1 * 1024 * 1024),
- /* int epochs_before_eviction = */ 3,
- /* hbool_t apply_empty_reserve = */ TRUE,
- /* double empty_reserve = */ 0.1f,
- /* int dirty_bytes_threshold = */ (256 * 1024),
- /* int metadata_write_strategy = */
- H5AC__DEFAULT_METADATA_WRITE_STRATEGY
- },
- {
+ configs[2].max_size = H5C__MAX_MAX_CACHE_SIZE + 1;
+
/* 3 -- min_size too small */
- /* int version = */ H5C__CURR_AUTO_SIZE_CTL_VER,
- /* hbool_t rpt_fcn_enabled = */ FALSE,
- /* hbool_t open_trace_file = */ FALSE,
- /* hbool_t close_trace_file = */ FALSE,
- /* char trace_file_name[] = */ "",
- /* hbool_t evictions_enabled = */ TRUE,
- /* hbool_t set_initial_size = */ TRUE,
- /* size_t initial_size = */ (1 * 1024 * 1024),
- /* double min_clean_fraction = */ 0.25f,
- /* size_t max_size = */ (16 * 1024 * 1024),
- /* size_t min_size = */ H5C__MIN_MAX_CACHE_SIZE - 1,
- /* long int epoch_length = */ 50000,
- /* enum H5C_cache_incr_mode incr_mode = */ H5C_incr__threshold,
- /* double lower_hr_threshold = */ 0.9f,
- /* double increment = */ 2.0f,
- /* hbool_t apply_max_increment = */ TRUE,
- /* size_t max_increment = */ (4 * 1024 * 1024),
- /* enum H5C_cache_flash_incr_mode */
- /* flash_incr_mode = */ H5C_flash_incr__off,
- /* double flash_multiple = */ 2.0f,
- /* double flash_threshold = */ 0.5f,
- /* enum H5C_cache_decr_mode decr_mode = */ H5C_decr__age_out_with_threshold,
- /* double upper_hr_threshold = */ 0.999f,
- /* double decrement = */ 0.9f,
- /* hbool_t apply_max_decrement = */ TRUE,
- /* size_t max_decrement = */ (1 * 1024 * 1024),
- /* int epochs_before_eviction = */ 3,
- /* hbool_t apply_empty_reserve = */ TRUE,
- /* double empty_reserve = */ 0.1f,
- /* int dirty_bytes_threshold = */ (256 * 1024),
- /* int metadata_write_strategy = */
- H5AC__DEFAULT_METADATA_WRITE_STRATEGY
- },
- {
+ configs[3].min_size = H5C__MIN_MAX_CACHE_SIZE - 1;
+
/* 4 -- min_size > max_size */
- /* int version = */ H5C__CURR_AUTO_SIZE_CTL_VER,
- /* hbool_t rpt_fcn_enabled = */ FALSE,
- /* hbool_t open_trace_file = */ FALSE,
- /* hbool_t close_trace_file = */ FALSE,
- /* char trace_file_name[] = */ "",
- /* hbool_t evictions_enabled = */ TRUE,
- /* hbool_t set_initial_size = */ FALSE,
- /* size_t initial_size = */ (1 * 1024 * 1024),
- /* double min_clean_fraction = */ 0.25f,
- /* size_t max_size = */ (16 * 1024 * 1024),
- /* size_t min_size = */ (16 * 1024 * 1024 + 1),
- /* long int epoch_length = */ 50000,
- /* enum H5C_cache_incr_mode incr_mode = */ H5C_incr__threshold,
- /* double lower_hr_threshold = */ 0.9f,
- /* double increment = */ 2.0f,
- /* hbool_t apply_max_increment = */ TRUE,
- /* size_t max_increment = */ (4 * 1024 * 1024),
- /* enum H5C_cache_flash_incr_mode */
- /* flash_incr_mode = */ H5C_flash_incr__off,
- /* double flash_multiple = */ 2.0f,
- /* double flash_threshold = */ 0.5f,
- /* enum H5C_cache_decr_mode decr_mode = */ H5C_decr__age_out_with_threshold,
- /* double upper_hr_threshold = */ 0.999f,
- /* double decrement = */ 0.9f,
- /* hbool_t apply_max_decrement = */ TRUE,
- /* size_t max_decrement = */ (1 * 1024 * 1024),
- /* int epochs_before_eviction = */ 3,
- /* hbool_t apply_empty_reserve = */ TRUE,
- /* double empty_reserve = */ 0.1f,
- /* int dirty_bytes_threshold = */ (256 * 1024),
- /* int metadata_write_strategy = */
- H5AC__DEFAULT_METADATA_WRITE_STRATEGY
- },
- {
+ configs[4].max_size = (16 * 1024 * 1024);
+ configs[4].min_size = (16 * 1024 * 1024 + 1);
+
/* 5 -- initial size out of range (too big) */
- /* int version = */ H5C__CURR_AUTO_SIZE_CTL_VER,
- /* hbool_t rpt_fcn_enabled = */ FALSE,
- /* hbool_t open_trace_file = */ FALSE,
- /* hbool_t close_trace_file = */ FALSE,
- /* char trace_file_name[] = */ "",
- /* hbool_t evictions_enabled = */ TRUE,
- /* hbool_t set_initial_size = */ TRUE,
- /* size_t initial_size = */ (16 * 1024 * 1024 + 1),
- /* double min_clean_fraction = */ 0.25f,
- /* size_t max_size = */ (16 * 1024 * 1024),
- /* size_t min_size = */ ( 1 * 1024 * 1024),
- /* long int epoch_length = */ 50000,
- /* enum H5C_cache_incr_mode incr_mode = */ H5C_incr__threshold,
- /* double lower_hr_threshold = */ 0.9f,
- /* double increment = */ 2.0f,
- /* hbool_t apply_max_increment = */ TRUE,
- /* size_t max_increment = */ (4 * 1024 * 1024),
- /* enum H5C_cache_flash_incr_mode */
- /* flash_incr_mode = */ H5C_flash_incr__off,
- /* double flash_multiple = */ 2.0f,
- /* double flash_threshold = */ 0.5f,
- /* enum H5C_cache_decr_mode decr_mode = */ H5C_decr__age_out_with_threshold,
- /* double upper_hr_threshold = */ 0.999f,
- /* double decrement = */ 0.9f,
- /* hbool_t apply_max_decrement = */ TRUE,
- /* size_t max_decrement = */ (1 * 1024 * 1024),
- /* int epochs_before_eviction = */ 3,
- /* hbool_t apply_empty_reserve = */ TRUE,
- /* double empty_reserve = */ 0.1f,
- /* int dirty_bytes_threshold = */ (256 * 1024),
- /* int metadata_write_strategy = */
- H5AC__DEFAULT_METADATA_WRITE_STRATEGY
- },
- {
+ configs[5].initial_size = (16 * 1024 * 1024 + 1);
+
/* 6 -- initial_size out of range (too small) */
- /* int version = */ H5C__CURR_AUTO_SIZE_CTL_VER,
- /* hbool_t rpt_fcn_enabled = */ FALSE,
- /* hbool_t open_trace_file = */ FALSE,
- /* hbool_t close_trace_file = */ FALSE,
- /* char trace_file_name[] = */ "",
- /* hbool_t evictions_enabled = */ TRUE,
- /* hbool_t set_initial_size = */ TRUE,
- /* size_t initial_size = */ (1 * 1024 * 1024 - 1),
- /* double min_clean_fraction = */ 0.25f,
- /* size_t max_size = */ (16 * 1024 * 1024),
- /* size_t min_size = */ ( 1 * 1024 * 1024),
- /* long int epoch_length = */ 50000,
- /* enum H5C_cache_incr_mode incr_mode = */ H5C_incr__threshold,
- /* double lower_hr_threshold = */ 0.9f,
- /* double increment = */ 2.0f,
- /* hbool_t apply_max_increment = */ TRUE,
- /* size_t max_increment = */ (4 * 1024 * 1024),
- /* enum H5C_cache_flash_incr_mode */
- /* flash_incr_mode = */ H5C_flash_incr__off,
- /* double flash_multiple = */ 2.0f,
- /* double flash_threshold = */ 0.5f,
- /* enum H5C_cache_decr_mode decr_mode = */ H5C_decr__age_out_with_threshold,
- /* double upper_hr_threshold = */ 0.999f,
- /* double decrement = */ 0.9f,
- /* hbool_t apply_max_decrement = */ TRUE,
- /* size_t max_decrement = */ (1 * 1024 * 1024),
- /* int epochs_before_eviction = */ 3,
- /* hbool_t apply_empty_reserve = */ TRUE,
- /* double empty_reserve = */ 0.1f,
- /* int dirty_bytes_threshold = */ (256 * 1024),
- /* int metadata_write_strategy = */
- H5AC__DEFAULT_METADATA_WRITE_STRATEGY
- },
- {
+ configs[6].initial_size = (1 * 1024 * 1024 - 1);
+
/* 7 -- min_clean_fraction too big */
- /* int version = */ H5C__CURR_AUTO_SIZE_CTL_VER,
- /* hbool_t rpt_fcn_enabled = */ FALSE,
- /* hbool_t open_trace_file = */ FALSE,
- /* hbool_t close_trace_file = */ FALSE,
- /* char trace_file_name[] = */ "",
- /* hbool_t evictions_enabled = */ TRUE,
- /* hbool_t set_initial_size = */ TRUE,
- /* size_t initial_size = */ (1 * 1024 * 1024),
- /* double min_clean_fraction = */ 1.000001f,
- /* size_t max_size = */ (16 * 1024 * 1024),
- /* size_t min_size = */ ( 1 * 1024 * 1024),
- /* long int epoch_length = */ 50000,
- /* enum H5C_cache_incr_mode incr_mode = */ H5C_incr__threshold,
- /* double lower_hr_threshold = */ 0.9f,
- /* double increment = */ 2.0f,
- /* hbool_t apply_max_increment = */ TRUE,
- /* size_t max_increment = */ (4 * 1024 * 1024),
- /* enum H5C_cache_flash_incr_mode */
- /* flash_incr_mode = */ H5C_flash_incr__off,
- /* double flash_multiple = */ 2.0f,
- /* double flash_threshold = */ 0.5f,
- /* enum H5C_cache_decr_mode decr_mode = */ H5C_decr__age_out_with_threshold,
- /* double upper_hr_threshold = */ 0.999f,
- /* double decrement = */ 0.9f,
- /* hbool_t apply_max_decrement = */ TRUE,
- /* size_t max_decrement = */ (1 * 1024 * 1024),
- /* int epochs_before_eviction = */ 3,
- /* hbool_t apply_empty_reserve = */ TRUE,
- /* double empty_reserve = */ 0.1f,
- /* int dirty_bytes_threshold = */ (256 * 1024),
- /* int metadata_write_strategy = */
- H5AC__DEFAULT_METADATA_WRITE_STRATEGY
- },
- {
+ configs[7].min_clean_fraction = 1.000001f;
+
/* 8 -- min_clean_fraction too small */
- /* int version = */ H5C__CURR_AUTO_SIZE_CTL_VER,
- /* hbool_t rpt_fcn_enabled = */ FALSE,
- /* hbool_t open_trace_file = */ FALSE,
- /* hbool_t close_trace_file = */ FALSE,
- /* char trace_file_name[] = */ "",
- /* hbool_t evictions_enabled = */ TRUE,
- /* hbool_t set_initial_size = */ TRUE,
- /* size_t initial_size = */ (1 * 1024 * 1024),
- /* double min_clean_fraction = */ -0.00000001f,
- /* size_t max_size = */ (16 * 1024 * 1024),
- /* size_t min_size = */ ( 1 * 1024 * 1024),
- /* long int epoch_length = */ 50000,
- /* enum H5C_cache_incr_mode incr_mode = */ H5C_incr__threshold,
- /* double lower_hr_threshold = */ 0.9f,
- /* double increment = */ 2.0f,
- /* hbool_t apply_max_increment = */ TRUE,
- /* size_t max_increment = */ (4 * 1024 * 1024),
- /* enum H5C_cache_flash_incr_mode */
- /* flash_incr_mode = */ H5C_flash_incr__off,
- /* double flash_multiple = */ 2.0f,
- /* double flash_threshold = */ 0.5f,
- /* enum H5C_cache_decr_mode decr_mode = */ H5C_decr__age_out_with_threshold,
- /* double upper_hr_threshold = */ 0.999f,
- /* double decrement = */ 0.9f,
- /* hbool_t apply_max_decrement = */ TRUE,
- /* size_t max_decrement = */ (1 * 1024 * 1024),
- /* int epochs_before_eviction = */ 3,
- /* hbool_t apply_empty_reserve = */ TRUE,
- /* double empty_reserve = */ 0.1f,
- /* int dirty_bytes_threshold = */ (256 * 1024),
- /* int metadata_write_strategy = */
- H5AC__DEFAULT_METADATA_WRITE_STRATEGY
- },
- {
+ configs[8].min_clean_fraction = -0.00000001f;
+
/* 9 -- epoch_length too small */
- /* int version = */ H5C__CURR_AUTO_SIZE_CTL_VER,
- /* hbool_t rpt_fcn_enabled = */ FALSE,
- /* hbool_t open_trace_file = */ FALSE,
- /* hbool_t close_trace_file = */ FALSE,
- /* char trace_file_name[] = */ "",
- /* hbool_t evictions_enabled = */ TRUE,
- /* hbool_t set_initial_size = */ TRUE,
- /* size_t initial_size = */ (1 * 1024 * 1024),
- /* double min_clean_fraction = */ 0.25f,
- /* size_t max_size = */ (16 * 1024 * 1024),
- /* size_t min_size = */ ( 1 * 1024 * 1024),
- /* long int epoch_length = */ H5C__MIN_AR_EPOCH_LENGTH - 1,
- /* enum H5C_cache_incr_mode incr_mode = */ H5C_incr__threshold,
- /* double lower_hr_threshold = */ 0.9f,
- /* double increment = */ 2.0f,
- /* hbool_t apply_max_increment = */ TRUE,
- /* size_t max_increment = */ (4 * 1024 * 1024),
- /* enum H5C_cache_flash_incr_mode */
- /* flash_incr_mode = */ H5C_flash_incr__off,
- /* double flash_multiple = */ 2.0f,
- /* double flash_threshold = */ 0.5f,
- /* enum H5C_cache_decr_mode decr_mode = */ H5C_decr__age_out_with_threshold,
- /* double upper_hr_threshold = */ 0.999f,
- /* double decrement = */ 0.9f,
- /* hbool_t apply_max_decrement = */ TRUE,
- /* size_t max_decrement = */ (1 * 1024 * 1024),
- /* int epochs_before_eviction = */ 3,
- /* hbool_t apply_empty_reserve = */ TRUE,
- /* double empty_reserve = */ 0.1f,
- /* int dirty_bytes_threshold = */ (256 * 1024),
- /* int metadata_write_strategy = */
- H5AC__DEFAULT_METADATA_WRITE_STRATEGY
- },
- {
+ configs[9].epoch_length = H5C__MIN_AR_EPOCH_LENGTH - 1;
+
/* 10 -- epoch_length too big */
- /* int version = */ H5C__CURR_AUTO_SIZE_CTL_VER,
- /* hbool_t rpt_fcn_enabled = */ FALSE,
- /* hbool_t open_trace_file = */ FALSE,
- /* hbool_t close_trace_file = */ FALSE,
- /* char trace_file_name[] = */ "",
- /* hbool_t evictions_enabled = */ TRUE,
- /* hbool_t set_initial_size = */ TRUE,
- /* size_t initial_size = */ (1 * 1024 * 1024),
- /* double min_clean_fraction = */ 0.25f,
- /* size_t max_size = */ (16 * 1024 * 1024),
- /* size_t min_size = */ ( 1 * 1024 * 1024),
- /* long int epoch_length = */ H5C__MAX_AR_EPOCH_LENGTH + 1,
- /* enum H5C_cache_incr_mode incr_mode = */ H5C_incr__threshold,
- /* double lower_hr_threshold = */ 0.9f,
- /* double increment = */ 2.0f,
- /* hbool_t apply_max_increment = */ TRUE,
- /* size_t max_increment = */ (4 * 1024 * 1024),
- /* enum H5C_cache_flash_incr_mode */
- /* flash_incr_mode = */ H5C_flash_incr__off,
- /* double flash_multiple = */ 2.0f,
- /* double flash_threshold = */ 0.5f,
- /* enum H5C_cache_decr_mode decr_mode = */ H5C_decr__age_out_with_threshold,
- /* double upper_hr_threshold = */ 0.999f,
- /* double decrement = */ 0.9f,
- /* hbool_t apply_max_decrement = */ TRUE,
- /* size_t max_decrement = */ (1 * 1024 * 1024),
- /* int epochs_before_eviction = */ 3,
- /* hbool_t apply_empty_reserve = */ TRUE,
- /* double empty_reserve = */ 0.1f,
- /* int dirty_bytes_threshold = */ (256 * 1024),
- /* int metadata_write_strategy = */
- H5AC__DEFAULT_METADATA_WRITE_STRATEGY
- },
- {
+ configs[10].epoch_length = H5C__MAX_AR_EPOCH_LENGTH + 1;
+
/* 11 -- invalid incr_mode */
- /* int version = */ H5C__CURR_AUTO_SIZE_CTL_VER,
- /* hbool_t rpt_fcn_enabled = */ FALSE,
- /* hbool_t open_trace_file = */ FALSE,
- /* hbool_t close_trace_file = */ FALSE,
- /* char trace_file_name[] = */ "",
- /* hbool_t evictions_enabled = */ TRUE,
- /* hbool_t set_initial_size = */ TRUE,
- /* size_t initial_size = */ (1 * 1024 * 1024),
- /* double min_clean_fraction = */ 0.25f,
- /* size_t max_size = */ (16 * 1024 * 1024),
- /* size_t min_size = */ ( 1 * 1024 * 1024),
- /* long int epoch_length = */ 50000,
- /* enum H5C_cache_incr_mode incr_mode = */ (enum H5C_cache_incr_mode)-1,
- /* double lower_hr_threshold = */ 0.9f,
- /* double increment = */ 2.0f,
- /* hbool_t apply_max_increment = */ TRUE,
- /* size_t max_increment = */ (4 * 1024 * 1024),
- /* enum H5C_cache_flash_incr_mode */
- /* flash_incr_mode = */ H5C_flash_incr__off,
- /* double flash_multiple = */ 2.0f,
- /* double flash_threshold = */ 0.5f,
- /* enum H5C_cache_decr_mode decr_mode = */ H5C_decr__age_out_with_threshold,
- /* double upper_hr_threshold = */ 0.999f,
- /* double decrement = */ 0.9f,
- /* hbool_t apply_max_decrement = */ TRUE,
- /* size_t max_decrement = */ (1 * 1024 * 1024),
- /* int epochs_before_eviction = */ 3,
- /* hbool_t apply_empty_reserve = */ TRUE,
- /* double empty_reserve = */ 0.1f,
- /* int dirty_bytes_threshold = */ (256 * 1024),
- /* int metadata_write_strategy = */
- H5AC__DEFAULT_METADATA_WRITE_STRATEGY
- },
- {
+ configs[11].incr_mode = (enum H5C_cache_incr_mode)-1;
+
/* 12 -- lower_hr_threshold too small */
- /* int version = */ H5C__CURR_AUTO_SIZE_CTL_VER,
- /* hbool_t rpt_fcn_enabled = */ FALSE,
- /* hbool_t open_trace_file = */ FALSE,
- /* hbool_t close_trace_file = */ FALSE,
- /* char trace_file_name[] = */ "",
- /* hbool_t evictions_enabled = */ TRUE,
- /* hbool_t set_initial_size = */ TRUE,
- /* size_t initial_size = */ (1 * 1024 * 1024),
- /* double min_clean_fraction = */ 0.25f,
- /* size_t max_size = */ (16 * 1024 * 1024),
- /* size_t min_size = */ ( 1 * 1024 * 1024),
- /* long int epoch_length = */ 50000,
- /* enum H5C_cache_incr_mode incr_mode = */ H5C_incr__threshold,
- /* double lower_hr_threshold = */ -0.000001f,
- /* double increment = */ 2.0f,
- /* hbool_t apply_max_increment = */ TRUE,
- /* size_t max_increment = */ (4 * 1024 * 1024),
- /* enum H5C_cache_flash_incr_mode */
- /* flash_incr_mode = */ H5C_flash_incr__off,
- /* double flash_multiple = */ 2.0f,
- /* double flash_threshold = */ 0.5f,
- /* enum H5C_cache_decr_mode decr_mode = */ H5C_decr__age_out_with_threshold,
- /* double upper_hr_threshold = */ 0.999f,
- /* double decrement = */ 0.9f,
- /* hbool_t apply_max_decrement = */ TRUE,
- /* size_t max_decrement = */ (1 * 1024 * 1024),
- /* int epochs_before_eviction = */ 3,
- /* hbool_t apply_empty_reserve = */ TRUE,
- /* double empty_reserve = */ 0.1f,
- /* int dirty_bytes_threshold = */ (256 * 1024),
- /* int metadata_write_strategy = */
- H5AC__DEFAULT_METADATA_WRITE_STRATEGY
- },
- {
+ configs[12].lower_hr_threshold = -0.000001f;
+
/* 13 -- lower_hr_threshold too big */
- /* int version = */ H5C__CURR_AUTO_SIZE_CTL_VER,
- /* hbool_t rpt_fcn_enabled = */ FALSE,
- /* hbool_t open_trace_file = */ FALSE,
- /* hbool_t close_trace_file = */ FALSE,
- /* char trace_file_name[] = */ "",
- /* hbool_t evictions_enabled = */ TRUE,
- /* hbool_t set_initial_size = */ TRUE,
- /* size_t initial_size = */ (1 * 1024 * 1024),
- /* double min_clean_fraction = */ 0.25f,
- /* size_t max_size = */ (16 * 1024 * 1024),
- /* size_t min_size = */ ( 1 * 1024 * 1024),
- /* long int epoch_length = */ 50000,
- /* enum H5C_cache_incr_mode incr_mode = */ H5C_incr__threshold,
- /* double lower_hr_threshold = */ 1.00000001f,
- /* double increment = */ 2.0f,
- /* hbool_t apply_max_increment = */ TRUE,
- /* size_t max_increment = */ (4 * 1024 * 1024),
- /* enum H5C_cache_flash_incr_mode */
- /* flash_incr_mode = */ H5C_flash_incr__off,
- /* double flash_multiple = */ 2.0f,
- /* double flash_threshold = */ 0.5f,
- /* enum H5C_cache_decr_mode decr_mode = */ H5C_decr__age_out_with_threshold,
- /* double upper_hr_threshold = */ 0.999f,
- /* double decrement = */ 0.9f,
- /* hbool_t apply_max_decrement = */ TRUE,
- /* size_t max_decrement = */ (1 * 1024 * 1024),
- /* int epochs_before_eviction = */ 3,
- /* hbool_t apply_empty_reserve = */ TRUE,
- /* double empty_reserve = */ 0.1f,
- /* int dirty_bytes_threshold = */ (256 * 1024),
- /* int metadata_write_strategy = */
- H5AC__DEFAULT_METADATA_WRITE_STRATEGY
- },
- {
+ configs[13].lower_hr_threshold = 1.00000001f;
+
/* 14 -- increment too small */
- /* int version = */ H5C__CURR_AUTO_SIZE_CTL_VER,
- /* hbool_t rpt_fcn_enabled = */ FALSE,
- /* hbool_t open_trace_file = */ FALSE,
- /* hbool_t close_trace_file = */ FALSE,
- /* char trace_file_name[] = */ "",
- /* hbool_t evictions_enabled = */ TRUE,
- /* hbool_t set_initial_size = */ TRUE,
- /* size_t initial_size = */ (1 * 1024 * 1024),
- /* double min_clean_fraction = */ 0.25f,
- /* size_t max_size = */ (16 * 1024 * 1024),
- /* size_t min_size = */ ( 1 * 1024 * 1024),
- /* long int epoch_length = */ 50000,
- /* enum H5C_cache_incr_mode incr_mode = */ H5C_incr__threshold,
- /* double lower_hr_threshold = */ 0.9f,
- /* double increment = */ H5_DOUBLE(0.999999999999),
- /* hbool_t apply_max_increment = */ TRUE,
- /* size_t max_increment = */ (4 * 1024 * 1024),
- /* enum H5C_cache_flash_incr_mode */
- /* flash_incr_mode = */ H5C_flash_incr__off,
- /* double flash_multiple = */ 2.0f,
- /* double flash_threshold = */ 0.5f,
- /* enum H5C_cache_decr_mode decr_mode = */ H5C_decr__age_out_with_threshold,
- /* double upper_hr_threshold = */ 0.999f,
- /* double decrement = */ 0.9f,
- /* hbool_t apply_max_decrement = */ TRUE,
- /* size_t max_decrement = */ (1 * 1024 * 1024),
- /* int epochs_before_eviction = */ 3,
- /* hbool_t apply_empty_reserve = */ TRUE,
- /* double empty_reserve = */ 0.1f,
- /* int dirty_bytes_threshold = */ (256 * 1024),
- /* int metadata_write_strategy = */
- H5AC__DEFAULT_METADATA_WRITE_STRATEGY
- },
- {
+ configs[14].increment = H5_DOUBLE(0.999999999999);
+
/* 15 -- invalid flash_incr_mode */
- /* int version = */ H5C__CURR_AUTO_SIZE_CTL_VER,
- /* hbool_t rpt_fcn_enabled = */ FALSE,
- /* hbool_t open_trace_file = */ FALSE,
- /* hbool_t close_trace_file = */ FALSE,
- /* char trace_file_name[] = */ "",
- /* hbool_t evictions_enabled = */ TRUE,
- /* hbool_t set_initial_size = */ TRUE,
- /* size_t initial_size = */ (1 * 1024 * 1024),
- /* double min_clean_fraction = */ 0.25f,
- /* size_t max_size = */ (16 * 1024 * 1024),
- /* size_t min_size = */ ( 1 * 1024 * 1024),
- /* long int epoch_length = */ 50000,
- /* enum H5C_cache_incr_mode incr_mode = */ H5C_incr__threshold,
- /* double lower_hr_threshold = */ 0.9f,
- /* double increment = */ 2.0f,
- /* hbool_t apply_max_increment = */ TRUE,
- /* size_t max_increment = */ (4 * 1024 * 1024),
- /* enum H5C_cache_flash_incr_mode */
- /* flash_incr_mode = */ (enum H5C_cache_flash_incr_mode)-1,
- /* double flash_multiple = */ 2.0f,
- /* double flash_threshold = */ 0.5f,
- /* enum H5C_cache_decr_mode decr_mode = */ H5C_decr__age_out_with_threshold,
- /* double upper_hr_threshold = */ 0.999f,
- /* double decrement = */ 0.9f,
- /* hbool_t apply_max_decrement = */ TRUE,
- /* size_t max_decrement = */ (1 * 1024 * 1024),
- /* int epochs_before_eviction = */ 3,
- /* hbool_t apply_empty_reserve = */ TRUE,
- /* double empty_reserve = */ 0.1f,
- /* int dirty_bytes_threshold = */ (256 * 1024),
- /* int metadata_write_strategy = */
- H5AC__DEFAULT_METADATA_WRITE_STRATEGY
- },
- {
+ configs[15].flash_incr_mode = (enum H5C_cache_flash_incr_mode)-1;
+
/* 16 -- flash_multiple too small */
- /* int version = */ H5C__CURR_AUTO_SIZE_CTL_VER,
- /* hbool_t rpt_fcn_enabled = */ FALSE,
- /* hbool_t open_trace_file = */ FALSE,
- /* hbool_t close_trace_file = */ FALSE,
- /* char trace_file_name[] = */ "",
- /* hbool_t evictions_enabled = */ TRUE,
- /* hbool_t set_initial_size = */ TRUE,
- /* size_t initial_size = */ (1 * 1024 * 1024),
- /* double min_clean_fraction = */ 0.25f,
- /* size_t max_size = */ (16 * 1024 * 1024),
- /* size_t min_size = */ ( 1 * 1024 * 1024),
- /* long int epoch_length = */ 50000,
- /* enum H5C_cache_incr_mode incr_mode = */ H5C_incr__threshold,
- /* double lower_hr_threshold = */ 0.9f,
- /* double increment = */ 2.0f,
- /* hbool_t apply_max_increment = */ TRUE,
- /* size_t max_increment = */ (4 * 1024 * 1024),
- /* enum H5C_cache_flash_incr_mode */
- /* flash_incr_mode = */ H5C_flash_incr__add_space,
- /* double flash_multiple = */ 0.09f,
- /* double flash_threshold = */ 0.5f,
- /* enum H5C_cache_decr_mode decr_mode = */ H5C_decr__age_out_with_threshold,
- /* double upper_hr_threshold = */ 0.999f,
- /* double decrement = */ 0.9f,
- /* hbool_t apply_max_decrement = */ TRUE,
- /* size_t max_decrement = */ (1 * 1024 * 1024),
- /* int epochs_before_eviction = */ 3,
- /* hbool_t apply_empty_reserve = */ TRUE,
- /* double empty_reserve = */ 0.1f,
- /* int dirty_bytes_threshold = */ (256 * 1024),
- /* int metadata_write_strategy = */
- H5AC__DEFAULT_METADATA_WRITE_STRATEGY
- },
- {
+ configs[16].flash_incr_mode = H5C_flash_incr__add_space;
+ configs[16].flash_multiple = 0.09f;
+
/* 17 -- flash_multiple too big */
- /* int version = */ H5C__CURR_AUTO_SIZE_CTL_VER,
- /* hbool_t rpt_fcn_enabled = */ FALSE,
- /* hbool_t open_trace_file = */ FALSE,
- /* hbool_t close_trace_file = */ FALSE,
- /* char trace_file_name[] = */ "",
- /* hbool_t evictions_enabled = */ TRUE,
- /* hbool_t set_initial_size = */ TRUE,
- /* size_t initial_size = */ (1 * 1024 * 1024),
- /* double min_clean_fraction = */ 0.25f,
- /* size_t max_size = */ (16 * 1024 * 1024),
- /* size_t min_size = */ ( 1 * 1024 * 1024),
- /* long int epoch_length = */ 50000,
- /* enum H5C_cache_incr_mode incr_mode = */ H5C_incr__threshold,
- /* double lower_hr_threshold = */ 0.9f,
- /* double increment = */ 2.0f,
- /* hbool_t apply_max_increment = */ TRUE,
- /* size_t max_increment = */ (4 * 1024 * 1024),
- /* enum H5C_cache_flash_incr_mode */
- /* flash_incr_mode = */ H5C_flash_incr__add_space,
- /* double flash_multiple = */ 10.001f,
- /* double flash_threshold = */ 0.5f,
- /* enum H5C_cache_decr_mode decr_mode = */ H5C_decr__age_out_with_threshold,
- /* double upper_hr_threshold = */ 0.999f,
- /* double decrement = */ 0.9f,
- /* hbool_t apply_max_decrement = */ TRUE,
- /* size_t max_decrement = */ (1 * 1024 * 1024),
- /* int epochs_before_eviction = */ 3,
- /* hbool_t apply_empty_reserve = */ TRUE,
- /* double empty_reserve = */ 0.1f,
- /* int dirty_bytes_threshold = */ (256 * 1024),
- /* int metadata_write_strategy = */
- H5AC__DEFAULT_METADATA_WRITE_STRATEGY
- },
- {
+ configs[17].flash_incr_mode = H5C_flash_incr__add_space;
+ configs[17].flash_multiple = 10.001f;
+
/* 18 -- flash_threshold too small */
- /* int version = */ H5C__CURR_AUTO_SIZE_CTL_VER,
- /* hbool_t rpt_fcn_enabled = */ FALSE,
- /* hbool_t open_trace_file = */ FALSE,
- /* hbool_t close_trace_file = */ FALSE,
- /* char trace_file_name[] = */ "",
- /* hbool_t evictions_enabled = */ TRUE,
- /* hbool_t set_initial_size = */ TRUE,
- /* size_t initial_size = */ (1 * 1024 * 1024),
- /* double min_clean_fraction = */ 0.25f,
- /* size_t max_size = */ (16 * 1024 * 1024),
- /* size_t min_size = */ ( 1 * 1024 * 1024),
- /* long int epoch_length = */ 50000,
- /* enum H5C_cache_incr_mode incr_mode = */ H5C_incr__threshold,
- /* double lower_hr_threshold = */ 0.9f,
- /* double increment = */ 2.0f,
- /* hbool_t apply_max_increment = */ TRUE,
- /* size_t max_increment = */ (4 * 1024 * 1024),
- /* enum H5C_cache_flash_incr_mode */
- /* flash_incr_mode = */ H5C_flash_incr__add_space,
- /* double flash_multiple = */ 1.0f,
- /* double flash_threshold = */ 0.099f,
- /* enum H5C_cache_decr_mode decr_mode = */ H5C_decr__age_out_with_threshold,
- /* double upper_hr_threshold = */ 0.999f,
- /* double decrement = */ 0.9f,
- /* hbool_t apply_max_decrement = */ TRUE,
- /* size_t max_decrement = */ (1 * 1024 * 1024),
- /* int epochs_before_eviction = */ 3,
- /* hbool_t apply_empty_reserve = */ TRUE,
- /* double empty_reserve = */ 0.1f,
- /* int dirty_bytes_threshold = */ (256 * 1024),
- /* int metadata_write_strategy = */
- H5AC__DEFAULT_METADATA_WRITE_STRATEGY
- },
- {
+ configs[18].flash_incr_mode = H5C_flash_incr__add_space;
+ configs[18].flash_threshold = 0.099f;
+
/* 19 -- flash_threshold too big */
- /* int version = */ H5C__CURR_AUTO_SIZE_CTL_VER,
- /* hbool_t rpt_fcn_enabled = */ FALSE,
- /* hbool_t open_trace_file = */ FALSE,
- /* hbool_t close_trace_file = */ FALSE,
- /* char trace_file_name[] = */ "",
- /* hbool_t evictions_enabled = */ TRUE,
- /* hbool_t set_initial_size = */ TRUE,
- /* size_t initial_size = */ (1 * 1024 * 1024),
- /* double min_clean_fraction = */ 0.25f,
- /* size_t max_size = */ (16 * 1024 * 1024),
- /* size_t min_size = */ ( 1 * 1024 * 1024),
- /* long int epoch_length = */ 50000,
- /* enum H5C_cache_incr_mode incr_mode = */ H5C_incr__threshold,
- /* double lower_hr_threshold = */ 0.9f,
- /* double increment = */ 2.0f,
- /* hbool_t apply_max_increment = */ TRUE,
- /* size_t max_increment = */ (4 * 1024 * 1024),
- /* enum H5C_cache_flash_incr_mode */
- /* flash_incr_mode = */ H5C_flash_incr__add_space,
- /* double flash_multiple = */ 1.0f,
- /* double flash_threshold = */ 1.001f,
- /* enum H5C_cache_decr_mode decr_mode = */ H5C_decr__age_out_with_threshold,
- /* double upper_hr_threshold = */ 0.999f,
- /* double decrement = */ 0.9f,
- /* hbool_t apply_max_decrement = */ TRUE,
- /* size_t max_decrement = */ (1 * 1024 * 1024),
- /* int epochs_before_eviction = */ 3,
- /* hbool_t apply_empty_reserve = */ TRUE,
- /* double empty_reserve = */ 0.1f,
- /* int dirty_bytes_threshold = */ (256 * 1024),
- /* int metadata_write_strategy = */
- H5AC__DEFAULT_METADATA_WRITE_STRATEGY
- },
- {
+ configs[19].flash_incr_mode = H5C_flash_incr__add_space;
+ configs[19].flash_threshold = 1.001f;
+
/* 20 -- bad decr_mode */
- /* int version = */ H5C__CURR_AUTO_SIZE_CTL_VER,
- /* hbool_t rpt_fcn_enabled = */ FALSE,
- /* hbool_t open_trace_file = */ FALSE,
- /* hbool_t close_trace_file = */ FALSE,
- /* char trace_file_name[] = */ "",
- /* hbool_t evictions_enabled = */ TRUE,
- /* hbool_t set_initial_size = */ TRUE,
- /* size_t initial_size = */ (1 * 1024 * 1024),
- /* double min_clean_fraction = */ 0.25f,
- /* size_t max_size = */ (16 * 1024 * 1024),
- /* size_t min_size = */ ( 1 * 1024 * 1024),
- /* long int epoch_length = */ 50000,
- /* enum H5C_cache_incr_mode incr_mode = */ H5C_incr__threshold,
- /* double lower_hr_threshold = */ 0.9f,
- /* double increment = */ 2.0f,
- /* hbool_t apply_max_increment = */ TRUE,
- /* size_t max_increment = */ (4 * 1024 * 1024),
- /* enum H5C_cache_flash_incr_mode */
- /* flash_incr_mode = */ H5C_flash_incr__off,
- /* double flash_multiple = */ 2.0f,
- /* double flash_threshold = */ 0.5f,
- /* enum H5C_cache_decr_mode decr_mode = */ (enum H5C_cache_decr_mode)-1,
- /* double upper_hr_threshold = */ 0.999f,
- /* double decrement = */ 0.9f,
- /* hbool_t apply_max_decrement = */ TRUE,
- /* size_t max_decrement = */ (1 * 1024 * 1024),
- /* int epochs_before_eviction = */ 3,
- /* hbool_t apply_empty_reserve = */ TRUE,
- /* double empty_reserve = */ 0.1f,
- /* int dirty_bytes_threshold = */ (256 * 1024),
- /* int metadata_write_strategy = */
- H5AC__DEFAULT_METADATA_WRITE_STRATEGY
- },
- {
+ configs[20].decr_mode = (enum H5C_cache_decr_mode)-1;
+
/* 21 -- upper_hr_threshold too big */
- /* int version = */ H5C__CURR_AUTO_SIZE_CTL_VER,
- /* hbool_t rpt_fcn_enabled = */ FALSE,
- /* hbool_t open_trace_file = */ FALSE,
- /* hbool_t close_trace_file = */ FALSE,
- /* char trace_file_name[] = */ "",
- /* hbool_t evictions_enabled = */ TRUE,
- /* hbool_t set_initial_size = */ TRUE,
- /* size_t initial_size = */ (1 * 1024 * 1024),
- /* double min_clean_fraction = */ 0.25f,
- /* size_t max_size = */ (16 * 1024 * 1024),
- /* size_t min_size = */ ( 1 * 1024 * 1024),
- /* long int epoch_length = */ 50000,
- /* enum H5C_cache_incr_mode incr_mode = */ H5C_incr__threshold,
- /* double lower_hr_threshold = */ 0.9f,
- /* double increment = */ 2.0f,
- /* hbool_t apply_max_increment = */ TRUE,
- /* size_t max_increment = */ (4 * 1024 * 1024),
- /* enum H5C_cache_flash_incr_mode */
- /* flash_incr_mode = */ H5C_flash_incr__off,
- /* double flash_multiple = */ 2.0f,
- /* double flash_threshold = */ 0.5f,
- /* enum H5C_cache_decr_mode decr_mode = */ H5C_decr__threshold,
- /* double upper_hr_threshold = */ 1.00001f,
- /* double decrement = */ 0.9f,
- /* hbool_t apply_max_decrement = */ TRUE,
- /* size_t max_decrement = */ (1 * 1024 * 1024),
- /* int epochs_before_eviction = */ 3,
- /* hbool_t apply_empty_reserve = */ TRUE,
- /* double empty_reserve = */ 0.1f,
- /* int dirty_bytes_threshold = */ (256 * 1024),
- /* int metadata_write_strategy = */
- H5AC__DEFAULT_METADATA_WRITE_STRATEGY
- },
- {
+ configs[21].upper_hr_threshold = 1.00001f;
+
/* 22 -- decrement too small */
- /* int version = */ H5C__CURR_AUTO_SIZE_CTL_VER,
- /* hbool_t rpt_fcn_enabled = */ FALSE,
- /* hbool_t open_trace_file = */ FALSE,
- /* hbool_t close_trace_file = */ FALSE,
- /* char trace_file_name[] = */ "",
- /* hbool_t evictions_enabled = */ TRUE,
- /* hbool_t set_initial_size = */ TRUE,
- /* size_t initial_size = */ (1 * 1024 * 1024),
- /* double min_clean_fraction = */ 0.25f,
- /* size_t max_size = */ (16 * 1024 * 1024),
- /* size_t min_size = */ ( 1 * 1024 * 1024),
- /* long int epoch_length = */ 50000,
- /* enum H5C_cache_incr_mode incr_mode = */ H5C_incr__threshold,
- /* double lower_hr_threshold = */ 0.9f,
- /* double increment = */ 2.0f,
- /* hbool_t apply_max_increment = */ TRUE,
- /* size_t max_increment = */ (4 * 1024 * 1024),
- /* enum H5C_cache_flash_incr_mode */
- /* flash_incr_mode = */ H5C_flash_incr__off,
- /* double flash_multiple = */ 2.0f,
- /* double flash_threshold = */ 0.5f,
- /* enum H5C_cache_decr_mode decr_mode = */ H5C_decr__threshold,
- /* double upper_hr_threshold = */ 0.999f,
- /* double decrement = */ -0.0000000001f,
- /* hbool_t apply_max_decrement = */ TRUE,
- /* size_t max_decrement = */ (1 * 1024 * 1024),
- /* int epochs_before_eviction = */ 3,
- /* hbool_t apply_empty_reserve = */ TRUE,
- /* double empty_reserve = */ 0.1f,
- /* int dirty_bytes_threshold = */ (256 * 1024),
- /* int metadata_write_strategy = */
- H5AC__DEFAULT_METADATA_WRITE_STRATEGY
- },
- {
+ configs[22].decr_mode = H5C_decr__threshold;
+ configs[22].decrement = -0.0000000001f;
+
/* 23 -- decrement too big */
- /* int version = */ H5C__CURR_AUTO_SIZE_CTL_VER,
- /* hbool_t rpt_fcn_enabled = */ FALSE,
- /* hbool_t open_trace_file = */ FALSE,
- /* hbool_t close_trace_file = */ FALSE,
- /* char trace_file_name[] = */ "",
- /* hbool_t evictions_enabled = */ TRUE,
- /* hbool_t set_initial_size = */ TRUE,
- /* size_t initial_size = */ (1 * 1024 * 1024),
- /* double min_clean_fraction = */ 0.25f,
- /* size_t max_size = */ (16 * 1024 * 1024),
- /* size_t min_size = */ ( 1 * 1024 * 1024),
- /* long int epoch_length = */ 50000,
- /* enum H5C_cache_incr_mode incr_mode = */ H5C_incr__threshold,
- /* double lower_hr_threshold = */ 0.9f,
- /* double increment = */ 2.0f,
- /* hbool_t apply_max_increment = */ TRUE,
- /* size_t max_increment = */ (4 * 1024 * 1024),
- /* enum H5C_cache_flash_incr_mode */
- /* flash_incr_mode = */ H5C_flash_incr__off,
- /* double flash_multiple = */ 2.0f,
- /* double flash_threshold = */ 0.5f,
- /* enum H5C_cache_decr_mode decr_mode = */ H5C_decr__threshold,
- /* double upper_hr_threshold = */ 0.999f,
- /* double decrement = */ H5_DOUBLE(1.0000000001),
- /* hbool_t apply_max_decrement = */ TRUE,
- /* size_t max_decrement = */ (1 * 1024 * 1024),
- /* int epochs_before_eviction = */ 3,
- /* hbool_t apply_empty_reserve = */ TRUE,
- /* double empty_reserve = */ 0.1f,
- /* int dirty_bytes_threshold = */ (256 * 1024),
- /* int metadata_write_strategy = */
- H5AC__DEFAULT_METADATA_WRITE_STRATEGY
- },
- {
+ configs[23].decr_mode = H5C_decr__threshold;
+ configs[23].decrement = H5_DOUBLE(1.0000000001);
+
/* 24 -- epochs_before_eviction too small */
- /* int version = */ H5C__CURR_AUTO_SIZE_CTL_VER,
- /* hbool_t rpt_fcn_enabled = */ FALSE,
- /* hbool_t open_trace_file = */ FALSE,
- /* hbool_t close_trace_file = */ FALSE,
- /* char trace_file_name[] = */ "",
- /* hbool_t evictions_enabled = */ TRUE,
- /* hbool_t set_initial_size = */ TRUE,
- /* size_t initial_size = */ (1 * 1024 * 1024),
- /* double min_clean_fraction = */ 0.25f,
- /* size_t max_size = */ (16 * 1024 * 1024),
- /* size_t min_size = */ ( 1 * 1024 * 1024),
- /* long int epoch_length = */ 50000,
- /* enum H5C_cache_incr_mode incr_mode = */ H5C_incr__threshold,
- /* double lower_hr_threshold = */ 0.9f,
- /* double increment = */ 2.0f,
- /* hbool_t apply_max_increment = */ TRUE,
- /* size_t max_increment = */ (4 * 1024 * 1024),
- /* enum H5C_cache_flash_incr_mode */
- /* flash_incr_mode = */ H5C_flash_incr__off,
- /* double flash_multiple = */ 2.0f,
- /* double flash_threshold = */ 0.5f,
- /* enum H5C_cache_decr_mode decr_mode = */ H5C_decr__age_out,
- /* double upper_hr_threshold = */ 0.999f,
- /* double decrement = */ 0.9f,
- /* hbool_t apply_max_decrement = */ TRUE,
- /* size_t max_decrement = */ (1 * 1024 * 1024),
- /* int epochs_before_eviction = */ 0,
- /* hbool_t apply_empty_reserve = */ TRUE,
- /* double empty_reserve = */ 0.1f,
- /* int dirty_bytes_threshold = */ (256 * 1024),
- /* int metadata_write_strategy = */
- H5AC__DEFAULT_METADATA_WRITE_STRATEGY
- },
- {
+ configs[24].epochs_before_eviction = 0;
+
/* 25 -- epochs_before_eviction too big */
- /* int version = */ H5C__CURR_AUTO_SIZE_CTL_VER,
- /* hbool_t rpt_fcn_enabled = */ FALSE,
- /* hbool_t open_trace_file = */ FALSE,
- /* hbool_t close_trace_file = */ FALSE,
- /* char trace_file_name[] = */ "",
- /* hbool_t evictions_enabled = */ TRUE,
- /* hbool_t set_initial_size = */ TRUE,
- /* size_t initial_size = */ (1 * 1024 * 1024),
- /* double min_clean_fraction = */ 0.25f,
- /* size_t max_size = */ (16 * 1024 * 1024),
- /* size_t min_size = */ ( 1 * 1024 * 1024),
- /* long int epoch_length = */ 50000,
- /* enum H5C_cache_incr_mode incr_mode = */ H5C_incr__threshold,
- /* double lower_hr_threshold = */ 0.9f,
- /* double increment = */ 2.0f,
- /* hbool_t apply_max_increment = */ TRUE,
- /* size_t max_increment = */ (4 * 1024 * 1024),
- /* enum H5C_cache_flash_incr_mode */
- /* flash_incr_mode = */ H5C_flash_incr__off,
- /* double flash_multiple = */ 2.0f,
- /* double flash_threshold = */ 0.5f,
- /* enum H5C_cache_decr_mode decr_mode = */ H5C_decr__age_out,
- /* double upper_hr_threshold = */ 0.999f,
- /* double decrement = */ 0.9f,
- /* hbool_t apply_max_decrement = */ TRUE,
- /* size_t max_decrement = */ (1 * 1024 * 1024),
- /* int epochs_before_eviction = */ H5C__MAX_EPOCH_MARKERS + 1,
- /* hbool_t apply_empty_reserve = */ TRUE,
- /* double empty_reserve = */ 0.1f,
- /* int dirty_bytes_threshold = */ (256 * 1024),
- /* int metadata_write_strategy = */
- H5AC__DEFAULT_METADATA_WRITE_STRATEGY
- },
- {
+ configs[25].epochs_before_eviction = H5C__MAX_EPOCH_MARKERS + 1;
+
/* 26 -- empty_reserve too small */
- /* int version = */ H5C__CURR_AUTO_SIZE_CTL_VER,
- /* hbool_t rpt_fcn_enabled = */ FALSE,
- /* hbool_t open_trace_file = */ FALSE,
- /* hbool_t close_trace_file = */ FALSE,
- /* char trace_file_name[] = */ "",
- /* hbool_t evictions_enabled = */ TRUE,
- /* hbool_t set_initial_size = */ TRUE,
- /* size_t initial_size = */ (1 * 1024 * 1024),
- /* double min_clean_fraction = */ 0.25f,
- /* size_t max_size = */ (16 * 1024 * 1024),
- /* size_t min_size = */ ( 1 * 1024 * 1024),
- /* long int epoch_length = */ 50000,
- /* enum H5C_cache_incr_mode incr_mode = */ H5C_incr__threshold,
- /* double lower_hr_threshold = */ 0.9f,
- /* double increment = */ 2.0f,
- /* hbool_t apply_max_increment = */ TRUE,
- /* size_t max_increment = */ (4 * 1024 * 1024),
- /* enum H5C_cache_flash_incr_mode */
- /* flash_incr_mode = */ H5C_flash_incr__off,
- /* double flash_multiple = */ 2.0f,
- /* double flash_threshold = */ 0.5f,
- /* enum H5C_cache_decr_mode decr_mode = */ H5C_decr__age_out_with_threshold,
- /* double upper_hr_threshold = */ 0.999f,
- /* double decrement = */ 0.9f,
- /* hbool_t apply_max_decrement = */ TRUE,
- /* size_t max_decrement = */ (1 * 1024 * 1024),
- /* int epochs_before_eviction = */ 3,
- /* hbool_t apply_empty_reserve = */ TRUE,
- /* double empty_reserve = */ -0.0000000001f,
- /* int dirty_bytes_threshold = */ (256 * 1024),
- /* int metadata_write_strategy = */
- H5AC__DEFAULT_METADATA_WRITE_STRATEGY
- },
- {
+ configs[26].empty_reserve = -0.0000000001f;
+
/* 27 -- empty_reserve too big */
- /* int version = */ H5C__CURR_AUTO_SIZE_CTL_VER,
- /* hbool_t rpt_fcn_enabled = */ FALSE,
- /* hbool_t open_trace_file = */ FALSE,
- /* hbool_t close_trace_file = */ FALSE,
- /* char trace_file_name[] = */ "",
- /* hbool_t evictions_enabled = */ TRUE,
- /* hbool_t set_initial_size = */ TRUE,
- /* size_t initial_size = */ (1 * 1024 * 1024),
- /* double min_clean_fraction = */ 0.25f,
- /* size_t max_size = */ (16 * 1024 * 1024),
- /* size_t min_size = */ ( 1 * 1024 * 1024),
- /* long int epoch_length = */ 50000,
- /* enum H5C_cache_incr_mode incr_mode = */ H5C_incr__threshold,
- /* double lower_hr_threshold = */ 0.9f,
- /* double increment = */ 2.0f,
- /* hbool_t apply_max_increment = */ TRUE,
- /* size_t max_increment = */ (4 * 1024 * 1024),
- /* enum H5C_cache_flash_incr_mode */
- /* flash_incr_mode = */ H5C_flash_incr__off,
- /* double flash_multiple = */ 2.0f,
- /* double flash_threshold = */ 0.5f,
- /* enum H5C_cache_decr_mode decr_mode = */ H5C_decr__age_out_with_threshold,
- /* double upper_hr_threshold = */ 0.999f,
- /* double decrement = */ 0.9f,
- /* hbool_t apply_max_decrement = */ TRUE,
- /* size_t max_decrement = */ (1 * 1024 * 1024),
- /* int epochs_before_eviction = */ 3,
- /* hbool_t apply_empty_reserve = */ TRUE,
- /* double empty_reserve = */ H5_DOUBLE(1.00000000001),
- /* int dirty_bytes_threshold = */ (256 * 1024),
- /* int metadata_write_strategy = */
- H5AC__DEFAULT_METADATA_WRITE_STRATEGY
- },
- {
+ configs[27].empty_reserve = H5_DOUBLE(1.00000000001);
+
/* 28 -- upper_hr_threshold too small */
- /* int version = */ H5C__CURR_AUTO_SIZE_CTL_VER,
- /* hbool_t rpt_fcn_enabled = */ FALSE,
- /* hbool_t open_trace_file = */ FALSE,
- /* hbool_t close_trace_file = */ FALSE,
- /* char trace_file_name[] = */ "",
- /* hbool_t evictions_enabled = */ TRUE,
- /* hbool_t set_initial_size = */ TRUE,
- /* size_t initial_size = */ (1 * 1024 * 1024),
- /* double min_clean_fraction = */ 0.25f,
- /* size_t max_size = */ (16 * 1024 * 1024),
- /* size_t min_size = */ ( 1 * 1024 * 1024),
- /* long int epoch_length = */ 50000,
- /* enum H5C_cache_incr_mode incr_mode = */ H5C_incr__threshold,
- /* double lower_hr_threshold = */ 0.9f,
- /* double increment = */ 2.0f,
- /* hbool_t apply_max_increment = */ TRUE,
- /* size_t max_increment = */ (4 * 1024 * 1024),
- /* enum H5C_cache_flash_incr_mode */
- /* flash_incr_mode = */ H5C_flash_incr__off,
- /* double flash_multiple = */ 2.0f,
- /* double flash_threshold = */ 0.5f,
- /* enum H5C_cache_decr_mode decr_mode = */ H5C_decr__age_out_with_threshold,
- /* double upper_hr_threshold = */ -0.000000001f,
- /* double decrement = */ 0.9f,
- /* hbool_t apply_max_decrement = */ TRUE,
- /* size_t max_decrement = */ (1 * 1024 * 1024),
- /* int epochs_before_eviction = */ 3,
- /* hbool_t apply_empty_reserve = */ TRUE,
- /* double empty_reserve = */ 0.1f,
- /* int dirty_bytes_threshold = */ (256 * 1024),
- /* int metadata_write_strategy = */
- H5AC__DEFAULT_METADATA_WRITE_STRATEGY
- },
- {
+ configs[28].upper_hr_threshold = -0.000000001f;
+
/* 29 -- upper_hr_threshold too big */
- /* int version = */ H5C__CURR_AUTO_SIZE_CTL_VER,
- /* hbool_t rpt_fcn_enabled = */ FALSE,
- /* hbool_t open_trace_file = */ FALSE,
- /* hbool_t close_trace_file = */ FALSE,
- /* char trace_file_name[] = */ "",
- /* hbool_t evictions_enabled = */ TRUE,
- /* hbool_t set_initial_size = */ TRUE,
- /* size_t initial_size = */ (1 * 1024 * 1024),
- /* double min_clean_fraction = */ 0.25f,
- /* size_t max_size = */ (16 * 1024 * 1024),
- /* size_t min_size = */ ( 1 * 1024 * 1024),
- /* long int epoch_length = */ 50000,
- /* enum H5C_cache_incr_mode incr_mode = */ H5C_incr__threshold,
- /* double lower_hr_threshold = */ 0.9f,
- /* double increment = */ 2.0f,
- /* hbool_t apply_max_increment = */ TRUE,
- /* size_t max_increment = */ (4 * 1024 * 1024),
- /* enum H5C_cache_flash_incr_mode */
- /* flash_incr_mode = */ H5C_flash_incr__off,
- /* double flash_multiple = */ 2.0f,
- /* double flash_threshold = */ 0.5f,
- /* enum H5C_cache_decr_mode decr_mode = */ H5C_decr__age_out_with_threshold,
- /* double upper_hr_threshold = */ H5_DOUBLE(1.00000001),
- /* double decrement = */ 0.9f,
- /* hbool_t apply_max_decrement = */ TRUE,
- /* size_t max_decrement = */ (1 * 1024 * 1024),
- /* int epochs_before_eviction = */ 3,
- /* hbool_t apply_empty_reserve = */ TRUE,
- /* double empty_reserve = */ 0.1f,
- /* int dirty_bytes_threshold = */ (256 * 1024),
- /* int metadata_write_strategy = */
- H5AC__DEFAULT_METADATA_WRITE_STRATEGY
- },
- {
+ configs[29].upper_hr_threshold = H5_DOUBLE(1.00000001);
+
/* 30 -- upper_hr_threshold <= lower_hr_threshold */
- /* int version = */ H5C__CURR_AUTO_SIZE_CTL_VER,
- /* hbool_t rpt_fcn_enabled = */ FALSE,
- /* hbool_t open_trace_file = */ FALSE,
- /* hbool_t close_trace_file = */ FALSE,
- /* char trace_file_name[] = */ "",
- /* hbool_t evictions_enabled = */ TRUE,
- /* hbool_t set_initial_size = */ TRUE,
- /* size_t initial_size = */ (1 * 1024 * 1024),
- /* double min_clean_fraction = */ 0.25f,
- /* size_t max_size = */ (16 * 1024 * 1024),
- /* size_t min_size = */ ( 1 * 1024 * 1024),
- /* long int epoch_length = */ 50000,
- /* enum H5C_cache_incr_mode incr_mode = */ H5C_incr__threshold,
- /* double lower_hr_threshold = */ 0.9f,
- /* double increment = */ 2.0f,
- /* hbool_t apply_max_increment = */ TRUE,
- /* size_t max_increment = */ (4 * 1024 * 1024),
- /* enum H5C_cache_flash_incr_mode */
- /* flash_incr_mode = */ H5C_flash_incr__off,
- /* double flash_multiple = */ 2.0f,
- /* double flash_threshold = */ 0.5f,
- /* enum H5C_cache_decr_mode decr_mode = */ H5C_decr__age_out_with_threshold,
- /* double upper_hr_threshold = */ 0.9f,
- /* double decrement = */ 0.9f,
- /* hbool_t apply_max_decrement = */ TRUE,
- /* size_t max_decrement = */ (1 * 1024 * 1024),
- /* int epochs_before_eviction = */ 3,
- /* hbool_t apply_empty_reserve = */ TRUE,
- /* double empty_reserve = */ 0.1f,
- /* int dirty_bytes_threshold = */ (256 * 1024),
- /* int metadata_write_strategy = */
- H5AC__DEFAULT_METADATA_WRITE_STRATEGY
- },
- {
+ configs[30].lower_hr_threshold = 0.9f;
+ configs[30].upper_hr_threshold = 0.9f;
+
/* 31 -- dirty_bytes_threshold too small */
- /* int version = */ H5C__CURR_AUTO_SIZE_CTL_VER,
- /* hbool_t rpt_fcn_enabled = */ FALSE,
- /* hbool_t open_trace_file = */ FALSE,
- /* hbool_t close_trace_file = */ FALSE,
- /* char trace_file_name[] = */ "",
- /* hbool_t evictions_enabled = */ TRUE,
- /* hbool_t set_initial_size = */ TRUE,
- /* size_t initial_size = */ (1 * 1024 * 1024),
- /* double min_clean_fraction = */ 0.25f,
- /* size_t max_size = */ (16 * 1024 * 1024),
- /* size_t min_size = */ ( 1 * 1024 * 1024),
- /* long int epoch_length = */ 50000,
- /* enum H5C_cache_incr_mode incr_mode = */ H5C_incr__threshold,
- /* double lower_hr_threshold = */ 0.9f,
- /* double increment = */ 2.0f,
- /* hbool_t apply_max_increment = */ TRUE,
- /* size_t max_increment = */ (4 * 1024 * 1024),
- /* enum H5C_cache_flash_incr_mode */
- /* flash_incr_mode = */ H5C_flash_incr__off,
- /* double flash_multiple = */ 2.0f,
- /* double flash_threshold = */ 0.5f,
- /* enum H5C_cache_decr_mode decr_mode = */ H5C_decr__age_out_with_threshold,
- /* double upper_hr_threshold = */ 0.999f,
- /* double decrement = */ 0.9f,
- /* hbool_t apply_max_decrement = */ TRUE,
- /* size_t max_decrement = */ (1 * 1024 * 1024),
- /* int epochs_before_eviction = */ 3,
- /* hbool_t apply_empty_reserve = */ TRUE,
- /* double empty_reserve = */ 0.1f,
- /* int dirty_bytes_threshold = */ (H5C__MIN_MAX_CACHE_SIZE / 2) - 1,
- /* int metadata_write_strategy = */
- H5AC__DEFAULT_METADATA_WRITE_STRATEGY
- },
- {
+ configs[31].dirty_bytes_threshold = (H5C__MIN_MAX_CACHE_SIZE / 2) - 1;
+
/* 32 -- dirty_bytes_threshold too big */
- /* int version = */ H5C__CURR_AUTO_SIZE_CTL_VER,
- /* hbool_t rpt_fcn_enabled = */ FALSE,
- /* hbool_t open_trace_file = */ FALSE,
- /* hbool_t close_trace_file = */ FALSE,
- /* char trace_file_name[] = */ "",
- /* hbool_t evictions_enabled = */ TRUE,
- /* hbool_t set_initial_size = */ TRUE,
- /* size_t initial_size = */ (1 * 1024 * 1024),
- /* double min_clean_fraction = */ 0.25f,
- /* size_t max_size = */ (16 * 1024 * 1024),
- /* size_t min_size = */ ( 1 * 1024 * 1024),
- /* long int epoch_length = */ 50000,
- /* enum H5C_cache_incr_mode incr_mode = */ H5C_incr__threshold,
- /* double lower_hr_threshold = */ 0.9f,
- /* double increment = */ 2.0f,
- /* hbool_t apply_max_increment = */ TRUE,
- /* size_t max_increment = */ (4 * 1024 * 1024),
- /* enum H5C_cache_flash_incr_mode */
- /* flash_incr_mode = */ H5C_flash_incr__off,
- /* double flash_multiple = */ 2.0f,
- /* double flash_threshold = */ 0.5f,
- /* enum H5C_cache_decr_mode decr_mode = */ H5C_decr__age_out_with_threshold,
- /* double upper_hr_threshold = */ 0.9f,
- /* double decrement = */ 0.9f,
- /* hbool_t apply_max_decrement = */ TRUE,
- /* size_t max_decrement = */ (1 * 1024 * 1024),
- /* int epochs_before_eviction = */ 3,
- /* hbool_t apply_empty_reserve = */ TRUE,
- /* double empty_reserve = */ 0.1f,
- /* int dirty_bytes_threshold = */ (H5C__MAX_MAX_CACHE_SIZE / 4) + 1,
- /* int metadata_write_strategy = */
- H5AC__DEFAULT_METADATA_WRITE_STRATEGY
- },
- {
+ configs[32].dirty_bytes_threshold = (H5C__MAX_MAX_CACHE_SIZE / 4) + 1;
+
/* 33 -- attempt to disable evictions when auto incr enabled */
- /* int version = */ H5C__CURR_AUTO_SIZE_CTL_VER,
- /* hbool_t rpt_fcn_enabled = */ FALSE,
- /* hbool_t open_trace_file = */ FALSE,
- /* hbool_t close_trace_file = */ FALSE,
- /* char trace_file_name[] = */ "",
- /* hbool_t evictions_enabled = */ FALSE,
- /* hbool_t set_initial_size = */ TRUE,
- /* size_t initial_size = */ (1 * 1024 * 1024),
- /* double min_clean_fraction = */ 0.25f,
- /* size_t max_size = */ (16 * 1024 * 1024),
- /* size_t min_size = */ ( 1 * 1024 * 1024),
- /* long int epoch_length = */ 50000,
- /* enum H5C_cache_incr_mode incr_mode = */ H5C_incr__threshold,
- /* double lower_hr_threshold = */ 0.9f,
- /* double increment = */ 2.0f,
- /* hbool_t apply_max_increment = */ TRUE,
- /* size_t max_increment = */ (4 * 1024 * 1024),
- /* enum H5C_cache_flash_incr_mode */
- /* flash_incr_mode = */ H5C_flash_incr__off,
- /* double flash_multiple = */ 2.0f,
- /* double flash_threshold = */ 0.5f,
- /* enum H5C_cache_decr_mode decr_mode = */ H5C_decr__off,
- /* double upper_hr_threshold = */ 0.9f,
- /* double decrement = */ 0.9f,
- /* hbool_t apply_max_decrement = */ TRUE,
- /* size_t max_decrement = */ (1 * 1024 * 1024),
- /* int epochs_before_eviction = */ 3,
- /* hbool_t apply_empty_reserve = */ TRUE,
- /* double empty_reserve = */ 0.1f,
- /* int dirty_bytes_threshold = */ (256 * 1024),
- /* int metadata_write_strategy = */
- H5AC__DEFAULT_METADATA_WRITE_STRATEGY
- },
- {
+ configs[33].evictions_enabled = FALSE;
+ configs[33].decr_mode = H5C_decr__off;
+
/* 34 -- attempt to disable evictions when auto decr enabled */
- /* int version = */ H5C__CURR_AUTO_SIZE_CTL_VER,
- /* hbool_t rpt_fcn_enabled = */ FALSE,
- /* hbool_t open_trace_file = */ FALSE,
- /* hbool_t close_trace_file = */ FALSE,
- /* char trace_file_name[] = */ "",
- /* hbool_t evictions_enabled = */ FALSE,
- /* hbool_t set_initial_size = */ TRUE,
- /* size_t initial_size = */ (1 * 1024 * 1024),
- /* double min_clean_fraction = */ 0.25f,
- /* size_t max_size = */ (16 * 1024 * 1024),
- /* size_t min_size = */ ( 1 * 1024 * 1024),
- /* long int epoch_length = */ 50000,
- /* enum H5C_cache_incr_mode incr_mode = */ H5C_incr__threshold,
- /* double lower_hr_threshold = */ 0.9f,
- /* double increment = */ 2.0f,
- /* hbool_t apply_max_increment = */ TRUE,
- /* size_t max_increment = */ (4 * 1024 * 1024),
- /* enum H5C_cache_flash_incr_mode */
- /* flash_incr_mode = */ H5C_flash_incr__off,
- /* double flash_multiple = */ 2.0f,
- /* double flash_threshold = */ 0.5f,
- /* enum H5C_cache_decr_mode decr_mode = */ H5C_decr__age_out,
- /* double upper_hr_threshold = */ 0.9f,
- /* double decrement = */ 0.9f,
- /* hbool_t apply_max_decrement = */ TRUE,
- /* size_t max_decrement = */ (1 * 1024 * 1024),
- /* int epochs_before_eviction = */ 3,
- /* hbool_t apply_empty_reserve = */ TRUE,
- /* double empty_reserve = */ 0.1f,
- /* int dirty_bytes_threshold = */ (256 * 1024),
- /* int metadata_write_strategy = */
- H5AC__DEFAULT_METADATA_WRITE_STRATEGY
- },
- {
+ configs[34].evictions_enabled = FALSE;
+ configs[34].decr_mode = H5C_decr__age_out;
+
/* 35 -- unknown metadata write strategy */
- /* int version = */ H5C__CURR_AUTO_SIZE_CTL_VER,
- /* hbool_t rpt_fcn_enabled = */ FALSE,
- /* hbool_t open_trace_file = */ FALSE,
- /* hbool_t close_trace_file = */ FALSE,
- /* char trace_file_name[] = */ "",
- /* hbool_t evictions_enabled = */ TRUE,
- /* hbool_t set_initial_size = */ TRUE,
- /* size_t initial_size = */ (1 * 1024 * 1024),
- /* double min_clean_fraction = */ 0.25f,
- /* size_t max_size = */ (16 * 1024 * 1024),
- /* size_t min_size = */ ( 1 * 1024 * 1024),
- /* long int epoch_length = */ 50000,
- /* enum H5C_cache_incr_mode incr_mode = */ H5C_incr__threshold,
- /* double lower_hr_threshold = */ 0.9f,
- /* double increment = */ 2.0f,
- /* hbool_t apply_max_increment = */ TRUE,
- /* size_t max_increment = */ (4 * 1024 * 1024),
- /* enum H5C_cache_flash_incr_mode */
- /* flash_incr_mode = */ H5C_flash_incr__off,
- /* double flash_multiple = */ 2.0f,
- /* double flash_threshold = */ 0.5f,
- /* enum H5C_cache_decr_mode decr_mode = */ H5C_decr__age_out_with_threshold,
- /* double upper_hr_threshold = */ 0.999f,
- /* double decrement = */ 0.9f,
- /* hbool_t apply_max_decrement = */ TRUE,
- /* size_t max_decrement = */ (1 * 1024 * 1024),
- /* int epochs_before_eviction = */ 3,
- /* hbool_t apply_empty_reserve = */ TRUE,
- /* double empty_reserve = */ 0.1f,
- /* int dirty_bytes_threshold = */ (256 * 1024),
- /* int metadata_write_strategy = */ -1
- }
-};
+ configs[35].metadata_write_strategy = -1;
+
+ return configs;
+
+} /* initialize_invalid_configs() */
/*-------------------------------------------------------------------------
- * Function: check_fapl_mdc_api_errs()
+ * Function: check_fapl_mdc_api_errs()
*
- * Purpose: Verify that the FAPL related MDC API calls reject input
- * errors gracefully.
+ * Purpose: Verify that the FAPL related MDC API calls reject input
+ * errors gracefully.
*
- * Return: void
+ * Return: Test pass status (TRUE/FALSE)
*
- * Programmer: John Mainzer
+ * Programmer: John Mainzer
* 4/19/04
*
- * Modifications:
- *
*-------------------------------------------------------------------------
*/
-
-static unsigned
+static hbool_t
check_fapl_mdc_api_errs(void)
{
static char msg[128];
@@ -2824,7 +1766,6 @@ check_fapl_mdc_api_errs(void)
pass = TRUE;
-
/* first test H5Pget_mdc_config().
*/
@@ -2832,8 +1773,8 @@ check_fapl_mdc_api_errs(void)
if ( pass ) {
H5E_BEGIN_TRY {
- result = H5Pget_mdc_config((hid_t)-1, &scratch);
- } H5E_END_TRY;
+ result = H5Pget_mdc_config((hid_t)-1, &scratch);
+ } H5E_END_TRY;
if ( result >= 0 ) {
@@ -2955,11 +1896,19 @@ check_fapl_mdc_api_errs(void)
failure_mssg = "FAPL metadata cache config changed???.\n";
}
- if ( pass ) { PASSED(); } else { H5_FAILED(); }
+ if ( pass ) {
+
+ PASSED();
- if ( ! pass )
- HDfprintf(stdout, "%s: failure_mssg = \"%s\".\n",
- FUNC, failure_mssg);
+ } else {
+
+ H5_FAILED();
+ }
+
+ if ( ! pass ) {
+
+ HDfprintf(stdout, "%s: failure_mssg = \"%s\".\n", FUNC, failure_mssg);
+ }
return !pass;
@@ -2967,22 +1916,19 @@ check_fapl_mdc_api_errs(void)
/*-------------------------------------------------------------------------
- * Function: check_file_mdc_api_errs()
+ * Function: check_file_mdc_api_errs()
*
- * Purpose: Verify that the file related MDC API calls reject input
- * errors gracefully.
+ * Purpose: Verify that the file related MDC API calls reject input
+ * errors gracefully.
*
- * Return: void
+ * Return: Test pass status (TRUE/FALSE)
*
- * Programmer: John Mainzer
+ * Programmer: John Mainzer
* 4/19/04
*
- * Modifications:
- *
*-------------------------------------------------------------------------
*/
-
-static unsigned
+static hbool_t
check_file_mdc_api_errs(void)
{
char filename[512];
@@ -3010,10 +1956,10 @@ check_file_mdc_api_errs(void)
/* setup the file name */
if ( pass ) {
- if ( show_progress ) {
+ if ( show_progress ) {
- HDfprintf(stdout, "%s: calling h5_fixname().\n", FUNC);
- }
+ HDfprintf(stdout, "%s: calling h5_fixname().\n", FUNC);
+ }
if ( h5_fixname(FILENAME[1], H5P_DEFAULT, filename, sizeof(filename))
== NULL ) {
@@ -3025,10 +1971,10 @@ check_file_mdc_api_errs(void)
if ( pass ) {
- if ( show_progress ) {
+ if ( show_progress ) {
- HDfprintf(stdout, "%s: calling H5Fcreate().\n", FUNC);
- }
+ HDfprintf(stdout, "%s: calling H5Fcreate().\n", FUNC);
+ }
file_id = H5Fcreate(filename, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT);
@@ -3047,10 +1993,10 @@ check_file_mdc_api_errs(void)
scratch.version = H5C__CURR_AUTO_SIZE_CTL_VER;
if ( pass ) {
- if ( show_progress ) {
+ if ( show_progress ) {
- HDfprintf(stdout, "%s: testing H5Fget_mdc_config() 1.\n", FUNC);
- }
+ HDfprintf(stdout, "%s: testing H5Fget_mdc_config() 1.\n", FUNC);
+ }
H5E_BEGIN_TRY {
result = H5Fget_mdc_config((hid_t)-1, &scratch);
@@ -3065,10 +2011,10 @@ check_file_mdc_api_errs(void)
if ( pass ) {
- if ( show_progress ) {
+ if ( show_progress ) {
- HDfprintf(stdout, "%s: testing H5Fget_mdc_config() 2.\n", FUNC);
- }
+ HDfprintf(stdout, "%s: testing H5Fget_mdc_config() 2.\n", FUNC);
+ }
H5E_BEGIN_TRY {
result = H5Fget_mdc_config(file_id, NULL);
@@ -3084,10 +2030,10 @@ check_file_mdc_api_errs(void)
scratch.version = -1; /* a convenient, invalid value */
if ( pass ) {
- if ( show_progress ) {
+ if ( show_progress ) {
- HDfprintf(stdout, "%s: testing H5Fget_mdc_config() 3.\n", FUNC);
- }
+ HDfprintf(stdout, "%s: testing H5Fget_mdc_config() 3.\n", FUNC);
+ }
H5E_BEGIN_TRY {
result = H5Fget_mdc_config(file_id, &scratch);
@@ -3106,10 +2052,10 @@ check_file_mdc_api_errs(void)
scratch.version = H5C__CURR_AUTO_SIZE_CTL_VER;
if ( pass ) {
- if ( show_progress ) {
+ if ( show_progress ) {
- HDfprintf(stdout, "%s: testing H5Fset_mdc_config() 1.\n", FUNC);
- }
+ HDfprintf(stdout, "%s: testing H5Fset_mdc_config() 1.\n", FUNC);
+ }
H5E_BEGIN_TRY {
result = H5Fset_mdc_config((hid_t)-1, &default_config);
@@ -3124,10 +2070,10 @@ check_file_mdc_api_errs(void)
if ( pass ) {
- if ( show_progress ) {
+ if ( show_progress ) {
- HDfprintf(stdout, "%s: testing H5Fset_mdc_config() 2.\n", FUNC);
- }
+ HDfprintf(stdout, "%s: testing H5Fset_mdc_config() 2.\n", FUNC);
+ }
H5E_BEGIN_TRY {
result = H5Fset_mdc_config(file_id, NULL);
@@ -3143,12 +2089,12 @@ check_file_mdc_api_errs(void)
i = 0;
while ( ( pass ) && ( i < NUM_INVALID_CONFIGS ) )
{
- if ( show_progress ) {
+ if ( show_progress ) {
- HDfprintf(stdout,
- "%s: testing H5Fset_mdc_config() with invalid config %d.\n",
- FUNC, i);
- }
+ HDfprintf(stdout,
+ "%s: testing H5Fset_mdc_config() with invalid config %d.\n",
+ FUNC, i);
+ }
H5E_BEGIN_TRY {
result = H5Fset_mdc_config(file_id, &(invalid_configs[i]));
@@ -3173,11 +2119,11 @@ check_file_mdc_api_errs(void)
/* test H5Fget_mdc_hit_rate() */
if ( pass ) {
- if ( show_progress ) {
+ if ( show_progress ) {
- HDfprintf(stdout, "%s: testing H5Fget_mdc_hit_rate() 1.\n",
- FUNC);
- }
+ HDfprintf(stdout, "%s: testing H5Fget_mdc_hit_rate() 1.\n",
+ FUNC);
+ }
H5E_BEGIN_TRY {
result = H5Fget_mdc_hit_rate((hid_t)-1, &hit_rate);
@@ -3192,11 +2138,11 @@ check_file_mdc_api_errs(void)
if ( pass ) {
- if ( show_progress ) {
+ if ( show_progress ) {
- HDfprintf(stdout, "%s: testing H5Fget_mdc_hit_rate() 2.\n",
- FUNC);
- }
+ HDfprintf(stdout, "%s: testing H5Fget_mdc_hit_rate() 2.\n",
+ FUNC);
+ }
H5E_BEGIN_TRY {
result = H5Fget_mdc_hit_rate(file_id, NULL);
@@ -3213,11 +2159,11 @@ check_file_mdc_api_errs(void)
/* test H5Freset_mdc_hit_rate_stats() */
if ( pass ) {
- if ( show_progress ) {
+ if ( show_progress ) {
- HDfprintf(stdout, "%s: testing H5Freset_mdc_hit_rate_stats().\n",
- FUNC);
- }
+ HDfprintf(stdout, "%s: testing H5Freset_mdc_hit_rate_stats().\n",
+ FUNC);
+ }
H5E_BEGIN_TRY {
result = H5Freset_mdc_hit_rate_stats((hid_t)-1);
@@ -3235,10 +2181,10 @@ check_file_mdc_api_errs(void)
/* test H5Fget_mdc_size() */
if ( pass ) {
- if ( show_progress ) {
+ if ( show_progress ) {
- HDfprintf(stdout, "%s: testing H5Fget_mdc_size() 1.\n", FUNC);
- }
+ HDfprintf(stdout, "%s: testing H5Fget_mdc_size() 1.\n", FUNC);
+ }
H5E_BEGIN_TRY {
result = H5Fget_mdc_size((hid_t)-1, &max_size, &min_clean_size,
@@ -3254,10 +2200,10 @@ check_file_mdc_api_errs(void)
if ( pass ) {
- if ( show_progress ) {
+ if ( show_progress ) {
- HDfprintf(stdout, "%s: testing H5Fget_mdc_size() 2.\n", FUNC);
- }
+ HDfprintf(stdout, "%s: testing H5Fget_mdc_size() 2.\n", FUNC);
+ }
if ( ( H5Fget_mdc_size(file_id, &max_size, NULL, NULL, NULL) < 0 ) ||
( H5Fget_mdc_size(file_id, NULL, &min_clean_size,
@@ -3276,10 +2222,10 @@ check_file_mdc_api_errs(void)
/* close the file and delete it */
if ( pass ) {
- if ( show_progress ) {
+ if ( show_progress ) {
- HDfprintf(stdout, "%s: cleaning up from tests.\n", FUNC);
- }
+ HDfprintf(stdout, "%s: cleaning up from tests.\n", FUNC);
+ }
if ( H5Fclose(file_id) < 0 ) {
@@ -3293,11 +2239,19 @@ check_file_mdc_api_errs(void)
}
}
- if ( pass ) { PASSED(); } else { H5_FAILED(); }
+ if ( pass ) {
- if ( ! pass )
- HDfprintf(stdout, "%s: failure_mssg = \"%s\".\n",
- FUNC, failure_mssg);
+ PASSED();
+
+ } else {
+
+ H5_FAILED();
+ }
+
+ if ( ! pass ) {
+
+ HDfprintf(stdout, "%s: failure_mssg = \"%s\".\n", FUNC, failure_mssg);
+ }
return !pass;
@@ -3305,22 +2259,17 @@ check_file_mdc_api_errs(void)
/*-------------------------------------------------------------------------
- * Function: main
+ * Function: main
*
- * Purpose: Run tests on the cache code contained in H5C.c
+ * Purpose: Run tests on the cache code contained in H5C.c
*
- * Return: Success:
+ * Return: EXIT_SUCCESS/EXIT_FAILURE
*
- * Failure:
- *
- * Programmer: John Mainzer
+ * Programmer: John Mainzer
* 6/24/04
*
- * Modifications:
- *
*-------------------------------------------------------------------------
*/
-
int
main(void)
{
@@ -3337,22 +2286,51 @@ main(void)
printf("===================================\n");
+ /* Initialize invalid configurations.
+ */
+ invalid_configs = init_invalid_configs();
+
+ if ( NULL == invalid_configs ) {
+
+ failure_mssg = "Unable to allocate memory for invalid configs.";
+ HDfprintf(stdout, "%s: failure_mssg = \"%s\".\n", FUNC, failure_mssg);
+ return EXIT_FAILURE;
+ }
+
#if 1
- nerrs += check_fapl_mdc_api_calls();
+ if(!check_fapl_mdc_api_calls())
+ nerrs += 1;
#endif
#if 1
- nerrs += check_file_mdc_api_calls();
+ if(!check_file_mdc_api_calls())
+ nerrs += 1;
#endif
#if 1
- nerrs += mdc_api_call_smoke_check(express_test);
+ if(!mdc_api_call_smoke_check(express_test))
+ nerrs += 1;
#endif
#if 1
- nerrs += check_fapl_mdc_api_errs();
+ if(!check_fapl_mdc_api_errs())
+ nerrs += 1;
#endif
#if 1
- nerrs += check_file_mdc_api_errs();
+ if(!check_file_mdc_api_errs())
+ nerrs += 1;
#endif
- return( nerrs > 0 );
+ if ( invalid_configs ) {
+
+ HDfree(invalid_configs);
+ }
+
+ if ( nerrs > 0 ) {
+
+ return EXIT_FAILURE;
+
+ } else {
+
+ return EXIT_SUCCESS;
+ }
} /* main() */
+