diff options
Diffstat (limited to 'test')
-rw-r--r-- | test/cache_image.c | 29 | ||||
-rw-r--r-- | test/cache_tagging.c | 23 | ||||
-rw-r--r-- | test/fheap.c | 57 | ||||
-rw-r--r-- | test/mf.c | 59 |
4 files changed, 63 insertions, 105 deletions
diff --git a/test/cache_image.c b/test/cache_image.c index ee49502..f8252ac 100644 --- a/test/cache_image.c +++ b/test/cache_image.c @@ -93,6 +93,7 @@ static unsigned evict_on_close_test(hbool_t single_file_vfd); #define DSET_SIZE (40 * CHUNK_SIZE) #define MAX_NUM_DSETS 256 + static void create_datasets(hid_t file_id, int min_dset, int max_dset) { @@ -3717,8 +3718,7 @@ cache_image_smoke_check_2(hbool_t single_file_vfd) if ( show_progress ) HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass); - - + /* 4) Open the file. * * Verify that the metadata cache is instructed to load the @@ -4486,6 +4486,7 @@ cache_image_smoke_check_4(hbool_t single_file_vfd) if ( show_progress ) HDfprintf(stdout, "%s:L3 cp = %d, max_dset = %d, pass = %d.\n", fcn_name, cp + 2, max_dset, pass); + } /* end while */ cp += 3; @@ -4638,7 +4639,6 @@ cache_image_smoke_check_4(hbool_t single_file_vfd) FUNC, failure_mssg); return !pass; - } /* cache_image_smoke_check_4() */ @@ -5111,8 +5111,7 @@ cache_image_smoke_check_5(hbool_t single_file_vfd) * extension message has been deleted. */ i = min_group; - while ( ( pass ) && ( i <= max_group ) ) { - + while ( ( pass ) && ( i <= max_group ) ) { sprintf(process_group_name, "/process_%d", i); validate_zoo(file_id, process_group_name, i++); } @@ -7513,10 +7512,9 @@ get_free_sections_test(hbool_t single_file_vfd) /* file_ptr->shared->first_alloc_dealloc is set to FALSE if the * file is opened R/O. */ - if ( ( file_ptr->shared->first_alloc_dealloc ) || - ( ! H5F_addr_defined(file_ptr->shared->eoa_pre_fsm_fsalloc) ) || + if ( ( ! H5F_addr_defined(file_ptr->shared->eoa_fsm_fsalloc) ) || ( ! H5F_addr_defined(file_ptr->shared->cache->image_addr) ) || - ( H5F_addr_gt(file_ptr->shared->eoa_pre_fsm_fsalloc, + ( H5F_addr_gt(file_ptr->shared->eoa_fsm_fsalloc, file_ptr->shared->cache->image_addr) ) ) { pass = FALSE; @@ -7554,11 +7552,8 @@ get_free_sections_test(hbool_t single_file_vfd) pass = FALSE; failure_mssg = "cache image not loaded (1).\n"; - } else if ( file_ptr->shared->first_alloc_dealloc ) { + } - pass = FALSE; - failure_mssg = "self referential FSMs not floated (1).\n"; - } } if ( show_progress ) @@ -7634,10 +7629,9 @@ get_free_sections_test(hbool_t single_file_vfd) */ if ( pass ) { - if ( ( ! file_ptr->shared->first_alloc_dealloc ) || - ( ! H5F_addr_defined(file_ptr->shared->eoa_pre_fsm_fsalloc) ) || + if ( ( ! H5F_addr_defined(file_ptr->shared->eoa_fsm_fsalloc) ) || ( ! H5F_addr_defined(file_ptr->shared->cache->image_addr) ) || - ( H5F_addr_gt(file_ptr->shared->eoa_pre_fsm_fsalloc, + ( H5F_addr_gt(file_ptr->shared->eoa_fsm_fsalloc, file_ptr->shared->cache->image_addr) ) ) { pass = FALSE; @@ -7675,11 +7669,8 @@ get_free_sections_test(hbool_t single_file_vfd) pass = FALSE; failure_mssg = "cache image not loaded (2).\n"; - } else if ( file_ptr->shared->first_alloc_dealloc ) { + } - pass = FALSE; - failure_mssg = "self referential FSMs not floated (2).\n"; - } } if ( show_progress ) diff --git a/test/cache_tagging.c b/test/cache_tagging.c index 734c760..dd886eb 100644 --- a/test/cache_tagging.c +++ b/test/cache_tagging.c @@ -1664,21 +1664,11 @@ check_attribute_rename_tags(hid_t fcpl, int type) if ( verify_tag(fid, H5AC_SOHM_LIST_ID, H5AC__SOHM_TAG) < 0 ) TEST_ERROR; /* - * 3 calls to verify_tag() for verifying free space: - * one freespace header tag for H5FD_MEM_DRAW manager, - * one freespace header tag for H5FD_MEM_SUPER manager - * one freespace section info tag for H5FD_MEM_SUPER manager + * one freespace header tag for H5FD_MEM_DRAW manager, + * one freespace header tag for H5FD_MEM_SUPER manager */ if ( verify_tag(fid, H5AC_FSPACE_HDR_ID, H5AC__FREESPACE_TAG) < 0 ) TEST_ERROR; - - /* If the free space managers are persistent, the - * H5MF_tidy_self_referential_fsm_hack() must have been run. - * Since this function floats all self referential free space - * managers, the H5FD_MEM_SUPER FSM will not be in the metadata - * cache. - */ - if(!persistent_fsms && verify_tag(fid, H5AC_FSPACE_HDR_ID, H5AC__FREESPACE_TAG) < 0) TEST_ERROR; - if(!persistent_fsms && verify_tag(fid, H5AC_FSPACE_SINFO_ID, H5AC__FREESPACE_TAG) < 0) TEST_ERROR; + if ( verify_tag(fid, H5AC_FSPACE_HDR_ID, H5AC__FREESPACE_TAG) < 0 ) TEST_ERROR; /* verify btree header and leaf node belonging to group */ if ( verify_tag(fid, H5AC_BT2_HDR_ID, g_tag) < 0 ) TEST_ERROR; @@ -1828,13 +1818,16 @@ check_attribute_delete_tags(hid_t fcpl, int type) /* * 2 calls to verify_tag() for verifying free space: - * one freespace header tag for free-space header, - * one freespace header tag for free-space section info + * one freespace header tag for free-space header raw data + * one freespace header tag for free-space section info raw data + * one freespace header tag for free-space header metadata */ if ( verify_tag(fid, H5AC_FSPACE_HDR_ID, H5AC__FREESPACE_TAG) < 0 ) TEST_ERROR; if ( verify_tag(fid, H5AC_FSPACE_SINFO_ID, H5AC__FREESPACE_TAG) < 0 ) TEST_ERROR; + if ( verify_tag(fid, H5AC_FSPACE_HDR_ID, H5AC__FREESPACE_TAG) < 0 ) + TEST_ERROR; #if 0 /* If the free space managers are persistent, the diff --git a/test/fheap.c b/test/fheap.c index 846f03e..557fd37 100644 --- a/test/fheap.c +++ b/test/fheap.c @@ -1904,7 +1904,7 @@ test_create(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tparam) TEST_ERROR /* Close the fractal heap */ - if(H5HF_close(fh) < 0) + if((fh = H5HF_close(fh)) < 0) FAIL_STACK_ERROR /* Delete heap */ @@ -6643,7 +6643,7 @@ test_man_remove_one(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tpara FAIL_STACK_ERROR /* Close the fractal heap */ - if(H5HF_close(fh) < 0) + if((fh = H5HF_close(fh)) < 0) TEST_ERROR /* Close the file */ @@ -6834,7 +6834,7 @@ test_man_remove_two(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tpara FAIL_STACK_ERROR /* Close the fractal heap */ - if(H5HF_close(fh) < 0) + if((fh = H5HF_close(fh)) < 0) TEST_ERROR /* Close the file */ @@ -7001,7 +7001,7 @@ test_man_remove_one_larger(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t FAIL_STACK_ERROR /* Close the fractal heap */ - if(H5HF_close(fh) < 0) + if((fh = H5HF_close(fh)) < 0) FAIL_STACK_ERROR /* Close the file */ @@ -7239,7 +7239,7 @@ test_man_remove_two_larger(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t FAIL_STACK_ERROR /* Close the fractal heap */ - if(H5HF_close(fh) < 0) + if((fh = H5HF_close(fh)) < 0) TEST_ERROR /* Close the file */ @@ -7541,7 +7541,7 @@ test_man_remove_three_larger(hid_t fapl, H5HF_create_t *cparam, fheap_test_param FAIL_STACK_ERROR /* Close the fractal heap */ - if(H5HF_close(fh) < 0) + if((fh = H5HF_close(fh)) < 0) TEST_ERROR /* Close the file */ @@ -13683,23 +13683,23 @@ test_filtered_huge(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tparam H5F_t *f = NULL; /* Internal file object pointer */ H5HF_t *fh = NULL; /* Fractal heap wrapper */ haddr_t fh_addr; /* Address of fractal heap */ - H5HF_create_t tmp_cparam; /* Local heap creation parameters */ - fheap_heap_ids_t keep_ids; /* Structure to retain heap IDs */ - size_t id_len; /* Size of fractal heap IDs */ - h5_stat_size_t empty_size; /* Size of a file with an empty heap */ - h5_stat_size_t file_size; /* Size of file currently */ - unsigned char *heap_id = NULL; /* Heap ID for object */ - size_t obj_size; /* Size of object */ - size_t robj_size; /* Size of object read */ - unsigned char obj_type; /* Type of storage for object */ - fheap_heap_state_t state; /* State of fractal heap */ - unsigned deflate_level; /* Deflation level */ - size_t old_actual_id_len =0 ; /* Old actual ID length */ - hbool_t huge_ids_direct; /* Are 'huge' objects directly acccessed? */ - const char *base_desc = "insert 'huge' object into heap with I/O filters, then remove %s"; /* Test description */ + H5HF_create_t tmp_cparam; /* Local heap creation parameters */ + fheap_heap_ids_t keep_ids; /* Structure to retain heap IDs */ + size_t id_len; /* Size of fractal heap IDs */ + h5_stat_size_t empty_size; /* Size of a file with an empty heap */ + h5_stat_size_t file_size; /* Size of file currently */ + unsigned char *heap_id = NULL; /* Heap ID for object */ + size_t obj_size; /* Size of object */ + size_t robj_size; /* Size of object read */ + unsigned char obj_type; /* Type of storage for object */ + fheap_heap_state_t state; /* State of fractal heap */ + unsigned deflate_level; /* Deflation level */ + size_t old_actual_id_len =0 ; /* Old actual ID length */ + hbool_t huge_ids_direct; /* Are 'huge' objects directly acccessed? */ + const char *base_desc = "insert 'huge' object into heap with I/O filters, then remove %s"; /* Test description */ - /* Copy heap creation properties */ - HDmemcpy(&tmp_cparam, cparam, sizeof(H5HF_create_t)); + /* Copy heap creation properties */ + HDmemcpy(&tmp_cparam, cparam, sizeof(H5HF_create_t)); /* Set an I/O filter for heap data */ deflate_level = 6; @@ -13867,7 +13867,9 @@ error: H5MM_xfree(heap_id); if(fh) H5HF_close(fh); - H5Fclose(file); + if(&tmp_cparam.pline) + H5O_msg_reset(H5O_PLINE_ID, &tmp_cparam.pline); /* Release the I/O pipeline filter information */ + H5Fclose(file); } H5E_END_TRY; return(1); } /* test_filtered_huge() */ @@ -15571,9 +15573,12 @@ error: H5MM_xfree(keep_ids.ids); H5MM_xfree(keep_ids.lens); H5MM_xfree(keep_ids.offs); + + if(tparam->comp == FHEAP_TEST_COMPRESS) + H5O_msg_reset(H5O_PLINE_ID, &tmp_cparam.pline); /* Release the I/O pipeline filter information */ if(fh) H5HF_close(fh); - H5Fclose(file); + H5Fclose(file); } H5E_END_TRY; return(1); } /* test_random() */ @@ -15789,7 +15794,9 @@ error: H5MM_xfree(keep_ids.offs); if(fh) H5HF_close(fh); - H5Fclose(file); + if(tparam->comp == FHEAP_TEST_COMPRESS) + H5O_msg_reset(H5O_PLINE_ID, &tmp_cparam.pline); /* Release the I/O pipeline filter information */ + H5Fclose(file); } H5E_END_TRY; return(1); } /* test_random_pow2() */ @@ -6822,16 +6822,6 @@ test_mf_fs_persist(const char *env_h5_drvr, hid_t fapl, hbool_t new_format) if(!H5F_addr_defined(f->shared->fs_addr[tt])) TEST_ERROR - /* Since we are about to open a self referential free space - * manager prior to the first file space allocation / deallocation - * call H5MF_tidy_self_referential_fsm_hack() first so as to avoid - * assertion failures on the first file space alloc / dealloc. - */ - if((f->shared->first_alloc_dealloc) && - (SUCCEED != - H5MF_tidy_self_referential_fsm_hack(f))) - FAIL_STACK_ERROR - /* Start up H5FD_MEM_SUPER free-space manager */ if(!(f->shared->fs_man[tt])) if(H5MF__open_fstype(f, (H5F_mem_page_t)tt) < 0) @@ -6925,7 +6915,7 @@ test_mf_fs_gone(const char *env_h5_drvr, hid_t fapl, hbool_t new_format) haddr_t addrx; H5FD_mem_t fs_type; hbool_t contig_addr_vfd; - hbool_t ran_H5MF_tidy_self_referential_fsm_hack = FALSE; + if(new_format) TESTING("File's free-space is going away with new library format") @@ -6944,9 +6934,13 @@ test_mf_fs_gone(const char *env_h5_drvr, hid_t fapl, hbool_t new_format) /* Copy the file access property list */ if((fapl2 = H5Pcopy(fapl)) < 0) FAIL_STACK_ERROR - if(new_format) + if(new_format) { if(H5Pset_libver_bounds(fapl2, H5F_LIBVER_LATEST, H5F_LIBVER_LATEST) < 0) FAIL_STACK_ERROR + } else { + if(H5Pset_libver_bounds(fapl2, H5F_LIBVER_V18, H5F_LIBVER_LATEST) < 0) + FAIL_STACK_ERROR + } /* Set to aggregation and persisting free-space */ if(H5Pset_file_space_strategy(fcpl, H5F_FSPACE_STRATEGY_FSM_AGGR, TRUE, (hsize_t)1) < 0) @@ -7022,17 +7016,6 @@ test_mf_fs_gone(const char *env_h5_drvr, hid_t fapl, hbool_t new_format) if(!H5F_addr_defined(f->shared->fs_addr[fs_type])) TEST_ERROR - /* Since we are about to open a self referential free space - * manager prior to the first file space allocation / deallocation - * call H5MF_tidy_self_referential_fsm_hack() first so as to avoid - * assertion failures on the first file space alloc / dealloc. - */ - if(f->shared->first_alloc_dealloc){ - if(SUCCEED != H5MF_tidy_self_referential_fsm_hack(f)) - FAIL_STACK_ERROR - ran_H5MF_tidy_self_referential_fsm_hack = TRUE; - } - /* Start up H5FD_MEM_SUPER free-space manager */ if(!(f->shared->fs_man[fs_type])) if(H5MF__open_fstype(f, (H5F_mem_page_t)fs_type) < 0) @@ -7042,24 +7025,18 @@ test_mf_fs_gone(const char *env_h5_drvr, hid_t fapl, hbool_t new_format) if(H5FS_stat_info(f, f->shared->fs_man[fs_type], &fs_stat) < 0) FAIL_STACK_ERROR - /* if we ran H5MF_tidy_self_referential_fsm_hack(), the - * H5FD_MEM_SUPER free space manager must be floating. - * Thus fs_stat.addr must be undefined. - */ - if((!ran_H5MF_tidy_self_referential_fsm_hack) && - (!H5F_addr_defined(fs_stat.addr))) + if(!H5F_addr_defined(fs_stat.addr)) TEST_ERROR if(fs_stat.tot_space < TBLOCK_SIZE3) TEST_ERROR - /* Put block #4 to H5FD_MEM_SUPER free-space manager */ - if(H5MF_xfree(f, type, addr4, (hsize_t)TBLOCK_SIZE4) < 0) - FAIL_STACK_ERROR - - if(!new_format) { - /* Need to take up this space so that the free-space manager will go away */ - if(HADDR_UNDEF == (addrx = H5MF_alloc(f, type, (hsize_t)103))) + /* Allocate/free space accordingly so that the free-space manager will go away */ + if(new_format) { + if(H5MF_xfree(f, type, addr4, (hsize_t)TBLOCK_SIZE4) < 0) + FAIL_STACK_ERROR + } else { + if(HADDR_UNDEF == (addrx = H5MF_alloc(f, type, (hsize_t)3))) FAIL_STACK_ERROR } @@ -7741,16 +7718,6 @@ test_page_alloc_xfree(const char *env_h5_drvr, hid_t fapl) if(!H5F_addr_defined(f->shared->fs_addr[fs_type])) TEST_ERROR - /* Since we are about to open a self referential free space - * manager prior to the first file space allocation / deallocation - * call H5MF_tidy_self_referential_fsm_hack() first so as to avoid - * assertion failures on the first file space alloc / dealloc. - */ - if(f->shared->first_alloc_dealloc){ - if(SUCCEED != H5MF_tidy_self_referential_fsm_hack(f)) - FAIL_STACK_ERROR - } - /* Set up to use the small metadata manager */ if(!(f->shared->fs_man[fs_type])) if(H5MF__open_fstype(f, fs_type) < 0) |