summaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/dangle.c4
-rw-r--r--test/dtypes.c6
-rw-r--r--test/gen_mergemsg.c10
-rw-r--r--test/gen_nullspace.c2
-rw-r--r--test/links.c6
-rwxr-xr-xtest/objcopy.c14
-rwxr-xr-xtest/reserved.c2
-rw-r--r--test/tattr.c406
-rw-r--r--test/tfile.c4
-rw-r--r--test/th5s.c4
-rw-r--r--test/titerate.c2
-rw-r--r--test/tmisc.c28
-rw-r--r--test/tsohm.c18
-rw-r--r--test/ttsafe_acreate.c4
-rw-r--r--test/tunicode.c2
-rw-r--r--test/tvlstr.c4
-rw-r--r--test/unlink.c8
-rw-r--r--test/vfd.c2
18 files changed, 377 insertions, 149 deletions
diff --git a/test/dangle.c b/test/dangle.c
index a08941c..b08a5e6 100644
--- a/test/dangle.c
+++ b/test/dangle.c
@@ -456,7 +456,7 @@ test_dangle_attribute(H5F_close_degree_t degree)
TEST_ERROR;
/* Create an attribute on the dataset */
- if((aid = H5Acreate2(dsid, ".", ATTRNAME, H5T_NATIVE_INT, sid, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0)
+ if((aid = H5Acreate2(dsid, ATTRNAME, H5T_NATIVE_INT, sid, H5P_DEFAULT, H5P_DEFAULT)) < 0)
TEST_ERROR;
/* Don't worry about writing the attribute - it will have a fill value */
@@ -467,7 +467,7 @@ test_dangle_attribute(H5F_close_degree_t degree)
/* Try creating duplicate attribute */
H5E_BEGIN_TRY {
- if((aid = H5Acreate2(dsid, ".", ATTRNAME, H5T_NATIVE_INT, sid, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) >= 0)
+ if((aid = H5Acreate2(dsid, ATTRNAME, H5T_NATIVE_INT, sid, H5P_DEFAULT, H5P_DEFAULT)) >= 0)
TEST_ERROR;
} H5E_END_TRY;
diff --git a/test/dtypes.c b/test/dtypes.c
index bf98761..ea56056 100644
--- a/test/dtypes.c
+++ b/test/dtypes.c
@@ -2475,7 +2475,7 @@ test_transient (hid_t fapl)
/* It should not be possible to create an attribute for a transient type */
H5E_BEGIN_TRY {
- status = H5Acreate2(type, ".", "attr1", H5T_NATIVE_INT, space, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
+ status = H5Acreate2(type, "attr1", H5T_NATIVE_INT, space, H5P_DEFAULT, H5P_DEFAULT);
} H5E_END_TRY;
if (status>=0) {
H5_FAILED();
@@ -2622,8 +2622,8 @@ test_named (hid_t fapl)
}
/* It should be possible to define an attribute for the named type */
- if((attr1 = H5Acreate2(type, ".", "attr1", H5T_NATIVE_UCHAR, space,
- H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) goto error;
+ if((attr1 = H5Acreate2(type, "attr1", H5T_NATIVE_UCHAR, space,
+ 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 5850f04..c4bb9e8 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 = H5Acreate2(gid, ".", ATTR1, tid, sid, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
+ aid = H5Acreate2(gid, ATTR1, tid, sid, 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 = H5Acreate2(gid, ".", ATTR2, tid, sid, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
+ aid = H5Acreate2(gid, ATTR2, tid, sid, 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 = H5Acreate2(gid, ".", ATTR3, tid, sid, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
+ aid = H5Acreate2(gid, ATTR3, tid, sid, 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 = H5Acreate2(gid, ".", ATTR2, tid, sid, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
+ aid = H5Acreate2(gid, ATTR2, tid, sid, 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 = H5Acreate2(gid, ".", ATTR2, tid, sid, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
+ aid = H5Acreate2(gid, ATTR2, tid, sid, H5P_DEFAULT, H5P_DEFAULT);
assert(aid > 0);
/* Close dataspace */
diff --git a/test/gen_nullspace.c b/test/gen_nullspace.c
index 1c422df..8349a5c 100644
--- a/test/gen_nullspace.c
+++ b/test/gen_nullspace.c
@@ -63,7 +63,7 @@ main(void)
assert(gid > 0);
/* Create an attribute for the group */
- attr = H5Acreate2(gid, ".", NULLATTR, H5T_NATIVE_INT, sid, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
+ attr = H5Acreate2(gid, NULLATTR, H5T_NATIVE_INT, sid, H5P_DEFAULT, H5P_DEFAULT);
assert(attr > 0);
/* Close attribute */
diff --git a/test/links.c b/test/links.c
index e99dd37..1675d44 100644
--- a/test/links.c
+++ b/test/links.c
@@ -8612,7 +8612,7 @@ object_info(hid_t fapl)
sprintf(attrname, "attr %02u", v);
/* Create attribute */
- if((attr_id = H5Acreate2(group_id2, ".", attrname, H5T_NATIVE_INT, space_id, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) TEST_ERROR
+ if((attr_id = H5Acreate2(group_id2, attrname, H5T_NATIVE_INT, space_id, H5P_DEFAULT, H5P_DEFAULT)) < 0) TEST_ERROR
/* Close attribute */
if(H5Aclose(attr_id) < 0) TEST_ERROR
@@ -8660,7 +8660,7 @@ object_info(hid_t fapl)
sprintf(attrname, "attr %02u", v);
/* Create attribute */
- if((attr_id = H5Acreate2(group_id2, ".", attrname, H5T_NATIVE_INT, space_id, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) TEST_ERROR
+ if((attr_id = H5Acreate2(group_id2, attrname, H5T_NATIVE_INT, space_id, H5P_DEFAULT, H5P_DEFAULT)) < 0) TEST_ERROR
/* Close attribute */
if(H5Aclose(attr_id) < 0) TEST_ERROR
@@ -8809,7 +8809,7 @@ object_info_old(hid_t fapl)
sprintf(attrname, "attr %02u", v);
/* Create attribute */
- if((attr_id = H5Acreate2(group_id2, ".", attrname, H5T_NATIVE_INT, space_id, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) TEST_ERROR
+ if((attr_id = H5Acreate2(group_id2, attrname, H5T_NATIVE_INT, space_id, 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 bea0c11..fa6a6e2 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 = H5Acreate2(loc_id, ".", "obj_ref_attr", H5T_STD_REF_OBJ, sid_ref, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) TEST_ERROR
+ if((aid = H5Acreate2(loc_id, "obj_ref_attr", H5T_STD_REF_OBJ, sid_ref, 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 = H5Acreate2(loc_id, ".", "reg_ref_attr", H5T_STD_REF_DSETREG, spacer_id, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) TEST_ERROR
+ if((aid = H5Acreate2(loc_id, "reg_ref_attr", H5T_STD_REF_DSETREG, spacer_id, 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 = H5Acreate2(dsetv_id, ".", "reg_ref_attr", H5T_STD_REF_DSETREG, spacer_id, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) TEST_ERROR
+ if((aid = H5Acreate2(dsetv_id, "reg_ref_attr", H5T_STD_REF_DSETREG, spacer_id, 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 = H5Acreate2(loc_id, ".", "vlen attribute", tid, sid, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0)
+ if((aid = H5Acreate2(loc_id, "vlen attribute", tid, sid, 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 = H5Acreate2(loc_id, ".", attr_name, type_id, sid, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0)
+ if((aid = H5Acreate2(loc_id, attr_name, type_id, sid, 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 = H5Acreate2(loc_id, ".", attr_name, type_id, sid, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) goto done;
+ if((aid = H5Acreate2(loc_id, attr_name, type_id, sid, 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 = H5Acreate2(loc_id2, ".", attr_name, type_id, sid, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) goto done;
+ if((aid = H5Acreate2(loc_id2, attr_name, type_id, sid, 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 eeab056..583fd64 100755
--- a/test/reserved.c
+++ b/test/reserved.c
@@ -200,7 +200,7 @@ rsrv_ohdr(void)
sprintf(attrname, "attr %d", i);
H5E_BEGIN_TRY{
aid = H5Screate_simple(2, dims, NULL);
- attr_id = H5Acreate2(dataset_id, ".", attrname, H5T_STD_I32BE, aid, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
+ attr_id = H5Acreate2(dataset_id, attrname, H5T_STD_I32BE, aid, 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 cb93300..124d4a7 100644
--- a/test/tattr.c
+++ b/test/tattr.c
@@ -192,7 +192,7 @@ test_attr_basic_write(hid_t fapl)
/* Try to create an attribute on the file (should create an attribute on root group) */
- attr = H5Acreate2(fid1, ".", ATTR1_NAME, H5T_NATIVE_INT, sid2, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
+ attr = H5Acreate2(fid1, ATTR1_NAME, H5T_NATIVE_INT, sid2, H5P_DEFAULT, H5P_DEFAULT);
CHECK(attr, FAIL, "H5Acreate2");
/* Close attribute */
@@ -217,11 +217,11 @@ test_attr_basic_write(hid_t fapl)
/* Create an attribute for the dataset */
- attr = H5Acreate2(dataset, ".", ATTR1_NAME, H5T_NATIVE_INT, sid2, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
+ attr = H5Acreate2(dataset, ATTR1_NAME, H5T_NATIVE_INT, sid2, H5P_DEFAULT, H5P_DEFAULT);
CHECK(attr, FAIL, "H5Acreate2");
/* Try to create the same attribute again (should fail) */
- ret = H5Acreate2(dataset, ".", ATTR1_NAME, H5T_NATIVE_INT, sid2, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
+ ret = H5Acreate2(dataset, ATTR1_NAME, H5T_NATIVE_INT, sid2, H5P_DEFAULT, H5P_DEFAULT);
VERIFY(ret, FAIL, "H5Acreate2");
/* Write attribute information */
@@ -229,7 +229,7 @@ test_attr_basic_write(hid_t fapl)
CHECK(ret, FAIL, "H5Awrite");
/* Create an another attribute for the dataset */
- attr2 = H5Acreate2(dataset, ".", ATTR1A_NAME, H5T_NATIVE_INT, sid2, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
+ attr2 = H5Acreate2(dataset, ATTR1A_NAME, H5T_NATIVE_INT, sid2, H5P_DEFAULT, H5P_DEFAULT);
CHECK(attr, FAIL, "H5Acreate2");
/* Write attribute information */
@@ -343,7 +343,7 @@ test_attr_basic_write(hid_t fapl)
CHECK(sid2, FAIL, "H5Screate_simple");
/* Create an attribute for the group */
- attr = H5Acreate2(group, ".", ATTR2_NAME, H5T_NATIVE_INT, sid2, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
+ attr = H5Acreate2(group, ATTR2_NAME, H5T_NATIVE_INT, sid2, H5P_DEFAULT, H5P_DEFAULT);
CHECK(attr, FAIL, "H5Acreate2");
/* Check storage size for attribute */
@@ -351,7 +351,7 @@ test_attr_basic_write(hid_t fapl)
VERIFY(attr_size, (ATTR2_DIM1 * ATTR2_DIM2 * sizeof(int)), "H5Aget_storage_size");
/* Try to create the same attribute again (should fail) */
- ret = H5Acreate2(group, ".", ATTR2_NAME, H5T_NATIVE_INT, sid2, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
+ ret = H5Acreate2(group, ATTR2_NAME, H5T_NATIVE_INT, sid2, H5P_DEFAULT, H5P_DEFAULT);
VERIFY(ret, FAIL, "H5Acreate2");
/* Write attribute information */
@@ -500,7 +500,7 @@ test_attr_flush(hid_t fapl)
set = H5Dcreate2(fil, DSET1_NAME, H5T_NATIVE_DOUBLE, spc, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
CHECK(set, FAIL, "H5Dcreate2");
- att = H5Acreate2(set, ".", ATTR1_NAME, H5T_NATIVE_DOUBLE, spc, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
+ att = H5Acreate2(set, ATTR1_NAME, H5T_NATIVE_DOUBLE, spc, H5P_DEFAULT, H5P_DEFAULT);
CHECK(att, FAIL, "H5Acreate2");
ret=H5Aread(att, H5T_NATIVE_DOUBLE, &rdata);
@@ -585,7 +585,7 @@ 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 = H5Acreate2(dataset, ".", ATTR1_NAME, H5T_NATIVE_INT, sid2, plist, H5P_DEFAULT, H5P_DEFAULT);
+ attr = H5Acreate2(dataset, ATTR1_NAME, H5T_NATIVE_INT, sid2, plist, H5P_DEFAULT);
CHECK(attr, FAIL, "H5Acreate2");
/* Close the property list, and get the attribute's property list */
@@ -617,7 +617,7 @@ 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 = H5Acreate2(dataset, ".", ATTR2_NAME, H5T_NATIVE_INT, sid2, plist, H5P_DEFAULT, H5P_DEFAULT);
+ attr = H5Acreate2(dataset, ATTR2_NAME, H5T_NATIVE_INT, sid2, plist, H5P_DEFAULT);
CHECK(attr, FAIL, "H5Acreate2");
/* Close the property list and attribute */
@@ -706,11 +706,11 @@ test_attr_compound_write(hid_t fapl)
CHECK(sid2, FAIL, "H5Screate_simple");
/* Create complex attribute for the dataset */
- attr = H5Acreate2(dataset, ".", ATTR4_NAME, tid1, sid2, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
+ attr = H5Acreate2(dataset, ATTR4_NAME, tid1, sid2, H5P_DEFAULT, H5P_DEFAULT);
CHECK(attr, FAIL, "H5Acreate2");
/* Try to create the same attribute again (should fail) */
- ret = H5Acreate2(dataset, ".", ATTR4_NAME, tid1, sid2, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
+ ret = H5Acreate2(dataset, ATTR4_NAME, tid1, sid2, H5P_DEFAULT, H5P_DEFAULT);
VERIFY(ret, FAIL, "H5Acreate2");
/* Write complex attribute data */
@@ -924,11 +924,11 @@ test_attr_scalar_write(hid_t fapl)
CHECK(sid2, FAIL, "H5Screate_simple");
/* Create an attribute for the dataset */
- attr = H5Acreate2(dataset, ".", ATTR5_NAME, H5T_NATIVE_FLOAT, sid2, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
+ attr = H5Acreate2(dataset, ATTR5_NAME, H5T_NATIVE_FLOAT, sid2, H5P_DEFAULT, H5P_DEFAULT);
CHECK(attr, FAIL, "H5Acreate2");
/* Try to create the same attribute again (should fail) */
- ret = H5Acreate2(dataset, ".", ATTR5_NAME, H5T_NATIVE_FLOAT, sid2, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
+ ret = H5Acreate2(dataset, ATTR5_NAME, H5T_NATIVE_FLOAT, sid2, H5P_DEFAULT, H5P_DEFAULT);
VERIFY(ret, FAIL, "H5Acreate2");
/* Write attribute information */
@@ -1068,11 +1068,11 @@ test_attr_mult_write(hid_t fapl)
CHECK(sid2, FAIL, "H5Screate_simple");
/* Create 1st attribute for the dataset */
- attr = H5Acreate2(dataset, ".", ATTR1_NAME, H5T_NATIVE_INT, sid2, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
+ attr = H5Acreate2(dataset, ATTR1_NAME, H5T_NATIVE_INT, sid2, H5P_DEFAULT, H5P_DEFAULT);
CHECK(attr, FAIL, "H5Acreate2");
/* Try to create the same attribute again (should fail) */
- ret = H5Acreate2(dataset, ".", ATTR1_NAME, H5T_NATIVE_INT, sid2, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
+ ret = H5Acreate2(dataset, ATTR1_NAME, H5T_NATIVE_INT, sid2, H5P_DEFAULT, H5P_DEFAULT);
VERIFY(ret, FAIL, "H5Acreate2");
/* Write 1st attribute data */
@@ -1092,11 +1092,11 @@ test_attr_mult_write(hid_t fapl)
CHECK(sid2, FAIL, "H5Screate_simple");
/* Create 2nd attribute for the dataset */
- attr = H5Acreate2(dataset, ".", ATTR2_NAME, H5T_NATIVE_INT, sid2, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
+ attr = H5Acreate2(dataset, ATTR2_NAME, H5T_NATIVE_INT, sid2, H5P_DEFAULT, H5P_DEFAULT);
CHECK(attr, FAIL, "H5Acreate2");
/* Try to create the same attribute again (should fail) */
- ret = H5Acreate2(dataset, ".", ATTR2_NAME, H5T_NATIVE_INT, sid2, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
+ ret = H5Acreate2(dataset, ATTR2_NAME, H5T_NATIVE_INT, sid2, H5P_DEFAULT, H5P_DEFAULT);
VERIFY(ret, FAIL, "H5Acreate2");
/* Write 2nd attribute information */
@@ -1116,11 +1116,11 @@ test_attr_mult_write(hid_t fapl)
CHECK(sid2, FAIL, "H5Screate_simple");
/* Create 3rd attribute for the dataset */
- attr = H5Acreate2(dataset, ".", ATTR3_NAME, H5T_NATIVE_DOUBLE, sid2, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
+ attr = H5Acreate2(dataset, ATTR3_NAME, H5T_NATIVE_DOUBLE, sid2, H5P_DEFAULT, H5P_DEFAULT);
CHECK(attr, FAIL, "H5Acreate2");
/* Try to create the same attribute again (should fail) */
- ret = H5Acreate2(dataset, ".", ATTR3_NAME, H5T_NATIVE_DOUBLE, sid2, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
+ ret = H5Acreate2(dataset, ATTR3_NAME, H5T_NATIVE_DOUBLE, sid2, H5P_DEFAULT, H5P_DEFAULT);
VERIFY(ret, FAIL, "H5Acreate2");
/* Write 3rd attribute information */
@@ -1668,7 +1668,7 @@ test_attr_dtype_shared(hid_t fapl)
VERIFY(oinfo.rc, 2, "H5Oget_info");
/* Create attribute on dataset */
- attr_id = H5Acreate2(dset_id, ".", ATTR1_NAME, type_id, space_id, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
+ 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 */
@@ -1690,7 +1690,7 @@ test_attr_dtype_shared(hid_t fapl)
VERIFY(oinfo.rc, 2, "H5Adelete2");
/* Create attribute on dataset */
- attr_id = H5Acreate2(dset_id, ".", ATTR1_NAME, type_id, space_id, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
+ 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 */
@@ -1917,7 +1917,7 @@ 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 = H5Acreate2(dataset, ".", attrname, H5T_NATIVE_UINT, sid, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
+ attr = H5Acreate2(dataset, attrname, H5T_NATIVE_UINT, sid, H5P_DEFAULT, H5P_DEFAULT);
CHECK(attr, FAIL, "H5Acreate2");
/* Write data into the attribute */
@@ -1936,7 +1936,7 @@ 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 = H5Acreate2(dataset, ".", attrname, H5T_NATIVE_UINT, sid, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
+ attr = H5Acreate2(dataset, attrname, H5T_NATIVE_UINT, sid, H5P_DEFAULT, H5P_DEFAULT);
CHECK(attr, FAIL, "H5Acreate2");
/* Check on dataset's attribute storage status */
@@ -1952,7 +1952,7 @@ test_attr_dense_create(hid_t fcpl, hid_t fapl)
CHECK(ret, FAIL, "H5Aclose");
/* Attempt to add attribute again, which should fail */
- attr = H5Acreate2(dataset, ".", attrname, H5T_NATIVE_UINT, sid, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
+ attr = H5Acreate2(dataset, attrname, H5T_NATIVE_UINT, sid, H5P_DEFAULT, H5P_DEFAULT);
VERIFY(attr, FAIL, "H5Acreate2");
/* Close dataspace */
@@ -2052,7 +2052,7 @@ 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 = H5Acreate2(dataset, ".", attrname, H5T_NATIVE_UINT, sid, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
+ attr = H5Acreate2(dataset, attrname, H5T_NATIVE_UINT, sid, H5P_DEFAULT, H5P_DEFAULT);
CHECK(attr, FAIL, "H5Acreate2");
/* Write data into the attribute */
@@ -2075,7 +2075,7 @@ 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 = H5Acreate2(dataset, ".", attrname, H5T_NATIVE_UINT, sid, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
+ attr = H5Acreate2(dataset, attrname, H5T_NATIVE_UINT, sid, H5P_DEFAULT, H5P_DEFAULT);
CHECK(attr, FAIL, "H5Acreate2");
/* Check on dataset's attribute storage status */
@@ -2192,7 +2192,7 @@ 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 = H5Acreate2(dataset, ".", attrname, H5T_NATIVE_UINT, sid, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
+ attr = H5Acreate2(dataset, attrname, H5T_NATIVE_UINT, sid, H5P_DEFAULT, H5P_DEFAULT);
CHECK(attr, FAIL, "H5Acreate2");
/* Write data into the attribute */
@@ -2367,7 +2367,7 @@ 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 = H5Acreate2(dataset, ".", attrname, H5T_NATIVE_UINT, sid, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
+ attr = H5Acreate2(dataset, attrname, H5T_NATIVE_UINT, sid, H5P_DEFAULT, H5P_DEFAULT);
CHECK(attr, FAIL, "H5Acreate2");
/* Write data into the attribute */
@@ -2526,7 +2526,7 @@ 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 = H5Acreate2(dataset, ".", attrname, H5T_NATIVE_UINT, sid, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
+ attr = H5Acreate2(dataset, attrname, H5T_NATIVE_UINT, sid, H5P_DEFAULT, H5P_DEFAULT);
CHECK(attr, FAIL, "H5Acreate2");
/* Write data into the attribute */
@@ -2665,7 +2665,7 @@ test_attr_dense_limits(hid_t fcpl, hid_t fapl)
/* Create attribute */
u = 0;
sprintf(attrname, "attr %02u", u);
- attr = H5Acreate2(dataset, ".", attrname, H5T_NATIVE_UINT, sid, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
+ attr = H5Acreate2(dataset, attrname, H5T_NATIVE_UINT, sid, H5P_DEFAULT, H5P_DEFAULT);
CHECK(attr, FAIL, "H5Acreate2");
/* Write data into the attribute */
@@ -2686,7 +2686,7 @@ test_attr_dense_limits(hid_t fcpl, hid_t fapl)
/* Create attribute */
u = 1;
sprintf(attrname, "attr %02u", u);
- attr = H5Acreate2(dataset, ".", attrname, H5T_NATIVE_UINT, sid, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
+ attr = H5Acreate2(dataset, attrname, H5T_NATIVE_UINT, sid, H5P_DEFAULT, H5P_DEFAULT);
CHECK(attr, FAIL, "H5Acreate2");
/* Write data into the attribute */
@@ -2841,7 +2841,7 @@ test_attr_big(hid_t fcpl, hid_t fapl)
/* Create attribute */
u = 0;
sprintf(attrname, "attr %02u", u);
- attr = H5Acreate2(dataset, ".", attrname, H5T_NATIVE_UINT, sid, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
+ attr = H5Acreate2(dataset, attrname, H5T_NATIVE_UINT, sid, H5P_DEFAULT, H5P_DEFAULT);
CHECK(attr, FAIL, "H5Acreate2");
/* Close attribute */
@@ -2860,7 +2860,7 @@ test_attr_big(hid_t fcpl, hid_t fapl)
/* Create attribute */
u = 1;
sprintf(attrname, "attr %02u", u);
- attr = H5Acreate2(dataset, ".", attrname, H5T_NATIVE_UINT, sid, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
+ attr = H5Acreate2(dataset, attrname, H5T_NATIVE_UINT, sid, H5P_DEFAULT, H5P_DEFAULT);
CHECK(attr, FAIL, "H5Acreate2");
/* Close attribute */
@@ -2879,7 +2879,7 @@ test_attr_big(hid_t fcpl, hid_t fapl)
/* Create attribute */
u = 2;
sprintf(attrname, "attr %02u", u);
- attr = H5Acreate2(dataset, ".", attrname, H5T_NATIVE_UINT, big_sid, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
+ attr = H5Acreate2(dataset, attrname, H5T_NATIVE_UINT, big_sid, H5P_DEFAULT, H5P_DEFAULT);
if(latest_format) {
CHECK(attr, FAIL, "H5Acreate2");
@@ -2903,7 +2903,7 @@ test_attr_big(hid_t fcpl, hid_t fapl)
/* Create attribute */
u = 3;
sprintf(attrname, "attr %02u", u);
- attr = H5Acreate2(dataset, ".", attrname, H5T_NATIVE_UINT, big_sid, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
+ attr = H5Acreate2(dataset, attrname, H5T_NATIVE_UINT, big_sid, H5P_DEFAULT, H5P_DEFAULT);
CHECK(attr, FAIL, "H5Acreate2");
/* Close attribute */
@@ -3079,7 +3079,7 @@ test_attr_null_space(hid_t fcpl, hid_t fapl)
/* Create attribute */
HDstrcpy(attrname, "null attr");
- attr = H5Acreate2(dataset, ".", attrname, H5T_NATIVE_UINT, null_sid, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
+ attr = H5Acreate2(dataset, attrname, H5T_NATIVE_UINT, null_sid, H5P_DEFAULT, H5P_DEFAULT);
CHECK(attr, FAIL, "H5Acreate2");
/* Try to read data from the attribute */
@@ -3120,7 +3120,7 @@ test_attr_null_space(hid_t fcpl, hid_t fapl)
/* Create attribute */
HDstrcpy(attrname, "null attr #2");
- attr = H5Acreate2(dataset, ".", attrname, H5T_NATIVE_UINT, null_sid, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
+ attr = H5Acreate2(dataset, attrname, H5T_NATIVE_UINT, null_sid, H5P_DEFAULT, H5P_DEFAULT);
CHECK(attr, FAIL, "H5Acreate2");
/* Try to write data to the attribute */
@@ -3381,7 +3381,7 @@ test_attr_many(hid_t fcpl, hid_t fapl)
for(u = 0; u < NATTR_MANY; u++) {
sprintf(attrname, "a-%06u", u);
- aid = H5Acreate2(fid, ".", attrname, H5T_NATIVE_UINT, sid, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
+ aid = H5Acreate2(fid, attrname, H5T_NATIVE_UINT, sid, H5P_DEFAULT, H5P_DEFAULT);
CHECK(aid, FAIL, "H5Acreate2");
ret = H5Awrite(aid, H5T_NATIVE_UINT, &u);
@@ -3631,7 +3631,7 @@ 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 = H5Acreate2(my_dataset, ".", attrname, H5T_NATIVE_UINT, sid, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
+ attr = H5Acreate2(my_dataset, attrname, H5T_NATIVE_UINT, sid, H5P_DEFAULT, H5P_DEFAULT);
CHECK(attr, FAIL, "H5Acreate2");
/* Write data into the attribute */
@@ -3831,7 +3831,7 @@ 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 = H5Acreate2(my_dataset, ".", attrname, H5T_NATIVE_UINT, sid, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
+ attr = H5Acreate2(my_dataset, attrname, H5T_NATIVE_UINT, sid, H5P_DEFAULT, H5P_DEFAULT);
CHECK(attr, FAIL, "H5Acreate2");
/* Write data into the attribute */
@@ -3854,7 +3854,7 @@ 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 = H5Acreate2(my_dataset, ".", attrname, H5T_NATIVE_UINT, sid, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
+ attr = H5Acreate2(my_dataset, attrname, H5T_NATIVE_UINT, sid, H5P_DEFAULT, H5P_DEFAULT);
CHECK(attr, FAIL, "H5Acreate2");
/* Write data into the attribute */
@@ -4009,7 +4009,7 @@ test_attr_corder_create_reopen(hid_t fcpl, hid_t fapl)
CHECK(gid, FAIL, "H5Gcreate2");
/* Create a couple of attributes */
- aid = H5Acreate2(gid, ".", "attr-003", H5T_NATIVE_INT, sid, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
+ aid = H5Acreate2(gid, "attr-003", H5T_NATIVE_INT, sid, H5P_DEFAULT, H5P_DEFAULT);
CHECK(aid, FAIL, "H5Acreate2");
buf = 3;
ret = H5Awrite(aid, H5T_NATIVE_INT, &buf);
@@ -4017,7 +4017,7 @@ test_attr_corder_create_reopen(hid_t fcpl, hid_t fapl)
ret = H5Aclose(aid);
CHECK(ret, FAIL, "H5Aclose");
- aid = H5Acreate2(gid, ".", "attr-004", H5T_NATIVE_INT, sid, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
+ aid = H5Acreate2(gid, "attr-004", H5T_NATIVE_INT, sid, H5P_DEFAULT, H5P_DEFAULT);
CHECK(aid, FAIL, "H5Acreate2");
buf = 4;
ret = H5Awrite(aid, H5T_NATIVE_INT, &buf);
@@ -4049,7 +4049,7 @@ test_attr_corder_create_reopen(hid_t fcpl, hid_t fapl)
CHECK(aid, FAIL, "H5Adelete2");
/* Create some additional attributes */
- aid = H5Acreate2(gid, ".", "attr-008", H5T_NATIVE_INT, sid, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
+ aid = H5Acreate2(gid, "attr-008", H5T_NATIVE_INT, sid, H5P_DEFAULT, H5P_DEFAULT);
CHECK(aid, FAIL, "H5Acreate2");
buf = 8;
ret = H5Awrite(aid, H5T_NATIVE_INT, &buf);
@@ -4057,7 +4057,7 @@ test_attr_corder_create_reopen(hid_t fcpl, hid_t fapl)
ret = H5Aclose(aid);
CHECK(ret, FAIL, "H5Aclose");
- aid = H5Acreate2(gid, ".", "attr-006", H5T_NATIVE_INT, sid, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
+ aid = H5Acreate2(gid, "attr-006", H5T_NATIVE_INT, sid, H5P_DEFAULT, H5P_DEFAULT);
CHECK(aid, FAIL, "H5Acreate2");
buf = 6;
ret = H5Awrite(aid, H5T_NATIVE_INT, &buf);
@@ -4219,7 +4219,7 @@ 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 = H5Acreate2(my_dataset, ".", attrname, H5T_NATIVE_UINT, sid, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
+ attr = H5Acreate2(my_dataset, attrname, H5T_NATIVE_UINT, sid, H5P_DEFAULT, H5P_DEFAULT);
CHECK(attr, FAIL, "H5Acreate2");
/* Write data into the attribute */
@@ -4242,7 +4242,7 @@ 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 = H5Acreate2(my_dataset, ".", attrname, H5T_NATIVE_UINT, sid, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
+ attr = H5Acreate2(my_dataset, attrname, H5T_NATIVE_UINT, sid, H5P_DEFAULT, H5P_DEFAULT);
CHECK(attr, FAIL, "H5Acreate2");
/* Write data into the attribute */
@@ -4306,7 +4306,7 @@ 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 = H5Acreate2(my_dataset, ".", attrname, H5T_NATIVE_UINT, sid, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
+ attr = H5Acreate2(my_dataset, attrname, H5T_NATIVE_UINT, sid, H5P_DEFAULT, H5P_DEFAULT);
CHECK(attr, FAIL, "H5Acreate2");
/* Write data into the attribute */
@@ -4430,7 +4430,7 @@ 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 = H5Acreate2(my_dataset, ".", attrname, H5T_NATIVE_UINT, sid, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
+ attr = H5Acreate2(my_dataset, attrname, H5T_NATIVE_UINT, sid, H5P_DEFAULT, H5P_DEFAULT);
CHECK(attr, FAIL, "H5Acreate2");
/* Write data into the attribute */
@@ -4600,7 +4600,7 @@ 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 = H5Acreate2(my_dataset, ".", attrname, H5T_NATIVE_UINT, sid, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
+ attr = H5Acreate2(my_dataset, attrname, H5T_NATIVE_UINT, sid, H5P_DEFAULT, H5P_DEFAULT);
CHECK(attr, FAIL, "H5Acreate2");
/* Write data into the attribute */
@@ -4936,7 +4936,7 @@ 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 = H5Acreate2(my_dataset, ".", attrname, H5T_NATIVE_UINT, sid, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
+ attr = H5Acreate2(my_dataset, attrname, H5T_NATIVE_UINT, sid, H5P_DEFAULT, H5P_DEFAULT);
CHECK(attr, FAIL, "H5Acreate2");
/* Write data into the attribute */
@@ -4973,7 +4973,7 @@ 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 = H5Acreate2(my_dataset, ".", attrname, H5T_NATIVE_UINT, sid, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
+ attr = H5Acreate2(my_dataset, attrname, H5T_NATIVE_UINT, sid, H5P_DEFAULT, H5P_DEFAULT);
CHECK(attr, FAIL, "H5Acreate2");
/* Write data into the attribute */
@@ -5174,7 +5174,7 @@ 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 = H5Acreate2(my_dataset, ".", attrname, H5T_NATIVE_UINT, sid, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
+ attr = H5Acreate2(my_dataset, attrname, H5T_NATIVE_UINT, sid, H5P_DEFAULT, H5P_DEFAULT);
CHECK(attr, FAIL, "H5Acreate2");
/* Write data into the attribute */
@@ -5284,7 +5284,7 @@ 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 = H5Acreate2(my_dataset, ".", attrname, H5T_NATIVE_UINT, sid, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
+ attr = H5Acreate2(my_dataset, attrname, H5T_NATIVE_UINT, sid, H5P_DEFAULT, H5P_DEFAULT);
CHECK(attr, FAIL, "H5Acreate2");
/* Write data into the attribute */
@@ -5417,7 +5417,7 @@ 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 = H5Acreate2(my_dataset, ".", attrname, H5T_NATIVE_UINT, sid, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
+ attr = H5Acreate2(my_dataset, attrname, H5T_NATIVE_UINT, sid, H5P_DEFAULT, H5P_DEFAULT);
CHECK(attr, FAIL, "H5Acreate2");
/* Write data into the attribute */
@@ -5991,7 +5991,7 @@ 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 = H5Acreate2(my_dataset, ".", attrname, H5T_NATIVE_UINT, sid, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
+ attr = H5Acreate2(my_dataset, attrname, H5T_NATIVE_UINT, sid, H5P_DEFAULT, H5P_DEFAULT);
CHECK(attr, FAIL, "H5Acreate2");
/* Write data into the attribute */
@@ -6050,7 +6050,7 @@ 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 = H5Acreate2(my_dataset, ".", attrname, H5T_NATIVE_UINT, sid, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
+ attr = H5Acreate2(my_dataset, attrname, H5T_NATIVE_UINT, sid, H5P_DEFAULT, H5P_DEFAULT);
CHECK(attr, FAIL, "H5Acreate2");
/* Write data into the attribute */
@@ -6317,7 +6317,7 @@ 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 = H5Acreate2(my_dataset, ".", attrname, H5T_NATIVE_UINT, sid, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
+ attr = H5Acreate2(my_dataset, attrname, H5T_NATIVE_UINT, sid, H5P_DEFAULT, H5P_DEFAULT);
CHECK(attr, FAIL, "H5Acreate2");
/* Write data into the attribute */
@@ -6375,7 +6375,7 @@ 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 = H5Acreate2(my_dataset, ".", attrname, H5T_NATIVE_UINT, sid, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
+ attr = H5Acreate2(my_dataset, attrname, H5T_NATIVE_UINT, sid, H5P_DEFAULT, H5P_DEFAULT);
CHECK(attr, FAIL, "H5Acreate2");
/* Write data into the attribute */
@@ -6536,12 +6536,12 @@ attr_open_check(hid_t fid, const char *dsetname, hid_t obj_id, unsigned max_attr
/****************************************************************
**
-** test_attr_open(): Test basic H5A (attribute) code.
+** test_attr_open_by_name(): Test basic H5A (attribute) code.
** Tests opening attributes by name
**
****************************************************************/
static void
-test_attr_open(hbool_t new_format, hid_t fcpl, hid_t fapl)
+test_attr_open_by_name(hbool_t new_format, hid_t fcpl, hid_t fapl)
{
hid_t fid; /* HDF5 File ID */
hid_t dset1, dset2, dset3; /* Dataset IDs */
@@ -6643,7 +6643,7 @@ 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 = H5Acreate2(my_dataset, ".", attrname, H5T_NATIVE_UINT, sid, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
+ attr = H5Acreate2(my_dataset, attrname, H5T_NATIVE_UINT, sid, H5P_DEFAULT, H5P_DEFAULT);
CHECK(attr, FAIL, "H5Acreate2");
/* Write data into the attribute */
@@ -6710,7 +6710,7 @@ 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 = H5Acreate2(my_dataset, ".", attrname, H5T_NATIVE_UINT, sid, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
+ attr = H5Acreate2(my_dataset, attrname, H5T_NATIVE_UINT, sid, H5P_DEFAULT, H5P_DEFAULT);
CHECK(attr, FAIL, "H5Acreate2");
/* Write data into the attribute */
@@ -6785,7 +6785,231 @@ test_attr_open(hbool_t new_format, hid_t fcpl, hid_t fapl)
/* Close dataspace */
ret = H5Sclose(sid);
CHECK(ret, FAIL, "H5Sclose");
-} /* test_attr_open() */
+} /* test_attr_open_by_name() */
+
+
+/****************************************************************
+**
+** test_attr_create_by_name(): Test basic H5A (attribute) code.
+** Tests creating attributes by name
+**
+****************************************************************/
+static void
+test_attr_create_by_name(hbool_t new_format, hid_t fcpl, hid_t fapl)
+{
+ hid_t fid; /* HDF5 File ID */
+ hid_t dset1, dset2, dset3; /* Dataset IDs */
+ hid_t my_dataset; /* Current dataset ID */
+ hid_t sid; /* Dataspace ID */
+ hid_t attr; /* Attribute ID */
+ hid_t dcpl; /* Dataset creation property list ID */
+ unsigned max_compact; /* Maximum # of links to store in group compactly */
+ unsigned min_dense; /* Minimum # of links to store in group "densely" */
+ htri_t is_empty; /* Are there any attributes? */
+ htri_t is_dense; /* Are attributes stored densely? */
+ hsize_t nattrs; /* Number of attributes on object */
+ hsize_t name_count; /* # of records in name index */
+ hsize_t corder_count; /* # of records in creation order index */
+ hbool_t use_index; /* Use index on creation order values */
+ const char *dsetname; /* Name of dataset for attributes */
+ char attrname[NAME_BUF_SIZE]; /* Name of attribute */
+ unsigned curr_dset; /* Current dataset to work on */
+ unsigned u; /* Local index variable */
+ herr_t ret; /* Generic return value */
+
+ /* Create dataspace for dataset & attributes */
+ sid = H5Screate(H5S_SCALAR);
+ CHECK(sid, FAIL, "H5Screate");
+
+ /* Create dataset creation property list */
+ dcpl = H5Pcreate(H5P_DATASET_CREATE);
+ CHECK(dcpl, FAIL, "H5Pcreate");
+
+ /* Query the attribute creation properties */
+ ret = H5Pget_attr_phase_change(dcpl, &max_compact, &min_dense);
+ CHECK(ret, FAIL, "H5Pget_attr_phase_change");
+
+ /* Loop over using index for creation order value */
+ for(use_index = FALSE; use_index <= TRUE; use_index++) {
+ /* Print appropriate test message */
+ if(use_index)
+ MESSAGE(5, ("Testing Creating Attributes By Name w/Creation Order Index\n"))
+ else
+ MESSAGE(5, ("Testing Creating Attributes By Name w/o Creation Order Index\n"))
+
+ /* Create file */
+ fid = H5Fcreate(FILENAME, H5F_ACC_TRUNC, fcpl, fapl);
+ CHECK(fid, FAIL, "H5Fcreate");
+
+ /* Set attribute creation order tracking & indexing for object */
+ if(new_format == TRUE) {
+ ret = H5Pset_attr_creation_order(dcpl, (H5P_CRT_ORDER_TRACKED | (use_index ? H5P_CRT_ORDER_INDEXED : (unsigned)0)));
+ CHECK(ret, FAIL, "H5Pset_attr_creation_order");
+ } /* end if */
+
+ /* Create datasets */
+ dset1 = H5Dcreate2(fid, DSET1_NAME, H5T_NATIVE_UCHAR, sid, H5P_DEFAULT, dcpl, H5P_DEFAULT);
+ CHECK(dset1, FAIL, "H5Dcreate2");
+ dset2 = H5Dcreate2(fid, DSET2_NAME, H5T_NATIVE_UCHAR, sid, H5P_DEFAULT, dcpl, H5P_DEFAULT);
+ CHECK(dset2, FAIL, "H5Dcreate2");
+ dset3 = H5Dcreate2(fid, DSET3_NAME, H5T_NATIVE_UCHAR, sid, H5P_DEFAULT, dcpl, H5P_DEFAULT);
+ CHECK(dset3, FAIL, "H5Dcreate2");
+
+ /* Work on all the datasets */
+ for(curr_dset = 0; curr_dset < NUM_DSETS; curr_dset++) {
+ switch(curr_dset) {
+ case 0:
+ my_dataset = dset1;
+ dsetname = DSET1_NAME;
+ break;
+
+ case 1:
+ my_dataset = dset2;
+ dsetname = DSET2_NAME;
+ break;
+
+ case 2:
+ my_dataset = dset3;
+ dsetname = DSET3_NAME;
+ break;
+
+ default:
+ HDassert(0 && "Too many datasets!");
+ } /* end switch */
+
+ /* Check on dataset's attribute storage status */
+ is_empty = H5O_is_attr_empty_test(my_dataset);
+ VERIFY(is_empty, TRUE, "H5O_is_attr_empty_test");
+ is_dense = H5O_is_attr_dense_test(my_dataset);
+ VERIFY(is_dense, FALSE, "H5O_is_attr_dense_test");
+
+ /* Create attributes, up to limit of compact form */
+ for(u = 0; u < max_compact; u++) {
+ /* Create attribute */
+ sprintf(attrname, "attr %02u", u);
+ attr = H5Acreate_by_name(fid, dsetname, attrname, H5T_NATIVE_UINT, sid, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
+ CHECK(attr, FAIL, "H5Acreate_by_name");
+
+ /* Write data into the attribute */
+ ret = H5Awrite(attr, H5T_NATIVE_UINT, &u);
+ CHECK(ret, FAIL, "H5Awrite");
+
+ /* Close attribute */
+ ret = H5Aclose(attr);
+ CHECK(ret, FAIL, "H5Aclose");
+
+ /* Verify information for new attribute */
+ ret = attr_info_by_idx_check(my_dataset, attrname, (hsize_t)u, use_index);
+ CHECK(ret, FAIL, "attr_info_by_idx_check");
+ } /* end for */
+
+ /* Verify state of object */
+ ret = H5O_num_attrs_test(my_dataset, &nattrs);
+ CHECK(ret, FAIL, "H5O_num_attrs_test");
+ VERIFY(nattrs, max_compact, "H5O_num_attrs_test");
+ is_empty = H5O_is_attr_empty_test(my_dataset);
+ VERIFY(is_empty, FALSE, "H5O_is_attr_empty_test");
+ is_dense = H5O_is_attr_dense_test(my_dataset);
+ VERIFY(is_dense, FALSE, "H5O_is_attr_dense_test");
+
+ /* Test opening attributes stored compactly */
+ ret = attr_open_check(fid, dsetname, my_dataset, u);
+ CHECK(ret, FAIL, "attr_open_check");
+ } /* end for */
+
+
+ /* Work on all the datasets */
+ for(curr_dset = 0; curr_dset < NUM_DSETS; curr_dset++) {
+ switch(curr_dset) {
+ case 0:
+ my_dataset = dset1;
+ dsetname = DSET1_NAME;
+ break;
+
+ case 1:
+ my_dataset = dset2;
+ dsetname = DSET2_NAME;
+ break;
+
+ case 2:
+ my_dataset = dset3;
+ dsetname = DSET3_NAME;
+ break;
+
+ default:
+ HDassert(0 && "Too many datasets!");
+ } /* end switch */
+
+ /* Create more attributes, to push into dense form */
+ for(u = max_compact; u < (max_compact * 2); u++) {
+ /* Create attribute */
+ sprintf(attrname, "attr %02u", u);
+ attr = H5Acreate_by_name(fid, dsetname, attrname, H5T_NATIVE_UINT, sid, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
+ CHECK(attr, FAIL, "H5Acreate_by_name");
+
+ /* Write data into the attribute */
+ ret = H5Awrite(attr, H5T_NATIVE_UINT, &u);
+ CHECK(ret, FAIL, "H5Awrite");
+
+ /* Close attribute */
+ ret = H5Aclose(attr);
+ CHECK(ret, FAIL, "H5Aclose");
+
+ /* Verify state of object */
+ if(u >= max_compact) {
+ is_dense = H5O_is_attr_dense_test(my_dataset);
+ VERIFY(is_dense, (new_format ? TRUE : FALSE), "H5O_is_attr_dense_test");
+ } /* end if */
+
+ /* Verify information for new attribute */
+ ret = attr_info_by_idx_check(my_dataset, attrname, (hsize_t)u, use_index);
+ CHECK(ret, FAIL, "attr_info_by_idx_check");
+ } /* end for */
+
+ /* Verify state of object */
+ ret = H5O_num_attrs_test(my_dataset, &nattrs);
+ CHECK(ret, FAIL, "H5O_num_attrs_test");
+ VERIFY(nattrs, (max_compact * 2), "H5O_num_attrs_test");
+ is_empty = H5O_is_attr_empty_test(my_dataset);
+ VERIFY(is_empty, FALSE, "H5O_is_attr_empty_test");
+ is_dense = H5O_is_attr_dense_test(my_dataset);
+ VERIFY(is_dense, (new_format ? TRUE : FALSE), "H5O_is_attr_dense_test");
+
+ if(new_format) {
+ /* Retrieve & verify # of records in the name & creation order indices */
+ ret = H5O_attr_dense_info_test(my_dataset, &name_count, &corder_count);
+ CHECK(ret, FAIL, "H5O_attr_dense_info_test");
+ if(use_index)
+ VERIFY(name_count, corder_count, "H5O_attr_dense_info_test");
+ VERIFY(name_count, (max_compact * 2), "H5O_attr_dense_info_test");
+ } /* end if */
+
+ /* Test opening attributes stored compactly */
+ ret = attr_open_check(fid, dsetname, my_dataset, u);
+ CHECK(ret, FAIL, "attr_open_check");
+ } /* end for */
+
+ /* Close Datasets */
+ ret = H5Dclose(dset1);
+ CHECK(ret, FAIL, "H5Dclose");
+ ret = H5Dclose(dset2);
+ CHECK(ret, FAIL, "H5Dclose");
+ ret = H5Dclose(dset3);
+ CHECK(ret, FAIL, "H5Dclose");
+
+ /* Close file */
+ ret = H5Fclose(fid);
+ CHECK(ret, FAIL, "H5Fclose");
+ } /* end for */
+
+ /* Close property list */
+ ret = H5Pclose(dcpl);
+ CHECK(ret, FAIL, "H5Pclose");
+
+ /* Close dataspace */
+ ret = H5Sclose(sid);
+ CHECK(ret, FAIL, "H5Sclose");
+} /* test_attr_create_by_name() */
/****************************************************************
**
@@ -6941,7 +7165,7 @@ test_attr_shared_write(hid_t fcpl, hid_t fapl)
/* Alternate between creating "small" & "big" attributes */
if(u % 2) {
/* Create "small" attribute on first dataset */
- attr = H5Acreate2(dataset, ".", attrname, attr_tid, sid, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
+ attr = H5Acreate2(dataset, attrname, attr_tid, sid, H5P_DEFAULT, H5P_DEFAULT);
CHECK(attr, FAIL, "H5Acreate2");
/* Check that attribute is not shared */
@@ -6955,7 +7179,7 @@ test_attr_shared_write(hid_t fcpl, hid_t fapl)
} /* end if */
else {
/* Create "big" attribute on first dataset */
- attr = H5Acreate2(dataset, ".", attrname, attr_tid, big_sid, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
+ attr = H5Acreate2(dataset, attrname, attr_tid, big_sid, H5P_DEFAULT, H5P_DEFAULT);
CHECK(attr, FAIL, "H5Acreate2");
/* Check that attribute is shared */
@@ -6993,7 +7217,7 @@ test_attr_shared_write(hid_t fcpl, hid_t fapl)
/* Alternate between creating "small" & "big" attributes */
if(u % 2) {
/* Create "small" attribute on second dataset */
- attr = H5Acreate2(dataset2, ".", attrname, attr_tid, sid, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
+ attr = H5Acreate2(dataset2, attrname, attr_tid, sid, H5P_DEFAULT, H5P_DEFAULT);
CHECK(attr, FAIL, "H5Acreate2");
/* Check that attribute is not shared */
@@ -7007,7 +7231,7 @@ test_attr_shared_write(hid_t fcpl, hid_t fapl)
} /* end if */
else {
/* Create "big" attribute on second dataset */
- attr = H5Acreate2(dataset2, ".", attrname, attr_tid, big_sid, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
+ attr = H5Acreate2(dataset2, attrname, attr_tid, big_sid, H5P_DEFAULT, H5P_DEFAULT);
CHECK(attr, FAIL, "H5Acreate2");
/* Check that attribute is shared */
@@ -7267,7 +7491,7 @@ 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 = H5Acreate2(dataset, ".", attrname, attr_tid, sid, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
+ attr = H5Acreate2(dataset, attrname, attr_tid, sid, H5P_DEFAULT, H5P_DEFAULT);
CHECK(attr, FAIL, "H5Acreate2");
/* Check that attribute is not shared */
@@ -7281,7 +7505,7 @@ test_attr_shared_rename(hid_t fcpl, hid_t fapl)
} /* end if */
else {
/* Create "big" attribute on first dataset */
- attr = H5Acreate2(dataset, ".", attrname, attr_tid, big_sid, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
+ attr = H5Acreate2(dataset, attrname, attr_tid, big_sid, H5P_DEFAULT, H5P_DEFAULT);
CHECK(attr, FAIL, "H5Acreate2");
/* Check that attribute is shared */
@@ -7319,7 +7543,7 @@ 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 = H5Acreate2(dataset2, ".", attrname, attr_tid, sid, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
+ attr = H5Acreate2(dataset2, attrname, attr_tid, sid, H5P_DEFAULT, H5P_DEFAULT);
CHECK(attr, FAIL, "H5Acreate2");
/* Check that attribute is not shared */
@@ -7333,7 +7557,7 @@ test_attr_shared_rename(hid_t fcpl, hid_t fapl)
} /* end if */
else {
/* Create "big" attribute on second dataset */
- attr = H5Acreate2(dataset2, ".", attrname, attr_tid, big_sid, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
+ attr = H5Acreate2(dataset2, attrname, attr_tid, big_sid, H5P_DEFAULT, H5P_DEFAULT);
CHECK(attr, FAIL, "H5Acreate2");
/* Check that attribute is shared */
@@ -7708,7 +7932,7 @@ 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 = H5Acreate2(dataset, ".", attrname, attr_tid, sid, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
+ attr = H5Acreate2(dataset, attrname, attr_tid, sid, H5P_DEFAULT, H5P_DEFAULT);
CHECK(attr, FAIL, "H5Acreate2");
/* Check that attribute is not shared */
@@ -7722,7 +7946,7 @@ test_attr_shared_delete(hid_t fcpl, hid_t fapl)
} /* end if */
else {
/* Create "big" attribute on first dataset */
- attr = H5Acreate2(dataset, ".", attrname, attr_tid, big_sid, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
+ attr = H5Acreate2(dataset, attrname, attr_tid, big_sid, H5P_DEFAULT, H5P_DEFAULT);
CHECK(attr, FAIL, "H5Acreate2");
/* Check that attribute is shared */
@@ -7760,7 +7984,7 @@ 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 = H5Acreate2(dataset2, ".", attrname, attr_tid, sid, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
+ attr = H5Acreate2(dataset2, attrname, attr_tid, sid, H5P_DEFAULT, H5P_DEFAULT);
CHECK(attr, FAIL, "H5Acreate2");
/* Check that attribute is not shared */
@@ -7774,7 +7998,7 @@ test_attr_shared_delete(hid_t fcpl, hid_t fapl)
} /* end if */
else {
/* Create "big" attribute on second dataset */
- attr = H5Acreate2(dataset2, ".", attrname, attr_tid, big_sid, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
+ attr = H5Acreate2(dataset2, attrname, attr_tid, big_sid, H5P_DEFAULT, H5P_DEFAULT);
CHECK(attr, FAIL, "H5Acreate2");
/* Check that attribute is shared */
@@ -8072,7 +8296,7 @@ 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 = H5Acreate2(dataset, ".", attrname, attr_tid, sid, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
+ attr = H5Acreate2(dataset, attrname, attr_tid, sid, H5P_DEFAULT, H5P_DEFAULT);
CHECK(attr, FAIL, "H5Acreate2");
/* Check that attribute is not shared */
@@ -8086,7 +8310,7 @@ test_attr_shared_unlink(hid_t fcpl, hid_t fapl)
} /* end if */
else {
/* Create "big" attribute on first dataset */
- attr = H5Acreate2(dataset, ".", attrname, attr_tid, big_sid, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
+ attr = H5Acreate2(dataset, attrname, attr_tid, big_sid, H5P_DEFAULT, H5P_DEFAULT);
CHECK(attr, FAIL, "H5Acreate2");
/* Check that attribute is shared */
@@ -8124,7 +8348,7 @@ 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 = H5Acreate2(dataset2, ".", attrname, attr_tid, sid, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
+ attr = H5Acreate2(dataset2, attrname, attr_tid, sid, H5P_DEFAULT, H5P_DEFAULT);
CHECK(attr, FAIL, "H5Acreate2");
/* Check that attribute is not shared */
@@ -8138,7 +8362,7 @@ test_attr_shared_unlink(hid_t fcpl, hid_t fapl)
} /* end if */
else {
/* Create "big" attribute on second dataset */
- attr = H5Acreate2(dataset2, ".", attrname, attr_tid, big_sid, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
+ attr = H5Acreate2(dataset2, attrname, attr_tid, big_sid, H5P_DEFAULT, H5P_DEFAULT);
CHECK(attr, FAIL, "H5Acreate2");
/* Check that attribute is shared */
@@ -8325,7 +8549,7 @@ test_attr_bug1(hid_t fcpl, hid_t fapl)
CHECK(gid, FAIL, "H5Gopen2");
/* Create attribute on first group */
- aid = H5Acreate2(gid, ".", ATTR7_NAME, H5T_NATIVE_DOUBLE, sid, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
+ aid = H5Acreate2(gid, ATTR7_NAME, H5T_NATIVE_DOUBLE, sid, H5P_DEFAULT, H5P_DEFAULT);
CHECK(aid, FAIL, "H5Acreate2");
ret = H5Aclose(aid);
@@ -8358,7 +8582,7 @@ test_attr_bug1(hid_t fcpl, hid_t fapl)
CHECK(gid, FAIL, "H5Gopen2");
/* Create another attribute on first group */
- aid = H5Acreate2(gid, ".", ATTR8_NAME, H5T_NATIVE_DOUBLE, sid, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
+ aid = H5Acreate2(gid, ATTR8_NAME, H5T_NATIVE_DOUBLE, sid, H5P_DEFAULT, H5P_DEFAULT);
CHECK(aid, FAIL, "H5Acreate2");
ret = H5Aclose(aid);
@@ -8384,7 +8608,7 @@ test_attr_bug1(hid_t fcpl, hid_t fapl)
CHECK(ret, FAIL, "H5Adelete2");
/* Re-create first attribute */
- aid = H5Acreate2(gid, ".", ATTR7_NAME, H5T_NATIVE_DOUBLE, sid, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
+ aid = H5Acreate2(gid, ATTR7_NAME, H5T_NATIVE_DOUBLE, sid, H5P_DEFAULT, H5P_DEFAULT);
CHECK(aid, FAIL, "H5Acreate2");
ret = H5Aclose(aid);
@@ -8395,7 +8619,7 @@ test_attr_bug1(hid_t fcpl, hid_t fapl)
CHECK(ret, FAIL, "H5Adelete2");
/* Re-create second attribute */
- aid = H5Acreate2(gid, ".", ATTR8_NAME, H5T_NATIVE_DOUBLE, sid, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
+ aid = H5Acreate2(gid, ATTR8_NAME, H5T_NATIVE_DOUBLE, sid, H5P_DEFAULT, H5P_DEFAULT);
CHECK(aid, FAIL, "H5Acreate2");
ret = H5Aclose(aid);
@@ -8536,7 +8760,8 @@ test_attr(void)
test_attr_delete_by_idx(new_format, my_fcpl, my_fapl); /* Test deleting attribute by index */
test_attr_iterate2(new_format, my_fcpl, my_fapl); /* Test iterating over attributes by index */
test_attr_open_by_idx(new_format, my_fcpl, my_fapl); /* Test opening attributes by index */
- test_attr_open(new_format, my_fcpl, my_fapl); /* Test opening attributes by name */
+ test_attr_open_by_name(new_format, my_fcpl, my_fapl); /* Test opening attributes by name */
+ test_attr_create_by_name(new_format, my_fcpl, my_fapl); /* Test creating attributes by name */
/* More complex tests with both "new format" and "shared" attributes */
if(use_shared == TRUE) {
@@ -8551,15 +8776,18 @@ test_attr(void)
} /* end for */
} /* end if */
else {
+ /* General attribute tests */
+ test_attr_big(fcpl, my_fapl); /* Test storing big attribute */
+ test_attr_null_space(fcpl, my_fapl); /* Test storing attribute with NULL dataspace */
+ test_attr_deprec(fcpl, my_fapl); /* Test deprecated API routines */
+
/* New attribute API routine tests, on old-format storage */
test_attr_info_by_idx(new_format, fcpl, my_fapl); /* Test querying attribute info by index */
test_attr_delete_by_idx(new_format, fcpl, my_fapl); /* Test deleting attribute by index */
test_attr_iterate2(new_format, fcpl, my_fapl); /* Test iterating over attributes by index */
test_attr_open_by_idx(new_format, fcpl, my_fapl); /* Test opening attributes by index */
- test_attr_open(new_format, fcpl, my_fapl); /* Test opening attributes by name */
- test_attr_big(fcpl, my_fapl); /* Test storing big attribute */
- test_attr_null_space(fcpl, my_fapl); /* Test storing attribute with NULL dataspace */
- test_attr_deprec(fcpl, my_fapl); /* Test deprecated API routines */
+ test_attr_open_by_name(new_format, fcpl, my_fapl); /* Test opening attributes by name */
+ test_attr_create_by_name(new_format, fcpl, my_fapl); /* Test creating attributes by name */
/* Tests that address specific bugs */
test_attr_bug1(fcpl, my_fapl); /* Test odd allocation operations */
diff --git a/test/tfile.c b/test/tfile.c
index d89686f..e839630 100644
--- a/test/tfile.c
+++ b/test/tfile.c
@@ -949,7 +949,7 @@ test_get_file_id(void)
/* Create an attribute for the dataset. Make a duplicated file ID from
* this attribute. And close it.
*/
- attr_id = H5Acreate2(dataset_id, ".", ATTR_NAME, H5T_NATIVE_INT, dataspace_id, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
+ attr_id = H5Acreate2(dataset_id, ATTR_NAME, H5T_NATIVE_INT, dataspace_id, H5P_DEFAULT, H5P_DEFAULT);
CHECK(ret, FAIL, "H5Acreate2");
/* Test H5Iget_file_id() */
@@ -1619,7 +1619,7 @@ test_file_getname(void)
VERIFY_STR(name, FILE1, "H5Fget_name");
/* Create an attribute for the dataset */
- attr_id = H5Acreate2(dataset_id, ".", TESTA_ATTRNAME, H5T_NATIVE_INT, space_id, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
+ attr_id = H5Acreate2(dataset_id, TESTA_ATTRNAME, H5T_NATIVE_INT, space_id, H5P_DEFAULT, H5P_DEFAULT);
CHECK(attr_id, FAIL, "H5Acreate2");
/* Get and verify file name */
diff --git a/test/th5s.c b/test/th5s.c
index f649fa6..6808679 100644
--- a/test/th5s.c
+++ b/test/th5s.c
@@ -280,7 +280,7 @@ test_h5s_basic(void)
/* Now use the bad dataspace as the space for an attribute */
H5E_BEGIN_TRY {
- aid1 = H5Acreate2(dset1, ".", BASICATTR, H5T_NATIVE_INT, sid1, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
+ aid1 = H5Acreate2(dset1, BASICATTR, H5T_NATIVE_INT, sid1, H5P_DEFAULT, H5P_DEFAULT);
} H5E_END_TRY
VERIFY(aid1, FAIL, "H5Acreate2");
@@ -405,7 +405,7 @@ test_h5s_null(void)
VERIFY(val, 1, "H5Dread");
/* Create an attribute for the group */
- attr = H5Acreate2(did, ".", NULLATTR, H5T_NATIVE_INT, sid, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
+ attr = H5Acreate2(did, NULLATTR, H5T_NATIVE_INT, sid, H5P_DEFAULT, H5P_DEFAULT);
CHECK(attr, FAIL, "H5Acreate2");
/* Write "nothing" to the attribute */
diff --git a/test/titerate.c b/test/titerate.c
index 72038d9..0579123 100644
--- a/test/titerate.c
+++ b/test/titerate.c
@@ -408,7 +408,7 @@ static void test_iter_attr(hid_t fapl, hbool_t new_format)
for(i = 0; i < NATTR; i++) {
sprintf(name, "Attribute %02d", i);
- attribute = H5Acreate2(dataset, ".", name, H5T_NATIVE_INT, filespace, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
+ attribute = H5Acreate2(dataset, name, H5T_NATIVE_INT, filespace, H5P_DEFAULT, H5P_DEFAULT);
CHECK(attribute, FAIL, "H5Acreate2");
/* Keep a copy of the attribute names around for later */
diff --git a/test/tmisc.c b/test/tmisc.c
index ef53c1c..abe32ff 100644
--- a/test/tmisc.c
+++ b/test/tmisc.c
@@ -421,7 +421,7 @@ static void test_misc2_write_attribute(void)
root1 = H5Gopen2(file1, "/", H5P_DEFAULT);
CHECK(root1, FAIL, "H5Gopen2");
- att1 = H5Acreate2(root1, ".", MISC2_ATT_NAME_1, type, dataspace, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
+ att1 = H5Acreate2(root1, MISC2_ATT_NAME_1, type, dataspace, H5P_DEFAULT, H5P_DEFAULT);
CHECK(att1, FAIL, "H5Acreate2");
data.string = string_att1;
@@ -448,7 +448,7 @@ static void test_misc2_write_attribute(void)
root2 = H5Gopen2(file2, "/", H5P_DEFAULT);
CHECK(root2, FAIL, "H5Gopen2");
- att2 = H5Acreate2(root2, ".", MISC2_ATT_NAME_2, type, dataspace, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
+ att2 = H5Acreate2(root2, MISC2_ATT_NAME_2, type, dataspace, H5P_DEFAULT, H5P_DEFAULT);
CHECK(att2, FAIL, "H5Acreate2");
data.string = string_att2;
@@ -1040,7 +1040,7 @@ test_misc6(void)
CHECK(dataset_id, FAIL, "H5Dopen2");
/* Add attribute to dataset */
- attr_id = H5Acreate2(dataset_id, ".", attr_name, H5T_NATIVE_INT, space_id, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
+ attr_id = H5Acreate2(dataset_id, attr_name, H5T_NATIVE_INT, space_id, H5P_DEFAULT, H5P_DEFAULT);
CHECK(attr_id, FAIL, "H5Acreate2");
/* Close attribute */
@@ -1057,7 +1057,7 @@ test_misc6(void)
CHECK(dataset_id, FAIL, "H5Dopen2");
/* Add attribute to dataset */
- attr_id = H5Acreate2(dataset_id, ".", attr_name, H5T_NATIVE_INT, space_id, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
+ attr_id = H5Acreate2(dataset_id, attr_name, H5T_NATIVE_INT, space_id, H5P_DEFAULT, H5P_DEFAULT);
CHECK(attr_id, FAIL, "H5Acreate2");
/* Close attribute */
@@ -2882,14 +2882,14 @@ test_misc18(void)
sprintf(attr_name, "Attr %u", u);
/* Create & close attribute on first dataset */
- aid = H5Acreate2(did1, ".", attr_name, H5T_STD_U32LE, sid, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
+ aid = H5Acreate2(did1, attr_name, H5T_STD_U32LE, sid, H5P_DEFAULT, H5P_DEFAULT);
CHECK(aid, FAIL, "H5Acreate2");
ret = H5Aclose(aid);
CHECK(ret, FAIL, "HAclose");
/* Create & close attribute on second dataset */
- aid = H5Acreate2(did2, ".", attr_name, H5T_STD_U32LE, sid, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
+ aid = H5Acreate2(did2, attr_name, H5T_STD_U32LE, sid, H5P_DEFAULT, H5P_DEFAULT);
CHECK(aid, FAIL, "H5Acreate2");
ret = H5Aclose(aid);
@@ -3179,7 +3179,7 @@ test_misc19(void)
CHECK(sid, FAIL, "H5Screate");
/* Create an attribute */
- aid = H5Acreate2(gid, ".", MISC19_ATTR_NAME, H5T_NATIVE_INT, sid, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
+ aid = H5Acreate2(gid, MISC19_ATTR_NAME, H5T_NATIVE_INT, sid, H5P_DEFAULT, H5P_DEFAULT);
CHECK(aid, FAIL, "H5Acreate2");
/* Check the reference count */
@@ -4298,7 +4298,7 @@ test_misc25a(void)
CHECK(ret, FAIL, "H5Tset_size");
/* Add 1st attribute on first group */
- aid = H5Acreate2(gid, ".", MISC25A_ATTR1_NAME, tid, sid, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
+ aid = H5Acreate2(gid, MISC25A_ATTR1_NAME, tid, sid, H5P_DEFAULT, H5P_DEFAULT);
CHECK(aid, FAIL, "H5Acreate2");
/* Close dataspace */
@@ -4324,7 +4324,7 @@ test_misc25a(void)
CHECK(ret, FAIL, "H5Tset_size");
/* Add 2nd attribute on first group */
- aid = H5Acreate2(gid, ".", MISC25A_ATTR2_NAME, tid, sid, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
+ aid = H5Acreate2(gid, MISC25A_ATTR2_NAME, tid, sid, H5P_DEFAULT, H5P_DEFAULT);
CHECK(aid, FAIL, "H5Acreate2");
/* Close dataspace */
@@ -4397,7 +4397,7 @@ test_misc25a(void)
CHECK(ret, FAIL, "H5Tset_size");
/* Add 3rd attribute on first group (smaller than 2nd attribute) */
- aid = H5Acreate2(gid, ".", MISC25A_ATTR3_NAME, tid, sid, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
+ aid = H5Acreate2(gid, MISC25A_ATTR3_NAME, tid, sid, H5P_DEFAULT, H5P_DEFAULT);
CHECK(aid, FAIL, "H5Acreate2");
/* Close dataspace */
@@ -4445,7 +4445,7 @@ test_misc25a(void)
CHECK(ret, FAIL, "H5Tset_size");
/* Re-create 2nd attribute on first group */
- aid = H5Acreate2(gid, ".", MISC25A_ATTR2_NAME, tid, sid, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
+ aid = H5Acreate2(gid, MISC25A_ATTR2_NAME, tid, sid, H5P_DEFAULT, H5P_DEFAULT);
CHECK(aid, FAIL, "H5Acreate2");
/* Close dataspace */
@@ -4509,7 +4509,7 @@ test_misc25a(void)
CHECK(ret, FAIL, "H5Tset_size");
/* Re-create 2nd attribute on first group */
- aid = H5Acreate2(gid, ".", MISC25A_ATTR2_NAME, tid, sid, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
+ aid = H5Acreate2(gid, MISC25A_ATTR2_NAME, tid, sid, H5P_DEFAULT, H5P_DEFAULT);
CHECK(aid, FAIL, "H5Acreate2");
/* Close dataspace */
@@ -4639,7 +4639,7 @@ test_misc25c(void)
CHECK(ret, FAIL, "H5Gclose");
/* Add an attribute to the dataset group */
- aid = H5Acreate2(gid, ".", MISC25C_ATTRNAME, H5T_NATIVE_CHAR, sid, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
+ aid = H5Acreate2(gid, MISC25C_ATTRNAME, H5T_NATIVE_CHAR, sid, H5P_DEFAULT, H5P_DEFAULT);
CHECK(aid, FAIL, "H5Acreate2");
/* Close the attribute */
@@ -4655,7 +4655,7 @@ test_misc25c(void)
CHECK(ret, FAIL, "H5Gclose");
/* Add second attribute to the dataset group */
- aid = H5Acreate2(gid, ".", MISC25C_ATTRNAME2, H5T_NATIVE_INT, sid, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
+ aid = H5Acreate2(gid, MISC25C_ATTRNAME2, H5T_NATIVE_INT, sid, H5P_DEFAULT, H5P_DEFAULT);
CHECK(aid, FAIL, "H5Acreate2");
/* Close the attribute */
diff --git a/test/tsohm.c b/test/tsohm.c
index 64eb86f..7af1362 100644
--- a/test/tsohm.c
+++ b/test/tsohm.c
@@ -994,7 +994,7 @@ 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 = H5Acreate2(group_id, ".", "attribute", type_id, space_id, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
+ attr_id = H5Acreate2(group_id, "attribute", type_id, space_id, H5P_DEFAULT, H5P_DEFAULT);
CHECK_I(attr_id, "H5Acreate2");
ret = H5Awrite(attr_id, H5T_NATIVE_INT, wdata);
CHECK_I(ret, "H5Awrite");
@@ -1030,7 +1030,7 @@ 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 = H5Acreate2(group_id, ".", "attribute", type_id, space_id, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
+ attr_id = H5Acreate2(group_id, "attribute", type_id, space_id, H5P_DEFAULT, H5P_DEFAULT);
CHECK_I(attr_id, "H5Acreate2");
ret = H5Awrite(attr_id, H5T_NATIVE_INT, wdata);
CHECK_I(ret, "H5Awrite");
@@ -1480,7 +1480,7 @@ size2_helper(hid_t fcpl_id, int test_file_closing, size2_helper_struct *ret_size
dset_id = H5Dcreate2(file_id, DSETNAME[x], dtype1_id, dspace1_id, H5P_DEFAULT, dcpl1_id, H5P_DEFAULT);
CHECK_I(dset_id, "H5Dcreate2");
- attr_id = H5Acreate2(dset_id, ".", "attr_name", attr_type_id, attr_space_id, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
+ attr_id = H5Acreate2(dset_id, "attr_name", attr_type_id, attr_space_id, H5P_DEFAULT, H5P_DEFAULT);
CHECK_I(attr_id, "H5Acreate2");
ret = H5Awrite(attr_id, attr_type_id, attr_string1);
CHECK_I(ret, "H5Awrite");
@@ -1529,7 +1529,7 @@ size2_helper(hid_t fcpl_id, int test_file_closing, size2_helper_struct *ret_size
dset_id = H5Dcreate2(group_id, DSETNAME[x], dtype2_id, dspace2_id, H5P_DEFAULT, dcpl2_id, H5P_DEFAULT);
CHECK_I(dset_id, "H5Dcreate2");
- attr_id = H5Acreate2(dset_id, ".", "attr_name", attr_type_id, attr_space_id, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
+ attr_id = H5Acreate2(dset_id, "attr_name", attr_type_id, attr_space_id, H5P_DEFAULT, H5P_DEFAULT);
CHECK_I(attr_id, "H5Acreate2");
ret = H5Awrite(attr_id, attr_type_id, attr_string2);
CHECK_I(ret, "H5Awrite");
@@ -1570,7 +1570,7 @@ size2_helper(hid_t fcpl_id, int test_file_closing, size2_helper_struct *ret_size
dset_id = H5Dcreate2(group_id, DSETNAME[x], dtype1_id, dspace1_id, H5P_DEFAULT, dcpl1_id, H5P_DEFAULT);
CHECK_I(dset_id, "H5Dcreate2");
- attr_id = H5Acreate2(dset_id, ".", "attr_name", attr_type_id, attr_space_id, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
+ attr_id = H5Acreate2(dset_id, "attr_name", attr_type_id, attr_space_id, H5P_DEFAULT, H5P_DEFAULT);
CHECK_I(attr_id, "H5Acreate2");
ret = H5Awrite(attr_id, attr_type_id, attr_string1);
CHECK_I(ret, "H5Awrite");
@@ -1583,7 +1583,7 @@ size2_helper(hid_t fcpl_id, int test_file_closing, size2_helper_struct *ret_size
dset_id = H5Dcreate2(group_id, DSETNAME[x+1], dtype2_id, dspace2_id, H5P_DEFAULT, dcpl2_id, H5P_DEFAULT);
CHECK_I(dset_id, "H5Dcreate2");
- attr_id = H5Acreate2(dset_id, ".", "attr_name", attr_type_id, attr_space_id, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
+ attr_id = H5Acreate2(dset_id, "attr_name", attr_type_id, attr_space_id, H5P_DEFAULT, H5P_DEFAULT);
CHECK_I(attr_id, "H5Acreate2");
ret = H5Awrite(attr_id, attr_type_id, attr_string2);
CHECK_I(ret, "H5Awrite");
@@ -1628,7 +1628,7 @@ 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 = H5Acreate2(group_id, ".", attr_name, attr_type_id, attr_space_id, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
+ attr_id = H5Acreate2(group_id, attr_name, attr_type_id, attr_space_id, H5P_DEFAULT, H5P_DEFAULT);
CHECK_I(attr_id, "H5Acreate2");
ret = H5Awrite(attr_id, attr_type_id, attr_string1);
CHECK_I(ret, "H5Awrite");
@@ -1668,7 +1668,7 @@ 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 = H5Acreate2(group_id, ".", attr_name, attr_type_id, attr_space_id, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
+ attr_id = H5Acreate2(group_id, attr_name, attr_type_id, attr_space_id, H5P_DEFAULT, H5P_DEFAULT);
CHECK_I(attr_id, "H5Acreate2");
ret = H5Awrite(attr_id, attr_type_id, attr_string1);
CHECK_I(ret, "H5Awrite");
@@ -2568,7 +2568,7 @@ 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 = H5Acreate2(dset_id, ".", "attr_name", H5T_NATIVE_CHAR, dspace_id[x], H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
+ attr_id = H5Acreate2(dset_id, "attr_name", H5T_NATIVE_CHAR, dspace_id[x], H5P_DEFAULT, H5P_DEFAULT);
CHECK_I(attr_id, "H5Acreate2");
/* Write to attribute */
diff --git a/test/ttsafe_acreate.c b/test/ttsafe_acreate.c
index b4c27ae..0e2c7c8 100644
--- a/test/ttsafe_acreate.c
+++ b/test/ttsafe_acreate.c
@@ -167,9 +167,9 @@ void *tts_acreate_thread(void *client_data)
/* Create attribute */
attribute_name = gen_name(attrib_data->current_index);
- attribute = H5Acreate2(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, H5P_DEFAULT);
/* Write data to the attribute */
attribute_data = malloc(sizeof(int));
diff --git a/test/tunicode.c b/test/tunicode.c
index 873918a..a5f1309 100644
--- a/test/tunicode.c
+++ b/test/tunicode.c
@@ -531,7 +531,7 @@ 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 = H5Acreate2(group_id, ".", string, dtype_id, space_id, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
+ attr_id = H5Acreate2(group_id, string, dtype_id, space_id, 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");
diff --git a/test/tvlstr.c b/test/tvlstr.c
index dfc3015..0d5b955 100644
--- a/test/tvlstr.c
+++ b/test/tvlstr.c
@@ -597,7 +597,7 @@ static void test_write_vl_string_attribute(void)
CHECK(dataspace, FAIL, "H5Screate");
/* Test creating a "normal" sized string attribute */
- att = H5Acreate2(root, ".", "test_scalar", type, dataspace, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
+ att = H5Acreate2(root, "test_scalar", type, dataspace, H5P_DEFAULT, H5P_DEFAULT);
CHECK(att, FAIL, "H5Acreate2");
ret = H5Awrite(att, type, &string_att);
@@ -615,7 +615,7 @@ static void test_write_vl_string_attribute(void)
CHECK(ret, FAIL, "HAclose");
/* Test creating a "large" sized string attribute */
- att = H5Acreate2(root, ".", "test_scalar_large", type, dataspace, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
+ att = H5Acreate2(root, "test_scalar_large", type, dataspace, H5P_DEFAULT, H5P_DEFAULT);
CHECK(att, FAIL, "H5Acreate2");
string_att_write = (char*)HDcalloc((size_t)8192, sizeof(char));
diff --git a/test/unlink.c b/test/unlink.c
index e1fc7f4..637d14f 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 = H5Acreate2(dataset, ".", objname, H5T_NATIVE_INT, attr_space, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) FAIL_STACK_ERROR
+ if((attr = H5Acreate2(dataset, objname, H5T_NATIVE_INT, attr_space, 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 = H5Acreate2(dataset2, ".", objname, H5T_NATIVE_INT, attr_space, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) FAIL_STACK_ERROR
+ if((attr = H5Acreate2(dataset2, objname, H5T_NATIVE_INT, attr_space, 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 = H5Acreate2(dataset, ".", ATTRNAME, H5T_NATIVE_INT, attr_space, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) FAIL_STACK_ERROR
+ if((attr = H5Acreate2(dataset, ATTRNAME, H5T_NATIVE_INT, attr_space, 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 = H5Acreate2(dataset, ".", ATTRNAME, H5T_NATIVE_INT, attr_space, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
+ attr = H5Acreate2(dataset, ATTRNAME, H5T_NATIVE_INT, attr_space, H5P_DEFAULT, H5P_DEFAULT);
} H5E_END_TRY;
if(attr >= 0) {
H5Aclose(attr);
diff --git a/test/vfd.c b/test/vfd.c
index 3250828..5598ddd 100644
--- a/test/vfd.c
+++ b/test/vfd.c
@@ -1055,7 +1055,7 @@ test_multi(void)
if((aspace = H5Screate_simple(1, adims, NULL)) < 0)
TEST_ERROR;
- if((attr = H5Acreate2(root, ".", "Metadata", atype, aspace, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0)
+ if((attr = H5Acreate2(root, "Metadata", atype, aspace, H5P_DEFAULT, H5P_DEFAULT)) < 0)
TEST_ERROR;
if(H5Awrite(attr, atype, meta) < 0)