diff options
Diffstat (limited to 'test')
-rw-r--r-- | test/CMakeLists.txt | 18 | ||||
-rw-r--r-- | test/CMakeTests.cmake | 1 | ||||
-rw-r--r-- | test/Makefile.am | 13 | ||||
-rw-r--r-- | test/btree2.c | 62 | ||||
-rw-r--r-- | test/cache_tagging.c | 4 | ||||
-rw-r--r-- | test/cork.c | 40 | ||||
-rw-r--r-- | test/direct_chunk.c | 2167 | ||||
-rw-r--r-- | test/dsets.c | 14 | ||||
-rw-r--r-- | test/dtypes.c | 8 | ||||
-rw-r--r-- | test/efc.c | 42 | ||||
-rw-r--r-- | test/flushrefresh.c | 8 | ||||
-rw-r--r-- | test/genall5.c | 6 | ||||
-rw-r--r-- | test/getname.c | 6 | ||||
-rw-r--r-- | test/h5test.c | 4 | ||||
-rw-r--r-- | test/links.c | 114 | ||||
-rw-r--r-- | test/mf.c | 250 | ||||
-rw-r--r-- | test/mount.c | 64 | ||||
-rw-r--r-- | test/mtime.c | 8 | ||||
-rw-r--r-- | test/objcopy.c | 166 | ||||
-rw-r--r-- | test/ohdr.c | 2 | ||||
-rw-r--r-- | test/stab.c | 4 | ||||
-rw-r--r-- | test/tattr.c | 50 | ||||
-rw-r--r-- | test/testfiles/err_compat_1 | 2 | ||||
-rw-r--r-- | test/testfiles/error_test_1 | 4 | ||||
-rw-r--r-- | test/tfile.c | 16 | ||||
-rw-r--r-- | test/th5o.c | 179 | ||||
-rw-r--r-- | test/titerate.c | 10 | ||||
-rw-r--r-- | test/tmisc.c | 24 | ||||
-rw-r--r-- | test/trefer.c | 2 | ||||
-rw-r--r-- | test/tsohm.c | 4 | ||||
-rw-r--r-- | test/unlink.c | 12 | ||||
-rw-r--r-- | test/vds.c | 2 |
32 files changed, 2816 insertions, 490 deletions
diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt index 1ab7b5a..517a620 100644 --- a/test/CMakeLists.txt +++ b/test/CMakeLists.txt @@ -200,6 +200,7 @@ set (H5_TESTS cmpd_dset filter_fail extend + direct_chunk # compression lib link external efc objcopy @@ -251,6 +252,7 @@ macro (ADD_H5_EXE file) endmacro () set (H5_TESTS_MULTIPLE + direct_chunk testhdf5 cache_image ttsafe @@ -265,7 +267,23 @@ endforeach () ############################################################################## ### M U L T I P L E S O U R C E T E S T S ### ############################################################################## +######### Also special handling of link libs ############# +#-- Adding test for direct_chunk +add_executable (direct_chunk ${HDF5_TEST_SOURCE_DIR}/direct_chunk.c) +target_include_directories(direct_chunk PRIVATE "${HDF5_SRC_DIR};${HDF5_BINARY_DIR};${HDF5_TEST_BINARY_DIR};$<$<BOOL:${HDF5_ENABLE_PARALLEL}>:${MPI_C_INCLUDE_DIRS}>") +TARGET_C_PROPERTIES (direct_chunk STATIC) +target_link_libraries (direct_chunk PRIVATE ${HDF5_TEST_LIB_TARGET} ${LINK_COMP_LIBS}) +set_target_properties (direct_chunk PROPERTIES FOLDER test) +if (BUILD_SHARED_LIBS) + add_executable (direct_chunk-shared ${HDF5_TEST_SOURCE_DIR}/direct_chunk.c) + target_include_directories(direct_chunk-shared PRIVATE "${HDF5_SRC_DIR};${HDF5_BINARY_DIR};${HDF5_TEST_BINARY_DIR};$<$<BOOL:${HDF5_ENABLE_PARALLEL}>:${MPI_C_INCLUDE_DIRS}>") + TARGET_C_PROPERTIES (direct_chunk-shared SHARED) + target_link_libraries (direct_chunk-shared PRIVATE ${HDF5_TEST_LIBSH_TARGET} ${LINK_COMP_LIBS}) + set_target_properties (direct_chunk-shared PROPERTIES FOLDER test) +endif () + +######### Special handling for multiple sources ############# #-- Adding test for testhdf5 add_executable (testhdf5 ${testhdf5_SOURCES}) target_include_directories(testhdf5 PRIVATE "${HDF5_SRC_DIR};${HDF5_BINARY_DIR};$<$<BOOL:${HDF5_ENABLE_PARALLEL}>:${MPI_C_INCLUDE_DIRS}>") diff --git a/test/CMakeTests.cmake b/test/CMakeTests.cmake index 2de0f0d..39d9d0d 100644 --- a/test/CMakeTests.cmake +++ b/test/CMakeTests.cmake @@ -532,6 +532,7 @@ set (test_CLEANFILES vds_swmr.h5 vds_swmr_src_*.h5 tmp/vds_src_2.h5 + direct_chunk.h5 ) # Remove any output file left over from previous test run diff --git a/test/Makefile.am b/test/Makefile.am index bb80fed..dcc002c 100644 --- a/test/Makefile.am +++ b/test/Makefile.am @@ -55,11 +55,12 @@ TEST_PROG= testhdf5 \ cache cache_api cache_image cache_tagging lheap ohdr stab gheap \ evict_on_close farray earray btree2 fheap \ pool accum hyperslab istore bittests dt_arith page_buffer \ - dtypes dsets cmpd_dset filter_fail extend external efc objcopy links unlink \ - twriteorder big mtime fillval mount flush1 flush2 app_ref enum \ - set_extent ttsafe enc_dec_plist enc_dec_plist_cross_platform\ - getname vfd ntypes dangle dtransform reserved cross_read \ - freespace mf vds file_image unregister cache_logging cork swmr + dtypes dsets cmpd_dset filter_fail extend direct_chunk external efc \ + objcopy links unlink twriteorder big mtime fillval mount \ + flush1 flush2 app_ref enum set_extent ttsafe enc_dec_plist \ + enc_dec_plist_cross_platform getname vfd ntypes dangle dtransform \ + reserved cross_read freespace mf vds file_image unregister \ + cache_logging cork swmr # List programs to be built when testing here. # error_test and err_compat are built at the same time as the other tests, but executed by testerror.sh. @@ -190,7 +191,7 @@ CHECK_CLEANFILES+=accum.h5 cmpd_dset.h5 compact_dataset.h5 dataset.h5 dset_offse flushrefresh_VERIFICATION_DONE atomic_data accum_swmr_big.h5 ohdr_swmr.h5 \ test_swmr*.h5 cache_logging.h5 cache_logging.out vds_swmr.h5 vds_swmr_src_*.h5 \ swmr[0-2].h5 swmr_writer.out swmr_writer.log.* swmr_reader.out.* swmr_reader.log.* \ - tbogus.h5.copy cache_image_test.h5 + tbogus.h5.copy cache_image_test.h5 direct_chunk.h5 # Sources for testhdf5 executable testhdf5_SOURCES=testhdf5.c tarray.c tattr.c tchecksum.c tconfig.c tfile.c \ diff --git a/test/btree2.c b/test/btree2.c index e2874b7..d26fed5 100644 --- a/test/btree2.c +++ b/test/btree2.c @@ -5259,7 +5259,7 @@ test_remove_basic(hid_t fapl, const H5B2_create_t *cparam, TEST_ERROR /* Query the address of the root node in the B-tree */ - if(H5B2_get_root_addr_test(bt2, &root_addr) < 0) + if(H5B2__get_root_addr_test(bt2, &root_addr) < 0) FAIL_STACK_ERROR /* Make certain that the address of the root node is defined */ @@ -5269,7 +5269,7 @@ test_remove_basic(hid_t fapl, const H5B2_create_t *cparam, /* Attempt to remove a non-existant record from a B-tree with 1 record */ record = 0; H5E_BEGIN_TRY { - ret = H5B2_remove(bt2, &record, NULL, NULL); + ret = H5B2_remove(bt2, &record, NULL, NULL); } H5E_END_TRY; /* Should fail */ if(ret != FAIL) @@ -5302,7 +5302,7 @@ test_remove_basic(hid_t fapl, const H5B2_create_t *cparam, TEST_ERROR /* Query the address of the root node in the B-tree */ - if(H5B2_get_root_addr_test(bt2, &root_addr) < 0) + if(H5B2__get_root_addr_test(bt2, &root_addr) < 0) FAIL_STACK_ERROR /* Make certain that the root node has been freed */ @@ -5384,7 +5384,7 @@ test_remove_basic(hid_t fapl, const H5B2_create_t *cparam, TEST_ERROR /* Query the address of the root node in the B-tree */ - if(H5B2_get_root_addr_test(bt2, &root_addr) < 0) + if(H5B2__get_root_addr_test(bt2, &root_addr) < 0) FAIL_STACK_ERROR /* Make certain that the root node has not been freed */ @@ -5409,7 +5409,7 @@ test_remove_basic(hid_t fapl, const H5B2_create_t *cparam, TEST_ERROR /* Query the address of the root node in the B-tree */ - if(H5B2_get_root_addr_test(bt2, &root_addr) < 0) + if(H5B2__get_root_addr_test(bt2, &root_addr) < 0) FAIL_STACK_ERROR /* Make certain that the root node has not been freed */ @@ -5434,7 +5434,7 @@ test_remove_basic(hid_t fapl, const H5B2_create_t *cparam, TEST_ERROR /* Query the address of the root node in the B-tree */ - if(H5B2_get_root_addr_test(bt2, &root_addr) < 0) + if(H5B2__get_root_addr_test(bt2, &root_addr) < 0) FAIL_STACK_ERROR /* Make certain that the root node has not been freed */ @@ -5459,7 +5459,7 @@ test_remove_basic(hid_t fapl, const H5B2_create_t *cparam, TEST_ERROR /* Query the address of the root node in the B-tree */ - if(H5B2_get_root_addr_test(bt2, &root_addr) < 0) + if(H5B2__get_root_addr_test(bt2, &root_addr) < 0) FAIL_STACK_ERROR /* Make certain that the root node has been freed */ @@ -5544,7 +5544,7 @@ test_remove_level1_noredistrib(hid_t fapl, const H5B2_create_t *cparam, TEST_ERROR /* Query the address of the root node in the B-tree */ - if(H5B2_get_root_addr_test(bt2, &root_addr) < 0) + if(H5B2__get_root_addr_test(bt2, &root_addr) < 0) FAIL_STACK_ERROR /* Make certain that the address of the root node is defined */ @@ -5773,7 +5773,7 @@ test_remove_level1_redistrib(hid_t fapl, const H5B2_create_t *cparam, TEST_ERROR /* Query the address of the root node in the B-tree */ - if(H5B2_get_root_addr_test(bt2, &root_addr) < 0) + if(H5B2__get_root_addr_test(bt2, &root_addr) < 0) FAIL_STACK_ERROR /* Make certain that the address of the root node is defined */ @@ -5971,7 +5971,7 @@ test_remove_level1_2leaf_merge(hid_t fapl, const H5B2_create_t *cparam, TEST_ERROR /* Query the address of the root node in the B-tree */ - if(H5B2_get_root_addr_test(bt2, &root_addr) < 0) + if(H5B2__get_root_addr_test(bt2, &root_addr) < 0) FAIL_STACK_ERROR /* Make certain that the address of the root node is defined */ @@ -6149,7 +6149,7 @@ test_remove_level1_3leaf_merge(hid_t fapl, const H5B2_create_t *cparam, TEST_ERROR /* Query the address of the root node in the B-tree */ - if(H5B2_get_root_addr_test(bt2, &root_addr) < 0) + if(H5B2__get_root_addr_test(bt2, &root_addr) < 0) FAIL_STACK_ERROR /* Make certain that the address of the root node is defined */ @@ -6280,7 +6280,7 @@ test_remove_level1_promote(hid_t fapl, const H5B2_create_t *cparam, TEST_ERROR /* Query the address of the root node in the B-tree */ - if(H5B2_get_root_addr_test(bt2, &root_addr) < 0) + if(H5B2__get_root_addr_test(bt2, &root_addr) < 0) FAIL_STACK_ERROR /* Make certain that the address of the root node is defined */ @@ -6500,7 +6500,7 @@ test_remove_level1_promote_2leaf_redistrib(hid_t fapl, const H5B2_create_t *cpar TEST_ERROR /* Query the address of the root node in the B-tree */ - if(H5B2_get_root_addr_test(bt2, &root_addr) < 0) + if(H5B2__get_root_addr_test(bt2, &root_addr) < 0) FAIL_STACK_ERROR /* Make certain that the address of the root node is defined */ @@ -6647,7 +6647,7 @@ test_remove_level1_promote_3leaf_redistrib(hid_t fapl, const H5B2_create_t *cpar TEST_ERROR /* Query the address of the root node in the B-tree */ - if(H5B2_get_root_addr_test(bt2, &root_addr) < 0) + if(H5B2__get_root_addr_test(bt2, &root_addr) < 0) FAIL_STACK_ERROR /* Make certain that the address of the root node is defined */ @@ -6794,7 +6794,7 @@ test_remove_level1_promote_2leaf_merge(hid_t fapl, const H5B2_create_t *cparam, TEST_ERROR /* Query the address of the root node in the B-tree */ - if(H5B2_get_root_addr_test(bt2, &root_addr) < 0) + if(H5B2__get_root_addr_test(bt2, &root_addr) < 0) FAIL_STACK_ERROR /* Make certain that the address of the root node is defined */ @@ -6938,7 +6938,7 @@ test_remove_level1_promote_3leaf_merge(hid_t fapl, const H5B2_create_t *cparam, TEST_ERROR /* Query the address of the root node in the B-tree */ - if(H5B2_get_root_addr_test(bt2, &root_addr) < 0) + if(H5B2__get_root_addr_test(bt2, &root_addr) < 0) FAIL_STACK_ERROR /* Make certain that the address of the root node is defined */ @@ -7079,7 +7079,7 @@ test_remove_level1_collapse(hid_t fapl, const H5B2_create_t *cparam, TEST_ERROR /* Query the address of the root node in the B-tree */ - if(H5B2_get_root_addr_test(bt2, &root_addr) < 0) + if(H5B2__get_root_addr_test(bt2, &root_addr) < 0) FAIL_STACK_ERROR /* Make certain that the address of the root node is defined */ @@ -7126,7 +7126,7 @@ test_remove_level1_collapse(hid_t fapl, const H5B2_create_t *cparam, TEST_ERROR /* Query the address of the root node in the B-tree */ - if(H5B2_get_root_addr_test(bt2, &root_addr) < 0) + if(H5B2__get_root_addr_test(bt2, &root_addr) < 0) FAIL_STACK_ERROR /* Make certain that the address of the root node is defined */ @@ -7220,7 +7220,7 @@ test_remove_level2_promote(hid_t fapl, const H5B2_create_t *cparam, TEST_ERROR /* Query the address of the root node in the B-tree */ - if(H5B2_get_root_addr_test(bt2, &root_addr) < 0) + if(H5B2__get_root_addr_test(bt2, &root_addr) < 0) FAIL_STACK_ERROR /* Make certain that the address of the root node is defined */ @@ -7505,7 +7505,7 @@ test_remove_level2_promote_2internal_redistrib(hid_t fapl, const H5B2_create_t * TEST_ERROR /* Query the address of the root node in the B-tree */ - if(H5B2_get_root_addr_test(bt2, &root_addr) < 0) + if(H5B2__get_root_addr_test(bt2, &root_addr) < 0) FAIL_STACK_ERROR /* Make certain that the address of the root node is defined */ @@ -7654,7 +7654,7 @@ test_remove_level2_promote_3internal_redistrib(hid_t fapl, const H5B2_create_t * TEST_ERROR /* Query the address of the root node in the B-tree */ - if(H5B2_get_root_addr_test(bt2, &root_addr) < 0) + if(H5B2__get_root_addr_test(bt2, &root_addr) < 0) FAIL_STACK_ERROR /* Make certain that the address of the root node is defined */ @@ -7803,7 +7803,7 @@ test_remove_level2_promote_2internal_merge(hid_t fapl, const H5B2_create_t *cpar TEST_ERROR /* Query the address of the root node in the B-tree */ - if(H5B2_get_root_addr_test(bt2, &root_addr) < 0) + if(H5B2__get_root_addr_test(bt2, &root_addr) < 0) FAIL_STACK_ERROR /* Make certain that the address of the root node is defined */ @@ -7953,7 +7953,7 @@ test_remove_level2_promote_3internal_merge(hid_t fapl, const H5B2_create_t *cpar TEST_ERROR /* Query the address of the root node in the B-tree */ - if(H5B2_get_root_addr_test(bt2, &root_addr) < 0) + if(H5B2__get_root_addr_test(bt2, &root_addr) < 0) FAIL_STACK_ERROR /* Make certain that the address of the root node is defined */ @@ -8103,7 +8103,7 @@ test_remove_level2_2internal_merge_left(hid_t fapl, const H5B2_create_t *cparam, TEST_ERROR /* Query the address of the root node in the B-tree */ - if(H5B2_get_root_addr_test(bt2, &root_addr) < 0) + if(H5B2__get_root_addr_test(bt2, &root_addr) < 0) FAIL_STACK_ERROR /* Make certain that the address of the root node is defined */ @@ -8228,7 +8228,7 @@ test_remove_level2_2internal_merge_right(hid_t fapl, const H5B2_create_t *cparam TEST_ERROR /* Query the address of the root node in the B-tree */ - if(H5B2_get_root_addr_test(bt2, &root_addr) < 0) + if(H5B2__get_root_addr_test(bt2, &root_addr) < 0) FAIL_STACK_ERROR /* Make certain that the address of the root node is defined */ @@ -8353,7 +8353,7 @@ test_remove_level2_3internal_merge(hid_t fapl, const H5B2_create_t *cparam, TEST_ERROR /* Query the address of the root node in the B-tree */ - if(H5B2_get_root_addr_test(bt2, &root_addr) < 0) + if(H5B2__get_root_addr_test(bt2, &root_addr) < 0) FAIL_STACK_ERROR /* Make certain that the address of the root node is defined */ @@ -8479,7 +8479,7 @@ test_remove_level2_collapse_right(hid_t fapl, const H5B2_create_t *cparam, TEST_ERROR /* Query the address of the root node in the B-tree */ - if(H5B2_get_root_addr_test(bt2, &root_addr) < 0) + if(H5B2__get_root_addr_test(bt2, &root_addr) < 0) FAIL_STACK_ERROR /* Make certain that the address of the root node is defined */ @@ -8765,7 +8765,7 @@ HDfprintf(stderr, "curr_time = %lu\n", (unsigned long)curr_time); } /* end for */ /* Query the address of the root node in the B-tree */ - if(H5B2_get_root_addr_test(bt2, &root_addr) < 0) + if(H5B2__get_root_addr_test(bt2, &root_addr) < 0) FAIL_STACK_ERROR /* Make certain that the address of the root node is defined */ @@ -8852,7 +8852,7 @@ HDfprintf(stderr, "curr_time = %lu\n", (unsigned long)curr_time); } /* end for */ /* Query the address of the root node in the B-tree */ - if(H5B2_get_root_addr_test(bt2, &root_addr) < 0) + if(H5B2__get_root_addr_test(bt2, &root_addr) < 0) FAIL_STACK_ERROR /* Make certain that the address of the root node is defined */ @@ -8937,7 +8937,7 @@ HDfprintf(stderr, "curr_time = %lu\n", (unsigned long)curr_time); } /* end for */ /* Query the address of the root node in the B-tree */ - if(H5B2_get_root_addr_test(bt2, &root_addr) < 0) + if(H5B2__get_root_addr_test(bt2, &root_addr) < 0) FAIL_STACK_ERROR /* Make certain that the address of the root node is defined */ @@ -9022,7 +9022,7 @@ HDfprintf(stderr, "curr_time = %lu\n", (unsigned long)curr_time); } /* end for */ /* Query the address of the root node in the B-tree */ - if(H5B2_get_root_addr_test(bt2, &root_addr) < 0) + if(H5B2__get_root_addr_test(bt2, &root_addr) < 0) FAIL_STACK_ERROR /* Make certain that the address of the root node is defined */ diff --git a/test/cache_tagging.c b/test/cache_tagging.c index 7a2bb49..d34cad3 100644 --- a/test/cache_tagging.c +++ b/test/cache_tagging.c @@ -377,7 +377,7 @@ get_object_header_tag(hid_t loc_id, haddr_t *tag) H5O_info_t oinfo; /* Object info */ /* Retrieve the info for the object */ - if(H5Oget_info(loc_id, &oinfo) < 0) + if(H5Oget_info2(loc_id, &oinfo, H5O_INFO_ALL) < 0) TEST_ERROR; /* Set the tag to return */ @@ -2937,7 +2937,7 @@ check_object_info_tags(void) /* Get information on an object by name */ /* ===================================== */ - if ( H5Oget_info_by_name(fid, GROUPNAME, &oinfo, H5P_DEFAULT) < 0 ) TEST_ERROR; + if ( H5Oget_info_by_name2(fid, GROUPNAME, &oinfo, H5O_INFO_ALL, H5P_DEFAULT) < 0 ) TEST_ERROR; /* =================================== */ /* Verification of Metadata Tag Values */ diff --git a/test/cork.c b/test/cork.c index 8c685ee..dceaf5a 100644 --- a/test/cork.c +++ b/test/cork.c @@ -126,7 +126,7 @@ verify_old_dset_cork(void) TEST_ERROR /* Get dataset object header address: DSET_BT1 */ - if(H5Oget_info(did, &oinfo) < 0) + if(H5Oget_info2(did, &oinfo, H5O_INFO_BASIC) < 0) TEST_ERROR /* Cork the dataset: DSET_BT1 */ @@ -163,7 +163,7 @@ verify_old_dset_cork(void) FAIL_STACK_ERROR /* Get dataset object address */ - if(H5Oget_info(did2, &oinfo2) < 0) + if(H5Oget_info2(did2, &oinfo2, H5O_INFO_BASIC) < 0) TEST_ERROR /* Cork the dataset: DSET_COMPACT */ @@ -216,7 +216,7 @@ verify_old_dset_cork(void) FAIL_STACK_ERROR /* Get dataset object address: DSET_CONTIG */ - if(H5Oget_info(did3, &oinfo3) < 0) + if(H5Oget_info2(did3, &oinfo3, H5O_INFO_BASIC) < 0) TEST_ERROR /* Cork the dataset: DSET_CONTIG */ @@ -329,7 +329,7 @@ verify_obj_dset_cork(hbool_t swmr) TEST_ERROR /* Get dataset object header address */ - if(H5Oget_info(did, &oinfo) < 0) + if(H5Oget_info2(did, &oinfo, H5O_INFO_BASIC) < 0) TEST_ERROR /* Verify cork status of the dataset: DSET */ @@ -372,7 +372,7 @@ verify_obj_dset_cork(hbool_t swmr) TEST_ERROR /* Get dataset object header address */ - if(H5Oget_info(did2, &oinfo2) < 0) + if(H5Oget_info2(did2, &oinfo2, H5O_INFO_BASIC) < 0) TEST_ERROR /* Cork the dataset: DSET_NONE */ @@ -546,7 +546,7 @@ verify_dset_cork(hbool_t swmr, hbool_t new_format) TEST_ERROR /* Get dataset object header address: DSET_EA */ - if(H5Oget_info(did, &oinfo) < 0) + if(H5Oget_info2(did, &oinfo, H5O_INFO_BASIC) < 0) TEST_ERROR /* Cork the dataset: DSET_EA */ @@ -564,7 +564,7 @@ verify_dset_cork(hbool_t swmr, hbool_t new_format) TEST_ERROR /* Get dataset object header address: DSET_FA */ - if(H5Oget_info(did2, &oinfo2) < 0) + if(H5Oget_info2(did2, &oinfo2, H5O_INFO_BASIC) < 0) TEST_ERROR /* Cork the dataset: DSET_FA */ @@ -591,7 +591,7 @@ verify_dset_cork(hbool_t swmr, hbool_t new_format) TEST_ERROR /* Get dataset object header address: DSET_BT2 */ - if(H5Oget_info(did3, &oinfo3) < 0) + if(H5Oget_info2(did3, &oinfo3, H5O_INFO_BASIC) < 0) TEST_ERROR /* Cork the dataset: DSET_BT2 */ @@ -770,11 +770,11 @@ verify_group_cork(hbool_t swmr) TEST_ERROR /* Get group object header addresses */ - if(H5Oget_info(gid, &oinfo) < 0) + if(H5Oget_info2(gid, &oinfo, H5O_INFO_BASIC) < 0) TEST_ERROR - if(H5Oget_info(gid2, &oinfo2) < 0) + if(H5Oget_info2(gid2, &oinfo2, H5O_INFO_BASIC) < 0) TEST_ERROR - if(H5Oget_info(gid3, &oinfo3) < 0) + if(H5Oget_info2(gid3, &oinfo3, H5O_INFO_BASIC) < 0) TEST_ERROR /* Verify cork status of the groups */ @@ -959,11 +959,11 @@ verify_named_cork(hbool_t swmr) TEST_ERROR /* Get named datatype object header addresses */ - if(H5Oget_info(tid, &oinfo) < 0) + if(H5Oget_info2(tid, &oinfo, H5O_INFO_BASIC) < 0) TEST_ERROR - if(H5Oget_info(tid2, &oinfo2) < 0) + if(H5Oget_info2(tid2, &oinfo2, H5O_INFO_BASIC) < 0) TEST_ERROR - if(H5Oget_info(tid3, &oinfo3) < 0) + if(H5Oget_info2(tid3, &oinfo3, H5O_INFO_BASIC) < 0) TEST_ERROR /* Verify cork status of the named datatypes */ @@ -1063,7 +1063,7 @@ verify_named_cork(hbool_t swmr) FAIL_STACK_ERROR /* Get dataset object header address */ - if(H5Oget_info(did, &oinfo4) < 0) + if(H5Oget_info2(did, &oinfo4, H5O_INFO_BASIC) < 0) TEST_ERROR /* Cork the dataset: DSET */ @@ -1277,7 +1277,7 @@ verify_multiple_cork(hbool_t swmr) TEST_ERROR /* Verify cork status of the group: gid2 */ - if(H5Oget_info(gid2, &oinfo1) < 0) + if(H5Oget_info2(gid2, &oinfo1, H5O_INFO_BASIC) < 0) TEST_ERROR if(H5C__verify_cork_tag_test(fid2, oinfo1.addr, TRUE) < 0) TEST_ERROR @@ -1305,7 +1305,7 @@ verify_multiple_cork(hbool_t swmr) TEST_ERROR /* Verify cork status of the dataset: did1 */ - if(H5Oget_info(did1, &oinfo2) < 0) + if(H5Oget_info2(did1, &oinfo2, H5O_INFO_BASIC) < 0) TEST_ERROR if(H5C__verify_cork_tag_test(fid1, oinfo2.addr, TRUE) < 0) TEST_ERROR @@ -1333,7 +1333,7 @@ verify_multiple_cork(hbool_t swmr) TEST_ERROR /* Verify cork status of the datatype: tid2 */ - if(H5Oget_info(tid2, &oinfo3) < 0) + if(H5Oget_info2(tid2, &oinfo3, H5O_INFO_BASIC) < 0) TEST_ERROR if(H5C__verify_cork_tag_test(fid2, oinfo3.addr, TRUE) < 0) TEST_ERROR @@ -1349,7 +1349,7 @@ verify_multiple_cork(hbool_t swmr) TEST_ERROR /* Verify cork status of the group: gid1 */ - if(H5Oget_info(gid1, &oinfo1) < 0) + if(H5Oget_info2(gid1, &oinfo1, H5O_INFO_BASIC) < 0) TEST_ERROR if(H5C__verify_cork_tag_test(fid1, oinfo1.addr, FALSE) < 0) TEST_ERROR @@ -1383,7 +1383,7 @@ verify_multiple_cork(hbool_t swmr) TEST_ERROR /* Verify cork status of the dataset: did2 */ - if(H5Oget_info(did2, &oinfo2) < 0) + if(H5Oget_info2(did2, &oinfo2, H5O_INFO_BASIC) < 0) TEST_ERROR if(H5C__verify_cork_tag_test(fid2, oinfo2.addr, FALSE) < 0) TEST_ERROR diff --git a/test/direct_chunk.c b/test/direct_chunk.c new file mode 100644 index 0000000..2ef38ea --- /dev/null +++ b/test/direct_chunk.c @@ -0,0 +1,2167 @@ +/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * +* Copyright by The HDF Group. * +* Copyright by the Board of Trustees of the University of Illinois. * +* All rights reserved. * +* * +* This file is part of HDF5. The full HDF5 copyright notice, including * +* terms governing use, modification, and redistribution, is contained in * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * +* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ + +#include "h5test.h" + +#if defined(H5_HAVE_ZLIB_H) && !defined(H5_ZLIB_HEADER) +# define H5_ZLIB_HEADER "zlib.h" +#endif +#if defined(H5_ZLIB_HEADER) +# include H5_ZLIB_HEADER /* "zlib.h" */ +#endif + +#define FILE_NAME "direct_chunk.h5" + +/* Datasets for Direct Write tests */ +#define DATASETNAME1 "direct_write" +#define DATASETNAME2 "skip_one_filter" +#define DATASETNAME3 "skip_two_filters" +#define DATASETNAME4 "data_conv" +#define DATASETNAME5 "contiguous_dset" +#define DATASETNAME6 "invalid_argue" +#define DATASETNAME7 "overwrite_chunk" +/* Datasets for Direct Read tests */ +#define DATASETNAME8 "disabled_chunk_cache" +#define DATASETNAME9 "flush_chunk_cache" +#define DATASETNAME10 "read_w_valid_cache" +#define DATASETNAME11 "unallocated_chunk" +#define DATASETNAME12 "unfiltered_data" + +#define RANK 2 +#define NX 16 +#define NY 16 +#define CHUNK_NX 4 +#define CHUNK_NY 4 + +#define DEFLATE_SIZE_ADJUST(s) (HDceil(((double)(s))*H5_DOUBLE(1.001))+H5_DOUBLE(12.0)) + +/* Temporary filter IDs used for testing */ +#define H5Z_FILTER_BOGUS1 305 +#define H5Z_FILTER_BOGUS2 306 +#define ADD_ON 7 +#define FACTOR 3 + +/* Constants for the overwrite test */ +#define OVERWRITE_NDIMS 3 +#define OVERWRITE_CHUNK_NX 3 +#define OVERWRITE_CHUNK_2NX 6 +#define OVERWRITE_CHUNK_NY 2 +#define OVERWRITE_VALUE 42 + +/* Defines used in test_single_chunk_latest() */ +#define FILE "single_latest.h5" +#define DATASET "dataset" +#define DIM0 4 +#define DIM1 32 +#define CHUNK0 DIM0 +#define CHUNK1 DIM1 + +/* Local prototypes for filter functions */ +static size_t filter_bogus1(unsigned int flags, size_t cd_nelmts, + const unsigned int *cd_values, size_t nbytes, size_t *buf_size, void **buf); +static size_t filter_bogus2(unsigned int flags, size_t cd_nelmts, + const unsigned int *cd_values, size_t nbytes, size_t *buf_size, void **buf); + +/* This message derives from H5Z */ +const H5Z_class2_t H5Z_BOGUS1[1] = {{ + H5Z_CLASS_T_VERS, /* H5Z_class_t version */ + H5Z_FILTER_BOGUS1, /* Filter id number */ + 1, 1, /* Encoding and decoding enabled */ + "bogus1", /* Filter name for debugging */ + NULL, /* The "can apply" callback */ + NULL, /* The "set local" callback */ + filter_bogus1, /* The actual filter function */ +}}; + +const H5Z_class2_t H5Z_BOGUS2[1] = {{ + H5Z_CLASS_T_VERS, /* H5Z_class_t version */ + H5Z_FILTER_BOGUS2, /* Filter id number */ + 1, 1, /* Encoding and decoding enabled */ + "bogus2", /* Filter name for debugging */ + NULL, /* The "can apply" callback */ + NULL, /* The "set local" callback */ + filter_bogus2, /* The actual filter function */ +}}; + +/*------------------------------------------------------------------------- + * Function: test_direct_chunk_write + * + * Purpose: Test the basic functionality of H5Dwrite_chunk + * + * Return: Success: 0 + * Failure: 1 + * + * Programmer: Raymond Lu + * 30 November 2012 + * + *------------------------------------------------------------------------- + */ +#ifdef H5_HAVE_FILTER_DEFLATE +static int +test_direct_chunk_write (hid_t file) +{ + hid_t dataspace = -1, dataset = -1; + hid_t mem_space = -1; + hid_t cparms = -1, dxpl = -1; + hsize_t dims[2] = {NX, NY}; + hsize_t maxdims[2] = {H5S_UNLIMITED, H5S_UNLIMITED}; + hsize_t chunk_dims[2] ={CHUNK_NX, CHUNK_NY}; + herr_t status; + int ret; + int data[NX][NY]; + int i, j, n; + + unsigned filter_mask = 0; + int direct_buf[CHUNK_NX][CHUNK_NY]; + int check_chunk[CHUNK_NX][CHUNK_NY]; + hsize_t offset[2] = {0, 0}; + size_t buf_size = CHUNK_NX*CHUNK_NY*sizeof(int); + + const Bytef *z_src = (const Bytef*)(direct_buf); + Bytef *z_dst = NULL; /*destination buffer */ + uLongf z_dst_nbytes = (uLongf)DEFLATE_SIZE_ADJUST(buf_size); + uLong z_src_nbytes = (uLong)buf_size; + int aggression = 9; /* Compression aggression setting */ + void *outbuf = NULL; /* Pointer to new buffer */ + + hsize_t start[2]; /* Start of hyperslab */ + hsize_t stride[2]; /* Stride of hyperslab */ + hsize_t count[2]; /* Block count */ + hsize_t block[2]; /* Block sizes */ + + TESTING("basic functionality of H5Dwrite_chunk"); + + /* + * Create the data space with unlimited dimensions. + */ + if((dataspace = H5Screate_simple(RANK, dims, maxdims)) < 0) + goto error; + + if((mem_space = H5Screate_simple(RANK, chunk_dims, NULL)) < 0) + goto error; + + /* + * Modify dataset creation properties, i.e. enable chunking and compression + */ + if((cparms = H5Pcreate(H5P_DATASET_CREATE)) < 0) + goto error; + + if((status = H5Pset_chunk( cparms, RANK, chunk_dims)) < 0) + goto error; + + if((status = H5Pset_deflate( cparms, (unsigned) aggression)) < 0) + goto error; + + /* + * Create a new dataset within the file using cparms + * creation properties. + */ + if((dataset = H5Dcreate2(file, DATASETNAME1, H5T_NATIVE_INT, dataspace, H5P_DEFAULT, + cparms, H5P_DEFAULT)) < 0) + goto error; + + /* Initialize the dataset */ + for(i = n = 0; i < NX; i++) + for(j = 0; j < NY; j++) + data[i][j] = n++; + + if((dxpl = H5Pcreate(H5P_DATASET_XFER)) < 0) + goto error; + + /* + * Write the data for the dataset. It should stay in the chunk cache. + * It will be evicted from the cache by the H5Dwrite_chunk calls. + */ + if((status = H5Dwrite(dataset, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, + dxpl, data)) < 0) + goto error; + + /* Initialize data for one chunk */ + for(i = n = 0; i < CHUNK_NX; i++) + for(j = 0; j < CHUNK_NY; j++) + direct_buf[i][j] = n++; + + /* Allocate output (compressed) buffer */ + outbuf = HDmalloc(z_dst_nbytes); + z_dst = (Bytef *)outbuf; + + /* Perform compression from the source to the destination buffer */ + ret = compress2(z_dst, &z_dst_nbytes, z_src, z_src_nbytes, aggression); + + /* Check for various zlib errors */ + if(Z_BUF_ERROR == ret) { + HDfprintf(stderr, "overflow"); + goto error; + } else if(Z_MEM_ERROR == ret) { + HDfprintf(stderr, "deflate memory error"); + goto error; + } else if(Z_OK != ret) { + HDfprintf(stderr, "other deflate error"); + goto error; + } + + /* Write the compressed chunk data repeatedly to cover all the chunks in the + * dataset, using the direct writing function. */ + for(i=0; i<NX/CHUNK_NX; i++) { + for(j=0; j<NY/CHUNK_NY; j++) { + status = H5Dwrite_chunk(dataset, dxpl, filter_mask, offset, z_dst_nbytes, outbuf); + offset[1] += CHUNK_NY; + } + offset[0] += CHUNK_NX; + offset[1] = 0; + } + + if(outbuf) + HDfree(outbuf); + + if(H5Fflush(dataset, H5F_SCOPE_LOCAL) < 0) + goto error; + + if(H5Dclose(dataset) < 0) + goto error; + + if((dataset = H5Dopen2(file, DATASETNAME1, H5P_DEFAULT)) < 0) + goto error; + + /* + * Select hyperslab for one chunk in the file + */ + start[0] = CHUNK_NX; start[1] = CHUNK_NY; + stride[0] = 1; stride[1] = 1; + count[0] = 1; count[1] = 1; + block[0] = CHUNK_NX; block[1] = CHUNK_NY; + if((status = H5Sselect_hyperslab(dataspace, H5S_SELECT_SET, start, stride, count, block)) < 0) + goto error; + + /* Read the chunk back */ + if((status = H5Dread(dataset, H5T_NATIVE_INT, mem_space, dataspace, H5P_DEFAULT, check_chunk)) < 0) + goto error; + + /* Check that the values read are the same as the values written */ + for(i = 0; i < CHUNK_NX; i++) { + for(j = 0; j < CHUNK_NY; j++) { + if(direct_buf[i][j] != check_chunk[i][j]) { + HDprintf(" 1. Read different values than written."); + HDprintf(" At index %d,%d\n", i, j); + HDprintf(" direct_buf=%d, check_chunk=%d\n", direct_buf[i][j], check_chunk[i][j]); + goto error; + } + } + } + + /* Reinitialize different data for one chunk */ + for(i = 0; i < CHUNK_NX; i++) + for(j = 0; j < CHUNK_NY; j++) + direct_buf[i][j] = i + j; + + /* Allocate output (compressed) buffer */ + outbuf = HDmalloc(z_dst_nbytes); + z_dst = (Bytef *)outbuf; + + /* Perform compression from the source to the destination buffer */ + ret = compress2(z_dst, &z_dst_nbytes, z_src, z_src_nbytes, aggression); + + /* Check for various zlib errors */ + if(Z_BUF_ERROR == ret) { + HDfprintf(stderr, "overflow"); + goto error; + } else if(Z_MEM_ERROR == ret) { + HDfprintf(stderr, "deflate memory error"); + goto error; + } else if(Z_OK != ret) { + HDfprintf(stderr, "other deflate error"); + goto error; + } + + /* Rewrite the compressed chunk data repeatedly to cover all the chunks in the + * dataset, using the direct writing function. */ + offset[0] = offset[1] = 0; + for(i=0; i<NX/CHUNK_NX; i++) { + for(j=0; j<NY/CHUNK_NY; j++) { + status = H5Dwrite_chunk(dataset, dxpl, filter_mask, offset, z_dst_nbytes, outbuf); + offset[1] += CHUNK_NY; + } + offset[0] += CHUNK_NX; + offset[1] = 0; + } + + if(outbuf) + HDfree(outbuf); + + if(H5Fflush(dataset, H5F_SCOPE_LOCAL) < 0) + goto error; + + if(H5Dclose(dataset) < 0) + goto error; + + if((dataset = H5Dopen2(file, DATASETNAME1, H5P_DEFAULT)) < 0) + goto error; + + /* Read the chunk back */ + if((status = H5Dread(dataset, H5T_NATIVE_INT, mem_space, dataspace, H5P_DEFAULT, check_chunk)) < 0) + goto error; + + /* Check that the values read are the same as the values written */ + for(i = 0; i < CHUNK_NX; i++) { + for(j = 0; j < CHUNK_NY; j++) { + if(direct_buf[i][j] != check_chunk[i][j]) { + HDprintf(" 2. Read different values than written."); + HDprintf(" At index %d,%d\n", i, j); + HDprintf(" direct_buf=%d, check_chunk=%d\n", direct_buf[i][j], check_chunk[i][j]); + goto error; + } + } + } + + /* + * Close/release resources. + */ + H5Dclose(dataset); + H5Sclose(mem_space); + H5Sclose(dataspace); + H5Pclose(cparms); + H5Pclose(dxpl); + + PASSED(); + return 0; + +error: + H5E_BEGIN_TRY { + H5Dclose(dataset); + H5Sclose(mem_space); + H5Sclose(dataspace); + H5Pclose(cparms); + H5Pclose(dxpl); + } H5E_END_TRY; + + if(outbuf) + HDfree(outbuf); + + H5_FAILED(); + return 1; +} /* test_direct_chunk_write() */ +#endif /* H5_HAVE_FILTER_DEFLATE */ + +/*------------------------------------------------------------------------- + * Function: test_direct_chunk_overwrite_data + * + * Purpose: Test overwriting a chunk with new data. + * + * Return: Success: 0 + * Failure: 1 + * + * Programmer: Dana Robinson + * Spring 2017 + * + *------------------------------------------------------------------------- + */ +static int +test_direct_chunk_overwrite_data(hid_t fid) +{ + size_t buf_size = OVERWRITE_CHUNK_NX * OVERWRITE_CHUNK_NY * sizeof(int16_t); + int16_t data_buf[OVERWRITE_CHUNK_NY][OVERWRITE_CHUNK_NX]; + int16_t overwrite_buf[OVERWRITE_CHUNK_NY][OVERWRITE_CHUNK_NX]; + uint32_t filter_mask = 0; + hid_t tid = H5T_NATIVE_UINT16; + hid_t dcpl_id = -1; + hid_t sid = -1; + hid_t did = -1; + uint16_t fill_value = 0; + hsize_t dset_dims[] = {1, OVERWRITE_CHUNK_NY, OVERWRITE_CHUNK_2NX}; + hsize_t dset_max_dims[] = {H5S_UNLIMITED, OVERWRITE_CHUNK_NY, OVERWRITE_CHUNK_2NX}; + hsize_t chunk_dims[] = {1, OVERWRITE_CHUNK_NY, OVERWRITE_CHUNK_NX}; + hsize_t offset[] = {0, 0, 0}; + hsize_t i, j; + int16_t n; + int16_t read_buf[OVERWRITE_CHUNK_NY][OVERWRITE_CHUNK_2NX]; + + TESTING("overwriting existing data with H5Dwrite_chunk"); + + /* Create the dataset's data space */ + if ((sid = H5Screate_simple(OVERWRITE_NDIMS, dset_dims, dset_max_dims)) < 0) + FAIL_STACK_ERROR + + /* Set chunk size and filll value */ + if ((dcpl_id = H5Pcreate(H5P_DATASET_CREATE)) < 0) + FAIL_STACK_ERROR + if (H5Pset_fill_value(dcpl_id, tid, &fill_value) < 0) + FAIL_STACK_ERROR + if (H5Pset_chunk(dcpl_id, OVERWRITE_NDIMS, chunk_dims) < 0) + FAIL_STACK_ERROR + + /* Create dataset */ + if ((did = H5Dcreate2(fid, DATASETNAME7, tid, sid, H5P_DEFAULT, dcpl_id, H5P_DEFAULT)) < 0) + FAIL_STACK_ERROR + + /* Initialize data buffers */ + n = 0; + for (i = 0; i < OVERWRITE_CHUNK_NY; i++) { + for (j = 0; j < OVERWRITE_CHUNK_NX; j++) { + data_buf[i][j] = n++; + overwrite_buf[i][j] = OVERWRITE_VALUE; + } + } + + /* Write chunk data using the direct write function. */ + if (H5Dwrite_chunk(did, H5P_DEFAULT, filter_mask, offset, buf_size, data_buf) < 0) + FAIL_STACK_ERROR + + /* Write second chunk. */ + offset[2] = OVERWRITE_CHUNK_NX; + if (H5Dwrite_chunk(did, H5P_DEFAULT, filter_mask, offset, buf_size, data_buf) < 0) + FAIL_STACK_ERROR + + /* Overwrite first chunk. */ + offset[2] = 0; + if (H5Dwrite_chunk(did, H5P_DEFAULT, filter_mask, offset, buf_size, overwrite_buf) < 0) + FAIL_STACK_ERROR + + /* Read the data back out */ + if (H5Dread(did, tid, H5S_ALL, H5S_ALL, H5P_DEFAULT, read_buf) < 0) + FAIL_STACK_ERROR + + /* Ensure that the data are correct in chunk 1 */ + for (i = 0; i < OVERWRITE_CHUNK_NY; i++) + for (j = 0; j < OVERWRITE_CHUNK_NX; j++) { + if (read_buf[i][j] != OVERWRITE_VALUE) + TEST_ERROR + } + + if (H5Pclose(dcpl_id) < 0) + FAIL_STACK_ERROR + if (H5Sclose(sid) < 0) + FAIL_STACK_ERROR + if (H5Dclose(did) < 0) + FAIL_STACK_ERROR + + PASSED(); + return 0; + +error: + H5E_BEGIN_TRY { + H5Pclose(dcpl_id); + H5Sclose(sid); + H5Dclose(did); + } H5E_END_TRY; + + H5_FAILED(); + return 1; +} /* end test_direct_chunk_overwrite_data() */ + +/*------------------------------------------------------------------------- + * Function: test_skip_compress_write1 + * + * Purpose: Test skipping compression filter when it is the only filter + * for the dataset + * + * Return: Success: 0 + * Failure: 1 + * + * Programmer: Raymond Lu + * 30 November 2012 + * + *------------------------------------------------------------------------- + */ +static int +test_skip_compress_write1(hid_t file) +{ + hid_t dataspace = -1, dataset = -1; + hid_t mem_space = -1; + hid_t cparms = -1, dxpl = -1; + hsize_t dims[2] = {NX, NY}; + hsize_t maxdims[2] = {H5S_UNLIMITED, H5S_UNLIMITED}; + hsize_t chunk_dims[2] ={CHUNK_NX, CHUNK_NY}; + herr_t status; + int i, j, n; + + unsigned filter_mask = 0; + int direct_buf[CHUNK_NX][CHUNK_NY]; + int check_chunk[CHUNK_NX][CHUNK_NY]; + hsize_t offset[2] = {0, 0}; + size_t buf_size = CHUNK_NX*CHUNK_NY*sizeof(int); + int aggression = 9; /* Compression aggression setting */ + + unsigned read_filter_mask = 0; /* filter mask after direct read */ + int read_direct_buf[CHUNK_NX][CHUNK_NY]; + hsize_t read_buf_size = 0; /* buf size */ + + hsize_t start[2]; /* Start of hyperslab */ + hsize_t stride[2]; /* Stride of hyperslab */ + hsize_t count[2]; /* Block count */ + hsize_t block[2]; /* Block sizes */ + + TESTING("skipping compression filter for H5Dwrite_chunk/H5Dread_chunk"); + + /* + * Create the data space with unlimited dimensions. + */ + if((dataspace = H5Screate_simple(RANK, dims, maxdims)) < 0) + goto error; + + if((mem_space = H5Screate_simple(RANK, chunk_dims, NULL)) < 0) + goto error; + + /* + * Modify dataset creation properties, i.e. enable chunking and compression + */ + if((cparms = H5Pcreate(H5P_DATASET_CREATE)) < 0) + goto error; + + if((status = H5Pset_chunk( cparms, RANK, chunk_dims)) < 0) + goto error; + + if((status = H5Pset_deflate( cparms, (unsigned ) aggression)) < 0) + goto error; + + /* + * Create a new dataset within the file using cparms + * creation properties. + */ + if((dataset = H5Dcreate2(file, DATASETNAME2, H5T_NATIVE_INT, dataspace, H5P_DEFAULT, + cparms, H5P_DEFAULT)) < 0) + goto error; + + if((dxpl = H5Pcreate(H5P_DATASET_XFER)) < 0) + goto error; + + /* Initialize data for one chunk */ + for(i = n = 0; i < CHUNK_NX; i++) + for(j = 0; j < CHUNK_NY; j++) { + direct_buf[i][j] = n++; + } + + /* write the uncompressed chunk data repeatedly to dataset, using the direct writing function. + * Indicate skipping the compression filter. */ + offset[0] = CHUNK_NX; + offset[1] = CHUNK_NY; + + filter_mask = 0x00000001; + + if((status = H5Dwrite_chunk(dataset, dxpl, filter_mask, offset, buf_size, direct_buf)) < 0) + goto error; + + if(H5Fflush(dataset, H5F_SCOPE_LOCAL) < 0) + goto error; + + if(H5Dclose(dataset) < 0) + goto error; + + if((dataset = H5Dopen2(file, DATASETNAME2, H5P_DEFAULT)) < 0) + goto error; + + /* + * Select hyperslab for the chunk just written in the file + */ + start[0] = CHUNK_NX; start[1] = CHUNK_NY; + stride[0] = 1; stride[1] = 1; + count[0] = 1; count[1] = 1; + block[0] = CHUNK_NX; block[1] = CHUNK_NY; + if((status = H5Sselect_hyperslab(dataspace, H5S_SELECT_SET, start, stride, count, block)) < 0) + goto error; + + /* Read the chunk back */ + if((status = H5Dread(dataset, H5T_NATIVE_INT, mem_space, dataspace, H5P_DEFAULT, check_chunk)) < 0) + goto error; + + /* Check that the values read are the same as the values written */ + for(i = 0; i < CHUNK_NX; i++) { + for(j = 0; j < CHUNK_NY; j++) { + if(direct_buf[i][j] != check_chunk[i][j]) { + HDprintf(" 1. Read different values than written."); + HDprintf(" At index %d,%d\n", i, j); + HDprintf(" direct_buf=%d, check_chunk=%d\n", direct_buf[i][j], check_chunk[i][j]); + goto error; + } + } + } + + /* Query chunk storage size */ + if((status = H5Dget_chunk_storage_size(dataset, offset, &read_buf_size)) < 0) + goto error; + if(read_buf_size != buf_size) + goto error; + + /* Read the raw chunk back */ + HDmemset(&read_direct_buf, 0, sizeof(read_direct_buf)); + if((status = H5Dread_chunk(dataset, H5P_DEFAULT, offset, &read_filter_mask, read_direct_buf)) < 0) + goto error; + if(read_filter_mask != filter_mask) + goto error; + + /* Check that the direct chunk read is the same as the chunk written */ + for(i = 0; i < CHUNK_NX; i++) { + for(j = 0; j < CHUNK_NY; j++) { + if(direct_buf[i][j] != read_direct_buf[i][j]) { + HDprintf(" 1. Read different values than written."); + HDprintf(" At index %d,%d\n", i, j); + HDprintf(" direct_buf=%d, read_direct_buf=%d\n", direct_buf[i][j], read_direct_buf[i][j]); + goto error; + } + } + } + + /* + * Close/release resources. + */ + H5Dclose(dataset); + H5Sclose(mem_space); + H5Sclose(dataspace); + H5Pclose(cparms); + H5Pclose(dxpl); + + PASSED(); + return 0; + +error: + H5E_BEGIN_TRY { + H5Dclose(dataset); + H5Sclose(mem_space); + H5Sclose(dataspace); + H5Pclose(cparms); + H5Pclose(dxpl); + } H5E_END_TRY; + + H5_FAILED(); + return 1; +} /* test_skip_compress_write1() */ + +/*------------------------------------------------------------------------- + * Function: filter_bogus1 + * + * Purpose: A bogus filter that adds ADD_ON to the original value + * + * Return: Success: Data chunk size + * + * Programmer: Raymond Lu + * 30 November 2012 + * + *------------------------------------------------------------------------- + */ +static size_t +filter_bogus1(unsigned int flags, size_t H5_ATTR_UNUSED cd_nelmts, + const unsigned int H5_ATTR_UNUSED *cd_values, size_t nbytes, + size_t *buf_size, void **buf) +{ + int *int_ptr=(int *)*buf; /* Pointer to the data values */ + ssize_t buf_left=(ssize_t)*buf_size; /* Amount of data buffer left to process */ + + if(flags & H5Z_FLAG_REVERSE) { /* read */ + /* Substract the "add on" value to all the data values */ + while(buf_left>0) { + *int_ptr++ -= (int)ADD_ON; + buf_left -= (ssize_t)sizeof(int); + } /* end while */ + } /* end if */ + else { /* write */ + /* Add the "add on" value to all the data values */ + while(buf_left>0) { + *int_ptr++ += (int)ADD_ON; + buf_left -= (ssize_t)sizeof(int); + } /* end while */ + } /* end else */ + + return nbytes; +} /* filter_bogus1() */ + +/*------------------------------------------------------------------------- + * Function: filter_bogus2 + * + * Purpose: A bogus filter that multiplies the original value by FACTOR. + * + * Return: Success: Data chunk size + * + * Programmer: Raymond Lu + * 30 November 2012 + *------------------------------------------------------------------------- + */ +static size_t +filter_bogus2(unsigned int flags, size_t H5_ATTR_UNUSED cd_nelmts, + const unsigned int H5_ATTR_UNUSED *cd_values, size_t nbytes, + size_t *buf_size, void **buf) +{ + int *int_ptr=(int *)*buf; /* Pointer to the data values */ + ssize_t buf_left=(ssize_t)*buf_size; /* Amount of data buffer left to process */ + + if(flags & H5Z_FLAG_REVERSE) { /* read */ + /* Substract the "add on" value to all the data values */ + while(buf_left>0) { + *int_ptr++ /= (int)FACTOR; + buf_left -= (ssize_t)sizeof(int); + } /* end while */ + } /* end if */ + else { /* write */ + /* Add the "add on" value to all the data values */ + while(buf_left>0) { + *int_ptr++ *= (int)FACTOR; + buf_left -= (ssize_t)sizeof(int); + } /* end while */ + } /* end else */ + + return nbytes; +} /* filter_bogus2() */ + +/*------------------------------------------------------------------------- + * Function: test_skip_compress_write2 + * + * Purpose: Test skipping compression filter when there are three filters + * for the dataset + * + * Return: Success: 0 + * Failure: 1 + * + * Programmer: Raymond Lu + * 30 November 2012 + * + *------------------------------------------------------------------------- + */ +static int +test_skip_compress_write2(hid_t file) +{ + hid_t dataspace = -1, dataset = -1; + hid_t mem_space = -1; + hid_t cparms = -1, dxpl = -1; + hsize_t dims[2] = {NX, NY}; + hsize_t maxdims[2] = {H5S_UNLIMITED, H5S_UNLIMITED}; + hsize_t chunk_dims[2] ={CHUNK_NX, CHUNK_NY}; + herr_t status; + int i, j, n; + + unsigned filter_mask = 0; /* orig filter mask */ + int origin_direct_buf[CHUNK_NX][CHUNK_NY]; + int direct_buf[CHUNK_NX][CHUNK_NY]; + int check_chunk[CHUNK_NX][CHUNK_NY]; + hsize_t offset[2] = {0, 0}; + size_t buf_size = CHUNK_NX*CHUNK_NY*sizeof(int); + int aggression = 9; /* Compression aggression setting */ + + unsigned read_filter_mask = 0; /* filter mask after direct read */ + int read_direct_buf[CHUNK_NX][CHUNK_NY]; + hsize_t read_buf_size = 0; /* buf size */ + + hsize_t start[2]; /* Start of hyperslab */ + hsize_t stride[2]; /* Stride of hyperslab */ + hsize_t count[2]; /* Block count */ + hsize_t block[2]; /* Block sizes */ + + TESTING("skipping compression filters but keep two other filters"); + + /* + * Create the data space with unlimited dimensions. + */ + if((dataspace = H5Screate_simple(RANK, dims, maxdims)) < 0) + goto error; + + if((mem_space = H5Screate_simple(RANK, chunk_dims, NULL)) < 0) + goto error; + + /* + * Modify dataset creation properties, i.e. enable chunking and compression. + * The order of filters is bogus 1 + deflate + bogus 2. + */ + if((cparms = H5Pcreate(H5P_DATASET_CREATE)) < 0) + goto error; + + if((status = H5Pset_chunk( cparms, RANK, chunk_dims)) < 0) + goto error; + + /* Register and enable first bogus filter */ + if(H5Zregister (H5Z_BOGUS1) < 0) + goto error; + + if(H5Pset_filter(cparms, H5Z_FILTER_BOGUS1, 0, (size_t)0, NULL) < 0) + goto error; + + /* Enable compression filter */ + if((status = H5Pset_deflate( cparms, (unsigned) aggression)) < 0) + goto error; + + /* Register and enable second bogus filter */ + if(H5Zregister (H5Z_BOGUS2) < 0) + goto error; + + if(H5Pset_filter(cparms, H5Z_FILTER_BOGUS2, 0, (size_t)0, NULL) < 0) + goto error; + + /* + * Create a new dataset within the file using cparms + * creation properties. + */ + if((dataset = H5Dcreate2(file, DATASETNAME3, H5T_NATIVE_INT, dataspace, H5P_DEFAULT, + cparms, H5P_DEFAULT)) < 0) + goto error; + + if((dxpl = H5Pcreate(H5P_DATASET_XFER)) < 0) + goto error; + + /* Initialize data for one chunk. Apply operations of two bogus filters to the chunk */ + for(i = n = 0; i < CHUNK_NX; i++) + for(j = 0; j < CHUNK_NY; j++) { + origin_direct_buf[i][j] = n++; + direct_buf[i][j] = (origin_direct_buf[i][j] + ADD_ON) * FACTOR; + } + + /* write the uncompressed chunk data repeatedly to dataset, using the direct writing function. + * Indicate skipping the compression filter but keep the other two bogus filters */ + offset[0] = CHUNK_NX; + offset[1] = CHUNK_NY; + + /* compression filter is the middle one to be skipped */ + filter_mask = 0x00000002; + + if((status = H5Dwrite_chunk(dataset, dxpl, filter_mask, offset, buf_size, direct_buf)) < 0) + goto error; + + if(H5Fflush(dataset, H5F_SCOPE_LOCAL) < 0) + goto error; + + if(H5Dclose(dataset) < 0) + goto error; + + if((dataset = H5Dopen2(file, DATASETNAME3, H5P_DEFAULT)) < 0) + goto error; + + /* + * Select hyperslab for one chunk in the file + */ + start[0] = CHUNK_NX; start[1] = CHUNK_NY; + stride[0] = 1; stride[1] = 1; + count[0] = 1; count[1] = 1; + block[0] = CHUNK_NX; block[1] = CHUNK_NY; + if((status = H5Sselect_hyperslab(dataspace, H5S_SELECT_SET, start, stride, count, block)) < 0) + goto error; + + /* Read the chunk back */ + if((status = H5Dread(dataset, H5T_NATIVE_INT, mem_space, dataspace, H5P_DEFAULT, check_chunk)) < 0) + goto error; + + /* Check that the values read are the same as the values written */ + for(i = 0; i < CHUNK_NX; i++) { + for(j = 0; j < CHUNK_NY; j++) { + if(origin_direct_buf[i][j] != check_chunk[i][j]) { + HDprintf(" 1. Read different values than written."); + HDprintf(" At index %d,%d\n", i, j); + HDprintf(" origin_direct_buf=%d, check_chunk=%d\n", origin_direct_buf[i][j], check_chunk[i][j]); + goto error; + } + } + } + + /* Query chunk storage size */ + if((status = H5Dget_chunk_storage_size(dataset, offset, &read_buf_size)) < 0) + goto error; + if(read_buf_size != buf_size) + goto error; + + /* Read the raw chunk back */ + HDmemset(&read_direct_buf, 0, sizeof(read_direct_buf)); + if((status = H5Dread_chunk(dataset, H5P_DEFAULT, offset, &read_filter_mask, read_direct_buf)) < 0) + goto error; + if(read_filter_mask != filter_mask) + goto error; + + /* Check that the direct chunk read is the same as the chunk written */ + for(i = 0; i < CHUNK_NX; i++) { + for(j = 0; j < CHUNK_NY; j++) { + if(direct_buf[i][j] != read_direct_buf[i][j]) { + HDprintf(" 1. Read different values than written."); + HDprintf(" At index %d,%d\n", i, j); + HDprintf(" direct_buf=%d, read_direct_buf=%d\n", direct_buf[i][j], read_direct_buf[i][j]); + goto error; + } + } + } + + /* + * Close/release resources. + */ + H5Dclose(dataset); + H5Sclose(mem_space); + H5Sclose(dataspace); + H5Pclose(cparms); + H5Pclose(dxpl); + + PASSED(); + return 0; + +error: + H5E_BEGIN_TRY { + H5Dclose(dataset); + H5Sclose(mem_space); + H5Sclose(dataspace); + H5Pclose(cparms); + H5Pclose(dxpl); + } H5E_END_TRY; + + H5_FAILED(); + return 1; +} /* test_skip_compress_write2() */ + +/*------------------------------------------------------------------------- + * Function: test_data_conv + * + * Purpose: Test data conversion + * + * Return: Success: 0 + * Failure: 1 + * + * Programmer: Raymond Lu + * 30 November 2012 + * + *------------------------------------------------------------------------- + */ +static int +test_data_conv(hid_t file) +{ + typedef struct { + int a, b, c[4], d, e; + } src_type_t; + typedef struct { + int a, c[4], e; + } dst_type_t; + + hid_t dataspace = -1, dataset = -1; + hid_t mem_space = -1; + hid_t cparms = -1, dxpl = -1; + hsize_t dims[2] = {NX, NY}; + hsize_t maxdims[2] = {H5S_UNLIMITED, H5S_UNLIMITED}; + hsize_t chunk_dims[2] ={CHUNK_NX, CHUNK_NY}; + herr_t status; + int i, j, n; + const hsize_t four = 4; + hid_t st=-1, dt=-1; + hid_t array_dt; + + unsigned filter_mask = 0; + src_type_t direct_buf[CHUNK_NX][CHUNK_NY]; + dst_type_t check_chunk[CHUNK_NX][CHUNK_NY]; + src_type_t read_chunk[CHUNK_NX][CHUNK_NY]; /* For H5Dread_chunk */ + + hsize_t offset[2] = {0, 0}; + size_t buf_size = CHUNK_NX*CHUNK_NY*sizeof(src_type_t); + + hsize_t start[2]; /* Start of hyperslab */ + hsize_t stride[2]; /* Stride of hyperslab */ + hsize_t count[2]; /* Block count */ + hsize_t block[2]; /* Block sizes */ + + TESTING("data conversion for H5Dwrite_chunk/H5Dread_chunk"); + + /* + * Create the data space with unlimited dimensions. + */ + if((dataspace = H5Screate_simple(RANK, dims, maxdims)) < 0) + goto error; + + if((mem_space = H5Screate_simple(RANK, chunk_dims, NULL)) < 0) + goto error; + + /* + * Modify dataset creation properties, i.e. enable chunking + */ + if((cparms = H5Pcreate(H5P_DATASET_CREATE)) < 0) + goto error; + + if((status = H5Pset_chunk( cparms, RANK, chunk_dims)) < 0) + goto error; + + /* Build hdf5 datatypes */ + array_dt = H5Tarray_create2(H5T_NATIVE_INT, 1, &four); + if((st = H5Tcreate(H5T_COMPOUND, sizeof(src_type_t))) < 0 || + H5Tinsert(st, "a", HOFFSET(src_type_t, a), H5T_NATIVE_INT) < 0 || + H5Tinsert(st, "b", HOFFSET(src_type_t, b), H5T_NATIVE_INT) < 0 || + H5Tinsert(st, "c", HOFFSET(src_type_t, c), array_dt) < 0 || + H5Tinsert(st, "d", HOFFSET(src_type_t, d), H5T_NATIVE_INT) < 0 || + H5Tinsert(st, "e", HOFFSET(src_type_t, e), H5T_NATIVE_INT) < 0) + goto error; + + if(H5Tclose(array_dt) < 0) + goto error; + + array_dt = H5Tarray_create2(H5T_NATIVE_INT, 1, &four); + if((dt = H5Tcreate(H5T_COMPOUND, sizeof(dst_type_t))) < 0 || + H5Tinsert(dt, "a", HOFFSET(dst_type_t, a), H5T_NATIVE_INT) < 0 || + H5Tinsert(dt, "c", HOFFSET(dst_type_t, c), array_dt) < 0 || + H5Tinsert(dt, "e", HOFFSET(dst_type_t, e), H5T_NATIVE_INT) < 0) + goto error; + + if(H5Tclose(array_dt) < 0) + goto error; + + /* + * Create a new dataset within the file using cparms + * creation properties. + */ + if((dataset = H5Dcreate2(file, DATASETNAME4, st, dataspace, H5P_DEFAULT, + cparms, H5P_DEFAULT)) < 0) + goto error; + + if((dxpl = H5Pcreate(H5P_DATASET_XFER)) < 0) + goto error; + + /* Initialize data for one chunk */ + for(i = n = 0; i < CHUNK_NX; i++) { + for(j = 0; j < CHUNK_NY; j++) { + (direct_buf[i][j]).a = i*j+0; + (direct_buf[i][j]).b = i*j+1; + (direct_buf[i][j]).c[0] = i*j+2; + (direct_buf[i][j]).c[1] = i*j+3; + (direct_buf[i][j]).c[2] = i*j+4; + (direct_buf[i][j]).c[3] = i*j+5; + (direct_buf[i][j]).d = i*j+6; + (direct_buf[i][j]).e = i*j+7; + } + } + + /* write the chunk data to dataset, using the direct writing function. + * There should be no data conversion involved. */ + offset[0] = CHUNK_NX; + offset[1] = CHUNK_NY; + + if((status = H5Dwrite_chunk(dataset, dxpl, filter_mask, offset, buf_size, direct_buf)) < 0) + goto error; + + if(H5Fflush(dataset, H5F_SCOPE_LOCAL) < 0) + goto error; + + if(H5Dclose(dataset) < 0) + goto error; + + if((dataset = H5Dopen2(file, DATASETNAME4, H5P_DEFAULT)) < 0) + goto error; + + /* Use H5Dread_chunk() to read the uncompressed data */ + if((status = H5Dread_chunk(dataset, dxpl, offset, &filter_mask, read_chunk)) < 0) + goto error; + + /* Check that the values read are the same as the values written */ + for(i = 0; i < CHUNK_NX; i++) { + for(j = 0; j < CHUNK_NY; j++) { + if ((direct_buf[i][j]).a != (read_chunk[i][j]).a || + (direct_buf[i][j]).b != (read_chunk[i][j]).b || + (direct_buf[i][j]).c[0] != (read_chunk[i][j]).c[0] || + (direct_buf[i][j]).c[1] != (read_chunk[i][j]).c[1] || + (direct_buf[i][j]).c[2] != (read_chunk[i][j]).c[2] || + (direct_buf[i][j]).c[3] != (read_chunk[i][j]).c[3] || + (direct_buf[i][j]).d != (read_chunk[i][j]).d || + (direct_buf[i][j]).e != (read_chunk[i][j]).e) { + HDprintf(" 1. Read different values than written."); + HDprintf(" At index %d,%d\n", i, j); + HDprintf(" src={a=%d, b=%d, c=[%d,%d,%d,%d], d=%d, e=%d\n", + (direct_buf[i][j]).a, (direct_buf[i][j]).b, (direct_buf[i][j]).c[0], (direct_buf[i][j]).c[1], + (direct_buf[i][j]).c[2], (direct_buf[i][j]).c[3], (direct_buf[i][j]).d, (direct_buf[i][j]).e); + HDprintf(" dst={a=%d, b=%d, c=[%d,%d,%d,%d], d=%d, e=%d\n", + (read_chunk[i][j]).a, (read_chunk[i][j]).b, (read_chunk[i][j]).c[0], (read_chunk[i][j]).c[1], + (read_chunk[i][j]).c[2], (read_chunk[i][j]).c[3], (read_chunk[i][j]).d, (read_chunk[i][j]).e); + + goto error; + } + } + } + + /* + * Select hyperslab for the chunk just written in the file + */ + start[0] = CHUNK_NX; start[1] = CHUNK_NY; + stride[0] = 1; stride[1] = 1; + count[0] = 1; count[1] = 1; + block[0] = CHUNK_NX; block[1] = CHUNK_NY; + if((status = H5Sselect_hyperslab(dataspace, H5S_SELECT_SET, start, stride, count, block)) < 0) + goto error; + + /* Read the chunk back. Data should be converted */ + if((status = H5Dread(dataset, dt, mem_space, dataspace, H5P_DEFAULT, check_chunk)) < 0) + goto error; + + /* Check that the values read are the same as the values written */ + for(i = 0; i < CHUNK_NX; i++) { + for(j = 0; j < CHUNK_NY; j++) { + if ((direct_buf[i][j]).a != (check_chunk[i][j]).a || + (direct_buf[i][j]).c[0] != (check_chunk[i][j]).c[0] || + (direct_buf[i][j]).c[1] != (check_chunk[i][j]).c[1] || + (direct_buf[i][j]).c[2] != (check_chunk[i][j]).c[2] || + (direct_buf[i][j]).c[3] != (check_chunk[i][j]).c[3] || + (direct_buf[i][j]).e != (check_chunk[i][j]).e) { + HDprintf(" 1. Read different values than written."); + HDprintf(" At index %d,%d\n", i, j); + HDprintf(" src={a=%d, b=%d, c=[%d,%d,%d,%d], d=%d, e=%d\n", + (direct_buf[i][j]).a, (direct_buf[i][j]).b, (direct_buf[i][j]).c[0], (direct_buf[i][j]).c[1], + (direct_buf[i][j]).c[2], (direct_buf[i][j]).c[3], (direct_buf[i][j]).d, (direct_buf[i][j]).e); + HDprintf(" dst={a=%d, c=[%d,%d,%d,%d], e=%d\n", + (check_chunk[i][j]).a, (check_chunk[i][j]).c[0], (check_chunk[i][j]).c[1], (check_chunk[i][j]).c[2], + (check_chunk[i][j]).c[3], (check_chunk[i][j]).e); + + goto error; + } + } + } + + /* + * Close/release resources. + */ + H5Dclose(dataset); + H5Sclose(mem_space); + H5Sclose(dataspace); + H5Pclose(cparms); + H5Pclose(dxpl); + H5Tclose(st); + H5Tclose(dt); + + PASSED(); + return 0; + +error: + H5E_BEGIN_TRY { + H5Dclose(dataset); + H5Sclose(mem_space); + H5Sclose(dataspace); + H5Pclose(cparms); + H5Pclose(dxpl); + H5Tclose(st); + H5Tclose(dt); + } H5E_END_TRY; + + H5_FAILED(); + return 1; +} /* test_data_conv() */ + +/*------------------------------------------------------------------------- + * Function: test_invalid_parameters + * + * Purpose: Test invalid parameters for H5Dwrite_chunk and H5Dread_chunk + * + * Return: Success: 0 + * Failure: 1 + * + * Programmer: Raymond Lu + * 30 November 2012 + * + *------------------------------------------------------------------------- + */ +static int +test_invalid_parameters(hid_t file) +{ + hid_t dataspace = -1, dataset = -1; + hid_t mem_space = -1; + hid_t cparms = -1, dxpl = -1; + hsize_t dims[2] = {NX, NY}; + hsize_t chunk_dims[2] ={CHUNK_NX, CHUNK_NY}; + herr_t status; + int i, j, n; + + unsigned filter_mask = 0; + int direct_buf[CHUNK_NX][CHUNK_NY]; + hsize_t offset[2] = {0, 0}; + size_t buf_size = CHUNK_NX*CHUNK_NY*sizeof(int); + int aggression = 9; /* Compression aggression setting */ + + hsize_t chunk_nbytes; /* Chunk size */ + + TESTING("invalid parameters for H5Dwrite_chunk/H5Dread_chunk"); + + /* + * Create the data space with unlimited dimensions. + */ + if((dataspace = H5Screate_simple(RANK, dims, NULL)) < 0) + goto error; + + if((mem_space = H5Screate_simple(RANK, chunk_dims, NULL)) < 0) + goto error; + + /* + * Modify dataset creation properties + */ + if((cparms = H5Pcreate(H5P_DATASET_CREATE)) < 0) + goto error; + + /* + * Create a new contiguous dataset to verify H5Dwrite_chunk/H5Dread_chunk doesn't work + */ + if((dataset = H5Dcreate2(file, DATASETNAME5, H5T_NATIVE_INT, dataspace, H5P_DEFAULT, + cparms, H5P_DEFAULT)) < 0) + goto error; + + if((dxpl = H5Pcreate(H5P_DATASET_XFER)) < 0) + goto error; + + /* Initialize data for one chunk */ + for(i = n = 0; i < CHUNK_NX; i++) + for(j = 0; j < CHUNK_NY; j++) { + direct_buf[i][j] = n++; + } + + /* Try to write the chunk data to contiguous dataset. It should fail */ + offset[0] = CHUNK_NX; + offset[1] = CHUNK_NY; + + H5E_BEGIN_TRY { + if((status = H5Dwrite_chunk(dataset, dxpl, filter_mask, offset, buf_size, direct_buf)) != FAIL) + goto error; + } H5E_END_TRY; + + /* Try to get chunk size for a contiguous dataset. It should fail */ + H5E_BEGIN_TRY { + if((status = H5Dget_chunk_storage_size(dataset, offset, &chunk_nbytes)) != FAIL) + goto error; + } H5E_END_TRY; + + /* Try to H5Dread_chunk from the contiguous dataset. It should fail */ + H5E_BEGIN_TRY { + if((status = H5Dread_chunk(dataset, dxpl, offset, &filter_mask, direct_buf)) != FAIL) + goto error; + } H5E_END_TRY; + + if(H5Dclose(dataset) < 0) + goto error; + + + /* Create a chunked dataset with compression filter */ + if((status = H5Pset_chunk( cparms, RANK, chunk_dims)) < 0) + goto error; + + if((status = H5Pset_deflate( cparms, (unsigned ) aggression)) < 0) + goto error; + + /* + * Create a new dataset within the file using cparms + * creation properties. + */ + if((dataset = H5Dcreate2(file, DATASETNAME6, H5T_NATIVE_INT, dataspace, H5P_DEFAULT, + cparms, H5P_DEFAULT)) < 0) + goto error; + + /* Check invalid dataset ID for H5Dwrite_chunk and H5Dread_chunk */ + H5E_BEGIN_TRY { + if((status = H5Dwrite_chunk((hid_t)-1, dxpl, filter_mask, offset, buf_size, direct_buf)) != FAIL) + goto error; + } H5E_END_TRY; + + H5E_BEGIN_TRY { + if((status = H5Dread_chunk((hid_t)-1, dxpl, offset, &filter_mask, direct_buf)) != FAIL) + goto error; + } H5E_END_TRY; + + /* Check invalid DXPL ID for H5Dwrite_chunk and H5Dread_chunk */ + H5E_BEGIN_TRY { + if((status = H5Dwrite_chunk(dataset, (hid_t)-1, filter_mask, offset, buf_size, direct_buf)) != FAIL) + goto error; + } H5E_END_TRY; + + H5E_BEGIN_TRY { + if((status = H5Dread_chunk(dataset, (hid_t)-1, offset, &filter_mask, direct_buf)) != FAIL) + goto error; + } H5E_END_TRY; + + /* Check invalid OFFSET for H5Dwrite_chunk and H5Dread_chunk */ + H5E_BEGIN_TRY { + if((status = H5Dwrite_chunk(dataset, dxpl, filter_mask, NULL, buf_size, direct_buf)) != FAIL) + goto error; + } H5E_END_TRY; + + H5E_BEGIN_TRY { + if((status = H5Dread_chunk(dataset, dxpl, NULL, &filter_mask, direct_buf)) != FAIL) + goto error; + } H5E_END_TRY; + + /* Check when OFFSET is out of dataset range for H5Dwrite_chunk and H5Dread_chunk */ + offset[0] = NX + 1; + offset[1] = NY; + H5E_BEGIN_TRY { + if((status = H5Dwrite_chunk(dataset, dxpl, filter_mask, offset, buf_size, direct_buf)) != FAIL) + goto error; + } H5E_END_TRY; + + H5E_BEGIN_TRY { + if((status = H5Dread_chunk(dataset, dxpl, offset, &filter_mask, direct_buf)) != FAIL) + goto error; + } H5E_END_TRY; + + /* Check when OFFSET is not on chunk boundary for H5Dwrite_chunk and H5Dread_chunk */ + offset[0] = CHUNK_NX; + offset[1] = CHUNK_NY + 1; + H5E_BEGIN_TRY { + if((status = H5Dwrite_chunk(dataset, dxpl, filter_mask, offset, buf_size, direct_buf)) != FAIL) + goto error; + } H5E_END_TRY; + + H5E_BEGIN_TRY { + if((status = H5Dread_chunk(dataset, dxpl, offset, &filter_mask, direct_buf)) != FAIL) + goto error; + } H5E_END_TRY; + + /* Check invalid buffer size for H5Dwrite_chunk only */ + offset[0] = CHUNK_NX; + offset[1] = CHUNK_NY; + buf_size = 0; + H5E_BEGIN_TRY { + if((status = H5Dwrite_chunk(dataset, dxpl, filter_mask, offset, buf_size, direct_buf)) != FAIL) + goto error; + } H5E_END_TRY; + + /* Check invalid data buffer for H5Dwrite_chunk and H5Dread_chunk */ + buf_size = CHUNK_NX*CHUNK_NY*sizeof(int); + H5E_BEGIN_TRY { + if((status = H5Dwrite_chunk(dataset, dxpl, filter_mask, offset, buf_size, NULL)) != FAIL) + goto error; + } H5E_END_TRY; + + H5E_BEGIN_TRY { + if((status = H5Dread_chunk(dataset, dxpl, offset, &filter_mask, NULL)) != FAIL) + goto error; + } H5E_END_TRY; + + if(H5Dclose(dataset) < 0) + goto error; + + /* + * Close/release resources. + */ + H5Sclose(mem_space); + H5Sclose(dataspace); + H5Pclose(cparms); + H5Pclose(dxpl); + + PASSED(); + return 0; + +error: + H5E_BEGIN_TRY { + H5Dclose(dataset); + H5Sclose(mem_space); + H5Sclose(dataspace); + H5Pclose(cparms); + H5Pclose(dxpl); + } H5E_END_TRY; + + H5_FAILED(); + return 1; +} /* test_invalid_parameters() */ + +/*------------------------------------------------------------------------- + * Function: test_direct_chunk_read_no_cache + * + * Purpose: Test the basic functionality of H5Dread_chunk with the + * chunk cache diabled. + * + * Return: Success: 0 + * Failure: 1 + * + * Programmer: Matthew Strong (GE Healthcare) + * 14 February 2016 + * + *------------------------------------------------------------------------- + */ +#ifdef H5_HAVE_FILTER_DEFLATE +static int +test_direct_chunk_read_no_cache (hid_t file) +{ + hid_t dataspace = -1, dataset = -1; + hid_t mem_space = -1; + hid_t cparms = -1, dxpl = -1, dapl = -1; + hsize_t dims[2] = {NX, NY}; + hsize_t maxdims[2] = {H5S_UNLIMITED, H5S_UNLIMITED}; + hsize_t chunk_dims[2] = {CHUNK_NX, CHUNK_NY}; + herr_t status; /* status from H5 function calls */ + int ret; /* deflate return status */ + int data[NX][NY]; + int i, j, k, l, n; /* local index variables */ + + unsigned filter_mask = 0; /* filter mask returned from H5Dread_chunk */ + int direct_buf[CHUNK_NX][CHUNK_NY]; /* chunk read with H5Dread and manually decompressed */ + int check_chunk[CHUNK_NX][CHUNK_NY]; /* chunk read with H5Dread */ + hsize_t offset[2]; /* chunk offset used for H5Dread_chunk */ + size_t buf_size = CHUNK_NX*CHUNK_NY*sizeof(int); + + Bytef *z_src = NULL; /* source buffer */ + uLongf z_src_nbytes = (uLongf)DEFLATE_SIZE_ADJUST(buf_size); + Bytef *z_dst = (Bytef*)(direct_buf); + uLong z_dst_nbytes = (uLong)buf_size; + int aggression = 9; /* Compression aggression setting */ + void *outbuf = NULL; /* Pointer to new buffer */ + + hsize_t start[2]; /* Start of hyperslab */ + hsize_t stride[2]; /* Stride of hyperslab */ + hsize_t count[2]; /* Block count */ + hsize_t block[2]; /* Block sizes */ + + TESTING("basic functionality of H5Dread_chunk (chunk cache disabled)"); + + /* Create the data space with unlimited dimensions. */ + if((dataspace = H5Screate_simple(RANK, dims, maxdims)) < 0) + goto error; + if((mem_space = H5Screate_simple(RANK, chunk_dims, NULL)) < 0) + goto error; + + /* Modify dataset creation properties, i.e. enable chunking and compression */ + if((cparms = H5Pcreate(H5P_DATASET_CREATE)) < 0) + goto error; + if((status = H5Pset_chunk( cparms, RANK, chunk_dims)) < 0) + goto error; + if((status = H5Pset_deflate( cparms, (unsigned) aggression)) < 0) + goto error; + if((dapl = H5Pcreate(H5P_DATASET_ACCESS)) < 0) + goto error; + + /* Disable chunk cache by setting number of slots to 0 */ + if((status = H5Pset_chunk_cache(dapl, 0, H5D_CHUNK_CACHE_NBYTES_DEFAULT, H5D_CHUNK_CACHE_W0_DEFAULT)) < 0) + goto error; + + /* Create a new dataset within the file using cparms creation properties. */ + if((dataset = H5Dcreate2(file, DATASETNAME8, H5T_NATIVE_INT, dataspace, H5P_DEFAULT, + cparms, dapl)) < 0) + goto error; + + /* Initialize the dataset */ + for(i = n = 0; i < NX; i++) + for(j = 0; j < NY; j++) + data[i][j] = n++; + + if((dxpl = H5Pcreate(H5P_DATASET_XFER)) < 0) + goto error; + + /* Write the data for the dataset. + * Data will skip chunk cache and go directly to disk. */ + if((status = H5Dwrite(dataset, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, + dxpl, data)) < 0) + goto error; + + /* Allocate output (compressed) buffer */ + outbuf = HDmalloc(z_src_nbytes); + z_src = (Bytef *)outbuf; + + /* For each chunk in the dataset, compare the result of H5Dread and H5Dread_chunk. */ + for(i=0; i<NX/CHUNK_NX; i++) { + for(j=0; j<NY/CHUNK_NY; j++) { + /* Select hyperslab for one chunk in the file */ + start[0] = (hsize_t)i * CHUNK_NX; start[1] = (hsize_t)j * CHUNK_NY; + stride[0] = 1; stride[1] = 1; + count[0] = 1; count[1] = 1; + block[0] = CHUNK_NX; block[1] = CHUNK_NY; + + /* Hyperslab selection equals single chunk */ + if((status = H5Sselect_hyperslab(dataspace, H5S_SELECT_SET, start, stride, count, block)) < 0) + goto error; + + /* Read the chunk back */ + if((status = H5Dread(dataset, H5T_NATIVE_INT, mem_space, dataspace, H5P_DEFAULT, check_chunk)) < 0) + goto error; + + offset[0] = (hsize_t)i * CHUNK_NX; offset[1] = (hsize_t)j * CHUNK_NY; + /* Read the compressed chunk back using the direct read function. */ + if((status = H5Dread_chunk(dataset, dxpl, offset, &filter_mask, outbuf)) < 0) + goto error; + + /* Check filter mask return value */ + if(filter_mask != 0) + goto error; + + /* Perform decompression from the source to the destination buffer */ + ret = uncompress(z_dst, &z_dst_nbytes, z_src, z_src_nbytes); + + /* Check for various zlib errors */ + if(Z_BUF_ERROR == ret) { + HDfprintf(stderr, "overflow\n"); + goto error; + } else if(Z_MEM_ERROR == ret) { + HDfprintf(stderr, "deflate memory error\n"); + goto error; + } else if(Z_DATA_ERROR == ret) { + HDfprintf(stderr, "corrupted data\n"); + goto error; + } else if(Z_OK != ret) { + HDfprintf(stderr, "other deflate error\n"); + goto error; + } + + /* Check that the decompressed values match those read from H5Dread */ + for(k = 0; k < CHUNK_NX; k++) { + for(l = 0; l < CHUNK_NY; l++) { + if(direct_buf[k][l] != check_chunk[k][l]) { + HDprintf("\n 1. Read different values than written."); + HDprintf(" At index %d,%d\n", k, l); + HDprintf(" direct_buf=%d, check_chunk=%d\n", direct_buf[k][l], check_chunk[k][l]); + goto error; + } + } + } + } + } + + /* Close/release resources. */ + H5Dclose(dataset); + H5Sclose(mem_space); + H5Sclose(dataspace); + H5Pclose(cparms); + H5Pclose(dxpl); + H5Pclose(dapl); + + if(outbuf) + HDfree(outbuf); + + PASSED(); + return 0; + +error: + H5E_BEGIN_TRY { + H5Dclose(dataset); + H5Sclose(mem_space); + H5Sclose(dataspace); + H5Pclose(cparms); + H5Pclose(dxpl); + H5Pclose(dapl); + } H5E_END_TRY; + + if(outbuf) + HDfree(outbuf); + + H5_FAILED(); + return 1; +} /* test_direct_chunk_read_no_cache() */ +#endif /* H5_HAVE_FILTER_DEFLATE */ + +#ifdef H5_HAVE_FILTER_DEFLATE +static int +test_direct_chunk_read_cache (hid_t file, hbool_t flush) +{ + hid_t dataspace = -1, dataset = -1; + hid_t mem_space = -1; + hid_t cparms = -1, dxpl = -1; + hsize_t dims[2] = {NX, NY}; + hsize_t maxdims[2] = {H5S_UNLIMITED, H5S_UNLIMITED}; + hsize_t chunk_dims[2] = {CHUNK_NX, CHUNK_NY}; + herr_t status; /* status from H5 function calls */ + int ret; /* deflate return status */ + int data[NX][NY]; + int i, j, k, l, n; /* local index variables */ + + unsigned filter_mask = 0; /* filter mask returned from H5Dread_chunk */ + int direct_buf[CHUNK_NX][CHUNK_NY]; /* chunk read with H5Dread and manually decompressed */ + int check_chunk[CHUNK_NX][CHUNK_NY]; /* chunk read with H5Dread */ + hsize_t offset[2]; /* chunk offset used for H5Dread_chunk */ + size_t buf_size = CHUNK_NX*CHUNK_NY*sizeof(int); + + Bytef *z_src = NULL; /* source buffer */ + uLongf z_src_nbytes = (uLongf)DEFLATE_SIZE_ADJUST(buf_size); + Bytef *z_dst = (Bytef*)(direct_buf); + uLong z_dst_nbytes = (uLong)buf_size; + int aggression = 9; /* Compression aggression setting */ + void *outbuf = NULL; /* Pointer to new buffer */ + hsize_t read_buf_size = 0; + + hsize_t start[2]; /* Start of hyperslab */ + hsize_t stride[2]; /* Stride of hyperslab */ + hsize_t count[2]; /* Block count */ + hsize_t block[2]; /* Block sizes */ + + if(flush) { + TESTING("basic functionality of H5Dread_chunk (flush chunk cache)"); + } else { + TESTING("basic functionality of H5Dread_chunk (does not flush chunk cache)"); + } + + /* Create the data space with unlimited dimensions. */ + if((dataspace = H5Screate_simple(RANK, dims, maxdims)) < 0) + goto error; + if((mem_space = H5Screate_simple(RANK, chunk_dims, NULL)) < 0) + goto error; + + /* Modify dataset creation properties, i.e. enable chunking and compression */ + if((cparms = H5Pcreate(H5P_DATASET_CREATE)) < 0) + goto error; + if((status = H5Pset_chunk( cparms, RANK, chunk_dims)) < 0) + goto error; + if((status = H5Pset_deflate( cparms, (unsigned) aggression)) < 0) + goto error; + + /* Create a new dataset within the file using cparms creation properties. */ + if((dataset = H5Dcreate2(file, flush?DATASETNAME9:DATASETNAME10, H5T_NATIVE_INT, dataspace, H5P_DEFAULT, + cparms, H5P_DEFAULT)) < 0) + goto error; + + /* Initialize the dataset */ + for(i = n = 0; i < NX; i++) + for(j = 0; j < NY; j++) + data[i][j] = n++; + + if((dxpl = H5Pcreate(H5P_DATASET_XFER)) < 0) + goto error; + + /* Write the data for the dataset. + * It should stay in the chunk cache. */ + if((status = H5Dwrite(dataset, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, + dxpl, data)) < 0) + goto error; + + if(flush) { + /* Flush the chunk cache to disk. Cache entry is not evicted. */ + if(H5Fflush(dataset, H5F_SCOPE_LOCAL) < 0) + goto error; + } + + /* Allocate output (compressed) buffer */ + outbuf = HDmalloc(z_src_nbytes); + z_src = (Bytef *)outbuf; + + /* For each chunk in the dataset, compare the result of H5Dread and H5Dread_chunk. */ + for(i=0; i<NX/CHUNK_NX; i++) { + for(j=0; j<NY/CHUNK_NY; j++) { + /* Select hyperslab for one chunk in the file */ + start[0] = (hsize_t)i * CHUNK_NX; start[1] = (hsize_t)j * CHUNK_NY; + stride[0] = 1; stride[1] = 1; + count[0] = 1; count[1] = 1; + block[0] = CHUNK_NX; block[1] = CHUNK_NY; + + /* Hyperslab selection equals single chunk */ + if((status = H5Sselect_hyperslab(dataspace, H5S_SELECT_SET, start, stride, count, block)) < 0) + goto error; + + /* Read the chunk back */ + if((status = H5Dread(dataset, H5T_NATIVE_INT, mem_space, dataspace, H5P_DEFAULT, check_chunk)) < 0) + goto error; + + offset[0] = (hsize_t)i * CHUNK_NX; offset[1] = (hsize_t)j * CHUNK_NY; + + /* Query chunk storage size */ + if((status = H5Dget_chunk_storage_size(dataset, offset, &read_buf_size)) < 0) + goto error; + if(read_buf_size == 0) + goto error; + + /* Read the compressed chunk back using the direct read function. */ + if((status = H5Dread_chunk(dataset, dxpl, offset, &filter_mask, outbuf)) < 0) + goto error; + + /* Check filter mask return value */ + if(filter_mask != 0) + goto error; + + /* Perform decompression from the source to the destination buffer */ + ret = uncompress(z_dst, &z_dst_nbytes, z_src, z_src_nbytes); + + /* Check for various zlib errors */ + if(Z_BUF_ERROR == ret) { + HDfprintf(stderr, "overflow\n"); + goto error; + } else if(Z_MEM_ERROR == ret) { + HDfprintf(stderr, "deflate memory error\n"); + goto error; + } else if(Z_DATA_ERROR == ret) { + HDfprintf(stderr, "corrupted data\n"); + goto error; + } else if(Z_OK != ret) { + HDfprintf(stderr, "other deflate error\n"); + goto error; + } + + /* Check that the decompressed values match those read from H5Dread */ + for(k = 0; k < CHUNK_NX; k++) { + for(l = 0; l < CHUNK_NY; l++) { + if(direct_buf[k][l] != check_chunk[k][l]) { + HDprintf("\n 1. Read different values than written."); + HDprintf(" At index %d,%d\n", k, l); + HDprintf(" direct_buf=%d, check_chunk=%d\n", direct_buf[k][l], check_chunk[k][l]); + goto error; + } + } + } + } + } + + /* Close/release resources. */ + H5Dclose(dataset); + H5Sclose(mem_space); + H5Sclose(dataspace); + H5Pclose(cparms); + H5Pclose(dxpl); + + if(outbuf) + HDfree(outbuf); + + PASSED(); + return 0; + +error: + H5E_BEGIN_TRY { + H5Dclose(dataset); + H5Sclose(mem_space); + H5Sclose(dataspace); + H5Pclose(cparms); + H5Pclose(dxpl); + } H5E_END_TRY; + + if(outbuf) + HDfree(outbuf); + + H5_FAILED(); + return 1; +} /* test_direct_chunk_read_cache() */ +#endif /* H5_HAVE_FILTER_DEFLATE */ + +/*------------------------------------------------------------------------- + * Function: test_read_unfiltered_dset + * + * Purpose: Test the basic functionality of H5Dread_chunk on a dataset + * without no filters applied. + * + * Return: Success: 0 + * Failure: 1 + * + * Programmer: Matthew Strong (GE Healthcare) + * 30 November 2016 + * + *------------------------------------------------------------------------- + */ +static int +test_read_unfiltered_dset(hid_t file) +{ + hid_t dataspace = -1, dataset = -1; + hid_t mem_space = -1; + hid_t cparms = -1, dxpl = -1; + hsize_t dims[2] = {NX, NY}; + hsize_t maxdims[2] = {H5S_UNLIMITED, H5S_UNLIMITED}; + hsize_t chunk_dims[2] ={CHUNK_NX, CHUNK_NY}; + herr_t status; + int data[NX][NY]; + int i, j, k, l, n; + + unsigned filter_mask = 0; + int direct_buf[CHUNK_NX][CHUNK_NY]; + int check_chunk[CHUNK_NX][CHUNK_NY]; /* chunk read with H5Dread */ + hsize_t offset[2] = {0, 0}; + size_t buf_size = CHUNK_NX*CHUNK_NY*sizeof(int); + hsize_t read_buf_size = 0; + + hsize_t start[2]; /* Start of hyperslab */ + hsize_t stride[2]; /* Stride of hyperslab */ + hsize_t count[2]; /* Block count */ + hsize_t block[2]; /* Block sizes */ + + TESTING("basic functionality of H5Dread_chunk on unfiltered datasets"); + + /* Create the data space with unlimited dimensions. */ + if((dataspace = H5Screate_simple(RANK, dims, maxdims)) < 0) + goto error; + if((mem_space = H5Screate_simple(RANK, chunk_dims, NULL)) < 0) + goto error; + + /* Modify dataset creation properties, i.e. enable chunking, no compression */ + if((cparms = H5Pcreate(H5P_DATASET_CREATE)) < 0) + goto error; + if((status = H5Pset_chunk( cparms, RANK, chunk_dims)) < 0) + goto error; + + /* Create a new dataset within the file using cparms creation properties. */ + if((dataset = H5Dcreate2(file, DATASETNAME12, H5T_NATIVE_INT, dataspace, H5P_DEFAULT, + cparms, H5P_DEFAULT)) < 0) + goto error; + + /* Initialize the dataset */ + for(i = n = 0; i < NX; i++) + for(j = 0; j < NY; j++) + data[i][j] = n++; + + if((dxpl = H5Pcreate(H5P_DATASET_XFER)) < 0) + goto error; + + /* Write the data for the dataset. + * It should stay in the chunk cache and will be evicted/flushed by + * the H5Dread_chunk function call. */ + if((status = H5Dwrite(dataset, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, + dxpl, data)) < 0) + goto error; + + if(H5Fflush(dataset, H5F_SCOPE_LOCAL) < 0) + goto error; + + /* For each chunk in the dataset, compare the result of H5Dread and H5Dread_chunk. */ + for(i=0; i<NX/CHUNK_NX; i++) { + for(j=0; j<NY/CHUNK_NY; j++) { + /* Select hyperslab for one chunk in the file */ + start[0] = (hsize_t)i * CHUNK_NX; start[1] = (hsize_t)j * CHUNK_NY; + stride[0] = 1; stride[1] = 1; + count[0] = 1; count[1] = 1; + block[0] = CHUNK_NX; block[1] = CHUNK_NY; + + /* Hyperslab selection equals single chunk */ + if((status = H5Sselect_hyperslab(dataspace, H5S_SELECT_SET, start, stride, count, block)) < 0) + goto error; + + /* Read the chunk back */ + if((status = H5Dread(dataset, H5T_NATIVE_INT, mem_space, dataspace, H5P_DEFAULT, check_chunk)) < 0) + goto error; + + /* Query chunk storage size */ + if((status = H5Dget_chunk_storage_size(dataset, offset, &read_buf_size)) < 0) + goto error; + + if(read_buf_size != buf_size ) + goto error; + + offset[0] = (hsize_t)i * CHUNK_NX; offset[1] = (hsize_t)j * CHUNK_NY; + /* Read the raw chunk back */ + HDmemset(&direct_buf, 0, sizeof(direct_buf)); + filter_mask = UINT_MAX; + if((status = H5Dread_chunk(dataset, dxpl, offset, &filter_mask, direct_buf)) < 0) + goto error; + + /* Check filter mask return value */ + if(filter_mask != 0) + goto error; + + /* Check that the decompressed values match those read from H5Dread */ + for(k = 0; k < CHUNK_NX; k++) { + for(l = 0; l < CHUNK_NY; l++) { + if(direct_buf[k][l] != check_chunk[k][l]) { + HDprintf("\n 1. Read different values than written."); + HDprintf(" At index %d,%d\n", k, l); + HDprintf(" direct_buf=%d, check_chunk=%d\n", direct_buf[k][l], check_chunk[k][l]); + goto error; + } + } + } + } + } + + /* Close/release resources. */ + H5Dclose(dataset); + H5Sclose(mem_space); + H5Sclose(dataspace); + H5Pclose(cparms); + H5Pclose(dxpl); + + PASSED(); + return 0; + +error: + H5E_BEGIN_TRY { + H5Dclose(dataset); + H5Sclose(mem_space); + H5Sclose(dataspace); + H5Pclose(cparms); + H5Pclose(dxpl); + } H5E_END_TRY; + + H5_FAILED(); + return 1; +} /* test_read_unfiltered_dset() */ + +/*------------------------------------------------------------------------- + * Function: test_read_unallocated_chunk + * + * Purpose: Tests the H5Dread_chunk and H5Dget_chunk_storage_size with valid + * offets to chunks that have not been written to the dataset and are + * not allocated in the chunk storage on disk. + * + * Return: Success: 0 + * Failure: 1 + * + * Programmer: Matthew Strong (GE Healthcare) + * 30 November 2016 + * + *------------------------------------------------------------------------- + */ +static int +test_read_unallocated_chunk (hid_t file) +{ + hid_t dataspace = -1, dataset = -1; + hid_t mem_space = -1; + hid_t cparms = -1, dxpl = -1; + hsize_t dims[2] = {NX, NY}; + hsize_t maxdims[2] = {H5S_UNLIMITED, H5S_UNLIMITED}; + hsize_t chunk_dims[2] = {CHUNK_NX, CHUNK_NY}; + hsize_t chunk_nbytes = CHUNK_NX*CHUNK_NY*sizeof(int); + hsize_t direct_chunk_nbytes = 0; /* size (bytes) of the on-disk chunk */ + herr_t status; /* status from H5 function calls */ + hsize_t i, j; /* local index variables */ + + unsigned filter_mask = 0; /* filter mask returned from H5Dread_chunk */ + int direct_buf[CHUNK_NX][CHUNK_NY]; /* chunk read with H5Dread and manually decompressed */ + hsize_t offset[2]; /* chunk offset used for H5Dread_chunk */ + + TESTING("H5Dread_chunk with unallocated chunks"); + + /* Create the data space with unlimited dimensions. */ + if((dataspace = H5Screate_simple(RANK, dims, maxdims)) < 0) + goto error; + if((mem_space = H5Screate_simple(RANK, chunk_dims, NULL)) < 0) + goto error; + + /* Modify dataset creation properties, i.e. enable chunking, no compression */ + if((cparms = H5Pcreate(H5P_DATASET_CREATE)) < 0) + goto error; + if((status = H5Pset_chunk( cparms, RANK, chunk_dims)) < 0) + goto error; + + /* Create a new dataset within the file using cparms creation properties. */ + if((dataset = H5Dcreate2(file, DATASETNAME11, H5T_NATIVE_INT, dataspace, H5P_DEFAULT, + cparms, H5P_DEFAULT)) < 0) + goto error; + + if((dxpl = H5Pcreate(H5P_DATASET_XFER)) < 0) + goto error; + + /* Write a single chunk to intialize the chunk storage */ + HDmemset(&chunk_dims, 0, sizeof(chunk_dims)); + offset[0] = 0; offset[1] = 0; + + if(H5Dwrite_chunk(dataset, dxpl, filter_mask, offset, chunk_nbytes, &chunk_dims) < 0) + goto error; + + /* Attempt to read each chunk in the dataset. Chunks are not allocated, + * therefore we expect the result of H5Dread_chunk to fail. Chunk idx starts + * at 1, since one chunk was written to init the chunk storage. */ + for(i=1; i<NX/CHUNK_NX; i++) { + for(j=0; j<NY/CHUNK_NY; j++) { + + offset[0] = i * CHUNK_NX; + offset[1] = j * CHUNK_NY; + + /* Read a non-existant chunk using the direct read function. */ + H5E_BEGIN_TRY { + status = H5Dread_chunk(dataset, dxpl, offset, &filter_mask, &direct_buf); + } H5E_END_TRY; + + /* Check that the chunk read call does not succeed. */ + if(status != -1) + goto error; + + /* Query the size of the non-existant chunk */ + direct_chunk_nbytes = ULONG_MAX; + H5E_BEGIN_TRY { + status = H5Dget_chunk_storage_size(dataset, offset, &direct_chunk_nbytes); + } H5E_END_TRY; + + /* Check that the chunk storage size call does not succeed. */ + if(status != -1 ) + goto error; + if(direct_chunk_nbytes != 0 ) + goto error; + + } + } + + /* Close/release resources. */ + H5Dclose(dataset); + H5Sclose(mem_space); + H5Sclose(dataspace); + H5Pclose(cparms); + H5Pclose(dxpl); + + PASSED(); + return 0; + +error: + H5E_BEGIN_TRY { + H5Dclose(dataset); + H5Sclose(mem_space); + H5Sclose(dataspace); + H5Pclose(cparms); + H5Pclose(dxpl); + } H5E_END_TRY; + + H5_FAILED(); + return 1; +} /* test_read_unallocated_chunk() */ + +/*------------------------------------------------------------------------- + * Function: test_single_chunk_latest + * + * Purpose: This is to verify the fix for jira issue HDFFV-10425. + * The problem was due to a bug in the internal ilbrary routine + * H5D__chunk_direct_write() which passed a null dataset + * pointer to the insert callback for the chunk index type. + * Currently, the single chunk index is the only one that + * used the dataset pointer in the insert callback. + * + * This routine is based on the test program attached to + * this jira issue: + * Create a file with the latest format and a chunked dataset + * with one single chunk. The library will use single chunk + * index for the dataset. + * Verify that the data read is the same as the written data. + * + * Return: Success: 0 + * Failure: 1 + * + *------------------------------------------------------------------------- + */ +static int +test_single_chunk_latest(void) +{ + hid_t fid; /* File ID */ + hid_t fapl; /* File access property list ID */ + hid_t sid; /* Dataspace ID */ + hid_t did; /* Dataset ID */ + hid_t dcpl; /* Dataset creation property list */ + hsize_t dims[2] = {DIM0, DIM1}; /* Dimension sizes */ + hsize_t chunk[2] = {CHUNK0, CHUNK1}; /* Chunk dimension sizes */ + hsize_t offset[2] = {0,0}; /* Offset for writing */ + int wdata[DIM0][DIM1]; /* Write buffer */ + int rdata[DIM0][DIM1]; /* Read buffer */ + int i, j; /* Local index variable */ + + TESTING("H5Dwrite_chunk with single chunk and latest format"); + + /* Initialize data */ + for (i=0; i<DIM0; i++) { + for (j=0; j< DIM1; j++) + wdata[i][j] = j/CHUNK0; + } + + /* Create a new file with the latest format */ + if((fapl = H5Pcreate(H5P_FILE_ACCESS)) < 0) + goto error; + if(H5Pset_libver_bounds(fapl, H5F_LIBVER_LATEST, H5F_LIBVER_LATEST) < 0) + goto error; + if((fid = H5Fcreate(FILE, H5F_ACC_TRUNC, H5P_DEFAULT, fapl)) < 0) + goto error; + + /* Create dataspace */ + if((sid = H5Screate_simple(2, dims, NULL)) < 0) + goto error; + + /* Create the dataset creation property list and set the chunk size */ + if((dcpl = H5Pcreate(H5P_DATASET_CREATE)) < 0) + goto error; + if(H5Pset_chunk(dcpl, 2, chunk) < 0) + goto error; + + /* Create the dataset */ + if((did = H5Dcreate2(fid, DATASET, H5T_NATIVE_INT, sid, H5P_DEFAULT, dcpl, H5P_DEFAULT)) < 0) + goto error; + + /* Write the data directly to the dataset */ + if(H5Dwrite_chunk(did, H5P_DEFAULT, 0, offset, CHUNK0*CHUNK1*4, (void *)wdata) < 0) + goto error; + + /* + * Close and release resources. + */ + if(H5Pclose(dcpl) < 0) + goto error; + if(H5Dclose(did) < 0) + goto error; + if(H5Sclose(sid) < 0) + goto error; + if(H5Pclose(fapl) < 0) + goto error; + if(H5Fclose(fid) < 0) + goto error; + + /* Open the file and dataset with default properties */ + if((fid = H5Fopen(FILE, H5F_ACC_RDONLY, H5P_DEFAULT)) < 0) + goto error; + if((did = H5Dopen2(fid, DATASET, H5P_DEFAULT)) < 0) + goto error; + + /* Retrieve dataset creation property list */ + if((dcpl = H5Dget_create_plist(did)) < 0) + goto error; + + /* Read the data */ + if(H5Dread(did, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, rdata) < 0) + goto error; + + /* Verify that the data read was correct. */ + for (i = 0; i < DIM0; i++) { + for (j = 0; j < DIM1; j++) { + if(rdata[i][j] != wdata[i][j]) + goto error; + } + } + + /* + * Close and release resources + */ + if(H5Pclose(dcpl) < 0) + goto error; + if(H5Dclose(did) < 0) + goto error; + if(H5Fclose(fid) < 0) + goto error; + + PASSED(); + return 0; + +error: + H5E_BEGIN_TRY { + H5Dclose(did); + H5Sclose(sid); + H5Pclose(dcpl); + H5Pclose(fapl); + H5Fclose(fid); + } H5E_END_TRY; + + H5_FAILED(); + return 1; +} /* test_single_chunk_latest() */ + +/*------------------------------------------------------------------------- + * Function: Main function + * + * Purpose: Test direct chunk write function H5Dwrite_chunk and + * chunk direct read function H5Dread_chunk + * + * Return: Success: 0 + * Failure: 1 + * + * Programmer: Raymond Lu + * 30 November 2012 + * + *------------------------------------------------------------------------- + */ +int main( void ) +{ + hid_t file_id; + int nerrors=0; + + /* + * Create a new file. If file exists its contents will be overwritten. + */ + if((file_id = H5Fcreate(FILE_NAME, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT)) < 0) + goto error; + + /* Test direct chunk write and direct chunk read */ +#ifdef H5_HAVE_FILTER_DEFLATE + nerrors += test_direct_chunk_write(file_id); +#endif /* H5_HAVE_FILTER_DEFLATE */ + nerrors += test_direct_chunk_overwrite_data(file_id); + nerrors += test_skip_compress_write1(file_id); + nerrors += test_skip_compress_write2(file_id); + nerrors += test_data_conv(file_id); + nerrors += test_invalid_parameters(file_id); + + /* Test direct chunk read */ +#ifdef H5_HAVE_FILTER_DEFLATE + nerrors += test_direct_chunk_read_no_cache(file_id); + nerrors += test_direct_chunk_read_cache(file_id, TRUE); + nerrors += test_direct_chunk_read_cache(file_id, FALSE); +#endif /* H5_HAVE_FILTER_DEFLATE */ + nerrors += test_read_unfiltered_dset(file_id); + nerrors += test_read_unallocated_chunk(file_id); + + nerrors += test_single_chunk_latest(); + + if(H5Fclose(file_id) < 0) + goto error; + + /* check for errors */ + if (nerrors) + goto error; + + HDputs("All direct chunk read/write tests passed."); + return EXIT_SUCCESS; + +error: + HDputs("*** TESTS FAILED ***"); + return EXIT_FAILURE; +} diff --git a/test/dsets.c b/test/dsets.c index ca1e3d5..d23f438 100644 --- a/test/dsets.c +++ b/test/dsets.c @@ -10719,9 +10719,9 @@ test_earray_hdr_fd(const char *env_h5_driver, hid_t fapl) FAIL_STACK_ERROR; /* The second call triggered a bug in the library (JIRA issue: SWMR-95) */ - if(H5Oget_info_by_name(fid, DSET_EARRAY_HDR_FD, &info, H5P_DEFAULT) < 0) + if(H5Oget_info_by_name2(fid, DSET_EARRAY_HDR_FD, &info, H5O_INFO_BASIC, H5P_DEFAULT) < 0) FAIL_STACK_ERROR; - if(H5Oget_info_by_name(fid, DSET_EARRAY_HDR_FD, &info, H5P_DEFAULT) < 0) + if(H5Oget_info_by_name2(fid, DSET_EARRAY_HDR_FD, &info, H5O_INFO_BASIC, H5P_DEFAULT) < 0) FAIL_STACK_ERROR; if(H5Pclose(fapl) < 0) @@ -10839,9 +10839,9 @@ test_farray_hdr_fd(const char *env_h5_driver, hid_t fapl) FAIL_STACK_ERROR; /* The second call triggered a bug in the library (JIRA issue: SWMR-95) */ - if(H5Oget_info_by_name(fid, DSET_FARRAY_HDR_FD, &info, H5P_DEFAULT) < 0) + if(H5Oget_info_by_name2(fid, DSET_FARRAY_HDR_FD, &info, H5O_INFO_BASIC, H5P_DEFAULT) < 0) FAIL_STACK_ERROR; - if(H5Oget_info_by_name(fid, DSET_FARRAY_HDR_FD, &info, H5P_DEFAULT) < 0) + if(H5Oget_info_by_name2(fid, DSET_FARRAY_HDR_FD, &info, H5O_INFO_BASIC, H5P_DEFAULT) < 0) FAIL_STACK_ERROR; if(H5Pclose(fapl) < 0) @@ -10959,9 +10959,9 @@ test_bt2_hdr_fd(const char *env_h5_driver, hid_t fapl) FAIL_STACK_ERROR; /* The second call triggered a bug in the library (JIRA issue: SWMR-95) */ - if(H5Oget_info_by_name(fid, DSET_BT2_HDR_FD, &info, H5P_DEFAULT) < 0) + if(H5Oget_info_by_name2(fid, DSET_BT2_HDR_FD, &info, H5O_INFO_BASIC, H5P_DEFAULT) < 0) FAIL_STACK_ERROR; - if(H5Oget_info_by_name(fid, DSET_BT2_HDR_FD, &info, H5P_DEFAULT) < 0) + if(H5Oget_info_by_name2(fid, DSET_BT2_HDR_FD, &info, H5O_INFO_BASIC, H5P_DEFAULT) < 0) FAIL_STACK_ERROR; if(H5Pclose(fapl) < 0) @@ -12680,7 +12680,7 @@ dls_01_read_stuff( hid_t fid ) { did = H5Dopen2( fid, DLS_01_DATASET, H5P_DEFAULT ); if ( did <= 0 ) TEST_ERROR - status = H5Oget_info( did, &info ); + status = H5Oget_info2( did, &info, H5O_INFO_BASIC ); if ( status != 0 ) TEST_ERROR status = H5Dclose( did ); diff --git a/test/dtypes.c b/test/dtypes.c index 1a27634..3253d6c 100644 --- a/test/dtypes.c +++ b/test/dtypes.c @@ -5897,7 +5897,7 @@ test_latest(void) FAIL_STACK_ERROR /* Get information about datatype on disk */ - if(H5Oget_info_by_name(file, compnd_type, &oi, H5P_DEFAULT) < 0) + if(H5Oget_info_by_name2(file, compnd_type, &oi, H5O_INFO_HDR, H5P_DEFAULT) < 0) FAIL_STACK_ERROR old_dtype_oh_size = oi.hdr.space.total; @@ -5922,7 +5922,7 @@ test_latest(void) FAIL_STACK_ERROR /* Get information about datatype on disk */ - if(H5Oget_info_by_name(file, compnd_type, &oi, H5P_DEFAULT) < 0) + if(H5Oget_info_by_name2(file, compnd_type, &oi, H5O_INFO_HDR, H5P_DEFAULT) < 0) FAIL_STACK_ERROR /* Check that the object header info is still the same */ @@ -5958,7 +5958,7 @@ test_latest(void) FAIL_STACK_ERROR /* Get information about datatype on disk */ - if(H5Oget_info_by_name(file, compnd_type, &oi, H5P_DEFAULT) < 0) + if(H5Oget_info_by_name2(file, compnd_type, &oi, H5O_INFO_HDR, H5P_DEFAULT) < 0) FAIL_STACK_ERROR new_dtype_oh_size = oi.hdr.space.total; @@ -5987,7 +5987,7 @@ test_latest(void) FAIL_STACK_ERROR /* Get information about datatype on disk */ - if(H5Oget_info_by_name(file, compnd_type, &oi, H5P_DEFAULT) < 0) + if(H5Oget_info_by_name2(file, compnd_type, &oi, H5O_INFO_HDR, H5P_DEFAULT) < 0) FAIL_STACK_ERROR /* Check that the object header info is still the same */ @@ -36,8 +36,8 @@ static char filename[6][1024]; /* Global property lists - just copies of the defaults (necessary to use * internal functions */ -hid_t fcpl_id = -1; -hid_t fapl_id = -1; +hid_t fcpl_id = H5I_INVALID_HID; +hid_t fapl_id = H5I_INVALID_HID; /*------------------------------------------------------------------------- @@ -68,8 +68,9 @@ test_single(void) TESTING("single EFC"); - /* Set EFC size to 3. Do this instead of H5F_efc_create() so we can pass - * a file pointer to H5F__efc_open containing the EFC. */ + /* Set EFC size to 3. Do this instead of H5F__efc_create() so we can pass + * a file pointer to H5F__efc_open containing the EFC. + */ if(H5Pset_elink_file_cache_size(fapl_id, 3) < 0) TEST_ERROR @@ -84,8 +85,9 @@ test_single(void) /* Test 1: Open file 1 through EFC, close, then open normally, verify ref - * count = 2, release EFC, verify ref count = 1. Verifies a file can be - * held open by the EFC. */ + * count = 2, release EFC, verify ref count = 1. Verifies a file can be + * held open by the EFC. + */ if(NULL == (f1 = H5F__efc_open(f0, filename[1], H5F_ACC_RDWR | H5F_ACC_CREAT | H5F_ACC_TRUNC, fcpl_id, fapl_id))) FAIL_STACK_ERROR @@ -502,17 +504,19 @@ test_graph_nocycle(void) TESTING("graph of EFCs without cycles"); - /* Set EFC size to 8. Do this instead of H5F_efc_create() so we can pass - * a file pointer to H5F__efc_open containing the EFC. Set to a high number - * because we don't test the EFC becoming too large in this test. */ + /* Set EFC size to 8. Do this instead of H5F__efc_create() so we can pass + * a file pointer to H5F__efc_open containing the EFC. Set to a high number + * because we don't test the EFC becoming too large in this test. + */ if(H5Pset_elink_file_cache_size(fapl_id, 8) < 0) TEST_ERROR - /* Test 1: Simple 3 file chain. Open file 1 through file 0, then open file - * 2 through file 1. Release file 0's EFC and verify that file 2 gets its - * ref count reduced (implying file 1 was closed). Do the same with the - * opening order reversed. */ + /* Test 1: Simple 3 file chain. Open file 1 through file 0, then open file + * 2 through file 1. Release file 0's EFC and verify that file 2 gets its + * ref count reduced (implying file 1 was closed). Do the same with the + * opening order reversed. + */ if(NULL == (f0 = H5F_open(filename[0], H5F_ACC_RDWR | H5F_ACC_CREAT | H5F_ACC_TRUNC, fcpl_id, fapl_id))) FAIL_STACK_ERROR @@ -847,15 +851,17 @@ test_graph_cycle(void) TESTING("graph of EFCs with cycles"); - /* Set EFC size to 8. Do this instead of H5F_efc_create() so we can pass - * a file pointer to H5F__efc_open containing the EFC. Set to a high number - * because we don't test the EFC becoming too large in this test. */ + /* Set EFC size to 8. Do this instead of H5F__efc_create() so we can pass + * a file pointer to H5F__efc_open containing the EFC. Set to a high number + * because we don't test the EFC becoming too large in this test. + */ if(H5Pset_elink_file_cache_size(fapl_id, 8) < 0) TEST_ERROR - /* Test 1: File caches itself. Verify that closing the file causes it to be - * actually closed, and there is no other unexpected behavior. */ + /* Test 1: File caches itself. Verify that closing the file causes it to be + * actually closed, and there is no other unexpected behavior. + */ if(NULL == (f0 = H5F_open(filename[0], H5F_ACC_RDWR | H5F_ACC_CREAT | H5F_ACC_TRUNC, fcpl_id, fapl_id))) FAIL_STACK_ERROR diff --git a/test/flushrefresh.c b/test/flushrefresh.c index 0775dee..4196d85 100644 --- a/test/flushrefresh.c +++ b/test/flushrefresh.c @@ -848,7 +848,7 @@ herr_t flush_verification(const char * obj_pathname, const char * expected) H5E_BEGIN_TRY { fid = H5Fopen(FILENAME, H5F_ACC_SWMR_READ, H5P_DEFAULT); oid = H5Oopen(fid, obj_pathname, H5P_DEFAULT); - status = H5Oget_info(oid, &oinfo); + status = H5Oget_info2(oid, &oinfo, H5O_INFO_BASIC); } H5E_END_TRY; /* Compare to expected result */ @@ -989,7 +989,7 @@ herr_t refresh_verification(const char * obj_pathname) if((oid = H5Oopen(fid, obj_pathname, H5P_DEFAULT)) < 0) PROCESS_ERROR; /* Get Object info */ - if((status = H5Oget_info(oid, &flushed_oinfo)) < 0) PROCESS_ERROR; + if((status = H5Oget_info2(oid, &flushed_oinfo, H5O_INFO_BASIC|H5O_INFO_NUM_ATTRS|H5O_INFO_HDR)) < 0) PROCESS_ERROR; /* Make sure there are no attributes on the object. This is just a sanity check to ensure we didn't erroneously flush the attribute before @@ -1008,7 +1008,7 @@ herr_t refresh_verification(const char * obj_pathname) /* Get object info again. This will NOT reflect what's on disk, only what's in the cache. Thus, all values will be unchanged from above, despite newer information being on disk. */ - if((status = H5Oget_info(oid, &refreshed_oinfo)) < 0) PROCESS_ERROR; + if((status = H5Oget_info2(oid, &refreshed_oinfo, H5O_INFO_BASIC|H5O_INFO_NUM_ATTRS|H5O_INFO_HDR)) < 0) PROCESS_ERROR; /* Verify that before doing a refresh, getting the object info returns stale information. (i.e., unchanged from above, despite new info on disk). */ @@ -1046,7 +1046,7 @@ herr_t refresh_verification(const char * obj_pathname) } /* end else */ /* Get object info. This should now accurately reflect the refreshed object on disk. */ - if((status = H5Oget_info(oid, &refreshed_oinfo)) < 0) PROCESS_ERROR; + if((status = H5Oget_info2(oid, &refreshed_oinfo, H5O_INFO_BASIC|H5O_INFO_NUM_ATTRS|H5O_INFO_HDR)) < 0) PROCESS_ERROR; /* Confirm following (first 4) attributes are the same: */ /* Confirm following (last 4) attributes are different */ diff --git a/test/genall5.c b/test/genall5.c index e3a9c96..37bab7a 100644 --- a/test/genall5.c +++ b/test/genall5.c @@ -650,7 +650,7 @@ vrfy_ns_grp_c(hid_t fid, const char *group_name, unsigned nlinks) HDassert(H5L_TYPE_HARD == lnk_info.type); memset(&root_oinfo, 0, sizeof(root_oinfo)); - ret = H5Oget_info(fid, &root_oinfo); + ret = H5Oget_info2(fid, &root_oinfo, H5O_INFO_BASIC); if ( ret < 0 ) { @@ -1130,7 +1130,7 @@ vrfy_ns_grp_d(hid_t fid, const char *group_name, unsigned nlinks) HDassert(H5L_TYPE_HARD == lnk_info.type); memset(&root_oinfo, 0, sizeof(root_oinfo)); - ret = H5Oget_info(fid, &root_oinfo); + ret = H5Oget_info2(fid, &root_oinfo, H5O_INFO_BASIC); if ( ret < 0 ) { pass = FALSE; @@ -1825,7 +1825,7 @@ vrfy_os_grp_n(hid_t fid, const char *group_name, int proc_num, unsigned nlinks) HDassert(H5L_TYPE_HARD == lnk_info.type); memset(&root_oinfo, 0, sizeof(root_oinfo)); - ret = H5Oget_info(fid, &root_oinfo); + ret = H5Oget_info2(fid, &root_oinfo, H5O_INFO_BASIC); if ( ret < 0 ) { diff --git a/test/getname.c b/test/getname.c index c3f3c54..873ceb9 100644 --- a/test/getname.c +++ b/test/getname.c @@ -2390,7 +2390,7 @@ test_main(hid_t file_id, hid_t fapl) if((size = H5Iget_name(dtype_anon, NULL,0)) != 0) TEST_ERROR /* Store the address of the datatype for later use */ - if(H5Oget_info(dtype_anon, &oinfo) < 0) TEST_ERROR + if(H5Oget_info2(dtype_anon, &oinfo, H5O_INFO_BASIC) < 0) TEST_ERROR /* Update the reference count to dtype_anon to preserve the datatype */ if(H5Oincr_refcount(dtype_anon) < 0) TEST_ERROR @@ -2937,7 +2937,7 @@ test_elinks(hid_t fapl) /* Query the external link object's name */ *name = '\0'; name_cached = FALSE; - namelen = H5I_get_name_test(group, (char*)name, sizeof(name), &name_cached); + namelen = H5I__get_name_test(group, (char*)name, sizeof(name), &name_cached); if(!((HDstrcmp(name, "/Group2") == 0) && (namelen == 7) && name_cached)) TEST_ERROR @@ -2952,7 +2952,7 @@ test_elinks(hid_t fapl) /* Query the external link to external link object's name */ *name = '\0'; name_cached = FALSE; - namelen = H5I_get_name_test(group, (char*)name, sizeof(name), &name_cached); + namelen = H5I__get_name_test(group, (char*)name, sizeof(name), &name_cached); if(!((HDstrcmp(name, "/Group2") == 0) && (namelen == 7) && name_cached)) TEST_ERROR diff --git a/test/h5test.c b/test/h5test.c index bbdd58b..687f594 100644 --- a/test/h5test.c +++ b/test/h5test.c @@ -1694,8 +1694,8 @@ h5_verify_cached_stabs(const char *base_name[], hid_t fapl) continue; } /* end if */ - if(H5Ovisit(file, H5_INDEX_NAME, H5_ITER_NATIVE, - h5_verify_cached_stabs_cb, NULL) < 0) + if(H5Ovisit2(file, H5_INDEX_NAME, H5_ITER_NATIVE, + h5_verify_cached_stabs_cb, NULL, H5O_INFO_BASIC) < 0) goto error; if(H5Fclose(file) < 0) diff --git a/test/links.c b/test/links.c index 4e88af5..fb2c75a 100644 --- a/test/links.c +++ b/test/links.c @@ -541,8 +541,8 @@ cklinks(hid_t fapl, hbool_t new_format) if((file = H5Fopen(filename, H5F_ACC_RDONLY, fapl)) < 0) FAIL_STACK_ERROR /* Hard link */ - if(H5Oget_info_by_name(file, "d1", &oinfo1, H5P_DEFAULT) < 0) FAIL_STACK_ERROR - if(H5Oget_info_by_name(file, "grp1/hard", &oinfo2, H5P_DEFAULT) < 0) FAIL_STACK_ERROR + if(H5Oget_info_by_name2(file, "d1", &oinfo1, H5O_INFO_BASIC, H5P_DEFAULT) < 0) FAIL_STACK_ERROR + if(H5Oget_info_by_name2(file, "grp1/hard", &oinfo2, H5O_INFO_BASIC, H5P_DEFAULT) < 0) FAIL_STACK_ERROR if(H5O_TYPE_DATASET != oinfo2.type) { H5_FAILED(); printf(" %d: Unexpected object type should have been a dataset\n", __LINE__); @@ -577,7 +577,7 @@ cklinks(hid_t fapl, hbool_t new_format) } /* end if */ /* Symbolic link */ - if(H5Oget_info_by_name(file, "grp1/soft", &oinfo2, H5P_DEFAULT) < 0) FAIL_STACK_ERROR + if(H5Oget_info_by_name2(file, "grp1/soft", &oinfo2, H5O_INFO_BASIC, H5P_DEFAULT) < 0) FAIL_STACK_ERROR if(H5O_TYPE_DATASET != oinfo2.type) { H5_FAILED(); printf(" %d: Unexpected object type should have been a dataset\n", __LINE__); @@ -599,7 +599,7 @@ cklinks(hid_t fapl, hbool_t new_format) /* Dangling link */ H5E_BEGIN_TRY { - status = H5Oget_info_by_name(file, "grp1/dangle", &oinfo2, H5P_DEFAULT); + status = H5Oget_info_by_name2(file, "grp1/dangle", &oinfo2, H5O_INFO_BASIC, H5P_DEFAULT); } H5E_END_TRY; if(status >= 0) { H5_FAILED(); @@ -626,7 +626,7 @@ cklinks(hid_t fapl, hbool_t new_format) /* Recursive link */ H5E_BEGIN_TRY { - status = H5Oget_info_by_name(file, "grp1/recursive", &oinfo2, H5P_DEFAULT); + status = H5Oget_info_by_name2(file, "grp1/recursive", &oinfo2, H5O_INFO_BASIC, H5P_DEFAULT); } H5E_END_TRY; if(status >= 0) { H5_FAILED(); @@ -696,11 +696,11 @@ ck_new_links(hid_t fapl, hbool_t new_format) if((file = H5Fopen(filename, H5F_ACC_RDONLY, fapl)) < 0) TEST_ERROR /* Get hard link info */ - if(H5Oget_info_by_name(file, "/grp1/dataset2", &oi_dset, H5P_DEFAULT) < 0) + if(H5Oget_info_by_name2(file, "/grp1/dataset2", &oi_dset, H5O_INFO_BASIC, H5P_DEFAULT) < 0) TEST_ERROR - if(H5Oget_info_by_name(file, "/grp1/hard1", &oi_hard1, H5P_DEFAULT) < 0) + if(H5Oget_info_by_name2(file, "/grp1/hard1", &oi_hard1, H5O_INFO_BASIC, H5P_DEFAULT) < 0) TEST_ERROR - if(H5Oget_info_by_name(file, "/grp2/hard2", &oi_hard2, H5P_DEFAULT) < 0) + if(H5Oget_info_by_name2(file, "/grp2/hard2", &oi_hard2, H5O_INFO_BASIC, H5P_DEFAULT) < 0) TEST_ERROR /* Check hard links */ @@ -1504,7 +1504,7 @@ test_move_preserves(hid_t fapl_id, hbool_t new_format) /* Get the group's link's information */ if(H5Lget_info(file_id, "group", &linfo, H5P_DEFAULT) < 0) TEST_ERROR - if(H5Oget_info_by_name(file_id, "group", &oinfo, H5P_DEFAULT) < 0) TEST_ERROR + if(H5Oget_info_by_name2(file_id, "group", &oinfo, H5O_INFO_TIME, H5P_DEFAULT) < 0) TEST_ERROR old_cset = linfo.cset; if(old_cset != H5T_CSET_UTF8) TEST_ERROR if(linfo.corder_valid != TRUE) TEST_ERROR @@ -1523,7 +1523,7 @@ test_move_preserves(hid_t fapl_id, hbool_t new_format) /* Get the link's character set & modification time . They should be unchanged */ if(H5Lget_info(file_id, "group", &linfo, H5P_DEFAULT) < 0) TEST_ERROR - if(H5Oget_info_by_name(file_id, "group", &oinfo, H5P_DEFAULT) < 0) TEST_ERROR + if(H5Oget_info_by_name2(file_id, "group", &oinfo, H5O_INFO_TIME, H5P_DEFAULT) < 0) TEST_ERROR if(old_modification_time != oinfo.mtime) TEST_ERROR if(old_cset != linfo.cset) TEST_ERROR if(linfo.corder_valid != TRUE) TEST_ERROR @@ -1531,7 +1531,7 @@ test_move_preserves(hid_t fapl_id, hbool_t new_format) /* Create a new link to the group. It should have a different creation order value but the same modification time */ if(H5Lcreate_hard(file_id, "group", file_id, "group2", H5P_DEFAULT, H5P_DEFAULT) < 0) TEST_ERROR - if(H5Oget_info_by_name(file_id, "group2", &oinfo, H5P_DEFAULT) < 0) TEST_ERROR + if(H5Oget_info_by_name2(file_id, "group2", &oinfo, H5O_INFO_TIME, H5P_DEFAULT) < 0) TEST_ERROR if(old_modification_time != oinfo.mtime) TEST_ERROR if(H5Lget_info(file_id, "group2", &linfo, H5P_DEFAULT) < 0) TEST_ERROR if(old_corder == linfo.corder) TEST_ERROR @@ -1544,7 +1544,7 @@ test_move_preserves(hid_t fapl_id, hbool_t new_format) * should not change. */ if(H5Lcopy(file_id, "group", file_id, "group_copied", lcpl_id, H5P_DEFAULT) < 0) TEST_ERROR - if(H5Oget_info_by_name(file_id, "group_copied", &oinfo, H5P_DEFAULT) < 0) TEST_ERROR + if(H5Oget_info_by_name2(file_id, "group_copied", &oinfo, H5O_INFO_TIME, H5P_DEFAULT) < 0) TEST_ERROR if(old_modification_time != oinfo.mtime) TEST_ERROR if(H5Lget_info(file_id, "group_copied", &linfo, H5P_DEFAULT) < 0) TEST_ERROR if(linfo.corder_valid != TRUE) TEST_ERROR @@ -1555,7 +1555,7 @@ test_move_preserves(hid_t fapl_id, hbool_t new_format) /* Move the link with the default property list. */ if(H5Lmove(file_id, "group_copied", file_id, "group_copied2", H5P_DEFAULT, H5P_DEFAULT) < 0) TEST_ERROR - if(H5Oget_info_by_name(file_id, "group_copied2", &oinfo, H5P_DEFAULT) < 0) TEST_ERROR + if(H5Oget_info_by_name2(file_id, "group_copied2", &oinfo, H5O_INFO_TIME, H5P_DEFAULT) < 0) TEST_ERROR if(old_modification_time != oinfo.mtime) TEST_ERROR if(H5Lget_info(file_id, "group_copied2", &linfo, H5P_DEFAULT) < 0) TEST_ERROR if(linfo.corder_valid != TRUE) TEST_ERROR @@ -1565,7 +1565,7 @@ test_move_preserves(hid_t fapl_id, hbool_t new_format) if(linfo.cset == H5T_CSET_UTF8) TEST_ERROR /* Check that the original link is unchanged */ - if(H5Oget_info_by_name(file_id, "group", &oinfo, H5P_DEFAULT) < 0) TEST_ERROR + if(H5Oget_info_by_name2(file_id, "group", &oinfo, H5O_INFO_TIME, H5P_DEFAULT) < 0) TEST_ERROR if(old_modification_time != oinfo.mtime) TEST_ERROR if(H5Lget_info(file_id, "group", &linfo, H5P_DEFAULT) < 0) TEST_ERROR if(linfo.corder_valid != TRUE) TEST_ERROR @@ -1576,7 +1576,7 @@ test_move_preserves(hid_t fapl_id, hbool_t new_format) * Its creation order value will change, but modification time should not * change. */ if(H5Lmove(file_id, "group", file_id, "group_moved", lcpl_id, H5P_DEFAULT) < 0) TEST_ERROR - if(H5Oget_info_by_name(file_id, "group_moved", &oinfo, H5P_DEFAULT) < 0) TEST_ERROR + if(H5Oget_info_by_name2(file_id, "group_moved", &oinfo, H5O_INFO_TIME, H5P_DEFAULT) < 0) TEST_ERROR if(old_modification_time != oinfo.mtime) TEST_ERROR if(H5Lget_info(file_id, "group_moved", &linfo, H5P_DEFAULT) < 0) TEST_ERROR if(linfo.corder_valid != TRUE) TEST_ERROR @@ -1587,7 +1587,7 @@ test_move_preserves(hid_t fapl_id, hbool_t new_format) /* Move the link again using the default property list. */ if(H5Lmove(file_id, "group_moved", file_id, "group_moved_again", H5P_DEFAULT, H5P_DEFAULT) < 0) TEST_ERROR - if(H5Oget_info_by_name(file_id, "group_moved_again", &oinfo, H5P_DEFAULT) < 0) TEST_ERROR + if(H5Oget_info_by_name2(file_id, "group_moved_again", &oinfo, H5O_INFO_TIME, H5P_DEFAULT) < 0) TEST_ERROR if(old_modification_time != oinfo.mtime) TEST_ERROR if(H5Lget_info(file_id, "group_moved_again", &linfo, H5P_DEFAULT) < 0) TEST_ERROR if(linfo.corder_valid != TRUE) TEST_ERROR @@ -5377,7 +5377,7 @@ external_link_query(hid_t fapl, hbool_t new_format) if(HDstrcmp(object_name, "/dst")) TEST_ERROR /* Query information about object that external link points to */ - if(H5Oget_info_by_name(fid, "src", &oi, H5P_DEFAULT) < 0) FAIL_STACK_ERROR + if(H5Oget_info_by_name2(fid, "src", &oi, H5O_INFO_BASIC, H5P_DEFAULT) < 0) FAIL_STACK_ERROR if(H5O_TYPE_GROUP != oi.type) { H5_FAILED(); HDputs(" Unexpected object type - should have been a group"); @@ -6110,8 +6110,8 @@ external_link_closing(hid_t fapl, hbool_t new_format) /* Test that getting info works */ if(H5Lget_info(fid1, "elink/elink/elink/type1", &li, H5P_DEFAULT) < 0) TEST_ERROR if(H5Lget_info(fid1, "elink/elink/elink", &li, H5P_DEFAULT) < 0) TEST_ERROR - if(H5Oget_info_by_name(fid1, "elink/elink/elink/type1", &oi, H5P_DEFAULT) < 0) TEST_ERROR - if(H5Oget_info_by_name(fid1, "elink/elink/elink", &oi, H5P_DEFAULT) < 0) TEST_ERROR + if(H5Oget_info_by_name2(fid1, "elink/elink/elink/type1", &oi, H5O_INFO_BASIC, H5P_DEFAULT) < 0) TEST_ERROR + if(H5Oget_info_by_name2(fid1, "elink/elink/elink", &oi, H5O_INFO_BASIC, H5P_DEFAULT) < 0) TEST_ERROR /* Test move */ if(H5Lmove(fid1, "elink/elink/elink/group1", fid1, @@ -6198,7 +6198,7 @@ external_link_closing(hid_t fapl, hbool_t new_format) if(H5Gclose(gid) < 0) TEST_ERROR if((gid = H5Gcreate2(fid1, "elink/elink2/group2/group3/group4", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) TEST_ERROR if(H5Gclose(gid) < 0) TEST_ERROR - if(H5Oget_info_by_name(fid1, "elink/elink2/group2/group3/group4", &oi, H5P_DEFAULT) < 0) TEST_ERROR + if(H5Oget_info_by_name2(fid1, "elink/elink2/group2/group3/group4", &oi, H5O_INFO_BASIC, H5P_DEFAULT) < 0) TEST_ERROR /* Add a few regular groups and a soft link in file2 using intermediate group creation */ if((lcpl_id = H5Pcreate(H5P_LINK_CREATE)) < 0) TEST_ERROR @@ -9608,13 +9608,13 @@ obj_visit(hid_t fapl, hbool_t new_format) /* Visit all the objects reachable from the root group (with file ID) */ udata.idx = 0; udata.info = new_format ? ovisit0_new : ovisit0_old; - if(H5Ovisit(fid, H5_INDEX_NAME, H5_ITER_INC, visit_obj_cb, &udata) < 0) FAIL_STACK_ERROR + if(H5Ovisit2(fid, H5_INDEX_NAME, H5_ITER_INC, visit_obj_cb, &udata, H5O_INFO_BASIC) < 0) FAIL_STACK_ERROR /* Visit all the objects reachable from the root group (with group ID) */ if((gid = H5Gopen2(fid, "/", H5P_DEFAULT)) < 0) FAIL_STACK_ERROR udata.idx = 0; udata.info = new_format ? ovisit0_new : ovisit0_old; - if(H5Ovisit(gid, H5_INDEX_NAME, H5_ITER_INC, visit_obj_cb, &udata) < 0) FAIL_STACK_ERROR + if(H5Ovisit2(gid, H5_INDEX_NAME, H5_ITER_INC, visit_obj_cb, &udata, H5O_INFO_BASIC) < 0) FAIL_STACK_ERROR if(H5Gclose(gid) < 0) FAIL_STACK_ERROR @@ -9622,13 +9622,13 @@ obj_visit(hid_t fapl, hbool_t new_format) if((gid = H5Gopen2(fid, "/Group1", H5P_DEFAULT)) < 0) FAIL_STACK_ERROR udata.idx = 0; udata.info = new_format ? ovisit1_new : ovisit1_old; - if(H5Ovisit(gid, H5_INDEX_NAME, H5_ITER_INC, visit_obj_cb, &udata) < 0) FAIL_STACK_ERROR + if(H5Ovisit2(gid, H5_INDEX_NAME, H5_ITER_INC, visit_obj_cb, &udata, H5O_INFO_BASIC) < 0) FAIL_STACK_ERROR if(H5Gclose(gid) < 0) FAIL_STACK_ERROR if((gid = H5Gopen2(fid, "/Group1/Group2", H5P_DEFAULT)) < 0) FAIL_STACK_ERROR udata.idx = 0; udata.info = new_format ? ovisit2_new : ovisit2_old; - if(H5Ovisit(gid, H5_INDEX_NAME, H5_ITER_INC, visit_obj_cb, &udata) < 0) FAIL_STACK_ERROR + if(H5Ovisit2(gid, H5_INDEX_NAME, H5_ITER_INC, visit_obj_cb, &udata, H5O_INFO_BASIC) < 0) FAIL_STACK_ERROR if(H5Gclose(gid) < 0) FAIL_STACK_ERROR @@ -9678,36 +9678,36 @@ obj_visit_by_name(hid_t fapl, hbool_t new_format) /* Visit all the objects reachable from the root group (with file ID) */ udata.idx = 0; udata.info = new_format ? ovisit0_new : ovisit0_old; - if(H5Ovisit_by_name(fid, "/", H5_INDEX_NAME, H5_ITER_INC, visit_obj_cb, &udata, H5P_DEFAULT) < 0) FAIL_STACK_ERROR + if(H5Ovisit_by_name2(fid, "/", H5_INDEX_NAME, H5_ITER_INC, visit_obj_cb, &udata, H5O_INFO_BASIC, H5P_DEFAULT) < 0) FAIL_STACK_ERROR /* Visit all the objects reachable from the root group (with group ID) */ if((gid = H5Gopen2(fid, "/", H5P_DEFAULT)) < 0) FAIL_STACK_ERROR udata.idx = 0; udata.info = new_format ? ovisit0_new : ovisit0_old; - if(H5Ovisit_by_name(gid, ".", H5_INDEX_NAME, H5_ITER_INC, visit_obj_cb, &udata, H5P_DEFAULT) < 0) FAIL_STACK_ERROR + if(H5Ovisit_by_name2(gid, ".", H5_INDEX_NAME, H5_ITER_INC, visit_obj_cb, &udata, H5O_INFO_BASIC, H5P_DEFAULT) < 0) FAIL_STACK_ERROR if(H5Gclose(gid) < 0) FAIL_STACK_ERROR /* Visit all the objects reachable from each internal group */ udata.idx = 0; udata.info = new_format ? ovisit1_new : ovisit1_old; - if(H5Ovisit_by_name(fid, "/Group1", H5_INDEX_NAME, H5_ITER_INC, visit_obj_cb, &udata, H5P_DEFAULT) < 0) FAIL_STACK_ERROR + if(H5Ovisit_by_name2(fid, "/Group1", H5_INDEX_NAME, H5_ITER_INC, visit_obj_cb, &udata, H5O_INFO_BASIC, H5P_DEFAULT) < 0) FAIL_STACK_ERROR if((gid = H5Gopen2(fid, "/Group1", H5P_DEFAULT)) < 0) FAIL_STACK_ERROR udata.idx = 0; udata.info = new_format ? ovisit1_new : ovisit1_old; - if(H5Ovisit_by_name(gid, ".", H5_INDEX_NAME, H5_ITER_INC, visit_obj_cb, &udata, H5P_DEFAULT) < 0) FAIL_STACK_ERROR + if(H5Ovisit_by_name2(gid, ".", H5_INDEX_NAME, H5_ITER_INC, visit_obj_cb, &udata, H5O_INFO_BASIC, H5P_DEFAULT) < 0) FAIL_STACK_ERROR if(H5Gclose(gid) < 0) FAIL_STACK_ERROR udata.idx = 0; udata.info = new_format ? ovisit2_new : ovisit2_old; - if(H5Ovisit_by_name(fid, "/Group1/Group2", H5_INDEX_NAME, H5_ITER_INC, visit_obj_cb, &udata, H5P_DEFAULT) < 0) FAIL_STACK_ERROR + if(H5Ovisit_by_name2(fid, "/Group1/Group2", H5_INDEX_NAME, H5_ITER_INC, visit_obj_cb, &udata, H5O_INFO_BASIC, H5P_DEFAULT) < 0) FAIL_STACK_ERROR if((gid = H5Gopen2(fid, "/Group1/Group2", H5P_DEFAULT)) < 0) FAIL_STACK_ERROR udata.idx = 0; udata.info = new_format ? ovisit2_new : ovisit2_old; - if(H5Ovisit_by_name(gid, ".", H5_INDEX_NAME, H5_ITER_INC, visit_obj_cb, &udata, H5P_DEFAULT) < 0) FAIL_STACK_ERROR + if(H5Ovisit_by_name2(gid, ".", H5_INDEX_NAME, H5_ITER_INC, visit_obj_cb, &udata, H5O_INFO_BASIC, H5P_DEFAULT) < 0) FAIL_STACK_ERROR if(H5Gclose(gid) < 0) FAIL_STACK_ERROR @@ -9784,15 +9784,15 @@ obj_visit_stop(hid_t fapl, hbool_t new_format) * returns H5_ITER_STOP */ nvisited = 0; - if((ret = H5Ovisit(fid, H5_INDEX_NAME, H5_ITER_INC, visit_obj_stop_cb, &nvisited)) < 0) + if((ret = H5Ovisit2(fid, H5_INDEX_NAME, H5_ITER_INC, visit_obj_stop_cb, &nvisited, H5O_INFO_BASIC)) < 0) FAIL_STACK_ERROR if(ret != H5_ITER_STOP) TEST_ERROR if(nvisited != 1) TEST_ERROR /* Same test with H5Ovisit_by_name */ nvisited = 0; - if((ret = H5Ovisit_by_name(fid, "/", H5_INDEX_NAME, H5_ITER_INC, visit_obj_stop_cb, - &nvisited, H5P_DEFAULT)) < 0) FAIL_STACK_ERROR + if((ret = H5Ovisit_by_name2(fid, "/", H5_INDEX_NAME, H5_ITER_INC, visit_obj_stop_cb, + &nvisited, H5O_INFO_BASIC, H5P_DEFAULT)) < 0) FAIL_STACK_ERROR if(ret != H5_ITER_STOP) TEST_ERROR if(nvisited != 1) TEST_ERROR @@ -11596,7 +11596,7 @@ link_info_by_idx_old(hid_t fapl) if((group_id2 = H5Gcreate2(group_id, objname, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) TEST_ERROR /* Retrieve group's address on disk */ - if(H5Oget_info(group_id2, &oi) < 0) TEST_ERROR + if(H5Oget_info2(group_id2, &oi, H5O_INFO_BASIC) < 0) TEST_ERROR objno[u] = oi.addr; /* Close group */ @@ -12095,7 +12095,7 @@ delete_by_idx_old(hid_t fapl) if((group_id2 = H5Gcreate2(group_id, objname, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) TEST_ERROR /* Retrieve group's address on disk */ - if(H5Oget_info(group_id2, &oi) < 0) TEST_ERROR + if(H5Oget_info2(group_id2, &oi, H5O_INFO_BASIC) < 0) TEST_ERROR objno[u] = oi.addr; /* Close group */ @@ -12168,7 +12168,7 @@ delete_by_idx_old(hid_t fapl) if((group_id2 = H5Gcreate2(group_id, objname, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) TEST_ERROR /* Retrieve group's address on disk */ - if(H5Oget_info(group_id2, &oi) < 0) TEST_ERROR + if(H5Oget_info2(group_id2, &oi, H5O_INFO_BASIC) < 0) TEST_ERROR objno[u] = oi.addr; /* Close group */ @@ -13163,7 +13163,7 @@ open_by_idx_check(hid_t main_group_id, hid_t soft_group_id, hid_t mount_file_id, if((obj_id = H5Oopen_by_idx(group_id, ".", idx_type, order, (hsize_t)u, H5P_DEFAULT)) < 0) TEST_ERROR /* Get the object's information */ - if(H5Oget_info(obj_id, &oi) < 0) TEST_ERROR + if(H5Oget_info2(obj_id, &oi, H5O_INFO_BASIC) < 0) TEST_ERROR /* Check that the object is the correct one */ if(order == H5_ITER_INC) { @@ -13189,7 +13189,7 @@ open_by_idx_check(hid_t main_group_id, hid_t soft_group_id, hid_t mount_file_id, */ /* Get the address of the root group in the file to mount */ - if(H5Oget_info(mount_file_id, &oi) < 0) TEST_ERROR + if(H5Oget_info2(mount_file_id, &oi, H5O_INFO_BASIC) < 0) TEST_ERROR mnt_root_addr = oi.addr; /* Mount a file over a group in main group */ @@ -13201,7 +13201,7 @@ open_by_idx_check(hid_t main_group_id, hid_t soft_group_id, hid_t mount_file_id, if((obj_id = H5Oopen_by_idx(group_id, ".", H5_INDEX_NAME, H5_ITER_INC, (hsize_t)mnt_idx, H5P_DEFAULT)) < 0) TEST_ERROR /* Get the object's information */ - if(H5Oget_info(obj_id, &oi) < 0) TEST_ERROR + if(H5Oget_info2(obj_id, &oi, H5O_INFO_BASIC) < 0) TEST_ERROR /* Check that the object is the root of the mounted file and not in the previous file */ if(H5F_addr_ne(oi.addr, mnt_root_addr)) TEST_ERROR @@ -13352,7 +13352,7 @@ open_by_idx(hid_t fapl) if((group_id2 = H5Gcreate2(group_id, objname, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) TEST_ERROR /* Retrieve group's address on disk */ - if(H5Oget_info(group_id2, &oi) < 0) TEST_ERROR + if(H5Oget_info2(group_id2, &oi, H5O_INFO_BASIC) < 0) TEST_ERROR objno[u] = oi.addr; /* Close group created */ @@ -13387,7 +13387,7 @@ open_by_idx(hid_t fapl) if((group_id2 = H5Gcreate2(group_id, objname, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) TEST_ERROR /* Retrieve group's address on disk */ - if(H5Oget_info(group_id2, &oi) < 0) TEST_ERROR + if(H5Oget_info2(group_id2, &oi, H5O_INFO_BASIC) < 0) TEST_ERROR objno[u] = oi.addr; /* Close group created */ @@ -13529,7 +13529,7 @@ open_by_idx_old(hid_t fapl) if((group_id2 = H5Gcreate2(group_id, objname, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) TEST_ERROR /* Retrieve group's address on disk */ - if(H5Oget_info(group_id2, &oi) < 0) TEST_ERROR + if(H5Oget_info2(group_id2, &oi, H5O_INFO_BASIC) < 0) TEST_ERROR objno[u] = oi.addr; /* Close group created */ @@ -13623,14 +13623,14 @@ object_info_check(hid_t main_group_id, hid_t soft_group_id, H5_index_t idx_type, sprintf(objname, "filler %02u", u); /* Query the object's information, by name */ - if(H5Oget_info_by_name(group_id, objname, &oinfo, H5P_DEFAULT) < 0) TEST_ERROR + if(H5Oget_info_by_name2(group_id, objname, &oinfo, H5O_INFO_BASIC|H5O_INFO_NUM_ATTRS, H5P_DEFAULT) < 0) TEST_ERROR /* Check that the object is the correct one */ if(H5F_addr_ne(oinfo.addr, objno[u])) TEST_ERROR if(H5F_addr_ne(oinfo.num_attrs, u)) TEST_ERROR /* Query the object's information, by index */ - if(H5Oget_info_by_idx(group_id, ".", idx_type, order, (hsize_t)u, &oinfo, H5P_DEFAULT) < 0) TEST_ERROR + if(H5Oget_info_by_idx2(group_id, ".", idx_type, order, (hsize_t)u, &oinfo, H5O_INFO_BASIC|H5O_INFO_NUM_ATTRS, H5P_DEFAULT) < 0) TEST_ERROR /* Check that the object is the correct one */ if(order == H5_ITER_INC) { @@ -13772,7 +13772,7 @@ object_info(hid_t fapl) /* Check for out of bound query by index on empty group */ H5E_BEGIN_TRY { - ret = H5Oget_info_by_idx(group_id, ".", H5_INDEX_NAME, order, (hsize_t)0, &oinfo, H5P_DEFAULT); + ret = H5Oget_info_by_idx2(group_id, ".", H5_INDEX_NAME, order, (hsize_t)0, &oinfo, H5O_INFO_BASIC, H5P_DEFAULT); } H5E_END_TRY; if(ret >= 0) TEST_ERROR @@ -13788,7 +13788,7 @@ object_info(hid_t fapl) if((group_id2 = H5Gcreate2(group_id, objname, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) TEST_ERROR /* Retrieve group's address on disk */ - if(H5Oget_info(group_id2, &oinfo) < 0) TEST_ERROR + if(H5Oget_info2(group_id2, &oinfo, H5O_INFO_BASIC) < 0) TEST_ERROR objno[u] = oinfo.addr; /* Create attributes on new object */ @@ -13816,7 +13816,7 @@ object_info(hid_t fapl) /* Check for out of bound query by index */ H5E_BEGIN_TRY { - ret = H5Oget_info_by_idx(group_id, ".", H5_INDEX_NAME, order, (hsize_t)u, &oinfo, H5P_DEFAULT); + ret = H5Oget_info_by_idx2(group_id, ".", H5_INDEX_NAME, order, (hsize_t)u, &oinfo, H5O_INFO_BASIC, H5P_DEFAULT); } H5E_END_TRY; if(ret >= 0) TEST_ERROR @@ -13836,7 +13836,7 @@ object_info(hid_t fapl) if((group_id2 = H5Gcreate2(group_id, objname, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) TEST_ERROR /* Retrieve group's address on disk */ - if(H5Oget_info(group_id2, &oinfo) < 0) TEST_ERROR + if(H5Oget_info2(group_id2, &oinfo, H5O_INFO_BASIC) < 0) TEST_ERROR objno[u] = oinfo.addr; /* Create attributes on new object */ @@ -13864,7 +13864,7 @@ object_info(hid_t fapl) /* Check for out of bound query by index */ H5E_BEGIN_TRY { - ret = H5Oget_info_by_idx(group_id, ".", H5_INDEX_NAME, order, (hsize_t)u, &oinfo, H5P_DEFAULT); + ret = H5Oget_info_by_idx2(group_id, ".", H5_INDEX_NAME, order, (hsize_t)u, &oinfo, H5O_INFO_BASIC, H5P_DEFAULT); } H5E_END_TRY; if(ret >= 0) TEST_ERROR @@ -13969,7 +13969,7 @@ object_info_old(hid_t fapl) /* Check for out of bound query by index on empty group */ H5E_BEGIN_TRY { - ret = H5Oget_info_by_idx(group_id, ".", H5_INDEX_NAME, order, (hsize_t)0, &oinfo, H5P_DEFAULT); + ret = H5Oget_info_by_idx2(group_id, ".", H5_INDEX_NAME, order, (hsize_t)0, &oinfo, H5O_INFO_BASIC, H5P_DEFAULT); } H5E_END_TRY; if(ret >= 0) TEST_ERROR @@ -13985,7 +13985,7 @@ object_info_old(hid_t fapl) if((group_id2 = H5Gcreate2(group_id, objname, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) TEST_ERROR /* Retrieve group's address on disk */ - if(H5Oget_info(group_id2, &oinfo) < 0) TEST_ERROR + if(H5Oget_info2(group_id2, &oinfo, H5O_INFO_BASIC) < 0) TEST_ERROR objno[u] = oinfo.addr; /* Create attributes on new object */ @@ -14013,13 +14013,13 @@ object_info_old(hid_t fapl) /* Check for out of bound query by index */ H5E_BEGIN_TRY { - ret = H5Oget_info_by_idx(group_id, ".", H5_INDEX_NAME, order, (hsize_t)u, &oinfo, H5P_DEFAULT); + ret = H5Oget_info_by_idx2(group_id, ".", H5_INDEX_NAME, order, (hsize_t)u, &oinfo, H5O_INFO_BASIC, H5P_DEFAULT); } H5E_END_TRY; if(ret >= 0) TEST_ERROR /* Check for creation order index query */ H5E_BEGIN_TRY { - ret = H5Oget_info_by_idx(group_id, ".", H5_INDEX_CRT_ORDER, order, (hsize_t)(u - 1), &oinfo, H5P_DEFAULT); + ret = H5Oget_info_by_idx2(group_id, ".", H5_INDEX_CRT_ORDER, order, (hsize_t)(u - 1), &oinfo, H5O_INFO_BASIC, H5P_DEFAULT); } H5E_END_TRY; if(ret >= 0) TEST_ERROR @@ -14779,8 +14779,8 @@ timestamps(hid_t fapl) if(track_times != TRUE) TEST_ERROR /* Query the object information for each group */ - if(H5Oget_info(group_id, &oinfo) < 0) TEST_ERROR - if(H5Oget_info(group_id2, &oinfo2) < 0) TEST_ERROR + if(H5Oget_info2(group_id, &oinfo, H5O_INFO_TIME|H5O_INFO_HDR) < 0) TEST_ERROR + if(H5Oget_info2(group_id2, &oinfo2, H5O_INFO_TIME|H5O_INFO_HDR) < 0) TEST_ERROR /* Sanity check object information for each group */ if(oinfo.atime != 0) TEST_ERROR @@ -14826,8 +14826,8 @@ timestamps(hid_t fapl) if(track_times != TRUE) TEST_ERROR /* Query the object information for each group */ - if(H5Oget_info(group_id, &oinfo) < 0) TEST_ERROR - if(H5Oget_info(group_id2, &oinfo2) < 0) TEST_ERROR + if(H5Oget_info2(group_id, &oinfo, H5O_INFO_TIME|H5O_INFO_HDR) < 0) TEST_ERROR + if(H5Oget_info2(group_id2, &oinfo2, H5O_INFO_TIME|H5O_INFO_HDR) < 0) TEST_ERROR /* Sanity check object information for each group */ if(oinfo.atime != 0) TEST_ERROR @@ -258,13 +258,13 @@ test_mf_eoa(const char *env_h5_drvr, hid_t fapl) if(NULL == (f = (H5F_t *)H5I_object(file))) FAIL_STACK_ERROR - H5MF_aggr_query(f, &(f->shared->meta_aggr), &ma_addr, &ma_size); + H5MF__aggr_query(f, &(f->shared->meta_aggr), &ma_addr, &ma_size); type = H5FD_MEM_SUPER; addr1 = H5MF_alloc(f, type, (hsize_t)TBLOCK_SIZE30); /* nothing should be changed in meta_aggr */ - H5MF_aggr_query(f, &(f->shared->meta_aggr), &new_ma_addr, &ma_size); + H5MF__aggr_query(f, &(f->shared->meta_aggr), &new_ma_addr, &ma_size); if (new_ma_addr != ma_addr) TEST_ERROR @@ -274,7 +274,7 @@ test_mf_eoa(const char *env_h5_drvr, hid_t fapl) addr2 = H5MF_alloc(f, type, (hsize_t)TBLOCK_SIZE50); /* nothing should be changed in meta_aggr */ - H5MF_aggr_query(f, &(f->shared->meta_aggr), &new_ma_addr, &ma_size); + H5MF__aggr_query(f, &(f->shared->meta_aggr), &new_ma_addr, &ma_size); if (new_ma_addr != ma_addr) TEST_ERROR @@ -403,7 +403,7 @@ test_mf_eoa_shrink(const char *env_h5_drvr, hid_t fapl) if(NULL == (f = (H5F_t *)H5I_object(file))) FAIL_STACK_ERROR - H5MF_aggr_query(f, &(f->shared->meta_aggr), &ma_addr, &ma_size); + H5MF__aggr_query(f, &(f->shared->meta_aggr), &ma_addr, &ma_size); type = H5FD_MEM_SUPER; addr = H5MF_alloc(f, type, (hsize_t)TBLOCK_SIZE30); @@ -412,7 +412,7 @@ test_mf_eoa_shrink(const char *env_h5_drvr, hid_t fapl) TEST_ERROR /* nothing should be changed in meta_aggr */ - H5MF_aggr_query(f, &(f->shared->meta_aggr), &new_ma_addr, &new_ma_size); + H5MF__aggr_query(f, &(f->shared->meta_aggr), &new_ma_addr, &new_ma_size); if (new_ma_addr != ma_addr) TEST_ERROR if (new_ma_size != ma_size) TEST_ERROR @@ -435,14 +435,14 @@ test_mf_eoa_shrink(const char *env_h5_drvr, hid_t fapl) if(NULL == (f = (H5F_t *)H5I_object(file))) FAIL_STACK_ERROR - H5MF_aggr_query(f, &(f->shared->meta_aggr), &ma_addr, &ma_size); + H5MF__aggr_query(f, &(f->shared->meta_aggr), &ma_addr, &ma_size); /* should succeed */ if(H5MF_try_shrink(f, type, addr, (hsize_t)TBLOCK_SIZE30) <= 0) TEST_ERROR /* nothing should be changed in meta_aggr */ - H5MF_aggr_query(f, &(f->shared->meta_aggr), &new_ma_addr, &ma_size); + H5MF__aggr_query(f, &(f->shared->meta_aggr), &new_ma_addr, &ma_size); if(new_ma_addr != ma_addr) TEST_ERROR if(new_ma_size != ma_size) @@ -480,7 +480,7 @@ test_mf_eoa_shrink(const char *env_h5_drvr, hid_t fapl) if(NULL == (f = (H5F_t *)H5I_object(file))) FAIL_STACK_ERROR - H5MF_aggr_query(f, &(f->shared->meta_aggr), &ma_addr, &ma_size); + H5MF__aggr_query(f, &(f->shared->meta_aggr), &ma_addr, &ma_size); addr = H5MF_alloc(f, type, (hsize_t)TBLOCK_SIZE30); @@ -492,7 +492,7 @@ test_mf_eoa_shrink(const char *env_h5_drvr, hid_t fapl) TEST_ERROR /* nothing should be changed in meta_aggr */ - H5MF_aggr_query(f, &(f->shared->meta_aggr), &new_ma_addr, &ma_size); + H5MF__aggr_query(f, &(f->shared->meta_aggr), &new_ma_addr, &ma_size); if (new_ma_addr != ma_addr) TEST_ERROR if (new_ma_size != ma_size) TEST_ERROR @@ -529,14 +529,14 @@ test_mf_eoa_shrink(const char *env_h5_drvr, hid_t fapl) if(NULL == (f = (H5F_t *)H5I_object(file))) FAIL_STACK_ERROR - H5MF_aggr_query(f, &(f->shared->meta_aggr), &ma_addr, &ma_size); + H5MF__aggr_query(f, &(f->shared->meta_aggr), &ma_addr, &ma_size); /* should not succeed in shrinking */ if(H5MF_try_shrink(f, type, addr, (hsize_t)TBLOCK_SIZE30 + 10) > 0) TEST_ERROR /* nothing should be changed in meta_aggr */ - H5MF_aggr_query(f, &(f->shared->meta_aggr), &new_ma_addr, &ma_size); + H5MF__aggr_query(f, &(f->shared->meta_aggr), &new_ma_addr, &ma_size); if (new_ma_addr != ma_addr) TEST_ERROR if (new_ma_size != ma_size) TEST_ERROR @@ -572,14 +572,14 @@ test_mf_eoa_shrink(const char *env_h5_drvr, hid_t fapl) if(NULL == (f = (H5F_t *)H5I_object(file))) FAIL_STACK_ERROR - H5MF_aggr_query(f, &(f->shared->meta_aggr), &ma_addr, &ma_size); + H5MF__aggr_query(f, &(f->shared->meta_aggr), &ma_addr, &ma_size); /* should succeed in shrinking */ if(H5MF_try_shrink(f, type, addr+10, (hsize_t)(TBLOCK_SIZE30 - 10)) <= 0) TEST_ERROR /* nothing should be changed in meta_aggr */ - H5MF_aggr_query(f, &(f->shared->meta_aggr), &new_ma_addr, &ma_size); + H5MF__aggr_query(f, &(f->shared->meta_aggr), &new_ma_addr, &ma_size); if(new_ma_addr != ma_addr) TEST_ERROR if(new_ma_size != ma_size) @@ -684,7 +684,7 @@ test_mf_eoa_extend(const char *env_h5_drvr, hid_t fapl) if(NULL == (f = (H5F_t *)H5I_object(file))) FAIL_STACK_ERROR - H5MF_aggr_query(f, &(f->shared->meta_aggr), &ma_addr, &ma_size); + H5MF__aggr_query(f, &(f->shared->meta_aggr), &ma_addr, &ma_size); type = H5FD_MEM_SUPER; addr = H5MF_alloc(f, type, (hsize_t)TBLOCK_SIZE30); @@ -692,7 +692,7 @@ test_mf_eoa_extend(const char *env_h5_drvr, hid_t fapl) TEST_ERROR /* nothing should be changed in meta_aggr */ - H5MF_aggr_query(f, &(f->shared->meta_aggr), &new_ma_addr, &new_ma_size); + H5MF__aggr_query(f, &(f->shared->meta_aggr), &new_ma_addr, &new_ma_size); if (new_ma_addr != ma_addr) TEST_ERROR @@ -722,7 +722,7 @@ test_mf_eoa_extend(const char *env_h5_drvr, hid_t fapl) TEST_ERROR /* nothing should be changed in meta_aggr */ - H5MF_aggr_query(f, &(f->shared->meta_aggr), &new_ma_addr, &new_ma_size); + H5MF__aggr_query(f, &(f->shared->meta_aggr), &new_ma_addr, &new_ma_size); if (new_ma_addr != ma_addr) TEST_ERROR @@ -762,7 +762,7 @@ test_mf_eoa_extend(const char *env_h5_drvr, hid_t fapl) if(NULL == (f = (H5F_t *)H5I_object(file))) FAIL_STACK_ERROR - H5MF_aggr_query(f, &(f->shared->meta_aggr), &ma_addr, &ma_size); + H5MF__aggr_query(f, &(f->shared->meta_aggr), &ma_addr, &ma_size); type = H5FD_MEM_SUPER; addr = H5MF_alloc(f, type, (hsize_t)TBLOCK_SIZE30); @@ -771,7 +771,7 @@ test_mf_eoa_extend(const char *env_h5_drvr, hid_t fapl) TEST_ERROR /* nothing should be changed in meta_aggr */ - H5MF_aggr_query(f, &(f->shared->meta_aggr), &new_ma_addr, &new_ma_size); + H5MF__aggr_query(f, &(f->shared->meta_aggr), &new_ma_addr, &new_ma_size); if(new_ma_addr != ma_addr) TEST_ERROR @@ -782,7 +782,7 @@ test_mf_eoa_extend(const char *env_h5_drvr, hid_t fapl) TEST_ERROR /* nothing should be changed in meta_aggr */ - H5MF_aggr_query(f, &(f->shared->meta_aggr), &new_ma_addr, &new_ma_size); + H5MF__aggr_query(f, &(f->shared->meta_aggr), &new_ma_addr, &new_ma_size); if (new_ma_addr != ma_addr) TEST_ERROR @@ -1186,7 +1186,7 @@ test_mf_fs_alloc_free(hid_t fapl) TEST_ERROR /* Create section A */ - sect_node = H5MF_sect_new(H5MF_FSPACE_SECT_SIMPLE, (haddr_t)TBLOCK_ADDR70, (hsize_t)TBLOCK_SIZE30); + sect_node = H5MF__sect_new(H5MF_FSPACE_SECT_SIMPLE, (haddr_t)TBLOCK_ADDR70, (hsize_t)TBLOCK_SIZE30); /* Add section A to free-space manager */ if(H5MF__add_sect(f, H5FD_MEM_SUPER, f->shared->fs_man[H5FD_MEM_SUPER], sect_node)) @@ -1263,7 +1263,7 @@ test_mf_fs_alloc_free(hid_t fapl) TEST_ERROR /* Create section A */ - sect_node = H5MF_sect_new(H5MF_FSPACE_SECT_SIMPLE, (haddr_t)TBLOCK_ADDR70, (hsize_t)TBLOCK_SIZE30); + sect_node = H5MF__sect_new(H5MF_FSPACE_SECT_SIMPLE, (haddr_t)TBLOCK_ADDR70, (hsize_t)TBLOCK_SIZE30); /* Add section A to free-space manager */ if(H5MF__add_sect(f, H5FD_MEM_SUPER, f->shared->fs_man[H5FD_MEM_SUPER], sect_node)) @@ -1338,7 +1338,7 @@ test_mf_fs_alloc_free(hid_t fapl) TEST_ERROR /* Create section A */ - sect_node = H5MF_sect_new(H5MF_FSPACE_SECT_SIMPLE, (haddr_t)TBLOCK_ADDR70, (hsize_t)TBLOCK_SIZE30); + sect_node = H5MF__sect_new(H5MF_FSPACE_SECT_SIMPLE, (haddr_t)TBLOCK_ADDR70, (hsize_t)TBLOCK_SIZE30); /* Add section A to free-space manager */ if(H5MF__add_sect(f, H5FD_MEM_SUPER, f->shared->fs_man[H5FD_MEM_SUPER], sect_node)) @@ -1511,7 +1511,7 @@ test_mf_fs_extend(hid_t fapl) TEST_ERROR /* Create section A */ - sect_node1 = H5MF_sect_new(H5MF_FSPACE_SECT_SIMPLE, (haddr_t)TBLOCK_ADDR70, (hsize_t)TBLOCK_SIZE30); + sect_node1 = H5MF__sect_new(H5MF_FSPACE_SECT_SIMPLE, (haddr_t)TBLOCK_ADDR70, (hsize_t)TBLOCK_SIZE30); /* Add section A to free-space manager */ if(H5MF__add_sect(f, H5FD_MEM_SUPER, f->shared->fs_man[H5FD_MEM_SUPER], sect_node1)) @@ -1540,7 +1540,7 @@ test_mf_fs_extend(hid_t fapl) TEST_ERROR /* Create section B */ - sect_node2 = H5MF_sect_new(H5MF_FSPACE_SECT_SIMPLE, (haddr_t)TBLOCK_ADDR100, (hsize_t)TBLOCK_SIZE50); + sect_node2 = H5MF__sect_new(H5MF_FSPACE_SECT_SIMPLE, (haddr_t)TBLOCK_ADDR100, (hsize_t)TBLOCK_SIZE50); /* Add section B to free-space manager */ if(H5MF__add_sect(f, H5FD_MEM_SUPER, f->shared->fs_man[H5FD_MEM_SUPER], sect_node2)) @@ -1619,7 +1619,7 @@ test_mf_fs_extend(hid_t fapl) TEST_ERROR /* Create section A */ - sect_node1 = H5MF_sect_new(H5MF_FSPACE_SECT_SIMPLE, (haddr_t)TBLOCK_ADDR70, (hsize_t)TBLOCK_SIZE30); + sect_node1 = H5MF__sect_new(H5MF_FSPACE_SECT_SIMPLE, (haddr_t)TBLOCK_ADDR70, (hsize_t)TBLOCK_SIZE30); /* Add section A to free-space manager */ if(H5MF__add_sect(f, H5FD_MEM_SUPER, f->shared->fs_man[H5FD_MEM_SUPER], sect_node1)) @@ -1648,7 +1648,7 @@ test_mf_fs_extend(hid_t fapl) TEST_ERROR /* Create section B */ - sect_node2 = H5MF_sect_new(H5MF_FSPACE_SECT_SIMPLE, (haddr_t)TBLOCK_ADDR100, (hsize_t)TBLOCK_SIZE50); + sect_node2 = H5MF__sect_new(H5MF_FSPACE_SECT_SIMPLE, (haddr_t)TBLOCK_ADDR100, (hsize_t)TBLOCK_SIZE50); /* Add section B to free-space manager */ if(H5MF__add_sect(f, H5FD_MEM_SUPER, f->shared->fs_man[H5FD_MEM_SUPER], sect_node2)) @@ -1721,7 +1721,7 @@ test_mf_fs_extend(hid_t fapl) TEST_ERROR /* Create section A */ - sect_node1 = H5MF_sect_new(H5MF_FSPACE_SECT_SIMPLE, (haddr_t)TBLOCK_ADDR70, (hsize_t)TBLOCK_SIZE30); + sect_node1 = H5MF__sect_new(H5MF_FSPACE_SECT_SIMPLE, (haddr_t)TBLOCK_ADDR70, (hsize_t)TBLOCK_SIZE30); /* Add section A to free-space manager */ if(H5MF__add_sect(f, H5FD_MEM_SUPER, f->shared->fs_man[H5FD_MEM_SUPER], sect_node1)) @@ -1750,7 +1750,7 @@ test_mf_fs_extend(hid_t fapl) TEST_ERROR /* Create section B */ - sect_node2 = H5MF_sect_new(H5MF_FSPACE_SECT_SIMPLE, (haddr_t)TBLOCK_ADDR100, (hsize_t)TBLOCK_SIZE50); + sect_node2 = H5MF__sect_new(H5MF_FSPACE_SECT_SIMPLE, (haddr_t)TBLOCK_ADDR100, (hsize_t)TBLOCK_SIZE50); /* Add section B to free-space manager */ if(H5MF__add_sect(f, H5FD_MEM_SUPER, f->shared->fs_man[H5FD_MEM_SUPER], sect_node2)) @@ -1823,7 +1823,7 @@ test_mf_fs_extend(hid_t fapl) TEST_ERROR /* Create section A */ - sect_node1 = H5MF_sect_new(H5MF_FSPACE_SECT_SIMPLE, (haddr_t)TBLOCK_ADDR70, (hsize_t)(TBLOCK_SIZE30-10)); + sect_node1 = H5MF__sect_new(H5MF_FSPACE_SECT_SIMPLE, (haddr_t)TBLOCK_ADDR70, (hsize_t)(TBLOCK_SIZE30-10)); /* Add section A of size=20 to free-space */ if(H5MF__add_sect(f, H5FD_MEM_SUPER, f->shared->fs_man[H5FD_MEM_SUPER], sect_node1)) @@ -1852,7 +1852,7 @@ test_mf_fs_extend(hid_t fapl) TEST_ERROR /* Create section B */ - sect_node2 = H5MF_sect_new(H5MF_FSPACE_SECT_SIMPLE, (haddr_t)TBLOCK_ADDR100, (hsize_t)TBLOCK_SIZE50); + sect_node2 = H5MF__sect_new(H5MF_FSPACE_SECT_SIMPLE, (haddr_t)TBLOCK_ADDR100, (hsize_t)TBLOCK_SIZE50); /* Add section B to free-space manager */ if(H5MF__add_sect(f, H5FD_MEM_SUPER, f->shared->fs_man[H5FD_MEM_SUPER], sect_node2)) @@ -1997,10 +1997,10 @@ test_mf_fs_absorb(const char *env_h5_drvr, hid_t fapl) /* Allocate a section from meta_aggr */ addr = H5MF_alloc(f, H5FD_MEM_SUPER, (hsize_t)TBLOCK_SIZE30); - H5MF_aggr_query(f, &(f->shared->meta_aggr), &ma_addr, &ma_size); + H5MF__aggr_query(f, &(f->shared->meta_aggr), &ma_addr, &ma_size); /* Create a section */ - sect_node = H5MF_sect_new(H5MF_FSPACE_SECT_SIMPLE, (haddr_t)(ma_addr+ma_size), (hsize_t)TBLOCK_SIZE2048); + sect_node = H5MF__sect_new(H5MF_FSPACE_SECT_SIMPLE, (haddr_t)(ma_addr+ma_size), (hsize_t)TBLOCK_SIZE2048); /* Add a section to free-space that adjoins end of the aggregator */ if(H5MF__add_sect(f, H5FD_MEM_SUPER, f->shared->fs_man[H5FD_MEM_SUPER], sect_node)) @@ -2052,13 +2052,13 @@ test_mf_fs_absorb(const char *env_h5_drvr, hid_t fapl) /* Allocate a section from meta_aggr */ addr = H5MF_alloc(f, H5FD_MEM_SUPER, (hsize_t)TBLOCK_SIZE30); - H5MF_aggr_query(f, &(f->shared->meta_aggr), &ma_addr, &ma_size); + H5MF__aggr_query(f, &(f->shared->meta_aggr), &ma_addr, &ma_size); /* Allocate a section from sdata_aggr */ saddr = H5MF_alloc(f, H5FD_MEM_DRAW, (hsize_t)TBLOCK_SIZE50); /* Add a section to free-space that adjoins the beginning of meta_aggr */ - sect_node = H5MF_sect_new(H5MF_FSPACE_SECT_SIMPLE, (haddr_t)addr, (hsize_t)TBLOCK_SIZE30); + sect_node = H5MF__sect_new(H5MF_FSPACE_SECT_SIMPLE, (haddr_t)addr, (hsize_t)TBLOCK_SIZE30); /* When adding, meta_aggr is absorbed onto the end of the section */ if(H5MF__add_sect(f, H5FD_MEM_SUPER, f->shared->fs_man[H5FD_MEM_SUPER], sect_node)) @@ -2172,7 +2172,7 @@ test_mf_aggr_alloc1(const char *env_h5_drvr, hid_t fapl) if((addr1 = H5MF_alloc(f, type, (hsize_t)TBLOCK_SIZE30)) == HADDR_UNDEF) TEST_ERROR - H5MF_aggr_query(f, &(f->shared->meta_aggr), &ma_addr, &ma_size); + H5MF__aggr_query(f, &(f->shared->meta_aggr), &ma_addr, &ma_size); if((addr1+TBLOCK_SIZE30) != ma_addr) TEST_ERROR @@ -2180,7 +2180,7 @@ test_mf_aggr_alloc1(const char *env_h5_drvr, hid_t fapl) if((addr2 = H5MF_alloc(f, type, (hsize_t)TBLOCK_SIZE50)) == HADDR_UNDEF) TEST_ERROR - H5MF_aggr_query(f, &(f->shared->meta_aggr), &ma_addr, &ma_size); + H5MF__aggr_query(f, &(f->shared->meta_aggr), &ma_addr, &ma_size); if((addr2+TBLOCK_SIZE50) != ma_addr) TEST_ERROR if(ma_size != (TBLOCK_SIZE2048 - (TBLOCK_SIZE30 + TBLOCK_SIZE50))) @@ -2311,13 +2311,13 @@ test_mf_aggr_alloc2(const char *env_h5_drvr, hid_t fapl) type = H5FD_MEM_SUPER; addr1 = H5MF_alloc(f, type, (hsize_t)TBLOCK_SIZE30); - H5MF_aggr_query(f, &(f->shared->meta_aggr), &ma_addr, &ma_size); + H5MF__aggr_query(f, &(f->shared->meta_aggr), &ma_addr, &ma_size); if((addr1+TBLOCK_SIZE30) != ma_addr) TEST_ERROR addr2 = H5MF_alloc(f, type, (hsize_t)TBLOCK_SIZE50); - H5MF_aggr_query(f, &(f->shared->meta_aggr), &ma_addr, &ma_size); + H5MF__aggr_query(f, &(f->shared->meta_aggr), &ma_addr, &ma_size); if((addr2+TBLOCK_SIZE50) != ma_addr) TEST_ERROR @@ -2326,7 +2326,7 @@ test_mf_aggr_alloc2(const char *env_h5_drvr, hid_t fapl) addr3 = H5MF_alloc(f, type, (hsize_t)TBLOCK_SIZE2058); - H5MF_aggr_query(f, &(f->shared->meta_aggr), &ma_addr, &ma_size); + H5MF__aggr_query(f, &(f->shared->meta_aggr), &ma_addr, &ma_size); if((addr3+TBLOCK_SIZE2058) != ma_addr) TEST_ERROR @@ -2468,14 +2468,14 @@ test_mf_aggr_alloc3(const char *env_h5_drvr, hid_t fapl) type = H5FD_MEM_SUPER; addr1 = H5MF_alloc(f, type, (hsize_t)TBLOCK_SIZE30); - H5MF_aggr_query(f, &(f->shared->meta_aggr), &ma_addr, &ma_size); + H5MF__aggr_query(f, &(f->shared->meta_aggr), &ma_addr, &ma_size); if ((addr1+TBLOCK_SIZE30) != ma_addr) TEST_ERROR /* Allocate second block from meta_aggr */ addr2 = H5MF_alloc(f, type, (hsize_t)TBLOCK_SIZE50); - H5MF_aggr_query(f, &(f->shared->meta_aggr), &ma_addr, &ma_size); + H5MF__aggr_query(f, &(f->shared->meta_aggr), &ma_addr, &ma_size); if((addr2+TBLOCK_SIZE50) != ma_addr) TEST_ERROR @@ -2485,7 +2485,7 @@ test_mf_aggr_alloc3(const char *env_h5_drvr, hid_t fapl) /* Allocate first block from sdata_aggr */ stype = H5FD_MEM_DRAW; saddr1 = H5MF_alloc(f, stype, (hsize_t)TBLOCK_SIZE30); - H5MF_aggr_query(f, &(f->shared->sdata_aggr), &sdata_addr, &sdata_size); + H5MF__aggr_query(f, &(f->shared->sdata_aggr), &sdata_addr, &sdata_size); if((saddr1+TBLOCK_SIZE30) != sdata_addr) TEST_ERROR if(sdata_size != (TBLOCK_SIZE2048 - TBLOCK_SIZE30)) TEST_ERROR @@ -2493,7 +2493,7 @@ test_mf_aggr_alloc3(const char *env_h5_drvr, hid_t fapl) /* Allocate third block, which is from file allocation not from meta_aggr */ addr3 = H5MF_alloc(f, type, (hsize_t)(TBLOCK_SIZE2058)); - H5MF_aggr_query(f, &(f->shared->meta_aggr), &new_ma_addr, &new_ma_size); + H5MF__aggr_query(f, &(f->shared->meta_aggr), &new_ma_addr, &new_ma_size); /* info for meta_aggr shouldn't be changed */ if(addr3 != (sdata_addr+sdata_size)) TEST_ERROR @@ -2502,7 +2502,7 @@ test_mf_aggr_alloc3(const char *env_h5_drvr, hid_t fapl) /* Allocate fourth block, which should be from meta_aggr */ addr4 = H5MF_alloc(f, type, (hsize_t)TBLOCK_SIZE50); - H5MF_aggr_query(f, &(f->shared->meta_aggr), &ma_addr, &ma_size); + H5MF__aggr_query(f, &(f->shared->meta_aggr), &ma_addr, &ma_size); if((addr4+TBLOCK_SIZE50) != ma_addr) TEST_ERROR @@ -2631,7 +2631,7 @@ test_mf_aggr_alloc4(const char *env_h5_drvr, hid_t fapl) type = H5FD_MEM_SUPER; addr1 = H5MF_alloc(f, type, (hsize_t)TBLOCK_SIZE30); - H5MF_aggr_query(f, &(f->shared->meta_aggr), &ma_addr, &ma_size); + H5MF__aggr_query(f, &(f->shared->meta_aggr), &ma_addr, &ma_size); if((addr1+TBLOCK_SIZE30) != ma_addr) TEST_ERROR @@ -2641,19 +2641,19 @@ test_mf_aggr_alloc4(const char *env_h5_drvr, hid_t fapl) /* Allocate first block from sdata_aggr */ stype = H5FD_MEM_DRAW; saddr1 = H5MF_alloc(f, stype, (hsize_t)TBLOCK_SIZE30); - H5MF_aggr_query(f, &(f->shared->sdata_aggr), &sdata_addr, &sdata_size); + H5MF__aggr_query(f, &(f->shared->sdata_aggr), &sdata_addr, &sdata_size); if((saddr1+TBLOCK_SIZE30) != sdata_addr) TEST_ERROR /* Allocate second block from sdata_aggr */ saddr2 = H5MF_alloc(f, stype, (hsize_t)(TBLOCK_SIZE2048 - TBLOCK_SIZE30)); - H5MF_aggr_query(f, &(f->shared->sdata_aggr), &sdata_addr, &sdata_size); + H5MF__aggr_query(f, &(f->shared->sdata_aggr), &sdata_addr, &sdata_size); if(saddr2+(TBLOCK_SIZE2048 - TBLOCK_SIZE30) != sdata_addr) TEST_ERROR /* Allocate third block from sdata_aggr */ saddr3 = H5MF_alloc(f, stype, (hsize_t)TBLOCK_SIZE50); - H5MF_aggr_query(f, &(f->shared->sdata_aggr), &sdata_addr, &sdata_size); + H5MF__aggr_query(f, &(f->shared->sdata_aggr), &sdata_addr, &sdata_size); if((saddr3+TBLOCK_SIZE50) != sdata_addr) TEST_ERROR @@ -2667,12 +2667,12 @@ test_mf_aggr_alloc4(const char *env_h5_drvr, hid_t fapl) TEST_ERROR /* sdata_aggr is reset 0 */ - H5MF_aggr_query(f, &(f->shared->sdata_aggr), &sdata_addr, &sdata_size); + H5MF__aggr_query(f, &(f->shared->sdata_aggr), &sdata_addr, &sdata_size); if((sdata_addr != 0) && (sdata_size != 0)) TEST_ERROR /* info is unchanged in meta_aggr */ - H5MF_aggr_query(f, &(f->shared->meta_aggr), &new_ma_addr, &new_ma_size); + H5MF__aggr_query(f, &(f->shared->meta_aggr), &new_ma_addr, &new_ma_size); if((new_ma_addr != ma_addr) && (new_ma_size != ma_size)) TEST_ERROR @@ -2779,13 +2779,13 @@ test_mf_aggr_alloc5(const char *env_h5_drvr, hid_t fapl) type = H5FD_MEM_SUPER; addr1 = H5MF_alloc(f, type, (hsize_t)TBLOCK_SIZE30); - H5MF_aggr_query(f, &(f->shared->meta_aggr), &ma_addr, &ma_size); + H5MF__aggr_query(f, &(f->shared->meta_aggr), &ma_addr, &ma_size); if((addr1+TBLOCK_SIZE30) != ma_addr) TEST_ERROR /* Allocate second block from meta_aggr */ addr2 = H5MF_alloc(f, type, (hsize_t)TBLOCK_SIZE50); - H5MF_aggr_query(f, &(f->shared->meta_aggr), &ma_addr, &ma_size); + H5MF__aggr_query(f, &(f->shared->meta_aggr), &ma_addr, &ma_size); if(addr2+TBLOCK_SIZE50 != ma_addr) TEST_ERROR @@ -2794,7 +2794,7 @@ test_mf_aggr_alloc5(const char *env_h5_drvr, hid_t fapl) /* Allocate third block from meta_aggr */ addr3 = H5MF_alloc(f, type, (hsize_t)TBLOCK_SIZE1970); - H5MF_aggr_query(f, &(f->shared->meta_aggr), &new_ma_addr, &new_ma_size); + H5MF__aggr_query(f, &(f->shared->meta_aggr), &new_ma_addr, &new_ma_size); if(addr3 != ma_addr) TEST_ERROR if((addr3+TBLOCK_SIZE1970) != new_ma_addr) TEST_ERROR @@ -2914,13 +2914,13 @@ test_mf_aggr_alloc6(const char *env_h5_drvr, hid_t fapl) /* Allocate first block from meta_aggr */ addr1 = H5MF_alloc(f, type, (hsize_t)TBLOCK_SIZE30); - H5MF_aggr_query(f, &(f->shared->meta_aggr), &ma_addr, &ma_size); + H5MF__aggr_query(f, &(f->shared->meta_aggr), &ma_addr, &ma_size); if((addr1+TBLOCK_SIZE30) != ma_addr) TEST_ERROR /* Allocate second block from meta_aggr */ addr2 = H5MF_alloc(f, type, (hsize_t)TBLOCK_SIZE50); - H5MF_aggr_query(f, &(f->shared->meta_aggr), &ma_addr, &ma_size); + H5MF__aggr_query(f, &(f->shared->meta_aggr), &ma_addr, &ma_size); if(addr2+TBLOCK_SIZE50 != ma_addr) TEST_ERROR @@ -2931,14 +2931,14 @@ test_mf_aggr_alloc6(const char *env_h5_drvr, hid_t fapl) stype = H5FD_MEM_DRAW; saddr1 = H5MF_alloc(f, stype, (hsize_t)TBLOCK_SIZE30); - H5MF_aggr_query(f, &(f->shared->sdata_aggr), &sdata_addr, &sdata_size); + H5MF__aggr_query(f, &(f->shared->sdata_aggr), &sdata_addr, &sdata_size); if((saddr1+TBLOCK_SIZE30) != sdata_addr) TEST_ERROR if(sdata_size != (TBLOCK_SIZE2048 - TBLOCK_SIZE30)) TEST_ERROR /* Allocate third block from meta_aggr */ addr3 = H5MF_alloc(f, type, (hsize_t)TBLOCK_SIZE1970); - H5MF_aggr_query(f, &(f->shared->meta_aggr), &new_ma_addr, &new_ma_size); + H5MF__aggr_query(f, &(f->shared->meta_aggr), &new_ma_addr, &new_ma_size); if((addr3+TBLOCK_SIZE1970) != new_ma_addr) TEST_ERROR if(addr3 != (sdata_addr+sdata_size)) TEST_ERROR @@ -3079,13 +3079,13 @@ test_mf_aggr_alloc7(const char *env_h5_drvr, hid_t fapl) /* Allocate the first block from meta_aggr */ type = H5FD_MEM_SUPER; addr1 = H5MF_alloc(f, type, (hsize_t)TBLOCK_SIZE30); - H5MF_aggr_query(f, &(f->shared->meta_aggr), &ma_addr, &ma_size); + H5MF__aggr_query(f, &(f->shared->meta_aggr), &ma_addr, &ma_size); if ((addr1+TBLOCK_SIZE30) != ma_addr) TEST_ERROR /* Allocate the second block from meta_aggr */ addr2 = H5MF_alloc(f, type, (hsize_t)TBLOCK_SIZE50); - H5MF_aggr_query(f, &(f->shared->meta_aggr), &ma_addr, &ma_size); + H5MF__aggr_query(f, &(f->shared->meta_aggr), &ma_addr, &ma_size); if (addr2+TBLOCK_SIZE50 != ma_addr) TEST_ERROR @@ -3095,14 +3095,14 @@ test_mf_aggr_alloc7(const char *env_h5_drvr, hid_t fapl) /* Allocate the first block from sdata_aggr */ stype = H5FD_MEM_DRAW; saddr1 = H5MF_alloc(f, stype, (hsize_t)TBLOCK_SIZE30); - H5MF_aggr_query(f, &(f->shared->sdata_aggr), &sdata_addr, &sdata_size); + H5MF__aggr_query(f, &(f->shared->sdata_aggr), &sdata_addr, &sdata_size); if ((saddr1+TBLOCK_SIZE30) != sdata_addr) TEST_ERROR /* Allocate the second block from sdata_aggr */ saddr2 = H5MF_alloc(f, stype, (hsize_t)TBLOCK_SIZE2048 - TBLOCK_SIZE30); - H5MF_aggr_query(f, &(f->shared->sdata_aggr), &sdata_addr, &sdata_size); + H5MF__aggr_query(f, &(f->shared->sdata_aggr), &sdata_addr, &sdata_size); if ((saddr2+(TBLOCK_SIZE2048 - TBLOCK_SIZE30)) != sdata_addr) TEST_ERROR if (sdata_size != 0) TEST_ERROR @@ -3110,7 +3110,7 @@ test_mf_aggr_alloc7(const char *env_h5_drvr, hid_t fapl) /* Allocate the third block from sdata_aggr */ saddr3 = H5MF_alloc(f, stype, (hsize_t)TBLOCK_SIZE50); - H5MF_aggr_query(f, &(f->shared->sdata_aggr), &sdata_addr, &sdata_size); + H5MF__aggr_query(f, &(f->shared->sdata_aggr), &sdata_addr, &sdata_size); if ((saddr3+TBLOCK_SIZE50) != sdata_addr) TEST_ERROR if (sdata_size != (TBLOCK_SIZE2048 - TBLOCK_SIZE50)) @@ -3118,14 +3118,14 @@ test_mf_aggr_alloc7(const char *env_h5_drvr, hid_t fapl) /* Allocate the third block from meta_aggr */ addr3 = H5MF_alloc(f, type, (hsize_t)TBLOCK_SIZE1970); - H5MF_aggr_query(f, &(f->shared->meta_aggr), &ma_addr, &ma_size); + H5MF__aggr_query(f, &(f->shared->meta_aggr), &ma_addr, &ma_size); if (addr3 != sdata_addr) TEST_ERROR if ((addr3 + TBLOCK_SIZE1970) != ma_addr) TEST_ERROR if (ma_size != (TBLOCK_SIZE2048 - TBLOCK_SIZE1970)) TEST_ERROR /* sdata_aggr info is reset to 0 */ - H5MF_aggr_query(f, &(f->shared->sdata_aggr), &sdata_addr, &sdata_size); + H5MF__aggr_query(f, &(f->shared->sdata_aggr), &sdata_addr, &sdata_size); if (sdata_addr != HADDR_UNDEF) TEST_ERROR if (sdata_size != 0) TEST_ERROR @@ -3242,7 +3242,7 @@ test_mf_aggr_extend(const char *env_h5_drvr, hid_t fapl) /* Allocate the first block from meta_aggr */ type = H5FD_MEM_SUPER; addr = H5MF_alloc(f, type, (hsize_t)TBLOCK_SIZE30); - H5MF_aggr_query(f, &(f->shared->meta_aggr), &ma_addr, &ma_size); + H5MF__aggr_query(f, &(f->shared->meta_aggr), &ma_addr, &ma_size); if((addr+TBLOCK_SIZE30) != ma_addr) TEST_ERROR @@ -3259,7 +3259,7 @@ test_mf_aggr_extend(const char *env_h5_drvr, hid_t fapl) if(!was_extended) TEST_ERROR - H5MF_aggr_query(f, &(f->shared->meta_aggr), &new_ma_addr, &new_ma_size); + H5MF__aggr_query(f, &(f->shared->meta_aggr), &new_ma_addr, &new_ma_size); if(new_ma_addr != (addr+TBLOCK_SIZE50)) TEST_ERROR @@ -3275,7 +3275,7 @@ test_mf_aggr_extend(const char *env_h5_drvr, hid_t fapl) if(!was_extended) TEST_ERROR - H5MF_aggr_query(f, &(f->shared->meta_aggr), &new_ma_addr, &new_ma_size); + H5MF__aggr_query(f, &(f->shared->meta_aggr), &new_ma_addr, &new_ma_size); if(new_ma_addr != (addr + TBLOCK_SIZE700)) TEST_ERROR @@ -3291,7 +3291,7 @@ test_mf_aggr_extend(const char *env_h5_drvr, hid_t fapl) if(!was_extended) TEST_ERROR - H5MF_aggr_query(f, &(f->shared->meta_aggr), &new_ma_addr, &new_ma_size); + H5MF__aggr_query(f, &(f->shared->meta_aggr), &new_ma_addr, &new_ma_size); if (new_ma_addr != (addr + TBLOCK_SIZE2058)) TEST_ERROR @@ -3333,14 +3333,14 @@ test_mf_aggr_extend(const char *env_h5_drvr, hid_t fapl) /* Allocate the first block from meta_aggr */ type = H5FD_MEM_SUPER; addr = H5MF_alloc(f, type, (hsize_t)TBLOCK_SIZE30); - H5MF_aggr_query(f, &(f->shared->meta_aggr), &ma_addr, &ma_size); + H5MF__aggr_query(f, &(f->shared->meta_aggr), &ma_addr, &ma_size); if((addr+TBLOCK_SIZE30) != ma_addr) TEST_ERROR /* Allocate the first block from sdata_aggr */ stype = H5FD_MEM_DRAW; saddr = H5MF_alloc(f, stype, (hsize_t)TBLOCK_SIZE50); - H5MF_aggr_query(f, &(f->shared->sdata_aggr), &sdata_addr, &sdata_size); + H5MF__aggr_query(f, &(f->shared->sdata_aggr), &sdata_addr, &sdata_size); if((saddr+TBLOCK_SIZE50) != sdata_addr) TEST_ERROR @@ -3356,7 +3356,7 @@ test_mf_aggr_extend(const char *env_h5_drvr, hid_t fapl) if(!was_extended) TEST_ERROR - H5MF_aggr_query(f, &(f->shared->meta_aggr), &new_ma_addr, &new_ma_size); + H5MF__aggr_query(f, &(f->shared->meta_aggr), &new_ma_addr, &new_ma_size); if(new_ma_addr != (addr+TBLOCK_SIZE50)) TEST_ERROR @@ -3403,14 +3403,14 @@ test_mf_aggr_extend(const char *env_h5_drvr, hid_t fapl) /* Allocate first block from meta_aggr */ type = H5FD_MEM_SUPER; addr = H5MF_alloc(f, type, (hsize_t)TBLOCK_SIZE30); - H5MF_aggr_query(f, &(f->shared->meta_aggr), &ma_addr, &ma_size); + H5MF__aggr_query(f, &(f->shared->meta_aggr), &ma_addr, &ma_size); if ((addr+TBLOCK_SIZE30) != ma_addr) TEST_ERROR /* Allocate first block from sdata_aggr */ stype = H5FD_MEM_DRAW; saddr = H5MF_alloc(f, stype, (hsize_t)TBLOCK_SIZE50); - H5MF_aggr_query(f, &(f->shared->sdata_aggr), &sdata_addr, &sdata_size); + H5MF__aggr_query(f, &(f->shared->sdata_aggr), &sdata_addr, &sdata_size); if((saddr+TBLOCK_SIZE50) != sdata_addr) TEST_ERROR @@ -3426,7 +3426,7 @@ test_mf_aggr_extend(const char *env_h5_drvr, hid_t fapl) if(was_extended) TEST_ERROR - H5MF_aggr_query(f, &(f->shared->meta_aggr), &new_ma_addr, &new_ma_size); + H5MF__aggr_query(f, &(f->shared->meta_aggr), &new_ma_addr, &new_ma_size); if (new_ma_addr != addr) TEST_ERROR if (new_ma_size != 0) TEST_ERROR @@ -3533,7 +3533,7 @@ test_mf_aggr_absorb(const char *env_h5_drvr, hid_t fapl) /* Allocate block A from meta_aggr */ type = H5FD_MEM_SUPER; addr1 = H5MF_alloc(f, type, (hsize_t)TBLOCK_SIZE30); - H5MF_aggr_query(f, &(f->shared->meta_aggr), &new_ma_addr, &new_ma_size); + H5MF__aggr_query(f, &(f->shared->meta_aggr), &new_ma_addr, &new_ma_size); ma_addr = new_ma_addr - TBLOCK_SIZE30; if((addr1 + TBLOCK_SIZE30) != new_ma_addr) @@ -3543,7 +3543,7 @@ test_mf_aggr_absorb(const char *env_h5_drvr, hid_t fapl) if(H5MF_try_shrink(f, type, addr1, (hsize_t)TBLOCK_SIZE30) <= 0) TEST_ERROR - H5MF_aggr_query(f, &(f->shared->meta_aggr), &new_ma_addr, &new_ma_size); + H5MF__aggr_query(f, &(f->shared->meta_aggr), &new_ma_addr, &new_ma_size); if(new_ma_addr != ma_addr) TEST_ERROR @@ -3580,7 +3580,7 @@ test_mf_aggr_absorb(const char *env_h5_drvr, hid_t fapl) /* Allocate block A from meta_aggr */ type = H5FD_MEM_SUPER; addr1 = H5MF_alloc(f, type, (hsize_t)TBLOCK_SIZE30); - H5MF_aggr_query(f, &(f->shared->meta_aggr), &ma_addr, &ma_size); + H5MF__aggr_query(f, &(f->shared->meta_aggr), &ma_addr, &ma_size); if((addr1+TBLOCK_SIZE30) != ma_addr) TEST_ERROR if(ma_size != (TBLOCK_SIZE2048 - TBLOCK_SIZE30)) TEST_ERROR @@ -3589,18 +3589,18 @@ test_mf_aggr_absorb(const char *env_h5_drvr, hid_t fapl) stype = H5FD_MEM_DRAW; saddr1 = H5MF_alloc(f, stype, (hsize_t)TBLOCK_SIZE50); - H5MF_aggr_query(f, &(f->shared->sdata_aggr), NULL, &sdata_size); + H5MF__aggr_query(f, &(f->shared->sdata_aggr), NULL, &sdata_size); /* should succeed */ if(H5MF_try_shrink(f, stype, saddr1, (hsize_t)TBLOCK_SIZE50) <= 0) TEST_ERROR - H5MF_aggr_query(f, &(f->shared->sdata_aggr), &new_sdata_addr, &new_sdata_size); + H5MF__aggr_query(f, &(f->shared->sdata_aggr), &new_sdata_addr, &new_sdata_size); if(new_sdata_addr != saddr1) TEST_ERROR if(new_sdata_size != sdata_size + TBLOCK_SIZE50) TEST_ERROR /* meta_aggr info should be updated because the block is absorbed into the meta_aggr */ - H5MF_aggr_query(f, &(f->shared->meta_aggr), &new_ma_addr, &new_ma_size); + H5MF__aggr_query(f, &(f->shared->meta_aggr), &new_ma_addr, &new_ma_size); if (new_ma_addr != ma_addr) TEST_ERROR if (new_ma_size != (ma_size)) TEST_ERROR @@ -3639,20 +3639,20 @@ test_mf_aggr_absorb(const char *env_h5_drvr, hid_t fapl) /* Allocate block A from meta_aggr */ type = H5FD_MEM_SUPER; addr1 = H5MF_alloc(f, type, (hsize_t)TBLOCK_SIZE30); - H5MF_aggr_query(f, &(f->shared->meta_aggr), &ma_addr, &ma_size); + H5MF__aggr_query(f, &(f->shared->meta_aggr), &ma_addr, &ma_size); if((addr1+TBLOCK_SIZE30) != ma_addr) TEST_ERROR /* Allocate block B from meta_aggr */ addr2 = H5MF_alloc(f, type, (hsize_t)TBLOCK_SIZE50); - H5MF_aggr_query(f, &(f->shared->meta_aggr), &ma_addr, &ma_size); + H5MF__aggr_query(f, &(f->shared->meta_aggr), &ma_addr, &ma_size); if((addr2+TBLOCK_SIZE50) != ma_addr) TEST_ERROR /* Allocate block C from meta_aggr */ addr3 = H5MF_alloc(f, type, (hsize_t)(TBLOCK_SIZE30+TBLOCK_SIZE50)); - H5MF_aggr_query(f, &(f->shared->meta_aggr), &ma_addr, &ma_size); + H5MF__aggr_query(f, &(f->shared->meta_aggr), &ma_addr, &ma_size); if((addr3+TBLOCK_SIZE30+TBLOCK_SIZE50) != ma_addr) TEST_ERROR @@ -3661,7 +3661,7 @@ test_mf_aggr_absorb(const char *env_h5_drvr, hid_t fapl) TEST_ERROR /* aggregator info should be the same as before */ - H5MF_aggr_query(f, &(f->shared->meta_aggr), &new_ma_addr, &new_ma_size); + H5MF__aggr_query(f, &(f->shared->meta_aggr), &new_ma_addr, &new_ma_size); if(new_ma_addr != ma_addr) TEST_ERROR H5MF_xfree(f, type, addr1, (hsize_t)TBLOCK_SIZE30); @@ -3799,7 +3799,7 @@ test_mf_align_eoa(const char *env_h5_drvr, hid_t fapl, hid_t new_fapl) if(addr1 % alignment) TEST_ERROR /* there should be nothing in the aggregator */ - H5MF_aggr_query(f, &(f->shared->meta_aggr), &ma_addr, &ma_size); + H5MF__aggr_query(f, &(f->shared->meta_aggr), &ma_addr, &ma_size); if(ma_addr || ma_size) TEST_ERROR HDmemset(&state, 0, sizeof(H5FS_stat_t)); @@ -3823,7 +3823,7 @@ test_mf_align_eoa(const char *env_h5_drvr, hid_t fapl, hid_t new_fapl) if (addr2 % alignment) TEST_ERROR /* there should be nothing in the aggregator */ - H5MF_aggr_query(f, &(f->shared->meta_aggr), &ma_addr, &ma_size); + H5MF__aggr_query(f, &(f->shared->meta_aggr), &ma_addr, &ma_size); if(ma_addr || ma_size) TEST_ERROR if(mis_align) { @@ -4054,7 +4054,7 @@ test_mf_align_fs(const char *env_h5_drvr, hid_t fapl, hid_t new_fapl) TEST_ERROR /* Create section A */ - sect_node = H5MF_sect_new(H5MF_FSPACE_SECT_SIMPLE, (haddr_t)alignment, (hsize_t)TBLOCK_SIZE50); + sect_node = H5MF__sect_new(H5MF_FSPACE_SECT_SIMPLE, (haddr_t)alignment, (hsize_t)TBLOCK_SIZE50); /* Add section A to free-space manager */ if(H5MF__add_sect(f, H5FD_MEM_SUPER, f->shared->fs_man[H5FD_MEM_SUPER], sect_node)) @@ -4117,7 +4117,7 @@ test_mf_align_fs(const char *env_h5_drvr, hid_t fapl, hid_t new_fapl) TEST_ERROR /* Create section A */ - sect_node = H5MF_sect_new(H5MF_FSPACE_SECT_SIMPLE, (haddr_t)TBLOCK_ADDR70, (hsize_t)TBLOCK_SIZE8000); + sect_node = H5MF__sect_new(H5MF_FSPACE_SECT_SIMPLE, (haddr_t)TBLOCK_ADDR70, (hsize_t)TBLOCK_SIZE8000); /* Add section A to free-space manager */ if(H5MF__add_sect(f, H5FD_MEM_SUPER, f->shared->fs_man[H5FD_MEM_SUPER], sect_node)) @@ -4200,7 +4200,7 @@ test_mf_align_fs(const char *env_h5_drvr, hid_t fapl, hid_t new_fapl) TEST_ERROR /* Create section A */ - sect_node = H5MF_sect_new(H5MF_FSPACE_SECT_SIMPLE, (haddr_t)TBLOCK_ADDR70, (hsize_t)TBLOCK_SIZE700); + sect_node = H5MF__sect_new(H5MF_FSPACE_SECT_SIMPLE, (haddr_t)TBLOCK_ADDR70, (hsize_t)TBLOCK_SIZE700); /* Add section A to free-space manager */ if(H5MF__add_sect(f, H5FD_MEM_SUPER, f->shared->fs_man[H5FD_MEM_SUPER], sect_node)) @@ -4429,7 +4429,7 @@ test_mf_align_alloc1(const char *env_h5_drvr, hid_t fapl, hid_t new_fapl) state.serial_sect_count += 1; } - H5MF_aggr_query(f, &(f->shared->meta_aggr), &ma_addr, &ma_size); + H5MF__aggr_query(f, &(f->shared->meta_aggr), &ma_addr, &ma_size); if ((addr1 + TBLOCK_SIZE30) != ma_addr) TEST_ERROR @@ -4452,7 +4452,7 @@ test_mf_align_alloc1(const char *env_h5_drvr, hid_t fapl, hid_t new_fapl) state.serial_sect_count += 1; } - H5MF_aggr_query(f, &(f->shared->meta_aggr), &ma_addr, &ma_size); + H5MF__aggr_query(f, &(f->shared->meta_aggr), &ma_addr, &ma_size); if((addr2 + TBLOCK_SIZE50) != ma_addr) TEST_ERROR @@ -4474,7 +4474,7 @@ test_mf_align_alloc1(const char *env_h5_drvr, hid_t fapl, hid_t new_fapl) state.serial_sect_count += 1; } - H5MF_aggr_query(f, &(f->shared->meta_aggr), &ma_addr, &ma_size); + H5MF__aggr_query(f, &(f->shared->meta_aggr), &ma_addr, &ma_size); if((addr3 + TBLOCK_SIZE80) != ma_addr) TEST_ERROR @@ -4497,7 +4497,7 @@ test_mf_align_alloc1(const char *env_h5_drvr, hid_t fapl, hid_t new_fapl) state.serial_sect_count += 1; } - H5MF_aggr_query(f, &(f->shared->meta_aggr), &ma_addr, &ma_size); + H5MF__aggr_query(f, &(f->shared->meta_aggr), &ma_addr, &ma_size); if((addr4 + TBLOCK_SIZE1970) != ma_addr) TEST_ERROR @@ -4685,7 +4685,7 @@ test_mf_align_alloc2(const char *env_h5_drvr, hid_t fapl, hid_t new_fapl) state[type].serial_sect_count += 1; } - H5MF_aggr_query(f, &(f->shared->meta_aggr), &ma_addr, &ma_size); + H5MF__aggr_query(f, &(f->shared->meta_aggr), &ma_addr, &ma_size); if((addr1 + TBLOCK_SIZE30) != ma_addr) TEST_ERROR @@ -4707,7 +4707,7 @@ test_mf_align_alloc2(const char *env_h5_drvr, hid_t fapl, hid_t new_fapl) state[type].serial_sect_count += 1; } - H5MF_aggr_query(f, &(f->shared->meta_aggr), &ma_addr, &ma_size); + H5MF__aggr_query(f, &(f->shared->meta_aggr), &ma_addr, &ma_size); if((addr2 + TBLOCK_SIZE50) != ma_addr) TEST_ERROR @@ -4743,8 +4743,8 @@ test_mf_align_alloc2(const char *env_h5_drvr, hid_t fapl, hid_t new_fapl) /* Verify that the allocated block is aligned */ if (saddr1 % alignment) TEST_ERROR - H5MF_aggr_query(f, &(f->shared->sdata_aggr), &sdata_addr, &sdata_size); - H5MF_aggr_query(f, &(f->shared->meta_aggr), &ma_addr, &ma_size); + H5MF__aggr_query(f, &(f->shared->sdata_aggr), &sdata_addr, &sdata_size); + H5MF__aggr_query(f, &(f->shared->meta_aggr), &ma_addr, &ma_size); if(sdata_addr != (saddr1 + TBLOCK_SIZE30)) TEST_ERROR @@ -4776,7 +4776,7 @@ test_mf_align_alloc2(const char *env_h5_drvr, hid_t fapl, hid_t new_fapl) state[type].serial_sect_count += 1; } - H5MF_aggr_query(f, &(f->shared->meta_aggr), &ma_addr, &ma_size); + H5MF__aggr_query(f, &(f->shared->meta_aggr), &ma_addr, &ma_size); if((addr3 + TBLOCK_SIZE80) != ma_addr) TEST_ERROR @@ -5024,7 +5024,7 @@ test_mf_align_alloc3(const char *env_h5_drvr, hid_t fapl, hid_t new_fapl) state[type].serial_sect_count += 1; } - H5MF_aggr_query(f, &(f->shared->meta_aggr), &ma_addr, &ma_size); + H5MF__aggr_query(f, &(f->shared->meta_aggr), &ma_addr, &ma_size); if ((addr1 + TBLOCK_SIZE30) != ma_addr) TEST_ERROR @@ -5046,7 +5046,7 @@ test_mf_align_alloc3(const char *env_h5_drvr, hid_t fapl, hid_t new_fapl) state[type].serial_sect_count += 1; } - H5MF_aggr_query(f, &(f->shared->meta_aggr), &ma_addr, &ma_size); + H5MF__aggr_query(f, &(f->shared->meta_aggr), &ma_addr, &ma_size); if((addr2 + TBLOCK_SIZE50) != ma_addr) TEST_ERROR @@ -5081,7 +5081,7 @@ test_mf_align_alloc3(const char *env_h5_drvr, hid_t fapl, hid_t new_fapl) state[stype].serial_sect_count += 1; } - H5MF_aggr_query(f, &(f->shared->sdata_aggr), &sdata_addr, &sdata_size); + H5MF__aggr_query(f, &(f->shared->sdata_aggr), &sdata_addr, &sdata_size); if(sdata_addr != (saddr1+TBLOCK_SIZE30)) TEST_ERROR /* calculate fragment for alignment of block 50 in sdata_aggr */ @@ -5102,7 +5102,7 @@ test_mf_align_alloc3(const char *env_h5_drvr, hid_t fapl, hid_t new_fapl) state[stype].serial_sect_count += 1; } - H5MF_aggr_query(f, &(f->shared->sdata_aggr), &sdata_addr, &sdata_size); + H5MF__aggr_query(f, &(f->shared->sdata_aggr), &sdata_addr, &sdata_size); if(sdata_addr != (saddr2 + TBLOCK_SIZE50)) TEST_ERROR /* calculate fragment for alignment of block 80 in sdata_aggr */ @@ -5123,7 +5123,7 @@ test_mf_align_alloc3(const char *env_h5_drvr, hid_t fapl, hid_t new_fapl) state[stype].serial_sect_count += 1; } - H5MF_aggr_query(f, &(f->shared->sdata_aggr), &sdata_addr, &sdata_size); + H5MF__aggr_query(f, &(f->shared->sdata_aggr), &sdata_addr, &sdata_size); if ((saddr3 + TBLOCK_SIZE80) != sdata_addr) TEST_ERROR @@ -5157,7 +5157,7 @@ test_mf_align_alloc3(const char *env_h5_drvr, hid_t fapl, hid_t new_fapl) state[type].serial_sect_count += 1; } - H5MF_aggr_query(f, &(f->shared->meta_aggr), &ma_addr, &ma_size); + H5MF__aggr_query(f, &(f->shared->meta_aggr), &ma_addr, &ma_size); if((addr3 + TBLOCK_SIZE1034) != ma_addr) TEST_ERROR @@ -5329,7 +5329,7 @@ test_mf_align_alloc4(const char *env_h5_drvr, hid_t fapl, hid_t new_fapl) state.serial_sect_count += 1; } - H5MF_aggr_query(f, &(f->shared->meta_aggr), &ma_addr, &ma_size); + H5MF__aggr_query(f, &(f->shared->meta_aggr), &ma_addr, &ma_size); saved_ma_size = ma_size; if((addr1+TBLOCK_SIZE30) != ma_addr) TEST_ERROR @@ -5351,7 +5351,7 @@ test_mf_align_alloc4(const char *env_h5_drvr, hid_t fapl, hid_t new_fapl) state.serial_sect_count += 1; } - H5MF_aggr_query(f, &(f->shared->meta_aggr), &ma_addr, &ma_size); + H5MF__aggr_query(f, &(f->shared->meta_aggr), &ma_addr, &ma_size); if((addr2 + TBLOCK_SIZE2058) != ma_addr) TEST_ERROR @@ -5532,7 +5532,7 @@ test_mf_align_alloc5(const char *env_h5_drvr, hid_t fapl, hid_t new_fapl) /* Verify that the allocated block is aligned */ if(addr1 % alignment) TEST_ERROR - H5MF_aggr_query(f, &(f->shared->meta_aggr), &ma_addr, &ma_size); + H5MF__aggr_query(f, &(f->shared->meta_aggr), &ma_addr, &ma_size); if((addr1 + TBLOCK_SIZE30) != ma_addr) TEST_ERROR @@ -5563,7 +5563,7 @@ test_mf_align_alloc5(const char *env_h5_drvr, hid_t fapl, hid_t new_fapl) state[stype].serial_sect_count += 1; } - H5MF_aggr_query(f, &(f->shared->sdata_aggr), &sdata_addr, &sdata_size); + H5MF__aggr_query(f, &(f->shared->sdata_aggr), &sdata_addr, &sdata_size); if((saddr1+TBLOCK_SIZE30) != sdata_addr) TEST_ERROR /* calculate fragment for alignment of block 2058 from meta_aggr */ @@ -5596,12 +5596,12 @@ test_mf_align_alloc5(const char *env_h5_drvr, hid_t fapl, hid_t new_fapl) } /* nothing is changed in meta_aggr */ - H5MF_aggr_query(f, &(f->shared->meta_aggr), &new_ma_addr, &new_ma_size); + H5MF__aggr_query(f, &(f->shared->meta_aggr), &new_ma_addr, &new_ma_size); if (new_ma_addr != ma_addr || new_ma_size != ma_size) TEST_ERROR /* nothing is changed in sdata_aggr */ - H5MF_aggr_query(f, &(f->shared->sdata_aggr), &new_sdata_addr, &new_sdata_size); + H5MF__aggr_query(f, &(f->shared->sdata_aggr), &new_sdata_addr, &new_sdata_size); if (new_sdata_addr != sdata_addr || new_sdata_size != sdata_size) TEST_ERROR @@ -5804,7 +5804,7 @@ test_mf_align_alloc6(const char *env_h5_drvr, hid_t fapl, hid_t new_fapl) state[type].serial_sect_count += 1; } - H5MF_aggr_query(f, &(f->shared->meta_aggr), &ma_addr, &ma_size); + H5MF__aggr_query(f, &(f->shared->meta_aggr), &ma_addr, &ma_size); if ((addr1+TBLOCK_SIZE30) != ma_addr) TEST_ERROR @@ -5827,7 +5827,7 @@ test_mf_align_alloc6(const char *env_h5_drvr, hid_t fapl, hid_t new_fapl) state[stype].serial_sect_count += 1; } - H5MF_aggr_query(f, &(f->shared->sdata_aggr), &sdata_addr, &sdata_size); + H5MF__aggr_query(f, &(f->shared->sdata_aggr), &sdata_addr, &sdata_size); if (sdata_addr != (saddr1+TBLOCK_SIZE30)) TEST_ERROR /* calculate fragment for alignment of block 50 in sdata_aggr */ @@ -5848,7 +5848,7 @@ test_mf_align_alloc6(const char *env_h5_drvr, hid_t fapl, hid_t new_fapl) state[stype].serial_sect_count += 1; } - H5MF_aggr_query(f, &(f->shared->sdata_aggr), &sdata_addr, &sdata_size); + H5MF__aggr_query(f, &(f->shared->sdata_aggr), &sdata_addr, &sdata_size); if (sdata_addr != (saddr2+TBLOCK_SIZE50)) TEST_ERROR /* calculate fragment for alignment of block 80 in sdata_aggr */ @@ -5869,7 +5869,7 @@ test_mf_align_alloc6(const char *env_h5_drvr, hid_t fapl, hid_t new_fapl) state[stype].serial_sect_count += 1; } - H5MF_aggr_query(f, &(f->shared->sdata_aggr), &sdata_addr, &sdata_size); + H5MF__aggr_query(f, &(f->shared->sdata_aggr), &sdata_addr, &sdata_size); if (sdata_addr != (saddr3+TBLOCK_SIZE80)) TEST_ERROR /* calculate fragment for alignment of block 2058 */ @@ -5891,8 +5891,8 @@ test_mf_align_alloc6(const char *env_h5_drvr, hid_t fapl, hid_t new_fapl) state[type].serial_sect_count += 1; } - H5MF_aggr_query(f, &(f->shared->meta_aggr), &new_ma_addr, &new_ma_size); - H5MF_aggr_query(f, &(f->shared->sdata_aggr), &sdata_addr, &sdata_size); + H5MF__aggr_query(f, &(f->shared->meta_aggr), &new_ma_addr, &new_ma_size); + H5MF__aggr_query(f, &(f->shared->sdata_aggr), &sdata_addr, &sdata_size); if (new_ma_addr != ma_addr && new_ma_size != ma_size) TEST_ERROR @@ -6815,7 +6815,7 @@ test_mf_fs_persist(const char *env_h5_drvr, hid_t fapl, hbool_t new_format) if(NULL == (f = (H5F_t *)H5I_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, 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])) @@ -6996,7 +6996,7 @@ test_mf_fs_gone(const char *env_h5_drvr, hid_t fapl, hbool_t new_format) if(NULL == (f = (H5F_t *)H5I_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, 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])) @@ -7208,7 +7208,7 @@ test_mf_strat_thres_persist(const char *env_h5_drvr, hid_t fapl, hbool_t new_for if(NULL == (f = (H5F_t *)H5I_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, type, TBLOCK_SIZE6, (H5F_mem_page_t *)&tt); /* Get a pointer to the internal file object */ if(NULL == (f = (H5F_t *)H5I_object(file))) @@ -7359,7 +7359,7 @@ 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, 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) { @@ -7671,7 +7671,7 @@ test_page_alloc_xfree(const char *env_h5_drvr, hid_t fapl) 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, H5FD_MEM_OHDR, TBLOCK_SIZE1034, (H5F_mem_page_t *)&fs_type); /* Verify that the freed block with addr2 is found from the small meta data manager */ if(H5MF__find_sect(f, H5FD_MEM_OHDR, (hsize_t)TBLOCK_SIZE1034, f->shared->fs_man[fs_type], &found_addr) < 0) @@ -7704,7 +7704,7 @@ test_page_alloc_xfree(const char *env_h5_drvr, hid_t fapl) 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, 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) @@ -7731,12 +7731,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, 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 meta data 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, 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 @@ -7777,7 +7777,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, 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 */ diff --git a/test/mount.c b/test/mount.c index d2c0d21..c6230ee 100644 --- a/test/mount.c +++ b/test/mount.c @@ -412,7 +412,7 @@ test_hide(hid_t fapl) FAIL_STACK_ERROR /* Get information about file1:/mnt1/file1 for later */ - if(H5Oget_info_by_name(file1, "/mnt1/file1", &oi1, H5P_DEFAULT) < 0) FAIL_STACK_ERROR + if(H5Oget_info_by_name2(file1, "/mnt1/file1", &oi1, H5O_INFO_BASIC, H5P_DEFAULT) < 0) FAIL_STACK_ERROR /* Build the virtual file */ if(H5Fmount(file1, "/mnt1", file2, H5P_DEFAULT) < 0) FAIL_STACK_ERROR @@ -431,7 +431,7 @@ test_hide(hid_t fapl) * The original objects under file1:/mnt1 are still accessible by their * other names. This is a rather stupid test but demonstrates a point. */ - if(H5Oget_info_by_name(file1, "/file1", &oi2, H5P_DEFAULT) < 0) FAIL_STACK_ERROR + if(H5Oget_info_by_name2(file1, "/file1", &oi2, H5O_INFO_BASIC, H5P_DEFAULT) < 0) FAIL_STACK_ERROR if(oi1.fileno != oi2.fileno || H5F_addr_ne(oi1.addr, oi2.addr)) { H5_FAILED(); puts(" Hard link failed for hidden object."); @@ -490,7 +490,7 @@ test_assoc(hid_t fapl) FAIL_STACK_ERROR /* Get information about the root of file2 */ - if(H5Oget_info(file2, &oi1) < 0) FAIL_STACK_ERROR + if(H5Oget_info2(file2, &oi1, H5O_INFO_BASIC) < 0) FAIL_STACK_ERROR /* Create the virtual file */ if(H5Fmount(file1, "/mnt1", file2, H5P_DEFAULT) < 0) FAIL_STACK_ERROR @@ -499,7 +499,7 @@ test_assoc(hid_t fapl) * Get info about the mount point -- should be the same as the root group * of file2. */ - if(H5Oget_info_by_name(file1, "/mnt1", &oi2, H5P_DEFAULT) < 0) FAIL_STACK_ERROR + if(H5Oget_info_by_name2(file1, "/mnt1", &oi2, H5O_INFO_BASIC, H5P_DEFAULT) < 0) FAIL_STACK_ERROR if(oi1.fileno != oi2.fileno || H5F_addr_ne(oi1.addr, oi2.addr)) { H5_FAILED(); @@ -688,7 +688,7 @@ test_preopen(hid_t fapl) if(H5Fmount(file1, "/mnt1", file2, H5P_DEFAULT) < 0) FAIL_STACK_ERROR /* Now access the thing we previously opened */ - if(H5Oget_info(grp, &oinfo) < 0) FAIL_STACK_ERROR + if(H5Oget_info2(grp, &oinfo, H5O_INFO_BASIC) < 0) FAIL_STACK_ERROR /* Shut down */ if(H5Funmount(file1, "/mnt1") < 0) FAIL_STACK_ERROR @@ -752,10 +752,10 @@ test_postopen(hid_t fapl) if(H5Funmount(file1, "/mnt1") < 0) FAIL_STACK_ERROR /* Now access the thing we previously opened */ - if(H5Oget_info(grp, &oinfo) < 0) FAIL_STACK_ERROR + if(H5Oget_info2(grp, &oinfo, H5O_INFO_BASIC) < 0) FAIL_STACK_ERROR /* Try accessing it from the file */ - if(H5Oget_info_by_name(file2, "/file2", &oinfo, H5P_DEFAULT) < 0) FAIL_STACK_ERROR + if(H5Oget_info_by_name2(file2, "/file2", &oinfo, H5O_INFO_BASIC, H5P_DEFAULT) < 0) FAIL_STACK_ERROR /* Shut down */ if(H5Gclose(grp) < 0) FAIL_STACK_ERROR @@ -825,12 +825,12 @@ test_unlink(hid_t fapl) * before the H5Fmount() and thus refers to the mount point itself rather * than the group mounted there. */ - if(H5Oget_info_by_name(file1, "/mnt_unlink/file2", &oinfo, H5P_DEFAULT) < 0) FAIL_STACK_ERROR - if(H5Oget_info_by_name(mnt, "/mnt_unlink/file2", &oinfo, H5P_DEFAULT) < 0) FAIL_STACK_ERROR - if(H5Oget_info_by_name(root, "/mnt_unlink/file2", &oinfo, H5P_DEFAULT) < 0) FAIL_STACK_ERROR - if(H5Oget_info_by_name(root, "file2", &oinfo, H5P_DEFAULT) < 0) FAIL_STACK_ERROR + if(H5Oget_info_by_name2(file1, "/mnt_unlink/file2", &oinfo, H5O_INFO_BASIC, H5P_DEFAULT) < 0) FAIL_STACK_ERROR + if(H5Oget_info_by_name2(mnt, "/mnt_unlink/file2", &oinfo, H5O_INFO_BASIC, H5P_DEFAULT) < 0) FAIL_STACK_ERROR + if(H5Oget_info_by_name2(root, "/mnt_unlink/file2", &oinfo, H5O_INFO_BASIC, H5P_DEFAULT) < 0) FAIL_STACK_ERROR + if(H5Oget_info_by_name2(root, "file2", &oinfo, H5O_INFO_BASIC, H5P_DEFAULT) < 0) FAIL_STACK_ERROR H5E_BEGIN_TRY { - status = H5Oget_info_by_name(mnt, "file2", &oinfo, H5P_DEFAULT); + status = H5Oget_info_by_name2(mnt, "file2", &oinfo, H5O_INFO_BASIC, H5P_DEFAULT); } H5E_END_TRY; if(status >= 0) { H5_FAILED(); @@ -845,9 +845,9 @@ test_unlink(hid_t fapl) * We should still be able to get to "/file2" of file2 by starting at * `root' which is still open, but not by name. */ - if(H5Oget_info_by_name(root, "file2", &oinfo, H5P_DEFAULT) < 0) FAIL_STACK_ERROR + if(H5Oget_info_by_name2(root, "file2", &oinfo, H5O_INFO_BASIC, H5P_DEFAULT) < 0) FAIL_STACK_ERROR H5E_BEGIN_TRY { - status = H5Oget_info_by_name(mnt, "file2", &oinfo, H5P_DEFAULT); + status = H5Oget_info_by_name2(mnt, "file2", &oinfo, H5O_INFO_BASIC, H5P_DEFAULT); } H5E_END_TRY; if(status >= 0) { H5_FAILED(); @@ -855,7 +855,7 @@ test_unlink(hid_t fapl) TEST_ERROR } /* end if */ H5E_BEGIN_TRY { - status = H5Oget_info_by_name(file2, "/mnt_unlink/file2", &oinfo, H5P_DEFAULT); + status = H5Oget_info_by_name2(file2, "/mnt_unlink/file2", &oinfo, H5O_INFO_BASIC, H5P_DEFAULT); } H5E_END_TRY; if(status >= 0) { H5_FAILED(); @@ -943,7 +943,7 @@ test_mvmpt(hid_t fapl) if(H5Lmove(file1, "/mnt_move_a", H5L_SAME_LOC, "/mnt_move_b", H5P_DEFAULT, H5P_DEFAULT) < 0) FAIL_STACK_ERROR /* Access something under the new name */ - if(H5Oget_info_by_name(file1, "/mnt_move_b/file2", &oinfo, H5P_DEFAULT) < 0) FAIL_STACK_ERROR + if(H5Oget_info_by_name2(file1, "/mnt_move_b/file2", &oinfo, H5O_INFO_BASIC, H5P_DEFAULT) < 0) FAIL_STACK_ERROR /* Shut down */ if(H5Funmount(file1, "/mnt_move_b") < 0) FAIL_STACK_ERROR @@ -1102,18 +1102,18 @@ test_uniformity(hid_t fapl) if(H5Fmount(file1, "/mnt1", file2, H5P_DEFAULT) < 0) FAIL_STACK_ERROR /* Access some things from the file1 handle */ - if(H5Oget_info_by_name(file1, "/", &oinfo, H5P_DEFAULT) < 0) FAIL_STACK_ERROR - if(H5Oget_info_by_name(file1, "/mnt1", &oinfo, H5P_DEFAULT) < 0) FAIL_STACK_ERROR - if(H5Oget_info_by_name(file1, "mnt1", &oinfo, H5P_DEFAULT) < 0) FAIL_STACK_ERROR - if(H5Oget_info_by_name(file1, "/mnt1/file2", &oinfo, H5P_DEFAULT) < 0) FAIL_STACK_ERROR - if(H5Oget_info_by_name(file1, "mnt1/file2", &oinfo, H5P_DEFAULT) < 0) FAIL_STACK_ERROR + if(H5Oget_info_by_name2(file1, "/", &oinfo, H5O_INFO_BASIC, H5P_DEFAULT) < 0) FAIL_STACK_ERROR + if(H5Oget_info_by_name2(file1, "/mnt1", &oinfo, H5O_INFO_BASIC, H5P_DEFAULT) < 0) FAIL_STACK_ERROR + if(H5Oget_info_by_name2(file1, "mnt1", &oinfo, H5O_INFO_BASIC, H5P_DEFAULT) < 0) FAIL_STACK_ERROR + if(H5Oget_info_by_name2(file1, "/mnt1/file2", &oinfo, H5O_INFO_BASIC, H5P_DEFAULT) < 0) FAIL_STACK_ERROR + if(H5Oget_info_by_name2(file1, "mnt1/file2", &oinfo, H5O_INFO_BASIC, H5P_DEFAULT) < 0) FAIL_STACK_ERROR /* Access the same things from the file2 handle */ - if(H5Oget_info_by_name(file2, "/", &oinfo, H5P_DEFAULT) < 0) FAIL_STACK_ERROR - if(H5Oget_info_by_name(file2, "/mnt1", &oinfo, H5P_DEFAULT) < 0) FAIL_STACK_ERROR - if(H5Oget_info_by_name(file2, "mnt1", &oinfo, H5P_DEFAULT) < 0) FAIL_STACK_ERROR - if(H5Oget_info_by_name(file2, "/mnt1/file2", &oinfo, H5P_DEFAULT) < 0) FAIL_STACK_ERROR - if(H5Oget_info_by_name(file2, "mnt1/file2", &oinfo, H5P_DEFAULT) < 0) FAIL_STACK_ERROR + if(H5Oget_info_by_name2(file2, "/", &oinfo, H5O_INFO_BASIC, H5P_DEFAULT) < 0) FAIL_STACK_ERROR + if(H5Oget_info_by_name2(file2, "/mnt1", &oinfo, H5O_INFO_BASIC, H5P_DEFAULT) < 0) FAIL_STACK_ERROR + if(H5Oget_info_by_name2(file2, "mnt1", &oinfo, H5O_INFO_BASIC, H5P_DEFAULT) < 0) FAIL_STACK_ERROR + if(H5Oget_info_by_name2(file2, "/mnt1/file2", &oinfo, H5O_INFO_BASIC, H5P_DEFAULT) < 0) FAIL_STACK_ERROR + if(H5Oget_info_by_name2(file2, "mnt1/file2", &oinfo, H5O_INFO_BASIC, H5P_DEFAULT) < 0) FAIL_STACK_ERROR /* Shut down */ if(H5Funmount(file1, "/mnt1") < 0) FAIL_STACK_ERROR @@ -1170,7 +1170,7 @@ test_close(hid_t fapl) * still accessible through the file2 handle. */ if(H5Fclose(file1) < 0) FAIL_STACK_ERROR - if(H5Oget_info_by_name(file2, "/mnt1", &oinfo, H5P_DEFAULT) < 0) { + if(H5Oget_info_by_name2(file2, "/mnt1", &oinfo, H5O_INFO_BASIC, H5P_DEFAULT) < 0) { H5_FAILED(); puts(" File1 contents are not accessible!"); TEST_ERROR @@ -1191,7 +1191,7 @@ test_close(hid_t fapl) * Close file2. It is not actually closed because it's a child of file1. */ if(H5Fclose(file2) < 0) FAIL_STACK_ERROR - if(H5Oget_info_by_name(file1, "/mnt1/file2", &oinfo, H5P_DEFAULT) < 0) FAIL_STACK_ERROR + if(H5Oget_info_by_name2(file1, "/mnt1/file2", &oinfo, H5O_INFO_BASIC, H5P_DEFAULT) < 0) FAIL_STACK_ERROR if(H5Fclose(file1) < 0) FAIL_STACK_ERROR /* Check that all file IDs have been closed */ @@ -2495,9 +2495,9 @@ test_fcdegree_strong(hid_t fapl) TEST_ERROR /* Check that objects are still open */ - if(H5Oget_info(gidA, &oinfo) < 0) + if(H5Oget_info2(gidA, &oinfo, H5O_INFO_BASIC) < 0) TEST_ERROR - if(H5Oget_info(gidAM, &oinfo) < 0) + if(H5Oget_info2(gidAM, &oinfo, H5O_INFO_BASIC) < 0) TEST_ERROR /* Close file #2 (should close open objects also) */ @@ -2506,12 +2506,12 @@ test_fcdegree_strong(hid_t fapl) /* Check that objects are closed */ H5E_BEGIN_TRY { - ret = H5Oget_info(gidA, &oinfo); + ret = H5Oget_info2(gidA, &oinfo, H5O_INFO_BASIC); } H5E_END_TRY; if(ret >= 0) TEST_ERROR H5E_BEGIN_TRY { - ret = H5Oget_info(gidAM, &oinfo); + ret = H5Oget_info2(gidAM, &oinfo, H5O_INFO_BASIC); } H5E_END_TRY; if(ret >= 0) TEST_ERROR diff --git a/test/mtime.c b/test/mtime.c index 38e3960..2cd2d31 100644 --- a/test/mtime.c +++ b/test/mtime.c @@ -90,9 +90,9 @@ main(void) */ h5_fixname(FILENAME[0], fapl, filename, sizeof filename); if((file = H5Fopen(filename, H5F_ACC_RDONLY, fapl)) < 0) TEST_ERROR; - if(H5Oget_info_by_name(file, "dset", &oi1, H5P_DEFAULT) < 0) TEST_ERROR; + if(H5Oget_info_by_name2(file, "dset", &oi1, H5O_INFO_BASIC|H5O_INFO_TIME, H5P_DEFAULT) < 0) TEST_ERROR; if((dset = H5Dopen2(file, "dset", H5P_DEFAULT)) < 0) TEST_ERROR; - if(H5Oget_info(dset, &oi2) < 0) TEST_ERROR; + if(H5Oget_info2(dset, &oi2, H5O_INFO_BASIC|H5O_INFO_TIME) < 0) TEST_ERROR; if(H5Dclose(dset) < 0) TEST_ERROR; if(H5Fclose(file) < 0) TEST_ERROR; @@ -134,7 +134,7 @@ main(void) file = H5Fopen(testfile, H5F_ACC_RDONLY, H5P_DEFAULT); if(file >= 0){ - if(H5Oget_info_by_name(file, "/Dataset1", &oi1, H5P_DEFAULT) < 0) + if(H5Oget_info_by_name2(file, "/Dataset1", &oi1, H5O_INFO_TIME, H5P_DEFAULT) < 0) TEST_ERROR; if(oi1.ctime != MTIME1) { H5_FAILED(); @@ -164,7 +164,7 @@ main(void) file = H5Fopen(testfile, H5F_ACC_RDONLY, H5P_DEFAULT); if(file >= 0){ - if(H5Oget_info_by_name(file, "/Dataset1", &oi2, H5P_DEFAULT) < 0) + if(H5Oget_info_by_name2(file, "/Dataset1", &oi2, H5O_INFO_TIME, H5P_DEFAULT) < 0) TEST_ERROR; if(oi2.ctime != MTIME2) { H5_FAILED(); diff --git a/test/objcopy.c b/test/objcopy.c index 3fbb7b8..18de027 100644 --- a/test/objcopy.c +++ b/test/objcopy.c @@ -877,10 +877,10 @@ compare_std_attributes(hid_t oid, hid_t oid2, hid_t pid) cpy_flags = 0; /* Check the number of attributes on source dataset */ - if(H5Oget_info(oid, &oinfo1) < 0) TEST_ERROR + if(H5Oget_info2(oid, &oinfo1, H5O_INFO_NUM_ATTRS) < 0) TEST_ERROR /* Check the number of attributes on destination dataset */ - if(H5Oget_info(oid2, &oinfo2) < 0) TEST_ERROR + if(H5Oget_info2(oid2, &oinfo2, H5O_INFO_NUM_ATTRS) < 0) TEST_ERROR if(cpy_flags & H5O_COPY_WITHOUT_ATTR_FLAG) { /* Check that the destination has no attributes */ @@ -1071,8 +1071,8 @@ compare_data(hid_t parent1, hid_t parent2, hid_t pid, hid_t tid, size_t nelmts, if(obj_owner > 0) { H5O_info_t oinfo1, oinfo2; - if(H5Oget_info(obj_owner, &oinfo1) < 0) TEST_ERROR - if(H5Oget_info(obj1_id, &oinfo2) < 0) TEST_ERROR + if(H5Oget_info2(obj_owner, &oinfo1, H5O_INFO_BASIC) < 0) TEST_ERROR + if(H5Oget_info2(obj1_id, &oinfo2, H5O_INFO_BASIC) < 0) TEST_ERROR if(H5F_addr_eq(oinfo1.addr, oinfo2.addr)) { if(H5Oclose(obj1_id) < 0) TEST_ERROR if(H5Oclose(obj2_id) < 0) TEST_ERROR @@ -1129,8 +1129,8 @@ compare_data(hid_t parent1, hid_t parent2, hid_t pid, hid_t tid, size_t nelmts, if(obj_owner > 0) { H5O_info_t oinfo1, oinfo2; - if(H5Oget_info(obj_owner, &oinfo1) < 0) TEST_ERROR - if(H5Oget_info(obj1_id, &oinfo2) < 0) TEST_ERROR + if(H5Oget_info2(obj_owner, &oinfo1, H5O_INFO_BASIC) < 0) TEST_ERROR + if(H5Oget_info2(obj1_id, &oinfo2, H5O_INFO_BASIC) < 0) TEST_ERROR if(H5F_addr_eq(oinfo1.addr, oinfo2.addr)) { if(H5Oclose(obj1_id) < 0) TEST_ERROR if(H5Oclose(obj2_id) < 0) TEST_ERROR @@ -1423,8 +1423,8 @@ compare_groups(hid_t gid, hid_t gid2, hid_t pid, int depth, unsigned copy_flags) H5O_info_t oinfo, oinfo2; /* Object info */ /* Compare some pieces of the object info */ - if(H5Oget_info_by_name(gid, objname, &oinfo, H5P_DEFAULT) < 0) TEST_ERROR - if(H5Oget_info_by_name(gid2, objname2, &oinfo2, H5P_DEFAULT) < 0) TEST_ERROR + if(H5Oget_info_by_name2(gid, objname, &oinfo, H5O_INFO_BASIC|H5O_INFO_HDR, H5P_DEFAULT) < 0) TEST_ERROR + if(H5Oget_info_by_name2(gid2, objname2, &oinfo2, H5O_INFO_BASIC|H5O_INFO_HDR, H5P_DEFAULT) < 0) TEST_ERROR if(oinfo.type != oinfo2.type) TEST_ERROR if(oinfo.rc != oinfo2.rc) TEST_ERROR @@ -1949,8 +1949,8 @@ test_copy_named_datatype_attr_self(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fap if(H5Tcommitted(tid) != TRUE) TEST_ERROR /* verify that the addresses of the datatypes are the same */ - if(H5Oget_info(tid, &oinfo) < 0) TEST_ERROR - if(H5Oget_info(tid2, &oinfo2) < 0) TEST_ERROR + if(H5Oget_info2(tid, &oinfo, H5O_INFO_BASIC) < 0) TEST_ERROR + if(H5Oget_info2(tid2, &oinfo2, H5O_INFO_BASIC) < 0) TEST_ERROR if(oinfo.fileno != oinfo2.fileno || oinfo.addr != oinfo2.addr) FAIL_PUTS_ERROR("destination attribute does not use the same committed datatype") @@ -10331,28 +10331,28 @@ test_copy_committed_datatype_merge(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fap /* Open SRC1 committed dtype, get address */ if((tid = H5Topen2(fid_dst, NAME_GROUP_TOP "/" NAME_DATATYPE_SIMPLE, H5P_DEFAULT)) < 0) TEST_ERROR - if(H5Oget_info(tid, &oinfo) < 0) TEST_ERROR + if(H5Oget_info2(tid, &oinfo, H5O_INFO_BASIC) < 0) TEST_ERROR exp_addr = oinfo.addr; if(H5Tclose(tid) < 0) TEST_ERROR /* Open SRC1 dset dtype, check address */ if((did = H5Dopen2(fid_dst, NAME_GROUP_TOP "/" NAME_DATASET_SIMPLE, H5P_DEFAULT)) < 0) TEST_ERROR if((tid = H5Dget_type(did)) < 0) TEST_ERROR - if(H5Oget_info(tid, &oinfo) < 0) TEST_ERROR + if(H5Oget_info2(tid, &oinfo, H5O_INFO_BASIC) < 0) TEST_ERROR if(oinfo.addr != exp_addr) TEST_ERROR if(H5Tclose(tid) < 0) TEST_ERROR if(H5Dclose(did) < 0) TEST_ERROR /* Open SRC2 committed dtype, check address */ if((tid = H5Topen2(fid_dst, NAME_GROUP_TOP2 "/" NAME_DATATYPE_SIMPLE, H5P_DEFAULT)) < 0) TEST_ERROR - if(H5Oget_info(tid, &oinfo) < 0) TEST_ERROR + if(H5Oget_info2(tid, &oinfo, H5O_INFO_BASIC) < 0) TEST_ERROR if(oinfo.addr != exp_addr) TEST_ERROR if(H5Tclose(tid) < 0) TEST_ERROR /* Open SRC2 dset dtype, check address */ if((did = H5Dopen2(fid_dst, NAME_GROUP_TOP2 "/" NAME_DATASET_SIMPLE, H5P_DEFAULT)) < 0) TEST_ERROR if((tid = H5Dget_type(did)) < 0) TEST_ERROR - if(H5Oget_info(tid, &oinfo) < 0) TEST_ERROR + if(H5Oget_info2(tid, &oinfo, H5O_INFO_BASIC) < 0) TEST_ERROR if(oinfo.addr != exp_addr) TEST_ERROR if(H5Tclose(tid) < 0) TEST_ERROR if(H5Dclose(did) < 0) TEST_ERROR @@ -10385,7 +10385,7 @@ test_copy_committed_datatype_merge(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fap /* Open SRC1 dset dtype, get address */ if((did = H5Dopen2(fid_dst, NAME_DATASET_SIMPLE, H5P_DEFAULT)) < 0) TEST_ERROR if((tid = H5Dget_type(did)) < 0) TEST_ERROR - if(H5Oget_info(tid, &oinfo) < 0) TEST_ERROR + if(H5Oget_info2(tid, &oinfo, H5O_INFO_BASIC) < 0) TEST_ERROR exp_addr = oinfo.addr; if(H5Tclose(tid) < 0) TEST_ERROR if(H5Dclose(did) < 0) TEST_ERROR @@ -10393,7 +10393,7 @@ test_copy_committed_datatype_merge(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fap /* Open SRC2 dset dtype, check address */ if((did = H5Dopen2(fid_dst, NAME_DATASET_SIMPLE2, H5P_DEFAULT)) < 0) TEST_ERROR if((tid = H5Dget_type(did)) < 0) TEST_ERROR - if(H5Oget_info(tid, &oinfo) < 0) TEST_ERROR + if(H5Oget_info2(tid, &oinfo, H5O_INFO_BASIC) < 0) TEST_ERROR if(oinfo.addr != exp_addr) TEST_ERROR if(H5Tclose(tid) < 0) TEST_ERROR if(H5Dclose(did) < 0) TEST_ERROR @@ -10565,28 +10565,28 @@ test_copy_committed_datatype_merge_same_file(hid_t fcpl, hid_t fapl, hbool_t reo /* Open group 1 source committed dtype, get address */ if((tid = H5Topen2(fid, NAME_GROUP_TOP "/" NAME_DATATYPE_SIMPLE, H5P_DEFAULT)) < 0) TEST_ERROR - if(H5Oget_info(tid, &oinfo) < 0) TEST_ERROR + if(H5Oget_info2(tid, &oinfo, H5O_INFO_BASIC) < 0) TEST_ERROR exp_addr = oinfo.addr; if(H5Tclose(tid) < 0) TEST_ERROR /* Open group 1 source dset dtype, check address */ if((did = H5Dopen2(fid, NAME_GROUP_TOP "/" NAME_DATASET_SIMPLE, H5P_DEFAULT)) < 0) TEST_ERROR if((tid = H5Dget_type(did)) < 0) TEST_ERROR - if(H5Oget_info(tid, &oinfo) < 0) TEST_ERROR + if(H5Oget_info2(tid, &oinfo, H5O_INFO_BASIC) < 0) TEST_ERROR if(oinfo.addr != exp_addr) TEST_ERROR if(H5Tclose(tid) < 0) TEST_ERROR if(H5Dclose(did) < 0) TEST_ERROR /* Open group 1 committed dtype, check address */ if((tid = H5Topen2(fid, NAME_GROUP_TOP3 "/" NAME_GROUP_TOP "/" NAME_DATATYPE_SIMPLE, H5P_DEFAULT)) < 0) TEST_ERROR - if(H5Oget_info(tid, &oinfo) < 0) TEST_ERROR + if(H5Oget_info2(tid, &oinfo, H5O_INFO_BASIC) < 0) TEST_ERROR if(oinfo.addr != exp_addr) TEST_ERROR if(H5Tclose(tid) < 0) TEST_ERROR /* Open group 1 dset dtype, check address */ if((did = H5Dopen2(fid, NAME_GROUP_TOP3 "/" NAME_GROUP_TOP "/" NAME_DATASET_SIMPLE, H5P_DEFAULT)) < 0) TEST_ERROR if((tid = H5Dget_type(did)) < 0) TEST_ERROR - if(H5Oget_info(tid, &oinfo) < 0) TEST_ERROR + if(H5Oget_info2(tid, &oinfo, H5O_INFO_BASIC) < 0) TEST_ERROR if(oinfo.addr != exp_addr) TEST_ERROR if(H5Tclose(tid) < 0) TEST_ERROR if(H5Dclose(did) < 0) TEST_ERROR @@ -10594,7 +10594,7 @@ test_copy_committed_datatype_merge_same_file(hid_t fcpl, hid_t fapl, hbool_t reo /* Open group 2 source committed dtype, get address and make sure it is * different from group 1 source committed dtype */ if((tid = H5Topen2(fid, NAME_GROUP_TOP2 "/" NAME_DATATYPE_SIMPLE, H5P_DEFAULT)) < 0) TEST_ERROR - if(H5Oget_info(tid, &oinfo) < 0) TEST_ERROR + if(H5Oget_info2(tid, &oinfo, H5O_INFO_BASIC) < 0) TEST_ERROR if(oinfo.addr == exp_addr) TEST_ERROR exp_addr = oinfo.addr; if(H5Tclose(tid) < 0) TEST_ERROR @@ -10602,21 +10602,21 @@ test_copy_committed_datatype_merge_same_file(hid_t fcpl, hid_t fapl, hbool_t reo /* Open group 2 source dset dtype, check address */ if((did = H5Dopen2(fid, NAME_GROUP_TOP2 "/" NAME_DATASET_SIMPLE, H5P_DEFAULT)) < 0) TEST_ERROR if((tid = H5Dget_type(did)) < 0) TEST_ERROR - if(H5Oget_info(tid, &oinfo) < 0) TEST_ERROR + if(H5Oget_info2(tid, &oinfo, H5O_INFO_BASIC) < 0) TEST_ERROR if(oinfo.addr != exp_addr) TEST_ERROR if(H5Tclose(tid) < 0) TEST_ERROR if(H5Dclose(did) < 0) TEST_ERROR /* Open group 2 committed dtype, check address */ if((tid = H5Topen2(fid, NAME_GROUP_TOP3 "/" NAME_GROUP_TOP2 "/" NAME_DATATYPE_SIMPLE, H5P_DEFAULT)) < 0) TEST_ERROR - if(H5Oget_info(tid, &oinfo) < 0) TEST_ERROR + if(H5Oget_info2(tid, &oinfo, H5O_INFO_BASIC) < 0) TEST_ERROR if(oinfo.addr != exp_addr) TEST_ERROR if(H5Tclose(tid) < 0) TEST_ERROR /* Open group 2 dset dtype, check address */ if((did = H5Dopen2(fid, NAME_GROUP_TOP3 "/" NAME_GROUP_TOP2 "/" NAME_DATASET_SIMPLE, H5P_DEFAULT)) < 0) TEST_ERROR if((tid = H5Dget_type(did)) < 0) TEST_ERROR - if(H5Oget_info(tid, &oinfo) < 0) TEST_ERROR + if(H5Oget_info2(tid, &oinfo, H5O_INFO_BASIC) < 0) TEST_ERROR if(oinfo.addr != exp_addr) TEST_ERROR if(H5Tclose(tid) < 0) TEST_ERROR if(H5Dclose(did) < 0) TEST_ERROR @@ -10644,7 +10644,7 @@ test_copy_committed_datatype_merge_same_file(hid_t fcpl, hid_t fapl, hbool_t reo /* Open group 1 source dset dtype, get address */ if((did = H5Dopen2(fid, NAME_GROUP_TOP "/" NAME_DATASET_SIMPLE, H5P_DEFAULT)) < 0) TEST_ERROR if((tid = H5Dget_type(did)) < 0) TEST_ERROR - if(H5Oget_info(tid, &oinfo) < 0) TEST_ERROR + if(H5Oget_info2(tid, &oinfo, H5O_INFO_BASIC) < 0) TEST_ERROR exp_addr = oinfo.addr; if(H5Tclose(tid) < 0) TEST_ERROR if(H5Dclose(did) < 0) TEST_ERROR @@ -10652,7 +10652,7 @@ test_copy_committed_datatype_merge_same_file(hid_t fcpl, hid_t fapl, hbool_t reo /* Open group 1 dset dtype, check address */ if((did = H5Dopen2(fid, NAME_GROUP_TOP4 "/" NAME_DATASET_SIMPLE, H5P_DEFAULT)) < 0) TEST_ERROR if((tid = H5Dget_type(did)) < 0) TEST_ERROR - if(H5Oget_info(tid, &oinfo) < 0) TEST_ERROR + if(H5Oget_info2(tid, &oinfo, H5O_INFO_BASIC) < 0) TEST_ERROR if(oinfo.addr != exp_addr) TEST_ERROR if(H5Tclose(tid) < 0) TEST_ERROR if(H5Dclose(did) < 0) TEST_ERROR @@ -10661,7 +10661,7 @@ test_copy_committed_datatype_merge_same_file(hid_t fcpl, hid_t fapl, hbool_t reo * different from group 1 source dset dtype */ if((did = H5Dopen2(fid, NAME_GROUP_TOP2 "/" NAME_DATASET_SIMPLE, H5P_DEFAULT)) < 0) TEST_ERROR if((tid = H5Dget_type(did)) < 0) TEST_ERROR - if(H5Oget_info(tid, &oinfo) < 0) TEST_ERROR + if(H5Oget_info2(tid, &oinfo, H5O_INFO_BASIC) < 0) TEST_ERROR if(oinfo.addr == exp_addr) TEST_ERROR exp_addr = oinfo.addr; if(H5Tclose(tid) < 0) TEST_ERROR @@ -10670,7 +10670,7 @@ test_copy_committed_datatype_merge_same_file(hid_t fcpl, hid_t fapl, hbool_t reo /* Open group 2 dset dtype, check address */ if((did = H5Dopen2(fid, NAME_GROUP_TOP4 "/" NAME_DATASET_SIMPLE2, H5P_DEFAULT)) < 0) TEST_ERROR if((tid = H5Dget_type(did)) < 0) TEST_ERROR - if(H5Oget_info(tid, &oinfo) < 0) TEST_ERROR + if(H5Oget_info2(tid, &oinfo, H5O_INFO_BASIC) < 0) TEST_ERROR if(oinfo.addr != exp_addr) TEST_ERROR if(H5Tclose(tid) < 0) TEST_ERROR if(H5Dclose(did) < 0) TEST_ERROR @@ -10837,14 +10837,14 @@ test_copy_committed_dt_merge_sugg(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl /* Open committed dtype "b", get address */ if((tid = H5Topen2(fid_dst, "/b", H5P_DEFAULT)) < 0) TEST_ERROR - if(H5Oget_info(tid, &oinfo) < 0) TEST_ERROR + if(H5Oget_info2(tid, &oinfo, H5O_INFO_BASIC) < 0) TEST_ERROR exp_addr = oinfo.addr; if(H5Tclose(tid) < 0) TEST_ERROR /* Open dset dtype, check address */ if((did = H5Dopen2(fid_dst, NAME_DATASET_SIMPLE, H5P_DEFAULT)) < 0) TEST_ERROR if((tid = H5Dget_type(did)) < 0) TEST_ERROR - if(H5Oget_info(tid, &oinfo) < 0) TEST_ERROR + if(H5Oget_info2(tid, &oinfo, H5O_INFO_BASIC) < 0) TEST_ERROR if(oinfo.addr != exp_addr) TEST_ERROR if(H5Tclose(tid) < 0) TEST_ERROR if(H5Dclose(did) < 0) TEST_ERROR @@ -10875,28 +10875,28 @@ test_copy_committed_dt_merge_sugg(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl /* Open committed dtype "a", get address */ if((tid = H5Topen2(fid_dst, "/a", H5P_DEFAULT)) < 0) TEST_ERROR - if(H5Oget_info(tid, &oinfo) < 0) TEST_ERROR + if(H5Oget_info2(tid, &oinfo, H5O_INFO_BASIC) < 0) TEST_ERROR exp_addr = oinfo.addr; if(H5Tclose(tid) < 0) TEST_ERROR /* Open dset 2 dtype, check address */ if((did = H5Dopen2(fid_dst, NAME_DATASET_SIMPLE2, H5P_DEFAULT)) < 0) TEST_ERROR if((tid = H5Dget_type(did)) < 0) TEST_ERROR - if(H5Oget_info(tid, &oinfo) < 0) TEST_ERROR + if(H5Oget_info2(tid, &oinfo, H5O_INFO_BASIC) < 0) TEST_ERROR if(oinfo.addr != exp_addr) TEST_ERROR if(H5Tclose(tid) < 0) TEST_ERROR if(H5Dclose(did) < 0) TEST_ERROR /* Open committed dtype "b", get address */ if((tid = H5Topen2(fid_dst, "/b", H5P_DEFAULT)) < 0) TEST_ERROR - if(H5Oget_info(tid, &oinfo) < 0) TEST_ERROR + if(H5Oget_info2(tid, &oinfo, H5O_INFO_BASIC) < 0) TEST_ERROR exp_addr = oinfo.addr; if(H5Tclose(tid) < 0) TEST_ERROR /* Open dset dtype, check address */ if((did = H5Dopen2(fid_dst, NAME_DATASET_SIMPLE, H5P_DEFAULT)) < 0) TEST_ERROR if((tid = H5Dget_type(did)) < 0) TEST_ERROR - if(H5Oget_info(tid, &oinfo) < 0) TEST_ERROR + if(H5Oget_info2(tid, &oinfo, H5O_INFO_BASIC) < 0) TEST_ERROR if(oinfo.addr != exp_addr) TEST_ERROR if(H5Tclose(tid) < 0) TEST_ERROR if(H5Dclose(did) < 0) TEST_ERROR @@ -11072,7 +11072,7 @@ test_copy_committed_dt_merge_attr(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl /* Open attribute dtype, get address */ if((aid = H5Aopen_by_name(fid_dst, NAME_GROUP_TOP, "attr", H5P_DEFAULT, H5P_DEFAULT)) < 0) TEST_ERROR if((tid = H5Aget_type(aid)) < 0) TEST_ERROR - if(H5Oget_info(tid, &oinfo) < 0) TEST_ERROR + if(H5Oget_info2(tid, &oinfo, H5O_INFO_BASIC) < 0) TEST_ERROR exp_addr = oinfo.addr; if(H5Tclose(tid) < 0) TEST_ERROR if(H5Aclose(aid) < 0) TEST_ERROR @@ -11080,7 +11080,7 @@ test_copy_committed_dt_merge_attr(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl /* Open dset dtype, check address */ if((did = H5Dopen2(fid_dst, NAME_DATASET_SIMPLE, H5P_DEFAULT)) < 0) TEST_ERROR if((tid = H5Dget_type(did)) < 0) TEST_ERROR - if(H5Oget_info(tid, &oinfo) < 0) TEST_ERROR + if(H5Oget_info2(tid, &oinfo, H5O_INFO_BASIC) < 0) TEST_ERROR if(oinfo.addr != exp_addr) TEST_ERROR if(H5Tclose(tid) < 0) TEST_ERROR if(H5Dclose(did) < 0) TEST_ERROR @@ -11331,13 +11331,13 @@ test_copy_cdt_hier_merge(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid_t d /* get address of committed datatype at root group */ if((tid = H5Topen2(fid_dst, SRC_ROOT_GROUP "/" ROOT_NDT_INT, H5P_DEFAULT)) < 0) TEST_ERROR - if(H5Oget_info(tid, &oinfo) < 0) TEST_ERROR + if(H5Oget_info2(tid, &oinfo, H5O_INFO_BASIC) < 0) TEST_ERROR exp_addr_int = oinfo.addr; if(H5Tclose(tid) < 0) TEST_ERROR /* get address of committed datatype at /g0 */ if((tid = H5Topen2(fid_dst, SRC_ROOT_GROUP NAME_GROUP_TOP "/" GROUP_NDT_SHORT, H5P_DEFAULT)) < 0) TEST_ERROR - if(H5Oget_info(tid, &oinfo) < 0) TEST_ERROR + if(H5Oget_info2(tid, &oinfo, H5O_INFO_BASIC) < 0) TEST_ERROR exp_addr_short = oinfo.addr; if(H5Tclose(tid) < 0) TEST_ERROR @@ -11351,7 +11351,7 @@ test_copy_cdt_hier_merge(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid_t d /* check address of datatype for second dataset */ if((did = H5Dopen2(fid_dst, SRC_ROOT_GROUP NAME_GROUP_TOP "/" SRC_NDT_DSET2, H5P_DEFAULT)) < 0) TEST_ERROR if((tid = H5Dget_type(did)) < 0) TEST_ERROR - if(H5Oget_info(tid, &oinfo) < 0) TEST_ERROR + if(H5Oget_info2(tid, &oinfo, H5O_INFO_BASIC) < 0) TEST_ERROR if(oinfo.addr != exp_addr_short) TEST_ERROR if(H5Tclose(tid) < 0) TEST_ERROR if(H5Dclose(did) < 0) TEST_ERROR @@ -11359,7 +11359,7 @@ test_copy_cdt_hier_merge(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid_t d /* check address of datatype for third dataset */ if((did = H5Dopen2(fid_dst, SRC_ROOT_GROUP NAME_GROUP_TOP "/" SRC_NDT_DSET3, H5P_DEFAULT)) < 0) TEST_ERROR if((tid = H5Dget_type(did)) < 0) TEST_ERROR - if(H5Oget_info(tid, &oinfo) < 0) TEST_ERROR + if(H5Oget_info2(tid, &oinfo, H5O_INFO_BASIC) < 0) TEST_ERROR if(oinfo.addr != exp_addr_int) TEST_ERROR if(H5Tclose(tid) < 0) TEST_ERROR if(H5Dclose(did) < 0) TEST_ERROR @@ -11371,7 +11371,7 @@ test_copy_cdt_hier_merge(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid_t d /* get address of committed datatype at /g0 */ if((tid = H5Topen2(fid_dst, NAME_GROUP_TOP "/" GROUP_NDT_SHORT, H5P_DEFAULT)) < 0) TEST_ERROR - if(H5Oget_info(tid, &oinfo) < 0) TEST_ERROR + if(H5Oget_info2(tid, &oinfo, H5O_INFO_BASIC) < 0) TEST_ERROR if(oinfo.addr != exp_addr_short) TEST_ERROR if(H5Tclose(tid) < 0) TEST_ERROR @@ -11385,7 +11385,7 @@ test_copy_cdt_hier_merge(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid_t d /* check address of datatype for second dataset */ if((did = H5Dopen2(fid_dst, NAME_GROUP_TOP "/" SRC_NDT_DSET2, H5P_DEFAULT)) < 0) TEST_ERROR if((tid = H5Dget_type(did)) < 0) TEST_ERROR - if(H5Oget_info(tid, &oinfo) < 0) TEST_ERROR + if(H5Oget_info2(tid, &oinfo, H5O_INFO_BASIC) < 0) TEST_ERROR if(oinfo.addr != exp_addr_short) TEST_ERROR if(H5Tclose(tid) < 0) TEST_ERROR if(H5Dclose(did) < 0) TEST_ERROR @@ -11393,7 +11393,7 @@ test_copy_cdt_hier_merge(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid_t d /* check address of datatype for third dataset */ if((did = H5Dopen2(fid_dst, NAME_GROUP_TOP "/" SRC_NDT_DSET3, H5P_DEFAULT)) < 0) TEST_ERROR if((tid = H5Dget_type(did)) < 0) TEST_ERROR - if(H5Oget_info(tid, &oinfo) < 0) TEST_ERROR + if(H5Oget_info2(tid, &oinfo, H5O_INFO_BASIC) < 0) TEST_ERROR if(oinfo.addr != exp_addr_int) TEST_ERROR if(H5Tclose(tid) < 0) TEST_ERROR if(H5Dclose(did) < 0) TEST_ERROR @@ -11408,7 +11408,7 @@ test_copy_cdt_hier_merge(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid_t d /* Open attribute with anon ndt (short), get address */ if((aid = H5Aopen_by_name(fid_dst, NAME_GROUP_UNCOPIED, DST_ATTR_ANON_SHORT, H5P_DEFAULT, H5P_DEFAULT)) < 0) TEST_ERROR if((tid = H5Aget_type(aid)) < 0) TEST_ERROR - if(H5Oget_info(tid, &oinfo) < 0) TEST_ERROR + if(H5Oget_info2(tid, &oinfo, H5O_INFO_BASIC) < 0) TEST_ERROR if(oinfo.addr != exp_addr_short) TEST_ERROR if(H5Tclose(tid) < 0) TEST_ERROR if(H5Aclose(aid) < 0) TEST_ERROR @@ -11416,7 +11416,7 @@ test_copy_cdt_hier_merge(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid_t d /* Open attribute with anon ndt (int), get address */ if((aid = H5Aopen_by_name(fid_dst, NAME_GROUP_UNCOPIED, DST_ATTR_ANON_INT, H5P_DEFAULT, H5P_DEFAULT)) < 0) TEST_ERROR if((tid = H5Aget_type(aid)) < 0) TEST_ERROR - if(H5Oget_info(tid, &oinfo) < 0) TEST_ERROR + if(H5Oget_info2(tid, &oinfo, H5O_INFO_BASIC) < 0) TEST_ERROR if(oinfo.addr != exp_addr_int) TEST_ERROR if(H5Tclose(tid) < 0) TEST_ERROR if(H5Aclose(aid) < 0) TEST_ERROR @@ -11431,7 +11431,7 @@ test_copy_cdt_hier_merge(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid_t d /* check address of datatype for second dataset */ if((did = H5Dopen2(fid_dst, NAME_GROUP_UNCOPIED "/" SRC_NDT_DSET2, H5P_DEFAULT)) < 0) TEST_ERROR if((tid = H5Dget_type(did)) < 0) TEST_ERROR - if(H5Oget_info(tid, &oinfo) < 0) TEST_ERROR + if(H5Oget_info2(tid, &oinfo, H5O_INFO_BASIC) < 0) TEST_ERROR if(oinfo.addr != exp_addr_short) TEST_ERROR if(H5Tclose(tid) < 0) TEST_ERROR if(H5Dclose(did) < 0) TEST_ERROR @@ -11439,7 +11439,7 @@ test_copy_cdt_hier_merge(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid_t d /* check address of datatype for third dataset */ if((did = H5Dopen2(fid_dst, NAME_GROUP_UNCOPIED "/" SRC_NDT_DSET3, H5P_DEFAULT)) < 0) TEST_ERROR if((tid = H5Dget_type(did)) < 0) TEST_ERROR - if(H5Oget_info(tid, &oinfo) < 0) TEST_ERROR + if(H5Oget_info2(tid, &oinfo, H5O_INFO_BASIC) < 0) TEST_ERROR if(oinfo.addr != exp_addr_int) TEST_ERROR if(H5Tclose(tid) < 0) TEST_ERROR if(H5Dclose(did) < 0) TEST_ERROR @@ -11642,50 +11642,50 @@ test_copy_cdt_merge_cdt(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid_t ds */ /* get address of committed datatype: /src_root/src_ndt_double */ if((tid = H5Topen2(fid_dst, "/" SRC_ROOT_GROUP "/" SRC_NDT_DOUBLE, H5P_DEFAULT)) < 0) TEST_ERROR - if(H5Oget_info(tid, &oinfo) < 0) TEST_ERROR + if(H5Oget_info2(tid, &oinfo, H5O_INFO_BASIC) < 0) TEST_ERROR exp_addr = oinfo.addr; if(H5Tclose(tid) < 0) TEST_ERROR /* get address of committed datatype: /dst_ndt_double */ if((tid = H5Topen2(fid_dst, "/" DST_NDT_DOUBLE, H5P_DEFAULT)) < 0) TEST_ERROR - if(H5Oget_info(tid, &oinfo) < 0) TEST_ERROR + if(H5Oget_info2(tid, &oinfo, H5O_INFO_BASIC) < 0) TEST_ERROR if(oinfo.addr != exp_addr) TEST_ERROR if(H5Tclose(tid) < 0) TEST_ERROR /* get address of committed datatype: /src_root/src_ndt_float */ if((tid = H5Topen2(fid_dst, "/" SRC_ROOT_GROUP "/" SRC_NDT_FLOAT, H5P_DEFAULT)) < 0) TEST_ERROR - if(H5Oget_info(tid, &oinfo) < 0) TEST_ERROR + if(H5Oget_info2(tid, &oinfo, H5O_INFO_BASIC) < 0) TEST_ERROR exp_addr = oinfo.addr; if(H5Tclose(tid) < 0) TEST_ERROR /* get address of committed datatype: /dst_ndt_float */ if((tid = H5Topen2(fid_dst, "/" DST_NDT_FLOAT, H5P_DEFAULT)) < 0) TEST_ERROR - if(H5Oget_info(tid, &oinfo) < 0) TEST_ERROR + if(H5Oget_info2(tid, &oinfo, H5O_INFO_BASIC) < 0) TEST_ERROR if(oinfo.addr != exp_addr) TEST_ERROR if(H5Tclose(tid) < 0) TEST_ERROR /* get address of committed datatype: /src_root/src_ndt_int */ if((tid = H5Topen2(fid_dst, "/" SRC_ROOT_GROUP "/" SRC_NDT_INT, H5P_DEFAULT)) < 0) TEST_ERROR - if(H5Oget_info(tid, &oinfo) < 0) TEST_ERROR + if(H5Oget_info2(tid, &oinfo, H5O_INFO_BASIC) < 0) TEST_ERROR exp_addr = oinfo.addr; if(H5Tclose(tid) < 0) TEST_ERROR /* get address of committed datatype: /dst_ndt_int */ if((tid = H5Topen2(fid_dst, "/" DST_NDT_INT, H5P_DEFAULT)) < 0) TEST_ERROR - if(H5Oget_info(tid, &oinfo) < 0) TEST_ERROR + if(H5Oget_info2(tid, &oinfo, H5O_INFO_BASIC) < 0) TEST_ERROR if(oinfo.addr != exp_addr) TEST_ERROR if(H5Tclose(tid) < 0) TEST_ERROR /* get address of committed datatype: /src_root/src_ndt_short */ if((tid = H5Topen2(fid_dst, "/" SRC_ROOT_GROUP "/" SRC_NDT_SHORT, H5P_DEFAULT)) < 0) TEST_ERROR - if(H5Oget_info(tid, &oinfo) < 0) TEST_ERROR + if(H5Oget_info2(tid, &oinfo, H5O_INFO_BASIC) < 0) TEST_ERROR exp_addr = oinfo.addr; if(H5Tclose(tid) < 0) TEST_ERROR /* open attribute; get its dtype; get dtype's address: /src_root/src_ndt_double/dst_attr */ if((aid = H5Aopen_by_name(fid_dst, "/" SRC_ROOT_GROUP "/" SRC_NDT_DOUBLE, DST_ATTR, H5P_DEFAULT, H5P_DEFAULT)) < 0) TEST_ERROR if((tid = H5Aget_type(aid)) < 0) TEST_ERROR - if(H5Oget_info(tid, &oinfo) < 0) TEST_ERROR + if(H5Oget_info2(tid, &oinfo, H5O_INFO_BASIC) < 0) TEST_ERROR if(oinfo.addr != exp_addr) TEST_ERROR if(H5Tclose(tid) < 0) TEST_ERROR if(H5Aclose(aid) < 0) TEST_ERROR @@ -11816,13 +11816,13 @@ test_copy_cdt_merge_suggs(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, /* open committed dtype "/dst_ndt_int", get its address */ if((tid = H5Topen2(fid_dst, DST_NDT_INT, H5P_DEFAULT)) < 0) TEST_ERROR - if(H5Oget_info(tid, &oinfo) < 0) TEST_ERROR + if(H5Oget_info2(tid, &oinfo, H5O_INFO_BASIC) < 0) TEST_ERROR exp_addr = oinfo.addr; if(H5Tclose(tid) < 0) TEST_ERROR /* check address of "/uncopied/src_ndt_int" */ if((tid = H5Topen2(fid_dst, NAME_GROUP_UNCOPIED "/" SRC_NDT_INT, H5P_DEFAULT)) < 0) TEST_ERROR - if(H5Oget_info(tid, &oinfo) < 0) TEST_ERROR + if(H5Oget_info2(tid, &oinfo, H5O_INFO_BASIC) < 0) TEST_ERROR if(oinfo.addr != exp_addr) TEST_ERROR if(H5Tclose(tid) < 0) TEST_ERROR @@ -11849,13 +11849,13 @@ test_copy_cdt_merge_suggs(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, /* open committed dtype "/uncopied/src_ndt_int", get its address */ if((tid = H5Topen2(fid_dst, NAME_GROUP_UNCOPIED "/" SRC_NDT_INT, H5P_DEFAULT)) < 0) TEST_ERROR - if(H5Oget_info(tid, &oinfo) < 0) TEST_ERROR + if(H5Oget_info2(tid, &oinfo, H5O_INFO_BASIC) < 0) TEST_ERROR exp_addr = oinfo.addr; if(H5Tclose(tid) < 0) TEST_ERROR /* check address of "/src_ndt_int" */ if((tid = H5Topen2(fid_dst, SRC_NDT_INT, H5P_DEFAULT)) < 0) TEST_ERROR - if(H5Oget_info(tid, &oinfo) < 0) TEST_ERROR + if(H5Oget_info2(tid, &oinfo, H5O_INFO_BASIC) < 0) TEST_ERROR if(oinfo.addr != exp_addr) TEST_ERROR if(H5Tclose(tid) < 0) TEST_ERROR @@ -11887,13 +11887,13 @@ test_copy_cdt_merge_suggs(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, /* Open committed dtype "/uncopied/src_ndt_int", get its address */ if((tid = H5Topen2(fid_dst, NAME_GROUP_UNCOPIED "/" SRC_NDT_INT, H5P_DEFAULT)) < 0) TEST_ERROR - if(H5Oget_info(tid, &oinfo) < 0) TEST_ERROR + if(H5Oget_info2(tid, &oinfo, H5O_INFO_BASIC) < 0) TEST_ERROR exp_addr = oinfo.addr; if(H5Tclose(tid) < 0) TEST_ERROR /* check address of "/src_ndt_int2" */ if((tid = H5Topen2(fid_dst, SRC_NDT_INT2, H5P_DEFAULT)) < 0) TEST_ERROR - if(H5Oget_info(tid, &oinfo) < 0) TEST_ERROR + if(H5Oget_info2(tid, &oinfo, H5O_INFO_BASIC) < 0) TEST_ERROR if(oinfo.addr != exp_addr) TEST_ERROR if(H5Tclose(tid) < 0) TEST_ERROR @@ -11921,13 +11921,13 @@ test_copy_cdt_merge_suggs(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, /* Open committed dtype "/dst_dt_int", get its address */ if((tid = H5Topen2(fid_dst, DST_NDT_INT, H5P_DEFAULT)) < 0) TEST_ERROR - if(H5Oget_info(tid, &oinfo) < 0) TEST_ERROR + if(H5Oget_info2(tid, &oinfo, H5O_INFO_BASIC) < 0) TEST_ERROR exp_addr = oinfo.addr; if(H5Tclose(tid) < 0) TEST_ERROR /* check address of "/uncopied/src_ndt_int2" */ if((tid = H5Topen2(fid_dst, NAME_GROUP_UNCOPIED "/" SRC_NDT_INT2, H5P_DEFAULT)) < 0) TEST_ERROR - if(H5Oget_info(tid, &oinfo) < 0) TEST_ERROR + if(H5Oget_info2(tid, &oinfo, H5O_INFO_BASIC) < 0) TEST_ERROR if(oinfo.addr != exp_addr) TEST_ERROR if(H5Tclose(tid) < 0) TEST_ERROR @@ -12077,14 +12077,14 @@ test_copy_cdt_merge_dset_suggs(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, /* Open committed dtype "/dst_ndt_int", get its address */ if((tid = H5Topen2(fid_dst, DST_NDT_INT, H5P_DEFAULT)) < 0) TEST_ERROR - if(H5Oget_info(tid, &oinfo) < 0) TEST_ERROR + if(H5Oget_info2(tid, &oinfo, H5O_INFO_BASIC) < 0) TEST_ERROR exp_addr = oinfo.addr; if(H5Tclose(tid) < 0) TEST_ERROR /* check address of datatype for the copied dataset: "/uncopied/src_ndt_dset" */ if((did = H5Dopen2(fid_dst, NAME_GROUP_UNCOPIED "/" SRC_NDT_DSET, H5P_DEFAULT)) < 0) TEST_ERROR if((tid = H5Dget_type(did)) < 0) TEST_ERROR - if(H5Oget_info(tid, &oinfo) < 0) TEST_ERROR + if(H5Oget_info2(tid, &oinfo, H5O_INFO_BASIC) < 0) TEST_ERROR if(oinfo.addr != exp_addr) TEST_ERROR if(H5Tclose(tid) < 0) TEST_ERROR if(H5Dclose(did) < 0) TEST_ERROR @@ -12113,7 +12113,7 @@ test_copy_cdt_merge_dset_suggs(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, /* Open committed dtype dataset "/uncopied/src_ndt_dset", get its datatype address */ if((did = H5Dopen2(fid_dst, NAME_GROUP_UNCOPIED "/" SRC_NDT_DSET, H5P_DEFAULT)) < 0) TEST_ERROR if((tid = H5Dget_type(did)) < 0) TEST_ERROR - if(H5Oget_info(tid, &oinfo) < 0) TEST_ERROR + if(H5Oget_info2(tid, &oinfo, H5O_INFO_BASIC) < 0) TEST_ERROR exp_addr = oinfo.addr; if(H5Tclose(tid) < 0) TEST_ERROR if(H5Dclose(did) < 0) TEST_ERROR @@ -12121,7 +12121,7 @@ test_copy_cdt_merge_dset_suggs(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, /* check address of datatype for the copied dataset: "/src_ndt_dset" */ if((did = H5Dopen2(fid_dst, SRC_NDT_DSET, H5P_DEFAULT)) < 0) TEST_ERROR if((tid = H5Dget_type(did)) < 0) TEST_ERROR - if(H5Oget_info(tid, &oinfo) < 0) TEST_ERROR + if(H5Oget_info2(tid, &oinfo, H5O_INFO_BASIC) < 0) TEST_ERROR if(oinfo.addr != exp_addr) TEST_ERROR if(H5Tclose(tid) < 0) TEST_ERROR if(H5Dclose(did) < 0) TEST_ERROR @@ -12155,7 +12155,7 @@ test_copy_cdt_merge_dset_suggs(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, /* open the copied dataset: /uncopied/src_ndt_dset", get its address */ if((did = H5Dopen2(fid_dst, NAME_GROUP_UNCOPIED "/" SRC_NDT_DSET, H5P_DEFAULT)) < 0) TEST_ERROR if((tid = H5Dget_type(did)) < 0) TEST_ERROR - if(H5Oget_info(tid, &oinfo) < 0) TEST_ERROR + if(H5Oget_info2(tid, &oinfo, H5O_INFO_BASIC) < 0) TEST_ERROR exp_addr = oinfo.addr; if(H5Tclose(tid) < 0) TEST_ERROR if(H5Dclose(did) < 0) TEST_ERROR @@ -12163,7 +12163,7 @@ test_copy_cdt_merge_dset_suggs(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, /* check address of datatype for the copied dataset: "/src_ndt_dset2" */ if((did = H5Dopen2(fid_dst, SRC_NDT_DSET2, H5P_DEFAULT)) < 0) TEST_ERROR if((tid = H5Dget_type(did)) < 0) TEST_ERROR - if(H5Oget_info(tid, &oinfo) < 0) TEST_ERROR + if(H5Oget_info2(tid, &oinfo, H5O_INFO_BASIC) < 0) TEST_ERROR if(oinfo.addr != exp_addr) TEST_ERROR if(H5Tclose(tid) < 0) TEST_ERROR if(H5Dclose(did) < 0) TEST_ERROR @@ -12193,7 +12193,7 @@ test_copy_cdt_merge_dset_suggs(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, /* open the copied dataset: "/src_ndt_dset", get its datatype address */ if((did = H5Dopen2(fid_dst, SRC_NDT_DSET, H5P_DEFAULT)) < 0) TEST_ERROR if((tid = H5Dget_type(did)) < 0) TEST_ERROR - if(H5Oget_info(tid, &oinfo) < 0) TEST_ERROR + if(H5Oget_info2(tid, &oinfo, H5O_INFO_BASIC) < 0) TEST_ERROR exp_addr = oinfo.addr; if(H5Tclose(tid) < 0) TEST_ERROR if(H5Dclose(did) < 0) TEST_ERROR @@ -12201,7 +12201,7 @@ test_copy_cdt_merge_dset_suggs(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, /* check address of datatype for the copied dataset: /uncopied/src_ndt_dset2 */ if((did = H5Dopen2(fid_dst, NAME_GROUP_UNCOPIED "/" SRC_NDT_DSET2, H5P_DEFAULT)) < 0) TEST_ERROR if((tid = H5Dget_type(did)) < 0) TEST_ERROR - if(H5Oget_info(tid, &oinfo) < 0) TEST_ERROR + if(H5Oget_info2(tid, &oinfo, H5O_INFO_BASIC) < 0) TEST_ERROR if(oinfo.addr != exp_addr) TEST_ERROR if(H5Tclose(tid) < 0) TEST_ERROR if(H5Dclose(did) < 0) TEST_ERROR @@ -12861,14 +12861,14 @@ test_copy_set_mcdt_search_cb(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, /* Open committed dtype "b", get address */ if((tid = H5Topen2(fid_dst, "/b", H5P_DEFAULT)) < 0) TEST_ERROR - if(H5Oget_info(tid, &oinfo) < 0) TEST_ERROR + if(H5Oget_info2(tid, &oinfo, H5O_INFO_BASIC) < 0) TEST_ERROR exp_addr = oinfo.addr; if(H5Tclose(tid) < 0) TEST_ERROR /* Open dset dtype, check address */ if((did = H5Dopen2(fid_dst, NAME_DATASET_SIMPLE, H5P_DEFAULT)) < 0) TEST_ERROR if((tid = H5Dget_type(did)) < 0) TEST_ERROR - if(H5Oget_info(tid, &oinfo) < 0) TEST_ERROR + if(H5Oget_info2(tid, &oinfo, H5O_INFO_BASIC) < 0) TEST_ERROR if(oinfo.addr != exp_addr) TEST_ERROR if(H5Tclose(tid) < 0) TEST_ERROR if(H5Dclose(did) < 0) TEST_ERROR @@ -12909,14 +12909,14 @@ test_copy_set_mcdt_search_cb(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, /* Open committed dtype "a", get address */ if((tid = H5Topen2(fid_dst, "/a", H5P_DEFAULT)) < 0) TEST_ERROR - if(H5Oget_info(tid, &oinfo) < 0) TEST_ERROR + if(H5Oget_info2(tid, &oinfo, H5O_INFO_BASIC) < 0) TEST_ERROR exp_addr = oinfo.addr; if(H5Tclose(tid) < 0) TEST_ERROR /* Open copied dataset and its dtype, check address */ if((did = H5Dopen2(fid_dst, NAME_DATASET_SIMPLE2, H5P_DEFAULT)) < 0) TEST_ERROR if((tid = H5Dget_type(did)) < 0) TEST_ERROR - if(H5Oget_info(tid, &oinfo) < 0) TEST_ERROR + if(H5Oget_info2(tid, &oinfo, H5O_INFO_BASIC) < 0) TEST_ERROR if(oinfo.addr != exp_addr) TEST_ERROR if(H5Tclose(tid) < 0) TEST_ERROR if(H5Dclose(did) < 0) TEST_ERROR @@ -12948,28 +12948,28 @@ test_copy_set_mcdt_search_cb(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, /* Open committed dtype "a", get address */ if((tid = H5Topen2(fid_dst, "/a", H5P_DEFAULT)) < 0) TEST_ERROR - if(H5Oget_info(tid, &oinfo) < 0) TEST_ERROR + if(H5Oget_info2(tid, &oinfo, H5O_INFO_BASIC) < 0) TEST_ERROR exp_addr = oinfo.addr; if(H5Tclose(tid) < 0) TEST_ERROR /* Open the copied dataset and get its dtype, addresses should not be equal */ if((did = H5Dopen2(fid_dst, NAME_DATASET_SIMPLE3, H5P_DEFAULT)) < 0) TEST_ERROR if((tid = H5Dget_type(did)) < 0) TEST_ERROR - if(H5Oget_info(tid, &oinfo) < 0) TEST_ERROR + if(H5Oget_info2(tid, &oinfo, H5O_INFO_BASIC) < 0) TEST_ERROR if(oinfo.addr == exp_addr) TEST_ERROR if(H5Tclose(tid) < 0) TEST_ERROR if(H5Dclose(did) < 0) TEST_ERROR /* Open committed dtype "b", get address */ if((tid = H5Topen2(fid_dst, "/b", H5P_DEFAULT)) < 0) TEST_ERROR - if(H5Oget_info(tid, &oinfo) < 0) TEST_ERROR + if(H5Oget_info2(tid, &oinfo, H5O_INFO_BASIC) < 0) TEST_ERROR exp_addr = oinfo.addr; if(H5Tclose(tid) < 0) TEST_ERROR /* Open the copied dataset and get its dtype, addresses should not be equal */ if((did = H5Dopen2(fid_dst, NAME_DATASET_SIMPLE3, H5P_DEFAULT)) < 0) TEST_ERROR if((tid = H5Dget_type(did)) < 0) TEST_ERROR - if(H5Oget_info(tid, &oinfo) < 0) TEST_ERROR + if(H5Oget_info2(tid, &oinfo, H5O_INFO_BASIC) < 0) TEST_ERROR if(oinfo.addr == exp_addr) TEST_ERROR if(H5Tclose(tid) < 0) TEST_ERROR if(H5Dclose(did) < 0) TEST_ERROR @@ -13008,28 +13008,28 @@ test_copy_set_mcdt_search_cb(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, /* Open committed dtype "a", get address */ if((tid = H5Topen2(fid_dst, "/a", H5P_DEFAULT)) < 0) TEST_ERROR - if(H5Oget_info(tid, &oinfo) < 0) TEST_ERROR + if(H5Oget_info2(tid, &oinfo, H5O_INFO_BASIC) < 0) TEST_ERROR exp_addr = oinfo.addr; if(H5Tclose(tid) < 0) TEST_ERROR /* Open the copied dataset and get its dtype, addresses should not be equal */ if((did = H5Dopen2(fid_dst, NAME_DATASET_SIMPLE3, H5P_DEFAULT)) < 0) TEST_ERROR if((tid = H5Dget_type(did)) < 0) TEST_ERROR - if(H5Oget_info(tid, &oinfo) < 0) TEST_ERROR + if(H5Oget_info2(tid, &oinfo, H5O_INFO_BASIC) < 0) TEST_ERROR if(oinfo.addr == exp_addr) TEST_ERROR if(H5Tclose(tid) < 0) TEST_ERROR if(H5Dclose(did) < 0) TEST_ERROR /* Open committed dtype "b", get address */ if((tid = H5Topen2(fid_dst, "/b", H5P_DEFAULT)) < 0) TEST_ERROR - if(H5Oget_info(tid, &oinfo) < 0) TEST_ERROR + if(H5Oget_info2(tid, &oinfo, H5O_INFO_BASIC) < 0) TEST_ERROR exp_addr = oinfo.addr; if(H5Tclose(tid) < 0) TEST_ERROR /* Open the copied dataset and get its dtype, addresses should not be equal */ if((did = H5Dopen2(fid_dst, NAME_DATASET_SIMPLE3, H5P_DEFAULT)) < 0) TEST_ERROR if((tid = H5Dget_type(did)) < 0) TEST_ERROR - if(H5Oget_info(tid, &oinfo) < 0) TEST_ERROR + if(H5Oget_info2(tid, &oinfo, H5O_INFO_BASIC) < 0) TEST_ERROR if(oinfo.addr == exp_addr) TEST_ERROR if(H5Tclose(tid) < 0) TEST_ERROR if(H5Dclose(did) < 0) TEST_ERROR diff --git a/test/ohdr.c b/test/ohdr.c index e91c6a8..146245f 100644 --- a/test/ohdr.c +++ b/test/ohdr.c @@ -383,7 +383,7 @@ test_ohdr_swmr(hbool_t new_format) FAIL_STACK_ERROR /* Get the object information */ - if(H5Oget_info(did, &obj_info) < 0) + if(H5Oget_info2(did, &obj_info, H5O_INFO_HDR) < 0) FAIL_STACK_ERROR if(new_format) diff --git a/test/stab.c b/test/stab.c index 331c68d..37097b7 100644 --- a/test/stab.c +++ b/test/stab.c @@ -419,7 +419,7 @@ lifecycle(hid_t fcpl, hid_t fapl2) if(H5G__is_new_dense_test(gid) != FALSE) TEST_ERROR /* Check that the object header is only one chunk and the space has been allocated correctly */ - if(H5Oget_info(gid, &oinfo) < 0) TEST_ERROR + if(H5Oget_info2(gid, &oinfo, H5O_INFO_HDR) < 0) TEST_ERROR if(oinfo.hdr.space.total != 151) TEST_ERROR if(oinfo.hdr.space.free != 0) TEST_ERROR if(oinfo.hdr.nmesgs != 6) TEST_ERROR @@ -441,7 +441,7 @@ lifecycle(hid_t fcpl, hid_t fapl2) if(H5G__is_new_dense_test(gid) != TRUE) TEST_ERROR /* Check that the object header is still one chunk and the space has been allocated correctly */ - if(H5Oget_info(gid, &oinfo) < 0) TEST_ERROR + if(H5Oget_info2(gid, &oinfo, H5O_INFO_HDR) < 0) TEST_ERROR if(oinfo.hdr.space.total != 151) TEST_ERROR if(oinfo.hdr.space.free != 92) TEST_ERROR if(oinfo.hdr.nmesgs != 3) TEST_ERROR diff --git a/test/tattr.c b/test/tattr.c index b5495de..bf9ce96 100644 --- a/test/tattr.c +++ b/test/tattr.c @@ -422,7 +422,7 @@ test_attr_basic_read(hid_t fapl) CHECK(dataset, FAIL, "H5Dopen2"); /* Verify the correct number of attributes */ - ret = H5Oget_info(dataset, &oinfo); + ret = H5Oget_info2(dataset, &oinfo, H5O_INFO_NUM_ATTRS); CHECK(ret, FAIL, "H5Oget_info"); VERIFY(oinfo.num_attrs, 2, "H5Oget_info"); @@ -451,7 +451,7 @@ test_attr_basic_read(hid_t fapl) CHECK(group, FAIL, "H5Gopen2"); /* Verify the correct number of attributes */ - ret = H5Oget_info(group, &oinfo); + ret = H5Oget_info2(group, &oinfo, H5O_INFO_NUM_ATTRS); CHECK(ret, FAIL, "H5Oget_info"); VERIFY(oinfo.num_attrs, 1, "H5Oget_info"); @@ -793,7 +793,7 @@ test_attr_compound_read(hid_t fapl) CHECK(dataset, FAIL, "H5Dopen2"); /* Verify the correct number of attributes */ - ret = H5Oget_info(dataset, &oinfo); + ret = H5Oget_info2(dataset, &oinfo, H5O_INFO_NUM_ATTRS); CHECK(ret, FAIL, "H5Oget_info"); VERIFY(oinfo.num_attrs, 1, "H5Oget_info"); @@ -997,7 +997,7 @@ test_attr_scalar_read(hid_t fapl) CHECK(dataset, FAIL, "H5Dopen2"); /* Verify the correct number of attributes */ - ret = H5Oget_info(dataset, &oinfo); + ret = H5Oget_info2(dataset, &oinfo, H5O_INFO_NUM_ATTRS); CHECK(ret, FAIL, "H5Oget_info"); VERIFY(oinfo.num_attrs, 1, "H5Oget_info"); @@ -1200,7 +1200,7 @@ test_attr_mult_read(hid_t fapl) CHECK(dataset, FAIL, "H5Dopen2"); /* Verify the correct number of attributes */ - ret = H5Oget_info(dataset, &oinfo); + ret = H5Oget_info2(dataset, &oinfo, H5O_INFO_NUM_ATTRS); CHECK(ret, FAIL, "H5Oget_info"); VERIFY(oinfo.num_attrs, 3, "H5Oget_info"); @@ -1457,7 +1457,7 @@ test_attr_iterate(hid_t fapl) CHECK(ret, FAIL, "H5Sclose"); /* Verify the correct number of attributes */ - ret = H5Oget_info(dataset, &oinfo); + ret = H5Oget_info2(dataset, &oinfo, H5O_INFO_NUM_ATTRS); CHECK(ret, FAIL, "H5Oget_info"); VERIFY(oinfo.num_attrs, 0, "H5Oget_info"); @@ -1475,7 +1475,7 @@ test_attr_iterate(hid_t fapl) CHECK(dataset, FAIL, "H5Dopen2"); /* Verify the correct number of attributes */ - ret = H5Oget_info(dataset, &oinfo); + ret = H5Oget_info2(dataset, &oinfo, H5O_INFO_NUM_ATTRS); CHECK(ret, FAIL, "H5Oget_info"); VERIFY(oinfo.num_attrs, 3, "H5Oget_info"); @@ -1522,7 +1522,7 @@ test_attr_delete(hid_t fapl) CHECK(dataset, FAIL, "H5Dopen2"); /* Verify the correct number of attributes */ - ret = H5Oget_info(dataset, &oinfo); + ret = H5Oget_info2(dataset, &oinfo, H5O_INFO_NUM_ATTRS); CHECK(ret, FAIL, "H5Oget_info"); VERIFY(oinfo.num_attrs, 3, "H5Oget_info"); @@ -1531,7 +1531,7 @@ test_attr_delete(hid_t fapl) VERIFY(ret, FAIL, "H5Adelete"); /* Verify the correct number of attributes */ - ret = H5Oget_info(dataset, &oinfo); + ret = H5Oget_info2(dataset, &oinfo, H5O_INFO_NUM_ATTRS); CHECK(ret, FAIL, "H5Oget_info"); VERIFY(oinfo.num_attrs, 3, "H5Oget_info"); @@ -1540,7 +1540,7 @@ test_attr_delete(hid_t fapl) CHECK(ret, FAIL, "H5Adelete"); /* Verify the correct number of attributes */ - ret = H5Oget_info(dataset, &oinfo); + ret = H5Oget_info2(dataset, &oinfo, H5O_INFO_NUM_ATTRS); CHECK(ret, FAIL, "H5Oget_info"); VERIFY(oinfo.num_attrs, 2, "H5Oget_info"); @@ -1577,7 +1577,7 @@ test_attr_delete(hid_t fapl) CHECK(ret, FAIL, "H5Adelete"); /* Verify the correct number of attributes */ - ret = H5Oget_info(dataset, &oinfo); + ret = H5Oget_info2(dataset, &oinfo, H5O_INFO_NUM_ATTRS); CHECK(ret, FAIL, "H5Oget_info"); VERIFY(oinfo.num_attrs, 1, "H5Oget_info"); @@ -1600,7 +1600,7 @@ test_attr_delete(hid_t fapl) CHECK(ret, FAIL, "H5Adelete"); /* Verify the correct number of attributes */ - ret = H5Oget_info(dataset, &oinfo); + ret = H5Oget_info2(dataset, &oinfo, H5O_INFO_NUM_ATTRS); CHECK(ret, FAIL, "H5Oget_info"); VERIFY(oinfo.num_attrs, 0, "H5Oget_info"); @@ -1665,7 +1665,7 @@ test_attr_dtype_shared(hid_t fapl) CHECK(ret, FAIL, "H5Tcommit2"); /* Check reference count on named datatype */ - ret = H5Oget_info_by_name(file_id, TYPE1_NAME, &oinfo, H5P_DEFAULT); + ret = H5Oget_info_by_name2(file_id, TYPE1_NAME, &oinfo, H5O_INFO_BASIC, H5P_DEFAULT); CHECK(ret, FAIL, "H5Oget_info_by_name"); VERIFY(oinfo.rc, 1, "H5Oget_info_by_name"); @@ -1678,7 +1678,7 @@ test_attr_dtype_shared(hid_t fapl) CHECK(dset_id, FAIL, "H5Dcreate2"); /* Check reference count on named datatype */ - ret = H5Oget_info_by_name(file_id, TYPE1_NAME, &oinfo, H5P_DEFAULT); + ret = H5Oget_info_by_name2(file_id, TYPE1_NAME, &oinfo, H5O_INFO_BASIC, H5P_DEFAULT); CHECK(ret, FAIL, "H5Oget_info_by_name"); VERIFY(oinfo.rc, 2, "H5Oget_info_by_name"); @@ -1687,7 +1687,7 @@ test_attr_dtype_shared(hid_t fapl) CHECK(attr_id, FAIL, "H5Acreate2"); /* Check reference count on named datatype */ - ret = H5Oget_info_by_name(file_id, TYPE1_NAME, &oinfo, H5P_DEFAULT); + ret = H5Oget_info_by_name2(file_id, TYPE1_NAME, &oinfo, H5O_INFO_BASIC, H5P_DEFAULT); CHECK(ret, FAIL, "H5Oget_info_by_name"); VERIFY(oinfo.rc, 3, "H5Oget_info_by_name"); @@ -1700,7 +1700,7 @@ test_attr_dtype_shared(hid_t fapl) CHECK(ret, FAIL, "H5Adelete"); /* Check reference count on named datatype */ - ret = H5Oget_info_by_name(file_id, TYPE1_NAME, &oinfo, H5P_DEFAULT); + ret = H5Oget_info_by_name2(file_id, TYPE1_NAME, &oinfo, H5O_INFO_BASIC, H5P_DEFAULT); CHECK(ret, FAIL, "H5Oget_info_by_name"); VERIFY(oinfo.rc, 2, "H5Oget_info_by_name"); @@ -1709,7 +1709,7 @@ test_attr_dtype_shared(hid_t fapl) CHECK(attr_id, FAIL, "H5Acreate2"); /* Check reference count on named datatype */ - ret = H5Oget_info_by_name(file_id, TYPE1_NAME, &oinfo, H5P_DEFAULT); + ret = H5Oget_info_by_name2(file_id, TYPE1_NAME, &oinfo, H5O_INFO_BASIC, H5P_DEFAULT); CHECK(ret, FAIL, "H5Oget_info_by_name"); VERIFY(oinfo.rc, 3, "H5Oget_info_by_name"); @@ -1764,7 +1764,7 @@ test_attr_dtype_shared(hid_t fapl) CHECK(ret, FAIL, "H5Dclose"); /* Check reference count on named datatype */ - ret = H5Oget_info_by_name(file_id, TYPE1_NAME, &oinfo, H5P_DEFAULT); + ret = H5Oget_info_by_name2(file_id, TYPE1_NAME, &oinfo, H5O_INFO_BASIC, H5P_DEFAULT); CHECK(ret, FAIL, "H5Oget_info_by_name"); VERIFY(oinfo.rc, 3, "H5Oget_info_by_name"); @@ -1773,7 +1773,7 @@ test_attr_dtype_shared(hid_t fapl) CHECK(ret, FAIL, "H5Ldelete"); /* Check reference count on named datatype */ - ret = H5Oget_info_by_name(file_id, TYPE1_NAME, &oinfo, H5P_DEFAULT); + ret = H5Oget_info_by_name2(file_id, TYPE1_NAME, &oinfo, H5O_INFO_BASIC, H5P_DEFAULT); CHECK(ret, FAIL, "H5Oget_info_by_name"); VERIFY(oinfo.rc, 1, "H5Oget_info_by_name"); @@ -2464,7 +2464,7 @@ test_attr_dense_delete(hid_t fcpl, hid_t fapl) CHECK(ret, FAIL, "H5Aclose"); /* Check # of attributes */ - ret = H5Oget_info(dataset, &oinfo); + ret = H5Oget_info2(dataset, &oinfo, H5O_INFO_NUM_ATTRS); CHECK(ret, FAIL, "H5Oget_info"); VERIFY(oinfo.num_attrs, (u + 1), "H5Oget_info"); } /* end for */ @@ -2646,7 +2646,7 @@ test_attr_dense_rename(hid_t fcpl, hid_t fapl) CHECK(ret, FAIL, "H5Arename_by_name"); /* Check # of attributes */ - ret = H5Oget_info(dataset, &oinfo); + ret = H5Oget_info2(dataset, &oinfo, H5O_INFO_NUM_ATTRS); CHECK(ret, FAIL, "H5Oget_info"); VERIFY(oinfo.num_attrs, (u + 1), "H5Oget_info"); } /* end for */ @@ -2798,7 +2798,7 @@ test_attr_dense_unlink(hid_t fcpl, hid_t fapl) CHECK(ret, FAIL, "H5Aclose"); /* Check # of attributes */ - ret = H5Oget_info(dataset, &oinfo); + ret = H5Oget_info2(dataset, &oinfo, H5O_INFO_NUM_ATTRS); CHECK(ret, FAIL, "H5Oget_info"); VERIFY(oinfo.num_attrs, (u + 1), "H5Oget_info"); } /* end for */ @@ -10484,7 +10484,7 @@ test_attr_bug8(hid_t fcpl, hid_t fapl) CHECK(gid, FAIL, "H5Gcreate2"); /* Get root group address */ - ret = H5Oget_info(fid, &oinfo); + ret = H5Oget_info2(fid, &oinfo, H5O_INFO_BASIC); CHECK(ret, FAIL, "H5Oget_info"); root_addr = oinfo.addr; @@ -10509,7 +10509,7 @@ test_attr_bug8(hid_t fcpl, hid_t fapl) CHECK(gid, FAIL, "H5Gopen2"); oid = H5Oopen(gid, LINK1_NAME, H5P_DEFAULT); CHECK(oid, FAIL, "H5Oopen"); - ret = H5Oget_info(oid, &oinfo); + ret = H5Oget_info2(oid, &oinfo, H5O_INFO_BASIC); CHECK(ret, FAIL, "H5Oget_info"); if(oinfo.addr != root_addr) TestErrPrintf("incorrect link target address: addr: %llu, expected: %llu\n", (long long unsigned)oinfo.addr, (long long unsigned)root_addr); @@ -10554,7 +10554,7 @@ test_attr_bug8(hid_t fcpl, hid_t fapl) CHECK(gid, FAIL, "H5Gopen2"); oid = H5Oopen(gid, LINK1_NAME, H5P_DEFAULT); CHECK(oid, FAIL, "H5Oopen"); - ret = H5Oget_info(oid, &oinfo); + ret = H5Oget_info2(oid, &oinfo, H5O_INFO_BASIC); CHECK(ret, FAIL, "H5Oget_info"); if(oinfo.addr != root_addr) TestErrPrintf("incorrect link target address: addr: %llu, expected: %llu\n", (long long unsigned)oinfo.addr, (long long unsigned)root_addr); diff --git a/test/testfiles/err_compat_1 b/test/testfiles/err_compat_1 index d471e13..8190665 100644 --- a/test/testfiles/err_compat_1 +++ b/test/testfiles/err_compat_1 @@ -54,6 +54,6 @@ HDF5-DIAG: Error detected in HDF5 (version (number)) thread (IDs): #001: (file name) line (number) in test_error2(): H5Dwrite shouldn't succeed major: Error API minor: Write failed - #002: (file name) line (number) in H5Dwrite(): not a dataset + #002: (file name) line (number) in H5Dwrite(): dset_id is not a dataset ID major: Invalid arguments to routine minor: Inappropriate type diff --git a/test/testfiles/error_test_1 b/test/testfiles/error_test_1 index b0b5085..02cfed8 100644 --- a/test/testfiles/error_test_1 +++ b/test/testfiles/error_test_1 @@ -21,7 +21,7 @@ Error Test-DIAG: Error detected in Error Program (1.0) thread (IDs): Testing error API based on data I/O HDF5-DIAG: Error detected in HDF5 (version (number)) thread (IDs): - #000: (file name) line (number) in H5Dwrite(): not a dataset + #000: (file name) line (number) in H5Dwrite(): dset_id is not a dataset ID major: Invalid arguments to routine minor: Inappropriate type Error Test-DIAG: Error detected in Error Program (1.0) thread (IDs): @@ -32,7 +32,7 @@ Error Test-DIAG: Error detected in Error Program (1.0) thread (IDs): major: Error in IO minor: Error in H5Dwrite HDF5-DIAG: Error detected in HDF5 (version (number)) thread (IDs): - #002: (file name) line (number) in H5Dwrite(): not a dataset + #002: (file name) line (number) in H5Dwrite(): dset_id is not a dataset ID major: Invalid arguments to routine minor: Inappropriate type diff --git a/test/tfile.c b/test/tfile.c index b630ee0..ad7f87f 100644 --- a/test/tfile.c +++ b/test/tfile.c @@ -4891,7 +4891,7 @@ test_libver_bounds_real(H5F_libver_t libver_create, unsigned oh_vers_create, /* * Make sure the root group has the correct object header version */ - ret = H5Oget_info_by_name(file, "/", &oinfo, H5P_DEFAULT); + ret = H5Oget_info_by_name2(file, "/", &oinfo, H5O_INFO_HDR, H5P_DEFAULT); CHECK(ret, FAIL, "H5Oget_info_by_name"); VERIFY(oinfo.hdr.version, oh_vers_create, "H5Oget_info_by_name"); @@ -4907,7 +4907,7 @@ test_libver_bounds_real(H5F_libver_t libver_create, unsigned oh_vers_create, file = H5Fopen("tfile5.h5", H5F_ACC_RDWR, fapl); CHECK(file, FAIL, "H5Fopen"); - ret = H5Oget_info_by_name(file, "/", &oinfo, H5P_DEFAULT); + ret = H5Oget_info_by_name2(file, "/", &oinfo, H5O_INFO_HDR, H5P_DEFAULT); CHECK(ret, FAIL, "H5Oget_info_by_name"); VERIFY(oinfo.hdr.version, oh_vers_create, "H5Oget_info_by_name"); @@ -4918,7 +4918,7 @@ test_libver_bounds_real(H5F_libver_t libver_create, unsigned oh_vers_create, group = H5Gcreate2(file, "/G1", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT); CHECK(group, FAIL, "H5Gcreate"); - ret = H5Oget_info(group, &oinfo); + ret = H5Oget_info2(group, &oinfo, H5O_INFO_HDR); CHECK(ret, FAIL, "H5Oget_info"); VERIFY(oinfo.hdr.version, oh_vers_mod, "H5Oget_info"); @@ -4932,7 +4932,7 @@ test_libver_bounds_real(H5F_libver_t libver_create, unsigned oh_vers_create, group = H5Gcreate2(file, "/G1/G3", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT); CHECK(group, FAIL, "H5Gcreate"); - ret = H5Oget_info(group, &oinfo); + ret = H5Oget_info2(group, &oinfo, H5O_INFO_HDR); CHECK(ret, FAIL, "H5Oget_info_by_name"); VERIFY(oinfo.hdr.version, oh_vers_mod, "H5Oget_info_by_name"); @@ -4942,7 +4942,7 @@ test_libver_bounds_real(H5F_libver_t libver_create, unsigned oh_vers_create, /* * Make sure the root group still has the correct object header version */ - ret = H5Oget_info_by_name(file, "/", &oinfo, H5P_DEFAULT); + ret = H5Oget_info_by_name2(file, "/", &oinfo, H5O_INFO_HDR, H5P_DEFAULT); CHECK(ret, FAIL, "H5Oget_info_by_name"); VERIFY(oinfo.hdr.version, oh_vers_create, "H5Oget_info_by_name"); @@ -5640,7 +5640,7 @@ test_libver_bounds_obj(hid_t fapl) CHECK(fid, FAIL, "H5Fcreate"); /* Get root group's object info */ - ret = H5Oget_info_by_name(fid, "/", &oinfo, H5P_DEFAULT); + ret = H5Oget_info_by_name2(fid, "/", &oinfo, H5O_INFO_HDR, H5P_DEFAULT); CHECK(ret, FAIL, "H5Oget_info_by_name"); /* Verify object header version is 2 because shared message is enabled */ @@ -5659,7 +5659,7 @@ test_libver_bounds_obj(hid_t fapl) CHECK(fid, FAIL, "H5Fcreate"); /* Get root group's object info */ - ret = H5Oget_info_by_name(fid, "/", &oinfo, H5P_DEFAULT); + ret = H5Oget_info_by_name2(fid, "/", &oinfo, H5O_INFO_HDR, H5P_DEFAULT); CHECK(ret, FAIL, "H5Oget_info_by_name"); /* Verify object header version is as indicated by low_bound */ @@ -5714,7 +5714,7 @@ test_libver_bounds_obj(hid_t fapl) VERIFY(ginfo.storage_type, H5G_STORAGE_TYPE_SYMBOL_TABLE, "H5Gget_info"); /* Get object header information */ - ret = H5Oget_info_by_name(gid, GRP_NAME, &oinfo, H5P_DEFAULT); + ret = H5Oget_info_by_name2(gid, GRP_NAME, &oinfo, H5O_INFO_HDR, H5P_DEFAULT); CHECK(ret, FAIL, "H5Oget_info_by_name"); /* Verify object header version as indicated by low_bound */ diff --git a/test/th5o.c b/test/th5o.c index 00d706c..63fee5f 100644 --- a/test/th5o.c +++ b/test/th5o.c @@ -410,13 +410,13 @@ test_h5o_refcount(void) CHECK(ret, FAIL, "H5Sclose"); /* Get ref counts for each object. They should all be 1, since each object has a hard link. */ - ret = H5Oget_info_by_name(fid, "group", &oinfo, H5P_DEFAULT); + ret = H5Oget_info_by_name2(fid, "group", &oinfo, H5O_INFO_BASIC, H5P_DEFAULT); CHECK(ret, FAIL, "H5Oget_info_by_name"); VERIFY(oinfo.rc, 1, "reference count in H5Oget_info_by_name"); - ret = H5Oget_info_by_name(fid, "datatype", &oinfo, H5P_DEFAULT); + ret = H5Oget_info_by_name2(fid, "datatype", &oinfo, H5O_INFO_BASIC, H5P_DEFAULT); CHECK(ret, FAIL, "H5Oget_info_by_name"); VERIFY(oinfo.rc, 1, "reference count in H5Oget_info_by_name"); - ret = H5Oget_info_by_name(fid, "dataset", &oinfo, H5P_DEFAULT); + ret = H5Oget_info_by_name2(fid, "dataset", &oinfo, H5O_INFO_BASIC, H5P_DEFAULT); CHECK(ret, FAIL, "H5Oget_info_by_name"); VERIFY(oinfo.rc, 1, "reference count in H5Oget_info_by_name"); @@ -429,13 +429,13 @@ test_h5o_refcount(void) CHECK(ret, FAIL, "H5Oincr_refcount"); /* Get ref counts for each object. They should all be 2 now. */ - ret = H5Oget_info_by_name(fid, "group", &oinfo, H5P_DEFAULT); + ret = H5Oget_info_by_name2(fid, "group", &oinfo, H5O_INFO_BASIC, H5P_DEFAULT); CHECK(ret, FAIL, "H5Oget_info_by_name"); VERIFY(oinfo.rc, 2, "reference count in H5Oget_info_by_name"); - ret = H5Oget_info_by_name(fid, "datatype", &oinfo, H5P_DEFAULT); + ret = H5Oget_info_by_name2(fid, "datatype", &oinfo, H5O_INFO_BASIC, H5P_DEFAULT); CHECK(ret, FAIL, "H5Oget_info_by_name"); VERIFY(oinfo.rc, 2, "reference count in H5Oget_info_by_name"); - ret = H5Oget_info_by_name(fid, "dataset", &oinfo, H5P_DEFAULT); + ret = H5Oget_info_by_name2(fid, "dataset", &oinfo, H5O_INFO_BASIC, H5P_DEFAULT); CHECK(ret, FAIL, "H5Oget_info_by_name"); VERIFY(oinfo.rc, 2, "reference count in H5Oget_info_by_name"); @@ -447,13 +447,13 @@ test_h5o_refcount(void) ret = H5Odecr_refcount(dset); CHECK(ret, FAIL, "H5Odecr_refcount"); - ret = H5Oget_info_by_name(fid, "group", &oinfo, H5P_DEFAULT); + ret = H5Oget_info_by_name2(fid, "group", &oinfo, H5O_INFO_BASIC, H5P_DEFAULT); CHECK(ret, FAIL, "H5Oget_info_by_name"); VERIFY(oinfo.rc, 1, "reference count in H5Oget_info_by_name"); - ret = H5Oget_info_by_name(fid, "datatype", &oinfo, H5P_DEFAULT); + ret = H5Oget_info_by_name2(fid, "datatype", &oinfo, H5O_INFO_BASIC, H5P_DEFAULT); CHECK(ret, FAIL, "H5Oget_info_by_name"); VERIFY(oinfo.rc, 1, "reference count in H5Oget_info_by_name"); - ret = H5Oget_info_by_name(fid, "dataset", &oinfo, H5P_DEFAULT); + ret = H5Oget_info_by_name2(fid, "dataset", &oinfo, H5O_INFO_BASIC, H5P_DEFAULT); CHECK(ret, FAIL, "H5Oget_info_by_name"); VERIFY(oinfo.rc, 1, "reference count in H5Oget_info_by_name"); @@ -485,13 +485,13 @@ test_h5o_refcount(void) dset = H5Dopen2(fid, "dataset", H5P_DEFAULT); CHECK(dset, FAIL, "H5Dopen2"); - ret = H5Oget_info_by_name(fid, "group", &oinfo, H5P_DEFAULT); + ret = H5Oget_info_by_name2(fid, "group", &oinfo, H5O_INFO_BASIC, H5P_DEFAULT); CHECK(ret, FAIL, "H5Oget_info_by_name"); VERIFY(oinfo.rc, 2, "reference count in H5Oget_info_by_name"); - ret = H5Oget_info_by_name(fid, "datatype", &oinfo, H5P_DEFAULT); + ret = H5Oget_info_by_name2(fid, "datatype", &oinfo, H5O_INFO_BASIC, H5P_DEFAULT); CHECK(ret, FAIL, "H5Oget_info_by_name"); VERIFY(oinfo.rc, 2, "reference count in H5Oget_info_by_name"); - ret = H5Oget_info_by_name(fid, "dataset", &oinfo, H5P_DEFAULT); + ret = H5Oget_info_by_name2(fid, "dataset", &oinfo, H5O_INFO_BASIC, H5P_DEFAULT); CHECK(ret, FAIL, "H5Oget_info_by_name"); VERIFY(oinfo.rc, 2, "reference count in H5Oget_info_by_name"); @@ -523,13 +523,13 @@ test_h5o_refcount(void) dset = H5Dopen2(fid, "dataset", H5P_DEFAULT); CHECK(dset, FAIL, "H5Dopen2"); - ret = H5Oget_info_by_name(fid, "group", &oinfo, H5P_DEFAULT); + ret = H5Oget_info_by_name2(fid, "group", &oinfo, H5O_INFO_BASIC, H5P_DEFAULT); CHECK(ret, FAIL, "H5Oget_info_by_name"); VERIFY(oinfo.rc, 1, "reference count in H5Oget_info_by_name"); - ret = H5Oget_info_by_name(fid, "datatype", &oinfo, H5P_DEFAULT); + ret = H5Oget_info_by_name2(fid, "datatype", &oinfo, H5O_INFO_BASIC, H5P_DEFAULT); CHECK(ret, FAIL, "H5Oget_info_by_name"); VERIFY(oinfo.rc, 1, "reference count in H5Oget_info_by_name"); - ret = H5Oget_info_by_name(fid, "dataset", &oinfo, H5P_DEFAULT); + ret = H5Oget_info_by_name2(fid, "dataset", &oinfo, H5O_INFO_BASIC, H5P_DEFAULT); CHECK(ret, FAIL, "H5Oget_info_by_name"); VERIFY(oinfo.rc, 1, "reference count in H5Oget_info_by_name"); @@ -1272,9 +1272,9 @@ test_h5o_getinfo_same_file(void) HDmemset(&oinfo2, 0, sizeof(oinfo2)); /* Query the object info for each object, through group IDs */ - ret = H5Oget_info(gid1, &oinfo1); + ret = H5Oget_info2(gid1, &oinfo1, H5O_INFO_BASIC); CHECK(ret, FAIL, "H5Oget_info"); - ret = H5Oget_info(gid2, &oinfo2); + ret = H5Oget_info2(gid2, &oinfo2, H5O_INFO_BASIC); CHECK(ret, FAIL, "H5Oget_info"); VERIFY(oinfo1.fileno, oinfo2.fileno, "file number from H5Oget_info"); @@ -1284,9 +1284,9 @@ test_h5o_getinfo_same_file(void) HDmemset(&oinfo2, 0, sizeof(oinfo2)); /* Query the object info for each object, by name */ - ret = H5Oget_info_by_name(fid1, "group1", &oinfo1, H5P_DEFAULT); + ret = H5Oget_info_by_name2(fid1, "group1", &oinfo1, H5O_INFO_BASIC, H5P_DEFAULT); CHECK(ret, FAIL, "H5Oget_info_by_name"); - ret = H5Oget_info_by_name(fid1, "group2", &oinfo2, H5P_DEFAULT); + ret = H5Oget_info_by_name2(fid1, "group2", &oinfo2, H5O_INFO_BASIC, H5P_DEFAULT); CHECK(ret, FAIL, "H5Oget_info_by_name"); VERIFY(oinfo1.fileno, oinfo2.fileno, "file number from H5Oget_info"); @@ -1317,9 +1317,9 @@ test_h5o_getinfo_same_file(void) HDmemset(&oinfo2, 0, sizeof(oinfo2)); /* Query the object info for each object, through group IDs */ - ret = H5Oget_info(gid1, &oinfo1); + ret = H5Oget_info2(gid1, &oinfo1, H5O_INFO_BASIC); CHECK(ret, FAIL, "H5Oget_info"); - ret = H5Oget_info(gid2, &oinfo2); + ret = H5Oget_info2(gid2, &oinfo2, H5O_INFO_BASIC); CHECK(ret, FAIL, "H5Oget_info"); VERIFY(oinfo1.fileno, oinfo2.fileno, "file number from H5Oget_info"); @@ -1329,9 +1329,9 @@ test_h5o_getinfo_same_file(void) HDmemset(&oinfo2, 0, sizeof(oinfo2)); /* Query the object info for each object, by name */ - ret = H5Oget_info_by_name(fid1, "group1", &oinfo1, H5P_DEFAULT); + ret = H5Oget_info_by_name2(fid1, "group1", &oinfo1, H5O_INFO_BASIC, H5P_DEFAULT); CHECK(ret, FAIL, "H5Oget_info_by_name"); - ret = H5Oget_info_by_name(fid1, "group2", &oinfo2, H5P_DEFAULT); + ret = H5Oget_info_by_name2(fid1, "group2", &oinfo2, H5O_INFO_BASIC, H5P_DEFAULT); CHECK(ret, FAIL, "H5Oget_info_by_name"); VERIFY(oinfo1.fileno, oinfo2.fileno, "file number from H5Oget_info"); @@ -1348,6 +1348,136 @@ test_h5o_getinfo_same_file(void) } /* test_h5o_getinfo_same_file() */ +#ifndef H5_NO_DEPRECATED_SYMBOLS + +/**************************************************************** +** +** visit_obj_cb(): +** This is the callback function invoked by H5Ovisit1() in +** test_h5o_getinfo_visit(): +** --Verify that the object info returned to the callback +** function is the same as H5Oget_info2(). +** +****************************************************************/ +static int +visit_obj_cb(hid_t group_id, const char *name, const H5O_info_t *oinfo1, + void H5_ATTR_UNUSED *_op_data) +{ + H5O_info_t oinfo2; /* Object info structs */ + + /* Verify the object info for "group1", "group2" and the root group */ + if(!(HDstrcmp(name, "group1"))) { + H5Oget_info_by_name2(group_id, name, &oinfo2, H5O_INFO_NUM_ATTRS, H5P_DEFAULT); + VERIFY(oinfo1->num_attrs, oinfo2.num_attrs, "obj info from H5Ovisit1"); + } else if(!(HDstrcmp(name, "group2"))) { + H5Oget_info_by_name2(group_id, name, &oinfo2, H5O_INFO_HDR, H5P_DEFAULT); + VERIFY(oinfo1->hdr.nmesgs, oinfo2.hdr.nmesgs, "obj info from H5Ovisit1/H5Oget_info2"); + VERIFY(oinfo1->hdr.nchunks, oinfo2.hdr.nchunks, "obj info from H5Ovisit1/H5Oget_info2"); + } else if(!(HDstrcmp(name, "."))) { + H5Oget_info_by_name2(group_id, name, &oinfo2, H5O_INFO_META_SIZE, H5P_DEFAULT); + VERIFY(oinfo1->meta_size.obj.index_size, oinfo2.meta_size.obj.index_size, "obj info from H5Ovisit1/H5Oget_info2"); + VERIFY(oinfo1->meta_size.obj.heap_size, oinfo2.meta_size.obj.heap_size, "obj info from H5Ovisit1/H5Oget_info2"); + } + + return(H5_ITER_CONT); +} /* end visit_obj_cb() */ + + +/**************************************************************** +** +** test_h5o_getinfo_visit(): +** Verify that the object info returned via H5Oget_info1() +** and H5Oget_info2() are the same. +** Verify that the object info retrieved via H5Ovisit1() is +** the same as H5Oget_info2(). +** +****************************************************************/ +static void +test_h5o_getinfo_visit(void) +{ + hid_t fid = -1; /* HDF5 File ID */ + hid_t gid1 = -1, gid2 = -1; /* Group IDs */ + hid_t sid = -1; /* Dataspace ID */ + hid_t aid = -1; /* Attribute ID */ + H5O_info_t oinfo1, oinfo2; /* Object info structs */ + char attrname[25]; /* Attribute name */ + int j; /* Local index variable */ + herr_t ret; /* Value returned from API calls */ + + /* Create an HDF5 file */ + fid = H5Fcreate(TEST_FILENAME, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT); + CHECK(fid, FAIL, "H5Fcreate"); + + /* Create "group1" in the file */ + gid1 = H5Gcreate2(fid, "group1", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT); + CHECK(gid1, FAIL, "H5Gcreate2"); + + /* Create dataspace */ + sid = H5Screate(H5S_SCALAR); + CHECK(sid, FAIL, "H5Screate"); + + /* Attach 10 attributes to "group1" */ + for(j = 0; j <10; j++) { + /* Create the attribute name */ + sprintf(attrname, "attr%u", j); + /* Create the attribute */ + aid = H5Acreate2(gid1, attrname, H5T_NATIVE_INT, sid, H5P_DEFAULT, H5P_DEFAULT); + CHECK(aid, FAIL, "H5Acreate2"); + /* Close the attribute */ + ret = H5Aclose(aid); + CHECK(ret, FAIL, "H5Aclose"); + } + + /* Create "group2" in the file */ + gid2 = H5Gcreate2(fid, "group2", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT); + CHECK(gid2, FAIL, "H5Gcreate2"); + + /* Reset object info */ + HDmemset(&oinfo1, 0, sizeof(oinfo1)); + HDmemset(&oinfo2, 0, sizeof(oinfo2)); + + /* Query the object info for "group1" via H5Oget_info1 and H5Oget_info2 */ + ret = H5Oget_info1(gid1, &oinfo1); + CHECK(ret, FAIL, "H5Oget_info"); + ret = H5Oget_info2(gid1, &oinfo2, H5O_INFO_BASIC|H5O_INFO_NUM_ATTRS); + CHECK(ret, FAIL, "H5Oget_info"); + + /* Verify the object info for "group1" is correct */ + VERIFY(oinfo1.fileno, oinfo2.fileno, "obj info from H5Oget_info1/2"); + VERIFY(oinfo1.num_attrs, oinfo2.num_attrs, "obj info from H5Oget_info1/2"); + + /* Reset object info */ + HDmemset(&oinfo1, 0, sizeof(oinfo1)); + HDmemset(&oinfo2, 0, sizeof(oinfo2)); + + /* Query the object info for "group2" via H5Oget_info1 and H5Oget_info2 */ + ret = H5Oget_info_by_name1(fid, "group2", &oinfo1, H5P_DEFAULT); + CHECK(ret, FAIL, "H5Oget_info_by_name"); + ret = H5Oget_info_by_name2(fid, "group2", &oinfo2, H5O_INFO_HDR|H5O_INFO_META_SIZE, H5P_DEFAULT); + CHECK(ret, FAIL, "H5Oget_info_by_name"); + + /* Verify the object info for "group2" is correct */ + VERIFY(oinfo1.hdr.nmesgs, oinfo2.hdr.nmesgs, "obj info from H5Oget_info1/2"); + VERIFY(oinfo1.hdr.nchunks, oinfo2.hdr.nchunks, "obj info from H5Oget_info1/2"); + VERIFY(oinfo1.meta_size.obj.index_size, oinfo2.meta_size.obj.index_size, "obj info from H5Oget_info1/2"); + VERIFY(oinfo1.meta_size.obj.heap_size, oinfo2.meta_size.obj.heap_size, "obj info from H5Oget_info1/2"); + + /* Close everything */ + ret = H5Gclose(gid1); + CHECK(ret, FAIL, "H5Gclose"); + ret = H5Gclose(gid2); + CHECK(ret, FAIL, "H5Gclose"); + + /* Verify the object info returned to the callback function is correct */ + ret = H5Ovisit1(fid, H5_INDEX_NAME, H5_ITER_INC, visit_obj_cb, NULL); + + /* Close the file */ + ret = H5Fclose(fid); + CHECK(ret, FAIL, "H5Fclose"); + +} /* test_h5o_getinfo_visit() */ + +#endif /* H5_NO_DEPRECATED_SYMBOLS */ /**************************************************************** @@ -1370,6 +1500,9 @@ test_h5o(void) test_h5o_comment(); /* Test routines for comment */ test_h5o_comment_by_name(); /* Test routines for comment by name */ test_h5o_getinfo_same_file(); /* Test info for objects in the same file */ +#ifndef H5_NO_DEPRECATED_SYMBOLS + test_h5o_getinfo_visit(); /* Test object info for H5Oget_info1/2 and H5Ovisit1 */ +#endif } /* test_h5o() */ diff --git a/test/titerate.c b/test/titerate.c index 82c26eb..de652a7 100644 --- a/test/titerate.c +++ b/test/titerate.c @@ -213,7 +213,7 @@ test_iter_group(hid_t fapl, hbool_t new_format) ret = (herr_t)H5Lget_name_by_idx(root_group, ".", H5_INDEX_NAME, H5_ITER_INC, (hsize_t)i, dataset_name, (size_t)NAMELEN, H5P_DEFAULT); CHECK(ret, FAIL, "H5Lget_name_by_idx"); - ret = H5Oget_info_by_idx(root_group, ".", H5_INDEX_NAME, H5_ITER_INC, (hsize_t)i, &oinfo, H5P_DEFAULT); + ret = H5Oget_info_by_idx2(root_group, ".", H5_INDEX_NAME, H5_ITER_INC, (hsize_t)i, &oinfo, H5O_INFO_BASIC, H5P_DEFAULT); CHECK(ret, FAIL, "H5Oget_info_by_idx"); } /* end for */ @@ -239,7 +239,7 @@ test_iter_group(hid_t fapl, hbool_t new_format) ret = (herr_t)H5Lget_name_by_idx(file, ".", H5_INDEX_NAME, H5_ITER_INC, (hsize_t)i, dataset_name, (size_t)NAMELEN, H5P_DEFAULT); CHECK(ret, FAIL, "H5Lget_name_by_idx"); - ret = H5Oget_info_by_idx(file, ".", H5_INDEX_NAME, H5_ITER_INC, (hsize_t)i, &oinfo, H5P_DEFAULT); + ret = H5Oget_info_by_idx2(file, ".", H5_INDEX_NAME, H5_ITER_INC, (hsize_t)i, &oinfo, H5O_INFO_BASIC, H5P_DEFAULT); CHECK(ret, FAIL, "H5Oget_info_by_idx"); } /* end for */ @@ -553,7 +553,7 @@ liter_cb2(hid_t loc_id, const char *name, const H5L_info_t H5_ATTR_UNUSED *link_ /* * Get type of the object and check it. */ - ret = H5Oget_info_by_name(loc_id, name, &oinfo, H5P_DEFAULT); + ret = H5Oget_info_by_name2(loc_id, name, &oinfo, H5O_INFO_BASIC, H5P_DEFAULT); CHECK(ret, FAIL, "H5Oget_info_by_name"); if(test_info->type != oinfo.type) { @@ -797,7 +797,7 @@ static void test_grp_memb_funcs(hid_t fapl) obj_names[i] = HDstrdup(dataset_name); CHECK_PTR(obj_names[i], "strdup"); - ret = H5Oget_info_by_idx(root_group, ".", H5_INDEX_NAME, H5_ITER_INC, (hsize_t)i, &oinfo, H5P_DEFAULT); + ret = H5Oget_info_by_idx2(root_group, ".", H5_INDEX_NAME, H5_ITER_INC, (hsize_t)i, &oinfo, H5O_INFO_BASIC, H5P_DEFAULT); CHECK(ret, FAIL, "H5Oget_info_by_idx"); if(!HDstrcmp(dataset_name, "grp")) @@ -891,7 +891,7 @@ static void test_links(hid_t fapl) /* Get object type */ if(linfo.type == H5L_TYPE_HARD) { - ret = H5Oget_info_by_idx(gid, ".", H5_INDEX_NAME, H5_ITER_INC, (hsize_t)i, &oinfo, H5P_DEFAULT); + ret = H5Oget_info_by_idx2(gid, ".", H5_INDEX_NAME, H5_ITER_INC, (hsize_t)i, &oinfo, H5O_INFO_BASIC, H5P_DEFAULT); CHECK(ret, FAIL, "H5Oget_info_by_idx"); } /* end if */ diff --git a/test/tmisc.c b/test/tmisc.c index 4a77b51..07234e9 100644 --- a/test/tmisc.c +++ b/test/tmisc.c @@ -674,11 +674,11 @@ test_misc4(void) CHECK(group3, FAIL, "H5Gcreate2"); /* Get the stat information for each group */ - ret = H5Oget_info_by_name(file1, MISC4_GROUP_1, &oinfo1, H5P_DEFAULT); + ret = H5Oget_info_by_name2(file1, MISC4_GROUP_1, &oinfo1, H5O_INFO_BASIC, H5P_DEFAULT); CHECK(ret, FAIL, "H5Oget_info_by_name"); - ret = H5Oget_info_by_name(file1, MISC4_GROUP_2, &oinfo2, H5P_DEFAULT); + ret = H5Oget_info_by_name2(file1, MISC4_GROUP_2, &oinfo2, H5O_INFO_BASIC, H5P_DEFAULT); CHECK(ret, FAIL, "H5Oget_info_by_name"); - ret = H5Oget_info_by_name(file2, MISC4_GROUP_1, &oinfo3, H5P_DEFAULT); + ret = H5Oget_info_by_name2(file2, MISC4_GROUP_1, &oinfo3, H5O_INFO_BASIC, H5P_DEFAULT); CHECK(ret, FAIL, "H5Oget_info_by_name"); /* Verify that the fileno values are the same for groups from file1 */ @@ -2929,7 +2929,7 @@ test_misc18(void) CHECK(did1, FAIL, "H5Dcreate2"); /* Get object information */ - ret = H5Oget_info_by_name(fid, MISC18_DSET1_NAME, &oinfo, H5P_DEFAULT); + ret = H5Oget_info_by_name2(fid, MISC18_DSET1_NAME, &oinfo, H5O_INFO_HDR|H5O_INFO_NUM_ATTRS, H5P_DEFAULT); CHECK(ret, FAIL, "H5Oget_info_by_name"); VERIFY(oinfo.hdr.nmesgs, 6, "H5Oget_info_by_name"); VERIFY(oinfo.hdr.nchunks, 1, "H5Oget_info_by_name"); @@ -2942,7 +2942,7 @@ test_misc18(void) CHECK(did2, FAIL, "H5Dcreate2"); /* Get object information */ - ret = H5Oget_info_by_name(fid, MISC18_DSET2_NAME, &oinfo, H5P_DEFAULT); + ret = H5Oget_info_by_name2(fid, MISC18_DSET2_NAME, &oinfo, H5O_INFO_HDR|H5O_INFO_NUM_ATTRS, H5P_DEFAULT); CHECK(ret, FAIL, "H5Oget_info_by_name"); VERIFY(oinfo.hdr.nmesgs, 6, "H5Oget_info_by_name"); VERIFY(oinfo.hdr.nchunks, 1, "H5Oget_info_by_name"); @@ -2975,7 +2975,7 @@ test_misc18(void) } /* end for */ /* Get object information for dataset #1 now */ - ret = H5Oget_info_by_name(fid, MISC18_DSET1_NAME, &oinfo, H5P_DEFAULT); + ret = H5Oget_info_by_name2(fid, MISC18_DSET1_NAME, &oinfo, H5O_INFO_HDR|H5O_INFO_NUM_ATTRS, H5P_DEFAULT); CHECK(ret, FAIL, "H5Oget_info_by_name"); VERIFY(oinfo.hdr.nmesgs, 24, "H5Oget_info_by_name"); VERIFY(oinfo.hdr.nchunks, 9, "H5Oget_info_by_name"); @@ -2984,7 +2984,7 @@ test_misc18(void) VERIFY(oinfo.num_attrs, 10, "H5Oget_info_by_name"); /* Get object information for dataset #2 now */ - ret = H5Oget_info_by_name(fid, MISC18_DSET2_NAME, &oinfo, H5P_DEFAULT); + ret = H5Oget_info_by_name2(fid, MISC18_DSET2_NAME, &oinfo, H5O_INFO_HDR|H5O_INFO_NUM_ATTRS, H5P_DEFAULT); CHECK(ret, FAIL, "H5Oget_info_by_name"); VERIFY(oinfo.hdr.nmesgs, 24, "H5Oget_info_by_name"); VERIFY(oinfo.hdr.nchunks, 9, "H5Oget_info_by_name"); @@ -3958,7 +3958,7 @@ test_misc23(void) tmp_id = H5Gopen2(file_id, "/A/B01", H5P_DEFAULT); CHECK(tmp_id, FAIL, "H5Gopen2"); - status = H5Oget_info(tmp_id, &oinfo); + status = H5Oget_info2(tmp_id, &oinfo, H5O_INFO_BASIC); CHECK(status, FAIL, "H5Oget_info"); VERIFY(oinfo.rc, 1, "H5Oget_info"); @@ -5238,7 +5238,7 @@ test_misc30_get_info_cb(hid_t loc_id, const char *name, const H5L_info_t H5_ATTR { H5O_info_t object_info; - return H5Oget_info_by_name(loc_id, name, &object_info, H5P_DEFAULT); + return H5Oget_info_by_name2(loc_id, name, &object_info, H5O_INFO_BASIC, H5P_DEFAULT); } static int @@ -5504,19 +5504,19 @@ test_misc33(void) /* Case (1) */ H5E_BEGIN_TRY { - ret = H5Oget_info_by_name(fid, "/soft_two", &oinfo, H5P_DEFAULT); + ret = H5Oget_info_by_name2(fid, "/soft_two", &oinfo, H5O_INFO_BASIC, H5P_DEFAULT); } H5E_END_TRY; VERIFY(ret, FAIL, "H5Oget_info_by_name"); /* Case (2) */ H5E_BEGIN_TRY { - ret = H5Oget_info_by_name(fid, "/dsetA", &oinfo, H5P_DEFAULT); + ret = H5Oget_info_by_name2(fid, "/dsetA", &oinfo, H5O_INFO_BASIC, H5P_DEFAULT); } H5E_END_TRY; VERIFY(ret, FAIL, "H5Oget_info_by_name"); /* Case (3) */ H5E_BEGIN_TRY { - ret = H5Oget_info_by_name(fid, "/soft_one", &oinfo, H5P_DEFAULT); + ret = H5Oget_info_by_name2(fid, "/soft_one", &oinfo, H5O_INFO_BASIC, H5P_DEFAULT); } H5E_END_TRY; VERIFY(ret, FAIL, "H5Oget_info_by_name"); diff --git a/test/trefer.c b/test/trefer.c index 55172c0..b7a1d59 100644 --- a/test/trefer.c +++ b/test/trefer.c @@ -1495,7 +1495,7 @@ test_reference_group(void) CHECK(size, FAIL, "H5Lget_name_by_idx"); VERIFY_STR(objname, DSETNAME2, "H5Lget_name_by_idx"); - ret = H5Oget_info_by_idx(gid, ".", H5_INDEX_NAME, H5_ITER_INC, (hsize_t)0, &oinfo, H5P_DEFAULT); + ret = H5Oget_info_by_idx2(gid, ".", H5_INDEX_NAME, H5_ITER_INC, (hsize_t)0, &oinfo, H5O_INFO_BASIC, H5P_DEFAULT); CHECK(ret, FAIL, "H5Oget_info_by_idx"); VERIFY(oinfo.type, H5O_TYPE_DATASET, "H5Oget_info_by_idx"); diff --git a/test/tsohm.c b/test/tsohm.c index 133b196..d00a03a 100644 --- a/test/tsohm.c +++ b/test/tsohm.c @@ -839,7 +839,7 @@ static void test_sohm_size1(void) CHECK_I(file, "size1_helper"); /* Get the size of a dataset object header */ - ret = H5Oget_info_by_name(file, DSETNAME[0], &oinfo, H5P_DEFAULT); + ret = H5Oget_info_by_name2(file, DSETNAME[0], &oinfo, H5O_INFO_HDR, H5P_DEFAULT); CHECK_I(ret, "H5Oget_info_by_name"); ret = H5Fclose(file); CHECK_I(ret, "H5Fclose"); @@ -894,7 +894,7 @@ static void test_sohm_size1(void) CHECK_I(file, "size1_helper"); /* Get the size of a dataset object header */ - ret = H5Oget_info_by_name(file, DSETNAME[0], &oinfo, H5P_DEFAULT); + ret = H5Oget_info_by_name2(file, DSETNAME[0], &oinfo, H5O_INFO_HDR, H5P_DEFAULT); CHECK_I(ret, "H5Oget_info_by_name"); ret = H5Fclose(file); CHECK_I(ret, "H5Fclose"); diff --git a/test/unlink.c b/test/unlink.c index f5754f8..2a7bbcd 100644 --- a/test/unlink.c +++ b/test/unlink.c @@ -446,9 +446,9 @@ check_new_move(hid_t fapl) FAIL_STACK_ERROR /* Get hard link info */ - if(H5Oget_info_by_name(file, "/group2/group_new_name", &oi_hard1, H5P_DEFAULT) < 0) + if(H5Oget_info_by_name2(file, "/group2/group_new_name", &oi_hard1, H5O_INFO_BASIC, H5P_DEFAULT) < 0) FAIL_STACK_ERROR - if(H5Oget_info_by_name(file, "/group1/hard", &oi_hard2, H5P_DEFAULT) < 0) + if(H5Oget_info_by_name2(file, "/group1/hard", &oi_hard2, H5O_INFO_BASIC, H5P_DEFAULT) < 0) FAIL_STACK_ERROR /* Check hard links */ @@ -2228,7 +2228,7 @@ test_full_group_compact(hid_t fapl) /* Check reference count on objects to keep */ for(u = 0; u < FULL_GROUP_NUM_KEEP; u++) { sprintf(objname, "/keep/keep %u\n", u); - if(H5Oget_info_by_name(file_id, objname, &oi, H5P_DEFAULT) < 0) FAIL_STACK_ERROR + if(H5Oget_info_by_name2(file_id, objname, &oi, H5O_INFO_BASIC, H5P_DEFAULT) < 0) FAIL_STACK_ERROR if(oi.rc != 2) TEST_ERROR } /* end for */ @@ -2245,7 +2245,7 @@ test_full_group_compact(hid_t fapl) /* Check reference count on objects to keep */ for(u = 0; u < FULL_GROUP_NUM_KEEP; u++) { sprintf(objname, "/keep/keep %u\n", u); - if(H5Oget_info_by_name(file_id, objname, &oi, H5P_DEFAULT) < 0) FAIL_STACK_ERROR + if(H5Oget_info_by_name2(file_id, objname, &oi, H5O_INFO_BASIC, H5P_DEFAULT) < 0) FAIL_STACK_ERROR if(oi.rc != 1) TEST_ERROR } /* end for */ @@ -2374,7 +2374,7 @@ test_full_group_dense(hid_t fapl) /* Check reference count on objects to keep */ for(u = 0; u < FULL_GROUP_NUM_KEEP; u++) { sprintf(objname, "/keep/keep %u\n", u); - if(H5Oget_info_by_name(file_id, objname, &oi, H5P_DEFAULT) < 0) FAIL_STACK_ERROR + if(H5Oget_info_by_name2(file_id, objname, &oi, H5O_INFO_BASIC, H5P_DEFAULT) < 0) FAIL_STACK_ERROR if(oi.rc != 2) TEST_ERROR } /* end for */ @@ -2391,7 +2391,7 @@ test_full_group_dense(hid_t fapl) /* Check reference count on objects to keep */ for(u = 0; u < FULL_GROUP_NUM_KEEP; u++) { sprintf(objname, "/keep/keep %u\n", u); - if(H5Oget_info_by_name(file_id, objname, &oi, H5P_DEFAULT) < 0) FAIL_STACK_ERROR + if(H5Oget_info_by_name2(file_id, objname, &oi, H5O_INFO_BASIC, H5P_DEFAULT) < 0) FAIL_STACK_ERROR if(oi.rc != 1) TEST_ERROR } /* end for */ @@ -372,7 +372,7 @@ test_api_get_ex_dcpl(test_api_config_t config, hid_t fapl, hid_t dcpl, TEST_ERROR /* Test H5Oget_info returns correct metadata size */ - if(H5Oget_info(dset, &oinfo) < 0) + if(H5Oget_info2(dset, &oinfo, H5O_INFO_META_SIZE) < 0) TEST_ERROR if(oinfo.meta_size.obj.index_size != (hsize_t)0) TEST_ERROR |