summaryrefslogtreecommitdiffstats
path: root/test/cache_api.c
diff options
context:
space:
mode:
authorJerome Soumagne <jsoumagne@hdfgroup.org>2015-08-21 22:44:22 (GMT)
committerJerome Soumagne <jsoumagne@hdfgroup.org>2015-08-21 22:44:22 (GMT)
commitab7d724ffd5749c1e3666fd1be0b92f41613af1e (patch)
treef3e820daa24477263f5fc3efd43bf459865f260b /test/cache_api.c
parent7ce2d52cf69f6f6477e0f16e9d85d67cc54d5949 (diff)
downloadhdf5-ab7d724ffd5749c1e3666fd1be0b92f41613af1e.zip
hdf5-ab7d724ffd5749c1e3666fd1be0b92f41613af1e.tar.gz
hdf5-ab7d724ffd5749c1e3666fd1be0b92f41613af1e.tar.bz2
[svn-r27548] Revert r27545
Diffstat (limited to 'test/cache_api.c')
-rw-r--r--test/cache_api.c140
1 files changed, 105 insertions, 35 deletions
diff --git a/test/cache_api.c b/test/cache_api.c
index bebb828..1697884 100644
--- a/test/cache_api.c
+++ b/test/cache_api.c
@@ -1530,7 +1530,7 @@ mdc_api_call_smoke_check(int express_test)
* Note: It is assumed that boolean parameters are only set to TRUE/FALSE.
*/
-#define NUM_INVALID_CONFIGS 36
+#define NUM_INVALID_CONFIGS 42
H5AC_cache_config_t invalid_configs[NUM_INVALID_CONFIGS] =
{
@@ -1605,7 +1605,42 @@ H5AC_cache_config_t invalid_configs[NUM_INVALID_CONFIGS] =
H5AC__DEFAULT_METADATA_WRITE_STRATEGY
},
{
- /* 2 -- max_size too big */
+ /* 2 -- bad set_initial_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 = */ 2,
+ /* 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
+ },
+ {
+ /* 3 -- max_size too big */
/* int version = */ H5C__CURR_AUTO_SIZE_CTL_VER,
/* hbool_t rpt_fcn_enabled = */ FALSE,
/* hbool_t open_trace_file = */ FALSE,
@@ -1640,7 +1675,7 @@ H5AC_cache_config_t invalid_configs[NUM_INVALID_CONFIGS] =
H5AC__DEFAULT_METADATA_WRITE_STRATEGY
},
{
- /* 3 -- min_size too small */
+ /* 4 -- min_size too small */
/* int version = */ H5C__CURR_AUTO_SIZE_CTL_VER,
/* hbool_t rpt_fcn_enabled = */ FALSE,
/* hbool_t open_trace_file = */ FALSE,
@@ -1675,7 +1710,7 @@ H5AC_cache_config_t invalid_configs[NUM_INVALID_CONFIGS] =
H5AC__DEFAULT_METADATA_WRITE_STRATEGY
},
{
- /* 4 -- min_size > max_size */
+ /* 5 -- min_size > max_size */
/* int version = */ H5C__CURR_AUTO_SIZE_CTL_VER,
/* hbool_t rpt_fcn_enabled = */ FALSE,
/* hbool_t open_trace_file = */ FALSE,
@@ -1710,7 +1745,7 @@ H5AC_cache_config_t invalid_configs[NUM_INVALID_CONFIGS] =
H5AC__DEFAULT_METADATA_WRITE_STRATEGY
},
{
- /* 5 -- initial size out of range (too big) */
+ /* 6 -- 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,
@@ -1745,7 +1780,7 @@ H5AC_cache_config_t invalid_configs[NUM_INVALID_CONFIGS] =
H5AC__DEFAULT_METADATA_WRITE_STRATEGY
},
{
- /* 6 -- initial_size out of range (too small) */
+ /* 7 -- 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,
@@ -1780,7 +1815,7 @@ H5AC_cache_config_t invalid_configs[NUM_INVALID_CONFIGS] =
H5AC__DEFAULT_METADATA_WRITE_STRATEGY
},
{
- /* 7 -- min_clean_fraction too big */
+ /* 8 -- 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,
@@ -1815,7 +1850,7 @@ H5AC_cache_config_t invalid_configs[NUM_INVALID_CONFIGS] =
H5AC__DEFAULT_METADATA_WRITE_STRATEGY
},
{
- /* 8 -- min_clean_fraction too small */
+ /* 9 -- 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,
@@ -1850,7 +1885,7 @@ H5AC_cache_config_t invalid_configs[NUM_INVALID_CONFIGS] =
H5AC__DEFAULT_METADATA_WRITE_STRATEGY
},
{
- /* 9 -- epoch_length too small */
+ /* 10 -- epoch_length too small */
/* int version = */ H5C__CURR_AUTO_SIZE_CTL_VER,
/* hbool_t rpt_fcn_enabled = */ FALSE,
/* hbool_t open_trace_file = */ FALSE,
@@ -1885,7 +1920,7 @@ H5AC_cache_config_t invalid_configs[NUM_INVALID_CONFIGS] =
H5AC__DEFAULT_METADATA_WRITE_STRATEGY
},
{
- /* 10 -- epoch_length too big */
+ /* 11 -- epoch_length too big */
/* int version = */ H5C__CURR_AUTO_SIZE_CTL_VER,
/* hbool_t rpt_fcn_enabled = */ FALSE,
/* hbool_t open_trace_file = */ FALSE,
@@ -1920,7 +1955,7 @@ H5AC_cache_config_t invalid_configs[NUM_INVALID_CONFIGS] =
H5AC__DEFAULT_METADATA_WRITE_STRATEGY
},
{
- /* 11 -- invalid incr_mode */
+ /* 12 -- invalid incr_mode */
/* int version = */ H5C__CURR_AUTO_SIZE_CTL_VER,
/* hbool_t rpt_fcn_enabled = */ FALSE,
/* hbool_t open_trace_file = */ FALSE,
@@ -1955,7 +1990,7 @@ H5AC_cache_config_t invalid_configs[NUM_INVALID_CONFIGS] =
H5AC__DEFAULT_METADATA_WRITE_STRATEGY
},
{
- /* 12 -- lower_hr_threshold too small */
+ /* 13 -- 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,
@@ -1990,7 +2025,7 @@ H5AC_cache_config_t invalid_configs[NUM_INVALID_CONFIGS] =
H5AC__DEFAULT_METADATA_WRITE_STRATEGY
},
{
- /* 13 -- lower_hr_threshold too big */
+ /* 14 -- 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,
@@ -2025,7 +2060,7 @@ H5AC_cache_config_t invalid_configs[NUM_INVALID_CONFIGS] =
H5AC__DEFAULT_METADATA_WRITE_STRATEGY
},
{
- /* 14 -- increment too small */
+ /* 15 -- increment too small */
/* int version = */ H5C__CURR_AUTO_SIZE_CTL_VER,
/* hbool_t rpt_fcn_enabled = */ FALSE,
/* hbool_t open_trace_file = */ FALSE,
@@ -2060,7 +2095,7 @@ H5AC_cache_config_t invalid_configs[NUM_INVALID_CONFIGS] =
H5AC__DEFAULT_METADATA_WRITE_STRATEGY
},
{
- /* 15 -- invalid flash_incr_mode */
+ /* 16 -- invalid flash_incr_mode */
/* int version = */ H5C__CURR_AUTO_SIZE_CTL_VER,
/* hbool_t rpt_fcn_enabled = */ FALSE,
/* hbool_t open_trace_file = */ FALSE,
@@ -2095,7 +2130,7 @@ H5AC_cache_config_t invalid_configs[NUM_INVALID_CONFIGS] =
H5AC__DEFAULT_METADATA_WRITE_STRATEGY
},
{
- /* 16 -- flash_multiple too small */
+ /* 17 -- flash_multiple too small */
/* int version = */ H5C__CURR_AUTO_SIZE_CTL_VER,
/* hbool_t rpt_fcn_enabled = */ FALSE,
/* hbool_t open_trace_file = */ FALSE,
@@ -2130,7 +2165,7 @@ H5AC_cache_config_t invalid_configs[NUM_INVALID_CONFIGS] =
H5AC__DEFAULT_METADATA_WRITE_STRATEGY
},
{
- /* 17 -- flash_multiple too big */
+ /* 18 -- flash_multiple too big */
/* int version = */ H5C__CURR_AUTO_SIZE_CTL_VER,
/* hbool_t rpt_fcn_enabled = */ FALSE,
/* hbool_t open_trace_file = */ FALSE,
@@ -2165,7 +2200,7 @@ H5AC_cache_config_t invalid_configs[NUM_INVALID_CONFIGS] =
H5AC__DEFAULT_METADATA_WRITE_STRATEGY
},
{
- /* 18 -- flash_threshold too small */
+ /* 19 -- flash_threshold too small */
/* int version = */ H5C__CURR_AUTO_SIZE_CTL_VER,
/* hbool_t rpt_fcn_enabled = */ FALSE,
/* hbool_t open_trace_file = */ FALSE,
@@ -2200,7 +2235,7 @@ H5AC_cache_config_t invalid_configs[NUM_INVALID_CONFIGS] =
H5AC__DEFAULT_METADATA_WRITE_STRATEGY
},
{
- /* 19 -- flash_threshold too big */
+ /* 20 -- flash_threshold too big */
/* int version = */ H5C__CURR_AUTO_SIZE_CTL_VER,
/* hbool_t rpt_fcn_enabled = */ FALSE,
/* hbool_t open_trace_file = */ FALSE,
@@ -2235,7 +2270,7 @@ H5AC_cache_config_t invalid_configs[NUM_INVALID_CONFIGS] =
H5AC__DEFAULT_METADATA_WRITE_STRATEGY
},
{
- /* 20 -- bad decr_mode */
+ /* 21 -- bad decr_mode */
/* int version = */ H5C__CURR_AUTO_SIZE_CTL_VER,
/* hbool_t rpt_fcn_enabled = */ FALSE,
/* hbool_t open_trace_file = */ FALSE,
@@ -2270,7 +2305,7 @@ H5AC_cache_config_t invalid_configs[NUM_INVALID_CONFIGS] =
H5AC__DEFAULT_METADATA_WRITE_STRATEGY
},
{
- /* 21 -- upper_hr_threshold too big */
+ /* 22 -- 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,
@@ -2305,7 +2340,7 @@ H5AC_cache_config_t invalid_configs[NUM_INVALID_CONFIGS] =
H5AC__DEFAULT_METADATA_WRITE_STRATEGY
},
{
- /* 22 -- decrement too small */
+ /* 23 -- decrement too small */
/* int version = */ H5C__CURR_AUTO_SIZE_CTL_VER,
/* hbool_t rpt_fcn_enabled = */ FALSE,
/* hbool_t open_trace_file = */ FALSE,
@@ -2340,7 +2375,7 @@ H5AC_cache_config_t invalid_configs[NUM_INVALID_CONFIGS] =
H5AC__DEFAULT_METADATA_WRITE_STRATEGY
},
{
- /* 23 -- decrement too big */
+ /* 24 -- decrement too big */
/* int version = */ H5C__CURR_AUTO_SIZE_CTL_VER,
/* hbool_t rpt_fcn_enabled = */ FALSE,
/* hbool_t open_trace_file = */ FALSE,
@@ -2375,7 +2410,7 @@ H5AC_cache_config_t invalid_configs[NUM_INVALID_CONFIGS] =
H5AC__DEFAULT_METADATA_WRITE_STRATEGY
},
{
- /* 24 -- epochs_before_eviction too small */
+ /* 25 -- 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,
@@ -2410,7 +2445,7 @@ H5AC_cache_config_t invalid_configs[NUM_INVALID_CONFIGS] =
H5AC__DEFAULT_METADATA_WRITE_STRATEGY
},
{
- /* 25 -- epochs_before_eviction too big */
+ /* 26 -- 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,
@@ -2445,7 +2480,42 @@ H5AC_cache_config_t invalid_configs[NUM_INVALID_CONFIGS] =
H5AC__DEFAULT_METADATA_WRITE_STRATEGY
},
{
- /* 26 -- empty_reserve too small */
+ /* 27 -- invalid apply_empty_reserve */
+ /* 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 = */ 2,
+ /* double empty_reserve = */ 0.1f,
+ /* int dirty_bytes_threshold = */ (256 * 1024),
+ /* int metadata_write_strategy = */
+ H5AC__DEFAULT_METADATA_WRITE_STRATEGY
+ },
+ {
+ /* 28 -- empty_reserve too small */
/* int version = */ H5C__CURR_AUTO_SIZE_CTL_VER,
/* hbool_t rpt_fcn_enabled = */ FALSE,
/* hbool_t open_trace_file = */ FALSE,
@@ -2480,7 +2550,7 @@ H5AC_cache_config_t invalid_configs[NUM_INVALID_CONFIGS] =
H5AC__DEFAULT_METADATA_WRITE_STRATEGY
},
{
- /* 27 -- empty_reserve too big */
+ /* 29 -- empty_reserve too big */
/* int version = */ H5C__CURR_AUTO_SIZE_CTL_VER,
/* hbool_t rpt_fcn_enabled = */ FALSE,
/* hbool_t open_trace_file = */ FALSE,
@@ -2515,7 +2585,7 @@ H5AC_cache_config_t invalid_configs[NUM_INVALID_CONFIGS] =
H5AC__DEFAULT_METADATA_WRITE_STRATEGY
},
{
- /* 28 -- upper_hr_threshold too small */
+ /* 30 -- 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,
@@ -2550,7 +2620,7 @@ H5AC_cache_config_t invalid_configs[NUM_INVALID_CONFIGS] =
H5AC__DEFAULT_METADATA_WRITE_STRATEGY
},
{
- /* 29 -- upper_hr_threshold too big */
+ /* 31 -- 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,
@@ -2585,7 +2655,7 @@ H5AC_cache_config_t invalid_configs[NUM_INVALID_CONFIGS] =
H5AC__DEFAULT_METADATA_WRITE_STRATEGY
},
{
- /* 30 -- upper_hr_threshold <= lower_hr_threshold */
+ /* 32 -- 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,
@@ -2620,7 +2690,7 @@ H5AC_cache_config_t invalid_configs[NUM_INVALID_CONFIGS] =
H5AC__DEFAULT_METADATA_WRITE_STRATEGY
},
{
- /* 31 -- dirty_bytes_threshold too small */
+ /* 33 -- 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,
@@ -2655,7 +2725,7 @@ H5AC_cache_config_t invalid_configs[NUM_INVALID_CONFIGS] =
H5AC__DEFAULT_METADATA_WRITE_STRATEGY
},
{
- /* 32 -- dirty_bytes_threshold too big */
+ /* 34 -- 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,
@@ -2690,7 +2760,7 @@ H5AC_cache_config_t invalid_configs[NUM_INVALID_CONFIGS] =
H5AC__DEFAULT_METADATA_WRITE_STRATEGY
},
{
- /* 33 -- attempt to disable evictions when auto incr enabled */
+ /* 35 -- 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,
@@ -2725,7 +2795,7 @@ H5AC_cache_config_t invalid_configs[NUM_INVALID_CONFIGS] =
H5AC__DEFAULT_METADATA_WRITE_STRATEGY
},
{
- /* 34 -- attempt to disable evictions when auto decr enabled */
+ /* 36 -- 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,
@@ -2760,7 +2830,7 @@ H5AC_cache_config_t invalid_configs[NUM_INVALID_CONFIGS] =
H5AC__DEFAULT_METADATA_WRITE_STRATEGY
},
{
- /* 35 -- unknown metadata write strategy */
+ /* 37 -- unknown metadata write strategy */
/* int version = */ H5C__CURR_AUTO_SIZE_CTL_VER,
/* hbool_t rpt_fcn_enabled = */ FALSE,
/* hbool_t open_trace_file = */ FALSE,