summaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/cache.c45
-rw-r--r--test/cache_api.c8
-rw-r--r--test/cache_common.c6
3 files changed, 33 insertions, 26 deletions
diff --git a/test/cache.c b/test/cache.c
index 3157435..f286f3d 100644
--- a/test/cache.c
+++ b/test/cache.c
@@ -84,7 +84,6 @@ static void check_rename_err(void);
static void check_double_pin_err(void);
static void check_double_unpin_err(void);
static void check_pin_entry_errs(void);
-static void check_pin_protected_entry(void);
static void check_double_protect_err(void);
static void check_double_unprotect_err(void);
static void check_mark_pinned_entry_dirty_errs(void);
@@ -7445,7 +7444,7 @@ check_rename_entry__run_test(H5C_t * cache_ptr,
static char msg[128];
unsigned int flags = H5C__NO_FLAGS_SET;
test_entry_t * base_addr;
- test_entry_t * entry_ptr;
+ test_entry_t * entry_ptr = NULL;
H5C_cache_entry_t * test_ptr = NULL;
if ( cache_ptr == NULL ) {
@@ -17588,7 +17587,7 @@ check_auto_cache_resize_aux_fcns(void)
/*-------------------------------------------------------------------------
* Function: check_get_entry_status()
*
- * Purpose: Verify that H5AC_get_entry_status() behaves as expected.
+ * Purpose: Verify that H5C_get_entry_status() behaves as expected.
*
* Return: void
*
@@ -17606,12 +17605,16 @@ check_get_entry_status(void)
const char * fcn_name = "check_get_entry_status";
static char msg[128];
herr_t result;
- unsigned int status;
+ hbool_t in_cache;
+ hbool_t is_dirty;
+ hbool_t is_protected;
+ hbool_t is_pinned;
+ size_t entry_size;
H5C_t * cache_ptr = NULL;
test_entry_t * base_addr;
test_entry_t * entry_ptr;
- TESTING("H5AC_check_get_entry_status() functionality");
+ TESTING("H5C_get_entry_status() functionality");
pass = TRUE;
@@ -17628,7 +17631,8 @@ check_get_entry_status(void)
if ( pass ) {
- result = H5AC_get_entry_status(cache_ptr, entry_ptr->addr, &status);
+ result = H5C_get_entry_status(cache_ptr, entry_ptr->addr, &entry_size,
+ &in_cache, &is_dirty, &is_protected, &is_pinned);
if ( result < 0 ) {
@@ -17637,7 +17641,7 @@ check_get_entry_status(void)
"H5AC_get_entry_status() reports failure 1.");
failure_mssg = msg;
- } else if ( status != 0 ) {
+ } else if ( in_cache || is_dirty || is_protected || is_pinned ) {
pass = FALSE;
HDsnprintf(msg, (size_t)128, "Unexpected status 1.");
@@ -17651,7 +17655,8 @@ check_get_entry_status(void)
if ( pass ) {
- result = H5AC_get_entry_status(cache_ptr, entry_ptr->addr, &status);
+ result = H5C_get_entry_status(cache_ptr, entry_ptr->addr, &entry_size,
+ &in_cache, &is_dirty, &is_protected, &is_pinned);
if ( result < 0 ) {
@@ -17660,7 +17665,7 @@ check_get_entry_status(void)
"H5AC_get_entry_status() reports failure 2.");
failure_mssg = msg;
- } else if ( status != H5AC_ES__IN_CACHE ) {
+ } else if ( !in_cache || is_dirty || is_protected || is_pinned ) {
pass = FALSE;
HDsnprintf(msg, (size_t)128, "Unexpected status 2.");
@@ -17672,7 +17677,8 @@ check_get_entry_status(void)
if ( pass ) {
- result = H5AC_get_entry_status(cache_ptr, entry_ptr->addr, &status);
+ result = H5C_get_entry_status(cache_ptr, entry_ptr->addr, &entry_size,
+ &in_cache, &is_dirty, &is_protected, &is_pinned);
if ( result < 0 ) {
@@ -17681,7 +17687,7 @@ check_get_entry_status(void)
"H5AC_get_entry_status() reports failure 3.");
failure_mssg = msg;
- } else if ( status != (H5AC_ES__IN_CACHE | H5AC_ES__IS_PROTECTED) ) {
+ } else if ( !in_cache || is_dirty || !is_protected || is_pinned ) {
pass = FALSE;
HDsnprintf(msg, (size_t)128, "Unexpected status 3.");
@@ -17693,7 +17699,8 @@ check_get_entry_status(void)
if ( pass ) {
- result = H5AC_get_entry_status(cache_ptr, entry_ptr->addr, &status);
+ result = H5C_get_entry_status(cache_ptr, entry_ptr->addr, &entry_size,
+ &in_cache, &is_dirty, &is_protected, &is_pinned);
if ( result < 0 ) {
@@ -17702,7 +17709,7 @@ check_get_entry_status(void)
"H5AC_get_entry_status() reports failure 4.");
failure_mssg = msg;
- } else if ( status != (H5AC_ES__IN_CACHE | H5AC_ES__IS_PINNED) ) {
+ } else if ( !in_cache || is_dirty || is_protected || !is_pinned ) {
pass = FALSE;
HDsnprintf(msg, (size_t)128, "Unexpected status 4.");
@@ -17714,7 +17721,8 @@ check_get_entry_status(void)
if ( pass ) {
- result = H5AC_get_entry_status(cache_ptr, entry_ptr->addr, &status);
+ result = H5C_get_entry_status(cache_ptr, entry_ptr->addr, &entry_size,
+ &in_cache, &is_dirty, &is_protected, &is_pinned);
if ( result < 0 ) {
@@ -17723,9 +17731,7 @@ check_get_entry_status(void)
"H5AC_get_entry_status() reports failure 5.");
failure_mssg = msg;
- } else if ( status != (H5AC_ES__IN_CACHE |
- H5AC_ES__IS_PINNED |
- H5AC_ES__IS_DIRTY) ) {
+ } else if ( !in_cache || !is_dirty || is_protected || !is_pinned ) {
pass = FALSE;
HDsnprintf(msg, (size_t)128, "Unexpected status 5.");
@@ -17737,7 +17743,8 @@ check_get_entry_status(void)
if ( pass ) {
- result = H5AC_get_entry_status(cache_ptr, entry_ptr->addr, &status);
+ result = H5C_get_entry_status(cache_ptr, entry_ptr->addr, &entry_size,
+ &in_cache, &is_dirty, &is_protected, &is_pinned);
if ( result < 0 ) {
@@ -17746,7 +17753,7 @@ check_get_entry_status(void)
"H5AC_get_entry_status() reports failure 6.");
failure_mssg = msg;
- } else if ( status != (H5AC_ES__IN_CACHE | H5AC_ES__IS_DIRTY) ) {
+ } else if ( !in_cache || !is_dirty || is_protected || is_pinned ) {
pass = FALSE;
HDsnprintf(msg, (size_t)128, "Unexpected status 6.");
diff --git a/test/cache_api.c b/test/cache_api.c
index 902a829..c1089dd 100644
--- a/test/cache_api.c
+++ b/test/cache_api.c
@@ -1325,9 +1325,9 @@ mdc_api_call_smoke_check(void)
double min_hit_rate = 0.90;
hbool_t dump_cache_size = FALSE;
hid_t file_id = -1;
- hid_t dataspace_id;
+ hid_t dataspace_id = -1;
hid_t filespace_ids[NUM_DSETS];
- hid_t memspace_id;
+ hid_t memspace_id = -1;
hid_t dataset_ids[NUM_DSETS];
hid_t properties;
char dset_name[64];
@@ -2734,7 +2734,7 @@ check_fapl_mdc_api_errs(void)
static char msg[128];
int i;
herr_t result;
- hid_t fapl_id;
+ hid_t fapl_id = -1;
H5AC_cache_config_t default_config = H5AC__DEFAULT_CACHE_CONFIG;
H5AC_cache_config_t scratch;
@@ -2904,7 +2904,7 @@ check_file_mdc_api_errs(void)
static char msg[128];
int i;
herr_t result;
- hid_t file_id;
+ hid_t file_id = -1;
size_t max_size;
size_t min_clean_size;
size_t cur_size;
diff --git a/test/cache_common.c b/test/cache_common.c
index 55276d0..26bddf0 100644
--- a/test/cache_common.c
+++ b/test/cache_common.c
@@ -340,7 +340,7 @@ type_and_index_to_addr(int32_t type,
/*-------------------------------------------------------------------------
*
- * Function: H5AC_check_if_write_permitted
+ * Function: check_if_write_permitted
*
* Purpose: Determine if a write is permitted under the current
* circumstances, and set *write_permitted_ptr accordingly.
@@ -2021,7 +2021,7 @@ unprotect_entry(H5C_t * cache_ptr,
if ( ( dirty == TRUE ) || ( dirty == FALSE ) ) {
- flags |= (dirty ? H5AC__DIRTIED_FLAG : H5AC__NO_FLAGS_SET);
+ flags |= (dirty ? H5C__DIRTIED_FLAG : H5C__NO_FLAGS_SET);
entry_ptr->is_dirty = (entry_ptr->is_dirty || dirty);
}
@@ -2058,7 +2058,7 @@ unprotect_entry(H5C_t * cache_ptr,
HDassert( ((entry_ptr->header).type)->id == type );
- if ( ( flags & H5AC__DIRTIED_FLAG ) != 0
+ if ( ( flags & H5C__DIRTIED_FLAG ) != 0
&& ( (flags & H5C__DELETED_FLAG) == 0 ) ) {
HDassert( entry_ptr->header.is_dirty );