diff options
author | Quincey Koziol <koziol@hdfgroup.org> | 2007-10-31 13:13:40 (GMT) |
---|---|---|
committer | Quincey Koziol <koziol@hdfgroup.org> | 2007-10-31 13:13:40 (GMT) |
commit | e15bdb05e6bf52525c1df48f8e8e01aba3ce288b (patch) | |
tree | b6a77169711c84362d7cbb252cb8d288b2656ba6 /test/mount.c | |
parent | b969dce6e5625dd9d9f9cc42717a1b2027fdeeb1 (diff) | |
download | hdf5-e15bdb05e6bf52525c1df48f8e8e01aba3ce288b.zip hdf5-e15bdb05e6bf52525c1df48f8e8e01aba3ce288b.tar.gz hdf5-e15bdb05e6bf52525c1df48f8e8e01aba3ce288b.tar.bz2 |
[svn-r14225] Description:
Change H5Oget_info -> H5Oget_info_by_name and re-add H5Oget_info in a
simpler form for querying a particular object, to align with other new API
routines.
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
Diffstat (limited to 'test/mount.c')
-rw-r--r-- | test/mount.c | 64 |
1 files changed, 32 insertions, 32 deletions
diff --git a/test/mount.c b/test/mount.c index e5e0d0a..2ce9a2a 100644 --- a/test/mount.c +++ b/test/mount.c @@ -266,7 +266,7 @@ test_hide(hid_t fapl) FAIL_STACK_ERROR /* Get information about file1:/mnt1/file1 for later */ - if(H5Oget_info(file1, "/mnt1/file1", &oi1, H5P_DEFAULT) < 0) FAIL_STACK_ERROR + if(H5Oget_info_by_name(file1, "/mnt1/file1", &oi1, H5P_DEFAULT) < 0) FAIL_STACK_ERROR /* Build the virtual file */ if(H5Fmount(file1, "/mnt1", file2, H5P_DEFAULT) < 0) FAIL_STACK_ERROR @@ -285,7 +285,7 @@ test_hide(hid_t fapl) * The original objects under file1:/mnt1 are still accessible by their * other names. This is a rather stupid test but demonstrates a point. */ - if(H5Oget_info(file1, "/file1", &oi2, H5P_DEFAULT) < 0) FAIL_STACK_ERROR + if(H5Oget_info_by_name(file1, "/file1", &oi2, H5P_DEFAULT) < 0) FAIL_STACK_ERROR if(oi1.fileno != oi2.fileno || H5F_addr_ne(oi1.addr, oi2.addr)) { H5_FAILED(); puts(" Hard link failed for hidden object."); @@ -344,7 +344,7 @@ test_assoc(hid_t fapl) FAIL_STACK_ERROR /* Get information about the root of file2 */ - if(H5Oget_info(file2, "/", &oi1, H5P_DEFAULT) < 0) FAIL_STACK_ERROR + if(H5Oget_info(file2, &oi1) < 0) FAIL_STACK_ERROR /* Create the virtual file */ if(H5Fmount(file1, "/mnt1", file2, H5P_DEFAULT) < 0) FAIL_STACK_ERROR @@ -353,7 +353,7 @@ test_assoc(hid_t fapl) * Get info about the mount point -- should be the same as the root group * of file2. */ - if(H5Oget_info(file1, "/mnt1", &oi2, H5P_DEFAULT) < 0) FAIL_STACK_ERROR + if(H5Oget_info_by_name(file1, "/mnt1", &oi2, H5P_DEFAULT) < 0) FAIL_STACK_ERROR if(oi1.fileno != oi2.fileno || H5F_addr_ne(oi1.addr, oi2.addr)) { H5_FAILED(); puts(" Association failed."); @@ -541,7 +541,7 @@ test_preopen(hid_t fapl) if(H5Fmount(file1, "/mnt1", file2, H5P_DEFAULT) < 0) FAIL_STACK_ERROR /* Now access the thing we previously opened */ - if(H5Oget_info(grp, ".", &oinfo, H5P_DEFAULT) < 0) FAIL_STACK_ERROR + if(H5Oget_info(grp, &oinfo) < 0) FAIL_STACK_ERROR /* Shut down */ if(H5Funmount(file1, "/mnt1") < 0) FAIL_STACK_ERROR @@ -605,10 +605,10 @@ test_postopen(hid_t fapl) if(H5Funmount(file1, "/mnt1") < 0) FAIL_STACK_ERROR /* Now access the thing we previously opened */ - if(H5Oget_info(grp, ".", &oinfo, H5P_DEFAULT) < 0) FAIL_STACK_ERROR + if(H5Oget_info(grp, &oinfo) < 0) FAIL_STACK_ERROR /* Try accessing it from the file */ - if(H5Oget_info(file2, "/file2", &oinfo, H5P_DEFAULT) < 0) FAIL_STACK_ERROR + if(H5Oget_info_by_name(file2, "/file2", &oinfo, H5P_DEFAULT) < 0) FAIL_STACK_ERROR /* Shut down */ if(H5Gclose(grp) < 0) FAIL_STACK_ERROR @@ -678,12 +678,12 @@ test_unlink(hid_t fapl) * before the H5Fmount() and thus refers to the mount point itself rather * than the group mounted there. */ - if(H5Oget_info(file1, "/mnt_unlink/file2", &oinfo, H5P_DEFAULT) < 0) FAIL_STACK_ERROR - if(H5Oget_info(mnt, "/mnt_unlink/file2", &oinfo, H5P_DEFAULT) < 0) FAIL_STACK_ERROR - if(H5Oget_info(root, "/mnt_unlink/file2", &oinfo, H5P_DEFAULT) < 0) FAIL_STACK_ERROR - if(H5Oget_info(root, "file2", &oinfo, H5P_DEFAULT) < 0) FAIL_STACK_ERROR + if(H5Oget_info_by_name(file1, "/mnt_unlink/file2", &oinfo, H5P_DEFAULT) < 0) FAIL_STACK_ERROR + if(H5Oget_info_by_name(mnt, "/mnt_unlink/file2", &oinfo, H5P_DEFAULT) < 0) FAIL_STACK_ERROR + if(H5Oget_info_by_name(root, "/mnt_unlink/file2", &oinfo, H5P_DEFAULT) < 0) FAIL_STACK_ERROR + if(H5Oget_info_by_name(root, "file2", &oinfo, H5P_DEFAULT) < 0) FAIL_STACK_ERROR H5E_BEGIN_TRY { - status = H5Oget_info(mnt, "file2", &oinfo, H5P_DEFAULT); + status = H5Oget_info_by_name(mnt, "file2", &oinfo, H5P_DEFAULT); } H5E_END_TRY; if(status >= 0) { H5_FAILED(); @@ -698,9 +698,9 @@ test_unlink(hid_t fapl) * We should still be able to get to "/file2" of file2 by starting at * `root' which is still open, but not by name. */ - if(H5Oget_info(root, "file2", &oinfo, H5P_DEFAULT) < 0) FAIL_STACK_ERROR + if(H5Oget_info_by_name(root, "file2", &oinfo, H5P_DEFAULT) < 0) FAIL_STACK_ERROR H5E_BEGIN_TRY { - status = H5Oget_info(mnt, "file2", &oinfo, H5P_DEFAULT); + status = H5Oget_info_by_name(mnt, "file2", &oinfo, H5P_DEFAULT); } H5E_END_TRY; if(status >= 0) { H5_FAILED(); @@ -708,7 +708,7 @@ test_unlink(hid_t fapl) TEST_ERROR } /* end if */ H5E_BEGIN_TRY { - status = H5Oget_info(file2, "/mnt_unlink/file2", &oinfo, H5P_DEFAULT); + status = H5Oget_info_by_name(file2, "/mnt_unlink/file2", &oinfo, H5P_DEFAULT); } H5E_END_TRY; if(status >= 0) { H5_FAILED(); @@ -796,7 +796,7 @@ test_mvmpt(hid_t fapl) if(H5Lmove(file1, "/mnt_move_a", H5L_SAME_LOC, "/mnt_move_b", H5P_DEFAULT, H5P_DEFAULT) < 0) FAIL_STACK_ERROR /* Access something under the new name */ - if(H5Oget_info(file1, "/mnt_move_b/file2", &oinfo, H5P_DEFAULT) < 0) FAIL_STACK_ERROR + if(H5Oget_info_by_name(file1, "/mnt_move_b/file2", &oinfo, H5P_DEFAULT) < 0) FAIL_STACK_ERROR /* Shut down */ if(H5Funmount(file1, "/mnt_move_b") < 0) FAIL_STACK_ERROR @@ -939,18 +939,18 @@ test_uniformity(hid_t fapl) if(H5Fmount(file1, "/mnt1", file2, H5P_DEFAULT) < 0) FAIL_STACK_ERROR /* Access some things from the file1 handle */ - if(H5Oget_info(file1, "/", &oinfo, H5P_DEFAULT) < 0) FAIL_STACK_ERROR - if(H5Oget_info(file1, "/mnt1", &oinfo, H5P_DEFAULT) < 0) FAIL_STACK_ERROR - if(H5Oget_info(file1, "mnt1", &oinfo, H5P_DEFAULT) < 0) FAIL_STACK_ERROR - if(H5Oget_info(file1, "/mnt1/file2", &oinfo, H5P_DEFAULT) < 0) FAIL_STACK_ERROR - if(H5Oget_info(file1, "mnt1/file2", &oinfo, H5P_DEFAULT) < 0) FAIL_STACK_ERROR + if(H5Oget_info_by_name(file1, "/", &oinfo, H5P_DEFAULT) < 0) FAIL_STACK_ERROR + if(H5Oget_info_by_name(file1, "/mnt1", &oinfo, H5P_DEFAULT) < 0) FAIL_STACK_ERROR + if(H5Oget_info_by_name(file1, "mnt1", &oinfo, H5P_DEFAULT) < 0) FAIL_STACK_ERROR + if(H5Oget_info_by_name(file1, "/mnt1/file2", &oinfo, H5P_DEFAULT) < 0) FAIL_STACK_ERROR + if(H5Oget_info_by_name(file1, "mnt1/file2", &oinfo, H5P_DEFAULT) < 0) FAIL_STACK_ERROR /* Access the same things from the file2 handle */ - if(H5Oget_info(file2, "/", &oinfo, H5P_DEFAULT) < 0) FAIL_STACK_ERROR - if(H5Oget_info(file2, "/mnt1", &oinfo, H5P_DEFAULT) < 0) FAIL_STACK_ERROR - if(H5Oget_info(file2, "mnt1", &oinfo, H5P_DEFAULT) < 0) FAIL_STACK_ERROR - if(H5Oget_info(file2, "/mnt1/file2", &oinfo, H5P_DEFAULT) < 0) FAIL_STACK_ERROR - if(H5Oget_info(file2, "mnt1/file2", &oinfo, H5P_DEFAULT) < 0) FAIL_STACK_ERROR + if(H5Oget_info_by_name(file2, "/", &oinfo, H5P_DEFAULT) < 0) FAIL_STACK_ERROR + if(H5Oget_info_by_name(file2, "/mnt1", &oinfo, H5P_DEFAULT) < 0) FAIL_STACK_ERROR + if(H5Oget_info_by_name(file2, "mnt1", &oinfo, H5P_DEFAULT) < 0) FAIL_STACK_ERROR + if(H5Oget_info_by_name(file2, "/mnt1/file2", &oinfo, H5P_DEFAULT) < 0) FAIL_STACK_ERROR + if(H5Oget_info_by_name(file2, "mnt1/file2", &oinfo, H5P_DEFAULT) < 0) FAIL_STACK_ERROR /* Shut down */ if(H5Funmount(file1, "/mnt1") < 0) FAIL_STACK_ERROR @@ -1007,7 +1007,7 @@ test_close(hid_t fapl) * still accessible through the file2 handle. */ if(H5Fclose(file1) < 0) FAIL_STACK_ERROR - if(H5Oget_info(file2, "/mnt1", &oinfo, H5P_DEFAULT) < 0) { + if(H5Oget_info_by_name(file2, "/mnt1", &oinfo, H5P_DEFAULT) < 0) { H5_FAILED(); puts(" File1 contents are not accessible!"); TEST_ERROR @@ -1028,7 +1028,7 @@ test_close(hid_t fapl) * Close file2. It is not actually closed because it's a child of file1. */ if(H5Fclose(file2) < 0) FAIL_STACK_ERROR - if(H5Oget_info(file1, "/mnt1/file2", &oinfo, H5P_DEFAULT) < 0) FAIL_STACK_ERROR + if(H5Oget_info_by_name(file1, "/mnt1/file2", &oinfo, H5P_DEFAULT) < 0) FAIL_STACK_ERROR if(H5Fclose(file1) < 0) FAIL_STACK_ERROR /* Check that all file IDs have been closed */ @@ -2330,9 +2330,9 @@ test_fcdegree_strong(hid_t fapl) TEST_ERROR /* Check that objects are still open */ - if(H5Oget_info(gidA, ".", &oinfo, H5P_DEFAULT) < 0) + if(H5Oget_info(gidA, &oinfo) < 0) TEST_ERROR - if(H5Oget_info(gidAM, ".", &oinfo, H5P_DEFAULT) < 0) + if(H5Oget_info(gidAM, &oinfo) < 0) TEST_ERROR /* Close file #2 (should close open objects also) */ @@ -2341,12 +2341,12 @@ test_fcdegree_strong(hid_t fapl) /* Check that objects are closed */ H5E_BEGIN_TRY { - ret = H5Oget_info(gidA, ".", &oinfo, H5P_DEFAULT); + ret = H5Oget_info(gidA, &oinfo); } H5E_END_TRY; if(ret >= 0) TEST_ERROR H5E_BEGIN_TRY { - ret = H5Oget_info(gidAM, ".", &oinfo, H5P_DEFAULT); + ret = H5Oget_info(gidAM, &oinfo); } H5E_END_TRY; if(ret >= 0) TEST_ERROR |