summaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorVailin Choi <vchoi@jam.ad.hdfgroup.org>2018-04-24 20:10:13 (GMT)
committerVailin Choi <vchoi@jam.ad.hdfgroup.org>2018-04-24 20:10:13 (GMT)
commite6bc326ec0c417ef7b003da535b2e071442d2067 (patch)
tree700a274f00d7cee9d17c14c79dca71d97a328fc1 /test
parentb3c5284692093953132c6c8227e0980b670bf4ad (diff)
downloadhdf5-e6bc326ec0c417ef7b003da535b2e071442d2067.zip
hdf5-e6bc326ec0c417ef7b003da535b2e071442d2067.tar.gz
hdf5-e6bc326ec0c417ef7b003da535b2e071442d2067.tar.bz2
Fix for HDFFV-10180 Performance issues with H5Oget_info.
Diffstat (limited to 'test')
-rw-r--r--test/cache_tagging.c8
-rw-r--r--test/cork.c40
-rw-r--r--test/dsets.c14
-rw-r--r--test/dtypes.c8
-rw-r--r--test/flushrefresh.c8
-rw-r--r--test/genall5.c6
-rw-r--r--test/getname.c2
-rw-r--r--test/h5test.c4
-rw-r--r--test/links.c114
-rw-r--r--test/mount.c64
-rw-r--r--test/mtime.c8
-rw-r--r--test/objcopy.c166
-rw-r--r--test/ohdr.c2
-rw-r--r--test/stab.c4
-rw-r--r--test/tattr.c50
-rw-r--r--test/tfile.c16
-rw-r--r--test/th5o.c380
-rw-r--r--test/titerate.c10
-rw-r--r--test/tmisc.c24
-rw-r--r--test/trefer.c2
-rw-r--r--test/tsohm.c4
-rw-r--r--test/unlink.c12
-rw-r--r--test/vds.c2
23 files changed, 639 insertions, 309 deletions
diff --git a/test/cache_tagging.c b/test/cache_tagging.c
index 7a2bb49..55afa68 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, 0) < 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, 0, H5P_DEFAULT) < 0 ) TEST_ERROR;
/* =================================== */
/* Verification of Metadata Tag Values */
@@ -2956,8 +2956,6 @@ check_object_info_tags(void)
/* Verify dataset's tagged metadata */
if ( verify_tag(fid, H5AC_OHDR_ID, g_tag) < 0 ) TEST_ERROR;
- if ( verify_tag(fid, H5AC_BT_ID, g_tag) < 0 ) TEST_ERROR;
- if ( verify_tag(fid, H5AC_LHEAP_PRFX_ID, g_tag) < 0 ) TEST_ERROR;
/* verify no other entries present */
if ( verify_no_unknown_tags(fid) < 0 ) TEST_ERROR;
@@ -3585,8 +3583,6 @@ check_external_link_open_tags(void)
/* verify tag value of linked group's object header */
if ( verify_tag(fid2, H5AC_OHDR_ID, link_tag) < 0 ) TEST_ERROR;
- if ( verify_tag(fid2, H5AC_LHEAP_PRFX_ID, link_tag) < 0 ) TEST_ERROR;
- if ( verify_tag(fid2, H5AC_BT_ID, link_tag) < 0 ) TEST_ERROR;
/* verify no other entries present */
if ( verify_no_unknown_tags(fid) < 0 ) TEST_ERROR;
diff --git a/test/cork.c b/test/cork.c
index 8c685ee..7487a9e 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, 0) < 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, 0) < 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, 0) < 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, 0) < 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, 0) < 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, 0) < 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, 0) < 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, 0) < 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, 0) < 0)
TEST_ERROR
- if(H5Oget_info(gid2, &oinfo2) < 0)
+ if(H5Oget_info2(gid2, &oinfo2, 0) < 0)
TEST_ERROR
- if(H5Oget_info(gid3, &oinfo3) < 0)
+ if(H5Oget_info2(gid3, &oinfo3, 0) < 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, 0) < 0)
TEST_ERROR
- if(H5Oget_info(tid2, &oinfo2) < 0)
+ if(H5Oget_info2(tid2, &oinfo2, 0) < 0)
TEST_ERROR
- if(H5Oget_info(tid3, &oinfo3) < 0)
+ if(H5Oget_info2(tid3, &oinfo3, 0) < 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, 0) < 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, 0) < 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, 0) < 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, 0) < 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, 0) < 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, 0) < 0)
TEST_ERROR
if(H5C__verify_cork_tag_test(fid2, oinfo2.addr, FALSE) < 0)
TEST_ERROR
diff --git a/test/dsets.c b/test/dsets.c
index ca1e3d5..ebe7f68 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, 0, 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, 0, 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, 0, 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, 0, 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, 0, 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, 0, 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, 0 );
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 */
diff --git a/test/flushrefresh.c b/test/flushrefresh.c
index 0775dee..9348a10 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, 0);
} 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_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_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_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..69ff964 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, 0);
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, 0);
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, 0);
if ( ret < 0 ) {
diff --git a/test/getname.c b/test/getname.c
index c3f3c54..a6ef2d1 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, 0) < 0) TEST_ERROR
/* Update the reference count to dtype_anon to preserve the datatype */
if(H5Oincr_refcount(dtype_anon) < 0) TEST_ERROR
diff --git a/test/h5test.c b/test/h5test.c
index bbdd58b..5d944ee 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, 0) < 0)
goto error;
if(H5Fclose(file) < 0)
diff --git a/test/links.c b/test/links.c
index 4e88af5..80f9481 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, 0, H5P_DEFAULT) < 0) FAIL_STACK_ERROR
+ if(H5Oget_info_by_name2(file, "grp1/hard", &oinfo2, 0, 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, 0, 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, 0, 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, 0, 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, 0, 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, 0, 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, 0, 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, 0, 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, 0, H5P_DEFAULT) < 0) TEST_ERROR
+ if(H5Oget_info_by_name2(fid1, "elink/elink/elink", &oi, 0, 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, 0, 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, 0) < 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, 0) < 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, 0) < 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, 0) < 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, 0, 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, 0, 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, 0, 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, 0, 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, 0, 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, 0, 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, 0)) < 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, 0, 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, 0) < 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, 0) < 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, 0) < 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, 0) < 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, 0) < 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, 0) < 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, 0) < 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, 0) < 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, 0) < 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_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_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, 0, 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, 0) < 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, 0, 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, 0) < 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, 0, 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, 0, 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, 0) < 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, 0, 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, 0, 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
diff --git a/test/mount.c b/test/mount.c
index d2c0d21..dad780a 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, 0, 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, 0, 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, 0) < 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, 0, 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, 0) < 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, 0) < 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, 0, 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, 0, H5P_DEFAULT) < 0) FAIL_STACK_ERROR
+ if(H5Oget_info_by_name2(mnt, "/mnt_unlink/file2", &oinfo, 0, H5P_DEFAULT) < 0) FAIL_STACK_ERROR
+ if(H5Oget_info_by_name2(root, "/mnt_unlink/file2", &oinfo, 0, H5P_DEFAULT) < 0) FAIL_STACK_ERROR
+ if(H5Oget_info_by_name2(root, "file2", &oinfo, 0, 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, 0, 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, 0, 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, 0, 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, 0, 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, 0, 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, 0, H5P_DEFAULT) < 0) FAIL_STACK_ERROR
+ if(H5Oget_info_by_name2(file1, "/mnt1", &oinfo, 0, H5P_DEFAULT) < 0) FAIL_STACK_ERROR
+ if(H5Oget_info_by_name2(file1, "mnt1", &oinfo, 0, H5P_DEFAULT) < 0) FAIL_STACK_ERROR
+ if(H5Oget_info_by_name2(file1, "/mnt1/file2", &oinfo, 0, H5P_DEFAULT) < 0) FAIL_STACK_ERROR
+ if(H5Oget_info_by_name2(file1, "mnt1/file2", &oinfo, 0, 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, 0, H5P_DEFAULT) < 0) FAIL_STACK_ERROR
+ if(H5Oget_info_by_name2(file2, "/mnt1", &oinfo, 0, H5P_DEFAULT) < 0) FAIL_STACK_ERROR
+ if(H5Oget_info_by_name2(file2, "mnt1", &oinfo, 0, H5P_DEFAULT) < 0) FAIL_STACK_ERROR
+ if(H5Oget_info_by_name2(file2, "/mnt1/file2", &oinfo, 0, H5P_DEFAULT) < 0) FAIL_STACK_ERROR
+ if(H5Oget_info_by_name2(file2, "mnt1/file2", &oinfo, 0, 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, 0, 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, 0, 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, 0) < 0)
TEST_ERROR
- if(H5Oget_info(gidAM, &oinfo) < 0)
+ if(H5Oget_info2(gidAM, &oinfo, 0) < 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, 0);
} H5E_END_TRY;
if(ret >= 0)
TEST_ERROR
H5E_BEGIN_TRY {
- ret = H5Oget_info(gidAM, &oinfo);
+ ret = H5Oget_info2(gidAM, &oinfo, 0);
} H5E_END_TRY;
if(ret >= 0)
TEST_ERROR
diff --git a/test/mtime.c b/test/mtime.c
index 38e3960..59457d4 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_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_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..7e57a56 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, 0) < 0) TEST_ERROR
+ if(H5Oget_info2(obj1_id, &oinfo2, 0) < 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, 0) < 0) TEST_ERROR
+ if(H5Oget_info2(obj1_id, &oinfo2, 0) < 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_HDR, H5P_DEFAULT) < 0) TEST_ERROR
+ if(H5Oget_info_by_name2(gid2, objname2, &oinfo2, 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, 0) < 0) TEST_ERROR
+ if(H5Oget_info2(tid2, &oinfo2, 0) < 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, 0) < 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, 0) < 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, 0) < 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, 0) < 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, 0) < 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, 0) < 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, 0) < 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, 0) < 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, 0) < 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, 0) < 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, 0) < 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, 0) < 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, 0) < 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, 0) < 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, 0) < 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, 0) < 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, 0) < 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, 0) < 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, 0) < 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, 0) < 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, 0) < 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, 0) < 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, 0) < 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, 0) < 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, 0) < 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, 0) < 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, 0) < 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, 0) < 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, 0) < 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, 0) < 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, 0) < 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, 0) < 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, 0) < 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, 0) < 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, 0) < 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, 0) < 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, 0) < 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, 0) < 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, 0) < 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, 0) < 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, 0) < 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, 0) < 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, 0) < 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, 0) < 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, 0) < 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, 0) < 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, 0) < 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, 0) < 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, 0) < 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, 0) < 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, 0) < 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, 0) < 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, 0) < 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, 0) < 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, 0) < 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, 0) < 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, 0) < 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, 0) < 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, 0) < 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, 0) < 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, 0) < 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, 0) < 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, 0) < 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, 0) < 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, 0) < 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, 0) < 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, 0) < 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, 0) < 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, 0) < 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, 0) < 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, 0) < 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, 0) < 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, 0) < 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..f312870 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, 0, 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, 0, 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, 0, 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, 0, 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, 0, 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, 0, 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, 0, 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, 0);
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, 0);
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, 0);
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/tfile.c b/test/tfile.c
index 677fd06..d3134f8 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..76ea3b1 100644
--- a/test/th5o.c
+++ b/test/th5o.c
@@ -30,6 +30,11 @@
#define TEST6_DIM1 100
#define TEST6_DIM2 100
+//#define NUM_GROUPS 100000
+#define NUM_GROUPS 100
+#define NUM_ATTRS 10
+#define NUM_DSETS 50
+
/****************************************************************
**
@@ -410,13 +415,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, 0, 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, 0, 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, 0, H5P_DEFAULT);
CHECK(ret, FAIL, "H5Oget_info_by_name");
VERIFY(oinfo.rc, 1, "reference count in H5Oget_info_by_name");
@@ -429,13 +434,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, 0, 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, 0, 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, 0, H5P_DEFAULT);
CHECK(ret, FAIL, "H5Oget_info_by_name");
VERIFY(oinfo.rc, 2, "reference count in H5Oget_info_by_name");
@@ -447,13 +452,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, 0, 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, 0, 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, 0, H5P_DEFAULT);
CHECK(ret, FAIL, "H5Oget_info_by_name");
VERIFY(oinfo.rc, 1, "reference count in H5Oget_info_by_name");
@@ -485,13 +490,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, 0, 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, 0, 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, 0, H5P_DEFAULT);
CHECK(ret, FAIL, "H5Oget_info_by_name");
VERIFY(oinfo.rc, 2, "reference count in H5Oget_info_by_name");
@@ -523,13 +528,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, 0, 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, 0, 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, 0, H5P_DEFAULT);
CHECK(ret, FAIL, "H5Oget_info_by_name");
VERIFY(oinfo.rc, 1, "reference count in H5Oget_info_by_name");
@@ -1272,9 +1277,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, 0);
CHECK(ret, FAIL, "H5Oget_info");
- ret = H5Oget_info(gid2, &oinfo2);
+ ret = H5Oget_info2(gid2, &oinfo2, 0);
CHECK(ret, FAIL, "H5Oget_info");
VERIFY(oinfo1.fileno, oinfo2.fileno, "file number from H5Oget_info");
@@ -1284,9 +1289,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, 0, 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, 0, H5P_DEFAULT);
CHECK(ret, FAIL, "H5Oget_info_by_name");
VERIFY(oinfo1.fileno, oinfo2.fileno, "file number from H5Oget_info");
@@ -1317,9 +1322,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, 0);
CHECK(ret, FAIL, "H5Oget_info");
- ret = H5Oget_info(gid2, &oinfo2);
+ ret = H5Oget_info2(gid2, &oinfo2, 0);
CHECK(ret, FAIL, "H5Oget_info");
VERIFY(oinfo1.fileno, oinfo2.fileno, "file number from H5Oget_info");
@@ -1329,9 +1334,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, 0, 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, 0, H5P_DEFAULT);
CHECK(ret, FAIL, "H5Oget_info_by_name");
VERIFY(oinfo1.fileno, oinfo2.fileno, "file number from H5Oget_info");
@@ -1348,6 +1353,331 @@ 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_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() */
+
+
+/****************************************************************
+**
+** perform_visit_obj_cb():
+** This is the callback function invoked by H5Ovisit1 and
+** H5Ovisit2() used in test_h5o_perform_getinfo_visit().
+**
+****************************************************************/
+static int
+perform_visit_obj_cb(hid_t H5_ATTR_UNUSED group_id, const char H5_ATTR_UNUSED *name,
+ const H5O_info_t H5_ATTR_UNUSED *oinfo, void H5_ATTR_UNUSED *_op_data)
+{
+ return(H5_ITER_CONT);
+} /* end visit_obj_cb() */
+
+/****************************************************************
+**
+** test_h5o_perform_getinfo_visit():
+** Verify that H5Ovisit2 performs better than H5Ovisit1:
+** --H5Ovisit2 has fields = 0 passed to the internal
+** library routine H5O_get_info()
+** --H5Ovisit1 has fields = H5O_INFO_ALL passed to
+** internal library routine H5O_get_info()
+** 1) Create an HDF5 file
+** 2) Create a group with NUM_GROUPS sub-groups
+** 3) Attach NUM_ATTRS attributes to each sub-group
+** 4) Create NUM_DSETS datasets for each sub-group
+** 5) Visit all the objects from the root group via
+** H5Ovisit1 and H5Ovisit2
+** 6) Verify the iteration time used for H5Ovisit2 is
+** less than H5Ovisit1
+**
+****************************************************************/
+static void
+test_h5o_perform_getinfo_visit(void)
+{
+ hid_t fid = -1; /* HDF5 File ID */
+ hid_t fapl = -1; /* File access property list */
+ hid_t gid = -1; /* Group IDs */
+ hid_t asid = -1; /* Dataspace ID for the attribute */
+ unsigned i, j; /* Local index variable */
+ struct timeval startTime; /* Starting time */
+ struct timeval endTime; /* Ending time */
+ time_t new_runtime = 0.0; /* Time used for H5Oget_info2 */
+ time_t old_runtime = 0.0; /* time used for H5Oget_info1 */
+ hid_t dcpl = -1; /* Dataset creation property list */
+ hid_t sid = -1; /* Dataspace ID for dataset */
+ hid_t did = -1; /* Dataset ID */
+ hsize_t dims[2]; /* Dimension sizes */
+ hsize_t max_dims[2]; /* Maximum dimension sizes */
+ hsize_t chunk_dims[2]; /* Chunk dimension sizes */
+ unsigned wbuf[10][30]; /* Data buffer */
+ herr_t ret; /* Value returned from API calls */
+
+ fapl = H5Pcreate(H5P_FILE_ACCESS);
+ CHECK(fapl, FAIL, "H5Pcreate");
+ ret = H5Pset_libver_bounds(fapl, H5F_LIBVER_LATEST, H5F_LIBVER_LATEST);
+ CHECK(ret, FAIL, "H5Pset_libver_bounds");
+
+ /* Create a new HDF5 file */
+ fid = H5Fcreate(TEST_FILENAME, H5F_ACC_TRUNC, H5P_DEFAULT, fapl);
+ CHECK(fid, FAIL, "H5Fcreate");
+
+ /* Create dataspace for the attribute */
+ asid = H5Screate(H5S_SCALAR);
+ CHECK(asid, FAIL, "H5Screate");
+
+ /* Set up to create a chunked dataset in the group: this will use v2 B-tree chunk indexing */
+ dcpl = H5Pcreate(H5P_DATASET_CREATE);
+ chunk_dims[0] = chunk_dims[1] = 10;
+ H5Pset_chunk(dcpl, 2, chunk_dims);
+ dims[0] = 10;
+ dims[1] = 30;
+ max_dims[0] = max_dims[1] = H5S_UNLIMITED;
+ sid = H5Screate_simple(2, dims, max_dims);
+
+ /* Initialize write buffer */
+ for(i=0; i<dims[0]; i++)
+ for(j=0; j<dims[1]; j++)
+ wbuf[i][j] = (2 * i) - j;
+
+ /* Create the root group */
+ gid = H5Gcreate(fid, "group", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
+ CHECK(gid, FAIL, "H5Gcreate");
+
+ /* Create the sub-groups */
+ for(i = 0; i < NUM_GROUPS; i++) {
+ char grpname[25]; /* Group name */
+ char attrname[25]; /* Attribute name */
+ char dname[25]; /* Dataset name */
+ hid_t gid1 = -1; /* Group ID */
+ hid_t aid = -1; /* Attribute ID */
+
+ /* Create the group name */
+ sprintf(grpname, "A%u", i);
+
+ /* Create the group */
+ gid1 = H5Gcreate(gid, grpname, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
+ CHECK(gid1, FAIL, "H5Gcreate");
+
+ /* Attach the attributes to the group */
+ for(j = 0; j < NUM_ATTRS; j++) {
+ /* Create the attribute name */
+ sprintf(attrname, "attr%u", j);
+ /* Create the attribute */
+ aid = H5Acreate2(gid1, attrname, H5T_NATIVE_INT, asid, H5P_DEFAULT, H5P_DEFAULT);
+ CHECK(aid, FAIL, "H5Acreate2");
+ /* Close the attribute */
+ ret = H5Aclose(aid);
+ CHECK(ret, FAIL, "H5Aclose");
+ }
+
+ /* Create the datasets in the group */
+ for(j = 0; j < NUM_DSETS; j++) {
+ sprintf(dname, "DNAME%u", j);
+ did = H5Dcreate2(gid1, dname, H5T_NATIVE_INT, sid, H5P_DEFAULT, dcpl, H5P_DEFAULT);
+ CHECK(did, FAIL, "H5Dcreate2");
+ ret = H5Dwrite(did, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, wbuf);
+ CHECK(ret, FAIL, "H5Dwrite");
+ ret = H5Dclose(did);
+ CHECK(ret, FAIL, "H5Dclose");
+ }
+
+ /* Close the group */
+ ret = H5Gclose(gid1);
+ CHECK(ret, FAIL, "H5Gclose");
+ }
+
+ /* Close the dataspace */
+ ret = H5Sclose(asid);
+ CHECK(ret, FAIL, "H5Sclose");
+
+ ret = H5Sclose(sid);
+ CHECK(ret, FAIL, "H5Sclose");
+
+ /* Close the group */
+ ret = H5Gclose(gid);
+ CHECK(ret, FAIL, "H5Gclose");
+
+ /* Close the file */
+ ret = H5Fclose(fid);
+ CHECK(ret, FAIL, "H5Fclose");
+
+ /* Re-open the file */
+ fid = H5Fopen(TEST_FILENAME, H5F_ACC_RDONLY, fapl);
+ CHECK(fid, FAIL, "H5Fopen");
+
+ /* Get the starting time */
+ HDgettimeofday(&startTime, 0);
+
+ /* Recursively visit all the objects from the root group via H5Ovisit2 */
+ /* Object info with fields = 0 is returned to perform_visit_obj_cb() */
+ ret = H5Ovisit2(fid, H5_INDEX_NAME, H5_ITER_INC, perform_visit_obj_cb, NULL, 0);
+ CHECK(ret, FAIL, "H5Ovisit2");
+
+ /* Get the ending time */
+ HDgettimeofday(&endTime, 0);
+
+ /* Calculate the time used for H5Ovisit2 */
+ new_runtime = (endTime.tv_sec * 1000000 + endTime.tv_usec) - (startTime.tv_sec * 1000000 + startTime.tv_usec);
+
+ /* Close the file */
+ H5Fclose(fid);
+ CHECK(ret, FAIL, "H5Fclose");
+
+ /* Re-open the file */
+ fid = H5Fopen(TEST_FILENAME, H5F_ACC_RDONLY, H5P_DEFAULT);
+ CHECK(fid, FAIL, "H5Fopen");
+
+ /* Get the starting time */
+ HDgettimeofday(&startTime, 0);
+
+ /* Recursively visit all the objects from the root group via H5Ovisit1 */
+ /* Object info with fields = H5O_INFO_ALL is returned to perform_visit_obj_cb() */
+ ret = H5Ovisit1(fid, H5_INDEX_NAME, H5_ITER_INC, perform_visit_obj_cb, NULL);
+ CHECK(ret, FAIL, "H5Literate_by_name");
+
+ /* Get the ending time */
+ HDgettimeofday(&endTime, 0);
+
+ /* Calculate the time used for H5Ovisit1 */
+ old_runtime = (endTime.tv_sec * 1000000 + endTime.tv_usec) - (startTime.tv_sec * 1000000 + startTime.tv_usec);
+
+ /* Close the file */
+ H5Fclose(fid);
+ CHECK(ret, FAIL, "H5Fclose");
+
+ /* Close the file access property list */
+ H5Pclose(fapl);
+ CHECK(ret, FAIL, "H5Pclose");
+
+ /* Verify the time used for H5Ovisit2 is better than H5Ovisit1 */
+ VERIFY(new_runtime < old_runtime, TRUE, "compare time for H5Oget_info1/2");
+
+} /* test_h5o_perform_getinfo_visit() */
+
+#endif /* H5_NO_DEPRECATED_SYMBOLS */
/****************************************************************
@@ -1370,6 +1700,10 @@ 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 */
+ test_h5o_perform_getinfo_visit(); /* Test that object info with fields selection perform better */
+#endif
} /* test_h5o() */
diff --git a/test/titerate.c b/test/titerate.c
index 82c26eb..1f4c0ed 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, 0, 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, 0, 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, 0, 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, 0, 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, 0, H5P_DEFAULT);
CHECK(ret, FAIL, "H5Oget_info_by_idx");
} /* end if */
diff --git a/test/tmisc.c b/test/tmisc.c
index 4a77b51..0ee0302 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, 0, 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, 0, 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, 0, 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, 0);
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, 0, 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, 0, 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, 0, 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, 0, H5P_DEFAULT);
} H5E_END_TRY;
VERIFY(ret, FAIL, "H5Oget_info_by_name");
diff --git a/test/trefer.c b/test/trefer.c
index 7cbb77f..30ad112 100644
--- a/test/trefer.c
+++ b/test/trefer.c
@@ -1411,7 +1411,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, 0, 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..c3ebc4c 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, 0, 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, 0, 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, 0, 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, 0, 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, 0, 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, 0, H5P_DEFAULT) < 0) FAIL_STACK_ERROR
if(oi.rc != 1) TEST_ERROR
} /* end for */
diff --git a/test/vds.c b/test/vds.c
index 7a659cb..3f00224 100644
--- a/test/vds.c
+++ b/test/vds.c
@@ -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