summaryrefslogtreecommitdiffstats
path: root/test/getname.c
diff options
context:
space:
mode:
authorQuincey Koziol <koziol@hdfgroup.org>2007-08-28 15:02:54 (GMT)
committerQuincey Koziol <koziol@hdfgroup.org>2007-08-28 15:02:54 (GMT)
commitea343ef85416b42f68f28fb1024702c6726f7eea (patch)
treed5c401bf83f7f5578df06c54f9fd9fb198732ed2 /test/getname.c
parenteb16d8bc2b2f37c7a1d75fe7bf5258eba21515b2 (diff)
downloadhdf5-ea343ef85416b42f68f28fb1024702c6726f7eea.zip
hdf5-ea343ef85416b42f68f28fb1024702c6726f7eea.tar.gz
hdf5-ea343ef85416b42f68f28fb1024702c6726f7eea.tar.bz2
[svn-r14115] Description:
Remove all plain calls to H5Gopen() from source, replacing them with either H5Gopen2(). Add test for H5Gopen1(). Reformatted several pieces of code, to clean them up. Tested on: FreeBSD/32 6.2 (duty) FreeBSD/64 6.2 (liberty) Linux/32 2.6 (kagiso) Linux/64 2.6 (smirom) Solaris/32 5.10 (linew) Mac OS X/32 10.4.10 (amazon)
Diffstat (limited to 'test/getname.c')
-rw-r--r--test/getname.c1442
1 files changed, 721 insertions, 721 deletions
diff --git a/test/getname.c b/test/getname.c
index 9700df3..8348362 100644
--- a/test/getname.c
+++ b/test/getname.c
@@ -118,10 +118,10 @@ test_main(hid_t file_id, hid_t fapl)
if((group_id = H5Gcreate2(file_id, "/g0", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) FAIL_STACK_ERROR
/* Verify */
- if(check_name(group_id, "/g0", "/g0") < 0) TEST_ERROR;
+ if(check_name(group_id, "/g0", "/g0") < 0) TEST_ERROR
/* Close */
- H5Gclose( group_id );
+ H5Gclose(group_id);
PASSED();
@@ -140,40 +140,40 @@ test_main(hid_t file_id, hid_t fapl)
if((group2_id = H5Gcreate2(file_id, "/g1/g2", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) FAIL_STACK_ERROR
/* Verify */
- if(check_name(group_id, "/g1", "/g1") < 0) TEST_ERROR;
+ if(check_name(group_id, "/g1", "/g1") < 0) TEST_ERROR
/* Verify */
- if(check_name(group2_id, "/g1/g2", "/g1/g2") < 0) TEST_ERROR;
+ if(check_name(group2_id, "/g1/g2", "/g1/g2") < 0) TEST_ERROR
/* Close */
- H5Gclose( group_id );
- H5Gclose( group2_id );
+ H5Gclose(group_id);
+ H5Gclose(group2_id);
PASSED();
/*-------------------------------------------------------------------------
- * Test H5Iget_name with H5Gopen
+ * Test H5Iget_name with H5Gopen2
*-------------------------------------------------------------------------
*/
- TESTING("H5Iget_name with H5Gopen");
+ TESTING("H5Iget_name with H5Gopen2");
/* Reopen the group */
- if ((group_id = H5Gopen( file_id, "/g1" ))<0) TEST_ERROR;
+ if((group_id = H5Gopen2(file_id, "/g1", H5P_DEFAULT)) < 0) FAIL_STACK_ERROR
/* Reopen the group */
- if ((group2_id = H5Gopen( file_id, "/g1/g2" ))<0) TEST_ERROR;
+ if((group2_id = H5Gopen2(file_id, "/g1/g2", H5P_DEFAULT)) < 0) FAIL_STACK_ERROR
/* Verify */
- if(check_name(group_id, "/g1", "/g1") < 0) TEST_ERROR;
+ if(check_name(group_id, "/g1", "/g1") < 0) TEST_ERROR
/* Verify */
- if(check_name(group2_id, "/g1/g2", "/g1/g2") < 0) TEST_ERROR;
+ if(check_name(group2_id, "/g1/g2", "/g1/g2") < 0) TEST_ERROR
/* Close */
- H5Gclose( group_id );
- H5Gclose( group2_id );
+ if(H5Gclose(group_id) < 0) FAIL_STACK_ERROR
+ if(H5Gclose(group2_id) < 0) FAIL_STACK_ERROR
PASSED();
@@ -188,30 +188,30 @@ test_main(hid_t file_id, hid_t fapl)
TESTING("H5Iget_name with H5Dcreate");
/* Create the dataspace */
- if ((space_id = H5Screate_simple( 1, dims, NULL ))<0) TEST_ERROR;
+ if((space_id = H5Screate_simple(1, dims, NULL))<0) TEST_ERROR
/* Create a new dataset */
- if ((dataset_id = H5Dcreate( file_id , "d1", H5T_NATIVE_INT, space_id, H5P_DEFAULT ))<0) TEST_ERROR;
+ if((dataset_id = H5Dcreate(file_id , "d1", H5T_NATIVE_INT, space_id, H5P_DEFAULT))<0) TEST_ERROR
/* Verify */
- if(check_name(dataset_id, "/d1", "/d1") < 0) TEST_ERROR;
+ if(check_name(dataset_id, "/d1", "/d1") < 0) TEST_ERROR
/* Close */
- H5Dclose( dataset_id );
+ if(H5Dclose(dataset_id) < 0) FAIL_STACK_ERROR
/* Reopen the group */
- if ((group_id = H5Gopen( file_id, "g1" ))<0) TEST_ERROR;
+ if((group_id = H5Gopen2(file_id, "g1", H5P_DEFAULT)) < 0) FAIL_STACK_ERROR
/* Create a new dataset inside "g1" */
- if ((dataset_id = H5Dcreate( group_id , "d1", H5T_NATIVE_INT, space_id, H5P_DEFAULT ))<0) TEST_ERROR;
+ if((dataset_id = H5Dcreate(group_id , "d1", H5T_NATIVE_INT, space_id, H5P_DEFAULT)) < 0) FAIL_STACK_ERROR
/* Verify */
- if(check_name(dataset_id, "/g1/d1", "/g1/d1") < 0) TEST_ERROR;
+ if(check_name(dataset_id, "/g1/d1", "/g1/d1") < 0) TEST_ERROR
/* Close */
- H5Gclose( group_id );
- H5Dclose( dataset_id );
- H5Sclose( space_id );
+ if(H5Gclose(group_id) < 0) FAIL_STACK_ERROR
+ if(H5Dclose(dataset_id) < 0) FAIL_STACK_ERROR
+ if(H5Sclose(space_id) < 0) FAIL_STACK_ERROR
PASSED();
@@ -225,27 +225,27 @@ test_main(hid_t file_id, hid_t fapl)
TESTING("H5Iget_name with H5Dopen");
/* Reopen the dataset */
- if ((dataset_id = H5Dopen( file_id, "d1"))<0) TEST_ERROR;
+ if((dataset_id = H5Dopen(file_id, "d1"))<0) TEST_ERROR
/* Verify */
- if(check_name(dataset_id, "/d1", "/d1") < 0) TEST_ERROR;
+ if(check_name(dataset_id, "/d1", "/d1") < 0) TEST_ERROR
/* Close */
- H5Dclose( dataset_id );
+ H5Dclose(dataset_id);
/* Reopen the group */
- if ((group_id = H5Gopen( file_id, "g1" ))<0) TEST_ERROR;
+ if((group_id = H5Gopen2(file_id, "g1", H5P_DEFAULT)) < 0) FAIL_STACK_ERROR
/* Reopen the dataset */
- if ((dataset_id = H5Dopen( group_id, "d1"))<0) TEST_ERROR;
+ if((dataset_id = H5Dopen(group_id, "d1")) < 0) FAIL_STACK_ERROR
/* Verify */
- if(check_name(dataset_id, "/g1/d1", "/g1/d1") < 0) TEST_ERROR;
+ if(check_name(dataset_id, "/g1/d1", "/g1/d1") < 0) TEST_ERROR
/* Close */
- H5Dclose( dataset_id );
- H5Gclose( group_id );
+ if(H5Dclose(dataset_id) < 0) FAIL_STACK_ERROR
+ if(H5Gclose(group_id) < 0) FAIL_STACK_ERROR
PASSED();
@@ -264,24 +264,24 @@ test_main(hid_t file_id, hid_t fapl)
if((group3_id = H5Gcreate2(file_id, "g2/bar/baz", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) FAIL_STACK_ERROR
/* Create a dataset */
- if((space_id = H5Screate_simple( 1, dims, NULL ))<0) TEST_ERROR;
- if((dataset_id = H5Dcreate(group3_id , "d1", H5T_NATIVE_INT, space_id, H5P_DEFAULT ))<0) TEST_ERROR;
+ if((space_id = H5Screate_simple(1, dims, NULL))<0) TEST_ERROR
+ if((dataset_id = H5Dcreate(group3_id , "d1", H5T_NATIVE_INT, space_id, H5P_DEFAULT))<0) TEST_ERROR
/* Close */
- H5Dclose( dataset_id );
- H5Sclose( space_id );
- H5Gclose( group_id );
- H5Gclose( group2_id );
- H5Gclose( group3_id );
+ H5Dclose(dataset_id);
+ H5Sclose(space_id);
+ H5Gclose(group_id);
+ H5Gclose(group2_id);
+ H5Gclose(group3_id);
/* Reopen the dataset */
- if ((dataset_id = H5Dopen( file_id, "/g2/bar/baz/d1"))<0) TEST_ERROR;
+ if((dataset_id = H5Dopen(file_id, "/g2/bar/baz/d1"))<0) TEST_ERROR
/* Verify */
- if(check_name(dataset_id, "/g2/bar/baz/d1", "/g2/bar/baz/d1") < 0) TEST_ERROR;
+ if(check_name(dataset_id, "/g2/bar/baz/d1", "/g2/bar/baz/d1") < 0) TEST_ERROR
/* Close */
- H5Dclose( dataset_id );
+ H5Dclose(dataset_id);
PASSED();
@@ -294,18 +294,18 @@ test_main(hid_t file_id, hid_t fapl)
TESTING("H5Iget_name with H5Tcommit");
/* Create a datatype */
- if ((type_id = H5Tcreate (H5T_COMPOUND, sizeof(s1_t)))<0) TEST_ERROR;
+ if((type_id = H5Tcreate(H5T_COMPOUND, sizeof(s1_t)))<0) TEST_ERROR
/* Insert fields */
- if (H5Tinsert (type_id, "a", HOFFSET(s1_t,a), H5T_NATIVE_INT)<0) TEST_ERROR;
- if (H5Tinsert (type_id, "b", HOFFSET(s1_t,b), H5T_NATIVE_INT)<0) TEST_ERROR;
- if (H5Tinsert (type_id, "c", HOFFSET(s1_t,c), H5T_NATIVE_FLOAT)<0) TEST_ERROR;
+ if(H5Tinsert(type_id, "a", HOFFSET(s1_t,a), H5T_NATIVE_INT)<0) TEST_ERROR
+ if(H5Tinsert(type_id, "b", HOFFSET(s1_t,b), H5T_NATIVE_INT)<0) TEST_ERROR
+ if(H5Tinsert(type_id, "c", HOFFSET(s1_t,c), H5T_NATIVE_FLOAT)<0) TEST_ERROR
/* Save datatype for later */
- if (H5Tcommit (file_id, "t1", type_id)<0) TEST_ERROR;
+ if(H5Tcommit(file_id, "t1", type_id)<0) TEST_ERROR
/* Verify */
- if(check_name(type_id, "/t1", "/t1") < 0) TEST_ERROR;
+ if(check_name(type_id, "/t1", "/t1") < 0) TEST_ERROR
/* Close datatype */
H5Tclose(type_id);
@@ -320,10 +320,10 @@ test_main(hid_t file_id, hid_t fapl)
TESTING("H5Iget_name with H5Topen");
/* Open the named datatype */
- if((type_id=H5Topen(file_id, "t1"))<0) TEST_ERROR;
+ if((type_id=H5Topen(file_id, "t1"))<0) TEST_ERROR
/* Verify */
- if(check_name(type_id, "/t1", "/t1") < 0) TEST_ERROR;
+ if(check_name(type_id, "/t1", "/t1") < 0) TEST_ERROR
/* Close datatype */
H5Tclose(type_id);
@@ -332,24 +332,24 @@ test_main(hid_t file_id, hid_t fapl)
-/*-------------------------------------------------------------------------
- * Test H5Iget_name with H5Gmove and H5Gopen
+ /*-------------------------------------------------------------------------
+ * Test H5Iget_name with H5Gmove and H5Gopen2
*-------------------------------------------------------------------------
*/
- TESTING("H5Iget_name with H5Gmove and H5Gopen");
+ TESTING("H5Iget_name with H5Gmove and H5Gopen2");
/* Reopen the group */
- if ((group_id = H5Gopen( file_id, "/g1" ))<0) TEST_ERROR;
+ if((group_id = H5Gopen2(file_id, "/g1", H5P_DEFAULT)) < 0) FAIL_STACK_ERROR
/* Rename group */
- if (H5Gmove( file_id, "/g1", "/g1a" )<0) TEST_ERROR;
+ if(H5Gmove(file_id, "/g1", "/g1a") < 0) FAIL_STACK_ERROR
/* Verify */
- if(check_name(group_id, "/g1a", "/g1a") < 0) TEST_ERROR;
+ if(check_name(group_id, "/g1a", "/g1a") < 0) TEST_ERROR
/* Close */
- H5Gclose( group_id );
+ if(H5Gclose(group_id) < 0) FAIL_STACK_ERROR
PASSED();
@@ -364,16 +364,16 @@ test_main(hid_t file_id, hid_t fapl)
TESTING("H5Iget_name with H5Gmove and H5Dopen");
/* Reopen the dataset */
- if ((dataset_id = H5Dopen( file_id, "/d1"))<0) TEST_ERROR;
+ if((dataset_id = H5Dopen(file_id, "/d1"))<0) TEST_ERROR
/* Rename dataset */
- if (H5Gmove( file_id, "/d1", "/d1a" )<0) TEST_ERROR;
+ if(H5Gmove(file_id, "/d1", "/d1a")<0) TEST_ERROR
/* Verify */
- if(check_name(dataset_id, "/d1a", "/d1a") < 0) TEST_ERROR;
+ if(check_name(dataset_id, "/d1a", "/d1a") < 0) TEST_ERROR
/* Close */
- H5Dclose( dataset_id );
+ H5Dclose(dataset_id);
PASSED();
@@ -388,13 +388,13 @@ test_main(hid_t file_id, hid_t fapl)
TESTING("H5Iget_name with H5Gmove and H5Topen");
/* Open the named datatype */
- if((type_id=H5Topen(file_id, "/t1"))<0) TEST_ERROR;
+ if((type_id=H5Topen(file_id, "/t1"))<0) TEST_ERROR
/* Rename datatype */
- if (H5Gmove( file_id, "/t1", "/t1a" )<0) TEST_ERROR;
+ if(H5Gmove(file_id, "/t1", "/t1a")<0) TEST_ERROR
/* Verify */
- if(check_name(type_id, "/t1a", "/t1a") < 0) TEST_ERROR;
+ if(check_name(type_id, "/t1a", "/t1a") < 0) TEST_ERROR
/* Close datatype */
H5Tclose(type_id);
@@ -415,36 +415,36 @@ test_main(hid_t file_id, hid_t fapl)
if((group2_id = H5Gcreate2(file_id, "/g3/foo1", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) FAIL_STACK_ERROR
/* Open group "/g3/foo" again */
- if ((group3_id = H5Gopen( file_id, "/g3/foo1"))<0) TEST_ERROR;
+ if((group3_id = H5Gopen2(file_id, "/g3/foo1", H5P_DEFAULT)) < 0) FAIL_STACK_ERROR
/* Rename group */
- if (H5Gmove( group_id, "foo1", "foo2" )<0) TEST_ERROR;
+ if(H5Gmove(group_id, "foo1", "foo2") < 0) FAIL_STACK_ERROR
/* Verify */
- if(check_name(group_id, "/g3", "/g3") < 0) TEST_ERROR;
+ if(check_name(group_id, "/g3", "/g3") < 0) TEST_ERROR
/* Verify */
- if(check_name(group2_id, "/g3/foo2", "/g3/foo2") < 0) TEST_ERROR;
+ if(check_name(group2_id, "/g3/foo2", "/g3/foo2") < 0) TEST_ERROR
/* Verify */
- if(check_name(group3_id, "/g3/foo2", "/g3/foo2") < 0) TEST_ERROR;
+ if(check_name(group3_id, "/g3/foo2", "/g3/foo2") < 0) TEST_ERROR
/* Rename group again */
- if (H5Gmove( file_id, "g3/foo2", "g3/foo1" )<0) TEST_ERROR;
+ if(H5Gmove(file_id, "g3/foo2", "g3/foo1") < 0) FAIL_STACK_ERROR
/* Verify */
- if(check_name(group_id, "/g3", "/g3") < 0) TEST_ERROR;
+ if(check_name(group_id, "/g3", "/g3") < 0) TEST_ERROR
/* Verify */
- if(check_name(group2_id, "/g3/foo1", "/g3/foo1") < 0) TEST_ERROR;
+ if(check_name(group2_id, "/g3/foo1", "/g3/foo1") < 0) TEST_ERROR
/* Verify */
- if(check_name(group3_id, "/g3/foo1", "/g3/foo1") < 0) TEST_ERROR;
+ if(check_name(group3_id, "/g3/foo1", "/g3/foo1") < 0) TEST_ERROR
/* Close */
- H5Gclose( group_id );
- H5Gclose( group2_id );
- H5Gclose( group3_id );
+ H5Gclose(group_id);
+ H5Gclose(group2_id);
+ H5Gclose(group3_id);
PASSED();
@@ -468,35 +468,35 @@ test_main(hid_t file_id, hid_t fapl)
if((group5_id = H5Gcreate2(file_id, "g5/C", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) FAIL_STACK_ERROR
/* Verify */
- if(check_name(group3_id, "/g4/A/B", "/g4/A/B") < 0) TEST_ERROR;
+ if(check_name(group3_id, "/g4/A/B", "/g4/A/B") < 0) TEST_ERROR
/* Move group "B" to "D"*/
- if (H5Gmove( file_id, "/g4/A/B", "/g5/C/D" )<0) TEST_ERROR;
+ if(H5Gmove(file_id, "/g4/A/B", "/g5/C/D")<0) TEST_ERROR
/* Verify */
- if(check_name(group3_id, "/g5/C/D", "/g5/C/D") < 0) TEST_ERROR;
+ if(check_name(group3_id, "/g5/C/D", "/g5/C/D") < 0) TEST_ERROR
/* Move group "/g5/C/D" back to "/g4/A/B" using relative name */
- if (H5Gmove2( group5_id, "D", group2_id, "B" )<0) TEST_ERROR;
+ if(H5Gmove2(group5_id, "D", group2_id, "B")<0) TEST_ERROR
/* Verify */
- if(check_name(group3_id, "/g4/A/B", "/g4/A/B") < 0) TEST_ERROR;
+ if(check_name(group3_id, "/g4/A/B", "/g4/A/B") < 0) TEST_ERROR
/* Move group "/g4/A/B" to "/g4/F/B" using relative name */
- if (H5Gmove2( group_id, "A", group_id, "F")<0) TEST_ERROR;
+ if(H5Gmove2(group_id, "A", group_id, "F")<0) TEST_ERROR
/* Verify */
- if(check_name(group3_id, "/g4/F/B", "/g4/F/B") < 0) TEST_ERROR;
+ if(check_name(group3_id, "/g4/F/B", "/g4/F/B") < 0) TEST_ERROR
/* Verify */
- if(check_name(group2_id, "/g4/F", "/g4/F") < 0) TEST_ERROR;
+ if(check_name(group2_id, "/g4/F", "/g4/F") < 0) TEST_ERROR
/* Close */
- H5Gclose( group_id );
- H5Gclose( group2_id );
- H5Gclose( group3_id );
- H5Gclose( group4_id );
- H5Gclose( group5_id );
+ H5Gclose(group_id);
+ H5Gclose(group2_id);
+ H5Gclose(group3_id);
+ H5Gclose(group4_id);
+ H5Gclose(group5_id);
PASSED();
@@ -515,22 +515,22 @@ test_main(hid_t file_id, hid_t fapl)
if((group4_id = H5Gcreate2(file_id, "g7", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) FAIL_STACK_ERROR
/* Verify */
- if(check_name(group3_id, "/g6/A/B", "/g6/A/B") < 0) TEST_ERROR;
+ if(check_name(group3_id, "/g6/A/B", "/g6/A/B") < 0) TEST_ERROR
/* Move group "A" to "C"*/
- if (H5Gmove( file_id, "/g6/A", "/g7/C" )<0) TEST_ERROR;
+ if(H5Gmove(file_id, "/g6/A", "/g7/C")<0) TEST_ERROR
/* Verify */
- if(check_name(group2_id, "/g7/C", "/g7/C") < 0) TEST_ERROR;
+ if(check_name(group2_id, "/g7/C", "/g7/C") < 0) TEST_ERROR
/* Verify */
- if(check_name(group3_id, "/g7/C/B", "/g7/C/B") < 0) TEST_ERROR;
+ if(check_name(group3_id, "/g7/C/B", "/g7/C/B") < 0) TEST_ERROR
/* Close */
- H5Gclose( group_id );
- H5Gclose( group2_id );
- H5Gclose( group3_id );
- H5Gclose( group4_id );
+ H5Gclose(group_id);
+ H5Gclose(group2_id);
+ H5Gclose(group3_id);
+ H5Gclose(group4_id);
PASSED();
@@ -545,13 +545,13 @@ test_main(hid_t file_id, hid_t fapl)
if((group_id = H5Gcreate2(file_id, "/g8", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) FAIL_STACK_ERROR
/* Delete */
- if (H5Gunlink( file_id, "/g8")<0) TEST_ERROR;
+ if(H5Gunlink(file_id, "/g8")<0) TEST_ERROR
/* Verify */
- if(check_name(group_id, "", "") < 0) TEST_ERROR;
+ if(check_name(group_id, "", "") < 0) TEST_ERROR
/* Close */
- H5Gclose( group_id );
+ H5Gclose(group_id);
PASSED();
@@ -568,37 +568,37 @@ test_main(hid_t file_id, hid_t fapl)
if((group3_id = H5Gcreate2(file_id, "g9/a/b", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) FAIL_STACK_ERROR
/* Delete */
- if (H5Gunlink( file_id, "/g9/a")<0) TEST_ERROR;
+ if(H5Gunlink(file_id, "/g9/a")<0) TEST_ERROR
/* Verify */
- if(check_name(group2_id, "", "") < 0) TEST_ERROR;
+ if(check_name(group2_id, "", "") < 0) TEST_ERROR
/* Verify */
- if(check_name(group3_id, "", "") < 0) TEST_ERROR;
+ if(check_name(group3_id, "", "") < 0) TEST_ERROR
/* Close */
- H5Gclose( group2_id );
- H5Gclose( group3_id );
+ H5Gclose(group2_id);
+ H5Gclose(group3_id);
/* Recreate groups */
if((group2_id = H5Gcreate2(group_id, "a", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) FAIL_STACK_ERROR
if((group3_id = H5Gcreate2(group_id, "a/b", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) FAIL_STACK_ERROR
/* Delete, using relative path */
- if (H5Gunlink( group_id, "a")<0) TEST_ERROR;
+ if(H5Gunlink(group_id, "a")<0) TEST_ERROR
/* Verify */
- if(check_name(group2_id, "", "") < 0) TEST_ERROR;
+ if(check_name(group2_id, "", "") < 0) TEST_ERROR
/* Verify */
- if(check_name(group3_id, "", "") < 0) TEST_ERROR;
+ if(check_name(group3_id, "", "") < 0) TEST_ERROR
/* Close */
- H5Gclose( group2_id );
- H5Gclose( group3_id );
+ H5Gclose(group2_id);
+ H5Gclose(group3_id);
/* Close */
- H5Gclose( group_id );
+ H5Gclose(group_id);
/* Create group "g10/a/b" */
if((group_id = H5Gcreate2(file_id, "g10", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) FAIL_STACK_ERROR
@@ -606,29 +606,29 @@ test_main(hid_t file_id, hid_t fapl)
if((group3_id = H5Gcreate2(file_id, "g10/a/b", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) FAIL_STACK_ERROR
/* Delete */
- if (H5Gunlink( file_id, "/g10/a/b")<0) TEST_ERROR;
+ if(H5Gunlink(file_id, "/g10/a/b")<0) TEST_ERROR
/* Verify */
- if(check_name(group3_id, "", "") < 0) TEST_ERROR;
+ if(check_name(group3_id, "", "") < 0) TEST_ERROR
/* Close */
- H5Gclose( group3_id );
+ H5Gclose(group3_id);
/* Recreate group */
if((group3_id = H5Gcreate2(group_id, "a/b", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) FAIL_STACK_ERROR
/* Delete, using relative path */
- if (H5Gunlink( group_id, "a/b")<0) TEST_ERROR;
+ if(H5Gunlink(group_id, "a/b")<0) TEST_ERROR
/* Verify */
- if(check_name(group3_id, "", "") < 0) TEST_ERROR;
+ if(check_name(group3_id, "", "") < 0) TEST_ERROR
/* Close */
- H5Gclose( group3_id );
+ H5Gclose(group3_id);
/* Close */
- H5Gclose( group_id );
- H5Gclose( group2_id );
+ H5Gclose(group_id);
+ H5Gclose(group2_id);
PASSED();
@@ -645,25 +645,25 @@ test_main(hid_t file_id, hid_t fapl)
if((group2_id = H5Gcreate2(file_id, "g11/g", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) FAIL_STACK_ERROR
/* Create two datasets "g11/d" and "g11/g/d"*/
- if ((space_id = H5Screate_simple( 1, dims, NULL ))<0) TEST_ERROR;
- if ((dataset_id = H5Dcreate( group_id , "d", H5T_NATIVE_INT, space_id, H5P_DEFAULT ))<0) TEST_ERROR;
- if ((dataset2_id = H5Dcreate( group2_id , "d", H5T_NATIVE_INT, space_id, H5P_DEFAULT ))<0) TEST_ERROR;
+ if((space_id = H5Screate_simple(1, dims, NULL))<0) TEST_ERROR
+ if((dataset_id = H5Dcreate(group_id , "d", H5T_NATIVE_INT, space_id, H5P_DEFAULT))<0) TEST_ERROR
+ if((dataset2_id = H5Dcreate(group2_id , "d", H5T_NATIVE_INT, space_id, H5P_DEFAULT))<0) TEST_ERROR
/* Delete */
- if (H5Gunlink( file_id, "/g11/d")<0) TEST_ERROR;
+ if(H5Gunlink(file_id, "/g11/d")<0) TEST_ERROR
/* Verify */
- if(check_name(dataset_id, "", "") < 0) TEST_ERROR;
+ if(check_name(dataset_id, "", "") < 0) TEST_ERROR
/* Verify */
- if(check_name(dataset2_id, "/g11/g/d", "/g11/g/d") < 0) TEST_ERROR;
+ if(check_name(dataset2_id, "/g11/g/d", "/g11/g/d") < 0) TEST_ERROR
/* Close */
- H5Dclose( dataset_id );
- H5Dclose( dataset2_id );
- H5Sclose( space_id );
- H5Gclose( group_id );
- H5Gclose( group2_id );
+ H5Dclose(dataset_id);
+ H5Dclose(dataset2_id);
+ H5Sclose(space_id);
+ H5Gclose(group_id);
+ H5Gclose(group2_id);
PASSED();
@@ -679,35 +679,35 @@ test_main(hid_t file_id, hid_t fapl)
if((group_id = H5Gcreate2(file_id, "/g12", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) FAIL_STACK_ERROR
/* Close */
- H5Gclose( group_id );
+ H5Gclose(group_id);
/* Create second file and dataset "d" in it */
file1_id = H5Fcreate(filename1, H5F_ACC_TRUNC, H5P_DEFAULT, fapl);
/* Create a dataspace */
- if ((space_id = H5Screate_simple( 1, dims, NULL ))<0) TEST_ERROR;
+ if((space_id = H5Screate_simple(1, dims, NULL))<0) TEST_ERROR
/* Create the dataset */
- if ((dataset_id = H5Dcreate( file1_id , "d", H5T_NATIVE_INT, space_id, H5P_DEFAULT ))<0) TEST_ERROR;
+ if((dataset_id = H5Dcreate(file1_id , "d", H5T_NATIVE_INT, space_id, H5P_DEFAULT))<0) TEST_ERROR
/* Close */
- H5Dclose( dataset_id );
+ H5Dclose(dataset_id);
/* Mount second file under "g12" in the first file */
- if (H5Fmount(file_id, "/g12", file1_id, H5P_DEFAULT)<0) TEST_ERROR;
+ if(H5Fmount(file_id, "/g12", file1_id, H5P_DEFAULT)<0) TEST_ERROR
/* Access dataset D in the first file under "/G/D" name */
- if ((dataset_id = H5Dopen( file_id, "/g12/d"))<0) TEST_ERROR;
+ if((dataset_id = H5Dopen(file_id, "/g12/d"))<0) TEST_ERROR
/* Verify */
- if(check_name(dataset_id, "/g12/d", "/g12/d") < 0) TEST_ERROR;
+ if(check_name(dataset_id, "/g12/d", "/g12/d") < 0) TEST_ERROR
- if (H5Funmount(file_id, "/g12")<0) TEST_ERROR;
+ if(H5Funmount(file_id, "/g12")<0) TEST_ERROR
/* Close */
- H5Dclose( dataset_id );
- H5Fclose( file1_id );
- H5Sclose( space_id );
+ H5Dclose(dataset_id);
+ H5Fclose(file1_id);
+ H5Sclose(space_id);
PASSED();
@@ -726,9 +726,9 @@ test_main(hid_t file_id, hid_t fapl)
if((group3_id = H5Gcreate2(file_id, "/g13/g1/g2", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) FAIL_STACK_ERROR
/* Close */
- H5Gclose( group_id );
- H5Gclose( group2_id );
- H5Gclose( group3_id );
+ H5Gclose(group_id);
+ H5Gclose(group2_id);
+ H5Gclose(group3_id);
/* Create second file and group "g" in it */
file1_id = H5Fcreate(filename1, H5F_ACC_TRUNC, H5P_DEFAULT, fapl);
@@ -738,165 +738,165 @@ test_main(hid_t file_id, hid_t fapl)
if((group3_id = H5Gcreate2(file1_id, "/g14/g3/g4", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) FAIL_STACK_ERROR
/* Close */
- H5Gclose( group_id );
- H5Gclose( group2_id );
- H5Gclose( group3_id );
+ if(H5Gclose(group_id) < 0) FAIL_STACK_ERROR
+ if(H5Gclose(group2_id) < 0) FAIL_STACK_ERROR
+ if(H5Gclose(group3_id) < 0) FAIL_STACK_ERROR
/* Mount second file under "/g13/g1" in the first file */
- if (H5Fmount(file_id, "/g13/g1", file1_id, H5P_DEFAULT)<0) TEST_ERROR;
+ if(H5Fmount(file_id, "/g13/g1", file1_id, H5P_DEFAULT) < 0) FAIL_STACK_ERROR
/* Access group in the first file */
- if ((group_id = H5Gopen( file_id, "/g13/g1/g14/g3/g4"))<0) TEST_ERROR;
+ if((group_id = H5Gopen2(file_id, "/g13/g1/g14/g3/g4", H5P_DEFAULT)) < 0) FAIL_STACK_ERROR
/* Verify */
- if(check_name(group_id, "/g13/g1/g14/g3/g4", "/g13/g1/g14/g3/g4") < 0) TEST_ERROR;
+ if(check_name(group_id, "/g13/g1/g14/g3/g4", "/g13/g1/g14/g3/g4") < 0) TEST_ERROR
- if (H5Funmount(file_id, "/g13/g1")<0) TEST_ERROR;
+ if(H5Funmount(file_id, "/g13/g1") < 0) FAIL_STACK_ERROR
/* Verify */
- if(check_name(group_id, "/g14/g3/g4", "") < 0) TEST_ERROR;
+ if(check_name(group_id, "/g14/g3/g4", "") < 0) TEST_ERROR
/* Close */
- H5Gclose( group_id );
+ if(H5Gclose(group_id) < 0) FAIL_STACK_ERROR
/* Access group in the file to mount */
- if ((group3_id = H5Gopen( file1_id, "/g14/g3/g4"))<0) TEST_ERROR;
+ if((group3_id = H5Gopen2(file1_id, "/g14/g3/g4", H5P_DEFAULT)) < 0) FAIL_STACK_ERROR
- /* Mount second file under "/g13/g1" in the first file (again) */
- if (H5Fmount(file_id, "/g13/g1", file1_id, H5P_DEFAULT)<0) TEST_ERROR;
+ /* Mount second file under "/g13/g1" in the first file(again) */
+ if(H5Fmount(file_id, "/g13/g1", file1_id, H5P_DEFAULT) < 0) FAIL_STACK_ERROR
/* Get a group ID for the parent of the newly mounted group */
- if ((group2_id = H5Gopen( file_id, "/g13"))<0) TEST_ERROR;
+ if((group2_id = H5Gopen2(file_id, "/g13", H5P_DEFAULT)) < 0) FAIL_STACK_ERROR
/* Access group in the first file */
- if ((group_id = H5Gopen( file_id, "/g13/g1/g14/g3/g4"))<0) TEST_ERROR;
+ if((group_id = H5Gopen2(file_id, "/g13/g1/g14/g3/g4", H5P_DEFAULT)) < 0) FAIL_STACK_ERROR
/* Verify */
- if(check_name(group_id, "/g13/g1/g14/g3/g4", "/g13/g1/g14/g3/g4") < 0) TEST_ERROR;
- if(check_name(group3_id, "/g14/g3/g4", "/g14/g3/g4") < 0) TEST_ERROR;
+ if(check_name(group_id, "/g13/g1/g14/g3/g4", "/g13/g1/g14/g3/g4") < 0) TEST_ERROR
+ if(check_name(group3_id, "/g14/g3/g4", "/g14/g3/g4") < 0) TEST_ERROR
- if (H5Funmount(group2_id, "g1")<0) TEST_ERROR;
+ if(H5Funmount(group2_id, "g1") < 0) FAIL_STACK_ERROR
/* Verify */
- if(check_name(group_id, "/g14/g3/g4", "") < 0) TEST_ERROR;
- if(check_name(group3_id, "/g14/g3/g4", "/g14/g3/g4") < 0) TEST_ERROR;
+ if(check_name(group_id, "/g14/g3/g4", "") < 0) TEST_ERROR
+ if(check_name(group3_id, "/g14/g3/g4", "/g14/g3/g4") < 0) TEST_ERROR
/* Close */
- H5Gclose( group_id );
- H5Gclose( group2_id );
- H5Gclose( group3_id );
+ if(H5Gclose(group_id) < 0) FAIL_STACK_ERROR
+ if(H5Gclose(group2_id) < 0) FAIL_STACK_ERROR
+ if(H5Gclose(group3_id) < 0) FAIL_STACK_ERROR
- /* Mount second file under "/g13/g1" in the first file (again) */
- if (H5Fmount(file_id, "/g13/g1", file1_id, H5P_DEFAULT)<0) TEST_ERROR;
+ /* Mount second file under "/g13/g1" in the first file(again) */
+ if(H5Fmount(file_id, "/g13/g1", file1_id, H5P_DEFAULT) < 0) FAIL_STACK_ERROR
/* Get a group ID for the newly mounted group */
- if ((group2_id = H5Gopen( file_id, "/g13/g1"))<0) TEST_ERROR;
+ if((group2_id = H5Gopen2(file_id, "/g13/g1", H5P_DEFAULT)) < 0) FAIL_STACK_ERROR
/* Access group in the first file */
- if ((group_id = H5Gopen( file_id, "/g13/g1/g14/g3/g4"))<0) TEST_ERROR;
+ if((group_id = H5Gopen2(file_id, "/g13/g1/g14/g3/g4", H5P_DEFAULT)) < 0) FAIL_STACK_ERROR
/* Verify */
- if(check_name(group_id, "/g13/g1/g14/g3/g4", "/g13/g1/g14/g3/g4") < 0) TEST_ERROR;
- if(check_name(group2_id, "/g13/g1", "/g13/g1") < 0) TEST_ERROR;
+ if(check_name(group_id, "/g13/g1/g14/g3/g4", "/g13/g1/g14/g3/g4") < 0) TEST_ERROR
+ if(check_name(group2_id, "/g13/g1", "/g13/g1") < 0) TEST_ERROR
- if (H5Funmount(group2_id, ".")<0) TEST_ERROR;
+ if(H5Funmount(group2_id, ".") < 0) FAIL_STACK_ERROR
/* Verify */
- if(check_name(group_id, "/g14/g3/g4", "") < 0) TEST_ERROR;
- if(check_name(group2_id, "/", "") < 0) TEST_ERROR;
+ if(check_name(group_id, "/g14/g3/g4", "") < 0) TEST_ERROR
+ if(check_name(group2_id, "/", "") < 0) TEST_ERROR
/* Close */
- H5Gclose( group_id );
- H5Gclose( group2_id );
+ if(H5Gclose(group_id) < 0) FAIL_STACK_ERROR
+ if(H5Gclose(group2_id) < 0) FAIL_STACK_ERROR
/* Mount second file under "/g13/g1" in the first file, using relative path */
- if ((group3_id = H5Gopen( file_id, "/g13"))<0) TEST_ERROR;
+ if((group3_id = H5Gopen2(file_id, "/g13", H5P_DEFAULT)) < 0) FAIL_STACK_ERROR
/* Verify */
- if(check_name(group3_id, "/g13", "/g13") < 0) TEST_ERROR;
+ if(check_name(group3_id, "/g13", "/g13") < 0) TEST_ERROR
- if (H5Fmount(group3_id, "g1", file1_id, H5P_DEFAULT)<0) TEST_ERROR;
+ if(H5Fmount(group3_id, "g1", file1_id, H5P_DEFAULT) < 0) FAIL_STACK_ERROR
/* Get a group ID for the newly mounted group */
- if ((group2_id = H5Gopen( file_id, "/g13/g1"))<0) TEST_ERROR;
+ if((group2_id = H5Gopen2(file_id, "/g13/g1", H5P_DEFAULT)) < 0) FAIL_STACK_ERROR
/* Verify */
- if(check_name(group2_id, "/g13/g1", "/g13/g1") < 0) TEST_ERROR;
+ if(check_name(group2_id, "/g13/g1", "/g13/g1") < 0) TEST_ERROR
/* Access group in the first file */
- if ((group_id = H5Gopen( file_id, "/g13/g1/g14/g3/g4"))<0) TEST_ERROR;
+ if((group_id = H5Gopen2(file_id, "/g13/g1/g14/g3/g4", H5P_DEFAULT)) < 0) FAIL_STACK_ERROR
/* Verify */
- if(check_name(group_id, "/g13/g1/g14/g3/g4", "/g13/g1/g14/g3/g4") < 0) TEST_ERROR;
+ if(check_name(group_id, "/g13/g1/g14/g3/g4", "/g13/g1/g14/g3/g4") < 0) TEST_ERROR
/* Close */
- H5Gclose( group_id );
+ if(H5Gclose(group_id) < 0) FAIL_STACK_ERROR
/* Access group in the first file, with relative path */
- if ((group_id = H5Gopen( group2_id, "g14/g3/g4"))<0) TEST_ERROR;
+ if((group_id = H5Gopen2(group2_id, "g14/g3/g4", H5P_DEFAULT)) < 0) FAIL_STACK_ERROR
/* Verify */
- if(check_name(group_id, "/g13/g1/g14/g3/g4", "/g13/g1/g14/g3/g4") < 0) TEST_ERROR;
+ if(check_name(group_id, "/g13/g1/g14/g3/g4", "/g13/g1/g14/g3/g4") < 0) TEST_ERROR
/* Close */
- H5Gclose( group_id );
+ if(H5Gclose(group_id) < 0) FAIL_STACK_ERROR
- if (H5Funmount(group2_id, ".")<0) TEST_ERROR;
+ if(H5Funmount(group2_id, ".") < 0) FAIL_STACK_ERROR
/* Verify */
- if(check_name(group2_id, "/", "") < 0) TEST_ERROR;
+ if(check_name(group2_id, "/", "") < 0) TEST_ERROR
/* Close */
- H5Gclose( group2_id );
- H5Gclose( group3_id );
+ if(H5Gclose(group2_id) < 0) FAIL_STACK_ERROR
+ if(H5Gclose(group3_id) < 0) FAIL_STACK_ERROR
/* Mount second file under "/g13/g1" in the first file, using relative path */
- if ((group3_id = H5Gopen( file_id, "/g13/g1"))<0) TEST_ERROR;
+ if((group3_id = H5Gopen2(file_id, "/g13/g1", H5P_DEFAULT)) < 0) FAIL_STACK_ERROR
/* Verify */
- if(check_name(group3_id, "/g13/g1", "/g13/g1") < 0) TEST_ERROR;
+ if(check_name(group3_id, "/g13/g1", "/g13/g1") < 0) TEST_ERROR
- if (H5Fmount(group3_id, ".", file1_id, H5P_DEFAULT)<0) TEST_ERROR;
+ if(H5Fmount(group3_id, ".", file1_id, H5P_DEFAULT) < 0) FAIL_STACK_ERROR
/* Get a group ID for the newly mounted group */
- if ((group2_id = H5Gopen( file_id, "/g13/g1"))<0) TEST_ERROR;
+ if((group2_id = H5Gopen2(file_id, "/g13/g1", H5P_DEFAULT)) < 0) FAIL_STACK_ERROR
/* Verify */
- if(check_name(group2_id, "/g13/g1", "/g13/g1") < 0) TEST_ERROR;
+ if(check_name(group2_id, "/g13/g1", "/g13/g1") < 0) TEST_ERROR
/* Access group in the first file */
- if ((group_id = H5Gopen( file_id, "/g13/g1/g14/g3/g4"))<0) TEST_ERROR;
+ if((group_id = H5Gopen2(file_id, "/g13/g1/g14/g3/g4", H5P_DEFAULT)) < 0) FAIL_STACK_ERROR
/* Verify */
- if(check_name(group_id, "/g13/g1/g14/g3/g4", "/g13/g1/g14/g3/g4") < 0) TEST_ERROR;
+ if(check_name(group_id, "/g13/g1/g14/g3/g4", "/g13/g1/g14/g3/g4") < 0) TEST_ERROR
/* Close */
- H5Gclose( group_id );
+ if(H5Gclose(group_id) < 0) FAIL_STACK_ERROR
/* Access group in the first file, with relative path */
- if ((group_id = H5Gopen( group2_id, "g14/g3/g4"))<0) TEST_ERROR;
+ if((group_id = H5Gopen2(group2_id, "g14/g3/g4", H5P_DEFAULT)) < 0) FAIL_STACK_ERROR
/* Verify */
- if(check_name(group_id, "/g13/g1/g14/g3/g4", "/g13/g1/g14/g3/g4") < 0) TEST_ERROR;
+ if(check_name(group_id, "/g13/g1/g14/g3/g4", "/g13/g1/g14/g3/g4") < 0) TEST_ERROR
/* Close */
- H5Gclose( group_id );
+ if(H5Gclose(group_id) < 0) FAIL_STACK_ERROR
- if (H5Funmount(group2_id, ".")<0) TEST_ERROR;
+ if(H5Funmount(group2_id, ".") < 0) FAIL_STACK_ERROR
/* Verify */
- if(check_name(group2_id, "/", "") < 0) TEST_ERROR;
- if(check_name(group3_id, "/g13/g1", "/g13/g1") < 0) TEST_ERROR;
+ if(check_name(group2_id, "/", "") < 0) TEST_ERROR
+ if(check_name(group3_id, "/g13/g1", "/g13/g1") < 0) TEST_ERROR
/* Close */
- H5Gclose( group2_id );
- H5Gclose( group3_id );
+ if(H5Gclose(group2_id) < 0) FAIL_STACK_ERROR
+ if(H5Gclose(group3_id) < 0) FAIL_STACK_ERROR
- H5Fclose( file1_id );
+ if(H5Fclose(file1_id) < 0) FAIL_STACK_ERROR
PASSED();
@@ -916,10 +916,10 @@ test_main(hid_t file_id, hid_t fapl)
if((group4_id = H5Gcreate2(file_id, "/g15/g1/g2/g3", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) FAIL_STACK_ERROR
/* Close */
- H5Gclose( group_id );
- H5Gclose( group2_id );
- H5Gclose( group3_id );
- H5Gclose( group4_id );
+ H5Gclose(group_id);
+ H5Gclose(group2_id);
+ H5Gclose(group3_id);
+ H5Gclose(group4_id);
/* Create second file and group "g" in it */
file1_id = H5Fcreate(filename1, H5F_ACC_TRUNC, H5P_DEFAULT, fapl);
@@ -929,37 +929,37 @@ test_main(hid_t file_id, hid_t fapl)
if((group3_id = H5Gcreate2(file1_id, "/g16/g4/g5", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) FAIL_STACK_ERROR
/* Close */
- H5Gclose( group_id );
- H5Gclose( group2_id );
- H5Gclose( group3_id );
+ if(H5Gclose(group_id) < 0) FAIL_STACK_ERROR
+ if(H5Gclose(group2_id) < 0) FAIL_STACK_ERROR
+ if(H5Gclose(group3_id) < 0) FAIL_STACK_ERROR
/* Access group in the first file */
- if ((group_id = H5Gopen( file_id, "/g15/g1/g2/g3"))<0) TEST_ERROR;
+ if((group_id = H5Gopen2(file_id, "/g15/g1/g2/g3", H5P_DEFAULT)) < 0) FAIL_STACK_ERROR
/* Mount second file under "/g13/g1" in the first file */
- if (H5Fmount(file_id, "/g15/g1", file1_id, H5P_DEFAULT)<0) TEST_ERROR;
+ if(H5Fmount(file_id, "/g15/g1", file1_id, H5P_DEFAULT) < 0) FAIL_STACK_ERROR
/* Access group in the second file */
- if ((group2_id = H5Gopen( file_id, "/g15/g1/g16/g4/g5"))<0) TEST_ERROR;
+ if((group2_id = H5Gopen2(file_id, "/g15/g1/g16/g4/g5", H5P_DEFAULT)) < 0) FAIL_STACK_ERROR
/* Verify */
- if(check_name(group_id, "", "/g15/g1/g2/g3") < 0) TEST_ERROR;
+ if(check_name(group_id, "", "/g15/g1/g2/g3") < 0) TEST_ERROR
/* Verify */
- if(check_name(group2_id, "/g15/g1/g16/g4/g5", "/g15/g1/g16/g4/g5") < 0) TEST_ERROR;
+ if(check_name(group2_id, "/g15/g1/g16/g4/g5", "/g15/g1/g16/g4/g5") < 0) TEST_ERROR
- if (H5Funmount(file_id, "/g15/g1")<0) TEST_ERROR;
+ if(H5Funmount(file_id, "/g15/g1") < 0) FAIL_STACK_ERROR
/* Verify */
- if(check_name(group_id, "/g15/g1/g2/g3", "/g15/g1/g2/g3") < 0) TEST_ERROR;
+ if(check_name(group_id, "/g15/g1/g2/g3", "/g15/g1/g2/g3") < 0) TEST_ERROR
/* Verify */
- if(check_name(group2_id, "/g16/g4/g5", "") < 0) TEST_ERROR;
+ if(check_name(group2_id, "/g16/g4/g5", "") < 0) TEST_ERROR
/* Close */
- H5Gclose( group_id );
- H5Gclose( group2_id );
- H5Fclose( file1_id );
+ if(H5Gclose(group_id) < 0) FAIL_STACK_ERROR
+ if(H5Gclose(group2_id) < 0) FAIL_STACK_ERROR
+ if(H5Fclose(file1_id) < 0) FAIL_STACK_ERROR
PASSED();
@@ -973,53 +973,53 @@ test_main(hid_t file_id, hid_t fapl)
TESTING("H5Iget_name with a defined type dataset");
/* Create a datatype */
- if ((type_id = H5Tcreate (H5T_COMPOUND, sizeof(s1_t)))<0) TEST_ERROR;
+ if((type_id = H5Tcreate(H5T_COMPOUND, sizeof(s1_t)))<0) TEST_ERROR
/* Insert fields */
- if (H5Tinsert (type_id, "a", HOFFSET(s1_t,a), H5T_NATIVE_INT)<0) TEST_ERROR;
- if (H5Tinsert (type_id, "b", HOFFSET(s1_t,b), H5T_NATIVE_INT)<0) TEST_ERROR;
- if (H5Tinsert (type_id, "c", HOFFSET(s1_t,c), H5T_NATIVE_FLOAT)<0) TEST_ERROR;
+ if(H5Tinsert(type_id, "a", HOFFSET(s1_t,a), H5T_NATIVE_INT)<0) TEST_ERROR
+ if(H5Tinsert(type_id, "b", HOFFSET(s1_t,b), H5T_NATIVE_INT)<0) TEST_ERROR
+ if(H5Tinsert(type_id, "c", HOFFSET(s1_t,c), H5T_NATIVE_FLOAT)<0) TEST_ERROR
/* Create group "g17" */
if((group_id = H5Gcreate2(file_id, "g17", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) FAIL_STACK_ERROR
/* Save datatype for later */
- if (H5Tcommit (group_id, "t", type_id)<0) TEST_ERROR;
+ if(H5Tcommit(group_id, "t", type_id)<0) TEST_ERROR
/* Create a dataspace */
- if ((space_id = H5Screate_simple( 1, dims, NULL ))<0) TEST_ERROR;
+ if((space_id = H5Screate_simple(1, dims, NULL))<0) TEST_ERROR
/* Create a new dataset */
- if ((dataset_id = H5Dcreate( group_id , "d", type_id, space_id,
- H5P_DEFAULT ))<0) TEST_ERROR;
+ if((dataset_id = H5Dcreate(group_id , "d", type_id, space_id,
+ H5P_DEFAULT))<0) TEST_ERROR
/* Close */
- H5Dclose( dataset_id );
- H5Tclose( type_id );
- H5Sclose( space_id );
- H5Gclose( group_id );
+ H5Dclose(dataset_id);
+ H5Tclose(type_id);
+ H5Sclose(space_id);
+ H5Gclose(group_id);
/* Open the named datatype */
- if((type_id=H5Topen(file_id, "/g17/t"))<0) TEST_ERROR;
+ if((type_id=H5Topen(file_id, "/g17/t"))<0) TEST_ERROR
/* Verify */
- if(check_name(type_id, "/g17/t", "/g17/t") < 0) TEST_ERROR;
+ if(check_name(type_id, "/g17/t", "/g17/t") < 0) TEST_ERROR
/* Close datatype */
H5Tclose(type_id);
/* Reopen the dataset */
- if ((dataset_id = H5Dopen( file_id, "/g17/d"))<0) TEST_ERROR;
+ if((dataset_id = H5Dopen(file_id, "/g17/d"))<0) TEST_ERROR
/* Get datatype*/
- if((type_id=H5Dget_type(dataset_id))<0) TEST_ERROR;
+ if((type_id=H5Dget_type(dataset_id))<0) TEST_ERROR
/* Verify */
- if(check_name(type_id, "/g17/t", "/g17/t") < 0) TEST_ERROR;
+ if(check_name(type_id, "/g17/t", "/g17/t") < 0) TEST_ERROR
/* Close */
- H5Dclose( dataset_id );
- H5Tclose( type_id );
+ H5Dclose(dataset_id);
+ H5Tclose(type_id);
PASSED();
@@ -1032,18 +1032,18 @@ test_main(hid_t file_id, hid_t fapl)
TESTING("H5Iget_name with datasets that have two names");
/* Open dataset named "d"*/
-if ((dataset_id = H5Dopen( file_id, "/g17/d"))<0) TEST_ERROR;
+if((dataset_id = H5Dopen(file_id, "/g17/d"))<0) TEST_ERROR
/* Create link to dataset named "link" */
-if (H5Glink2(dataset_id,".",H5G_LINK_HARD,file_id,"/g17/link")<0) TEST_ERROR;
-if ((dataset2_id = H5Dopen( file_id, "/g17/link"))<0) TEST_ERROR;
+if(H5Glink2(dataset_id,".",H5G_LINK_HARD,file_id,"/g17/link")<0) TEST_ERROR
+if((dataset2_id = H5Dopen(file_id, "/g17/link"))<0) TEST_ERROR
/* Make sure that the two IDs use two different names */
- if(check_name(dataset_id, "/g17/d", "/g17/d") < 0) TEST_ERROR;
- if(check_name(dataset2_id, "/g17/link", "/g17/link") < 0) TEST_ERROR;
+ if(check_name(dataset_id, "/g17/d", "/g17/d") < 0) TEST_ERROR
+ if(check_name(dataset2_id, "/g17/link", "/g17/link") < 0) TEST_ERROR
-if(H5Dclose(dataset_id)<0) TEST_ERROR;
-if(H5Dclose(dataset2_id)<0) TEST_ERROR;
+if(H5Dclose(dataset_id)<0) TEST_ERROR
+if(H5Dclose(dataset2_id)<0) TEST_ERROR
PASSED();
@@ -1055,35 +1055,35 @@ PASSED();
TESTING("H5Iget_name with different files");
/* Create a new file using default properties. */
- if ((file2_id = H5Fcreate( filename2, H5F_ACC_TRUNC, H5P_DEFAULT, fapl ))<0) TEST_ERROR;
+ if((file2_id = H5Fcreate(filename2, H5F_ACC_TRUNC, H5P_DEFAULT, fapl))<0) TEST_ERROR
/* Create a new file using default properties. */
- if ((file3_id = H5Fcreate( filename3, H5F_ACC_TRUNC, H5P_DEFAULT, fapl ))<0) TEST_ERROR;
+ if((file3_id = H5Fcreate(filename3, H5F_ACC_TRUNC, H5P_DEFAULT, fapl))<0) TEST_ERROR
/* Create the dataspace */
- if ((space_id = H5Screate_simple( 1, dims, NULL ))<0) TEST_ERROR;
+ if((space_id = H5Screate_simple(1, dims, NULL))<0) TEST_ERROR
/* Create a new dataset */
- if ((dataset_id = H5Dcreate( file2_id , "d", H5T_NATIVE_INT, space_id, H5P_DEFAULT ))<0) TEST_ERROR;
+ if((dataset_id = H5Dcreate(file2_id , "d", H5T_NATIVE_INT, space_id, H5P_DEFAULT))<0) TEST_ERROR
/* Create a new dataset */
- if ((dataset2_id = H5Dcreate( file3_id , "d", H5T_NATIVE_INT, space_id, H5P_DEFAULT ))<0) TEST_ERROR;
+ if((dataset2_id = H5Dcreate(file3_id , "d", H5T_NATIVE_INT, space_id, H5P_DEFAULT))<0) TEST_ERROR
/* Delete */
- if (H5Gunlink( file2_id, "/d")<0) TEST_ERROR;
+ if(H5Gunlink(file2_id, "/d")<0) TEST_ERROR
/* Verify */
- if(check_name(dataset_id, "", "") < 0) TEST_ERROR;
+ if(check_name(dataset_id, "", "") < 0) TEST_ERROR
/* Verify */
- if(check_name(dataset2_id, "/d", "/d") < 0) TEST_ERROR;
+ if(check_name(dataset2_id, "/d", "/d") < 0) TEST_ERROR
/* Close */
- H5Dclose( dataset_id );
- H5Dclose( dataset2_id );
- H5Sclose( space_id );
- H5Fclose( file2_id );
- H5Fclose( file3_id );
+ H5Dclose(dataset_id);
+ H5Dclose(dataset2_id);
+ H5Sclose(space_id);
+ H5Fclose(file2_id);
+ H5Fclose(file3_id);
PASSED();
@@ -1096,35 +1096,35 @@ PASSED();
TESTING("H5Iget_name with different files #2");
/* Create a new file using default properties. */
- if ((file2_id = H5Fcreate( filename2, H5F_ACC_TRUNC, H5P_DEFAULT, fapl ))<0) TEST_ERROR;
+ if((file2_id = H5Fcreate(filename2, H5F_ACC_TRUNC, H5P_DEFAULT, fapl))<0) TEST_ERROR
/* Create a new file using default properties. */
- if ((file3_id = H5Fcreate( filename3, H5F_ACC_TRUNC, H5P_DEFAULT, fapl ))<0) TEST_ERROR;
+ if((file3_id = H5Fcreate(filename3, H5F_ACC_TRUNC, H5P_DEFAULT, fapl))<0) TEST_ERROR
/* Create the dataspace */
- if ((space_id = H5Screate_simple( 1, dims, NULL ))<0) TEST_ERROR;
+ if((space_id = H5Screate_simple(1, dims, NULL))<0) TEST_ERROR
/* Create a new dataset */
- if ((dataset_id = H5Dcreate( file2_id , "d", H5T_NATIVE_INT, space_id, H5P_DEFAULT ))<0) TEST_ERROR;
+ if((dataset_id = H5Dcreate(file2_id , "d", H5T_NATIVE_INT, space_id, H5P_DEFAULT))<0) TEST_ERROR
/* Create a new dataset */
- if ((dataset2_id = H5Dcreate( file3_id , "d", H5T_NATIVE_INT, space_id, H5P_DEFAULT ))<0) TEST_ERROR;
+ if((dataset2_id = H5Dcreate(file3_id , "d", H5T_NATIVE_INT, space_id, H5P_DEFAULT))<0) TEST_ERROR
/* Delete */
- if (H5Gunlink( file3_id, "/d")<0) TEST_ERROR;
+ if(H5Gunlink(file3_id, "/d")<0) TEST_ERROR
/* Verify */
- if(check_name(dataset_id, "/d", "/d") < 0) TEST_ERROR;
+ if(check_name(dataset_id, "/d", "/d") < 0) TEST_ERROR
/* Verify */
- if(check_name(dataset2_id, "", "") < 0) TEST_ERROR;
+ if(check_name(dataset2_id, "", "") < 0) TEST_ERROR
/* Close */
- H5Dclose( dataset_id );
- H5Dclose( dataset2_id );
- H5Sclose( space_id );
- H5Fclose( file2_id );
- H5Fclose( file3_id );
+ H5Dclose(dataset_id);
+ H5Dclose(dataset2_id);
+ H5Sclose(space_id);
+ H5Fclose(file2_id);
+ H5Fclose(file3_id);
PASSED();
@@ -1136,25 +1136,25 @@ PASSED();
TESTING("H5Iget_name with a small buffer for name");
/* Reopen the group */
- if ((group_id = H5Gopen( file_id, "/g17" ))<0) TEST_ERROR;
+ if((group_id = H5Gopen2(file_id, "/g17", H5P_DEFAULT)) < 0) FAIL_STACK_ERROR
{
/*small buffer to hold name and its size */
char name2[SMALL_NAME_BUF_SIZE];
/* Get name */
- name_len=H5Iget_name( group_id, name2, SMALL_NAME_BUF_SIZE );
+ name_len=H5Iget_name(group_id, name2, SMALL_NAME_BUF_SIZE);
/* Check that name is longer */
- if(name_len <= SMALL_NAME_BUF_SIZE) TEST_ERROR;
- if(HDstrcmp(name2, "/")) TEST_ERROR;
+ if(name_len <= SMALL_NAME_BUF_SIZE) TEST_ERROR
+ if(HDstrcmp(name2, "/")) TEST_ERROR
}
/* Verify */
- if(check_name(group_id, "/g17", "/g17") < 0) TEST_ERROR;
+ if(check_name(group_id, "/g17", "/g17") < 0) TEST_ERROR
/* Close */
- H5Gclose( group_id );
+ H5Gclose(group_id);
PASSED();
@@ -1167,7 +1167,7 @@ PASSED();
TESTING("H5Iget_name with a dynamic buffer for name");
/* Reopen the group */
- if ((group_id = H5Gopen( file_id, "/g17" ))<0) TEST_ERROR;
+ if((group_id = H5Gopen2(file_id, "/g17", H5P_DEFAULT)) < 0) FAIL_STACK_ERROR
/* Get name */
name_len = H5Iget_name(group_id, NULL, NAME_BUF_SIZE);
@@ -1178,26 +1178,26 @@ PASSED();
/* Include the extra null character */
name3 = HDmalloc(name_len + 1);
- if(!name3) TEST_ERROR;
+ if(!name3) TEST_ERROR
/* Get name with dynamic buffer */
- if(H5Iget_name(group_id, name3, name_len + 1) < 0) TEST_ERROR;
+ if(H5Iget_name(group_id, name3, name_len + 1) < 0) TEST_ERROR
/* Verify */
- if(HDstrcmp(name3, "/g17")) TEST_ERROR;
+ if(HDstrcmp(name3, "/g17")) TEST_ERROR
*name3 = '\0';
/* Get name with smaller buffer */
- if(H5Iget_name(group_id, name3, 3) < 0) TEST_ERROR;
+ if(H5Iget_name(group_id, name3, 3) < 0) TEST_ERROR
/* Verify */
- if(HDstrcmp(name3, "/g")) TEST_ERROR;
+ if(HDstrcmp(name3, "/g")) TEST_ERROR
HDfree(name3);
}
/* Close */
- H5Gclose( group_id );
+ H5Gclose(group_id);
PASSED();
@@ -1211,32 +1211,32 @@ PASSED();
TESTING("H5Iget_name with invalid IDs");
/* Create a dataspace */
- if ((space_id = H5Screate_simple( 1, dims, NULL ))<0) TEST_ERROR;
+ if((space_id = H5Screate_simple(1, dims, NULL))<0) TEST_ERROR
/* Define a datatype */
- if ((type_id = H5Tcopy(H5T_NATIVE_INT))<0) TEST_ERROR;
+ if((type_id = H5Tcopy(H5T_NATIVE_INT))<0) TEST_ERROR
/* Create a new dataset */
- if ((dataset_id = H5Dcreate( file_id , "d2", type_id, space_id, H5P_DEFAULT ))<0) TEST_ERROR;
+ if((dataset_id = H5Dcreate(file_id , "d2", type_id, space_id, H5P_DEFAULT))<0) TEST_ERROR
{
char name[NAME_BUF_SIZE]; /* Buffer to hold name and its size */
/* Get name for non commited datatype, it should fail */
H5E_BEGIN_TRY {
- if(H5Iget_name( type_id, name, NAME_BUF_SIZE) > 0) TEST_ERROR;
+ if(H5Iget_name(type_id, name, NAME_BUF_SIZE) > 0) TEST_ERROR
} H5E_END_TRY;
/* Get name for dataspace, it should fail */
H5E_BEGIN_TRY {
- if(H5Iget_name( space_id, name, NAME_BUF_SIZE) > 0) TEST_ERROR;
+ if(H5Iget_name(space_id, name, NAME_BUF_SIZE) > 0) TEST_ERROR
} H5E_END_TRY;
}
/* Close */
- H5Dclose( dataset_id );
- H5Sclose( space_id );
- H5Tclose( type_id );
+ H5Dclose(dataset_id);
+ H5Sclose(space_id);
+ H5Tclose(type_id);
PASSED();
@@ -1253,12 +1253,12 @@ PASSED();
if((group2_id = H5Gcreate2(file_id, "/g18/g2", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) FAIL_STACK_ERROR
/* Also create a dataset and a datatype */
- if ((space_id = H5Screate_simple( 1, dims, NULL ))<0) TEST_ERROR;
- if ((type_id = H5Tcopy(H5T_NATIVE_INT))<0) TEST_ERROR;
- if ((dataset_id = H5Dcreate( file_id, "g18/d2", type_id, space_id,
- H5P_DEFAULT ))<0) TEST_ERROR;
+ if((space_id = H5Screate_simple(1, dims, NULL))<0) TEST_ERROR
+ if((type_id = H5Tcopy(H5T_NATIVE_INT))<0) TEST_ERROR
+ if((dataset_id = H5Dcreate(file_id, "g18/d2", type_id, space_id,
+ H5P_DEFAULT))<0) TEST_ERROR
- if (H5Tcommit(file_id, "g18/t2", type_id) <0) TEST_ERROR;
+ if(H5Tcommit(file_id, "g18/t2", type_id) <0) TEST_ERROR
/* Create second file and group "/g3/g4/g5" in it */
file1_id = H5Fcreate(filename1, H5F_ACC_TRUNC, H5P_DEFAULT, fapl);
@@ -1267,56 +1267,56 @@ PASSED();
if((group5_id = H5Gcreate2(file1_id, "/g3/g4/g5", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) FAIL_STACK_ERROR
/* Mount first file at "g3/g4" in the second file */
- if (H5Fmount(file1_id, "/g3/g4", file_id, H5P_DEFAULT)<0) TEST_ERROR;
+ if(H5Fmount(file1_id, "/g3/g4", file_id, H5P_DEFAULT)<0) TEST_ERROR
/* Get name for the group ID in the first file, should be "/g18/g2" still */
- if(check_name(group2_id, "/g18/g2", "/g18/g2") < 0) TEST_ERROR;
+ if(check_name(group2_id, "/g18/g2", "/g18/g2") < 0) TEST_ERROR
/* Get name for the dataset ID in the first file, should be "/g18/g2/d2" still */
- if(check_name(dataset_id, "/g18/d2", "/g18/d2") < 0) TEST_ERROR;
+ if(check_name(dataset_id, "/g18/d2", "/g18/d2") < 0) TEST_ERROR
/* Get name for the datatype ID in the first file, should be "/g18/g2/t2" still */
- if(check_name(type_id, "/g18/t2", "/g18/t2") < 0) TEST_ERROR;
+ if(check_name(type_id, "/g18/t2", "/g18/t2") < 0) TEST_ERROR
/* Open the mounted group, dataset, and datatype through their new names */
- if ((group6_id = H5Gopen( file1_id, "/g3/g4/g18/g2" ))<0) TEST_ERROR;
- if ((dataset2_id = H5Dopen( file1_id, "/g3/g4/g18/d2" ))<0) TEST_ERROR;
- if ((type2_id = H5Topen( file1_id, "/g3/g4/g18/t2" ))<0) TEST_ERROR;
+ if((group6_id = H5Gopen2(file1_id, "/g3/g4/g18/g2", H5P_DEFAULT)) < 0) FAIL_STACK_ERROR
+ if((dataset2_id = H5Dopen(file1_id, "/g3/g4/g18/d2")) < 0) FAIL_STACK_ERROR
+ if((type2_id = H5Topen(file1_id, "/g3/g4/g18/t2")) < 0) FAIL_STACK_ERROR
/* Verify names */
- if(check_name(group6_id, "/g3/g4/g18/g2", "/g3/g4/g18/g2") < 0) TEST_ERROR;
- if(check_name(dataset2_id, "/g3/g4/g18/d2", "/g3/g4/g18/d2") < 0) TEST_ERROR;
- if(check_name(type2_id, "/g3/g4/g18/t2", "/g3/g4/g18/t2") < 0) TEST_ERROR;
+ if(check_name(group6_id, "/g3/g4/g18/g2", "/g3/g4/g18/g2") < 0) TEST_ERROR
+ if(check_name(dataset2_id, "/g3/g4/g18/d2", "/g3/g4/g18/d2") < 0) TEST_ERROR
+ if(check_name(type2_id, "/g3/g4/g18/t2", "/g3/g4/g18/t2") < 0) TEST_ERROR
/* Verify that old IDs still refer to objects by their old names */
- if(check_name(group2_id, "/g18/g2", "/g18/g2") < 0) TEST_ERROR;
- if(check_name(dataset_id, "/g18/d2", "/g18/d2") < 0) TEST_ERROR;
- if(check_name(type_id, "/g18/t2", "/g18/t2") < 0) TEST_ERROR;
+ if(check_name(group2_id, "/g18/g2", "/g18/g2") < 0) TEST_ERROR
+ if(check_name(dataset_id, "/g18/d2", "/g18/d2") < 0) TEST_ERROR
+ if(check_name(type_id, "/g18/t2", "/g18/t2") < 0) TEST_ERROR
/* Unmount */
- if (H5Funmount(file1_id, "/g3/g4")<0) TEST_ERROR;
+ if(H5Funmount(file1_id, "/g3/g4")<0) TEST_ERROR
/* Get name for the IDs of the first file, should be unchanged */
- if(check_name(group2_id, "/g18/g2", "/g18/g2") < 0) TEST_ERROR;
- if(check_name(dataset_id, "/g18/d2", "/g18/d2") < 0) TEST_ERROR;
- if(check_name(type_id, "/g18/t2", "/g18/t2") < 0) TEST_ERROR;
+ if(check_name(group2_id, "/g18/g2", "/g18/g2") < 0) TEST_ERROR
+ if(check_name(dataset_id, "/g18/d2", "/g18/d2") < 0) TEST_ERROR
+ if(check_name(type_id, "/g18/t2", "/g18/t2") < 0) TEST_ERROR
/* Get name for the IDs of the second file, should be local names now */
- if(check_name(group6_id, "/g18/g2", "") < 0) TEST_ERROR;
- if(check_name(dataset2_id, "/g18/d2", "") < 0) TEST_ERROR;
- if(check_name(type2_id, "/g18/t2", "") < 0) TEST_ERROR;
-
- H5Tclose( type_id );
- H5Tclose( type2_id );
- H5Dclose( dataset_id );
- H5Dclose( dataset2_id );
- H5Gclose( group_id );
- H5Gclose( group2_id );
- H5Gclose( group3_id );
- H5Gclose( group4_id );
- H5Gclose( group5_id );
- H5Gclose( group6_id );
- H5Fclose( file1_id );
+ if(check_name(group6_id, "/g18/g2", "") < 0) TEST_ERROR
+ if(check_name(dataset2_id, "/g18/d2", "") < 0) TEST_ERROR
+ if(check_name(type2_id, "/g18/t2", "") < 0) TEST_ERROR
+
+ H5Tclose(type_id);
+ H5Tclose(type2_id);
+ H5Dclose(dataset_id);
+ H5Dclose(dataset2_id);
+ H5Gclose(group_id);
+ H5Gclose(group2_id);
+ H5Gclose(group3_id);
+ H5Gclose(group4_id);
+ H5Gclose(group5_id);
+ H5Gclose(group6_id);
+ H5Fclose(file1_id);
PASSED();
@@ -1334,17 +1334,17 @@ PASSED();
if((group2_id = H5Gcreate2(file1_id, "/g1/g2", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) FAIL_STACK_ERROR
/* Verify */
- if(check_name(group2_id, "/g1/g2", "/g1/g2") < 0) TEST_ERROR;
+ if(check_name(group2_id, "/g1/g2", "/g1/g2") < 0) TEST_ERROR
/* Close file */
- H5Fclose( file1_id );
+ H5Fclose(file1_id);
/* Verify */
- if(check_name(group2_id, "/g1/g2", "/g1/g2") < 0) TEST_ERROR;
+ if(check_name(group2_id, "/g1/g2", "/g1/g2") < 0) TEST_ERROR
/* Close */
- H5Gclose( group_id );
- H5Gclose( group2_id );
+ H5Gclose(group_id);
+ H5Gclose(group2_id);
PASSED();
@@ -1362,36 +1362,36 @@ PASSED();
if((group2_id = H5Gcreate2(file1_id, "/g1/g2", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) FAIL_STACK_ERROR
/* Create a new file and group "/g3/g4" in it */
- if((file2_id = H5Fcreate(filename2, H5F_ACC_TRUNC, H5P_DEFAULT, fapl )) < 0) FAIL_STACK_ERROR
+ if((file2_id = H5Fcreate(filename2, H5F_ACC_TRUNC, H5P_DEFAULT, fapl)) < 0) FAIL_STACK_ERROR
if((group3_id = H5Gcreate2(file2_id, "/g3", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) FAIL_STACK_ERROR
if((group4_id = H5Gcreate2(file2_id, "/g3/g4", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) FAIL_STACK_ERROR
/* Mount first file at "/g3/g4" in the second file */
- if(H5Fmount(file2_id, "/g3/g4", file1_id, H5P_DEFAULT)<0) TEST_ERROR;
+ if(H5Fmount(file2_id, "/g3/g4", file1_id, H5P_DEFAULT)<0) TEST_ERROR
/* Open the mounted group */
- if ((group5_id = H5Gopen( file2_id, "/g3/g4/g1/g2" ))<0) TEST_ERROR;
+ if((group5_id = H5Gopen2(file2_id, "/g3/g4/g1/g2", H5P_DEFAULT)) < 0) FAIL_STACK_ERROR
/* Verify */
- if(check_name(group5_id, "/g3/g4/g1/g2", "/g3/g4/g1/g2") < 0) TEST_ERROR;
+ if(check_name(group5_id, "/g3/g4/g1/g2", "/g3/g4/g1/g2") < 0) TEST_ERROR
/* Delete */
- if (H5Gunlink( file1_id, "/g3/g4/g1/g2")<0) TEST_ERROR;
+ if(H5Gunlink(file1_id, "/g3/g4/g1/g2")<0) TEST_ERROR
/* Verify */
- if(check_name(group5_id, "", "") < 0) TEST_ERROR;
+ if(check_name(group5_id, "", "") < 0) TEST_ERROR
/* Verify */
- if(check_name(group2_id, "", "") < 0) TEST_ERROR;
+ if(check_name(group2_id, "", "") < 0) TEST_ERROR
/* Close */
- H5Gclose( group_id );
- H5Gclose( group2_id );
- H5Gclose( group3_id );
- H5Gclose( group4_id );
- H5Gclose( group5_id );
- H5Fclose( file1_id );
- H5Fclose( file2_id );
+ H5Gclose(group_id);
+ H5Gclose(group2_id);
+ H5Gclose(group3_id);
+ H5Gclose(group4_id);
+ H5Gclose(group5_id);
+ H5Fclose(file1_id);
+ H5Fclose(file2_id);
PASSED();
@@ -1410,89 +1410,89 @@ PASSED();
if((group2_id = H5Gcreate2(file1_id, "/g1/g2", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) FAIL_STACK_ERROR
/* Create a new file and group "/g3/g4" in it */
- if((file2_id = H5Fcreate(filename2, H5F_ACC_TRUNC, H5P_DEFAULT, fapl )) < 0) FAIL_STACK_ERROR
+ if((file2_id = H5Fcreate(filename2, H5F_ACC_TRUNC, H5P_DEFAULT, fapl)) < 0) FAIL_STACK_ERROR
if((group3_id = H5Gcreate2(file2_id, "/g3", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) FAIL_STACK_ERROR
if((group4_id = H5Gcreate2(file2_id, "/g3/g4", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) FAIL_STACK_ERROR
/* Mount first file at "g3/g4" in the second file */
- if(H5Fmount(file2_id, "/g3/g4", file1_id, H5P_DEFAULT)<0) TEST_ERROR;
+ if(H5Fmount(file2_id, "/g3/g4", file1_id, H5P_DEFAULT)<0) TEST_ERROR
/* Verify */
- if(check_name(group4_id, "/g3/g4", "/g3/g4") < 0) TEST_ERROR;
+ if(check_name(group4_id, "/g3/g4", "/g3/g4") < 0) TEST_ERROR
/* Open the mounted group */
- if ((group5_id = H5Gopen( file2_id, "/g3/g4/g1/g2" ))<0) TEST_ERROR;
+ if((group5_id = H5Gopen2(file2_id, "/g3/g4/g1/g2", H5P_DEFAULT)) < 0) FAIL_STACK_ERROR
/* Verify */
- if(check_name(group5_id, "/g3/g4/g1/g2", "/g3/g4/g1/g2") < 0) TEST_ERROR;
+ if(check_name(group5_id, "/g3/g4/g1/g2", "/g3/g4/g1/g2") < 0) TEST_ERROR
/* Open another mounted group, in the middle of the path */
- if ((group6_id = H5Gopen( file2_id, "/g3/g4/g1" ))<0) TEST_ERROR;
+ if((group6_id = H5Gopen2(file2_id, "/g3/g4/g1", H5P_DEFAULT)) < 0) FAIL_STACK_ERROR
/* Verify */
- if(check_name(group6_id, "/g3/g4/g1", "/g3/g4/g1") < 0) TEST_ERROR;
+ if(check_name(group6_id, "/g3/g4/g1", "/g3/g4/g1") < 0) TEST_ERROR
/* Rename group */
- if (H5Gmove( file2_id, "/g3/g4/g1/g2", "/g3/g4/g1/g5" )<0) TEST_ERROR;
+ if(H5Gmove(file2_id, "/g3/g4/g1/g2", "/g3/g4/g1/g5")<0) TEST_ERROR
/* Verify */
- if(check_name(group5_id, "/g3/g4/g1/g5", "/g3/g4/g1/g5") < 0) TEST_ERROR;
- if(check_name(group2_id, "/g1/g5", "/g1/g5") < 0) TEST_ERROR;
+ if(check_name(group5_id, "/g3/g4/g1/g5", "/g3/g4/g1/g5") < 0) TEST_ERROR
+ if(check_name(group2_id, "/g1/g5", "/g1/g5") < 0) TEST_ERROR
/* Rename group */
- if (H5Gmove( file2_id, "/g3/g4/g1", "/g3/g4/g1a" )<0) TEST_ERROR;
+ if(H5Gmove(file2_id, "/g3/g4/g1", "/g3/g4/g1a")<0) TEST_ERROR
/* Verify */
- if(check_name(group5_id, "/g3/g4/g1a/g5", "/g3/g4/g1a/g5") < 0) TEST_ERROR;
- if(check_name(group2_id, "/g1a/g5", "/g1a/g5") < 0) TEST_ERROR;
+ if(check_name(group5_id, "/g3/g4/g1a/g5", "/g3/g4/g1a/g5") < 0) TEST_ERROR
+ if(check_name(group2_id, "/g1a/g5", "/g1a/g5") < 0) TEST_ERROR
/* Verify */
- if(check_name(group6_id, "/g3/g4/g1a", "/g3/g4/g1a") < 0) TEST_ERROR;
- if(check_name(group_id, "/g1a", "/g1a") < 0) TEST_ERROR;
+ if(check_name(group6_id, "/g3/g4/g1a", "/g3/g4/g1a") < 0) TEST_ERROR
+ if(check_name(group_id, "/g1a", "/g1a") < 0) TEST_ERROR
/* Rename middle group back, using relative path */
- if (H5Gmove( group3_id, "g4/g1a", "g4/g1" )<0) TEST_ERROR;
+ if(H5Gmove(group3_id, "g4/g1a", "g4/g1")<0) TEST_ERROR
/* Verify */
- if(check_name(group5_id, "/g3/g4/g1/g5", "/g3/g4/g1/g5") < 0) TEST_ERROR;
- if(check_name(group2_id, "/g1/g5", "/g1/g5") < 0) TEST_ERROR;
- if(check_name(group6_id, "/g3/g4/g1", "/g3/g4/g1") < 0) TEST_ERROR;
- if(check_name(group_id, "/g1", "/g1") < 0) TEST_ERROR;
+ if(check_name(group5_id, "/g3/g4/g1/g5", "/g3/g4/g1/g5") < 0) TEST_ERROR
+ if(check_name(group2_id, "/g1/g5", "/g1/g5") < 0) TEST_ERROR
+ if(check_name(group6_id, "/g3/g4/g1", "/g3/g4/g1") < 0) TEST_ERROR
+ if(check_name(group_id, "/g1", "/g1") < 0) TEST_ERROR
/* Rename end group back, using relative path */
- if (H5Gmove( group3_id, "g4/g1/g5", "g4/g1/g2" )<0) TEST_ERROR;
+ if(H5Gmove(group3_id, "g4/g1/g5", "g4/g1/g2")<0) TEST_ERROR
/* Verify */
- if(check_name(group5_id, "/g3/g4/g1/g2", "/g3/g4/g1/g2") < 0) TEST_ERROR;
- if(check_name(group2_id, "/g1/g2", "/g1/g2") < 0) TEST_ERROR;
- if(check_name(group6_id, "/g3/g4/g1", "/g3/g4/g1") < 0) TEST_ERROR;
- if(check_name(group_id, "/g1", "/g1") < 0) TEST_ERROR;
+ if(check_name(group5_id, "/g3/g4/g1/g2", "/g3/g4/g1/g2") < 0) TEST_ERROR
+ if(check_name(group2_id, "/g1/g2", "/g1/g2") < 0) TEST_ERROR
+ if(check_name(group6_id, "/g3/g4/g1", "/g3/g4/g1") < 0) TEST_ERROR
+ if(check_name(group_id, "/g1", "/g1") < 0) TEST_ERROR
/* Rename mount point */
- if (H5Gmove( file2_id, "/g3/g4", "/g3/g4a" )<0) TEST_ERROR;
+ if(H5Gmove(file2_id, "/g3/g4", "/g3/g4a")<0) TEST_ERROR
/* Verify */
- if(check_name(group4_id, "/g3/g4a", "/g3/g4a") < 0) TEST_ERROR;
- if(check_name(group5_id, "/g3/g4a/g1/g2", "/g3/g4a/g1/g2") < 0) TEST_ERROR;
- if(check_name(group6_id, "/g3/g4a/g1", "/g3/g4a/g1") < 0) TEST_ERROR;
+ if(check_name(group4_id, "/g3/g4a", "/g3/g4a") < 0) TEST_ERROR
+ if(check_name(group5_id, "/g3/g4a/g1/g2", "/g3/g4a/g1/g2") < 0) TEST_ERROR
+ if(check_name(group6_id, "/g3/g4a/g1", "/g3/g4a/g1") < 0) TEST_ERROR
/* Rename mount point back, using relative path*/
- if (H5Gmove( group3_id, "g4a", "g4" )<0) TEST_ERROR;
+ if(H5Gmove(group3_id, "g4a", "g4")<0) TEST_ERROR
/* Verify */
- if(check_name(group4_id, "/g3/g4", "/g3/g4") < 0) TEST_ERROR;
- if(check_name(group5_id, "/g3/g4/g1/g2", "/g3/g4/g1/g2") < 0) TEST_ERROR;
- if(check_name(group6_id, "/g3/g4/g1", "/g3/g4/g1") < 0) TEST_ERROR;
+ if(check_name(group4_id, "/g3/g4", "/g3/g4") < 0) TEST_ERROR
+ if(check_name(group5_id, "/g3/g4/g1/g2", "/g3/g4/g1/g2") < 0) TEST_ERROR
+ if(check_name(group6_id, "/g3/g4/g1", "/g3/g4/g1") < 0) TEST_ERROR
/* Close */
- H5Gclose( group_id );
- H5Gclose( group2_id );
- H5Gclose( group3_id );
- H5Gclose( group4_id );
- H5Gclose( group5_id );
- H5Gclose( group6_id );
- H5Fclose( file1_id );
- H5Fclose( file2_id );
+ H5Gclose(group_id);
+ H5Gclose(group2_id);
+ H5Gclose(group3_id);
+ H5Gclose(group4_id);
+ H5Gclose(group5_id);
+ H5Gclose(group6_id);
+ H5Fclose(file1_id);
+ H5Fclose(file2_id);
PASSED();
@@ -1508,75 +1508,75 @@ PASSED();
if((group2_id = H5Gcreate2(file_id, "/g19/g1", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) FAIL_STACK_ERROR
/* Create hard link to "g19/g1/ group */
- if (H5Glink(file_id, H5G_LINK_HARD, "/g19/g1", "/g19/g2")<0) TEST_ERROR;
+ if(H5Glink(file_id, H5G_LINK_HARD, "/g19/g1", "/g19/g2")<0) TEST_ERROR
/* Verify */
- if(check_name(group2_id, "/g19/g1", "/g19/g1") < 0) TEST_ERROR;
+ if(check_name(group2_id, "/g19/g1", "/g19/g1") < 0) TEST_ERROR
/* Open the group */
- if ((group3_id = H5Gopen( file_id, "/g19/g2" ))<0) TEST_ERROR;
+ if((group3_id = H5Gopen2(file_id, "/g19/g2", H5P_DEFAULT)) < 0) FAIL_STACK_ERROR
/* Verify */
- if(check_name(group3_id, "/g19/g2", "/g19/g2") < 0) TEST_ERROR;
+ if(check_name(group3_id, "/g19/g2", "/g19/g2") < 0) TEST_ERROR
/* Rename original group */
- if (H5Gmove( file_id, "/g19/g1", "/g19/g3" )<0) TEST_ERROR;
+ if(H5Gmove(file_id, "/g19/g1", "/g19/g3")<0) TEST_ERROR
/* Verify */
- if(check_name(group2_id, "/g19/g3", "/g19/g3") < 0) TEST_ERROR;
- if(check_name(group3_id, "/g19/g2", "/g19/g2") < 0) TEST_ERROR;
+ if(check_name(group2_id, "/g19/g3", "/g19/g3") < 0) TEST_ERROR
+ if(check_name(group3_id, "/g19/g2", "/g19/g2") < 0) TEST_ERROR
/* Rename original group back, using relative path */
- if (H5Gmove( group_id, "g3", "g1" )<0) TEST_ERROR;
+ if(H5Gmove(group_id, "g3", "g1")<0) TEST_ERROR
/* Verify */
- if(check_name(group2_id, "/g19/g1", "/g19/g1") < 0) TEST_ERROR;
- if(check_name(group3_id, "/g19/g2", "/g19/g2") < 0) TEST_ERROR;
+ if(check_name(group2_id, "/g19/g1", "/g19/g1") < 0) TEST_ERROR
+ if(check_name(group3_id, "/g19/g2", "/g19/g2") < 0) TEST_ERROR
/* Create another hard link to "/g19/g1" group */
- if (H5Glink(file_id, H5G_LINK_HARD, "/g19/g1", "/g19/g3")<0) TEST_ERROR;
+ if(H5Glink(file_id, H5G_LINK_HARD, "/g19/g1", "/g19/g3")<0) TEST_ERROR
/* Open the group */
- if ((group4_id = H5Gopen( file_id, "/g19/g3" ))<0) TEST_ERROR;
+ if((group4_id = H5Gopen2(file_id, "/g19/g3", H5P_DEFAULT)) < 0) FAIL_STACK_ERROR
/* Verify */
- if(check_name(group4_id, "/g19/g3", "/g19/g3") < 0) TEST_ERROR;
+ if(check_name(group4_id, "/g19/g3", "/g19/g3") < 0) TEST_ERROR
/* Delete group */
- if (H5Gunlink( file_id, "/g19/g3")<0) TEST_ERROR;
+ if(H5Gunlink(file_id, "/g19/g3")<0) TEST_ERROR
/* Verify */
- if(check_name(group4_id, "/g19/g1", "") < 0) TEST_ERROR;
- if(check_name(group2_id, "/g19/g1", "/g19/g1") < 0) TEST_ERROR;
- if(check_name(group3_id, "/g19/g2", "/g19/g2") < 0) TEST_ERROR;
+ if(check_name(group4_id, "/g19/g1", "") < 0) TEST_ERROR
+ if(check_name(group2_id, "/g19/g1", "/g19/g1") < 0) TEST_ERROR
+ if(check_name(group3_id, "/g19/g2", "/g19/g2") < 0) TEST_ERROR
/* Close the unlinked group */
- H5Gclose( group4_id );
+ H5Gclose(group4_id);
/* Create another hard link to "/g19/g1" group */
- if (H5Glink(file_id, H5G_LINK_HARD, "/g19/g1", "/g19/g3")<0) TEST_ERROR;
+ if(H5Glink(file_id, H5G_LINK_HARD, "/g19/g1", "/g19/g3")<0) TEST_ERROR
/* Open the group */
- if ((group4_id = H5Gopen( file_id, "/g19/g3" ))<0) TEST_ERROR;
+ if((group4_id = H5Gopen2(file_id, "/g19/g3", H5P_DEFAULT)) < 0) FAIL_STACK_ERROR
/* Verify */
- if(check_name(group4_id, "/g19/g3", "/g19/g3") < 0) TEST_ERROR;
+ if(check_name(group4_id, "/g19/g3", "/g19/g3") < 0) TEST_ERROR
/* Delete group, using relative path */
- if (H5Gunlink( group_id, "g3")<0) TEST_ERROR;
+ if(H5Gunlink(group_id, "g3")<0) TEST_ERROR
/* Verify */
- if(check_name(group4_id, "/g19/g1", "") < 0) TEST_ERROR;
- if(check_name(group2_id, "/g19/g1", "/g19/g1") < 0) TEST_ERROR;
- if(check_name(group3_id, "/g19/g2", "/g19/g2") < 0) TEST_ERROR;
+ if(check_name(group4_id, "/g19/g1", "") < 0) TEST_ERROR
+ if(check_name(group2_id, "/g19/g1", "/g19/g1") < 0) TEST_ERROR
+ if(check_name(group3_id, "/g19/g2", "/g19/g2") < 0) TEST_ERROR
/* Close the unlinked group */
- H5Gclose( group4_id );
+ H5Gclose(group4_id);
/* Close */
- H5Gclose( group_id );
- H5Gclose( group2_id );
- H5Gclose( group3_id );
+ H5Gclose(group_id);
+ H5Gclose(group2_id);
+ H5Gclose(group3_id);
PASSED();
@@ -1594,21 +1594,21 @@ PASSED();
if((group2_id = H5Gcreate2(file_id, "/g20/g1", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) FAIL_STACK_ERROR
/* Create symbolic link to "g20/g1/ group */
- if (H5Glink(file_id, H5G_LINK_SOFT, "/g20/g1", "/g20/g2")<0) TEST_ERROR;
+ if(H5Glink(file_id, H5G_LINK_SOFT, "/g20/g1", "/g20/g2")<0) TEST_ERROR
/* Verify */
- if(check_name(group2_id, "/g20/g1", "/g20/g1") < 0) TEST_ERROR;
+ if(check_name(group2_id, "/g20/g1", "/g20/g1") < 0) TEST_ERROR
/* Open the group */
- if ((group3_id = H5Gopen( file_id, "/g20/g2" ))<0) TEST_ERROR;
+ if((group3_id = H5Gopen2(file_id, "/g20/g2", H5P_DEFAULT)) < 0) FAIL_STACK_ERROR
/* Verify */
- if(check_name(group3_id, "/g20/g2", "/g20/g2") < 0) TEST_ERROR;
+ if(check_name(group3_id, "/g20/g2", "/g20/g2") < 0) TEST_ERROR
/* Close */
- H5Gclose( group_id );
- H5Gclose( group2_id );
- H5Gclose( group3_id );
+ H5Gclose(group_id);
+ H5Gclose(group2_id);
+ H5Gclose(group3_id);
PASSED();
@@ -1625,25 +1625,25 @@ PASSED();
if((group2_id = H5Gcreate2(file_id, "/g21/g1", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) FAIL_STACK_ERROR
/* Create symbolic link to "g21/g1/ group */
- if (H5Glink(file_id, H5G_LINK_SOFT, "/g21/g1", "/g21/g2")<0) TEST_ERROR;
+ if(H5Glink(file_id, H5G_LINK_SOFT, "/g21/g1", "/g21/g2")<0) TEST_ERROR
/* Verify */
- if(check_name(group2_id, "/g21/g1", "/g21/g1") < 0) TEST_ERROR;
+ if(check_name(group2_id, "/g21/g1", "/g21/g1") < 0) TEST_ERROR
/* Open the group */
- if ((group3_id = H5Gopen( file_id, "/g21/g2" ))<0) TEST_ERROR;
+ if((group3_id = H5Gopen2(file_id, "/g21/g2", H5P_DEFAULT)) < 0) FAIL_STACK_ERROR
/* Rename group */
- if (H5Gmove( file_id, "/g21/g1", "/g21/g3" )<0) TEST_ERROR;
+ if(H5Gmove(file_id, "/g21/g1", "/g21/g3")<0) TEST_ERROR
/* Verify */
- if(check_name(group2_id, "/g21/g3", "/g21/g3") < 0) TEST_ERROR;
- if(check_name(group3_id, "/g21/g2", "/g21/g2") < 0) TEST_ERROR;
+ if(check_name(group2_id, "/g21/g3", "/g21/g3") < 0) TEST_ERROR
+ if(check_name(group3_id, "/g21/g2", "/g21/g2") < 0) TEST_ERROR
/* Close */
- H5Gclose( group_id );
- H5Gclose( group2_id );
- H5Gclose( group3_id );
+ H5Gclose(group_id);
+ H5Gclose(group2_id);
+ H5Gclose(group3_id);
PASSED();
@@ -1660,32 +1660,32 @@ PASSED();
if((group2_id = H5Gcreate2(file_id, "/g22/g1", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) FAIL_STACK_ERROR
/* Create symbolic link to "g22/g1/ group */
- if (H5Glink(file_id, H5G_LINK_SOFT, "/g22/g1", "/g22/g2")<0) TEST_ERROR;
+ if(H5Glink(file_id, H5G_LINK_SOFT, "/g22/g1", "/g22/g2")<0) TEST_ERROR
/* Verify */
- if(check_name(group2_id, "/g22/g1", "/g22/g1") < 0) TEST_ERROR;
+ if(check_name(group2_id, "/g22/g1", "/g22/g1") < 0) TEST_ERROR
/* Open the group */
- if ((group3_id = H5Gopen( file_id, "/g22/g2" ))<0) TEST_ERROR;
+ if((group3_id = H5Gopen2(file_id, "/g22/g2", H5P_DEFAULT)) < 0) FAIL_STACK_ERROR
/* Rename soft link */
- if (H5Gmove( file_id, "/g22/g2", "/g22/g3" )<0) TEST_ERROR;
+ if(H5Gmove(file_id, "/g22/g2", "/g22/g3")<0) TEST_ERROR
/* Verify */
- if(check_name(group2_id, "/g22/g1", "/g22/g1") < 0) TEST_ERROR;
- if(check_name(group3_id, "/g22/g3", "/g22/g3") < 0) TEST_ERROR;
+ if(check_name(group2_id, "/g22/g1", "/g22/g1") < 0) TEST_ERROR
+ if(check_name(group3_id, "/g22/g3", "/g22/g3") < 0) TEST_ERROR
/* Rename soft link, using relative paths */
- if (H5Gmove( group_id, "g3", "g2" )<0) TEST_ERROR;
+ if(H5Gmove(group_id, "g3", "g2")<0) TEST_ERROR
/* Verify */
- if(check_name(group2_id, "/g22/g1", "/g22/g1") < 0) TEST_ERROR;
- if(check_name(group3_id, "/g22/g2", "/g22/g2") < 0) TEST_ERROR;
+ if(check_name(group2_id, "/g22/g1", "/g22/g1") < 0) TEST_ERROR
+ if(check_name(group3_id, "/g22/g2", "/g22/g2") < 0) TEST_ERROR
/* Close */
- H5Gclose( group_id );
- H5Gclose( group2_id );
- H5Gclose( group3_id );
+ H5Gclose(group_id);
+ H5Gclose(group2_id);
+ H5Gclose(group3_id);
PASSED();
@@ -1703,24 +1703,24 @@ PASSED();
if((group2_id = H5Gcreate2(file_id, "/g23/g1", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) FAIL_STACK_ERROR
/* Create symbolic link to "g23/g1/ group */
- if (H5Glink(file_id, H5G_LINK_SOFT, "/g23/g1", "/g23/g2")<0) TEST_ERROR;
+ if(H5Glink(file_id, H5G_LINK_SOFT, "/g23/g1", "/g23/g2")<0) TEST_ERROR
/* Verify */
- if(check_name(group2_id, "/g23/g1", "/g23/g1") < 0) TEST_ERROR;
+ if(check_name(group2_id, "/g23/g1", "/g23/g1") < 0) TEST_ERROR
/* Open the group */
- if ((group3_id = H5Gopen( file_id, "/g23/g2" ))<0) TEST_ERROR;
+ if((group3_id = H5Gopen2(file_id, "/g23/g2", H5P_DEFAULT)) < 0) FAIL_STACK_ERROR
/* Delete group */
- if (H5Gunlink( file_id, "/g23/g1")<0) TEST_ERROR;
+ if(H5Gunlink(file_id, "/g23/g1")<0) TEST_ERROR
/* Verify */
- if(check_name(group3_id, "/g23/g2", "/g23/g2") < 0) TEST_ERROR;
+ if(check_name(group3_id, "/g23/g2", "/g23/g2") < 0) TEST_ERROR
/* Close */
- H5Gclose( group_id );
- H5Gclose( group2_id );
- H5Gclose( group3_id );
+ H5Gclose(group_id);
+ H5Gclose(group2_id);
+ H5Gclose(group3_id);
PASSED();
@@ -1736,24 +1736,24 @@ PASSED();
if((group2_id = H5Gcreate2(file_id, "/g24/g1", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) FAIL_STACK_ERROR
/* Create symbolic link to "g24/g1/ group */
- if (H5Glink(file_id, H5G_LINK_SOFT, "/g24/g1", "/g24/g2")<0) TEST_ERROR;
+ if(H5Glink(file_id, H5G_LINK_SOFT, "/g24/g1", "/g24/g2")<0) TEST_ERROR
/* Verify */
- if(check_name(group2_id, "/g24/g1", "/g24/g1") < 0) TEST_ERROR;
+ if(check_name(group2_id, "/g24/g1", "/g24/g1") < 0) TEST_ERROR
/* Open the group */
- if ((group3_id = H5Gopen( file_id, "/g24/g2" ))<0) TEST_ERROR;
+ if((group3_id = H5Gopen2(file_id, "/g24/g2", H5P_DEFAULT)) < 0) FAIL_STACK_ERROR
/* Delete symbolic link */
- if (H5Gunlink( file_id, "/g24/g2")<0) TEST_ERROR;
+ if(H5Gunlink(file_id, "/g24/g2")<0) TEST_ERROR
/* Verify */
- if(check_name(group3_id, "/g24/g1", "") < 0) TEST_ERROR;
+ if(check_name(group3_id, "/g24/g1", "") < 0) TEST_ERROR
/* Close */
- H5Gclose( group_id );
- H5Gclose( group2_id );
- H5Gclose( group3_id );
+ H5Gclose(group_id);
+ H5Gclose(group2_id);
+ H5Gclose(group3_id);
PASSED();
@@ -1770,9 +1770,9 @@ PASSED();
if((group3_id = H5Gcreate2(file_id, "/g25/g1/g2", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) FAIL_STACK_ERROR
/* Close */
- H5Gclose( group_id );
- H5Gclose( group2_id );
- H5Gclose( group3_id );
+ H5Gclose(group_id);
+ H5Gclose(group2_id);
+ H5Gclose(group3_id);
/* Create second file and group "/g26/g3/g4" in it */
file1_id = H5Fcreate(filename1, H5F_ACC_TRUNC, H5P_DEFAULT, fapl);
@@ -1782,9 +1782,9 @@ PASSED();
if((group3_id = H5Gcreate2(file1_id, "/g26/g3/g4", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) FAIL_STACK_ERROR
/* Close */
- H5Gclose( group_id );
- H5Gclose( group2_id );
- H5Gclose( group3_id );
+ H5Gclose(group_id);
+ H5Gclose(group2_id);
+ H5Gclose(group3_id);
/* Create third file and group "/g27/g5/g6" in it */
file2_id = H5Fcreate(filename2, H5F_ACC_TRUNC, H5P_DEFAULT, fapl);
@@ -1794,9 +1794,9 @@ PASSED();
if((group3_id = H5Gcreate2(file2_id, "/g27/g5/g6", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) FAIL_STACK_ERROR
/* Close */
- H5Gclose( group_id );
- H5Gclose( group2_id );
- H5Gclose( group3_id );
+ H5Gclose(group_id);
+ H5Gclose(group2_id);
+ H5Gclose(group3_id);
/* Create fourth file and group "/g28/g5/g6" in it */
file3_id = H5Fcreate(filename3, H5F_ACC_TRUNC, H5P_DEFAULT, fapl);
@@ -1806,85 +1806,85 @@ PASSED();
if((group3_id = H5Gcreate2(file3_id, "/g28/g7/g8", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) FAIL_STACK_ERROR
/* Close */
- H5Gclose( group_id );
- H5Gclose( group2_id );
- H5Gclose( group3_id );
+ H5Gclose(group_id);
+ H5Gclose(group2_id);
+ H5Gclose(group3_id);
/* Access group which will be hidden in the first file */
- if ((group_id = H5Gopen( file_id, "/g25/g1/g2"))<0) TEST_ERROR;
+ if((group_id = H5Gopen2(file_id, "/g25/g1/g2", H5P_DEFAULT)) < 0) FAIL_STACK_ERROR
/* Verify */
- if(check_name(group_id, "/g25/g1/g2", "/g25/g1/g2") < 0) TEST_ERROR;
+ if(check_name(group_id, "/g25/g1/g2", "/g25/g1/g2") < 0) TEST_ERROR
/* Mount second file under "/g25/g1" in the first file */
- if (H5Fmount(file_id, "/g25/g1", file1_id, H5P_DEFAULT)<0) TEST_ERROR;
+ if(H5Fmount(file_id, "/g25/g1", file1_id, H5P_DEFAULT)<0) TEST_ERROR
/* Verify */
- if(check_name(group_id, "", "/g25/g1/g2") < 0) TEST_ERROR;
+ if(check_name(group_id, "", "/g25/g1/g2") < 0) TEST_ERROR
/* Access group which will be hidden in the second file */
- if ((group2_id = H5Gopen( file_id, "/g25/g1/g26/g3/g4"))<0) TEST_ERROR;
+ if((group2_id = H5Gopen2(file_id, "/g25/g1/g26/g3/g4", H5P_DEFAULT)) < 0) FAIL_STACK_ERROR
/* Verify */
- if(check_name(group2_id, "/g25/g1/g26/g3/g4", "/g25/g1/g26/g3/g4") < 0) TEST_ERROR;
+ if(check_name(group2_id, "/g25/g1/g26/g3/g4", "/g25/g1/g26/g3/g4") < 0) TEST_ERROR
/* Mount third file under "/g25/g1/g26/g3" in the first file */
- if (H5Fmount(file_id, "/g25/g1/g26/g3", file2_id, H5P_DEFAULT)<0) TEST_ERROR;
+ if(H5Fmount(file_id, "/g25/g1/g26/g3", file2_id, H5P_DEFAULT)<0) TEST_ERROR
/* Verify */
- if(check_name(group2_id, "", "/g25/g1/g26/g3/g4") < 0) TEST_ERROR;
+ if(check_name(group2_id, "", "/g25/g1/g26/g3/g4") < 0) TEST_ERROR
/* Access group in the third file */
- if ((group3_id = H5Gopen( file_id, "/g25/g1/g26/g3/g27/g5/g6"))<0) TEST_ERROR;
+ if((group3_id = H5Gopen2(file_id, "/g25/g1/g26/g3/g27/g5/g6", H5P_DEFAULT)) < 0) FAIL_STACK_ERROR
/* Verify */
- if(check_name(group3_id, "/g25/g1/g26/g3/g27/g5/g6", "/g25/g1/g26/g3/g27/g5/g6") < 0) TEST_ERROR;
+ if(check_name(group3_id, "/g25/g1/g26/g3/g27/g5/g6", "/g25/g1/g26/g3/g27/g5/g6") < 0) TEST_ERROR
/* Mount fourth file under "/g25/g1/g26/g3/g27/g5" in the first file */
- if (H5Fmount(file_id, "/g25/g1/g26/g3/g27/g5", file3_id, H5P_DEFAULT)<0) TEST_ERROR;
+ if(H5Fmount(file_id, "/g25/g1/g26/g3/g27/g5", file3_id, H5P_DEFAULT)<0) TEST_ERROR
/* Verify */
- if(check_name(group3_id, "", "/g25/g1/g26/g3/g27/g5/g6") < 0) TEST_ERROR;
+ if(check_name(group3_id, "", "/g25/g1/g26/g3/g27/g5/g6") < 0) TEST_ERROR
/* Access group in the fourth file */
- if ((group4_id = H5Gopen( file_id, "/g25/g1/g26/g3/g27/g5/g28/g7/g8"))<0) TEST_ERROR;
+ if((group4_id = H5Gopen2(file_id, "/g25/g1/g26/g3/g27/g5/g28/g7/g8", H5P_DEFAULT)) < 0) FAIL_STACK_ERROR
/* Verify */
- if(check_name(group4_id, "/g25/g1/g26/g3/g27/g5/g28/g7/g8", "/g25/g1/g26/g3/g27/g5/g28/g7/g8") < 0) TEST_ERROR;
+ if(check_name(group4_id, "/g25/g1/g26/g3/g27/g5/g28/g7/g8", "/g25/g1/g26/g3/g27/g5/g28/g7/g8") < 0) TEST_ERROR
- if (H5Funmount(file_id, "/g25/g1/g26/g3/g27/g5")<0) TEST_ERROR;
+ if(H5Funmount(file_id, "/g25/g1/g26/g3/g27/g5")<0) TEST_ERROR
/* Verify */
- if(check_name(group4_id, "/g28/g7/g8", "") < 0) TEST_ERROR;
- if(check_name(group3_id, "/g25/g1/g26/g3/g27/g5/g6", "/g25/g1/g26/g3/g27/g5/g6") < 0) TEST_ERROR;
- if(check_name(group2_id, "", "/g25/g1/g26/g3/g4") < 0) TEST_ERROR;
- if(check_name(group_id, "", "/g25/g1/g2") < 0) TEST_ERROR;
+ if(check_name(group4_id, "/g28/g7/g8", "") < 0) TEST_ERROR
+ if(check_name(group3_id, "/g25/g1/g26/g3/g27/g5/g6", "/g25/g1/g26/g3/g27/g5/g6") < 0) TEST_ERROR
+ if(check_name(group2_id, "", "/g25/g1/g26/g3/g4") < 0) TEST_ERROR
+ if(check_name(group_id, "", "/g25/g1/g2") < 0) TEST_ERROR
/* Close */
- H5Gclose( group4_id );
- H5Fclose( file3_id );
+ H5Gclose(group4_id);
+ H5Fclose(file3_id);
- if (H5Funmount(file_id, "/g25/g1/g26/g3")<0) TEST_ERROR;
+ if(H5Funmount(file_id, "/g25/g1/g26/g3")<0) TEST_ERROR
/* Verify */
- if(check_name(group3_id, "/g27/g5/g6", "") < 0) TEST_ERROR;
- if(check_name(group2_id, "/g25/g1/g26/g3/g4", "/g25/g1/g26/g3/g4") < 0) TEST_ERROR;
- if(check_name(group_id, "", "/g25/g1/g2") < 0) TEST_ERROR;
+ if(check_name(group3_id, "/g27/g5/g6", "") < 0) TEST_ERROR
+ if(check_name(group2_id, "/g25/g1/g26/g3/g4", "/g25/g1/g26/g3/g4") < 0) TEST_ERROR
+ if(check_name(group_id, "", "/g25/g1/g2") < 0) TEST_ERROR
/* Close */
- H5Gclose( group3_id );
- H5Fclose( file2_id );
+ H5Gclose(group3_id);
+ H5Fclose(file2_id);
- if (H5Funmount(file_id, "/g25/g1")<0) TEST_ERROR;
+ if(H5Funmount(file_id, "/g25/g1")<0) TEST_ERROR
/* Verify */
- if(check_name(group2_id, "/g26/g3/g4", "") < 0) TEST_ERROR;
- if(check_name(group_id, "/g25/g1/g2", "/g25/g1/g2") < 0) TEST_ERROR;
+ if(check_name(group2_id, "/g26/g3/g4", "") < 0) TEST_ERROR
+ if(check_name(group_id, "/g25/g1/g2", "/g25/g1/g2") < 0) TEST_ERROR
/* Close */
- H5Gclose( group_id );
- H5Gclose( group2_id );
- H5Fclose( file1_id );
+ H5Gclose(group_id);
+ H5Gclose(group2_id);
+ H5Fclose(file1_id);
PASSED();
@@ -1905,31 +1905,31 @@ PASSED();
if((group5_id = H5Gcreate2(file_id, "/g29/g1/g2/g1/g2", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) FAIL_STACK_ERROR
/* Rename group */
- if (H5Gmove( file_id, "/g29/g1/g2/g1/g2", "/g29/g1/g2/g1/g3" )<0) TEST_ERROR;
+ if(H5Gmove(file_id, "/g29/g1/g2/g1/g2", "/g29/g1/g2/g1/g3")<0) TEST_ERROR
/* Verify */
- if(check_name(group5_id, "/g29/g1/g2/g1/g3", "/g29/g1/g2/g1/g3") < 0) TEST_ERROR;
+ if(check_name(group5_id, "/g29/g1/g2/g1/g3", "/g29/g1/g2/g1/g3") < 0) TEST_ERROR
/* Rename group in middle of path, keeping within the same group */
- if (H5Gmove( file_id, "/g29/g1/g2/g1", "/g29/g1/g2/g3" )<0) TEST_ERROR;
+ if(H5Gmove(file_id, "/g29/g1/g2/g1", "/g29/g1/g2/g3")<0) TEST_ERROR
/* Verify */
- if(check_name(group4_id, "/g29/g1/g2/g3", "/g29/g1/g2/g3") < 0) TEST_ERROR;
- if(check_name(group5_id, "/g29/g1/g2/g3/g3", "/g29/g1/g2/g3/g3") < 0) TEST_ERROR;
+ if(check_name(group4_id, "/g29/g1/g2/g3", "/g29/g1/g2/g3") < 0) TEST_ERROR
+ if(check_name(group5_id, "/g29/g1/g2/g3/g3", "/g29/g1/g2/g3/g3") < 0) TEST_ERROR
/* Rename group in middle of path, moving to another group in file */
- if (H5Gmove( file_id, "/g29/g1/g2/g3", "/g29/g3" )<0) TEST_ERROR;
+ if(H5Gmove(file_id, "/g29/g1/g2/g3", "/g29/g3")<0) TEST_ERROR
/* Verify */
- if(check_name(group4_id, "/g29/g3", "/g29/g3") < 0) TEST_ERROR;
- if(check_name(group5_id, "/g29/g3/g3", "/g29/g3/g3") < 0) TEST_ERROR;
+ if(check_name(group4_id, "/g29/g3", "/g29/g3") < 0) TEST_ERROR
+ if(check_name(group5_id, "/g29/g3/g3", "/g29/g3/g3") < 0) TEST_ERROR
/* Close */
- H5Gclose( group_id );
- H5Gclose( group2_id );
- H5Gclose( group3_id );
- H5Gclose( group4_id );
- H5Gclose( group5_id );
+ H5Gclose(group_id);
+ H5Gclose(group2_id);
+ H5Gclose(group3_id);
+ H5Gclose(group4_id);
+ H5Gclose(group5_id);
PASSED();
@@ -1947,9 +1947,9 @@ PASSED();
if((group3_id = H5Gcreate2(file_id, "/g30/g1/g2", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) FAIL_STACK_ERROR
/* Close */
- H5Gclose( group_id );
- H5Gclose( group2_id );
- H5Gclose( group3_id );
+ H5Gclose(group_id);
+ H5Gclose(group2_id);
+ H5Gclose(group3_id);
/* Create second file and group "/g31/g3/g4" in it */
file1_id = H5Fcreate(filename1, H5F_ACC_TRUNC, H5P_DEFAULT, fapl);
@@ -1959,9 +1959,9 @@ PASSED();
if((group3_id = H5Gcreate2(file1_id, "/g31/g3/g4", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) FAIL_STACK_ERROR
/* Close */
- H5Gclose( group_id );
- H5Gclose( group2_id );
- H5Gclose( group3_id );
+ H5Gclose(group_id);
+ H5Gclose(group2_id);
+ H5Gclose(group3_id);
/* Create third file and group "/g32/g5/g6" in it */
file2_id = H5Fcreate(filename2, H5F_ACC_TRUNC, H5P_DEFAULT, fapl);
@@ -1971,9 +1971,9 @@ PASSED();
if((group3_id = H5Gcreate2(file2_id, "/g32/g5/g6", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) FAIL_STACK_ERROR
/* Close */
- H5Gclose( group_id );
- H5Gclose( group2_id );
- H5Gclose( group3_id );
+ H5Gclose(group_id);
+ H5Gclose(group2_id);
+ H5Gclose(group3_id);
/* Create fourth file and group "/g33/g5/g6" in it */
file3_id = H5Fcreate(filename3, H5F_ACC_TRUNC, H5P_DEFAULT, fapl);
@@ -1983,89 +1983,89 @@ PASSED();
if((group3_id = H5Gcreate2(file3_id, "/g33/g7/g8", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) FAIL_STACK_ERROR
/* Close */
- H5Gclose( group_id );
- H5Gclose( group2_id );
- H5Gclose( group3_id );
+ H5Gclose(group_id);
+ H5Gclose(group2_id);
+ H5Gclose(group3_id);
/* Access group which will be hidden in the first file */
- if ((group_id = H5Gopen( file_id, "/g30/g1/g2"))<0) TEST_ERROR;
+ if((group_id = H5Gopen2(file_id, "/g30/g1/g2", H5P_DEFAULT)) < 0) FAIL_STACK_ERROR
/* Verify */
- if(check_name(group_id, "/g30/g1/g2", "/g30/g1/g2") < 0) TEST_ERROR;
+ if(check_name(group_id, "/g30/g1/g2", "/g30/g1/g2") < 0) TEST_ERROR
/* Mount second file under "/g30/g1" in the first file */
- if (H5Fmount(file_id, "/g30/g1", file1_id, H5P_DEFAULT)<0) TEST_ERROR;
+ if(H5Fmount(file_id, "/g30/g1", file1_id, H5P_DEFAULT)<0) TEST_ERROR
/* Verify */
- if(check_name(group_id, "", "/g30/g1/g2") < 0) TEST_ERROR;
+ if(check_name(group_id, "", "/g30/g1/g2") < 0) TEST_ERROR
/* Access group which will be hidden in the second file */
- if ((group2_id = H5Gopen( file_id, "/g30/g1/g31/g3/g4"))<0) TEST_ERROR;
+ if((group2_id = H5Gopen2(file_id, "/g30/g1/g31/g3/g4", H5P_DEFAULT)) < 0) FAIL_STACK_ERROR
/* Verify */
- if(check_name(group2_id, "/g30/g1/g31/g3/g4", "/g30/g1/g31/g3/g4") < 0) TEST_ERROR;
+ if(check_name(group2_id, "/g30/g1/g31/g3/g4", "/g30/g1/g31/g3/g4") < 0) TEST_ERROR
/* Mount third file under "/g30/g1/g31/g3" in the first file */
- if (H5Fmount(file_id, "/g30/g1/g31/g3", file2_id, H5P_DEFAULT)<0) TEST_ERROR;
+ if(H5Fmount(file_id, "/g30/g1/g31/g3", file2_id, H5P_DEFAULT)<0) TEST_ERROR
/* Verify */
- if(check_name(group2_id, "", "/g30/g1/g31/g3/g4") < 0) TEST_ERROR;
+ if(check_name(group2_id, "", "/g30/g1/g31/g3/g4") < 0) TEST_ERROR
/* Access group which will be hidden in the third file */
- if ((group3_id = H5Gopen( file_id, "/g30/g1/g31/g3/g32/g5/g6"))<0) TEST_ERROR;
+ if((group3_id = H5Gopen2(file_id, "/g30/g1/g31/g3/g32/g5/g6", H5P_DEFAULT)) < 0) FAIL_STACK_ERROR
/* Verify */
- if(check_name(group3_id, "/g30/g1/g31/g3/g32/g5/g6", "/g30/g1/g31/g3/g32/g5/g6") < 0) TEST_ERROR;
+ if(check_name(group3_id, "/g30/g1/g31/g3/g32/g5/g6", "/g30/g1/g31/g3/g32/g5/g6") < 0) TEST_ERROR
/* Mount fourth file under "/g30" in the first file, hiding the files below it */
- if (H5Fmount(file_id, "/g30", file3_id, H5P_DEFAULT)<0) TEST_ERROR;
+ if(H5Fmount(file_id, "/g30", file3_id, H5P_DEFAULT)<0) TEST_ERROR
/* Verify */
- if(check_name(group3_id, "", "/g30/g1/g31/g3/g32/g5/g6") < 0) TEST_ERROR;
+ if(check_name(group3_id, "", "/g30/g1/g31/g3/g32/g5/g6") < 0) TEST_ERROR
/* Access group which will be in the fourth file */
- if ((group4_id = H5Gopen( file_id, "/g30/g33/g7/g8"))<0) TEST_ERROR;
+ if((group4_id = H5Gopen2(file_id, "/g30/g33/g7/g8", H5P_DEFAULT)) < 0) FAIL_STACK_ERROR
/* Verify */
- if(check_name(group4_id, "/g30/g33/g7/g8", "/g30/g33/g7/g8") < 0) TEST_ERROR;
+ if(check_name(group4_id, "/g30/g33/g7/g8", "/g30/g33/g7/g8") < 0) TEST_ERROR
/* Unmount fourth file */
- if (H5Funmount(file_id, "/g30")<0) TEST_ERROR;
+ if(H5Funmount(file_id, "/g30")<0) TEST_ERROR
/* Verify */
- if(check_name(group4_id, "/g33/g7/g8", "") < 0) TEST_ERROR;
- if(check_name(group3_id, "/g30/g1/g31/g3/g32/g5/g6", "/g30/g1/g31/g3/g32/g5/g6") < 0) TEST_ERROR;
- if(check_name(group2_id, "", "/g30/g1/g31/g3/g4") < 0) TEST_ERROR;
- if(check_name(group_id, "", "/g30/g1/g2") < 0) TEST_ERROR;
+ if(check_name(group4_id, "/g33/g7/g8", "") < 0) TEST_ERROR
+ if(check_name(group3_id, "/g30/g1/g31/g3/g32/g5/g6", "/g30/g1/g31/g3/g32/g5/g6") < 0) TEST_ERROR
+ if(check_name(group2_id, "", "/g30/g1/g31/g3/g4") < 0) TEST_ERROR
+ if(check_name(group_id, "", "/g30/g1/g2") < 0) TEST_ERROR
/* Unmount third file */
- if (H5Funmount(file_id, "/g30/g1/g31/g3")<0) TEST_ERROR;
+ if(H5Funmount(file_id, "/g30/g1/g31/g3")<0) TEST_ERROR
/* Verify */
- if(check_name(group4_id, "/g33/g7/g8", "") < 0) TEST_ERROR;
- if(check_name(group3_id, "/g32/g5/g6", "") < 0) TEST_ERROR;
- if(check_name(group2_id, "/g30/g1/g31/g3/g4", "/g30/g1/g31/g3/g4") < 0) TEST_ERROR;
- if(check_name(group_id, "", "/g30/g1/g2") < 0) TEST_ERROR;
+ if(check_name(group4_id, "/g33/g7/g8", "") < 0) TEST_ERROR
+ if(check_name(group3_id, "/g32/g5/g6", "") < 0) TEST_ERROR
+ if(check_name(group2_id, "/g30/g1/g31/g3/g4", "/g30/g1/g31/g3/g4") < 0) TEST_ERROR
+ if(check_name(group_id, "", "/g30/g1/g2") < 0) TEST_ERROR
/* Unmount second file */
- if (H5Funmount(file_id, "/g30/g1")<0) TEST_ERROR;
+ if(H5Funmount(file_id, "/g30/g1")<0) TEST_ERROR
/* Verify */
- if(check_name(group4_id, "/g33/g7/g8", "") < 0) TEST_ERROR;
- if(check_name(group3_id, "/g32/g5/g6", "") < 0) TEST_ERROR;
- if(check_name(group2_id, "/g31/g3/g4", "") < 0) TEST_ERROR;
- if(check_name(group_id, "/g30/g1/g2", "/g30/g1/g2") < 0) TEST_ERROR;
+ if(check_name(group4_id, "/g33/g7/g8", "") < 0) TEST_ERROR
+ if(check_name(group3_id, "/g32/g5/g6", "") < 0) TEST_ERROR
+ if(check_name(group2_id, "/g31/g3/g4", "") < 0) TEST_ERROR
+ if(check_name(group_id, "/g30/g1/g2", "/g30/g1/g2") < 0) TEST_ERROR
/* Close groups */
- H5Gclose( group_id );
- H5Gclose( group2_id );
- H5Gclose( group3_id );
- H5Gclose( group4_id );
+ H5Gclose(group_id);
+ H5Gclose(group2_id);
+ H5Gclose(group3_id);
+ H5Gclose(group4_id);
/* Close files */
- H5Fclose( file1_id );
- H5Fclose( file2_id );
- H5Fclose( file3_id );
+ H5Fclose(file1_id);
+ H5Fclose(file2_id);
+ H5Fclose(file3_id);
PASSED();
@@ -2085,9 +2085,9 @@ PASSED();
if((group3_id = H5Gcreate2(file1_id, "/g35/g3/g4", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) FAIL_STACK_ERROR
/* Close */
- H5Gclose( group_id );
- H5Gclose( group2_id );
- H5Gclose( group3_id );
+ H5Gclose(group_id);
+ H5Gclose(group2_id);
+ H5Gclose(group3_id);
/* Create group "/g34/g1/g2" in first file */
if((group_id = H5Gcreate2(file_id, "/g34", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) FAIL_STACK_ERROR
@@ -2095,37 +2095,37 @@ PASSED();
if((group3_id = H5Gcreate2(file_id, "/g34/g1/g2", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) FAIL_STACK_ERROR
/* Create hard link to "/g34/g1/g2 group */
- if (H5Glink(file_id, H5G_LINK_HARD, "/g34/g1/g2", "/g34/g2a")<0) TEST_ERROR;
+ if(H5Glink(file_id, H5G_LINK_HARD, "/g34/g1/g2", "/g34/g2a")<0) TEST_ERROR
/* Verify */
- if(check_name(group3_id, "/g34/g1/g2", "/g34/g1/g2") < 0) TEST_ERROR;
+ if(check_name(group3_id, "/g34/g1/g2", "/g34/g1/g2") < 0) TEST_ERROR
/* Open the link to the group */
- if ((group4_id = H5Gopen( file_id, "/g34/g2a" ))<0) TEST_ERROR;
+ if((group4_id = H5Gopen2(file_id, "/g34/g2a", H5P_DEFAULT)) < 0) FAIL_STACK_ERROR
/* Verify */
- if(check_name(group4_id, "/g34/g2a", "/g34/g2a") < 0) TEST_ERROR;
+ if(check_name(group4_id, "/g34/g2a", "/g34/g2a") < 0) TEST_ERROR
/* Mount second file under "/g34/g1" in the first file */
- if (H5Fmount(file_id, "/g34/g1", file1_id, H5P_DEFAULT)<0) TEST_ERROR;
+ if(H5Fmount(file_id, "/g34/g1", file1_id, H5P_DEFAULT)<0) TEST_ERROR
/* Verify */
- if(check_name(group3_id, "", "/g34/g1/g2") < 0) TEST_ERROR;
- if(check_name(group4_id, "/g34/g2a", "/g34/g2a") < 0) TEST_ERROR;
+ if(check_name(group3_id, "", "/g34/g1/g2") < 0) TEST_ERROR
+ if(check_name(group4_id, "/g34/g2a", "/g34/g2a") < 0) TEST_ERROR
/* Unmount second file */
- if (H5Funmount(file_id, "/g34/g1")<0) TEST_ERROR;
+ if(H5Funmount(file_id, "/g34/g1")<0) TEST_ERROR
/* Verify */
- if(check_name(group3_id, "/g34/g1/g2", "/g34/g1/g2") < 0) TEST_ERROR;
- if(check_name(group4_id, "/g34/g2a", "/g34/g2a") < 0) TEST_ERROR;
+ if(check_name(group3_id, "/g34/g1/g2", "/g34/g1/g2") < 0) TEST_ERROR
+ if(check_name(group4_id, "/g34/g2a", "/g34/g2a") < 0) TEST_ERROR
/* Close */
- H5Gclose( group_id );
- H5Gclose( group2_id );
- H5Gclose( group3_id );
- H5Gclose( group4_id );
- H5Fclose( file1_id );
+ H5Gclose(group_id);
+ H5Gclose(group2_id);
+ H5Gclose(group3_id);
+ H5Gclose(group4_id);
+ H5Fclose(file1_id);
PASSED();
@@ -2144,9 +2144,9 @@ PASSED();
if((group3_id = H5Gcreate2(file_id, "/g36/g1/g2", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) FAIL_STACK_ERROR
/* Close */
- H5Gclose( group_id );
- H5Gclose( group2_id );
- H5Gclose( group3_id );
+ H5Gclose(group_id);
+ H5Gclose(group2_id);
+ H5Gclose(group3_id);
/* Create second file and group "/g37/g4" in it */
file1_id = H5Fcreate(filename1, H5F_ACC_TRUNC, H5P_DEFAULT, fapl);
@@ -2157,62 +2157,62 @@ PASSED();
if((group4_id = H5Gcreate2(file1_id, "/g37/g4/g5b", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) FAIL_STACK_ERROR
/* Mount second file under "/g36/g1" in the first file */
- if (H5Fmount(file_id, "/g36/g1", file1_id, H5P_DEFAULT)<0) TEST_ERROR;
+ if(H5Fmount(file_id, "/g36/g1", file1_id, H5P_DEFAULT)<0) TEST_ERROR
/* Open group in mounted file */
- if ((group5_id = H5Gopen( file_id, "/g36/g1/g37/" ))<0) TEST_ERROR;
+ if((group5_id = H5Gopen2(file_id, "/g36/g1/g37/", H5P_DEFAULT)) < 0) FAIL_STACK_ERROR
/* Verify */
- if(check_name(group5_id, "/g36/g1/g37", "/g36/g1/g37") < 0) TEST_ERROR;
+ if(check_name(group5_id, "/g36/g1/g37", "/g36/g1/g37") < 0) TEST_ERROR
/* Open group to delete in mounted file */
- if ((group6_id = H5Gopen( file_id, "/g36/g1/g37/g4/g5a" ))<0) TEST_ERROR;
+ if((group6_id = H5Gopen2(file_id, "/g36/g1/g37/g4/g5a", H5P_DEFAULT)) < 0) FAIL_STACK_ERROR
/* Verify */
- if(check_name(group6_id, "/g36/g1/g37/g4/g5a", "/g36/g1/g37/g4/g5a") < 0) TEST_ERROR;
+ if(check_name(group6_id, "/g36/g1/g37/g4/g5a", "/g36/g1/g37/g4/g5a") < 0) TEST_ERROR
/* Delete end group in mounted file, using relative paths */
- if (H5Gunlink( group5_id, "g4/g5a")<0) TEST_ERROR;
+ if(H5Gunlink(group5_id, "g4/g5a")<0) TEST_ERROR
/* Verify */
- if(check_name(group6_id, "", "") < 0) TEST_ERROR;
- if(check_name(group3_id, "", "") < 0) TEST_ERROR;
+ if(check_name(group6_id, "", "") < 0) TEST_ERROR
+ if(check_name(group3_id, "", "") < 0) TEST_ERROR
/* Close deleted group */
- H5Gclose( group6_id );
+ H5Gclose(group6_id);
/* Open groups to delete in mounted file */
- if ((group6_id = H5Gopen( file_id, "/g36/g1/g37/g4" ))<0) TEST_ERROR;
- if ((group7_id = H5Gopen( file_id, "/g36/g1/g37/g4/g5b" ))<0) TEST_ERROR;
+ if((group6_id = H5Gopen2(file_id, "/g36/g1/g37/g4", H5P_DEFAULT)) < 0) FAIL_STACK_ERROR
+ if((group7_id = H5Gopen2(file_id, "/g36/g1/g37/g4/g5b", H5P_DEFAULT)) < 0) FAIL_STACK_ERROR
/* Verify */
- if(check_name(group6_id, "/g36/g1/g37/g4", "/g36/g1/g37/g4") < 0) TEST_ERROR;
- if(check_name(group7_id, "/g36/g1/g37/g4/g5b", "/g36/g1/g37/g4/g5b") < 0) TEST_ERROR;
+ if(check_name(group6_id, "/g36/g1/g37/g4", "/g36/g1/g37/g4") < 0) TEST_ERROR
+ if(check_name(group7_id, "/g36/g1/g37/g4/g5b", "/g36/g1/g37/g4/g5b") < 0) TEST_ERROR
/* Delete middle group in mounted file, using relative paths */
- if (H5Gunlink( group5_id, "g4")<0) TEST_ERROR;
+ if(H5Gunlink(group5_id, "g4")<0) TEST_ERROR
/* Verify */
- if(check_name(group6_id, "", "") < 0) TEST_ERROR;
- if(check_name(group2_id, "", "") < 0) TEST_ERROR;
- if(check_name(group7_id, "", "") < 0) TEST_ERROR;
- if(check_name(group4_id, "", "") < 0) TEST_ERROR;
+ if(check_name(group6_id, "", "") < 0) TEST_ERROR
+ if(check_name(group2_id, "", "") < 0) TEST_ERROR
+ if(check_name(group7_id, "", "") < 0) TEST_ERROR
+ if(check_name(group4_id, "", "") < 0) TEST_ERROR
/* Close deleted groups */
- H5Gclose( group6_id );
- H5Gclose( group7_id );
+ H5Gclose(group6_id);
+ H5Gclose(group7_id);
/* Close group in mounted file */
- H5Gclose( group5_id );
+ H5Gclose(group5_id);
- if (H5Funmount(file_id, "/g36/g1")<0) TEST_ERROR;
+ if(H5Funmount(file_id, "/g36/g1")<0) TEST_ERROR
/* Close */
- H5Gclose( group_id );
- H5Gclose( group2_id );
- H5Gclose( group3_id );
- H5Gclose( group4_id );
- H5Fclose( file1_id );
+ H5Gclose(group_id);
+ H5Gclose(group2_id);
+ H5Gclose(group3_id);
+ H5Gclose(group4_id);
+ H5Fclose(file1_id);
PASSED();
@@ -2233,9 +2233,9 @@ PASSED();
if((group3_id = H5Gcreate2(file1_id, "/g38/g1/g2", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) FAIL_STACK_ERROR
/* Close */
- H5Gclose( group_id );
- H5Gclose( group2_id );
- H5Gclose( group3_id );
+ H5Gclose(group_id);
+ H5Gclose(group2_id);
+ H5Gclose(group3_id);
/* Create second file and group "/g39/g1/g2" in it */
file2_id = H5Fcreate(filename2, H5F_ACC_TRUNC, H5P_DEFAULT, fapl);
@@ -2245,9 +2245,9 @@ PASSED();
if((group3_id = H5Gcreate2(file2_id, "/g39/g3/g4", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) FAIL_STACK_ERROR
/* Close */
- H5Gclose( group_id );
- H5Gclose( group2_id );
- H5Gclose( group3_id );
+ H5Gclose(group_id);
+ H5Gclose(group2_id);
+ H5Gclose(group3_id);
/* Create third file and group "/g40/g5/g6" in it */
file3_id = H5Fcreate(filename3, H5F_ACC_TRUNC, H5P_DEFAULT, fapl);
@@ -2257,46 +2257,46 @@ PASSED();
if((group3_id = H5Gcreate2(file3_id, "/g40/g5/g6", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) FAIL_STACK_ERROR
/* Close */
- H5Gclose( group_id );
- H5Gclose( group2_id );
- H5Gclose( group3_id );
+ H5Gclose(group_id);
+ H5Gclose(group2_id);
+ H5Gclose(group3_id);
/* Mount second file under "/g38/g1" in the first file */
- if (H5Fmount(file1_id, "/g38/g1", file2_id, H5P_DEFAULT)<0) TEST_ERROR;
+ if(H5Fmount(file1_id, "/g38/g1", file2_id, H5P_DEFAULT)<0) TEST_ERROR
- if ((group_id = H5Gopen( file1_id, "/g38/g1/g39/g3/g4" ))<0) TEST_ERROR;
+ if((group_id = H5Gopen2(file1_id, "/g38/g1/g39/g3/g4", H5P_DEFAULT)) < 0) FAIL_STACK_ERROR
/* Verify */
- if(check_name(group_id, "/g38/g1/g39/g3/g4", "/g38/g1/g39/g3/g4") < 0) TEST_ERROR;
+ if(check_name(group_id, "/g38/g1/g39/g3/g4", "/g38/g1/g39/g3/g4") < 0) TEST_ERROR
/* Mount first file under "/g40/g5" in the third file */
- if (H5Fmount(file3_id, "/g40/g5", file1_id, H5P_DEFAULT)<0) TEST_ERROR;
+ if(H5Fmount(file3_id, "/g40/g5", file1_id, H5P_DEFAULT)<0) TEST_ERROR
- if ((group2_id = H5Gopen( file3_id, "/g40/g5/g38/g1/g39/g3/g4" ))<0) TEST_ERROR;
+ if((group2_id = H5Gopen2(file3_id, "/g40/g5/g38/g1/g39/g3/g4", H5P_DEFAULT)) < 0) FAIL_STACK_ERROR
/* Verify */
- if(check_name(group2_id, "/g40/g5/g38/g1/g39/g3/g4", "/g40/g5/g38/g1/g39/g3/g4") < 0) TEST_ERROR;
- if(check_name(group_id, "/g38/g1/g39/g3/g4", "/g38/g1/g39/g3/g4") < 0) TEST_ERROR;
+ if(check_name(group2_id, "/g40/g5/g38/g1/g39/g3/g4", "/g40/g5/g38/g1/g39/g3/g4") < 0) TEST_ERROR
+ if(check_name(group_id, "/g38/g1/g39/g3/g4", "/g38/g1/g39/g3/g4") < 0) TEST_ERROR
/* Unmount first file */
- if (H5Funmount(file3_id, "/g40/g5")<0) TEST_ERROR;
+ if(H5Funmount(file3_id, "/g40/g5")<0) TEST_ERROR
/* Verify */
- if(check_name(group2_id, "/g38/g1/g39/g3/g4", "") < 0) TEST_ERROR;
- if(check_name(group_id, "/g38/g1/g39/g3/g4", "/g38/g1/g39/g3/g4") < 0) TEST_ERROR;
+ if(check_name(group2_id, "/g38/g1/g39/g3/g4", "") < 0) TEST_ERROR
+ if(check_name(group_id, "/g38/g1/g39/g3/g4", "/g38/g1/g39/g3/g4") < 0) TEST_ERROR
/* Unmount second file */
- if (H5Funmount(file1_id, "/g38/g1")<0) TEST_ERROR;
+ if(H5Funmount(file1_id, "/g38/g1")<0) TEST_ERROR
/* Verify */
- if(check_name(group_id, "/g39/g3/g4", "") < 0) TEST_ERROR;
+ if(check_name(group_id, "/g39/g3/g4", "") < 0) TEST_ERROR
/* Close */
- H5Gclose( group_id );
- H5Gclose( group2_id );
- H5Fclose( file1_id );
- H5Fclose( file2_id );
- H5Fclose( file3_id );
+ H5Gclose(group_id);
+ H5Gclose(group2_id);
+ H5Fclose(file1_id);
+ H5Fclose(file2_id);
+ H5Fclose(file3_id);
PASSED();
@@ -2315,9 +2315,9 @@ PASSED();
if((group3_id = H5Gcreate2(file1_id, "/g41/g1/g2", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) FAIL_STACK_ERROR
/* Close */
- H5Gclose( group_id );
- H5Gclose( group2_id );
- H5Gclose( group3_id );
+ H5Gclose(group_id);
+ H5Gclose(group2_id);
+ H5Gclose(group3_id);
/* Create second file and group "/g42/g1/g2" in it */
file2_id = H5Fcreate(filename2, H5F_ACC_TRUNC, H5P_DEFAULT, fapl);
@@ -2327,31 +2327,31 @@ PASSED();
if((group3_id = H5Gcreate2(file2_id, "/g42/g3/g4", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) FAIL_STACK_ERROR
/* Close */
- H5Gclose( group_id );
- H5Gclose( group2_id );
- H5Gclose( group3_id );
+ H5Gclose(group_id);
+ H5Gclose(group2_id);
+ H5Gclose(group3_id);
/* Mount second file under "/g41/g1" in the first file */
- if (H5Fmount(file1_id, "/g41/g1", file2_id, H5P_DEFAULT)<0) TEST_ERROR;
+ if(H5Fmount(file1_id, "/g41/g1", file2_id, H5P_DEFAULT)<0) TEST_ERROR
- if ((group_id = H5Gopen( file1_id, "/g41/g1/g42/g3" ))<0) TEST_ERROR;
+ if((group_id = H5Gopen2(file1_id, "/g41/g1/g42/g3", H5P_DEFAULT)) < 0) FAIL_STACK_ERROR
/* Verify */
- if(check_name(group_id, "/g41/g1/g42/g3", "/g41/g1/g42/g3") < 0) TEST_ERROR;
+ if(check_name(group_id, "/g41/g1/g42/g3", "/g41/g1/g42/g3") < 0) TEST_ERROR
/* Unmount file */
- if (H5Funmount(file1_id, "/g41/g1")<0) TEST_ERROR;
+ if(H5Funmount(file1_id, "/g41/g1")<0) TEST_ERROR
- if ((group2_id = H5Gopen( group_id, "g4" ))<0) TEST_ERROR;
+ if((group2_id = H5Gopen2(group_id, "g4", H5P_DEFAULT)) < 0) FAIL_STACK_ERROR
/* Verify */
- if(check_name(group2_id, "/g42/g3/g4", "") < 0) TEST_ERROR;
+ if(check_name(group2_id, "/g42/g3/g4", "") < 0) TEST_ERROR
/* Close */
- H5Gclose( group_id );
- H5Gclose( group2_id );
- H5Fclose( file1_id );
- H5Fclose( file2_id );
+ H5Gclose(group_id);
+ H5Gclose(group2_id);
+ H5Fclose(file1_id);
+ H5Fclose(file2_id);
PASSED();
@@ -2401,7 +2401,7 @@ test_obj_ref(hid_t fapl)
if(H5Dclose(dataset) < 0)
TEST_ERROR
- /* Create a dataset (inside Group1) */
+ /* Create a dataset(inside Group1) */
if((dataset = H5Dcreate(group, "Dataset1", H5T_STD_U32LE, sid1, H5P_DEFAULT)) < 0)
TEST_ERROR
@@ -2417,7 +2417,7 @@ test_obj_ref(hid_t fapl)
if(H5Dclose(dataset) < 0)
TEST_ERROR
- /* Create another dataset (inside Group1) */
+ /* Create another dataset(inside Group1) */
if((dataset = H5Dcreate(group, "Dataset2", H5T_NATIVE_UCHAR, sid1, H5P_DEFAULT)) < 0)
TEST_ERROR
@@ -2467,8 +2467,8 @@ test_obj_ref(hid_t fapl)
TEST_ERROR
/* Open up that hard link and make a new dataset there */
- if((group = H5Gopen(fid1, "/Group1/Group2/Link")) < 0)
- TEST_ERROR
+ if((group = H5Gopen2(fid1, "/Group1/Group2/Link", H5P_DEFAULT)) < 0)
+ FAIL_STACK_ERROR
if((dataset = H5Dcreate(group, "Dataset5", H5T_NATIVE_UCHAR, sid1, H5P_DEFAULT)) < 0)
TEST_ERROR
@@ -2515,81 +2515,81 @@ test_obj_ref(hid_t fapl)
TESTING("getting path to normal dataset in root group");
if((dataset2 = H5Rdereference(dataset, H5R_OBJECT, &wbuf[0])) < 0) TEST_ERROR
- i = H5Iget_name(dataset2, (char*)buf, sizeof(buf));
+ i = H5Iget_name(dataset2,(char*)buf, sizeof(buf));
if(H5Dclose(dataset2) < 0) TEST_ERROR
- if(!((HDstrcmp(buf, "/Dataset3") == 0) && (i == 9))) TEST_ERROR
- i = H5Rget_name(dataset, H5R_OBJECT, &wbuf[0], (char*)buf, sizeof(buf));
- if(!((HDstrcmp(buf, "/Dataset3") == 0) && (i == 9))) TEST_ERROR
+ if(!((HDstrcmp(buf, "/Dataset3") == 0) &&(i == 9))) TEST_ERROR
+ i = H5Rget_name(dataset, H5R_OBJECT, &wbuf[0],(char*)buf, sizeof(buf));
+ if(!((HDstrcmp(buf, "/Dataset3") == 0) &&(i == 9))) TEST_ERROR
PASSED()
HDmemset(buf, 0, sizeof(buf));
TESTING("getting path to dataset in /Group1");
if((dataset2 = H5Rdereference(dataset, H5R_OBJECT, &wbuf[1])) < 0) TEST_ERROR
- i = H5Iget_name(dataset2, (char*)buf, sizeof(buf));
+ i = H5Iget_name(dataset2,(char*)buf, sizeof(buf));
if(H5Dclose(dataset2) < 0) TEST_ERROR
- if(!((HDstrcmp(buf, "/Group1/Dataset2") == 0) && (i == 16))) TEST_ERROR
- i = H5Rget_name(dataset, H5R_OBJECT, &wbuf[1], (char*)buf, sizeof(buf));
- if(!((HDstrcmp(buf, "/Group1/Dataset2") == 0) && (i == 16))) TEST_ERROR
+ if(!((HDstrcmp(buf, "/Group1/Dataset2") == 0) &&(i == 16))) TEST_ERROR
+ i = H5Rget_name(dataset, H5R_OBJECT, &wbuf[1],(char*)buf, sizeof(buf));
+ if(!((HDstrcmp(buf, "/Group1/Dataset2") == 0) &&(i == 16))) TEST_ERROR
PASSED()
HDmemset(buf, 0, sizeof(buf));
TESTING("getting path to /Group1");
if((group = H5Rdereference(dataset, H5R_OBJECT, &wbuf[2])) < 0) TEST_ERROR
- i = H5Iget_name(group, (char*)buf, sizeof(buf));
+ i = H5Iget_name(group,(char*)buf, sizeof(buf));
if(H5Gclose(group) < 0) TEST_ERROR
- if(!((HDstrcmp(buf, "/Group1") == 0) && (i == 7))) TEST_ERROR
- i = H5Rget_name(dataset, H5R_OBJECT, &wbuf[2], (char*)buf, sizeof(buf));
- if(!((HDstrcmp(buf, "/Group1") == 0) && (i == 7))) TEST_ERROR
+ if(!((HDstrcmp(buf, "/Group1") == 0) &&(i == 7))) TEST_ERROR
+ i = H5Rget_name(dataset, H5R_OBJECT, &wbuf[2],(char*)buf, sizeof(buf));
+ if(!((HDstrcmp(buf, "/Group1") == 0) &&(i == 7))) TEST_ERROR
PASSED()
HDmemset(buf, 0, sizeof(buf));
TESTING("getting path to datatype in /Group1");
if((tid1 = H5Rdereference(dataset, H5R_OBJECT, &wbuf[3])) < 0) TEST_ERROR
- i = H5Iget_name(tid1, (char*)buf, sizeof(buf));
+ i = H5Iget_name(tid1,(char*)buf, sizeof(buf));
if(H5Tclose(tid1) < 0) TEST_ERROR
- if(!((HDstrcmp(buf, "/Group1/Datatype1") == 0) && (i == 17))) TEST_ERROR
- i = H5Rget_name(dataset, H5R_OBJECT, &wbuf[3], (char*)buf, sizeof(buf));
- if(!((HDstrcmp(buf, "/Group1/Datatype1") == 0) && (i == 17))) TEST_ERROR
+ if(!((HDstrcmp(buf, "/Group1/Datatype1") == 0) &&(i == 17))) TEST_ERROR
+ i = H5Rget_name(dataset, H5R_OBJECT, &wbuf[3],(char*)buf, sizeof(buf));
+ if(!((HDstrcmp(buf, "/Group1/Datatype1") == 0) &&(i == 17))) TEST_ERROR
PASSED()
HDmemset(buf, 0, sizeof(buf));
TESTING("getting path to dataset in nested group");
if((dataset2 = H5Rdereference(dataset, H5R_OBJECT, &wbuf[4])) < 0) TEST_ERROR
- i = H5Iget_name(dataset2, (char*)buf, sizeof(buf));
+ i = H5Iget_name(dataset2,(char*)buf, sizeof(buf));
if(H5Dclose(dataset2) < 0) TEST_ERROR
- if(!((HDstrcmp(buf, "/Group1/Group2/Dataset4") == 0) && (i == 23))) TEST_ERROR
- i = H5Rget_name(dataset, H5R_OBJECT, &wbuf[4], (char*)buf, sizeof(buf));
- if(!((HDstrcmp(buf, "/Group1/Group2/Dataset4") == 0) && (i == 23))) TEST_ERROR
+ if(!((HDstrcmp(buf, "/Group1/Group2/Dataset4") == 0) &&(i == 23))) TEST_ERROR
+ i = H5Rget_name(dataset, H5R_OBJECT, &wbuf[4],(char*)buf, sizeof(buf));
+ if(!((HDstrcmp(buf, "/Group1/Group2/Dataset4") == 0) &&(i == 23))) TEST_ERROR
PASSED()
HDmemset(buf, 0, sizeof(buf));
TESTING("getting path to nested group");
if((group = H5Rdereference(dataset, H5R_OBJECT, &wbuf[5])) < 0) TEST_ERROR
- i = H5Iget_name(group, (char*)buf, sizeof(buf));
+ i = H5Iget_name(group,(char*)buf, sizeof(buf));
if(H5Gclose(group) < 0) TEST_ERROR
- if(!((HDstrcmp(buf, "/Group1/Group2") == 0) && (i == 14))) TEST_ERROR
- i = H5Rget_name(dataset, H5R_OBJECT, &wbuf[5], (char*)buf, sizeof(buf));
- if(!((HDstrcmp(buf, "/Group1/Group2") == 0) && (i == 14))) TEST_ERROR
+ if(!((HDstrcmp(buf, "/Group1/Group2") == 0) &&(i == 14))) TEST_ERROR
+ i = H5Rget_name(dataset, H5R_OBJECT, &wbuf[5],(char*)buf, sizeof(buf));
+ if(!((HDstrcmp(buf, "/Group1/Group2") == 0) &&(i == 14))) TEST_ERROR
PASSED()
HDmemset(buf, 0, sizeof(buf));
TESTING("getting path to dataset created via hard link");
if((dataset2 = H5Rdereference(dataset, H5R_OBJECT, &wbuf[6])) < 0) TEST_ERROR
- i = H5Iget_name(dataset2, (char*)buf, sizeof(buf));
+ i = H5Iget_name(dataset2,(char*)buf, sizeof(buf));
if(H5Dclose(dataset2) < 0) TEST_ERROR
- if(!((HDstrcmp(buf, "/Group1/Dataset5") == 0) && (i == 16))) TEST_ERROR
- i = H5Rget_name(dataset, H5R_OBJECT, &wbuf[6], (char*)buf, sizeof(buf));
- if(!((HDstrcmp(buf, "/Group1/Dataset5") == 0) && (i == 16))) TEST_ERROR
+ if(!((HDstrcmp(buf, "/Group1/Dataset5") == 0) &&(i == 16))) TEST_ERROR
+ i = H5Rget_name(dataset, H5R_OBJECT, &wbuf[6],(char*)buf, sizeof(buf));
+ if(!((HDstrcmp(buf, "/Group1/Dataset5") == 0) &&(i == 16))) TEST_ERROR
PASSED()
HDmemset(buf, 0, sizeof(buf));
TESTING("getting path to root group");
if((group = H5Rdereference(dataset, H5R_OBJECT, &wbuf[7])) < 0) TEST_ERROR
- i = H5Iget_name(group, (char*)buf, sizeof(buf));
+ i = H5Iget_name(group,(char*)buf, sizeof(buf));
if(H5Gclose(group) < 0) TEST_ERROR
- if(!((HDstrcmp(buf, "/") == 0) && (i == 1))) TEST_ERROR
- i = H5Rget_name(dataset, H5R_OBJECT, &wbuf[7], (char*)buf, sizeof(buf));
- if(!((HDstrcmp(buf, "/") == 0) && (i == 1))) TEST_ERROR
+ if(!((HDstrcmp(buf, "/") == 0) &&(i == 1))) TEST_ERROR
+ i = H5Rget_name(dataset, H5R_OBJECT, &wbuf[7],(char*)buf, sizeof(buf));
+ if(!((HDstrcmp(buf, "/") == 0) &&(i == 1))) TEST_ERROR
PASSED()
/* Now we mount fid2 at /Group2 and look for dataset4. It shouldn't be found */
@@ -2598,10 +2598,10 @@ test_obj_ref(hid_t fapl)
TESTING("getting path to dataset hidden by a mounted file");
if((dataset2 = H5Rdereference(dataset, H5R_OBJECT, &wbuf[4])) < 0) TEST_ERROR
- i = H5Iget_name(dataset2, (char*)buf, sizeof(buf));
+ i = H5Iget_name(dataset2,(char*)buf, sizeof(buf));
if(H5Dclose(dataset2) < 0) TEST_ERROR
if(i != 0) TEST_ERROR
- i = H5Rget_name(dataset, H5R_OBJECT, &wbuf[4], (char*)buf, sizeof(buf));
+ i = H5Rget_name(dataset, H5R_OBJECT, &wbuf[4],(char*)buf, sizeof(buf));
if(i != 0) TEST_ERROR
PASSED()
@@ -2612,10 +2612,10 @@ test_obj_ref(hid_t fapl)
TEST_ERROR
TESTING("getting path to dataset that has been unlinked");
- i = H5Iget_name(dataset2, (char*)buf, sizeof(buf));
+ i = H5Iget_name(dataset2,(char*)buf, sizeof(buf));
if(H5Dclose(dataset2) < 0) TEST_ERROR
if(i != 0) TEST_ERROR
- i = H5Rget_name(dataset, H5R_OBJECT, &wbuf[1], (char*)buf, sizeof(buf));
+ i = H5Rget_name(dataset, H5R_OBJECT, &wbuf[1],(char*)buf, sizeof(buf));
if(i != 0) TEST_ERROR
PASSED()
@@ -2704,7 +2704,7 @@ test_reg_ref(hid_t fapl)
/* Create a reference to elements selection */
if((status = H5Sselect_none(space_id)) < 0)
TEST_ERROR
- if((status = H5Sselect_elements(space_id, H5S_SELECT_SET, num_points, (const hsize_t **)coord)) < 0)
+ if((status = H5Sselect_elements(space_id, H5S_SELECT_SET, num_points,(const hsize_t **)coord)) < 0)
TEST_ERROR
if((status = H5Rcreate(&ref[1], file_id, REFREG_DSETNAMEV, H5R_DATASET_REGION, space_id)) < 0)
TEST_ERROR
@@ -2736,38 +2736,38 @@ test_reg_ref(hid_t fapl)
TEST_ERROR
/* Get name of the dataset the first region reference points to using H5Rget_name */
- TESTING("H5Rget_name to get name from region reference (hyperslab)");
- name_size1 = H5Rget_name(dsetr_id, H5R_DATASET_REGION, &ref_out[0], (char*)buf1, NAME_BUF_SIZE);
- if(!((HDstrcmp(buf1, "/MATRIX") == 0) && (name_size1 == 7))) TEST_ERROR
+ TESTING("H5Rget_name to get name from region reference(hyperslab)");
+ name_size1 = H5Rget_name(dsetr_id, H5R_DATASET_REGION, &ref_out[0],(char*)buf1, NAME_BUF_SIZE);
+ if(!((HDstrcmp(buf1, "/MATRIX") == 0) &&(name_size1 == 7))) TEST_ERROR
PASSED()
- TESTING("H5Iget_name to get name from region reference (hyperslab)");
+ TESTING("H5Iget_name to get name from region reference(hyperslab)");
/* Dereference the first reference */
dsetv_id = H5Rdereference(dsetr_id, H5R_DATASET_REGION, &ref_out[0]);
/* Get name of the dataset the first region reference points using H5Iget_name */
- name_size2 = H5Iget_name(dsetv_id, (char*)buf2, NAME_BUF_SIZE);
- if(!((HDstrcmp(buf2, "/MATRIX") == 0) && (name_size2 == 7))) TEST_ERROR
+ name_size2 = H5Iget_name(dsetv_id,(char*)buf2, NAME_BUF_SIZE);
+ if(!((HDstrcmp(buf2, "/MATRIX") == 0) &&(name_size2 == 7))) TEST_ERROR
if((status = H5Dclose(dsetv_id)) < 0) TEST_ERROR
PASSED()
/* Get name of the dataset the second region reference points to using H5Rget_name */
- TESTING("H5Rget_name to get name from region reference (pnt selec)");
- name_size1 = H5Rget_name(dsetr_id, H5R_DATASET_REGION, &ref_out[1], (char*)buf1, NAME_BUF_SIZE);
- if(!((HDstrcmp(buf1, "/MATRIX") == 0) && (name_size1 == 7))) TEST_ERROR
+ TESTING("H5Rget_name to get name from region reference(pnt selec)");
+ name_size1 = H5Rget_name(dsetr_id, H5R_DATASET_REGION, &ref_out[1],(char*)buf1, NAME_BUF_SIZE);
+ if(!((HDstrcmp(buf1, "/MATRIX") == 0) &&(name_size1 == 7))) TEST_ERROR
PASSED()
- TESTING("H5Iget_name to get name from region reference (pnt selec)");
+ TESTING("H5Iget_name to get name from region reference(pnt selec)");
/* Dereference the second reference */
if((dsetv_id = H5Rdereference(dsetr_id, H5R_DATASET_REGION, &ref_out[1])) < 0) TEST_ERROR
/* Get name of the dataset the first region reference points using H5Iget_name */
- name_size2 = H5Iget_name(dsetv_id, (char*)buf2, NAME_BUF_SIZE);
- if(!((HDstrcmp(buf2, "/MATRIX") == 0) && (name_size2 == 7))) TEST_ERROR
+ name_size2 = H5Iget_name(dsetv_id,(char*)buf2, NAME_BUF_SIZE);
+ if(!((HDstrcmp(buf2, "/MATRIX") == 0) &&(name_size2 == 7))) TEST_ERROR
if((status = H5Dclose(dsetv_id)) < 0) TEST_ERROR
@@ -2787,7 +2787,7 @@ error:
int
main(void)
{
- hid_t file_id = (-1);
+ hid_t file_id =(-1);
int nerrors = 0;
hid_t fapl;
char filename0[1024];
@@ -2800,7 +2800,7 @@ main(void)
/* Create a new file_id using default create property but vfd access
* property.
*/
- if((file_id = H5Fcreate(filename0,H5F_ACC_TRUNC, H5P_DEFAULT, fapl )) < 0) TEST_ERROR
+ if((file_id = H5Fcreate(filename0,H5F_ACC_TRUNC, H5P_DEFAULT, fapl)) < 0) TEST_ERROR
/* Call "main" test routine */
nerrors += test_main(file_id, fapl);