summaryrefslogtreecommitdiffstats
path: root/test/cache_api.c
diff options
context:
space:
mode:
authorDavid Young <dyoung@hdfgroup.org>2019-12-09 16:30:58 (GMT)
committerDavid Young <dyoung@hdfgroup.org>2019-12-09 16:30:58 (GMT)
commitc8f533cfc33ac743227cbed8eba361c715a2976f (patch)
treebcae5320f80bac774647cacbbd8493604f9384d2 /test/cache_api.c
parentadcf8a315e82c0848d126e7e46b662930c081896 (diff)
downloadhdf5-c8f533cfc33ac743227cbed8eba361c715a2976f.zip
hdf5-c8f533cfc33ac743227cbed8eba361c715a2976f.tar.gz
hdf5-c8f533cfc33ac743227cbed8eba361c715a2976f.tar.bz2
Merge all of my changes from merge-back-to-feature-vfd_swmr-attempt-1,
including the merge of `hdffv/hdf5/develop`, back to the branch that Vailin and I share. Now I need to put this branch on a fork with a less confusing name than vchoi_fork!
Diffstat (limited to 'test/cache_api.c')
-rw-r--r--test/cache_api.c84
1 files changed, 42 insertions, 42 deletions
diff --git a/test/cache_api.c b/test/cache_api.c
index 7c0ffa3..87b9567 100644
--- a/test/cache_api.c
+++ b/test/cache_api.c
@@ -14,8 +14,8 @@
/* Programmer: John Mainzer
* 11/10/05
*
- * This file contains tests for the API calls associated
- * with the cache implemented in H5C.c
+ * This file contains tests for the API calls associated
+ * with the cache implemented in H5C.c
*/
#include "cache_common.h"
@@ -36,7 +36,7 @@ static hbool_t check_fapl_mdc_api_errs(void);
static hbool_t check_file_mdc_api_errs(unsigned paged, hid_t fcpl_id);
-
+
/**************************************************************************/
/**************************************************************************/
/********************************* tests: *********************************/
@@ -104,8 +104,8 @@ check_fapl_mdc_api_calls(unsigned paged, hid_t fcpl_id)
/* hbool_t apply_empty_reserve = */ TRUE,
/* double empty_reserve = */ 0.05f,
/* int dirty_bytes_threshold = */ (256 * 1024),
- /* int metadata_write_strategy = */
- H5AC__DEFAULT_METADATA_WRITE_STRATEGY
+ /* int metadata_write_strategy = */
+ H5AC__DEFAULT_METADATA_WRITE_STRATEGY
};
H5AC_cache_config_t scratch;
H5C_auto_size_ctl_t default_auto_size_ctl;
@@ -230,7 +230,7 @@ check_fapl_mdc_api_calls(unsigned paged, hid_t fcpl_id)
/* get a pointer to the files internal data structure */
if ( pass ) {
- file_ptr = (H5F_t *)H5I_object_verify(file_id, H5I_FILE);
+ file_ptr = (H5F_t *)H5VL_object_verify(file_id, H5I_FILE);
if ( file_ptr == NULL ) {
@@ -378,7 +378,7 @@ check_fapl_mdc_api_calls(unsigned paged, hid_t fcpl_id)
/* get a pointer to the files internal data structure */
if ( pass ) {
- file_ptr = (H5F_t *)H5I_object_verify(file_id, H5I_FILE);
+ file_ptr = (H5F_t *)H5VL_object_verify(file_id, H5I_FILE);
if ( file_ptr == NULL ) {
@@ -495,7 +495,7 @@ check_fapl_mdc_api_calls(unsigned paged, hid_t fcpl_id)
} /* check_fapl_mdc_api_calls() */
-
+
/*-------------------------------------------------------------------------
* Function: check_file_mdc_api_calls()
*
@@ -560,8 +560,8 @@ check_file_mdc_api_calls(unsigned paged, hid_t fcpl_id)
/* hbool_t apply_empty_reserve = */ TRUE,
/* double empty_reserve = */ 0.05f,
/* int dirty_bytes_threshold = */ (256 * 1024),
- /* int metadata_write_strategy = */
- H5AC__DEFAULT_METADATA_WRITE_STRATEGY
+ /* int metadata_write_strategy = */
+ H5AC__DEFAULT_METADATA_WRITE_STRATEGY
};
H5AC_cache_config_t mod_config_2 =
{
@@ -595,8 +595,8 @@ check_file_mdc_api_calls(unsigned paged, hid_t fcpl_id)
/* hbool_t apply_empty_reserve = */ TRUE,
/* double empty_reserve = */ 0.05f,
/* int dirty_bytes_threshold = */ (256 * 1024),
- /* int metadata_write_strategy = */
- H5AC__DEFAULT_METADATA_WRITE_STRATEGY
+ /* int metadata_write_strategy = */
+ H5AC__DEFAULT_METADATA_WRITE_STRATEGY
};
H5AC_cache_config_t mod_config_3 =
{
@@ -630,8 +630,8 @@ check_file_mdc_api_calls(unsigned paged, hid_t fcpl_id)
/* hbool_t apply_empty_reserve = */ FALSE,
/* double empty_reserve = */ 0.05f,
/* int dirty_bytes_threshold = */ (256 * 1024),
- /* int metadata_write_strategy = */
- H5AC__DEFAULT_METADATA_WRITE_STRATEGY
+ /* int metadata_write_strategy = */
+ H5AC__DEFAULT_METADATA_WRITE_STRATEGY
};
H5AC_cache_config_t mod_config_4 =
{
@@ -666,8 +666,8 @@ check_file_mdc_api_calls(unsigned paged, hid_t fcpl_id)
/* 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
+ /* int metadata_write_strategy = */
+ H5AC__DEFAULT_METADATA_WRITE_STRATEGY
};
if(paged)
@@ -813,9 +813,9 @@ check_file_mdc_api_calls(unsigned paged, hid_t fcpl_id)
else {
HDfprintf(stdout, "H5Fget_mdc_size() reports:\n");
- HDfprintf(stdout, " max_size: %ld, min_clean_size: %ld\n",
+ HDfprintf(stdout, " max_size: %ld, min_clean_size: %ld\n",
(long)max_size, (long)min_clean_size);
- HDfprintf(stdout, " cur_size: %ld, cur_num_entries: %d\n",
+ HDfprintf(stdout, " cur_size: %ld, cur_num_entries: %d\n",
(long)cur_size, cur_num_entries);
}
#endif
@@ -846,7 +846,7 @@ check_file_mdc_api_calls(unsigned paged, hid_t fcpl_id)
}
if ( ! pass ) {
-
+
HDfprintf(stdout, "%s: failure_mssg = \"%s\".\n", FUNC, failure_mssg);
}
@@ -854,14 +854,14 @@ check_file_mdc_api_calls(unsigned paged, hid_t fcpl_id)
} /* check_file_mdc_api_calls() */
-
+
/*-------------------------------------------------------------------------
- * Function: mdc_api_call_smoke_check()
+ * Function: mdc_api_call_smoke_check()
*
* Purpose: Initial basic functional test to see if there are problems
* with the cache API calls.
*
- * NOTE: This test takes some time to run and checks the
+ * NOTE: This test takes some time to run and checks the
* HDF5TestExpress environment variable.
*
* Return: Test pass status (TRUE/FALSE)
@@ -933,8 +933,8 @@ mdc_api_call_smoke_check(int express_test, unsigned paged, hid_t fcpl_id)
/* hbool_t apply_empty_reserve = */ TRUE,
/* double empty_reserve = */ 0.05f,
/* int dirty_bytes_threshold = */ (256 * 1024),
- /* int metadata_write_strategy = */
- H5AC__DEFAULT_METADATA_WRITE_STRATEGY
+ /* int metadata_write_strategy = */
+ H5AC__DEFAULT_METADATA_WRITE_STRATEGY
};
H5AC_cache_config_t mod_config_2 =
{
@@ -968,8 +968,8 @@ mdc_api_call_smoke_check(int express_test, unsigned paged, hid_t fcpl_id)
/* hbool_t apply_empty_reserve = */ TRUE,
/* double empty_reserve = */ 0.05f,
/* int dirty_bytes_threshold = */ (256 * 1024),
- /* int metadata_write_strategy = */
- H5AC__DEFAULT_METADATA_WRITE_STRATEGY
+ /* int metadata_write_strategy = */
+ H5AC__DEFAULT_METADATA_WRITE_STRATEGY
};
H5AC_cache_config_t mod_config_3 =
{
@@ -1003,8 +1003,8 @@ mdc_api_call_smoke_check(int express_test, unsigned paged, hid_t fcpl_id)
/* hbool_t apply_empty_reserve = */ TRUE,
/* double empty_reserve = */ 0.05f,
/* int dirty_bytes_threshold = */ (256 * 1024),
- /* int metadata_write_strategy = */
- H5AC__DEFAULT_METADATA_WRITE_STRATEGY
+ /* int metadata_write_strategy = */
+ H5AC__DEFAULT_METADATA_WRITE_STRATEGY
};
if(paged)
@@ -1117,9 +1117,9 @@ mdc_api_call_smoke_check(int express_test, unsigned paged, hid_t fcpl_id)
/* create the dataset */
if ( pass ) {
- sprintf(dset_name, "/dset%03d", i);
+ HDsprintf(dset_name, "/dset%03d", i);
dataset_ids[i] = H5Dcreate2(file_id, dset_name, H5T_STD_I32BE,
- dataspace_id, H5P_DEFAULT, properties, H5P_DEFAULT);
+ dataspace_id, H5P_DEFAULT, properties, H5P_DEFAULT);
if ( dataset_ids[i] < 0 ) {
@@ -1327,7 +1327,7 @@ mdc_api_call_smoke_check(int express_test, unsigned paged, hid_t fcpl_id)
pass = FALSE;
failure_mssg = "slab validation failed.";
#else /* as above */
- fprintf(stdout, "Chunk (%0d, %0d) in /dset%03d is invalid.\n",
+ HDfprintf(stdout, "Chunk (%0d, %0d) in /dset%03d is invalid.\n",
i, j, m);
#endif
}
@@ -1448,7 +1448,7 @@ mdc_api_call_smoke_check(int express_test, unsigned paged, hid_t fcpl_id)
pass = FALSE;
failure_mssg = "slab validation failed.";
#if 0 /* as above */
- fprintf(stdout, "Chunk (%0d, %0d) in /dset%03d is invalid.\n",
+ HDfprintf(stdout, "Chunk (%0d, %0d) in /dset%03d is invalid.\n",
i, j, m);
#endif
}
@@ -1523,9 +1523,9 @@ mdc_api_call_smoke_check(int express_test, unsigned paged, hid_t fcpl_id)
}
if ( pass ) {
-
+
PASSED();
-
+
} else {
H5_FAILED();
@@ -1561,7 +1561,7 @@ mdc_api_call_smoke_check(int express_test, unsigned paged, hid_t fcpl_id)
*-------------------------------------------------------------------------
*/
-#define NUM_INVALID_CONFIGS 36
+#define NUM_INVALID_CONFIGS 36
static H5AC_cache_config_t * invalid_configs = NULL;
static H5AC_cache_config_t *
@@ -1737,7 +1737,7 @@ init_invalid_configs(void) {
} /* initialize_invalid_configs() */
-
+
/*-------------------------------------------------------------------------
* Function: check_fapl_mdc_api_errs()
*
@@ -1913,7 +1913,7 @@ check_fapl_mdc_api_errs(void)
} /* check_fapl_mdc_api_errs() */
-
+
/*-------------------------------------------------------------------------
* Function: check_file_mdc_api_errs()
*
@@ -2259,7 +2259,7 @@ check_file_mdc_api_errs(unsigned paged, hid_t fcpl_id)
} /* check_file_mdc_api_errs() */
-
+
/*-------------------------------------------------------------------------
* Function: main
*
@@ -2285,10 +2285,10 @@ main(void)
express_test = GetTestExpress();
- printf("===================================\n");
- printf("Cache API tests\n");
- printf(" express_test = %d\n", express_test);
- printf("===================================\n");
+ HDprintf("===================================\n");
+ HDprintf("Cache API tests\n");
+ HDprintf(" express_test = %d\n", express_test);
+ HDprintf("===================================\n");
/* Initialize invalid configurations.