summaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorQuincey Koziol <koziol@lbl.gov>2019-08-23 15:21:08 (GMT)
committerQuincey Koziol <koziol@lbl.gov>2019-08-23 15:21:08 (GMT)
commit884ad149e29f7c99487af676f0bbcd88cbf2735f (patch)
treee68eda1f03f26c2c6a08b638b78e5b4ea71d3caf /test
parentf0272e4945f047f17043b484db594df131222f1e (diff)
parentf42c7cc0d85cc5b232afd621711fdbd64f6e19d9 (diff)
downloadhdf5-884ad149e29f7c99487af676f0bbcd88cbf2735f.zip
hdf5-884ad149e29f7c99487af676f0bbcd88cbf2735f.tar.gz
hdf5-884ad149e29f7c99487af676f0bbcd88cbf2735f.tar.bz2
Merge pull request #1889 in HDFFV/hdf5 from ~KOZIOL/hdf5:shared_file_ptr to develop
* commit 'f42c7cc0d85cc5b232afd621711fdbd64f6e19d9': Fix major error codes Switch shared file struct name from 'H5F_file_t' to 'H5F_shared_t', to match naming convention for shared structs in rest of library data structures. Small tidy up. Progress toward movig H5MF* API to use shared file pointers instead of top file pointers. Progress on moving the H5MF* interface to using shared file pointers instead of top file pointers. Begin converting the H5MF interface to use shared file pointers instead of top file pointers. Progress toward moving the dataset routines to using the 'shared' file pointer instead of the 'top' file pointer. Begin converting dataset code to use shared file pointer instead of top file pointer. Finish converting H5PB_* routines to use shared file pointer, instead of top file pointer. First pass of converting H5PB_* routines to use shared file pointers. Rest of changes for 'top' file pointer to 'shared' file pointer for H5F__accum routines. Partial H5F__accum_* routines.
Diffstat (limited to 'test')
-rw-r--r--test/accum.c6
-rw-r--r--test/mf.c23
2 files changed, 13 insertions, 16 deletions
diff --git a/test/accum.c b/test/accum.c
index da90995..91acf0f 100644
--- a/test/accum.c
+++ b/test/accum.c
@@ -66,9 +66,9 @@ void accum_printf(const H5F_t *f);
/* Private Test H5Faccum Function Wrappers */
#define accum_write(a,s,b) H5F_block_write(f, H5FD_MEM_DEFAULT, (haddr_t)(a), (size_t)(s), (b))
#define accum_read(a,s,b) H5F_block_read(f, H5FD_MEM_DEFAULT, (haddr_t)(a), (size_t)(s), (b))
-#define accum_free(f,a,s) H5F__accum_free(f, H5FD_MEM_DEFAULT, (haddr_t)(a), (hsize_t)(s))
-#define accum_flush(f) H5F__accum_flush(f)
-#define accum_reset(f) H5F__accum_reset(f, TRUE)
+#define accum_free(f,a,s) H5F__accum_free(f->shared, H5FD_MEM_DEFAULT, (haddr_t)(a), (hsize_t)(s))
+#define accum_flush(f) H5F__accum_flush(f->shared)
+#define accum_reset(f) H5F__accum_reset(f->shared, TRUE)
/* ================= */
/* Main Test Routine */
diff --git a/test/mf.c b/test/mf.c
index 05b108b..ca2defe 100644
--- a/test/mf.c
+++ b/test/mf.c
@@ -6816,7 +6816,7 @@ test_mf_fs_persist(const char *env_h5_drvr, hid_t fapl, hbool_t new_format)
if(NULL == (f = (H5F_t *)H5VL_object(file)))
FAIL_STACK_ERROR
- H5MF__alloc_to_fs_type(f, type, TBLOCK_SIZE6, (H5F_mem_page_t *)&tt);
+ H5MF__alloc_to_fs_type(f->shared, type, TBLOCK_SIZE6, (H5F_mem_page_t *)&tt);
/* Verify that H5FD_MEM_SUPER free-space manager is there */
if(!H5F_addr_defined(f->shared->fs_addr[tt]))
@@ -6990,7 +6990,7 @@ test_mf_fs_gone(const char *env_h5_drvr, hid_t fapl, hbool_t new_format)
if(NULL == (f = (H5F_t *)H5VL_object(file)))
FAIL_STACK_ERROR
- H5MF__alloc_to_fs_type(f, type, TBLOCK_SIZE4, (H5F_mem_page_t *)&fs_type);
+ H5MF__alloc_to_fs_type(f->shared, type, TBLOCK_SIZE4, (H5F_mem_page_t *)&fs_type);
/* Verify that the H5FD_MEM_SUPER free-space manager is not there */
if(H5F_addr_defined(f->shared->fs_addr[fs_type]))
@@ -7185,7 +7185,7 @@ test_mf_strat_thres_persist(const char *env_h5_drvr, hid_t fapl, hbool_t new_for
if(NULL == (f = (H5F_t *)H5VL_object(file)))
FAIL_STACK_ERROR
- H5MF__alloc_to_fs_type(f, type, TBLOCK_SIZE6, (H5F_mem_page_t *)&tt);
+ H5MF__alloc_to_fs_type(f->shared, type, TBLOCK_SIZE6, (H5F_mem_page_t *)&tt);
/* Get a pointer to the internal file object */
if(NULL == (f = (H5F_t *)H5VL_object(file)))
@@ -7336,13 +7336,12 @@ test_mf_strat_thres_gone(const char *env_h5_drvr, hid_t fapl, hbool_t new_format
if(HADDR_UNDEF == (addr6 = H5MF_alloc(f, type, (hsize_t)TBLOCK_SIZE6)))
FAIL_STACK_ERROR
- H5MF__alloc_to_fs_type(f, type, TBLOCK_SIZE6, (H5F_mem_page_t *)&tt);
+ H5MF__alloc_to_fs_type(f->shared, type, TBLOCK_SIZE6, (H5F_mem_page_t *)&tt);
/* For paged aggregation, the section in the page at EOF for small meta fs is not shrunk away */
- if(fs_type == H5F_FSPACE_STRATEGY_PAGE) {
+ if(fs_type == H5F_FSPACE_STRATEGY_PAGE)
if(H5FS_stat_info(f, f->shared->fs_man[tt], &fs_state) < 0)
FAIL_STACK_ERROR
- }
/* Put block #3, #5 to H5FD_MEM_SUPER free-space manager */
if(H5MF_xfree(f, type, addr3, (hsize_t)TBLOCK_SIZE3) < 0)
@@ -7647,8 +7646,7 @@ test_page_alloc_xfree(const char *env_h5_drvr, hid_t fapl)
H5MF_xfree(f, H5FD_MEM_OHDR, addr2, (hsize_t)TBLOCK_SIZE1034);
if(!fs_persist) {
-
- H5MF__alloc_to_fs_type(f, H5FD_MEM_OHDR, TBLOCK_SIZE1034, (H5F_mem_page_t *)&fs_type);
+ H5MF__alloc_to_fs_type(f->shared, H5FD_MEM_OHDR, TBLOCK_SIZE1034, (H5F_mem_page_t *)&fs_type);
/* Verify that the freed block with addr2 is found from the small metadata manager */
if(H5MF__find_sect(f, H5FD_MEM_OHDR, (hsize_t)TBLOCK_SIZE1034, f->shared->fs_man[fs_type], &found_addr) < 0)
@@ -7680,8 +7678,7 @@ test_page_alloc_xfree(const char *env_h5_drvr, hid_t fapl)
H5MF_xfree(f, H5FD_MEM_DRAW, gaddr1, (hsize_t)TBLOCK_SIZE5000);
if(!fs_persist) {
-
- H5MF__alloc_to_fs_type(f, H5FD_MEM_DRAW, TBLOCK_SIZE5000, (H5F_mem_page_t *)&fs_type);
+ H5MF__alloc_to_fs_type(f->shared, H5FD_MEM_DRAW, TBLOCK_SIZE5000, (H5F_mem_page_t *)&fs_type);
/* Verify that the freed block with gaddr1 is found from the large data manager */
if(H5MF__find_sect(f, H5FD_MEM_DRAW, (hsize_t)TBLOCK_SIZE8192, f->shared->fs_man[fs_type], &found_addr) < 0)
@@ -7708,12 +7705,12 @@ test_page_alloc_xfree(const char *env_h5_drvr, hid_t fapl)
TEST_ERROR
/* Verify that the large generic manager is there */
- H5MF__alloc_to_fs_type(f, H5FD_MEM_DRAW, TBLOCK_SIZE5000, (H5F_mem_page_t *)&fs_type);
+ H5MF__alloc_to_fs_type(f->shared, H5FD_MEM_DRAW, TBLOCK_SIZE5000, (H5F_mem_page_t *)&fs_type);
if(!H5F_addr_defined(f->shared->fs_addr[fs_type]))
TEST_ERROR
/* Verify that the small metadata manager is there */
- H5MF__alloc_to_fs_type(f, H5FD_MEM_OHDR, f->shared->fs_page_size - 1, (H5F_mem_page_t *)&fs_type);
+ H5MF__alloc_to_fs_type(f->shared, H5FD_MEM_OHDR, f->shared->fs_page_size - 1, (H5F_mem_page_t *)&fs_type);
if(!H5F_addr_defined(f->shared->fs_addr[fs_type]))
TEST_ERROR
@@ -7744,7 +7741,7 @@ test_page_alloc_xfree(const char *env_h5_drvr, hid_t fapl)
if(found_addr != saddr1)
TEST_ERROR
- H5MF__alloc_to_fs_type(f, H5FD_MEM_DRAW, TBLOCK_SIZE5000, (H5F_mem_page_t *)&fs_type);
+ H5MF__alloc_to_fs_type(f->shared, H5FD_MEM_DRAW, TBLOCK_SIZE5000, (H5F_mem_page_t *)&fs_type);
if(!(f->shared->fs_man[fs_type]))
/* Set up to use the large data manager */