summaryrefslogtreecommitdiffstats
path: root/test/earray.c
diff options
context:
space:
mode:
authorQuincey Koziol <koziol@hdfgroup.org>2017-01-28 04:35:14 (GMT)
committerQuincey Koziol <koziol@hdfgroup.org>2017-01-28 04:35:14 (GMT)
commit349f41d9740d1e4a1e86704b3c8a30c700d1de78 (patch)
tree6ea58aae0fe8e829edc666131da7f15fe299eb49 /test/earray.c
parenteb8ada95645d8d17a51653007025c1547c752a8a (diff)
downloadhdf5-349f41d9740d1e4a1e86704b3c8a30c700d1de78.zip
hdf5-349f41d9740d1e4a1e86704b3c8a30c700d1de78.tar.gz
hdf5-349f41d9740d1e4a1e86704b3c8a30c700d1de78.tar.bz2
Switch list lengths to unsigned integers (to align better w/cache image merge)
Diffstat (limited to 'test/earray.c')
-rw-r--r--test/earray.c246
1 files changed, 0 insertions, 246 deletions
diff --git a/test/earray.c b/test/earray.c
index 07acbb5..c6f5986 100644
--- a/test/earray.c
+++ b/test/earray.c
@@ -159,15 +159,6 @@ typedef struct earray_test_t {
/* Local prototypes */
-/* Metadata cache (H5AC) callbacks */
-static herr_t earray_cache_test_get_initial_load_size(void *udata, size_t *image_len);
-static void *earray_cache_test_deserialize(const void *image_ptr, size_t len,
- void *udata_ptr, hbool_t *dirty_ptr);
-static herr_t earray_cache_test_image_len(const void *thing, size_t *image_len_ptr);
-static herr_t earray_cache_test_serialize(const H5F_t *f, void *image_ptr,
- size_t len, void *thing);
-static herr_t earray_cache_test_free_icr(void *thing);
-
/* Local variables */
const char *FILENAME[] = {
@@ -182,24 +173,6 @@ char filename_g[EARRAY_FILENAME_LEN];
/* Empty file size */
h5_stat_size_t empty_size_g;
-/* H5EA test object inherits cache-like properties from H5AC */
-const H5AC_class_t H5AC_EARRAY_TEST[1] = {{
- /* id */ H5AC_TEST_ID,
- /* name */ "earray test",
- /* mem_type */ H5FD_MEM_DEFAULT,
- /* flags */ H5AC__CLASS_SKIP_READS | H5AC__CLASS_SKIP_WRITES,
- /* get_initial_load_size */ earray_cache_test_get_initial_load_size,
- /* get_final_load_size */ NULL,
- /* verify_chksum */ NULL,
- /* deserialize */ earray_cache_test_deserialize,
- /* image_len */ earray_cache_test_image_len,
- /* pre_serialize */ NULL,
- /* serialize */ earray_cache_test_serialize,
- /* notify */ NULL,
- /* free_icr */ earray_cache_test_free_icr,
- /* fsf_size */ NULL,
-}};
-
/*-------------------------------------------------------------------------
* Function: init_cparam
@@ -619,225 +592,6 @@ error:
/*-------------------------------------------------------------------------
- * Function: earray_cache_test_get_initial_load_size()
- *
- * Purpose: place holder function -- should never be called
- *
- * A generic discussion of metadata cache callbacks of this type
- * may be found in H5Cprivate.h.
- *
- * Return: Success: SUCCEED
- * Failure: FAIL
- *
- * Programmer: John Mainzer
- * 8/2/14
- *
- *-------------------------------------------------------------------------
- */
-static herr_t
-earray_cache_test_get_initial_load_size( void *udata, size_t *image_len)
-{
- HDassert(udata);
- HDassert(image_len);
-
- /* Should never be called */
- HDassert(0 && "Can't be called!");
-
- *image_len = 0;
-
- return(SUCCEED);
-} /* end earray_cache_test_get_initial_load_size() */
-
-
-/*-------------------------------------------------------------------------
- * Function: earray_cache_test_deserialize
- *
- * Purpose: place holder function -- should never be called.
- *
- *
- * A generic discussion of metadata cache callbacks of this type
- * may be found in H5Cprivate.h:
- *
- * Return: Success: Pointer to in core representation
- * Failure: NULL
- *
- * Programmer: John Mainzer
- * 8/2/14
- *
- *-------------------------------------------------------------------------
- */
-static void *
-earray_cache_test_deserialize(const void *image_ptr,
- size_t len,
- void *udata_ptr,
- hbool_t *dirty_ptr)
-{
- HDassert(image_ptr);
- HDassert(len > 0 );
- HDassert(udata_ptr);
- HDassert(dirty_ptr);
-
- /* Should never be called */
- HDassert(0 && "Can't be called!");
-
- return(NULL);
-} /* end earray_cache_test_deserialize() */
-
-
-/*-------------------------------------------------------------------------
- * Function: earray_cache_test_image_len
- *
- * Purpose: test code place holder function -- just set *image_len_ptr to
- * one.
- *
- *
- * A generic discussion of metadata cache callbacks of this type
- * may be found in H5Cprivate.h:
- *
- * Return: Success: SUCCEED
- * Failure: FAIL
- *
- * Programmer: John Mainzer
- * 8/2/14
- *
- *-------------------------------------------------------------------------
- */
-static herr_t
-earray_cache_test_image_len(const void *thing, size_t *image_len_ptr)
-{
- HDassert(thing);
- HDassert(image_len_ptr);
-
- /* Set size value */
- /* (hard-code to 1) */
- *image_len_ptr = 1;
-
- return(SUCCEED);
-} /* end earray_cache_test_image_len() */
-
-
-
-/*-------------------------------------------------------------------------
- * Function: earray_cache_test_serialize
- *
- * Purpose: Validate the contents of the instance of earray_test_t.
- *
- *
- * A generic discussion of metadata cache callbacks of this type
- * may be found in H5Cprivate.h:
- *
- *
- * Return: Success: SUCCEED
- * Failure: FAIL
- *
- * Programmer: John Mainzer
- * 8/2/14
- *
- *-------------------------------------------------------------------------
- */
-static herr_t
-earray_cache_test_serialize(const H5F_t *f,
- void *image_ptr,
- H5_ATTR_UNUSED size_t len,
- void *thing)
-{
- earray_test_t *test;
-
- HDassert(f);
- HDassert(image_ptr);
- HDassert(thing);
- test = (earray_test_t *)thing;
- HDassert(test);
- HDassert(test->cache_info.magic == H5C__H5C_CACHE_ENTRY_T_MAGIC);
- HDassert((const H5AC_class_t *)(test->cache_info.type) ==
- &(H5AC_EARRAY_TEST[0]));
-
- /* Check for out of order flush */
- if(test->fd_info->base_obj)
- TEST_ERROR
-
- /* Check which index this entry corresponds to */
- if((uint64_t)0 == test->idx) {
- /* Check for out of order flush */
- if(test->fd_info->idx0_obj || test->fd_info->idx0_elem)
- TEST_ERROR
-
- /* Set flag for object flush */
- test->fd_info->idx0_obj = TRUE;
- } /* end if */
- else if((uint64_t)1 == test->idx) {
- /* Check for out of order flush */
- if(test->fd_info->idx1_obj || test->fd_info->idx1_elem)
- TEST_ERROR
-
- /* Set flag for object flush */
- test->fd_info->idx1_obj = TRUE;
- } /* end if */
- else if((uint64_t)10000 == test->idx) {
- /* Check for out of order flush */
- if(test->fd_info->idx10000_obj || test->fd_info->idx10000_elem)
- TEST_ERROR
-
- /* Set flag for object flush */
- test->fd_info->idx10000_obj = TRUE;
- } /* end if */
- else if((uint64_t)-1 == test->idx) {
- /* Set flag for object flush */
- test->fd_info->base_obj = TRUE;
- } /* end if */
-
- return(SUCCEED);
-
-error:
- return(FAIL);
-} /* end earray_cache_test_serialize() */
-
-
-
-/*-------------------------------------------------------------------------
- * Function: earray_cache_test_free_icr
- *
- * Purpose: Destroy an extensible array test object in memory.
- *
- *
- * A generic discussion of metadata cache callbacks of this type
- * may be found in H5Cprivate.h:
- *
- *
- * Return: Success: SUCCEED
- * Failure: FAIL
- *
- * Programmer: John Mainzer
- * 8/2/14
- *
- *-------------------------------------------------------------------------
- */
-static herr_t
-earray_cache_test_free_icr(void *thing)
-{
- earray_test_t *test;
-
- HDassert(thing);
- test = (earray_test_t *)thing;
- HDassert(test);
-
- /* the metadata cache sets cache_info.magic to
- * H5C__H5C_CACHE_ENTRY_T_BAD_MAGIC before calling the
- * free_icr routine. Hence the following assert:
- */
-
- HDassert(test->cache_info.magic == H5C__H5C_CACHE_ENTRY_T_BAD_MAGIC);
- HDassert((const H5AC_class_t *)(test->cache_info.type) ==
- &(H5AC_EARRAY_TEST[0]));
-
- /* Free the shared info itself */
- HDfree(test);
-
- return(SUCCEED);
-} /* end earray_cache_test_free_icr() */
-
-
-/*-------------------------------------------------------------------------
* Function: test_create
*
* Purpose: Test creating extensible array