diff options
author | Quincey Koziol <koziol@hdfgroup.org> | 2007-11-24 16:49:36 (GMT) |
---|---|---|
committer | Quincey Koziol <koziol@hdfgroup.org> | 2007-11-24 16:49:36 (GMT) |
commit | 2f36ea99d4ad1b036d377719e49eaab2dec64444 (patch) | |
tree | 63be7c282767004339c49aa0e738e6a62630c280 /test | |
parent | 083357dad3334473507a97e17593a9d68e42d69f (diff) | |
download | hdf5-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')
-rw-r--r-- | test/getname.c | 91 | ||||
-rw-r--r-- | test/mount.c | 26 |
2 files changed, 84 insertions, 33 deletions
diff --git a/test/getname.c b/test/getname.c index 685bfbf..22abb79 100644 --- a/test/getname.c +++ b/test/getname.c @@ -65,11 +65,11 @@ check_name(hid_t id, const char *chk_name, const char *chk_user_path) /* Get name */ *name = '\0'; - if(H5Iget_name(id, name, NAME_BUF_SIZE) < 0) goto error; + if(H5Iget_name(id, name, NAME_BUF_SIZE) < 0) TEST_ERROR /* Get user path */ *user_path = '\0'; - if(H5G_user_path_test(id, user_path, &user_path_len, &user_path_hidden) < 0) goto error; + if(H5G_user_path_test(id, user_path, &user_path_len, &user_path_hidden) < 0) TEST_ERROR /* Check on name from H5Iget_name() */ if(HDstrcmp(name, chk_name)) goto error; @@ -78,7 +78,7 @@ check_name(hid_t id, const char *chk_name, const char *chk_user_path) if(HDstrcmp(user_path, chk_user_path)) goto error; /* Check that if user path is hidden, the name from H5Iget_name() and the user path should be different */ - if(user_path_hidden && !HDstrcmp(chk_name, chk_user_path)) goto error; + if(user_path_hidden && !HDstrcmp(chk_name, chk_user_path)) TEST_ERROR /* Everything matches */ return 0; @@ -713,10 +713,10 @@ test_main(hid_t file_id, hid_t fapl) PASSED(); -/*------------------------------------------------------------------------- - * Test H5Iget_name with H5Fmount; long name - *------------------------------------------------------------------------- - */ + /*------------------------------------------------------------------------- + * Test H5Iget_name with H5Fmount; long name + *------------------------------------------------------------------------- + */ TESTING("H5Iget_name with H5Fmount; long name"); @@ -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); + if(H5Gclose(group_id) < 0) FAIL_STACK_ERROR + if(H5Gclose(group2_id) < 0) FAIL_STACK_ERROR + if(H5Gclose(group3_id) < 0) FAIL_STACK_ERROR /* Create second file and group "g" in it */ file1_id = H5Fcreate(filename1, H5F_ACC_TRUNC, H5P_DEFAULT, fapl); @@ -1144,6 +1144,7 @@ test_main(hid_t file_id, hid_t fapl) char name2[SMALL_NAME_BUF_SIZE]; /* Get name */ + *name2 = '\0'; name_len=H5Iget_name(group_id, name2, SMALL_NAME_BUF_SIZE); /* Check that name is longer */ @@ -1182,6 +1183,7 @@ test_main(hid_t file_id, hid_t fapl) if(!name3) TEST_ERROR /* Get name with dynamic buffer */ + *name3 = '\0'; if(H5Iget_name(group_id, name3, name_len + 1) < 0) TEST_ERROR /* Verify */ @@ -1189,6 +1191,7 @@ test_main(hid_t file_id, hid_t fapl) *name3 = '\0'; /* Get name with smaller buffer */ + *name3 = '\0'; if(H5Iget_name(group_id, name3, 3) < 0) TEST_ERROR /* Verify */ @@ -2513,80 +2516,96 @@ test_obj_ref(hid_t fapl) TESTING("getting path to normal dataset in root group"); if((dataset2 = H5Rdereference(dataset, H5R_OBJECT, &wbuf[0])) < 0) FAIL_STACK_ERROR - i = H5Iget_name(dataset2,(char*)buf, sizeof(buf)); + *buf = '\0'; + i = H5Iget_name(dataset2, (char*)buf, sizeof(buf)); if(H5Dclose(dataset2) < 0) FAIL_STACK_ERROR if(!((HDstrcmp(buf, "/Dataset3") == 0) &&(i == 9))) TEST_ERROR - i = H5Rget_name(dataset, H5R_OBJECT, &wbuf[0],(char*)buf, sizeof(buf)); + *buf = '\0'; + 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) FAIL_STACK_ERROR - i = H5Iget_name(dataset2,(char*)buf, sizeof(buf)); + *buf = '\0'; + i = H5Iget_name(dataset2, (char*)buf, sizeof(buf)); if(H5Dclose(dataset2) < 0) FAIL_STACK_ERROR if(!((HDstrcmp(buf, "/Group1/Dataset2") == 0) &&(i == 16))) TEST_ERROR - i = H5Rget_name(dataset, H5R_OBJECT, &wbuf[1],(char*)buf, sizeof(buf)); + *buf = '\0'; + 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) FAIL_STACK_ERROR - i = H5Iget_name(group,(char*)buf, sizeof(buf)); + *buf = '\0'; + i = H5Iget_name(group, (char*)buf, sizeof(buf)); if(H5Gclose(group) < 0) FAIL_STACK_ERROR if(!((HDstrcmp(buf, "/Group1") == 0) &&(i == 7))) TEST_ERROR - i = H5Rget_name(dataset, H5R_OBJECT, &wbuf[2],(char*)buf, sizeof(buf)); + *buf = '\0'; + 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) FAIL_STACK_ERROR - i = H5Iget_name(tid1,(char*)buf, sizeof(buf)); + *buf = '\0'; + i = H5Iget_name(tid1, (char*)buf, sizeof(buf)); if(H5Tclose(tid1) < 0) FAIL_STACK_ERROR if(!((HDstrcmp(buf, "/Group1/Datatype1") == 0) &&(i == 17))) TEST_ERROR - i = H5Rget_name(dataset, H5R_OBJECT, &wbuf[3],(char*)buf, sizeof(buf)); + *buf = '\0'; + 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) FAIL_STACK_ERROR - i = H5Iget_name(dataset2,(char*)buf, sizeof(buf)); + *buf = '\0'; + i = H5Iget_name(dataset2, (char*)buf, sizeof(buf)); if(H5Dclose(dataset2) < 0) FAIL_STACK_ERROR if(!((HDstrcmp(buf, "/Group1/Group2/Dataset4") == 0) &&(i == 23))) TEST_ERROR - i = H5Rget_name(dataset, H5R_OBJECT, &wbuf[4],(char*)buf, sizeof(buf)); + *buf = '\0'; + 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) FAIL_STACK_ERROR - i = H5Iget_name(group,(char*)buf, sizeof(buf)); + *buf = '\0'; + i = H5Iget_name(group, (char*)buf, sizeof(buf)); if(H5Gclose(group) < 0) FAIL_STACK_ERROR if(!((HDstrcmp(buf, "/Group1/Group2") == 0) &&(i == 14))) TEST_ERROR - i = H5Rget_name(dataset, H5R_OBJECT, &wbuf[5],(char*)buf, sizeof(buf)); + *buf = '\0'; + 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) FAIL_STACK_ERROR - i = H5Iget_name(dataset2,(char*)buf, sizeof(buf)); + *buf = '\0'; + i = H5Iget_name(dataset2, (char*)buf, sizeof(buf)); if(H5Dclose(dataset2) < 0) FAIL_STACK_ERROR if(!((HDstrcmp(buf, "/Group1/Dataset5") == 0) &&(i == 16))) TEST_ERROR - i = H5Rget_name(dataset, H5R_OBJECT, &wbuf[6],(char*)buf, sizeof(buf)); + *buf = '\0'; + 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) FAIL_STACK_ERROR - i = H5Iget_name(group,(char*)buf, sizeof(buf)); + *buf = '\0'; + i = H5Iget_name(group, (char*)buf, sizeof(buf)); if(H5Gclose(group) < 0) FAIL_STACK_ERROR if(!((HDstrcmp(buf, "/") == 0) &&(i == 1))) TEST_ERROR - i = H5Rget_name(dataset, H5R_OBJECT, &wbuf[7],(char*)buf, sizeof(buf)); + *buf = '\0'; + i = H5Rget_name(dataset, H5R_OBJECT, &wbuf[7], (char*)buf, sizeof(buf)); if(!((HDstrcmp(buf, "/") == 0) &&(i == 1))) TEST_ERROR PASSED() @@ -2596,10 +2615,12 @@ 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) FAIL_STACK_ERROR + *buf = '\0'; i = H5Iget_name(dataset2, (char*)buf, sizeof(buf)); if(H5Dclose(dataset2) < 0) FAIL_STACK_ERROR if(i != 0) TEST_ERROR - i = H5Rget_name(dataset, H5R_OBJECT, &wbuf[4],(char*)buf, sizeof(buf)); + *buf = '\0'; + i = H5Rget_name(dataset, H5R_OBJECT, &wbuf[4], (char*)buf, sizeof(buf)); if(i != 0) TEST_ERROR PASSED() @@ -2610,10 +2631,12 @@ test_obj_ref(hid_t fapl) FAIL_STACK_ERROR TESTING("getting path to dataset that has been unlinked"); + *buf = '\0'; i = H5Iget_name(dataset2, (char*)buf, sizeof(buf)); if(H5Dclose(dataset2) < 0) FAIL_STACK_ERROR if(i != 0) TEST_ERROR - i = H5Rget_name(dataset, H5R_OBJECT, &wbuf[1],(char*)buf, sizeof(buf)); + *buf = '\0'; + i = H5Rget_name(dataset, H5R_OBJECT, &wbuf[1], (char*)buf, sizeof(buf)); if(i != 0) TEST_ERROR PASSED() @@ -2735,7 +2758,8 @@ test_reg_ref(hid_t fapl) /* 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); + *buf1 = '\0'; + 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() @@ -2745,7 +2769,8 @@ test_reg_ref(hid_t fapl) 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); + *buf2 = '\0'; + 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 @@ -2754,7 +2779,8 @@ test_reg_ref(hid_t fapl) /* 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); + *buf1 = '\0'; + 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() @@ -2764,7 +2790,8 @@ test_reg_ref(hid_t fapl) 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); + *buf2 = '\0'; + 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 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")) |