diff options
Diffstat (limited to 'test/cache.c')
-rw-r--r-- | test/cache.c | 37 |
1 files changed, 13 insertions, 24 deletions
diff --git a/test/cache.c b/test/cache.c index eeb9038..734fc3b 100644 --- a/test/cache.c +++ b/test/cache.c @@ -14548,23 +14548,8 @@ check_rename_entry__run_test(H5C_t * cache_ptr, test_entry_t * entry_ptr = NULL; H5C_cache_entry_t * test_ptr = NULL; - if ( cache_ptr == NULL ) { - - pass = FALSE; - HDsnprintf(msg, (size_t)128, - "cache_ptr NULL on entry to rename test #%d.", - test_num); - failure_mssg = msg; - - } else if ( spec_ptr == NULL ) { - - pass = FALSE; - HDsnprintf(msg, (size_t)128, - "spec_ptr NULL on entry to rename test #%d.", - test_num); - failure_mssg = msg; - - } + assert( cache_ptr ); + assert( spec_ptr ); if ( pass ) { @@ -14589,12 +14574,16 @@ check_rename_entry__run_test(H5C_t * cache_ptr, } } - protect_entry(cache_ptr, spec_ptr->entry_type, spec_ptr->entry_index); + if ( pass ) { + + protect_entry(cache_ptr, spec_ptr->entry_type, spec_ptr->entry_index); - unprotect_entry(cache_ptr, spec_ptr->entry_type, spec_ptr->entry_index, - (int)(spec_ptr->is_dirty), flags); + unprotect_entry(cache_ptr, spec_ptr->entry_type, spec_ptr->entry_index, + (int)(spec_ptr->is_dirty), flags); - rename_entry(cache_ptr, spec_ptr->entry_type, spec_ptr->entry_index, FALSE); + rename_entry(cache_ptr, spec_ptr->entry_type, spec_ptr->entry_index, FALSE); + + } if ( pass ) { @@ -17933,7 +17922,7 @@ check_check_evictions_enabled_err(void) } - if ( pass ) { + if ( cache_ptr ) { takedown_cache(cache_ptr, FALSE, FALSE); } @@ -28232,7 +28221,7 @@ check_auto_cache_resize_input_errs(void) } } - if ( pass ) { + if ( cache_ptr ) { takedown_cache(cache_ptr, FALSE, FALSE); } @@ -28774,7 +28763,7 @@ check_auto_cache_resize_aux_fcns(void) } } - if ( pass ) { + if ( cache_ptr ) { takedown_cache(cache_ptr, FALSE, FALSE); } |