diff options
Diffstat (limited to 'test/cache.c')
-rw-r--r-- | test/cache.c | 122 |
1 files changed, 69 insertions, 53 deletions
diff --git a/test/cache.c b/test/cache.c index 17095bc..46936f8 100644 --- a/test/cache.c +++ b/test/cache.c @@ -13764,45 +13764,53 @@ check_expunge_entry(void) * it without marking it dirty. */ - protect_entry(cache_ptr, 0, 0); + if ( pass ) { - unprotect_entry(cache_ptr, 0, 0, FALSE, H5C__NO_FLAGS_SET); + protect_entry(cache_ptr, 0, 0); + + unprotect_entry(cache_ptr, 0, 0, FALSE, H5C__NO_FLAGS_SET); + + } if ( pass ) { result = H5C_get_entry_status(cache_ptr, entry_ptr->addr, &entry_size, &in_cache, &is_dirty, &is_protected, &is_pinned); - if ( result < 0 ) { + if ( result < 0 ) { - pass = FALSE; - HDsnprintf(msg, (size_t)128, - "H5AC_get_entry_status() reports failure 2."); - failure_mssg = msg; + pass = FALSE; + HDsnprintf(msg, (size_t)128, + "H5AC_get_entry_status() reports failure 2."); + failure_mssg = msg; - } else if ( !in_cache || is_dirty || is_protected || is_pinned ) { + } else if ( !in_cache || is_dirty || is_protected || is_pinned ) { - pass = FALSE; - HDsnprintf(msg, (size_t)128, "Unexpected status 2."); - failure_mssg = msg; + pass = FALSE; + HDsnprintf(msg, (size_t)128, "Unexpected status 2."); + failure_mssg = msg; - } else if ( ( ! entry_ptr->loaded ) || - ( entry_ptr->cleared ) || - ( entry_ptr->flushed ) || - ( entry_ptr->destroyed ) ) { + } else if ( ( ! entry_ptr->loaded ) || + ( entry_ptr->cleared ) || + ( entry_ptr->flushed ) || + ( entry_ptr->destroyed ) ) { - pass = FALSE; - HDsnprintf(msg, (size_t)128, "Unexpected entry history 2."); - failure_mssg = msg; + pass = FALSE; + HDsnprintf(msg, (size_t)128, "Unexpected entry history 2."); + failure_mssg = msg; - } + } } /* Expunge the entry and then verify that it is no longer in the cache. * Also verify that the entry was loaded, cleared, and destroyed, but * not flushed. */ - expunge_entry(cache_ptr, 0, 0); + if ( pass ) { + + expunge_entry(cache_ptr, 0, 0); + + } if ( pass ) { @@ -13813,29 +13821,29 @@ check_expunge_entry(void) result = H5C_get_entry_status(cache_ptr, entry_ptr->addr, &entry_size, &in_cache, &is_dirty, &is_protected, &is_pinned); - if ( result < 0 ) { + if ( result < 0 ) { - pass = FALSE; - HDsnprintf(msg, (size_t)128, - "H5AC_get_entry_status() reports failure 3."); - failure_mssg = msg; + pass = FALSE; + HDsnprintf(msg, (size_t)128, + "H5AC_get_entry_status() reports failure 3."); + failure_mssg = msg; - } else if ( in_cache ) { + } else if ( in_cache ) { - pass = FALSE; - HDsnprintf(msg, (size_t)128, "Unexpected status 3."); - failure_mssg = msg; + pass = FALSE; + HDsnprintf(msg, (size_t)128, "Unexpected status 3."); + failure_mssg = msg; - } else if ( ( ! entry_ptr->loaded ) || - ( ! entry_ptr->cleared ) || - ( entry_ptr->flushed ) || - ( ! entry_ptr->destroyed ) ) { + } else if ( ( ! entry_ptr->loaded ) || + ( ! entry_ptr->cleared ) || + ( entry_ptr->flushed ) || + ( ! entry_ptr->destroyed ) ) { - pass = FALSE; - HDsnprintf(msg, (size_t)128, "Unexpected entry history 3."); - failure_mssg = msg; + pass = FALSE; + HDsnprintf(msg, (size_t)128, "Unexpected entry history 3."); + failure_mssg = msg; - } + } } /* now repeat the process with a different entry. On unprotect @@ -13855,14 +13863,14 @@ check_expunge_entry(void) &in_cache, &is_dirty, &is_protected, &is_pinned); - if ( result < 0 ) { + if ( result < 0 ) { - pass = FALSE; - HDsnprintf(msg, (size_t)128, - "H5AC_get_entry_status() reports failure 4."); - failure_mssg = msg; + pass = FALSE; + HDsnprintf(msg, (size_t)128, + "H5AC_get_entry_status() reports failure 4."); + failure_mssg = msg; - } else if ( in_cache ) { + } else if ( in_cache ) { pass = FALSE; HDsnprintf(msg, (size_t)128, "Unexpected status 4."); @@ -13877,16 +13885,20 @@ check_expunge_entry(void) HDsnprintf(msg, (size_t)128, "Unexpected entry history 4."); failure_mssg = msg; - } + } } /* protect the entry to force the cache to load it, and then unprotect * it with the dirty flag set. */ - protect_entry(cache_ptr, 0, 1); + if ( pass ) { + + protect_entry(cache_ptr, 0, 1); + + unprotect_entry(cache_ptr, 0, 1, TRUE, H5C__NO_FLAGS_SET); - unprotect_entry(cache_ptr, 0, 1, TRUE, H5C__NO_FLAGS_SET); + } if ( pass ) { @@ -13894,14 +13906,14 @@ check_expunge_entry(void) &in_cache, &is_dirty, &is_protected, &is_pinned); - if ( result < 0 ) { + if ( result < 0 ) { pass = FALSE; HDsnprintf(msg, (size_t)128, "H5AC_get_entry_status() reports failure 5."); failure_mssg = msg; - } else if ( !in_cache || !is_dirty || is_protected || is_pinned ) { + } else if ( !in_cache || !is_dirty || is_protected || is_pinned ) { pass = FALSE; HDsnprintf(msg, (size_t)128, "Unexpected status 5."); @@ -13916,14 +13928,18 @@ check_expunge_entry(void) HDsnprintf(msg, (size_t)128, "Unexpected entry history 5."); failure_mssg = msg; - } + } } /* Expunge the entry and then verify that it is no longer in the cache. * Also verify that the entry was loaded, cleared and destroyed, but not * flushed. */ - expunge_entry(cache_ptr, 0, 1); + if ( pass ) { + + expunge_entry(cache_ptr, 0, 1); + + } if ( pass ) { @@ -13935,14 +13951,14 @@ check_expunge_entry(void) &in_cache, &is_dirty, &is_protected, &is_pinned); - if ( result < 0 ) { + if ( result < 0 ) { pass = FALSE; HDsnprintf(msg, (size_t)128, "H5AC_get_entry_status() reports failure 6."); failure_mssg = msg; - } else if ( in_cache ) { + } else if ( in_cache ) { pass = FALSE; HDsnprintf(msg, (size_t)128, "Unexpected status 6."); @@ -13957,7 +13973,7 @@ check_expunge_entry(void) HDsnprintf(msg, (size_t)128, "Unexpected entry history 6."); failure_mssg = msg; - } + } } if ( pass ) { |