summaryrefslogtreecommitdiffstats
path: root/test/mount.c
diff options
context:
space:
mode:
authorQuincey Koziol <koziol@hdfgroup.org>2007-11-24 16:49:36 (GMT)
committerQuincey Koziol <koziol@hdfgroup.org>2007-11-24 16:49:36 (GMT)
commit2f36ea99d4ad1b036d377719e49eaab2dec64444 (patch)
tree63be7c282767004339c49aa0e738e6a62630c280 /test/mount.c
parent083357dad3334473507a97e17593a9d68e42d69f (diff)
downloadhdf5-2f36ea99d4ad1b036d377719e49eaab2dec64444.zip
hdf5-2f36ea99d4ad1b036d377719e49eaab2dec64444.tar.gz
hdf5-2f36ea99d4ad1b036d377719e49eaab2dec64444.tar.bz2
[svn-r14284] Description:
Add H5Lvisit_by_name() API routine to library. Eliminated all (five!) other group traversal routines and changed them all to use the new API routine. Cleaned up output of h5ls & h5stat: - Issue error when requesting recursive traversal of a file with the "group info" flag, but no group given - Print info about root group in all(?) appropriate situations - Don't print "verbose" information about root group until the root group is in the list of objects to display (mostly because h5ls & h5stat had a different twist on traversing the groups in a file that the other utilities) Tested on: FreeBSD/32 6.2 (duty) in debug mode FreeBSD/64 6.2 (liberty) w/C++ & FORTRAN, in debug mode Linux/32 2.6 (kagiso) w/PGI compilers, w/C++ & FORTRAN, w/threadsafe, in debug mode Linux/64-amd64 2.6 (smirom) w/default API=1.6.x, w/C++ & FORTRAN, in production mode Linux/64-ia64 2.6 (cobalt) w/Intel compilers, w/C++ & FORTRAN, in production mode Solaris/32 2.10 (linew) w/deprecated symbols disabled, w/C++ & FORTRAN, w/szip filter, in production mode Mac OS X/32 10.4.10 (amazon) in debug mode Linux/64-ia64 2.4 (tg-login3) w/parallel, w/FORTRAN, in production mode
Diffstat (limited to 'test/mount.c')
-rw-r--r--test/mount.c26
1 files changed, 25 insertions, 1 deletions
diff --git a/test/mount.c b/test/mount.c
index 2ce9a2a..e6aa881 100644
--- a/test/mount.c
+++ b/test/mount.c
@@ -1170,6 +1170,7 @@ test_mount_after_close(hid_t fapl)
if((gidABMX = H5Gopen2(gidAB, "M/X", H5P_DEFAULT)) < 0) FAIL_STACK_ERROR
/* Check name */
+ *objname = '\0';
if(H5Iget_name(gidABMX, objname, (size_t)NAME_BUF_SIZE) < 0) FAIL_STACK_ERROR
if(HDstrcmp(objname, "/A/B/M/X")) TEST_ERROR
@@ -1180,6 +1181,7 @@ test_mount_after_close(hid_t fapl)
if((gidABC = H5Gopen2(gidAB, "C", H5P_DEFAULT)) < 0) FAIL_STACK_ERROR
/* Check name */
+ *objname = '\0';
if(H5Iget_name(gidABC, objname, (size_t)NAME_BUF_SIZE) < 0) FAIL_STACK_ERROR
if(HDstrcmp(objname, "/A/B/C")) TEST_ERROR
@@ -1190,6 +1192,7 @@ test_mount_after_close(hid_t fapl)
if((gidABT = H5Gopen2(gidAB, "T", H5P_DEFAULT)) < 0) FAIL_STACK_ERROR
/* Check name */
+ *objname = '\0';
if(H5Iget_name(gidABT, objname, (size_t)NAME_BUF_SIZE) < 0) FAIL_STACK_ERROR
if(HDstrcmp(objname, "/A/B/T")) TEST_ERROR
@@ -1200,6 +1203,7 @@ test_mount_after_close(hid_t fapl)
if((didABMXYD = H5Dopen2(gidAB, "M/X/Y/D", H5P_DEFAULT)) < 0) FAIL_STACK_ERROR
/* Check name */
+ *objname = '\0';
if(H5Iget_name(didABMXYD, objname, (size_t)NAME_BUF_SIZE) < 0) FAIL_STACK_ERROR
if(HDstrcmp(objname, "/A/B/M/X/Y/D")) TEST_ERROR
@@ -1370,6 +1374,7 @@ test_mount_after_unmount(hid_t fapl)
TEST_ERROR
/* Check name */
+ *objname = '\0';
if(H5Iget_name( gidAMXX, objname, (size_t)NAME_BUF_SIZE ) < 0)
TEST_ERROR
if(HDstrcmp(objname, "/A/M/X/X"))
@@ -1389,6 +1394,7 @@ test_mount_after_unmount(hid_t fapl)
TEST_ERROR
/* Check name */
+ *objname = '\0';
if(H5Iget_name( gidAMXMY, objname, (size_t)NAME_BUF_SIZE ) < 0)
TEST_ERROR
if(HDstrcmp(objname, "/A/M/X/M/Y"))
@@ -1435,6 +1441,7 @@ test_mount_after_unmount(hid_t fapl)
TEST_ERROR
/* Check name */
+ *objname = '\0';
if(H5Iget_name( gidBMZ, objname, (size_t)NAME_BUF_SIZE ) < 0)
TEST_ERROR
if(HDstrcmp(objname, "/B/M/Z"))
@@ -2721,6 +2728,7 @@ test_mult_mount(hid_t fapl)
TEST_ERROR
/* Check name */
+ *name = '\0';
if(H5Iget_name(gidAMT, name, (size_t)NAME_BUF_SIZE ) < 0)
TEST_ERROR
if(HDstrcmp(name, "/A/M/T"))
@@ -2738,6 +2746,7 @@ test_mult_mount(hid_t fapl)
TEST_ERROR
/* Check name */
+ *name = '\0';
if(H5Iget_name(gidBS, name, (size_t)NAME_BUF_SIZE ) < 0)
TEST_ERROR
if(HDstrcmp(name, "/B/S"))
@@ -2924,6 +2933,7 @@ test_nested_survive(hid_t fapl)
TEST_ERROR
/* Check name */
+ *name = '\0';
if((name_len = H5Iget_name(gidAM, name, (size_t)NAME_BUF_SIZE )) < 0)
TEST_ERROR
if(name_len == 0 || HDstrcmp(name, "/A/M"))
@@ -2934,9 +2944,10 @@ test_nested_survive(hid_t fapl)
TEST_ERROR
/* Check name */
+ *name = '\0';
if((name_len = H5Iget_name(gidAM, name, (size_t)NAME_BUF_SIZE )) < 0)
TEST_ERROR
- if(name_len == 0 || HDstrcmp(name, "/M"))
+ if(name_len != 0 || HDstrcmp(name, ""))
TEST_ERROR
/* Open object in file #3 through file #1 mount path (should fail) */
@@ -2951,6 +2962,7 @@ test_nested_survive(hid_t fapl)
TEST_ERROR
/* Check name */
+ *name = '\0';
if(H5Iget_name(gidMS, name, (size_t)NAME_BUF_SIZE ) < 0)
TEST_ERROR
if(HDstrcmp(name, "/M/S"))
@@ -2969,6 +2981,7 @@ test_nested_survive(hid_t fapl)
TEST_ERROR
/* Check name */
+ *name = '\0';
if(H5Iget_name(gidAMS, name, (size_t)NAME_BUF_SIZE ) < 0)
TEST_ERROR
if(HDstrcmp(name, "/A/M/S"))
@@ -3122,6 +3135,7 @@ test_close_parent(hid_t fapl)
TEST_ERROR
/* Check the name of "M" is still defined */
+ *name = '\0';
if((name_len = H5Iget_name(gidM, name, (size_t)NAME_BUF_SIZE )) < 0)
TEST_ERROR
if(name_len == 0 || HDstrcmp(name, "/A/M"))
@@ -3132,6 +3146,7 @@ test_close_parent(hid_t fapl)
TEST_ERROR
/* Check the name of "M" is defined in its file */
+ *name = '\0';
if((name_len = H5Iget_name(gidM, name, (size_t)NAME_BUF_SIZE )) < 0)
TEST_ERROR
if(name_len == 0 || HDstrcmp(name, "/M"))
@@ -3407,6 +3422,7 @@ test_cut_graph(hid_t fapl)
TEST_ERROR
/* Check name */
+ *name = '\0';
if((name_len = H5Iget_name(gidM, name, (size_t)NAME_BUF_SIZE )) < 0)
TEST_ERROR
if(name_len == 0 || HDstrcmp(name, "/A/E/M"))
@@ -3417,6 +3433,7 @@ test_cut_graph(hid_t fapl)
TEST_ERROR
/* Check name */
+ *name = '\0';
if((name_len = H5Iget_name(gidQ, name, (size_t)NAME_BUF_SIZE )) < 0)
TEST_ERROR
if(name_len == 0 || HDstrcmp(name, "/B/I/Q"))
@@ -3477,6 +3494,7 @@ test_cut_graph(hid_t fapl)
TEST_ERROR
/* Check the name of "K" is correct */
+ *name = '\0';
if((name_len = H5Iget_name(gidK, name, (size_t)NAME_BUF_SIZE )) < 0)
TEST_ERROR
if(name_len == 0 || HDstrcmp(name, "/D/K"))
@@ -3497,6 +3515,7 @@ test_cut_graph(hid_t fapl)
TEST_ERROR
/* Check the name of "O" is correct */
+ *name = '\0';
if((name_len = H5Iget_name(gidO, name, (size_t)NAME_BUF_SIZE )) < 0)
TEST_ERROR
if(name_len == 0 || HDstrcmp(name, "/B/H/O"))
@@ -3506,12 +3525,14 @@ test_cut_graph(hid_t fapl)
TEST_ERROR
/* Check the name of "M" is defined in its file */
+ *name = '\0';
if((name_len = H5Iget_name(gidM, name, (size_t)NAME_BUF_SIZE )) < 0)
TEST_ERROR
if(name_len == 0 || HDstrcmp(name, "/E/M"))
TEST_ERROR
/* Check the name of "Q" is still defined */
+ *name = '\0';
if((name_len = H5Iget_name(gidQ, name, (size_t)NAME_BUF_SIZE )) < 0)
TEST_ERROR
if(name_len == 0 || HDstrcmp(name, "/B/I/Q"))
@@ -3539,6 +3560,7 @@ test_cut_graph(hid_t fapl)
TEST_ERROR
/* Check the name of "Q" is defined in its file */
+ *name = '\0';
if((name_len = H5Iget_name(gidQ, name, (size_t)NAME_BUF_SIZE )) < 0)
TEST_ERROR
if(name_len == 0 || HDstrcmp(name, "/I/Q"))
@@ -3549,6 +3571,7 @@ test_cut_graph(hid_t fapl)
TEST_ERROR
/* Check the name of "O" is correct */
+ *name = '\0';
if((name_len = H5Iget_name(gidO, name, (size_t)NAME_BUF_SIZE )) < 0)
TEST_ERROR
if(name_len == 0 || HDstrcmp(name, "/H/O"))
@@ -3719,6 +3742,7 @@ test_symlink(hid_t fapl)
TEST_ERROR
/* Check the name of "L" is correct */
+ *name = '\0';
if((name_len = H5Iget_name(gidL, name, (size_t)NAME_BUF_SIZE )) < 0)
TEST_ERROR
if(name_len == 0 || HDstrcmp(name, "/L"))