summaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/dangle.c66
-rw-r--r--test/dtypes.c6
-rw-r--r--test/gen_mergemsg.c10
-rw-r--r--test/gen_nullspace.c6
-rw-r--r--test/links.c6
-rwxr-xr-xtest/objcopy.c14
-rwxr-xr-xtest/reserved.c5
-rw-r--r--test/tattr.c346
-rw-r--r--test/tfile.c12
-rw-r--r--test/th5s.c9
-rw-r--r--test/titerate.c4
-rw-r--r--test/tmisc.c87
-rw-r--r--test/tsohm.c36
-rw-r--r--test/ttsafe_acreate.c10
-rw-r--r--test/tunicode.c4
-rw-r--r--test/tvlstr.c8
-rw-r--r--test/unlink.c8
-rw-r--r--test/vfd.c221
18 files changed, 428 insertions, 430 deletions
diff --git a/test/dangle.c b/test/dangle.c
index 84cc965..4b1be63 100644
--- a/test/dangle.c
+++ b/test/dangle.c
@@ -63,28 +63,28 @@ test_dangle_dataset(H5F_close_degree_t degree)
TESTING(" dangling dataset IDs");
- if(H5open()<0)
+ if(H5open() < 0)
TEST_ERROR;
/* Create file access property list */
- if((fapl=H5Pcreate(H5P_FILE_ACCESS))<0)
+ if((fapl=H5Pcreate(H5P_FILE_ACCESS)) < 0)
TEST_ERROR;
/* Set file close degree */
- if(H5Pset_fclose_degree(fapl,degree)<0)
+ if(H5Pset_fclose_degree(fapl,degree) < 0)
TEST_ERROR;
h5_fixname(FILENAME[0], H5P_DEFAULT, filename, sizeof filename);
- if((fid = H5Fcreate (filename, H5F_ACC_TRUNC, H5P_DEFAULT, fapl))<0)
+ if((fid = H5Fcreate (filename, H5F_ACC_TRUNC, H5P_DEFAULT, fapl)) < 0)
TEST_ERROR;
- if((sid = H5Screate (H5S_SCALAR))<0)
+ if((sid = H5Screate (H5S_SCALAR)) < 0)
TEST_ERROR;
- if((dsid = H5Dcreate (fid, DSETNAME, H5T_NATIVE_INT, sid, H5P_DEFAULT))<0)
+ if((dsid = H5Dcreate (fid, DSETNAME, H5T_NATIVE_INT, sid, H5P_DEFAULT)) < 0)
TEST_ERROR;
- if(H5Dclose(dsid)<0)
+ if(H5Dclose(dsid) < 0)
TEST_ERROR;
/* Try creating duplicate dataset */
@@ -93,12 +93,12 @@ test_dangle_dataset(H5F_close_degree_t degree)
TEST_ERROR;
} H5E_END_TRY;
- if(H5Sclose(sid)<0)
+ if(H5Sclose(sid) < 0)
TEST_ERROR;
/* Leave open a _lot_ of objects */
for(u=0; u<MAX_DANGLE; u++) {
- if((dsid = H5Dopen (fid, DSETNAME))<0)
+ if((dsid = H5Dopen (fid, DSETNAME)) < 0)
TEST_ERROR;
} /* end for */
@@ -109,16 +109,16 @@ test_dangle_dataset(H5F_close_degree_t degree)
} H5E_END_TRY;
} /* end if */
else
- if(H5Fclose(fid)<0)
+ if(H5Fclose(fid) < 0)
TEST_ERROR;
- if(H5Pclose(fapl)<0)
+ if(H5Pclose(fapl) < 0)
TEST_ERROR;
- if(H5close()<0)
+ if(H5close() < 0)
TEST_ERROR;
- if(h5_get_file_size(filename)<0)
+ if(h5_get_file_size(filename) < 0)
TEST_ERROR;
/* Clean up temporary file */
@@ -159,24 +159,24 @@ test_dangle_group(H5F_close_degree_t degree)
TESTING(" dangling group IDs");
- if(H5open()<0)
+ if(H5open() < 0)
TEST_ERROR;
/* Create file access property list */
- if((fapl=H5Pcreate(H5P_FILE_ACCESS))<0)
+ if((fapl=H5Pcreate(H5P_FILE_ACCESS)) < 0)
TEST_ERROR;
/* Set file close degree */
- if(H5Pset_fclose_degree(fapl,degree)<0)
+ if(H5Pset_fclose_degree(fapl,degree) < 0)
TEST_ERROR;
h5_fixname(FILENAME[0], H5P_DEFAULT, filename, sizeof filename);
- if((fid = H5Fcreate (filename, H5F_ACC_TRUNC, H5P_DEFAULT, fapl))<0)
+ if((fid = H5Fcreate (filename, H5F_ACC_TRUNC, H5P_DEFAULT, fapl)) < 0)
TEST_ERROR;
if((gid = H5Gcreate2(fid, GROUPNAME, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) FAIL_STACK_ERROR
- if(H5Gclose(gid)<0)
+ if(H5Gclose(gid) < 0)
TEST_ERROR;
/* Try creating duplicate group */
@@ -200,16 +200,16 @@ test_dangle_group(H5F_close_degree_t degree)
} H5E_END_TRY;
} /* end if */
else
- if(H5Fclose(fid)<0)
+ if(H5Fclose(fid) < 0)
TEST_ERROR;
- if(H5Pclose(fapl)<0)
+ if(H5Pclose(fapl) < 0)
TEST_ERROR;
- if(H5close()<0)
+ if(H5close() < 0)
TEST_ERROR;
- if(h5_get_file_size(filename)<0)
+ if(h5_get_file_size(filename) < 0)
TEST_ERROR;
/* Clean up temporary file */
@@ -275,7 +275,7 @@ test_dangle_datatype1(H5F_close_degree_t degree)
TEST_ERROR;
/* Try creating duplicate named datatype */
- if((tid = H5Tcopy (H5T_NATIVE_INT))<0)
+ if((tid = H5Tcopy (H5T_NATIVE_INT)) < 0)
TEST_ERROR;
H5E_BEGIN_TRY {
if(H5Tcommit2(fid, TYPENAME, tid, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT) >= 0)
@@ -435,29 +435,29 @@ test_dangle_attribute(H5F_close_degree_t degree)
TESTING(" dangling attribute IDs");
- if(H5open()<0)
+ if(H5open() < 0)
TEST_ERROR;
/* Create file access property list */
- if((fapl=H5Pcreate(H5P_FILE_ACCESS))<0)
+ if((fapl=H5Pcreate(H5P_FILE_ACCESS)) < 0)
TEST_ERROR;
/* Set file close degree */
- if(H5Pset_fclose_degree(fapl,degree)<0)
+ if(H5Pset_fclose_degree(fapl,degree) < 0)
TEST_ERROR;
h5_fixname(FILENAME[0], H5P_DEFAULT, filename, sizeof filename);
- if((fid = H5Fcreate (filename, H5F_ACC_TRUNC, H5P_DEFAULT, fapl))<0)
+ if((fid = H5Fcreate(filename, H5F_ACC_TRUNC, H5P_DEFAULT, fapl)) < 0)
TEST_ERROR;
- if((sid = H5Screate (H5S_SCALAR))<0)
+ if((sid = H5Screate(H5S_SCALAR)) < 0)
TEST_ERROR;
- if((dsid = H5Dcreate (fid, DSETNAME, H5T_NATIVE_INT, sid, H5P_DEFAULT))<0)
+ if((dsid = H5Dcreate(fid, DSETNAME, H5T_NATIVE_INT, sid, H5P_DEFAULT)) < 0)
TEST_ERROR;
/* Create an attribute on the dataset */
- if((aid = H5Acreate (dsid, ATTRNAME, H5T_NATIVE_INT, sid, H5P_DEFAULT))<0)
+ if((aid = H5Acreate2(dsid, ".", ATTRNAME, H5T_NATIVE_INT, sid, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0)
TEST_ERROR;
/* Don't worry about writing the attribute - it will have a fill value */
@@ -468,7 +468,7 @@ test_dangle_attribute(H5F_close_degree_t degree)
/* Try creating duplicate attribute */
H5E_BEGIN_TRY {
- if((aid = H5Acreate(dsid, ATTRNAME, H5T_NATIVE_INT, sid, H5P_DEFAULT)) >= 0)
+ if((aid = H5Acreate2(dsid, ".", ATTRNAME, H5T_NATIVE_INT, sid, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) >= 0)
TEST_ERROR;
} H5E_END_TRY;
@@ -496,10 +496,10 @@ test_dangle_attribute(H5F_close_degree_t degree)
if(H5Pclose(fapl) < 0)
TEST_ERROR;
- if(H5close()<0)
+ if(H5close() < 0)
TEST_ERROR;
- if(h5_get_file_size(filename)<0)
+ if(h5_get_file_size(filename) < 0)
TEST_ERROR;
/* Clean up temporary file */
diff --git a/test/dtypes.c b/test/dtypes.c
index 2f8f030..b327344 100644
--- a/test/dtypes.c
+++ b/test/dtypes.c
@@ -2487,7 +2487,7 @@ test_transient (hid_t fapl)
/* It should not be possible to create an attribute for a transient type */
H5E_BEGIN_TRY {
- status = H5Acreate (type, "attr1", H5T_NATIVE_INT, space, H5P_DEFAULT);
+ status = H5Acreate2(type, ".", "attr1", H5T_NATIVE_INT, space, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
} H5E_END_TRY;
if (status>=0) {
H5_FAILED();
@@ -2633,8 +2633,8 @@ test_named (hid_t fapl)
}
/* It should be possible to define an attribute for the named type */
- if((attr1 = H5Acreate (type, "attr1", H5T_NATIVE_UCHAR, space,
- H5P_DEFAULT)) < 0) goto error;
+ if((attr1 = H5Acreate2(type, ".", "attr1", H5T_NATIVE_UCHAR, space,
+ H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) goto error;
for(i = 0; i < (size_t)ds_size[0]; i++)
for(j = 0; j < (size_t)ds_size[1]; j++)
attr_data[i][j] = (int)(i * ds_size[1] + j);
diff --git a/test/gen_mergemsg.c b/test/gen_mergemsg.c
index b7d07d2..5850f04 100644
--- a/test/gen_mergemsg.c
+++ b/test/gen_mergemsg.c
@@ -91,7 +91,7 @@ int main()
assert(ret >= 0);
/* Add 1st attribute on first group */
- aid = H5Acreate(gid, ATTR1, tid, sid, H5P_DEFAULT);
+ aid = H5Acreate2(gid, ".", ATTR1, tid, sid, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
assert(aid > 0);
/* Close dataspace */
@@ -117,7 +117,7 @@ int main()
assert(ret >= 0);
/* Add 2nd attribute on first group */
- aid = H5Acreate(gid, ATTR2, tid, sid, H5P_DEFAULT);
+ aid = H5Acreate2(gid, ".", ATTR2, tid, sid, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
assert(aid > 0);
/* Close dataspace */
@@ -191,7 +191,7 @@ int main()
assert(ret >= 0);
/* Add 3rd attribute on first group (smaller than 2nd attribute) */
- aid = H5Acreate(gid, ATTR3, tid, sid, H5P_DEFAULT);
+ aid = H5Acreate2(gid, ".", ATTR3, tid, sid, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
assert(aid > 0);
/* Close dataspace */
@@ -239,7 +239,7 @@ int main()
assert(ret >= 0);
/* Re-create 2nd attribute on first group */
- aid = H5Acreate(gid, ATTR2, tid, sid, H5P_DEFAULT);
+ aid = H5Acreate2(gid, ".", ATTR2, tid, sid, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
assert(aid > 0);
/* Close dataspace */
@@ -303,7 +303,7 @@ int main()
assert(ret >= 0);
/* Re-create 2nd attribute on first group */
- aid = H5Acreate(gid, ATTR2, tid, sid, H5P_DEFAULT);
+ aid = H5Acreate2(gid, ".", ATTR2, tid, sid, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
assert(aid > 0);
/* Close dataspace */
diff --git a/test/gen_nullspace.c b/test/gen_nullspace.c
index 80e5590..385564f 100644
--- a/test/gen_nullspace.c
+++ b/test/gen_nullspace.c
@@ -63,11 +63,11 @@ main(void)
assert(gid > 0);
/* Create an attribute for the group */
- attr=H5Acreate(gid,NULLATTR,H5T_NATIVE_INT,sid,H5P_DEFAULT);
- assert(attr>0);
+ attr = H5Acreate2(gid, ".", NULLATTR, H5T_NATIVE_INT, sid, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
+ assert(attr > 0);
/* Close attribute */
- ret=H5Aclose(attr);
+ ret = H5Aclose(attr);
assert(ret>=0);
/* Close the group */
diff --git a/test/links.c b/test/links.c
index 8aa5f4a..1e9e8d4 100644
--- a/test/links.c
+++ b/test/links.c
@@ -8616,7 +8616,7 @@ object_info(hid_t fapl)
sprintf(attrname, "attr %02u", v);
/* Create attribute */
- if((attr_id = H5Acreate(group_id2, attrname, H5T_NATIVE_INT, space_id, H5P_DEFAULT)) < 0) TEST_ERROR
+ if((attr_id = H5Acreate2(group_id2, ".", attrname, H5T_NATIVE_INT, space_id, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) TEST_ERROR
/* Close attribute */
if(H5Aclose(attr_id) < 0) TEST_ERROR
@@ -8664,7 +8664,7 @@ object_info(hid_t fapl)
sprintf(attrname, "attr %02u", v);
/* Create attribute */
- if((attr_id = H5Acreate(group_id2, attrname, H5T_NATIVE_INT, space_id, H5P_DEFAULT)) < 0) TEST_ERROR
+ if((attr_id = H5Acreate2(group_id2, ".", attrname, H5T_NATIVE_INT, space_id, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) TEST_ERROR
/* Close attribute */
if(H5Aclose(attr_id) < 0) TEST_ERROR
@@ -8813,7 +8813,7 @@ object_info_old(hid_t fapl)
sprintf(attrname, "attr %02u", v);
/* Create attribute */
- if((attr_id = H5Acreate(group_id2, attrname, H5T_NATIVE_INT, space_id, H5P_DEFAULT)) < 0) TEST_ERROR
+ if((attr_id = H5Acreate2(group_id2, ".", attrname, H5T_NATIVE_INT, space_id, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) TEST_ERROR
/* Close attribute */
if(H5Aclose(attr_id) < 0) TEST_ERROR
diff --git a/test/objcopy.c b/test/objcopy.c
index 119ad82..5e620fa 100755
--- a/test/objcopy.c
+++ b/test/objcopy.c
@@ -256,7 +256,7 @@ attach_ref_attr(hid_t file_id, hid_t loc_id)
/* create an attribute with two object references */
if(H5Rcreate(&ref[0], file_id, dsetname1, H5R_OBJECT, -1) < 0) TEST_ERROR
if(H5Rcreate(&ref[1], file_id, dsetname2, H5R_OBJECT, -1) < 0) TEST_ERROR
- if((aid = H5Acreate(loc_id, "obj_ref_attr", H5T_STD_REF_OBJ, sid_ref, H5P_DEFAULT)) < 0) TEST_ERROR
+ if((aid = H5Acreate2(loc_id, ".", "obj_ref_attr", H5T_STD_REF_OBJ, sid_ref, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) TEST_ERROR
if(H5Awrite(aid, H5T_STD_REF_OBJ, ref) < 0) TEST_ERROR
if(H5Sclose(sid) < 0) TEST_ERROR
@@ -329,12 +329,12 @@ attach_reg_ref_attr(hid_t file_id, hid_t loc_id)
if(H5Rcreate(&ref[1], file_id, dsetnamev, H5R_DATASET_REGION, space_id) < 0) TEST_ERROR
/* create reg_ref attribute */
- if((aid = H5Acreate(loc_id, "reg_ref_attr", H5T_STD_REF_DSETREG, spacer_id, H5P_DEFAULT)) < 0) TEST_ERROR
+ if((aid = H5Acreate2(loc_id, ".", "reg_ref_attr", H5T_STD_REF_DSETREG, spacer_id, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) TEST_ERROR
if(H5Awrite(aid, H5T_STD_REF_DSETREG, ref) < 0) TEST_ERROR
/* attach the reg_ref attribute to the dataset itself */
if(H5Aclose(aid) < 0) TEST_ERROR
- if((aid = H5Acreate(dsetv_id, "reg_ref_attr", H5T_STD_REF_DSETREG, spacer_id, H5P_DEFAULT)) < 0) TEST_ERROR
+ if((aid = H5Acreate2(dsetv_id, ".", "reg_ref_attr", H5T_STD_REF_DSETREG, spacer_id, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) TEST_ERROR
if(H5Awrite(aid, H5T_STD_REF_DSETREG, ref) < 0) TEST_ERROR
if(H5Sclose(spacer_id) < 0) TEST_ERROR
@@ -488,7 +488,7 @@ test_copy_attach_attribute_vl(hid_t loc_id)
((int *)buf[i].p)[j] = j+1;
} /* end for */
- if((aid = H5Acreate(loc_id, "vlen attribute", tid, sid, H5P_DEFAULT)) < 0)
+ if((aid = H5Acreate2(loc_id, ".", "vlen attribute", tid, sid, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0)
goto done;
if(H5Awrite(aid, tid, buf) < 0)
@@ -542,7 +542,7 @@ test_copy_attach_attributes(hid_t loc_id, hid_t type_id)
attr_data[0] = 100 * i;
attr_data[1] = 200 * i;
- if((aid = H5Acreate(loc_id, attr_name, type_id, sid, H5P_DEFAULT)) < 0)
+ if((aid = H5Acreate2(loc_id, ".", attr_name, type_id, sid, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0)
goto done;
if(H5Awrite(aid, H5T_NATIVE_INT, attr_data) < 0)
@@ -596,12 +596,12 @@ test_copy_attach_paired_attributes(hid_t loc_id, hid_t loc_id2, hid_t type_id)
attr_data[1] = 200 * i;
/* Add attribute to first object */
- if((aid = H5Acreate(loc_id, attr_name, type_id, sid, H5P_DEFAULT)) < 0) goto done;
+ if((aid = H5Acreate2(loc_id, ".", attr_name, type_id, sid, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) goto done;
if(H5Awrite(aid, H5T_NATIVE_INT, attr_data) < 0) goto done;
if(H5Aclose(aid) < 0) goto done;
/* Add attribute to second object */
- if((aid = H5Acreate(loc_id2, attr_name, type_id, sid, H5P_DEFAULT)) < 0) goto done;
+ if((aid = H5Acreate2(loc_id2, ".", attr_name, type_id, sid, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) goto done;
if(H5Awrite(aid, H5T_NATIVE_INT, attr_data) < 0) goto done;
if(H5Aclose(aid) < 0) goto done;
}
diff --git a/test/reserved.c b/test/reserved.c
index d7b7299..df30b5c 100755
--- a/test/reserved.c
+++ b/test/reserved.c
@@ -198,12 +198,11 @@ rsrv_ohdr(void)
attrval[3][i] = 3;
}
- for (i = 0; i< 2000; i++)
- {
+ for(i = 0; i < 2000; i++) {
sprintf(attrname, "attr %d", i);
H5E_BEGIN_TRY{
aid = H5Screate_simple(2, dims, NULL);
- attr_id = H5Acreate (dataset_id, attrname, H5T_STD_I32BE, aid, H5P_DEFAULT);
+ attr_id = H5Acreate2(dataset_id, ".", attrname, H5T_STD_I32BE, aid, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
H5Awrite(attr_id, H5T_NATIVE_INT, attrval);
status = H5Aclose(attr_id);
} H5E_END_TRY
diff --git a/test/tattr.c b/test/tattr.c
index b88ba5f..3e1110c 100644
--- a/test/tattr.c
+++ b/test/tattr.c
@@ -192,8 +192,8 @@ test_attr_basic_write(hid_t fapl)
/* Try to create an attribute on the file (should create an attribute on root group) */
- attr = H5Acreate(fid1, ATTR1_NAME, H5T_NATIVE_INT, sid2, H5P_DEFAULT);
- CHECK(attr, FAIL, "H5Acreate");
+ attr = H5Acreate2(fid1, ".", ATTR1_NAME, H5T_NATIVE_INT, sid2, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
+ CHECK(attr, FAIL, "H5Acreate2");
/* Close attribute */
ret = H5Aclose(attr);
@@ -217,23 +217,23 @@ test_attr_basic_write(hid_t fapl)
/* Create an attribute for the dataset */
- attr=H5Acreate(dataset,ATTR1_NAME,H5T_NATIVE_INT,sid2,H5P_DEFAULT);
- CHECK(attr, FAIL, "H5Acreate");
+ attr = H5Acreate2(dataset, ".", ATTR1_NAME, H5T_NATIVE_INT, sid2, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
+ CHECK(attr, FAIL, "H5Acreate2");
/* Try to create the same attribute again (should fail) */
- ret=H5Acreate(dataset,ATTR1_NAME,H5T_NATIVE_INT,sid2,H5P_DEFAULT);
- VERIFY(ret, FAIL, "H5Acreate");
+ ret = H5Acreate2(dataset, ".", ATTR1_NAME, H5T_NATIVE_INT, sid2, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
+ VERIFY(ret, FAIL, "H5Acreate2");
/* Write attribute information */
- ret=H5Awrite(attr,H5T_NATIVE_INT,attr_data1);
+ ret = H5Awrite(attr, H5T_NATIVE_INT, attr_data1);
CHECK(ret, FAIL, "H5Awrite");
/* Create an another attribute for the dataset */
- attr2=H5Acreate(dataset,ATTR1A_NAME,H5T_NATIVE_INT,sid2,H5P_DEFAULT);
- CHECK(attr, FAIL, "H5Acreate");
+ attr2 = H5Acreate2(dataset, ".", ATTR1A_NAME, H5T_NATIVE_INT, sid2, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
+ CHECK(attr, FAIL, "H5Acreate2");
/* Write attribute information */
- ret=H5Awrite(attr2,H5T_NATIVE_INT,attr_data1a);
+ ret = H5Awrite(attr2, H5T_NATIVE_INT, attr_data1a);
CHECK(ret, FAIL, "H5Awrite");
/* Check storage size for attribute */
@@ -343,27 +343,27 @@ test_attr_basic_write(hid_t fapl)
CHECK(sid2, FAIL, "H5Screate_simple");
/* Create an attribute for the group */
- attr=H5Acreate(group,ATTR2_NAME,H5T_NATIVE_INT,sid2,H5P_DEFAULT);
- CHECK(attr, FAIL, "H5Acreate");
+ attr = H5Acreate2(group, ".", ATTR2_NAME, H5T_NATIVE_INT, sid2, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
+ CHECK(attr, FAIL, "H5Acreate2");
/* Check storage size for attribute */
- attr_size=H5Aget_storage_size(attr);
- VERIFY(attr_size, (ATTR2_DIM1*ATTR2_DIM2*sizeof(int)), "H5Aget_storage_size");
+ attr_size = H5Aget_storage_size(attr);
+ VERIFY(attr_size, (ATTR2_DIM1 * ATTR2_DIM2 * sizeof(int)), "H5Aget_storage_size");
/* Try to create the same attribute again (should fail) */
- ret=H5Acreate(group,ATTR2_NAME,H5T_NATIVE_INT,sid2,H5P_DEFAULT);
- VERIFY(ret, FAIL, "H5Acreate");
+ ret = H5Acreate2(group, ".", ATTR2_NAME, H5T_NATIVE_INT, sid2, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
+ VERIFY(ret, FAIL, "H5Acreate2");
/* Write attribute information */
- ret=H5Awrite(attr,H5T_NATIVE_INT,attr_data2);
+ ret = H5Awrite(attr, H5T_NATIVE_INT, attr_data2);
CHECK(ret, FAIL, "H5Awrite");
/* Check storage size for attribute */
- attr_size=H5Aget_storage_size(attr);
- VERIFY(attr_size, (ATTR2_DIM1*ATTR2_DIM2*sizeof(int)), "H5A_get_storage_size");
+ attr_size = H5Aget_storage_size(attr);
+ VERIFY(attr_size, (ATTR2_DIM1 * ATTR2_DIM2 * sizeof(int)), "H5A_get_storage_size");
/* Close attribute */
- ret=H5Aclose(attr);
+ ret = H5Aclose(attr);
CHECK(ret, FAIL, "H5Aclose");
/* Close Attribute dataspace */
@@ -500,8 +500,8 @@ test_attr_flush(hid_t fapl)
set = H5Dcreate(fil, DSET1_NAME, H5T_NATIVE_DOUBLE, spc, H5P_DEFAULT);
CHECK(set, FAIL, "H5Dcreate");
- att = H5Acreate(set, ATTR1_NAME, H5T_NATIVE_DOUBLE, spc, H5P_DEFAULT);
- CHECK(att, FAIL, "H5Acreate");
+ att = H5Acreate2(set, ".", ATTR1_NAME, H5T_NATIVE_DOUBLE, spc, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
+ CHECK(att, FAIL, "H5Acreate2");
ret=H5Aread(att, H5T_NATIVE_DOUBLE, &rdata);
CHECK(ret, FAIL, "H5Awrite");
@@ -585,8 +585,8 @@ test_attr_plist(hid_t fapl)
VERIFY(cset, H5T_CSET_ASCII, "H5Pget_char_encoding");
/* Create an attribute for the dataset using the property list */
- attr=H5Acreate(dataset,ATTR1_NAME,H5T_NATIVE_INT,sid2,plist);
- CHECK(attr, FAIL, "H5Acreate");
+ attr = H5Acreate2(dataset, ".", ATTR1_NAME, H5T_NATIVE_INT, sid2, plist, H5P_DEFAULT, H5P_DEFAULT);
+ CHECK(attr, FAIL, "H5Acreate2");
/* Close the property list, and get the attribute's property list */
ret = H5Pclose(plist);
@@ -608,7 +608,7 @@ test_attr_plist(hid_t fapl)
/* Create a new property list and modify it to use a different encoding */
plist = H5Pcreate(H5P_ATTRIBUTE_CREATE);
CHECK(plist, FAIL, "H5Pcreate");
- ret=H5Pset_char_encoding(plist, H5T_CSET_UTF8);
+ ret = H5Pset_char_encoding(plist, H5T_CSET_UTF8);
CHECK(ret, FAIL, "H5Pset_char_encoding");
/* Get the character encoding and ensure that it has been changed */
@@ -617,8 +617,8 @@ test_attr_plist(hid_t fapl)
VERIFY(cset, H5T_CSET_UTF8, "H5Pget_char_encoding");
/* Create an attribute for the dataset using the modified property list */
- attr=H5Acreate(dataset,ATTR2_NAME,H5T_NATIVE_INT,sid2,plist);
- CHECK(attr, FAIL, "H5Acreate");
+ attr = H5Acreate2(dataset, ".", ATTR2_NAME, H5T_NATIVE_INT, sid2, plist, H5P_DEFAULT, H5P_DEFAULT);
+ CHECK(attr, FAIL, "H5Acreate2");
/* Close the property list and attribute */
ret = H5Pclose(plist);
@@ -707,19 +707,19 @@ test_attr_compound_write(hid_t fapl)
CHECK(sid2, FAIL, "H5Screate_simple");
/* Create complex attribute for the dataset */
- attr=H5Acreate(dataset,ATTR4_NAME,tid1,sid2,H5P_DEFAULT);
- CHECK(attr, FAIL, "H5Acreate");
+ attr = H5Acreate2(dataset, ".", ATTR4_NAME, tid1, sid2, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
+ CHECK(attr, FAIL, "H5Acreate2");
/* Try to create the same attribute again (should fail) */
- ret=H5Acreate(dataset,ATTR4_NAME,tid1,sid2,H5P_DEFAULT);
- VERIFY(ret, FAIL, "H5Acreate");
+ ret = H5Acreate2(dataset, ".", ATTR4_NAME, tid1, sid2, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
+ VERIFY(ret, FAIL, "H5Acreate2");
/* Write complex attribute data */
- ret=H5Awrite(attr,tid1,attr_data4);
+ ret = H5Awrite(attr, tid1, attr_data4);
CHECK(ret, FAIL, "H5Awrite");
/* Close attribute */
- ret=H5Aclose(attr);
+ ret = H5Aclose(attr);
CHECK(ret, FAIL, "H5Aclose");
/* Close attribute's dataspace */
@@ -917,7 +917,7 @@ test_attr_scalar_write(hid_t fapl)
CHECK(sid1, FAIL, "H5Screate_simple");
/* Create a dataset */
- dataset=H5Dcreate(fid1,DSET1_NAME,H5T_NATIVE_UCHAR,sid1,H5P_DEFAULT);
+ dataset = H5Dcreate(fid1, DSET1_NAME, H5T_NATIVE_UCHAR, sid1, H5P_DEFAULT);
CHECK(dataset, FAIL, "H5Dcreate");
/* Create dataspace for attribute */
@@ -925,19 +925,19 @@ test_attr_scalar_write(hid_t fapl)
CHECK(sid2, FAIL, "H5Screate_simple");
/* Create an attribute for the dataset */
- attr=H5Acreate(dataset,ATTR5_NAME,H5T_NATIVE_FLOAT,sid2,H5P_DEFAULT);
- CHECK(attr, FAIL, "H5Acreate");
+ attr = H5Acreate2(dataset, ".", ATTR5_NAME, H5T_NATIVE_FLOAT, sid2, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
+ CHECK(attr, FAIL, "H5Acreate2");
/* Try to create the same attribute again (should fail) */
- ret=H5Acreate(dataset,ATTR5_NAME,H5T_NATIVE_FLOAT,sid2,H5P_DEFAULT);
- VERIFY(ret, FAIL, "H5Acreate");
+ ret = H5Acreate2(dataset, ".", ATTR5_NAME, H5T_NATIVE_FLOAT, sid2, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
+ VERIFY(ret, FAIL, "H5Acreate2");
/* Write attribute information */
- ret=H5Awrite(attr,H5T_NATIVE_FLOAT,&attr_data5);
+ ret = H5Awrite(attr, H5T_NATIVE_FLOAT, &attr_data5);
CHECK(ret, FAIL, "H5Awrite");
/* Close attribute */
- ret=H5Aclose(attr);
+ ret = H5Aclose(attr);
CHECK(ret, FAIL, "H5Aclose");
ret = H5Sclose(sid1);
@@ -1057,7 +1057,7 @@ test_attr_mult_write(hid_t fapl)
CHECK(sid1, FAIL, "H5Screate_simple");
/* Create a dataset */
- dataset=H5Dcreate(fid1,DSET1_NAME,H5T_NATIVE_UCHAR,sid1,H5P_DEFAULT);
+ dataset = H5Dcreate(fid1, DSET1_NAME, H5T_NATIVE_UCHAR, sid1, H5P_DEFAULT);
CHECK(dataset, FAIL, "H5Dcreate");
/* Close dataset's dataspace */
@@ -1069,19 +1069,19 @@ test_attr_mult_write(hid_t fapl)
CHECK(sid2, FAIL, "H5Screate_simple");
/* Create 1st attribute for the dataset */
- attr=H5Acreate(dataset,ATTR1_NAME,H5T_NATIVE_INT,sid2,H5P_DEFAULT);
- CHECK(attr, FAIL, "H5Acreate");
+ attr = H5Acreate2(dataset, ".", ATTR1_NAME, H5T_NATIVE_INT, sid2, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
+ CHECK(attr, FAIL, "H5Acreate2");
/* Try to create the same attribute again (should fail) */
- ret=H5Acreate(dataset,ATTR1_NAME,H5T_NATIVE_INT,sid2,H5P_DEFAULT);
- VERIFY(ret, FAIL, "H5Acreate");
+ ret = H5Acreate2(dataset, ".", ATTR1_NAME, H5T_NATIVE_INT, sid2, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
+ VERIFY(ret, FAIL, "H5Acreate2");
/* Write 1st attribute data */
- ret=H5Awrite(attr,H5T_NATIVE_INT,attr_data1);
+ ret = H5Awrite(attr, H5T_NATIVE_INT, attr_data1);
CHECK(ret, FAIL, "H5Awrite");
/* Close 1st attribute */
- ret=H5Aclose(attr);
+ ret = H5Aclose(attr);
CHECK(ret, FAIL, "H5Aclose");
/* Close attribute's dataspace */
@@ -1093,19 +1093,19 @@ test_attr_mult_write(hid_t fapl)
CHECK(sid2, FAIL, "H5Screate_simple");
/* Create 2nd attribute for the dataset */
- attr=H5Acreate(dataset,ATTR2_NAME,H5T_NATIVE_INT,sid2,H5P_DEFAULT);
- CHECK(attr, FAIL, "H5Acreate");
+ attr = H5Acreate2(dataset, ".", ATTR2_NAME, H5T_NATIVE_INT, sid2, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
+ CHECK(attr, FAIL, "H5Acreate2");
/* Try to create the same attribute again (should fail) */
- ret=H5Acreate(dataset,ATTR2_NAME,H5T_NATIVE_INT,sid2,H5P_DEFAULT);
- VERIFY(ret, FAIL, "H5Acreate");
+ ret = H5Acreate2(dataset, ".", ATTR2_NAME, H5T_NATIVE_INT, sid2, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
+ VERIFY(ret, FAIL, "H5Acreate2");
/* Write 2nd attribute information */
- ret=H5Awrite(attr,H5T_NATIVE_INT,attr_data2);
+ ret = H5Awrite(attr, H5T_NATIVE_INT, attr_data2);
CHECK(ret, FAIL, "H5Awrite");
/* Close 2nd attribute */
- ret=H5Aclose(attr);
+ ret = H5Aclose(attr);
CHECK(ret, FAIL, "H5Aclose");
/* Close 2nd attribute's dataspace */
@@ -1117,19 +1117,19 @@ test_attr_mult_write(hid_t fapl)
CHECK(sid2, FAIL, "H5Screate_simple");
/* Create 3rd attribute for the dataset */
- attr=H5Acreate(dataset,ATTR3_NAME,H5T_NATIVE_DOUBLE,sid2,H5P_DEFAULT);
- CHECK(attr, FAIL, "H5Acreate");
+ attr = H5Acreate2(dataset, ".", ATTR3_NAME, H5T_NATIVE_DOUBLE, sid2, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
+ CHECK(attr, FAIL, "H5Acreate2");
/* Try to create the same attribute again (should fail) */
- ret=H5Acreate(dataset,ATTR3_NAME,H5T_NATIVE_DOUBLE,sid2,H5P_DEFAULT);
- VERIFY(ret, FAIL, "H5Acreate");
+ ret = H5Acreate2(dataset, ".", ATTR3_NAME, H5T_NATIVE_DOUBLE, sid2, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
+ VERIFY(ret, FAIL, "H5Acreate2");
/* Write 3rd attribute information */
- ret=H5Awrite(attr,H5T_NATIVE_DOUBLE,attr_data3);
+ ret = H5Awrite(attr, H5T_NATIVE_DOUBLE, attr_data3);
CHECK(ret, FAIL, "H5Awrite");
/* Close 3rd attribute */
- ret=H5Aclose(attr);
+ ret = H5Aclose(attr);
CHECK(ret, FAIL, "H5Aclose");
/* Close 3rd attribute's dataspace */
@@ -1669,13 +1669,13 @@ test_attr_dtype_shared(hid_t fapl)
VERIFY(oinfo.rc, 2, "H5Dcreate");
/* Create attribute on dataset */
- attr_id = H5Acreate(dset_id, ATTR1_NAME, type_id, space_id, H5P_DEFAULT);
- CHECK(attr_id, FAIL, "H5Acreate");
+ attr_id = H5Acreate2(dset_id, ".", ATTR1_NAME, type_id, space_id, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
+ CHECK(attr_id, FAIL, "H5Acreate2");
/* Check reference count on named datatype */
ret = H5Oget_info(file_id, TYPE1_NAME, &oinfo, H5P_DEFAULT);
CHECK(ret, FAIL, "H5Oget_info");
- VERIFY(oinfo.rc, 3, "H5Acreate");
+ VERIFY(oinfo.rc, 3, "H5Oget_info");
/* Close attribute */
ret = H5Aclose(attr_id);
@@ -1691,13 +1691,13 @@ test_attr_dtype_shared(hid_t fapl)
VERIFY(oinfo.rc, 2, "H5Adelete2");
/* Create attribute on dataset */
- attr_id = H5Acreate(dset_id, ATTR1_NAME, type_id, space_id, H5P_DEFAULT);
- CHECK(attr_id, FAIL, "H5Acreate");
+ attr_id = H5Acreate2(dset_id, ".", ATTR1_NAME, type_id, space_id, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
+ CHECK(attr_id, FAIL, "H5Acreate2");
/* Check reference count on named datatype */
ret = H5Oget_info(file_id, TYPE1_NAME, &oinfo, H5P_DEFAULT);
CHECK(ret, FAIL, "H5Oget_info");
- VERIFY(oinfo.rc, 3, "H5Acreate");
+ VERIFY(oinfo.rc, 3, "H5Oget_info");
/* Write data into the attribute */
ret = H5Awrite(attr_id, H5T_NATIVE_INT, &data);
@@ -1918,8 +1918,8 @@ test_attr_dense_create(hid_t fcpl, hid_t fapl)
for(u = 0; u < max_compact; u++) {
/* Create attribute */
sprintf(attrname, "attr %02u", u);
- attr = H5Acreate(dataset, attrname, H5T_NATIVE_UINT, sid, H5P_DEFAULT);
- CHECK(attr, FAIL, "H5Acreate");
+ attr = H5Acreate2(dataset, ".", attrname, H5T_NATIVE_UINT, sid, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
+ CHECK(attr, FAIL, "H5Acreate2");
/* Write data into the attribute */
ret = H5Awrite(attr, H5T_NATIVE_UINT, &u);
@@ -1937,8 +1937,8 @@ test_attr_dense_create(hid_t fcpl, hid_t fapl)
/* Add one more attribute, to push into "dense" storage */
/* Create attribute */
sprintf(attrname, "attr %02u", u);
- attr = H5Acreate(dataset, attrname, H5T_NATIVE_UINT, sid, H5P_DEFAULT);
- CHECK(attr, FAIL, "H5Acreate");
+ attr = H5Acreate2(dataset, ".", attrname, H5T_NATIVE_UINT, sid, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
+ CHECK(attr, FAIL, "H5Acreate2");
/* Check on dataset's attribute storage status */
is_dense = H5O_is_attr_dense_test(dataset);
@@ -1953,8 +1953,8 @@ test_attr_dense_create(hid_t fcpl, hid_t fapl)
CHECK(ret, FAIL, "H5Aclose");
/* Attempt to add attribute again, which should fail */
- attr = H5Acreate(dataset, attrname, H5T_NATIVE_UINT, sid, H5P_DEFAULT);
- VERIFY(attr, FAIL, "H5Acreate");
+ attr = H5Acreate2(dataset, ".", attrname, H5T_NATIVE_UINT, sid, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
+ VERIFY(attr, FAIL, "H5Acreate2");
/* Close dataspace */
ret = H5Sclose(sid);
@@ -2053,8 +2053,8 @@ test_attr_dense_open(hid_t fcpl, hid_t fapl)
for(u = 0; u < max_compact; u++) {
/* Create attribute */
sprintf(attrname, "attr %02u", u);
- attr = H5Acreate(dataset, attrname, H5T_NATIVE_UINT, sid, H5P_DEFAULT);
- CHECK(attr, FAIL, "H5Acreate");
+ attr = H5Acreate2(dataset, ".", attrname, H5T_NATIVE_UINT, sid, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
+ CHECK(attr, FAIL, "H5Acreate2");
/* Write data into the attribute */
ret = H5Awrite(attr, H5T_NATIVE_UINT, &u);
@@ -2076,8 +2076,8 @@ test_attr_dense_open(hid_t fcpl, hid_t fapl)
/* Add one more attribute, to push into "dense" storage */
/* Create attribute */
sprintf(attrname, "attr %02u", u);
- attr = H5Acreate(dataset, attrname, H5T_NATIVE_UINT, sid, H5P_DEFAULT);
- CHECK(attr, FAIL, "H5Acreate");
+ attr = H5Acreate2(dataset, ".", attrname, H5T_NATIVE_UINT, sid, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
+ CHECK(attr, FAIL, "H5Acreate2");
/* Check on dataset's attribute storage status */
is_dense = H5O_is_attr_dense_test(dataset);
@@ -2193,8 +2193,8 @@ test_attr_dense_delete(hid_t fcpl, hid_t fapl)
for(u = 0; u < (max_compact * 2); u++) {
/* Create attribute */
sprintf(attrname, "attr %02u", u);
- attr = H5Acreate(dataset, attrname, H5T_NATIVE_UINT, sid, H5P_DEFAULT);
- CHECK(attr, FAIL, "H5Acreate");
+ attr = H5Acreate2(dataset, ".", attrname, H5T_NATIVE_UINT, sid, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
+ CHECK(attr, FAIL, "H5Acreate2");
/* Write data into the attribute */
ret = H5Awrite(attr, H5T_NATIVE_UINT, &u);
@@ -2368,8 +2368,8 @@ test_attr_dense_rename(hid_t fcpl, hid_t fapl)
for(u = 0; u < (max_compact * 2); u++) {
/* Create attribute */
sprintf(attrname, "attr %02u", u);
- attr = H5Acreate(dataset, attrname, H5T_NATIVE_UINT, sid, H5P_DEFAULT);
- CHECK(attr, FAIL, "H5Acreate");
+ attr = H5Acreate2(dataset, ".", attrname, H5T_NATIVE_UINT, sid, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
+ CHECK(attr, FAIL, "H5Acreate2");
/* Write data into the attribute */
ret = H5Awrite(attr, H5T_NATIVE_UINT, &u);
@@ -2527,8 +2527,8 @@ test_attr_dense_unlink(hid_t fcpl, hid_t fapl)
for(u = 0; u < (max_compact * 2); u++) {
/* Create attribute */
sprintf(attrname, "attr %02u", u);
- attr = H5Acreate(dataset, attrname, H5T_NATIVE_UINT, sid, H5P_DEFAULT);
- CHECK(attr, FAIL, "H5Acreate");
+ attr = H5Acreate2(dataset, ".", attrname, H5T_NATIVE_UINT, sid, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
+ CHECK(attr, FAIL, "H5Acreate2");
/* Write data into the attribute */
ret = H5Awrite(attr, H5T_NATIVE_UINT, &u);
@@ -2666,8 +2666,8 @@ test_attr_dense_limits(hid_t fcpl, hid_t fapl)
/* Create attribute */
u = 0;
sprintf(attrname, "attr %02u", u);
- attr = H5Acreate(dataset, attrname, H5T_NATIVE_UINT, sid, H5P_DEFAULT);
- CHECK(attr, FAIL, "H5Acreate");
+ attr = H5Acreate2(dataset, ".", attrname, H5T_NATIVE_UINT, sid, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
+ CHECK(attr, FAIL, "H5Acreate2");
/* Write data into the attribute */
ret = H5Awrite(attr, H5T_NATIVE_UINT, &u);
@@ -2687,8 +2687,8 @@ test_attr_dense_limits(hid_t fcpl, hid_t fapl)
/* Create attribute */
u = 1;
sprintf(attrname, "attr %02u", u);
- attr = H5Acreate(dataset, attrname, H5T_NATIVE_UINT, sid, H5P_DEFAULT);
- CHECK(attr, FAIL, "H5Acreate");
+ attr = H5Acreate2(dataset, ".", attrname, H5T_NATIVE_UINT, sid, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
+ CHECK(attr, FAIL, "H5Acreate2");
/* Write data into the attribute */
ret = H5Awrite(attr, H5T_NATIVE_UINT, &u);
@@ -2842,8 +2842,8 @@ test_attr_big(hid_t fcpl, hid_t fapl)
/* Create attribute */
u = 0;
sprintf(attrname, "attr %02u", u);
- attr = H5Acreate(dataset, attrname, H5T_NATIVE_UINT, sid, H5P_DEFAULT);
- CHECK(attr, FAIL, "H5Acreate");
+ attr = H5Acreate2(dataset, ".", attrname, H5T_NATIVE_UINT, sid, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
+ CHECK(attr, FAIL, "H5Acreate2");
/* Close attribute */
ret = H5Aclose(attr);
@@ -2861,8 +2861,8 @@ test_attr_big(hid_t fcpl, hid_t fapl)
/* Create attribute */
u = 1;
sprintf(attrname, "attr %02u", u);
- attr = H5Acreate(dataset, attrname, H5T_NATIVE_UINT, sid, H5P_DEFAULT);
- CHECK(attr, FAIL, "H5Acreate");
+ attr = H5Acreate2(dataset, ".", attrname, H5T_NATIVE_UINT, sid, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
+ CHECK(attr, FAIL, "H5Acreate2");
/* Close attribute */
ret = H5Aclose(attr);
@@ -2880,9 +2880,9 @@ test_attr_big(hid_t fcpl, hid_t fapl)
/* Create attribute */
u = 2;
sprintf(attrname, "attr %02u", u);
- attr = H5Acreate(dataset, attrname, H5T_NATIVE_UINT, big_sid, H5P_DEFAULT);
+ attr = H5Acreate2(dataset, ".", attrname, H5T_NATIVE_UINT, big_sid, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
if(latest_format) {
- CHECK(attr, FAIL, "H5Acreate");
+ CHECK(attr, FAIL, "H5Acreate2");
/* Close attribute */
ret = H5Aclose(attr);
@@ -2904,8 +2904,8 @@ test_attr_big(hid_t fcpl, hid_t fapl)
/* Create attribute */
u = 3;
sprintf(attrname, "attr %02u", u);
- attr = H5Acreate(dataset, attrname, H5T_NATIVE_UINT, big_sid, H5P_DEFAULT);
- CHECK(attr, FAIL, "H5Acreate");
+ attr = H5Acreate2(dataset, ".", attrname, H5T_NATIVE_UINT, big_sid, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
+ CHECK(attr, FAIL, "H5Acreate2");
/* Close attribute */
ret = H5Aclose(attr);
@@ -2981,7 +2981,7 @@ test_attr_big(hid_t fcpl, hid_t fapl)
} /* end if */
else {
/* Shouldn't be able to create "big" attributes with older version of format */
- VERIFY(attr, FAIL, "H5Acreate");
+ VERIFY(attr, FAIL, "H5Acreate2");
/* Check on dataset's attribute storage status */
/* (when attributes are shared, the "big" attribute goes into the shared
@@ -3080,8 +3080,8 @@ test_attr_null_space(hid_t fcpl, hid_t fapl)
/* Create attribute */
HDstrcpy(attrname, "null attr");
- attr = H5Acreate(dataset, attrname, H5T_NATIVE_UINT, null_sid, H5P_DEFAULT);
- CHECK(attr, FAIL, "H5Acreate");
+ attr = H5Acreate2(dataset, ".", attrname, H5T_NATIVE_UINT, null_sid, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
+ CHECK(attr, FAIL, "H5Acreate2");
/* Try to read data from the attribute */
/* (shouldn't fail, but should leave buffer alone) */
@@ -3121,8 +3121,8 @@ test_attr_null_space(hid_t fcpl, hid_t fapl)
/* Create attribute */
HDstrcpy(attrname, "null attr #2");
- attr = H5Acreate(dataset, attrname, H5T_NATIVE_UINT, null_sid, H5P_DEFAULT);
- CHECK(attr, FAIL, "H5Acreate");
+ attr = H5Acreate2(dataset, ".", attrname, H5T_NATIVE_UINT, null_sid, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
+ CHECK(attr, FAIL, "H5Acreate2");
/* Try to write data to the attribute */
/* (shouldn't fail, but should leave buffer alone) */
@@ -3272,8 +3272,8 @@ test_attr_deprec(hid_t fcpl, hid_t fapl)
/* Add attribute to dataset */
/* Create attribute */
- attr = H5Acreate(dataset, "attr", H5T_NATIVE_UINT, sid, H5P_DEFAULT);
- CHECK(attr, FAIL, "H5Acreate");
+ attr = H5Acreate1(dataset, "attr", H5T_NATIVE_UINT, sid, H5P_DEFAULT);
+ CHECK(attr, FAIL, "H5Acreate1");
/* Close attribute */
ret = H5Aclose(attr);
@@ -3382,8 +3382,8 @@ test_attr_many(hid_t fcpl, hid_t fapl)
for(u = 0; u < NATTR_MANY; u++) {
sprintf(attrname, "a-%06u", u);
- aid = H5Acreate(fid, attrname, H5T_NATIVE_UINT, sid, H5P_DEFAULT);
- CHECK(aid, FAIL, "H5Acreate");
+ aid = H5Acreate2(fid, ".", attrname, H5T_NATIVE_UINT, sid, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
+ CHECK(aid, FAIL, "H5Acreate2");
ret = H5Awrite(aid, H5T_NATIVE_UINT, &u);
CHECK(ret, FAIL, "H5Awrite");
@@ -3632,8 +3632,8 @@ test_attr_corder_create_compact(hid_t fcpl, hid_t fapl)
for(u = 0; u < max_compact; u++) {
/* Create attribute */
sprintf(attrname, "attr %02u", u);
- attr = H5Acreate(my_dataset, attrname, H5T_NATIVE_UINT, sid, H5P_DEFAULT);
- CHECK(attr, FAIL, "H5Acreate");
+ attr = H5Acreate2(my_dataset, ".", attrname, H5T_NATIVE_UINT, sid, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
+ CHECK(attr, FAIL, "H5Acreate2");
/* Write data into the attribute */
ret = H5Awrite(attr, H5T_NATIVE_UINT, &u);
@@ -3832,8 +3832,8 @@ test_attr_corder_create_dense(hid_t fcpl, hid_t fapl)
for(u = 0; u < max_compact; u++) {
/* Create attribute */
sprintf(attrname, "attr %02u", u);
- attr = H5Acreate(my_dataset, attrname, H5T_NATIVE_UINT, sid, H5P_DEFAULT);
- CHECK(attr, FAIL, "H5Acreate");
+ attr = H5Acreate2(my_dataset, ".", attrname, H5T_NATIVE_UINT, sid, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
+ CHECK(attr, FAIL, "H5Acreate2");
/* Write data into the attribute */
ret = H5Awrite(attr, H5T_NATIVE_UINT, &u);
@@ -3855,8 +3855,8 @@ test_attr_corder_create_dense(hid_t fcpl, hid_t fapl)
/* Create another attribute, to push into dense storage */
sprintf(attrname, "attr %02u", max_compact);
- attr = H5Acreate(my_dataset, attrname, H5T_NATIVE_UINT, sid, H5P_DEFAULT);
- CHECK(attr, FAIL, "H5Acreate");
+ attr = H5Acreate2(my_dataset, ".", attrname, H5T_NATIVE_UINT, sid, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
+ CHECK(attr, FAIL, "H5Acreate2");
/* Write data into the attribute */
ret = H5Awrite(attr, H5T_NATIVE_UINT, &u);
@@ -4220,8 +4220,8 @@ test_attr_corder_transition(hid_t fcpl, hid_t fapl)
for(u = 0; u < max_compact; u++) {
/* Create attribute */
sprintf(attrname, "attr %02u", u);
- attr = H5Acreate(my_dataset, attrname, H5T_NATIVE_UINT, sid, H5P_DEFAULT);
- CHECK(attr, FAIL, "H5Acreate");
+ attr = H5Acreate2(my_dataset, ".", attrname, H5T_NATIVE_UINT, sid, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
+ CHECK(attr, FAIL, "H5Acreate2");
/* Write data into the attribute */
ret = H5Awrite(attr, H5T_NATIVE_UINT, &u);
@@ -4243,8 +4243,8 @@ test_attr_corder_transition(hid_t fcpl, hid_t fapl)
/* Create another attribute, to push into dense storage */
sprintf(attrname, "attr %02u", max_compact);
- attr = H5Acreate(my_dataset, attrname, H5T_NATIVE_UINT, sid, H5P_DEFAULT);
- CHECK(attr, FAIL, "H5Acreate");
+ attr = H5Acreate2(my_dataset, ".", attrname, H5T_NATIVE_UINT, sid, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
+ CHECK(attr, FAIL, "H5Acreate2");
/* Write data into the attribute */
ret = H5Awrite(attr, H5T_NATIVE_UINT, &u);
@@ -4307,8 +4307,8 @@ test_attr_corder_transition(hid_t fcpl, hid_t fapl)
for(u = (min_dense - 1); u < (max_compact + 1); u++) {
/* Create attribute */
sprintf(attrname, "attr %02u", u);
- attr = H5Acreate(my_dataset, attrname, H5T_NATIVE_UINT, sid, H5P_DEFAULT);
- CHECK(attr, FAIL, "H5Acreate");
+ attr = H5Acreate2(my_dataset, ".", attrname, H5T_NATIVE_UINT, sid, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
+ CHECK(attr, FAIL, "H5Acreate2");
/* Write data into the attribute */
ret = H5Awrite(attr, H5T_NATIVE_UINT, &u);
@@ -4431,8 +4431,8 @@ test_attr_corder_transition(hid_t fcpl, hid_t fapl)
for(u = (min_dense - 1); u < (max_compact + 1); u++) {
/* Create attribute */
sprintf(attrname, "attr %02u", u);
- attr = H5Acreate(my_dataset, attrname, H5T_NATIVE_UINT, sid, H5P_DEFAULT);
- CHECK(attr, FAIL, "H5Acreate");
+ attr = H5Acreate2(my_dataset, ".", attrname, H5T_NATIVE_UINT, sid, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
+ CHECK(attr, FAIL, "H5Acreate2");
/* Write data into the attribute */
ret = H5Awrite(attr, H5T_NATIVE_UINT, &u);
@@ -4601,8 +4601,8 @@ test_attr_corder_delete(hid_t fcpl, hid_t fapl)
for(u = 0; u < max_compact * 2; u++) {
/* Create attribute */
sprintf(attrname, "attr %02u", u);
- attr = H5Acreate(my_dataset, attrname, H5T_NATIVE_UINT, sid, H5P_DEFAULT);
- CHECK(attr, FAIL, "H5Acreate");
+ attr = H5Acreate2(my_dataset, ".", attrname, H5T_NATIVE_UINT, sid, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
+ CHECK(attr, FAIL, "H5Acreate2");
/* Write data into the attribute */
ret = H5Awrite(attr, H5T_NATIVE_UINT, &u);
@@ -4937,8 +4937,8 @@ test_attr_info_by_idx(hbool_t new_format, hid_t fcpl, hid_t fapl)
for(u = 0; u < max_compact; u++) {
/* Create attribute */
sprintf(attrname, "attr %02u", u);
- attr = H5Acreate(my_dataset, attrname, H5T_NATIVE_UINT, sid, H5P_DEFAULT);
- CHECK(attr, FAIL, "H5Acreate");
+ attr = H5Acreate2(my_dataset, ".", attrname, H5T_NATIVE_UINT, sid, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
+ CHECK(attr, FAIL, "H5Acreate2");
/* Write data into the attribute */
ret = H5Awrite(attr, H5T_NATIVE_UINT, &u);
@@ -4974,8 +4974,8 @@ test_attr_info_by_idx(hbool_t new_format, hid_t fcpl, hid_t fapl)
for(; u < (max_compact * 2); u++) {
/* Create attribute */
sprintf(attrname, "attr %02u", u);
- attr = H5Acreate(my_dataset, attrname, H5T_NATIVE_UINT, sid, H5P_DEFAULT);
- CHECK(attr, FAIL, "H5Acreate");
+ attr = H5Acreate2(my_dataset, ".", attrname, H5T_NATIVE_UINT, sid, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
+ CHECK(attr, FAIL, "H5Acreate2");
/* Write data into the attribute */
ret = H5Awrite(attr, H5T_NATIVE_UINT, &u);
@@ -5175,8 +5175,8 @@ test_attr_delete_by_idx(hbool_t new_format, hid_t fcpl, hid_t fapl)
for(u = 0; u < max_compact; u++) {
/* Create attribute */
sprintf(attrname, "attr %02u", u);
- attr = H5Acreate(my_dataset, attrname, H5T_NATIVE_UINT, sid, H5P_DEFAULT);
- CHECK(attr, FAIL, "H5Acreate");
+ attr = H5Acreate2(my_dataset, ".", attrname, H5T_NATIVE_UINT, sid, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
+ CHECK(attr, FAIL, "H5Acreate2");
/* Write data into the attribute */
ret = H5Awrite(attr, H5T_NATIVE_UINT, &u);
@@ -5285,8 +5285,8 @@ test_attr_delete_by_idx(hbool_t new_format, hid_t fcpl, hid_t fapl)
for(u = 0; u < (max_compact * 2); u++) {
/* Create attribute */
sprintf(attrname, "attr %02u", u);
- attr = H5Acreate(my_dataset, attrname, H5T_NATIVE_UINT, sid, H5P_DEFAULT);
- CHECK(attr, FAIL, "H5Acreate");
+ attr = H5Acreate2(my_dataset, ".", attrname, H5T_NATIVE_UINT, sid, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
+ CHECK(attr, FAIL, "H5Acreate2");
/* Write data into the attribute */
ret = H5Awrite(attr, H5T_NATIVE_UINT, &u);
@@ -5418,8 +5418,8 @@ test_attr_delete_by_idx(hbool_t new_format, hid_t fcpl, hid_t fapl)
for(u = 0; u < (max_compact * 2); u++) {
/* Create attribute */
sprintf(attrname, "attr %02u", u);
- attr = H5Acreate(my_dataset, attrname, H5T_NATIVE_UINT, sid, H5P_DEFAULT);
- CHECK(attr, FAIL, "H5Acreate");
+ attr = H5Acreate2(my_dataset, ".", attrname, H5T_NATIVE_UINT, sid, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
+ CHECK(attr, FAIL, "H5Acreate2");
/* Write data into the attribute */
ret = H5Awrite(attr, H5T_NATIVE_UINT, &u);
@@ -5992,8 +5992,8 @@ test_attr_iterate2(hbool_t new_format, hid_t fcpl, hid_t fapl)
for(u = 0; u < max_compact; u++) {
/* Create attribute */
sprintf(attrname, "attr %02u", u);
- attr = H5Acreate(my_dataset, attrname, H5T_NATIVE_UINT, sid, H5P_DEFAULT);
- CHECK(attr, FAIL, "H5Acreate");
+ attr = H5Acreate2(my_dataset, ".", attrname, H5T_NATIVE_UINT, sid, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
+ CHECK(attr, FAIL, "H5Acreate2");
/* Write data into the attribute */
ret = H5Awrite(attr, H5T_NATIVE_UINT, &u);
@@ -6051,8 +6051,8 @@ test_attr_iterate2(hbool_t new_format, hid_t fcpl, hid_t fapl)
for(u = max_compact; u < (max_compact * 2); u++) {
/* Create attribute */
sprintf(attrname, "attr %02u", u);
- attr = H5Acreate(my_dataset, attrname, H5T_NATIVE_UINT, sid, H5P_DEFAULT);
- CHECK(attr, FAIL, "H5Acreate");
+ attr = H5Acreate2(my_dataset, ".", attrname, H5T_NATIVE_UINT, sid, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
+ CHECK(attr, FAIL, "H5Acreate2");
/* Write data into the attribute */
ret = H5Awrite(attr, H5T_NATIVE_UINT, &u);
@@ -6318,8 +6318,8 @@ test_attr_open_by_idx(hbool_t new_format, hid_t fcpl, hid_t fapl)
for(u = 0; u < max_compact; u++) {
/* Create attribute */
sprintf(attrname, "attr %02u", u);
- attr = H5Acreate(my_dataset, attrname, H5T_NATIVE_UINT, sid, H5P_DEFAULT);
- CHECK(attr, FAIL, "H5Acreate");
+ attr = H5Acreate2(my_dataset, ".", attrname, H5T_NATIVE_UINT, sid, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
+ CHECK(attr, FAIL, "H5Acreate2");
/* Write data into the attribute */
ret = H5Awrite(attr, H5T_NATIVE_UINT, &u);
@@ -6376,8 +6376,8 @@ test_attr_open_by_idx(hbool_t new_format, hid_t fcpl, hid_t fapl)
for(u = max_compact; u < (max_compact * 2); u++) {
/* Create attribute */
sprintf(attrname, "attr %02u", u);
- attr = H5Acreate(my_dataset, attrname, H5T_NATIVE_UINT, sid, H5P_DEFAULT);
- CHECK(attr, FAIL, "H5Acreate");
+ attr = H5Acreate2(my_dataset, ".", attrname, H5T_NATIVE_UINT, sid, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
+ CHECK(attr, FAIL, "H5Acreate2");
/* Write data into the attribute */
ret = H5Awrite(attr, H5T_NATIVE_UINT, &u);
@@ -6602,8 +6602,8 @@ test_attr_open(hbool_t new_format, hid_t fcpl, hid_t fapl)
for(u = 0; u < max_compact; u++) {
/* Create attribute */
sprintf(attrname, "attr %02u", u);
- attr = H5Acreate(my_dataset, attrname, H5T_NATIVE_UINT, sid, H5P_DEFAULT);
- CHECK(attr, FAIL, "H5Acreate");
+ attr = H5Acreate2(my_dataset, ".", attrname, H5T_NATIVE_UINT, sid, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
+ CHECK(attr, FAIL, "H5Acreate2");
/* Write data into the attribute */
ret = H5Awrite(attr, H5T_NATIVE_UINT, &u);
@@ -6660,8 +6660,8 @@ test_attr_open(hbool_t new_format, hid_t fcpl, hid_t fapl)
for(u = max_compact; u < (max_compact * 2); u++) {
/* Create attribute */
sprintf(attrname, "attr %02u", u);
- attr = H5Acreate(my_dataset, attrname, H5T_NATIVE_UINT, sid, H5P_DEFAULT);
- CHECK(attr, FAIL, "H5Acreate");
+ attr = H5Acreate2(my_dataset, ".", attrname, H5T_NATIVE_UINT, sid, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
+ CHECK(attr, FAIL, "H5Acreate2");
/* Write data into the attribute */
ret = H5Awrite(attr, H5T_NATIVE_UINT, &u);
@@ -7211,8 +7211,8 @@ test_attr_shared_rename(hid_t fcpl, hid_t fapl)
/* Alternate between creating "small" & "big" attributes */
if(u % 2) {
/* Create "small" attribute on first dataset */
- attr = H5Acreate(dataset, attrname, attr_tid, sid, H5P_DEFAULT);
- CHECK(attr, FAIL, "H5Acreate");
+ attr = H5Acreate2(dataset, ".", attrname, attr_tid, sid, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
+ CHECK(attr, FAIL, "H5Acreate2");
/* Check that attribute is not shared */
is_shared = H5A_is_shared_test(attr);
@@ -7225,8 +7225,8 @@ test_attr_shared_rename(hid_t fcpl, hid_t fapl)
} /* end if */
else {
/* Create "big" attribute on first dataset */
- attr = H5Acreate(dataset, attrname, attr_tid, big_sid, H5P_DEFAULT);
- CHECK(attr, FAIL, "H5Acreate");
+ attr = H5Acreate2(dataset, ".", attrname, attr_tid, big_sid, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
+ CHECK(attr, FAIL, "H5Acreate2");
/* Check that attribute is shared */
is_shared = H5A_is_shared_test(attr);
@@ -7263,8 +7263,8 @@ test_attr_shared_rename(hid_t fcpl, hid_t fapl)
/* Alternate between creating "small" & "big" attributes */
if(u % 2) {
/* Create "small" attribute on second dataset */
- attr = H5Acreate(dataset2, attrname, attr_tid, sid, H5P_DEFAULT);
- CHECK(attr, FAIL, "H5Acreate");
+ attr = H5Acreate2(dataset2, ".", attrname, attr_tid, sid, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
+ CHECK(attr, FAIL, "H5Acreate2");
/* Check that attribute is not shared */
is_shared = H5A_is_shared_test(attr);
@@ -7277,8 +7277,8 @@ test_attr_shared_rename(hid_t fcpl, hid_t fapl)
} /* end if */
else {
/* Create "big" attribute on second dataset */
- attr = H5Acreate(dataset2, attrname, attr_tid, big_sid, H5P_DEFAULT);
- CHECK(attr, FAIL, "H5Acreate");
+ attr = H5Acreate2(dataset2, ".", attrname, attr_tid, big_sid, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
+ CHECK(attr, FAIL, "H5Acreate2");
/* Check that attribute is shared */
is_shared = H5A_is_shared_test(attr);
@@ -7652,8 +7652,8 @@ test_attr_shared_delete(hid_t fcpl, hid_t fapl)
/* Alternate between creating "small" & "big" attributes */
if(u % 2) {
/* Create "small" attribute on first dataset */
- attr = H5Acreate(dataset, attrname, attr_tid, sid, H5P_DEFAULT);
- CHECK(attr, FAIL, "H5Acreate");
+ attr = H5Acreate2(dataset, ".", attrname, attr_tid, sid, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
+ CHECK(attr, FAIL, "H5Acreate2");
/* Check that attribute is not shared */
is_shared = H5A_is_shared_test(attr);
@@ -7666,8 +7666,8 @@ test_attr_shared_delete(hid_t fcpl, hid_t fapl)
} /* end if */
else {
/* Create "big" attribute on first dataset */
- attr = H5Acreate(dataset, attrname, attr_tid, big_sid, H5P_DEFAULT);
- CHECK(attr, FAIL, "H5Acreate");
+ attr = H5Acreate2(dataset, ".", attrname, attr_tid, big_sid, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
+ CHECK(attr, FAIL, "H5Acreate2");
/* Check that attribute is shared */
is_shared = H5A_is_shared_test(attr);
@@ -7704,8 +7704,8 @@ test_attr_shared_delete(hid_t fcpl, hid_t fapl)
/* Alternate between creating "small" & "big" attributes */
if(u % 2) {
/* Create "small" attribute on second dataset */
- attr = H5Acreate(dataset2, attrname, attr_tid, sid, H5P_DEFAULT);
- CHECK(attr, FAIL, "H5Acreate");
+ attr = H5Acreate2(dataset2, ".", attrname, attr_tid, sid, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
+ CHECK(attr, FAIL, "H5Acreate2");
/* Check that attribute is not shared */
is_shared = H5A_is_shared_test(attr);
@@ -7718,8 +7718,8 @@ test_attr_shared_delete(hid_t fcpl, hid_t fapl)
} /* end if */
else {
/* Create "big" attribute on second dataset */
- attr = H5Acreate(dataset2, attrname, attr_tid, big_sid, H5P_DEFAULT);
- CHECK(attr, FAIL, "H5Acreate");
+ attr = H5Acreate2(dataset2, ".", attrname, attr_tid, big_sid, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
+ CHECK(attr, FAIL, "H5Acreate2");
/* Check that attribute is shared */
is_shared = H5A_is_shared_test(attr);
@@ -8016,8 +8016,8 @@ test_attr_shared_unlink(hid_t fcpl, hid_t fapl)
/* Alternate between creating "small" & "big" attributes */
if(u % 2) {
/* Create "small" attribute on first dataset */
- attr = H5Acreate(dataset, attrname, attr_tid, sid, H5P_DEFAULT);
- CHECK(attr, FAIL, "H5Acreate");
+ attr = H5Acreate2(dataset, ".", attrname, attr_tid, sid, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
+ CHECK(attr, FAIL, "H5Acreate2");
/* Check that attribute is not shared */
is_shared = H5A_is_shared_test(attr);
@@ -8030,8 +8030,8 @@ test_attr_shared_unlink(hid_t fcpl, hid_t fapl)
} /* end if */
else {
/* Create "big" attribute on first dataset */
- attr = H5Acreate(dataset, attrname, attr_tid, big_sid, H5P_DEFAULT);
- CHECK(attr, FAIL, "H5Acreate");
+ attr = H5Acreate2(dataset, ".", attrname, attr_tid, big_sid, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
+ CHECK(attr, FAIL, "H5Acreate2");
/* Check that attribute is shared */
is_shared = H5A_is_shared_test(attr);
@@ -8068,8 +8068,8 @@ test_attr_shared_unlink(hid_t fcpl, hid_t fapl)
/* Alternate between creating "small" & "big" attributes */
if(u % 2) {
/* Create "small" attribute on second dataset */
- attr = H5Acreate(dataset2, attrname, attr_tid, sid, H5P_DEFAULT);
- CHECK(attr, FAIL, "H5Acreate");
+ attr = H5Acreate2(dataset2, ".", attrname, attr_tid, sid, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
+ CHECK(attr, FAIL, "H5Acreate2");
/* Check that attribute is not shared */
is_shared = H5A_is_shared_test(attr);
@@ -8082,8 +8082,8 @@ test_attr_shared_unlink(hid_t fcpl, hid_t fapl)
} /* end if */
else {
/* Create "big" attribute on second dataset */
- attr = H5Acreate(dataset2, attrname, attr_tid, big_sid, H5P_DEFAULT);
- CHECK(attr, FAIL, "H5Acreate");
+ attr = H5Acreate2(dataset2, ".", attrname, attr_tid, big_sid, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
+ CHECK(attr, FAIL, "H5Acreate2");
/* Check that attribute is shared */
is_shared = H5A_is_shared_test(attr);
@@ -8142,7 +8142,7 @@ test_attr_shared_unlink(hid_t fcpl, hid_t fapl)
/* Open attribute on first dataset */
attr = H5Aopen(dataset, ".", attrname, H5P_DEFAULT, H5P_DEFAULT);
- CHECK(attr, FAIL, "H5Acreate");
+ CHECK(attr, FAIL, "H5Aopen");
if(u % 2) {
/* Check that attribute is not shared */
@@ -8269,8 +8269,8 @@ test_attr_bug1(hid_t fcpl, hid_t fapl)
CHECK(gid, FAIL, "H5Gopen2");
/* Create attribute on first group */
- aid = H5Acreate(gid, ATTR7_NAME, H5T_NATIVE_DOUBLE, sid, H5P_DEFAULT);
- CHECK(aid, FAIL, "H5Acreate");
+ aid = H5Acreate2(gid, ".", ATTR7_NAME, H5T_NATIVE_DOUBLE, sid, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
+ CHECK(aid, FAIL, "H5Acreate2");
ret = H5Aclose(aid);
CHECK(ret, FAIL, "H5Aclose");
@@ -8302,8 +8302,8 @@ test_attr_bug1(hid_t fcpl, hid_t fapl)
CHECK(gid, FAIL, "H5Gopen2");
/* Create another attribute on first group */
- aid = H5Acreate(gid, ATTR8_NAME, H5T_NATIVE_DOUBLE, sid, H5P_DEFAULT);
- CHECK(aid, FAIL, "H5Acreate");
+ aid = H5Acreate2(gid, ".", ATTR8_NAME, H5T_NATIVE_DOUBLE, sid, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
+ CHECK(aid, FAIL, "H5Acreate2");
ret = H5Aclose(aid);
CHECK(ret, FAIL, "H5Aclose");
@@ -8328,8 +8328,8 @@ test_attr_bug1(hid_t fcpl, hid_t fapl)
CHECK(ret, FAIL, "H5Adelete2");
/* Re-create first attribute */
- aid = H5Acreate(gid, ATTR7_NAME, H5T_NATIVE_DOUBLE, sid, H5P_DEFAULT);
- CHECK(aid, FAIL, "H5Acreate");
+ aid = H5Acreate2(gid, ".", ATTR7_NAME, H5T_NATIVE_DOUBLE, sid, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
+ CHECK(aid, FAIL, "H5Acreate2");
ret = H5Aclose(aid);
CHECK(ret, FAIL, "H5Aclose");
@@ -8339,8 +8339,8 @@ test_attr_bug1(hid_t fcpl, hid_t fapl)
CHECK(ret, FAIL, "H5Adelete2");
/* Re-create second attribute */
- aid = H5Acreate(gid, ATTR8_NAME, H5T_NATIVE_DOUBLE, sid, H5P_DEFAULT);
- CHECK(aid, FAIL, "H5Acreate");
+ aid = H5Acreate2(gid, ".", ATTR8_NAME, H5T_NATIVE_DOUBLE, sid, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
+ CHECK(aid, FAIL, "H5Acreate2");
ret = H5Aclose(aid);
CHECK(ret, FAIL, "H5Aclose");
diff --git a/test/tfile.c b/test/tfile.c
index e37a060..4766838 100644
--- a/test/tfile.c
+++ b/test/tfile.c
@@ -951,8 +951,8 @@ test_get_file_id(void)
/* Create an attribute for the dataset. Make a duplicated file ID from
* this attribute. And close it.
*/
- attr_id=H5Acreate(dataset_id,ATTR_NAME,H5T_NATIVE_INT,dataspace_id,H5P_DEFAULT);
- CHECK(ret, FAIL, "H5Acreate");
+ attr_id = H5Acreate2(dataset_id, ".", ATTR_NAME, H5T_NATIVE_INT, dataspace_id, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
+ CHECK(ret, FAIL, "H5Acreate2");
/* Test H5Iget_file_id() */
check_file_id(fid, attr_id);
@@ -960,8 +960,8 @@ test_get_file_id(void)
/* Create a named datatype. Make a duplicated file ID from
* this attribute. And close it.
*/
- datatype_id=H5Tcopy(H5T_NATIVE_INT);
- CHECK(ret, FAIL, "H5Acreate");
+ datatype_id = H5Tcopy(H5T_NATIVE_INT);
+ CHECK(ret, FAIL, "H5Tcopy");
ret = H5Tcommit2(fid, TYPE_NAME, datatype_id, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
CHECK(ret, FAIL, "H5Tcommit2");
@@ -1621,8 +1621,8 @@ test_file_getname(void)
VERIFY_STR(name, FILE1, "H5Fget_name");
/* Create an attribute for the dataset */
- attr_id = H5Acreate(dataset_id,TESTA_ATTRNAME,H5T_NATIVE_INT,space_id,H5P_DEFAULT);
- CHECK(attr_id, FAIL, "H5Acreate");
+ attr_id = H5Acreate2(dataset_id, ".", TESTA_ATTRNAME, H5T_NATIVE_INT, space_id, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
+ CHECK(attr_id, FAIL, "H5Acreate2");
/* Get and verify file name */
name_len = H5Fget_name(attr_id, name, (size_t)TESTA_NAME_BUF_SIZE);
diff --git a/test/th5s.c b/test/th5s.c
index e9f7951..46f7110 100644
--- a/test/th5s.c
+++ b/test/th5s.c
@@ -280,10 +280,9 @@ test_h5s_basic(void)
/* Now use the bad dataspace as the space for an attribute */
H5E_BEGIN_TRY {
- aid1 = H5Acreate(dset1, BASICATTR,
- H5T_NATIVE_INT, sid1, H5P_DEFAULT);
+ aid1 = H5Acreate2(dset1, ".", BASICATTR, H5T_NATIVE_INT, sid1, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
} H5E_END_TRY
- VERIFY(aid1, FAIL, "H5Acreate");
+ VERIFY(aid1, FAIL, "H5Acreate2");
/* Make sure that dataspace reads using the bad dataspace fail */
H5E_BEGIN_TRY {
@@ -406,8 +405,8 @@ test_h5s_null(void)
VERIFY(val, 1, "H5Dread");
/* Create an attribute for the group */
- attr=H5Acreate(did,NULLATTR,H5T_NATIVE_INT,sid,H5P_DEFAULT);
- CHECK(attr, FAIL, "H5Acreate");
+ attr = H5Acreate2(did, ".", NULLATTR, H5T_NATIVE_INT, sid, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
+ CHECK(attr, FAIL, "H5Acreate2");
/* Write "nothing" to the attribute */
ret = H5Awrite(attr, H5T_NATIVE_INT, &val);
diff --git a/test/titerate.c b/test/titerate.c
index 81c5c78..f7938e5 100644
--- a/test/titerate.c
+++ b/test/titerate.c
@@ -408,8 +408,8 @@ static void test_iter_attr(hid_t fapl, hbool_t new_format)
for(i = 0; i < NATTR; i++) {
sprintf(name, "Attribute %02d", i);
- attribute = H5Acreate(dataset, name, H5T_NATIVE_INT, filespace, H5P_DEFAULT);
- CHECK(attribute, FAIL, "H5Acreate");
+ attribute = H5Acreate2(dataset, ".", name, H5T_NATIVE_INT, filespace, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
+ CHECK(attribute, FAIL, "H5Acreate2");
/* Keep a copy of the attribute names around for later */
anames[i] = HDstrdup(name);
diff --git a/test/tmisc.c b/test/tmisc.c
index 5fee9dc..1a7da71 100644
--- a/test/tmisc.c
+++ b/test/tmisc.c
@@ -421,8 +421,8 @@ static void test_misc2_write_attribute(void)
root1 = H5Gopen2(file1, "/", H5P_DEFAULT);
CHECK(root1, FAIL, "H5Gopen2");
- att1 = H5Acreate(root1, MISC2_ATT_NAME_1, type, dataspace, H5P_DEFAULT);
- CHECK(att1, FAIL, "H5Acreate");
+ att1 = H5Acreate2(root1, ".", MISC2_ATT_NAME_1, type, dataspace, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
+ CHECK(att1, FAIL, "H5Acreate2");
data.string = string_att1;
@@ -448,8 +448,8 @@ static void test_misc2_write_attribute(void)
root2 = H5Gopen2(file2, "/", H5P_DEFAULT);
CHECK(root2, FAIL, "H5Gopen2");
- att2 = H5Acreate(root2, MISC2_ATT_NAME_2, type, dataspace, H5P_DEFAULT);
- CHECK(att2, FAIL, "H5Acreate");
+ att2 = H5Acreate2(root2, ".", MISC2_ATT_NAME_2, type, dataspace, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
+ CHECK(att2, FAIL, "H5Acreate2");
data.string = string_att2;
@@ -1022,57 +1022,56 @@ test_misc6(void)
CHECK(ret,FAIL,"H5Dclose");
/* Close file */
- ret=H5Fclose(loc_id);
- CHECK(ret,FAIL,"H5Fclose");
+ ret = H5Fclose(loc_id);
+ CHECK(ret, FAIL, "H5Fclose");
/* Loop through adding attributes to each dataset */
- for(u=0; u<MISC6_NUMATTR; u++) {
+ for(u = 0; u < MISC6_NUMATTR; u++) {
/* Create name for attribute */
- sprintf(attr_name,"Attr#%u",u);
+ sprintf(attr_name, "Attr#%u", u);
/* Open the file */
- loc_id=H5Fopen(MISC6_FILE, H5F_ACC_RDWR, H5P_DEFAULT);
- CHECK(loc_id,FAIL,"H5Fopen");
+ loc_id = H5Fopen(MISC6_FILE, H5F_ACC_RDWR, H5P_DEFAULT);
+ CHECK(loc_id, FAIL, "H5Fopen");
/* Open first dataset */
- dataset_id=H5Dopen(loc_id, MISC6_DSETNAME1);
- CHECK(dataset_id,FAIL,"H5Dopen");
+ dataset_id = H5Dopen(loc_id, MISC6_DSETNAME1);
+ CHECK(dataset_id, FAIL, "H5Dopen");
/* Add attribute to dataset */
- attr_id=H5Acreate(dataset_id,attr_name,H5T_NATIVE_INT,space_id,H5P_DEFAULT);
- CHECK(attr_id, FAIL, "H5Acreate");
+ attr_id = H5Acreate2(dataset_id, ".", attr_name, H5T_NATIVE_INT, space_id, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
+ CHECK(attr_id, FAIL, "H5Acreate2");
/* Close attribute */
- ret=H5Aclose(attr_id);
+ ret = H5Aclose(attr_id);
CHECK(ret, FAIL, "H5Aclose");
/* Close dataset */
- ret=H5Dclose(dataset_id);
+ ret = H5Dclose(dataset_id);
CHECK(ret, FAIL, "H5Dclose");
/* Open second dataset */
- dataset_id=H5Dopen(loc_id, MISC6_DSETNAME2);
- CHECK(dataset_id,FAIL,"H5Dopen");
+ dataset_id = H5Dopen(loc_id, MISC6_DSETNAME2);
+ CHECK(dataset_id, FAIL, "H5Dopen");
/* Add attribute to dataset */
- attr_id=H5Acreate(dataset_id,attr_name,H5T_NATIVE_INT,space_id,H5P_DEFAULT);
- CHECK(attr_id, FAIL, "H5Acreate");
+ attr_id = H5Acreate2(dataset_id, ".", attr_name, H5T_NATIVE_INT, space_id, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
+ CHECK(attr_id, FAIL, "H5Acreate2");
/* Close attribute */
- ret=H5Aclose(attr_id);
+ ret = H5Aclose(attr_id);
CHECK(ret, FAIL, "H5Aclose");
/* Close dataset */
- ret=H5Dclose(dataset_id);
+ ret = H5Dclose(dataset_id);
CHECK(ret, FAIL, "H5Dclose");
/* Close file */
- ret=H5Fclose(loc_id);
+ ret = H5Fclose(loc_id);
CHECK(ret,FAIL,"H5Fclose");
-
} /* end for */
/* Close dataspace */
@@ -2883,15 +2882,15 @@ test_misc18(void)
sprintf(attr_name,"Attr %u",u);
/* Create & close attribute on first dataset */
- aid = H5Acreate(did1, attr_name, H5T_STD_U32LE, sid, H5P_DEFAULT);
- CHECK(aid, FAIL, "H5Acreate");
+ aid = H5Acreate2(did1, ".", attr_name, H5T_STD_U32LE, sid, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
+ CHECK(aid, FAIL, "H5Acreate2");
ret = H5Aclose(aid);
CHECK(ret, FAIL, "HAclose");
/* Create & close attribute on second dataset */
- aid = H5Acreate(did2, attr_name, H5T_STD_U32LE, sid, H5P_DEFAULT);
- CHECK(aid, FAIL, "H5Acreate");
+ aid = H5Acreate2(did2, ".", attr_name, H5T_STD_U32LE, sid, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
+ CHECK(aid, FAIL, "H5Acreate2");
ret = H5Aclose(aid);
CHECK(ret, FAIL, "HAclose");
@@ -3180,8 +3179,8 @@ test_misc19(void)
CHECK(sid, FAIL, "H5Screate");
/* Create an attribute */
- aid = H5Acreate(gid,MISC19_ATTR_NAME,H5T_NATIVE_INT,sid,H5P_DEFAULT);
- CHECK(aid, FAIL, "H5Acreate");
+ aid = H5Acreate2(gid, ".", MISC19_ATTR_NAME, H5T_NATIVE_INT, sid, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
+ CHECK(aid, FAIL, "H5Acreate2");
/* Check the reference count */
rc = H5Iget_ref(aid);
@@ -4296,8 +4295,8 @@ test_misc25a(void)
CHECK(ret, FAIL, "H5Tset_size");
/* Add 1st attribute on first group */
- aid = H5Acreate(gid, MISC25A_ATTR1_NAME, tid, sid, H5P_DEFAULT);
- CHECK(aid, FAIL, "H5Acreate");
+ aid = H5Acreate2(gid, ".", MISC25A_ATTR1_NAME, tid, sid, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
+ CHECK(aid, FAIL, "H5Acreate2");
/* Close dataspace */
ret = H5Sclose(sid);
@@ -4322,8 +4321,8 @@ test_misc25a(void)
CHECK(ret, FAIL, "H5Tset_size");
/* Add 2nd attribute on first group */
- aid = H5Acreate(gid, MISC25A_ATTR2_NAME, tid, sid, H5P_DEFAULT);
- CHECK(aid, FAIL, "H5Acreate");
+ aid = H5Acreate2(gid, ".", MISC25A_ATTR2_NAME, tid, sid, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
+ CHECK(aid, FAIL, "H5Acreate2");
/* Close dataspace */
ret = H5Sclose(sid);
@@ -4395,8 +4394,8 @@ test_misc25a(void)
CHECK(ret, FAIL, "H5Tset_size");
/* Add 3rd attribute on first group (smaller than 2nd attribute) */
- aid = H5Acreate(gid, MISC25A_ATTR3_NAME, tid, sid, H5P_DEFAULT);
- CHECK(aid, FAIL, "H5Acreate");
+ aid = H5Acreate2(gid, ".", MISC25A_ATTR3_NAME, tid, sid, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
+ CHECK(aid, FAIL, "H5Acreate2");
/* Close dataspace */
ret = H5Sclose(sid);
@@ -4443,8 +4442,8 @@ test_misc25a(void)
CHECK(ret, FAIL, "H5Tset_size");
/* Re-create 2nd attribute on first group */
- aid = H5Acreate(gid, MISC25A_ATTR2_NAME, tid, sid, H5P_DEFAULT);
- CHECK(aid, FAIL, "H5Acreate");
+ aid = H5Acreate2(gid, ".", MISC25A_ATTR2_NAME, tid, sid, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
+ CHECK(aid, FAIL, "H5Acreate2");
/* Close dataspace */
ret = H5Sclose(sid);
@@ -4507,8 +4506,8 @@ test_misc25a(void)
CHECK(ret, FAIL, "H5Tset_size");
/* Re-create 2nd attribute on first group */
- aid = H5Acreate(gid, MISC25A_ATTR2_NAME, tid, sid, H5P_DEFAULT);
- CHECK(aid, FAIL, "H5Acreate");
+ aid = H5Acreate2(gid, ".", MISC25A_ATTR2_NAME, tid, sid, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
+ CHECK(aid, FAIL, "H5Acreate2");
/* Close dataspace */
ret = H5Sclose(sid);
@@ -4637,8 +4636,8 @@ test_misc25c(void)
CHECK(ret, FAIL, "H5Gclose");
/* Add an attribute to the dataset group */
- aid = H5Acreate(gid, MISC25C_ATTRNAME, H5T_NATIVE_CHAR, sid, H5P_DEFAULT);
- CHECK(aid, FAIL, "H5Acreate");
+ aid = H5Acreate2(gid, ".", MISC25C_ATTRNAME, H5T_NATIVE_CHAR, sid, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
+ CHECK(aid, FAIL, "H5Acreate2");
/* Close the attribute */
ret = H5Aclose(aid);
@@ -4653,8 +4652,8 @@ test_misc25c(void)
CHECK(ret, FAIL, "H5Gclose");
/* Add second attribute to the dataset group */
- aid = H5Acreate(gid, MISC25C_ATTRNAME2, H5T_NATIVE_INT, sid, H5P_DEFAULT);
- CHECK(aid, FAIL, "H5Acreate");
+ aid = H5Acreate2(gid, ".", MISC25C_ATTRNAME2, H5T_NATIVE_INT, sid, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
+ CHECK(aid, FAIL, "H5Acreate2");
/* Close the attribute */
ret = H5Aclose(aid);
diff --git a/test/tsohm.c b/test/tsohm.c
index 5b003c3..894f0bc 100644
--- a/test/tsohm.c
+++ b/test/tsohm.c
@@ -998,8 +998,8 @@ static void sohm_attr_helper(hid_t fcpl_id)
/* Create and verify an attribute on a group */
group_id = H5Gcreate2(file_id, "group", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
CHECK_I(group_id, "H5Gcreate2");
- attr_id = H5Acreate(group_id, "attribute", type_id, space_id, H5P_DEFAULT);
- CHECK_I(attr_id, "H5Acreate");
+ attr_id = H5Acreate2(group_id, ".", "attribute", type_id, space_id, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
+ CHECK_I(attr_id, "H5Acreate2");
ret = H5Awrite(attr_id, H5T_NATIVE_INT, wdata);
CHECK_I(ret, "H5Awrite");
@@ -1034,8 +1034,8 @@ static void sohm_attr_helper(hid_t fcpl_id)
/* Create and verify an attribute */
group_id = H5Gcreate2(file_id, "another_group", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
CHECK_I(group_id, "H5Gcreate2");
- attr_id = H5Acreate(group_id, "attribute", type_id, space_id, H5P_DEFAULT);
- CHECK_I(attr_id, "H5Acreate");
+ attr_id = H5Acreate2(group_id, ".", "attribute", type_id, space_id, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
+ CHECK_I(attr_id, "H5Acreate2");
ret = H5Awrite(attr_id, H5T_NATIVE_INT, wdata);
CHECK_I(ret, "H5Awrite");
@@ -1484,8 +1484,8 @@ size2_helper(hid_t fcpl_id, int test_file_closing, size2_helper_struct *ret_size
dset_id = H5Dcreate(file_id, DSETNAME[x], dtype1_id, dspace1_id, dcpl1_id);
CHECK_I(dset_id, "H5Dcreate");
- attr_id = H5Acreate(dset_id, "attr_name", attr_type_id, attr_space_id, H5P_DEFAULT);
- CHECK_I(attr_id, "H5Acreate");
+ attr_id = H5Acreate2(dset_id, ".", "attr_name", attr_type_id, attr_space_id, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
+ CHECK_I(attr_id, "H5Acreate2");
ret = H5Awrite(attr_id, attr_type_id, attr_string1);
CHECK_I(ret, "H5Awrite");
@@ -1533,8 +1533,8 @@ size2_helper(hid_t fcpl_id, int test_file_closing, size2_helper_struct *ret_size
dset_id = H5Dcreate(group_id, DSETNAME[x], dtype2_id, dspace2_id, dcpl2_id);
CHECK_I(dset_id, "H5Dcreate");
- attr_id = H5Acreate(dset_id, "attr_name", attr_type_id, attr_space_id, H5P_DEFAULT);
- CHECK_I(attr_id, "H5Acreate");
+ attr_id = H5Acreate2(dset_id, ".", "attr_name", attr_type_id, attr_space_id, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
+ CHECK_I(attr_id, "H5Acreate2");
ret = H5Awrite(attr_id, attr_type_id, attr_string2);
CHECK_I(ret, "H5Awrite");
@@ -1574,8 +1574,8 @@ size2_helper(hid_t fcpl_id, int test_file_closing, size2_helper_struct *ret_size
dset_id = H5Dcreate(group_id, DSETNAME[x], dtype1_id, dspace1_id, dcpl1_id);
CHECK_I(dset_id, "H5Dcreate");
- attr_id = H5Acreate(dset_id, "attr_name", attr_type_id, attr_space_id, H5P_DEFAULT);
- CHECK_I(attr_id, "H5Acreate");
+ attr_id = H5Acreate2(dset_id, ".", "attr_name", attr_type_id, attr_space_id, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
+ CHECK_I(attr_id, "H5Acreate2");
ret = H5Awrite(attr_id, attr_type_id, attr_string1);
CHECK_I(ret, "H5Awrite");
@@ -1587,8 +1587,8 @@ size2_helper(hid_t fcpl_id, int test_file_closing, size2_helper_struct *ret_size
dset_id = H5Dcreate(group_id, DSETNAME[x+1], dtype2_id, dspace2_id, dcpl2_id);
CHECK_I(dset_id, "H5Dcreate");
- attr_id = H5Acreate(dset_id, "attr_name", attr_type_id, attr_space_id, H5P_DEFAULT);
- CHECK_I(attr_id, "H5Acreate");
+ attr_id = H5Acreate2(dset_id, ".", "attr_name", attr_type_id, attr_space_id, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
+ CHECK_I(attr_id, "H5Acreate2");
ret = H5Awrite(attr_id, attr_type_id, attr_string2);
CHECK_I(ret, "H5Awrite");
@@ -1632,8 +1632,8 @@ size2_helper(hid_t fcpl_id, int test_file_closing, size2_helper_struct *ret_size
attr_string1[1] = attr_name[1] = (x % 10) + '0';
/* Create an attribute on the group */
- attr_id = H5Acreate(group_id, attr_name, attr_type_id, attr_space_id, H5P_DEFAULT);
- CHECK_I(attr_id, "H5Acreate");
+ attr_id = H5Acreate2(group_id, ".", attr_name, attr_type_id, attr_space_id, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
+ CHECK_I(attr_id, "H5Acreate2");
ret = H5Awrite(attr_id, attr_type_id, attr_string1);
CHECK_I(ret, "H5Awrite");
@@ -1672,8 +1672,8 @@ size2_helper(hid_t fcpl_id, int test_file_closing, size2_helper_struct *ret_size
attr_string1[1] = attr_name[1] = (x % 10) + '0';
/* Create an attribute on the group */
- attr_id = H5Acreate(group_id, attr_name, attr_type_id, attr_space_id, H5P_DEFAULT);
- CHECK_I(attr_id, "H5Acreate");
+ attr_id = H5Acreate2(group_id, ".", attr_name, attr_type_id, attr_space_id, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
+ CHECK_I(attr_id, "H5Acreate2");
ret = H5Awrite(attr_id, attr_type_id, attr_string1);
CHECK_I(ret, "H5Awrite");
@@ -2573,8 +2573,8 @@ static void delete_helper_write(hid_t file_id, hid_t *dspace_id, hid_t *dcpl_id,
CHECK_I(ret, "H5Dwrite");
/* Create an attribute on the dataset. */
- attr_id = H5Acreate(dset_id, "attr_name", H5T_NATIVE_CHAR, dspace_id[x], H5P_DEFAULT);
- CHECK_I(attr_id, "H5Acreate");
+ attr_id = H5Acreate2(dset_id, ".", "attr_name", H5T_NATIVE_CHAR, dspace_id[x], H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
+ CHECK_I(attr_id, "H5Acreate2");
/* Write to attribute */
ret = H5Awrite(attr_id, H5T_NATIVE_CHAR, &wdata);
diff --git a/test/ttsafe_acreate.c b/test/ttsafe_acreate.c
index cfc250b..6409bb1 100644
--- a/test/ttsafe_acreate.c
+++ b/test/ttsafe_acreate.c
@@ -19,17 +19,17 @@
* operations. -- Threaded program --
* ------------------------------------------------------------------
*
- * Plan: Attempt to break H5Acreate by making many simultaneous create
+ * Plan: Attempt to break H5Acreate2 by making many simultaneous create
* calls.
*
- * Claim: N calls to H5Acreate should create N attributes for a dataset
+ * Claim: N calls to H5Acreate2 should create N attributes for a dataset
* if threadsafe. If some unprotected shared data exists for the
* dataset (eg, a count of the number of attributes in the
* dataset), there is a small chance that consecutive reads occur
* before a write to that shared variable.
*
* HDF5 APIs exercised in thread:
- * H5Acreate, H5Awrite, H5Aclose.
+ * H5Acreate2, H5Awrite, H5Aclose.
*
* Created: Oct 5 1999
* Programmer: Chee Wai LEE
@@ -167,9 +167,9 @@ void *tts_acreate_thread(void *client_data)
/* Create attribute */
attribute_name = gen_name(attrib_data->current_index);
- attribute = H5Acreate(attrib_data->dataset, attribute_name,
+ attribute = H5Acreate2(attrib_data->dataset, ".", attribute_name,
attrib_data->datatype, attrib_data->dataspace,
- H5P_DEFAULT);
+ H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
/* Write data to the attribute */
attribute_data = malloc(sizeof(int));
diff --git a/test/tunicode.c b/test/tunicode.c
index 20ca9bc..6898857 100644
--- a/test/tunicode.c
+++ b/test/tunicode.c
@@ -530,8 +530,8 @@ void test_attrname(hid_t fid, const char * string)
CHECK(ret, FAIL, "H5Tset_size");
/* Create the attribute and check that its name is correct */
- attr_id = H5Acreate(group_id, string, dtype_id, space_id, H5P_DEFAULT);
- CHECK(attr_id, FAIL, "H5Acreate");
+ attr_id = H5Acreate2(group_id, ".", string, dtype_id, space_id, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
+ CHECK(attr_id, FAIL, "H5Acreate2");
ret = H5Aget_name(attr_id, (size_t)MAX_STRING_LENGTH, read_buf);
CHECK(ret, FAIL, "H5Aget_name");
ret = strcmp(read_buf, string);
diff --git a/test/tvlstr.c b/test/tvlstr.c
index a758a9e..c9acba0 100644
--- a/test/tvlstr.c
+++ b/test/tvlstr.c
@@ -597,8 +597,8 @@ static void test_write_vl_string_attribute(void)
CHECK(dataspace, FAIL, "H5Screate");
/* Test creating a "normal" sized string attribute */
- att = H5Acreate(root, "test_scalar", type, dataspace, H5P_DEFAULT);
- CHECK(att, FAIL, "H5Acreate");
+ att = H5Acreate2(root, ".", "test_scalar", type, dataspace, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
+ CHECK(att, FAIL, "H5Acreate2");
ret = H5Awrite(att, type, &string_att);
CHECK(ret, FAIL, "H5Awrite");
@@ -615,8 +615,8 @@ static void test_write_vl_string_attribute(void)
CHECK(ret, FAIL, "HAclose");
/* Test creating a "large" sized string attribute */
- att = H5Acreate(root, "test_scalar_large", type, dataspace, H5P_DEFAULT);
- CHECK(att, FAIL, "H5Acreate");
+ att = H5Acreate2(root, ".", "test_scalar_large", type, dataspace, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
+ CHECK(att, FAIL, "H5Acreate2");
string_att_write = (char*)HDcalloc((size_t)8192, sizeof(char));
HDmemset(string_att_write, 'A', (size_t)8191);
diff --git a/test/unlink.c b/test/unlink.c
index 1d89c29..fad41ae 100644
--- a/test/unlink.c
+++ b/test/unlink.c
@@ -824,7 +824,7 @@ test_filespace(hid_t fapl)
sprintf(objname,"%s %u",ATTRNAME,u);
/* Create an attribute on the first dataset */
- if((attr = H5Acreate(dataset, objname, H5T_NATIVE_INT, attr_space, H5P_DEFAULT)) < 0) FAIL_STACK_ERROR
+ if((attr = H5Acreate2(dataset, ".", objname, H5T_NATIVE_INT, attr_space, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) FAIL_STACK_ERROR
/* Don't worry about writing the attribute - it will have a fill value */
@@ -832,7 +832,7 @@ test_filespace(hid_t fapl)
if(H5Aclose(attr) < 0) FAIL_STACK_ERROR
/* Create an attribute on the second dataset */
- if((attr = H5Acreate(dataset2, objname, H5T_NATIVE_INT, attr_space, H5P_DEFAULT)) < 0) FAIL_STACK_ERROR
+ if((attr = H5Acreate2(dataset2, ".", objname, H5T_NATIVE_INT, attr_space, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) FAIL_STACK_ERROR
/* Don't worry about writing the attribute - it will have a fill value */
@@ -1191,7 +1191,7 @@ test_filespace(hid_t fapl)
if((attr_space = H5Screate_simple(FILESPACE_ATTR_NDIMS, attr_dims, NULL)) < 0) FAIL_STACK_ERROR
/* Create an attribute on the dataset */
- if((attr = H5Acreate(dataset, ATTRNAME, H5T_NATIVE_INT, attr_space, H5P_DEFAULT)) < 0) FAIL_STACK_ERROR
+ if((attr = H5Acreate2(dataset, ".", ATTRNAME, H5T_NATIVE_INT, attr_space, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) FAIL_STACK_ERROR
/* Don't worry about writing the attribute - it will have a fill value */
@@ -1200,7 +1200,7 @@ test_filespace(hid_t fapl)
/* Create another attribute with same name */
H5E_BEGIN_TRY {
- attr = H5Acreate(dataset, ATTRNAME, H5T_NATIVE_INT, attr_space, H5P_DEFAULT);
+ attr = H5Acreate2(dataset, ".", ATTRNAME, H5T_NATIVE_INT, attr_space, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
} H5E_END_TRY;
if(attr >= 0) {
H5Aclose(attr);
diff --git a/test/vfd.c b/test/vfd.c
index 97a2526..01d9d98 100644
--- a/test/vfd.c
+++ b/test/vfd.c
@@ -84,11 +84,11 @@ test_sec2(void)
/* Set property list and file name for SEC2 driver. */
fapl = h5_fileaccess();
- if(H5Pset_fapl_sec2(fapl)<0)
+ if(H5Pset_fapl_sec2(fapl) < 0)
TEST_ERROR;
h5_fixname(FILENAME[0], fapl, filename, sizeof filename);
- if((file=H5Fcreate(filename, H5F_ACC_TRUNC, H5P_DEFAULT, fapl))<0)
+ if((file=H5Fcreate(filename, H5F_ACC_TRUNC, H5P_DEFAULT, fapl)) < 0)
TEST_ERROR;
/* Retrieve the access property list... */
@@ -100,7 +100,7 @@ test_sec2(void)
TEST_ERROR;
/* Check file handle API */
- if(H5Fget_vfd_handle(file, H5P_DEFAULT, (void **)&fhandle)<0)
+ if(H5Fget_vfd_handle(file, H5P_DEFAULT, (void **)&fhandle) < 0)
TEST_ERROR;
if(*fhandle<0)
TEST_ERROR;
@@ -115,7 +115,7 @@ test_sec2(void)
if(file_size<1*KB || file_size>4*KB)
TEST_ERROR;
- if(H5Fclose(file)<0)
+ if(H5Fclose(file) < 0)
TEST_ERROR;
h5_cleanup(FILENAME, fapl);
PASSED();
@@ -175,17 +175,17 @@ test_direct(void)
/* Set property list and file name for Direct driver. Set memory alignment boundary
* and file block size to 512 which is the minimum for Linux 2.6. */
fapl = h5_fileaccess();
- if(H5Pset_fapl_direct(fapl, MBOUNDARY, FBSIZE, CBSIZE)<0)
+ if(H5Pset_fapl_direct(fapl, MBOUNDARY, FBSIZE, CBSIZE) < 0)
TEST_ERROR;
h5_fixname(FILENAME[4], fapl, filename, sizeof filename);
/* Verify the file access properties */
- if(H5Pget_fapl_direct(fapl, &mbound, &fbsize, &cbsize)<0)
+ if(H5Pget_fapl_direct(fapl, &mbound, &fbsize, &cbsize) < 0)
TEST_ERROR;
if(mbound != MBOUNDARY || fbsize != FBSIZE || cbsize != CBSIZE)
TEST_ERROR;
- if(H5Pset_alignment(fapl, (hsize_t)THRESHOLD, (hsize_t)FBSIZE)<0)
+ if(H5Pset_alignment(fapl, (hsize_t)THRESHOLD, (hsize_t)FBSIZE) < 0)
TEST_ERROR;
H5E_BEGIN_TRY {
@@ -207,7 +207,7 @@ test_direct(void)
TEST_ERROR;
/* Check file handle API */
- if(H5Fget_vfd_handle(file, H5P_DEFAULT, (void **)&fhandle)<0)
+ if(H5Fget_vfd_handle(file, H5P_DEFAULT, (void **)&fhandle) < 0)
TEST_ERROR;
if(*fhandle<0)
TEST_ERROR;
@@ -239,25 +239,25 @@ test_direct(void)
/* Create the data space1 */
dims1[0] = DSET1_DIM1;
dims1[1] = DSET1_DIM2;
- if ((space1 = H5Screate_simple(2, dims1, NULL))<0)
+ if ((space1 = H5Screate_simple(2, dims1, NULL)) < 0)
TEST_ERROR;
/* Create the dset1 */
- if ((dset1 = H5Dcreate(file, DSET1_NAME, H5T_NATIVE_INT, space1, H5P_DEFAULT))<0)
+ if ((dset1 = H5Dcreate(file, DSET1_NAME, H5T_NATIVE_INT, space1, H5P_DEFAULT)) < 0)
TEST_ERROR;
/* Write the data to the dset1 */
- if (H5Dwrite(dset1, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, points)<0)
+ if (H5Dwrite(dset1, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, points) < 0)
TEST_ERROR;
- if(H5Dclose(dset1)<0)
+ if(H5Dclose(dset1) < 0)
TEST_ERROR;
- if((dset1=H5Dopen(file, DSET1_NAME))<0)
+ if((dset1=H5Dopen(file, DSET1_NAME)) < 0)
TEST_ERROR;
/* Read the data back from dset1 */
- if (H5Dread(dset1, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, check)<0)
+ if (H5Dread(dset1, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, check) < 0)
TEST_ERROR;
/* Check that the values read are the same as the values written */
@@ -276,25 +276,25 @@ test_direct(void)
/* Create the data space2. For data set 2, memory address and data size are not aligned. */
dims2[0] = DSET2_DIM;
- if ((space2 = H5Screate_simple(1, dims2, NULL))<0)
+ if ((space2 = H5Screate_simple(1, dims2, NULL)) < 0)
TEST_ERROR;
/* Create the dset2 */
- if ((dset2 = H5Dcreate(file, DSET2_NAME, H5T_NATIVE_INT, space2, H5P_DEFAULT))<0)
+ if ((dset2 = H5Dcreate(file, DSET2_NAME, H5T_NATIVE_INT, space2, H5P_DEFAULT)) < 0)
TEST_ERROR;
/* Write the data to the dset1 */
- if (H5Dwrite(dset2, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, wdata2)<0)
+ if (H5Dwrite(dset2, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, wdata2) < 0)
TEST_ERROR;
- if(H5Dclose(dset2)<0)
+ if(H5Dclose(dset2) < 0)
TEST_ERROR;
- if((dset2=H5Dopen(file, DSET2_NAME))<0)
+ if((dset2=H5Dopen(file, DSET2_NAME)) < 0)
TEST_ERROR;
/* Read the data back from dset1 */
- if (H5Dread(dset2, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, rdata2)<0)
+ if (H5Dread(dset2, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, rdata2) < 0)
TEST_ERROR;
/* Check that the values read are the same as the values written */
@@ -307,15 +307,15 @@ test_direct(void)
}
}
- if(H5Sclose(space1)<0)
+ if(H5Sclose(space1) < 0)
TEST_ERROR;
- if(H5Dclose(dset1)<0)
+ if(H5Dclose(dset1) < 0)
TEST_ERROR;
- if(H5Sclose(space2)<0)
+ if(H5Sclose(space2) < 0)
TEST_ERROR;
- if(H5Dclose(dset2)<0)
+ if(H5Dclose(dset2) < 0)
TEST_ERROR;
- if(H5Fclose(file)<0)
+ if(H5Fclose(file) < 0)
TEST_ERROR;
if(points)
free(points);
@@ -379,11 +379,11 @@ test_core(void)
/* Set property list and file name for CORE driver */
fapl = h5_fileaccess();
- if(H5Pset_fapl_core(fapl, (size_t)CORE_INCREMENT, TRUE)<0)
+ if(H5Pset_fapl_core(fapl, (size_t)CORE_INCREMENT, TRUE) < 0)
TEST_ERROR;
h5_fixname(FILENAME[1], fapl, filename, sizeof filename);
- if((file=H5Fcreate(filename, H5F_ACC_TRUNC, H5P_DEFAULT, fapl))<0)
+ if((file=H5Fcreate(filename, H5F_ACC_TRUNC, H5P_DEFAULT, fapl)) < 0)
TEST_ERROR;
/* Retrieve the access property list... */
@@ -394,7 +394,7 @@ test_core(void)
if (H5Pclose(access_fapl) < 0)
TEST_ERROR;
- if(H5Fget_vfd_handle(file, H5P_DEFAULT, &fhandle)<0)
+ if(H5Fget_vfd_handle(file, H5P_DEFAULT, &fhandle) < 0)
TEST_ERROR;
if(fhandle==NULL)
{
@@ -412,16 +412,16 @@ test_core(void)
if(file_size<2*KB || file_size>6*KB)
TEST_ERROR;
- if(H5Fclose(file)<0)
+ if(H5Fclose(file) < 0)
TEST_ERROR;
/* Open the file with backing store off for read and write.
* Changes won't be saved in file. */
- if(H5Pset_fapl_core(fapl, (size_t)CORE_INCREMENT, FALSE)<0)
+ if(H5Pset_fapl_core(fapl, (size_t)CORE_INCREMENT, FALSE) < 0)
TEST_ERROR;
- if((file=H5Fopen(filename, H5F_ACC_RDWR, fapl))<0)
+ if((file=H5Fopen(filename, H5F_ACC_RDWR, fapl)) < 0)
TEST_ERROR;
/* Allocate memory for data set. */
@@ -437,25 +437,25 @@ test_core(void)
/* Create the data space1 */
dims1[0] = DSET1_DIM1;
dims1[1] = DSET1_DIM2;
- if ((space1 = H5Screate_simple(2, dims1, NULL))<0)
+ if ((space1 = H5Screate_simple(2, dims1, NULL)) < 0)
TEST_ERROR;
/* Create the dset1 */
- if ((dset1 = H5Dcreate(file, DSET1_NAME, H5T_NATIVE_INT, space1, H5P_DEFAULT))<0)
+ if ((dset1 = H5Dcreate(file, DSET1_NAME, H5T_NATIVE_INT, space1, H5P_DEFAULT)) < 0)
TEST_ERROR;
/* Write the data to the dset1 */
- if (H5Dwrite(dset1, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, points)<0)
+ if (H5Dwrite(dset1, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, points) < 0)
TEST_ERROR;
- if(H5Dclose(dset1)<0)
+ if(H5Dclose(dset1) < 0)
TEST_ERROR;
- if((dset1=H5Dopen(file, DSET1_NAME))<0)
+ if((dset1=H5Dopen(file, DSET1_NAME)) < 0)
TEST_ERROR;
/* Read the data back from dset1 */
- if (H5Dread(dset1, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, check)<0)
+ if (H5Dread(dset1, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, check) < 0)
TEST_ERROR;
/* Check that the values read are the same as the values written */
@@ -472,32 +472,32 @@ test_core(void)
}
}
- if(H5Dclose(dset1)<0)
+ if(H5Dclose(dset1) < 0)
TEST_ERROR;
- if(H5Fclose(file)<0)
+ if(H5Fclose(file) < 0)
TEST_ERROR;
/* Open the file with backing store on for read and write.
* Changes will be saved in file. */
- if(H5Pset_fapl_core(fapl, (size_t)CORE_INCREMENT, TRUE)<0)
+ if(H5Pset_fapl_core(fapl, (size_t)CORE_INCREMENT, TRUE) < 0)
TEST_ERROR;
- if((file=H5Fopen(filename, H5F_ACC_RDWR, fapl))<0)
+ if((file=H5Fopen(filename, H5F_ACC_RDWR, fapl)) < 0)
TEST_ERROR;
/* Create the dset1 */
- if ((dset1 = H5Dcreate(file, DSET1_NAME, H5T_NATIVE_INT, space1, H5P_DEFAULT))<0)
+ if ((dset1 = H5Dcreate(file, DSET1_NAME, H5T_NATIVE_INT, space1, H5P_DEFAULT)) < 0)
TEST_ERROR;
/* Write the data to the dset1 */
- if (H5Dwrite(dset1, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, points)<0)
+ if (H5Dwrite(dset1, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, points) < 0)
TEST_ERROR;
- if(H5Dclose(dset1)<0)
+ if(H5Dclose(dset1) < 0)
TEST_ERROR;
- if((dset1=H5Dopen(file, DSET1_NAME))<0)
+ if((dset1=H5Dopen(file, DSET1_NAME)) < 0)
TEST_ERROR;
/* Reallocate memory for reading buffer. */
@@ -507,7 +507,7 @@ test_core(void)
check=(int*)malloc(DSET1_DIM1*DSET1_DIM2*sizeof(int));
/* Read the data back from dset1 */
- if (H5Dread(dset1, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, check)<0)
+ if (H5Dread(dset1, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, check) < 0)
TEST_ERROR;
/* Check that the values read are the same as the values written */
@@ -533,11 +533,11 @@ test_core(void)
if(file_size<64*KB || file_size>256*KB)
TEST_ERROR;
- if(H5Sclose(space1)<0)
+ if(H5Sclose(space1) < 0)
TEST_ERROR;
- if(H5Dclose(dset1)<0)
+ if(H5Dclose(dset1) < 0)
TEST_ERROR;
- if(H5Fclose(file)<0)
+ if(H5Fclose(file) < 0)
TEST_ERROR;
if(points)
free(points);
@@ -597,7 +597,7 @@ test_family_opens(char *fname, hid_t fa_pl)
if(file >= 0) TEST_ERROR
/* Case 3: reopen file with wrong member size */
- if(H5Pset_fapl_family(fa_pl, (hsize_t)128, H5P_DEFAULT)<0)
+ if(H5Pset_fapl_family(fa_pl, (hsize_t)128, H5P_DEFAULT) < 0)
TEST_ERROR;
H5E_BEGIN_TRY {
@@ -613,7 +613,7 @@ test_family_opens(char *fname, hid_t fa_pl)
break;
}
- if(H5Pset_fapl_family(fa_pl, (hsize_t)FAMILY_SIZE, H5P_DEFAULT)<0)
+ if(H5Pset_fapl_family(fa_pl, (hsize_t)FAMILY_SIZE, H5P_DEFAULT) < 0)
TEST_ERROR;
H5E_BEGIN_TRY {
@@ -671,14 +671,14 @@ test_family(void)
/* Set property list and file name for FAMILY driver */
fapl = h5_fileaccess();
- if(H5Pset_fapl_family(fapl, (hsize_t)FAMILY_SIZE, H5P_DEFAULT)<0)
+ if(H5Pset_fapl_family(fapl, (hsize_t)FAMILY_SIZE, H5P_DEFAULT) < 0)
TEST_ERROR;
h5_fixname(FILENAME[2], fapl, filename, sizeof filename);
- if((file=H5Fcreate(filename, H5F_ACC_TRUNC, H5P_DEFAULT, fapl))<0)
+ if((file=H5Fcreate(filename, H5F_ACC_TRUNC, H5P_DEFAULT, fapl)) < 0)
TEST_ERROR;
- if(H5Fclose(file)<0)
+ if(H5Fclose(file) < 0)
TEST_ERROR;
/* Test different wrong ways to reopen family files where there's only
@@ -687,10 +687,10 @@ test_family(void)
TEST_ERROR;
/* Reopen the file with default member file size */
- if(H5Pset_fapl_family(fapl, (hsize_t)H5F_FAMILY_DEFAULT, H5P_DEFAULT)<0)
+ if(H5Pset_fapl_family(fapl, (hsize_t)H5F_FAMILY_DEFAULT, H5P_DEFAULT) < 0)
TEST_ERROR;
- if((file=H5Fopen(filename, H5F_ACC_RDWR, fapl))<0)
+ if((file=H5Fopen(filename, H5F_ACC_RDWR, fapl)) < 0)
TEST_ERROR;
/* Check file size API */
@@ -702,7 +702,7 @@ test_family(void)
TEST_ERROR;
/* Create and write dataset */
- if((space=H5Screate_simple(2, dims, NULL))<0)
+ if((space=H5Screate_simple(2, dims, NULL)) < 0)
TEST_ERROR;
/* Retrieve the access property list... */
@@ -713,30 +713,30 @@ test_family(void)
if (H5Pclose(access_fapl) < 0)
TEST_ERROR;
- if((dset=H5Dcreate(file, dname, H5T_NATIVE_INT, space, H5P_DEFAULT))<0)
+ if((dset=H5Dcreate(file, dname, H5T_NATIVE_INT, space, H5P_DEFAULT)) < 0)
TEST_ERROR;
for(i=0; i<FAMILY_NUMBER; i++)
for(j=0; j<FAMILY_SIZE; j++)
buf[i][j] = i*10000+j;
- if(H5Dwrite(dset, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, buf)<0)
+ if(H5Dwrite(dset, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, buf) < 0)
TEST_ERROR;
/* check file handle API */
- if((fapl2=H5Pcreate(H5P_FILE_ACCESS))<0)
+ if((fapl2=H5Pcreate(H5P_FILE_ACCESS)) < 0)
TEST_ERROR;
- if(H5Pset_family_offset(fapl2, (hsize_t)0)<0)
+ if(H5Pset_family_offset(fapl2, (hsize_t)0) < 0)
TEST_ERROR;
- if(H5Fget_vfd_handle(file, fapl2, (void **)&fhandle)<0)
+ if(H5Fget_vfd_handle(file, fapl2, (void **)&fhandle) < 0)
TEST_ERROR;
if(*fhandle<0)
TEST_ERROR;
- if(H5Pset_family_offset(fapl2, (hsize_t)(FAMILY_SIZE*2))<0)
+ if(H5Pset_family_offset(fapl2, (hsize_t)(FAMILY_SIZE*2)) < 0)
TEST_ERROR;
- if(H5Fget_vfd_handle(file, fapl2, (void **)&fhandle2)<0)
+ if(H5Fget_vfd_handle(file, fapl2, (void **)&fhandle2) < 0)
TEST_ERROR;
if(*fhandle2<0)
TEST_ERROR;
@@ -755,28 +755,28 @@ test_family(void)
TEST_ERROR;
}
- if(H5Sclose(space)<0)
+ if(H5Sclose(space) < 0)
TEST_ERROR;
- if(H5Dclose(dset)<0)
+ if(H5Dclose(dset) < 0)
TEST_ERROR;
- if(H5Pclose(fapl2)<0)
+ if(H5Pclose(fapl2) < 0)
TEST_ERROR;
- if(H5Fclose(file)<0)
+ if(H5Fclose(file) < 0)
TEST_ERROR;
/* Test different wrong ways to reopen family files when there're multiple
* member files existing. */
- if(test_family_opens(filename, fapl)<0)
+ if(test_family_opens(filename, fapl) < 0)
TEST_ERROR;
/* Reopen the file with correct member file size. */
- if(H5Pset_fapl_family(fapl, (hsize_t)FAMILY_SIZE, H5P_DEFAULT)<0)
+ if(H5Pset_fapl_family(fapl, (hsize_t)FAMILY_SIZE, H5P_DEFAULT) < 0)
TEST_ERROR;
- if((file=H5Fopen(filename, H5F_ACC_RDWR, fapl))<0)
+ if((file=H5Fopen(filename, H5F_ACC_RDWR, fapl)) < 0)
TEST_ERROR;
- if(H5Fclose(file)<0)
+ if(H5Fclose(file) < 0)
TEST_ERROR;
h5_cleanup(FILENAME, fapl);
@@ -834,7 +834,7 @@ test_family_compat(void)
/* Set property list and file name for FAMILY driver */
fapl = h5_fileaccess();
- if(H5Pset_fapl_family(fapl, (hsize_t)FAMILY_SIZE2, H5P_DEFAULT)<0)
+ if(H5Pset_fapl_family(fapl, (hsize_t)FAMILY_SIZE2, H5P_DEFAULT) < 0)
TEST_ERROR;
h5_fixname(COMPAT_BASENAME, fapl, filename, sizeof filename);
@@ -847,13 +847,13 @@ test_family_compat(void)
}
strcat(pathname, filename);
- if((file=H5Fopen(pathname, H5F_ACC_RDONLY, fapl))<0)
+ if((file=H5Fopen(pathname, H5F_ACC_RDONLY, fapl)) < 0)
TEST_ERROR;
- if(H5Fclose(file)<0)
+ if(H5Fclose(file) < 0)
TEST_ERROR;
- if(H5Pclose(fapl)<0)
+ if(H5Pclose(fapl) < 0)
TEST_ERROR;
PASSED();
@@ -979,27 +979,27 @@ test_multi(void)
memb_addr[H5FD_MEM_GHEAP] = HADDR_MAX*3/4;
- if(H5Pset_fapl_multi(fapl, memb_map, memb_fapl, memb_name, memb_addr, TRUE)<0)
+ if(H5Pset_fapl_multi(fapl, memb_map, memb_fapl, memb_name, memb_addr, TRUE) < 0)
TEST_ERROR;
h5_fixname(FILENAME[3], fapl, filename, sizeof filename);
- if((file=H5Fcreate(filename, H5F_ACC_TRUNC, H5P_DEFAULT, fapl))<0)
+ if((file=H5Fcreate(filename, H5F_ACC_TRUNC, H5P_DEFAULT, fapl)) < 0)
TEST_ERROR;
- if(H5Fclose(file)<0)
+ if(H5Fclose(file) < 0)
TEST_ERROR;
/* Test wrong ways to reopen multi files */
- if(test_multi_opens(filename)<0)
+ if(test_multi_opens(filename) < 0)
TEST_ERROR;
/* Reopen the file */
- if((file=H5Fopen(filename, H5F_ACC_RDWR, fapl))<0)
+ if((file=H5Fopen(filename, H5F_ACC_RDWR, fapl)) < 0)
TEST_ERROR;
/* Create and write data set */
- if((space=H5Screate_simple(2, dims, NULL))<0)
+ if((space=H5Screate_simple(2, dims, NULL)) < 0)
TEST_ERROR;
/* Retrieve the access property list... */
@@ -1020,27 +1020,27 @@ test_multi(void)
if(file_size < HADDR_MAX/4 || file_size > HADDR_MAX/2)
TEST_ERROR;
- if((dset=H5Dcreate(file, dname, H5T_NATIVE_INT, space, H5P_DEFAULT))<0)
+ if((dset=H5Dcreate(file, dname, H5T_NATIVE_INT, space, H5P_DEFAULT)) < 0)
TEST_ERROR;
for(i=0; i<MULTI_SIZE; i++)
for(j=0; j<MULTI_SIZE; j++)
buf[i][j] = i*10000+j;
- if(H5Dwrite(dset, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, buf)<0)
+ if(H5Dwrite(dset, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, buf) < 0)
TEST_ERROR;
- if((fapl2=H5Pcreate(H5P_FILE_ACCESS))<0)
+ if((fapl2=H5Pcreate(H5P_FILE_ACCESS)) < 0)
TEST_ERROR;
- if(H5Pset_multi_type(fapl2, H5FD_MEM_SUPER)<0)
+ if(H5Pset_multi_type(fapl2, H5FD_MEM_SUPER) < 0)
TEST_ERROR;
- if(H5Fget_vfd_handle(file, fapl2, (void **)&fhandle)<0)
+ if(H5Fget_vfd_handle(file, fapl2, (void **)&fhandle) < 0)
TEST_ERROR;
if(*fhandle<0)
TEST_ERROR;
- if(H5Pset_multi_type(fapl2, H5FD_MEM_DRAW)<0)
+ if(H5Pset_multi_type(fapl2, H5FD_MEM_DRAW) < 0)
TEST_ERROR;
- if(H5Fget_vfd_handle(file, fapl2, (void **)&fhandle2)<0)
+ if(H5Fget_vfd_handle(file, fapl2, (void **)&fhandle2) < 0)
TEST_ERROR;
if(*fhandle2<0)
TEST_ERROR;
@@ -1056,11 +1056,11 @@ test_multi(void)
if(file_size < HADDR_MAX/2 || file_size > HADDR_MAX)
TEST_ERROR;
- if(H5Sclose(space)<0)
+ if(H5Sclose(space) < 0)
TEST_ERROR;
- if(H5Dclose(dset)<0)
+ if(H5Dclose(dset) < 0)
TEST_ERROR;
- if(H5Pclose(fapl2)<0)
+ if(H5Pclose(fapl2) < 0)
TEST_ERROR;
/* Create and write attribute for the root group. */
@@ -1068,34 +1068,34 @@ test_multi(void)
FAIL_STACK_ERROR
/* Attribute string. */
- if((atype = H5Tcopy(H5T_C_S1))<0)
+ if((atype = H5Tcopy(H5T_C_S1)) < 0)
TEST_ERROR;
- if(H5Tset_size(atype, strlen(meta) + 1)<0)
+ if(H5Tset_size(atype, strlen(meta) + 1) < 0)
TEST_ERROR;
- if(H5Tset_strpad(atype, H5T_STR_NULLTERM)<0)
+ if(H5Tset_strpad(atype, H5T_STR_NULLTERM) < 0)
TEST_ERROR;
/* Create and write attribute */
- if((aspace = H5Screate_simple(1, adims, NULL))<0)
+ if((aspace = H5Screate_simple(1, adims, NULL)) < 0)
TEST_ERROR;
- if((attr = H5Acreate(root, "Metadata", atype, aspace, H5P_DEFAULT))<0)
+ if((attr = H5Acreate2(root, ".", "Metadata", atype, aspace, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0)
TEST_ERROR;
- if(H5Awrite(attr, atype, meta)<0)
+ if(H5Awrite(attr, atype, meta) < 0)
TEST_ERROR;
/* Close IDs */
- if(H5Tclose(atype)<0)
+ if(H5Tclose(atype) < 0)
TEST_ERROR;
- if(H5Sclose(aspace)<0)
+ if(H5Sclose(aspace) < 0)
TEST_ERROR;
- if(H5Aclose(attr)<0)
+ if(H5Aclose(attr) < 0)
TEST_ERROR;
- if(H5Fclose(file)<0)
+ if(H5Fclose(file) < 0)
TEST_ERROR;
h5_cleanup(FILENAME, fapl);
@@ -1134,18 +1134,18 @@ error:
int
main(void)
{
- int nerrors=0;
+ int nerrors = 0;
h5_reset();
- nerrors += test_sec2()<0 ?1:0;
- nerrors += test_core()<0 ?1:0;
- nerrors += test_family()<0 ?1:0;
- nerrors += test_family_compat()<0 ?1:0;
- nerrors += test_multi()<0 ?1:0;
- nerrors += test_direct()<0 ?1:0;
+ nerrors += test_sec2() < 0 ? 1 : 0;
+ nerrors += test_core() < 0 ? 1 : 0;
+ nerrors += test_family() < 0 ? 1 : 0;
+ nerrors += test_family_compat() < 0 ? 1 : 0;
+ nerrors += test_multi() < 0 ? 1 : 0;
+ nerrors += test_direct() < 0 ? 1 : 0;
- if (nerrors){
+ if(nerrors) {
printf("***** %d Virtual File Driver TEST%s FAILED! *****\n",
nerrors, nerrors > 1 ? "S" : "");
return 1;
@@ -1154,3 +1154,4 @@ main(void)
printf("All Virtual File Driver tests passed.\n");
return 0;
}
+