diff options
author | Quincey Koziol <koziol@hdfgroup.org> | 2009-04-21 22:46:38 (GMT) |
---|---|---|
committer | Quincey Koziol <koziol@hdfgroup.org> | 2009-04-21 22:46:38 (GMT) |
commit | 5bb857476f99118cda0e54ea522f52933a582747 (patch) | |
tree | 741024b69250fe9166091aa8f28bc78c35d3fb64 /src/H5Ftest.c | |
parent | 35bbc743d4cf77d6aa8af2acf5578db02e5129ca (diff) | |
download | hdf5-5bb857476f99118cda0e54ea522f52933a582747.zip hdf5-5bb857476f99118cda0e54ea522f52933a582747.tar.gz hdf5-5bb857476f99118cda0e54ea522f52933a582747.tar.bz2 |
[svn-r16825] Description:
Bring revisions 16636:16821 from trunk to revise_chunks branch
Tested on:
FreeBSD/32 6.3 (duty)
Mac OS X/32 10.5.6 (amazon)
(h5committest not needed on this branch)
Diffstat (limited to 'src/H5Ftest.c')
-rw-r--r-- | src/H5Ftest.c | 40 |
1 files changed, 40 insertions, 0 deletions
diff --git a/src/H5Ftest.c b/src/H5Ftest.c index 1d7e514..8cbc133 100644 --- a/src/H5Ftest.c +++ b/src/H5Ftest.c @@ -32,6 +32,8 @@ #define H5F_TESTING /*suppress warning about H5F testing funcs*/ #define H5SM_PACKAGE /*suppress error about including H5SMpkg */ #define H5SM_TESTING /*suppress warning about H5SM testing funcs*/ +#define H5G_PACKAGE /*suppress error about including H5Gpkg */ +#define H5G_TESTING /*suppress warning about H5G testing funcs*/ /***********/ @@ -40,6 +42,7 @@ #include "H5private.h" /* Generic Functions */ #include "H5Eprivate.h" /* Error handling */ #include "H5Fpkg.h" /* File access */ +#include "H5Gpkg.h" /* Groups */ #include "H5Iprivate.h" /* IDs */ #include "H5SMpkg.h" /* Shared object header messages */ @@ -113,3 +116,40 @@ done: FUNC_LEAVE_NOAPI(ret_value) } /* end H5F_get_sohm_mesg_count_test() */ + +/*------------------------------------------------------------------------- + * Function: H5F_check_cached_stab_test + * + * Purpose: Check that a file's superblock contains a cached symbol + * table entry, that the entry matches that in the root + * group's object header, and check that the addresses are + * valid. + * + * Return: Success: Non-negative + * Failure: Negative + * + * Programmer: Neil Fortner + * Mar 31, 2009 + * + *------------------------------------------------------------------------- + */ +herr_t +H5F_check_cached_stab_test(hid_t file_id) +{ + H5F_t *file; /* File info */ + herr_t ret_value = SUCCEED; /* Return value */ + + FUNC_ENTER_NOAPI_NOINIT(H5F_check_cached_stab_test) + + /* Check arguments */ + if(NULL == (file = (H5F_t *)H5I_object_verify(file_id, H5I_FILE))) + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a file") + + /* Verify the cached stab info */ + if(H5G_verify_cached_stab_test(H5G_oloc(file->shared->root_grp), file->shared->root_ent) < 0) + HGOTO_ERROR(H5E_FILE, H5E_CANTGET, FAIL, "unable to verify cached symbol table info") + +done: + FUNC_LEAVE_NOAPI(ret_value) +} /* end H5F_check_cached_stab_test() */ + |