diff options
author | Pedro Vicente Nunes <pvn@hdfgroup.org> | 2002-09-18 15:51:29 (GMT) |
---|---|---|
committer | Pedro Vicente Nunes <pvn@hdfgroup.org> | 2002-09-18 15:51:29 (GMT) |
commit | 2aca3b77d63aa78d16262e23d929f2c13570a2d5 (patch) | |
tree | 54bf519b70e182e1628754915bca5cea24f71658 /test/getname.c | |
parent | d32ad090439ad97af135a269a60dbbff430b84da (diff) | |
download | hdf5-2aca3b77d63aa78d16262e23d929f2c13570a2d5.zip hdf5-2aca3b77d63aa78d16262e23d929f2c13570a2d5.tar.gz hdf5-2aca3b77d63aa78d16262e23d929f2c13570a2d5.tar.bz2 |
[svn-r5929]
Purpose:
bug fix
Description:
memory leak regarding the ID to name buffer
Solution:
added a new function H5G_free_ent_name that is called on several places of the library
Platforms tested:
windows 2000
linux, with cpp
solaris, with fortran, cpp
irix64, with parallel, fortran
Diffstat (limited to 'test/getname.c')
-rw-r--r-- | test/getname.c | 51 |
1 files changed, 48 insertions, 3 deletions
diff --git a/test/getname.c b/test/getname.c index d17c4fb..83de4d2 100644 --- a/test/getname.c +++ b/test/getname.c @@ -61,14 +61,36 @@ int main( void ) H5P_DEFAULT ))<0) goto out; +/*------------------------------------------------------------------------- + * Test H5Iget_name with H5Gcreate, one group + *------------------------------------------------------------------------- + */ + + TESTING("H5Iget_name with H5Gcreate, one group"); + + /* Create group "g0" in the root group using absolute name */ + if ((group_id = H5Gcreate( file_id, "/g0", 0 ))<0) goto out; + + /* Get name */ + if (H5Iget_name( group_id, name, size )<0) goto out; + + /* Verify */ + if (check_name( name, "/g0" )!=0) + goto out; + + /* Close */ + H5Gclose( group_id ); + + PASSED(); + /*------------------------------------------------------------------------- - * Test H5Iget_name with H5Gcreate + * Test H5Iget_name with H5Gcreate, more than one group *------------------------------------------------------------------------- */ - TESTING("H5Iget_name with H5Gcreate"); + TESTING("H5Iget_name with H5Gcreate, more than one group"); /* Create group "g1" in the root group using absolute name */ if ((group_id = H5Gcreate( file_id, "/g1", 0 ))<0) goto out; @@ -96,6 +118,7 @@ int main( void ) PASSED(); + /*------------------------------------------------------------------------- * Test H5Iget_name with H5Gopen *------------------------------------------------------------------------- @@ -130,6 +153,8 @@ int main( void ) PASSED(); + + /*------------------------------------------------------------------------- * Test H5Iget_name with H5Dcreate *------------------------------------------------------------------------- @@ -175,6 +200,8 @@ int main( void ) PASSED(); + + /*------------------------------------------------------------------------- * Test H5Iget_name with H5Dopen *------------------------------------------------------------------------- @@ -216,6 +243,7 @@ int main( void ) PASSED(); + /*------------------------------------------------------------------------- * Test H5Iget_name with a long path *------------------------------------------------------------------------- @@ -309,6 +337,8 @@ int main( void ) PASSED(); + + /*------------------------------------------------------------------------- * Test H5Iget_name with H5Gmove and H5Gopen *------------------------------------------------------------------------- @@ -338,6 +368,8 @@ int main( void ) PASSED(); + + /*------------------------------------------------------------------------- * Test H5Iget_name with H5Gmove and H5Dopen *------------------------------------------------------------------------- @@ -364,6 +396,8 @@ int main( void ) PASSED(); + + /*------------------------------------------------------------------------- * Test H5Iget_name with H5Gmove and H5Topen *------------------------------------------------------------------------- @@ -429,6 +463,7 @@ int main( void ) PASSED(); + /*------------------------------------------------------------------------- * Test H5Iget_name with H5Gmove and a long path *------------------------------------------------------------------------- @@ -809,6 +844,9 @@ int main( void ) PASSED(); + + + /*------------------------------------------------------------------------- * Test H5Iget_name with a defined type dataset *------------------------------------------------------------------------- @@ -877,6 +915,8 @@ int main( void ) PASSED(); + + /*------------------------------------------------------------------------- * Test H5Iget_name with different files, test1 *------------------------------------------------------------------------- @@ -1305,6 +1345,8 @@ int main( void ) PASSED(); + + /*------------------------------------------------------------------------- * Test H5Iget_name with H5Glink hard @@ -1346,6 +1388,7 @@ int main( void ) PASSED(); + /*------------------------------------------------------------------------- * Test H5Iget_name with H5Glink symbolic *------------------------------------------------------------------------- @@ -1385,6 +1428,8 @@ int main( void ) PASSED(); +#if 1 + /*------------------------------------------------------------------------- * Test H5Iget_name with H5Glink symbolic and move target @@ -1577,7 +1622,7 @@ int main( void ) *------------------------------------------------------------------------- */ - +#endif /* Close file */ H5Fclose( file_id ); |