summaryrefslogtreecommitdiffstats
path: root/test/tattr.c
diff options
context:
space:
mode:
authorDana Robinson <derobins@hdfgroup.org>2020-01-16 21:29:34 (GMT)
committerDana Robinson <derobins@hdfgroup.org>2020-01-16 21:29:34 (GMT)
commita92c735c9b57049e8c4037d3490f7e10f8eef4d6 (patch)
tree74da25151de6d1e32329dfcd62e17c863e2e3de1 /test/tattr.c
parent024f7ba09250110c19b070c9699cfbc0f9dc2b96 (diff)
downloadhdf5-a92c735c9b57049e8c4037d3490f7e10f8eef4d6.zip
hdf5-a92c735c9b57049e8c4037d3490f7e10f8eef4d6.tar.gz
hdf5-a92c735c9b57049e8c4037d3490f7e10f8eef4d6.tar.bz2
Squashed commit of the token_refactoring branch:
Diffstat (limited to 'test/tattr.c')
-rw-r--r--test/tattr.c177
1 files changed, 92 insertions, 85 deletions
diff --git a/test/tattr.c b/test/tattr.c
index b89ec3f..bcd8698 100644
--- a/test/tattr.c
+++ b/test/tattr.c
@@ -20,6 +20,7 @@
*************************************************************/
#include "testhdf5.h"
+#include "H5VLnative_private.h"
/*
* This file needs to access private information from the H5O package.
@@ -427,7 +428,7 @@ test_attr_basic_read(hid_t fapl)
hid_t dataset; /* Dataset ID */
hid_t group; /* Group ID */
hid_t attr; /* Attribute ID */
- H5O_info_t oinfo; /* Object info */
+ H5O_info2_t oinfo; /* Object info */
int read_data1[ATTR1_DIM1] = {0}; /* Buffer for reading 1st attribute */
int read_data2[ATTR2_DIM1][ATTR2_DIM2] = {{0}}; /* Buffer for reading 2nd attribute */
int i, j; /* Local index variables */
@@ -445,9 +446,9 @@ test_attr_basic_read(hid_t fapl)
CHECK(dataset, FAIL, "H5Dopen2");
/* Verify the correct number of attributes */
- ret = H5Oget_info2(dataset, &oinfo, H5O_INFO_NUM_ATTRS);
- CHECK(ret, FAIL, "H5Oget_info");
- VERIFY(oinfo.num_attrs, 2, "H5Oget_info");
+ ret = H5Oget_info3(dataset, &oinfo, H5O_INFO_NUM_ATTRS);
+ CHECK(ret, FAIL, "H5Oget_info3");
+ VERIFY(oinfo.num_attrs, 2, "H5Oget_info3");
/* Open first attribute for the dataset */
attr = H5Aopen(dataset, ATTR_TMP_NAME, H5P_DEFAULT);
@@ -474,9 +475,9 @@ test_attr_basic_read(hid_t fapl)
CHECK(group, FAIL, "H5Gopen2");
/* Verify the correct number of attributes */
- ret = H5Oget_info2(group, &oinfo, H5O_INFO_NUM_ATTRS);
- CHECK(ret, FAIL, "H5Oget_info");
- VERIFY(oinfo.num_attrs, 1, "H5Oget_info");
+ ret = H5Oget_info3(group, &oinfo, H5O_INFO_NUM_ATTRS);
+ CHECK(ret, FAIL, "H5Oget_info3");
+ VERIFY(oinfo.num_attrs, 1, "H5Oget_info3");
/* Open the attribute for the group */
attr = H5Aopen(group, ATTR2_NAME, H5P_DEFAULT);
@@ -811,7 +812,7 @@ test_attr_compound_read(hid_t fapl)
hid_t field; /* Attribute field datatype */
struct attr4_struct read_data4[ATTR4_DIM1][ATTR4_DIM2]; /* Buffer for reading 4th attribute */
ssize_t name_len; /* Length of attribute name */
- H5O_info_t oinfo; /* Object info */
+ H5O_info2_t oinfo; /* Object info */
int i, j; /* Local index variables */
herr_t ret; /* Generic return value */
@@ -827,9 +828,9 @@ test_attr_compound_read(hid_t fapl)
CHECK(dataset, FAIL, "H5Dopen2");
/* Verify the correct number of attributes */
- ret = H5Oget_info2(dataset, &oinfo, H5O_INFO_NUM_ATTRS);
- CHECK(ret, FAIL, "H5Oget_info");
- VERIFY(oinfo.num_attrs, 1, "H5Oget_info");
+ ret = H5Oget_info3(dataset, &oinfo, H5O_INFO_NUM_ATTRS);
+ CHECK(ret, FAIL, "H5Oget_info3");
+ VERIFY(oinfo.num_attrs, 1, "H5Oget_info3");
/* Open 1st attribute for the dataset */
attr = H5Aopen_by_idx(dataset, ".", H5_INDEX_CRT_ORDER, H5_ITER_INC, (hsize_t)0, H5P_DEFAULT, H5P_DEFAULT);
@@ -1016,7 +1017,7 @@ test_attr_scalar_read(hid_t fapl)
hid_t attr; /* Attribute ID */
H5S_class_t stype; /* Dataspace class */
float rdata = 0.0F; /* Buffer for reading 1st attribute */
- H5O_info_t oinfo; /* Object info */
+ H5O_info2_t oinfo; /* Object info */
herr_t ret; /* Generic return value */
/* Output message about test being performed */
@@ -1031,9 +1032,9 @@ test_attr_scalar_read(hid_t fapl)
CHECK(dataset, FAIL, "H5Dopen2");
/* Verify the correct number of attributes */
- ret = H5Oget_info2(dataset, &oinfo, H5O_INFO_NUM_ATTRS);
- CHECK(ret, FAIL, "H5Oget_info");
- VERIFY(oinfo.num_attrs, 1, "H5Oget_info");
+ ret = H5Oget_info3(dataset, &oinfo, H5O_INFO_NUM_ATTRS);
+ CHECK(ret, FAIL, "H5Oget_info3");
+ VERIFY(oinfo.num_attrs, 1, "H5Oget_info3");
/* Open an attribute for the dataset */
attr = H5Aopen(dataset, ATTR5_NAME, H5P_DEFAULT);
@@ -1218,7 +1219,7 @@ test_attr_mult_read(hid_t fapl)
int read_data2[ATTR2_DIM1][ATTR2_DIM2] = {{0}}; /* Buffer for reading 2nd attribute */
double read_data3[ATTR3_DIM1][ATTR3_DIM2][ATTR3_DIM3] = {{{0}}}; /* Buffer for reading 3rd attribute */
ssize_t name_len; /* Length of attribute name */
- H5O_info_t oinfo; /* Object info */
+ H5O_info2_t oinfo; /* Object info */
int i, j, k; /* Local index values */
herr_t ret; /* Generic return value */
@@ -1234,9 +1235,9 @@ test_attr_mult_read(hid_t fapl)
CHECK(dataset, FAIL, "H5Dopen2");
/* Verify the correct number of attributes */
- ret = H5Oget_info2(dataset, &oinfo, H5O_INFO_NUM_ATTRS);
- CHECK(ret, FAIL, "H5Oget_info");
- VERIFY(oinfo.num_attrs, 3, "H5Oget_info");
+ ret = H5Oget_info3(dataset, &oinfo, H5O_INFO_NUM_ATTRS);
+ CHECK(ret, FAIL, "H5Oget_info3");
+ VERIFY(oinfo.num_attrs, 3, "H5Oget_info3");
/* Open 1st attribute for the dataset */
attr = H5Aopen_by_idx(dataset, ".", H5_INDEX_CRT_ORDER, H5_ITER_INC, (hsize_t)0, H5P_DEFAULT, H5P_DEFAULT);
@@ -1468,7 +1469,7 @@ test_attr_iterate(hid_t fapl)
hid_t dataset; /* Dataset ID */
hid_t sid; /* Dataspace ID */
int count; /* operator data for the iterator */
- H5O_info_t oinfo; /* Object info */
+ H5O_info2_t oinfo; /* Object info */
herr_t ret; /* Generic return value */
/* Output message about test being performed */
@@ -1491,9 +1492,9 @@ test_attr_iterate(hid_t fapl)
CHECK(ret, FAIL, "H5Sclose");
/* Verify the correct number of attributes */
- ret = H5Oget_info2(dataset, &oinfo, H5O_INFO_NUM_ATTRS);
- CHECK(ret, FAIL, "H5Oget_info");
- VERIFY(oinfo.num_attrs, 0, "H5Oget_info");
+ ret = H5Oget_info3(dataset, &oinfo, H5O_INFO_NUM_ATTRS);
+ CHECK(ret, FAIL, "H5Oget_info3");
+ VERIFY(oinfo.num_attrs, 0, "H5Oget_info3");
/* Iterate over attributes on dataset */
count = 0;
@@ -1509,9 +1510,9 @@ test_attr_iterate(hid_t fapl)
CHECK(dataset, FAIL, "H5Dopen2");
/* Verify the correct number of attributes */
- ret = H5Oget_info2(dataset, &oinfo, H5O_INFO_NUM_ATTRS);
- CHECK(ret, FAIL, "H5Oget_info");
- VERIFY(oinfo.num_attrs, 3, "H5Oget_info");
+ ret = H5Oget_info3(dataset, &oinfo, H5O_INFO_NUM_ATTRS);
+ CHECK(ret, FAIL, "H5Oget_info3");
+ VERIFY(oinfo.num_attrs, 3, "H5Oget_info3");
/* Iterate over attributes on dataset */
count = 0;
@@ -1541,7 +1542,7 @@ test_attr_delete(hid_t fapl)
hid_t attr; /* Attribute ID */
char attr_name[ATTR_NAME_LEN]; /* Buffer for attribute names */
ssize_t name_len; /* Length of attribute name */
- H5O_info_t oinfo; /* Object info */
+ H5O_info2_t oinfo; /* Object info */
herr_t ret; /* Generic return value */
/* Output message about test being performed */
@@ -1556,27 +1557,27 @@ test_attr_delete(hid_t fapl)
CHECK(dataset, FAIL, "H5Dopen2");
/* Verify the correct number of attributes */
- ret = H5Oget_info2(dataset, &oinfo, H5O_INFO_NUM_ATTRS);
- CHECK(ret, FAIL, "H5Oget_info");
- VERIFY(oinfo.num_attrs, 3, "H5Oget_info");
+ ret = H5Oget_info3(dataset, &oinfo, H5O_INFO_NUM_ATTRS);
+ CHECK(ret, FAIL, "H5Oget_info3");
+ VERIFY(oinfo.num_attrs, 3, "H5Oget_info3");
/* Try to delete bogus attribute */
ret = H5Adelete(dataset, "Bogus");
VERIFY(ret, FAIL, "H5Adelete");
/* Verify the correct number of attributes */
- ret = H5Oget_info2(dataset, &oinfo, H5O_INFO_NUM_ATTRS);
- CHECK(ret, FAIL, "H5Oget_info");
- VERIFY(oinfo.num_attrs, 3, "H5Oget_info");
+ ret = H5Oget_info3(dataset, &oinfo, H5O_INFO_NUM_ATTRS);
+ CHECK(ret, FAIL, "H5Oget_info3");
+ VERIFY(oinfo.num_attrs, 3, "H5Oget_info3");
/* Delete middle (2nd) attribute */
ret = H5Adelete(dataset, ATTR2_NAME);
CHECK(ret, FAIL, "H5Adelete");
/* Verify the correct number of attributes */
- ret = H5Oget_info2(dataset, &oinfo, H5O_INFO_NUM_ATTRS);
- CHECK(ret, FAIL, "H5Oget_info");
- VERIFY(oinfo.num_attrs, 2, "H5Oget_info");
+ ret = H5Oget_info3(dataset, &oinfo, H5O_INFO_NUM_ATTRS);
+ CHECK(ret, FAIL, "H5Oget_info3");
+ VERIFY(oinfo.num_attrs, 2, "H5Oget_info3");
/* Open 1st attribute for the dataset */
attr = H5Aopen_by_idx(dataset, ".", H5_INDEX_CRT_ORDER, H5_ITER_INC, (hsize_t)0, H5P_DEFAULT, H5P_DEFAULT);
@@ -1611,9 +1612,9 @@ test_attr_delete(hid_t fapl)
CHECK(ret, FAIL, "H5Adelete");
/* Verify the correct number of attributes */
- ret = H5Oget_info2(dataset, &oinfo, H5O_INFO_NUM_ATTRS);
- CHECK(ret, FAIL, "H5Oget_info");
- VERIFY(oinfo.num_attrs, 1, "H5Oget_info");
+ ret = H5Oget_info3(dataset, &oinfo, H5O_INFO_NUM_ATTRS);
+ CHECK(ret, FAIL, "H5Oget_info3");
+ VERIFY(oinfo.num_attrs, 1, "H5Oget_info3");
/* Open last (formally 3rd) attribute for the dataset */
attr = H5Aopen_by_idx(dataset, ".", H5_INDEX_CRT_ORDER, H5_ITER_INC, (hsize_t)0, H5P_DEFAULT, H5P_DEFAULT);
@@ -1634,9 +1635,9 @@ test_attr_delete(hid_t fapl)
CHECK(ret, FAIL, "H5Adelete");
/* Verify the correct number of attributes */
- ret = H5Oget_info2(dataset, &oinfo, H5O_INFO_NUM_ATTRS);
- CHECK(ret, FAIL, "H5Oget_info");
- VERIFY(oinfo.num_attrs, 0, "H5Oget_info");
+ ret = H5Oget_info3(dataset, &oinfo, H5O_INFO_NUM_ATTRS);
+ CHECK(ret, FAIL, "H5Oget_info3");
+ VERIFY(oinfo.num_attrs, 0, "H5Oget_info3");
/* Close dataset */
ret = H5Dclose(dataset);
@@ -1664,7 +1665,7 @@ test_attr_dtype_shared(hid_t fapl)
hid_t attr_id; /* Attribute ID */
int data = 8; /* Data to write */
int rdata = 0; /* Read read in */
- H5O_info_t oinfo; /* Object's information */
+ H5O_info2_t oinfo; /* Object's information */
h5_stat_size_t empty_filesize; /* Size of empty file */
h5_stat_size_t filesize; /* Size of file after modifications */
herr_t ret; /* Generic return value */
@@ -1698,9 +1699,9 @@ test_attr_dtype_shared(hid_t fapl)
CHECK(ret, FAIL, "H5Tcommit2");
/* Check reference count on named datatype */
- ret = H5Oget_info_by_name2(file_id, TYPE1_NAME, &oinfo, H5O_INFO_BASIC, H5P_DEFAULT);
- CHECK(ret, FAIL, "H5Oget_info_by_name");
- VERIFY(oinfo.rc, 1, "H5Oget_info_by_name");
+ ret = H5Oget_info_by_name3(file_id, TYPE1_NAME, &oinfo, H5O_INFO_BASIC, H5P_DEFAULT);
+ CHECK(ret, FAIL, "H5Oget_info_by_name3");
+ VERIFY(oinfo.rc, 1, "H5Oget_info_by_name3");
/* Create dataspace for dataset */
space_id = H5Screate(H5S_SCALAR);
@@ -1711,18 +1712,18 @@ test_attr_dtype_shared(hid_t fapl)
CHECK(dset_id, FAIL, "H5Dcreate2");
/* Check reference count on named datatype */
- ret = H5Oget_info_by_name2(file_id, TYPE1_NAME, &oinfo, H5O_INFO_BASIC, H5P_DEFAULT);
- CHECK(ret, FAIL, "H5Oget_info_by_name");
- VERIFY(oinfo.rc, 2, "H5Oget_info_by_name");
+ ret = H5Oget_info_by_name3(file_id, TYPE1_NAME, &oinfo, H5O_INFO_BASIC, H5P_DEFAULT);
+ CHECK(ret, FAIL, "H5Oget_info_by_name3");
+ VERIFY(oinfo.rc, 2, "H5Oget_info_by_name3");
/* Create attribute on dataset */
attr_id = H5Acreate2(dset_id, ATTR1_NAME, type_id, space_id, H5P_DEFAULT, H5P_DEFAULT);
CHECK(attr_id, FAIL, "H5Acreate2");
/* Check reference count on named datatype */
- ret = H5Oget_info_by_name2(file_id, TYPE1_NAME, &oinfo, H5O_INFO_BASIC, H5P_DEFAULT);
- CHECK(ret, FAIL, "H5Oget_info_by_name");
- VERIFY(oinfo.rc, 3, "H5Oget_info_by_name");
+ ret = H5Oget_info_by_name3(file_id, TYPE1_NAME, &oinfo, H5O_INFO_BASIC, H5P_DEFAULT);
+ CHECK(ret, FAIL, "H5Oget_info_by_name3");
+ VERIFY(oinfo.rc, 3, "H5Oget_info_by_name3");
/* Close attribute */
ret = H5Aclose(attr_id);
@@ -1733,18 +1734,18 @@ test_attr_dtype_shared(hid_t fapl)
CHECK(ret, FAIL, "H5Adelete");
/* Check reference count on named datatype */
- ret = H5Oget_info_by_name2(file_id, TYPE1_NAME, &oinfo, H5O_INFO_BASIC, H5P_DEFAULT);
- CHECK(ret, FAIL, "H5Oget_info_by_name");
- VERIFY(oinfo.rc, 2, "H5Oget_info_by_name");
+ ret = H5Oget_info_by_name3(file_id, TYPE1_NAME, &oinfo, H5O_INFO_BASIC, H5P_DEFAULT);
+ CHECK(ret, FAIL, "H5Oget_info_by_name3");
+ VERIFY(oinfo.rc, 2, "H5Oget_info_by_name3");
/* Create attribute on dataset */
attr_id = H5Acreate2(dset_id, ATTR1_NAME, type_id, space_id, H5P_DEFAULT, H5P_DEFAULT);
CHECK(attr_id, FAIL, "H5Acreate2");
/* Check reference count on named datatype */
- ret = H5Oget_info_by_name2(file_id, TYPE1_NAME, &oinfo, H5O_INFO_BASIC, H5P_DEFAULT);
- CHECK(ret, FAIL, "H5Oget_info_by_name");
- VERIFY(oinfo.rc, 3, "H5Oget_info_by_name");
+ ret = H5Oget_info_by_name3(file_id, TYPE1_NAME, &oinfo, H5O_INFO_BASIC, H5P_DEFAULT);
+ CHECK(ret, FAIL, "H5Oget_info_by_name3");
+ VERIFY(oinfo.rc, 3, "H5Oget_info_by_name3");
/* Write data into the attribute */
ret = H5Awrite(attr_id, H5T_NATIVE_INT, &data);
@@ -1797,18 +1798,18 @@ test_attr_dtype_shared(hid_t fapl)
CHECK(ret, FAIL, "H5Dclose");
/* Check reference count on named datatype */
- ret = H5Oget_info_by_name2(file_id, TYPE1_NAME, &oinfo, H5O_INFO_BASIC, H5P_DEFAULT);
- CHECK(ret, FAIL, "H5Oget_info_by_name");
- VERIFY(oinfo.rc, 3, "H5Oget_info_by_name");
+ ret = H5Oget_info_by_name3(file_id, TYPE1_NAME, &oinfo, H5O_INFO_BASIC, H5P_DEFAULT);
+ CHECK(ret, FAIL, "H5Oget_info_by_name3");
+ VERIFY(oinfo.rc, 3, "H5Oget_info_by_name3");
/* Unlink the dataset */
ret = H5Ldelete(file_id, DSET1_NAME, H5P_DEFAULT);
CHECK(ret, FAIL, "H5Ldelete");
/* Check reference count on named datatype */
- ret = H5Oget_info_by_name2(file_id, TYPE1_NAME, &oinfo, H5O_INFO_BASIC, H5P_DEFAULT);
- CHECK(ret, FAIL, "H5Oget_info_by_name");
- VERIFY(oinfo.rc, 1, "H5Oget_info_by_name");
+ ret = H5Oget_info_by_name3(file_id, TYPE1_NAME, &oinfo, H5O_INFO_BASIC, H5P_DEFAULT);
+ CHECK(ret, FAIL, "H5Oget_info_by_name3");
+ VERIFY(oinfo.rc, 1, "H5Oget_info_by_name3");
/* Unlink the named datatype */
ret = H5Ldelete(file_id, TYPE1_NAME, H5P_DEFAULT);
@@ -2440,7 +2441,7 @@ test_attr_dense_delete(hid_t fcpl, hid_t fapl)
unsigned u; /* Local index variable */
h5_stat_size_t empty_filesize; /* Size of empty file */
h5_stat_size_t filesize; /* Size of file after modifications */
- H5O_info_t oinfo; /* Object info */
+ H5O_info2_t oinfo; /* Object info */
int use_min_dset_oh = (dcpl_g != H5P_DEFAULT);
herr_t ret; /* Generic return value */
@@ -2523,9 +2524,9 @@ test_attr_dense_delete(hid_t fcpl, hid_t fapl)
CHECK(ret, FAIL, "H5Aclose");
/* Check # of attributes */
- ret = H5Oget_info2(dataset, &oinfo, H5O_INFO_NUM_ATTRS);
- CHECK(ret, FAIL, "H5Oget_info");
- VERIFY(oinfo.num_attrs, (u + 1), "H5Oget_info");
+ ret = H5Oget_info3(dataset, &oinfo, H5O_INFO_NUM_ATTRS);
+ CHECK(ret, FAIL, "H5Oget_info3");
+ VERIFY(oinfo.num_attrs, (u + 1), "H5Oget_info3");
} /* end for */
/* Check on dataset's attribute storage status */
@@ -2634,7 +2635,7 @@ test_attr_dense_rename(hid_t fcpl, hid_t fapl)
htri_t is_dense; /* Are attributes stored densely? */
h5_stat_size_t empty_filesize; /* Size of empty file */
h5_stat_size_t filesize; /* Size of file after modifications */
- H5O_info_t oinfo; /* Object info */
+ H5O_info2_t oinfo; /* Object info */
unsigned u; /* Local index variable */
int use_min_dset_oh = (dcpl_g != H5P_DEFAULT);
unsigned use_corder; /* Track creation order or not */
@@ -2726,9 +2727,9 @@ test_attr_dense_rename(hid_t fcpl, hid_t fapl)
CHECK(ret, FAIL, "H5Arename_by_name");
/* Check # of attributes */
- ret = H5Oget_info2(dataset, &oinfo, H5O_INFO_NUM_ATTRS);
- CHECK(ret, FAIL, "H5Oget_info");
- VERIFY(oinfo.num_attrs, (u + 1), "H5Oget_info");
+ ret = H5Oget_info3(dataset, &oinfo, H5O_INFO_NUM_ATTRS);
+ CHECK(ret, FAIL, "H5Oget_info3");
+ VERIFY(oinfo.num_attrs, (u + 1), "H5Oget_info3");
} /* end for */
/* Check on dataset's attribute storage status */
@@ -2826,7 +2827,7 @@ test_attr_dense_unlink(hid_t fcpl, hid_t fapl)
size_t mesg_count; /* # of shared messages */
h5_stat_size_t empty_filesize; /* Size of empty file */
h5_stat_size_t filesize; /* Size of file after modifications */
- H5O_info_t oinfo; /* Object info */
+ H5O_info2_t oinfo; /* Object info */
unsigned u; /* Local index variable */
int use_min_dset_oh = (dcpl_g != H5P_DEFAULT);
herr_t ret; /* Generic return value */
@@ -2904,9 +2905,9 @@ test_attr_dense_unlink(hid_t fcpl, hid_t fapl)
CHECK(ret, FAIL, "H5Aclose");
/* Check # of attributes */
- ret = H5Oget_info2(dataset, &oinfo, H5O_INFO_NUM_ATTRS);
- CHECK(ret, FAIL, "H5Oget_info");
- VERIFY(oinfo.num_attrs, (u + 1), "H5Oget_info");
+ ret = H5Oget_info3(dataset, &oinfo, H5O_INFO_NUM_ATTRS);
+ CHECK(ret, FAIL, "H5Oget_info3");
+ VERIFY(oinfo.num_attrs, (u + 1), "H5Oget_info3");
} /* end for */
/* Check on dataset's attribute storage status */
@@ -10863,9 +10864,10 @@ test_attr_bug8(hid_t fcpl, hid_t fapl)
hid_t gid; /* Group ID */
hid_t oid; /* Object ID */
hsize_t dims = 256; /* Attribute dimensions */
- H5O_info_t oinfo; /* Object info */
+ H5O_info2_t oinfo; /* Object info */
H5A_info_t ainfo; /* Attribute info */
haddr_t root_addr; /* Root group address */
+ haddr_t link_addr; /* Link (to root group) address */
herr_t ret; /* Generic return status */
/* Output message about test being performed */
@@ -10881,9 +10883,10 @@ test_attr_bug8(hid_t fcpl, hid_t fapl)
CHECK(gid, FAIL, "H5Gcreate2");
/* Get root group address */
- ret = H5Oget_info2(fid, &oinfo, H5O_INFO_BASIC);
+ ret = H5Oget_info3(fid, &oinfo, H5O_INFO_BASIC);
CHECK(ret, FAIL, "H5Oget_info");
- root_addr = oinfo.addr;
+ ret = H5VLnative_token_to_addr(fid, oinfo.token, &root_addr);
+ CHECK(ret, FAIL, "H5VLnative_token_to_addr");
/*
* Create link to root group
@@ -10906,10 +10909,12 @@ 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_info2(oid, &oinfo, H5O_INFO_BASIC);
+ ret = H5Oget_info3(oid, &oinfo, H5O_INFO_BASIC);
CHECK(ret, FAIL, "H5Oget_info");
- if(oinfo.addr != root_addr)
- TestErrPrintf("incorrect link target address: addr: %llu, expected: %llu\n", (long long unsigned)oinfo.addr, (long long unsigned)root_addr);
+ ret = H5VLnative_token_to_addr(fid, oinfo.token, &link_addr);
+ CHECK(ret, FAIL, "H5VLnative_token_to_addr");
+ if(link_addr != root_addr)
+ TestErrPrintf("incorrect link target address: addr: %llu, expected: %llu\n", (long long unsigned)link_addr, (long long unsigned)root_addr);
/* Close file */
ret = H5Fclose(fid);
@@ -10951,10 +10956,12 @@ 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_info2(oid, &oinfo, H5O_INFO_BASIC);
+ ret = H5Oget_info3(oid, &oinfo, H5O_INFO_BASIC);
CHECK(ret, FAIL, "H5Oget_info");
- if(oinfo.addr != root_addr)
- TestErrPrintf("incorrect link target address: addr: %llu, expected: %llu\n", (long long unsigned)oinfo.addr, (long long unsigned)root_addr);
+ ret = H5VLnative_token_to_addr(fid, oinfo.token, &link_addr);
+ CHECK(ret, FAIL, "H5VLnative_token_to_addr");
+ if(link_addr != root_addr)
+ TestErrPrintf("incorrect link target address: addr: %llu, expected: %llu\n", (long long unsigned)link_addr, (long long unsigned)root_addr);
ret = H5Aget_info_by_name(gid, ".", ATTR1_NAME, &ainfo, H5P_DEFAULT);
CHECK(ret, FAIL, "H5Aget_info_by_name");
if(ainfo.data_size != dims)