summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorjhendersonHDF <jhenderson@hdfgroup.org>2022-05-08 06:04:32 (GMT)
committerGitHub <noreply@github.com>2022-05-08 06:04:32 (GMT)
commitc0f314ad03f5ef0b4366ee625c83a7955a9ea87f (patch)
tree1aff05e5b992bc1f15b3a1a9b14c325c9ae64c98
parent555e79d05f3fb778c9345b3abd4e55a1f177df90 (diff)
downloadhdf5-c0f314ad03f5ef0b4366ee625c83a7955a9ea87f.zip
hdf5-c0f314ad03f5ef0b4366ee625c83a7955a9ea87f.tar.gz
hdf5-c0f314ad03f5ef0b4366ee625c83a7955a9ea87f.tar.bz2
[1.10 Merge] Hdf5 1 10 warnings merge (#1754)
* Warnings fixes (#1680) * Clean stack size warnings in sio_engine (#1687) * Fixes stack size warnings in tcoords.c (#1688) * Address some warnings from casting away of const (#1684) * Fixes stack size warnings in dtransform (#1696) * Fixes stack size warnings in set_extent test (#1698) * Be a bit safer with signed arithmetic, thus quieting some signed-overflow warnings from GCC (#1706) * Avoid a signed overflow: check the range of `entry_ptr->age` before increasing it instead of increasing it and then checking the range. This quiets a GCC warning. * Avoid the potential for signed overflow by rewriting expressions `MAX(0, fwidth - n)` as `MAX(n, fwidth) - n` for various `n`. This change quiets some GCC warnings. * Change some local variables that cannot take sensible negative values from signed to unsigned. This quiets GCC warnings about potential signed overflow. * In a handful of instances, check the range of a signed integer before increasing/decreasing it, just in case the increase/decrease overflows. This quiets a handful of GCC signed-overflow warnings. * Committing clang-format changes Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com> * Fix object size warnings in cache.c test (#1701) * Fix some const cast and stack/static object size warnings (#1700) * Fix various warnings * Move HDfree_const to H5private.h for wider use * Print output from all ranks in parallel tests on allocation failure * Move const pointer freeing macro to h5test.h for now * Fixes a bug where t_cache fails due to a string size being too small (#1720) * Fixes a bug where t_cache fails due to a string size being too small Recent warning reductions led to an incorrect string size being passed to h5_fileaccess, causing the test to silently fail. In addition to fixing the bug, the test will now fail noisily on setup failures. * Updates the t_cache test to fail noisily on setup errors * Fix a few Clang sanitizer warnings (#1727) * Stop lying about H5S_t const-ness (#1209) Hyperslabs can be reworked inside several H5S callbacks, making H5S_t non-const in some places where it is marked const. This change switches these incorrectly const H5S_t pointer parameters and variables to non-const where appropriate. * Fix a few warnings after recent H5S const-related changes (#1225) * Adjustments for HDF5 1.10 * Hdf5 1 12 Miscellaneous warnings fixes (#1718) * Fixes const issues in the version 2 B-trees (#1172) The operations that were changed are fundamentally not const since the shadow operation can modify the node structure when SWMR is in use. * Quiets const warning in H5RS code (#1181) * Avoid calling H5Ropen_object with a misaligned H5R_ref_t: copy the (#1171) * Avoid calling H5Ropen_object with a misaligned H5R_ref_t: copy the raw H5R_ref_t bytes to a heap buffer that's known to have the right alignment. * Committing clang-format changes * Use an automatic H5R_ref_t instead of malloc'ing one. Go ahead and initialize the H5R_ref_t to all-0s so that arbitrary stack content doesn't foul things up. Bail out with an error if `size` exceeds `sizeof(H5R_ref_t)`. * Committing clang-format changes Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com> * Miscellaneous warnings fixes Co-authored-by: Dana Robinson <43805+derobins@users.noreply.github.com> Co-authored-by: David Young <dyoung@hdfgroup.org> Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com> * Fix several warnings (#747) Co-authored-by: Dana Robinson <43805+derobins@users.noreply.github.com> Co-authored-by: David Young <dyoung@hdfgroup.org> Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
-rw-r--r--hl/src/H5PT.c13
-rw-r--r--src/H5B2int.c33
-rw-r--r--src/H5B2pkg.h12
-rw-r--r--src/H5Bdbg.c10
-rw-r--r--src/H5Cimage.c5
-rw-r--r--src/H5Dchunk.c116
-rw-r--r--src/H5Dcompact.c30
-rw-r--r--src/H5Dcontig.c38
-rw-r--r--src/H5Defl.c28
-rw-r--r--src/H5Dfill.c2
-rw-r--r--src/H5Dint.c14
-rw-r--r--src/H5Dio.c46
-rw-r--r--src/H5Dmpio.c36
-rw-r--r--src/H5Dpkg.h59
-rw-r--r--src/H5Dprivate.h2
-rw-r--r--src/H5Dscatgath.c4
-rw-r--r--src/H5Dselect.c16
-rw-r--r--src/H5Dvirtual.c49
-rw-r--r--src/H5FD.c6
-rw-r--r--src/H5FDhdfs.c4
-rw-r--r--src/H5FDros3.c2
-rw-r--r--src/H5Gent.c5
-rw-r--r--src/H5Gloc.c22
-rw-r--r--src/H5Gname.c2
-rw-r--r--src/H5Gpkg.h4
-rw-r--r--src/H5Idbg.c4
-rw-r--r--src/H5Ofill.c2
-rw-r--r--src/H5RS.c12
-rw-r--r--src/H5S.c4
-rw-r--r--src/H5Sall.c34
-rw-r--r--src/H5Shyper.c69
-rw-r--r--src/H5Smpio.c93
-rw-r--r--src/H5Snone.c34
-rw-r--r--src/H5Spkg.h18
-rw-r--r--src/H5Spoint.c34
-rw-r--r--src/H5Sprivate.h66
-rw-r--r--src/H5Sselect.c78
-rw-r--r--src/H5T.c2
-rw-r--r--src/H5Tconv.c16
-rw-r--r--src/H5Tprivate.h2
-rw-r--r--src/H5trace.c15
-rw-r--r--test/cache.c6768
-rw-r--r--test/cache_common.c2
-rw-r--r--test/chunk_info.c48
-rw-r--r--test/dsets.c11
-rw-r--r--test/dt_arith.c6
-rw-r--r--test/dtransform.c36
-rw-r--r--test/dtypes.c2
-rw-r--r--test/genall5.c20
-rw-r--r--test/h5test.h9
-rw-r--r--test/objcopy.c12
-rw-r--r--test/set_extent.c204
-rw-r--r--test/tcoords.c62
-rw-r--r--test/trefstr.c2
-rw-r--r--test/vds_env.c51
-rw-r--r--testpar/t_cache.c45
-rw-r--r--testpar/t_filters_parallel.c6
-rw-r--r--testpar/t_mdset.c6
-rw-r--r--testpar/t_mpi.c34
-rw-r--r--testpar/t_pflush1.c16
-rw-r--r--testpar/t_pflush2.c18
-rw-r--r--testpar/t_shapesame.c17
-rw-r--r--testpar/t_span_tree.c5
-rw-r--r--testpar/testphdf5.c17
-rw-r--r--tools/lib/h5diff_array.c3
-rw-r--r--tools/src/h5diff/ph5diff_main.c2
-rw-r--r--tools/src/h5dump/h5dump_xml.c39
-rw-r--r--tools/src/h5perf/sio_engine.c55
68 files changed, 3775 insertions, 4762 deletions
diff --git a/hl/src/H5PT.c b/hl/src/H5PT.c
index 592a696..5f84afc 100644
--- a/hl/src/H5PT.c
+++ b/hl/src/H5PT.c
@@ -29,7 +29,7 @@ static H5I_type_t H5PT_ptable_id_type = H5I_UNINIT;
#define H5PT_HASH_TABLE_SIZE 64
/* Packet Table private functions */
-static herr_t H5PT_free_id(void *id, void **_ctx);
+static herr_t H5PT_free_id(void *id);
static herr_t H5PT_close(htbl_t *table);
static herr_t H5PT_create_index(htbl_t *table_id);
static herr_t H5PT_set_index(htbl_t *table_id, hsize_t pt_index);
@@ -87,8 +87,7 @@ H5PTcreate(hid_t loc_id, const char *dset_name, hid_t dtype_id, hsize_t chunk_si
/* Register the packet table ID type if this is the first table created */
if (H5PT_ptable_id_type < 0)
- if ((H5PT_ptable_id_type =
- H5Iregister_type((size_t)H5PT_HASH_TABLE_SIZE, 0, (H5I_free_t)H5PT_free_id)) < 0)
+ if ((H5PT_ptable_id_type = H5Iregister_type((size_t)H5PT_HASH_TABLE_SIZE, 0, H5PT_free_id)) < 0)
goto error;
/* Get memory for the table identifier */
@@ -208,8 +207,7 @@ H5PTcreate_fl(hid_t loc_id, const char *dset_name, hid_t dtype_id, hsize_t chunk
/* Register the packet table ID type if this is the first table created */
if (H5PT_ptable_id_type < 0)
- if ((H5PT_ptable_id_type =
- H5Iregister_type((size_t)H5PT_HASH_TABLE_SIZE, 0, (H5I_free_t)H5PT_free_id)) < 0)
+ if ((H5PT_ptable_id_type = H5Iregister_type((size_t)H5PT_HASH_TABLE_SIZE, 0, H5PT_free_id)) < 0)
goto error;
/* Get memory for the table identifier */
@@ -323,8 +321,7 @@ H5PTopen(hid_t loc_id, const char *dset_name)
/* Register the packet table ID type if this is the first table created */
if (H5PT_ptable_id_type < 0)
- if ((H5PT_ptable_id_type =
- H5Iregister_type((size_t)H5PT_HASH_TABLE_SIZE, 0, (H5I_free_t)H5PT_free_id)) < 0)
+ if ((H5PT_ptable_id_type = H5Iregister_type((size_t)H5PT_HASH_TABLE_SIZE, 0, H5PT_free_id)) < 0)
goto error;
table = (htbl_t *)HDmalloc(sizeof(htbl_t));
@@ -402,7 +399,7 @@ error:
*-------------------------------------------------------------------------
*/
static herr_t
-H5PT_free_id(void *id, void H5_ATTR_UNUSED **_ctx)
+H5PT_free_id(void *id)
{
HDfree(id);
return SUCCEED;
diff --git a/src/H5B2int.c b/src/H5B2int.c
index 610da6c..ab43a5a 100644
--- a/src/H5B2int.c
+++ b/src/H5B2int.c
@@ -52,9 +52,9 @@
/********************/
/* Local Prototypes */
/********************/
-static herr_t H5B2__update_child_flush_depends(H5B2_hdr_t *hdr, unsigned depth,
- const H5B2_node_ptr_t *node_ptrs, unsigned start_idx,
- unsigned end_idx, void *old_parent, void *new_parent);
+static herr_t H5B2__update_child_flush_depends(H5B2_hdr_t *hdr, unsigned depth, H5B2_node_ptr_t *node_ptrs,
+ unsigned start_idx, unsigned end_idx, void *old_parent,
+ void *new_parent);
/*********************/
/* Package Variables */
@@ -1617,7 +1617,7 @@ done:
*-------------------------------------------------------------------------
*/
herr_t
-H5B2__iterate_node(H5B2_hdr_t *hdr, uint16_t depth, const H5B2_node_ptr_t *curr_node, void *parent,
+H5B2__iterate_node(H5B2_hdr_t *hdr, uint16_t depth, H5B2_node_ptr_t *curr_node, void *parent,
H5B2_operator_t op, void *op_data)
{
const H5AC_class_t *curr_node_class = NULL; /* Pointer to current node's class info */
@@ -1642,8 +1642,7 @@ H5B2__iterate_node(H5B2_hdr_t *hdr, uint16_t depth, const H5B2_node_ptr_t *curr_
/* Lock the current B-tree node */
if (NULL ==
- (internal = H5B2__protect_internal(hdr, parent, (H5B2_node_ptr_t *)curr_node, depth, FALSE,
- H5AC__READ_ONLY_FLAG))) /* Casting away const OK -QAK */
+ (internal = H5B2__protect_internal(hdr, parent, curr_node, depth, FALSE, H5AC__READ_ONLY_FLAG)))
HGOTO_ERROR(H5E_BTREE, H5E_CANTPROTECT, FAIL, "unable to protect B-tree internal node")
/* Set up information about current node */
@@ -1739,8 +1738,8 @@ done:
*-------------------------------------------------------------------------
*/
herr_t
-H5B2__delete_node(H5B2_hdr_t *hdr, uint16_t depth, const H5B2_node_ptr_t *curr_node, void *parent,
- H5B2_remove_t op, void *op_data)
+H5B2__delete_node(H5B2_hdr_t *hdr, uint16_t depth, H5B2_node_ptr_t *curr_node, void *parent, H5B2_remove_t op,
+ void *op_data)
{
const H5AC_class_t *curr_node_class = NULL; /* Pointer to current node's class info */
void * node = NULL; /* Pointers to current node */
@@ -1759,8 +1758,7 @@ H5B2__delete_node(H5B2_hdr_t *hdr, uint16_t depth, const H5B2_node_ptr_t *curr_n
/* Lock the current B-tree node */
if (NULL ==
- (internal = H5B2__protect_internal(hdr, parent, (H5B2_node_ptr_t *)curr_node, depth, FALSE,
- H5AC__NO_FLAGS_SET))) /* Casting away const OK -QAK */
+ (internal = H5B2__protect_internal(hdr, parent, curr_node, depth, FALSE, H5AC__NO_FLAGS_SET)))
HGOTO_ERROR(H5E_BTREE, H5E_CANTPROTECT, FAIL, "unable to protect B-tree internal node")
/* Set up information about current node */
@@ -1824,7 +1822,7 @@ done:
*-------------------------------------------------------------------------
*/
herr_t
-H5B2__node_size(H5B2_hdr_t *hdr, uint16_t depth, const H5B2_node_ptr_t *curr_node, void *parent,
+H5B2__node_size(H5B2_hdr_t *hdr, uint16_t depth, H5B2_node_ptr_t *curr_node, void *parent,
hsize_t *btree_size)
{
H5B2_internal_t *internal = NULL; /* Pointer to internal node */
@@ -1839,8 +1837,8 @@ H5B2__node_size(H5B2_hdr_t *hdr, uint16_t depth, const H5B2_node_ptr_t *curr_nod
HDassert(depth > 0);
/* Lock the current B-tree node */
- if (NULL == (internal = H5B2__protect_internal(hdr, parent, (H5B2_node_ptr_t *)curr_node, depth, FALSE,
- H5AC__READ_ONLY_FLAG))) /* Casting away const OK -QAK */
+ if (NULL ==
+ (internal = H5B2__protect_internal(hdr, parent, curr_node, depth, FALSE, H5AC__READ_ONLY_FLAG)))
HGOTO_ERROR(H5E_BTREE, H5E_CANTPROTECT, FAIL, "unable to protect B-tree internal node")
/* Recursively descend into child nodes, if we are above the "twig" level in the B-tree */
@@ -1910,7 +1908,7 @@ done:
*-------------------------------------------------------------------------
*/
herr_t
-H5B2__update_flush_depend(H5B2_hdr_t *hdr, unsigned depth, const H5B2_node_ptr_t *node_ptr, void *old_parent,
+H5B2__update_flush_depend(H5B2_hdr_t *hdr, unsigned depth, H5B2_node_ptr_t *node_ptr, void *old_parent,
void *new_parent)
{
const H5AC_class_t *child_class; /* Pointer to child node's class info */
@@ -1941,9 +1939,8 @@ H5B2__update_flush_depend(H5B2_hdr_t *hdr, unsigned depth, const H5B2_node_ptr_t
H5B2_internal_t *child_int;
/* Protect child */
- if (NULL == (child_int = H5B2__protect_internal(
- hdr, new_parent, (H5B2_node_ptr_t *)node_ptr, (uint16_t)(depth - 1), FALSE,
- H5AC__NO_FLAGS_SET))) /* Casting away const OK -QAK */
+ if (NULL == (child_int = H5B2__protect_internal(hdr, new_parent, node_ptr, (uint16_t)(depth - 1),
+ FALSE, H5AC__NO_FLAGS_SET)))
HGOTO_ERROR(H5E_BTREE, H5E_CANTPROTECT, FAIL, "unable to protect B-tree internal node")
child_class = H5AC_BT2_INT;
child = child_int;
@@ -2010,7 +2007,7 @@ done:
*-------------------------------------------------------------------------
*/
static herr_t
-H5B2__update_child_flush_depends(H5B2_hdr_t *hdr, unsigned depth, const H5B2_node_ptr_t *node_ptrs,
+H5B2__update_child_flush_depends(H5B2_hdr_t *hdr, unsigned depth, H5B2_node_ptr_t *node_ptrs,
unsigned start_idx, unsigned end_idx, void *old_parent, void *new_parent)
{
unsigned u; /* Local index variable */
diff --git a/src/H5B2pkg.h b/src/H5B2pkg.h
index 8d620cc..66d04fa 100644
--- a/src/H5B2pkg.h
+++ b/src/H5B2pkg.h
@@ -321,7 +321,7 @@ extern const H5B2_class_t *const H5B2_client_class_g[H5B2_NUM_BTREE_ID];
/* Generic routines */
H5_DLL herr_t H5B2__create_flush_depend(H5AC_info_t *parent_entry, H5AC_info_t *child_entry);
-H5_DLL herr_t H5B2__update_flush_depend(H5B2_hdr_t *hdr, unsigned depth, const H5B2_node_ptr_t *node_ptr,
+H5_DLL herr_t H5B2__update_flush_depend(H5B2_hdr_t *hdr, unsigned depth, H5B2_node_ptr_t *node_ptr,
void *old_parent, void *new_parent);
H5_DLL herr_t H5B2__destroy_flush_depend(H5AC_info_t *parent_entry, H5AC_info_t *child_entry);
@@ -390,9 +390,9 @@ H5_DLL herr_t H5B2__update_leaf(H5B2_hdr_t *hdr, H5B2_node_ptr_t *curr_node_ptr,
void *op_data);
/* Routines for iterating over nodes/records */
-H5_DLL herr_t H5B2__iterate_node(H5B2_hdr_t *hdr, uint16_t depth, const H5B2_node_ptr_t *curr_node,
- void *parent, H5B2_operator_t op, void *op_data);
-H5_DLL herr_t H5B2__node_size(H5B2_hdr_t *hdr, uint16_t depth, const H5B2_node_ptr_t *curr_node, void *parent,
+H5_DLL herr_t H5B2__iterate_node(H5B2_hdr_t *hdr, uint16_t depth, H5B2_node_ptr_t *curr_node, void *parent,
+ H5B2_operator_t op, void *op_data);
+H5_DLL herr_t H5B2__node_size(H5B2_hdr_t *hdr, uint16_t depth, H5B2_node_ptr_t *curr_node, void *parent,
hsize_t *op_data);
/* Routines for locating records */
@@ -423,8 +423,8 @@ H5_DLL herr_t H5B2__remove_leaf_by_idx(H5B2_hdr_t *hdr, H5B2_node_ptr_t *curr_no
void *op_data);
/* Routines for deleting nodes */
-H5_DLL herr_t H5B2__delete_node(H5B2_hdr_t *hdr, uint16_t depth, const H5B2_node_ptr_t *curr_node,
- void *parent, H5B2_remove_t op, void *op_data);
+H5_DLL herr_t H5B2__delete_node(H5B2_hdr_t *hdr, uint16_t depth, H5B2_node_ptr_t *curr_node, void *parent,
+ H5B2_remove_t op, void *op_data);
/* Debugging routines for dumping file structures */
H5_DLL herr_t H5B2__hdr_debug(H5F_t *f, haddr_t addr, FILE *stream, int indent, int fwidth,
diff --git a/src/H5Bdbg.c b/src/H5Bdbg.c
index 23d0a8f..de07442 100644
--- a/src/H5Bdbg.c
+++ b/src/H5Bdbg.c
@@ -110,20 +110,20 @@ H5B_debug(H5F_t *f, haddr_t addr, FILE *stream, int indent, int fwidth, const H5
*/
for (u = 0; u < bt->nchildren; u++) {
HDfprintf(stream, "%*sChild %d...\n", indent, "", u);
- HDfprintf(stream, "%*s%-*s %" PRIuHADDR "\n", indent + 3, "", MAX(0, fwidth - 3),
+ HDfprintf(stream, "%*s%-*s %" PRIuHADDR "\n", indent + 3, "", MAX(3, fwidth) - 3,
"Address:", bt->child[u]);
/* If there is a key debugging routine, use it to display the left & right keys */
if (type->debug_key) {
/* Decode the 'left' key & print it */
- HDfprintf(stream, "%*s%-*s\n", indent + 3, "", MAX(0, fwidth - 3), "Left Key:");
+ HDfprintf(stream, "%*s%-*s\n", indent + 3, "", MAX(3, fwidth) - 3, "Left Key:");
HDassert(H5B_NKEY(bt, shared, u));
- (void)(type->debug_key)(stream, indent + 6, MAX(0, fwidth - 6), H5B_NKEY(bt, shared, u), udata);
+ (void)(type->debug_key)(stream, indent + 6, MAX(6, fwidth) - 6, H5B_NKEY(bt, shared, u), udata);
/* Decode the 'right' key & print it */
- HDfprintf(stream, "%*s%-*s\n", indent + 3, "", MAX(0, fwidth - 3), "Right Key:");
+ HDfprintf(stream, "%*s%-*s\n", indent + 3, "", MAX(3, fwidth) - 3, "Right Key:");
HDassert(H5B_NKEY(bt, shared, u + 1));
- (void)(type->debug_key)(stream, indent + 6, MAX(0, fwidth - 6), H5B_NKEY(bt, shared, u + 1),
+ (void)(type->debug_key)(stream, indent + 6, MAX(6, fwidth) - 6, H5B_NKEY(bt, shared, u + 1),
udata);
} /* end if */
} /* end for */
diff --git a/src/H5Cimage.c b/src/H5Cimage.c
index 491253f..b505033 100644
--- a/src/H5Cimage.c
+++ b/src/H5Cimage.c
@@ -2737,10 +2737,11 @@ H5C__prep_for_file_close__setup_image_entries_array(H5C_t *cache_ptr)
*/
if (entry_ptr->type->id == H5AC_PREFETCHED_ENTRY_ID) {
image_entries[u].type_id = entry_ptr->prefetch_type_id;
- image_entries[u].age = entry_ptr->age + 1;
- if (image_entries[u].age > H5AC__CACHE_IMAGE__ENTRY_AGEOUT__MAX)
+ if (entry_ptr->age >= H5AC__CACHE_IMAGE__ENTRY_AGEOUT__MAX)
image_entries[u].age = H5AC__CACHE_IMAGE__ENTRY_AGEOUT__MAX;
+ else
+ image_entries[u].age = entry_ptr->age + 1;
} /* end if */
else {
image_entries[u].type_id = entry_ptr->type->id;
diff --git a/src/H5Dchunk.c b/src/H5Dchunk.c
index dac0db6..e6a53f4 100644
--- a/src/H5Dchunk.c
+++ b/src/H5Dchunk.c
@@ -256,14 +256,13 @@ typedef struct H5D_chunk_coll_fill_info_t {
static herr_t H5D__chunk_construct(H5F_t *f, H5D_t *dset);
static herr_t H5D__chunk_init(H5F_t *f, const H5D_t *dset, hid_t dapl_id);
static herr_t H5D__chunk_io_init(const H5D_io_info_t *io_info, const H5D_type_info_t *type_info,
- hsize_t nelmts, const H5S_t *file_space, const H5S_t *mem_space,
- H5D_chunk_map_t *fm);
+ hsize_t nelmts, H5S_t *file_space, H5S_t *mem_space, H5D_chunk_map_t *fm);
static herr_t H5D__chunk_io_init_selections(const H5D_io_info_t *io_info, const H5D_type_info_t *type_info,
H5D_chunk_map_t *fm);
static herr_t H5D__chunk_read(H5D_io_info_t *io_info, const H5D_type_info_t *type_info, hsize_t nelmts,
- const H5S_t *file_space, const H5S_t *mem_space, H5D_chunk_map_t *fm);
+ H5S_t *file_space, H5S_t *mem_space, H5D_chunk_map_t *fm);
static herr_t H5D__chunk_write(H5D_io_info_t *io_info, const H5D_type_info_t *type_info, hsize_t nelmts,
- const H5S_t *file_space, const H5S_t *mem_space, H5D_chunk_map_t *fm);
+ H5S_t *file_space, H5S_t *mem_space, H5D_chunk_map_t *fm);
static herr_t H5D__chunk_flush(H5D_t *dset);
static herr_t H5D__chunk_io_term(const H5D_chunk_map_t *fm);
static herr_t H5D__chunk_dest(H5D_t *dset);
@@ -321,13 +320,24 @@ static int H5D__chunk_dump_index_cb(const H5D_chunk_rec_t *chunk_rec, void *_uda
/*********************/
/* Chunked storage layout I/O ops */
-const H5D_layout_ops_t H5D_LOPS_CHUNK[1] = {
- {H5D__chunk_construct, H5D__chunk_init, H5D__chunk_is_space_alloc, H5D__chunk_is_data_cached,
- H5D__chunk_io_init, H5D__chunk_read, H5D__chunk_write,
+const H5D_layout_ops_t H5D_LOPS_CHUNK[1] = {{
+ H5D__chunk_construct, /* construct */
+ H5D__chunk_init, /* init */
+ H5D__chunk_is_space_alloc, /* is_space_alloc */
+ H5D__chunk_is_data_cached, /* is_data_cached */
+ H5D__chunk_io_init, /* io_init */
+ H5D__chunk_read, /* ser_read */
+ H5D__chunk_write, /* ser_write */
#ifdef H5_HAVE_PARALLEL
- H5D__chunk_collective_read, H5D__chunk_collective_write,
-#endif /* H5_HAVE_PARALLEL */
- NULL, NULL, H5D__chunk_flush, H5D__chunk_io_term, H5D__chunk_dest}};
+ H5D__chunk_collective_read, /* par_read */
+ H5D__chunk_collective_write, /* par_write */
+#endif
+ NULL, /* readvv */
+ NULL, /* writevv */
+ H5D__chunk_flush, /* flush */
+ H5D__chunk_io_term, /* io_term */
+ H5D__chunk_dest /* dest */
+}};
/*******************/
/* Local Variables */
@@ -1049,7 +1059,7 @@ H5D__chunk_is_data_cached(const H5D_shared_t *shared_dset)
*/
static herr_t
H5D__chunk_io_init(const H5D_io_info_t *io_info, const H5D_type_info_t *type_info, hsize_t nelmts,
- const H5S_t *file_space, const H5S_t *mem_space, H5D_chunk_map_t *fm)
+ H5S_t *file_space, H5S_t *mem_space, H5D_chunk_map_t *fm)
{
const H5D_t *dataset = io_info->dset; /* Local pointer to dataset info */
hssize_t old_offset[H5O_LAYOUT_NDIMS]; /* Old selection offset */
@@ -1080,7 +1090,7 @@ H5D__chunk_io_init(const H5D_io_info_t *io_info, const H5D_type_info_t *type_inf
* speed up hyperslab calculations by removing the extra checks and/or
* additions involving the offset and the hyperslab selection -QAK)
*/
- if ((file_space_normalized = H5S_hyper_normalize_offset((H5S_t *)file_space, old_offset)) < 0)
+ if ((file_space_normalized = H5S_hyper_normalize_offset(file_space, old_offset)) < 0)
HGOTO_ERROR(H5E_DATASET, H5E_CANTSET, FAIL, "unable to normalize selection")
/* Decide the number of chunks in each dimension */
@@ -1117,8 +1127,7 @@ done:
fm->mem_space = NULL;
if (file_space_normalized == TRUE)
- if (H5S_hyper_denormalize_offset((H5S_t *)file_space, old_offset) <
- 0) /* (Casting away const OK -QAK) */
+ if (H5S_hyper_denormalize_offset(file_space, old_offset) < 0)
HDONE_ERROR(H5E_DATASET, H5E_CANTSET, FAIL, "can't denormalize selection")
FUNC_LEAVE_NOAPI(ret_value)
@@ -1345,15 +1354,16 @@ done:
*-------------------------------------------------------------------------
*/
void *
-H5D__chunk_mem_alloc(size_t size, const H5O_pline_t *pline)
+H5D__chunk_mem_alloc(size_t size, void *pline)
{
- void *ret_value = NULL; /* Return value */
+ H5O_pline_t *_pline = (H5O_pline_t *)pline;
+ void * ret_value = NULL; /* Return value */
FUNC_ENTER_STATIC_NOERR
HDassert(size);
- if (pline && pline->nused)
+ if (_pline && _pline->nused)
ret_value = H5MM_malloc(size);
else
ret_value = H5FL_BLK_MALLOC(chunk, size);
@@ -1376,12 +1386,14 @@ H5D__chunk_mem_alloc(size_t size, const H5O_pline_t *pline)
*-------------------------------------------------------------------------
*/
void *
-H5D__chunk_mem_xfree(void *chk, const H5O_pline_t *pline)
+H5D__chunk_mem_xfree(void *chk, const void *pline)
{
+ const H5O_pline_t *_pline = (const H5O_pline_t *)pline;
+
FUNC_ENTER_STATIC_NOERR
if (chk) {
- if (pline && pline->nused)
+ if (_pline && _pline->nused)
H5MM_xfree(chk);
else
chk = H5FL_BLK_FREE(chunk, chk);
@@ -1398,9 +1410,9 @@ H5D__chunk_mem_xfree(void *chk, const H5O_pline_t *pline)
*-------------------------------------------------------------------------
*/
void
-H5D__chunk_mem_free(void *chk, const H5O_pline_t *_pline)
+H5D__chunk_mem_free(void *chk, void *pline)
{
- (void)H5D__chunk_mem_xfree(chk, _pline);
+ (void)H5D__chunk_mem_xfree(chk, pline);
}
/*-------------------------------------------------------------------------
@@ -1552,8 +1564,7 @@ H5D__create_chunk_map_single(H5D_chunk_map_t *fm, const H5D_io_info_t
chunk_info->fspace_shared = TRUE;
/* Just point at the memory dataspace & selection */
- /* (Casting away const OK -QAK) */
- chunk_info->mspace = (H5S_t *)fm->mem_space;
+ chunk_info->mspace = fm->mem_space;
/* Indicate that the chunk's memory dataspace is shared */
chunk_info->mspace_shared = TRUE;
@@ -1828,7 +1839,6 @@ H5D__create_chunk_file_map_hyper(H5D_chunk_map_t *fm, const H5D_io_info_t
/* Iterate through each chunk in the dataset */
while (sel_points) {
/* Check for intersection of current chunk and file selection */
- /* (Casting away const OK - QAK) */
if (TRUE == H5S_SELECT_INTERSECT_BLOCK(fm->file_space, coords, end)) {
H5D_chunk_info_t *new_chunk_info; /* chunk information to insert into skip list */
hsize_t chunk_points; /* Number of elements in chunk selection */
@@ -1987,8 +1997,7 @@ H5D__create_chunk_mem_map_hyper(const H5D_chunk_map_t *fm)
HDassert(chunk_info);
/* Just point at the memory dataspace & selection */
- /* (Casting away const OK -QAK) */
- chunk_info->mspace = (H5S_t *)fm->mem_space;
+ chunk_info->mspace = fm->mem_space;
/* Indicate that the chunk's memory space is shared */
chunk_info->mspace_shared = TRUE;
@@ -2110,8 +2119,7 @@ H5D__create_chunk_mem_map_1d(const H5D_chunk_map_t *fm)
HDassert(chunk_info);
/* Just point at the memory dataspace & selection */
- /* (Casting away const OK -QAK) */
- chunk_info->mspace = (H5S_t *)fm->mem_space;
+ chunk_info->mspace = fm->mem_space;
/* Indicate that the chunk's memory space is shared */
chunk_info->mspace_shared = TRUE;
@@ -2453,8 +2461,7 @@ done:
*/
static herr_t
H5D__chunk_read(H5D_io_info_t *io_info, const H5D_type_info_t *type_info, hsize_t H5_ATTR_UNUSED nelmts,
- const H5S_t H5_ATTR_UNUSED *file_space, const H5S_t H5_ATTR_UNUSED *mem_space,
- H5D_chunk_map_t *fm)
+ H5S_t H5_ATTR_UNUSED *file_space, H5S_t H5_ATTR_UNUSED *mem_space, H5D_chunk_map_t *fm)
{
H5SL_node_t * chunk_node; /* Current node in chunk skip list */
H5D_io_info_t nonexistent_io_info; /* "nonexistent" I/O info object */
@@ -2604,8 +2611,7 @@ done:
*/
static herr_t
H5D__chunk_write(H5D_io_info_t *io_info, const H5D_type_info_t *type_info, hsize_t H5_ATTR_UNUSED nelmts,
- const H5S_t H5_ATTR_UNUSED *file_space, const H5S_t H5_ATTR_UNUSED *mem_space,
- H5D_chunk_map_t *fm)
+ H5S_t H5_ATTR_UNUSED *file_space, H5S_t H5_ATTR_UNUSED *mem_space, H5D_chunk_map_t *fm)
{
H5SL_node_t * chunk_node; /* Current node in chunk skip list */
H5D_io_info_t ctg_io_info; /* Contiguous I/O info object */
@@ -3702,11 +3708,11 @@ done:
static void *
H5D__chunk_lock(const H5D_io_info_t *io_info, H5D_chunk_ud_t *udata, hbool_t relax, hbool_t prev_unfilt_chunk)
{
- const H5D_t * dset = io_info->dset; /* Local pointer to the dataset info */
- const H5O_pline_t *pline =
+ const H5D_t *dset = io_info->dset; /* Local pointer to the dataset info */
+ H5O_pline_t *pline =
&(dset->shared->dcpl_cache
.pline); /* I/O pipeline info - always equal to the pline passed to H5D__chunk_mem_alloc */
- const H5O_pline_t * old_pline = pline; /* Old pipeline, i.e. pipeline used to read the chunk */
+ H5O_pline_t * old_pline = pline; /* Old pipeline, i.e. pipeline used to read the chunk */
const H5O_layout_t *layout = &(dset->shared->layout); /* Dataset layout */
const H5O_fill_t * fill = &(dset->shared->dcpl_cache.fill); /* Fill value info */
H5D_fill_buf_info_t fb_info; /* Dataset's fill buffer info */
@@ -4285,18 +4291,18 @@ H5D__chunk_allocate(const H5D_io_info_t *io_info, hbool_t full_overwrite, const
coordinates) */
hsize_t max_unalloc[H5O_LAYOUT_NDIMS]; /* Last chunk in each dimension that is unallocated (in scaled
coordinates) */
- hsize_t scaled[H5O_LAYOUT_NDIMS]; /* Offset of current chunk (in scaled coordinates) */
- size_t orig_chunk_size; /* Original size of chunk in bytes */
- size_t chunk_size; /* Actual size of chunk in bytes, possibly filtered */
- unsigned filter_mask = 0; /* Filter mask for chunks that have them */
- const H5O_layout_t *layout = &(dset->shared->layout); /* Dataset layout */
- const H5O_pline_t * pline = &(dset->shared->dcpl_cache.pline); /* I/O pipeline info */
- const H5O_pline_t def_pline = H5O_CRT_PIPELINE_DEF; /* Default pipeline */
- const H5O_fill_t * fill = &(dset->shared->dcpl_cache.fill); /* Fill value info */
- H5D_fill_value_t fill_status; /* The fill value status */
- hbool_t should_fill = FALSE; /* Whether fill values should be written */
- void * unfilt_fill_buf = NULL; /* Unfiltered fill value buffer */
- void ** fill_buf = NULL; /* Pointer to the fill buffer to use for a chunk */
+ hsize_t scaled[H5O_LAYOUT_NDIMS]; /* Offset of current chunk (in scaled coordinates) */
+ size_t orig_chunk_size; /* Original size of chunk in bytes */
+ size_t chunk_size; /* Actual size of chunk in bytes, possibly filtered */
+ unsigned filter_mask = 0; /* Filter mask for chunks that have them */
+ H5O_layout_t * layout = &(dset->shared->layout); /* Dataset layout */
+ H5O_pline_t * pline = &(dset->shared->dcpl_cache.pline); /* I/O pipeline info */
+ H5O_pline_t def_pline = H5O_CRT_PIPELINE_DEF; /* Default pipeline */
+ const H5O_fill_t *fill = &(dset->shared->dcpl_cache.fill); /* Fill value info */
+ H5D_fill_value_t fill_status; /* The fill value status */
+ hbool_t should_fill = FALSE; /* Whether fill values should be written */
+ void * unfilt_fill_buf = NULL; /* Unfiltered fill value buffer */
+ void ** fill_buf = NULL; /* Pointer to the fill buffer to use for a chunk */
#ifdef H5_HAVE_PARALLEL
hbool_t blocks_written = FALSE; /* Flag to indicate that chunk was actually written */
hbool_t using_mpi =
@@ -4401,10 +4407,9 @@ H5D__chunk_allocate(const H5D_io_info_t *io_info, hbool_t full_overwrite, const
if (should_fill) {
/* Initialize the fill value buffer */
/* (delay allocating fill buffer for VL datatypes until refilling) */
- /* (casting away const OK - QAK) */
- if (H5D__fill_init(&fb_info, NULL, (H5MM_allocate_t)H5D__chunk_mem_alloc, (void *)pline,
- (H5MM_free_t)H5D__chunk_mem_free, (void *)pline, &dset->shared->dcpl_cache.fill,
- dset->shared->type, dset->shared->type_id, (size_t)0, orig_chunk_size) < 0)
+ if (H5D__fill_init(&fb_info, NULL, H5D__chunk_mem_alloc, pline, H5D__chunk_mem_free, pline,
+ &dset->shared->dcpl_cache.fill, dset->shared->type, dset->shared->type_id,
+ (size_t)0, orig_chunk_size) < 0)
HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "can't initialize fill buffer info")
fb_info_init = TRUE;
@@ -5175,14 +5180,11 @@ done:
static int
H5D__chunk_cmp_coll_fill_info(const void *_entry1, const void *_entry2)
{
- const struct chunk_coll_fill_info *entry1;
- const struct chunk_coll_fill_info *entry2;
+ const struct chunk_coll_fill_info *entry1 = (const struct chunk_coll_fill_info *)_entry1;
+ const struct chunk_coll_fill_info *entry2 = (const struct chunk_coll_fill_info *)_entry2;
FUNC_ENTER_STATIC_NOERR
- entry1 = (const struct chunk_coll_fill_info *)_entry1;
- entry2 = (const struct chunk_coll_fill_info *)_entry2;
-
FUNC_LEAVE_NOAPI(H5F_addr_cmp(entry1->addr, entry2->addr))
} /* end H5D__chunk_cmp_coll_fill_info() */
#endif /* H5_HAVE_PARALLEL */
@@ -6945,7 +6947,7 @@ done:
*/
herr_t
H5D__chunk_file_alloc(const H5D_chk_idx_info_t *idx_info, const H5F_block_t *old_chunk,
- H5F_block_t *new_chunk, hbool_t *need_insert, hsize_t scaled[])
+ H5F_block_t *new_chunk, hbool_t *need_insert, const hsize_t scaled[])
{
hbool_t alloc_chunk = FALSE; /* Whether to allocate chunk */
herr_t ret_value = SUCCEED; /* Return value */
diff --git a/src/H5Dcompact.c b/src/H5Dcompact.c
index 8d823ad..857c8a3 100644
--- a/src/H5Dcompact.c
+++ b/src/H5Dcompact.c
@@ -55,8 +55,7 @@
static herr_t H5D__compact_construct(H5F_t *f, H5D_t *dset);
static hbool_t H5D__compact_is_space_alloc(const H5O_storage_t *storage);
static herr_t H5D__compact_io_init(const H5D_io_info_t *io_info, const H5D_type_info_t *type_info,
- hsize_t nelmts, const H5S_t *file_space, const H5S_t *mem_space,
- H5D_chunk_map_t *cm);
+ hsize_t nelmts, H5S_t *file_space, H5S_t *mem_space, H5D_chunk_map_t *cm);
static ssize_t H5D__compact_readvv(const H5D_io_info_t *io_info, size_t dset_max_nseq, size_t *dset_curr_seq,
size_t dset_size_arr[], hsize_t dset_offset_arr[], size_t mem_max_nseq,
size_t *mem_curr_seq, size_t mem_size_arr[], hsize_t mem_offset_arr[]);
@@ -71,13 +70,24 @@ static herr_t H5D__compact_dest(H5D_t *dset);
/*********************/
/* Compact storage layout I/O ops */
-const H5D_layout_ops_t H5D_LOPS_COMPACT[1] = {
- {H5D__compact_construct, NULL, H5D__compact_is_space_alloc, NULL, H5D__compact_io_init, H5D__contig_read,
- H5D__contig_write,
+const H5D_layout_ops_t H5D_LOPS_COMPACT[1] = {{
+ H5D__compact_construct, /* construct */
+ NULL, /* init */
+ H5D__compact_is_space_alloc, /* is_space_alloc */
+ NULL, /* is_data_cached */
+ H5D__compact_io_init, /* io_init */
+ H5D__contig_read, /* ser_read */
+ H5D__contig_write, /* ser_write */
#ifdef H5_HAVE_PARALLEL
- NULL, NULL,
-#endif /* H5_HAVE_PARALLEL */
- H5D__compact_readvv, H5D__compact_writevv, H5D__compact_flush, NULL, H5D__compact_dest}};
+ NULL, /* par_read */
+ NULL, /* par_write */
+#endif
+ H5D__compact_readvv, /* readvv */
+ H5D__compact_writevv, /* writevv */
+ H5D__compact_flush, /* flush */
+ NULL, /* io_term */
+ H5D__compact_dest /* dest */
+}};
/*******************/
/* Local Variables */
@@ -228,8 +238,8 @@ H5D__compact_is_space_alloc(const H5O_storage_t H5_ATTR_UNUSED *storage)
*/
static herr_t
H5D__compact_io_init(const H5D_io_info_t *io_info, const H5D_type_info_t H5_ATTR_UNUSED *type_info,
- hsize_t H5_ATTR_UNUSED nelmts, const H5S_t H5_ATTR_UNUSED *file_space,
- const H5S_t H5_ATTR_UNUSED *mem_space, H5D_chunk_map_t H5_ATTR_UNUSED *cm)
+ hsize_t H5_ATTR_UNUSED nelmts, H5S_t H5_ATTR_UNUSED *file_space,
+ H5S_t H5_ATTR_UNUSED *mem_space, H5D_chunk_map_t H5_ATTR_UNUSED *cm)
{
FUNC_ENTER_STATIC_NOERR
diff --git a/src/H5Dcontig.c b/src/H5Dcontig.c
index 9709eea..b90b6a1 100644
--- a/src/H5Dcontig.c
+++ b/src/H5Dcontig.c
@@ -91,8 +91,7 @@ typedef struct H5D_contig_writevv_ud_t {
static herr_t H5D__contig_construct(H5F_t *f, H5D_t *dset);
static herr_t H5D__contig_init(H5F_t *f, const H5D_t *dset, hid_t dapl_id);
static herr_t H5D__contig_io_init(const H5D_io_info_t *io_info, const H5D_type_info_t *type_info,
- hsize_t nelmts, const H5S_t *file_space, const H5S_t *mem_space,
- H5D_chunk_map_t *cm);
+ hsize_t nelmts, H5S_t *file_space, H5S_t *mem_space, H5D_chunk_map_t *cm);
static ssize_t H5D__contig_readvv(const H5D_io_info_t *io_info, size_t dset_max_nseq, size_t *dset_curr_seq,
size_t dset_len_arr[], hsize_t dset_offset_arr[], size_t mem_max_nseq,
size_t *mem_curr_seq, size_t mem_len_arr[], hsize_t mem_offset_arr[]);
@@ -109,13 +108,24 @@ static herr_t H5D__contig_write_one(H5D_io_info_t *io_info, hsize_t offset, size
/*********************/
/* Contiguous storage layout I/O ops */
-const H5D_layout_ops_t H5D_LOPS_CONTIG[1] = {
- {H5D__contig_construct, H5D__contig_init, H5D__contig_is_space_alloc, H5D__contig_is_data_cached,
- H5D__contig_io_init, H5D__contig_read, H5D__contig_write,
+const H5D_layout_ops_t H5D_LOPS_CONTIG[1] = {{
+ H5D__contig_construct, /* construct */
+ H5D__contig_init, /* init */
+ H5D__contig_is_space_alloc, /* is_space_alloc */
+ H5D__contig_is_data_cached, /* is_data_cached */
+ H5D__contig_io_init, /* io_init */
+ H5D__contig_read, /* ser_read */
+ H5D__contig_write, /* ser_write */
#ifdef H5_HAVE_PARALLEL
- H5D__contig_collective_read, H5D__contig_collective_write,
-#endif /* H5_HAVE_PARALLEL */
- H5D__contig_readvv, H5D__contig_writevv, H5D__contig_flush, NULL, NULL}};
+ H5D__contig_collective_read, /* par_read */
+ H5D__contig_collective_write, /* par_write */
+#endif
+ H5D__contig_readvv, /* readvv */
+ H5D__contig_writevv, /* writevv */
+ H5D__contig_flush, /* flush */
+ NULL, /* io_term */
+ NULL /* dest */
+}};
/*******************/
/* Local Variables */
@@ -557,8 +567,8 @@ H5D__contig_is_data_cached(const H5D_shared_t *shared_dset)
*/
static herr_t
H5D__contig_io_init(const H5D_io_info_t *io_info, const H5D_type_info_t H5_ATTR_UNUSED *type_info,
- hsize_t H5_ATTR_UNUSED nelmts, const H5S_t H5_ATTR_UNUSED *file_space,
- const H5S_t H5_ATTR_UNUSED *mem_space, H5D_chunk_map_t H5_ATTR_UNUSED *cm)
+ hsize_t H5_ATTR_UNUSED nelmts, H5S_t H5_ATTR_UNUSED *file_space,
+ H5S_t H5_ATTR_UNUSED *mem_space, H5D_chunk_map_t H5_ATTR_UNUSED *cm)
{
FUNC_ENTER_STATIC_NOERR
@@ -581,8 +591,8 @@ H5D__contig_io_init(const H5D_io_info_t *io_info, const H5D_type_info_t H5_ATTR_
*-------------------------------------------------------------------------
*/
herr_t
-H5D__contig_read(H5D_io_info_t *io_info, const H5D_type_info_t *type_info, hsize_t nelmts,
- const H5S_t *file_space, const H5S_t *mem_space, H5D_chunk_map_t H5_ATTR_UNUSED *fm)
+H5D__contig_read(H5D_io_info_t *io_info, const H5D_type_info_t *type_info, hsize_t nelmts, H5S_t *file_space,
+ H5S_t *mem_space, H5D_chunk_map_t H5_ATTR_UNUSED *fm)
{
herr_t ret_value = SUCCEED; /*return value */
@@ -616,8 +626,8 @@ done:
*-------------------------------------------------------------------------
*/
herr_t
-H5D__contig_write(H5D_io_info_t *io_info, const H5D_type_info_t *type_info, hsize_t nelmts,
- const H5S_t *file_space, const H5S_t *mem_space, H5D_chunk_map_t H5_ATTR_UNUSED *fm)
+H5D__contig_write(H5D_io_info_t *io_info, const H5D_type_info_t *type_info, hsize_t nelmts, H5S_t *file_space,
+ H5S_t *mem_space, H5D_chunk_map_t H5_ATTR_UNUSED *fm)
{
herr_t ret_value = SUCCEED; /*return value */
diff --git a/src/H5Defl.c b/src/H5Defl.c
index 85c9dba..a30955b 100644
--- a/src/H5Defl.c
+++ b/src/H5Defl.c
@@ -62,7 +62,7 @@ typedef struct H5D_efl_writevv_ud_t {
/* Layout operation callbacks */
static herr_t H5D__efl_construct(H5F_t *f, H5D_t *dset);
static herr_t H5D__efl_io_init(const H5D_io_info_t *io_info, const H5D_type_info_t *type_info, hsize_t nelmts,
- const H5S_t *file_space, const H5S_t *mem_space, H5D_chunk_map_t *cm);
+ H5S_t *file_space, H5S_t *mem_space, H5D_chunk_map_t *cm);
static ssize_t H5D__efl_readvv(const H5D_io_info_t *io_info, size_t dset_max_nseq, size_t *dset_curr_seq,
size_t dset_len_arr[], hsize_t dset_offset_arr[], size_t mem_max_nseq,
size_t *mem_curr_seq, size_t mem_len_arr[], hsize_t mem_offset_arr[]);
@@ -80,12 +80,24 @@ static herr_t H5D__efl_write(const H5O_efl_t *efl, const H5D_t *dset, haddr_t ad
/*********************/
/* External File List (EFL) storage layout I/O ops */
-const H5D_layout_ops_t H5D_LOPS_EFL[1] = {{H5D__efl_construct, NULL, H5D__efl_is_space_alloc, NULL,
- H5D__efl_io_init, H5D__contig_read, H5D__contig_write,
+const H5D_layout_ops_t H5D_LOPS_EFL[1] = {{
+ H5D__efl_construct, /* construct */
+ NULL, /* init */
+ H5D__efl_is_space_alloc, /* is_space_alloc */
+ NULL, /* is_data_cached */
+ H5D__efl_io_init, /* io_init */
+ H5D__contig_read, /* ser_read */
+ H5D__contig_write, /* ser_write */
#ifdef H5_HAVE_PARALLEL
- NULL, NULL,
-#endif /* H5_HAVE_PARALLEL */
- H5D__efl_readvv, H5D__efl_writevv, NULL, NULL, NULL}};
+ NULL, /* par_read */
+ NULL, /* par_write */
+#endif
+ H5D__efl_readvv, /* readvv */
+ H5D__efl_writevv, /* writevv */
+ NULL, /* flush */
+ NULL, /* io_term */
+ NULL /* dest */
+}};
/*******************/
/* Local Variables */
@@ -198,8 +210,8 @@ H5D__efl_is_space_alloc(const H5O_storage_t H5_ATTR_UNUSED *storage)
*/
static herr_t
H5D__efl_io_init(const H5D_io_info_t *io_info, const H5D_type_info_t H5_ATTR_UNUSED *type_info,
- hsize_t H5_ATTR_UNUSED nelmts, const H5S_t H5_ATTR_UNUSED *file_space,
- const H5S_t H5_ATTR_UNUSED *mem_space, H5D_chunk_map_t H5_ATTR_UNUSED *cm)
+ hsize_t H5_ATTR_UNUSED nelmts, H5S_t H5_ATTR_UNUSED *file_space,
+ H5S_t H5_ATTR_UNUSED *mem_space, H5D_chunk_map_t H5_ATTR_UNUSED *cm)
{
FUNC_ENTER_STATIC_NOERR
diff --git a/src/H5Dfill.c b/src/H5Dfill.c
index b7ecdc9..d6d88f0 100644
--- a/src/H5Dfill.c
+++ b/src/H5Dfill.c
@@ -164,7 +164,7 @@ done:
on each element so that each of them has a copy of the VL data.
--------------------------------------------------------------------------*/
herr_t
-H5D__fill(const void *fill, const H5T_t *fill_type, void *buf, const H5T_t *buf_type, const H5S_t *space)
+H5D__fill(const void *fill, const H5T_t *fill_type, void *buf, const H5T_t *buf_type, H5S_t *space)
{
H5S_sel_iter_t *mem_iter = NULL; /* Memory selection iteration info */
hbool_t mem_iter_init = FALSE; /* Whether the memory selection iterator has been initialized */
diff --git a/src/H5Dint.c b/src/H5Dint.c
index 3fc62d2..91d814b 100644
--- a/src/H5Dint.c
+++ b/src/H5Dint.c
@@ -45,7 +45,7 @@
/* General stuff */
static H5D_shared_t *H5D__new(hid_t dcpl_id, hid_t dapl_id, hbool_t creating, hbool_t vl_type);
-static herr_t H5D__init_type(H5F_t *file, const H5D_t *dset, hid_t type_id, const H5T_t *type);
+static herr_t H5D__init_type(H5F_t *file, const H5D_t *dset, hid_t type_id, H5T_t *type);
static herr_t H5D__cache_dataspace_info(const H5D_t *dset);
static herr_t H5D__init_space(H5F_t *file, const H5D_t *dset, const H5S_t *space);
static herr_t H5D__update_oh_info(H5F_t *file, H5D_t *dset, hid_t dapl_id);
@@ -470,7 +470,7 @@ done:
*-------------------------------------------------------------------------
*/
static herr_t
-H5D__init_type(H5F_t *file, const H5D_t *dset, hid_t type_id, const H5T_t *type)
+H5D__init_type(H5F_t *file, const H5D_t *dset, hid_t type_id, H5T_t *type)
{
htri_t relocatable; /* Flag whether the type is relocatable */
htri_t immutable; /* Flag whether the type is immutable */
@@ -526,8 +526,8 @@ H5D__init_type(H5F_t *file, const H5D_t *dset, hid_t type_id, const H5T_t *type)
/* Use existing datatype */
dset->shared->type_id = type_id;
- dset->shared->type = (H5T_t *)type; /* (Cast away const OK - QAK) */
- } /* end else */
+ dset->shared->type = type;
+ } /* end else */
done:
FUNC_LEAVE_NOAPI(ret_value)
@@ -1120,7 +1120,7 @@ done:
H5D_t *
H5D__create(H5F_t *file, hid_t type_id, const H5S_t *space, hid_t dcpl_id, hid_t dapl_id)
{
- const H5T_t * type; /* Datatype for dataset */
+ H5T_t * type; /* Datatype for dataset */
H5D_t * new_dset = NULL;
H5P_genplist_t *dc_plist = NULL; /* New Property list */
hbool_t has_vl_type = FALSE; /* Flag to indicate a VL-type for dataset */
@@ -1141,7 +1141,7 @@ H5D__create(H5F_t *file, hid_t type_id, const H5S_t *space, hid_t dcpl_id, hid_t
HDassert(H5I_GENPROP_LST == H5I_get_type(dcpl_id));
/* Get the dataset's datatype */
- if (NULL == (type = (const H5T_t *)H5I_object(type_id)))
+ if (NULL == (type = (H5T_t *)H5I_object(type_id)))
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, NULL, "not a datatype")
/* Check if the datatype is "sensible" for use in a dataset */
@@ -2199,7 +2199,7 @@ H5D_oloc(H5D_t *dataset)
*-------------------------------------------------------------------------
*/
H5G_name_t *
-H5D_nameof(const H5D_t *dataset)
+H5D_nameof(H5D_t *dataset)
{
/* Use FUNC_ENTER_NOAPI_NOINIT_NOERR here to avoid performance issues */
FUNC_ENTER_NOAPI_NOINIT_NOERR
diff --git a/src/H5Dio.c b/src/H5Dio.c
index f6dd92f..479d28e 100644
--- a/src/H5Dio.c
+++ b/src/H5Dio.c
@@ -152,10 +152,10 @@ herr_t
H5Dread(hid_t dset_id, hid_t mem_type_id, hid_t mem_space_id, hid_t file_space_id, hid_t dxpl_id,
void *buf /*out*/)
{
- H5D_t * dset = NULL;
- const H5S_t *mem_space = NULL;
- const H5S_t *file_space = NULL;
- herr_t ret_value = SUCCEED; /* Return value */
+ H5D_t *dset = NULL;
+ H5S_t *mem_space = NULL;
+ H5S_t *file_space = NULL;
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_API(FAIL)
H5TRACE6("e", "iiiiix", dset_id, mem_type_id, mem_space_id, file_space_id, dxpl_id, buf);
@@ -283,10 +283,10 @@ herr_t
H5Dwrite(hid_t dset_id, hid_t mem_type_id, hid_t mem_space_id, hid_t file_space_id, hid_t dxpl_id,
const void *buf)
{
- H5D_t * dset = NULL;
- const H5S_t *mem_space = NULL;
- const H5S_t *file_space = NULL;
- herr_t ret_value = SUCCEED; /* Return value */
+ H5D_t *dset = NULL;
+ H5S_t *mem_space = NULL;
+ H5S_t *file_space = NULL;
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_API(FAIL)
H5TRACE6("e", "iiiii*x", dset_id, mem_type_id, mem_space_id, file_space_id, dxpl_id, buf);
@@ -400,8 +400,7 @@ done:
*-------------------------------------------------------------------------
*/
herr_t
-H5D__read(H5D_t *dataset, hid_t mem_type_id, const H5S_t *mem_space, const H5S_t *file_space,
- void *buf /*out*/)
+H5D__read(H5D_t *dataset, hid_t mem_type_id, H5S_t *mem_space, H5S_t *file_space, void *buf /*out*/)
{
H5D_chunk_map_t *fm = NULL; /* Chunk file<->memory mapping */
H5D_io_info_t io_info; /* Dataset I/O info */
@@ -496,20 +495,20 @@ H5D__read(H5D_t *dataset, hid_t mem_type_id, const H5S_t *mem_space, const H5S_t
*/
if (TRUE == H5S_SELECT_SHAPE_SAME(mem_space, file_space) &&
H5S_GET_EXTENT_NDIMS(mem_space) != H5S_GET_EXTENT_NDIMS(file_space)) {
- void *adj_buf = NULL; /* Pointer to the location in buf corresponding */
- /* to the beginning of the projected mem space. */
+ ptrdiff_t buf_adj = 0;
/* Attempt to construct projected dataspace for memory dataspace */
if (H5S_select_construct_projection(mem_space, &projected_mem_space,
- (unsigned)H5S_GET_EXTENT_NDIMS(file_space), buf,
- (const void **)&adj_buf, type_info.dst_type_size) < 0)
+ (unsigned)H5S_GET_EXTENT_NDIMS(file_space),
+ type_info.dst_type_size, &buf_adj) < 0)
HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "unable to construct projected memory dataspace")
HDassert(projected_mem_space);
- HDassert(adj_buf);
+
+ /* Adjust the buffer by the given amount */
+ buf = (void *)(((uint8_t *)buf) + buf_adj);
/* Switch to using projected memory dataspace & adjusted buffer */
mem_space = projected_mem_space;
- buf = adj_buf;
} /* end if */
/* Retrieve dataset properties */
@@ -616,8 +615,7 @@ done:
*-------------------------------------------------------------------------
*/
herr_t
-H5D__write(H5D_t *dataset, hid_t mem_type_id, const H5S_t *mem_space, const H5S_t *file_space,
- const void *buf)
+H5D__write(H5D_t *dataset, hid_t mem_type_id, H5S_t *mem_space, H5S_t *file_space, const void *buf)
{
H5D_chunk_map_t *fm = NULL; /* Chunk file<->memory mapping */
H5D_io_info_t io_info; /* Dataset I/O info */
@@ -735,20 +733,20 @@ H5D__write(H5D_t *dataset, hid_t mem_type_id, const H5S_t *mem_space, const H5S_
*/
if (TRUE == H5S_SELECT_SHAPE_SAME(mem_space, file_space) &&
H5S_GET_EXTENT_NDIMS(mem_space) != H5S_GET_EXTENT_NDIMS(file_space)) {
- void *adj_buf = NULL; /* Pointer to the location in buf corresponding */
- /* to the beginning of the projected mem space. */
+ ptrdiff_t buf_adj = 0;
/* Attempt to construct projected dataspace for memory dataspace */
if (H5S_select_construct_projection(mem_space, &projected_mem_space,
- (unsigned)H5S_GET_EXTENT_NDIMS(file_space), buf,
- (const void **)&adj_buf, type_info.src_type_size) < 0)
+ (unsigned)H5S_GET_EXTENT_NDIMS(file_space),
+ type_info.src_type_size, &buf_adj) < 0)
HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "unable to construct projected memory dataspace")
HDassert(projected_mem_space);
- HDassert(adj_buf);
+
+ /* Adjust the buffer by the given amount */
+ buf = (const void *)(((const uint8_t *)buf) + buf_adj);
/* Switch to using projected memory dataspace & adjusted buffer */
mem_space = projected_mem_space;
- buf = adj_buf;
} /* end if */
/* Retrieve dataset properties */
diff --git a/src/H5Dmpio.c b/src/H5Dmpio.c
index 80f878b..a51feb8 100644
--- a/src/H5Dmpio.c
+++ b/src/H5Dmpio.c
@@ -302,7 +302,7 @@ static herr_t H5D__link_chunk_collective_io(H5D_io_info_t *io_info, const H5D_ty
static herr_t H5D__link_chunk_filtered_collective_io(H5D_io_info_t *io_info, const H5D_type_info_t *type_info,
H5D_chunk_map_t *fm, int mpi_rank, int mpi_size);
static herr_t H5D__inter_collective_io(H5D_io_info_t *io_info, const H5D_type_info_t *type_info,
- const H5S_t *file_space, const H5S_t *mem_space);
+ H5S_t *file_space, H5S_t *mem_space);
static herr_t H5D__final_collective_io(H5D_io_info_t *io_info, const H5D_type_info_t *type_info,
hsize_t nelmts, MPI_Datatype mpi_file_type, MPI_Datatype mpi_buf_type);
static herr_t H5D__sort_chunk(H5D_io_info_t *io_info, const H5D_chunk_map_t *fm,
@@ -892,8 +892,8 @@ done:
*/
herr_t
H5D__mpio_select_read(const H5D_io_info_t *io_info, const H5D_type_info_t H5_ATTR_UNUSED *type_info,
- hsize_t mpi_buf_count, const H5S_t H5_ATTR_UNUSED *file_space,
- const H5S_t H5_ATTR_UNUSED *mem_space)
+ hsize_t mpi_buf_count, H5S_t H5_ATTR_UNUSED *file_space,
+ H5S_t H5_ATTR_UNUSED *mem_space)
{
const H5D_contig_storage_t *store_contig =
&(io_info->store->contig); /* Contiguous storage info for this I/O operation */
@@ -923,8 +923,8 @@ done:
*/
herr_t
H5D__mpio_select_write(const H5D_io_info_t *io_info, const H5D_type_info_t H5_ATTR_UNUSED *type_info,
- hsize_t mpi_buf_count, const H5S_t H5_ATTR_UNUSED *file_space,
- const H5S_t H5_ATTR_UNUSED *mem_space)
+ hsize_t mpi_buf_count, H5S_t H5_ATTR_UNUSED *file_space,
+ H5S_t H5_ATTR_UNUSED *mem_space)
{
const H5D_contig_storage_t *store_contig =
&(io_info->store->contig); /* Contiguous storage info for this I/O operation */
@@ -994,7 +994,7 @@ done:
*/
herr_t
H5D__contig_collective_read(H5D_io_info_t *io_info, const H5D_type_info_t *type_info,
- hsize_t H5_ATTR_UNUSED nelmts, const H5S_t *file_space, const H5S_t *mem_space,
+ hsize_t H5_ATTR_UNUSED nelmts, H5S_t *file_space, H5S_t *mem_space,
H5D_chunk_map_t H5_ATTR_UNUSED *fm)
{
H5D_mpio_actual_io_mode_t actual_io_mode = H5D_MPIO_CONTIGUOUS_COLLECTIVE;
@@ -1033,7 +1033,7 @@ done:
*/
herr_t
H5D__contig_collective_write(H5D_io_info_t *io_info, const H5D_type_info_t *type_info,
- hsize_t H5_ATTR_UNUSED nelmts, const H5S_t *file_space, const H5S_t *mem_space,
+ hsize_t H5_ATTR_UNUSED nelmts, H5S_t *file_space, H5S_t *mem_space,
H5D_chunk_map_t H5_ATTR_UNUSED *fm)
{
H5D_mpio_actual_io_mode_t actual_io_mode = H5D_MPIO_CONTIGUOUS_COLLECTIVE;
@@ -1262,8 +1262,8 @@ done:
*/
herr_t
H5D__chunk_collective_read(H5D_io_info_t *io_info, const H5D_type_info_t *type_info,
- hsize_t H5_ATTR_UNUSED nelmts, const H5S_t H5_ATTR_UNUSED *file_space,
- const H5S_t H5_ATTR_UNUSED *mem_space, H5D_chunk_map_t *fm)
+ hsize_t H5_ATTR_UNUSED nelmts, H5S_t H5_ATTR_UNUSED *file_space,
+ H5S_t H5_ATTR_UNUSED *mem_space, H5D_chunk_map_t *fm)
{
herr_t ret_value = SUCCEED; /* Return value */
@@ -1292,8 +1292,8 @@ done:
*/
herr_t
H5D__chunk_collective_write(H5D_io_info_t *io_info, const H5D_type_info_t *type_info,
- hsize_t H5_ATTR_UNUSED nelmts, const H5S_t H5_ATTR_UNUSED *file_space,
- const H5S_t H5_ATTR_UNUSED *mem_space, H5D_chunk_map_t *fm)
+ hsize_t H5_ATTR_UNUSED nelmts, H5S_t H5_ATTR_UNUSED *file_space,
+ H5S_t H5_ATTR_UNUSED *mem_space, H5D_chunk_map_t *fm)
{
herr_t ret_value = SUCCEED; /* Return value */
@@ -2372,8 +2372,8 @@ done:
*-------------------------------------------------------------------------
*/
static herr_t
-H5D__inter_collective_io(H5D_io_info_t *io_info, const H5D_type_info_t *type_info, const H5S_t *file_space,
- const H5S_t *mem_space)
+H5D__inter_collective_io(H5D_io_info_t *io_info, const H5D_type_info_t *type_info, H5S_t *file_space,
+ H5S_t *mem_space)
{
int mpi_buf_count; /* # of MPI types */
hbool_t mbt_is_derived = FALSE;
@@ -3467,8 +3467,9 @@ done:
static herr_t
H5D__mpio_redistribute_shared_chunks_int(H5D_filtered_collective_io_info_t *chunk_list,
size_t *num_chunks_assigned_map, hbool_t all_ranks_involved,
- const H5D_io_info_t *io_info, const H5D_chunk_map_t *fm,
- int mpi_rank, int mpi_size)
+ const H5D_io_info_t * io_info,
+ const H5D_chunk_map_t H5_ATTR_NDEBUG_UNUSED *fm, int mpi_rank,
+ int mpi_size)
{
MPI_Datatype struct_type;
MPI_Datatype packed_type;
@@ -3797,7 +3798,8 @@ done:
static herr_t
H5D__mpio_share_chunk_modification_data(H5D_filtered_collective_io_info_t *chunk_list,
size_t *chunk_list_num_entries, H5D_io_info_t *io_info,
- const H5D_type_info_t *type_info, int mpi_rank, int mpi_size,
+ const H5D_type_info_t *type_info, int mpi_rank,
+ int H5_ATTR_NDEBUG_UNUSED mpi_size,
H5D_filtered_collective_io_info_t **chunk_hash_table,
unsigned char ***chunk_msg_bufs, int *chunk_msg_bufs_len)
{
@@ -4547,7 +4549,7 @@ H5D__mpio_collective_filtered_chunk_update(H5D_filtered_collective_io_info_t *ch
H5D_filtered_collective_io_info_t *chunk_hash_table,
unsigned char **chunk_msg_bufs, int chunk_msg_bufs_len,
const H5D_io_info_t *io_info, const H5D_type_info_t *type_info,
- int mpi_rank, int mpi_size)
+ int H5_ATTR_NDEBUG_UNUSED mpi_rank, int mpi_size)
{
H5D_fill_buf_info_t fb_info;
H5D_chunk_info_t * chunk_info = NULL;
diff --git a/src/H5Dpkg.h b/src/H5Dpkg.h
index caed1f5..eb09f32 100644
--- a/src/H5Dpkg.h
+++ b/src/H5Dpkg.h
@@ -121,13 +121,12 @@ typedef hbool_t (*H5D_layout_is_space_alloc_func_t)(const H5O_storage_t *storage
typedef hbool_t (*H5D_layout_is_data_cached_func_t)(const H5D_shared_t *shared_dset);
typedef herr_t (*H5D_layout_io_init_func_t)(const struct H5D_io_info_t *io_info,
const H5D_type_info_t *type_info, hsize_t nelmts,
- const H5S_t *file_space, const H5S_t *mem_space,
- struct H5D_chunk_map_t *cm);
+ H5S_t *file_space, H5S_t *mem_space, struct H5D_chunk_map_t *cm);
typedef herr_t (*H5D_layout_read_func_t)(struct H5D_io_info_t *io_info, const H5D_type_info_t *type_info,
- hsize_t nelmts, const H5S_t *file_space, const H5S_t *mem_space,
+ hsize_t nelmts, H5S_t *file_space, H5S_t *mem_space,
struct H5D_chunk_map_t *fm);
typedef herr_t (*H5D_layout_write_func_t)(struct H5D_io_info_t *io_info, const H5D_type_info_t *type_info,
- hsize_t nelmts, const H5S_t *file_space, const H5S_t *mem_space,
+ hsize_t nelmts, H5S_t *file_space, H5S_t *mem_space,
struct H5D_chunk_map_t *fm);
typedef ssize_t (*H5D_layout_readvv_func_t)(const struct H5D_io_info_t *io_info, size_t dset_max_nseq,
size_t *dset_curr_seq, size_t dset_len_arr[],
@@ -168,10 +167,10 @@ typedef struct H5D_layout_ops_t {
/* Function pointers for either multiple or single block I/O access */
typedef herr_t (*H5D_io_single_read_func_t)(const struct H5D_io_info_t *io_info,
const H5D_type_info_t *type_info, hsize_t nelmts,
- const H5S_t *file_space, const H5S_t *mem_space);
+ H5S_t *file_space, H5S_t *mem_space);
typedef herr_t (*H5D_io_single_write_func_t)(const struct H5D_io_info_t *io_info,
const H5D_type_info_t *type_info, hsize_t nelmts,
- const H5S_t *file_space, const H5S_t *mem_space);
+ H5S_t *file_space, H5S_t *mem_space);
/* Typedef for raw data I/O framework info */
typedef struct H5D_io_ops_t {
@@ -342,10 +341,10 @@ typedef struct H5D_chunk_map_t {
H5O_layout_t *layout; /* Dataset layout information*/
hsize_t nelmts; /* Number of elements selected in file & memory dataspaces */
- const H5S_t *file_space; /* Pointer to the file dataspace */
- unsigned f_ndims; /* Number of dimensions for file dataspace */
+ H5S_t * file_space; /* Pointer to the file dataspace */
+ unsigned f_ndims; /* Number of dimensions for file dataspace */
- const H5S_t * mem_space; /* Pointer to the memory dataspace */
+ H5S_t * mem_space; /* Pointer to the memory dataspace */
H5S_t * mchunk_tmpl; /* Dataspace template for new memory chunks */
H5S_sel_iter_t mem_iter; /* Iterator for elements in memory selection */
unsigned m_ndims; /* Number of dimensions for memory dataspace */
@@ -588,29 +587,29 @@ H5_DLL herr_t H5D__refresh(hid_t dset_id, H5D_t *dataset);
H5_DLL herr_t H5D__format_convert(H5D_t *dataset);
/* Internal I/O routines */
-H5_DLL herr_t H5D__read(H5D_t *dataset, hid_t mem_type_id, const H5S_t *mem_space, const H5S_t *file_space,
+H5_DLL herr_t H5D__read(H5D_t *dataset, hid_t mem_type_id, H5S_t *mem_space, H5S_t *file_space,
void *buf /*out*/);
-H5_DLL herr_t H5D__write(H5D_t *dataset, hid_t mem_type_id, const H5S_t *mem_space, const H5S_t *file_space,
+H5_DLL herr_t H5D__write(H5D_t *dataset, hid_t mem_type_id, H5S_t *mem_space, H5S_t *file_space,
const void *buf);
/* Functions that perform direct serial I/O operations */
H5_DLL herr_t H5D__select_read(const H5D_io_info_t *io_info, const H5D_type_info_t *type_info, hsize_t nelmts,
- const H5S_t *file_space, const H5S_t *mem_space);
+ H5S_t *file_space, H5S_t *mem_space);
H5_DLL herr_t H5D__select_write(const H5D_io_info_t *io_info, const H5D_type_info_t *type_info,
- hsize_t nelmts, const H5S_t *file_space, const H5S_t *mem_space);
+ hsize_t nelmts, H5S_t *file_space, H5S_t *mem_space);
/* Functions that perform direct copying between memory buffers */
-H5_DLL herr_t H5D_select_io_mem(void *dst_buf, const H5S_t *dst_space, const void *src_buf,
- const H5S_t *src_space, size_t elmt_size, size_t nelmts);
+H5_DLL herr_t H5D_select_io_mem(void *dst_buf, H5S_t *dst_space, const void *src_buf, H5S_t *src_space,
+ size_t elmt_size, size_t nelmts);
/* Functions that perform scatter-gather serial I/O operations */
H5_DLL herr_t H5D__scatter_mem(const void *_tscat_buf, H5S_sel_iter_t *iter, size_t nelmts, void *_buf);
H5_DLL size_t H5D__gather_mem(const void *_buf, H5S_sel_iter_t *iter, size_t nelmts,
void *_tgath_buf /*out*/);
H5_DLL herr_t H5D__scatgath_read(const H5D_io_info_t *io_info, const H5D_type_info_t *type_info,
- hsize_t nelmts, const H5S_t *file_space, const H5S_t *mem_space);
+ hsize_t nelmts, H5S_t *file_space, H5S_t *mem_space);
H5_DLL herr_t H5D__scatgath_write(const H5D_io_info_t *io_info, const H5D_type_info_t *type_info,
- hsize_t nelmts, const H5S_t *file_space, const H5S_t *mem_space);
+ hsize_t nelmts, H5S_t *file_space, H5S_t *mem_space);
/* Functions that operate on dataset's layout information */
H5_DLL herr_t H5D__layout_set_io_ops(const H5D_t *dataset);
@@ -628,9 +627,9 @@ H5_DLL hbool_t H5D__contig_is_space_alloc(const H5O_storage_t *storage);
H5_DLL hbool_t H5D__contig_is_data_cached(const H5D_shared_t *shared_dset);
H5_DLL herr_t H5D__contig_fill(const H5D_io_info_t *io_info);
H5_DLL herr_t H5D__contig_read(H5D_io_info_t *io_info, const H5D_type_info_t *type_info, hsize_t nelmts,
- const H5S_t *file_space, const H5S_t *mem_space, H5D_chunk_map_t *fm);
+ H5S_t *file_space, H5S_t *mem_space, H5D_chunk_map_t *fm);
H5_DLL herr_t H5D__contig_write(H5D_io_info_t *io_info, const H5D_type_info_t *type_info, hsize_t nelmts,
- const H5S_t *file_space, const H5S_t *mem_space, H5D_chunk_map_t *fm);
+ H5S_t *file_space, H5S_t *mem_space, H5D_chunk_map_t *fm);
H5_DLL herr_t H5D__contig_copy(H5F_t *f_src, const H5O_storage_contig_t *storage_src, H5F_t *f_dst,
H5O_storage_contig_t *storage_dst, H5T_t *src_dtype, H5O_copy_t *cpy_info);
H5_DLL herr_t H5D__contig_delete(H5F_t *f, const H5O_storage_t *store);
@@ -646,10 +645,10 @@ H5_DLL herr_t H5D__chunk_allocated(const H5D_t *dset, hsize_t *nbytes);
H5_DLL herr_t H5D__chunk_allocate(const H5D_io_info_t *io_info, hbool_t full_overwrite,
const hsize_t old_dim[]);
H5_DLL herr_t H5D__chunk_file_alloc(const H5D_chk_idx_info_t *idx_info, const H5F_block_t *old_chunk,
- H5F_block_t *new_chunk, hbool_t *need_insert, hsize_t scaled[]);
-H5_DLL void * H5D__chunk_mem_alloc(size_t size, const H5O_pline_t *pline);
-H5_DLL void H5D__chunk_mem_free(void *chk, const H5O_pline_t *_pline);
-H5_DLL void * H5D__chunk_mem_xfree(void *chk, const H5O_pline_t *pline);
+ H5F_block_t *new_chunk, hbool_t *need_insert, const hsize_t scaled[]);
+H5_DLL void * H5D__chunk_mem_alloc(size_t size, void *pline);
+H5_DLL void H5D__chunk_mem_free(void *chk, void *pline);
+H5_DLL void * H5D__chunk_mem_xfree(void *chk, const void *pline);
H5_DLL void * H5D__chunk_mem_realloc(void *chk, size_t size, const H5O_pline_t *pline);
H5_DLL herr_t H5D__chunk_update_old_edge_chunks(H5D_t *dset, hsize_t old_dim[]);
H5_DLL hbool_t H5D__chunk_is_partial_edge_chunk(unsigned dset_ndims, const uint32_t *chunk_dims,
@@ -702,7 +701,7 @@ H5_DLL herr_t H5D__efl_bh_info(H5F_t *f, H5O_efl_t *efl, hsize_t *heap_size);
/* Functions that perform fill value operations on datasets */
H5_DLL herr_t H5D__fill(const void *fill, const H5T_t *fill_type, void *buf, const H5T_t *buf_type,
- const H5S_t *space);
+ H5S_t *space);
H5_DLL herr_t H5D__fill_init(H5D_fill_buf_info_t *fb_info, void *caller_fill_buf, H5MM_allocate_t alloc_func,
void *alloc_info, H5MM_free_t free_func, void *free_info, const H5O_fill_t *fill,
const H5T_t *dset_type, hid_t dset_type_id, size_t nelmts, size_t min_buf_size);
@@ -718,26 +717,26 @@ H5_DLL herr_t H5D__fill_term(H5D_fill_buf_info_t *fb_info);
#endif /*H5D_DEBUG*/
/* MPI-IO function to read, it will select either regular or irregular read */
H5_DLL herr_t H5D__mpio_select_read(const H5D_io_info_t *io_info, const H5D_type_info_t *type_info,
- hsize_t nelmts, const H5S_t *file_space, const H5S_t *mem_space);
+ hsize_t nelmts, H5S_t *file_space, H5S_t *mem_space);
/* MPI-IO function to write, it will select either regular or irregular read */
H5_DLL herr_t H5D__mpio_select_write(const H5D_io_info_t *io_info, const H5D_type_info_t *type_info,
- hsize_t nelmts, const H5S_t *file_space, const H5S_t *mem_space);
+ hsize_t nelmts, H5S_t *file_space, H5S_t *mem_space);
/* MPI-IO functions to handle contiguous collective IO */
H5_DLL herr_t H5D__contig_collective_read(H5D_io_info_t *io_info, const H5D_type_info_t *type_info,
- hsize_t nelmts, const H5S_t *file_space, const H5S_t *mem_space,
+ hsize_t nelmts, H5S_t *file_space, H5S_t *mem_space,
H5D_chunk_map_t *fm);
H5_DLL herr_t H5D__contig_collective_write(H5D_io_info_t *io_info, const H5D_type_info_t *type_info,
- hsize_t nelmts, const H5S_t *file_space, const H5S_t *mem_space,
+ hsize_t nelmts, H5S_t *file_space, H5S_t *mem_space,
H5D_chunk_map_t *fm);
/* MPI-IO functions to handle chunked collective IO */
H5_DLL herr_t H5D__chunk_collective_read(H5D_io_info_t *io_info, const H5D_type_info_t *type_info,
- hsize_t nelmts, const H5S_t *file_space, const H5S_t *mem_space,
+ hsize_t nelmts, H5S_t *file_space, H5S_t *mem_space,
H5D_chunk_map_t *fm);
H5_DLL herr_t H5D__chunk_collective_write(H5D_io_info_t *io_info, const H5D_type_info_t *type_info,
- hsize_t nelmts, const H5S_t *file_space, const H5S_t *mem_space,
+ hsize_t nelmts, H5S_t *file_space, H5S_t *mem_space,
H5D_chunk_map_t *fm);
/* MPI-IO function to check if a direct I/O transfer is possible between
diff --git a/src/H5Dprivate.h b/src/H5Dprivate.h
index 4ca35b4..c61604d 100644
--- a/src/H5Dprivate.h
+++ b/src/H5Dprivate.h
@@ -163,7 +163,7 @@ H5_DLL herr_t H5D_close(H5D_t *dataset);
H5_DLL herr_t H5D_mult_refresh_close(hid_t dset_id);
H5_DLL herr_t H5D_mult_refresh_reopen(H5D_t *dataset);
H5_DLL H5O_loc_t *H5D_oloc(H5D_t *dataset);
-H5_DLL H5G_name_t *H5D_nameof(const H5D_t *dataset);
+H5_DLL H5G_name_t *H5D_nameof(H5D_t *dataset);
H5_DLL H5T_t *H5D_typeof(const H5D_t *dset);
H5_DLL herr_t H5D_flush_all(const H5F_t *f);
H5_DLL hid_t H5D_get_create_plist(const H5D_t *dset);
diff --git a/src/H5Dscatgath.c b/src/H5Dscatgath.c
index 1888adb..1ac5ada 100644
--- a/src/H5Dscatgath.c
+++ b/src/H5Dscatgath.c
@@ -437,7 +437,7 @@ done:
*/
herr_t
H5D__scatgath_read(const H5D_io_info_t *io_info, const H5D_type_info_t *type_info, hsize_t nelmts,
- const H5S_t *file_space, const H5S_t *mem_space)
+ H5S_t *file_space, H5S_t *mem_space)
{
void * buf = io_info->u.rbuf; /* Local pointer to application buffer */
H5S_sel_iter_t *mem_iter = NULL; /* Memory selection iteration info*/
@@ -577,7 +577,7 @@ done:
*/
herr_t
H5D__scatgath_write(const H5D_io_info_t *io_info, const H5D_type_info_t *type_info, hsize_t nelmts,
- const H5S_t *file_space, const H5S_t *mem_space)
+ H5S_t *file_space, H5S_t *mem_space)
{
const void * buf = io_info->u.wbuf; /* Local pointer to application buffer */
H5S_sel_iter_t *mem_iter = NULL; /* Memory selection iteration info*/
diff --git a/src/H5Dselect.c b/src/H5Dselect.c
index 4ca16ae..a5e73c2 100644
--- a/src/H5Dselect.c
+++ b/src/H5Dselect.c
@@ -44,8 +44,8 @@
/* Local Prototypes */
/********************/
-static herr_t H5D__select_io(const H5D_io_info_t *io_info, size_t elmt_size, size_t nelmts,
- const H5S_t *file_space, const H5S_t *mem_space);
+static herr_t H5D__select_io(const H5D_io_info_t *io_info, size_t elmt_size, size_t nelmts, H5S_t *file_space,
+ H5S_t *mem_space);
/*********************/
/* Package Variables */
@@ -77,8 +77,8 @@ H5FL_EXTERN(H5S_sel_iter_t);
*-------------------------------------------------------------------------
*/
static herr_t
-H5D__select_io(const H5D_io_info_t *io_info, size_t elmt_size, size_t nelmts, const H5S_t *file_space,
- const H5S_t *mem_space)
+H5D__select_io(const H5D_io_info_t *io_info, size_t elmt_size, size_t nelmts, H5S_t *file_space,
+ H5S_t *mem_space)
{
H5S_sel_iter_t *mem_iter = NULL; /* Memory selection iteration info */
hbool_t mem_iter_init = FALSE; /* Memory selection iteration info has been initialized */
@@ -274,8 +274,8 @@ done:
*-------------------------------------------------------------------------
*/
herr_t
-H5D_select_io_mem(void *dst_buf, const H5S_t *dst_space, const void *src_buf, const H5S_t *src_space,
- size_t elmt_size, size_t nelmts)
+H5D_select_io_mem(void *dst_buf, H5S_t *dst_space, const void *src_buf, H5S_t *src_space, size_t elmt_size,
+ size_t nelmts)
{
H5S_sel_iter_t *dst_sel_iter = NULL; /* Destination dataspace iteration info */
H5S_sel_iter_t *src_sel_iter = NULL; /* Source dataspace iteration info */
@@ -453,7 +453,7 @@ done:
*/
herr_t
H5D__select_read(const H5D_io_info_t *io_info, const H5D_type_info_t *type_info, hsize_t nelmts,
- const H5S_t *file_space, const H5S_t *mem_space)
+ H5S_t *file_space, H5S_t *mem_space)
{
herr_t ret_value = SUCCEED; /* Return value */
@@ -482,7 +482,7 @@ done:
*/
herr_t
H5D__select_write(const H5D_io_info_t *io_info, const H5D_type_info_t *type_info, hsize_t nelmts,
- const H5S_t *file_space, const H5S_t *mem_space)
+ H5S_t *file_space, H5S_t *mem_space)
{
herr_t ret_value = SUCCEED; /* Return value */
diff --git a/src/H5Dvirtual.c b/src/H5Dvirtual.c
index c8fa066..3e838c3 100644
--- a/src/H5Dvirtual.c
+++ b/src/H5Dvirtual.c
@@ -83,9 +83,9 @@
/* Layout operation callbacks */
static hbool_t H5D__virtual_is_data_cached(const H5D_shared_t *shared_dset);
static herr_t H5D__virtual_read(H5D_io_info_t *io_info, const H5D_type_info_t *type_info, hsize_t nelmts,
- const H5S_t *file_space, const H5S_t *mem_space, H5D_chunk_map_t *fm);
+ H5S_t *file_space, H5S_t *mem_space, H5D_chunk_map_t *fm);
static herr_t H5D__virtual_write(H5D_io_info_t *io_info, const H5D_type_info_t *type_info, hsize_t nelmts,
- const H5S_t *file_space, const H5S_t *mem_space, H5D_chunk_map_t *fm);
+ H5S_t *file_space, H5S_t *mem_space, H5D_chunk_map_t *fm);
static herr_t H5D__virtual_flush(H5D_t *dset);
/* Other functions */
@@ -102,26 +102,37 @@ static herr_t H5D__virtual_build_source_name(char *
size_t static_strlen, size_t nsubs, hsize_t blockno,
char **built_name);
static herr_t H5D__virtual_init_all(const H5D_t *dset);
-static herr_t H5D__virtual_pre_io(H5D_io_info_t *io_info, H5O_storage_virtual_t *storage,
- const H5S_t *file_space, const H5S_t *mem_space, hsize_t *tot_nelmts);
+static herr_t H5D__virtual_pre_io(H5D_io_info_t *io_info, H5O_storage_virtual_t *storage, H5S_t *file_space,
+ H5S_t *mem_space, hsize_t *tot_nelmts);
static herr_t H5D__virtual_post_io(H5O_storage_virtual_t *storage);
static herr_t H5D__virtual_read_one(H5D_io_info_t *io_info, const H5D_type_info_t *type_info,
- const H5S_t *file_space, H5O_storage_virtual_srcdset_t *source_dset);
+ H5S_t *file_space, H5O_storage_virtual_srcdset_t *source_dset);
static herr_t H5D__virtual_write_one(H5D_io_info_t *io_info, const H5D_type_info_t *type_info,
- const H5S_t *file_space, H5O_storage_virtual_srcdset_t *source_dset);
+ H5S_t *file_space, H5O_storage_virtual_srcdset_t *source_dset);
/*********************/
/* Package Variables */
/*********************/
/* Contiguous storage layout I/O ops */
-const H5D_layout_ops_t H5D_LOPS_VIRTUAL[1] = {{NULL, H5D__virtual_init, H5D__virtual_is_space_alloc,
- H5D__virtual_is_data_cached, NULL, H5D__virtual_read,
- H5D__virtual_write,
+const H5D_layout_ops_t H5D_LOPS_VIRTUAL[1] = {{
+ NULL, /* construct */
+ H5D__virtual_init, /* init */
+ H5D__virtual_is_space_alloc, /* is_space_alloc */
+ H5D__virtual_is_data_cached, /* is_data_cached */
+ NULL, /* io_init */
+ H5D__virtual_read, /* ser_read */
+ H5D__virtual_write, /* ser_write */
#ifdef H5_HAVE_PARALLEL
- NULL, NULL,
-#endif /* H5_HAVE_PARALLEL */
- NULL, NULL, H5D__virtual_flush, NULL, NULL}};
+ NULL, /* par_read */
+ NULL, /* par_write */
+#endif
+ NULL, /* readvv */
+ NULL, /* writevv */
+ H5D__virtual_flush, /* flush */
+ NULL, /* io_term */
+ NULL /* dest */
+}};
/*******************/
/* Local Variables */
@@ -2376,8 +2387,8 @@ done:
*-------------------------------------------------------------------------
*/
static herr_t
-H5D__virtual_pre_io(H5D_io_info_t *io_info, H5O_storage_virtual_t *storage, const H5S_t *file_space,
- const H5S_t *mem_space, hsize_t *tot_nelmts)
+H5D__virtual_pre_io(H5D_io_info_t *io_info, H5O_storage_virtual_t *storage, H5S_t *file_space,
+ H5S_t *mem_space, hsize_t *tot_nelmts)
{
hssize_t select_nelmts; /* Number of elements in selection */
hsize_t bounds_start[H5S_MAX_RANK]; /* Selection bounds start */
@@ -2687,7 +2698,7 @@ H5D__virtual_post_io(H5O_storage_virtual_t *storage)
*-------------------------------------------------------------------------
*/
static herr_t
-H5D__virtual_read_one(H5D_io_info_t *io_info, const H5D_type_info_t *type_info, const H5S_t *file_space,
+H5D__virtual_read_one(H5D_io_info_t *io_info, const H5D_type_info_t *type_info, H5S_t *file_space,
H5O_storage_virtual_srcdset_t *source_dset)
{
H5S_t *projected_src_space = NULL; /* File space for selection in a single source dataset */
@@ -2747,8 +2758,8 @@ done:
*-------------------------------------------------------------------------
*/
static herr_t
-H5D__virtual_read(H5D_io_info_t *io_info, const H5D_type_info_t *type_info, hsize_t nelmts,
- const H5S_t *file_space, const H5S_t *mem_space, H5D_chunk_map_t H5_ATTR_UNUSED *fm)
+H5D__virtual_read(H5D_io_info_t *io_info, const H5D_type_info_t *type_info, hsize_t nelmts, H5S_t *file_space,
+ H5S_t *mem_space, H5D_chunk_map_t H5_ATTR_UNUSED *fm)
{
H5O_storage_virtual_t *storage; /* Convenient pointer into layout struct */
hsize_t tot_nelmts; /* Total number of elements mapped to mem_space */
@@ -2877,7 +2888,7 @@ done:
*-------------------------------------------------------------------------
*/
static herr_t
-H5D__virtual_write_one(H5D_io_info_t *io_info, const H5D_type_info_t *type_info, const H5S_t *file_space,
+H5D__virtual_write_one(H5D_io_info_t *io_info, const H5D_type_info_t *type_info, H5S_t *file_space,
H5O_storage_virtual_srcdset_t *source_dset)
{
H5S_t *projected_src_space = NULL; /* File space for selection in a single source dataset */
@@ -2940,7 +2951,7 @@ done:
*/
static herr_t
H5D__virtual_write(H5D_io_info_t *io_info, const H5D_type_info_t *type_info, hsize_t nelmts,
- const H5S_t *file_space, const H5S_t *mem_space, H5D_chunk_map_t H5_ATTR_UNUSED *fm)
+ H5S_t *file_space, H5S_t *mem_space, H5D_chunk_map_t H5_ATTR_UNUSED *fm)
{
H5O_storage_virtual_t *storage; /* Convenient pointer into layout struct */
hsize_t tot_nelmts; /* Total number of elements mapped to mem_space */
diff --git a/src/H5FD.c b/src/H5FD.c
index 11cbdc4..620e56c 100644
--- a/src/H5FD.c
+++ b/src/H5FD.c
@@ -1746,8 +1746,10 @@ H5FDget_vfd_handle(H5FD_t *file, hid_t fapl_id, void **file_handle)
HGOTO_ERROR(H5E_FILE, H5E_CANTGET, FAIL, "can't get file handle for file driver")
done:
- if (FAIL == ret_value)
- *file_handle = NULL;
+ if (FAIL == ret_value) {
+ if (file_handle)
+ *file_handle = NULL;
+ }
FUNC_LEAVE_API(ret_value)
} /* end H5FDget_vfd_handle() */
diff --git a/src/H5FDhdfs.c b/src/H5FDhdfs.c
index c2f5dc4..705fa4d 100644
--- a/src/H5FDhdfs.c
+++ b/src/H5FDhdfs.c
@@ -1731,7 +1731,7 @@ H5FD_hdfs_init(void)
}
herr_t
-H5Pget_fapl_hdfs(hid_t fapl_id, H5FD_hdfs_fapl_t *fa_out)
+H5Pget_fapl_hdfs(hid_t H5_ATTR_UNUSED fapl_id, H5FD_hdfs_fapl_t H5_ATTR_UNUSED *fa_out)
{
herr_t ret_value = FAIL;
@@ -1745,7 +1745,7 @@ done:
}
herr_t
-H5Pset_fapl_hdfs(hid_t fapl_id, H5FD_hdfs_fapl_t *fa)
+H5Pset_fapl_hdfs(hid_t H5_ATTR_UNUSED fapl_id, H5FD_hdfs_fapl_t H5_ATTR_UNUSED *fa)
{
herr_t ret_value = FAIL;
diff --git a/src/H5FDros3.c b/src/H5FDros3.c
index a9d57a7..3ac034d 100644
--- a/src/H5FDros3.c
+++ b/src/H5FDros3.c
@@ -22,8 +22,10 @@
* Relies on "s3comms" utility layer to implement the AWS REST API.
*/
+#ifdef H5_HAVE_ROS3_VFD
/* This source code file is part of the H5FD driver module */
#include "H5FDdrvr_module.h"
+#endif
#include "H5private.h" /* Generic Functions */
#include "H5Eprivate.h" /* Error handling */
diff --git a/src/H5Gent.c b/src/H5Gent.c
index b200c0e..2b68bf2 100644
--- a/src/H5Gent.c
+++ b/src/H5Gent.c
@@ -303,7 +303,7 @@ done:
*-------------------------------------------------------------------------
*/
void
-H5G__ent_copy(H5G_entry_t *dst, const H5G_entry_t *src, H5_copy_depth_t depth)
+H5G__ent_copy(H5G_entry_t *dst, H5G_entry_t *src, H5_copy_depth_t depth)
{
FUNC_ENTER_PACKAGE_NOERR
@@ -321,8 +321,7 @@ H5G__ent_copy(H5G_entry_t *dst, const H5G_entry_t *src, H5_copy_depth_t depth)
;
}
else if (depth == H5_COPY_SHALLOW) {
- /* Discarding 'const' qualifier OK - QAK */
- H5G__ent_reset((H5G_entry_t *)src);
+ H5G__ent_reset(src);
} /* end if */
FUNC_LEAVE_NOAPI_VOID
diff --git a/src/H5Gloc.c b/src/H5Gloc.c
index ac7f31e..d99cf2e 100644
--- a/src/H5Gloc.c
+++ b/src/H5Gloc.c
@@ -519,8 +519,7 @@ done:
*-------------------------------------------------------------------------
*/
herr_t
-H5G__loc_insert(H5G_loc_t *grp_loc, const char *name, H5G_loc_t *obj_loc, H5O_type_t obj_type,
- const void *crt_info)
+H5G__loc_insert(H5G_loc_t *grp_loc, char *name, H5G_loc_t *obj_loc, H5O_type_t obj_type, const void *crt_info)
{
H5O_link_t lnk; /* Link for object to insert */
herr_t ret_value = SUCCEED; /* Return value */
@@ -537,9 +536,8 @@ H5G__loc_insert(H5G_loc_t *grp_loc, const char *name, H5G_loc_t *obj_loc, H5O_ty
lnk.cset = H5F_DEFAULT_CSET;
lnk.corder = 0; /* Will be reset if the group is tracking creation order */
lnk.corder_valid = FALSE; /* Indicate that the creation order isn't valid (yet) */
- /* Casting away const OK -QAK */
- lnk.name = (char *)name;
- lnk.u.hard.addr = obj_loc->oloc->addr;
+ lnk.name = name;
+ lnk.u.hard.addr = obj_loc->oloc->addr;
/* Insert new group into current group's symbol table */
if (H5G_obj_insert(grp_loc->oloc, name, &lnk, TRUE, obj_type, crt_info) < 0)
@@ -722,10 +720,10 @@ H5G__loc_set_comment_cb(H5G_loc_t H5_ATTR_UNUSED *grp_loc /*in*/, const char H5_
const H5O_link_t H5_ATTR_UNUSED *lnk, H5G_loc_t *obj_loc, void *_udata /*in,out*/,
H5G_own_loc_t *own_loc /*out*/)
{
- H5G_loc_sc_t *udata = (H5G_loc_sc_t *)_udata; /* User data passed in */
- H5O_name_t comment; /* Object header "comment" message */
- htri_t exists; /* Whether a "comment" message already exists */
- herr_t ret_value = SUCCEED; /* Return value */
+ H5G_loc_sc_t *udata = (H5G_loc_sc_t *)_udata; /* User data passed in */
+ H5O_name_t comment = {0}; /* Object header "comment" message */
+ htri_t exists; /* Whether a "comment" message already exists */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_STATIC
@@ -745,13 +743,15 @@ H5G__loc_set_comment_cb(H5G_loc_t H5_ATTR_UNUSED *grp_loc /*in*/, const char H5_
/* Add the new message */
if (udata->comment && *udata->comment) {
- /* Casting away const OK -QAK */
- comment.s = (char *)udata->comment;
+ if (NULL == (comment.s = HDstrdup(udata->comment)))
+ HGOTO_ERROR(H5E_RESOURCE, H5E_CANTALLOC, FAIL, "can't copy group comment")
if (H5O_msg_create(obj_loc->oloc, H5O_NAME_ID, 0, H5O_UPDATE_TIME, &comment) < 0)
HGOTO_ERROR(H5E_OHDR, H5E_CANTINIT, FAIL, "unable to set comment object header message")
} /* end if */
done:
+ HDfree(comment.s);
+
/* Indicate that this callback didn't take ownership of the group *
* location for the object */
*own_loc = H5G_OWN_NONE;
diff --git a/src/H5Gname.c b/src/H5Gname.c
index dab86b3..b5d0daf 100644
--- a/src/H5Gname.c
+++ b/src/H5Gname.c
@@ -308,7 +308,7 @@ H5G_build_fullpath(const char *prefix, const char *name)
/* Build full path */
HDstrncpy(full_path, prefix, orig_path_len + 1);
if (need_sep)
- HDstrncat(full_path, "/", (size_t)1);
+ HDstrcat(full_path, "/");
HDstrncat(full_path, name, name_len);
/* Create reference counted string for path */
diff --git a/src/H5Gpkg.h b/src/H5Gpkg.h
index b704757..68afbac 100644
--- a/src/H5Gpkg.h
+++ b/src/H5Gpkg.h
@@ -377,7 +377,7 @@ H5_DLL H5G_obj_t H5G__stab_get_type_by_idx(H5O_loc_t *oloc, hsize_t idx);
/*
* Functions that understand symbol table entries.
*/
-H5_DLL void H5G__ent_copy(H5G_entry_t *dst, const H5G_entry_t *src, H5_copy_depth_t depth);
+H5_DLL void H5G__ent_copy(H5G_entry_t *dst, H5G_entry_t *src, H5_copy_depth_t depth);
H5_DLL void H5G__ent_reset(H5G_entry_t *ent);
H5_DLL herr_t H5G__ent_decode_vec(const H5F_t *f, const uint8_t **pp, const uint8_t *p_end, H5G_entry_t *ent,
unsigned n);
@@ -468,7 +468,7 @@ H5_DLL herr_t H5G__name_init(H5G_name_t *name, const char *path);
/*
* These functions operate on group "locations"
*/
-H5_DLL herr_t H5G__loc_insert(H5G_loc_t *grp_loc, const char *name, H5G_loc_t *obj_loc, H5O_type_t obj_type,
+H5_DLL herr_t H5G__loc_insert(H5G_loc_t *grp_loc, char *name, H5G_loc_t *obj_loc, H5O_type_t obj_type,
const void *crt_info);
/* Testing functions */
diff --git a/src/H5Idbg.c b/src/H5Idbg.c
index ef8ea65..b7ad4ce 100644
--- a/src/H5Idbg.c
+++ b/src/H5Idbg.c
@@ -94,11 +94,11 @@ H5I__id_dump_cb(void *_item, void H5_ATTR_UNUSED *_key, void *_udata)
break;
}
case H5I_DATASET: {
- path = H5D_nameof((const H5D_t *)info->object);
+ path = H5D_nameof(info->object);
break;
}
case H5I_DATATYPE: {
- path = H5T_nameof((const H5T_t *)info->object);
+ path = H5T_nameof(info->object);
break;
}
case H5I_UNINIT:
diff --git a/src/H5Ofill.c b/src/H5Ofill.c
index 5e907ff..8b22939 100644
--- a/src/H5Ofill.c
+++ b/src/H5Ofill.c
@@ -348,7 +348,7 @@ H5O_fill_old_decode(H5F_t *f, H5O_t *open_oh, unsigned H5_ATTR_UNUSED mesg_flags
if ((exists = H5O_msg_exists_oh(open_oh, H5O_DTYPE_ID)) < 0)
HGOTO_ERROR(H5E_SYM, H5E_NOTFOUND, NULL, "unable to read object header")
if (exists) {
- if ((dt = H5O_msg_read_oh(f, open_oh, H5O_DTYPE_ID, NULL)) < 0)
+ if (NULL == (dt = H5O_msg_read_oh(f, open_oh, H5O_DTYPE_ID, NULL)))
HGOTO_ERROR(H5E_SYM, H5E_CANTGET, NULL, "can't read DTYPE message")
/* Verify size */
if (fill->size != H5T_GET_SIZE(dt))
diff --git a/src/H5RS.c b/src/H5RS.c
index 77fa414..5d74dd4 100644
--- a/src/H5RS.c
+++ b/src/H5RS.c
@@ -143,8 +143,16 @@ H5RS_wrap(const char *s)
if (NULL == (ret_value = H5FL_MALLOC(H5RS_str_t)))
HGOTO_ERROR(H5E_RS, H5E_NOSPACE, NULL, "memory allocation failed")
- /* Set the internal fields */
- ret_value->s = (char *)s;
+ /* Set the internal fields
+ *
+ * We ignore warnings about storing a const char pointer in the struct
+ * since we never modify or free the string when the wrapped struct
+ * field is set to TRUE.
+ */
+ H5_GCC_DIAG_OFF("cast-qual")
+ ret_value->s = (char *)s;
+ H5_GCC_DIAG_ON("cast-qual")
+
ret_value->wrapped = 1;
ret_value->n = 1;
diff --git a/src/H5S.c b/src/H5S.c
index 6d4f1e9..a2634d1 100644
--- a/src/H5S.c
+++ b/src/H5S.c
@@ -218,7 +218,7 @@ H5S_term_package(void)
REVISION LOG
--------------------------------------------------------------------------*/
herr_t
-H5S_get_validated_dataspace(hid_t space_id, const H5S_t **space)
+H5S_get_validated_dataspace(hid_t space_id, H5S_t **space)
{
herr_t ret_value = SUCCEED; /* Return value */
@@ -235,7 +235,7 @@ H5S_get_validated_dataspace(hid_t space_id, const H5S_t **space)
*space = NULL;
else {
/* Get the dataspace pointer */
- if (NULL == (*space = (const H5S_t *)H5I_object_verify(space_id, H5I_DATASPACE)))
+ if (NULL == (*space = (H5S_t *)H5I_object_verify(space_id, H5I_DATASPACE)))
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "space_id is not a dataspace ID")
/* Check for valid selection */
diff --git a/src/H5Sall.c b/src/H5Sall.c
index 35ddf3d..4dcc83a 100644
--- a/src/H5Sall.c
+++ b/src/H5Sall.c
@@ -49,22 +49,22 @@
static herr_t H5S__all_copy(H5S_t *dst, const H5S_t *src, hbool_t share_selection);
static herr_t H5S__all_release(H5S_t *space);
static htri_t H5S__all_is_valid(const H5S_t *space);
-static hssize_t H5S__all_serial_size(const H5S_t *space);
-static herr_t H5S__all_serialize(const H5S_t *space, uint8_t **p);
+static hssize_t H5S__all_serial_size(H5S_t *space);
+static herr_t H5S__all_serialize(H5S_t *space, uint8_t **p);
static herr_t H5S__all_deserialize(H5S_t **space, const uint8_t **p);
static herr_t H5S__all_bounds(const H5S_t *space, hsize_t *start, hsize_t *end);
static herr_t H5S__all_offset(const H5S_t *space, hsize_t *off);
static int H5S__all_unlim_dim(const H5S_t *space);
static htri_t H5S__all_is_contiguous(const H5S_t *space);
static htri_t H5S__all_is_single(const H5S_t *space);
-static htri_t H5S__all_is_regular(const H5S_t *space);
-static htri_t H5S__all_shape_same(const H5S_t *space1, const H5S_t *space2);
-static htri_t H5S__all_intersect_block(const H5S_t *space, const hsize_t *start, const hsize_t *end);
+static htri_t H5S__all_is_regular(H5S_t *space);
+static htri_t H5S__all_shape_same(H5S_t *space1, H5S_t *space2);
+static htri_t H5S__all_intersect_block(H5S_t *space, const hsize_t *start, const hsize_t *end);
static herr_t H5S__all_adjust_u(H5S_t *space, const hsize_t *offset);
static herr_t H5S__all_adjust_s(H5S_t *space, const hssize_t *offset);
static herr_t H5S__all_project_scalar(const H5S_t *space, hsize_t *offset);
static herr_t H5S__all_project_simple(const H5S_t *space, H5S_t *new_space, hsize_t *offset);
-static herr_t H5S__all_iter_init(const H5S_t *space, H5S_sel_iter_t *iter);
+static herr_t H5S__all_iter_init(H5S_t *space, H5S_sel_iter_t *iter);
/* Selection iteration callbacks */
static herr_t H5S__all_iter_coords(const H5S_sel_iter_t *iter, hsize_t *coords);
@@ -144,7 +144,7 @@ static const H5S_sel_iter_class_t H5S_sel_iter_all[1] = {{
*-------------------------------------------------------------------------
*/
static herr_t
-H5S__all_iter_init(const H5S_t H5_ATTR_UNUSED *space, H5S_sel_iter_t *iter)
+H5S__all_iter_init(H5S_t H5_ATTR_UNUSED *space, H5S_sel_iter_t *iter)
{
FUNC_ENTER_STATIC_NOERR
@@ -557,7 +557,7 @@ H5S__all_is_valid(const H5S_t H5_ATTR_UNUSED *space)
REVISION LOG
--------------------------------------------------------------------------*/
static hssize_t
-H5S__all_serial_size(const H5S_t H5_ATTR_UNUSED *space)
+H5S__all_serial_size(H5S_t H5_ATTR_UNUSED *space)
{
FUNC_ENTER_STATIC_NOERR
@@ -577,7 +577,7 @@ H5S__all_serial_size(const H5S_t H5_ATTR_UNUSED *space)
Serialize the current selection into a user-provided buffer.
USAGE
herr_t H5S__all_serialize(space, p)
- const H5S_t *space; IN: Dataspace with selection to serialize
+ H5S_t *space; IN: Dataspace with selection to serialize
uint8_t **p; OUT: Pointer to buffer to put serialized
selection. Will be advanced to end of
serialized selection.
@@ -592,7 +592,7 @@ H5S__all_serial_size(const H5S_t H5_ATTR_UNUSED *space)
REVISION LOG
--------------------------------------------------------------------------*/
static herr_t
-H5S__all_serialize(const H5S_t *space, uint8_t **p)
+H5S__all_serialize(H5S_t *space, uint8_t **p)
{
uint8_t *pp = (*p); /* Local pointer for decoding */
@@ -864,7 +864,7 @@ H5S__all_is_single(const H5S_t H5_ATTR_UNUSED *space)
Check if a "all" selection is "regular"
USAGE
htri_t H5S__all_is_regular(space)
- const H5S_t *space; IN: Dataspace pointer to check
+ H5S_t *space; IN: Dataspace pointer to check
RETURNS
TRUE/FALSE/FAIL
DESCRIPTION
@@ -877,7 +877,7 @@ H5S__all_is_single(const H5S_t H5_ATTR_UNUSED *space)
REVISION LOG
--------------------------------------------------------------------------*/
static htri_t
-H5S__all_is_regular(const H5S_t H5_ATTR_UNUSED *space)
+H5S__all_is_regular(H5S_t H5_ATTR_UNUSED *space)
{
FUNC_ENTER_STATIC_NOERR
@@ -894,8 +894,8 @@ H5S__all_is_regular(const H5S_t H5_ATTR_UNUSED *space)
Check if a two "all" selections are the same shape
USAGE
htri_t H5S__all_shape_same(space1, space2)
- const H5S_t *space1; IN: First dataspace to check
- const H5S_t *space2; IN: Second dataspace to check
+ H5S_t *space1; IN: First dataspace to check
+ H5S_t *space2; IN: Second dataspace to check
RETURNS
TRUE / FALSE / FAIL
DESCRIPTION
@@ -907,7 +907,7 @@ H5S__all_is_regular(const H5S_t H5_ATTR_UNUSED *space)
REVISION LOG
--------------------------------------------------------------------------*/
static htri_t
-H5S__all_shape_same(const H5S_t *space1, const H5S_t *space2)
+H5S__all_shape_same(H5S_t *space1, H5S_t *space2)
{
int space1_dim; /* Current dimension in first dataspace */
int space2_dim; /* Current dimension in second dataspace */
@@ -957,7 +957,7 @@ done:
Detect intersections of selection with block
USAGE
htri_t H5S__all_intersect_block(space, start, end)
- const H5S_t *space; IN: Dataspace with selection to use
+ H5S_t *space; IN: Dataspace with selection to use
const hsize_t *start; IN: Starting coordinate for block
const hsize_t *end; IN: Ending coordinate for block
RETURNS
@@ -970,7 +970,7 @@ done:
REVISION LOG
--------------------------------------------------------------------------*/
htri_t
-H5S__all_intersect_block(const H5S_t H5_ATTR_UNUSED *space, const hsize_t H5_ATTR_UNUSED *start,
+H5S__all_intersect_block(H5S_t H5_ATTR_UNUSED *space, const hsize_t H5_ATTR_UNUSED *start,
const hsize_t H5_ATTR_UNUSED *end)
{
FUNC_ENTER_STATIC_NOERR
diff --git a/src/H5Shyper.c b/src/H5Shyper.c
index 10708d2..438afef 100644
--- a/src/H5Shyper.c
+++ b/src/H5Shyper.c
@@ -160,7 +160,7 @@ static herr_t H5S__hyper_iter_get_seq_list_opt(H5S_sel_iter_t *iter, size_t max
static herr_t H5S__hyper_iter_get_seq_list_single(H5S_sel_iter_t *iter, size_t maxseq, size_t maxelem,
size_t *nseq, size_t *nelem, hsize_t *off, size_t *len);
static herr_t H5S__hyper_proj_int_build_proj(H5S_hyper_project_intersect_ud_t *udata);
-static herr_t H5S__hyper_proj_int_iterate(const H5S_hyper_span_info_t *ss_span_info,
+static herr_t H5S__hyper_proj_int_iterate(H5S_hyper_span_info_t * ss_span_info,
const H5S_hyper_span_info_t *sis_span_info, hsize_t count,
unsigned depth, H5S_hyper_project_intersect_ud_t *udata);
static void H5S__hyper_get_clip_diminfo(hsize_t start, hsize_t stride, hsize_t *count, hsize_t *block,
@@ -173,8 +173,8 @@ static herr_t H5S__hyper_copy(H5S_t *dst, const H5S_t *src, hbool_t share_sele
static herr_t H5S__hyper_release(H5S_t *space);
static htri_t H5S__hyper_is_valid(const H5S_t *space);
static hsize_t H5S__hyper_span_nblocks(H5S_hyper_span_info_t *spans);
-static hssize_t H5S__hyper_serial_size(const H5S_t *space);
-static herr_t H5S__hyper_serialize(const H5S_t *space, uint8_t **p);
+static hssize_t H5S__hyper_serial_size(H5S_t *space);
+static herr_t H5S__hyper_serialize(H5S_t *space, uint8_t **p);
static herr_t H5S__hyper_deserialize(H5S_t **space, const uint8_t **p);
static herr_t H5S__hyper_bounds(const H5S_t *space, hsize_t *start, hsize_t *end);
static herr_t H5S__hyper_offset(const H5S_t *space, hsize_t *offset);
@@ -182,14 +182,14 @@ static int H5S__hyper_unlim_dim(const H5S_t *space);
static herr_t H5S__hyper_num_elem_non_unlim(const H5S_t *space, hsize_t *num_elem_non_unlim);
static htri_t H5S__hyper_is_contiguous(const H5S_t *space);
static htri_t H5S__hyper_is_single(const H5S_t *space);
-static htri_t H5S__hyper_is_regular(const H5S_t *space);
-static htri_t H5S__hyper_shape_same(const H5S_t *space1, const H5S_t *space2);
-static htri_t H5S__hyper_intersect_block(const H5S_t *space, const hsize_t *start, const hsize_t *end);
+static htri_t H5S__hyper_is_regular(H5S_t *space);
+static htri_t H5S__hyper_shape_same(H5S_t *space1, H5S_t *space2);
+static htri_t H5S__hyper_intersect_block(H5S_t *space, const hsize_t *start, const hsize_t *end);
static herr_t H5S__hyper_adjust_u(H5S_t *space, const hsize_t *offset);
static herr_t H5S__hyper_adjust_s(H5S_t *space, const hssize_t *offset);
static herr_t H5S__hyper_project_scalar(const H5S_t *space, hsize_t *offset);
static herr_t H5S__hyper_project_simple(const H5S_t *space, H5S_t *new_space, hsize_t *offset);
-static herr_t H5S__hyper_iter_init(const H5S_t *space, H5S_sel_iter_t *iter);
+static herr_t H5S__hyper_iter_init(H5S_t *space, H5S_sel_iter_t *iter);
/* Selection iteration callbacks */
static herr_t H5S__hyper_iter_coords(const H5S_sel_iter_t *iter, hsize_t *coords);
@@ -558,7 +558,7 @@ H5S__hyper_get_op_gen(void)
*-------------------------------------------------------------------------
*/
static herr_t
-H5S__hyper_iter_init(const H5S_t *space, H5S_sel_iter_t *iter)
+H5S__hyper_iter_init(H5S_t *space, H5S_sel_iter_t *iter)
{
hsize_t *slab_size; /* Pointer to the dataspace dimensions to use for calc. slab */
hsize_t acc; /* Accumulator for computing cumulative sizes */
@@ -585,7 +585,7 @@ H5S__hyper_iter_init(const H5S_t *space, H5S_sel_iter_t *iter)
* to be impossible.
*/
if (space->select.sel_info.hslab->diminfo_valid == H5S_DIMINFO_VALID_NO)
- H5S__hyper_rebuild((H5S_t *)space); /* Casting away const OK -NAF */
+ H5S__hyper_rebuild(space);
/* Check for the special case of just one H5Sselect_hyperslab call made */
if (space->select.sel_info.hslab->diminfo_valid == H5S_DIMINFO_VALID_YES) {
@@ -3556,7 +3556,7 @@ H5S__hyper_get_enc_size_real(hsize_t max_size)
REVISION LOG
--------------------------------------------------------------------------*/
static herr_t
-H5S__hyper_get_version_enc_size(const H5S_t *space, hsize_t block_count, uint32_t *version, uint8_t *enc_size)
+H5S__hyper_get_version_enc_size(H5S_t *space, hsize_t block_count, uint32_t *version, uint8_t *enc_size)
{
hsize_t bounds_start[H5S_MAX_RANK]; /* Starting coordinate of bounding box */
hsize_t bounds_end[H5S_MAX_RANK]; /* Opposite coordinate of bounding box */
@@ -3660,7 +3660,7 @@ done:
REVISION LOG
--------------------------------------------------------------------------*/
static hssize_t
-H5S__hyper_serial_size(const H5S_t *space)
+H5S__hyper_serial_size(H5S_t *space)
{
hsize_t block_count = 0; /* block counter for regular hyperslabs */
uint32_t version; /* Version number */
@@ -3820,7 +3820,7 @@ H5S__hyper_serialize_helper(const H5S_hyper_span_info_t *spans, hsize_t *start,
Serialize the current selection into a user-provided buffer.
USAGE
herr_t H5S__hyper_serialize(space, p)
- const H5S_t *space; IN: Dataspace with selection to serialize
+ H5S_t *space; IN: Dataspace with selection to serialize
uint8_t **p; OUT: Pointer to buffer to put serialized
selection. Will be advanced to end of
serialized selection.
@@ -3835,7 +3835,7 @@ H5S__hyper_serialize_helper(const H5S_hyper_span_info_t *spans, hsize_t *start,
REVISION LOG
--------------------------------------------------------------------------*/
static herr_t
-H5S__hyper_serialize(const H5S_t *space, uint8_t **p)
+H5S__hyper_serialize(H5S_t *space, uint8_t **p)
{
const H5S_hyper_dim_t *diminfo; /* Alias for dataspace's diminfo information */
hsize_t tmp_count[H5S_MAX_RANK]; /* Temporary hyperslab counts */
@@ -5137,7 +5137,7 @@ done:
Check if a hyperslab selection is "regular"
USAGE
htri_t H5S__hyper_is_regular(space)
- const H5S_t *space; IN: Dataspace pointer to check
+ H5S_t *space; IN: Dataspace pointer to check
RETURNS
TRUE/FALSE/FAIL
DESCRIPTION
@@ -5150,7 +5150,7 @@ done:
REVISION LOG
--------------------------------------------------------------------------*/
static htri_t
-H5S__hyper_is_regular(const H5S_t *space)
+H5S__hyper_is_regular(H5S_t *space)
{
htri_t ret_value = FAIL; /* return value */
@@ -5163,7 +5163,7 @@ H5S__hyper_is_regular(const H5S_t *space)
* to be impossible.
*/
if (space->select.sel_info.hslab->diminfo_valid == H5S_DIMINFO_VALID_NO)
- H5S__hyper_rebuild((H5S_t *)space); /* Casting away const OK -NAF */
+ H5S__hyper_rebuild(space);
/* Only simple check for regular hyperslabs for now... */
if (space->select.sel_info.hslab->diminfo_valid == H5S_DIMINFO_VALID_YES)
@@ -5387,8 +5387,8 @@ H5S__hyper_spans_shape_same(const H5S_hyper_span_info_t *span_info1, const H5S_h
Check if a two hyperslab selections are the same shape
USAGE
htri_t H5S__hyper_shape_same(space1, space2)
- const H5S_t *space1; IN: First dataspace to check
- const H5S_t *space2; IN: Second dataspace to check
+ H5S_t *space1; IN: First dataspace to check
+ H5S_t *space2; IN: Second dataspace to check
RETURNS
TRUE / FALSE / FAIL
DESCRIPTION
@@ -5405,7 +5405,7 @@ H5S__hyper_spans_shape_same(const H5S_hyper_span_info_t *span_info1, const H5S_h
REVISION LOG
--------------------------------------------------------------------------*/
static htri_t
-H5S__hyper_shape_same(const H5S_t *space1, const H5S_t *space2)
+H5S__hyper_shape_same(H5S_t *space1, H5S_t *space2)
{
unsigned space1_rank; /* Number of dimensions of first dataspace */
unsigned space2_rank; /* Number of dimensions of second dataspace */
@@ -5428,9 +5428,9 @@ H5S__hyper_shape_same(const H5S_t *space1, const H5S_t *space2)
/* Rebuild diminfo if it is invalid and has not been confirmed to be
* impossible */
if (space1->select.sel_info.hslab->diminfo_valid == H5S_DIMINFO_VALID_NO)
- H5S__hyper_rebuild((H5S_t *)space1); /* Casting away const OK -QAK */
+ H5S__hyper_rebuild(space1);
if (space2->select.sel_info.hslab->diminfo_valid == H5S_DIMINFO_VALID_NO)
- H5S__hyper_rebuild((H5S_t *)space2); /* Casting away const OK -QAK */
+ H5S__hyper_rebuild(space2);
/* If both are regular hyperslabs, compare their diminfo values */
if (space1->select.sel_info.hslab->diminfo_valid == H5S_DIMINFO_VALID_YES &&
@@ -5475,11 +5475,11 @@ H5S__hyper_shape_same(const H5S_t *space1, const H5S_t *space2)
/* Make certain that both selections have span trees */
if (NULL == space1->select.sel_info.hslab->span_lst)
- if (H5S__hyper_generate_spans((H5S_t *)space1) < 0) /* Casting away const OK -QAK */
+ if (H5S__hyper_generate_spans(space1) < 0)
HGOTO_ERROR(H5E_DATASPACE, H5E_UNINITIALIZED, FAIL,
"can't construct span tree for hyperslab selection")
if (NULL == space2->select.sel_info.hslab->span_lst)
- if (H5S__hyper_generate_spans((H5S_t *)space2) < 0) /* Casting away const OK -QAK */
+ if (H5S__hyper_generate_spans(space2) < 0)
HGOTO_ERROR(H5E_DATASPACE, H5E_UNINITIALIZED, FAIL,
"can't construct span tree for hyperslab selection")
@@ -6066,7 +6066,7 @@ done:
Detect intersections of selection with block
USAGE
htri_t H5S__hyper_intersect_block(space, start, end)
- const H5S_t *space; IN: Dataspace with selection to use
+ H5S_t *space; IN: Dataspace with selection to use
const hsize_t *start; IN: Starting coordinate for block
const hsize_t *end; IN: Ending coordinate for block
RETURNS
@@ -6081,7 +6081,7 @@ done:
REVISION LOG
--------------------------------------------------------------------------*/
static htri_t
-H5S__hyper_intersect_block(const H5S_t *space, const hsize_t *start, const hsize_t *end)
+H5S__hyper_intersect_block(H5S_t *space, const hsize_t *start, const hsize_t *end)
{
htri_t ret_value = FAIL; /* Return value */
@@ -6097,7 +6097,7 @@ H5S__hyper_intersect_block(const H5S_t *space, const hsize_t *start, const hsize
* to be impossible.
*/
if (space->select.sel_info.hslab->diminfo_valid == H5S_DIMINFO_VALID_NO)
- H5S__hyper_rebuild((H5S_t *)space); /* Casting away const OK -QAK */
+ H5S__hyper_rebuild(space);
/* Check for regular hyperslab intersection */
if (space->select.sel_info.hslab->diminfo_valid == H5S_DIMINFO_VALID_YES) {
@@ -11144,9 +11144,8 @@ sis_span_info unsigned depth; IN: Depth of iteration (in terms of rank)
REVISION LOG
--------------------------------------------------------------------------*/
static herr_t
-H5S__hyper_proj_int_iterate(const H5S_hyper_span_info_t *ss_span_info,
- const H5S_hyper_span_info_t *sis_span_info, hsize_t count, unsigned depth,
- H5S_hyper_project_intersect_ud_t *udata)
+H5S__hyper_proj_int_iterate(H5S_hyper_span_info_t *ss_span_info, const H5S_hyper_span_info_t *sis_span_info,
+ hsize_t count, unsigned depth, H5S_hyper_project_intersect_ud_t *udata)
{
const H5S_hyper_span_t *ss_span; /* Current span in source space */
const H5S_hyper_span_t *sis_span; /* Current span in source intersect space */
@@ -11405,11 +11404,11 @@ also that proj_space can share some span trees with dst_space, so proj_space mus
if dst_space must be preserved. GLOBAL VARIABLES COMMENTS, BUGS, ASSUMPTIONS EXAMPLES REVISION LOG
--------------------------------------------------------------------------*/
herr_t
-H5S__hyper_project_intersection(const H5S_t *src_space, const H5S_t *dst_space,
- const H5S_t *src_intersect_space, H5S_t *proj_space, hbool_t share_selection)
+H5S__hyper_project_intersection(H5S_t *src_space, H5S_t *dst_space, H5S_t *src_intersect_space,
+ H5S_t *proj_space, hbool_t share_selection)
{
H5S_hyper_project_intersect_ud_t udata; /* User data for subroutines */
- const H5S_hyper_span_info_t * ss_span_info;
+ H5S_hyper_span_info_t * ss_span_info;
const H5S_hyper_span_info_t * ds_span_info;
H5S_hyper_span_info_t * ss_span_info_buf = NULL;
H5S_hyper_span_info_t * ds_span_info_buf = NULL;
@@ -11435,7 +11434,7 @@ H5S__hyper_project_intersection(const H5S_t *src_space, const H5S_t *dst_space,
if (H5S_GET_SELECT_TYPE(src_space) == H5S_SEL_HYPERSLABS) {
/* Make certain the selection has a span tree */
if (NULL == src_space->select.sel_info.hslab->span_lst)
- if (H5S__hyper_generate_spans((H5S_t *)src_space) < 0) /* Casting away const OK -NAF */
+ if (H5S__hyper_generate_spans(src_space) < 0)
HGOTO_ERROR(H5E_DATASPACE, H5E_UNINITIALIZED, FAIL,
"can't construct span tree for source hyperslab selection")
@@ -11457,7 +11456,7 @@ H5S__hyper_project_intersection(const H5S_t *src_space, const H5S_t *dst_space,
if (H5S_GET_SELECT_TYPE(dst_space) == H5S_SEL_HYPERSLABS) {
/* Make certain the selection has a span tree */
if (NULL == dst_space->select.sel_info.hslab->span_lst)
- if (H5S__hyper_generate_spans((H5S_t *)dst_space) < 0) /* Casting away const OK -NAF */
+ if (H5S__hyper_generate_spans(dst_space) < 0)
HGOTO_ERROR(H5E_DATASPACE, H5E_UNINITIALIZED, FAIL,
"can't construct span tree for dsetination hyperslab selection")
@@ -11477,7 +11476,7 @@ H5S__hyper_project_intersection(const H5S_t *src_space, const H5S_t *dst_space,
/* Make certain the source intersect selection has a span tree */
if (NULL == src_intersect_space->select.sel_info.hslab->span_lst)
- if (H5S__hyper_generate_spans((H5S_t *)src_intersect_space) < 0) /* Casting away const OK -NAF */
+ if (H5S__hyper_generate_spans(src_intersect_space) < 0)
HGOTO_ERROR(H5E_DATASPACE, H5E_UNINITIALIZED, FAIL,
"can't construct span tree for source intersect hyperslab selection")
diff --git a/src/H5Smpio.c b/src/H5Smpio.c
index 7b85209..1a43c09 100644
--- a/src/H5Smpio.c
+++ b/src/H5Smpio.c
@@ -73,10 +73,10 @@ static herr_t H5S__mpio_create_point_datatype(size_t elmt_size, hsize_t num_poin
static herr_t H5S__mpio_point_type(const H5S_t *space, size_t elmt_size, MPI_Datatype *new_type, int *count,
hbool_t *is_derived_type, hbool_t do_permute, hsize_t **permute_map,
hbool_t *is_permuted);
-static herr_t H5S__mpio_permute_type(const H5S_t *space, size_t elmt_size, hsize_t **permute_map,
+static herr_t H5S__mpio_permute_type(H5S_t *space, size_t elmt_size, hsize_t **permute_map,
MPI_Datatype *new_type, int *count, hbool_t *is_derived_type);
-static herr_t H5S__mpio_reg_hyper_type(const H5S_t *space, size_t elmt_size, MPI_Datatype *new_type,
- int *count, hbool_t *is_derived_type);
+static herr_t H5S__mpio_reg_hyper_type(H5S_t *space, size_t elmt_size, MPI_Datatype *new_type, int *count,
+ hbool_t *is_derived_type);
static herr_t H5S__mpio_span_hyper_type(const H5S_t *space, size_t elmt_size, MPI_Datatype *new_type,
int *count, hbool_t *is_derived_type);
static herr_t H5S__release_datatype(H5S_mpio_mpitype_list_t *type_list);
@@ -95,6 +95,9 @@ static herr_t H5S__obtain_datatype(H5S_hyper_span_info_t *spans, const hsize_t *
/* Declare a free list to manage the H5S_mpio_mpitype_node_t struct */
H5FL_DEFINE_STATIC(H5S_mpio_mpitype_node_t);
+/* Declare a free list to manage dataspace selection iterators */
+H5FL_EXTERN(H5S_sel_iter_t);
+
/*-------------------------------------------------------------------------
* Function: H5S__mpio_all_type
*
@@ -501,17 +504,19 @@ done:
*-------------------------------------------------------------------------
*/
static herr_t
-H5S__mpio_permute_type(const H5S_t *space, size_t elmt_size, hsize_t **permute, MPI_Datatype *new_type,
- int *count, hbool_t *is_derived_type)
+H5S__mpio_permute_type(H5S_t *space, size_t elmt_size, hsize_t **permute, MPI_Datatype *new_type, int *count,
+ hbool_t *is_derived_type)
{
- MPI_Aint * disp = NULL; /* Datatype displacement for each point*/
- H5S_sel_iter_t sel_iter; /* Selection iteration info */
- hbool_t sel_iter_init = FALSE; /* Selection iteration info has been initialized */
- hssize_t snum_points; /* Signed number of elements in selection */
- hsize_t num_points; /* Number of points in the selection */
- size_t max_elem; /* Maximum number of elements allowed in sequences */
- hsize_t u; /* Local index variable */
- herr_t ret_value = SUCCEED; /* Return value */
+ MPI_Aint * disp = NULL; /* Datatype displacement for each point*/
+ H5S_sel_iter_t *sel_iter = NULL; /* Selection iteration info */
+ hbool_t sel_iter_init = FALSE; /* Selection iteration info has been initialized */
+ hssize_t snum_points; /* Signed number of elements in selection */
+ hsize_t num_points; /* Number of points in the selection */
+ hsize_t * off = NULL;
+ size_t * len = NULL;
+ size_t max_elem; /* Maximum number of elements allowed in sequences */
+ hsize_t u; /* Local index variable */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_STATIC
@@ -527,8 +532,18 @@ H5S__mpio_permute_type(const H5S_t *space, size_t elmt_size, hsize_t **permute,
if (NULL == (disp = (MPI_Aint *)H5MM_malloc(sizeof(MPI_Aint) * num_points)))
HGOTO_ERROR(H5E_DATASPACE, H5E_CANTALLOC, FAIL, "can't allocate array of displacements")
+ /* Allocate arrays to hold sequence offsets and lengths */
+ if (NULL == (off = H5MM_malloc(H5D_IO_VECTOR_SIZE * sizeof(*off))))
+ HGOTO_ERROR(H5E_RESOURCE, H5E_CANTALLOC, FAIL, "can't allocate sequence offsets array")
+ if (NULL == (len = H5MM_malloc(H5D_IO_VECTOR_SIZE * sizeof(*len))))
+ HGOTO_ERROR(H5E_RESOURCE, H5E_CANTALLOC, FAIL, "can't allocate sequence lengths array")
+
+ /* Allocate a selection iterator for iterating over the dataspace */
+ if (NULL == (sel_iter = H5FL_MALLOC(H5S_sel_iter_t)))
+ HGOTO_ERROR(H5E_DATASPACE, H5E_CANTALLOC, FAIL, "couldn't allocate dataspace selection iterator")
+
/* Initialize selection iterator */
- if (H5S_select_iter_init(&sel_iter, space, elmt_size, 0) < 0)
+ if (H5S_select_iter_init(sel_iter, space, elmt_size, 0) < 0)
HGOTO_ERROR(H5E_DATASPACE, H5E_CANTINIT, FAIL, "unable to initialize selection iterator")
sel_iter_init = TRUE; /* Selection iteration info has been initialized */
@@ -538,14 +553,12 @@ H5S__mpio_permute_type(const H5S_t *space, size_t elmt_size, hsize_t **permute,
/* Loop, while elements left in selection */
u = 0;
while (max_elem > 0) {
- hsize_t off[H5D_IO_VECTOR_SIZE]; /* Array to store sequence offsets */
- size_t len[H5D_IO_VECTOR_SIZE]; /* Array to store sequence lengths */
- size_t nelem; /* Number of elements used in sequences */
- size_t nseq; /* Number of sequences generated */
- size_t curr_seq; /* Current sequence being worked on */
+ size_t nelem; /* Number of elements used in sequences */
+ size_t nseq; /* Number of sequences generated */
+ size_t curr_seq; /* Current sequence being worked on */
/* Get the sequences of bytes */
- if (H5S_SELECT_ITER_GET_SEQ_LIST(&sel_iter, (size_t)H5D_IO_VECTOR_SIZE, max_elem, &nseq, &nelem, off,
+ if (H5S_SELECT_ITER_GET_SEQ_LIST(sel_iter, (size_t)H5D_IO_VECTOR_SIZE, max_elem, &nseq, &nelem, off,
len) < 0)
HGOTO_ERROR(H5E_DATASPACE, H5E_UNSUPPORTED, FAIL, "sequence length generation failed")
@@ -602,9 +615,14 @@ H5S__mpio_permute_type(const H5S_t *space, size_t elmt_size, hsize_t **permute,
done:
/* Release selection iterator */
- if (sel_iter_init)
- if (H5S_SELECT_ITER_RELEASE(&sel_iter) < 0)
+ if (sel_iter) {
+ if (sel_iter_init && H5S_SELECT_ITER_RELEASE(sel_iter) < 0)
HDONE_ERROR(H5E_DATASPACE, H5E_CANTRELEASE, FAIL, "unable to release selection iterator")
+ sel_iter = H5FL_FREE(H5S_sel_iter_t, sel_iter);
+ }
+
+ H5MM_free(len);
+ H5MM_free(off);
/* Free memory */
if (disp)
@@ -634,11 +652,11 @@ done:
*-------------------------------------------------------------------------
*/
static herr_t
-H5S__mpio_reg_hyper_type(const H5S_t *space, size_t elmt_size, MPI_Datatype *new_type, int *count,
+H5S__mpio_reg_hyper_type(H5S_t *space, size_t elmt_size, MPI_Datatype *new_type, int *count,
hbool_t *is_derived_type)
{
- H5S_sel_iter_t sel_iter; /* Selection iteration info */
- hbool_t sel_iter_init = FALSE; /* Selection iteration info has been initialized */
+ H5S_sel_iter_t *sel_iter = NULL; /* Selection iteration info */
+ hbool_t sel_iter_init = FALSE; /* Selection iteration info has been initialized */
struct dim { /* less hassle than malloc/free & ilk */
hssize_t start;
@@ -668,32 +686,37 @@ H5S__mpio_reg_hyper_type(const H5S_t *space, size_t elmt_size, MPI_Datatype *new
HDassert(sizeof(MPI_Aint) >= sizeof(elmt_size));
bigio_count = H5_mpi_get_bigio_count();
+
+ /* Allocate a selection iterator for iterating over the dataspace */
+ if (NULL == (sel_iter = H5FL_MALLOC(H5S_sel_iter_t)))
+ HGOTO_ERROR(H5E_DATASPACE, H5E_CANTALLOC, FAIL, "couldn't allocate dataspace selection iterator")
+
/* Initialize selection iterator */
- if (H5S_select_iter_init(&sel_iter, space, elmt_size, 0) < 0)
+ if (H5S_select_iter_init(sel_iter, space, elmt_size, 0) < 0)
HGOTO_ERROR(H5E_DATASPACE, H5E_CANTINIT, FAIL, "unable to initialize selection iterator")
sel_iter_init = TRUE; /* Selection iteration info has been initialized */
/* Abbreviate args */
- diminfo = sel_iter.u.hyp.diminfo;
+ diminfo = sel_iter->u.hyp.diminfo;
HDassert(diminfo);
/* Make a local copy of the dimension info so we can operate with them */
/* Check if this is a "flattened" regular hyperslab selection */
- if (sel_iter.u.hyp.iter_rank != 0 && sel_iter.u.hyp.iter_rank < space->extent.rank) {
+ if (sel_iter->u.hyp.iter_rank != 0 && sel_iter->u.hyp.iter_rank < space->extent.rank) {
/* Flattened selection */
- rank = sel_iter.u.hyp.iter_rank;
+ rank = sel_iter->u.hyp.iter_rank;
#ifdef H5S_DEBUG
if (H5DEBUG(S))
HDfprintf(H5DEBUG(S), "%s: Flattened selection\n", FUNC);
#endif
for (u = 0; u < rank; ++u) {
H5_CHECK_OVERFLOW(diminfo[u].start, hsize_t, hssize_t)
- d[u].start = (hssize_t)diminfo[u].start + sel_iter.u.hyp.sel_off[u];
+ d[u].start = (hssize_t)diminfo[u].start + sel_iter->u.hyp.sel_off[u];
d[u].strid = diminfo[u].stride;
d[u].block = diminfo[u].block;
d[u].count = diminfo[u].count;
- d[u].xtent = sel_iter.u.hyp.size[u];
+ d[u].xtent = sel_iter->u.hyp.size[u];
#ifdef H5S_DEBUG
if (H5DEBUG(S)) {
@@ -951,9 +974,11 @@ H5S__mpio_reg_hyper_type(const H5S_t *space, size_t elmt_size, MPI_Datatype *new
done:
/* Release selection iterator */
- if (sel_iter_init)
- if (H5S_SELECT_ITER_RELEASE(&sel_iter) < 0)
+ if (sel_iter) {
+ if (sel_iter_init && H5S_SELECT_ITER_RELEASE(sel_iter) < 0)
HDONE_ERROR(H5E_DATASPACE, H5E_CANTRELEASE, FAIL, "unable to release selection iterator")
+ sel_iter = H5FL_FREE(H5S_sel_iter_t, sel_iter);
+ }
#ifdef H5S_DEBUG
if (H5DEBUG(S))
@@ -1364,7 +1389,7 @@ done:
*-------------------------------------------------------------------------
*/
herr_t
-H5S_mpio_space_type(const H5S_t *space, size_t elmt_size, MPI_Datatype *new_type, int *count,
+H5S_mpio_space_type(H5S_t *space, size_t elmt_size, MPI_Datatype *new_type, int *count,
hbool_t *is_derived_type, hbool_t do_permute, hsize_t **permute_map, hbool_t *is_permuted)
{
herr_t ret_value = SUCCEED; /* Return value */
diff --git a/src/H5Snone.c b/src/H5Snone.c
index 82e513e..9292cd4 100644
--- a/src/H5Snone.c
+++ b/src/H5Snone.c
@@ -49,22 +49,22 @@
static herr_t H5S__none_copy(H5S_t *dst, const H5S_t *src, hbool_t share_selection);
static herr_t H5S__none_release(H5S_t *space);
static htri_t H5S__none_is_valid(const H5S_t *space);
-static hssize_t H5S__none_serial_size(const H5S_t *space);
-static herr_t H5S__none_serialize(const H5S_t *space, uint8_t **p);
+static hssize_t H5S__none_serial_size(H5S_t *space);
+static herr_t H5S__none_serialize(H5S_t *space, uint8_t **p);
static herr_t H5S__none_deserialize(H5S_t **space, const uint8_t **p);
static herr_t H5S__none_bounds(const H5S_t *space, hsize_t *start, hsize_t *end);
static herr_t H5S__none_offset(const H5S_t *space, hsize_t *off);
static int H5S__none_unlim_dim(const H5S_t *space);
static htri_t H5S__none_is_contiguous(const H5S_t *space);
static htri_t H5S__none_is_single(const H5S_t *space);
-static htri_t H5S__none_is_regular(const H5S_t *space);
-static htri_t H5S__none_shape_same(const H5S_t *space1, const H5S_t *space2);
-static htri_t H5S__none_intersect_block(const H5S_t *space, const hsize_t *start, const hsize_t *end);
+static htri_t H5S__none_is_regular(H5S_t *space);
+static htri_t H5S__none_shape_same(H5S_t *space1, H5S_t *space2);
+static htri_t H5S__none_intersect_block(H5S_t *space, const hsize_t *start, const hsize_t *end);
static herr_t H5S__none_adjust_u(H5S_t *space, const hsize_t *offset);
static herr_t H5S__none_adjust_s(H5S_t *space, const hssize_t *offset);
static herr_t H5S__none_project_scalar(const H5S_t *space, hsize_t *offset);
static herr_t H5S__none_project_simple(const H5S_t *space, H5S_t *new_space, hsize_t *offset);
-static herr_t H5S__none_iter_init(const H5S_t *space, H5S_sel_iter_t *iter);
+static herr_t H5S__none_iter_init(H5S_t *space, H5S_sel_iter_t *iter);
/* Selection iteration callbacks */
static herr_t H5S__none_iter_coords(const H5S_sel_iter_t *iter, hsize_t *coords);
@@ -144,7 +144,7 @@ static const H5S_sel_iter_class_t H5S_sel_iter_none[1] = {{
*-------------------------------------------------------------------------
*/
static herr_t
-H5S__none_iter_init(const H5S_t H5_ATTR_UNUSED *space, H5S_sel_iter_t *iter)
+H5S__none_iter_init(H5S_t H5_ATTR_UNUSED *space, H5S_sel_iter_t *iter)
{
FUNC_ENTER_STATIC_NOERR
@@ -513,7 +513,7 @@ H5S__none_is_valid(const H5S_t H5_ATTR_UNUSED *space)
REVISION LOG
--------------------------------------------------------------------------*/
static hssize_t
-H5S__none_serial_size(const H5S_t H5_ATTR_UNUSED *space)
+H5S__none_serial_size(H5S_t H5_ATTR_UNUSED *space)
{
FUNC_ENTER_STATIC_NOERR
@@ -533,7 +533,7 @@ H5S__none_serial_size(const H5S_t H5_ATTR_UNUSED *space)
Serialize the current selection into a user-provided buffer.
USAGE
herr_t H5S__none_serialize(space, p)
- const H5S_t *space; IN: Dataspace with selection to serialize
+ H5S_t *space; IN: Dataspace with selection to serialize
uint8_t **p; OUT: Pointer to buffer to put serialized
selection. Will be advanced to end of
serialized selection.
@@ -548,7 +548,7 @@ H5S__none_serial_size(const H5S_t H5_ATTR_UNUSED *space)
REVISION LOG
--------------------------------------------------------------------------*/
static herr_t
-H5S__none_serialize(const H5S_t *space, uint8_t **p)
+H5S__none_serialize(H5S_t *space, uint8_t **p)
{
uint8_t *pp = (*p); /* Local pointer for decoding */
@@ -803,7 +803,7 @@ H5S__none_is_single(const H5S_t H5_ATTR_UNUSED *space)
Check if a "none" selection is "regular"
USAGE
htri_t H5S__none_is_regular(space)
- const H5S_t *space; IN: Dataspace pointer to check
+ H5S_t *space; IN: Dataspace pointer to check
RETURNS
TRUE/FALSE/FAIL
DESCRIPTION
@@ -816,7 +816,7 @@ H5S__none_is_single(const H5S_t H5_ATTR_UNUSED *space)
REVISION LOG
--------------------------------------------------------------------------*/
static htri_t
-H5S__none_is_regular(const H5S_t H5_ATTR_UNUSED *space)
+H5S__none_is_regular(H5S_t H5_ATTR_UNUSED *space)
{
FUNC_ENTER_STATIC_NOERR
@@ -833,8 +833,8 @@ H5S__none_is_regular(const H5S_t H5_ATTR_UNUSED *space)
Check if a two "none" selections are the same shape
USAGE
htri_t H5S__none_shape_same(space1, space2)
- const H5S_t *space1; IN: First dataspace to check
- const H5S_t *space2; IN: Second dataspace to check
+ H5S_t *space1; IN: First dataspace to check
+ H5S_t *space2; IN: Second dataspace to check
RETURNS
TRUE / FALSE / FAIL
DESCRIPTION
@@ -846,7 +846,7 @@ H5S__none_is_regular(const H5S_t H5_ATTR_UNUSED *space)
REVISION LOG
--------------------------------------------------------------------------*/
static htri_t
-H5S__none_shape_same(const H5S_t H5_ATTR_UNUSED *space1, const H5S_t H5_ATTR_UNUSED *space2)
+H5S__none_shape_same(H5S_t H5_ATTR_UNUSED *space1, H5S_t H5_ATTR_UNUSED *space2)
{
FUNC_ENTER_STATIC_NOERR
@@ -864,7 +864,7 @@ H5S__none_shape_same(const H5S_t H5_ATTR_UNUSED *space1, const H5S_t H5_ATTR_UNU
Detect intersections of selection with block
USAGE
htri_t H5S__none_intersect_block(space, start, end)
- const H5S_t *space; IN: Dataspace with selection to use
+ H5S_t *space; IN: Dataspace with selection to use
const hsize_t *start; IN: Starting coordinate for block
const hsize_t *end; IN: Ending coordinate for block
RETURNS
@@ -877,7 +877,7 @@ H5S__none_shape_same(const H5S_t H5_ATTR_UNUSED *space1, const H5S_t H5_ATTR_UNU
REVISION LOG
--------------------------------------------------------------------------*/
htri_t
-H5S__none_intersect_block(const H5S_t H5_ATTR_UNUSED *space, const hsize_t H5_ATTR_UNUSED *start,
+H5S__none_intersect_block(H5S_t H5_ATTR_UNUSED *space, const hsize_t H5_ATTR_UNUSED *start,
const hsize_t H5_ATTR_UNUSED *end)
{
FUNC_ENTER_STATIC_NOERR
diff --git a/src/H5Spkg.h b/src/H5Spkg.h
index 5ad8684..8313529 100644
--- a/src/H5Spkg.h
+++ b/src/H5Spkg.h
@@ -238,9 +238,9 @@ typedef herr_t (*H5S_sel_release_func_t)(H5S_t *space);
/* Method to determine if current selection is valid for dataspace */
typedef htri_t (*H5S_sel_is_valid_func_t)(const H5S_t *space);
/* Method to determine number of bytes required to store current selection */
-typedef hssize_t (*H5S_sel_serial_size_func_t)(const H5S_t *space);
+typedef hssize_t (*H5S_sel_serial_size_func_t)(H5S_t *space);
/* Method to store current selection in "serialized" form (a byte sequence suitable for storing on disk) */
-typedef herr_t (*H5S_sel_serialize_func_t)(const H5S_t *space, uint8_t **p);
+typedef herr_t (*H5S_sel_serialize_func_t)(H5S_t *space, uint8_t **p);
/* Method to create selection from "serialized" form (a byte sequence suitable for storing on disk) */
typedef herr_t (*H5S_sel_deserialize_func_t)(H5S_t **space, const uint8_t **p);
/* Method to determine smallest n-D bounding box containing the current selection */
@@ -256,12 +256,11 @@ typedef htri_t (*H5S_sel_is_contiguous_func_t)(const H5S_t *space);
/* Method to determine if current selection is a single block */
typedef htri_t (*H5S_sel_is_single_func_t)(const H5S_t *space);
/* Method to determine if current selection is "regular" */
-typedef htri_t (*H5S_sel_is_regular_func_t)(const H5S_t *space);
+typedef htri_t (*H5S_sel_is_regular_func_t)(H5S_t *space);
/* Method to determine if two dataspaces' selections are the same shape */
-typedef htri_t (*H5S_sel_shape_same_func_t)(const H5S_t *space1, const H5S_t *space2);
+typedef htri_t (*H5S_sel_shape_same_func_t)(H5S_t *space1, H5S_t *space2);
/* Method to determine if selection intersects a block */
-typedef htri_t (*H5S_sel_intersect_block_func_t)(const H5S_t *space, const hsize_t *start,
- const hsize_t *end);
+typedef htri_t (*H5S_sel_intersect_block_func_t)(H5S_t *space, const hsize_t *start, const hsize_t *end);
/* Method to adjust a selection by an offset */
typedef herr_t (*H5S_sel_adjust_u_func_t)(H5S_t *space, const hsize_t *offset);
/* Method to adjust a selection by an offset (signed) */
@@ -271,7 +270,7 @@ typedef herr_t (*H5S_sel_project_scalar)(const H5S_t *space, hsize_t *offset);
/* Method to construct selection projection onto/into simple dataspace */
typedef herr_t (*H5S_sel_project_simple)(const H5S_t *space, H5S_t *new_space, hsize_t *offset);
/* Method to initialize iterator for current selection */
-typedef herr_t (*H5S_sel_iter_init_func_t)(const H5S_t *space, H5S_sel_iter_t *sel_iter);
+typedef herr_t (*H5S_sel_iter_init_func_t)(H5S_t *space, H5S_sel_iter_t *sel_iter);
/* Selection class information */
typedef struct {
@@ -401,9 +400,8 @@ H5_DLL herr_t H5S__extent_copy_real(H5S_extent_t *dst, const H5S_extent_t *src,
H5_DLL uint64_t H5S__hyper_get_op_gen(void);
H5_DLL void H5S__hyper_rebuild(H5S_t *space);
H5_DLL herr_t H5S__modify_select(H5S_t *space1, H5S_seloper_t op, H5S_t *space2);
-H5_DLL herr_t H5S__hyper_project_intersection(const H5S_t *src_space, const H5S_t *dst_space,
- const H5S_t *src_intersect_space, H5S_t *proj_space,
- hbool_t share_space);
+H5_DLL herr_t H5S__hyper_project_intersection(H5S_t *src_space, H5S_t *dst_space, H5S_t *src_intersect_space,
+ H5S_t *proj_space, hbool_t share_space);
/* Testing functions */
#ifdef H5S_TESTING
diff --git a/src/H5Spoint.c b/src/H5Spoint.c
index 72077e2..1a9a95c 100644
--- a/src/H5Spoint.c
+++ b/src/H5Spoint.c
@@ -58,22 +58,22 @@ static void H5S__free_pnt_list(H5S_pnt_list_t *pnt_lst);
static herr_t H5S__point_copy(H5S_t *dst, const H5S_t *src, hbool_t share_selection);
static herr_t H5S__point_release(H5S_t *space);
static htri_t H5S__point_is_valid(const H5S_t *space);
-static hssize_t H5S__point_serial_size(const H5S_t *space);
-static herr_t H5S__point_serialize(const H5S_t *space, uint8_t **p);
+static hssize_t H5S__point_serial_size(H5S_t *space);
+static herr_t H5S__point_serialize(H5S_t *space, uint8_t **p);
static herr_t H5S__point_deserialize(H5S_t **space, const uint8_t **p);
static herr_t H5S__point_bounds(const H5S_t *space, hsize_t *start, hsize_t *end);
static herr_t H5S__point_offset(const H5S_t *space, hsize_t *off);
static int H5S__point_unlim_dim(const H5S_t *space);
static htri_t H5S__point_is_contiguous(const H5S_t *space);
static htri_t H5S__point_is_single(const H5S_t *space);
-static htri_t H5S__point_is_regular(const H5S_t *space);
-static htri_t H5S__point_shape_same(const H5S_t *space1, const H5S_t *space2);
-static htri_t H5S__point_intersect_block(const H5S_t *space, const hsize_t *start, const hsize_t *end);
+static htri_t H5S__point_is_regular(H5S_t *space);
+static htri_t H5S__point_shape_same(H5S_t *space1, H5S_t *space2);
+static htri_t H5S__point_intersect_block(H5S_t *space, const hsize_t *start, const hsize_t *end);
static herr_t H5S__point_adjust_u(H5S_t *space, const hsize_t *offset);
static herr_t H5S__point_adjust_s(H5S_t *space, const hssize_t *offset);
static herr_t H5S__point_project_scalar(const H5S_t *space, hsize_t *offset);
static herr_t H5S__point_project_simple(const H5S_t *space, H5S_t *new_space, hsize_t *offset);
-static herr_t H5S__point_iter_init(const H5S_t *space, H5S_sel_iter_t *iter);
+static herr_t H5S__point_iter_init(H5S_t *space, H5S_sel_iter_t *iter);
static herr_t H5S__point_get_version_enc_size(const H5S_t *space, uint32_t *version, uint8_t *enc_size);
/* Selection iteration callbacks */
@@ -160,7 +160,7 @@ H5FL_DEFINE_STATIC(H5S_pnt_list_t);
*-------------------------------------------------------------------------
*/
static herr_t
-H5S__point_iter_init(const H5S_t *space, H5S_sel_iter_t *iter)
+H5S__point_iter_init(H5S_t *space, H5S_sel_iter_t *iter)
{
herr_t ret_value = SUCCEED; /* Return value */
@@ -1087,7 +1087,7 @@ done:
REVISION LOG
--------------------------------------------------------------------------*/
static hssize_t
-H5S__point_serial_size(const H5S_t *space)
+H5S__point_serial_size(H5S_t *space)
{
H5S_pnt_node_t *curr; /* Point information nodes */
uint32_t version; /* Version number */
@@ -1134,7 +1134,7 @@ done:
Serialize the current selection into a user-provided buffer.
USAGE
herr_t H5S__point_serialize(space, p)
- const H5S_t *space; IN: Dataspace with selection to serialize
+ H5S_t *space; IN: Dataspace with selection to serialize
uint8_t **p; OUT: Pointer to buffer to put serialized
selection. Will be advanced to end of
serialized selection.
@@ -1149,7 +1149,7 @@ done:
REVISION LOG
--------------------------------------------------------------------------*/
static herr_t
-H5S__point_serialize(const H5S_t *space, uint8_t **p)
+H5S__point_serialize(H5S_t *space, uint8_t **p)
{
H5S_pnt_node_t *curr; /* Point information nodes */
uint8_t * pp; /* Local pointer for encoding */
@@ -1688,7 +1688,7 @@ H5S__point_is_single(const H5S_t *space)
Check if a point selection is "regular"
USAGE
htri_t H5S__point_is_regular(space)
- const H5S_t *space; IN: Dataspace pointer to check
+ H5S_t *space; IN: Dataspace pointer to check
RETURNS
TRUE/FALSE/FAIL
DESCRIPTION
@@ -1703,7 +1703,7 @@ H5S__point_is_single(const H5S_t *space)
REVISION LOG
--------------------------------------------------------------------------*/
static htri_t
-H5S__point_is_regular(const H5S_t *space)
+H5S__point_is_regular(H5S_t *space)
{
htri_t ret_value = FAIL; /* Return value */
@@ -1728,8 +1728,8 @@ H5S__point_is_regular(const H5S_t *space)
Check if a two "point" selections are the same shape
USAGE
htri_t H5S__point_shape_same(space1, space2)
- const H5S_t *space1; IN: First dataspace to check
- const H5S_t *space2; IN: Second dataspace to check
+ H5S_t *space1; IN: First dataspace to check
+ H5S_t *space2; IN: Second dataspace to check
RETURNS
TRUE / FALSE / FAIL
DESCRIPTION
@@ -1741,7 +1741,7 @@ H5S__point_is_regular(const H5S_t *space)
REVISION LOG
--------------------------------------------------------------------------*/
static htri_t
-H5S__point_shape_same(const H5S_t *space1, const H5S_t *space2)
+H5S__point_shape_same(H5S_t *space1, H5S_t *space2)
{
H5S_pnt_node_t *pnt1, *pnt2; /* Point information nodes */
hssize_t offset[H5S_MAX_RANK]; /* Offset between the selections */
@@ -1834,7 +1834,7 @@ done:
Detect intersections of selection with block
USAGE
htri_t H5S__point_intersect_block(space, start, end)
- const H5S_t *space; IN: Dataspace with selection to use
+ H5S_t *space; IN: Dataspace with selection to use
const hsize_t *start; IN: Starting coordinate for block
const hsize_t *end; IN: Ending coordinate for block
RETURNS
@@ -1847,7 +1847,7 @@ done:
REVISION LOG
--------------------------------------------------------------------------*/
htri_t
-H5S__point_intersect_block(const H5S_t *space, const hsize_t *start, const hsize_t *end)
+H5S__point_intersect_block(H5S_t *space, const hsize_t *start, const hsize_t *end)
{
H5S_pnt_node_t *pnt; /* Point information node */
htri_t ret_value = FALSE; /* Return value */
diff --git a/src/H5Sprivate.h b/src/H5Sprivate.h
index af76f8b..a140314 100644
--- a/src/H5Sprivate.h
+++ b/src/H5Sprivate.h
@@ -247,7 +247,7 @@ H5_DLL htri_t H5S_set_extent(H5S_t *space, const hsize_t *size);
H5_DLL herr_t H5S_set_extent_real(H5S_t *space, const hsize_t *size);
H5_DLL herr_t H5S_set_extent_simple(H5S_t *space, unsigned rank, const hsize_t *dims, const hsize_t *max);
H5_DLL H5S_t *H5S_create(H5S_class_t type);
-H5_DLL herr_t H5S_get_validated_dataspace(hid_t space_id, const H5S_t **space /*out*/);
+H5_DLL herr_t H5S_get_validated_dataspace(hid_t space_id, H5S_t **space /*out*/);
H5_DLL H5S_t *H5S_create_simple(unsigned rank, const hsize_t dims[/*rank*/], const hsize_t maxdims[/*rank*/]);
H5_DLL herr_t H5S_set_version(H5F_t *f, H5S_t *ds);
H5_DLL herr_t H5S_encode(H5S_t *obj, unsigned char **p, size_t *nalloc);
@@ -263,36 +263,35 @@ H5_DLL herr_t H5S_extent_copy(H5S_t *dst, const H5S_t *src);
/* Operations on selections */
H5_DLL herr_t H5S_select_deserialize(H5S_t **space, const uint8_t **p);
H5_DLL H5S_sel_type H5S_get_select_type(const H5S_t *space);
-H5_DLL herr_t H5S_select_iterate(void *buf, const H5T_t *type, const H5S_t *space,
- const H5S_sel_iter_op_t *op, void *op_data);
-H5_DLL herr_t H5S_select_fill(const void *fill, size_t fill_size, const H5S_t *space, void *buf);
-H5_DLL htri_t H5S_select_valid(const H5S_t *space);
-H5_DLL hsize_t H5S_get_select_npoints(const H5S_t *space);
-H5_DLL herr_t H5S_get_select_bounds(const H5S_t *space, hsize_t *start, hsize_t *end);
-H5_DLL herr_t H5S_get_select_offset(const H5S_t *space, hsize_t *offset);
-H5_DLL int H5S_get_select_unlim_dim(const H5S_t *space);
-H5_DLL herr_t H5S_get_select_num_elem_non_unlim(const H5S_t *space, hsize_t *num_elem_non_unlim);
-H5_DLL herr_t H5S_select_offset(H5S_t *space, const hssize_t *offset);
-H5_DLL herr_t H5S_select_copy(H5S_t *dst, const H5S_t *src, hbool_t share_selection);
-H5_DLL htri_t H5S_select_shape_same(const H5S_t *space1, const H5S_t *space2);
-H5_DLL htri_t H5S_select_intersect_block(const H5S_t *space, const hsize_t *start, const hsize_t *end);
-H5_DLL herr_t H5S_select_construct_projection(const H5S_t *base_space, H5S_t **new_space_ptr,
- unsigned new_space_rank, const void *buf,
- void const **adj_buf_ptr, hsize_t element_size);
-H5_DLL herr_t H5S_select_release(H5S_t *ds);
-H5_DLL hssize_t H5S_select_serial_size(const H5S_t *space);
-H5_DLL herr_t H5S_select_serialize(const H5S_t *space, uint8_t **p);
-H5_DLL htri_t H5S_select_is_contiguous(const H5S_t *space);
-H5_DLL htri_t H5S_select_is_single(const H5S_t *space);
-H5_DLL htri_t H5S_select_is_regular(const H5S_t *space);
-H5_DLL herr_t H5S_select_adjust_u(H5S_t *space, const hsize_t *offset);
-H5_DLL herr_t H5S_select_adjust_s(H5S_t *space, const hssize_t *offset);
-H5_DLL herr_t H5S_select_project_scalar(const H5S_t *space, hsize_t *offset);
-H5_DLL herr_t H5S_select_project_simple(const H5S_t *space, H5S_t *new_space, hsize_t *offset);
-H5_DLL herr_t H5S_select_project_intersection(const H5S_t *src_space, const H5S_t *dst_space,
- const H5S_t *src_intersect_space, H5S_t **new_space_ptr,
- hbool_t share_space);
-H5_DLL herr_t H5S_select_subtract(H5S_t *space, H5S_t *subtract_space);
+H5_DLL herr_t H5S_select_iterate(void *buf, const H5T_t *type, H5S_t *space, const H5S_sel_iter_op_t *op,
+ void *op_data);
+H5_DLL herr_t H5S_select_fill(const void *fill, size_t fill_size, H5S_t *space, void *buf);
+H5_DLL htri_t H5S_select_valid(const H5S_t *space);
+H5_DLL hsize_t H5S_get_select_npoints(const H5S_t *space);
+H5_DLL herr_t H5S_get_select_bounds(const H5S_t *space, hsize_t *start, hsize_t *end);
+H5_DLL herr_t H5S_get_select_offset(const H5S_t *space, hsize_t *offset);
+H5_DLL int H5S_get_select_unlim_dim(const H5S_t *space);
+H5_DLL herr_t H5S_get_select_num_elem_non_unlim(const H5S_t *space, hsize_t *num_elem_non_unlim);
+H5_DLL herr_t H5S_select_offset(H5S_t *space, const hssize_t *offset);
+H5_DLL herr_t H5S_select_copy(H5S_t *dst, const H5S_t *src, hbool_t share_selection);
+H5_DLL htri_t H5S_select_shape_same(H5S_t *space1, H5S_t *space2);
+H5_DLL htri_t H5S_select_intersect_block(H5S_t *space, const hsize_t *start, const hsize_t *end);
+H5_DLL herr_t H5S_select_construct_projection(H5S_t *base_space, H5S_t **new_space_ptr,
+ unsigned new_space_rank, hsize_t element_size,
+ ptrdiff_t *buf_adj);
+H5_DLL herr_t H5S_select_release(H5S_t *ds);
+H5_DLL hssize_t H5S_select_serial_size(H5S_t *space);
+H5_DLL herr_t H5S_select_serialize(H5S_t *space, uint8_t **p);
+H5_DLL htri_t H5S_select_is_contiguous(const H5S_t *space);
+H5_DLL htri_t H5S_select_is_single(const H5S_t *space);
+H5_DLL htri_t H5S_select_is_regular(H5S_t *space);
+H5_DLL herr_t H5S_select_adjust_u(H5S_t *space, const hsize_t *offset);
+H5_DLL herr_t H5S_select_adjust_s(H5S_t *space, const hssize_t *offset);
+H5_DLL herr_t H5S_select_project_scalar(const H5S_t *space, hsize_t *offset);
+H5_DLL herr_t H5S_select_project_simple(const H5S_t *space, H5S_t *new_space, hsize_t *offset);
+H5_DLL herr_t H5S_select_project_intersection(H5S_t *src_space, H5S_t *dst_space, H5S_t *src_intersect_space,
+ H5S_t **new_space_ptr, hbool_t share_space);
+H5_DLL herr_t H5S_select_subtract(H5S_t *space, H5S_t *subtract_space);
/* Operations on all selections */
H5_DLL herr_t H5S_select_all(H5S_t *space, hbool_t rel_prev);
@@ -321,8 +320,7 @@ H5_DLL H5S_t * H5S_hyper_get_unlim_block(const H5S_t *space, hsize_t block_index
H5_DLL hsize_t H5S_hyper_get_first_inc_block(const H5S_t *space, hsize_t clip_size, hbool_t *partial);
/* Operations on selection iterators */
-H5_DLL herr_t H5S_select_iter_init(H5S_sel_iter_t *iter, const H5S_t *space, size_t elmt_size,
- unsigned flags);
+H5_DLL herr_t H5S_select_iter_init(H5S_sel_iter_t *iter, H5S_t *space, size_t elmt_size, unsigned flags);
H5_DLL herr_t H5S_select_iter_coords(const H5S_sel_iter_t *sel_iter, hsize_t *coords);
H5_DLL hsize_t H5S_select_iter_nelmts(const H5S_sel_iter_t *sel_iter);
H5_DLL herr_t H5S_select_iter_next(H5S_sel_iter_t *sel_iter, size_t nelem);
@@ -332,7 +330,7 @@ H5_DLL herr_t H5S_select_iter_release(H5S_sel_iter_t *sel_iter);
H5_DLL herr_t H5S_sel_iter_close(H5S_sel_iter_t *sel_iter);
#ifdef H5_HAVE_PARALLEL
-H5_DLL herr_t H5S_mpio_space_type(const H5S_t *space, size_t elmt_size,
+H5_DLL herr_t H5S_mpio_space_type(H5S_t *space, size_t elmt_size,
/* out: */ MPI_Datatype *new_type, int *count, hbool_t *is_derived_type,
hbool_t do_permute, hsize_t **permute_map, hbool_t *is_permuted);
#endif /* H5_HAVE_PARALLEL */
diff --git a/src/H5Sselect.c b/src/H5Sselect.c
index e17cea8..1b4afd4 100644
--- a/src/H5Sselect.c
+++ b/src/H5Sselect.c
@@ -304,7 +304,7 @@ done:
*-------------------------------------------------------------------------
*/
hssize_t
-H5S_select_serial_size(const H5S_t *space)
+H5S_select_serial_size(H5S_t *space)
{
hssize_t ret_value = -1; /* Return value */
@@ -343,7 +343,7 @@ H5S_select_serial_size(const H5S_t *space)
REVISION LOG
--------------------------------------------------------------------------*/
herr_t
-H5S_select_serialize(const H5S_t *space, uint8_t **p)
+H5S_select_serialize(H5S_t *space, uint8_t **p)
{
herr_t ret_value = SUCCEED; /* Return value */
@@ -880,7 +880,7 @@ H5S_select_is_single(const H5S_t *space)
REVISION LOG
--------------------------------------------------------------------------*/
htri_t
-H5S_select_is_regular(const H5S_t *space)
+H5S_select_is_regular(H5S_t *space)
{
herr_t ret_value = FAIL; /* Return value */
@@ -1116,7 +1116,7 @@ H5S_select_project_simple(const H5S_t *space, H5S_t *new_space, hsize_t *offset)
in the dataspace's selection.
--------------------------------------------------------------------------*/
herr_t
-H5S_select_iter_init(H5S_sel_iter_t *sel_iter, const H5S_t *space, size_t elmt_size, unsigned flags)
+H5S_select_iter_init(H5S_sel_iter_t *sel_iter, H5S_t *space, size_t elmt_size, unsigned flags)
{
herr_t ret_value = FAIL; /* Return value */
@@ -1497,8 +1497,7 @@ H5S_select_iter_release(H5S_sel_iter_t *sel_iter)
the selection is not modified.
--------------------------------------------------------------------------*/
herr_t
-H5S_select_iterate(void *buf, const H5T_t *type, const H5S_t *space, const H5S_sel_iter_op_t *op,
- void *op_data)
+H5S_select_iterate(void *buf, const H5T_t *type, H5S_t *space, const H5S_sel_iter_op_t *op, void *op_data)
{
H5S_sel_iter_t *iter = NULL; /* Selection iteration info */
hbool_t iter_init = FALSE; /* Selection iteration info has been initialized */
@@ -1739,7 +1738,7 @@ H5S_get_select_type(const H5S_t *space)
REVISION LOG
--------------------------------------------------------------------------*/
htri_t
-H5S_select_shape_same(const H5S_t *space1, const H5S_t *space2)
+H5S_select_shape_same(H5S_t *space1, H5S_t *space2)
{
H5S_sel_iter_t *iter_a = NULL; /* Selection a iteration info */
H5S_sel_iter_t *iter_b = NULL; /* Selection b iteration info */
@@ -1760,8 +1759,8 @@ H5S_select_shape_same(const H5S_t *space1, const H5S_t *space2)
/* Check special cases if both dataspaces aren't scalar */
/* (If only one is, the number of selected points check is sufficient) */
if (space1->extent.rank > 0 && space2->extent.rank > 0) {
- const H5S_t *space_a; /* Dataspace with larger rank */
- const H5S_t *space_b; /* Dataspace with smaller rank */
+ H5S_t * space_a; /* Dataspace with larger rank */
+ H5S_t * space_b; /* Dataspace with smaller rank */
unsigned space_a_rank; /* Number of dimensions of dataspace A */
unsigned space_b_rank; /* Number of dimensions of dataspace B */
int space_a_dim; /* Current dimension in dataspace A */
@@ -2063,7 +2062,7 @@ done:
don't call it directly, use the appropriate macro defined in H5Sprivate.h.
--------------------------------------------------------------------------*/
htri_t
-H5S_select_intersect_block(const H5S_t *space, const hsize_t *start, const hsize_t *end)
+H5S_select_intersect_block(H5S_t *space, const hsize_t *start, const hsize_t *end)
{
htri_t ret_value = TRUE; /* Return value */
@@ -2171,27 +2170,24 @@ done:
Note that if m > n, it is possible that the starting point in the
buffer associated with the memory dataspace will have to be
- adjusted to match the projected dataspace. If the buf parameter
- is not NULL, the function must return an adjusted buffer base
- address in *adj_buf_ptr.
+ adjusted to match the projected dataspace. In this case, the amount
+ of adjustment to be applied to the buffer will be returned via the
+ buf_adj parameter, if supplied.
USAGE
htri_t H5S_select_construct_projection(base_space,
new_space_ptr,
new_space_rank,
- buf,
- adj_buf_ptr)
+ element_size,
+ buf_adj)
const H5S_t *base_space; IN: Ptr to Dataspace to project
H5S_t ** new_space_ptr; OUT: Ptr to location in which to return
the address of the projected space
int new_space_rank; IN: Rank of the projected space.
- const void * buf; IN: Base address of the buffer
- associated with the base space.
- May be NULL.
- void ** adj_buf_ptr; OUT: If buf != NULL, store the base
- address of the section of buf
- that is described by *new_space_ptr
- in *adj_buf_ptr.
+ hsize_t element_size; IN: size of each element in the selection
+ ptrdiff_t buf_adj; OUT: amount of adjustment to be applied
+ to buffer associated with memory
+ dataspace
RETURNS
Non-negative on success/Negative on failure.
@@ -2201,9 +2197,6 @@ done:
projection of the supplied dataspace and associated selection into
the specified rank. Return it in *new_space_ptr.
- If buf is supplied, computes the base address of the projected
- selection in buf, and stores the base address in *adj_buf_ptr.
-
GLOBAL VARIABLES
COMMENTS, BUGS, ASSUMPTIONS
The selection in the supplied base_space has thickness 1 in all
@@ -2214,8 +2207,8 @@ done:
REVISION LOG
--------------------------------------------------------------------------*/
herr_t
-H5S_select_construct_projection(const H5S_t *base_space, H5S_t **new_space_ptr, unsigned new_space_rank,
- const void *buf, void const **adj_buf_ptr, hsize_t element_size)
+H5S_select_construct_projection(H5S_t *base_space, H5S_t **new_space_ptr, unsigned new_space_rank,
+ hsize_t element_size, ptrdiff_t *buf_adj)
{
H5S_t * new_space = NULL; /* New dataspace constructed */
hsize_t base_space_dims[H5S_MAX_RANK]; /* Current dimensions of base dataspace */
@@ -2234,7 +2227,6 @@ H5S_select_construct_projection(const H5S_t *base_space, H5S_t **new_space_ptr,
HDassert(new_space_ptr != NULL);
HDassert((new_space_rank != 0) || (H5S_GET_SELECT_NPOINTS(base_space) <= 1));
HDassert(new_space_rank <= H5S_MAX_RANK);
- HDassert((buf == NULL) || (adj_buf_ptr != NULL));
HDassert(element_size > 0);
/* Get the extent info for the base dataspace */
@@ -2397,26 +2389,15 @@ H5S_select_construct_projection(const H5S_t *base_space, H5S_t **new_space_ptr,
/* load the address of the new space into *new_space_ptr */
*new_space_ptr = new_space;
- /* now adjust the buffer if required */
- if (buf != NULL) {
+ /* return the buffer adjustment amount if required */
+ if (buf_adj != NULL) {
if (new_space_rank < base_space_rank) {
- /* a bit of pointer magic here:
- *
- * Since we can't do pointer arithmetic on void pointers, we first
- * cast buf to a pointer to byte -- i.e. uint8_t.
- *
- * We then multiply the projected space element offset we
- * calculated earlier by the supplied element size, add this
- * value to the type cast buf pointer, cast the result back
- * to a pointer to void, and assign the result to *adj_buf_ptr.
- */
- *adj_buf_ptr = (const void *)(((const uint8_t *)buf) +
- ((size_t)(projected_space_element_offset * element_size)));
- } /* end if */
+ *buf_adj = (ptrdiff_t)(projected_space_element_offset * element_size);
+ }
else
/* No adjustment necessary */
- *adj_buf_ptr = buf;
- } /* end if */
+ *buf_adj = 0;
+ }
done:
/* Cleanup on error */
@@ -2452,7 +2433,7 @@ done:
REVISION LOG
--------------------------------------------------------------------------*/
herr_t
-H5S_select_fill(const void *fill, size_t fill_size, const H5S_t *space, void *_buf)
+H5S_select_fill(const void *fill, size_t fill_size, H5S_t *space, void *_buf)
{
H5S_sel_iter_t *iter = NULL; /* Selection iteration info */
hbool_t iter_init = FALSE; /* Selection iteration info has been initialized */
@@ -2568,9 +2549,8 @@ to share structures inside dst_space with proj_space
REVISION LOG
--------------------------------------------------------------------------*/
herr_t
-H5S_select_project_intersection(const H5S_t *src_space, const H5S_t *dst_space,
- const H5S_t *src_intersect_space, H5S_t **new_space_ptr,
- hbool_t share_selection)
+H5S_select_project_intersection(H5S_t *src_space, H5S_t *dst_space, H5S_t *src_intersect_space,
+ H5S_t **new_space_ptr, hbool_t share_selection)
{
H5S_t * new_space = NULL; /* New dataspace constructed */
H5S_t * tmp_src_intersect_space = NULL; /* Temporary SIS converted from points->hyperslabs */
diff --git a/src/H5T.c b/src/H5T.c
index 3185774..48c6b43 100644
--- a/src/H5T.c
+++ b/src/H5T.c
@@ -5354,7 +5354,7 @@ done:
*-------------------------------------------------------------------------
*/
H5G_name_t *
-H5T_nameof(const H5T_t *dt)
+H5T_nameof(H5T_t *dt)
{
H5G_name_t *ret_value = NULL;
diff --git a/src/H5Tconv.c b/src/H5Tconv.c
index ae942e6..1e9b9bc 100644
--- a/src/H5Tconv.c
+++ b/src/H5Tconv.c
@@ -3251,9 +3251,10 @@ H5T__conv_vlen(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, si
/* If we're down to the last few elements, just wrap up */
/* with a "real" reverse copy */
if (safe < 2) {
- s = (uint8_t *)buf + (nelmts - 1) * (size_t)s_stride;
- d = (uint8_t *)buf + (nelmts - 1) * (size_t)d_stride;
- b = (uint8_t *)bkg + (nelmts - 1) * (size_t)b_stride;
+ s = (uint8_t *)buf + (nelmts - 1) * (size_t)s_stride;
+ d = (uint8_t *)buf + (nelmts - 1) * (size_t)d_stride;
+ if (bkg)
+ b = (uint8_t *)bkg + (nelmts - 1) * (size_t)b_stride;
s_stride = -s_stride;
d_stride = -d_stride;
b_stride = -b_stride;
@@ -3263,7 +3264,8 @@ H5T__conv_vlen(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, si
else {
s = (uint8_t *)buf + (nelmts - safe) * (size_t)s_stride;
d = (uint8_t *)buf + (nelmts - safe) * (size_t)d_stride;
- b = (uint8_t *)bkg + (nelmts - safe) * (size_t)b_stride;
+ if (bkg)
+ b = (uint8_t *)bkg + (nelmts - safe) * (size_t)b_stride;
} /* end else */
} /* end if */
else {
@@ -3390,7 +3392,7 @@ H5T__conv_vlen(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, si
/* TMP_P is reset each time in the loop because DST_BASE_SIZE may include some
* data in addition to VL info. - SLU */
for (u = seq_len; u < bg_seq_len; u++) {
- tmp = (uint8_t *)tmp_buf + u * dst_base_size;
+ tmp = (const uint8_t *)tmp_buf + u * dst_base_size;
UINT32DECODE(tmp, parent_seq_len);
if (parent_seq_len > 0) {
H5F_addr_decode(dst->shared->u.vlen.f, &tmp, &(parent_hobjid.addr));
@@ -3407,7 +3409,9 @@ H5T__conv_vlen(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, si
/* Advance pointers */
s += s_stride;
d += d_stride;
- b += b_stride;
+
+ if (b)
+ b += b_stride;
} /* end for */
/* Decrement number of elements left to convert */
diff --git a/src/H5Tprivate.h b/src/H5Tprivate.h
index aae0774..aadead5 100644
--- a/src/H5Tprivate.h
+++ b/src/H5Tprivate.h
@@ -115,7 +115,7 @@ H5_DLL herr_t H5T_encode(H5T_t *obj, unsigned char *buf, size_t *nalloc);
H5_DLL H5T_t * H5T_decode(size_t buf_size, const unsigned char *buf);
H5_DLL herr_t H5T_debug(const H5T_t *dt, FILE *stream);
H5_DLL struct H5O_loc_t *H5T_oloc(H5T_t *dt);
-H5_DLL H5G_name_t *H5T_nameof(const H5T_t *dt);
+H5_DLL H5G_name_t *H5T_nameof(H5T_t *dt);
H5_DLL htri_t H5T_is_immutable(const H5T_t *dt);
H5_DLL htri_t H5T_is_named(const H5T_t *dt);
H5_DLL herr_t H5T_convert_committed_datatype(H5T_t *dt, H5F_t *f);
diff --git a/src/H5trace.c b/src/H5trace.c
index 1565a86..6eff40c 100644
--- a/src/H5trace.c
+++ b/src/H5trace.c
@@ -117,8 +117,8 @@ H5_trace(const double *returning, const char *func, const char *type, ...)
void * vp = NULL;
FILE * out = H5_debug_g.trace;
static hbool_t is_first_invocation = TRUE;
- H5_timer_t function_timer = {{0}, {0}, {0}, FALSE};
- H5_timevals_t function_times;
+ H5_timer_t function_timer;
+ H5_timevals_t function_times = {0.0, 0.0, 0.0};
static H5_timer_t running_timer;
H5_timevals_t running_times;
static int current_depth = 0;
@@ -130,6 +130,10 @@ H5_trace(const double *returning, const char *func, const char *type, ...)
return 0.0F; /*tracing is off*/
HDva_start(ap, type);
+ /* Initialize the timer for this function */
+ if (H5_debug_g.ttimes)
+ H5_timer_init(&function_timer);
+
if (H5_debug_g.ttop) {
if (returning) {
if (current_depth > 1) {
@@ -153,11 +157,10 @@ H5_trace(const double *returning, const char *func, const char *type, ...)
H5_timer_init(&running_timer);
H5_timer_start(&running_timer);
} /* end if */
- if (H5_debug_g.ttimes) {
- /* start the timer for this function */
- H5_timer_init(&function_timer);
+
+ /* Start the timer for this function */
+ if (H5_debug_g.ttimes)
H5_timer_start(&function_timer);
- } /* end if */
/* Print the first part of the line. This is the indication of the
* nesting depth followed by the function name and either start of
diff --git a/test/cache.c b/test/cache.c
index 7f5ffc0..5cd0a10 100644
--- a/test/cache.c
+++ b/test/cache.c
@@ -123,6 +123,21 @@ struct move_entry_test_spec {
hbool_t is_protected;
};
+struct pinned_single_entry_test_spec {
+ int test_num;
+ int entry_type;
+ int entry_idx;
+ hbool_t dirty_flag;
+ hbool_t mark_dirty;
+ hbool_t pop_mark_dirty_prot;
+ hbool_t pop_mark_dirty_pinned;
+ hbool_t unprotect_unpin;
+ unsigned int flags;
+ unsigned int flush_flags;
+ hbool_t expected_serialized;
+ hbool_t expected_destroyed;
+};
+
/* private function declarations: */
static unsigned smoke_check_1(int express_test, unsigned paged);
@@ -4814,7 +4829,11 @@ check_flush_cache__pe_multi_entry_test(H5F_t *file_ptr, int test_num, unsigned i
static void
check_flush_cache__flush_ops(H5F_t *file_ptr)
{
- H5C_t *cache_ptr = file_ptr->shared->cache;
+ const int max_num_spec = 10;
+ const int max_num_check = 4;
+ struct fo_flush_cache_test_spec *spec = NULL;
+ struct fo_flush_entry_check * checks = NULL;
+ H5C_t * cache_ptr = file_ptr->shared->cache;
if (cache_ptr == NULL) {
@@ -4827,85 +4846,105 @@ check_flush_cache__flush_ops(H5F_t *file_ptr)
failure_mssg = "cache not empty at beginning of flush ops test.";
}
+ spec = HDmalloc((size_t)max_num_spec * sizeof(struct fo_flush_cache_test_spec));
+ if (spec == NULL) {
+
+ pass = FALSE;
+ failure_mssg = "couldn't allocate flush ops test spec array";
+ }
+
+ checks = HDmalloc((size_t)max_num_check * sizeof(struct fo_flush_entry_check));
+ if (checks == NULL) {
+
+ pass = FALSE;
+ failure_mssg = "couldn't allocate flush ops test check array";
+ }
+
if (pass) /* test #1 */
{
/* start with a very simple test, in which there are two entries
* resident in cache, and the second entry dirties the first in
* the flush callback. No size changes, and no flush flags.
*/
- int test_num = 1;
- unsigned int flush_flags = H5C__NO_FLAGS_SET;
- int spec_size = 2;
- unsigned init_expected_index_len = 2;
- size_t init_expected_index_size = 2 * PICO_ENTRY_SIZE;
- unsigned expected_index_len = 2;
- size_t expected_index_size = 2 * PICO_ENTRY_SIZE;
- struct fo_flush_cache_test_spec spec[2] = {
- {/* entry_num = */ 0,
- /* entry_type = */ 0,
- /* entry_index = */ 0,
- /* insert_flag = */ FALSE,
- /* flags = */ H5C__NO_FLAGS_SET,
- /* resize_flag = */ FALSE,
- /* new_size = */ 0,
- /* num_pins = */ 0,
- /* pin_type = */ {0, 0, 0, 0, 0, 0, 0, 0},
- /* pin_idx = */ {0, 0, 0, 0, 0, 0, 0, 0},
- /* num_flush_ops = */ 0,
- /* flush_ops = */
- /* op_code: type: idx: flag: size: order_ptr: */
- {{FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL}},
- /* expected_deserialized = */ TRUE,
- /* expected_serialized = */ TRUE,
- /* expected_destroyed = */ FALSE},
- {/* entry_num = */ 1,
- /* entry_type = */ 0,
- /* entry_index = */ 1,
- /* insert_flag = */ FALSE,
- /* flags = */ H5C__DIRTIED_FLAG,
- /* resize_flag = */ FALSE,
- /* new_size = */ 0,
- /* num_pins = */ 0,
- /* pin_type = */ {0, 0, 0, 0, 0, 0, 0, 0},
- /* pin_idx = */ {0, 0, 0, 0, 0, 0, 0, 0},
- /* num_flush_ops = */ 1,
- /* flush_ops = */
- /* op_code: type: idx: flag: size: order_ptr: */
- {{FLUSH_OP__DIRTY, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL}},
- /* expected_deserialized = */ TRUE,
- /* expected_serialized = */ TRUE,
- /* expected_destroyed = */ FALSE}};
- int check_size = 0;
- struct fo_flush_entry_check checks[1] = {{/* entry_num = */ 0,
+ int test_num = 1;
+ unsigned int flush_flags = H5C__NO_FLAGS_SET;
+ int spec_size = 2;
+ int check_size = 0;
+ unsigned init_expected_index_len = 2;
+ size_t init_expected_index_size = 2 * PICO_ENTRY_SIZE;
+ unsigned expected_index_len = 2;
+ size_t expected_index_size = 2 * PICO_ENTRY_SIZE;
+
+ HDassert(spec_size <= max_num_spec);
+ HDassert(check_size <= max_num_check);
+
+ spec[0] = (struct fo_flush_cache_test_spec){
+ /* entry_num = */ 0,
+ /* entry_type = */ 0,
+ /* entry_index = */ 0,
+ /* insert_flag = */ FALSE,
+ /* flags = */ H5C__NO_FLAGS_SET,
+ /* resize_flag = */ FALSE,
+ /* new_size = */ 0,
+ /* num_pins = */ 0,
+ /* pin_type = */ {0, 0, 0, 0, 0, 0, 0, 0},
+ /* pin_idx = */ {0, 0, 0, 0, 0, 0, 0, 0},
+ /* num_flush_ops = */ 0,
+ /* flush_ops = */
+ /* op_code: type: idx: flag: size: order_ptr: */
+ {{FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL}},
+ /* expected_deserialized = */ TRUE,
+ /* expected_serialized = */ TRUE,
+ /* expected_destroyed = */ FALSE};
+ spec[1] = (struct fo_flush_cache_test_spec){
+ /* entry_num = */ 1,
+ /* entry_type = */ 0,
+ /* entry_index = */ 1,
+ /* insert_flag = */ FALSE,
+ /* flags = */ H5C__DIRTIED_FLAG,
+ /* resize_flag = */ FALSE,
+ /* new_size = */ 0,
+ /* num_pins = */ 0,
+ /* pin_type = */ {0, 0, 0, 0, 0, 0, 0, 0},
+ /* pin_idx = */ {0, 0, 0, 0, 0, 0, 0, 0},
+ /* num_flush_ops = */ 1,
+ /* flush_ops = */
+ /* op_code: type: idx: flag: size: order_ptr: */
+ {{FLUSH_OP__DIRTY, 0, 0, FALSE, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL}},
+ /* expected_deserialized = */ TRUE,
+ /* expected_serialized = */ TRUE,
+ /* expected_destroyed = */ FALSE};
+
+ checks[0] = (struct fo_flush_entry_check){/* entry_num = */ 0,
/* entry_type = */ 0,
/* entry_index = */ 0,
/* expected_size = */ (size_t)0,
/* in_cache = */ FALSE,
/* at_main_addr = */ FALSE,
- /* is_dirty = */ FALSE,
+ /* is_dirty = */ FALSE,
/* is_protected = */ FALSE,
/* is_pinned = */ FALSE,
/* expected_deserialized = */ FALSE,
/* expected_serialized = */ FALSE,
- /* expected_destroyed = */ FALSE}};
+ /* expected_destroyed = */ FALSE};
check_flush_cache__flush_op_test(file_ptr, test_num, flush_flags, spec_size, spec,
init_expected_index_len, init_expected_index_size,
@@ -4921,79 +4960,85 @@ check_flush_cache__flush_ops(H5F_t *file_ptr)
* Create two entries resident in cache, and have the second entry
* dirty the first in the flush callback.
*/
- int test_num = 2;
- unsigned int flush_flags = H5C__FLUSH_INVALIDATE_FLAG;
- int spec_size = 2;
- unsigned init_expected_index_len = 2;
- size_t init_expected_index_size = 2 * PICO_ENTRY_SIZE;
- unsigned expected_index_len = 0;
- size_t expected_index_size = 0;
- struct fo_flush_cache_test_spec spec[2] = {
- {/* entry_num = */ 0,
- /* entry_type = */ PICO_ENTRY_TYPE,
- /* entry_index = */ 0,
- /* insert_flag = */ FALSE,
- /* flags = */ H5C__NO_FLAGS_SET,
- /* resize_flag = */ FALSE,
- /* new_size = */ 0,
- /* num_pins = */ 0,
- /* pin_type = */ {0, 0, 0, 0, 0, 0, 0, 0},
- /* pin_idx = */ {0, 0, 0, 0, 0, 0, 0, 0},
- /* num_flush_ops = */ 0,
- /* flush_ops = */
- /* op_code: type: idx: flag: size: order_ptr: */
- {{FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL}},
- /* expected_deserialized = */ TRUE,
- /* expected_serialized = */ TRUE,
- /* expected_destroyed = */ TRUE},
- {/* entry_num = */ 1,
- /* entry_type = */ PICO_ENTRY_TYPE,
- /* entry_index = */ 1,
- /* insert_flag = */ FALSE,
- /* flags = */ H5C__DIRTIED_FLAG,
- /* resize_flag = */ FALSE,
- /* new_size = */ 0,
- /* num_pins = */ 0,
- /* pin_type = */ {0, 0, 0, 0, 0, 0, 0, 0},
- /* pin_idx = */ {0, 0, 0, 0, 0, 0, 0, 0},
- /* num_flush_ops = */ 1,
- /* flush_ops = */
- /* op_code: type: idx: flag: size: order_ptr*/
- {{FLUSH_OP__DIRTY, PICO_ENTRY_TYPE, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL}},
- /* expected_deserialized = */ TRUE,
- /* expected_serialized = */ TRUE,
- /* expected_destroyed = */ TRUE}};
- int check_size = 0;
- struct fo_flush_entry_check checks[1] = {{/* entry_num = */ 0,
+ int test_num = 2;
+ unsigned int flush_flags = H5C__FLUSH_INVALIDATE_FLAG;
+ int spec_size = 2;
+ int check_size = 0;
+ unsigned init_expected_index_len = 2;
+ size_t init_expected_index_size = 2 * PICO_ENTRY_SIZE;
+ unsigned expected_index_len = 0;
+ size_t expected_index_size = 0;
+
+ HDassert(spec_size <= max_num_spec);
+ HDassert(check_size <= max_num_check);
+
+ spec[0] = (struct fo_flush_cache_test_spec){
+ /* entry_num = */ 0,
+ /* entry_type = */ PICO_ENTRY_TYPE,
+ /* entry_index = */ 0,
+ /* insert_flag = */ FALSE,
+ /* flags = */ H5C__NO_FLAGS_SET,
+ /* resize_flag = */ FALSE,
+ /* new_size = */ 0,
+ /* num_pins = */ 0,
+ /* pin_type = */ {0, 0, 0, 0, 0, 0, 0, 0},
+ /* pin_idx = */ {0, 0, 0, 0, 0, 0, 0, 0},
+ /* num_flush_ops = */ 0,
+ /* flush_ops = */
+ /* op_code: type: idx: flag: size: order_ptr: */
+ {{FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL}},
+ /* expected_deserialized = */ TRUE,
+ /* expected_serialized = */ TRUE,
+ /* expected_destroyed = */ TRUE};
+ spec[1] = (struct fo_flush_cache_test_spec){
+ /* entry_num = */ 1,
+ /* entry_type = */ PICO_ENTRY_TYPE,
+ /* entry_index = */ 1,
+ /* insert_flag = */ FALSE,
+ /* flags = */ H5C__DIRTIED_FLAG,
+ /* resize_flag = */ FALSE,
+ /* new_size = */ 0,
+ /* num_pins = */ 0,
+ /* pin_type = */ {0, 0, 0, 0, 0, 0, 0, 0},
+ /* pin_idx = */ {0, 0, 0, 0, 0, 0, 0, 0},
+ /* num_flush_ops = */ 1,
+ /* flush_ops = */
+ /* op_code: type: idx: flag: size: order_ptr*/
+ {{FLUSH_OP__DIRTY, PICO_ENTRY_TYPE, 0, FALSE, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL}},
+ /* expected_deserialized = */ TRUE,
+ /* expected_serialized = */ TRUE,
+ /* expected_destroyed = */ TRUE};
+
+ checks[0] = (struct fo_flush_entry_check){/* entry_num = */ 0,
/* entry_type = */ 0,
/* entry_index = */ 0,
/* expected_size = */ (size_t)0,
/* in_cache = */ FALSE,
/* at_main_addr = */ FALSE,
- /* is_dirty = */ FALSE,
+ /* is_dirty = */ FALSE,
/* is_protected = */ FALSE,
/* is_pinned = */ FALSE,
/* expected_deserialized = */ FALSE,
/* expected_serialized = */ FALSE,
- /* expected_destroyed = */ FALSE}};
+ /* expected_destroyed = */ FALSE};
check_flush_cache__flush_op_test(file_ptr, test_num, flush_flags, spec_size, spec,
init_expected_index_len, init_expected_index_size,
@@ -5006,53 +5051,58 @@ check_flush_cache__flush_ops(H5F_t *file_ptr)
* which the call back function resizes the entry for which it has
* been called.
*/
- int test_num = 3;
- unsigned int flush_flags = H5C__NO_FLAGS_SET;
- int spec_size = 1;
- unsigned init_expected_index_len = 1;
- size_t init_expected_index_size = VARIABLE_ENTRY_SIZE / 4;
- unsigned expected_index_len = 1;
- size_t expected_index_size = VARIABLE_ENTRY_SIZE / 2;
- struct fo_flush_cache_test_spec spec[1] = {
- {/* entry_num = */ 0,
- /* entry_type = */ VARIABLE_ENTRY_TYPE,
- /* entry_index = */ 0,
- /* insert_flag = */ FALSE,
- /* flags = */ H5C__DIRTIED_FLAG,
- /* resize_flag = */ TRUE,
- /* new_size = */ VARIABLE_ENTRY_SIZE / 4,
- /* num_pins = */ 0,
- /* pin_type = */ {0, 0, 0, 0, 0, 0, 0, 0},
- /* pin_idx = */ {0, 0, 0, 0, 0, 0, 0, 0},
- /* num_flush_ops = */ 1,
- /* flush_ops = */
- /* op_code: type: idx: flag: size: order_ptr:*/
- {{FLUSH_OP__RESIZE, VARIABLE_ENTRY_TYPE, 0, FALSE, VARIABLE_ENTRY_SIZE / 2, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL}},
- /* expected_deserialized = */ TRUE,
- /* expected_serialized = */ TRUE,
- /* expected_destroyed = */ FALSE}};
- int check_size = 0;
- struct fo_flush_entry_check checks[1] = {{/* entry_num = */ 0,
+ int test_num = 3;
+ unsigned int flush_flags = H5C__NO_FLAGS_SET;
+ int spec_size = 1;
+ int check_size = 0;
+ unsigned init_expected_index_len = 1;
+ size_t init_expected_index_size = VARIABLE_ENTRY_SIZE / 4;
+ unsigned expected_index_len = 1;
+ size_t expected_index_size = VARIABLE_ENTRY_SIZE / 2;
+
+ HDassert(spec_size <= max_num_spec);
+ HDassert(check_size <= max_num_check);
+
+ spec[0] = (struct fo_flush_cache_test_spec){
+ /* entry_num = */ 0,
+ /* entry_type = */ VARIABLE_ENTRY_TYPE,
+ /* entry_index = */ 0,
+ /* insert_flag = */ FALSE,
+ /* flags = */ H5C__DIRTIED_FLAG,
+ /* resize_flag = */ TRUE,
+ /* new_size = */ VARIABLE_ENTRY_SIZE / 4,
+ /* num_pins = */ 0,
+ /* pin_type = */ {0, 0, 0, 0, 0, 0, 0, 0},
+ /* pin_idx = */ {0, 0, 0, 0, 0, 0, 0, 0},
+ /* num_flush_ops = */ 1,
+ /* flush_ops = */
+ /* op_code: type: idx: flag: size: order_ptr:*/
+ {{FLUSH_OP__RESIZE, VARIABLE_ENTRY_TYPE, 0, FALSE, VARIABLE_ENTRY_SIZE / 2, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL}},
+ /* expected_deserialized = */ TRUE,
+ /* expected_serialized = */ TRUE,
+ /* expected_destroyed = */ FALSE};
+
+ checks[0] = (struct fo_flush_entry_check){/* entry_num = */ 0,
/* entry_type = */ 0,
/* entry_index = */ 0,
/* expected_size = */ (size_t)0,
/* in_cache = */ FALSE,
/* at_main_addr = */ FALSE,
- /* is_dirty = */ FALSE,
+ /* is_dirty = */ FALSE,
/* is_protected = */ FALSE,
/* is_pinned = */ FALSE,
/* expected_deserialized = */ FALSE,
/* expected_serialized = */ FALSE,
- /* expected_destroyed = */ FALSE}};
+ /* expected_destroyed = */ FALSE};
check_flush_cache__flush_op_test(file_ptr, test_num, flush_flags, spec_size, spec,
init_expected_index_len, init_expected_index_size,
@@ -5067,53 +5117,58 @@ check_flush_cache__flush_ops(H5F_t *file_ptr)
* which the call back function resizes the entry for which it has
* been called.
*/
- int test_num = 4;
- unsigned int flush_flags = H5C__FLUSH_INVALIDATE_FLAG;
- int spec_size = 1;
- unsigned init_expected_index_len = 1;
- size_t init_expected_index_size = VARIABLE_ENTRY_SIZE / 4;
- unsigned expected_index_len = 0;
- size_t expected_index_size = 0;
- struct fo_flush_cache_test_spec spec[1] = {
- {/* entry_num = */ 0,
- /* entry_type = */ VARIABLE_ENTRY_TYPE,
- /* entry_index = */ 0,
- /* insert_flag = */ FALSE,
- /* flags = */ H5C__DIRTIED_FLAG,
- /* resize_flag = */ TRUE,
- /* new_size = */ VARIABLE_ENTRY_SIZE / 4,
- /* num_pins = */ 0,
- /* pin_type = */ {0, 0, 0, 0, 0, 0, 0, 0},
- /* pin_idx = */ {0, 0, 0, 0, 0, 0, 0, 0},
- /* num_flush_ops = */ 1,
- /* flush_ops = */
- /* op_code: type: idx: flag: size: order_ptr: */
- {{FLUSH_OP__RESIZE, VARIABLE_ENTRY_TYPE, 0, FALSE, VARIABLE_ENTRY_SIZE / 2, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL}},
- /* expected_deserialized = */ TRUE,
- /* expected_serialized = */ TRUE,
- /* expected_destroyed = */ TRUE}};
- int check_size = 0;
- struct fo_flush_entry_check checks[1] = {{/* entry_num = */ 0,
+ int test_num = 4;
+ unsigned int flush_flags = H5C__FLUSH_INVALIDATE_FLAG;
+ int spec_size = 1;
+ int check_size = 0;
+ unsigned init_expected_index_len = 1;
+ size_t init_expected_index_size = VARIABLE_ENTRY_SIZE / 4;
+ unsigned expected_index_len = 0;
+ size_t expected_index_size = 0;
+
+ HDassert(spec_size <= max_num_spec);
+ HDassert(check_size <= max_num_check);
+
+ spec[0] = (struct fo_flush_cache_test_spec){
+ /* entry_num = */ 0,
+ /* entry_type = */ VARIABLE_ENTRY_TYPE,
+ /* entry_index = */ 0,
+ /* insert_flag = */ FALSE,
+ /* flags = */ H5C__DIRTIED_FLAG,
+ /* resize_flag = */ TRUE,
+ /* new_size = */ VARIABLE_ENTRY_SIZE / 4,
+ /* num_pins = */ 0,
+ /* pin_type = */ {0, 0, 0, 0, 0, 0, 0, 0},
+ /* pin_idx = */ {0, 0, 0, 0, 0, 0, 0, 0},
+ /* num_flush_ops = */ 1,
+ /* flush_ops = */
+ /* op_code: type: idx: flag: size: order_ptr: */
+ {{FLUSH_OP__RESIZE, VARIABLE_ENTRY_TYPE, 0, FALSE, VARIABLE_ENTRY_SIZE / 2, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL}},
+ /* expected_deserialized = */ TRUE,
+ /* expected_serialized = */ TRUE,
+ /* expected_destroyed = */ TRUE};
+
+ checks[0] = (struct fo_flush_entry_check){/* entry_num = */ 0,
/* entry_type = */ 0,
/* entry_index = */ 0,
/* expected_size = */ (size_t)0,
/* in_cache = */ FALSE,
/* at_main_addr = */ FALSE,
- /* is_dirty = */ FALSE,
+ /* is_dirty = */ FALSE,
/* is_protected = */ FALSE,
/* is_pinned = */ FALSE,
/* expected_deserialized = */ FALSE,
/* expected_serialized = */ FALSE,
- /* expected_destroyed = */ FALSE}};
+ /* expected_destroyed = */ FALSE};
check_flush_cache__flush_op_test(file_ptr, test_num, flush_flags, spec_size, spec,
init_expected_index_len, init_expected_index_size,
@@ -5135,53 +5190,58 @@ check_flush_cache__flush_ops(H5F_t *file_ptr)
* be accompanied by a resize. Note that as a result, this
* test becomes redundant with later tests.
*/
- int test_num = 5; /* and 6 */
- unsigned int flush_flags = H5C__NO_FLAGS_SET;
- int spec_size = 1;
- unsigned init_expected_index_len = 1;
- size_t init_expected_index_size = VARIABLE_ENTRY_SIZE;
- unsigned expected_index_len = 1;
- size_t expected_index_size = VARIABLE_ENTRY_SIZE / 2;
- struct fo_flush_cache_test_spec spec[1] = {
- {/* entry_num = */ 0,
- /* entry_type = */ VARIABLE_ENTRY_TYPE,
- /* entry_index = */ 0,
- /* insert_flag = */ FALSE,
- /* flags = */ H5C__DIRTIED_FLAG,
- /* resize_flag = */ FALSE,
- /* new_size = */ 0,
- /* num_pins = */ 0,
- /* pin_type = */ {0, 0, 0, 0, 0, 0, 0, 0},
- /* pin_idx = */ {0, 0, 0, 0, 0, 0, 0, 0},
- /* num_flush_ops = */ 2,
- /* flush_ops = */
- /* op_code: type: idx: flag: size: order_ptr: */
- {{FLUSH_OP__RESIZE, VARIABLE_ENTRY_TYPE, 0, FALSE, VARIABLE_ENTRY_SIZE / 2, NULL},
- {FLUSH_OP__MOVE, VARIABLE_ENTRY_TYPE, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL}},
- /* expected_deserialized = */ TRUE,
- /* expected_serialized = */ TRUE,
- /* expected_destroyed = */ FALSE}};
- int check_size = 0;
- struct fo_flush_entry_check checks[1] = {{/* entry_num = */ 0,
+ int test_num = 5; /* and 6 */
+ unsigned int flush_flags = H5C__NO_FLAGS_SET;
+ int spec_size = 1;
+ int check_size = 0;
+ unsigned init_expected_index_len = 1;
+ size_t init_expected_index_size = VARIABLE_ENTRY_SIZE;
+ unsigned expected_index_len = 1;
+ size_t expected_index_size = VARIABLE_ENTRY_SIZE / 2;
+
+ HDassert(spec_size <= max_num_spec);
+ HDassert(check_size <= max_num_check);
+
+ spec[0] = (struct fo_flush_cache_test_spec){
+ /* entry_num = */ 0,
+ /* entry_type = */ VARIABLE_ENTRY_TYPE,
+ /* entry_index = */ 0,
+ /* insert_flag = */ FALSE,
+ /* flags = */ H5C__DIRTIED_FLAG,
+ /* resize_flag = */ FALSE,
+ /* new_size = */ 0,
+ /* num_pins = */ 0,
+ /* pin_type = */ {0, 0, 0, 0, 0, 0, 0, 0},
+ /* pin_idx = */ {0, 0, 0, 0, 0, 0, 0, 0},
+ /* num_flush_ops = */ 2,
+ /* flush_ops = */
+ /* op_code: type: idx: flag: size: order_ptr: */
+ {{FLUSH_OP__RESIZE, VARIABLE_ENTRY_TYPE, 0, FALSE, VARIABLE_ENTRY_SIZE / 2, NULL},
+ {FLUSH_OP__MOVE, VARIABLE_ENTRY_TYPE, 0, FALSE, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL}},
+ /* expected_deserialized = */ TRUE,
+ /* expected_serialized = */ TRUE,
+ /* expected_destroyed = */ FALSE};
+
+ checks[0] = (struct fo_flush_entry_check){/* entry_num = */ 0,
/* entry_type = */ 0,
/* entry_index = */ 0,
/* expected_size = */ (size_t)0,
/* in_cache = */ FALSE,
/* at_main_addr = */ FALSE,
- /* is_dirty = */ FALSE,
+ /* is_dirty = */ FALSE,
/* is_protected = */ FALSE,
/* is_pinned = */ FALSE,
/* expected_deserialized = */ FALSE,
/* expected_serialized = */ FALSE,
- /* expected_destroyed = */ FALSE}};
+ /* expected_destroyed = */ FALSE};
check_flush_cache__flush_op_test(file_ptr, test_num, flush_flags, spec_size, spec,
init_expected_index_len, init_expected_index_size,
@@ -5227,53 +5287,58 @@ check_flush_cache__flush_ops(H5F_t *file_ptr)
* be accompanied by a resize. Note that as a result, this
* test becomes redundant with later tests.
*/
- int test_num = 7; /* and 8 */
- unsigned int flush_flags = H5C__NO_FLAGS_SET;
- int spec_size = 1;
- unsigned init_expected_index_len = 1;
- size_t init_expected_index_size = VARIABLE_ENTRY_SIZE;
- unsigned expected_index_len = 1;
- size_t expected_index_size = VARIABLE_ENTRY_SIZE / 2;
- struct fo_flush_cache_test_spec spec[1] = {
- {/* entry_num = */ 0,
- /* entry_type = */ VARIABLE_ENTRY_TYPE,
- /* entry_index = */ 0,
- /* insert_flag = */ FALSE,
- /* flags = */ H5C__DIRTIED_FLAG,
- /* resize_flag = */ FALSE,
- /* new_size = */ 0,
- /* num_pins = */ 0,
- /* pin_type = */ {0, 0, 0, 0, 0, 0, 0, 0},
- /* pin_idx = */ {0, 0, 0, 0, 0, 0, 0, 0},
- /* num_flush_ops = */ 2,
- /* flush_ops = */
- /* op_code: type: idx: flag: size: order_ptr: */
- {{FLUSH_OP__RESIZE, VARIABLE_ENTRY_TYPE, 0, FALSE, VARIABLE_ENTRY_SIZE / 2, NULL},
- {FLUSH_OP__MOVE, VARIABLE_ENTRY_TYPE, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL}},
- /* expected_deserialized = */ TRUE,
- /* expected_serialized = */ TRUE,
- /* expected_destroyed = */ FALSE}};
- int check_size = 0;
- struct fo_flush_entry_check checks[1] = {{/* entry_num = */ 0,
+ int test_num = 7; /* and 8 */
+ unsigned int flush_flags = H5C__NO_FLAGS_SET;
+ int spec_size = 1;
+ int check_size = 0;
+ unsigned init_expected_index_len = 1;
+ size_t init_expected_index_size = VARIABLE_ENTRY_SIZE;
+ unsigned expected_index_len = 1;
+ size_t expected_index_size = VARIABLE_ENTRY_SIZE / 2;
+
+ HDassert(spec_size <= max_num_spec);
+ HDassert(check_size <= max_num_check);
+
+ spec[0] = (struct fo_flush_cache_test_spec){
+ /* entry_num = */ 0,
+ /* entry_type = */ VARIABLE_ENTRY_TYPE,
+ /* entry_index = */ 0,
+ /* insert_flag = */ FALSE,
+ /* flags = */ H5C__DIRTIED_FLAG,
+ /* resize_flag = */ FALSE,
+ /* new_size = */ 0,
+ /* num_pins = */ 0,
+ /* pin_type = */ {0, 0, 0, 0, 0, 0, 0, 0},
+ /* pin_idx = */ {0, 0, 0, 0, 0, 0, 0, 0},
+ /* num_flush_ops = */ 2,
+ /* flush_ops = */
+ /* op_code: type: idx: flag: size: order_ptr: */
+ {{FLUSH_OP__RESIZE, VARIABLE_ENTRY_TYPE, 0, FALSE, VARIABLE_ENTRY_SIZE / 2, NULL},
+ {FLUSH_OP__MOVE, VARIABLE_ENTRY_TYPE, 0, FALSE, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL}},
+ /* expected_deserialized = */ TRUE,
+ /* expected_serialized = */ TRUE,
+ /* expected_destroyed = */ FALSE};
+
+ checks[0] = (struct fo_flush_entry_check){/* entry_num = */ 0,
/* entry_type = */ 0,
/* entry_index = */ 0,
/* expected_size = */ (size_t)0,
/* in_cache = */ FALSE,
/* at_main_addr = */ FALSE,
- /* is_dirty = */ FALSE,
+ /* is_dirty = */ FALSE,
/* is_protected = */ FALSE,
/* is_pinned = */ FALSE,
/* expected_deserialized = */ FALSE,
/* expected_serialized = */ FALSE,
- /* expected_destroyed = */ FALSE}};
+ /* expected_destroyed = */ FALSE};
check_flush_cache__flush_op_test(file_ptr, test_num, flush_flags, spec_size, spec,
init_expected_index_len, init_expected_index_size,
@@ -5315,53 +5380,58 @@ check_flush_cache__flush_ops(H5F_t *file_ptr)
* Again, we run this entry twice, as the first run moves the entry
* to its alternate address, and the second moves it back.
*/
- int test_num = 9; /* and 10 */
- unsigned int flush_flags = H5C__NO_FLAGS_SET;
- int spec_size = 1;
- unsigned init_expected_index_len = 1;
- size_t init_expected_index_size = VARIABLE_ENTRY_SIZE / 2;
- unsigned expected_index_len = 1;
- size_t expected_index_size = VARIABLE_ENTRY_SIZE / 4;
- struct fo_flush_cache_test_spec spec[1] = {
- {/* entry_num = */ 0,
- /* entry_type = */ VARIABLE_ENTRY_TYPE,
- /* entry_index = */ 0,
- /* insert_flag = */ FALSE,
- /* flags = */ H5C__DIRTIED_FLAG,
- /* resize_flag = */ TRUE,
- /* new_size = */ VARIABLE_ENTRY_SIZE / 2,
- /* num_pins = */ 0,
- /* pin_type = */ {0, 0, 0, 0, 0, 0, 0, 0},
- /* pin_idx = */ {0, 0, 0, 0, 0, 0, 0, 0},
- /* num_flush_ops = */ 2,
- /* flush_ops = */
- /* op_code: type: idx: flag: size: order_ptr: */
- {{FLUSH_OP__RESIZE, VARIABLE_ENTRY_TYPE, 0, FALSE, VARIABLE_ENTRY_SIZE / 4, NULL},
- {FLUSH_OP__MOVE, VARIABLE_ENTRY_TYPE, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL}},
- /* expected_deserialized = */ TRUE,
- /* expected_serialized = */ TRUE,
- /* expected_destroyed = */ FALSE}};
- int check_size = 0;
- struct fo_flush_entry_check checks[1] = {{/* entry_num = */ 0,
+ int test_num = 9; /* and 10 */
+ unsigned int flush_flags = H5C__NO_FLAGS_SET;
+ int spec_size = 1;
+ int check_size = 0;
+ unsigned init_expected_index_len = 1;
+ size_t init_expected_index_size = VARIABLE_ENTRY_SIZE / 2;
+ unsigned expected_index_len = 1;
+ size_t expected_index_size = VARIABLE_ENTRY_SIZE / 4;
+
+ HDassert(spec_size <= max_num_spec);
+ HDassert(check_size <= max_num_check);
+
+ spec[0] = (struct fo_flush_cache_test_spec){
+ /* entry_num = */ 0,
+ /* entry_type = */ VARIABLE_ENTRY_TYPE,
+ /* entry_index = */ 0,
+ /* insert_flag = */ FALSE,
+ /* flags = */ H5C__DIRTIED_FLAG,
+ /* resize_flag = */ TRUE,
+ /* new_size = */ VARIABLE_ENTRY_SIZE / 2,
+ /* num_pins = */ 0,
+ /* pin_type = */ {0, 0, 0, 0, 0, 0, 0, 0},
+ /* pin_idx = */ {0, 0, 0, 0, 0, 0, 0, 0},
+ /* num_flush_ops = */ 2,
+ /* flush_ops = */
+ /* op_code: type: idx: flag: size: order_ptr: */
+ {{FLUSH_OP__RESIZE, VARIABLE_ENTRY_TYPE, 0, FALSE, VARIABLE_ENTRY_SIZE / 4, NULL},
+ {FLUSH_OP__MOVE, VARIABLE_ENTRY_TYPE, 0, FALSE, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL}},
+ /* expected_deserialized = */ TRUE,
+ /* expected_serialized = */ TRUE,
+ /* expected_destroyed = */ FALSE};
+
+ checks[0] = (struct fo_flush_entry_check){/* entry_num = */ 0,
/* entry_type = */ 0,
/* entry_index = */ 0,
/* expected_size = */ (size_t)0,
/* in_cache = */ FALSE,
/* at_main_addr = */ FALSE,
- /* is_dirty = */ FALSE,
+ /* is_dirty = */ FALSE,
/* is_protected = */ FALSE,
/* is_pinned = */ FALSE,
/* expected_deserialized = */ FALSE,
/* expected_serialized = */ FALSE,
- /* expected_destroyed = */ FALSE}};
+ /* expected_destroyed = */ FALSE};
check_flush_cache__flush_op_test(file_ptr, test_num, flush_flags, spec_size, spec,
init_expected_index_len, init_expected_index_size,
@@ -5401,53 +5471,58 @@ check_flush_cache__flush_ops(H5F_t *file_ptr)
* Again, we run this entry twice, as the first run moves the entry to its
* alternate address, and the second moves it back.
*/
- int test_num = 11; /* and 12 */
- unsigned int flush_flags = H5C__NO_FLAGS_SET;
- int spec_size = 1;
- unsigned init_expected_index_len = 1;
- size_t init_expected_index_size = VARIABLE_ENTRY_SIZE / 2;
- unsigned expected_index_len = 1;
- size_t expected_index_size = VARIABLE_ENTRY_SIZE / 4;
- struct fo_flush_cache_test_spec spec[1] = {
- {/* entry_num = */ 0,
- /* entry_type = */ VARIABLE_ENTRY_TYPE,
- /* entry_index = */ 0,
- /* insert_flag = */ FALSE,
- /* flags = */ H5C__DIRTIED_FLAG,
- /* resize_flag = */ TRUE,
- /* new_size = */ VARIABLE_ENTRY_SIZE / 2,
- /* num_pins = */ 0,
- /* pin_type = */ {0, 0, 0, 0, 0, 0, 0, 0},
- /* pin_idx = */ {0, 0, 0, 0, 0, 0, 0, 0},
- /* num_flush_ops = */ 2,
- /* flush_ops = */
- /* op_code: type: idx: flag: size: order_ptr: */
- {{FLUSH_OP__RESIZE, VARIABLE_ENTRY_TYPE, 0, FALSE, VARIABLE_ENTRY_SIZE / 4, NULL},
- {FLUSH_OP__MOVE, VARIABLE_ENTRY_TYPE, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL}},
- /* expected_deserialized = */ TRUE,
- /* expected_serialized = */ TRUE,
- /* expected_destroyed = */ FALSE}};
- int check_size = 0;
- struct fo_flush_entry_check checks[1] = {{/* entry_num = */ 0,
+ int test_num = 11; /* and 12 */
+ unsigned int flush_flags = H5C__NO_FLAGS_SET;
+ int spec_size = 1;
+ int check_size = 0;
+ unsigned init_expected_index_len = 1;
+ size_t init_expected_index_size = VARIABLE_ENTRY_SIZE / 2;
+ unsigned expected_index_len = 1;
+ size_t expected_index_size = VARIABLE_ENTRY_SIZE / 4;
+
+ HDassert(spec_size <= max_num_spec);
+ HDassert(check_size <= max_num_check);
+
+ spec[0] = (struct fo_flush_cache_test_spec){
+ /* entry_num = */ 0,
+ /* entry_type = */ VARIABLE_ENTRY_TYPE,
+ /* entry_index = */ 0,
+ /* insert_flag = */ FALSE,
+ /* flags = */ H5C__DIRTIED_FLAG,
+ /* resize_flag = */ TRUE,
+ /* new_size = */ VARIABLE_ENTRY_SIZE / 2,
+ /* num_pins = */ 0,
+ /* pin_type = */ {0, 0, 0, 0, 0, 0, 0, 0},
+ /* pin_idx = */ {0, 0, 0, 0, 0, 0, 0, 0},
+ /* num_flush_ops = */ 2,
+ /* flush_ops = */
+ /* op_code: type: idx: flag: size: order_ptr: */
+ {{FLUSH_OP__RESIZE, VARIABLE_ENTRY_TYPE, 0, FALSE, VARIABLE_ENTRY_SIZE / 4, NULL},
+ {FLUSH_OP__MOVE, VARIABLE_ENTRY_TYPE, 0, FALSE, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL}},
+ /* expected_deserialized = */ TRUE,
+ /* expected_serialized = */ TRUE,
+ /* expected_destroyed = */ FALSE};
+
+ checks[0] = (struct fo_flush_entry_check){/* entry_num = */ 0,
/* entry_type = */ 0,
/* entry_index = */ 0,
/* expected_size = */ (size_t)0,
/* in_cache = */ FALSE,
/* at_main_addr = */ FALSE,
- /* is_dirty = */ FALSE,
+ /* is_dirty = */ FALSE,
/* is_protected = */ FALSE,
/* is_pinned = */ FALSE,
/* expected_deserialized = */ FALSE,
/* expected_serialized = */ FALSE,
- /* expected_destroyed = */ FALSE}};
+ /* expected_destroyed = */ FALSE};
check_flush_cache__flush_op_test(file_ptr, test_num, flush_flags, spec_size, spec,
init_expected_index_len, init_expected_index_size,
@@ -5489,65 +5564,70 @@ check_flush_cache__flush_ops(H5F_t *file_ptr)
* At present, I am assured that this case will never occur, but
* lets make sure we can handle it regardless.
*/
- int test_num = 13;
- unsigned int flush_flags = H5C__NO_FLAGS_SET;
- int spec_size = 1;
- unsigned init_expected_index_len = 1;
- size_t init_expected_index_size = 1 * PICO_ENTRY_SIZE;
- unsigned expected_index_len = 3;
- size_t expected_index_size = 3 * PICO_ENTRY_SIZE;
- struct fo_flush_cache_test_spec spec[1] = {
- {/* entry_num = */ 0,
- /* entry_type = */ 0,
- /* entry_index = */ 1,
- /* insert_flag = */ FALSE,
- /* flags = */ H5C__DIRTIED_FLAG,
- /* resize_flag = */ FALSE,
- /* new_size = */ 0,
- /* num_pins = */ 0,
- /* pin_type = */ {0, 0, 0, 0, 0, 0, 0, 0},
- /* pin_idx = */ {0, 0, 0, 0, 0, 0, 0, 0},
- /* num_flush_ops = */ 2,
- /* flush_ops = */
- /* op_code: type: idx: flag: size: order_ptr: */
- {{FLUSH_OP__DIRTY, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__DIRTY, 0, 2, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL}},
- /* expected_deserialized = */ TRUE,
- /* expected_serialized = */ TRUE,
- /* expected_destroyed = */ FALSE}};
- int check_size = 2;
- struct fo_flush_entry_check checks[2] = {{/* entry_num = */ 0,
+ int test_num = 13;
+ unsigned int flush_flags = H5C__NO_FLAGS_SET;
+ int spec_size = 1;
+ int check_size = 2;
+ unsigned init_expected_index_len = 1;
+ size_t init_expected_index_size = 1 * PICO_ENTRY_SIZE;
+ unsigned expected_index_len = 3;
+ size_t expected_index_size = 3 * PICO_ENTRY_SIZE;
+
+ HDassert(spec_size <= max_num_spec);
+ HDassert(check_size <= max_num_check);
+
+ spec[0] = (struct fo_flush_cache_test_spec){
+ /* entry_num = */ 0,
+ /* entry_type = */ 0,
+ /* entry_index = */ 1,
+ /* insert_flag = */ FALSE,
+ /* flags = */ H5C__DIRTIED_FLAG,
+ /* resize_flag = */ FALSE,
+ /* new_size = */ 0,
+ /* num_pins = */ 0,
+ /* pin_type = */ {0, 0, 0, 0, 0, 0, 0, 0},
+ /* pin_idx = */ {0, 0, 0, 0, 0, 0, 0, 0},
+ /* num_flush_ops = */ 2,
+ /* flush_ops = */
+ /* op_code: type: idx: flag: size: order_ptr: */
+ {{FLUSH_OP__DIRTY, 0, 0, FALSE, 0, NULL},
+ {FLUSH_OP__DIRTY, 0, 2, FALSE, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL}},
+ /* expected_deserialized = */ TRUE,
+ /* expected_serialized = */ TRUE,
+ /* expected_destroyed = */ FALSE};
+
+ checks[0] = (struct fo_flush_entry_check){/* entry_num = */ 0,
/* entry_type = */ PICO_ENTRY_TYPE,
/* entry_index = */ 0,
/* expected_size = */ PICO_ENTRY_SIZE,
/* in_cache = */ TRUE,
/* at_main_addr = */ TRUE,
- /* is_dirty = */ FALSE,
+ /* is_dirty = */ FALSE,
/* is_protected = */ FALSE,
/* is_pinned = */ FALSE,
/* expected_deserialized = */ TRUE,
/* expected_serialized = */ TRUE,
- /* expected_destroyed = */ FALSE},
- {/* entry_num = */ 1,
+ /* expected_destroyed = */ FALSE};
+ checks[1] = (struct fo_flush_entry_check){/* entry_num = */ 1,
/* entry_type = */ PICO_ENTRY_TYPE,
/* entry_index = */ 2,
/* expected_size = */ PICO_ENTRY_SIZE,
/* in_cache = */ TRUE,
/* at_main_addr = */ TRUE,
- /* is_dirty = */ FALSE,
+ /* is_dirty = */ FALSE,
/* is_protected = */ FALSE,
/* is_pinned = */ FALSE,
/* expected_deserialized = */ TRUE,
/* expected_serialized = */ TRUE,
- /* expected_destroyed = */ FALSE}};
+ /* expected_destroyed = */ FALSE};
check_flush_cache__flush_op_test(file_ptr, test_num, flush_flags, spec_size, spec,
init_expected_index_len, init_expected_index_size,
@@ -5566,65 +5646,70 @@ check_flush_cache__flush_ops(H5F_t *file_ptr)
* At present, I am assured that this case will never occur, but
* lets make sure we can handle it regardless.
*/
- int test_num = 14;
- unsigned int flush_flags = H5C__FLUSH_INVALIDATE_FLAG;
- int spec_size = 1;
- unsigned init_expected_index_len = 1;
- size_t init_expected_index_size = 1 * PICO_ENTRY_SIZE;
- unsigned expected_index_len = 0;
- size_t expected_index_size = (size_t)0;
- struct fo_flush_cache_test_spec spec[1] = {
- {/* entry_num = */ 0,
- /* entry_type = */ 0,
- /* entry_index = */ 1,
- /* insert_flag = */ FALSE,
- /* flags = */ H5C__DIRTIED_FLAG,
- /* resize_flag = */ FALSE,
- /* new_size = */ 0,
- /* num_pins = */ 0,
- /* pin_type = */ {0, 0, 0, 0, 0, 0, 0, 0},
- /* pin_idx = */ {0, 0, 0, 0, 0, 0, 0, 0},
- /* num_flush_ops = */ 2,
- /* flush_ops = */
- /* op_code: type: idx: flag: size: order_ptr: */
- {{FLUSH_OP__DIRTY, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__DIRTY, 0, 2, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL}},
- /* expected_deserialized = */ TRUE,
- /* expected_serialized = */ TRUE,
- /* expected_destroyed = */ TRUE}};
- int check_size = 2;
- struct fo_flush_entry_check checks[2] = {{/* entry_num = */ 0,
+ int test_num = 14;
+ unsigned int flush_flags = H5C__FLUSH_INVALIDATE_FLAG;
+ int spec_size = 1;
+ int check_size = 2;
+ unsigned init_expected_index_len = 1;
+ size_t init_expected_index_size = 1 * PICO_ENTRY_SIZE;
+ unsigned expected_index_len = 0;
+ size_t expected_index_size = (size_t)0;
+
+ HDassert(spec_size <= max_num_spec);
+ HDassert(check_size <= max_num_check);
+
+ spec[0] = (struct fo_flush_cache_test_spec){
+ /* entry_num = */ 0,
+ /* entry_type = */ 0,
+ /* entry_index = */ 1,
+ /* insert_flag = */ FALSE,
+ /* flags = */ H5C__DIRTIED_FLAG,
+ /* resize_flag = */ FALSE,
+ /* new_size = */ 0,
+ /* num_pins = */ 0,
+ /* pin_type = */ {0, 0, 0, 0, 0, 0, 0, 0},
+ /* pin_idx = */ {0, 0, 0, 0, 0, 0, 0, 0},
+ /* num_flush_ops = */ 2,
+ /* flush_ops = */
+ /* op_code: type: idx: flag: size: order_ptr: */
+ {{FLUSH_OP__DIRTY, 0, 0, FALSE, 0, NULL},
+ {FLUSH_OP__DIRTY, 0, 2, FALSE, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL}},
+ /* expected_deserialized = */ TRUE,
+ /* expected_serialized = */ TRUE,
+ /* expected_destroyed = */ TRUE};
+
+ checks[0] = (struct fo_flush_entry_check){/* entry_num = */ 0,
/* entry_type = */ PICO_ENTRY_TYPE,
/* entry_index = */ 0,
/* expected_size = */ PICO_ENTRY_SIZE,
/* in_cache = */ FALSE,
/* at_main_addr = */ TRUE,
- /* is_dirty = */ FALSE,
+ /* is_dirty = */ FALSE,
/* is_protected = */ FALSE,
/* is_pinned = */ FALSE,
/* expected_deserialized = */ TRUE,
/* expected_serialized = */ TRUE,
- /* expected_destroyed = */ TRUE},
- {/* entry_num = */ 1,
+ /* expected_destroyed = */ TRUE};
+ checks[1] = (struct fo_flush_entry_check){/* entry_num = */ 1,
/* entry_type = */ PICO_ENTRY_TYPE,
/* entry_index = */ 2,
/* expected_size = */ PICO_ENTRY_SIZE,
/* in_cache = */ FALSE,
/* at_main_addr = */ TRUE,
- /* is_dirty = */ FALSE,
+ /* is_dirty = */ FALSE,
/* is_protected = */ FALSE,
/* is_pinned = */ FALSE,
/* expected_deserialized = */ TRUE,
/* expected_serialized = */ TRUE,
- /* expected_destroyed = */ TRUE}};
+ /* expected_destroyed = */ TRUE};
check_flush_cache__flush_op_test(file_ptr, test_num, flush_flags, spec_size, spec,
init_expected_index_len, init_expected_index_size,
@@ -5643,63 +5728,68 @@ check_flush_cache__flush_ops(H5F_t *file_ptr)
int test_num = 15;
unsigned int flush_flags = H5C__NO_FLAGS_SET;
int spec_size = 1;
+ int check_size = 2;
unsigned init_expected_index_len = 1;
size_t init_expected_index_size = 1 * VARIABLE_ENTRY_SIZE;
unsigned expected_index_len = 3;
size_t expected_index_size =
VARIABLE_ENTRY_SIZE + (VARIABLE_ENTRY_SIZE / 4) + (VARIABLE_ENTRY_SIZE / 2);
- struct fo_flush_cache_test_spec spec[1] = {
- {/* entry_num = */ 0,
- /* entry_type = */ VARIABLE_ENTRY_TYPE,
- /* entry_index = */ 1,
- /* insert_flag = */ FALSE,
- /* flags = */ H5C__DIRTIED_FLAG,
- /* resize_flag = */ FALSE,
- /* new_size = */ 0,
- /* num_pins = */ 0,
- /* pin_type = */ {0, 0, 0, 0, 0, 0, 0, 0},
- /* pin_idx = */ {0, 0, 0, 0, 0, 0, 0, 0},
- /* num_flush_ops = */ 4,
- /* flush_ops = */
- /* op_code: type: idx: flag: size: order_ptr: */
- {{FLUSH_OP__RESIZE, VARIABLE_ENTRY_TYPE, 0, FALSE, VARIABLE_ENTRY_SIZE / 4, NULL},
- {FLUSH_OP__DIRTY, VARIABLE_ENTRY_TYPE, 0, FALSE, 0, NULL},
- {FLUSH_OP__DIRTY, VARIABLE_ENTRY_TYPE, 2, FALSE, 0, NULL},
- {FLUSH_OP__RESIZE, VARIABLE_ENTRY_TYPE, 2, FALSE, VARIABLE_ENTRY_SIZE / 2, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL}},
- /* expected_deserialized = */ TRUE,
- /* expected_serialized = */ TRUE,
- /* expected_destroyed = */ FALSE}};
- int check_size = 2;
- struct fo_flush_entry_check checks[2] = {{/* entry_num = */ 0,
+
+ HDassert(spec_size <= max_num_spec);
+ HDassert(check_size <= max_num_check);
+
+ spec[0] = (struct fo_flush_cache_test_spec){
+ /* entry_num = */ 0,
+ /* entry_type = */ VARIABLE_ENTRY_TYPE,
+ /* entry_index = */ 1,
+ /* insert_flag = */ FALSE,
+ /* flags = */ H5C__DIRTIED_FLAG,
+ /* resize_flag = */ FALSE,
+ /* new_size = */ 0,
+ /* num_pins = */ 0,
+ /* pin_type = */ {0, 0, 0, 0, 0, 0, 0, 0},
+ /* pin_idx = */ {0, 0, 0, 0, 0, 0, 0, 0},
+ /* num_flush_ops = */ 4,
+ /* flush_ops = */
+ /* op_code: type: idx: flag: size: order_ptr: */
+ {{FLUSH_OP__RESIZE, VARIABLE_ENTRY_TYPE, 0, FALSE, VARIABLE_ENTRY_SIZE / 4, NULL},
+ {FLUSH_OP__DIRTY, VARIABLE_ENTRY_TYPE, 0, FALSE, 0, NULL},
+ {FLUSH_OP__DIRTY, VARIABLE_ENTRY_TYPE, 2, FALSE, 0, NULL},
+ {FLUSH_OP__RESIZE, VARIABLE_ENTRY_TYPE, 2, FALSE, VARIABLE_ENTRY_SIZE / 2, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL}},
+ /* expected_deserialized = */ TRUE,
+ /* expected_serialized = */ TRUE,
+ /* expected_destroyed = */ FALSE};
+
+ checks[0] = (struct fo_flush_entry_check){/* entry_num = */ 0,
/* entry_type = */ VARIABLE_ENTRY_TYPE,
/* entry_index = */ 0,
/* expected_size = */ VARIABLE_ENTRY_SIZE / 4,
/* in_cache = */ TRUE,
/* at_main_addr = */ TRUE,
- /* is_dirty = */ FALSE,
+ /* is_dirty = */ FALSE,
/* is_protected = */ FALSE,
/* is_pinned = */ FALSE,
/* expected_deserialized = */ TRUE,
/* expected_serialized = */ TRUE,
- /* expected_destroyed = */ FALSE},
- {/* entry_num = */ 1,
+ /* expected_destroyed = */ FALSE};
+ checks[1] = (struct fo_flush_entry_check){/* entry_num = */ 1,
/* entry_type = */ VARIABLE_ENTRY_TYPE,
/* entry_index = */ 2,
/* expected_size = */ VARIABLE_ENTRY_SIZE / 2,
/* in_cache = */ TRUE,
/* at_main_addr = */ TRUE,
- /* is_dirty = */ FALSE,
+ /* is_dirty = */ FALSE,
/* is_protected = */ FALSE,
/* is_pinned = */ FALSE,
/* expected_deserialized = */ TRUE,
/* expected_serialized = */ TRUE,
- /* expected_destroyed = */ FALSE}};
+ /* expected_destroyed = */ FALSE};
check_flush_cache__flush_op_test(file_ptr, test_num, flush_flags, spec_size, spec,
init_expected_index_len, init_expected_index_size,
@@ -5717,65 +5807,70 @@ check_flush_cache__flush_ops(H5F_t *file_ptr)
* At present, I am assured that this case will never occur, but
* lets make sure we can handle it regardless.
*/
- int test_num = 16;
- unsigned int flush_flags = H5C__FLUSH_INVALIDATE_FLAG;
- int spec_size = 1;
- unsigned init_expected_index_len = 1;
- size_t init_expected_index_size = 1 * VARIABLE_ENTRY_SIZE;
- unsigned expected_index_len = 0;
- size_t expected_index_size = (size_t)0;
- struct fo_flush_cache_test_spec spec[1] = {
- {/* entry_num = */ 0,
- /* entry_type = */ VARIABLE_ENTRY_TYPE,
- /* entry_index = */ 1,
- /* insert_flag = */ FALSE,
- /* flags = */ H5C__DIRTIED_FLAG,
- /* resize_flag = */ FALSE,
- /* new_size = */ 0,
- /* num_pins = */ 0,
- /* pin_type = */ {0, 0, 0, 0, 0, 0, 0, 0},
- /* pin_idx = */ {0, 0, 0, 0, 0, 0, 0, 0},
- /* num_flush_ops = */ 4,
- /* flush_ops = */
- /* op_code: type: idx: flag: size: order_ptr: */
- {{FLUSH_OP__RESIZE, VARIABLE_ENTRY_TYPE, 0, FALSE, VARIABLE_ENTRY_SIZE / 4, NULL},
- {FLUSH_OP__DIRTY, VARIABLE_ENTRY_TYPE, 0, FALSE, 0, NULL},
- {FLUSH_OP__DIRTY, VARIABLE_ENTRY_TYPE, 2, FALSE, 0, NULL},
- {FLUSH_OP__RESIZE, VARIABLE_ENTRY_TYPE, 2, FALSE, VARIABLE_ENTRY_SIZE / 2, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL}},
- /* expected_deserialized = */ TRUE,
- /* expected_serialized = */ TRUE,
- /* expected_destroyed = */ TRUE}};
- int check_size = 2;
- struct fo_flush_entry_check checks[2] = {{/* entry_num = */ 0,
+ int test_num = 16;
+ unsigned int flush_flags = H5C__FLUSH_INVALIDATE_FLAG;
+ int spec_size = 1;
+ int check_size = 2;
+ unsigned init_expected_index_len = 1;
+ size_t init_expected_index_size = 1 * VARIABLE_ENTRY_SIZE;
+ unsigned expected_index_len = 0;
+ size_t expected_index_size = (size_t)0;
+
+ HDassert(spec_size <= max_num_spec);
+ HDassert(check_size <= max_num_check);
+
+ spec[0] = (struct fo_flush_cache_test_spec){
+ /* entry_num = */ 0,
+ /* entry_type = */ VARIABLE_ENTRY_TYPE,
+ /* entry_index = */ 1,
+ /* insert_flag = */ FALSE,
+ /* flags = */ H5C__DIRTIED_FLAG,
+ /* resize_flag = */ FALSE,
+ /* new_size = */ 0,
+ /* num_pins = */ 0,
+ /* pin_type = */ {0, 0, 0, 0, 0, 0, 0, 0},
+ /* pin_idx = */ {0, 0, 0, 0, 0, 0, 0, 0},
+ /* num_flush_ops = */ 4,
+ /* flush_ops = */
+ /* op_code: type: idx: flag: size: order_ptr: */
+ {{FLUSH_OP__RESIZE, VARIABLE_ENTRY_TYPE, 0, FALSE, VARIABLE_ENTRY_SIZE / 4, NULL},
+ {FLUSH_OP__DIRTY, VARIABLE_ENTRY_TYPE, 0, FALSE, 0, NULL},
+ {FLUSH_OP__DIRTY, VARIABLE_ENTRY_TYPE, 2, FALSE, 0, NULL},
+ {FLUSH_OP__RESIZE, VARIABLE_ENTRY_TYPE, 2, FALSE, VARIABLE_ENTRY_SIZE / 2, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL}},
+ /* expected_deserialized = */ TRUE,
+ /* expected_serialized = */ TRUE,
+ /* expected_destroyed = */ TRUE};
+
+ checks[0] = (struct fo_flush_entry_check){/* entry_num = */ 0,
/* entry_type = */ VARIABLE_ENTRY_TYPE,
/* entry_index = */ 0,
/* expected_size = */ VARIABLE_ENTRY_SIZE / 4,
/* in_cache = */ FALSE,
/* at_main_addr = */ TRUE,
- /* is_dirty = */ FALSE,
+ /* is_dirty = */ FALSE,
/* is_protected = */ FALSE,
/* is_pinned = */ FALSE,
/* expected_deserialized = */ TRUE,
/* expected_serialized = */ TRUE,
- /* expected_destroyed = */ TRUE},
- {/* entry_num = */ 1,
+ /* expected_destroyed = */ TRUE};
+ checks[1] = (struct fo_flush_entry_check){/* entry_num = */ 1,
/* entry_type = */ VARIABLE_ENTRY_TYPE,
/* entry_index = */ 2,
/* expected_size = */ VARIABLE_ENTRY_SIZE / 2,
/* in_cache = */ FALSE,
/* at_main_addr = */ TRUE,
- /* is_dirty = */ FALSE,
+ /* is_dirty = */ FALSE,
/* is_protected = */ FALSE,
/* is_pinned = */ FALSE,
/* expected_deserialized = */ TRUE,
/* expected_serialized = */ TRUE,
- /* expected_destroyed = */ TRUE}};
+ /* expected_destroyed = */ TRUE};
check_flush_cache__flush_op_test(file_ptr, test_num, flush_flags, spec_size, spec,
init_expected_index_len, init_expected_index_size,
@@ -5794,63 +5889,68 @@ check_flush_cache__flush_ops(H5F_t *file_ptr)
int test_num = 17; /* and 18 */
unsigned int flush_flags = H5C__NO_FLAGS_SET;
int spec_size = 1;
+ int check_size = 2;
unsigned init_expected_index_len = 1;
size_t init_expected_index_size = 1 * VARIABLE_ENTRY_SIZE;
unsigned expected_index_len = 3;
size_t expected_index_size =
VARIABLE_ENTRY_SIZE + (VARIABLE_ENTRY_SIZE / 4) + (VARIABLE_ENTRY_SIZE / 2);
- struct fo_flush_cache_test_spec spec[1] = {
- {/* entry_num = */ 0,
- /* entry_type = */ VARIABLE_ENTRY_TYPE,
- /* entry_index = */ 1,
- /* insert_flag = */ FALSE,
- /* flags = */ H5C__DIRTIED_FLAG,
- /* resize_flag = */ FALSE,
- /* new_size = */ 0,
- /* num_pins = */ 0,
- /* pin_type = */ {0, 0, 0, 0, 0, 0, 0, 0},
- /* pin_idx = */ {0, 0, 0, 0, 0, 0, 0, 0},
- /* num_flush_ops = */ 6,
- /* flush_ops = */
- /* op_code: type: idx: flag: size: order_ptr: */
- {{FLUSH_OP__RESIZE, VARIABLE_ENTRY_TYPE, 0, FALSE, VARIABLE_ENTRY_SIZE / 4, NULL},
- {FLUSH_OP__DIRTY, VARIABLE_ENTRY_TYPE, 0, FALSE, 0, NULL},
- {FLUSH_OP__MOVE, VARIABLE_ENTRY_TYPE, 0, FALSE, 0, NULL},
- {FLUSH_OP__DIRTY, VARIABLE_ENTRY_TYPE, 2, FALSE, 0, NULL},
- {FLUSH_OP__RESIZE, VARIABLE_ENTRY_TYPE, 2, FALSE, VARIABLE_ENTRY_SIZE / 2, NULL},
- {FLUSH_OP__MOVE, VARIABLE_ENTRY_TYPE, 2, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL}},
- /* expected_deserialized = */ TRUE,
- /* expected_serialized = */ TRUE,
- /* expected_destroyed = */ FALSE}};
- int check_size = 2;
- struct fo_flush_entry_check checks[2] = {{/* entry_num = */ 0,
+
+ HDassert(spec_size <= max_num_spec);
+ HDassert(check_size <= max_num_check);
+
+ spec[0] = (struct fo_flush_cache_test_spec){
+ /* entry_num = */ 0,
+ /* entry_type = */ VARIABLE_ENTRY_TYPE,
+ /* entry_index = */ 1,
+ /* insert_flag = */ FALSE,
+ /* flags = */ H5C__DIRTIED_FLAG,
+ /* resize_flag = */ FALSE,
+ /* new_size = */ 0,
+ /* num_pins = */ 0,
+ /* pin_type = */ {0, 0, 0, 0, 0, 0, 0, 0},
+ /* pin_idx = */ {0, 0, 0, 0, 0, 0, 0, 0},
+ /* num_flush_ops = */ 6,
+ /* flush_ops = */
+ /* op_code: type: idx: flag: size: order_ptr: */
+ {{FLUSH_OP__RESIZE, VARIABLE_ENTRY_TYPE, 0, FALSE, VARIABLE_ENTRY_SIZE / 4, NULL},
+ {FLUSH_OP__DIRTY, VARIABLE_ENTRY_TYPE, 0, FALSE, 0, NULL},
+ {FLUSH_OP__MOVE, VARIABLE_ENTRY_TYPE, 0, FALSE, 0, NULL},
+ {FLUSH_OP__DIRTY, VARIABLE_ENTRY_TYPE, 2, FALSE, 0, NULL},
+ {FLUSH_OP__RESIZE, VARIABLE_ENTRY_TYPE, 2, FALSE, VARIABLE_ENTRY_SIZE / 2, NULL},
+ {FLUSH_OP__MOVE, VARIABLE_ENTRY_TYPE, 2, FALSE, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL}},
+ /* expected_deserialized = */ TRUE,
+ /* expected_serialized = */ TRUE,
+ /* expected_destroyed = */ FALSE};
+
+ checks[0] = (struct fo_flush_entry_check){/* entry_num = */ 0,
/* entry_type = */ VARIABLE_ENTRY_TYPE,
/* entry_index = */ 0,
/* expected_size = */ VARIABLE_ENTRY_SIZE / 4,
/* in_cache = */ TRUE,
/* at_main_addr = */ FALSE,
- /* is_dirty = */ FALSE,
+ /* is_dirty = */ FALSE,
/* is_protected = */ FALSE,
/* is_pinned = */ FALSE,
/* expected_deserialized = */ TRUE,
/* expected_serialized = */ TRUE,
- /* expected_destroyed = */ FALSE},
- {/* entry_num = */ 1,
+ /* expected_destroyed = */ FALSE};
+ checks[1] = (struct fo_flush_entry_check){/* entry_num = */ 1,
/* entry_type = */ VARIABLE_ENTRY_TYPE,
/* entry_index = */ 2,
/* expected_size = */ VARIABLE_ENTRY_SIZE / 2,
/* in_cache = */ TRUE,
/* at_main_addr = */ FALSE,
- /* is_dirty = */ FALSE,
+ /* is_dirty = */ FALSE,
/* is_protected = */ FALSE,
/* is_pinned = */ FALSE,
/* expected_deserialized = */ TRUE,
/* expected_serialized = */ TRUE,
- /* expected_destroyed = */ FALSE}};
+ /* expected_destroyed = */ FALSE};
check_flush_cache__flush_op_test(file_ptr, test_num, flush_flags, spec_size, spec,
init_expected_index_len, init_expected_index_size,
@@ -5893,63 +5993,68 @@ check_flush_cache__flush_ops(H5F_t *file_ptr)
int test_num = 19; /* and 20 */
unsigned int flush_flags = H5C__NO_FLAGS_SET;
int spec_size = 1;
+ int check_size = 2;
unsigned init_expected_index_len = 1;
size_t init_expected_index_size = 1 * VARIABLE_ENTRY_SIZE;
unsigned expected_index_len = 3;
size_t expected_index_size =
VARIABLE_ENTRY_SIZE + (VARIABLE_ENTRY_SIZE / 4) + (VARIABLE_ENTRY_SIZE / 2);
- struct fo_flush_cache_test_spec spec[1] = {
- {/* entry_num = */ 0,
- /* entry_type = */ VARIABLE_ENTRY_TYPE,
- /* entry_index = */ 1,
- /* insert_flag = */ FALSE,
- /* flags = */ H5C__DIRTIED_FLAG,
- /* resize_flag = */ FALSE,
- /* new_size = */ 0,
- /* num_pins = */ 0,
- /* pin_type = */ {0, 0, 0, 0, 0, 0, 0, 0},
- /* pin_idx = */ {0, 0, 0, 0, 0, 0, 0, 0},
- /* num_flush_ops = */ 6,
- /* flush_ops = */
- /* op_code: type: idx: flag: size: order_ptr: */
- {{FLUSH_OP__RESIZE, VARIABLE_ENTRY_TYPE, 0, FALSE, VARIABLE_ENTRY_SIZE / 4, NULL},
- {FLUSH_OP__DIRTY, VARIABLE_ENTRY_TYPE, 0, FALSE, 0, NULL},
- {FLUSH_OP__MOVE, VARIABLE_ENTRY_TYPE, 0, FALSE, 0, NULL},
- {FLUSH_OP__DIRTY, VARIABLE_ENTRY_TYPE, 2, FALSE, 0, NULL},
- {FLUSH_OP__RESIZE, VARIABLE_ENTRY_TYPE, 2, FALSE, VARIABLE_ENTRY_SIZE / 2, NULL},
- {FLUSH_OP__MOVE, VARIABLE_ENTRY_TYPE, 2, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL}},
- /* expected_deserialized = */ TRUE,
- /* expected_serialized = */ TRUE,
- /* expected_destroyed = */ FALSE}};
- int check_size = 2;
- struct fo_flush_entry_check checks[2] = {{/* entry_num = */ 0,
+
+ HDassert(spec_size <= max_num_spec);
+ HDassert(check_size <= max_num_check);
+
+ spec[0] = (struct fo_flush_cache_test_spec){
+ /* entry_num = */ 0,
+ /* entry_type = */ VARIABLE_ENTRY_TYPE,
+ /* entry_index = */ 1,
+ /* insert_flag = */ FALSE,
+ /* flags = */ H5C__DIRTIED_FLAG,
+ /* resize_flag = */ FALSE,
+ /* new_size = */ 0,
+ /* num_pins = */ 0,
+ /* pin_type = */ {0, 0, 0, 0, 0, 0, 0, 0},
+ /* pin_idx = */ {0, 0, 0, 0, 0, 0, 0, 0},
+ /* num_flush_ops = */ 6,
+ /* flush_ops = */
+ /* op_code: type: idx: flag: size: order_ptr: */
+ {{FLUSH_OP__RESIZE, VARIABLE_ENTRY_TYPE, 0, FALSE, VARIABLE_ENTRY_SIZE / 4, NULL},
+ {FLUSH_OP__DIRTY, VARIABLE_ENTRY_TYPE, 0, FALSE, 0, NULL},
+ {FLUSH_OP__MOVE, VARIABLE_ENTRY_TYPE, 0, FALSE, 0, NULL},
+ {FLUSH_OP__DIRTY, VARIABLE_ENTRY_TYPE, 2, FALSE, 0, NULL},
+ {FLUSH_OP__RESIZE, VARIABLE_ENTRY_TYPE, 2, FALSE, VARIABLE_ENTRY_SIZE / 2, NULL},
+ {FLUSH_OP__MOVE, VARIABLE_ENTRY_TYPE, 2, FALSE, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL}},
+ /* expected_deserialized = */ TRUE,
+ /* expected_serialized = */ TRUE,
+ /* expected_destroyed = */ FALSE};
+
+ checks[0] = (struct fo_flush_entry_check){/* entry_num = */ 0,
/* entry_type = */ VARIABLE_ENTRY_TYPE,
/* entry_index = */ 0,
/* expected_size = */ VARIABLE_ENTRY_SIZE / 4,
/* in_cache = */ TRUE,
/* at_main_addr = */ FALSE,
- /* is_dirty = */ FALSE,
+ /* is_dirty = */ FALSE,
/* is_protected = */ FALSE,
/* is_pinned = */ FALSE,
/* expected_deserialized = */ TRUE,
/* expected_serialized = */ TRUE,
- /* expected_destroyed = */ FALSE},
- {/* entry_num = */ 1,
+ /* expected_destroyed = */ FALSE};
+ checks[1] = (struct fo_flush_entry_check){/* entry_num = */ 1,
/* entry_type = */ VARIABLE_ENTRY_TYPE,
/* entry_index = */ 2,
/* expected_size = */ VARIABLE_ENTRY_SIZE / 2,
/* in_cache = */ TRUE,
/* at_main_addr = */ FALSE,
- /* is_dirty = */ FALSE,
+ /* is_dirty = */ FALSE,
/* is_protected = */ FALSE,
/* is_pinned = */ FALSE,
/* expected_deserialized = */ TRUE,
/* expected_serialized = */ TRUE,
- /* expected_destroyed = */ FALSE}};
+ /* expected_destroyed = */ FALSE};
check_flush_cache__flush_op_test(file_ptr, test_num, flush_flags, spec_size, spec,
init_expected_index_len, init_expected_index_size,
@@ -6003,165 +6108,173 @@ check_flush_cache__flush_ops(H5F_t *file_ptr)
int test_num = 21;
unsigned int flush_flags = H5C__FLUSH_MARKED_ENTRIES_FLAG;
int spec_size = 4;
+ int check_size = 4;
unsigned init_expected_index_len = 4;
size_t init_expected_index_size = (2 * VARIABLE_ENTRY_SIZE) + (2 * PICO_ENTRY_SIZE);
unsigned expected_index_len = 6;
size_t expected_index_size = (2 * VARIABLE_ENTRY_SIZE) + (VARIABLE_ENTRY_SIZE / 4) +
(VARIABLE_ENTRY_SIZE / 2) + (2 * PICO_ENTRY_SIZE);
- struct fo_flush_cache_test_spec spec[4] = {
- {/* entry_num = */ 0,
- /* entry_type = */ VARIABLE_ENTRY_TYPE,
- /* entry_index = */ 1,
- /* insert_flag = */ FALSE,
- /* flags = */ H5C__DIRTIED_FLAG | H5C__SET_FLUSH_MARKER_FLAG,
- /* resize_flag = */ FALSE,
- /* new_size = */ 0,
- /* num_pins = */ 0,
- /* pin_type = */ {0, 0, 0, 0, 0, 0, 0, 0},
- /* pin_idx = */ {0, 0, 0, 0, 0, 0, 0, 0},
- /* num_flush_ops = */ 6,
- /* flush_ops = */
- /* op_code: type: idx: flag: size: order_ptr: */
- {{FLUSH_OP__RESIZE, VARIABLE_ENTRY_TYPE, 0, FALSE, VARIABLE_ENTRY_SIZE / 4, NULL},
- {FLUSH_OP__DIRTY, VARIABLE_ENTRY_TYPE, 0, FALSE, 0, NULL},
- {FLUSH_OP__MOVE, VARIABLE_ENTRY_TYPE, 0, FALSE, 0, NULL},
- {FLUSH_OP__DIRTY, VARIABLE_ENTRY_TYPE, 2, FALSE, 0, NULL},
- {FLUSH_OP__RESIZE, VARIABLE_ENTRY_TYPE, 2, FALSE, VARIABLE_ENTRY_SIZE / 2, NULL},
- {FLUSH_OP__MOVE, VARIABLE_ENTRY_TYPE, 2, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL}},
- /* expected_deserialized = */ TRUE,
- /* expected_serialized = */ TRUE,
- /* expected_destroyed = */ FALSE},
- {/* entry_num = */ 1,
- /* entry_type = */ VARIABLE_ENTRY_TYPE,
- /* entry_index = */ 11,
- /* insert_flag = */ FALSE,
- /* flags = */ H5C__DIRTIED_FLAG,
- /* resize_flag = */ FALSE,
- /* new_size = */ 0,
- /* num_pins = */ 0,
- /* pin_type = */ {0, 0, 0, 0, 0, 0, 0, 0},
- /* pin_idx = */ {0, 0, 0, 0, 0, 0, 0, 0},
- /* num_flush_ops = */ 6,
- /* flush_ops = */
- /* op_code: type: idx: flag: size: order_ptr: */
- {{FLUSH_OP__RESIZE, VARIABLE_ENTRY_TYPE, 10, FALSE, VARIABLE_ENTRY_SIZE / 4, NULL},
- {FLUSH_OP__DIRTY, VARIABLE_ENTRY_TYPE, 10, FALSE, 0, NULL},
- {FLUSH_OP__MOVE, VARIABLE_ENTRY_TYPE, 10, FALSE, 0, NULL},
- {FLUSH_OP__DIRTY, VARIABLE_ENTRY_TYPE, 12, FALSE, 0, NULL},
- {FLUSH_OP__RESIZE, VARIABLE_ENTRY_TYPE, 12, FALSE, VARIABLE_ENTRY_SIZE / 2, NULL},
- {FLUSH_OP__MOVE, VARIABLE_ENTRY_TYPE, 12, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL}},
- /* expected_deserialized = */ TRUE,
- /* expected_serialized = */ FALSE,
- /* expected_destroyed = */ FALSE},
- {/* entry_num = */ 2,
- /* entry_type = */ PICO_ENTRY_TYPE,
- /* entry_index = */ 0,
- /* insert_flag = */ FALSE,
- /* flags = */ H5C__DIRTIED_FLAG | H5C__SET_FLUSH_MARKER_FLAG,
- /* resize_flag = */ FALSE,
- /* new_size = */ 0,
- /* num_pins = */ 0,
- /* pin_type = */ {0, 0, 0, 0, 0, 0, 0, 0},
- /* pin_idx = */ {0, 0, 0, 0, 0, 0, 0, 0},
- /* num_flush_ops = */ 0,
- /* flush_ops = */
- /* op_code: type: idx: flag: size: order_ptr: */
- {{FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL}},
- /* expected_deserialized = */ TRUE,
- /* expected_serialized = */ TRUE,
- /* expected_destroyed = */ FALSE},
- {/* entry_num = */ 3,
- /* entry_type = */ PICO_ENTRY_TYPE,
- /* entry_index = */ 1,
- /* insert_flag = */ FALSE,
- /* flags = */ H5C__DIRTIED_FLAG,
- /* resize_flag = */ FALSE,
- /* new_size = */ 0,
- /* num_pins = */ 0,
- /* pin_type = */ {0, 0, 0, 0, 0, 0, 0, 0},
- /* pin_idx = */ {0, 0, 0, 0, 0, 0, 0, 0},
- /* num_flush_ops = */ 0,
- /* flush_ops = */
- /* op_code: type: idx: flag: size: order_ptr: */
- {{FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL}},
- /* expected_deserialized = */ TRUE,
- /* expected_serialized = */ FALSE,
- /* expected_destroyed = */ FALSE}};
- int check_size = 4;
- struct fo_flush_entry_check checks[4] = {{/* entry_num = */ 0,
+
+ HDassert(spec_size <= max_num_spec);
+ HDassert(check_size <= max_num_check);
+
+ spec[0] = (struct fo_flush_cache_test_spec){
+ /* entry_num = */ 0,
+ /* entry_type = */ VARIABLE_ENTRY_TYPE,
+ /* entry_index = */ 1,
+ /* insert_flag = */ FALSE,
+ /* flags = */ H5C__DIRTIED_FLAG | H5C__SET_FLUSH_MARKER_FLAG,
+ /* resize_flag = */ FALSE,
+ /* new_size = */ 0,
+ /* num_pins = */ 0,
+ /* pin_type = */ {0, 0, 0, 0, 0, 0, 0, 0},
+ /* pin_idx = */ {0, 0, 0, 0, 0, 0, 0, 0},
+ /* num_flush_ops = */ 6,
+ /* flush_ops = */
+ /* op_code: type: idx: flag: size: order_ptr: */
+ {{FLUSH_OP__RESIZE, VARIABLE_ENTRY_TYPE, 0, FALSE, VARIABLE_ENTRY_SIZE / 4, NULL},
+ {FLUSH_OP__DIRTY, VARIABLE_ENTRY_TYPE, 0, FALSE, 0, NULL},
+ {FLUSH_OP__MOVE, VARIABLE_ENTRY_TYPE, 0, FALSE, 0, NULL},
+ {FLUSH_OP__DIRTY, VARIABLE_ENTRY_TYPE, 2, FALSE, 0, NULL},
+ {FLUSH_OP__RESIZE, VARIABLE_ENTRY_TYPE, 2, FALSE, VARIABLE_ENTRY_SIZE / 2, NULL},
+ {FLUSH_OP__MOVE, VARIABLE_ENTRY_TYPE, 2, FALSE, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL}},
+ /* expected_deserialized = */ TRUE,
+ /* expected_serialized = */ TRUE,
+ /* expected_destroyed = */ FALSE};
+ spec[1] = (struct fo_flush_cache_test_spec){
+ /* entry_num = */ 1,
+ /* entry_type = */ VARIABLE_ENTRY_TYPE,
+ /* entry_index = */ 11,
+ /* insert_flag = */ FALSE,
+ /* flags = */ H5C__DIRTIED_FLAG,
+ /* resize_flag = */ FALSE,
+ /* new_size = */ 0,
+ /* num_pins = */ 0,
+ /* pin_type = */ {0, 0, 0, 0, 0, 0, 0, 0},
+ /* pin_idx = */ {0, 0, 0, 0, 0, 0, 0, 0},
+ /* num_flush_ops = */ 6,
+ /* flush_ops = */
+ /* op_code: type: idx: flag: size: order_ptr: */
+ {{FLUSH_OP__RESIZE, VARIABLE_ENTRY_TYPE, 10, FALSE, VARIABLE_ENTRY_SIZE / 4, NULL},
+ {FLUSH_OP__DIRTY, VARIABLE_ENTRY_TYPE, 10, FALSE, 0, NULL},
+ {FLUSH_OP__MOVE, VARIABLE_ENTRY_TYPE, 10, FALSE, 0, NULL},
+ {FLUSH_OP__DIRTY, VARIABLE_ENTRY_TYPE, 12, FALSE, 0, NULL},
+ {FLUSH_OP__RESIZE, VARIABLE_ENTRY_TYPE, 12, FALSE, VARIABLE_ENTRY_SIZE / 2, NULL},
+ {FLUSH_OP__MOVE, VARIABLE_ENTRY_TYPE, 12, FALSE, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL}},
+ /* expected_deserialized = */ TRUE,
+ /* expected_serialized = */ FALSE,
+ /* expected_destroyed = */ FALSE};
+ spec[2] = (struct fo_flush_cache_test_spec){
+ /* entry_num = */ 2,
+ /* entry_type = */ PICO_ENTRY_TYPE,
+ /* entry_index = */ 0,
+ /* insert_flag = */ FALSE,
+ /* flags = */ H5C__DIRTIED_FLAG | H5C__SET_FLUSH_MARKER_FLAG,
+ /* resize_flag = */ FALSE,
+ /* new_size = */ 0,
+ /* num_pins = */ 0,
+ /* pin_type = */ {0, 0, 0, 0, 0, 0, 0, 0},
+ /* pin_idx = */ {0, 0, 0, 0, 0, 0, 0, 0},
+ /* num_flush_ops = */ 0,
+ /* flush_ops = */
+ /* op_code: type: idx: flag: size: order_ptr: */
+ {{FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL}},
+ /* expected_deserialized = */ TRUE,
+ /* expected_serialized = */ TRUE,
+ /* expected_destroyed = */ FALSE};
+ spec[3] = (struct fo_flush_cache_test_spec){
+ /* entry_num = */ 3,
+ /* entry_type = */ PICO_ENTRY_TYPE,
+ /* entry_index = */ 1,
+ /* insert_flag = */ FALSE,
+ /* flags = */ H5C__DIRTIED_FLAG,
+ /* resize_flag = */ FALSE,
+ /* new_size = */ 0,
+ /* num_pins = */ 0,
+ /* pin_type = */ {0, 0, 0, 0, 0, 0, 0, 0},
+ /* pin_idx = */ {0, 0, 0, 0, 0, 0, 0, 0},
+ /* num_flush_ops = */ 0,
+ /* flush_ops = */
+ /* op_code: type: idx: flag: size: order_ptr: */
+ {{FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL}},
+ /* expected_deserialized = */ TRUE,
+ /* expected_serialized = */ FALSE,
+ /* expected_destroyed = */ FALSE};
+
+ checks[0] = (struct fo_flush_entry_check){/* entry_num = */ 0,
/* entry_type = */ VARIABLE_ENTRY_TYPE,
/* entry_index = */ 0,
/* expected_size = */ VARIABLE_ENTRY_SIZE / 4,
/* in_cache = */ TRUE,
/* at_main_addr = */ FALSE,
- /* is_dirty = */ TRUE,
+ /* is_dirty = */ TRUE,
/* is_protected = */ FALSE,
/* is_pinned = */ FALSE,
/* expected_deserialized = */ TRUE,
/* expected_serialized = */ FALSE,
- /* expected_destroyed = */ FALSE},
- {/* entry_num = */ 1,
+ /* expected_destroyed = */ FALSE};
+ checks[1] = (struct fo_flush_entry_check){/* entry_num = */ 1,
/* entry_type = */ VARIABLE_ENTRY_TYPE,
/* entry_index = */ 2,
/* expected_size = */ VARIABLE_ENTRY_SIZE / 2,
/* in_cache = */ TRUE,
/* at_main_addr = */ FALSE,
- /* is_dirty = */ TRUE,
+ /* is_dirty = */ TRUE,
/* is_protected = */ FALSE,
/* is_pinned = */ FALSE,
/* expected_deserialized = */ TRUE,
/* expected_serialized = */ FALSE,
- /* expected_destroyed = */ FALSE},
- {/* entry_num = */ 2,
+ /* expected_destroyed = */ FALSE};
+ checks[2] = (struct fo_flush_entry_check){/* entry_num = */ 2,
/* entry_type = */ VARIABLE_ENTRY_TYPE,
/* entry_index = */ 10,
/* expected_size = */ VARIABLE_ENTRY_SIZE,
/* in_cache = */ FALSE,
/* at_main_addr = */ TRUE,
- /* is_dirty = */ FALSE,
+ /* is_dirty = */ FALSE,
/* is_protected = */ FALSE,
/* is_pinned = */ FALSE,
/* expected_deserialized = */ FALSE,
/* expected_serialized = */ FALSE,
- /* expected_destroyed = */ FALSE},
- {/* entry_num = */ 3,
+ /* expected_destroyed = */ FALSE};
+ checks[3] = (struct fo_flush_entry_check){/* entry_num = */ 3,
/* entry_type = */ VARIABLE_ENTRY_TYPE,
/* entry_index = */ 12,
/* expected_size = */ VARIABLE_ENTRY_SIZE,
/* in_cache = */ FALSE,
/* at_main_addr = */ TRUE,
- /* is_dirty = */ FALSE,
+ /* is_dirty = */ FALSE,
/* is_protected = */ FALSE,
/* is_pinned = */ FALSE,
/* expected_deserialized = */ FALSE,
/* expected_serialized = */ FALSE,
- /* expected_destroyed = */ FALSE}};
+ /* expected_destroyed = */ FALSE};
check_flush_cache__flush_op_test(file_ptr, test_num, flush_flags, spec_size, spec,
init_expected_index_len, init_expected_index_size,
@@ -6183,217 +6296,227 @@ check_flush_cache__flush_ops(H5F_t *file_ptr)
int test_num = 22;
unsigned int flush_flags = H5C__NO_FLAGS_SET;
int spec_size = 6;
+ int check_size = 4;
unsigned init_expected_index_len = 6;
size_t init_expected_index_size = (2 * VARIABLE_ENTRY_SIZE) + (4 * PICO_ENTRY_SIZE);
unsigned expected_index_len = 10;
size_t expected_index_size = (2 * VARIABLE_ENTRY_SIZE) + (2 * (VARIABLE_ENTRY_SIZE / 4)) +
(2 * (VARIABLE_ENTRY_SIZE / 2)) + (4 * PICO_ENTRY_SIZE);
- struct fo_flush_cache_test_spec spec[6] = {
- {/* entry_num = */ 0,
- /* entry_type = */ VARIABLE_ENTRY_TYPE,
- /* entry_index = */ 1,
- /* insert_flag = */ FALSE,
- /* flags = */ H5C__DIRTIED_FLAG,
- /* resize_flag = */ FALSE,
- /* new_size = */ 0,
- /* num_pins = */ 0,
- /* pin_type = */ {0, 0, 0, 0, 0, 0, 0, 0},
- /* pin_idx = */ {0, 0, 0, 0, 0, 0, 0, 0},
- /* num_flush_ops = */ 6,
- /* flush_ops = */
- /* op_code: type: idx: flag: size: order_ptr: */
- {{FLUSH_OP__RESIZE, VARIABLE_ENTRY_TYPE, 0, FALSE, VARIABLE_ENTRY_SIZE / 4, NULL},
- {FLUSH_OP__DIRTY, VARIABLE_ENTRY_TYPE, 0, FALSE, 0, NULL},
- {FLUSH_OP__MOVE, VARIABLE_ENTRY_TYPE, 0, FALSE, 0, NULL},
- {FLUSH_OP__DIRTY, VARIABLE_ENTRY_TYPE, 2, FALSE, 0, NULL},
- {FLUSH_OP__RESIZE, VARIABLE_ENTRY_TYPE, 2, FALSE, VARIABLE_ENTRY_SIZE / 2, NULL},
- {FLUSH_OP__MOVE, VARIABLE_ENTRY_TYPE, 2, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL}},
- /* expected_deserialized = */ TRUE,
- /* expected_serialized = */ TRUE,
- /* expected_destroyed = */ FALSE},
- {/* entry_num = */ 1,
- /* entry_type = */ VARIABLE_ENTRY_TYPE,
- /* entry_index = */ 11,
- /* insert_flag = */ FALSE,
- /* flags = */ H5C__DIRTIED_FLAG,
- /* resize_flag = */ FALSE,
- /* new_size = */ 0,
- /* num_pins = */ 0,
- /* pin_type = */ {0, 0, 0, 0, 0, 0, 0, 0},
- /* pin_idx = */ {0, 0, 0, 0, 0, 0, 0, 0},
- /* num_flush_ops = */ 6,
- /* flush_ops = */
- /* op_code: type: idx: flag: size: order_ptr: */
- {{FLUSH_OP__RESIZE, VARIABLE_ENTRY_TYPE, 10, FALSE, VARIABLE_ENTRY_SIZE / 4, NULL},
- {FLUSH_OP__DIRTY, VARIABLE_ENTRY_TYPE, 10, FALSE, 0, NULL},
- {FLUSH_OP__MOVE, VARIABLE_ENTRY_TYPE, 10, FALSE, 0, NULL},
- {FLUSH_OP__DIRTY, VARIABLE_ENTRY_TYPE, 12, FALSE, 0, NULL},
- {FLUSH_OP__RESIZE, VARIABLE_ENTRY_TYPE, 12, FALSE, VARIABLE_ENTRY_SIZE / 2, NULL},
- {FLUSH_OP__MOVE, VARIABLE_ENTRY_TYPE, 12, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL}},
- /* expected_deserialized = */ TRUE,
- /* expected_serialized = */ TRUE,
- /* expected_destroyed = */ FALSE},
- {/* entry_num = */ 2,
- /* entry_type = */ PICO_ENTRY_TYPE,
- /* entry_index = */ 0,
- /* insert_flag = */ FALSE,
- /* flags = */ H5C__NO_FLAGS_SET,
- /* resize_flag = */ FALSE,
- /* new_size = */ 0,
- /* num_pins = */ 0,
- /* pin_type = */ {0, 0, 0, 0, 0, 0, 0, 0},
- /* pin_idx = */ {0, 0, 0, 0, 0, 0, 0, 0},
- /* num_flush_ops = */ 0,
- /* flush_ops = */
- /* op_code: type: idx: flag: size: order_ptr: */
- {{FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL}},
- /* expected_deserialized = */ TRUE,
- /* expected_serialized = */ TRUE,
- /* expected_destroyed = */ FALSE},
- {/* entry_num = */ 3,
- /* entry_type = */ PICO_ENTRY_TYPE,
- /* entry_index = */ 1,
- /* insert_flag = */ FALSE,
- /* flags = */ H5C__NO_FLAGS_SET,
- /* resize_flag = */ FALSE,
- /* new_size = */ 0,
- /* num_pins = */ 0,
- /* pin_type = */ {0, 0, 0, 0, 0, 0, 0, 0},
- /* pin_idx = */ {0, 0, 0, 0, 0, 0, 0, 0},
- /* num_flush_ops = */ 0,
- /* flush_ops = */
- /* op_code: type: idx: flag: size: order_ptr: */
- {{FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL}},
- /* expected_deserialized = */ TRUE,
- /* expected_serialized = */ FALSE,
- /* expected_destroyed = */ FALSE},
- {/* entry_num = */ 4,
- /* entry_type = */ PICO_ENTRY_TYPE,
- /* entry_index = */ 10,
- /* insert_flag = */ FALSE,
- /* flags = */ H5C__DIRTIED_FLAG,
- /* resize_flag = */ FALSE,
- /* new_size = */ 0,
- /* num_pins = */ 0,
- /* pin_type = */ {0, 0, 0, 0, 0, 0, 0, 0},
- /* pin_idx = */ {0, 0, 0, 0, 0, 0, 0, 0},
- /* num_flush_ops = */ 1,
- /* flush_ops = */
- /* op_code: type: idx: flag: size: order_ptr: */
- {{FLUSH_OP__DIRTY, PICO_ENTRY_TYPE, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL}},
- /* expected_deserialized = */ TRUE,
- /* expected_serialized = */ TRUE,
- /* expected_destroyed = */ FALSE},
- {/* entry_num = */ 5,
- /* entry_type = */ PICO_ENTRY_TYPE,
- /* entry_index = */ 20,
- /* insert_flag = */ FALSE,
- /* flags = */ H5C__DIRTIED_FLAG,
- /* resize_flag = */ FALSE,
- /* new_size = */ 0,
- /* num_pins = */ 0,
- /* pin_type = */ {0, 0, 0, 0, 0, 0, 0, 0},
- /* pin_idx = */ {0, 0, 0, 0, 0, 0, 0, 0},
- /* num_flush_ops = */ 1,
- /* flush_ops = */
- /* op_code: type: idx: flag: size: order_ptr: */
- {{FLUSH_OP__DIRTY, PICO_ENTRY_TYPE, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL}},
- /* expected_deserialized = */ TRUE,
- /* expected_serialized = */ TRUE,
- /* expected_destroyed = */ FALSE}};
- int check_size = 4;
- struct fo_flush_entry_check checks[4] = {{/* entry_num = */ 0,
+
+ HDassert(spec_size <= max_num_spec);
+ HDassert(check_size <= max_num_check);
+
+ spec[0] = (struct fo_flush_cache_test_spec){
+ /* entry_num = */ 0,
+ /* entry_type = */ VARIABLE_ENTRY_TYPE,
+ /* entry_index = */ 1,
+ /* insert_flag = */ FALSE,
+ /* flags = */ H5C__DIRTIED_FLAG,
+ /* resize_flag = */ FALSE,
+ /* new_size = */ 0,
+ /* num_pins = */ 0,
+ /* pin_type = */ {0, 0, 0, 0, 0, 0, 0, 0},
+ /* pin_idx = */ {0, 0, 0, 0, 0, 0, 0, 0},
+ /* num_flush_ops = */ 6,
+ /* flush_ops = */
+ /* op_code: type: idx: flag: size: order_ptr: */
+ {{FLUSH_OP__RESIZE, VARIABLE_ENTRY_TYPE, 0, FALSE, VARIABLE_ENTRY_SIZE / 4, NULL},
+ {FLUSH_OP__DIRTY, VARIABLE_ENTRY_TYPE, 0, FALSE, 0, NULL},
+ {FLUSH_OP__MOVE, VARIABLE_ENTRY_TYPE, 0, FALSE, 0, NULL},
+ {FLUSH_OP__DIRTY, VARIABLE_ENTRY_TYPE, 2, FALSE, 0, NULL},
+ {FLUSH_OP__RESIZE, VARIABLE_ENTRY_TYPE, 2, FALSE, VARIABLE_ENTRY_SIZE / 2, NULL},
+ {FLUSH_OP__MOVE, VARIABLE_ENTRY_TYPE, 2, FALSE, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL}},
+ /* expected_deserialized = */ TRUE,
+ /* expected_serialized = */ TRUE,
+ /* expected_destroyed = */ FALSE};
+ spec[1] = (struct fo_flush_cache_test_spec){
+ /* entry_num = */ 1,
+ /* entry_type = */ VARIABLE_ENTRY_TYPE,
+ /* entry_index = */ 11,
+ /* insert_flag = */ FALSE,
+ /* flags = */ H5C__DIRTIED_FLAG,
+ /* resize_flag = */ FALSE,
+ /* new_size = */ 0,
+ /* num_pins = */ 0,
+ /* pin_type = */ {0, 0, 0, 0, 0, 0, 0, 0},
+ /* pin_idx = */ {0, 0, 0, 0, 0, 0, 0, 0},
+ /* num_flush_ops = */ 6,
+ /* flush_ops = */
+ /* op_code: type: idx: flag: size: order_ptr: */
+ {{FLUSH_OP__RESIZE, VARIABLE_ENTRY_TYPE, 10, FALSE, VARIABLE_ENTRY_SIZE / 4, NULL},
+ {FLUSH_OP__DIRTY, VARIABLE_ENTRY_TYPE, 10, FALSE, 0, NULL},
+ {FLUSH_OP__MOVE, VARIABLE_ENTRY_TYPE, 10, FALSE, 0, NULL},
+ {FLUSH_OP__DIRTY, VARIABLE_ENTRY_TYPE, 12, FALSE, 0, NULL},
+ {FLUSH_OP__RESIZE, VARIABLE_ENTRY_TYPE, 12, FALSE, VARIABLE_ENTRY_SIZE / 2, NULL},
+ {FLUSH_OP__MOVE, VARIABLE_ENTRY_TYPE, 12, FALSE, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL}},
+ /* expected_deserialized = */ TRUE,
+ /* expected_serialized = */ TRUE,
+ /* expected_destroyed = */ FALSE};
+ spec[2] = (struct fo_flush_cache_test_spec){
+ /* entry_num = */ 2,
+ /* entry_type = */ PICO_ENTRY_TYPE,
+ /* entry_index = */ 0,
+ /* insert_flag = */ FALSE,
+ /* flags = */ H5C__NO_FLAGS_SET,
+ /* resize_flag = */ FALSE,
+ /* new_size = */ 0,
+ /* num_pins = */ 0,
+ /* pin_type = */ {0, 0, 0, 0, 0, 0, 0, 0},
+ /* pin_idx = */ {0, 0, 0, 0, 0, 0, 0, 0},
+ /* num_flush_ops = */ 0,
+ /* flush_ops = */
+ /* op_code: type: idx: flag: size: order_ptr: */
+ {{FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL}},
+ /* expected_deserialized = */ TRUE,
+ /* expected_serialized = */ TRUE,
+ /* expected_destroyed = */ FALSE};
+ spec[3] = (struct fo_flush_cache_test_spec){
+ /* entry_num = */ 3,
+ /* entry_type = */ PICO_ENTRY_TYPE,
+ /* entry_index = */ 1,
+ /* insert_flag = */ FALSE,
+ /* flags = */ H5C__NO_FLAGS_SET,
+ /* resize_flag = */ FALSE,
+ /* new_size = */ 0,
+ /* num_pins = */ 0,
+ /* pin_type = */ {0, 0, 0, 0, 0, 0, 0, 0},
+ /* pin_idx = */ {0, 0, 0, 0, 0, 0, 0, 0},
+ /* num_flush_ops = */ 0,
+ /* flush_ops = */
+ /* op_code: type: idx: flag: size: order_ptr: */
+ {{FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL}},
+ /* expected_deserialized = */ TRUE,
+ /* expected_serialized = */ FALSE,
+ /* expected_destroyed = */ FALSE};
+ spec[4] = (struct fo_flush_cache_test_spec){
+ /* entry_num = */ 4,
+ /* entry_type = */ PICO_ENTRY_TYPE,
+ /* entry_index = */ 10,
+ /* insert_flag = */ FALSE,
+ /* flags = */ H5C__DIRTIED_FLAG,
+ /* resize_flag = */ FALSE,
+ /* new_size = */ 0,
+ /* num_pins = */ 0,
+ /* pin_type = */ {0, 0, 0, 0, 0, 0, 0, 0},
+ /* pin_idx = */ {0, 0, 0, 0, 0, 0, 0, 0},
+ /* num_flush_ops = */ 1,
+ /* flush_ops = */
+ /* op_code: type: idx: flag: size: order_ptr: */
+ {{FLUSH_OP__DIRTY, PICO_ENTRY_TYPE, 0, FALSE, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL}},
+ /* expected_deserialized = */ TRUE,
+ /* expected_serialized = */ TRUE,
+ /* expected_destroyed = */ FALSE};
+ spec[5] = (struct fo_flush_cache_test_spec){
+ /* entry_num = */ 5,
+ /* entry_type = */ PICO_ENTRY_TYPE,
+ /* entry_index = */ 20,
+ /* insert_flag = */ FALSE,
+ /* flags = */ H5C__DIRTIED_FLAG,
+ /* resize_flag = */ FALSE,
+ /* new_size = */ 0,
+ /* num_pins = */ 0,
+ /* pin_type = */ {0, 0, 0, 0, 0, 0, 0, 0},
+ /* pin_idx = */ {0, 0, 0, 0, 0, 0, 0, 0},
+ /* num_flush_ops = */ 1,
+ /* flush_ops = */
+ /* op_code: type: idx: flag: size: order_ptr: */
+ {{FLUSH_OP__DIRTY, PICO_ENTRY_TYPE, 0, FALSE, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL}},
+ /* expected_deserialized = */ TRUE,
+ /* expected_serialized = */ TRUE,
+ /* expected_destroyed = */ FALSE};
+
+ checks[0] = (struct fo_flush_entry_check){/* entry_num = */ 0,
/* entry_type = */ VARIABLE_ENTRY_TYPE,
/* entry_index = */ 0,
/* expected_size = */ VARIABLE_ENTRY_SIZE / 4,
/* in_cache = */ TRUE,
/* at_main_addr = */ FALSE,
- /* is_dirty = */ FALSE,
+ /* is_dirty = */ FALSE,
/* is_protected = */ FALSE,
/* is_pinned = */ FALSE,
/* expected_deserialized = */ TRUE,
/* expected_serialized = */ TRUE,
- /* expected_destroyed = */ FALSE},
- {/* entry_num = */ 1,
+ /* expected_destroyed = */ FALSE};
+ checks[1] = (struct fo_flush_entry_check){/* entry_num = */ 1,
/* entry_type = */ VARIABLE_ENTRY_TYPE,
/* entry_index = */ 2,
/* expected_size = */ VARIABLE_ENTRY_SIZE / 2,
/* in_cache = */ TRUE,
/* at_main_addr = */ FALSE,
- /* is_dirty = */ FALSE,
+ /* is_dirty = */ FALSE,
/* is_protected = */ FALSE,
/* is_pinned = */ FALSE,
/* expected_deserialized = */ TRUE,
/* expected_serialized = */ TRUE,
- /* expected_destroyed = */ FALSE},
- {/* entry_num = */ 2,
+ /* expected_destroyed = */ FALSE};
+ checks[2] = (struct fo_flush_entry_check){/* entry_num = */ 2,
/* entry_type = */ VARIABLE_ENTRY_TYPE,
/* entry_index = */ 10,
/* expected_size = */ VARIABLE_ENTRY_SIZE / 4,
/* in_cache = */ TRUE,
/* at_main_addr = */ FALSE,
- /* is_dirty = */ FALSE,
+ /* is_dirty = */ FALSE,
/* is_protected = */ FALSE,
/* is_pinned = */ FALSE,
/* expected_deserialized = */ TRUE,
/* expected_serialized = */ TRUE,
- /* expected_destroyed = */ FALSE},
- {/* entry_num = */ 3,
+ /* expected_destroyed = */ FALSE};
+ checks[3] = (struct fo_flush_entry_check){/* entry_num = */ 3,
/* entry_type = */ VARIABLE_ENTRY_TYPE,
/* entry_index = */ 12,
/* expected_size = */ VARIABLE_ENTRY_SIZE / 2,
/* in_cache = */ TRUE,
/* at_main_addr = */ FALSE,
- /* is_dirty = */ FALSE,
+ /* is_dirty = */ FALSE,
/* is_protected = */ FALSE,
/* is_pinned = */ FALSE,
/* expected_deserialized = */ TRUE,
/* expected_serialized = */ TRUE,
- /* expected_destroyed = */ FALSE}};
+ /* expected_destroyed = */ FALSE};
check_flush_cache__flush_op_test(file_ptr, test_num, flush_flags, spec_size, spec,
init_expected_index_len, init_expected_index_size,
@@ -6414,219 +6537,229 @@ check_flush_cache__flush_ops(H5F_t *file_ptr)
* Also load entries that have flush ops on entries that are in
* cache.
*/
- int test_num = 23;
- unsigned int flush_flags = H5C__FLUSH_INVALIDATE_FLAG;
- int spec_size = 6;
- unsigned init_expected_index_len = 6;
- size_t init_expected_index_size = (2 * VARIABLE_ENTRY_SIZE) + (4 * PICO_ENTRY_SIZE);
- unsigned expected_index_len = 0;
- size_t expected_index_size = 0;
- struct fo_flush_cache_test_spec spec[6] = {
- {/* entry_num = */ 0,
- /* entry_type = */ VARIABLE_ENTRY_TYPE,
- /* entry_index = */ 1,
- /* insert_flag = */ FALSE,
- /* flags = */ H5C__DIRTIED_FLAG,
- /* resize_flag = */ FALSE,
- /* new_size = */ 0,
- /* num_pins = */ 0,
- /* pin_type = */ {0, 0, 0, 0, 0, 0, 0, 0},
- /* pin_idx = */ {0, 0, 0, 0, 0, 0, 0, 0},
- /* num_flush_ops = */ 6,
- /* flush_ops = */
- /* op_code: type: idx: flag: size: order_ptr: */
- {{FLUSH_OP__RESIZE, VARIABLE_ENTRY_TYPE, 0, FALSE, VARIABLE_ENTRY_SIZE / 4, NULL},
- {FLUSH_OP__DIRTY, VARIABLE_ENTRY_TYPE, 0, FALSE, 0, NULL},
- {FLUSH_OP__MOVE, VARIABLE_ENTRY_TYPE, 0, FALSE, 0, NULL},
- {FLUSH_OP__DIRTY, VARIABLE_ENTRY_TYPE, 2, FALSE, 0, NULL},
- {FLUSH_OP__RESIZE, VARIABLE_ENTRY_TYPE, 2, FALSE, VARIABLE_ENTRY_SIZE / 2, NULL},
- {FLUSH_OP__MOVE, VARIABLE_ENTRY_TYPE, 2, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL}},
- /* expected_deserialized = */ TRUE,
- /* expected_serialized = */ TRUE,
- /* expected_destroyed = */ TRUE},
- {/* entry_num = */ 1,
- /* entry_type = */ VARIABLE_ENTRY_TYPE,
- /* entry_index = */ 11,
- /* insert_flag = */ FALSE,
- /* flags = */ H5C__DIRTIED_FLAG,
- /* resize_flag = */ FALSE,
- /* new_size = */ 0,
- /* num_pins = */ 0,
- /* pin_type = */ {0, 0, 0, 0, 0, 0, 0, 0},
- /* pin_idx = */ {0, 0, 0, 0, 0, 0, 0, 0},
- /* num_flush_ops = */ 6,
- /* flush_ops = */
- /* op_code: type: idx: flag: size: order_ptr: */
- {{FLUSH_OP__RESIZE, VARIABLE_ENTRY_TYPE, 10, FALSE, VARIABLE_ENTRY_SIZE / 4, NULL},
- {FLUSH_OP__DIRTY, VARIABLE_ENTRY_TYPE, 10, FALSE, 0, NULL},
- {FLUSH_OP__MOVE, VARIABLE_ENTRY_TYPE, 10, FALSE, 0, NULL},
- {FLUSH_OP__DIRTY, VARIABLE_ENTRY_TYPE, 12, FALSE, 0, NULL},
- {FLUSH_OP__RESIZE, VARIABLE_ENTRY_TYPE, 12, FALSE, VARIABLE_ENTRY_SIZE / 2, NULL},
- {FLUSH_OP__MOVE, VARIABLE_ENTRY_TYPE, 12, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL}},
- /* expected_deserialized = */ TRUE,
- /* expected_serialized = */ TRUE,
- /* expected_destroyed = */ TRUE},
- {/* entry_num = */ 2,
- /* entry_type = */ PICO_ENTRY_TYPE,
- /* entry_index = */ 0,
- /* insert_flag = */ FALSE,
- /* flags = */ H5C__NO_FLAGS_SET,
- /* resize_flag = */ FALSE,
- /* new_size = */ 0,
- /* num_pins = */ 0,
- /* pin_type = */ {0, 0, 0, 0, 0, 0, 0, 0},
- /* pin_idx = */ {0, 0, 0, 0, 0, 0, 0, 0},
- /* num_flush_ops = */ 0,
- /* flush_ops = */
- /* op_code: type: idx: flag: size: order_ptr: */
- {{FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL}},
- /* expected_deserialized = */ TRUE,
- /* expected_serialized = */ TRUE,
- /* expected_destroyed = */ TRUE},
- {/* entry_num = */ 3,
- /* entry_type = */ PICO_ENTRY_TYPE,
- /* entry_index = */ 1,
- /* insert_flag = */ FALSE,
- /* flags = */ H5C__NO_FLAGS_SET,
- /* resize_flag = */ FALSE,
- /* new_size = */ 0,
- /* num_pins = */ 0,
- /* pin_type = */ {0, 0, 0, 0, 0, 0, 0, 0},
- /* pin_idx = */ {0, 0, 0, 0, 0, 0, 0, 0},
- /* num_flush_ops = */ 0,
- /* flush_ops = */
- /* op_code: type: idx: flag: size: order_ptr: */
- {{FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL}},
- /* expected_deserialized = */ TRUE,
- /* expected_serialized = */ FALSE,
- /* expected_destroyed = */ TRUE},
- {/* entry_num = */ 4,
- /* entry_type = */ PICO_ENTRY_TYPE,
- /* entry_index = */ 10,
- /* insert_flag = */ FALSE,
- /* flags = */ H5C__DIRTIED_FLAG,
- /* resize_flag = */ FALSE,
- /* new_size = */ 0,
- /* num_pins = */ 0,
- /* pin_type = */ {0, 0, 0, 0, 0, 0, 0, 0},
- /* pin_idx = */ {0, 0, 0, 0, 0, 0, 0, 0},
- /* num_flush_ops = */ 1,
- /* flush_ops = */
- /* op_code: type: idx: flag: size: order_ptr: */
- {{FLUSH_OP__DIRTY, PICO_ENTRY_TYPE, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL}},
- /* expected_deserialized = */ TRUE,
- /* expected_serialized = */ TRUE,
- /* expected_destroyed = */ TRUE},
- {/* entry_num = */ 5,
- /* entry_type = */ PICO_ENTRY_TYPE,
- /* entry_index = */ 20,
- /* insert_flag = */ FALSE,
- /* flags = */ H5C__DIRTIED_FLAG,
- /* resize_flag = */ FALSE,
- /* new_size = */ 0,
- /* num_pins = */ 0,
- /* pin_type = */ {0, 0, 0, 0, 0, 0, 0, 0},
- /* pin_idx = */ {0, 0, 0, 0, 0, 0, 0, 0},
- /* num_flush_ops = */ 1,
- /* flush_ops = */
- /* op_code: type: idx: flag: size: order_ptr: */
- {{FLUSH_OP__DIRTY, PICO_ENTRY_TYPE, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL}},
- /* expected_deserialized = */ TRUE,
- /* expected_serialized = */ TRUE,
- /* expected_destroyed = */ TRUE}};
- int check_size = 4;
- struct fo_flush_entry_check checks[4] = {{/* entry_num = */ 0,
+ int test_num = 23;
+ unsigned int flush_flags = H5C__FLUSH_INVALIDATE_FLAG;
+ int spec_size = 6;
+ int check_size = 4;
+ unsigned init_expected_index_len = 6;
+ size_t init_expected_index_size = (2 * VARIABLE_ENTRY_SIZE) + (4 * PICO_ENTRY_SIZE);
+ unsigned expected_index_len = 0;
+ size_t expected_index_size = 0;
+
+ HDassert(spec_size <= max_num_spec);
+ HDassert(check_size <= max_num_check);
+
+ spec[0] = (struct fo_flush_cache_test_spec){
+ /* entry_num = */ 0,
+ /* entry_type = */ VARIABLE_ENTRY_TYPE,
+ /* entry_index = */ 1,
+ /* insert_flag = */ FALSE,
+ /* flags = */ H5C__DIRTIED_FLAG,
+ /* resize_flag = */ FALSE,
+ /* new_size = */ 0,
+ /* num_pins = */ 0,
+ /* pin_type = */ {0, 0, 0, 0, 0, 0, 0, 0},
+ /* pin_idx = */ {0, 0, 0, 0, 0, 0, 0, 0},
+ /* num_flush_ops = */ 6,
+ /* flush_ops = */
+ /* op_code: type: idx: flag: size: order_ptr: */
+ {{FLUSH_OP__RESIZE, VARIABLE_ENTRY_TYPE, 0, FALSE, VARIABLE_ENTRY_SIZE / 4, NULL},
+ {FLUSH_OP__DIRTY, VARIABLE_ENTRY_TYPE, 0, FALSE, 0, NULL},
+ {FLUSH_OP__MOVE, VARIABLE_ENTRY_TYPE, 0, FALSE, 0, NULL},
+ {FLUSH_OP__DIRTY, VARIABLE_ENTRY_TYPE, 2, FALSE, 0, NULL},
+ {FLUSH_OP__RESIZE, VARIABLE_ENTRY_TYPE, 2, FALSE, VARIABLE_ENTRY_SIZE / 2, NULL},
+ {FLUSH_OP__MOVE, VARIABLE_ENTRY_TYPE, 2, FALSE, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL}},
+ /* expected_deserialized = */ TRUE,
+ /* expected_serialized = */ TRUE,
+ /* expected_destroyed = */ TRUE};
+ spec[1] = (struct fo_flush_cache_test_spec){
+ /* entry_num = */ 1,
+ /* entry_type = */ VARIABLE_ENTRY_TYPE,
+ /* entry_index = */ 11,
+ /* insert_flag = */ FALSE,
+ /* flags = */ H5C__DIRTIED_FLAG,
+ /* resize_flag = */ FALSE,
+ /* new_size = */ 0,
+ /* num_pins = */ 0,
+ /* pin_type = */ {0, 0, 0, 0, 0, 0, 0, 0},
+ /* pin_idx = */ {0, 0, 0, 0, 0, 0, 0, 0},
+ /* num_flush_ops = */ 6,
+ /* flush_ops = */
+ /* op_code: type: idx: flag: size: order_ptr: */
+ {{FLUSH_OP__RESIZE, VARIABLE_ENTRY_TYPE, 10, FALSE, VARIABLE_ENTRY_SIZE / 4, NULL},
+ {FLUSH_OP__DIRTY, VARIABLE_ENTRY_TYPE, 10, FALSE, 0, NULL},
+ {FLUSH_OP__MOVE, VARIABLE_ENTRY_TYPE, 10, FALSE, 0, NULL},
+ {FLUSH_OP__DIRTY, VARIABLE_ENTRY_TYPE, 12, FALSE, 0, NULL},
+ {FLUSH_OP__RESIZE, VARIABLE_ENTRY_TYPE, 12, FALSE, VARIABLE_ENTRY_SIZE / 2, NULL},
+ {FLUSH_OP__MOVE, VARIABLE_ENTRY_TYPE, 12, FALSE, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL}},
+ /* expected_deserialized = */ TRUE,
+ /* expected_serialized = */ TRUE,
+ /* expected_destroyed = */ TRUE};
+ spec[2] = (struct fo_flush_cache_test_spec){
+ /* entry_num = */ 2,
+ /* entry_type = */ PICO_ENTRY_TYPE,
+ /* entry_index = */ 0,
+ /* insert_flag = */ FALSE,
+ /* flags = */ H5C__NO_FLAGS_SET,
+ /* resize_flag = */ FALSE,
+ /* new_size = */ 0,
+ /* num_pins = */ 0,
+ /* pin_type = */ {0, 0, 0, 0, 0, 0, 0, 0},
+ /* pin_idx = */ {0, 0, 0, 0, 0, 0, 0, 0},
+ /* num_flush_ops = */ 0,
+ /* flush_ops = */
+ /* op_code: type: idx: flag: size: order_ptr: */
+ {{FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL}},
+ /* expected_deserialized = */ TRUE,
+ /* expected_serialized = */ TRUE,
+ /* expected_destroyed = */ TRUE};
+ spec[3] = (struct fo_flush_cache_test_spec){
+ /* entry_num = */ 3,
+ /* entry_type = */ PICO_ENTRY_TYPE,
+ /* entry_index = */ 1,
+ /* insert_flag = */ FALSE,
+ /* flags = */ H5C__NO_FLAGS_SET,
+ /* resize_flag = */ FALSE,
+ /* new_size = */ 0,
+ /* num_pins = */ 0,
+ /* pin_type = */ {0, 0, 0, 0, 0, 0, 0, 0},
+ /* pin_idx = */ {0, 0, 0, 0, 0, 0, 0, 0},
+ /* num_flush_ops = */ 0,
+ /* flush_ops = */
+ /* op_code: type: idx: flag: size: order_ptr: */
+ {{FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL}},
+ /* expected_deserialized = */ TRUE,
+ /* expected_serialized = */ FALSE,
+ /* expected_destroyed = */ TRUE};
+ spec[4] = (struct fo_flush_cache_test_spec){
+ /* entry_num = */ 4,
+ /* entry_type = */ PICO_ENTRY_TYPE,
+ /* entry_index = */ 10,
+ /* insert_flag = */ FALSE,
+ /* flags = */ H5C__DIRTIED_FLAG,
+ /* resize_flag = */ FALSE,
+ /* new_size = */ 0,
+ /* num_pins = */ 0,
+ /* pin_type = */ {0, 0, 0, 0, 0, 0, 0, 0},
+ /* pin_idx = */ {0, 0, 0, 0, 0, 0, 0, 0},
+ /* num_flush_ops = */ 1,
+ /* flush_ops = */
+ /* op_code: type: idx: flag: size: order_ptr: */
+ {{FLUSH_OP__DIRTY, PICO_ENTRY_TYPE, 0, FALSE, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL}},
+ /* expected_deserialized = */ TRUE,
+ /* expected_serialized = */ TRUE,
+ /* expected_destroyed = */ TRUE};
+ spec[5] = (struct fo_flush_cache_test_spec){
+ /* entry_num = */ 5,
+ /* entry_type = */ PICO_ENTRY_TYPE,
+ /* entry_index = */ 20,
+ /* insert_flag = */ FALSE,
+ /* flags = */ H5C__DIRTIED_FLAG,
+ /* resize_flag = */ FALSE,
+ /* new_size = */ 0,
+ /* num_pins = */ 0,
+ /* pin_type = */ {0, 0, 0, 0, 0, 0, 0, 0},
+ /* pin_idx = */ {0, 0, 0, 0, 0, 0, 0, 0},
+ /* num_flush_ops = */ 1,
+ /* flush_ops = */
+ /* op_code: type: idx: flag: size: order_ptr: */
+ {{FLUSH_OP__DIRTY, PICO_ENTRY_TYPE, 0, FALSE, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL}},
+ /* expected_deserialized = */ TRUE,
+ /* expected_serialized = */ TRUE,
+ /* expected_destroyed = */ TRUE};
+
+ checks[0] = (struct fo_flush_entry_check){/* entry_num = */ 0,
/* entry_type = */ VARIABLE_ENTRY_TYPE,
/* entry_index = */ 0,
/* expected_size = */ VARIABLE_ENTRY_SIZE / 4,
/* in_cache = */ FALSE,
/* at_main_addr = */ FALSE,
- /* is_dirty = */ FALSE,
+ /* is_dirty = */ FALSE,
/* is_protected = */ FALSE,
/* is_pinned = */ FALSE,
/* expected_deserialized = */ TRUE,
/* expected_serialized = */ TRUE,
- /* expected_destroyed = */ TRUE},
- {/* entry_num = */ 1,
+ /* expected_destroyed = */ TRUE};
+ checks[1] = (struct fo_flush_entry_check){/* entry_num = */ 1,
/* entry_type = */ VARIABLE_ENTRY_TYPE,
/* entry_index = */ 2,
/* expected_size = */ VARIABLE_ENTRY_SIZE / 2,
/* in_cache = */ FALSE,
/* at_main_addr = */ FALSE,
- /* is_dirty = */ FALSE,
+ /* is_dirty = */ FALSE,
/* is_protected = */ FALSE,
/* is_pinned = */ FALSE,
/* expected_deserialized = */ TRUE,
/* expected_serialized = */ TRUE,
- /* expected_destroyed = */ TRUE},
- {/* entry_num = */ 2,
+ /* expected_destroyed = */ TRUE};
+ checks[2] = (struct fo_flush_entry_check){/* entry_num = */ 2,
/* entry_type = */ VARIABLE_ENTRY_TYPE,
/* entry_index = */ 10,
/* expected_size = */ VARIABLE_ENTRY_SIZE / 4,
/* in_cache = */ FALSE,
/* at_main_addr = */ FALSE,
- /* is_dirty = */ FALSE,
+ /* is_dirty = */ FALSE,
/* is_protected = */ FALSE,
/* is_pinned = */ FALSE,
/* expected_deserialized = */ TRUE,
/* expected_serialized = */ TRUE,
- /* expected_destroyed = */ TRUE},
- {/* entry_num = */ 3,
+ /* expected_destroyed = */ TRUE};
+ checks[3] = (struct fo_flush_entry_check){/* entry_num = */ 3,
/* entry_type = */ VARIABLE_ENTRY_TYPE,
/* entry_index = */ 12,
/* expected_size = */ VARIABLE_ENTRY_SIZE / 2,
/* in_cache = */ FALSE,
/* at_main_addr = */ FALSE,
- /* is_dirty = */ FALSE,
+ /* is_dirty = */ FALSE,
/* is_protected = */ FALSE,
/* is_pinned = */ FALSE,
/* expected_deserialized = */ TRUE,
/* expected_serialized = */ TRUE,
- /* expected_destroyed = */ TRUE}};
+ /* expected_destroyed = */ TRUE};
check_flush_cache__flush_op_test(file_ptr, test_num, flush_flags, spec_size, spec,
init_expected_index_len, init_expected_index_size,
@@ -6643,105 +6776,112 @@ check_flush_cache__flush_ops(H5F_t *file_ptr)
/* Pico entries 50 and 150 pin pico entry 100, and also dirty
* pico entry 100 on flush.
*/
- int test_num = 24;
- unsigned int flush_flags = H5C__NO_FLAGS_SET;
- int spec_size = 3;
- unsigned init_expected_index_len = 3;
- size_t init_expected_index_size = 3 * PICO_ENTRY_SIZE;
- unsigned expected_index_len = 3;
- size_t expected_index_size = 3 * PICO_ENTRY_SIZE;
- struct fo_flush_cache_test_spec spec[3] = {
- {/* entry_num = */ 0,
- /* entry_type = */ PICO_ENTRY_TYPE,
- /* entry_index = */ 100,
- /* insert_flag = */ FALSE,
- /* flags = */ H5C__NO_FLAGS_SET,
- /* resize_flag = */ FALSE,
- /* new_size = */ 0,
- /* num_pins = */ 0,
- /* pin_type = */ {0, 0, 0, 0, 0, 0, 0, 0},
- /* pin_idx = */ {0, 0, 0, 0, 0, 0, 0, 0},
- /* num_flush_ops = */ 0,
- /* flush_ops = */
- /* op_code: type: idx: flag: size: order_ptr: */
- {{FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL}},
- /* expected_deserialized = */ TRUE,
- /* expected_serialized = */ TRUE,
- /* expected_destroyed = */ FALSE},
- {/* entry_num = */ 1,
- /* entry_type = */ PICO_ENTRY_TYPE,
- /* entry_index = */ 50,
- /* insert_flag = */ FALSE,
- /* flags = */ H5C__DIRTIED_FLAG,
- /* resize_flag = */ FALSE,
- /* new_size = */ 0,
- /* num_pins = */ 1,
- /* pin_type = */ {PICO_ENTRY_TYPE, 0, 0, 0, 0, 0, 0, 0},
- /* pin_idx = */ {100, 0, 0, 0, 0, 0, 0, 0},
- /* num_flush_ops = */ 1,
- /* flush_ops = */
- /* op_code: type: idx: flag: size: order_ptr: */
- {{FLUSH_OP__DIRTY, PICO_ENTRY_TYPE, 100, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL}},
- /* expected_deserialized = */ TRUE,
- /* expected_serialized = */ TRUE,
- /* expected_destroyed = */ FALSE},
- {/* entry_num = */ 2,
- /* entry_type = */ PICO_ENTRY_TYPE,
- /* entry_index = */ 150,
- /* insert_flag = */ TRUE,
- /* flags = */ H5C__NO_FLAGS_SET,
- /* resize_flag = */ FALSE,
- /* new_size = */ 0,
- /* num_pins = */ 1,
- /* pin_type = */ {PICO_ENTRY_TYPE, 0, 0, 0, 0, 0, 0, 0},
- /* pin_idx = */ {100, 0, 0, 0, 0, 0, 0, 0},
- /* num_flush_ops = */ 1,
- /* flush_ops = */
- /* op_code: type: idx: flag: size: order_ptr: */
- {{FLUSH_OP__DIRTY, PICO_ENTRY_TYPE, 100, FALSE, 0, NULL},
- {FLUSH_OP__DIRTY, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL}},
- /* expected_deserialized = */ FALSE,
- /* expected_serialized = */ TRUE,
- /* expected_destroyed = */ FALSE}};
- int check_size = 0;
- struct fo_flush_entry_check checks[1] = {{/* entry_num = */ 0,
+ int test_num = 24;
+ unsigned int flush_flags = H5C__NO_FLAGS_SET;
+ int spec_size = 3;
+ int check_size = 0;
+ unsigned init_expected_index_len = 3;
+ size_t init_expected_index_size = 3 * PICO_ENTRY_SIZE;
+ unsigned expected_index_len = 3;
+ size_t expected_index_size = 3 * PICO_ENTRY_SIZE;
+
+ HDassert(spec_size <= max_num_spec);
+ HDassert(check_size <= max_num_check);
+
+ spec[0] = (struct fo_flush_cache_test_spec){
+ /* entry_num = */ 0,
+ /* entry_type = */ PICO_ENTRY_TYPE,
+ /* entry_index = */ 100,
+ /* insert_flag = */ FALSE,
+ /* flags = */ H5C__NO_FLAGS_SET,
+ /* resize_flag = */ FALSE,
+ /* new_size = */ 0,
+ /* num_pins = */ 0,
+ /* pin_type = */ {0, 0, 0, 0, 0, 0, 0, 0},
+ /* pin_idx = */ {0, 0, 0, 0, 0, 0, 0, 0},
+ /* num_flush_ops = */ 0,
+ /* flush_ops = */
+ /* op_code: type: idx: flag: size: order_ptr: */
+ {{FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL}},
+ /* expected_deserialized = */ TRUE,
+ /* expected_serialized = */ TRUE,
+ /* expected_destroyed = */ FALSE};
+ spec[1] = (struct fo_flush_cache_test_spec){
+ /* entry_num = */ 1,
+ /* entry_type = */ PICO_ENTRY_TYPE,
+ /* entry_index = */ 50,
+ /* insert_flag = */ FALSE,
+ /* flags = */ H5C__DIRTIED_FLAG,
+ /* resize_flag = */ FALSE,
+ /* new_size = */ 0,
+ /* num_pins = */ 1,
+ /* pin_type = */ {PICO_ENTRY_TYPE, 0, 0, 0, 0, 0, 0, 0},
+ /* pin_idx = */ {100, 0, 0, 0, 0, 0, 0, 0},
+ /* num_flush_ops = */ 1,
+ /* flush_ops = */
+ /* op_code: type: idx: flag: size: order_ptr: */
+ {{FLUSH_OP__DIRTY, PICO_ENTRY_TYPE, 100, FALSE, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL}},
+ /* expected_deserialized = */ TRUE,
+ /* expected_serialized = */ TRUE,
+ /* expected_destroyed = */ FALSE};
+ spec[2] = (struct fo_flush_cache_test_spec){
+ /* entry_num = */ 2,
+ /* entry_type = */ PICO_ENTRY_TYPE,
+ /* entry_index = */ 150,
+ /* insert_flag = */ TRUE,
+ /* flags = */ H5C__NO_FLAGS_SET,
+ /* resize_flag = */ FALSE,
+ /* new_size = */ 0,
+ /* num_pins = */ 1,
+ /* pin_type = */ {PICO_ENTRY_TYPE, 0, 0, 0, 0, 0, 0, 0},
+ /* pin_idx = */ {100, 0, 0, 0, 0, 0, 0, 0},
+ /* num_flush_ops = */ 1,
+ /* flush_ops = */
+ /* op_code: type: idx: flag: size: order_ptr: */
+ {{FLUSH_OP__DIRTY, PICO_ENTRY_TYPE, 100, FALSE, 0, NULL},
+ {FLUSH_OP__DIRTY, 0, 0, FALSE, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL}},
+ /* expected_deserialized = */ FALSE,
+ /* expected_serialized = */ TRUE,
+ /* expected_destroyed = */ FALSE};
+
+ checks[0] = (struct fo_flush_entry_check){/* entry_num = */ 0,
/* entry_type = */ 0,
/* entry_index = */ 0,
/* expected_size = */ (size_t)0,
/* in_cache = */ FALSE,
/* at_main_addr = */ FALSE,
- /* is_dirty = */ FALSE,
+ /* is_dirty = */ FALSE,
/* is_protected = */ FALSE,
/* is_pinned = */ FALSE,
/* expected_deserialized = */ FALSE,
/* expected_serialized = */ FALSE,
- /* expected_destroyed = */ FALSE}};
+ /* expected_destroyed = */ FALSE};
check_flush_cache__flush_op_test(file_ptr, test_num, flush_flags, spec_size, spec,
init_expected_index_len, init_expected_index_size,
@@ -6755,105 +6895,112 @@ check_flush_cache__flush_ops(H5F_t *file_ptr)
* Pico entries 50 and 150 pin pico entry 100, and also dirty
* pico entry 100 on flush.
*/
- int test_num = 25;
- unsigned int flush_flags = H5C__FLUSH_INVALIDATE_FLAG;
- int spec_size = 3;
- unsigned init_expected_index_len = 3;
- size_t init_expected_index_size = 3 * PICO_ENTRY_SIZE;
- unsigned expected_index_len = 0;
- size_t expected_index_size = (size_t)0;
- struct fo_flush_cache_test_spec spec[3] = {
- {/* entry_num = */ 0,
- /* entry_type = */ PICO_ENTRY_TYPE,
- /* entry_index = */ 100,
- /* insert_flag = */ FALSE,
- /* flags = */ H5C__NO_FLAGS_SET,
- /* resize_flag = */ FALSE,
- /* new_size = */ 0,
- /* num_pins = */ 0,
- /* pin_type = */ {0, 0, 0, 0, 0, 0, 0, 0},
- /* pin_idx = */ {0, 0, 0, 0, 0, 0, 0, 0},
- /* num_flush_ops = */ 0,
- /* flush_ops = */
- /* op_code: type: idx: flag: size: order_ptr: */
- {{FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL}},
- /* expected_deserialized = */ TRUE,
- /* expected_serialized = */ TRUE,
- /* expected_destroyed = */ TRUE},
- {/* entry_num = */ 1,
- /* entry_type = */ PICO_ENTRY_TYPE,
- /* entry_index = */ 50,
- /* insert_flag = */ FALSE,
- /* flags = */ H5C__DIRTIED_FLAG,
- /* resize_flag = */ FALSE,
- /* new_size = */ 0,
- /* num_pins = */ 1,
- /* pin_type = */ {PICO_ENTRY_TYPE, 0, 0, 0, 0, 0, 0, 0},
- /* pin_idx = */ {100, 0, 0, 0, 0, 0, 0, 0},
- /* num_flush_ops = */ 1,
- /* flush_ops = */
- /* op_code: type: idx: flag: size: order_ptr: */
- {{FLUSH_OP__DIRTY, PICO_ENTRY_TYPE, 100, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL}},
- /* expected_deserialized = */ TRUE,
- /* expected_serialized = */ TRUE,
- /* expected_destroyed = */ TRUE},
- {/* entry_num = */ 2,
- /* entry_type = */ PICO_ENTRY_TYPE,
- /* entry_index = */ 150,
- /* insert_flag = */ TRUE,
- /* flags = */ H5C__NO_FLAGS_SET,
- /* resize_flag = */ FALSE,
- /* new_size = */ 0,
- /* num_pins = */ 1,
- /* pin_type = */ {PICO_ENTRY_TYPE, 0, 0, 0, 0, 0, 0, 0},
- /* pin_idx = */ {100, 0, 0, 0, 0, 0, 0, 0},
- /* num_flush_ops = */ 1,
- /* flush_ops = */
- /* op_code: type: idx: flag: size: order_ptr: */
- {{FLUSH_OP__DIRTY, PICO_ENTRY_TYPE, 100, FALSE, 0, NULL},
- {FLUSH_OP__DIRTY, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL}},
- /* expected_deserialized = */ FALSE,
- /* expected_serialized = */ TRUE,
- /* expected_destroyed = */ TRUE}};
- int check_size = 0;
- struct fo_flush_entry_check checks[1] = {{/* entry_num = */ 0,
+ int test_num = 25;
+ unsigned int flush_flags = H5C__FLUSH_INVALIDATE_FLAG;
+ int spec_size = 3;
+ int check_size = 0;
+ unsigned init_expected_index_len = 3;
+ size_t init_expected_index_size = 3 * PICO_ENTRY_SIZE;
+ unsigned expected_index_len = 0;
+ size_t expected_index_size = (size_t)0;
+
+ HDassert(spec_size <= max_num_spec);
+ HDassert(check_size <= max_num_check);
+
+ spec[0] = (struct fo_flush_cache_test_spec){
+ /* entry_num = */ 0,
+ /* entry_type = */ PICO_ENTRY_TYPE,
+ /* entry_index = */ 100,
+ /* insert_flag = */ FALSE,
+ /* flags = */ H5C__NO_FLAGS_SET,
+ /* resize_flag = */ FALSE,
+ /* new_size = */ 0,
+ /* num_pins = */ 0,
+ /* pin_type = */ {0, 0, 0, 0, 0, 0, 0, 0},
+ /* pin_idx = */ {0, 0, 0, 0, 0, 0, 0, 0},
+ /* num_flush_ops = */ 0,
+ /* flush_ops = */
+ /* op_code: type: idx: flag: size: order_ptr: */
+ {{FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL}},
+ /* expected_deserialized = */ TRUE,
+ /* expected_serialized = */ TRUE,
+ /* expected_destroyed = */ TRUE};
+ spec[1] = (struct fo_flush_cache_test_spec){
+ /* entry_num = */ 1,
+ /* entry_type = */ PICO_ENTRY_TYPE,
+ /* entry_index = */ 50,
+ /* insert_flag = */ FALSE,
+ /* flags = */ H5C__DIRTIED_FLAG,
+ /* resize_flag = */ FALSE,
+ /* new_size = */ 0,
+ /* num_pins = */ 1,
+ /* pin_type = */ {PICO_ENTRY_TYPE, 0, 0, 0, 0, 0, 0, 0},
+ /* pin_idx = */ {100, 0, 0, 0, 0, 0, 0, 0},
+ /* num_flush_ops = */ 1,
+ /* flush_ops = */
+ /* op_code: type: idx: flag: size: order_ptr: */
+ {{FLUSH_OP__DIRTY, PICO_ENTRY_TYPE, 100, FALSE, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL}},
+ /* expected_deserialized = */ TRUE,
+ /* expected_serialized = */ TRUE,
+ /* expected_destroyed = */ TRUE};
+ spec[2] = (struct fo_flush_cache_test_spec){
+ /* entry_num = */ 2,
+ /* entry_type = */ PICO_ENTRY_TYPE,
+ /* entry_index = */ 150,
+ /* insert_flag = */ TRUE,
+ /* flags = */ H5C__NO_FLAGS_SET,
+ /* resize_flag = */ FALSE,
+ /* new_size = */ 0,
+ /* num_pins = */ 1,
+ /* pin_type = */ {PICO_ENTRY_TYPE, 0, 0, 0, 0, 0, 0, 0},
+ /* pin_idx = */ {100, 0, 0, 0, 0, 0, 0, 0},
+ /* num_flush_ops = */ 1,
+ /* flush_ops = */
+ /* op_code: type: idx: flag: size: order_ptr: */
+ {{FLUSH_OP__DIRTY, PICO_ENTRY_TYPE, 100, FALSE, 0, NULL},
+ {FLUSH_OP__DIRTY, 0, 0, FALSE, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL}},
+ /* expected_deserialized = */ FALSE,
+ /* expected_serialized = */ TRUE,
+ /* expected_destroyed = */ TRUE};
+
+ checks[0] = (struct fo_flush_entry_check){/* entry_num = */ 0,
/* entry_type = */ 0,
/* entry_index = */ 0,
/* expected_size = */ (size_t)0,
/* in_cache = */ FALSE,
/* at_main_addr = */ FALSE,
- /* is_dirty = */ FALSE,
+ /* is_dirty = */ FALSE,
/* is_protected = */ FALSE,
/* is_pinned = */ FALSE,
/* expected_deserialized = */ FALSE,
/* expected_serialized = */ FALSE,
- /* expected_destroyed = */ FALSE}};
+ /* expected_destroyed = */ FALSE};
check_flush_cache__flush_op_test(file_ptr, test_num, flush_flags, spec_size, spec,
init_expected_index_len, init_expected_index_size,
@@ -6937,313 +7084,325 @@ check_flush_cache__flush_ops(H5F_t *file_ptr)
* dirties (VET, 650)
* dirties (VET, 750)
*/
- int test_num = 26;
- unsigned int flush_flags = H5C__NO_FLAGS_SET;
- int spec_size = 10;
- unsigned init_expected_index_len = 10;
- size_t init_expected_index_size = 10 * VARIABLE_ENTRY_SIZE;
- unsigned expected_index_len = 13;
- size_t expected_index_size = 9 * VARIABLE_ENTRY_SIZE;
- struct fo_flush_cache_test_spec spec[10] = {
- {/* entry_num = */ 0,
- /* entry_type = */ VARIABLE_ENTRY_TYPE,
- /* entry_index = */ 200,
- /* insert_flag = */ FALSE,
- /* flags = */ H5C__NO_FLAGS_SET,
- /* resize_flag = */ FALSE,
- /* new_size = */ 0,
- /* num_pins = */ 0,
- /* pin_type = */ {0, 0, 0, 0, 0, 0, 0, 0},
- /* pin_idx = */ {0, 0, 0, 0, 0, 0, 0, 0},
- /* num_flush_ops = */ 0,
- /* flush_ops = */
- /* op_code: type: idx: flag: size: order_ptr: */
- {{FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL}},
- /* expected_deserialized = */ TRUE,
- /* expected_serialized = */ TRUE,
- /* expected_destroyed = */ FALSE},
- {/* entry_num = */ 1,
- /* entry_type = */ VARIABLE_ENTRY_TYPE,
- /* entry_index = */ 2100,
- /* insert_flag = */ FALSE,
- /* flags = */ H5C__NO_FLAGS_SET,
- /* resize_flag = */ FALSE,
- /* new_size = */ 0,
- /* num_pins = */ 0,
- /* pin_type = */ {0, 0, 0, 0, 0, 0, 0, 0},
- /* pin_idx = */ {0, 0, 0, 0, 0, 0, 0, 0},
- /* num_flush_ops = */ 0,
- /* flush_ops = */
- /* op_code: type: idx: flag: size: order_ptr: */
- {{FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL}},
- /* expected_deserialized = */ TRUE,
- /* expected_serialized = */ TRUE,
- /* expected_destroyed = */ FALSE},
- {/* entry_num = */ 2,
- /* entry_type = */ VARIABLE_ENTRY_TYPE,
- /* entry_index = */ 2300,
- /* insert_flag = */ TRUE,
- /* flags = */ H5C__NO_FLAGS_SET,
- /* resize_flag = */ FALSE,
- /* new_size = */ 0,
- /* num_pins = */ 0,
- /* pin_type = */ {0, 0, 0, 0, 0, 0, 0, 0},
- /* pin_idx = */ {0, 0, 0, 0, 0, 0, 0, 0},
- /* num_flush_ops = */ 0,
- /* flush_ops = */
- /* op_code: type: idx: flag: size: order_ptr: */
- {{FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL}},
- /* expected_deserialized = */ FALSE,
- /* expected_serialized = */ TRUE,
- /* expected_destroyed = */ FALSE},
- {/* entry_num = */ 3,
- /* entry_type = */ VARIABLE_ENTRY_TYPE,
- /* entry_index = */ 1000,
- /* insert_flag = */ TRUE,
- /* flags = */ H5C__NO_FLAGS_SET,
- /* resize_flag = */ FALSE,
- /* new_size = */ 0,
- /* num_pins = */ 0,
- /* pin_type = */ {0, 0, 0, 0, 0, 0, 0, 0},
- /* pin_idx = */ {0, 0, 0, 0, 0, 0, 0, 0},
- /* num_flush_ops = */ 4,
- /* flush_ops = */
- /* op_code: type: idx: flag: size: order_ptr: */
- {{FLUSH_OP__DIRTY, VARIABLE_ENTRY_TYPE, 100, FALSE, 0, NULL},
- {FLUSH_OP__RESIZE, VARIABLE_ENTRY_TYPE, 200, FALSE, VARIABLE_ENTRY_SIZE / 2, NULL},
- {FLUSH_OP__DIRTY, VARIABLE_ENTRY_TYPE, 300, FALSE, 0, NULL},
- {FLUSH_OP__MOVE, VARIABLE_ENTRY_TYPE, 300, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL}},
- /* expected_deserialized = */ FALSE,
- /* expected_serialized = */ TRUE,
- /* expected_destroyed = */ FALSE},
- {/* entry_num = */ 4,
- /* entry_type = */ VARIABLE_ENTRY_TYPE,
- /* entry_index = */ 2000,
- /* insert_flag = */ FALSE,
- /* flags = */ H5C__NO_FLAGS_SET,
- /* resize_flag = */ FALSE,
- /* new_size = */ 0,
- /* num_pins = */ 0,
- /* pin_type = */ {0, 0, 0, 0, 0, 0, 0, 0},
- /* pin_idx = */ {0, 0, 0, 0, 0, 0, 0, 0},
- /* num_flush_ops = */ 3,
- /* flush_ops = */
- /* op_code: type: idx: flag: size: order_ptr: */
- {{FLUSH_OP__DIRTY, VARIABLE_ENTRY_TYPE, 2100, FALSE, 0, NULL},
- {FLUSH_OP__RESIZE, VARIABLE_ENTRY_TYPE, 2200, FALSE, VARIABLE_ENTRY_SIZE / 2, NULL},
- {FLUSH_OP__MOVE, VARIABLE_ENTRY_TYPE, 2300, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL}},
- /* expected_deserialized = */ TRUE,
- /* expected_serialized = */ TRUE,
- /* expected_destroyed = */ FALSE},
- {/* entry_num = */ 5,
- /* entry_type = */ VARIABLE_ENTRY_TYPE,
- /* entry_index = */ 350,
- /* insert_flag = */ FALSE,
- /* flags = */ H5C__NO_FLAGS_SET,
- /* resize_flag = */ FALSE,
- /* new_size = */ 0,
- /* num_pins = */ 2,
- /* pin_type = */ {VARIABLE_ENTRY_TYPE, VARIABLE_ENTRY_TYPE, 0, 0, 0, 0, 0, 0},
- /* pin_idx = */ {1000, 2000, 0, 0, 0, 0, 0, 0},
- /* num_flush_ops = */ 3,
- /* flush_ops = */
- /* op_code: type: idx: flag: size: order_ptr: */
- {{FLUSH_OP__DIRTY, VARIABLE_ENTRY_TYPE, 1000, FALSE, 0, NULL},
- {FLUSH_OP__DIRTY, VARIABLE_ENTRY_TYPE, 2000, FALSE, 0, NULL},
- {FLUSH_OP__RESIZE, VARIABLE_ENTRY_TYPE, 350, FALSE, VARIABLE_ENTRY_SIZE / 4, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL}},
- /* expected_deserialized = */ TRUE,
- /* expected_serialized = */ TRUE,
- /* expected_destroyed = */ FALSE},
- {/* entry_num = */ 6,
- /* entry_type = */ VARIABLE_ENTRY_TYPE,
- /* entry_index = */ 450,
- /* insert_flag = */ FALSE,
- /* flags = */ H5C__DIRTIED_FLAG,
- /* resize_flag = */ FALSE,
- /* new_size = */ 0,
- /* num_pins = */ 2,
- /* pin_type = */ {VARIABLE_ENTRY_TYPE, VARIABLE_ENTRY_TYPE, 0, 0, 0, 0, 0, 0},
- /* pin_idx = */ {1000, 2000, 0, 0, 0, 0, 0, 0},
- /* num_flush_ops = */ 3,
- /* flush_ops = */
- /* op_code: type: idx: flag: size: order_ptr: */
- {{FLUSH_OP__DIRTY, VARIABLE_ENTRY_TYPE, 1000, FALSE, 0, NULL},
- {FLUSH_OP__DIRTY, VARIABLE_ENTRY_TYPE, 2000, FALSE, 0, NULL},
- {FLUSH_OP__RESIZE, VARIABLE_ENTRY_TYPE, 450, FALSE, VARIABLE_ENTRY_SIZE / 4, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL}},
- /* expected_deserialized = */ TRUE,
- /* expected_serialized = */ TRUE,
- /* expected_destroyed = */ FALSE},
- {/* entry_num = */ 7,
- /* entry_type = */ VARIABLE_ENTRY_TYPE,
- /* entry_index = */ 650,
- /* insert_flag = */ TRUE,
- /* flags = */ H5C__NO_FLAGS_SET,
- /* resize_flag = */ FALSE,
- /* new_size = */ 0,
- /* num_pins = */ 2,
- /* pin_type = */ {VARIABLE_ENTRY_TYPE, VARIABLE_ENTRY_TYPE, 0, 0, 0, 0, 0, 0},
- /* pin_idx = */ {1000, 2000, 0, 0, 0, 0, 0, 0},
- /* num_flush_ops = */ 3,
- /* flush_ops = */
- /* op_code: type: idx: flag: size: order_ptr: */
- {{FLUSH_OP__DIRTY, VARIABLE_ENTRY_TYPE, 1000, FALSE, 0, NULL},
- {FLUSH_OP__DIRTY, VARIABLE_ENTRY_TYPE, 2000, FALSE, 0, NULL},
- {FLUSH_OP__RESIZE, VARIABLE_ENTRY_TYPE, 650, FALSE, VARIABLE_ENTRY_SIZE / 4, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL}},
- /* expected_deserialized = */ FALSE,
- /* expected_serialized = */ TRUE,
- /* expected_destroyed = */ FALSE},
- {/* entry_num = */ 8,
- /* entry_type = */ VARIABLE_ENTRY_TYPE,
- /* entry_index = */ 750,
- /* insert_flag = */ FALSE,
- /* flags = */ H5C__DIRTIED_FLAG,
- /* resize_flag = */ FALSE,
- /* new_size = */ 0,
- /* num_pins = */ 2,
- /* pin_type = */ {VARIABLE_ENTRY_TYPE, VARIABLE_ENTRY_TYPE, 0, 0, 0, 0, 0, 0},
- /* pin_idx = */ {1000, 2000, 0, 0, 0, 0, 0, 0},
- /* num_flush_ops = */ 3,
- /* flush_ops = */
- /* op_code: type: idx: flag: size: order_ptr: */
- {{FLUSH_OP__DIRTY, VARIABLE_ENTRY_TYPE, 1000, FALSE, 0, NULL},
- {FLUSH_OP__DIRTY, VARIABLE_ENTRY_TYPE, 2000, FALSE, 0, NULL},
- {FLUSH_OP__RESIZE, VARIABLE_ENTRY_TYPE, 750, FALSE, VARIABLE_ENTRY_SIZE / 4, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL}},
- /* expected_deserialized = */ TRUE,
- /* expected_serialized = */ TRUE,
- /* expected_destroyed = */ FALSE},
- {/* entry_num = */ 9,
- /* entry_type = */ VARIABLE_ENTRY_TYPE,
- /* entry_index = */ 500,
- /* insert_flag = */ FALSE,
- /* flags = */ H5C__DIRTIED_FLAG,
- /* resize_flag = */ FALSE,
- /* new_size = */ 0,
- /* num_pins = */ 0,
- /* pin_type = */ {0, 0, 0, 0, 0, 0, 0, 0},
- /* pin_idx = */ {0, 0, 0, 0, 0, 0, 0, 0},
- /* num_flush_ops = */ 4,
- /* flush_ops = */
- /* op_code: type: idx: flag: size: order_ptr: */
- {{FLUSH_OP__DIRTY, VARIABLE_ENTRY_TYPE, 350, FALSE, 0, NULL},
- {FLUSH_OP__DIRTY, VARIABLE_ENTRY_TYPE, 450, FALSE, 0, NULL},
- {FLUSH_OP__DIRTY, VARIABLE_ENTRY_TYPE, 650, FALSE, 0, NULL},
- {FLUSH_OP__DIRTY, VARIABLE_ENTRY_TYPE, 750, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL}},
- /* expected_deserialized = */ TRUE,
- /* expected_serialized = */ TRUE,
- /* expected_destroyed = */ FALSE}};
- int check_size = 3;
- struct fo_flush_entry_check checks[3] = {{/* entry_num = */ 0,
+ int test_num = 26;
+ unsigned int flush_flags = H5C__NO_FLAGS_SET;
+ int spec_size = 10;
+ int check_size = 3;
+ unsigned init_expected_index_len = 10;
+ size_t init_expected_index_size = 10 * VARIABLE_ENTRY_SIZE;
+ unsigned expected_index_len = 13;
+ size_t expected_index_size = 9 * VARIABLE_ENTRY_SIZE;
+
+ HDassert(spec_size <= max_num_spec);
+ HDassert(check_size <= max_num_check);
+
+ spec[0] = (struct fo_flush_cache_test_spec){
+ /* entry_num = */ 0,
+ /* entry_type = */ VARIABLE_ENTRY_TYPE,
+ /* entry_index = */ 200,
+ /* insert_flag = */ FALSE,
+ /* flags = */ H5C__NO_FLAGS_SET,
+ /* resize_flag = */ FALSE,
+ /* new_size = */ 0,
+ /* num_pins = */ 0,
+ /* pin_type = */ {0, 0, 0, 0, 0, 0, 0, 0},
+ /* pin_idx = */ {0, 0, 0, 0, 0, 0, 0, 0},
+ /* num_flush_ops = */ 0,
+ /* flush_ops = */
+ /* op_code: type: idx: flag: size: order_ptr: */
+ {{FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL}},
+ /* expected_deserialized = */ TRUE,
+ /* expected_serialized = */ TRUE,
+ /* expected_destroyed = */ FALSE};
+ spec[1] = (struct fo_flush_cache_test_spec){
+ /* entry_num = */ 1,
+ /* entry_type = */ VARIABLE_ENTRY_TYPE,
+ /* entry_index = */ 2100,
+ /* insert_flag = */ FALSE,
+ /* flags = */ H5C__NO_FLAGS_SET,
+ /* resize_flag = */ FALSE,
+ /* new_size = */ 0,
+ /* num_pins = */ 0,
+ /* pin_type = */ {0, 0, 0, 0, 0, 0, 0, 0},
+ /* pin_idx = */ {0, 0, 0, 0, 0, 0, 0, 0},
+ /* num_flush_ops = */ 0,
+ /* flush_ops = */
+ /* op_code: type: idx: flag: size: order_ptr: */
+ {{FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL}},
+ /* expected_deserialized = */ TRUE,
+ /* expected_serialized = */ TRUE,
+ /* expected_destroyed = */ FALSE};
+ spec[2] = (struct fo_flush_cache_test_spec){
+ /* entry_num = */ 2,
+ /* entry_type = */ VARIABLE_ENTRY_TYPE,
+ /* entry_index = */ 2300,
+ /* insert_flag = */ TRUE,
+ /* flags = */ H5C__NO_FLAGS_SET,
+ /* resize_flag = */ FALSE,
+ /* new_size = */ 0,
+ /* num_pins = */ 0,
+ /* pin_type = */ {0, 0, 0, 0, 0, 0, 0, 0},
+ /* pin_idx = */ {0, 0, 0, 0, 0, 0, 0, 0},
+ /* num_flush_ops = */ 0,
+ /* flush_ops = */
+ /* op_code: type: idx: flag: size: order_ptr: */
+ {{FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL}},
+ /* expected_deserialized = */ FALSE,
+ /* expected_serialized = */ TRUE,
+ /* expected_destroyed = */ FALSE};
+ spec[3] = (struct fo_flush_cache_test_spec){
+ /* entry_num = */ 3,
+ /* entry_type = */ VARIABLE_ENTRY_TYPE,
+ /* entry_index = */ 1000,
+ /* insert_flag = */ TRUE,
+ /* flags = */ H5C__NO_FLAGS_SET,
+ /* resize_flag = */ FALSE,
+ /* new_size = */ 0,
+ /* num_pins = */ 0,
+ /* pin_type = */ {0, 0, 0, 0, 0, 0, 0, 0},
+ /* pin_idx = */ {0, 0, 0, 0, 0, 0, 0, 0},
+ /* num_flush_ops = */ 4,
+ /* flush_ops = */
+ /* op_code: type: idx: flag: size: order_ptr: */
+ {{FLUSH_OP__DIRTY, VARIABLE_ENTRY_TYPE, 100, FALSE, 0, NULL},
+ {FLUSH_OP__RESIZE, VARIABLE_ENTRY_TYPE, 200, FALSE, VARIABLE_ENTRY_SIZE / 2, NULL},
+ {FLUSH_OP__DIRTY, VARIABLE_ENTRY_TYPE, 300, FALSE, 0, NULL},
+ {FLUSH_OP__MOVE, VARIABLE_ENTRY_TYPE, 300, FALSE, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL}},
+ /* expected_deserialized = */ FALSE,
+ /* expected_serialized = */ TRUE,
+ /* expected_destroyed = */ FALSE};
+ spec[4] = (struct fo_flush_cache_test_spec){
+ /* entry_num = */ 4,
+ /* entry_type = */ VARIABLE_ENTRY_TYPE,
+ /* entry_index = */ 2000,
+ /* insert_flag = */ FALSE,
+ /* flags = */ H5C__NO_FLAGS_SET,
+ /* resize_flag = */ FALSE,
+ /* new_size = */ 0,
+ /* num_pins = */ 0,
+ /* pin_type = */ {0, 0, 0, 0, 0, 0, 0, 0},
+ /* pin_idx = */ {0, 0, 0, 0, 0, 0, 0, 0},
+ /* num_flush_ops = */ 3,
+ /* flush_ops = */
+ /* op_code: type: idx: flag: size: order_ptr: */
+ {{FLUSH_OP__DIRTY, VARIABLE_ENTRY_TYPE, 2100, FALSE, 0, NULL},
+ {FLUSH_OP__RESIZE, VARIABLE_ENTRY_TYPE, 2200, FALSE, VARIABLE_ENTRY_SIZE / 2, NULL},
+ {FLUSH_OP__MOVE, VARIABLE_ENTRY_TYPE, 2300, FALSE, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL}},
+ /* expected_deserialized = */ TRUE,
+ /* expected_serialized = */ TRUE,
+ /* expected_destroyed = */ FALSE};
+ spec[5] = (struct fo_flush_cache_test_spec){
+ /* entry_num = */ 5,
+ /* entry_type = */ VARIABLE_ENTRY_TYPE,
+ /* entry_index = */ 350,
+ /* insert_flag = */ FALSE,
+ /* flags = */ H5C__NO_FLAGS_SET,
+ /* resize_flag = */ FALSE,
+ /* new_size = */ 0,
+ /* num_pins = */ 2,
+ /* pin_type = */ {VARIABLE_ENTRY_TYPE, VARIABLE_ENTRY_TYPE, 0, 0, 0, 0, 0, 0},
+ /* pin_idx = */ {1000, 2000, 0, 0, 0, 0, 0, 0},
+ /* num_flush_ops = */ 3,
+ /* flush_ops = */
+ /* op_code: type: idx: flag: size: order_ptr: */
+ {{FLUSH_OP__DIRTY, VARIABLE_ENTRY_TYPE, 1000, FALSE, 0, NULL},
+ {FLUSH_OP__DIRTY, VARIABLE_ENTRY_TYPE, 2000, FALSE, 0, NULL},
+ {FLUSH_OP__RESIZE, VARIABLE_ENTRY_TYPE, 350, FALSE, VARIABLE_ENTRY_SIZE / 4, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL}},
+ /* expected_deserialized = */ TRUE,
+ /* expected_serialized = */ TRUE,
+ /* expected_destroyed = */ FALSE};
+ spec[6] = (struct fo_flush_cache_test_spec){
+ /* entry_num = */ 6,
+ /* entry_type = */ VARIABLE_ENTRY_TYPE,
+ /* entry_index = */ 450,
+ /* insert_flag = */ FALSE,
+ /* flags = */ H5C__DIRTIED_FLAG,
+ /* resize_flag = */ FALSE,
+ /* new_size = */ 0,
+ /* num_pins = */ 2,
+ /* pin_type = */ {VARIABLE_ENTRY_TYPE, VARIABLE_ENTRY_TYPE, 0, 0, 0, 0, 0, 0},
+ /* pin_idx = */ {1000, 2000, 0, 0, 0, 0, 0, 0},
+ /* num_flush_ops = */ 3,
+ /* flush_ops = */
+ /* op_code: type: idx: flag: size: order_ptr: */
+ {{FLUSH_OP__DIRTY, VARIABLE_ENTRY_TYPE, 1000, FALSE, 0, NULL},
+ {FLUSH_OP__DIRTY, VARIABLE_ENTRY_TYPE, 2000, FALSE, 0, NULL},
+ {FLUSH_OP__RESIZE, VARIABLE_ENTRY_TYPE, 450, FALSE, VARIABLE_ENTRY_SIZE / 4, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL}},
+ /* expected_deserialized = */ TRUE,
+ /* expected_serialized = */ TRUE,
+ /* expected_destroyed = */ FALSE};
+ spec[7] = (struct fo_flush_cache_test_spec){
+ /* entry_num = */ 7,
+ /* entry_type = */ VARIABLE_ENTRY_TYPE,
+ /* entry_index = */ 650,
+ /* insert_flag = */ TRUE,
+ /* flags = */ H5C__NO_FLAGS_SET,
+ /* resize_flag = */ FALSE,
+ /* new_size = */ 0,
+ /* num_pins = */ 2,
+ /* pin_type = */ {VARIABLE_ENTRY_TYPE, VARIABLE_ENTRY_TYPE, 0, 0, 0, 0, 0, 0},
+ /* pin_idx = */ {1000, 2000, 0, 0, 0, 0, 0, 0},
+ /* num_flush_ops = */ 3,
+ /* flush_ops = */
+ /* op_code: type: idx: flag: size: order_ptr: */
+ {{FLUSH_OP__DIRTY, VARIABLE_ENTRY_TYPE, 1000, FALSE, 0, NULL},
+ {FLUSH_OP__DIRTY, VARIABLE_ENTRY_TYPE, 2000, FALSE, 0, NULL},
+ {FLUSH_OP__RESIZE, VARIABLE_ENTRY_TYPE, 650, FALSE, VARIABLE_ENTRY_SIZE / 4, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL}},
+ /* expected_deserialized = */ FALSE,
+ /* expected_serialized = */ TRUE,
+ /* expected_destroyed = */ FALSE};
+ spec[8] = (struct fo_flush_cache_test_spec){
+ /* entry_num = */ 8,
+ /* entry_type = */ VARIABLE_ENTRY_TYPE,
+ /* entry_index = */ 750,
+ /* insert_flag = */ FALSE,
+ /* flags = */ H5C__DIRTIED_FLAG,
+ /* resize_flag = */ FALSE,
+ /* new_size = */ 0,
+ /* num_pins = */ 2,
+ /* pin_type = */ {VARIABLE_ENTRY_TYPE, VARIABLE_ENTRY_TYPE, 0, 0, 0, 0, 0, 0},
+ /* pin_idx = */ {1000, 2000, 0, 0, 0, 0, 0, 0},
+ /* num_flush_ops = */ 3,
+ /* flush_ops = */
+ /* op_code: type: idx: flag: size: order_ptr: */
+ {{FLUSH_OP__DIRTY, VARIABLE_ENTRY_TYPE, 1000, FALSE, 0, NULL},
+ {FLUSH_OP__DIRTY, VARIABLE_ENTRY_TYPE, 2000, FALSE, 0, NULL},
+ {FLUSH_OP__RESIZE, VARIABLE_ENTRY_TYPE, 750, FALSE, VARIABLE_ENTRY_SIZE / 4, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL}},
+ /* expected_deserialized = */ TRUE,
+ /* expected_serialized = */ TRUE,
+ /* expected_destroyed = */ FALSE};
+ spec[9] = (struct fo_flush_cache_test_spec){
+ /* entry_num = */ 9,
+ /* entry_type = */ VARIABLE_ENTRY_TYPE,
+ /* entry_index = */ 500,
+ /* insert_flag = */ FALSE,
+ /* flags = */ H5C__DIRTIED_FLAG,
+ /* resize_flag = */ FALSE,
+ /* new_size = */ 0,
+ /* num_pins = */ 0,
+ /* pin_type = */ {0, 0, 0, 0, 0, 0, 0, 0},
+ /* pin_idx = */ {0, 0, 0, 0, 0, 0, 0, 0},
+ /* num_flush_ops = */ 4,
+ /* flush_ops = */
+ /* op_code: type: idx: flag: size: order_ptr: */
+ {{FLUSH_OP__DIRTY, VARIABLE_ENTRY_TYPE, 350, FALSE, 0, NULL},
+ {FLUSH_OP__DIRTY, VARIABLE_ENTRY_TYPE, 450, FALSE, 0, NULL},
+ {FLUSH_OP__DIRTY, VARIABLE_ENTRY_TYPE, 650, FALSE, 0, NULL},
+ {FLUSH_OP__DIRTY, VARIABLE_ENTRY_TYPE, 750, FALSE, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL}},
+ /* expected_deserialized = */ TRUE,
+ /* expected_serialized = */ TRUE,
+ /* expected_destroyed = */ FALSE};
+
+ checks[0] = (struct fo_flush_entry_check){/* entry_num = */ 0,
/* entry_type = */ VARIABLE_ENTRY_TYPE,
/* entry_index = */ 100,
/* expected_size = */ VARIABLE_ENTRY_SIZE,
/* in_cache = */ TRUE,
/* at_main_addr = */ TRUE,
- /* is_dirty = */ FALSE,
+ /* is_dirty = */ FALSE,
/* is_protected = */ FALSE,
/* is_pinned = */ FALSE,
/* expected_deserialized = */ TRUE,
/* expected_serialized = */ TRUE,
- /* expected_destroyed = */ FALSE},
- {/* entry_num = */ 1,
+ /* expected_destroyed = */ FALSE};
+ checks[1] = (struct fo_flush_entry_check){/* entry_num = */ 1,
/* entry_type = */ VARIABLE_ENTRY_TYPE,
/* entry_index = */ 300,
/* expected_size = */ VARIABLE_ENTRY_SIZE,
/* in_cache = */ TRUE,
/* at_main_addr = */ FALSE,
- /* is_dirty = */ FALSE,
+ /* is_dirty = */ FALSE,
/* is_protected = */ FALSE,
/* is_pinned = */ FALSE,
/* expected_deserialized = */ TRUE,
/* expected_serialized = */ TRUE,
- /* expected_destroyed = */ FALSE},
- {/* entry_num = */ 2,
+ /* expected_destroyed = */ FALSE};
+ checks[2] = (struct fo_flush_entry_check){/* entry_num = */ 2,
/* entry_type = */ VARIABLE_ENTRY_TYPE,
/* entry_index = */ 2200,
/* expected_size = */ VARIABLE_ENTRY_SIZE / 2,
/* in_cache = */ TRUE,
/* at_main_addr = */ TRUE,
- /* is_dirty = */ FALSE,
+ /* is_dirty = */ FALSE,
/* is_protected = */ FALSE,
/* is_pinned = */ FALSE,
/* expected_deserialized = */ TRUE,
/* expected_serialized = */ TRUE,
- /* expected_destroyed = */ FALSE}
-
- };
+ /* expected_destroyed = */ FALSE};
check_flush_cache__flush_op_test(file_ptr, test_num, flush_flags, spec_size, spec,
init_expected_index_len, init_expected_index_size,
@@ -7333,313 +7492,325 @@ check_flush_cache__flush_ops(H5F_t *file_ptr)
* dirties (VET, 650)
* dirties (VET, 750)
*/
- int test_num = 27;
- unsigned int flush_flags = H5C__FLUSH_INVALIDATE_FLAG;
- int spec_size = 10;
- unsigned init_expected_index_len = 10;
- size_t init_expected_index_size = 10 * VARIABLE_ENTRY_SIZE;
- unsigned expected_index_len = 0;
- size_t expected_index_size = (size_t)0;
- struct fo_flush_cache_test_spec spec[10] = {
- {/* entry_num = */ 0,
- /* entry_type = */ VARIABLE_ENTRY_TYPE,
- /* entry_index = */ 200,
- /* insert_flag = */ FALSE,
- /* flags = */ H5C__NO_FLAGS_SET,
- /* resize_flag = */ FALSE,
- /* new_size = */ 0,
- /* num_pins = */ 0,
- /* pin_type = */ {0, 0, 0, 0, 0, 0, 0, 0},
- /* pin_idx = */ {0, 0, 0, 0, 0, 0, 0, 0},
- /* num_flush_ops = */ 0,
- /* flush_ops = */
- /* op_code: type: idx: flag: size: order_ptr: */
- {{FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL}},
- /* expected_deserialized = */ TRUE,
- /* expected_serialized = */ TRUE,
- /* expected_destroyed = */ TRUE},
- {/* entry_num = */ 1,
- /* entry_type = */ VARIABLE_ENTRY_TYPE,
- /* entry_index = */ 2100,
- /* insert_flag = */ FALSE,
- /* flags = */ H5C__NO_FLAGS_SET,
- /* resize_flag = */ FALSE,
- /* new_size = */ 0,
- /* num_pins = */ 0,
- /* pin_type = */ {0, 0, 0, 0, 0, 0, 0, 0},
- /* pin_idx = */ {0, 0, 0, 0, 0, 0, 0, 0},
- /* num_flush_ops = */ 0,
- /* flush_ops = */
- /* op_code: type: idx: flag: size: order_ptr: */
- {{FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL}},
- /* expected_deserialized = */ TRUE,
- /* expected_serialized = */ TRUE,
- /* expected_destroyed = */ TRUE},
- {/* entry_num = */ 2,
- /* entry_type = */ VARIABLE_ENTRY_TYPE,
- /* entry_index = */ 2300,
- /* insert_flag = */ TRUE,
- /* flags = */ H5C__NO_FLAGS_SET,
- /* resize_flag = */ FALSE,
- /* new_size = */ 0,
- /* num_pins = */ 0,
- /* pin_type = */ {0, 0, 0, 0, 0, 0, 0, 0},
- /* pin_idx = */ {0, 0, 0, 0, 0, 0, 0, 0},
- /* num_flush_ops = */ 0,
- /* flush_ops = */
- /* op_code: type: idx: flag: size: order_ptr: */
- {{FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL}},
- /* expected_deserialized = */ FALSE,
- /* expected_serialized = */ TRUE,
- /* expected_destroyed = */ TRUE},
- {/* entry_num = */ 3,
- /* entry_type = */ VARIABLE_ENTRY_TYPE,
- /* entry_index = */ 1000,
- /* insert_flag = */ TRUE,
- /* flags = */ H5C__NO_FLAGS_SET,
- /* resize_flag = */ FALSE,
- /* new_size = */ 0,
- /* num_pins = */ 0,
- /* pin_type = */ {0, 0, 0, 0, 0, 0, 0, 0},
- /* pin_idx = */ {0, 0, 0, 0, 0, 0, 0, 0},
- /* num_flush_ops = */ 4,
- /* flush_ops = */
- /* op_code: type: idx: flag: size: order_ptr: */
- {{FLUSH_OP__DIRTY, VARIABLE_ENTRY_TYPE, 100, FALSE, 0, NULL},
- {FLUSH_OP__RESIZE, VARIABLE_ENTRY_TYPE, 200, FALSE, VARIABLE_ENTRY_SIZE / 2, NULL},
- {FLUSH_OP__DIRTY, VARIABLE_ENTRY_TYPE, 300, FALSE, 0, NULL},
- {FLUSH_OP__MOVE, VARIABLE_ENTRY_TYPE, 300, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL}},
- /* expected_deserialized = */ FALSE,
- /* expected_serialized = */ TRUE,
- /* expected_destroyed = */ TRUE},
- {/* entry_num = */ 4,
- /* entry_type = */ VARIABLE_ENTRY_TYPE,
- /* entry_index = */ 2000,
- /* insert_flag = */ FALSE,
- /* flags = */ H5C__NO_FLAGS_SET,
- /* resize_flag = */ FALSE,
- /* new_size = */ 0,
- /* num_pins = */ 0,
- /* pin_type = */ {0, 0, 0, 0, 0, 0, 0, 0},
- /* pin_idx = */ {0, 0, 0, 0, 0, 0, 0, 0},
- /* num_flush_ops = */ 3,
- /* flush_ops = */
- /* op_code: type: idx: flag: size: order_ptr: */
- {{FLUSH_OP__DIRTY, VARIABLE_ENTRY_TYPE, 2100, FALSE, 0, NULL},
- {FLUSH_OP__RESIZE, VARIABLE_ENTRY_TYPE, 2200, FALSE, VARIABLE_ENTRY_SIZE / 2, NULL},
- {FLUSH_OP__MOVE, VARIABLE_ENTRY_TYPE, 2300, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL}},
- /* expected_deserialized = */ TRUE,
- /* expected_serialized = */ TRUE,
- /* expected_destroyed = */ TRUE},
- {/* entry_num = */ 5,
- /* entry_type = */ VARIABLE_ENTRY_TYPE,
- /* entry_index = */ 350,
- /* insert_flag = */ FALSE,
- /* flags = */ H5C__NO_FLAGS_SET,
- /* resize_flag = */ FALSE,
- /* new_size = */ 0,
- /* num_pins = */ 2,
- /* pin_type = */ {VARIABLE_ENTRY_TYPE, VARIABLE_ENTRY_TYPE, 0, 0, 0, 0, 0, 0},
- /* pin_idx = */ {1000, 2000, 0, 0, 0, 0, 0, 0},
- /* num_flush_ops = */ 3,
- /* flush_ops = */
- /* op_code: type: idx: flag: size: order_ptr: */
- {{FLUSH_OP__DIRTY, VARIABLE_ENTRY_TYPE, 1000, FALSE, 0, NULL},
- {FLUSH_OP__DIRTY, VARIABLE_ENTRY_TYPE, 2000, FALSE, 0, NULL},
- {FLUSH_OP__RESIZE, VARIABLE_ENTRY_TYPE, 350, FALSE, VARIABLE_ENTRY_SIZE / 4, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL}},
- /* expected_deserialized = */ TRUE,
- /* expected_serialized = */ TRUE,
- /* expected_destroyed = */ TRUE},
- {/* entry_num = */ 6,
- /* entry_type = */ VARIABLE_ENTRY_TYPE,
- /* entry_index = */ 450,
- /* insert_flag = */ FALSE,
- /* flags = */ H5C__DIRTIED_FLAG,
- /* resize_flag = */ FALSE,
- /* new_size = */ 0,
- /* num_pins = */ 2,
- /* pin_type = */ {VARIABLE_ENTRY_TYPE, VARIABLE_ENTRY_TYPE, 0, 0, 0, 0, 0, 0},
- /* pin_idx = */ {1000, 2000, 0, 0, 0, 0, 0, 0},
- /* num_flush_ops = */ 3,
- /* flush_ops = */
- /* op_code: type: idx: flag: size: order_ptr: */
- {{FLUSH_OP__DIRTY, VARIABLE_ENTRY_TYPE, 1000, FALSE, 0, NULL},
- {FLUSH_OP__DIRTY, VARIABLE_ENTRY_TYPE, 2000, FALSE, 0, NULL},
- {FLUSH_OP__RESIZE, VARIABLE_ENTRY_TYPE, 450, FALSE, VARIABLE_ENTRY_SIZE / 4, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL}},
- /* expected_deserialized = */ TRUE,
- /* expected_serialized = */ TRUE,
- /* expected_destroyed = */ TRUE},
- {/* entry_num = */ 7,
- /* entry_type = */ VARIABLE_ENTRY_TYPE,
- /* entry_index = */ 650,
- /* insert_flag = */ TRUE,
- /* flags = */ H5C__NO_FLAGS_SET,
- /* resize_flag = */ FALSE,
- /* new_size = */ 0,
- /* num_pins = */ 2,
- /* pin_type = */ {VARIABLE_ENTRY_TYPE, VARIABLE_ENTRY_TYPE, 0, 0, 0, 0, 0, 0},
- /* pin_idx = */ {1000, 2000, 0, 0, 0, 0, 0, 0},
- /* num_flush_ops = */ 3,
- /* flush_ops = */
- /* op_code: type: idx: flag: size: order_ptr: */
- {{FLUSH_OP__DIRTY, VARIABLE_ENTRY_TYPE, 1000, FALSE, 0, NULL},
- {FLUSH_OP__DIRTY, VARIABLE_ENTRY_TYPE, 2000, FALSE, 0, NULL},
- {FLUSH_OP__RESIZE, VARIABLE_ENTRY_TYPE, 650, FALSE, VARIABLE_ENTRY_SIZE / 4, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL}},
- /* expected_deserialized = */ FALSE,
- /* expected_serialized = */ TRUE,
- /* expected_destroyed = */ TRUE},
- {/* entry_num = */ 8,
- /* entry_type = */ VARIABLE_ENTRY_TYPE,
- /* entry_index = */ 750,
- /* insert_flag = */ FALSE,
- /* flags = */ H5C__DIRTIED_FLAG,
- /* resize_flag = */ FALSE,
- /* new_size = */ 0,
- /* num_pins = */ 2,
- /* pin_type = */ {VARIABLE_ENTRY_TYPE, VARIABLE_ENTRY_TYPE, 0, 0, 0, 0, 0, 0},
- /* pin_idx = */ {1000, 2000, 0, 0, 0, 0, 0, 0},
- /* num_flush_ops = */ 3,
- /* flush_ops = */
- /* op_code: type: idx: flag: size: order_ptr: */
- {{FLUSH_OP__DIRTY, VARIABLE_ENTRY_TYPE, 1000, FALSE, 0, NULL},
- {FLUSH_OP__DIRTY, VARIABLE_ENTRY_TYPE, 2000, FALSE, 0, NULL},
- {FLUSH_OP__RESIZE, VARIABLE_ENTRY_TYPE, 750, FALSE, VARIABLE_ENTRY_SIZE / 4, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL}},
- /* expected_deserialized = */ TRUE,
- /* expected_serialized = */ TRUE,
- /* expected_destroyed = */ TRUE},
- {/* entry_num = */ 9,
- /* entry_type = */ VARIABLE_ENTRY_TYPE,
- /* entry_index = */ 500,
- /* insert_flag = */ FALSE,
- /* flags = */ H5C__DIRTIED_FLAG,
- /* resize_flag = */ FALSE,
- /* new_size = */ 0,
- /* num_pins = */ 0,
- /* pin_type = */ {0, 0, 0, 0, 0, 0, 0, 0},
- /* pin_idx = */ {0, 0, 0, 0, 0, 0, 0, 0},
- /* num_flush_ops = */ 4,
- /* flush_ops = */
- /* op_code: type: idx: flag: size: order_ptr: */
- {{FLUSH_OP__DIRTY, VARIABLE_ENTRY_TYPE, 350, FALSE, 0, NULL},
- {FLUSH_OP__DIRTY, VARIABLE_ENTRY_TYPE, 450, FALSE, 0, NULL},
- {FLUSH_OP__DIRTY, VARIABLE_ENTRY_TYPE, 650, FALSE, 0, NULL},
- {FLUSH_OP__DIRTY, VARIABLE_ENTRY_TYPE, 750, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL}},
- /* expected_deserialized = */ TRUE,
- /* expected_serialized = */ TRUE,
- /* expected_destroyed = */ TRUE}};
- int check_size = 3;
- struct fo_flush_entry_check checks[3] = {{/* entry_num = */ 0,
+ int test_num = 27;
+ unsigned int flush_flags = H5C__FLUSH_INVALIDATE_FLAG;
+ int spec_size = 10;
+ int check_size = 3;
+ unsigned init_expected_index_len = 10;
+ size_t init_expected_index_size = 10 * VARIABLE_ENTRY_SIZE;
+ unsigned expected_index_len = 0;
+ size_t expected_index_size = (size_t)0;
+
+ HDassert(spec_size <= max_num_spec);
+ HDassert(check_size <= max_num_check);
+
+ spec[0] = (struct fo_flush_cache_test_spec){
+ /* entry_num = */ 0,
+ /* entry_type = */ VARIABLE_ENTRY_TYPE,
+ /* entry_index = */ 200,
+ /* insert_flag = */ FALSE,
+ /* flags = */ H5C__NO_FLAGS_SET,
+ /* resize_flag = */ FALSE,
+ /* new_size = */ 0,
+ /* num_pins = */ 0,
+ /* pin_type = */ {0, 0, 0, 0, 0, 0, 0, 0},
+ /* pin_idx = */ {0, 0, 0, 0, 0, 0, 0, 0},
+ /* num_flush_ops = */ 0,
+ /* flush_ops = */
+ /* op_code: type: idx: flag: size: order_ptr: */
+ {{FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL}},
+ /* expected_deserialized = */ TRUE,
+ /* expected_serialized = */ TRUE,
+ /* expected_destroyed = */ TRUE};
+ spec[1] = (struct fo_flush_cache_test_spec){
+ /* entry_num = */ 1,
+ /* entry_type = */ VARIABLE_ENTRY_TYPE,
+ /* entry_index = */ 2100,
+ /* insert_flag = */ FALSE,
+ /* flags = */ H5C__NO_FLAGS_SET,
+ /* resize_flag = */ FALSE,
+ /* new_size = */ 0,
+ /* num_pins = */ 0,
+ /* pin_type = */ {0, 0, 0, 0, 0, 0, 0, 0},
+ /* pin_idx = */ {0, 0, 0, 0, 0, 0, 0, 0},
+ /* num_flush_ops = */ 0,
+ /* flush_ops = */
+ /* op_code: type: idx: flag: size: order_ptr: */
+ {{FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL}},
+ /* expected_deserialized = */ TRUE,
+ /* expected_serialized = */ TRUE,
+ /* expected_destroyed = */ TRUE};
+ spec[2] = (struct fo_flush_cache_test_spec){
+ /* entry_num = */ 2,
+ /* entry_type = */ VARIABLE_ENTRY_TYPE,
+ /* entry_index = */ 2300,
+ /* insert_flag = */ TRUE,
+ /* flags = */ H5C__NO_FLAGS_SET,
+ /* resize_flag = */ FALSE,
+ /* new_size = */ 0,
+ /* num_pins = */ 0,
+ /* pin_type = */ {0, 0, 0, 0, 0, 0, 0, 0},
+ /* pin_idx = */ {0, 0, 0, 0, 0, 0, 0, 0},
+ /* num_flush_ops = */ 0,
+ /* flush_ops = */
+ /* op_code: type: idx: flag: size: order_ptr: */
+ {{FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL}},
+ /* expected_deserialized = */ FALSE,
+ /* expected_serialized = */ TRUE,
+ /* expected_destroyed = */ TRUE};
+ spec[3] = (struct fo_flush_cache_test_spec){
+ /* entry_num = */ 3,
+ /* entry_type = */ VARIABLE_ENTRY_TYPE,
+ /* entry_index = */ 1000,
+ /* insert_flag = */ TRUE,
+ /* flags = */ H5C__NO_FLAGS_SET,
+ /* resize_flag = */ FALSE,
+ /* new_size = */ 0,
+ /* num_pins = */ 0,
+ /* pin_type = */ {0, 0, 0, 0, 0, 0, 0, 0},
+ /* pin_idx = */ {0, 0, 0, 0, 0, 0, 0, 0},
+ /* num_flush_ops = */ 4,
+ /* flush_ops = */
+ /* op_code: type: idx: flag: size: order_ptr: */
+ {{FLUSH_OP__DIRTY, VARIABLE_ENTRY_TYPE, 100, FALSE, 0, NULL},
+ {FLUSH_OP__RESIZE, VARIABLE_ENTRY_TYPE, 200, FALSE, VARIABLE_ENTRY_SIZE / 2, NULL},
+ {FLUSH_OP__DIRTY, VARIABLE_ENTRY_TYPE, 300, FALSE, 0, NULL},
+ {FLUSH_OP__MOVE, VARIABLE_ENTRY_TYPE, 300, FALSE, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL}},
+ /* expected_deserialized = */ FALSE,
+ /* expected_serialized = */ TRUE,
+ /* expected_destroyed = */ TRUE};
+ spec[4] = (struct fo_flush_cache_test_spec){
+ /* entry_num = */ 4,
+ /* entry_type = */ VARIABLE_ENTRY_TYPE,
+ /* entry_index = */ 2000,
+ /* insert_flag = */ FALSE,
+ /* flags = */ H5C__NO_FLAGS_SET,
+ /* resize_flag = */ FALSE,
+ /* new_size = */ 0,
+ /* num_pins = */ 0,
+ /* pin_type = */ {0, 0, 0, 0, 0, 0, 0, 0},
+ /* pin_idx = */ {0, 0, 0, 0, 0, 0, 0, 0},
+ /* num_flush_ops = */ 3,
+ /* flush_ops = */
+ /* op_code: type: idx: flag: size: order_ptr: */
+ {{FLUSH_OP__DIRTY, VARIABLE_ENTRY_TYPE, 2100, FALSE, 0, NULL},
+ {FLUSH_OP__RESIZE, VARIABLE_ENTRY_TYPE, 2200, FALSE, VARIABLE_ENTRY_SIZE / 2, NULL},
+ {FLUSH_OP__MOVE, VARIABLE_ENTRY_TYPE, 2300, FALSE, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL}},
+ /* expected_deserialized = */ TRUE,
+ /* expected_serialized = */ TRUE,
+ /* expected_destroyed = */ TRUE};
+ spec[5] = (struct fo_flush_cache_test_spec){
+ /* entry_num = */ 5,
+ /* entry_type = */ VARIABLE_ENTRY_TYPE,
+ /* entry_index = */ 350,
+ /* insert_flag = */ FALSE,
+ /* flags = */ H5C__NO_FLAGS_SET,
+ /* resize_flag = */ FALSE,
+ /* new_size = */ 0,
+ /* num_pins = */ 2,
+ /* pin_type = */ {VARIABLE_ENTRY_TYPE, VARIABLE_ENTRY_TYPE, 0, 0, 0, 0, 0, 0},
+ /* pin_idx = */ {1000, 2000, 0, 0, 0, 0, 0, 0},
+ /* num_flush_ops = */ 3,
+ /* flush_ops = */
+ /* op_code: type: idx: flag: size: order_ptr: */
+ {{FLUSH_OP__DIRTY, VARIABLE_ENTRY_TYPE, 1000, FALSE, 0, NULL},
+ {FLUSH_OP__DIRTY, VARIABLE_ENTRY_TYPE, 2000, FALSE, 0, NULL},
+ {FLUSH_OP__RESIZE, VARIABLE_ENTRY_TYPE, 350, FALSE, VARIABLE_ENTRY_SIZE / 4, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL}},
+ /* expected_deserialized = */ TRUE,
+ /* expected_serialized = */ TRUE,
+ /* expected_destroyed = */ TRUE};
+ spec[6] = (struct fo_flush_cache_test_spec){
+ /* entry_num = */ 6,
+ /* entry_type = */ VARIABLE_ENTRY_TYPE,
+ /* entry_index = */ 450,
+ /* insert_flag = */ FALSE,
+ /* flags = */ H5C__DIRTIED_FLAG,
+ /* resize_flag = */ FALSE,
+ /* new_size = */ 0,
+ /* num_pins = */ 2,
+ /* pin_type = */ {VARIABLE_ENTRY_TYPE, VARIABLE_ENTRY_TYPE, 0, 0, 0, 0, 0, 0},
+ /* pin_idx = */ {1000, 2000, 0, 0, 0, 0, 0, 0},
+ /* num_flush_ops = */ 3,
+ /* flush_ops = */
+ /* op_code: type: idx: flag: size: order_ptr: */
+ {{FLUSH_OP__DIRTY, VARIABLE_ENTRY_TYPE, 1000, FALSE, 0, NULL},
+ {FLUSH_OP__DIRTY, VARIABLE_ENTRY_TYPE, 2000, FALSE, 0, NULL},
+ {FLUSH_OP__RESIZE, VARIABLE_ENTRY_TYPE, 450, FALSE, VARIABLE_ENTRY_SIZE / 4, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL}},
+ /* expected_deserialized = */ TRUE,
+ /* expected_serialized = */ TRUE,
+ /* expected_destroyed = */ TRUE};
+ spec[7] = (struct fo_flush_cache_test_spec){
+ /* entry_num = */ 7,
+ /* entry_type = */ VARIABLE_ENTRY_TYPE,
+ /* entry_index = */ 650,
+ /* insert_flag = */ TRUE,
+ /* flags = */ H5C__NO_FLAGS_SET,
+ /* resize_flag = */ FALSE,
+ /* new_size = */ 0,
+ /* num_pins = */ 2,
+ /* pin_type = */ {VARIABLE_ENTRY_TYPE, VARIABLE_ENTRY_TYPE, 0, 0, 0, 0, 0, 0},
+ /* pin_idx = */ {1000, 2000, 0, 0, 0, 0, 0, 0},
+ /* num_flush_ops = */ 3,
+ /* flush_ops = */
+ /* op_code: type: idx: flag: size: order_ptr: */
+ {{FLUSH_OP__DIRTY, VARIABLE_ENTRY_TYPE, 1000, FALSE, 0, NULL},
+ {FLUSH_OP__DIRTY, VARIABLE_ENTRY_TYPE, 2000, FALSE, 0, NULL},
+ {FLUSH_OP__RESIZE, VARIABLE_ENTRY_TYPE, 650, FALSE, VARIABLE_ENTRY_SIZE / 4, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL}},
+ /* expected_deserialized = */ FALSE,
+ /* expected_serialized = */ TRUE,
+ /* expected_destroyed = */ TRUE};
+ spec[8] = (struct fo_flush_cache_test_spec){
+ /* entry_num = */ 8,
+ /* entry_type = */ VARIABLE_ENTRY_TYPE,
+ /* entry_index = */ 750,
+ /* insert_flag = */ FALSE,
+ /* flags = */ H5C__DIRTIED_FLAG,
+ /* resize_flag = */ FALSE,
+ /* new_size = */ 0,
+ /* num_pins = */ 2,
+ /* pin_type = */ {VARIABLE_ENTRY_TYPE, VARIABLE_ENTRY_TYPE, 0, 0, 0, 0, 0, 0},
+ /* pin_idx = */ {1000, 2000, 0, 0, 0, 0, 0, 0},
+ /* num_flush_ops = */ 3,
+ /* flush_ops = */
+ /* op_code: type: idx: flag: size: order_ptr: */
+ {{FLUSH_OP__DIRTY, VARIABLE_ENTRY_TYPE, 1000, FALSE, 0, NULL},
+ {FLUSH_OP__DIRTY, VARIABLE_ENTRY_TYPE, 2000, FALSE, 0, NULL},
+ {FLUSH_OP__RESIZE, VARIABLE_ENTRY_TYPE, 750, FALSE, VARIABLE_ENTRY_SIZE / 4, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL}},
+ /* expected_deserialized = */ TRUE,
+ /* expected_serialized = */ TRUE,
+ /* expected_destroyed = */ TRUE};
+ spec[9] = (struct fo_flush_cache_test_spec){
+ /* entry_num = */ 9,
+ /* entry_type = */ VARIABLE_ENTRY_TYPE,
+ /* entry_index = */ 500,
+ /* insert_flag = */ FALSE,
+ /* flags = */ H5C__DIRTIED_FLAG,
+ /* resize_flag = */ FALSE,
+ /* new_size = */ 0,
+ /* num_pins = */ 0,
+ /* pin_type = */ {0, 0, 0, 0, 0, 0, 0, 0},
+ /* pin_idx = */ {0, 0, 0, 0, 0, 0, 0, 0},
+ /* num_flush_ops = */ 4,
+ /* flush_ops = */
+ /* op_code: type: idx: flag: size: order_ptr: */
+ {{FLUSH_OP__DIRTY, VARIABLE_ENTRY_TYPE, 350, FALSE, 0, NULL},
+ {FLUSH_OP__DIRTY, VARIABLE_ENTRY_TYPE, 450, FALSE, 0, NULL},
+ {FLUSH_OP__DIRTY, VARIABLE_ENTRY_TYPE, 650, FALSE, 0, NULL},
+ {FLUSH_OP__DIRTY, VARIABLE_ENTRY_TYPE, 750, FALSE, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL}},
+ /* expected_deserialized = */ TRUE,
+ /* expected_serialized = */ TRUE,
+ /* expected_destroyed = */ TRUE};
+
+ checks[0] = (struct fo_flush_entry_check){/* entry_num = */ 0,
/* entry_type = */ VARIABLE_ENTRY_TYPE,
/* entry_index = */ 100,
/* expected_size = */ VARIABLE_ENTRY_SIZE,
/* in_cache = */ FALSE,
/* at_main_addr = */ TRUE,
- /* is_dirty = */ FALSE,
+ /* is_dirty = */ FALSE,
/* is_protected = */ FALSE,
/* is_pinned = */ FALSE,
/* expected_deserialized = */ TRUE,
/* expected_serialized = */ TRUE,
- /* expected_destroyed = */ TRUE},
- {/* entry_num = */ 1,
+ /* expected_destroyed = */ TRUE};
+ checks[1] = (struct fo_flush_entry_check){/* entry_num = */ 1,
/* entry_type = */ VARIABLE_ENTRY_TYPE,
/* entry_index = */ 300,
/* expected_size = */ VARIABLE_ENTRY_SIZE,
/* in_cache = */ FALSE,
/* at_main_addr = */ FALSE,
- /* is_dirty = */ FALSE,
+ /* is_dirty = */ FALSE,
/* is_protected = */ FALSE,
/* is_pinned = */ FALSE,
/* expected_deserialized = */ TRUE,
/* expected_serialized = */ TRUE,
- /* expected_destroyed = */ TRUE},
- {/* entry_num = */ 2,
+ /* expected_destroyed = */ TRUE};
+ checks[2] = (struct fo_flush_entry_check){/* entry_num = */ 2,
/* entry_type = */ VARIABLE_ENTRY_TYPE,
/* entry_index = */ 2200,
/* expected_size = */ VARIABLE_ENTRY_SIZE / 2,
/* in_cache = */ FALSE,
/* at_main_addr = */ TRUE,
- /* is_dirty = */ FALSE,
+ /* is_dirty = */ FALSE,
/* is_protected = */ FALSE,
/* is_pinned = */ FALSE,
/* expected_deserialized = */ TRUE,
/* expected_serialized = */ TRUE,
- /* expected_destroyed = */ TRUE}
-
- };
+ /* expected_destroyed = */ TRUE};
check_flush_cache__flush_op_test(file_ptr, test_num, flush_flags, spec_size, spec,
init_expected_index_len, init_expected_index_size,
@@ -7654,157 +7825,166 @@ check_flush_cache__flush_ops(H5F_t *file_ptr)
* and resizes itself, and dirties an entry which it has
* pinned.
*/
- int test_num = 28;
- unsigned int flush_flags = H5C__NO_FLAGS_SET;
- int spec_size = 5;
- unsigned init_expected_index_len = 5;
- size_t init_expected_index_size = 3 * VARIABLE_ENTRY_SIZE;
- unsigned expected_index_len = 5;
- size_t expected_index_size = 4 * VARIABLE_ENTRY_SIZE;
- struct fo_flush_cache_test_spec spec[5] = {
- {/* entry_num = */ 0,
- /* entry_type = */ VARIABLE_ENTRY_TYPE,
- /* entry_index = */ 100,
- /* insert_flag = */ FALSE,
- /* flags = */ H5C__NO_FLAGS_SET,
- /* resize_flag = */ FALSE,
- /* new_size = */ 0,
- /* num_pins = */ 0,
- /* pin_type = */ {0, 0, 0, 0, 0, 0, 0, 0},
- /* pin_idx = */ {0, 0, 0, 0, 0, 0, 0, 0},
- /* num_flush_ops = */ 0,
- /* flush_ops = */
- /* op_code: type: idx: flag: size: order_ptr: */
- {{FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL}},
- /* expected_deserialized = */ TRUE,
- /* expected_serialized = */ TRUE,
- /* expected_destroyed = */ FALSE},
- {/* entry_num = */ 1,
- /* entry_type = */ VARIABLE_ENTRY_TYPE,
- /* entry_index = */ 200,
- /* insert_flag = */ FALSE,
- /* flags = */ H5C__DIRTIED_FLAG,
- /* resize_flag = */ TRUE,
- /* new_size = */ VARIABLE_ENTRY_SIZE / 2,
- /* num_pins = */ 1,
- /* pin_type = */ {VARIABLE_ENTRY_TYPE, 0, 0, 0, 0, 0, 0, 0},
- /* pin_idx = */ {100, 0, 0, 0, 0, 0, 0, 0},
- /* num_flush_ops = */ 3,
- /* flush_ops = */
- /* op_code: type: idx: flag: size: order_ptr: */
- {{FLUSH_OP__DIRTY, VARIABLE_ENTRY_TYPE, 100, FALSE, 0, NULL},
- {FLUSH_OP__RESIZE, VARIABLE_ENTRY_TYPE, 200, FALSE, VARIABLE_ENTRY_SIZE, NULL},
- {FLUSH_OP__MOVE, VARIABLE_ENTRY_TYPE, 200, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL}},
- /* expected_deserialized = */ TRUE,
- /* expected_serialized = */ TRUE,
- /* expected_destroyed = */ FALSE},
- {/* entry_num = */ 2,
- /* entry_type = */ VARIABLE_ENTRY_TYPE,
- /* entry_index = */ 300,
- /* insert_flag = */ FALSE,
- /* flags = */ H5C__DIRTIED_FLAG,
- /* resize_flag = */ TRUE,
- /* new_size = */ VARIABLE_ENTRY_SIZE / 4,
- /* num_pins = */ 1,
- /* pin_type = */ {VARIABLE_ENTRY_TYPE, 0, 0, 0, 0, 0, 0, 0},
- /* pin_idx = */ {400, 0, 0, 0, 0, 0, 0, 0},
- /* num_flush_ops = */ 3,
- /* flush_ops = */
- /* op_code: type: idx: flag: size: order_ptr: */
- {{FLUSH_OP__DIRTY, VARIABLE_ENTRY_TYPE, 400, FALSE, 0, NULL},
- {FLUSH_OP__RESIZE, VARIABLE_ENTRY_TYPE, 300, FALSE, VARIABLE_ENTRY_SIZE / 2, NULL},
- {FLUSH_OP__MOVE, VARIABLE_ENTRY_TYPE, 300, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL}},
- /* expected_deserialized = */ TRUE,
- /* expected_serialized = */ TRUE,
- /* expected_destroyed = */ FALSE},
- {/* entry_num = */ 3,
- /* entry_type = */ VARIABLE_ENTRY_TYPE,
- /* entry_index = */ 400,
- /* insert_flag = */ FALSE,
- /* flags = */ H5C__NO_FLAGS_SET,
- /* resize_flag = */ FALSE,
- /* new_size = */ 0,
- /* num_pins = */ 0,
- /* pin_type = */ {0, 0, 0, 0, 0, 0, 0, 0},
- /* pin_idx = */ {0, 0, 0, 0, 0, 0, 0, 0},
- /* num_flush_ops = */ 0,
- /* flush_ops = */
- /* op_code: type: idx: flag: size: order_ptr: */
- {{FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL}},
- /* expected_deserialized = */ TRUE,
- /* expected_serialized = */ TRUE,
- /* expected_destroyed = */ FALSE},
- {/* entry_num = */ 4,
- /* entry_type = */ VARIABLE_ENTRY_TYPE,
- /* entry_index = */ 500,
- /* insert_flag = */ FALSE,
- /* flags = */ H5C__DIRTIED_FLAG,
- /* resize_flag = */ TRUE,
- /* new_size = */ VARIABLE_ENTRY_SIZE / 4,
- /* num_pins = */ 1,
- /* pin_type = */ {VARIABLE_ENTRY_TYPE, 0, 0, 0, 0, 0, 0, 0},
- /* pin_idx = */ {100, 0, 0, 0, 0, 0, 0, 0},
- /* num_flush_ops = */ 3,
- /* flush_ops = */
- /* op_code: type: idx: flag: size: order_ptr: */
- {{FLUSH_OP__DIRTY, VARIABLE_ENTRY_TYPE, 100, FALSE, 0, NULL},
- {FLUSH_OP__RESIZE, VARIABLE_ENTRY_TYPE, 500, FALSE, VARIABLE_ENTRY_SIZE / 2, NULL},
- {FLUSH_OP__MOVE, VARIABLE_ENTRY_TYPE, 500, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL}},
- /* expected_deserialized = */ TRUE,
- /* expected_serialized = */ TRUE,
- /* expected_destroyed = */ FALSE}};
- int check_size = 0;
- struct fo_flush_entry_check checks[1] = {{/* entry_num = */ 0,
+ int test_num = 28;
+ unsigned int flush_flags = H5C__NO_FLAGS_SET;
+ int spec_size = 5;
+ int check_size = 0;
+ unsigned init_expected_index_len = 5;
+ size_t init_expected_index_size = 3 * VARIABLE_ENTRY_SIZE;
+ unsigned expected_index_len = 5;
+ size_t expected_index_size = 4 * VARIABLE_ENTRY_SIZE;
+
+ HDassert(spec_size <= max_num_spec);
+ HDassert(check_size <= max_num_check);
+
+ spec[0] = (struct fo_flush_cache_test_spec){
+ /* entry_num = */ 0,
+ /* entry_type = */ VARIABLE_ENTRY_TYPE,
+ /* entry_index = */ 100,
+ /* insert_flag = */ FALSE,
+ /* flags = */ H5C__NO_FLAGS_SET,
+ /* resize_flag = */ FALSE,
+ /* new_size = */ 0,
+ /* num_pins = */ 0,
+ /* pin_type = */ {0, 0, 0, 0, 0, 0, 0, 0},
+ /* pin_idx = */ {0, 0, 0, 0, 0, 0, 0, 0},
+ /* num_flush_ops = */ 0,
+ /* flush_ops = */
+ /* op_code: type: idx: flag: size: order_ptr: */
+ {{FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL}},
+ /* expected_deserialized = */ TRUE,
+ /* expected_serialized = */ TRUE,
+ /* expected_destroyed = */ FALSE};
+ spec[1] = (struct fo_flush_cache_test_spec){
+ /* entry_num = */ 1,
+ /* entry_type = */ VARIABLE_ENTRY_TYPE,
+ /* entry_index = */ 200,
+ /* insert_flag = */ FALSE,
+ /* flags = */ H5C__DIRTIED_FLAG,
+ /* resize_flag = */ TRUE,
+ /* new_size = */ VARIABLE_ENTRY_SIZE / 2,
+ /* num_pins = */ 1,
+ /* pin_type = */ {VARIABLE_ENTRY_TYPE, 0, 0, 0, 0, 0, 0, 0},
+ /* pin_idx = */ {100, 0, 0, 0, 0, 0, 0, 0},
+ /* num_flush_ops = */ 3,
+ /* flush_ops = */
+ /* op_code: type: idx: flag: size: order_ptr: */
+ {{FLUSH_OP__DIRTY, VARIABLE_ENTRY_TYPE, 100, FALSE, 0, NULL},
+ {FLUSH_OP__RESIZE, VARIABLE_ENTRY_TYPE, 200, FALSE, VARIABLE_ENTRY_SIZE, NULL},
+ {FLUSH_OP__MOVE, VARIABLE_ENTRY_TYPE, 200, FALSE, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL}},
+ /* expected_deserialized = */ TRUE,
+ /* expected_serialized = */ TRUE,
+ /* expected_destroyed = */ FALSE};
+ spec[2] = (struct fo_flush_cache_test_spec){
+ /* entry_num = */ 2,
+ /* entry_type = */ VARIABLE_ENTRY_TYPE,
+ /* entry_index = */ 300,
+ /* insert_flag = */ FALSE,
+ /* flags = */ H5C__DIRTIED_FLAG,
+ /* resize_flag = */ TRUE,
+ /* new_size = */ VARIABLE_ENTRY_SIZE / 4,
+ /* num_pins = */ 1,
+ /* pin_type = */ {VARIABLE_ENTRY_TYPE, 0, 0, 0, 0, 0, 0, 0},
+ /* pin_idx = */ {400, 0, 0, 0, 0, 0, 0, 0},
+ /* num_flush_ops = */ 3,
+ /* flush_ops = */
+ /* op_code: type: idx: flag: size: order_ptr: */
+ {{FLUSH_OP__DIRTY, VARIABLE_ENTRY_TYPE, 400, FALSE, 0, NULL},
+ {FLUSH_OP__RESIZE, VARIABLE_ENTRY_TYPE, 300, FALSE, VARIABLE_ENTRY_SIZE / 2, NULL},
+ {FLUSH_OP__MOVE, VARIABLE_ENTRY_TYPE, 300, FALSE, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL}},
+ /* expected_deserialized = */ TRUE,
+ /* expected_serialized = */ TRUE,
+ /* expected_destroyed = */ FALSE};
+ spec[3] = (struct fo_flush_cache_test_spec){
+ /* entry_num = */ 3,
+ /* entry_type = */ VARIABLE_ENTRY_TYPE,
+ /* entry_index = */ 400,
+ /* insert_flag = */ FALSE,
+ /* flags = */ H5C__NO_FLAGS_SET,
+ /* resize_flag = */ FALSE,
+ /* new_size = */ 0,
+ /* num_pins = */ 0,
+ /* pin_type = */ {0, 0, 0, 0, 0, 0, 0, 0},
+ /* pin_idx = */ {0, 0, 0, 0, 0, 0, 0, 0},
+ /* num_flush_ops = */ 0,
+ /* flush_ops = */
+ /* op_code: type: idx: flag: size: order_ptr: */
+ {{FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL}},
+ /* expected_deserialized = */ TRUE,
+ /* expected_serialized = */ TRUE,
+ /* expected_destroyed = */ FALSE};
+ spec[4] = (struct fo_flush_cache_test_spec){
+ /* entry_num = */ 4,
+ /* entry_type = */ VARIABLE_ENTRY_TYPE,
+ /* entry_index = */ 500,
+ /* insert_flag = */ FALSE,
+ /* flags = */ H5C__DIRTIED_FLAG,
+ /* resize_flag = */ TRUE,
+ /* new_size = */ VARIABLE_ENTRY_SIZE / 4,
+ /* num_pins = */ 1,
+ /* pin_type = */ {VARIABLE_ENTRY_TYPE, 0, 0, 0, 0, 0, 0, 0},
+ /* pin_idx = */ {100, 0, 0, 0, 0, 0, 0, 0},
+ /* num_flush_ops = */ 3,
+ /* flush_ops = */
+ /* op_code: type: idx: flag: size: order_ptr: */
+ {{FLUSH_OP__DIRTY, VARIABLE_ENTRY_TYPE, 100, FALSE, 0, NULL},
+ {FLUSH_OP__RESIZE, VARIABLE_ENTRY_TYPE, 500, FALSE, VARIABLE_ENTRY_SIZE / 2, NULL},
+ {FLUSH_OP__MOVE, VARIABLE_ENTRY_TYPE, 500, FALSE, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL}},
+ /* expected_deserialized = */ TRUE,
+ /* expected_serialized = */ TRUE,
+ /* expected_destroyed = */ FALSE};
+
+ checks[0] = (struct fo_flush_entry_check){/* entry_num = */ 0,
/* entry_type = */ 0,
/* entry_index = */ 0,
/* expected_size = */ 0,
/* in_cache = */ FALSE,
/* at_main_addr = */ FALSE,
- /* is_dirty = */ FALSE,
+ /* is_dirty = */ FALSE,
/* is_protected = */ FALSE,
/* is_pinned = */ FALSE,
/* expected_deserialized = */ FALSE,
/* expected_serialized = */ FALSE,
- /* expected_destroyed = */ FALSE}};
+ /* expected_destroyed = */ FALSE};
check_flush_cache__flush_op_test(file_ptr, test_num, flush_flags, spec_size, spec,
init_expected_index_len, init_expected_index_size,
@@ -7821,157 +8001,166 @@ check_flush_cache__flush_ops(H5F_t *file_ptr)
* and resizes itself, and dirties an entry which it has
* pinned.
*/
- int test_num = 29;
- unsigned int flush_flags = H5C__FLUSH_INVALIDATE_FLAG;
- int spec_size = 5;
- unsigned init_expected_index_len = 5;
- size_t init_expected_index_size = 3 * VARIABLE_ENTRY_SIZE;
- unsigned expected_index_len = 0;
- size_t expected_index_size = 0;
- struct fo_flush_cache_test_spec spec[5] = {
- {/* entry_num = */ 0,
- /* entry_type = */ VARIABLE_ENTRY_TYPE,
- /* entry_index = */ 100,
- /* insert_flag = */ FALSE,
- /* flags = */ H5C__NO_FLAGS_SET,
- /* resize_flag = */ FALSE,
- /* new_size = */ 0,
- /* num_pins = */ 0,
- /* pin_type = */ {0, 0, 0, 0, 0, 0, 0, 0},
- /* pin_idx = */ {0, 0, 0, 0, 0, 0, 0, 0},
- /* num_flush_ops = */ 0,
- /* flush_ops = */
- /* op_code: type: idx: flag: size: order_ptr: */
- {{FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL}},
- /* expected_deserialized = */ TRUE,
- /* expected_serialized = */ TRUE,
- /* expected_destroyed = */ TRUE},
- {/* entry_num = */ 1,
- /* entry_type = */ VARIABLE_ENTRY_TYPE,
- /* entry_index = */ 200,
- /* insert_flag = */ FALSE,
- /* flags = */ H5C__DIRTIED_FLAG,
- /* resize_flag = */ TRUE,
- /* new_size = */ VARIABLE_ENTRY_SIZE / 2,
- /* num_pins = */ 1,
- /* pin_type = */ {VARIABLE_ENTRY_TYPE, 0, 0, 0, 0, 0, 0, 0},
- /* pin_idx = */ {100, 0, 0, 0, 0, 0, 0, 0},
- /* num_flush_ops = */ 3,
- /* flush_ops = */
- /* op_code: type: idx: flag: size: order_ptr: */
- {{FLUSH_OP__DIRTY, VARIABLE_ENTRY_TYPE, 100, FALSE, 0, NULL},
- {FLUSH_OP__RESIZE, VARIABLE_ENTRY_TYPE, 200, FALSE, VARIABLE_ENTRY_SIZE, NULL},
- {FLUSH_OP__MOVE, VARIABLE_ENTRY_TYPE, 200, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL}},
- /* expected_deserialized = */ TRUE,
- /* expected_serialized = */ TRUE,
- /* expected_destroyed = */ TRUE},
- {/* entry_num = */ 2,
- /* entry_type = */ VARIABLE_ENTRY_TYPE,
- /* entry_index = */ 300,
- /* insert_flag = */ FALSE,
- /* flags = */ H5C__DIRTIED_FLAG,
- /* resize_flag = */ TRUE,
- /* new_size = */ VARIABLE_ENTRY_SIZE / 4,
- /* num_pins = */ 1,
- /* pin_type = */ {VARIABLE_ENTRY_TYPE, 0, 0, 0, 0, 0, 0, 0},
- /* pin_idx = */ {400, 0, 0, 0, 0, 0, 0, 0},
- /* num_flush_ops = */ 3,
- /* flush_ops = */
- /* op_code: type: idx: flag: size: order_ptr: */
- {{FLUSH_OP__DIRTY, VARIABLE_ENTRY_TYPE, 400, FALSE, 0, NULL},
- {FLUSH_OP__RESIZE, VARIABLE_ENTRY_TYPE, 300, FALSE, VARIABLE_ENTRY_SIZE / 2, NULL},
- {FLUSH_OP__MOVE, VARIABLE_ENTRY_TYPE, 300, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL}},
- /* expected_deserialized = */ TRUE,
- /* expected_serialized = */ TRUE,
- /* expected_destroyed = */ TRUE},
- {/* entry_num = */ 3,
- /* entry_type = */ VARIABLE_ENTRY_TYPE,
- /* entry_index = */ 400,
- /* insert_flag = */ FALSE,
- /* flags = */ H5C__NO_FLAGS_SET,
- /* resize_flag = */ FALSE,
- /* new_size = */ 0,
- /* num_pins = */ 0,
- /* pin_type = */ {0, 0, 0, 0, 0, 0, 0, 0},
- /* pin_idx = */ {0, 0, 0, 0, 0, 0, 0, 0},
- /* num_flush_ops = */ 0,
- /* flush_ops = */
- /* op_code: type: idx: flag: size: order_ptr: */
- {{FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL}},
- /* expected_deserialized = */ TRUE,
- /* expected_serialized = */ TRUE,
- /* expected_destroyed = */ TRUE},
- {/* entry_num = */ 4,
- /* entry_type = */ VARIABLE_ENTRY_TYPE,
- /* entry_index = */ 500,
- /* insert_flag = */ FALSE,
- /* flags = */ H5C__DIRTIED_FLAG,
- /* resize_flag = */ TRUE,
- /* new_size = */ VARIABLE_ENTRY_SIZE / 4,
- /* num_pins = */ 1,
- /* pin_type = */ {VARIABLE_ENTRY_TYPE, 0, 0, 0, 0, 0, 0, 0},
- /* pin_idx = */ {100, 0, 0, 0, 0, 0, 0, 0},
- /* num_flush_ops = */ 3,
- /* flush_ops = */
- /* op_code: type: idx: flag: size: order_ptr: */
- {{FLUSH_OP__DIRTY, VARIABLE_ENTRY_TYPE, 100, FALSE, 0, NULL},
- {FLUSH_OP__RESIZE, VARIABLE_ENTRY_TYPE, 500, FALSE, VARIABLE_ENTRY_SIZE / 2, NULL},
- {FLUSH_OP__MOVE, VARIABLE_ENTRY_TYPE, 500, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
- {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL}},
- /* expected_deserialized = */ TRUE,
- /* expected_serialized = */ TRUE,
- /* expected_destroyed = */ TRUE}};
- int check_size = 0;
- struct fo_flush_entry_check checks[1] = {{/* entry_num = */ 0,
+ int test_num = 29;
+ unsigned int flush_flags = H5C__FLUSH_INVALIDATE_FLAG;
+ int spec_size = 5;
+ int check_size = 0;
+ unsigned init_expected_index_len = 5;
+ size_t init_expected_index_size = 3 * VARIABLE_ENTRY_SIZE;
+ unsigned expected_index_len = 0;
+ size_t expected_index_size = 0;
+
+ HDassert(spec_size <= max_num_spec);
+ HDassert(check_size <= max_num_check);
+
+ spec[0] = (struct fo_flush_cache_test_spec){
+ /* entry_num = */ 0,
+ /* entry_type = */ VARIABLE_ENTRY_TYPE,
+ /* entry_index = */ 100,
+ /* insert_flag = */ FALSE,
+ /* flags = */ H5C__NO_FLAGS_SET,
+ /* resize_flag = */ FALSE,
+ /* new_size = */ 0,
+ /* num_pins = */ 0,
+ /* pin_type = */ {0, 0, 0, 0, 0, 0, 0, 0},
+ /* pin_idx = */ {0, 0, 0, 0, 0, 0, 0, 0},
+ /* num_flush_ops = */ 0,
+ /* flush_ops = */
+ /* op_code: type: idx: flag: size: order_ptr: */
+ {{FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL}},
+ /* expected_deserialized = */ TRUE,
+ /* expected_serialized = */ TRUE,
+ /* expected_destroyed = */ TRUE};
+ spec[1] = (struct fo_flush_cache_test_spec){
+ /* entry_num = */ 1,
+ /* entry_type = */ VARIABLE_ENTRY_TYPE,
+ /* entry_index = */ 200,
+ /* insert_flag = */ FALSE,
+ /* flags = */ H5C__DIRTIED_FLAG,
+ /* resize_flag = */ TRUE,
+ /* new_size = */ VARIABLE_ENTRY_SIZE / 2,
+ /* num_pins = */ 1,
+ /* pin_type = */ {VARIABLE_ENTRY_TYPE, 0, 0, 0, 0, 0, 0, 0},
+ /* pin_idx = */ {100, 0, 0, 0, 0, 0, 0, 0},
+ /* num_flush_ops = */ 3,
+ /* flush_ops = */
+ /* op_code: type: idx: flag: size: order_ptr: */
+ {{FLUSH_OP__DIRTY, VARIABLE_ENTRY_TYPE, 100, FALSE, 0, NULL},
+ {FLUSH_OP__RESIZE, VARIABLE_ENTRY_TYPE, 200, FALSE, VARIABLE_ENTRY_SIZE, NULL},
+ {FLUSH_OP__MOVE, VARIABLE_ENTRY_TYPE, 200, FALSE, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL}},
+ /* expected_deserialized = */ TRUE,
+ /* expected_serialized = */ TRUE,
+ /* expected_destroyed = */ TRUE};
+ spec[2] = (struct fo_flush_cache_test_spec){
+ /* entry_num = */ 2,
+ /* entry_type = */ VARIABLE_ENTRY_TYPE,
+ /* entry_index = */ 300,
+ /* insert_flag = */ FALSE,
+ /* flags = */ H5C__DIRTIED_FLAG,
+ /* resize_flag = */ TRUE,
+ /* new_size = */ VARIABLE_ENTRY_SIZE / 4,
+ /* num_pins = */ 1,
+ /* pin_type = */ {VARIABLE_ENTRY_TYPE, 0, 0, 0, 0, 0, 0, 0},
+ /* pin_idx = */ {400, 0, 0, 0, 0, 0, 0, 0},
+ /* num_flush_ops = */ 3,
+ /* flush_ops = */
+ /* op_code: type: idx: flag: size: order_ptr: */
+ {{FLUSH_OP__DIRTY, VARIABLE_ENTRY_TYPE, 400, FALSE, 0, NULL},
+ {FLUSH_OP__RESIZE, VARIABLE_ENTRY_TYPE, 300, FALSE, VARIABLE_ENTRY_SIZE / 2, NULL},
+ {FLUSH_OP__MOVE, VARIABLE_ENTRY_TYPE, 300, FALSE, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL}},
+ /* expected_deserialized = */ TRUE,
+ /* expected_serialized = */ TRUE,
+ /* expected_destroyed = */ TRUE};
+ spec[3] = (struct fo_flush_cache_test_spec){
+ /* entry_num = */ 3,
+ /* entry_type = */ VARIABLE_ENTRY_TYPE,
+ /* entry_index = */ 400,
+ /* insert_flag = */ FALSE,
+ /* flags = */ H5C__NO_FLAGS_SET,
+ /* resize_flag = */ FALSE,
+ /* new_size = */ 0,
+ /* num_pins = */ 0,
+ /* pin_type = */ {0, 0, 0, 0, 0, 0, 0, 0},
+ /* pin_idx = */ {0, 0, 0, 0, 0, 0, 0, 0},
+ /* num_flush_ops = */ 0,
+ /* flush_ops = */
+ /* op_code: type: idx: flag: size: order_ptr: */
+ {{FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL}},
+ /* expected_deserialized = */ TRUE,
+ /* expected_serialized = */ TRUE,
+ /* expected_destroyed = */ TRUE};
+ spec[4] = (struct fo_flush_cache_test_spec){
+ /* entry_num = */ 4,
+ /* entry_type = */ VARIABLE_ENTRY_TYPE,
+ /* entry_index = */ 500,
+ /* insert_flag = */ FALSE,
+ /* flags = */ H5C__DIRTIED_FLAG,
+ /* resize_flag = */ TRUE,
+ /* new_size = */ VARIABLE_ENTRY_SIZE / 4,
+ /* num_pins = */ 1,
+ /* pin_type = */ {VARIABLE_ENTRY_TYPE, 0, 0, 0, 0, 0, 0, 0},
+ /* pin_idx = */ {100, 0, 0, 0, 0, 0, 0, 0},
+ /* num_flush_ops = */ 3,
+ /* flush_ops = */
+ /* op_code: type: idx: flag: size: order_ptr: */
+ {{FLUSH_OP__DIRTY, VARIABLE_ENTRY_TYPE, 100, FALSE, 0, NULL},
+ {FLUSH_OP__RESIZE, VARIABLE_ENTRY_TYPE, 500, FALSE, VARIABLE_ENTRY_SIZE / 2, NULL},
+ {FLUSH_OP__MOVE, VARIABLE_ENTRY_TYPE, 500, FALSE, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL},
+ {FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL}},
+ /* expected_deserialized = */ TRUE,
+ /* expected_serialized = */ TRUE,
+ /* expected_destroyed = */ TRUE};
+
+ checks[0] = (struct fo_flush_entry_check){/* entry_num = */ 0,
/* entry_type = */ 0,
/* entry_index = */ 0,
/* expected_size = */ 0,
/* in_cache = */ FALSE,
/* at_main_addr = */ FALSE,
- /* is_dirty = */ FALSE,
+ /* is_dirty = */ FALSE,
/* is_protected = */ FALSE,
/* is_pinned = */ FALSE,
/* expected_deserialized = */ FALSE,
/* expected_serialized = */ FALSE,
- /* expected_destroyed = */ FALSE}};
+ /* expected_destroyed = */ FALSE};
check_flush_cache__flush_op_test(file_ptr, test_num, flush_flags, spec_size, spec,
init_expected_index_len, init_expected_index_size,
@@ -7980,6 +8169,9 @@ check_flush_cache__flush_ops(H5F_t *file_ptr)
reset_entries();
}
+ HDfree(checks);
+ HDfree(spec);
+
/* finally finish up with the flush ops eviction test */
check_flush_cache__flush_op_eviction_test(file_ptr);
@@ -8405,1013 +8597,125 @@ check_flush_cache__flush_op_test(H5F_t *file_ptr, int test_num, unsigned int flu
static void
check_flush_cache__flush_op_eviction_test(H5F_t *file_ptr)
{
- H5C_t * cache_ptr = file_ptr->shared->cache;
- int i;
- int num_variable_entries = 10;
- int num_monster_entries = 31;
- int num_large_entries = 0;
- test_entry_t * entry_ptr;
- test_entry_t * base_addr;
- struct expected_entry_status expected[10 + 31 + 14] = {
+ struct expected_entry_status *expected = NULL;
+ H5C_t * cache_ptr = file_ptr->shared->cache;
+ int i;
+ const int num_variable_entries = 10;
+ const int num_monster_entries = 31;
+ int num_large_entries = 14;
+ const int num_total_entries = num_variable_entries + num_monster_entries + num_large_entries;
+ test_entry_t *entry_ptr;
+ test_entry_t *base_addr;
+
+ expected = HDmalloc((size_t)num_total_entries * sizeof(struct expected_entry_status));
+ if (expected == NULL) {
+
+ pass = FALSE;
+ failure_mssg = "couldn't allocate expected entry status array\n";
+ }
+
+ if (expected) {
/* the expected array is used to maintain a table of the expected status of every
* entry used in this test. Note that since the function that processes this
* array only processes as much of it as it is told to, we don't have to
* worry about maintaining the status of entries that we haven't used yet.
*/
- /* entry entry in at main flush dep flush dep child flush flush
- flush */
- /* type: index: size: cache: addr: dirty: prot: pinned: dsrlzd:
- srlzd: dest: par type[]: par idx[]: dep npart: dep nchd: dep ndirty chd: order: corked: */
- {VARIABLE_ENTRY_TYPE,
- 0,
- VARIABLE_ENTRY_SIZE / 4,
- TRUE,
- TRUE,
- TRUE,
- FALSE,
- TRUE,
- TRUE,
- FALSE,
- FALSE,
- {0, 0, 0, 0, 0, 0, 0, 0},
- {0, 0, 0, 0, 0, 0, 0, 0},
- 0,
- 0,
- 0,
- -1,
- FALSE},
- {VARIABLE_ENTRY_TYPE,
- 1,
- VARIABLE_ENTRY_SIZE / 4,
- TRUE,
- TRUE,
- TRUE,
- FALSE,
- FALSE,
- TRUE,
- FALSE,
- FALSE,
- {0, 0, 0, 0, 0, 0, 0, 0},
- {0, 0, 0, 0, 0, 0, 0, 0},
- 0,
- 0,
- 0,
- -1,
- FALSE},
- {VARIABLE_ENTRY_TYPE,
- 2,
- VARIABLE_ENTRY_SIZE,
- TRUE,
- TRUE,
- FALSE,
- FALSE,
- FALSE,
- TRUE,
- FALSE,
- FALSE,
- {0, 0, 0, 0, 0, 0, 0, 0},
- {0, 0, 0, 0, 0, 0, 0, 0},
- 0,
- 0,
- 0,
- -1,
- FALSE},
- {VARIABLE_ENTRY_TYPE,
- 3,
- VARIABLE_ENTRY_SIZE / 4,
- TRUE,
- TRUE,
- TRUE,
- FALSE,
- FALSE,
- TRUE,
- FALSE,
- FALSE,
- {0, 0, 0, 0, 0, 0, 0, 0},
- {0, 0, 0, 0, 0, 0, 0, 0},
- 0,
- 0,
- 0,
- -1,
- FALSE},
- {VARIABLE_ENTRY_TYPE,
- 4,
- VARIABLE_ENTRY_SIZE,
- TRUE,
- TRUE,
- FALSE,
- FALSE,
- FALSE,
- TRUE,
- FALSE,
- FALSE,
- {0, 0, 0, 0, 0, 0, 0, 0},
- {0, 0, 0, 0, 0, 0, 0, 0},
- 0,
- 0,
- 0,
- -1,
- FALSE},
- {VARIABLE_ENTRY_TYPE,
- 5,
- VARIABLE_ENTRY_SIZE / 4,
- TRUE,
- TRUE,
- TRUE,
- FALSE,
- FALSE,
- TRUE,
- FALSE,
- FALSE,
- {0, 0, 0, 0, 0, 0, 0, 0},
- {0, 0, 0, 0, 0, 0, 0, 0},
- 0,
- 0,
- 0,
- -1,
- FALSE},
- {VARIABLE_ENTRY_TYPE,
- 6,
- VARIABLE_ENTRY_SIZE / 2,
- TRUE,
- TRUE,
- TRUE,
- FALSE,
- FALSE,
- TRUE,
- FALSE,
- FALSE,
- {0, 0, 0, 0, 0, 0, 0, 0},
- {0, 0, 0, 0, 0, 0, 0, 0},
- 0,
- 0,
- 0,
- -1,
- FALSE},
- {VARIABLE_ENTRY_TYPE,
- 7,
- VARIABLE_ENTRY_SIZE / 2,
- TRUE,
- TRUE,
- TRUE,
- FALSE,
- FALSE,
- TRUE,
- FALSE,
- FALSE,
- {0, 0, 0, 0, 0, 0, 0, 0},
- {0, 0, 0, 0, 0, 0, 0, 0},
- 0,
- 0,
- 0,
- -1,
- FALSE},
- {VARIABLE_ENTRY_TYPE,
- 8,
- VARIABLE_ENTRY_SIZE,
- TRUE,
- TRUE,
- FALSE,
- FALSE,
- FALSE,
- TRUE,
- FALSE,
- FALSE,
- {0, 0, 0, 0, 0, 0, 0, 0},
- {0, 0, 0, 0, 0, 0, 0, 0},
- 0,
- 0,
- 0,
- -1,
- FALSE},
- {VARIABLE_ENTRY_TYPE,
- 9,
- VARIABLE_ENTRY_SIZE,
- TRUE,
- TRUE,
- FALSE,
- FALSE,
- TRUE,
- TRUE,
- FALSE,
- FALSE,
- {0, 0, 0, 0, 0, 0, 0, 0},
- {0, 0, 0, 0, 0, 0, 0, 0},
- 0,
- 0,
- 0,
- -1,
- FALSE},
- {MONSTER_ENTRY_TYPE,
- 0,
- MONSTER_ENTRY_SIZE,
- TRUE,
- TRUE,
- TRUE,
- FALSE,
- FALSE,
- TRUE,
- FALSE,
- FALSE,
- {0, 0, 0, 0, 0, 0, 0, 0},
- {0, 0, 0, 0, 0, 0, 0, 0},
- 0,
- 0,
- 0,
- -1,
- FALSE},
- {MONSTER_ENTRY_TYPE,
- 1,
- MONSTER_ENTRY_SIZE,
- TRUE,
- TRUE,
- TRUE,
- FALSE,
- FALSE,
- TRUE,
- FALSE,
- FALSE,
- {0, 0, 0, 0, 0, 0, 0, 0},
- {0, 0, 0, 0, 0, 0, 0, 0},
- 0,
- 0,
- 0,
- -1,
- FALSE},
- {MONSTER_ENTRY_TYPE,
- 2,
- MONSTER_ENTRY_SIZE,
- TRUE,
- TRUE,
- TRUE,
- FALSE,
- FALSE,
- TRUE,
- FALSE,
- FALSE,
- {0, 0, 0, 0, 0, 0, 0, 0},
- {0, 0, 0, 0, 0, 0, 0, 0},
- 0,
- 0,
- 0,
- -1,
- FALSE},
- {MONSTER_ENTRY_TYPE,
- 3,
- MONSTER_ENTRY_SIZE,
- TRUE,
- TRUE,
- TRUE,
- FALSE,
- FALSE,
- TRUE,
- FALSE,
- FALSE,
- {0, 0, 0, 0, 0, 0, 0, 0},
- {0, 0, 0, 0, 0, 0, 0, 0},
- 0,
- 0,
- 0,
- -1,
- FALSE},
- {MONSTER_ENTRY_TYPE,
- 4,
- MONSTER_ENTRY_SIZE,
- TRUE,
- TRUE,
- TRUE,
- FALSE,
- FALSE,
- TRUE,
- FALSE,
- FALSE,
- {0, 0, 0, 0, 0, 0, 0, 0},
- {0, 0, 0, 0, 0, 0, 0, 0},
- 0,
- 0,
- 0,
- -1,
- FALSE},
- {MONSTER_ENTRY_TYPE,
- 5,
- MONSTER_ENTRY_SIZE,
- TRUE,
- TRUE,
- TRUE,
- FALSE,
- FALSE,
- TRUE,
- FALSE,
- FALSE,
- {0, 0, 0, 0, 0, 0, 0, 0},
- {0, 0, 0, 0, 0, 0, 0, 0},
- 0,
- 0,
- 0,
- -1,
- FALSE},
- {MONSTER_ENTRY_TYPE,
- 6,
- MONSTER_ENTRY_SIZE,
- TRUE,
- TRUE,
- TRUE,
- FALSE,
- FALSE,
- TRUE,
- FALSE,
- FALSE,
- {0, 0, 0, 0, 0, 0, 0, 0},
- {0, 0, 0, 0, 0, 0, 0, 0},
- 0,
- 0,
- 0,
- -1,
- FALSE},
- {MONSTER_ENTRY_TYPE,
- 7,
- MONSTER_ENTRY_SIZE,
- TRUE,
- TRUE,
- TRUE,
- FALSE,
- FALSE,
- TRUE,
- FALSE,
- FALSE,
- {0, 0, 0, 0, 0, 0, 0, 0},
- {0, 0, 0, 0, 0, 0, 0, 0},
- 0,
- 0,
- 0,
- -1,
- FALSE},
- {MONSTER_ENTRY_TYPE,
- 8,
- MONSTER_ENTRY_SIZE,
- TRUE,
- TRUE,
- TRUE,
- FALSE,
- FALSE,
- TRUE,
- FALSE,
- FALSE,
- {0, 0, 0, 0, 0, 0, 0, 0},
- {0, 0, 0, 0, 0, 0, 0, 0},
- 0,
- 0,
- 0,
- -1,
- FALSE},
- {MONSTER_ENTRY_TYPE,
- 9,
- MONSTER_ENTRY_SIZE,
- TRUE,
- TRUE,
- TRUE,
- FALSE,
- FALSE,
- TRUE,
- FALSE,
- FALSE,
- {0, 0, 0, 0, 0, 0, 0, 0},
- {0, 0, 0, 0, 0, 0, 0, 0},
- 0,
- 0,
- 0,
- -1,
- FALSE},
- {MONSTER_ENTRY_TYPE,
- 10,
- MONSTER_ENTRY_SIZE,
- TRUE,
- TRUE,
- TRUE,
- FALSE,
- FALSE,
- TRUE,
- FALSE,
- FALSE,
- {0, 0, 0, 0, 0, 0, 0, 0},
- {0, 0, 0, 0, 0, 0, 0, 0},
- 0,
- 0,
- 0,
- -1,
- FALSE},
- {MONSTER_ENTRY_TYPE,
- 11,
- MONSTER_ENTRY_SIZE,
- TRUE,
- TRUE,
- TRUE,
- FALSE,
- FALSE,
- TRUE,
- FALSE,
- FALSE,
- {0, 0, 0, 0, 0, 0, 0, 0},
- {0, 0, 0, 0, 0, 0, 0, 0},
- 0,
- 0,
- 0,
- -1,
- FALSE},
- {MONSTER_ENTRY_TYPE,
- 12,
- MONSTER_ENTRY_SIZE,
- TRUE,
- TRUE,
- TRUE,
- FALSE,
- FALSE,
- TRUE,
- FALSE,
- FALSE,
- {0, 0, 0, 0, 0, 0, 0, 0},
- {0, 0, 0, 0, 0, 0, 0, 0},
- 0,
- 0,
- 0,
- -1,
- FALSE},
- {MONSTER_ENTRY_TYPE,
- 13,
- MONSTER_ENTRY_SIZE,
- TRUE,
- TRUE,
- TRUE,
- FALSE,
- FALSE,
- TRUE,
- FALSE,
- FALSE,
- {0, 0, 0, 0, 0, 0, 0, 0},
- {0, 0, 0, 0, 0, 0, 0, 0},
- 0,
- 0,
- 0,
- -1,
- FALSE},
- {MONSTER_ENTRY_TYPE,
- 14,
- MONSTER_ENTRY_SIZE,
- TRUE,
- TRUE,
- TRUE,
- FALSE,
- FALSE,
- TRUE,
- FALSE,
- FALSE,
- {0, 0, 0, 0, 0, 0, 0, 0},
- {0, 0, 0, 0, 0, 0, 0, 0},
- 0,
- 0,
- 0,
- -1,
- FALSE},
- {MONSTER_ENTRY_TYPE,
- 15,
- MONSTER_ENTRY_SIZE,
- TRUE,
- TRUE,
- TRUE,
- FALSE,
- FALSE,
- TRUE,
- FALSE,
- FALSE,
- {0, 0, 0, 0, 0, 0, 0, 0},
- {0, 0, 0, 0, 0, 0, 0, 0},
- 0,
- 0,
- 0,
- -1,
- FALSE},
- {MONSTER_ENTRY_TYPE,
- 16,
- MONSTER_ENTRY_SIZE,
- TRUE,
- TRUE,
- TRUE,
- FALSE,
- FALSE,
- TRUE,
- FALSE,
- FALSE,
- {0, 0, 0, 0, 0, 0, 0, 0},
- {0, 0, 0, 0, 0, 0, 0, 0},
- 0,
- 0,
- 0,
- -1,
- FALSE},
- {MONSTER_ENTRY_TYPE,
- 17,
- MONSTER_ENTRY_SIZE,
- TRUE,
- TRUE,
- TRUE,
- FALSE,
- FALSE,
- TRUE,
- FALSE,
- FALSE,
- {0, 0, 0, 0, 0, 0, 0, 0},
- {0, 0, 0, 0, 0, 0, 0, 0},
- 0,
- 0,
- 0,
- -1,
- FALSE},
- {MONSTER_ENTRY_TYPE,
- 18,
- MONSTER_ENTRY_SIZE,
- TRUE,
- TRUE,
- TRUE,
- FALSE,
- FALSE,
- TRUE,
- FALSE,
- FALSE,
- {0, 0, 0, 0, 0, 0, 0, 0},
- {0, 0, 0, 0, 0, 0, 0, 0},
- 0,
- 0,
- 0,
- -1,
- FALSE},
- {MONSTER_ENTRY_TYPE,
- 19,
- MONSTER_ENTRY_SIZE,
- TRUE,
- TRUE,
- TRUE,
- FALSE,
- FALSE,
- TRUE,
- FALSE,
- FALSE,
- {0, 0, 0, 0, 0, 0, 0, 0},
- {0, 0, 0, 0, 0, 0, 0, 0},
- 0,
- 0,
- 0,
- -1,
- FALSE},
- {MONSTER_ENTRY_TYPE,
- 20,
- MONSTER_ENTRY_SIZE,
- TRUE,
- TRUE,
- TRUE,
- FALSE,
- FALSE,
- TRUE,
- FALSE,
- FALSE,
- {0, 0, 0, 0, 0, 0, 0, 0},
- {0, 0, 0, 0, 0, 0, 0, 0},
- 0,
- 0,
- 0,
- -1,
- FALSE},
- {MONSTER_ENTRY_TYPE,
- 21,
- MONSTER_ENTRY_SIZE,
- TRUE,
- TRUE,
- TRUE,
- FALSE,
- FALSE,
- TRUE,
- FALSE,
- FALSE,
- {0, 0, 0, 0, 0, 0, 0, 0},
- {0, 0, 0, 0, 0, 0, 0, 0},
- 0,
- 0,
- 0,
- -1,
- FALSE},
- {MONSTER_ENTRY_TYPE,
- 22,
- MONSTER_ENTRY_SIZE,
- TRUE,
- TRUE,
- TRUE,
- FALSE,
- FALSE,
- TRUE,
- FALSE,
- FALSE,
- {0, 0, 0, 0, 0, 0, 0, 0},
- {0, 0, 0, 0, 0, 0, 0, 0},
- 0,
- 0,
- 0,
- -1,
- FALSE},
- {MONSTER_ENTRY_TYPE,
- 23,
- MONSTER_ENTRY_SIZE,
- TRUE,
- TRUE,
- TRUE,
- FALSE,
- FALSE,
- TRUE,
- FALSE,
- FALSE,
- {0, 0, 0, 0, 0, 0, 0, 0},
- {0, 0, 0, 0, 0, 0, 0, 0},
- 0,
- 0,
- 0,
- -1,
- FALSE},
- {MONSTER_ENTRY_TYPE,
- 24,
- MONSTER_ENTRY_SIZE,
- TRUE,
- TRUE,
- TRUE,
- FALSE,
- FALSE,
- TRUE,
- FALSE,
- FALSE,
- {0, 0, 0, 0, 0, 0, 0, 0},
- {0, 0, 0, 0, 0, 0, 0, 0},
- 0,
- 0,
- 0,
- -1,
- FALSE},
- {MONSTER_ENTRY_TYPE,
- 25,
- MONSTER_ENTRY_SIZE,
- TRUE,
- TRUE,
- TRUE,
- FALSE,
- FALSE,
- TRUE,
- FALSE,
- FALSE,
- {0, 0, 0, 0, 0, 0, 0, 0},
- {0, 0, 0, 0, 0, 0, 0, 0},
- 0,
- 0,
- 0,
- -1,
- FALSE},
- {MONSTER_ENTRY_TYPE,
- 26,
- MONSTER_ENTRY_SIZE,
- TRUE,
- TRUE,
- TRUE,
- FALSE,
- FALSE,
- TRUE,
- FALSE,
- FALSE,
- {0, 0, 0, 0, 0, 0, 0, 0},
- {0, 0, 0, 0, 0, 0, 0, 0},
- 0,
- 0,
- 0,
- -1,
- FALSE},
- {MONSTER_ENTRY_TYPE,
- 27,
- MONSTER_ENTRY_SIZE,
- TRUE,
- TRUE,
- TRUE,
- FALSE,
- FALSE,
- TRUE,
- FALSE,
- FALSE,
- {0, 0, 0, 0, 0, 0, 0, 0},
- {0, 0, 0, 0, 0, 0, 0, 0},
- 0,
- 0,
- 0,
- -1,
- FALSE},
- {MONSTER_ENTRY_TYPE,
- 28,
- MONSTER_ENTRY_SIZE,
- TRUE,
- TRUE,
- TRUE,
- FALSE,
- FALSE,
- TRUE,
- FALSE,
- FALSE,
- {0, 0, 0, 0, 0, 0, 0, 0},
- {0, 0, 0, 0, 0, 0, 0, 0},
- 0,
- 0,
- 0,
- -1,
- FALSE},
- {MONSTER_ENTRY_TYPE,
- 29,
- MONSTER_ENTRY_SIZE,
- TRUE,
- TRUE,
- TRUE,
- FALSE,
- FALSE,
- TRUE,
- FALSE,
- FALSE,
- {0, 0, 0, 0, 0, 0, 0, 0},
- {0, 0, 0, 0, 0, 0, 0, 0},
- 0,
- 0,
- 0,
- -1,
- FALSE},
- {MONSTER_ENTRY_TYPE,
- 30,
- MONSTER_ENTRY_SIZE,
- TRUE,
- TRUE,
- TRUE,
- FALSE,
- FALSE,
- TRUE,
- FALSE,
- FALSE,
- {0, 0, 0, 0, 0, 0, 0, 0},
- {0, 0, 0, 0, 0, 0, 0, 0},
- 0,
- 0,
- 0,
- -1,
- FALSE},
- {LARGE_ENTRY_TYPE,
- 0,
- LARGE_ENTRY_SIZE,
- TRUE,
- TRUE,
- TRUE,
- FALSE,
- FALSE,
- TRUE,
- FALSE,
- FALSE,
- {0, 0, 0, 0, 0, 0, 0, 0},
- {0, 0, 0, 0, 0, 0, 0, 0},
- 0,
- 0,
- 0,
- -1,
- FALSE},
- {LARGE_ENTRY_TYPE,
- 1,
- LARGE_ENTRY_SIZE,
- TRUE,
- TRUE,
- TRUE,
- FALSE,
- FALSE,
- TRUE,
- FALSE,
- FALSE,
- {0, 0, 0, 0, 0, 0, 0, 0},
- {0, 0, 0, 0, 0, 0, 0, 0},
- 0,
- 0,
- 0,
- -1,
- FALSE},
- {LARGE_ENTRY_TYPE,
- 2,
- LARGE_ENTRY_SIZE,
- TRUE,
- TRUE,
- TRUE,
- FALSE,
- FALSE,
- TRUE,
- FALSE,
- FALSE,
- {0, 0, 0, 0, 0, 0, 0, 0},
- {0, 0, 0, 0, 0, 0, 0, 0},
- 0,
- 0,
- 0,
- -1,
- FALSE},
- {LARGE_ENTRY_TYPE,
- 3,
- LARGE_ENTRY_SIZE,
- TRUE,
- TRUE,
- TRUE,
- FALSE,
- FALSE,
- TRUE,
- FALSE,
- FALSE,
- {0, 0, 0, 0, 0, 0, 0, 0},
- {0, 0, 0, 0, 0, 0, 0, 0},
- 0,
- 0,
- 0,
- -1,
- FALSE},
- {LARGE_ENTRY_TYPE,
- 4,
- LARGE_ENTRY_SIZE,
- TRUE,
- TRUE,
- TRUE,
- FALSE,
- FALSE,
- TRUE,
- FALSE,
- FALSE,
- {0, 0, 0, 0, 0, 0, 0, 0},
- {0, 0, 0, 0, 0, 0, 0, 0},
- 0,
- 0,
- 0,
- -1,
- FALSE},
- {LARGE_ENTRY_TYPE,
- 5,
- LARGE_ENTRY_SIZE,
- TRUE,
- TRUE,
- TRUE,
- FALSE,
- FALSE,
- TRUE,
- FALSE,
- FALSE,
- {0, 0, 0, 0, 0, 0, 0, 0},
- {0, 0, 0, 0, 0, 0, 0, 0},
- 0,
- 0,
- 0,
- -1,
- FALSE},
- {LARGE_ENTRY_TYPE,
- 6,
- LARGE_ENTRY_SIZE,
- TRUE,
- TRUE,
- TRUE,
- FALSE,
- FALSE,
- TRUE,
- FALSE,
- FALSE,
- {0, 0, 0, 0, 0, 0, 0, 0},
- {0, 0, 0, 0, 0, 0, 0, 0},
- 0,
- 0,
- 0,
- -1,
- FALSE},
- {LARGE_ENTRY_TYPE,
- 7,
- LARGE_ENTRY_SIZE,
- TRUE,
- TRUE,
- TRUE,
- FALSE,
- FALSE,
- TRUE,
- FALSE,
- FALSE,
- {0, 0, 0, 0, 0, 0, 0, 0},
- {0, 0, 0, 0, 0, 0, 0, 0},
- 0,
- 0,
- 0,
- -1,
- FALSE},
- {LARGE_ENTRY_TYPE,
- 8,
- LARGE_ENTRY_SIZE,
- TRUE,
- TRUE,
- TRUE,
- FALSE,
- FALSE,
- TRUE,
- FALSE,
- FALSE,
- {0, 0, 0, 0, 0, 0, 0, 0},
- {0, 0, 0, 0, 0, 0, 0, 0},
- 0,
- 0,
- 0,
- -1,
- FALSE},
- {LARGE_ENTRY_TYPE,
- 9,
- LARGE_ENTRY_SIZE,
- TRUE,
- TRUE,
- TRUE,
- FALSE,
- FALSE,
- TRUE,
- FALSE,
- FALSE,
- {0, 0, 0, 0, 0, 0, 0, 0},
- {0, 0, 0, 0, 0, 0, 0, 0},
- 0,
- 0,
- 0,
- -1,
- FALSE},
- {LARGE_ENTRY_TYPE,
- 10,
- LARGE_ENTRY_SIZE,
- TRUE,
- TRUE,
- TRUE,
- FALSE,
- FALSE,
- TRUE,
- FALSE,
- FALSE,
- {0, 0, 0, 0, 0, 0, 0, 0},
- {0, 0, 0, 0, 0, 0, 0, 0},
- 0,
- 0,
- 0,
- -1,
- FALSE},
- {LARGE_ENTRY_TYPE,
- 11,
- LARGE_ENTRY_SIZE,
- TRUE,
- TRUE,
- TRUE,
- FALSE,
- FALSE,
- TRUE,
- FALSE,
- FALSE,
- {0, 0, 0, 0, 0, 0, 0, 0},
- {0, 0, 0, 0, 0, 0, 0, 0},
- 0,
- 0,
- 0,
- -1,
- FALSE},
- {LARGE_ENTRY_TYPE,
- 12,
- LARGE_ENTRY_SIZE,
- TRUE,
- TRUE,
- TRUE,
- FALSE,
- FALSE,
- TRUE,
- FALSE,
- FALSE,
- {0, 0, 0, 0, 0, 0, 0, 0},
- {0, 0, 0, 0, 0, 0, 0, 0},
- 0,
- 0,
- 0,
- -1,
- FALSE},
- {LARGE_ENTRY_TYPE,
- 13,
- LARGE_ENTRY_SIZE,
- TRUE,
- TRUE,
- TRUE,
- FALSE,
- FALSE,
- TRUE,
- FALSE,
- FALSE,
- {0, 0, 0, 0, 0, 0, 0, 0},
- {0, 0, 0, 0, 0, 0, 0, 0},
- 0,
- 0,
- 0,
- -1,
- FALSE}};
+ for (i = 0; i < num_variable_entries; i++) {
+ expected[i].entry_type = VARIABLE_ENTRY_TYPE;
+ expected[i].entry_index = (int)(i);
+ expected[i].size = VARIABLE_ENTRY_SIZE;
+ expected[i].in_cache = TRUE;
+ expected[i].at_main_addr = TRUE;
+ expected[i].is_dirty = TRUE;
+ expected[i].is_protected = FALSE;
+ expected[i].is_pinned = FALSE;
+ expected[i].deserialized = TRUE;
+ expected[i].serialized = FALSE;
+ expected[i].destroyed = FALSE;
+
+ HDmemset(expected[i].flush_dep_par_type, 0, sizeof(expected[i].flush_dep_par_type));
+ HDmemset(expected[i].flush_dep_par_idx, 0, sizeof(expected[i].flush_dep_par_idx));
+
+ expected[i].flush_dep_npar = 0;
+ expected[i].flush_dep_nchd = 0;
+ expected[i].flush_dep_ndirty_chd = 0;
+ expected[i].flush_order = -1;
+ expected[i].is_corked = FALSE;
+ }
+
+ /* NOTE: special cases for particular variable entries */
+ expected[0].size = VARIABLE_ENTRY_SIZE / 4;
+ expected[0].is_pinned = TRUE;
+
+ expected[1].size = VARIABLE_ENTRY_SIZE / 4;
+
+ expected[2].is_dirty = FALSE;
+
+ expected[3].size = VARIABLE_ENTRY_SIZE / 4;
+
+ expected[4].is_dirty = FALSE;
+
+ expected[5].size = VARIABLE_ENTRY_SIZE / 4;
+
+ expected[6].size = VARIABLE_ENTRY_SIZE / 2;
+
+ expected[7].size = VARIABLE_ENTRY_SIZE / 2;
+
+ expected[8].is_dirty = FALSE;
+
+ expected[9].is_dirty = FALSE;
+ expected[9].is_pinned = TRUE;
+
+ for (; i < num_variable_entries + num_monster_entries; i++) {
+ expected[i].entry_type = MONSTER_ENTRY_TYPE;
+ expected[i].entry_index = (int)(i - num_variable_entries);
+ expected[i].size = MONSTER_ENTRY_SIZE;
+ expected[i].in_cache = TRUE;
+ expected[i].at_main_addr = TRUE;
+ expected[i].is_dirty = TRUE;
+ expected[i].is_protected = FALSE;
+ expected[i].is_pinned = FALSE;
+ expected[i].deserialized = TRUE;
+ expected[i].serialized = FALSE;
+ expected[i].destroyed = FALSE;
+
+ HDmemset(expected[i].flush_dep_par_type, 0, sizeof(expected[i].flush_dep_par_type));
+ HDmemset(expected[i].flush_dep_par_idx, 0, sizeof(expected[i].flush_dep_par_idx));
+
+ expected[i].flush_dep_npar = 0;
+ expected[i].flush_dep_nchd = 0;
+ expected[i].flush_dep_ndirty_chd = 0;
+ expected[i].flush_order = -1;
+ expected[i].is_corked = FALSE;
+ }
+
+ for (; i < num_total_entries; i++) {
+ expected[i].entry_type = LARGE_ENTRY_TYPE;
+ expected[i].entry_index = (int)(i - num_monster_entries - num_variable_entries);
+ expected[i].size = LARGE_ENTRY_SIZE;
+ expected[i].in_cache = TRUE;
+ expected[i].at_main_addr = TRUE;
+ expected[i].is_dirty = TRUE;
+ expected[i].is_protected = FALSE;
+ expected[i].is_pinned = FALSE;
+ expected[i].deserialized = TRUE;
+ expected[i].serialized = FALSE;
+ expected[i].destroyed = FALSE;
+
+ HDmemset(expected[i].flush_dep_par_type, 0, sizeof(expected[i].flush_dep_par_type));
+ HDmemset(expected[i].flush_dep_par_idx, 0, sizeof(expected[i].flush_dep_par_idx));
+
+ expected[i].flush_dep_npar = 0;
+ expected[i].flush_dep_nchd = 0;
+ expected[i].flush_dep_ndirty_chd = 0;
+ expected[i].flush_order = -1;
+ expected[i].is_corked = FALSE;
+ }
+
+ HDassert(i == num_total_entries);
+
+ pass = TRUE;
+ }
if (pass) {
@@ -10521,6 +9825,8 @@ check_flush_cache__flush_op_eviction_test(H5F_t *file_ptr)
reset_entries();
}
+ HDfree(expected);
+
} /* check_flush_cache__flush_op_eviction_test() */
/*-------------------------------------------------------------------------
@@ -11591,8 +10897,17 @@ check_flush_cache__single_entry(H5F_t *file_ptr)
if (pass) {
- int i;
- struct pinned_single_entry_test_spec {
+ struct pinned_single_entry_test_spec *spec = NULL;
+ size_t i;
+
+ spec = HDmalloc(256 * sizeof(struct pinned_single_entry_test_spec));
+ if (spec == NULL) {
+
+ pass = FALSE;
+ failure_mssg = "couldn't allocated pinned single entry test spec array";
+ }
+
+ for (i = 0; i < 256; i++) {
int test_num;
int entry_type;
int entry_idx;
@@ -11605,529 +10920,89 @@ check_flush_cache__single_entry(H5F_t *file_ptr)
unsigned int flush_flags;
hbool_t expected_serialized;
hbool_t expected_destroyed;
- } spec[256] =
- /* pop pop
- * ent unprot mark mark
- * test entry -ry dirty mark dirty dirty unprot flush expect expect num type
- * idx flag dirty prot pinned unpin flags flags srlzd destroy
+
+ test_num = (int)(i + 1);
+ entry_type = PICO_ENTRY_TYPE;
+ entry_idx = 0;
+
+ /* Generate alternating sequences of TRUE/FALSE */
+ dirty_flag = (i / 16) % 2;
+ mark_dirty = (i / 8) % 2;
+ pop_mark_dirty_prot = (i / 4) % 2;
+ pop_mark_dirty_pinned = (i / 2) % 2;
+ unprotect_unpin = i % 2;
+
+ /* Generate alternating sequences of H5C__NO_FLAGS_SET
+ * and H5C__SET_FLUSH_MARKER_FLAG
+ */
+ if ((i / 32) % 2)
+ flags = H5C__SET_FLUSH_MARKER_FLAG;
+ else
+ flags = H5C__NO_FLAGS_SET;
+
+ /*
+ * Generate sequences of H5C__NO_FLAGS_SET,
+ * H5C__FLUSH_MARKED_ENTRIES_FLAG, H5C__FLUSH_CLEAR_ONLY_FLAG
+ * and H5C__FLUSH_MARKED_ENTRIES_FLAG | H5C__FLUSH_CLEAR_ONLY_FLAG
*/
- {{1, PICO_ENTRY_TYPE, 0, FALSE, FALSE, FALSE, FALSE, FALSE, H5C__NO_FLAGS_SET, H5C__NO_FLAGS_SET,
- FALSE, FALSE},
- {2, PICO_ENTRY_TYPE, 0, FALSE, FALSE, FALSE, FALSE, TRUE, H5C__NO_FLAGS_SET, H5C__NO_FLAGS_SET,
- FALSE, FALSE},
- {3, PICO_ENTRY_TYPE, 0, FALSE, FALSE, FALSE, TRUE, FALSE, H5C__NO_FLAGS_SET, H5C__NO_FLAGS_SET,
- TRUE, FALSE},
- {4, PICO_ENTRY_TYPE, 0, FALSE, FALSE, FALSE, TRUE, TRUE, H5C__NO_FLAGS_SET, H5C__NO_FLAGS_SET,
- TRUE, FALSE},
- {5, PICO_ENTRY_TYPE, 0, FALSE, FALSE, TRUE, FALSE, FALSE, H5C__NO_FLAGS_SET, H5C__NO_FLAGS_SET,
- TRUE, FALSE},
- {6, PICO_ENTRY_TYPE, 0, FALSE, FALSE, TRUE, FALSE, TRUE, H5C__NO_FLAGS_SET, H5C__NO_FLAGS_SET,
- TRUE, FALSE},
- {7, PICO_ENTRY_TYPE, 0, FALSE, FALSE, TRUE, TRUE, FALSE, H5C__NO_FLAGS_SET, H5C__NO_FLAGS_SET,
- TRUE, FALSE},
- {8, PICO_ENTRY_TYPE, 0, FALSE, FALSE, TRUE, TRUE, TRUE, H5C__NO_FLAGS_SET, H5C__NO_FLAGS_SET,
- TRUE, FALSE},
- {9, PICO_ENTRY_TYPE, 0, FALSE, TRUE, FALSE, FALSE, FALSE, H5C__NO_FLAGS_SET, H5C__NO_FLAGS_SET,
- TRUE, FALSE},
- {10, PICO_ENTRY_TYPE, 0, FALSE, TRUE, FALSE, FALSE, TRUE, H5C__NO_FLAGS_SET, H5C__NO_FLAGS_SET,
- TRUE, FALSE},
- {11, PICO_ENTRY_TYPE, 0, FALSE, TRUE, FALSE, TRUE, FALSE, H5C__NO_FLAGS_SET, H5C__NO_FLAGS_SET,
- TRUE, FALSE},
- {12, PICO_ENTRY_TYPE, 0, FALSE, TRUE, FALSE, TRUE, TRUE, H5C__NO_FLAGS_SET, H5C__NO_FLAGS_SET,
- TRUE, FALSE},
- {13, PICO_ENTRY_TYPE, 0, FALSE, TRUE, TRUE, FALSE, FALSE, H5C__NO_FLAGS_SET, H5C__NO_FLAGS_SET,
- TRUE, FALSE},
- {14, PICO_ENTRY_TYPE, 0, FALSE, TRUE, TRUE, FALSE, TRUE, H5C__NO_FLAGS_SET, H5C__NO_FLAGS_SET,
- TRUE, FALSE},
- {15, PICO_ENTRY_TYPE, 0, FALSE, TRUE, TRUE, TRUE, FALSE, H5C__NO_FLAGS_SET, H5C__NO_FLAGS_SET,
- TRUE, FALSE},
- {16, PICO_ENTRY_TYPE, 0, FALSE, TRUE, TRUE, TRUE, TRUE, H5C__NO_FLAGS_SET, H5C__NO_FLAGS_SET,
- TRUE, FALSE},
- {17, PICO_ENTRY_TYPE, 0, TRUE, FALSE, FALSE, FALSE, FALSE, H5C__NO_FLAGS_SET, H5C__NO_FLAGS_SET,
- TRUE, FALSE},
- {18, PICO_ENTRY_TYPE, 0, TRUE, FALSE, FALSE, FALSE, TRUE, H5C__NO_FLAGS_SET, H5C__NO_FLAGS_SET,
- TRUE, FALSE},
- {19, PICO_ENTRY_TYPE, 0, TRUE, FALSE, FALSE, TRUE, FALSE, H5C__NO_FLAGS_SET, H5C__NO_FLAGS_SET,
- TRUE, FALSE},
- {20, PICO_ENTRY_TYPE, 0, TRUE, FALSE, FALSE, TRUE, TRUE, H5C__NO_FLAGS_SET, H5C__NO_FLAGS_SET,
- TRUE, FALSE},
- {21, PICO_ENTRY_TYPE, 0, TRUE, FALSE, TRUE, FALSE, FALSE, H5C__NO_FLAGS_SET, H5C__NO_FLAGS_SET,
- TRUE, FALSE},
- {22, PICO_ENTRY_TYPE, 0, TRUE, FALSE, TRUE, FALSE, TRUE, H5C__NO_FLAGS_SET, H5C__NO_FLAGS_SET,
- TRUE, FALSE},
- {23, PICO_ENTRY_TYPE, 0, TRUE, FALSE, TRUE, TRUE, FALSE, H5C__NO_FLAGS_SET, H5C__NO_FLAGS_SET,
- TRUE, FALSE},
- {24, PICO_ENTRY_TYPE, 0, TRUE, FALSE, TRUE, TRUE, TRUE, H5C__NO_FLAGS_SET, H5C__NO_FLAGS_SET,
- TRUE, FALSE},
- {25, PICO_ENTRY_TYPE, 0, TRUE, TRUE, FALSE, FALSE, FALSE, H5C__NO_FLAGS_SET, H5C__NO_FLAGS_SET,
- TRUE, FALSE},
- {26, PICO_ENTRY_TYPE, 0, TRUE, TRUE, FALSE, FALSE, TRUE, H5C__NO_FLAGS_SET, H5C__NO_FLAGS_SET,
- TRUE, FALSE},
- {27, PICO_ENTRY_TYPE, 0, TRUE, TRUE, FALSE, TRUE, FALSE, H5C__NO_FLAGS_SET, H5C__NO_FLAGS_SET,
- TRUE, FALSE},
- {28, PICO_ENTRY_TYPE, 0, TRUE, TRUE, FALSE, TRUE, TRUE, H5C__NO_FLAGS_SET, H5C__NO_FLAGS_SET,
- TRUE, FALSE},
- {29, PICO_ENTRY_TYPE, 0, TRUE, TRUE, TRUE, FALSE, FALSE, H5C__NO_FLAGS_SET, H5C__NO_FLAGS_SET,
- TRUE, FALSE},
- {30, PICO_ENTRY_TYPE, 0, TRUE, TRUE, TRUE, FALSE, TRUE, H5C__NO_FLAGS_SET, H5C__NO_FLAGS_SET,
- TRUE, FALSE},
- {31, PICO_ENTRY_TYPE, 0, TRUE, TRUE, TRUE, TRUE, FALSE, H5C__NO_FLAGS_SET, H5C__NO_FLAGS_SET,
- TRUE, FALSE},
- {32, PICO_ENTRY_TYPE, 0, TRUE, TRUE, TRUE, TRUE, TRUE, H5C__NO_FLAGS_SET, H5C__NO_FLAGS_SET,
- TRUE, FALSE},
- {33, PICO_ENTRY_TYPE, 0, FALSE, FALSE, FALSE, FALSE, FALSE, H5C__SET_FLUSH_MARKER_FLAG,
- H5C__NO_FLAGS_SET, FALSE, FALSE},
- {34, PICO_ENTRY_TYPE, 0, FALSE, FALSE, FALSE, FALSE, TRUE, H5C__SET_FLUSH_MARKER_FLAG,
- H5C__NO_FLAGS_SET, FALSE, FALSE},
- {35, PICO_ENTRY_TYPE, 0, FALSE, FALSE, FALSE, TRUE, FALSE, H5C__SET_FLUSH_MARKER_FLAG,
- H5C__NO_FLAGS_SET, TRUE, FALSE},
- {36, PICO_ENTRY_TYPE, 0, FALSE, FALSE, FALSE, TRUE, TRUE, H5C__SET_FLUSH_MARKER_FLAG,
- H5C__NO_FLAGS_SET, TRUE, FALSE},
- {37, PICO_ENTRY_TYPE, 0, FALSE, FALSE, TRUE, FALSE, FALSE, H5C__SET_FLUSH_MARKER_FLAG,
- H5C__NO_FLAGS_SET, TRUE, FALSE},
- {38, PICO_ENTRY_TYPE, 0, FALSE, FALSE, TRUE, FALSE, TRUE, H5C__SET_FLUSH_MARKER_FLAG,
- H5C__NO_FLAGS_SET, TRUE, FALSE},
- {39, PICO_ENTRY_TYPE, 0, FALSE, FALSE, TRUE, TRUE, FALSE, H5C__SET_FLUSH_MARKER_FLAG,
- H5C__NO_FLAGS_SET, TRUE, FALSE},
- {40, PICO_ENTRY_TYPE, 0, FALSE, FALSE, TRUE, TRUE, TRUE, H5C__SET_FLUSH_MARKER_FLAG,
- H5C__NO_FLAGS_SET, TRUE, FALSE},
- {41, PICO_ENTRY_TYPE, 0, FALSE, TRUE, FALSE, FALSE, FALSE, H5C__SET_FLUSH_MARKER_FLAG,
- H5C__NO_FLAGS_SET, TRUE, FALSE},
- {42, PICO_ENTRY_TYPE, 0, FALSE, TRUE, FALSE, FALSE, TRUE, H5C__SET_FLUSH_MARKER_FLAG,
- H5C__NO_FLAGS_SET, TRUE, FALSE},
- {43, PICO_ENTRY_TYPE, 0, FALSE, TRUE, FALSE, TRUE, FALSE, H5C__SET_FLUSH_MARKER_FLAG,
- H5C__NO_FLAGS_SET, TRUE, FALSE},
- {44, PICO_ENTRY_TYPE, 0, FALSE, TRUE, FALSE, TRUE, TRUE, H5C__SET_FLUSH_MARKER_FLAG,
- H5C__NO_FLAGS_SET, TRUE, FALSE},
- {45, PICO_ENTRY_TYPE, 0, FALSE, TRUE, TRUE, FALSE, FALSE, H5C__SET_FLUSH_MARKER_FLAG,
- H5C__NO_FLAGS_SET, TRUE, FALSE},
- {46, PICO_ENTRY_TYPE, 0, FALSE, TRUE, TRUE, FALSE, TRUE, H5C__SET_FLUSH_MARKER_FLAG,
- H5C__NO_FLAGS_SET, TRUE, FALSE},
- {47, PICO_ENTRY_TYPE, 0, FALSE, TRUE, TRUE, TRUE, FALSE, H5C__SET_FLUSH_MARKER_FLAG,
- H5C__NO_FLAGS_SET, TRUE, FALSE},
- {48, PICO_ENTRY_TYPE, 0, FALSE, TRUE, TRUE, TRUE, TRUE, H5C__SET_FLUSH_MARKER_FLAG,
- H5C__NO_FLAGS_SET, TRUE, FALSE},
- {49, PICO_ENTRY_TYPE, 0, TRUE, FALSE, FALSE, FALSE, FALSE, H5C__SET_FLUSH_MARKER_FLAG,
- H5C__NO_FLAGS_SET, TRUE, FALSE},
- {50, PICO_ENTRY_TYPE, 0, TRUE, FALSE, FALSE, FALSE, TRUE, H5C__SET_FLUSH_MARKER_FLAG,
- H5C__NO_FLAGS_SET, TRUE, FALSE},
- {51, PICO_ENTRY_TYPE, 0, TRUE, FALSE, FALSE, TRUE, FALSE, H5C__SET_FLUSH_MARKER_FLAG,
- H5C__NO_FLAGS_SET, TRUE, FALSE},
- {52, PICO_ENTRY_TYPE, 0, TRUE, FALSE, FALSE, TRUE, TRUE, H5C__SET_FLUSH_MARKER_FLAG,
- H5C__NO_FLAGS_SET, TRUE, FALSE},
- {53, PICO_ENTRY_TYPE, 0, TRUE, FALSE, TRUE, FALSE, FALSE, H5C__SET_FLUSH_MARKER_FLAG,
- H5C__NO_FLAGS_SET, TRUE, FALSE},
- {54, PICO_ENTRY_TYPE, 0, TRUE, FALSE, TRUE, FALSE, TRUE, H5C__SET_FLUSH_MARKER_FLAG,
- H5C__NO_FLAGS_SET, TRUE, FALSE},
- {55, PICO_ENTRY_TYPE, 0, TRUE, FALSE, TRUE, TRUE, FALSE, H5C__SET_FLUSH_MARKER_FLAG,
- H5C__NO_FLAGS_SET, TRUE, FALSE},
- {56, PICO_ENTRY_TYPE, 0, TRUE, FALSE, TRUE, TRUE, TRUE, H5C__SET_FLUSH_MARKER_FLAG,
- H5C__NO_FLAGS_SET, TRUE, FALSE},
- {57, PICO_ENTRY_TYPE, 0, TRUE, TRUE, FALSE, FALSE, FALSE, H5C__SET_FLUSH_MARKER_FLAG,
- H5C__NO_FLAGS_SET, TRUE, FALSE},
- {58, PICO_ENTRY_TYPE, 0, TRUE, TRUE, FALSE, FALSE, TRUE, H5C__SET_FLUSH_MARKER_FLAG,
- H5C__NO_FLAGS_SET, TRUE, FALSE},
- {59, PICO_ENTRY_TYPE, 0, TRUE, TRUE, FALSE, TRUE, FALSE, H5C__SET_FLUSH_MARKER_FLAG,
- H5C__NO_FLAGS_SET, TRUE, FALSE},
- {60, PICO_ENTRY_TYPE, 0, TRUE, TRUE, FALSE, TRUE, TRUE, H5C__SET_FLUSH_MARKER_FLAG,
- H5C__NO_FLAGS_SET, TRUE, FALSE},
- {61, PICO_ENTRY_TYPE, 0, TRUE, TRUE, TRUE, FALSE, FALSE, H5C__SET_FLUSH_MARKER_FLAG,
- H5C__NO_FLAGS_SET, TRUE, FALSE},
- {62, PICO_ENTRY_TYPE, 0, TRUE, TRUE, TRUE, FALSE, TRUE, H5C__SET_FLUSH_MARKER_FLAG,
- H5C__NO_FLAGS_SET, TRUE, FALSE},
- {63, PICO_ENTRY_TYPE, 0, TRUE, TRUE, TRUE, TRUE, FALSE, H5C__SET_FLUSH_MARKER_FLAG,
- H5C__NO_FLAGS_SET, TRUE, FALSE},
- {64, PICO_ENTRY_TYPE, 0, TRUE, TRUE, TRUE, TRUE, TRUE, H5C__SET_FLUSH_MARKER_FLAG,
- H5C__NO_FLAGS_SET, TRUE, FALSE},
- {65, PICO_ENTRY_TYPE, 0, FALSE, FALSE, FALSE, FALSE, FALSE, H5C__NO_FLAGS_SET,
- H5C__FLUSH_MARKED_ENTRIES_FLAG, FALSE, FALSE},
- {66, PICO_ENTRY_TYPE, 0, FALSE, FALSE, FALSE, FALSE, TRUE, H5C__NO_FLAGS_SET,
- H5C__FLUSH_MARKED_ENTRIES_FLAG, FALSE, FALSE},
- {67, PICO_ENTRY_TYPE, 0, FALSE, FALSE, FALSE, TRUE, FALSE, H5C__NO_FLAGS_SET,
- H5C__FLUSH_MARKED_ENTRIES_FLAG, FALSE, FALSE},
- {68, PICO_ENTRY_TYPE, 0, FALSE, FALSE, FALSE, TRUE, TRUE, H5C__NO_FLAGS_SET,
- H5C__FLUSH_MARKED_ENTRIES_FLAG, FALSE, FALSE},
- {69, PICO_ENTRY_TYPE, 0, FALSE, FALSE, TRUE, FALSE, FALSE, H5C__NO_FLAGS_SET,
- H5C__FLUSH_MARKED_ENTRIES_FLAG, FALSE, FALSE},
- {70, PICO_ENTRY_TYPE, 0, FALSE, FALSE, TRUE, FALSE, TRUE, H5C__NO_FLAGS_SET,
- H5C__FLUSH_MARKED_ENTRIES_FLAG, FALSE, FALSE},
- {71, PICO_ENTRY_TYPE, 0, FALSE, FALSE, TRUE, TRUE, FALSE, H5C__NO_FLAGS_SET,
- H5C__FLUSH_MARKED_ENTRIES_FLAG, FALSE, FALSE},
- {72, PICO_ENTRY_TYPE, 0, FALSE, FALSE, TRUE, TRUE, TRUE, H5C__NO_FLAGS_SET,
- H5C__FLUSH_MARKED_ENTRIES_FLAG, FALSE, FALSE},
- {73, PICO_ENTRY_TYPE, 0, FALSE, TRUE, FALSE, FALSE, FALSE, H5C__NO_FLAGS_SET,
- H5C__FLUSH_MARKED_ENTRIES_FLAG, FALSE, FALSE},
- {74, PICO_ENTRY_TYPE, 0, FALSE, TRUE, FALSE, FALSE, TRUE, H5C__NO_FLAGS_SET,
- H5C__FLUSH_MARKED_ENTRIES_FLAG, FALSE, FALSE},
- {75, PICO_ENTRY_TYPE, 0, FALSE, TRUE, FALSE, TRUE, FALSE, H5C__NO_FLAGS_SET,
- H5C__FLUSH_MARKED_ENTRIES_FLAG, FALSE, FALSE},
- {76, PICO_ENTRY_TYPE, 0, FALSE, TRUE, FALSE, TRUE, TRUE, H5C__NO_FLAGS_SET,
- H5C__FLUSH_MARKED_ENTRIES_FLAG, FALSE, FALSE},
- {77, PICO_ENTRY_TYPE, 0, FALSE, TRUE, TRUE, FALSE, FALSE, H5C__NO_FLAGS_SET,
- H5C__FLUSH_MARKED_ENTRIES_FLAG, FALSE, FALSE},
- {78, PICO_ENTRY_TYPE, 0, FALSE, TRUE, TRUE, FALSE, TRUE, H5C__NO_FLAGS_SET,
- H5C__FLUSH_MARKED_ENTRIES_FLAG, FALSE, FALSE},
- {79, PICO_ENTRY_TYPE, 0, FALSE, TRUE, TRUE, TRUE, FALSE, H5C__NO_FLAGS_SET,
- H5C__FLUSH_MARKED_ENTRIES_FLAG, FALSE, FALSE},
- {80, PICO_ENTRY_TYPE, 0, FALSE, TRUE, TRUE, TRUE, TRUE, H5C__NO_FLAGS_SET,
- H5C__FLUSH_MARKED_ENTRIES_FLAG, FALSE, FALSE},
- {81, PICO_ENTRY_TYPE, 0, TRUE, FALSE, FALSE, FALSE, FALSE, H5C__NO_FLAGS_SET,
- H5C__FLUSH_MARKED_ENTRIES_FLAG, FALSE, FALSE},
- {82, PICO_ENTRY_TYPE, 0, TRUE, FALSE, FALSE, FALSE, TRUE, H5C__NO_FLAGS_SET,
- H5C__FLUSH_MARKED_ENTRIES_FLAG, FALSE, FALSE},
- {83, PICO_ENTRY_TYPE, 0, TRUE, FALSE, FALSE, TRUE, FALSE, H5C__NO_FLAGS_SET,
- H5C__FLUSH_MARKED_ENTRIES_FLAG, FALSE, FALSE},
- {84, PICO_ENTRY_TYPE, 0, TRUE, FALSE, FALSE, TRUE, TRUE, H5C__NO_FLAGS_SET,
- H5C__FLUSH_MARKED_ENTRIES_FLAG, FALSE, FALSE},
- {85, PICO_ENTRY_TYPE, 0, TRUE, FALSE, TRUE, FALSE, FALSE, H5C__NO_FLAGS_SET,
- H5C__FLUSH_MARKED_ENTRIES_FLAG, FALSE, FALSE},
- {86, PICO_ENTRY_TYPE, 0, TRUE, FALSE, TRUE, FALSE, TRUE, H5C__NO_FLAGS_SET,
- H5C__FLUSH_MARKED_ENTRIES_FLAG, FALSE, FALSE},
- {87, PICO_ENTRY_TYPE, 0, TRUE, FALSE, TRUE, TRUE, FALSE, H5C__NO_FLAGS_SET,
- H5C__FLUSH_MARKED_ENTRIES_FLAG, FALSE, FALSE},
- {88, PICO_ENTRY_TYPE, 0, TRUE, FALSE, TRUE, TRUE, TRUE, H5C__NO_FLAGS_SET,
- H5C__FLUSH_MARKED_ENTRIES_FLAG, FALSE, FALSE},
- {89, PICO_ENTRY_TYPE, 0, TRUE, TRUE, FALSE, FALSE, FALSE, H5C__NO_FLAGS_SET,
- H5C__FLUSH_MARKED_ENTRIES_FLAG, FALSE, FALSE},
- {90, PICO_ENTRY_TYPE, 0, TRUE, TRUE, FALSE, FALSE, TRUE, H5C__NO_FLAGS_SET,
- H5C__FLUSH_MARKED_ENTRIES_FLAG, FALSE, FALSE},
- {91, PICO_ENTRY_TYPE, 0, TRUE, TRUE, FALSE, TRUE, FALSE, H5C__NO_FLAGS_SET,
- H5C__FLUSH_MARKED_ENTRIES_FLAG, FALSE, FALSE},
- {92, PICO_ENTRY_TYPE, 0, TRUE, TRUE, FALSE, TRUE, TRUE, H5C__NO_FLAGS_SET,
- H5C__FLUSH_MARKED_ENTRIES_FLAG, FALSE, FALSE},
- {93, PICO_ENTRY_TYPE, 0, TRUE, TRUE, TRUE, FALSE, FALSE, H5C__NO_FLAGS_SET,
- H5C__FLUSH_MARKED_ENTRIES_FLAG, FALSE, FALSE},
- {94, PICO_ENTRY_TYPE, 0, TRUE, TRUE, TRUE, FALSE, TRUE, H5C__NO_FLAGS_SET,
- H5C__FLUSH_MARKED_ENTRIES_FLAG, FALSE, FALSE},
- {95, PICO_ENTRY_TYPE, 0, TRUE, TRUE, TRUE, TRUE, FALSE, H5C__NO_FLAGS_SET,
- H5C__FLUSH_MARKED_ENTRIES_FLAG, FALSE, FALSE},
- {96, PICO_ENTRY_TYPE, 0, TRUE, TRUE, TRUE, TRUE, TRUE, H5C__NO_FLAGS_SET,
- H5C__FLUSH_MARKED_ENTRIES_FLAG, FALSE, FALSE},
- {97, PICO_ENTRY_TYPE, 0, FALSE, FALSE, FALSE, FALSE, FALSE, H5C__SET_FLUSH_MARKER_FLAG,
- H5C__FLUSH_MARKED_ENTRIES_FLAG, FALSE, FALSE},
- {98, PICO_ENTRY_TYPE, 0, FALSE, FALSE, FALSE, FALSE, TRUE, H5C__SET_FLUSH_MARKER_FLAG,
- H5C__FLUSH_MARKED_ENTRIES_FLAG, FALSE, FALSE},
- {99, PICO_ENTRY_TYPE, 0, FALSE, FALSE, FALSE, TRUE, FALSE, H5C__SET_FLUSH_MARKER_FLAG,
- H5C__FLUSH_MARKED_ENTRIES_FLAG, FALSE, FALSE},
- {100, PICO_ENTRY_TYPE, 0, FALSE, FALSE, FALSE, TRUE, TRUE, H5C__SET_FLUSH_MARKER_FLAG,
- H5C__FLUSH_MARKED_ENTRIES_FLAG, FALSE, FALSE},
- {101, PICO_ENTRY_TYPE, 0, FALSE, FALSE, TRUE, FALSE, FALSE, H5C__SET_FLUSH_MARKER_FLAG,
- H5C__FLUSH_MARKED_ENTRIES_FLAG, TRUE, FALSE},
- {102, PICO_ENTRY_TYPE, 0, FALSE, FALSE, TRUE, FALSE, TRUE, H5C__SET_FLUSH_MARKER_FLAG,
- H5C__FLUSH_MARKED_ENTRIES_FLAG, TRUE, FALSE},
- {103, PICO_ENTRY_TYPE, 0, FALSE, FALSE, TRUE, TRUE, FALSE, H5C__SET_FLUSH_MARKER_FLAG,
- H5C__FLUSH_MARKED_ENTRIES_FLAG, TRUE, FALSE},
- {104, PICO_ENTRY_TYPE, 0, FALSE, FALSE, TRUE, TRUE, TRUE, H5C__SET_FLUSH_MARKER_FLAG,
- H5C__FLUSH_MARKED_ENTRIES_FLAG, TRUE, FALSE},
- {105, PICO_ENTRY_TYPE, 0, FALSE, TRUE, FALSE, FALSE, FALSE, H5C__SET_FLUSH_MARKER_FLAG,
- H5C__FLUSH_MARKED_ENTRIES_FLAG, FALSE, FALSE},
- {106, PICO_ENTRY_TYPE, 0, FALSE, TRUE, FALSE, FALSE, TRUE, H5C__SET_FLUSH_MARKER_FLAG,
- H5C__FLUSH_MARKED_ENTRIES_FLAG, FALSE, FALSE},
- {107, PICO_ENTRY_TYPE, 0, FALSE, TRUE, FALSE, TRUE, FALSE, H5C__SET_FLUSH_MARKER_FLAG,
- H5C__FLUSH_MARKED_ENTRIES_FLAG, FALSE, FALSE},
- {108, PICO_ENTRY_TYPE, 0, FALSE, TRUE, FALSE, TRUE, TRUE, H5C__SET_FLUSH_MARKER_FLAG,
- H5C__FLUSH_MARKED_ENTRIES_FLAG, FALSE, FALSE},
- {109, PICO_ENTRY_TYPE, 0, FALSE, TRUE, TRUE, FALSE, FALSE, H5C__SET_FLUSH_MARKER_FLAG,
- H5C__FLUSH_MARKED_ENTRIES_FLAG, TRUE, FALSE},
- {110, PICO_ENTRY_TYPE, 0, FALSE, TRUE, TRUE, FALSE, TRUE, H5C__SET_FLUSH_MARKER_FLAG,
- H5C__FLUSH_MARKED_ENTRIES_FLAG, TRUE, FALSE},
- {111, PICO_ENTRY_TYPE, 0, FALSE, TRUE, TRUE, TRUE, FALSE, H5C__SET_FLUSH_MARKER_FLAG,
- H5C__FLUSH_MARKED_ENTRIES_FLAG, TRUE, FALSE},
- {112, PICO_ENTRY_TYPE, 0, FALSE, TRUE, TRUE, TRUE, TRUE, H5C__SET_FLUSH_MARKER_FLAG,
- H5C__FLUSH_MARKED_ENTRIES_FLAG, TRUE, FALSE},
- {113, PICO_ENTRY_TYPE, 0, TRUE, FALSE, FALSE, FALSE, FALSE, H5C__SET_FLUSH_MARKER_FLAG,
- H5C__FLUSH_MARKED_ENTRIES_FLAG, TRUE, FALSE},
- {114, PICO_ENTRY_TYPE, 0, TRUE, FALSE, FALSE, FALSE, TRUE, H5C__SET_FLUSH_MARKER_FLAG,
- H5C__FLUSH_MARKED_ENTRIES_FLAG, TRUE, FALSE},
- {115, PICO_ENTRY_TYPE, 0, TRUE, FALSE, FALSE, TRUE, FALSE, H5C__SET_FLUSH_MARKER_FLAG,
- H5C__FLUSH_MARKED_ENTRIES_FLAG, TRUE, FALSE},
- {116, PICO_ENTRY_TYPE, 0, TRUE, FALSE, FALSE, TRUE, TRUE, H5C__SET_FLUSH_MARKER_FLAG,
- H5C__FLUSH_MARKED_ENTRIES_FLAG, TRUE, FALSE},
- {117, PICO_ENTRY_TYPE, 0, TRUE, FALSE, TRUE, FALSE, FALSE, H5C__SET_FLUSH_MARKER_FLAG,
- H5C__FLUSH_MARKED_ENTRIES_FLAG, TRUE, FALSE},
- {118, PICO_ENTRY_TYPE, 0, TRUE, FALSE, TRUE, FALSE, TRUE, H5C__SET_FLUSH_MARKER_FLAG,
- H5C__FLUSH_MARKED_ENTRIES_FLAG, TRUE, FALSE},
- {119, PICO_ENTRY_TYPE, 0, TRUE, FALSE, TRUE, TRUE, FALSE, H5C__SET_FLUSH_MARKER_FLAG,
- H5C__FLUSH_MARKED_ENTRIES_FLAG, TRUE, FALSE},
- {120, PICO_ENTRY_TYPE, 0, TRUE, FALSE, TRUE, TRUE, TRUE, H5C__SET_FLUSH_MARKER_FLAG,
- H5C__FLUSH_MARKED_ENTRIES_FLAG, TRUE, FALSE},
- {121, PICO_ENTRY_TYPE, 0, TRUE, TRUE, FALSE, FALSE, FALSE, H5C__SET_FLUSH_MARKER_FLAG,
- H5C__FLUSH_MARKED_ENTRIES_FLAG, TRUE, FALSE},
- {122, PICO_ENTRY_TYPE, 0, TRUE, TRUE, FALSE, FALSE, TRUE, H5C__SET_FLUSH_MARKER_FLAG,
- H5C__FLUSH_MARKED_ENTRIES_FLAG, TRUE, FALSE},
- {123, PICO_ENTRY_TYPE, 0, TRUE, TRUE, FALSE, TRUE, FALSE, H5C__SET_FLUSH_MARKER_FLAG,
- H5C__FLUSH_MARKED_ENTRIES_FLAG, TRUE, FALSE},
- {124, PICO_ENTRY_TYPE, 0, TRUE, TRUE, FALSE, TRUE, TRUE, H5C__SET_FLUSH_MARKER_FLAG,
- H5C__FLUSH_MARKED_ENTRIES_FLAG, TRUE, FALSE},
- {125, PICO_ENTRY_TYPE, 0, TRUE, TRUE, TRUE, FALSE, FALSE, H5C__SET_FLUSH_MARKER_FLAG,
- H5C__FLUSH_MARKED_ENTRIES_FLAG, TRUE, FALSE},
- {126, PICO_ENTRY_TYPE, 0, TRUE, TRUE, TRUE, FALSE, TRUE, H5C__SET_FLUSH_MARKER_FLAG,
- H5C__FLUSH_MARKED_ENTRIES_FLAG, TRUE, FALSE},
- {127, PICO_ENTRY_TYPE, 0, TRUE, TRUE, TRUE, TRUE, FALSE, H5C__SET_FLUSH_MARKER_FLAG,
- H5C__FLUSH_MARKED_ENTRIES_FLAG, TRUE, FALSE},
- {128, PICO_ENTRY_TYPE, 0, TRUE, TRUE, TRUE, TRUE, TRUE, H5C__SET_FLUSH_MARKER_FLAG,
- H5C__FLUSH_MARKED_ENTRIES_FLAG, TRUE, FALSE},
- {129, PICO_ENTRY_TYPE, 0, FALSE, FALSE, FALSE, FALSE, FALSE, H5C__NO_FLAGS_SET,
- H5C__FLUSH_CLEAR_ONLY_FLAG, FALSE, FALSE},
- {130, PICO_ENTRY_TYPE, 0, FALSE, FALSE, FALSE, FALSE, TRUE, H5C__NO_FLAGS_SET,
- H5C__FLUSH_CLEAR_ONLY_FLAG, FALSE, FALSE},
- {131, PICO_ENTRY_TYPE, 0, FALSE, FALSE, FALSE, TRUE, FALSE, H5C__NO_FLAGS_SET,
- H5C__FLUSH_CLEAR_ONLY_FLAG, FALSE, FALSE},
- {132, PICO_ENTRY_TYPE, 0, FALSE, FALSE, FALSE, TRUE, TRUE, H5C__NO_FLAGS_SET,
- H5C__FLUSH_CLEAR_ONLY_FLAG, FALSE, FALSE},
- {133, PICO_ENTRY_TYPE, 0, FALSE, FALSE, TRUE, FALSE, FALSE, H5C__NO_FLAGS_SET,
- H5C__FLUSH_CLEAR_ONLY_FLAG, FALSE, FALSE},
- {134, PICO_ENTRY_TYPE, 0, FALSE, FALSE, TRUE, FALSE, TRUE, H5C__NO_FLAGS_SET,
- H5C__FLUSH_CLEAR_ONLY_FLAG, FALSE, FALSE},
- {135, PICO_ENTRY_TYPE, 0, FALSE, FALSE, TRUE, TRUE, FALSE, H5C__NO_FLAGS_SET,
- H5C__FLUSH_CLEAR_ONLY_FLAG, FALSE, FALSE},
- {136, PICO_ENTRY_TYPE, 0, FALSE, FALSE, TRUE, TRUE, TRUE, H5C__NO_FLAGS_SET,
- H5C__FLUSH_CLEAR_ONLY_FLAG, FALSE, FALSE},
- {137, PICO_ENTRY_TYPE, 0, FALSE, TRUE, FALSE, FALSE, FALSE, H5C__NO_FLAGS_SET,
- H5C__FLUSH_CLEAR_ONLY_FLAG, FALSE, FALSE},
- {138, PICO_ENTRY_TYPE, 0, FALSE, TRUE, FALSE, FALSE, TRUE, H5C__NO_FLAGS_SET,
- H5C__FLUSH_CLEAR_ONLY_FLAG, FALSE, FALSE},
- {139, PICO_ENTRY_TYPE, 0, FALSE, TRUE, FALSE, TRUE, FALSE, H5C__NO_FLAGS_SET,
- H5C__FLUSH_CLEAR_ONLY_FLAG, FALSE, FALSE},
- {140, PICO_ENTRY_TYPE, 0, FALSE, TRUE, FALSE, TRUE, TRUE, H5C__NO_FLAGS_SET,
- H5C__FLUSH_CLEAR_ONLY_FLAG, FALSE, FALSE},
- {141, PICO_ENTRY_TYPE, 0, FALSE, TRUE, TRUE, FALSE, FALSE, H5C__NO_FLAGS_SET,
- H5C__FLUSH_CLEAR_ONLY_FLAG, FALSE, FALSE},
- {142, PICO_ENTRY_TYPE, 0, FALSE, TRUE, TRUE, FALSE, TRUE, H5C__NO_FLAGS_SET,
- H5C__FLUSH_CLEAR_ONLY_FLAG, FALSE, FALSE},
- {143, PICO_ENTRY_TYPE, 0, FALSE, TRUE, TRUE, TRUE, FALSE, H5C__NO_FLAGS_SET,
- H5C__FLUSH_CLEAR_ONLY_FLAG, FALSE, FALSE},
- {144, PICO_ENTRY_TYPE, 0, FALSE, TRUE, TRUE, TRUE, TRUE, H5C__NO_FLAGS_SET,
- H5C__FLUSH_CLEAR_ONLY_FLAG, FALSE, FALSE},
- {145, PICO_ENTRY_TYPE, 0, TRUE, FALSE, FALSE, FALSE, FALSE, H5C__NO_FLAGS_SET,
- H5C__FLUSH_CLEAR_ONLY_FLAG, FALSE, FALSE},
- {146, PICO_ENTRY_TYPE, 0, TRUE, FALSE, FALSE, FALSE, TRUE, H5C__NO_FLAGS_SET,
- H5C__FLUSH_CLEAR_ONLY_FLAG, FALSE, FALSE},
- {147, PICO_ENTRY_TYPE, 0, TRUE, FALSE, FALSE, TRUE, FALSE, H5C__NO_FLAGS_SET,
- H5C__FLUSH_CLEAR_ONLY_FLAG, FALSE, FALSE},
- {148, PICO_ENTRY_TYPE, 0, TRUE, FALSE, FALSE, TRUE, TRUE, H5C__NO_FLAGS_SET,
- H5C__FLUSH_CLEAR_ONLY_FLAG, FALSE, FALSE},
- {149, PICO_ENTRY_TYPE, 0, TRUE, FALSE, TRUE, FALSE, FALSE, H5C__NO_FLAGS_SET,
- H5C__FLUSH_CLEAR_ONLY_FLAG, FALSE, FALSE},
- {150, PICO_ENTRY_TYPE, 0, TRUE, FALSE, TRUE, FALSE, TRUE, H5C__NO_FLAGS_SET,
- H5C__FLUSH_CLEAR_ONLY_FLAG, FALSE, FALSE},
- {151, PICO_ENTRY_TYPE, 0, TRUE, FALSE, TRUE, TRUE, FALSE, H5C__NO_FLAGS_SET,
- H5C__FLUSH_CLEAR_ONLY_FLAG, FALSE, FALSE},
- {152, PICO_ENTRY_TYPE, 0, TRUE, FALSE, TRUE, TRUE, TRUE, H5C__NO_FLAGS_SET,
- H5C__FLUSH_CLEAR_ONLY_FLAG, FALSE, FALSE},
- {153, PICO_ENTRY_TYPE, 0, TRUE, TRUE, FALSE, FALSE, FALSE, H5C__NO_FLAGS_SET,
- H5C__FLUSH_CLEAR_ONLY_FLAG, FALSE, FALSE},
- {154, PICO_ENTRY_TYPE, 0, TRUE, TRUE, FALSE, FALSE, TRUE, H5C__NO_FLAGS_SET,
- H5C__FLUSH_CLEAR_ONLY_FLAG, FALSE, FALSE},
- {155, PICO_ENTRY_TYPE, 0, TRUE, TRUE, FALSE, TRUE, FALSE, H5C__NO_FLAGS_SET,
- H5C__FLUSH_CLEAR_ONLY_FLAG, FALSE, FALSE},
- {156, PICO_ENTRY_TYPE, 0, TRUE, TRUE, FALSE, TRUE, TRUE, H5C__NO_FLAGS_SET,
- H5C__FLUSH_CLEAR_ONLY_FLAG, FALSE, FALSE},
- {157, PICO_ENTRY_TYPE, 0, TRUE, TRUE, TRUE, FALSE, FALSE, H5C__NO_FLAGS_SET,
- H5C__FLUSH_CLEAR_ONLY_FLAG, FALSE, FALSE},
- {158, PICO_ENTRY_TYPE, 0, TRUE, TRUE, TRUE, FALSE, TRUE, H5C__NO_FLAGS_SET,
- H5C__FLUSH_CLEAR_ONLY_FLAG, FALSE, FALSE},
- {159, PICO_ENTRY_TYPE, 0, TRUE, TRUE, TRUE, TRUE, FALSE, H5C__NO_FLAGS_SET,
- H5C__FLUSH_CLEAR_ONLY_FLAG, FALSE, FALSE},
- {160, PICO_ENTRY_TYPE, 0, TRUE, TRUE, TRUE, TRUE, TRUE, H5C__NO_FLAGS_SET,
- H5C__FLUSH_CLEAR_ONLY_FLAG, FALSE, FALSE},
- {161, PICO_ENTRY_TYPE, 0, FALSE, FALSE, FALSE, FALSE, FALSE, H5C__SET_FLUSH_MARKER_FLAG,
- H5C__FLUSH_CLEAR_ONLY_FLAG, FALSE, FALSE},
- {162, PICO_ENTRY_TYPE, 0, FALSE, FALSE, FALSE, FALSE, TRUE, H5C__SET_FLUSH_MARKER_FLAG,
- H5C__FLUSH_CLEAR_ONLY_FLAG, FALSE, FALSE},
- {163, PICO_ENTRY_TYPE, 0, FALSE, FALSE, FALSE, TRUE, FALSE, H5C__SET_FLUSH_MARKER_FLAG,
- H5C__FLUSH_CLEAR_ONLY_FLAG, FALSE, FALSE},
- {164, PICO_ENTRY_TYPE, 0, FALSE, FALSE, FALSE, TRUE, TRUE, H5C__SET_FLUSH_MARKER_FLAG,
- H5C__FLUSH_CLEAR_ONLY_FLAG, FALSE, FALSE},
- {165, PICO_ENTRY_TYPE, 0, FALSE, FALSE, TRUE, FALSE, FALSE, H5C__SET_FLUSH_MARKER_FLAG,
- H5C__FLUSH_CLEAR_ONLY_FLAG, FALSE, FALSE},
- {166, PICO_ENTRY_TYPE, 0, FALSE, FALSE, TRUE, FALSE, TRUE, H5C__SET_FLUSH_MARKER_FLAG,
- H5C__FLUSH_CLEAR_ONLY_FLAG, FALSE, FALSE},
- {167, PICO_ENTRY_TYPE, 0, FALSE, FALSE, TRUE, TRUE, FALSE, H5C__SET_FLUSH_MARKER_FLAG,
- H5C__FLUSH_CLEAR_ONLY_FLAG, FALSE, FALSE},
- {168, PICO_ENTRY_TYPE, 0, FALSE, FALSE, TRUE, TRUE, TRUE, H5C__SET_FLUSH_MARKER_FLAG,
- H5C__FLUSH_CLEAR_ONLY_FLAG, FALSE, FALSE},
- {169, PICO_ENTRY_TYPE, 0, FALSE, TRUE, FALSE, FALSE, FALSE, H5C__SET_FLUSH_MARKER_FLAG,
- H5C__FLUSH_CLEAR_ONLY_FLAG, FALSE, FALSE},
- {170, PICO_ENTRY_TYPE, 0, FALSE, TRUE, FALSE, FALSE, TRUE, H5C__SET_FLUSH_MARKER_FLAG,
- H5C__FLUSH_CLEAR_ONLY_FLAG, FALSE, FALSE},
- {171, PICO_ENTRY_TYPE, 0, FALSE, TRUE, FALSE, TRUE, FALSE, H5C__SET_FLUSH_MARKER_FLAG,
- H5C__FLUSH_CLEAR_ONLY_FLAG, FALSE, FALSE},
- {172, PICO_ENTRY_TYPE, 0, FALSE, TRUE, FALSE, TRUE, TRUE, H5C__SET_FLUSH_MARKER_FLAG,
- H5C__FLUSH_CLEAR_ONLY_FLAG, FALSE, FALSE},
- {173, PICO_ENTRY_TYPE, 0, FALSE, TRUE, TRUE, FALSE, FALSE, H5C__SET_FLUSH_MARKER_FLAG,
- H5C__FLUSH_CLEAR_ONLY_FLAG, FALSE, FALSE},
- {174, PICO_ENTRY_TYPE, 0, FALSE, TRUE, TRUE, FALSE, TRUE, H5C__SET_FLUSH_MARKER_FLAG,
- H5C__FLUSH_CLEAR_ONLY_FLAG, FALSE, FALSE},
- {175, PICO_ENTRY_TYPE, 0, FALSE, TRUE, TRUE, TRUE, FALSE, H5C__SET_FLUSH_MARKER_FLAG,
- H5C__FLUSH_CLEAR_ONLY_FLAG, FALSE, FALSE},
- {176, PICO_ENTRY_TYPE, 0, FALSE, TRUE, TRUE, TRUE, TRUE, H5C__SET_FLUSH_MARKER_FLAG,
- H5C__FLUSH_CLEAR_ONLY_FLAG, FALSE, FALSE},
- {177, PICO_ENTRY_TYPE, 0, TRUE, FALSE, FALSE, FALSE, FALSE, H5C__SET_FLUSH_MARKER_FLAG,
- H5C__FLUSH_CLEAR_ONLY_FLAG, FALSE, FALSE},
- {178, PICO_ENTRY_TYPE, 0, TRUE, FALSE, FALSE, FALSE, TRUE, H5C__SET_FLUSH_MARKER_FLAG,
- H5C__FLUSH_CLEAR_ONLY_FLAG, FALSE, FALSE},
- {179, PICO_ENTRY_TYPE, 0, TRUE, FALSE, FALSE, TRUE, FALSE, H5C__SET_FLUSH_MARKER_FLAG,
- H5C__FLUSH_CLEAR_ONLY_FLAG, FALSE, FALSE},
- {180, PICO_ENTRY_TYPE, 0, TRUE, FALSE, FALSE, TRUE, TRUE, H5C__SET_FLUSH_MARKER_FLAG,
- H5C__FLUSH_CLEAR_ONLY_FLAG, FALSE, FALSE},
- {181, PICO_ENTRY_TYPE, 0, TRUE, FALSE, TRUE, FALSE, FALSE, H5C__SET_FLUSH_MARKER_FLAG,
- H5C__FLUSH_CLEAR_ONLY_FLAG, FALSE, FALSE},
- {182, PICO_ENTRY_TYPE, 0, TRUE, FALSE, TRUE, FALSE, TRUE, H5C__SET_FLUSH_MARKER_FLAG,
- H5C__FLUSH_CLEAR_ONLY_FLAG, FALSE, FALSE},
- {183, PICO_ENTRY_TYPE, 0, TRUE, FALSE, TRUE, TRUE, FALSE, H5C__SET_FLUSH_MARKER_FLAG,
- H5C__FLUSH_CLEAR_ONLY_FLAG, FALSE, FALSE},
- {184, PICO_ENTRY_TYPE, 0, TRUE, FALSE, TRUE, TRUE, TRUE, H5C__SET_FLUSH_MARKER_FLAG,
- H5C__FLUSH_CLEAR_ONLY_FLAG, FALSE, FALSE},
- {185, PICO_ENTRY_TYPE, 0, TRUE, TRUE, FALSE, FALSE, FALSE, H5C__SET_FLUSH_MARKER_FLAG,
- H5C__FLUSH_CLEAR_ONLY_FLAG, FALSE, FALSE},
- {186, PICO_ENTRY_TYPE, 0, TRUE, TRUE, FALSE, FALSE, TRUE, H5C__SET_FLUSH_MARKER_FLAG,
- H5C__FLUSH_CLEAR_ONLY_FLAG, FALSE, FALSE},
- {187, PICO_ENTRY_TYPE, 0, TRUE, TRUE, FALSE, TRUE, FALSE, H5C__SET_FLUSH_MARKER_FLAG,
- H5C__FLUSH_CLEAR_ONLY_FLAG, FALSE, FALSE},
- {188, PICO_ENTRY_TYPE, 0, TRUE, TRUE, FALSE, TRUE, TRUE, H5C__SET_FLUSH_MARKER_FLAG,
- H5C__FLUSH_CLEAR_ONLY_FLAG, FALSE, FALSE},
- {189, PICO_ENTRY_TYPE, 0, TRUE, TRUE, TRUE, FALSE, FALSE, H5C__SET_FLUSH_MARKER_FLAG,
- H5C__FLUSH_CLEAR_ONLY_FLAG, FALSE, FALSE},
- {190, PICO_ENTRY_TYPE, 0, TRUE, TRUE, TRUE, FALSE, TRUE, H5C__SET_FLUSH_MARKER_FLAG,
- H5C__FLUSH_CLEAR_ONLY_FLAG, FALSE, FALSE},
- {191, PICO_ENTRY_TYPE, 0, TRUE, TRUE, TRUE, TRUE, FALSE, H5C__SET_FLUSH_MARKER_FLAG,
- H5C__FLUSH_CLEAR_ONLY_FLAG, FALSE, FALSE},
- {192, PICO_ENTRY_TYPE, 0, TRUE, TRUE, TRUE, TRUE, TRUE, H5C__SET_FLUSH_MARKER_FLAG,
- H5C__FLUSH_CLEAR_ONLY_FLAG, FALSE, FALSE},
- {193, PICO_ENTRY_TYPE, 0, FALSE, FALSE, FALSE, FALSE, FALSE, H5C__NO_FLAGS_SET,
- H5C__FLUSH_MARKED_ENTRIES_FLAG | H5C__FLUSH_CLEAR_ONLY_FLAG, FALSE, FALSE},
- {194, PICO_ENTRY_TYPE, 0, FALSE, FALSE, FALSE, FALSE, TRUE, H5C__NO_FLAGS_SET,
- H5C__FLUSH_MARKED_ENTRIES_FLAG | H5C__FLUSH_CLEAR_ONLY_FLAG, FALSE, FALSE},
- {195, PICO_ENTRY_TYPE, 0, FALSE, FALSE, FALSE, TRUE, FALSE, H5C__NO_FLAGS_SET,
- H5C__FLUSH_MARKED_ENTRIES_FLAG | H5C__FLUSH_CLEAR_ONLY_FLAG, FALSE, FALSE},
- {196, PICO_ENTRY_TYPE, 0, FALSE, FALSE, FALSE, TRUE, TRUE, H5C__NO_FLAGS_SET,
- H5C__FLUSH_MARKED_ENTRIES_FLAG | H5C__FLUSH_CLEAR_ONLY_FLAG, FALSE, FALSE},
- {197, PICO_ENTRY_TYPE, 0, FALSE, FALSE, TRUE, FALSE, FALSE, H5C__NO_FLAGS_SET,
- H5C__FLUSH_MARKED_ENTRIES_FLAG | H5C__FLUSH_CLEAR_ONLY_FLAG, FALSE, FALSE},
- {198, PICO_ENTRY_TYPE, 0, FALSE, FALSE, TRUE, FALSE, TRUE, H5C__NO_FLAGS_SET,
- H5C__FLUSH_MARKED_ENTRIES_FLAG | H5C__FLUSH_CLEAR_ONLY_FLAG, FALSE, FALSE},
- {199, PICO_ENTRY_TYPE, 0, FALSE, FALSE, TRUE, TRUE, FALSE, H5C__NO_FLAGS_SET,
- H5C__FLUSH_MARKED_ENTRIES_FLAG | H5C__FLUSH_CLEAR_ONLY_FLAG, FALSE, FALSE},
- {200, PICO_ENTRY_TYPE, 0, FALSE, FALSE, TRUE, TRUE, TRUE, H5C__NO_FLAGS_SET,
- H5C__FLUSH_MARKED_ENTRIES_FLAG | H5C__FLUSH_CLEAR_ONLY_FLAG, FALSE, FALSE},
- {201, PICO_ENTRY_TYPE, 0, FALSE, TRUE, FALSE, FALSE, FALSE, H5C__NO_FLAGS_SET,
- H5C__FLUSH_MARKED_ENTRIES_FLAG | H5C__FLUSH_CLEAR_ONLY_FLAG, FALSE, FALSE},
- {202, PICO_ENTRY_TYPE, 0, FALSE, TRUE, FALSE, FALSE, TRUE, H5C__NO_FLAGS_SET,
- H5C__FLUSH_MARKED_ENTRIES_FLAG | H5C__FLUSH_CLEAR_ONLY_FLAG, FALSE, FALSE},
- {203, PICO_ENTRY_TYPE, 0, FALSE, TRUE, FALSE, TRUE, FALSE, H5C__NO_FLAGS_SET,
- H5C__FLUSH_MARKED_ENTRIES_FLAG | H5C__FLUSH_CLEAR_ONLY_FLAG, FALSE, FALSE},
- {204, PICO_ENTRY_TYPE, 0, FALSE, TRUE, FALSE, TRUE, TRUE, H5C__NO_FLAGS_SET,
- H5C__FLUSH_MARKED_ENTRIES_FLAG | H5C__FLUSH_CLEAR_ONLY_FLAG, FALSE, FALSE},
- {205, PICO_ENTRY_TYPE, 0, FALSE, TRUE, TRUE, FALSE, FALSE, H5C__NO_FLAGS_SET,
- H5C__FLUSH_MARKED_ENTRIES_FLAG | H5C__FLUSH_CLEAR_ONLY_FLAG, FALSE, FALSE},
- {206, PICO_ENTRY_TYPE, 0, FALSE, TRUE, TRUE, FALSE, TRUE, H5C__NO_FLAGS_SET,
- H5C__FLUSH_MARKED_ENTRIES_FLAG | H5C__FLUSH_CLEAR_ONLY_FLAG, FALSE, FALSE},
- {207, PICO_ENTRY_TYPE, 0, FALSE, TRUE, TRUE, TRUE, FALSE, H5C__NO_FLAGS_SET,
- H5C__FLUSH_MARKED_ENTRIES_FLAG | H5C__FLUSH_CLEAR_ONLY_FLAG, FALSE, FALSE},
- {208, PICO_ENTRY_TYPE, 0, FALSE, TRUE, TRUE, TRUE, TRUE, H5C__NO_FLAGS_SET,
- H5C__FLUSH_MARKED_ENTRIES_FLAG | H5C__FLUSH_CLEAR_ONLY_FLAG, FALSE, FALSE},
- {209, PICO_ENTRY_TYPE, 0, TRUE, FALSE, FALSE, FALSE, FALSE, H5C__NO_FLAGS_SET,
- H5C__FLUSH_MARKED_ENTRIES_FLAG | H5C__FLUSH_CLEAR_ONLY_FLAG, FALSE, FALSE},
- {210, PICO_ENTRY_TYPE, 0, TRUE, FALSE, FALSE, FALSE, TRUE, H5C__NO_FLAGS_SET,
- H5C__FLUSH_MARKED_ENTRIES_FLAG | H5C__FLUSH_CLEAR_ONLY_FLAG, FALSE, FALSE},
- {211, PICO_ENTRY_TYPE, 0, TRUE, FALSE, FALSE, TRUE, FALSE, H5C__NO_FLAGS_SET,
- H5C__FLUSH_MARKED_ENTRIES_FLAG | H5C__FLUSH_CLEAR_ONLY_FLAG, FALSE, FALSE},
- {212, PICO_ENTRY_TYPE, 0, TRUE, FALSE, FALSE, TRUE, TRUE, H5C__NO_FLAGS_SET,
- H5C__FLUSH_MARKED_ENTRIES_FLAG | H5C__FLUSH_CLEAR_ONLY_FLAG, FALSE, FALSE},
- {213, PICO_ENTRY_TYPE, 0, TRUE, FALSE, TRUE, FALSE, FALSE, H5C__NO_FLAGS_SET,
- H5C__FLUSH_MARKED_ENTRIES_FLAG | H5C__FLUSH_CLEAR_ONLY_FLAG, FALSE, FALSE},
- {214, PICO_ENTRY_TYPE, 0, TRUE, FALSE, TRUE, FALSE, TRUE, H5C__NO_FLAGS_SET,
- H5C__FLUSH_MARKED_ENTRIES_FLAG | H5C__FLUSH_CLEAR_ONLY_FLAG, FALSE, FALSE},
- {215, PICO_ENTRY_TYPE, 0, TRUE, FALSE, TRUE, TRUE, FALSE, H5C__NO_FLAGS_SET,
- H5C__FLUSH_MARKED_ENTRIES_FLAG | H5C__FLUSH_CLEAR_ONLY_FLAG, FALSE, FALSE},
- {216, PICO_ENTRY_TYPE, 0, TRUE, FALSE, TRUE, TRUE, TRUE, H5C__NO_FLAGS_SET,
- H5C__FLUSH_MARKED_ENTRIES_FLAG | H5C__FLUSH_CLEAR_ONLY_FLAG, FALSE, FALSE},
- {217, PICO_ENTRY_TYPE, 0, TRUE, TRUE, FALSE, FALSE, FALSE, H5C__NO_FLAGS_SET,
- H5C__FLUSH_MARKED_ENTRIES_FLAG | H5C__FLUSH_CLEAR_ONLY_FLAG, FALSE, FALSE},
- {218, PICO_ENTRY_TYPE, 0, TRUE, TRUE, FALSE, FALSE, TRUE, H5C__NO_FLAGS_SET,
- H5C__FLUSH_MARKED_ENTRIES_FLAG | H5C__FLUSH_CLEAR_ONLY_FLAG, FALSE, FALSE},
- {219, PICO_ENTRY_TYPE, 0, TRUE, TRUE, FALSE, TRUE, FALSE, H5C__NO_FLAGS_SET,
- H5C__FLUSH_MARKED_ENTRIES_FLAG | H5C__FLUSH_CLEAR_ONLY_FLAG, FALSE, FALSE},
- {220, PICO_ENTRY_TYPE, 0, TRUE, TRUE, FALSE, TRUE, TRUE, H5C__NO_FLAGS_SET,
- H5C__FLUSH_MARKED_ENTRIES_FLAG | H5C__FLUSH_CLEAR_ONLY_FLAG, FALSE, FALSE},
- {221, PICO_ENTRY_TYPE, 0, TRUE, TRUE, TRUE, FALSE, FALSE, H5C__NO_FLAGS_SET,
- H5C__FLUSH_MARKED_ENTRIES_FLAG | H5C__FLUSH_CLEAR_ONLY_FLAG, FALSE, FALSE},
- {222, PICO_ENTRY_TYPE, 0, TRUE, TRUE, TRUE, FALSE, TRUE, H5C__NO_FLAGS_SET,
- H5C__FLUSH_MARKED_ENTRIES_FLAG | H5C__FLUSH_CLEAR_ONLY_FLAG, FALSE, FALSE},
- {223, PICO_ENTRY_TYPE, 0, TRUE, TRUE, TRUE, TRUE, FALSE, H5C__NO_FLAGS_SET,
- H5C__FLUSH_MARKED_ENTRIES_FLAG | H5C__FLUSH_CLEAR_ONLY_FLAG, FALSE, FALSE},
- {224, PICO_ENTRY_TYPE, 0, TRUE, TRUE, TRUE, TRUE, TRUE, H5C__NO_FLAGS_SET,
- H5C__FLUSH_MARKED_ENTRIES_FLAG | H5C__FLUSH_CLEAR_ONLY_FLAG, FALSE, FALSE},
- {225, PICO_ENTRY_TYPE, 0, FALSE, FALSE, FALSE, FALSE, FALSE, H5C__SET_FLUSH_MARKER_FLAG,
- H5C__FLUSH_MARKED_ENTRIES_FLAG | H5C__FLUSH_CLEAR_ONLY_FLAG, FALSE, FALSE},
- {226, PICO_ENTRY_TYPE, 0, FALSE, FALSE, FALSE, FALSE, TRUE, H5C__SET_FLUSH_MARKER_FLAG,
- H5C__FLUSH_MARKED_ENTRIES_FLAG | H5C__FLUSH_CLEAR_ONLY_FLAG, FALSE, FALSE},
- {227, PICO_ENTRY_TYPE, 0, FALSE, FALSE, FALSE, TRUE, FALSE, H5C__SET_FLUSH_MARKER_FLAG,
- H5C__FLUSH_MARKED_ENTRIES_FLAG | H5C__FLUSH_CLEAR_ONLY_FLAG, FALSE, FALSE},
- {228, PICO_ENTRY_TYPE, 0, FALSE, FALSE, FALSE, TRUE, TRUE, H5C__SET_FLUSH_MARKER_FLAG,
- H5C__FLUSH_MARKED_ENTRIES_FLAG | H5C__FLUSH_CLEAR_ONLY_FLAG, FALSE, FALSE},
- {229, PICO_ENTRY_TYPE, 0, FALSE, FALSE, TRUE, FALSE, FALSE, H5C__SET_FLUSH_MARKER_FLAG,
- H5C__FLUSH_MARKED_ENTRIES_FLAG | H5C__FLUSH_CLEAR_ONLY_FLAG, FALSE, FALSE},
- {230, PICO_ENTRY_TYPE, 0, FALSE, FALSE, TRUE, FALSE, TRUE, H5C__SET_FLUSH_MARKER_FLAG,
- H5C__FLUSH_MARKED_ENTRIES_FLAG | H5C__FLUSH_CLEAR_ONLY_FLAG, FALSE, FALSE},
- {231, PICO_ENTRY_TYPE, 0, FALSE, FALSE, TRUE, TRUE, FALSE, H5C__SET_FLUSH_MARKER_FLAG,
- H5C__FLUSH_MARKED_ENTRIES_FLAG | H5C__FLUSH_CLEAR_ONLY_FLAG, FALSE, FALSE},
- {232, PICO_ENTRY_TYPE, 0, FALSE, FALSE, TRUE, TRUE, TRUE, H5C__SET_FLUSH_MARKER_FLAG,
- H5C__FLUSH_MARKED_ENTRIES_FLAG | H5C__FLUSH_CLEAR_ONLY_FLAG, FALSE, FALSE},
- {233, PICO_ENTRY_TYPE, 0, FALSE, TRUE, FALSE, FALSE, FALSE, H5C__SET_FLUSH_MARKER_FLAG,
- H5C__FLUSH_MARKED_ENTRIES_FLAG | H5C__FLUSH_CLEAR_ONLY_FLAG, FALSE, FALSE},
- {234, PICO_ENTRY_TYPE, 0, FALSE, TRUE, FALSE, FALSE, TRUE, H5C__SET_FLUSH_MARKER_FLAG,
- H5C__FLUSH_MARKED_ENTRIES_FLAG | H5C__FLUSH_CLEAR_ONLY_FLAG, FALSE, FALSE},
- {235, PICO_ENTRY_TYPE, 0, FALSE, TRUE, FALSE, TRUE, FALSE, H5C__SET_FLUSH_MARKER_FLAG,
- H5C__FLUSH_MARKED_ENTRIES_FLAG | H5C__FLUSH_CLEAR_ONLY_FLAG, FALSE, FALSE},
- {236, PICO_ENTRY_TYPE, 0, FALSE, TRUE, FALSE, TRUE, TRUE, H5C__SET_FLUSH_MARKER_FLAG,
- H5C__FLUSH_MARKED_ENTRIES_FLAG | H5C__FLUSH_CLEAR_ONLY_FLAG, FALSE, FALSE},
- {237, PICO_ENTRY_TYPE, 0, FALSE, TRUE, TRUE, FALSE, FALSE, H5C__SET_FLUSH_MARKER_FLAG,
- H5C__FLUSH_MARKED_ENTRIES_FLAG | H5C__FLUSH_CLEAR_ONLY_FLAG, FALSE, FALSE},
- {238, PICO_ENTRY_TYPE, 0, FALSE, TRUE, TRUE, FALSE, TRUE, H5C__SET_FLUSH_MARKER_FLAG,
- H5C__FLUSH_MARKED_ENTRIES_FLAG | H5C__FLUSH_CLEAR_ONLY_FLAG, FALSE, FALSE},
- {239, PICO_ENTRY_TYPE, 0, FALSE, TRUE, TRUE, TRUE, FALSE, H5C__SET_FLUSH_MARKER_FLAG,
- H5C__FLUSH_MARKED_ENTRIES_FLAG | H5C__FLUSH_CLEAR_ONLY_FLAG, FALSE, FALSE},
- {240, PICO_ENTRY_TYPE, 0, FALSE, TRUE, TRUE, TRUE, TRUE, H5C__SET_FLUSH_MARKER_FLAG,
- H5C__FLUSH_MARKED_ENTRIES_FLAG | H5C__FLUSH_CLEAR_ONLY_FLAG, FALSE, FALSE},
- {241, PICO_ENTRY_TYPE, 0, TRUE, FALSE, FALSE, FALSE, FALSE, H5C__SET_FLUSH_MARKER_FLAG,
- H5C__FLUSH_MARKED_ENTRIES_FLAG | H5C__FLUSH_CLEAR_ONLY_FLAG, FALSE, FALSE},
- {242, PICO_ENTRY_TYPE, 0, TRUE, FALSE, FALSE, FALSE, TRUE, H5C__SET_FLUSH_MARKER_FLAG,
- H5C__FLUSH_MARKED_ENTRIES_FLAG | H5C__FLUSH_CLEAR_ONLY_FLAG, FALSE, FALSE},
- {243, PICO_ENTRY_TYPE, 0, TRUE, FALSE, FALSE, TRUE, FALSE, H5C__SET_FLUSH_MARKER_FLAG,
- H5C__FLUSH_MARKED_ENTRIES_FLAG | H5C__FLUSH_CLEAR_ONLY_FLAG, FALSE, FALSE},
- {244, PICO_ENTRY_TYPE, 0, TRUE, FALSE, FALSE, TRUE, TRUE, H5C__SET_FLUSH_MARKER_FLAG,
- H5C__FLUSH_MARKED_ENTRIES_FLAG | H5C__FLUSH_CLEAR_ONLY_FLAG, FALSE, FALSE},
- {245, PICO_ENTRY_TYPE, 0, TRUE, FALSE, TRUE, FALSE, FALSE, H5C__SET_FLUSH_MARKER_FLAG,
- H5C__FLUSH_MARKED_ENTRIES_FLAG | H5C__FLUSH_CLEAR_ONLY_FLAG, FALSE, FALSE},
- {246, PICO_ENTRY_TYPE, 0, TRUE, FALSE, TRUE, FALSE, TRUE, H5C__SET_FLUSH_MARKER_FLAG,
- H5C__FLUSH_MARKED_ENTRIES_FLAG | H5C__FLUSH_CLEAR_ONLY_FLAG, FALSE, FALSE},
- {247, PICO_ENTRY_TYPE, 0, TRUE, FALSE, TRUE, TRUE, FALSE, H5C__SET_FLUSH_MARKER_FLAG,
- H5C__FLUSH_MARKED_ENTRIES_FLAG | H5C__FLUSH_CLEAR_ONLY_FLAG, FALSE, FALSE},
- {248, PICO_ENTRY_TYPE, 0, TRUE, FALSE, TRUE, TRUE, TRUE, H5C__SET_FLUSH_MARKER_FLAG,
- H5C__FLUSH_MARKED_ENTRIES_FLAG | H5C__FLUSH_CLEAR_ONLY_FLAG, FALSE, FALSE},
- {249, PICO_ENTRY_TYPE, 0, TRUE, TRUE, FALSE, FALSE, FALSE, H5C__SET_FLUSH_MARKER_FLAG,
- H5C__FLUSH_MARKED_ENTRIES_FLAG | H5C__FLUSH_CLEAR_ONLY_FLAG, FALSE, FALSE},
- {250, PICO_ENTRY_TYPE, 0, TRUE, TRUE, FALSE, FALSE, TRUE, H5C__SET_FLUSH_MARKER_FLAG,
- H5C__FLUSH_MARKED_ENTRIES_FLAG | H5C__FLUSH_CLEAR_ONLY_FLAG, FALSE, FALSE},
- {251, PICO_ENTRY_TYPE, 0, TRUE, TRUE, FALSE, TRUE, FALSE, H5C__SET_FLUSH_MARKER_FLAG,
- H5C__FLUSH_MARKED_ENTRIES_FLAG | H5C__FLUSH_CLEAR_ONLY_FLAG, FALSE, FALSE},
- {252, PICO_ENTRY_TYPE, 0, TRUE, TRUE, FALSE, TRUE, TRUE, H5C__SET_FLUSH_MARKER_FLAG,
- H5C__FLUSH_MARKED_ENTRIES_FLAG | H5C__FLUSH_CLEAR_ONLY_FLAG, FALSE, FALSE},
- {253, PICO_ENTRY_TYPE, 0, TRUE, TRUE, TRUE, FALSE, FALSE, H5C__SET_FLUSH_MARKER_FLAG,
- H5C__FLUSH_MARKED_ENTRIES_FLAG | H5C__FLUSH_CLEAR_ONLY_FLAG, FALSE, FALSE},
- {254, PICO_ENTRY_TYPE, 0, TRUE, TRUE, TRUE, FALSE, TRUE, H5C__SET_FLUSH_MARKER_FLAG,
- H5C__FLUSH_MARKED_ENTRIES_FLAG | H5C__FLUSH_CLEAR_ONLY_FLAG, FALSE, FALSE},
- {255, PICO_ENTRY_TYPE, 0, TRUE, TRUE, TRUE, TRUE, FALSE, H5C__SET_FLUSH_MARKER_FLAG,
- H5C__FLUSH_MARKED_ENTRIES_FLAG | H5C__FLUSH_CLEAR_ONLY_FLAG, FALSE, FALSE},
- {256, PICO_ENTRY_TYPE, 0, TRUE, TRUE, TRUE, TRUE, TRUE, H5C__SET_FLUSH_MARKER_FLAG,
- H5C__FLUSH_MARKED_ENTRIES_FLAG | H5C__FLUSH_CLEAR_ONLY_FLAG, FALSE, FALSE}};
+ switch (i / 64) {
+ case 0:
+ flush_flags = H5C__NO_FLAGS_SET;
+ break;
+ case 1:
+ flush_flags = H5C__FLUSH_MARKED_ENTRIES_FLAG;
+ break;
+ case 2:
+ flush_flags = H5C__FLUSH_CLEAR_ONLY_FLAG;
+ break;
+ case 3:
+ flush_flags = H5C__FLUSH_MARKED_ENTRIES_FLAG | H5C__FLUSH_CLEAR_ONLY_FLAG;
+ break;
+ default:
+ flush_flags = H5C__NO_FLAGS_SET;
+ break;
+ }
+
+ expected_serialized = FALSE;
+ if (0 == (flush_flags & H5C__FLUSH_CLEAR_ONLY_FLAG)) {
+ if (flush_flags & H5C__FLUSH_MARKED_ENTRIES_FLAG) {
+ if (flags & H5C__SET_FLUSH_MARKER_FLAG) {
+ if (mark_dirty && pop_mark_dirty_prot) {
+ expected_serialized = TRUE;
+ }
+ else if (dirty_flag || pop_mark_dirty_prot) {
+ expected_serialized = TRUE;
+ }
+ }
+ }
+ else {
+ if (dirty_flag || mark_dirty || pop_mark_dirty_prot || pop_mark_dirty_pinned)
+ expected_serialized = TRUE;
+ }
+ }
+
+ expected_destroyed = FALSE;
+
+ spec[i] = (struct pinned_single_entry_test_spec){
+ test_num,
+ entry_type,
+ entry_idx,
+ dirty_flag,
+ mark_dirty,
+ pop_mark_dirty_prot,
+ pop_mark_dirty_pinned,
+ unprotect_unpin,
+ flags,
+ flush_flags,
+ expected_serialized,
+ expected_destroyed,
+ };
+ }
i = 0;
while (pass && (i < 256)) {
check_flush_cache__pinned_single_entry_test(
- /* file_ptr */ file_ptr,
+ /* file_ptr */ file_ptr,
/* test_num */ spec[i].test_num,
/* entry_type */ spec[i].entry_type,
/* entry_idx */ spec[i].entry_idx,
@@ -12142,6 +11017,8 @@ check_flush_cache__single_entry(H5F_t *file_ptr)
/* expected_destroyed */ spec[i].expected_destroyed);
i++;
}
+
+ HDfree(spec);
}
} /* check_flush_cache__single_entry() */
@@ -26855,182 +25732,57 @@ check_auto_cache_resize_aux_fcns(unsigned paged)
static unsigned
check_metadata_blizzard_absence(hbool_t fill_via_insertion, unsigned paged)
{
- int entry_type = HUGE_ENTRY_TYPE;
- size_t entry_size = HUGE_ENTRY_SIZE; /* 16 KB */
- H5F_t * file_ptr = NULL;
- H5C_t * cache_ptr = NULL;
- hbool_t show_progress = FALSE;
- int32_t checkpoint = 0;
- int32_t entry_idx = 0;
- int32_t i;
+ struct expected_entry_status *expected = NULL;
+ int entry_type = HUGE_ENTRY_TYPE;
+ size_t entry_size = HUGE_ENTRY_SIZE; /* 16 KB */
+ H5F_t * file_ptr = NULL;
+ H5C_t * cache_ptr = NULL;
+ hbool_t show_progress = FALSE;
+ int32_t checkpoint = 0;
+ int32_t entry_idx = 0;
+ int32_t i;
/* Expected deserialized status of entries depends on how they get into
* the cache. Insertions = not deserialized, protect/unprotect = deserialized.
*/
hbool_t deserialized = (hbool_t) !(fill_via_insertion);
- /* Set up the expected array. This is used to maintain a table of the
- * expected status of every entry used in this test.
- */
- /* clang-format off */
- struct expected_entry_status expected[150] =
- {
- /* entry entry in at main flush dep flush dep child flush flush flush */
- /* type: index: size: cache: addr: dirty: prot: pinned: dsrlzd: srlzd: dest: par type[]: par idx[]: dep npart: dep nchd: dep ndirty chd: order: corked: */
- { HUGE_ENTRY_TYPE, 0, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, {0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0}, 0, 0, 0, -1, FALSE},
- { HUGE_ENTRY_TYPE, 1, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, {0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0}, 0, 0, 0, -1, FALSE},
- { HUGE_ENTRY_TYPE, 2, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, {0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0}, 0, 0, 0, -1, FALSE},
- { HUGE_ENTRY_TYPE, 3, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, {0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0}, 0, 0, 0, -1, FALSE},
- { HUGE_ENTRY_TYPE, 4, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, {0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0}, 0, 0, 0, -1, FALSE},
- { HUGE_ENTRY_TYPE, 5, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, {0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0}, 0, 0, 0, -1, FALSE},
- { HUGE_ENTRY_TYPE, 6, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, {0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0}, 0, 0, 0, -1, FALSE},
- { HUGE_ENTRY_TYPE, 7, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, {0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0}, 0, 0, 0, -1, FALSE},
- { HUGE_ENTRY_TYPE, 8, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, {0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0}, 0, 0, 0, -1, FALSE},
- { HUGE_ENTRY_TYPE, 9, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, {0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0}, 0, 0, 0, -1, FALSE},
- { HUGE_ENTRY_TYPE, 10, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, {0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0}, 0, 0, 0, -1, FALSE},
- { HUGE_ENTRY_TYPE, 11, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, {0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0}, 0, 0, 0, -1, FALSE},
- { HUGE_ENTRY_TYPE, 12, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, {0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0}, 0, 0, 0, -1, FALSE},
- { HUGE_ENTRY_TYPE, 13, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, {0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0}, 0, 0, 0, -1, FALSE},
- { HUGE_ENTRY_TYPE, 14, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, {0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0}, 0, 0, 0, -1, FALSE},
- { HUGE_ENTRY_TYPE, 15, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, {0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0}, 0, 0, 0, -1, FALSE},
- { HUGE_ENTRY_TYPE, 16, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, {0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0}, 0, 0, 0, -1, FALSE},
- { HUGE_ENTRY_TYPE, 17, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, {0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0}, 0, 0, 0, -1, FALSE},
- { HUGE_ENTRY_TYPE, 18, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, {0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0}, 0, 0, 0, -1, FALSE},
- { HUGE_ENTRY_TYPE, 19, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, {0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0}, 0, 0, 0, -1, FALSE},
- { HUGE_ENTRY_TYPE, 20, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, {0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0}, 0, 0, 0, -1, FALSE},
- { HUGE_ENTRY_TYPE, 21, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, {0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0}, 0, 0, 0, -1, FALSE},
- { HUGE_ENTRY_TYPE, 22, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, {0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0}, 0, 0, 0, -1, FALSE},
- { HUGE_ENTRY_TYPE, 23, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, {0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0}, 0, 0, 0, -1, FALSE},
- { HUGE_ENTRY_TYPE, 24, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, {0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0}, 0, 0, 0, -1, FALSE},
- { HUGE_ENTRY_TYPE, 25, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, {0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0}, 0, 0, 0, -1, FALSE},
- { HUGE_ENTRY_TYPE, 26, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, {0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0}, 0, 0, 0, -1, FALSE},
- { HUGE_ENTRY_TYPE, 27, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, {0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0}, 0, 0, 0, -1, FALSE},
- { HUGE_ENTRY_TYPE, 28, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, {0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0}, 0, 0, 0, -1, FALSE},
- { HUGE_ENTRY_TYPE, 29, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, {0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0}, 0, 0, 0, -1, FALSE},
- { HUGE_ENTRY_TYPE, 30, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, {0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0}, 0, 0, 0, -1, FALSE},
- { HUGE_ENTRY_TYPE, 31, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, {0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0}, 0, 0, 0, -1, FALSE},
- { HUGE_ENTRY_TYPE, 32, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, {0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0}, 0, 0, 0, -1, FALSE},
- { HUGE_ENTRY_TYPE, 33, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, {0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0}, 0, 0, 0, -1, FALSE},
- { HUGE_ENTRY_TYPE, 34, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, {0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0}, 0, 0, 0, -1, FALSE},
- { HUGE_ENTRY_TYPE, 35, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, {0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0}, 0, 0, 0, -1, FALSE},
- { HUGE_ENTRY_TYPE, 36, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, {0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0}, 0, 0, 0, -1, FALSE},
- { HUGE_ENTRY_TYPE, 37, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, {0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0}, 0, 0, 0, -1, FALSE},
- { HUGE_ENTRY_TYPE, 38, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, {0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0}, 0, 0, 0, -1, FALSE},
- { HUGE_ENTRY_TYPE, 39, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, {0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0}, 0, 0, 0, -1, FALSE},
- { HUGE_ENTRY_TYPE, 40, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, {0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0}, 0, 0, 0, -1, FALSE},
- { HUGE_ENTRY_TYPE, 41, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, {0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0}, 0, 0, 0, -1, FALSE},
- { HUGE_ENTRY_TYPE, 42, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, {0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0}, 0, 0, 0, -1, FALSE},
- { HUGE_ENTRY_TYPE, 43, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, {0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0}, 0, 0, 0, -1, FALSE},
- { HUGE_ENTRY_TYPE, 44, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, {0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0}, 0, 0, 0, -1, FALSE},
- { HUGE_ENTRY_TYPE, 45, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, {0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0}, 0, 0, 0, -1, FALSE},
- { HUGE_ENTRY_TYPE, 46, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, {0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0}, 0, 0, 0, -1, FALSE},
- { HUGE_ENTRY_TYPE, 47, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, {0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0}, 0, 0, 0, -1, FALSE},
- { HUGE_ENTRY_TYPE, 48, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, {0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0}, 0, 0, 0, -1, FALSE},
- { HUGE_ENTRY_TYPE, 49, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, {0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0}, 0, 0, 0, -1, FALSE},
- { HUGE_ENTRY_TYPE, 50, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, {0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0}, 0, 0, 0, -1, FALSE},
- { HUGE_ENTRY_TYPE, 51, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, {0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0}, 0, 0, 0, -1, FALSE},
- { HUGE_ENTRY_TYPE, 52, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, {0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0}, 0, 0, 0, -1, FALSE},
- { HUGE_ENTRY_TYPE, 53, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, {0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0}, 0, 0, 0, -1, FALSE},
- { HUGE_ENTRY_TYPE, 54, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, {0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0}, 0, 0, 0, -1, FALSE},
- { HUGE_ENTRY_TYPE, 55, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, {0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0}, 0, 0, 0, -1, FALSE},
- { HUGE_ENTRY_TYPE, 56, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, {0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0}, 0, 0, 0, -1, FALSE},
- { HUGE_ENTRY_TYPE, 57, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, {0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0}, 0, 0, 0, -1, FALSE},
- { HUGE_ENTRY_TYPE, 58, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, {0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0}, 0, 0, 0, -1, FALSE},
- { HUGE_ENTRY_TYPE, 59, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, {0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0}, 0, 0, 0, -1, FALSE},
- { HUGE_ENTRY_TYPE, 60, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, {0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0}, 0, 0, 0, -1, FALSE},
- { HUGE_ENTRY_TYPE, 61, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, {0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0}, 0, 0, 0, -1, FALSE},
- { HUGE_ENTRY_TYPE, 62, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, {0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0}, 0, 0, 0, -1, FALSE},
- { HUGE_ENTRY_TYPE, 63, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, {0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0}, 0, 0, 0, -1, FALSE},
- { HUGE_ENTRY_TYPE, 64, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, {0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0}, 0, 0, 0, -1, FALSE},
- { HUGE_ENTRY_TYPE, 65, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, {0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0}, 0, 0, 0, -1, FALSE},
- { HUGE_ENTRY_TYPE, 66, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, {0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0}, 0, 0, 0, -1, FALSE},
- { HUGE_ENTRY_TYPE, 67, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, {0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0}, 0, 0, 0, -1, FALSE},
- { HUGE_ENTRY_TYPE, 68, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, {0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0}, 0, 0, 0, -1, FALSE},
- { HUGE_ENTRY_TYPE, 69, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, {0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0}, 0, 0, 0, -1, FALSE},
- { HUGE_ENTRY_TYPE, 70, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, {0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0}, 0, 0, 0, -1, FALSE},
- { HUGE_ENTRY_TYPE, 71, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, {0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0}, 0, 0, 0, -1, FALSE},
- { HUGE_ENTRY_TYPE, 72, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, {0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0}, 0, 0, 0, -1, FALSE},
- { HUGE_ENTRY_TYPE, 73, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, {0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0}, 0, 0, 0, -1, FALSE},
- { HUGE_ENTRY_TYPE, 74, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, {0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0}, 0, 0, 0, -1, FALSE},
- { HUGE_ENTRY_TYPE, 75, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, {0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0}, 0, 0, 0, -1, FALSE},
- { HUGE_ENTRY_TYPE, 76, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, {0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0}, 0, 0, 0, -1, FALSE},
- { HUGE_ENTRY_TYPE, 77, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, {0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0}, 0, 0, 0, -1, FALSE},
- { HUGE_ENTRY_TYPE, 78, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, {0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0}, 0, 0, 0, -1, FALSE},
- { HUGE_ENTRY_TYPE, 79, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, {0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0}, 0, 0, 0, -1, FALSE},
- { HUGE_ENTRY_TYPE, 80, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, {0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0}, 0, 0, 0, -1, FALSE},
- { HUGE_ENTRY_TYPE, 81, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, {0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0}, 0, 0, 0, -1, FALSE},
- { HUGE_ENTRY_TYPE, 82, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, {0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0}, 0, 0, 0, -1, FALSE},
- { HUGE_ENTRY_TYPE, 83, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, {0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0}, 0, 0, 0, -1, FALSE},
- { HUGE_ENTRY_TYPE, 84, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, {0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0}, 0, 0, 0, -1, FALSE},
- { HUGE_ENTRY_TYPE, 85, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, {0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0}, 0, 0, 0, -1, FALSE},
- { HUGE_ENTRY_TYPE, 86, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, {0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0}, 0, 0, 0, -1, FALSE},
- { HUGE_ENTRY_TYPE, 87, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, {0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0}, 0, 0, 0, -1, FALSE},
- { HUGE_ENTRY_TYPE, 88, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, {0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0}, 0, 0, 0, -1, FALSE},
- { HUGE_ENTRY_TYPE, 89, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, {0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0}, 0, 0, 0, -1, FALSE},
- { HUGE_ENTRY_TYPE, 90, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, {0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0}, 0, 0, 0, -1, FALSE},
- { HUGE_ENTRY_TYPE, 91, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, {0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0}, 0, 0, 0, -1, FALSE},
- { HUGE_ENTRY_TYPE, 92, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, {0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0}, 0, 0, 0, -1, FALSE},
- { HUGE_ENTRY_TYPE, 93, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, {0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0}, 0, 0, 0, -1, FALSE},
- { HUGE_ENTRY_TYPE, 94, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, {0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0}, 0, 0, 0, -1, FALSE},
- { HUGE_ENTRY_TYPE, 95, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, {0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0}, 0, 0, 0, -1, FALSE},
- { HUGE_ENTRY_TYPE, 96, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, {0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0}, 0, 0, 0, -1, FALSE},
- { HUGE_ENTRY_TYPE, 97, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, {0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0}, 0, 0, 0, -1, FALSE},
- { HUGE_ENTRY_TYPE, 98, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, {0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0}, 0, 0, 0, -1, FALSE},
- { HUGE_ENTRY_TYPE, 99, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, {0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0}, 0, 0, 0, -1, FALSE},
- { HUGE_ENTRY_TYPE, 100, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, {0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0}, 0, 0, 0, -1, FALSE},
- { HUGE_ENTRY_TYPE, 101, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, {0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0}, 0, 0, 0, -1, FALSE},
- { HUGE_ENTRY_TYPE, 102, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, {0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0}, 0, 0, 0, -1, FALSE},
- { HUGE_ENTRY_TYPE, 103, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, {0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0}, 0, 0, 0, -1, FALSE},
- { HUGE_ENTRY_TYPE, 104, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, {0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0}, 0, 0, 0, -1, FALSE},
- { HUGE_ENTRY_TYPE, 105, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, {0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0}, 0, 0, 0, -1, FALSE},
- { HUGE_ENTRY_TYPE, 106, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, {0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0}, 0, 0, 0, -1, FALSE},
- { HUGE_ENTRY_TYPE, 107, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, {0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0}, 0, 0, 0, -1, FALSE},
- { HUGE_ENTRY_TYPE, 108, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, {0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0}, 0, 0, 0, -1, FALSE},
- { HUGE_ENTRY_TYPE, 109, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, {0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0}, 0, 0, 0, -1, FALSE},
- { HUGE_ENTRY_TYPE, 110, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, {0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0}, 0, 0, 0, -1, FALSE},
- { HUGE_ENTRY_TYPE, 111, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, {0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0}, 0, 0, 0, -1, FALSE},
- { HUGE_ENTRY_TYPE, 112, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, {0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0}, 0, 0, 0, -1, FALSE},
- { HUGE_ENTRY_TYPE, 113, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, {0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0}, 0, 0, 0, -1, FALSE},
- { HUGE_ENTRY_TYPE, 114, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, {0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0}, 0, 0, 0, -1, FALSE},
- { HUGE_ENTRY_TYPE, 115, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, {0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0}, 0, 0, 0, -1, FALSE},
- { HUGE_ENTRY_TYPE, 116, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, {0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0}, 0, 0, 0, -1, FALSE},
- { HUGE_ENTRY_TYPE, 117, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, {0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0}, 0, 0, 0, -1, FALSE},
- { HUGE_ENTRY_TYPE, 118, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, {0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0}, 0, 0, 0, -1, FALSE},
- { HUGE_ENTRY_TYPE, 119, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, {0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0}, 0, 0, 0, -1, FALSE},
- { HUGE_ENTRY_TYPE, 120, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, {0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0}, 0, 0, 0, -1, FALSE},
- { HUGE_ENTRY_TYPE, 121, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, {0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0}, 0, 0, 0, -1, FALSE},
- { HUGE_ENTRY_TYPE, 122, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, {0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0}, 0, 0, 0, -1, FALSE},
- { HUGE_ENTRY_TYPE, 123, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, {0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0}, 0, 0, 0, -1, FALSE},
- { HUGE_ENTRY_TYPE, 124, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, {0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0}, 0, 0, 0, -1, FALSE},
- { HUGE_ENTRY_TYPE, 125, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, {0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0}, 0, 0, 0, -1, FALSE},
- { HUGE_ENTRY_TYPE, 126, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, {0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0}, 0, 0, 0, -1, FALSE},
- { HUGE_ENTRY_TYPE, 127, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, {0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0}, 0, 0, 0, -1, FALSE},
- { HUGE_ENTRY_TYPE, 128, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, {0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0}, 0, 0, 0, -1, FALSE},
- { HUGE_ENTRY_TYPE, 129, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, {0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0}, 0, 0, 0, -1, FALSE},
- { HUGE_ENTRY_TYPE, 130, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, {0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0}, 0, 0, 0, -1, FALSE},
- { HUGE_ENTRY_TYPE, 131, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, {0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0}, 0, 0, 0, -1, FALSE},
- { HUGE_ENTRY_TYPE, 132, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, {0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0}, 0, 0, 0, -1, FALSE},
- { HUGE_ENTRY_TYPE, 133, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, {0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0}, 0, 0, 0, -1, FALSE},
- { HUGE_ENTRY_TYPE, 134, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, {0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0}, 0, 0, 0, -1, FALSE},
- { HUGE_ENTRY_TYPE, 135, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, {0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0}, 0, 0, 0, -1, FALSE},
- { HUGE_ENTRY_TYPE, 136, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, {0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0}, 0, 0, 0, -1, FALSE},
- { HUGE_ENTRY_TYPE, 137, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, {0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0}, 0, 0, 0, -1, FALSE},
- { HUGE_ENTRY_TYPE, 138, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, {0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0}, 0, 0, 0, -1, FALSE},
- { HUGE_ENTRY_TYPE, 139, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, {0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0}, 0, 0, 0, -1, FALSE},
- { HUGE_ENTRY_TYPE, 140, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, {0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0}, 0, 0, 0, -1, FALSE},
- { HUGE_ENTRY_TYPE, 141, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, {0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0}, 0, 0, 0, -1, FALSE},
- { HUGE_ENTRY_TYPE, 142, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, {0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0}, 0, 0, 0, -1, FALSE},
- { HUGE_ENTRY_TYPE, 143, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, {0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0}, 0, 0, 0, -1, FALSE},
- { HUGE_ENTRY_TYPE, 144, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, {0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0}, 0, 0, 0, -1, FALSE},
- { HUGE_ENTRY_TYPE, 145, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, {0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0}, 0, 0, 0, -1, FALSE},
- { HUGE_ENTRY_TYPE, 146, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, {0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0}, 0, 0, 0, -1, FALSE},
- { HUGE_ENTRY_TYPE, 147, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, {0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0}, 0, 0, 0, -1, FALSE},
- { HUGE_ENTRY_TYPE, 148, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, {0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0}, 0, 0, 0, -1, FALSE},
- { HUGE_ENTRY_TYPE, 149, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, {0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0}, 0, 0, 0, -1, FALSE}
- };
- /* clang-format on */
+ expected = HDmalloc(150 * sizeof(struct expected_entry_status));
+ if (expected == NULL) {
- pass = TRUE;
+ pass = FALSE;
+ failure_mssg = "couldn't allocate expected entry status array\n";
+ }
+
+ if (expected) {
+ /* Set up the expected array. This is used to maintain a table of the
+ * expected status of every entry used in this test.
+ */
+ for (i = 0; i < 150; i++) {
+ expected[i].entry_type = HUGE_ENTRY_TYPE;
+ expected[i].entry_index = (int)i;
+ expected[i].size = HUGE_ENTRY_SIZE;
+ expected[i].in_cache = FALSE;
+ expected[i].at_main_addr = TRUE;
+ expected[i].is_dirty = FALSE;
+ expected[i].is_protected = FALSE;
+ expected[i].is_pinned = FALSE;
+ expected[i].deserialized = FALSE;
+ expected[i].serialized = FALSE;
+ expected[i].destroyed = FALSE;
+
+ HDmemset(expected[i].flush_dep_par_type, 0, sizeof(expected[i].flush_dep_par_type));
+ HDmemset(expected[i].flush_dep_par_idx, 0, sizeof(expected[i].flush_dep_par_idx));
+
+ expected[i].flush_dep_npar = 0;
+ expected[i].flush_dep_nchd = 0;
+ expected[i].flush_dep_ndirty_chd = 0;
+ expected[i].flush_order = -1;
+ expected[i].is_corked = FALSE;
+ }
+
+ pass = TRUE;
+ }
reset_entries();
@@ -27671,6 +26423,8 @@ check_metadata_blizzard_absence(hbool_t fill_via_insertion, unsigned paged)
if (show_progress) /* 12 */
HDfprintf(stdout, "%s: check point %d -- pass %d\n", FUNC, checkpoint++, pass);
+ HDfree(expected);
+
if (pass) {
PASSED();
}
@@ -32842,183 +31596,58 @@ done:
static unsigned
check_metadata_cork(hbool_t fill_via_insertion, unsigned paged)
{
- const char *fcn_name = "check_metadata_cork";
- int entry_type = HUGE_ENTRY_TYPE;
- size_t entry_size = HUGE_ENTRY_SIZE; /* 16 KB */
- H5F_t * file_ptr = NULL;
- H5C_t * cache_ptr = NULL;
- hbool_t show_progress = FALSE;
- int32_t checkpoint = 0;
- int32_t entry_idx = 0;
- int32_t i;
+ struct expected_entry_status *expected = NULL;
+ const char * fcn_name = "check_metadata_cork";
+ int entry_type = HUGE_ENTRY_TYPE;
+ size_t entry_size = HUGE_ENTRY_SIZE; /* 16 KB */
+ H5F_t * file_ptr = NULL;
+ H5C_t * cache_ptr = NULL;
+ hbool_t show_progress = FALSE;
+ int32_t checkpoint = 0;
+ int32_t entry_idx = 0;
+ int32_t i;
/* Expected deserialized status of entries depends on how they get into
* the cache. Insertions = not deserialized, protect/unprotect = deserialized.
*/
hbool_t deserialized = (hbool_t) !(fill_via_insertion);
- /* Set up the expected array. This is used to maintain a table of the
- * expected status of every entry used in this test.
- */
- /* clang-format off */
- struct expected_entry_status expected[150] =
- {
- /* entry entry in at main flush dep flush dep child flush flush flush */
- /* type: index: size: cache: addr: dirty: prot: pinned: dsrlzd: srlzd: dest: par type[]: par idx[]: dep npart: dep nchd: dep ndirty chd: order: corked: */
- { HUGE_ENTRY_TYPE, 0, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, {0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0}, 0, 0, 0, -1, FALSE},
- { HUGE_ENTRY_TYPE, 1, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, {0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0}, 0, 0, 0, -1, FALSE},
- { HUGE_ENTRY_TYPE, 2, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, {0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0}, 0, 0, 0, -1, FALSE},
- { HUGE_ENTRY_TYPE, 3, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, {0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0}, 0, 0, 0, -1, FALSE},
- { HUGE_ENTRY_TYPE, 4, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, {0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0}, 0, 0, 0, -1, FALSE},
- { HUGE_ENTRY_TYPE, 5, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, {0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0}, 0, 0, 0, -1, FALSE},
- { HUGE_ENTRY_TYPE, 6, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, {0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0}, 0, 0, 0, -1, FALSE},
- { HUGE_ENTRY_TYPE, 7, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, {0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0}, 0, 0, 0, -1, FALSE},
- { HUGE_ENTRY_TYPE, 8, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, {0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0}, 0, 0, 0, -1, FALSE},
- { HUGE_ENTRY_TYPE, 9, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, {0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0}, 0, 0, 0, -1, FALSE},
- { HUGE_ENTRY_TYPE, 10, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, {0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0}, 0, 0, 0, -1, FALSE},
- { HUGE_ENTRY_TYPE, 11, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, {0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0}, 0, 0, 0, -1, FALSE},
- { HUGE_ENTRY_TYPE, 12, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, {0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0}, 0, 0, 0, -1, FALSE},
- { HUGE_ENTRY_TYPE, 13, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, {0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0}, 0, 0, 0, -1, FALSE},
- { HUGE_ENTRY_TYPE, 14, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, {0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0}, 0, 0, 0, -1, FALSE},
- { HUGE_ENTRY_TYPE, 15, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, {0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0}, 0, 0, 0, -1, FALSE},
- { HUGE_ENTRY_TYPE, 16, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, {0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0}, 0, 0, 0, -1, FALSE},
- { HUGE_ENTRY_TYPE, 17, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, {0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0}, 0, 0, 0, -1, FALSE},
- { HUGE_ENTRY_TYPE, 18, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, {0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0}, 0, 0, 0, -1, FALSE},
- { HUGE_ENTRY_TYPE, 19, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, {0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0}, 0, 0, 0, -1, FALSE},
- { HUGE_ENTRY_TYPE, 20, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, {0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0}, 0, 0, 0, -1, FALSE},
- { HUGE_ENTRY_TYPE, 21, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, {0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0}, 0, 0, 0, -1, FALSE},
- { HUGE_ENTRY_TYPE, 22, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, {0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0}, 0, 0, 0, -1, FALSE},
- { HUGE_ENTRY_TYPE, 23, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, {0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0}, 0, 0, 0, -1, FALSE},
- { HUGE_ENTRY_TYPE, 24, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, {0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0}, 0, 0, 0, -1, FALSE},
- { HUGE_ENTRY_TYPE, 25, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, {0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0}, 0, 0, 0, -1, FALSE},
- { HUGE_ENTRY_TYPE, 26, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, {0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0}, 0, 0, 0, -1, FALSE},
- { HUGE_ENTRY_TYPE, 27, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, {0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0}, 0, 0, 0, -1, FALSE},
- { HUGE_ENTRY_TYPE, 28, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, {0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0}, 0, 0, 0, -1, FALSE},
- { HUGE_ENTRY_TYPE, 29, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, {0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0}, 0, 0, 0, -1, FALSE},
- { HUGE_ENTRY_TYPE, 30, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, {0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0}, 0, 0, 0, -1, FALSE},
- { HUGE_ENTRY_TYPE, 31, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, {0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0}, 0, 0, 0, -1, FALSE},
- { HUGE_ENTRY_TYPE, 32, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, {0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0}, 0, 0, 0, -1, FALSE},
- { HUGE_ENTRY_TYPE, 33, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, {0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0}, 0, 0, 0, -1, FALSE},
- { HUGE_ENTRY_TYPE, 34, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, {0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0}, 0, 0, 0, -1, FALSE},
- { HUGE_ENTRY_TYPE, 35, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, {0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0}, 0, 0, 0, -1, FALSE},
- { HUGE_ENTRY_TYPE, 36, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, {0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0}, 0, 0, 0, -1, FALSE},
- { HUGE_ENTRY_TYPE, 37, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, {0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0}, 0, 0, 0, -1, FALSE},
- { HUGE_ENTRY_TYPE, 38, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, {0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0}, 0, 0, 0, -1, FALSE},
- { HUGE_ENTRY_TYPE, 39, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, {0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0}, 0, 0, 0, -1, FALSE},
- { HUGE_ENTRY_TYPE, 40, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, {0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0}, 0, 0, 0, -1, FALSE},
- { HUGE_ENTRY_TYPE, 41, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, {0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0}, 0, 0, 0, -1, FALSE},
- { HUGE_ENTRY_TYPE, 42, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, {0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0}, 0, 0, 0, -1, FALSE},
- { HUGE_ENTRY_TYPE, 43, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, {0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0}, 0, 0, 0, -1, FALSE},
- { HUGE_ENTRY_TYPE, 44, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, {0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0}, 0, 0, 0, -1, FALSE},
- { HUGE_ENTRY_TYPE, 45, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, {0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0}, 0, 0, 0, -1, FALSE},
- { HUGE_ENTRY_TYPE, 46, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, {0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0}, 0, 0, 0, -1, FALSE},
- { HUGE_ENTRY_TYPE, 47, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, {0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0}, 0, 0, 0, -1, FALSE},
- { HUGE_ENTRY_TYPE, 48, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, {0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0}, 0, 0, 0, -1, FALSE},
- { HUGE_ENTRY_TYPE, 49, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, {0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0}, 0, 0, 0, -1, FALSE},
- { HUGE_ENTRY_TYPE, 50, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, {0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0}, 0, 0, 0, -1, FALSE},
- { HUGE_ENTRY_TYPE, 51, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, {0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0}, 0, 0, 0, -1, FALSE},
- { HUGE_ENTRY_TYPE, 52, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, {0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0}, 0, 0, 0, -1, FALSE},
- { HUGE_ENTRY_TYPE, 53, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, {0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0}, 0, 0, 0, -1, FALSE},
- { HUGE_ENTRY_TYPE, 54, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, {0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0}, 0, 0, 0, -1, FALSE},
- { HUGE_ENTRY_TYPE, 55, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, {0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0}, 0, 0, 0, -1, FALSE},
- { HUGE_ENTRY_TYPE, 56, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, {0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0}, 0, 0, 0, -1, FALSE},
- { HUGE_ENTRY_TYPE, 57, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, {0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0}, 0, 0, 0, -1, FALSE},
- { HUGE_ENTRY_TYPE, 58, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, {0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0}, 0, 0, 0, -1, FALSE},
- { HUGE_ENTRY_TYPE, 59, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, {0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0}, 0, 0, 0, -1, FALSE},
- { HUGE_ENTRY_TYPE, 60, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, {0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0}, 0, 0, 0, -1, FALSE},
- { HUGE_ENTRY_TYPE, 61, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, {0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0}, 0, 0, 0, -1, FALSE},
- { HUGE_ENTRY_TYPE, 62, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, {0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0}, 0, 0, 0, -1, FALSE},
- { HUGE_ENTRY_TYPE, 63, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, {0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0}, 0, 0, 0, -1, FALSE},
- { HUGE_ENTRY_TYPE, 64, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, {0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0}, 0, 0, 0, -1, FALSE},
- { HUGE_ENTRY_TYPE, 65, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, {0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0}, 0, 0, 0, -1, FALSE},
- { HUGE_ENTRY_TYPE, 66, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, {0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0}, 0, 0, 0, -1, FALSE},
- { HUGE_ENTRY_TYPE, 67, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, {0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0}, 0, 0, 0, -1, FALSE},
- { HUGE_ENTRY_TYPE, 68, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, {0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0}, 0, 0, 0, -1, FALSE},
- { HUGE_ENTRY_TYPE, 69, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, {0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0}, 0, 0, 0, -1, FALSE},
- { HUGE_ENTRY_TYPE, 70, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, {0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0}, 0, 0, 0, -1, FALSE},
- { HUGE_ENTRY_TYPE, 71, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, {0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0}, 0, 0, 0, -1, FALSE},
- { HUGE_ENTRY_TYPE, 72, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, {0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0}, 0, 0, 0, -1, FALSE},
- { HUGE_ENTRY_TYPE, 73, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, {0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0}, 0, 0, 0, -1, FALSE},
- { HUGE_ENTRY_TYPE, 74, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, {0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0}, 0, 0, 0, -1, FALSE},
- { HUGE_ENTRY_TYPE, 75, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, {0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0}, 0, 0, 0, -1, FALSE},
- { HUGE_ENTRY_TYPE, 76, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, {0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0}, 0, 0, 0, -1, FALSE},
- { HUGE_ENTRY_TYPE, 77, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, {0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0}, 0, 0, 0, -1, FALSE},
- { HUGE_ENTRY_TYPE, 78, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, {0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0}, 0, 0, 0, -1, FALSE},
- { HUGE_ENTRY_TYPE, 79, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, {0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0}, 0, 0, 0, -1, FALSE},
- { HUGE_ENTRY_TYPE, 80, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, {0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0}, 0, 0, 0, -1, FALSE},
- { HUGE_ENTRY_TYPE, 81, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, {0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0}, 0, 0, 0, -1, FALSE},
- { HUGE_ENTRY_TYPE, 82, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, {0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0}, 0, 0, 0, -1, FALSE},
- { HUGE_ENTRY_TYPE, 83, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, {0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0}, 0, 0, 0, -1, FALSE},
- { HUGE_ENTRY_TYPE, 84, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, {0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0}, 0, 0, 0, -1, FALSE},
- { HUGE_ENTRY_TYPE, 85, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, {0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0}, 0, 0, 0, -1, FALSE},
- { HUGE_ENTRY_TYPE, 86, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, {0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0}, 0, 0, 0, -1, FALSE},
- { HUGE_ENTRY_TYPE, 87, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, {0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0}, 0, 0, 0, -1, FALSE},
- { HUGE_ENTRY_TYPE, 88, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, {0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0}, 0, 0, 0, -1, FALSE},
- { HUGE_ENTRY_TYPE, 89, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, {0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0}, 0, 0, 0, -1, FALSE},
- { HUGE_ENTRY_TYPE, 90, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, {0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0}, 0, 0, 0, -1, FALSE},
- { HUGE_ENTRY_TYPE, 91, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, {0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0}, 0, 0, 0, -1, FALSE},
- { HUGE_ENTRY_TYPE, 92, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, {0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0}, 0, 0, 0, -1, FALSE},
- { HUGE_ENTRY_TYPE, 93, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, {0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0}, 0, 0, 0, -1, FALSE},
- { HUGE_ENTRY_TYPE, 94, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, {0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0}, 0, 0, 0, -1, FALSE},
- { HUGE_ENTRY_TYPE, 95, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, {0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0}, 0, 0, 0, -1, FALSE},
- { HUGE_ENTRY_TYPE, 96, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, {0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0}, 0, 0, 0, -1, FALSE},
- { HUGE_ENTRY_TYPE, 97, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, {0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0}, 0, 0, 0, -1, FALSE},
- { HUGE_ENTRY_TYPE, 98, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, {0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0}, 0, 0, 0, -1, FALSE},
- { HUGE_ENTRY_TYPE, 99, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, {0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0}, 0, 0, 0, -1, FALSE},
- { HUGE_ENTRY_TYPE, 100, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, {0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0}, 0, 0, 0, -1, FALSE},
- { HUGE_ENTRY_TYPE, 101, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, {0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0}, 0, 0, 0, -1, FALSE},
- { HUGE_ENTRY_TYPE, 102, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, {0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0}, 0, 0, 0, -1, FALSE},
- { HUGE_ENTRY_TYPE, 103, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, {0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0}, 0, 0, 0, -1, FALSE},
- { HUGE_ENTRY_TYPE, 104, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, {0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0}, 0, 0, 0, -1, FALSE},
- { HUGE_ENTRY_TYPE, 105, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, {0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0}, 0, 0, 0, -1, FALSE},
- { HUGE_ENTRY_TYPE, 106, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, {0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0}, 0, 0, 0, -1, FALSE},
- { HUGE_ENTRY_TYPE, 107, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, {0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0}, 0, 0, 0, -1, FALSE},
- { HUGE_ENTRY_TYPE, 108, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, {0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0}, 0, 0, 0, -1, FALSE},
- { HUGE_ENTRY_TYPE, 109, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, {0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0}, 0, 0, 0, -1, FALSE},
- { HUGE_ENTRY_TYPE, 110, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, {0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0}, 0, 0, 0, -1, FALSE},
- { HUGE_ENTRY_TYPE, 111, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, {0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0}, 0, 0, 0, -1, FALSE},
- { HUGE_ENTRY_TYPE, 112, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, {0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0}, 0, 0, 0, -1, FALSE},
- { HUGE_ENTRY_TYPE, 113, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, {0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0}, 0, 0, 0, -1, FALSE},
- { HUGE_ENTRY_TYPE, 114, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, {0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0}, 0, 0, 0, -1, FALSE},
- { HUGE_ENTRY_TYPE, 115, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, {0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0}, 0, 0, 0, -1, FALSE},
- { HUGE_ENTRY_TYPE, 116, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, {0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0}, 0, 0, 0, -1, FALSE},
- { HUGE_ENTRY_TYPE, 117, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, {0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0}, 0, 0, 0, -1, FALSE},
- { HUGE_ENTRY_TYPE, 118, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, {0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0}, 0, 0, 0, -1, FALSE},
- { HUGE_ENTRY_TYPE, 119, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, {0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0}, 0, 0, 0, -1, FALSE},
- { HUGE_ENTRY_TYPE, 120, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, {0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0}, 0, 0, 0, -1, FALSE},
- { HUGE_ENTRY_TYPE, 121, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, {0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0}, 0, 0, 0, -1, FALSE},
- { HUGE_ENTRY_TYPE, 122, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, {0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0}, 0, 0, 0, -1, FALSE},
- { HUGE_ENTRY_TYPE, 123, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, {0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0}, 0, 0, 0, -1, FALSE},
- { HUGE_ENTRY_TYPE, 124, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, {0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0}, 0, 0, 0, -1, FALSE},
- { HUGE_ENTRY_TYPE, 125, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, {0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0}, 0, 0, 0, -1, FALSE},
- { HUGE_ENTRY_TYPE, 126, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, {0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0}, 0, 0, 0, -1, FALSE},
- { HUGE_ENTRY_TYPE, 127, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, {0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0}, 0, 0, 0, -1, FALSE},
- { HUGE_ENTRY_TYPE, 128, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, {0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0}, 0, 0, 0, -1, FALSE},
- { HUGE_ENTRY_TYPE, 129, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, {0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0}, 0, 0, 0, -1, FALSE},
- { HUGE_ENTRY_TYPE, 130, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, {0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0}, 0, 0, 0, -1, FALSE},
- { HUGE_ENTRY_TYPE, 131, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, {0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0}, 0, 0, 0, -1, FALSE},
- { HUGE_ENTRY_TYPE, 132, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, {0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0}, 0, 0, 0, -1, FALSE},
- { HUGE_ENTRY_TYPE, 133, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, {0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0}, 0, 0, 0, -1, FALSE},
- { HUGE_ENTRY_TYPE, 134, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, {0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0}, 0, 0, 0, -1, FALSE},
- { HUGE_ENTRY_TYPE, 135, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, {0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0}, 0, 0, 0, -1, FALSE},
- { HUGE_ENTRY_TYPE, 136, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, {0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0}, 0, 0, 0, -1, FALSE},
- { HUGE_ENTRY_TYPE, 137, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, {0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0}, 0, 0, 0, -1, FALSE},
- { HUGE_ENTRY_TYPE, 138, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, {0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0}, 0, 0, 0, -1, FALSE},
- { HUGE_ENTRY_TYPE, 139, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, {0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0}, 0, 0, 0, -1, FALSE},
- { HUGE_ENTRY_TYPE, 140, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, {0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0}, 0, 0, 0, -1, FALSE},
- { HUGE_ENTRY_TYPE, 141, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, {0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0}, 0, 0, 0, -1, FALSE},
- { HUGE_ENTRY_TYPE, 142, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, {0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0}, 0, 0, 0, -1, FALSE},
- { HUGE_ENTRY_TYPE, 143, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, {0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0}, 0, 0, 0, -1, FALSE},
- { HUGE_ENTRY_TYPE, 144, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, {0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0}, 0, 0, 0, -1, FALSE},
- { HUGE_ENTRY_TYPE, 145, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, {0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0}, 0, 0, 0, -1, FALSE},
- { HUGE_ENTRY_TYPE, 146, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, {0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0}, 0, 0, 0, -1, FALSE},
- { HUGE_ENTRY_TYPE, 147, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, {0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0}, 0, 0, 0, -1, FALSE},
- { HUGE_ENTRY_TYPE, 148, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, {0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0}, 0, 0, 0, -1, FALSE},
- { HUGE_ENTRY_TYPE, 149, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, {0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0}, 0, 0, 0, -1, FALSE}
- } ;
- /* clang-format on */
+ expected = HDmalloc(150 * sizeof(struct expected_entry_status));
+ if (expected == NULL) {
- pass = TRUE;
+ pass = FALSE;
+ failure_mssg = "couldn't allocate expected entry status array\n";
+ }
+
+ if (expected) {
+ /* Set up the expected array. This is used to maintain a table of the
+ * expected status of every entry used in this test.
+ */
+ for (i = 0; i < 150; i++) {
+ expected[i].entry_type = HUGE_ENTRY_TYPE;
+ expected[i].entry_index = (int)i;
+ expected[i].size = HUGE_ENTRY_SIZE;
+ expected[i].in_cache = FALSE;
+ expected[i].at_main_addr = TRUE;
+ expected[i].is_dirty = FALSE;
+ expected[i].is_protected = FALSE;
+ expected[i].is_pinned = FALSE;
+ expected[i].deserialized = FALSE;
+ expected[i].serialized = FALSE;
+ expected[i].destroyed = FALSE;
+
+ HDmemset(expected[i].flush_dep_par_type, 0, sizeof(expected[i].flush_dep_par_type));
+ HDmemset(expected[i].flush_dep_par_idx, 0, sizeof(expected[i].flush_dep_par_idx));
+
+ expected[i].flush_dep_npar = 0;
+ expected[i].flush_dep_nchd = 0;
+ expected[i].flush_dep_ndirty_chd = 0;
+ expected[i].flush_order = -1;
+ expected[i].is_corked = FALSE;
+ }
+
+ pass = TRUE;
+ }
reset_entries();
@@ -33527,6 +32156,8 @@ check_metadata_cork(hbool_t fill_via_insertion, unsigned paged)
if (show_progress) /* 13 */
HDfprintf(stdout, "%s: check point %d -- pass %d\n", fcn_name, checkpoint++, pass);
+ HDfree(expected);
+
if (pass) {
PASSED();
}
@@ -33673,24 +32304,50 @@ check_entry_deletions_during_scans(unsigned paged)
static void
cedds__expunge_dirty_entry_in_flush_test(H5F_t *file_ptr)
{
- H5C_t *cache_ptr = file_ptr->shared->cache;
- int i;
- /* clang-format off */
- struct expected_entry_status expected[36] =
- {
- /* the expected array is used to maintain a table of the expected status of every
- * entry used in this test. Note that since the function that processes this
- * array only processes as much of it as it is told to, we don't have to
- * worry about maintaining the status of entries that we haven't used yet.
- */
- /* entry entry in at main flush dep flush dep child flush flush flush */
- /* type: index: size: cache: addr: dirty: prot: pinned: dsrlzd: srlzd: dest: par type[]: par idx[]: dep npart: dep nchd: dep ndirty chd: order: corked: */
- { HUGE_ENTRY_TYPE, 0, HUGE_ENTRY_SIZE, TRUE, TRUE, TRUE, FALSE, FALSE, TRUE, FALSE, FALSE, {-1,-1,-1,-1,-1,-1,-1,-1}, {-1,-1,-1,-1,-1,-1,-1,-1}, 0, 0, 0, -1, FALSE},
- { HUGE_ENTRY_TYPE, 1, HUGE_ENTRY_SIZE, TRUE, TRUE, TRUE, FALSE, FALSE, TRUE, FALSE, FALSE, {-1,-1,-1,-1,-1,-1,-1,-1}, {-1,-1,-1,-1,-1,-1,-1,-1}, 0, 0, 0, -1, FALSE},
- { HUGE_ENTRY_TYPE, 2, HUGE_ENTRY_SIZE, TRUE, TRUE, TRUE, FALSE, FALSE, TRUE, FALSE, FALSE, {-1,-1,-1,-1,-1,-1,-1,-1}, {-1,-1,-1,-1,-1,-1,-1,-1}, 0, 0, 0, -1, FALSE},
- { HUGE_ENTRY_TYPE, 3, HUGE_ENTRY_SIZE, TRUE, TRUE, TRUE, FALSE, FALSE, TRUE, FALSE, FALSE, {-1,-1,-1,-1,-1,-1,-1,-1}, {-1,-1,-1,-1,-1,-1,-1,-1}, 0, 0, 0, -1, FALSE}
- };
- /* clang-format on */
+ struct expected_entry_status *expected = NULL;
+ H5C_t * cache_ptr = file_ptr->shared->cache;
+ int i;
+
+ expected = HDmalloc(36 * sizeof(struct expected_entry_status));
+ if (expected == NULL) {
+
+ pass = FALSE;
+ failure_mssg = "couldn't allocate expected entry status array\n";
+ }
+
+ if (expected) {
+ /* the expected array is used to maintain a table of the expected status of every
+ * entry used in this test. Note that since the function that processes this
+ * array only processes as much of it as it is told to, we don't have to
+ * worry about maintaining the status of entries that we haven't used yet.
+ */
+ for (i = 0; i < 36; i++) {
+ expected[i].entry_type = HUGE_ENTRY_TYPE;
+ expected[i].entry_index = (int)i;
+ expected[i].size = HUGE_ENTRY_SIZE;
+ expected[i].in_cache = TRUE;
+ expected[i].at_main_addr = TRUE;
+ expected[i].is_dirty = TRUE;
+ expected[i].is_protected = FALSE;
+ expected[i].is_pinned = FALSE;
+ expected[i].deserialized = TRUE;
+ expected[i].serialized = FALSE;
+ expected[i].destroyed = FALSE;
+
+ for (size_t j = 0; j < MAX_FLUSH_DEP_PARS; j++) {
+ expected[i].flush_dep_par_type[j] = -1;
+ expected[i].flush_dep_par_idx[j] = -1;
+ }
+
+ expected[i].flush_dep_npar = 0;
+ expected[i].flush_dep_nchd = 0;
+ expected[i].flush_dep_ndirty_chd = 0;
+ expected[i].flush_order = -1;
+ expected[i].is_corked = FALSE;
+ }
+
+ pass = TRUE;
+ }
if (pass) {
@@ -33845,6 +32502,8 @@ cedds__expunge_dirty_entry_in_flush_test(H5F_t *file_ptr)
/* reset cache min clean size to its expected value */
cache_ptr->min_clean_size = (1 * 1024 * 1024);
+ HDfree(expected);
+
} /* cedds__expunge_dirty_entry_in_flush_test() */
/*-------------------------------------------------------------------------
@@ -33885,58 +32544,60 @@ cedds__expunge_dirty_entry_in_flush_test(H5F_t *file_ptr)
static void
cedds__H5C_make_space_in_cache(H5F_t *file_ptr)
{
- H5C_t * cache_ptr = file_ptr->shared->cache;
- int i;
- const int num_huge_entries = 4;
- const int num_monster_entries = 32;
- /* clang-format off */
- struct expected_entry_status expected[36] =
- {
- /* the expected array is used to maintain a table of the expected status of every
- * entry used in this test. Note that since the function that processes this
- * array only processes as much of it as it is told to, we don't have to
- * worry about maintaining the status of entries that we haven't used yet.
- */
- /* entry entry in at main flush dep flush dep child flush flush flush */
- /* type: index: size: cache: addr: dirty: prot: pinned: dsrlzd: srlzd: dest: par type[]: par idx[]: dep npart: dep nchd: dep ndirty chd: order: corked: */
- { HUGE_ENTRY_TYPE, 0, HUGE_ENTRY_SIZE, TRUE, TRUE, TRUE, FALSE, FALSE, TRUE, FALSE, FALSE, {-1,-1,-1,-1,-1,-1,-1,-1}, {-1,-1,-1,-1,-1,-1,-1,-1}, 0, 0, 0, -1, FALSE},
- { HUGE_ENTRY_TYPE, 1, HUGE_ENTRY_SIZE, TRUE, TRUE, TRUE, FALSE, FALSE, TRUE, FALSE, FALSE, {-1,-1,-1,-1,-1,-1,-1,-1}, {-1,-1,-1,-1,-1,-1,-1,-1}, 0, 0, 0, -1, FALSE},
- { HUGE_ENTRY_TYPE, 2, HUGE_ENTRY_SIZE, TRUE, TRUE, TRUE, FALSE, FALSE, TRUE, FALSE, FALSE, {-1,-1,-1,-1,-1,-1,-1,-1}, {-1,-1,-1,-1,-1,-1,-1,-1}, 0, 0, 0, -1, FALSE},
- { HUGE_ENTRY_TYPE, 3, HUGE_ENTRY_SIZE, TRUE, TRUE, TRUE, FALSE, FALSE, TRUE, FALSE, FALSE, {-1,-1,-1,-1,-1,-1,-1,-1}, {-1,-1,-1,-1,-1,-1,-1,-1}, 0, 0, 0, -1, FALSE},
- { MONSTER_ENTRY_TYPE, 0, MONSTER_ENTRY_SIZE, TRUE, TRUE, TRUE, FALSE, FALSE, TRUE, FALSE, FALSE, {-1,-1,-1,-1,-1,-1,-1,-1}, {-1,-1,-1,-1,-1,-1,-1,-1}, 0, 0, 0, -1, FALSE},
- { MONSTER_ENTRY_TYPE, 1, MONSTER_ENTRY_SIZE, TRUE, TRUE, TRUE, FALSE, FALSE, TRUE, FALSE, FALSE, {-1,-1,-1,-1,-1,-1,-1,-1}, {-1,-1,-1,-1,-1,-1,-1,-1}, 0, 0, 0, -1, FALSE},
- { MONSTER_ENTRY_TYPE, 2, MONSTER_ENTRY_SIZE, TRUE, TRUE, TRUE, FALSE, FALSE, TRUE, FALSE, FALSE, {-1,-1,-1,-1,-1,-1,-1,-1}, {-1,-1,-1,-1,-1,-1,-1,-1}, 0, 0, 0, -1, FALSE},
- { MONSTER_ENTRY_TYPE, 3, MONSTER_ENTRY_SIZE, TRUE, TRUE, TRUE, FALSE, FALSE, TRUE, FALSE, FALSE, {-1,-1,-1,-1,-1,-1,-1,-1}, {-1,-1,-1,-1,-1,-1,-1,-1}, 0, 0, 0, -1, FALSE},
- { MONSTER_ENTRY_TYPE, 4, MONSTER_ENTRY_SIZE, TRUE, TRUE, TRUE, FALSE, FALSE, TRUE, FALSE, FALSE, {-1,-1,-1,-1,-1,-1,-1,-1}, {-1,-1,-1,-1,-1,-1,-1,-1}, 0, 0, 0, -1, FALSE},
- { MONSTER_ENTRY_TYPE, 5, MONSTER_ENTRY_SIZE, TRUE, TRUE, TRUE, FALSE, FALSE, TRUE, FALSE, FALSE, {-1,-1,-1,-1,-1,-1,-1,-1}, {-1,-1,-1,-1,-1,-1,-1,-1}, 0, 0, 0, -1, FALSE},
- { MONSTER_ENTRY_TYPE, 6, MONSTER_ENTRY_SIZE, TRUE, TRUE, TRUE, FALSE, FALSE, TRUE, FALSE, FALSE, {-1,-1,-1,-1,-1,-1,-1,-1}, {-1,-1,-1,-1,-1,-1,-1,-1}, 0, 0, 0, -1, FALSE},
- { MONSTER_ENTRY_TYPE, 7, MONSTER_ENTRY_SIZE, TRUE, TRUE, TRUE, FALSE, FALSE, TRUE, FALSE, FALSE, {-1,-1,-1,-1,-1,-1,-1,-1}, {-1,-1,-1,-1,-1,-1,-1,-1}, 0, 0, 0, -1, FALSE},
- { MONSTER_ENTRY_TYPE, 8, MONSTER_ENTRY_SIZE, TRUE, TRUE, TRUE, FALSE, FALSE, TRUE, FALSE, FALSE, {-1,-1,-1,-1,-1,-1,-1,-1}, {-1,-1,-1,-1,-1,-1,-1,-1}, 0, 0, 0, -1, FALSE},
- { MONSTER_ENTRY_TYPE, 9, MONSTER_ENTRY_SIZE, TRUE, TRUE, TRUE, FALSE, FALSE, TRUE, FALSE, FALSE, {-1,-1,-1,-1,-1,-1,-1,-1}, {-1,-1,-1,-1,-1,-1,-1,-1}, 0, 0, 0, -1, FALSE},
- { MONSTER_ENTRY_TYPE, 10, MONSTER_ENTRY_SIZE, TRUE, TRUE, TRUE, FALSE, FALSE, TRUE, FALSE, FALSE, {-1,-1,-1,-1,-1,-1,-1,-1}, {-1,-1,-1,-1,-1,-1,-1,-1}, 0, 0, 0, -1, FALSE},
- { MONSTER_ENTRY_TYPE, 11, MONSTER_ENTRY_SIZE, TRUE, TRUE, TRUE, FALSE, FALSE, TRUE, FALSE, FALSE, {-1,-1,-1,-1,-1,-1,-1,-1}, {-1,-1,-1,-1,-1,-1,-1,-1}, 0, 0, 0, -1, FALSE},
- { MONSTER_ENTRY_TYPE, 12, MONSTER_ENTRY_SIZE, TRUE, TRUE, TRUE, FALSE, FALSE, TRUE, FALSE, FALSE, {-1,-1,-1,-1,-1,-1,-1,-1}, {-1,-1,-1,-1,-1,-1,-1,-1}, 0, 0, 0, -1, FALSE},
- { MONSTER_ENTRY_TYPE, 13, MONSTER_ENTRY_SIZE, TRUE, TRUE, TRUE, FALSE, FALSE, TRUE, FALSE, FALSE, {-1,-1,-1,-1,-1,-1,-1,-1}, {-1,-1,-1,-1,-1,-1,-1,-1}, 0, 0, 0, -1, FALSE},
- { MONSTER_ENTRY_TYPE, 14, MONSTER_ENTRY_SIZE, TRUE, TRUE, TRUE, FALSE, FALSE, TRUE, FALSE, FALSE, {-1,-1,-1,-1,-1,-1,-1,-1}, {-1,-1,-1,-1,-1,-1,-1,-1}, 0, 0, 0, -1, FALSE},
- { MONSTER_ENTRY_TYPE, 15, MONSTER_ENTRY_SIZE, TRUE, TRUE, TRUE, FALSE, FALSE, TRUE, FALSE, FALSE, {-1,-1,-1,-1,-1,-1,-1,-1}, {-1,-1,-1,-1,-1,-1,-1,-1}, 0, 0, 0, -1, FALSE},
- { MONSTER_ENTRY_TYPE, 16, MONSTER_ENTRY_SIZE, TRUE, TRUE, TRUE, FALSE, FALSE, TRUE, FALSE, FALSE, {-1,-1,-1,-1,-1,-1,-1,-1}, {-1,-1,-1,-1,-1,-1,-1,-1}, 0, 0, 0, -1, FALSE},
- { MONSTER_ENTRY_TYPE, 17, MONSTER_ENTRY_SIZE, TRUE, TRUE, TRUE, FALSE, FALSE, TRUE, FALSE, FALSE, {-1,-1,-1,-1,-1,-1,-1,-1}, {-1,-1,-1,-1,-1,-1,-1,-1}, 0, 0, 0, -1, FALSE},
- { MONSTER_ENTRY_TYPE, 18, MONSTER_ENTRY_SIZE, TRUE, TRUE, TRUE, FALSE, FALSE, TRUE, FALSE, FALSE, {-1,-1,-1,-1,-1,-1,-1,-1}, {-1,-1,-1,-1,-1,-1,-1,-1}, 0, 0, 0, -1, FALSE},
- { MONSTER_ENTRY_TYPE, 19, MONSTER_ENTRY_SIZE, TRUE, TRUE, TRUE, FALSE, FALSE, TRUE, FALSE, FALSE, {-1,-1,-1,-1,-1,-1,-1,-1}, {-1,-1,-1,-1,-1,-1,-1,-1}, 0, 0, 0, -1, FALSE},
- { MONSTER_ENTRY_TYPE, 20, MONSTER_ENTRY_SIZE, TRUE, TRUE, TRUE, FALSE, FALSE, TRUE, FALSE, FALSE, {-1,-1,-1,-1,-1,-1,-1,-1}, {-1,-1,-1,-1,-1,-1,-1,-1}, 0, 0, 0, -1, FALSE},
- { MONSTER_ENTRY_TYPE, 21, MONSTER_ENTRY_SIZE, TRUE, TRUE, TRUE, FALSE, FALSE, TRUE, FALSE, FALSE, {-1,-1,-1,-1,-1,-1,-1,-1}, {-1,-1,-1,-1,-1,-1,-1,-1}, 0, 0, 0, -1, FALSE},
- { MONSTER_ENTRY_TYPE, 22, MONSTER_ENTRY_SIZE, TRUE, TRUE, TRUE, FALSE, FALSE, TRUE, FALSE, FALSE, {-1,-1,-1,-1,-1,-1,-1,-1}, {-1,-1,-1,-1,-1,-1,-1,-1}, 0, 0, 0, -1, FALSE},
- { MONSTER_ENTRY_TYPE, 23, MONSTER_ENTRY_SIZE, TRUE, TRUE, TRUE, FALSE, FALSE, TRUE, FALSE, FALSE, {-1,-1,-1,-1,-1,-1,-1,-1}, {-1,-1,-1,-1,-1,-1,-1,-1}, 0, 0, 0, -1, FALSE},
- { MONSTER_ENTRY_TYPE, 24, MONSTER_ENTRY_SIZE, TRUE, TRUE, TRUE, FALSE, FALSE, TRUE, FALSE, FALSE, {-1,-1,-1,-1,-1,-1,-1,-1}, {-1,-1,-1,-1,-1,-1,-1,-1}, 0, 0, 0, -1, FALSE},
- { MONSTER_ENTRY_TYPE, 25, MONSTER_ENTRY_SIZE, TRUE, TRUE, TRUE, FALSE, FALSE, TRUE, FALSE, FALSE, {-1,-1,-1,-1,-1,-1,-1,-1}, {-1,-1,-1,-1,-1,-1,-1,-1}, 0, 0, 0, -1, FALSE},
- { MONSTER_ENTRY_TYPE, 26, MONSTER_ENTRY_SIZE, TRUE, TRUE, TRUE, FALSE, FALSE, TRUE, FALSE, FALSE, {-1,-1,-1,-1,-1,-1,-1,-1}, {-1,-1,-1,-1,-1,-1,-1,-1}, 0, 0, 0, -1, FALSE},
- { MONSTER_ENTRY_TYPE, 27, MONSTER_ENTRY_SIZE, TRUE, TRUE, TRUE, FALSE, FALSE, TRUE, FALSE, FALSE, {-1,-1,-1,-1,-1,-1,-1,-1}, {-1,-1,-1,-1,-1,-1,-1,-1}, 0, 0, 0, -1, FALSE},
- { MONSTER_ENTRY_TYPE, 28, MONSTER_ENTRY_SIZE, TRUE, TRUE, TRUE, FALSE, FALSE, TRUE, FALSE, FALSE, {-1,-1,-1,-1,-1,-1,-1,-1}, {-1,-1,-1,-1,-1,-1,-1,-1}, 0, 0, 0, -1, FALSE},
- { MONSTER_ENTRY_TYPE, 29, MONSTER_ENTRY_SIZE, TRUE, TRUE, TRUE, FALSE, FALSE, TRUE, FALSE, FALSE, {-1,-1,-1,-1,-1,-1,-1,-1}, {-1,-1,-1,-1,-1,-1,-1,-1}, 0, 0, 0, -1, FALSE},
- { MONSTER_ENTRY_TYPE, 30, MONSTER_ENTRY_SIZE, TRUE, TRUE, TRUE, FALSE, FALSE, TRUE, FALSE, FALSE, {-1,-1,-1,-1,-1,-1,-1,-1}, {-1,-1,-1,-1,-1,-1,-1,-1}, 0, 0, 0, -1, FALSE},
- { MONSTER_ENTRY_TYPE, 31, MONSTER_ENTRY_SIZE, TRUE, TRUE, TRUE, FALSE, FALSE, TRUE, FALSE, FALSE, {-1,-1,-1,-1,-1,-1,-1,-1}, {-1,-1,-1,-1,-1,-1,-1,-1}, 0, 0, 0, -1, FALSE},
- };
- /* clang-format on */
+ struct expected_entry_status *expected = NULL;
+ H5C_t * cache_ptr = file_ptr->shared->cache;
+ int i;
+ const int num_huge_entries = 4;
+ const int num_monster_entries = 32;
+
+ expected = HDmalloc(36 * sizeof(struct expected_entry_status));
+ if (expected == NULL) {
+
+ pass = FALSE;
+ failure_mssg = "couldn't allocate expected entry status array\n";
+ }
+
+ if (expected) {
+ /* the expected array is used to maintain a table of the expected status of every
+ * entry used in this test. Note that since the function that processes this
+ * array only processes as much of it as it is told to, we don't have to
+ * worry about maintaining the status of entries that we haven't used yet.
+ */
+ for (i = 0; i < 36; i++) {
+ if (i < num_huge_entries) {
+ expected[i].entry_type = HUGE_ENTRY_TYPE;
+ expected[i].entry_index = (int)i;
+ expected[i].size = HUGE_ENTRY_SIZE;
+ }
+ else {
+ expected[i].entry_type = MONSTER_ENTRY_TYPE;
+ expected[i].entry_index = (int)(i - num_huge_entries);
+ expected[i].size = MONSTER_ENTRY_SIZE;
+ }
+
+ expected[i].in_cache = TRUE;
+ expected[i].at_main_addr = TRUE;
+ expected[i].is_dirty = TRUE;
+ expected[i].is_protected = FALSE;
+ expected[i].is_pinned = FALSE;
+ expected[i].deserialized = TRUE;
+ expected[i].serialized = FALSE;
+ expected[i].destroyed = FALSE;
+
+ for (size_t j = 0; j < MAX_FLUSH_DEP_PARS; j++) {
+ expected[i].flush_dep_par_type[j] = -1;
+ expected[i].flush_dep_par_idx[j] = -1;
+ }
+
+ expected[i].flush_dep_npar = 0;
+ expected[i].flush_dep_nchd = 0;
+ expected[i].flush_dep_ndirty_chd = 0;
+ expected[i].flush_order = -1;
+ expected[i].is_corked = FALSE;
+ }
+
+ pass = TRUE;
+ }
if (pass) {
@@ -34203,6 +32864,8 @@ cedds__H5C_make_space_in_cache(H5F_t *file_ptr)
/* reset cache min clean size to its expected value */
cache_ptr->min_clean_size = (1 * 1024 * 1024);
+ HDfree(expected);
+
} /* cedds__H5C_make_space_in_cache() */
/*-------------------------------------------------------------------------
@@ -34243,55 +32906,12 @@ cedds__H5C_make_space_in_cache(H5F_t *file_ptr)
static void
cedds__H5C__autoadjust__ageout__evict_aged_out_entries(H5F_t *file_ptr)
{
- H5C_t *cache_ptr = file_ptr->shared->cache;
- int i;
- herr_t result;
- /* clang-format off */
- struct expected_entry_status expected[36] =
- {
- /* the expected array is used to maintain a table of the expected status of every
- * entry used in this test. Note that since the function that processes this
- * array only processes as much of it as it is told to, we don't have to
- * worry about maintaining the status of entries that we haven't used yet.
- */
- /* entry entry in at main flush dep flush dep child flush flush flush */
- /* type: index: size: cache: addr: dirty: prot: pinned: dsrlzd: srlzd: dest: par type[]: par idx[]: dep npart: dep nchd: dep ndirty chd: order: corked: */
- { MONSTER_ENTRY_TYPE, 0, MONSTER_ENTRY_SIZE, TRUE, TRUE, TRUE, FALSE, FALSE, TRUE, FALSE, FALSE, {-1,-1,-1,-1,-1,-1,-1,-1}, {-1,-1,-1,-1,-1,-1,-1,-1}, 0, 0, 0, -1, FALSE},
- { MONSTER_ENTRY_TYPE, 1, MONSTER_ENTRY_SIZE, TRUE, TRUE, FALSE, FALSE, FALSE, TRUE, FALSE, FALSE, {-1,-1,-1,-1,-1,-1,-1,-1}, {-1,-1,-1,-1,-1,-1,-1,-1}, 0, 0, 0, -1, FALSE},
- { MONSTER_ENTRY_TYPE, 2, MONSTER_ENTRY_SIZE, TRUE, TRUE, FALSE, FALSE, FALSE, TRUE, FALSE, FALSE, {-1,-1,-1,-1,-1,-1,-1,-1}, {-1,-1,-1,-1,-1,-1,-1,-1}, 0, 0, 0, -1, FALSE},
- { MONSTER_ENTRY_TYPE, 3, MONSTER_ENTRY_SIZE, TRUE, TRUE, FALSE, FALSE, FALSE, TRUE, FALSE, FALSE, {-1,-1,-1,-1,-1,-1,-1,-1}, {-1,-1,-1,-1,-1,-1,-1,-1}, 0, 0, 0, -1, FALSE},
- { MONSTER_ENTRY_TYPE, 4, MONSTER_ENTRY_SIZE, TRUE, TRUE, FALSE, FALSE, FALSE, TRUE, FALSE, FALSE, {-1,-1,-1,-1,-1,-1,-1,-1}, {-1,-1,-1,-1,-1,-1,-1,-1}, 0, 0, 0, -1, FALSE},
- { MONSTER_ENTRY_TYPE, 5, MONSTER_ENTRY_SIZE, TRUE, TRUE, FALSE, FALSE, FALSE, TRUE, FALSE, FALSE, {-1,-1,-1,-1,-1,-1,-1,-1}, {-1,-1,-1,-1,-1,-1,-1,-1}, 0, 0, 0, -1, FALSE},
- { MONSTER_ENTRY_TYPE, 6, MONSTER_ENTRY_SIZE, TRUE, TRUE, FALSE, FALSE, FALSE, TRUE, FALSE, FALSE, {-1,-1,-1,-1,-1,-1,-1,-1}, {-1,-1,-1,-1,-1,-1,-1,-1}, 0, 0, 0, -1, FALSE},
- { MONSTER_ENTRY_TYPE, 7, MONSTER_ENTRY_SIZE, TRUE, TRUE, FALSE, FALSE, FALSE, TRUE, FALSE, FALSE, {-1,-1,-1,-1,-1,-1,-1,-1}, {-1,-1,-1,-1,-1,-1,-1,-1}, 0, 0, 0, -1, FALSE},
- { MONSTER_ENTRY_TYPE, 8, MONSTER_ENTRY_SIZE, TRUE, TRUE, FALSE, FALSE, FALSE, TRUE, FALSE, FALSE, {-1,-1,-1,-1,-1,-1,-1,-1}, {-1,-1,-1,-1,-1,-1,-1,-1}, 0, 0, 0, -1, FALSE},
- { MONSTER_ENTRY_TYPE, 9, MONSTER_ENTRY_SIZE, TRUE, TRUE, FALSE, FALSE, FALSE, TRUE, FALSE, FALSE, {-1,-1,-1,-1,-1,-1,-1,-1}, {-1,-1,-1,-1,-1,-1,-1,-1}, 0, 0, 0, -1, FALSE},
- { MONSTER_ENTRY_TYPE, 10, MONSTER_ENTRY_SIZE, TRUE, TRUE, FALSE, FALSE, FALSE, TRUE, FALSE, FALSE, {-1,-1,-1,-1,-1,-1,-1,-1}, {-1,-1,-1,-1,-1,-1,-1,-1}, 0, 0, 0, -1, FALSE},
- { MONSTER_ENTRY_TYPE, 11, MONSTER_ENTRY_SIZE, TRUE, TRUE, FALSE, FALSE, FALSE, TRUE, FALSE, FALSE, {-1,-1,-1,-1,-1,-1,-1,-1}, {-1,-1,-1,-1,-1,-1,-1,-1}, 0, 0, 0, -1, FALSE},
- { MONSTER_ENTRY_TYPE, 12, MONSTER_ENTRY_SIZE, TRUE, TRUE, FALSE, FALSE, FALSE, TRUE, FALSE, FALSE, {-1,-1,-1,-1,-1,-1,-1,-1}, {-1,-1,-1,-1,-1,-1,-1,-1}, 0, 0, 0, -1, FALSE},
- { MONSTER_ENTRY_TYPE, 13, MONSTER_ENTRY_SIZE, TRUE, TRUE, FALSE, FALSE, FALSE, TRUE, FALSE, FALSE, {-1,-1,-1,-1,-1,-1,-1,-1}, {-1,-1,-1,-1,-1,-1,-1,-1}, 0, 0, 0, -1, FALSE},
- { MONSTER_ENTRY_TYPE, 14, MONSTER_ENTRY_SIZE, TRUE, TRUE, FALSE, FALSE, FALSE, TRUE, FALSE, FALSE, {-1,-1,-1,-1,-1,-1,-1,-1}, {-1,-1,-1,-1,-1,-1,-1,-1}, 0, 0, 0, -1, FALSE},
- { MONSTER_ENTRY_TYPE, 15, MONSTER_ENTRY_SIZE, TRUE, TRUE, FALSE, FALSE, FALSE, TRUE, FALSE, FALSE, {-1,-1,-1,-1,-1,-1,-1,-1}, {-1,-1,-1,-1,-1,-1,-1,-1}, 0, 0, 0, -1, FALSE},
- { MONSTER_ENTRY_TYPE, 16, MONSTER_ENTRY_SIZE, TRUE, TRUE, FALSE, FALSE, FALSE, TRUE, FALSE, FALSE, {-1,-1,-1,-1,-1,-1,-1,-1}, {-1,-1,-1,-1,-1,-1,-1,-1}, 0, 0, 0, -1, FALSE},
- { MONSTER_ENTRY_TYPE, 17, MONSTER_ENTRY_SIZE, TRUE, TRUE, FALSE, FALSE, FALSE, TRUE, FALSE, FALSE, {-1,-1,-1,-1,-1,-1,-1,-1}, {-1,-1,-1,-1,-1,-1,-1,-1}, 0, 0, 0, -1, FALSE},
- { MONSTER_ENTRY_TYPE, 18, MONSTER_ENTRY_SIZE, TRUE, TRUE, FALSE, FALSE, FALSE, TRUE, FALSE, FALSE, {-1,-1,-1,-1,-1,-1,-1,-1}, {-1,-1,-1,-1,-1,-1,-1,-1}, 0, 0, 0, -1, FALSE},
- { MONSTER_ENTRY_TYPE, 19, MONSTER_ENTRY_SIZE, TRUE, TRUE, FALSE, FALSE, FALSE, TRUE, FALSE, FALSE, {-1,-1,-1,-1,-1,-1,-1,-1}, {-1,-1,-1,-1,-1,-1,-1,-1}, 0, 0, 0, -1, FALSE},
- { MONSTER_ENTRY_TYPE, 20, MONSTER_ENTRY_SIZE, TRUE, TRUE, FALSE, FALSE, FALSE, TRUE, FALSE, FALSE, {-1,-1,-1,-1,-1,-1,-1,-1}, {-1,-1,-1,-1,-1,-1,-1,-1}, 0, 0, 0, -1, FALSE},
- { MONSTER_ENTRY_TYPE, 21, MONSTER_ENTRY_SIZE, TRUE, TRUE, FALSE, FALSE, FALSE, TRUE, FALSE, FALSE, {-1,-1,-1,-1,-1,-1,-1,-1}, {-1,-1,-1,-1,-1,-1,-1,-1}, 0, 0, 0, -1, FALSE},
- { MONSTER_ENTRY_TYPE, 22, MONSTER_ENTRY_SIZE, TRUE, TRUE, FALSE, FALSE, FALSE, TRUE, FALSE, FALSE, {-1,-1,-1,-1,-1,-1,-1,-1}, {-1,-1,-1,-1,-1,-1,-1,-1}, 0, 0, 0, -1, FALSE},
- { MONSTER_ENTRY_TYPE, 23, MONSTER_ENTRY_SIZE, TRUE, TRUE, FALSE, FALSE, FALSE, TRUE, FALSE, FALSE, {-1,-1,-1,-1,-1,-1,-1,-1}, {-1,-1,-1,-1,-1,-1,-1,-1}, 0, 0, 0, -1, FALSE},
- { MONSTER_ENTRY_TYPE, 24, MONSTER_ENTRY_SIZE, TRUE, TRUE, FALSE, FALSE, FALSE, TRUE, FALSE, FALSE, {-1,-1,-1,-1,-1,-1,-1,-1}, {-1,-1,-1,-1,-1,-1,-1,-1}, 0, 0, 0, -1, FALSE},
- { MONSTER_ENTRY_TYPE, 25, MONSTER_ENTRY_SIZE, TRUE, TRUE, FALSE, FALSE, FALSE, TRUE, FALSE, FALSE, {-1,-1,-1,-1,-1,-1,-1,-1}, {-1,-1,-1,-1,-1,-1,-1,-1}, 0, 0, 0, -1, FALSE},
- { MONSTER_ENTRY_TYPE, 26, MONSTER_ENTRY_SIZE, TRUE, TRUE, FALSE, FALSE, FALSE, TRUE, FALSE, FALSE, {-1,-1,-1,-1,-1,-1,-1,-1}, {-1,-1,-1,-1,-1,-1,-1,-1}, 0, 0, 0, -1, FALSE},
- { MONSTER_ENTRY_TYPE, 27, MONSTER_ENTRY_SIZE, TRUE, TRUE, FALSE, FALSE, FALSE, TRUE, FALSE, FALSE, {-1,-1,-1,-1,-1,-1,-1,-1}, {-1,-1,-1,-1,-1,-1,-1,-1}, 0, 0, 0, -1, FALSE},
- { MONSTER_ENTRY_TYPE, 28, MONSTER_ENTRY_SIZE, TRUE, TRUE, FALSE, FALSE, FALSE, TRUE, FALSE, FALSE, {-1,-1,-1,-1,-1,-1,-1,-1}, {-1,-1,-1,-1,-1,-1,-1,-1}, 0, 0, 0, -1, FALSE},
- { MONSTER_ENTRY_TYPE, 29, MONSTER_ENTRY_SIZE, TRUE, TRUE, FALSE, FALSE, FALSE, TRUE, FALSE, FALSE, {-1,-1,-1,-1,-1,-1,-1,-1}, {-1,-1,-1,-1,-1,-1,-1,-1}, 0, 0, 0, -1, FALSE},
- { MONSTER_ENTRY_TYPE, 30, MONSTER_ENTRY_SIZE, TRUE, TRUE, FALSE, FALSE, FALSE, TRUE, FALSE, FALSE, {-1,-1,-1,-1,-1,-1,-1,-1}, {-1,-1,-1,-1,-1,-1,-1,-1}, 0, 0, 0, -1, FALSE},
- { MONSTER_ENTRY_TYPE, 31, MONSTER_ENTRY_SIZE, TRUE, TRUE, FALSE, FALSE, FALSE, TRUE, FALSE, FALSE, {-1,-1,-1,-1,-1,-1,-1,-1}, {-1,-1,-1,-1,-1,-1,-1,-1}, 0, 0, 0, -1, FALSE},
- };
- /* clang-format on */
- H5C_auto_size_ctl_t saved_auto_size_ctl;
- H5C_auto_size_ctl_t test_auto_size_ctl = {
+ struct expected_entry_status *expected = NULL;
+ H5C_t * cache_ptr = file_ptr->shared->cache;
+ int i;
+ herr_t result;
+ H5C_auto_size_ctl_t saved_auto_size_ctl;
+ H5C_auto_size_ctl_t test_auto_size_ctl = {
/* int32_t version = */ H5C__CURR_AUTO_SIZE_CTL_VER,
/* H5C_auto_resize_report_fcn rpt_fcn = */ test_rpt_fcn,
@@ -34333,6 +32953,50 @@ cedds__H5C__autoadjust__ageout__evict_aged_out_entries(H5F_t *file_ptr)
/* hbool_t apply_empty_reserve = */ TRUE,
/* double empty_reserve = */ 0.05};
+ expected = HDmalloc(36 * sizeof(struct expected_entry_status));
+ if (expected == NULL) {
+
+ pass = FALSE;
+ failure_mssg = "couldn't allocate expected entry status array\n";
+ }
+
+ if (expected) {
+ /* the expected array is used to maintain a table of the expected status of every
+ * entry used in this test. Note that since the function that processes this
+ * array only processes as much of it as it is told to, we don't have to
+ * worry about maintaining the status of entries that we haven't used yet.
+ */
+ for (i = 0; i < 36; i++) {
+ expected[i].entry_type = MONSTER_ENTRY_TYPE;
+ expected[i].entry_index = (int)i;
+ expected[i].size = MONSTER_ENTRY_SIZE;
+ expected[i].in_cache = TRUE;
+ expected[i].at_main_addr = TRUE;
+
+ /* NOTE: special case for first entry */
+ expected[i].is_dirty = (i == 0);
+
+ expected[i].is_protected = FALSE;
+ expected[i].is_pinned = FALSE;
+ expected[i].deserialized = TRUE;
+ expected[i].serialized = FALSE;
+ expected[i].destroyed = FALSE;
+
+ for (size_t j = 0; j < MAX_FLUSH_DEP_PARS; j++) {
+ expected[i].flush_dep_par_type[j] = -1;
+ expected[i].flush_dep_par_idx[j] = -1;
+ }
+
+ expected[i].flush_dep_npar = 0;
+ expected[i].flush_dep_nchd = 0;
+ expected[i].flush_dep_ndirty_chd = 0;
+ expected[i].flush_order = -1;
+ expected[i].is_corked = FALSE;
+ }
+
+ pass = TRUE;
+ }
+
if (pass) {
if (cache_ptr == NULL) {
@@ -34599,6 +33263,8 @@ cedds__H5C__autoadjust__ageout__evict_aged_out_entries(H5F_t *file_ptr)
/* reset cache min clean size to its expected value */
cache_ptr->min_clean_size = (1 * 1024 * 1024);
+ HDfree(expected);
+
} /* cedds__H5C__autoadjust__ageout__evict_aged_out_entries() */
/*-------------------------------------------------------------------------
diff --git a/test/cache_common.c b/test/cache_common.c
index d8a271c..8c90ae4 100644
--- a/test/cache_common.c
+++ b/test/cache_common.c
@@ -4513,7 +4513,7 @@ col_major_scan_backward(H5F_t *file_ptr, int32_t max_index, int32_t lag, hbool_t
int mile_stone = 1;
int32_t type;
int32_t idx;
- int32_t local_max_index[NUMBER_OF_ENTRY_TYPES];
+ int32_t local_max_index[NUMBER_OF_ENTRY_TYPES] = {0};
if (verbose)
HDfprintf(stdout, "%s: entering.\n", FUNC);
diff --git a/test/chunk_info.c b/test/chunk_info.c
index 9cf898e..76132c6 100644
--- a/test/chunk_info.c
+++ b/test/chunk_info.c
@@ -153,29 +153,31 @@ reinit_vars(unsigned *read_flt_msk, haddr_t *addr, hsize_t *size)
static herr_t
test_get_chunk_info_highest18(hid_t fapl)
{
- char filename[FILENAME_BUF_SIZE];
- hid_t chunkfile = -1; /* File ID */
- hid_t dspace = -1; /* Dataspace ID */
- hid_t dset = -1; /* Dataset ID */
- hid_t cparms = -1; /* Creation plist */
- hsize_t dims[2] = {NX, NY}; /* Dataset dimensions */
- hsize_t maxdims[2] = {H5S_UNLIMITED, H5S_UNLIMITED};
- hsize_t chunk_dims[2] = {CHUNK_NX, CHUNK_NY}; /* Chunk dimensions */
- int direct_buf[NUM_CHUNKS][CHUNK_NX][CHUNK_NY]; /* Data in chunks */
- int out_buf[NX][NY]; /* Buffer to read data in */
- size_t buf_size = CHUNK_NX * CHUNK_NY * sizeof(int); /* Buffer size of a chk */
- unsigned filter_mask = 0; /* Filter mask */
- unsigned read_flt_msk = 0; /* Filter mask after direct read */
- int fillvalue = -1; /* Fill value */
- int aggression = 9; /* Compression aggression setting */
- H5F_libver_t low, high; /* File format bounds */
- hsize_t offset[2]; /* Offset coordinates of a chunk */
- hsize_t out_offset[2] = {0, 0}; /* Buffer to get offset coordinates */
- hsize_t size = 0; /* Size of an allocated/written chunk */
- hsize_t nchunks = 0; /* Number of chunks */
- haddr_t addr = 0; /* Address of an allocated/written chunk */
- hsize_t index = 0; /* Index of a chunk */
- int n; /* Used on buffer, to avoid conversion warning */
+ char filename[FILENAME_BUF_SIZE];
+ hid_t chunkfile = -1; /* File ID */
+ hid_t dspace = -1; /* Dataspace ID */
+ hid_t dset = -1; /* Dataset ID */
+ hid_t cparms = -1; /* Creation plist */
+ hsize_t dims[2] = {NX, NY}; /* Dataset dimensions */
+ hsize_t maxdims[2] = {H5S_UNLIMITED, H5S_UNLIMITED};
+ hsize_t chunk_dims[2] = {CHUNK_NX, CHUNK_NY}; /* Chunk dimensions */
+ int direct_buf[NUM_CHUNKS][CHUNK_NX][CHUNK_NY]; /* Data in chunks */
+ int out_buf[NX][NY]; /* Buffer to read data in */
+ size_t buf_size = CHUNK_NX * CHUNK_NY * sizeof(int); /* Buffer size of a chk */
+ unsigned filter_mask = 0; /* Filter mask */
+ unsigned read_flt_msk = 0; /* Filter mask after direct read */
+ int fillvalue = -1; /* Fill value */
+#ifdef H5_HAVE_FILTER_DEFLATE
+ int aggression = 9; /* Compression aggression setting */
+#endif
+ H5F_libver_t low, high; /* File format bounds */
+ hsize_t offset[2]; /* Offset coordinates of a chunk */
+ hsize_t out_offset[2] = {0, 0}; /* Buffer to get offset coordinates */
+ hsize_t size = 0; /* Size of an allocated/written chunk */
+ hsize_t nchunks = 0; /* Number of chunks */
+ haddr_t addr = 0; /* Address of an allocated/written chunk */
+ hsize_t index = 0; /* Index of a chunk */
+ int n; /* Used on buffer, to avoid conversion warning */
hsize_t i, j;
herr_t ret;
diff --git a/test/dsets.c b/test/dsets.c
index 101b3a2..151868b 100644
--- a/test/dsets.c
+++ b/test/dsets.c
@@ -12508,10 +12508,13 @@ test_bt2_hdr_fd(const char *env_h5_driver, hid_t fapl)
hid_t dcpl = -1;
hid_t msid = -1;
H5D_chunk_index_t idx_type;
- const hsize_t shape[2] = {8, 8};
- const hsize_t maxshape[2] = {H5S_UNLIMITED, H5S_UNLIMITED};
- const hsize_t chunk[2] = {8, 8};
- const int buffer[8] = {0, 1, 2, 3, 4, 5, 6, 7};
+ const hsize_t shape[2] = {8, 8};
+ const hsize_t maxshape[2] = {H5S_UNLIMITED, H5S_UNLIMITED};
+ const hsize_t chunk[2] = {8, 8};
+ const int buffer[8][8] = {{0, 1, 2, 3, 4, 5, 6, 7}, {8, 9, 10, 11, 12, 13, 14, 15},
+ {16, 17, 18, 19, 20, 21, 22, 23}, {24, 25, 26, 27, 28, 29, 30, 31},
+ {32, 33, 34, 35, 36, 37, 38, 39}, {40, 41, 42, 43, 44, 45, 46, 47},
+ {48, 49, 50, 51, 52, 53, 54, 55}, {56, 57, 58, 59, 60, 61, 62, 63}};
H5O_info_t info;
TESTING("Version 2 B-tree chunk index header flush dependencies handled correctly");
diff --git a/test/dt_arith.c b/test/dt_arith.c
index d5653ad..35a9d5d 100644
--- a/test/dt_arith.c
+++ b/test/dt_arith.c
@@ -2698,18 +2698,18 @@ my_isnan(dtype_t type, void *val)
if (FLT_FLOAT == type) {
float x = 0.0;
HDmemcpy(&x, val, sizeof(float));
- retval = (x != x);
+ retval = !H5_FLT_ABS_EQUAL(x, x);
}
else if (FLT_DOUBLE == type) {
double x = 0.0;
HDmemcpy(&x, val, sizeof(double));
- retval = (x != x);
+ retval = !H5_DBL_ABS_EQUAL(x, x);
#if H5_SIZEOF_LONG_DOUBLE != H5_SIZEOF_DOUBLE && H5_SIZEOF_LONG_DOUBLE != 0
}
else if (FLT_LDOUBLE == type) {
long double x = 0.0;
HDmemcpy(&x, val, sizeof(long double));
- retval = (x != x);
+ retval = !H5_LDBL_ABS_EQUAL(x, x);
#endif
}
else {
diff --git a/test/dtransform.c b/test/dtransform.c
index 33cf3b7..4685508 100644
--- a/test/dtransform.c
+++ b/test/dtransform.c
@@ -120,7 +120,9 @@ const int transformData[ROWS][COLS] = {{36, 31, 25, 19, 13, 7, 1, 5, 11, 16, 22,
#define TEST_TYPE_CONTIG(XFORM, TYPE, HDF_TYPE, TEST_STR, COMPARE_DATA, SIGNED) \
{ \
- TYPE array[ROWS][COLS]; \
+ struct { \
+ TYPE arr[ROWS][COLS]; \
+ } *array = NULL; \
const char *f_to_c = "(5/9.0)*(x-32)"; \
/* utrans is a transform for char types: numbers are restricted from -128 to 127, fits into char */ \
const char *utrans = "(x/4+25)*3"; \
@@ -129,6 +131,10 @@ const int transformData[ROWS][COLS] = {{36, 31, 25, 19, 13, 7, 1, 5, 11, 16, 22,
H5T_order_t order; \
hsize_t dim[2] = {ROWS, COLS}; \
\
+ /* NOTE: If this macro encounters errors, this memory will leak */ \
+ if (NULL == (array = HDcalloc(1, sizeof(*array)))) \
+ TEST_ERROR; \
+ \
if ((dataspace = H5Screate_simple(2, dim, NULL)) < 0) \
TEST_ERROR; \
if ((dset = H5Dcreate2(file_id, "/transformtest_" TEST_STR, HDF_TYPE, dataspace, H5P_DEFAULT, \
@@ -177,25 +183,25 @@ const int transformData[ROWS][COLS] = {{36, 31, 25, 19, 13, 7, 1, 5, 11, 16, 22,
if (H5Dread(dset, HDF_TYPE, H5S_ALL, H5S_ALL, XFORM, array) < 0) \
TEST_ERROR; \
if (SIGNED) \
- COMPARE(TYPE, array, COMPARE_DATA, 2) \
+ COMPARE(TYPE, array->arr, COMPARE_DATA, 2) \
else \
- UCOMPARE(TYPE, array, COMPARE_DATA, 4) \
+ UCOMPARE(TYPE, array->arr, COMPARE_DATA, 4) \
\
TESTING("contiguous, byte order conversion (" TEST_STR "->" TEST_STR ")") \
\
if (H5Dread(dset_nn, HDF_TYPE, H5S_ALL, H5S_ALL, XFORM, array) < 0) \
TEST_ERROR; \
if (SIGNED) \
- COMPARE(TYPE, array, COMPARE_DATA, 2) \
+ COMPARE(TYPE, array->arr, COMPARE_DATA, 2) \
else \
- UCOMPARE(TYPE, array, COMPARE_DATA, 4) \
+ UCOMPARE(TYPE, array->arr, COMPARE_DATA, 4) \
\
if (SIGNED) { \
TESTING("contiguous, with type conversion (float->" TEST_STR ")") \
\
if (H5Dread(dset_id_float, HDF_TYPE, H5S_ALL, H5S_ALL, XFORM, array) < 0) \
TEST_ERROR; \
- COMPARE(TYPE, array, COMPARE_DATA, 2) \
+ COMPARE(TYPE, array->arr, COMPARE_DATA, 2) \
} \
\
if (H5Dclose(dset_nn) < 0) \
@@ -204,11 +210,15 @@ const int transformData[ROWS][COLS] = {{36, 31, 25, 19, 13, 7, 1, 5, 11, 16, 22,
TEST_ERROR; \
if (H5Sclose(dataspace) < 0) \
TEST_ERROR; \
+ \
+ HDfree(array); \
}
#define TEST_TYPE_CHUNK(XFORM, TYPE, HDF_TYPE, TEST_STR, COMPARE_DATA, SIGNED) \
{ \
- TYPE array[ROWS][COLS]; \
+ struct { \
+ TYPE arr[ROWS][COLS]; \
+ } *array = NULL; \
const char *f_to_c = "(5/9.0)*(x-32)"; \
/* utrans is a transform for char types: numbers are restricted from -128 to 127, fits into char */ \
const char *utrans = "(x/4+25)*3"; \
@@ -217,6 +227,10 @@ const int transformData[ROWS][COLS] = {{36, 31, 25, 19, 13, 7, 1, 5, 11, 16, 22,
hsize_t dim[2] = {ROWS, COLS}; \
hsize_t offset[2] = {0, 0}; \
\
+ /* NOTE: If this macro encounters errors, this memory will leak */ \
+ if (NULL == (array = HDcalloc(1, sizeof(*array)))) \
+ TEST_ERROR; \
+ \
if ((dataspace = H5Screate_simple(2, dim, NULL)) < 0) \
TEST_ERROR; \
\
@@ -263,16 +277,16 @@ const int transformData[ROWS][COLS] = {{36, 31, 25, 19, 13, 7, 1, 5, 11, 16, 22,
if (H5Dread(dset_chunk, HDF_TYPE, memspace, filespace, XFORM, array) < 0) \
TEST_ERROR; \
if (SIGNED) \
- COMPARE(TYPE, array, COMPARE_DATA, 2) \
+ COMPARE(TYPE, array->arr, COMPARE_DATA, 2) \
else \
- UCOMPARE(TYPE, array, COMPARE_DATA, 4) \
+ UCOMPARE(TYPE, array->arr, COMPARE_DATA, 4) \
\
if (SIGNED) { \
TESTING("chunked, with type conversion (float->" TEST_STR ")") \
\
if (H5Dread(dset_id_float_chunk, HDF_TYPE, memspace, filespace, XFORM, array) < 0) \
TEST_ERROR; \
- COMPARE(TYPE, array, COMPARE_DATA, 2) \
+ COMPARE(TYPE, array->arr, COMPARE_DATA, 2) \
} \
\
if (H5Pclose(cparms) < 0) \
@@ -283,6 +297,8 @@ const int transformData[ROWS][COLS] = {{36, 31, 25, 19, 13, 7, 1, 5, 11, 16, 22,
TEST_ERROR; \
if (H5Sclose(memspace) < 0) \
TEST_ERROR; \
+ \
+ HDfree(array); \
}
#define INVALID_SET_TEST(TRANSFORM) \
diff --git a/test/dtypes.c b/test/dtypes.c
index 16c55c3..8aa57e2 100644
--- a/test/dtypes.c
+++ b/test/dtypes.c
@@ -2320,6 +2320,8 @@ test_compound_11(void)
((big_t *)buf)[u].i1 = (int)(u * 3);
((big_t *)buf)[u].i2 = (int)(u * 5);
((big_t *)buf)[u].s1 = (char *)HDmalloc((size_t)32);
+ if (!((big_t *)buf)[u].s1)
+ TEST_ERROR
HDsprintf(((big_t *)buf)[u].s1, "%u", (unsigned)u);
} /* end for */
diff --git a/test/genall5.c b/test/genall5.c
index 87862b2..31627de 100644
--- a/test/genall5.c
+++ b/test/genall5.c
@@ -1649,10 +1649,10 @@ ds_ctg_i(hid_t fid, const char *dset_name, hbool_t write_data)
failure_mssg = "ds_ctg_i: H5Dwrite() failed.";
}
HDassert(ret >= 0);
-
- HDfree(wdata);
}
+ HDfree(wdata);
+
if (pass) {
ret = H5Dclose(dsid);
@@ -1867,10 +1867,10 @@ vrfy_ds_ctg_i(hid_t fid, const char *dset_name, hbool_t write_data)
}
HDassert((int)u == rdata[u]);
}
-
- HDfree(rdata);
} /* end if */
+ HDfree(rdata);
+
if (pass) {
ret = H5Dclose(dsid);
@@ -2226,10 +2226,10 @@ vrfy_ds_chk_i(hid_t fid, const char *dset_name, hbool_t write_data)
}
HDassert((int)u == rdata[u]);
}
-
- HDfree(rdata);
} /* end if */
+ HDfree(rdata);
+
if (pass) {
ret = H5Dclose(dsid);
@@ -2566,10 +2566,10 @@ vrfy_ds_cpt_i(hid_t fid, const char *dset_name, hbool_t write_data)
}
HDassert((int)u == rdata[u]);
}
-
- HDfree(rdata);
} /* end if */
+ HDfree(rdata);
+
if (pass) {
ret = H5Dclose(dsid);
@@ -2958,10 +2958,10 @@ vrfy_ds_ctg_v(hid_t fid, const char *dset_name, hbool_t write_data)
failure_mssg = "vrfy_ds_ctg_v: H5Dvlen_reclaim() failed.";
}
HDassert(ret >= 0);
-
- HDfree(rdata);
} /* end if */
+ HDfree(rdata);
+
if (pass) {
ret = H5Sclose(sid);
diff --git a/test/h5test.h b/test/h5test.h
index 73dd1b5..7800fc2 100644
--- a/test/h5test.h
+++ b/test/h5test.h
@@ -234,6 +234,15 @@ H5TEST_DLLVAR MPI_Info h5_io_info_g; /* MPI INFO object for IO */
extern "C" {
#endif
+/*
+ * Ugly hack to cast away const for freeing const-qualified pointers.
+ * Should only be used sparingly, where the alternative (like keeping
+ * an equivalent non-const pointer around) is far messier.
+ */
+#ifndef h5_free_const
+#define h5_free_const(mem) HDfree((void *)(uintptr_t)mem)
+#endif
+
/* Generally useful testing routines */
H5TEST_DLL void h5_clean_files(const char *base_name[], hid_t fapl);
H5TEST_DLL int h5_cleanup(const char *base_name[], hid_t fapl);
diff --git a/test/objcopy.c b/test/objcopy.c
index 5bfe924..e3310ca 100644
--- a/test/objcopy.c
+++ b/test/objcopy.c
@@ -4459,6 +4459,10 @@ test_copy_dataset_compressed(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid
TESTING("H5Ocopy(): compressed dataset");
#ifndef H5_HAVE_FILTER_DEFLATE
+ (void)fcpl_src;
+ (void)fcpl_dst;
+ (void)src_fapl;
+ (void)dst_fapl; /* Silence compiler */
SKIPPED();
puts(" Deflation filter not available");
#else /* H5_HAVE_FILTER_DEFLATE */
@@ -4884,6 +4888,10 @@ test_copy_dataset_no_edge_filt(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, h
}
#ifndef H5_HAVE_FILTER_DEFLATE
+ (void)fcpl_src;
+ (void)fcpl_dst;
+ (void)src_fapl;
+ (void)dst_fapl; /* Silence compiler */
SKIPPED();
puts(" Deflation filter not available");
#else /* H5_HAVE_FILTER_DEFLATE */
@@ -7231,6 +7239,10 @@ test_copy_dataset_compressed_vl(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl,
TESTING("H5Ocopy(): compressed dataset with VLEN datatype");
#ifndef H5_HAVE_FILTER_DEFLATE
+ (void)fcpl_src;
+ (void)fcpl_dst;
+ (void)src_fapl;
+ (void)dst_fapl; /* Silence compiler */
SKIPPED();
puts(" Deflation filter not available");
#else /* H5_HAVE_FILTER_DEFLATE */
diff --git a/test/set_extent.c b/test/set_extent.c
index e37d184..65e56a0 100644
--- a/test/set_extent.c
+++ b/test/set_extent.c
@@ -69,7 +69,7 @@ const char *FILENAME[] = {"set_extent1", "set_extent2", "set_extent3", "set_exte
{ \
H5_FAILED(); \
AT(); \
- test_random_rank4_dump(NDIM_SETS, dim_log, cdims, J, K, L, M); \
+ test_random_rank4_dump(NDIM_SETS, dim_log->arr, cdims, J, K, L, M); \
goto error; \
} /* end RAND4_FAIL_DUMP */
#define RAND4_VL_NITER 40
@@ -2233,29 +2233,43 @@ static int
test_random_rank4(hid_t fapl, hid_t dcpl, hbool_t do_fillvalue, hbool_t disable_edge_filters,
hbool_t do_sparse, rank4_index_t index_type)
{
- hid_t file = -1;
- hid_t dset = -1;
- hid_t fspace = -1;
- hid_t mspace = -1;
- hid_t my_dcpl = -1;
- hsize_t dims[4] = {10, 10, 10, 10}; /* Dataset's dimensions */
- hsize_t max_dims[4] = {10, 10, 10, 10}; /* Maximum dimensions */
- hsize_t old_dims[4]; /* Old dataset dimensions */
- hsize_t min_unwritten_dims[4]; /* Minimum dimensions since last write */
- hsize_t * valid_dims = old_dims; /* Dimensions of region still containing written data */
- hsize_t cdims[4]; /* Chunk dimensions */
- const hsize_t mdims[4] = {10, 10, 10, 10}; /* Memory buffer dimensions */
- const hsize_t start[4] = {0, 0, 0, 0}; /* Start for hyperslabe operations on memory */
- static int rbuf[10][10][10][10]; /* Read buffer */
- static int wbuf[10][10][10][10]; /* Write buffer */
- static hsize_t dim_log[RAND4_NITER + 1][4]; /* Log of dataset dimensions */
- hbool_t zero_dim = FALSE; /* Whether a dimension is 0 */
- hbool_t writing = TRUE; /* Whether we're writing to the dset */
- unsigned scalar_iter; /* Iteration to shrink dset to 1x1x1x1 */
- volatile unsigned i, j, k, l, m; /* Local indices */
- char filename[NAME_BUF_SIZE];
-
- /* create a new file */
+ hid_t file = -1;
+ hid_t dset = -1;
+ hid_t fspace = -1;
+ hid_t mspace = -1;
+ hid_t my_dcpl = -1;
+ hsize_t dims[4] = {10, 10, 10, 10}; /* Dataset's dimensions */
+ hsize_t max_dims[4] = {10, 10, 10, 10}; /* Maximum dimensions */
+ hsize_t old_dims[4]; /* Old dataset dimensions */
+ hsize_t min_unwritten_dims[4]; /* Minimum dimensions since last write */
+ hsize_t * valid_dims = old_dims; /* Dimensions of region still containing written data */
+ hsize_t cdims[4]; /* Chunk dimensions */
+ const hsize_t mdims[4] = {10, 10, 10, 10}; /* Memory buffer dimensions */
+ const hsize_t start[4] = {0, 0, 0, 0}; /* Start for hyperslabe operations on memory */
+ struct {
+ int arr[10][10][10][10];
+ } *rbuf = NULL; /* Read buffer */
+ struct {
+ int arr[10][10][10][10];
+ } *wbuf = NULL; /* Write buffer */
+ struct {
+ hsize_t arr[RAND4_NITER + 1][4];
+ } *dim_log = NULL; /* Log of dataset dimensions */
+ hbool_t zero_dim = FALSE; /* Whether a dimension is 0 */
+ hbool_t writing = TRUE; /* Whether we're writing to the dset */
+ unsigned scalar_iter; /* Iteration to shrink dset to 1x1x1x1 */
+ unsigned i, j, k, l, m; /* Local indices */
+ char filename[NAME_BUF_SIZE];
+
+ /* Initialize large arrays */
+ if (NULL == (rbuf = HDcalloc(1, sizeof(*rbuf))))
+ TEST_ERROR
+ if (NULL == (wbuf = HDcalloc(1, sizeof(*wbuf))))
+ TEST_ERROR
+ if (NULL == (dim_log = HDcalloc(1, sizeof(*dim_log))))
+ TEST_ERROR
+
+ /* Create a new file */
h5_fixname(FILENAME[4], fapl, filename, sizeof filename);
if ((file = H5Fcreate(filename, H5F_ACC_TRUNC, H5P_DEFAULT, fapl)) < 0)
TEST_ERROR
@@ -2279,7 +2293,7 @@ test_random_rank4(hid_t fapl, hid_t dcpl, hbool_t do_fillvalue, hbool_t disable_
for (i = 0; i < 4; i++) {
dims[i] = (hsize_t)(
index_type != RANK4_INDEX_FARRAY ? (0 == scalar_iter ? 1 : ((HDrandom() % 10) + 1)) : 10);
- dim_log[0][i] = dims[i];
+ dim_log->arr[0][i] = dims[i];
} /* end for */
/* Create dataset */
@@ -2312,7 +2326,7 @@ test_random_rank4(hid_t fapl, hid_t dcpl, hbool_t do_fillvalue, hbool_t disable_
for (k = 0; k < dims[1]; k++)
for (l = 0; l < dims[2]; l++)
for (m = 0; m < dims[3]; m++)
- wbuf[j][k][l][m] = HDrandom();
+ wbuf->arr[j][k][l][m] = HDrandom();
/* Write data */
if (H5Dwrite(dset, H5T_NATIVE_INT, mspace, H5S_ALL, H5P_DEFAULT, wbuf) < 0)
@@ -2327,7 +2341,7 @@ test_random_rank4(hid_t fapl, hid_t dcpl, hbool_t do_fillvalue, hbool_t disable_
if ((dims[j] = (hsize_t)(i == scalar_iter ? 1 : (HDrandom() % 11))) == 0)
if ((dims[j] = (hsize_t)(HDrandom() % 11)) == 0)
zero_dim = TRUE;
- dim_log[i + 1][j] = dims[j];
+ dim_log->arr[i + 1][j] = dims[j];
} /* end for */
/* If writing is disabled, update min_unwritten_dims */
@@ -2355,10 +2369,10 @@ test_random_rank4(hid_t fapl, hid_t dcpl, hbool_t do_fillvalue, hbool_t disable_
for (m = 0; m < dims[3]; m++)
if (j >= valid_dims[0] || k >= valid_dims[1] || l >= valid_dims[2] ||
m >= valid_dims[3]) {
- if (FILL_VALUE != rbuf[j][k][l][m])
+ if (FILL_VALUE != rbuf->arr[j][k][l][m])
RAND4_FAIL_DUMP(i + 2, (int)j, (int)k, (int)l, (int)m)
} /* end if */
- else if (wbuf[j][k][l][m] != rbuf[j][k][l][m])
+ else if (wbuf->arr[j][k][l][m] != rbuf->arr[j][k][l][m])
RAND4_FAIL_DUMP(i + 2, (int)j, (int)k, (int)l, (int)m)
} /* end if */
else {
@@ -2366,7 +2380,7 @@ test_random_rank4(hid_t fapl, hid_t dcpl, hbool_t do_fillvalue, hbool_t disable_
for (k = 0; k < MIN(dims[1], valid_dims[1]); k++)
for (l = 0; l < MIN(dims[2], valid_dims[2]); l++)
for (m = 0; m < MIN(dims[3], valid_dims[3]); m++)
- if (wbuf[j][k][l][m] != rbuf[j][k][l][m])
+ if (wbuf->arr[j][k][l][m] != rbuf->arr[j][k][l][m])
RAND4_FAIL_DUMP(i + 2, (int)j, (int)k, (int)l, (int)m)
} /* end else */
} /* end if */
@@ -2394,6 +2408,10 @@ test_random_rank4(hid_t fapl, hid_t dcpl, hbool_t do_fillvalue, hbool_t disable_
if (H5Fclose(file) < 0)
TEST_ERROR
+ HDfree(rbuf);
+ HDfree(wbuf);
+ HDfree(dim_log);
+
return 0;
error:
@@ -2405,7 +2423,12 @@ error:
H5Dclose(dset);
H5Fclose(file);
}
- H5E_END_TRY
+ H5E_END_TRY;
+
+ HDfree(rbuf);
+ HDfree(wbuf);
+ HDfree(dim_log);
+
return -1;
} /* end test_random_rank4 */
@@ -2429,29 +2452,43 @@ static int
test_random_rank4_vl(hid_t fapl, hid_t dcpl, hbool_t do_fillvalue, hbool_t disable_edge_filters,
hbool_t do_sparse, rank4_index_t index_type)
{
- hid_t file = -1;
- hid_t dset = -1;
- hid_t type = -1;
- hid_t fspace = -1;
- hid_t mspace = -1;
- hid_t my_dcpl = -1;
- hsize_t dims[4] = {10, 10, 10, 10}; /* Dataset's dimensions */
- hsize_t max_dims[4] = {10, 10, 10, 10}; /* Maximum dimensions */
- hsize_t old_dims[4]; /* Old dataset dimensions */
- hsize_t min_unwritten_dims[4]; /* Minimum dimensions since last write */
- hsize_t * valid_dims = old_dims; /* Dimensions of region still containing written data */
- hsize_t cdims[4]; /* Chunk dimensions */
- const hsize_t mdims[4] = {10, 10, 10, 10}; /* Memory buffer dimensions */
- const hsize_t start[4] = {0, 0, 0, 0}; /* Start for hyperslab operations on memory */
- static hvl_t rbuf[10][10][10][10]; /* Read buffer */
- static hvl_t wbuf[10][10][10][10]; /* Write buffer */
- static hsize_t dim_log[RAND4_NITER + 1][4]; /* Log of dataset dimensions */
- hbool_t zero_dim = FALSE; /* Whether a dimension is 0 */
- hbool_t writing = TRUE; /* Whether we're writing to the dset */
- hvl_t fill_value; /* Fill value */
- unsigned scalar_iter; /* Iteration to shrink dset to 1x1x1x1 */
- volatile unsigned i, j, k, l, m; /* Local indices */
- char filename[NAME_BUF_SIZE];
+ hid_t file = -1;
+ hid_t dset = -1;
+ hid_t type = -1;
+ hid_t fspace = -1;
+ hid_t mspace = -1;
+ hid_t my_dcpl = -1;
+ hsize_t dims[4] = {10, 10, 10, 10}; /* Dataset's dimensions */
+ hsize_t max_dims[4] = {10, 10, 10, 10}; /* Maximum dimensions */
+ hsize_t old_dims[4]; /* Old dataset dimensions */
+ hsize_t min_unwritten_dims[4]; /* Minimum dimensions since last write */
+ hsize_t * valid_dims = old_dims; /* Dimensions of region still containing written data */
+ hsize_t cdims[4]; /* Chunk dimensions */
+ const hsize_t mdims[4] = {10, 10, 10, 10}; /* Memory buffer dimensions */
+ const hsize_t start[4] = {0, 0, 0, 0}; /* Start for hyperslab operations on memory */
+ struct {
+ hvl_t arr[10][10][10][10];
+ } *rbuf = NULL; /* Read buffer */
+ struct {
+ hvl_t arr[10][10][10][10];
+ } *wbuf = NULL; /* Write buffer */
+ struct {
+ hsize_t arr[RAND4_NITER + 1][4];
+ } *dim_log = NULL; /* Log of dataset dimensions */
+ hbool_t zero_dim = FALSE; /* Whether a dimension is 0 */
+ hbool_t writing = TRUE; /* Whether we're writing to the dset */
+ hvl_t fill_value; /* Fill value */
+ unsigned scalar_iter; /* Iteration to shrink dset to 1x1x1x1 */
+ unsigned i, j, k, l, m; /* Local indices */
+ char filename[NAME_BUF_SIZE];
+
+ /* Initialize large arrays */
+ if (NULL == (rbuf = HDcalloc(1, sizeof(*rbuf))))
+ TEST_ERROR
+ if (NULL == (wbuf = HDcalloc(1, sizeof(*wbuf))))
+ TEST_ERROR
+ if (NULL == (dim_log = HDcalloc(1, sizeof(*dim_log))))
+ TEST_ERROR
/* Initialize fill value buffers so they aren't freed in case of an error */
fill_value.len = 0;
@@ -2460,10 +2497,10 @@ test_random_rank4_vl(hid_t fapl, hid_t dcpl, hbool_t do_fillvalue, hbool_t disab
for (j = 0; j < dims[1]; j++)
for (k = 0; k < dims[2]; k++)
for (l = 0; l < dims[3]; l++) {
- rbuf[i][j][k][l].len = 0;
- rbuf[i][j][k][l].p = NULL;
- wbuf[i][j][k][l].len = 0;
- wbuf[i][j][k][l].p = NULL;
+ rbuf->arr[i][j][k][l].len = 0;
+ rbuf->arr[i][j][k][l].p = NULL;
+ wbuf->arr[i][j][k][l].len = 0;
+ wbuf->arr[i][j][k][l].p = NULL;
} /* end for */
/* Allocate space for VL write buffers, since these never need to be
@@ -2472,8 +2509,8 @@ test_random_rank4_vl(hid_t fapl, hid_t dcpl, hbool_t do_fillvalue, hbool_t disab
for (j = 0; j < dims[1]; j++)
for (k = 0; k < dims[2]; k++)
for (l = 0; l < dims[3]; l++) {
- wbuf[i][j][k][l].len = 2;
- if (NULL == (wbuf[i][j][k][l].p = HDmalloc(2 * sizeof(int))))
+ wbuf->arr[i][j][k][l].len = 2;
+ if (NULL == (wbuf->arr[i][j][k][l].p = HDmalloc(2 * sizeof(int))))
TEST_ERROR;
} /* end for */
@@ -2505,8 +2542,8 @@ test_random_rank4_vl(hid_t fapl, hid_t dcpl, hbool_t do_fillvalue, hbool_t disab
for (i = 0; i < 4; i++) {
dims[i] = (hsize_t)(
index_type != RANK4_INDEX_FARRAY ? (0 == scalar_iter ? 1 : ((HDrandom() % 10) + 1)) : 10);
- dim_log[0][i] = dims[i];
- } /* end for */
+ dim_log->arr[0][i] = dims[i];
+ }
/* Make a copy of the dcpl */
if ((my_dcpl = H5Pcopy(dcpl)) < 0)
@@ -2550,8 +2587,8 @@ test_random_rank4_vl(hid_t fapl, hid_t dcpl, hbool_t do_fillvalue, hbool_t disab
for (k = 0; k < dims[1]; k++)
for (l = 0; l < dims[2]; l++)
for (m = 0; m < dims[3]; m++) {
- ((int *)wbuf[j][k][l][m].p)[0] = HDrandom();
- ((int *)wbuf[j][k][l][m].p)[1] = HDrandom();
+ ((int *)wbuf->arr[j][k][l][m].p)[0] = HDrandom();
+ ((int *)wbuf->arr[j][k][l][m].p)[1] = HDrandom();
} /* end for */
/* Write data */
@@ -2567,8 +2604,8 @@ test_random_rank4_vl(hid_t fapl, hid_t dcpl, hbool_t do_fillvalue, hbool_t disab
if ((dims[j] = (hsize_t)(i == scalar_iter ? 1 : (HDrandom() % 11))) == 0)
if ((dims[j] = (hsize_t)(HDrandom() % 11)) == 0)
zero_dim = TRUE;
- dim_log[i + 1][j] = dims[j];
- } /* end for */
+ dim_log->arr[i + 1][j] = dims[j];
+ }
/* If writing is disabled, update min_unwritten_dims */
if (!writing)
@@ -2595,12 +2632,14 @@ test_random_rank4_vl(hid_t fapl, hid_t dcpl, hbool_t do_fillvalue, hbool_t disab
for (m = 0; m < dims[3]; m++)
if (j >= valid_dims[0] || k >= valid_dims[1] || l >= valid_dims[2] ||
m >= valid_dims[3]) {
- if (((int *)fill_value.p)[0] != ((int *)rbuf[j][k][l][m].p)[0] ||
- ((int *)fill_value.p)[1] != ((int *)rbuf[j][k][l][m].p)[1])
+ if (((int *)fill_value.p)[0] != ((int *)rbuf->arr[j][k][l][m].p)[0] ||
+ ((int *)fill_value.p)[1] != ((int *)rbuf->arr[j][k][l][m].p)[1])
RAND4_FAIL_DUMP(i + 2, (int)j, (int)k, (int)l, (int)m)
} /* end if */
- else if (((int *)wbuf[j][k][l][m].p)[0] != ((int *)rbuf[j][k][l][m].p)[0] ||
- ((int *)wbuf[j][k][l][m].p)[1] != ((int *)rbuf[j][k][l][m].p)[1])
+ else if (((int *)wbuf->arr[j][k][l][m].p)[0] !=
+ ((int *)rbuf->arr[j][k][l][m].p)[0] ||
+ ((int *)wbuf->arr[j][k][l][m].p)[1] !=
+ ((int *)rbuf->arr[j][k][l][m].p)[1])
RAND4_FAIL_DUMP(i + 2, (int)j, (int)k, (int)l, (int)m)
} /* end if */
else {
@@ -2608,8 +2647,10 @@ test_random_rank4_vl(hid_t fapl, hid_t dcpl, hbool_t do_fillvalue, hbool_t disab
for (k = 0; k < MIN(dims[1], valid_dims[1]); k++)
for (l = 0; l < MIN(dims[2], valid_dims[2]); l++)
for (m = 0; m < MIN(dims[3], valid_dims[3]); m++)
- if (((int *)wbuf[j][k][l][m].p)[0] != ((int *)rbuf[j][k][l][m].p)[0] ||
- ((int *)wbuf[j][k][l][m].p)[1] != ((int *)rbuf[j][k][l][m].p)[1])
+ if (((int *)wbuf->arr[j][k][l][m].p)[0] !=
+ ((int *)rbuf->arr[j][k][l][m].p)[0] ||
+ ((int *)wbuf->arr[j][k][l][m].p)[1] !=
+ ((int *)rbuf->arr[j][k][l][m].p)[1])
RAND4_FAIL_DUMP(i + 2, (int)j, (int)k, (int)l, (int)m)
} /* end else */
@@ -2648,6 +2689,10 @@ test_random_rank4_vl(hid_t fapl, hid_t dcpl, hbool_t do_fillvalue, hbool_t disab
if (H5Fclose(file) < 0)
TEST_ERROR
+ HDfree(rbuf);
+ HDfree(wbuf);
+ HDfree(dim_log);
+
return 0;
error:
@@ -2657,10 +2702,10 @@ error:
for (j = 0; j < dims[1]; j++)
for (k = 0; k < dims[2]; k++)
for (l = 0; l < dims[3]; l++) {
- if (rbuf[i][j][k][l].p)
- HDfree(rbuf[i][j][k][l].p);
- if (wbuf[i][j][k][l].p)
- HDfree(wbuf[i][j][k][l].p);
+ if (rbuf->arr[i][j][k][l].p)
+ HDfree(rbuf->arr[i][j][k][l].p);
+ if (wbuf->arr[i][j][k][l].p)
+ HDfree(wbuf->arr[i][j][k][l].p);
} /* end for */
if (fill_value.p)
HDfree(fill_value.p);
@@ -2671,7 +2716,12 @@ error:
H5Tclose(type);
H5Fclose(file);
}
- H5E_END_TRY
+ H5E_END_TRY;
+
+ HDfree(rbuf);
+ HDfree(wbuf);
+ HDfree(dim_log);
+
return -1;
} /* end test_random_rank4_vl */
diff --git a/test/tcoords.c b/test/tcoords.c
index fef8689..7273677 100644
--- a/test/tcoords.c
+++ b/test/tcoords.c
@@ -380,10 +380,14 @@ test_multiple_ends(hid_t file, hbool_t is_chunked)
int i, j, k, l, m, n, p;
hsize_t da_dims[8] = {4, 5, 3, 4, 2, 3, 6, 2};
hsize_t da_chunksize[8] = {1, 5, 3, 2, 2, 3, 3, 2};
- int data_buf[4][5][3][4][2][3][6][2];
+ struct {
+ int arr[4][5][3][4][2][3][6][2];
+ } *data_buf = NULL;
/* For testing the full selections in the fastest-growing end and in the middle dimensions */
- int mem1_buffer[1][1][1][4][2][1][6][2];
+ struct {
+ int arr[1][1][1][4][2][1][6][2];
+ } *mem1_buffer = NULL;
hsize_t mem1_dims[8] = {1, 1, 1, 4, 2, 1, 6, 2};
hsize_t mem1_start[8] = {0, 0, 0, 0, 0, 0, 0, 0};
hsize_t mem1_count[8] = {1, 1, 1, 1, 1, 1, 1, 1};
@@ -391,7 +395,9 @@ test_multiple_ends(hid_t file, hbool_t is_chunked)
hsize_t mem1_block[8] = {1, 1, 1, 4, 2, 1, 6, 2};
/* For testing the full selections in the slowest-growing end and in the middle dimensions */
- int mem2_buffer[4][5][1][4][2][1][1][1];
+ struct {
+ int arr[4][5][1][4][2][1][1][1];
+ } *mem2_buffer = NULL;
hsize_t mem2_dims[8] = {4, 5, 1, 4, 2, 1, 1, 1};
hsize_t mem2_start[8] = {0, 0, 0, 0, 0, 0, 0, 0};
hsize_t mem2_count[8] = {1, 1, 1, 1, 1, 1, 1, 1};
@@ -399,7 +405,9 @@ test_multiple_ends(hid_t file, hbool_t is_chunked)
hsize_t mem2_block[8] = {4, 5, 1, 4, 2, 1, 1, 1};
/* For testing two unadjacent full selections in the middle dimensions */
- int mem3_buffer[1][5][3][1][1][3][6][1];
+ struct {
+ int arr[1][5][3][1][1][3][6][1];
+ } *mem3_buffer = NULL;
hsize_t mem3_dims[8] = {1, 5, 3, 1, 1, 3, 6, 1};
hsize_t mem3_start[8] = {0, 0, 0, 0, 0, 0, 0, 0};
hsize_t mem3_count[8] = {1, 1, 1, 1, 1, 1, 1, 1};
@@ -407,7 +415,9 @@ test_multiple_ends(hid_t file, hbool_t is_chunked)
hsize_t mem3_block[8] = {1, 5, 3, 1, 1, 3, 6, 1};
/* For testing the full selections in the fastest-growing end and the slowest-growing end */
- int mem4_buffer[4][5][1][1][1][1][6][2];
+ struct {
+ int arr[4][5][1][1][1][1][6][2];
+ } *mem4_buffer = NULL;
hsize_t mem4_dims[8] = {4, 5, 1, 1, 1, 1, 6, 2};
hsize_t mem4_start[8] = {0, 0, 0, 0, 0, 0, 0, 0};
hsize_t mem4_count[8] = {1, 1, 1, 1, 1, 1, 1, 1};
@@ -416,13 +426,29 @@ test_multiple_ends(hid_t file, hbool_t is_chunked)
/* For testing the full selections in the fastest-growing end and slowest-growing end,
* also in the middle dimensions */
- int mem5_buffer[4][5][1][4][2][1][6][2];
+ struct {
+ int arr[4][5][1][4][2][1][6][2];
+ } *mem5_buffer = NULL;
hsize_t mem5_dims[8] = {4, 5, 1, 4, 2, 1, 6, 2};
hsize_t mem5_start[8] = {0, 0, 0, 0, 0, 0, 0, 0};
hsize_t mem5_count[8] = {1, 1, 1, 1, 1, 1, 1, 1};
hsize_t mem5_stride[8] = {1, 1, 1, 1, 1, 1, 1, 1};
hsize_t mem5_block[8] = {4, 5, 1, 4, 2, 1, 6, 2};
+ /* Initialize dynamic arrays */
+ data_buf = HDcalloc(1, sizeof(*data_buf));
+ CHECK_PTR(data_buf, "HDcalloc");
+ mem1_buffer = HDcalloc(1, sizeof(*mem1_buffer));
+ CHECK_PTR(data_buf, "HDcalloc");
+ mem2_buffer = HDcalloc(1, sizeof(*mem2_buffer));
+ CHECK_PTR(data_buf, "HDcalloc");
+ mem3_buffer = HDcalloc(1, sizeof(*mem3_buffer));
+ CHECK_PTR(data_buf, "HDcalloc");
+ mem4_buffer = HDcalloc(1, sizeof(*mem4_buffer));
+ CHECK_PTR(data_buf, "HDcalloc");
+ mem5_buffer = HDcalloc(1, sizeof(*mem5_buffer));
+ CHECK_PTR(data_buf, "HDcalloc");
+
/* Create and write the dataset */
sid = H5Screate_simple(8, da_dims, da_dims);
CHECK(sid, FAIL, "H5Screate_simple");
@@ -451,10 +477,10 @@ test_multiple_ends(hid_t file, hbool_t is_chunked)
for (m = 0; m < 2; m++)
for (n = 0; n < 3; n++)
for (p = 0; p < 6; p++) {
- data_buf[i][j][k][l][m][n][p][0] =
+ data_buf->arr[i][j][k][l][m][n][p][0] =
i * 1000000 + j * 100000 + k * 10000 + l * 1000 + m * 100 + n * 10 + p;
- data_buf[i][j][k][l][m][n][p][1] = i * 1000000 + j * 100000 + k * 10000 +
- l * 1000 + m * 100 + n * 10 + p + 1;
+ data_buf->arr[i][j][k][l][m][n][p][1] = i * 1000000 + j * 100000 + k * 10000 +
+ l * 1000 + m * 100 + n * 10 + p + 1;
}
ret = H5Dwrite(did, H5T_NATIVE_INT, sid, sid, H5P_DEFAULT, data_buf);
@@ -491,7 +517,7 @@ test_multiple_ends(hid_t file, hbool_t is_chunked)
for (j = 0; j < 2; j++)
for (k = 0; k < 6; k++)
for (l = 0; l < 2; l++)
- if (data_buf[0][0][0][i][j][0][k][l] != mem1_buffer[0][0][0][i][j][0][k][l]) {
+ if (data_buf->arr[0][0][0][i][j][0][k][l] != mem1_buffer->arr[0][0][0][i][j][0][k][l]) {
TestErrPrintf("%u: Read different values than written at index 0,0,0,%d,%d,0,%d,%d\n",
__LINE__, i, j, k, l);
}
@@ -524,7 +550,7 @@ test_multiple_ends(hid_t file, hbool_t is_chunked)
for (j = 0; j < 5; j++)
for (k = 0; k < 4; k++)
for (l = 0; l < 2; l++)
- if (data_buf[i][j][0][k][l][0][0][0] != mem2_buffer[i][j][0][k][l][0][0][0]) {
+ if (data_buf->arr[i][j][0][k][l][0][0][0] != mem2_buffer->arr[i][j][0][k][l][0][0][0]) {
TestErrPrintf("%u: Read different values than written at index %d,%d,0,%d,%d,0,0,0\n",
__LINE__, i, j, k, l);
}
@@ -557,7 +583,7 @@ test_multiple_ends(hid_t file, hbool_t is_chunked)
for (j = 0; j < 3; j++)
for (k = 0; k < 3; k++)
for (l = 0; l < 6; l++)
- if (data_buf[0][i][j][0][0][k][l][0] != mem3_buffer[0][i][j][0][0][k][l][0]) {
+ if (data_buf->arr[0][i][j][0][0][k][l][0] != mem3_buffer->arr[0][i][j][0][0][k][l][0]) {
TestErrPrintf("%u: Read different values than written at index 0,%d,%d,0,0,%d,%d,0\n",
__LINE__, i, j, k, l);
}
@@ -590,7 +616,7 @@ test_multiple_ends(hid_t file, hbool_t is_chunked)
for (j = 0; j < 5; j++)
for (k = 0; k < 6; k++)
for (l = 0; l < 2; l++)
- if (data_buf[i][j][0][0][0][0][k][l] != mem4_buffer[i][j][0][0][0][0][k][l]) {
+ if (data_buf->arr[i][j][0][0][0][0][k][l] != mem4_buffer->arr[i][j][0][0][0][0][k][l]) {
TestErrPrintf("%u: Read different values than written at index %d,%d,0,0,0,0,%d,%d\n",
__LINE__, i, j, k, l);
}
@@ -626,7 +652,8 @@ test_multiple_ends(hid_t file, hbool_t is_chunked)
for (l = 0; l < 2; l++)
for (m = 0; m < 6; m++)
for (n = 0; n < 2; n++)
- if (data_buf[i][j][0][k][l][0][m][n] != mem5_buffer[i][j][0][k][l][0][m][n]) {
+ if (data_buf->arr[i][j][0][k][l][0][m][n] !=
+ mem5_buffer->arr[i][j][0][k][l][0][m][n]) {
TestErrPrintf(
"%u: Read different values than written at index %d,%d,0,%d,%d,0,%d,%d\n",
__LINE__, i, j, k, l, m, n);
@@ -637,6 +664,13 @@ test_multiple_ends(hid_t file, hbool_t is_chunked)
ret = H5Pclose(plid);
CHECK(ret, FAIL, "H5Pclose");
+
+ HDfree(data_buf);
+ HDfree(mem1_buffer);
+ HDfree(mem2_buffer);
+ HDfree(mem3_buffer);
+ HDfree(mem4_buffer);
+ HDfree(mem5_buffer);
}
/****************************************************************
diff --git a/test/trefstr.c b/test/trefstr.c
index ea30f24..0dcf621 100644
--- a/test/trefstr.c
+++ b/test/trefstr.c
@@ -186,7 +186,7 @@ test_refstr_cmp(void)
H5RS_str_t *rs1; /* Ref-counted string created */
H5RS_str_t *rs2; /* Ref-counted string created */
int cmp; /* Comparison value */
- size_t len; /* Length of string */
+ ssize_t len; /* Length of string */
herr_t ret; /* Generic return value */
/* Output message about test being performed */
diff --git a/test/vds_env.c b/test/vds_env.c
index 58d90fc..959fc94 100644
--- a/test/vds_env.c
+++ b/test/vds_env.c
@@ -44,13 +44,13 @@ const char *FILENAME[] = {"vds_env_virt_0", "vds_env_virt_3", "vds_env_src_2", "
static int
test_vds_prefix_second(unsigned config, hid_t fapl)
{
- char srcfilename[FILENAME_BUF_SIZE];
- char srcfilename_map[FILENAME_BUF_SIZE];
- char vfilename[FILENAME_BUF_SIZE];
- char vfilename2[FILENAME_BUF_SIZE];
- char srcfilenamepct[FILENAME_BUF_SIZE];
- char srcfilenamepct_map[FILENAME_BUF_SIZE];
const char *srcfilenamepct_map_orig = "vds%%%%_src";
+ char * srcfilename = NULL;
+ char * srcfilename_map = NULL;
+ char * vfilename = NULL;
+ char * vfilename2 = NULL;
+ char * srcfilenamepct = NULL;
+ char * srcfilenamepct_map = NULL;
hid_t srcfile[4] = {-1, -1, -1, -1}; /* Files with source dsets */
hid_t vfile = -1; /* File with virtual dset */
hid_t dcpl = -1; /* Dataset creation property list */
@@ -69,12 +69,25 @@ test_vds_prefix_second(unsigned config, hid_t fapl)
TESTING("basic virtual dataset I/O via H5Pset_vds_prefix(): all selection with ENV prefix")
- h5_fixname(FILENAME[0], fapl, vfilename, sizeof vfilename);
- h5_fixname(FILENAME[1], fapl, vfilename2, sizeof vfilename2);
- h5_fixname(FILENAME[2], fapl, srcfilename, sizeof srcfilename);
- h5_fixname_printf(FILENAME[2], fapl, srcfilename_map, sizeof srcfilename_map);
- h5_fixname(FILENAME[3], fapl, srcfilenamepct, sizeof srcfilenamepct);
- h5_fixname_printf(srcfilenamepct_map_orig, fapl, srcfilenamepct_map, sizeof srcfilenamepct_map);
+ if (NULL == (srcfilename = HDmalloc(FILENAME_BUF_SIZE)))
+ TEST_ERROR
+ if (NULL == (srcfilename_map = HDmalloc(FILENAME_BUF_SIZE)))
+ TEST_ERROR
+ if (NULL == (vfilename = HDmalloc(FILENAME_BUF_SIZE)))
+ TEST_ERROR
+ if (NULL == (vfilename2 = HDmalloc(FILENAME_BUF_SIZE)))
+ TEST_ERROR
+ if (NULL == (srcfilenamepct = HDmalloc(FILENAME_BUF_SIZE)))
+ TEST_ERROR
+ if (NULL == (srcfilenamepct_map = HDmalloc(FILENAME_BUF_SIZE)))
+ TEST_ERROR
+
+ h5_fixname(FILENAME[0], fapl, vfilename, FILENAME_BUF_SIZE);
+ h5_fixname(FILENAME[1], fapl, vfilename2, FILENAME_BUF_SIZE);
+ h5_fixname(FILENAME[2], fapl, srcfilename, FILENAME_BUF_SIZE);
+ h5_fixname_printf(FILENAME[2], fapl, srcfilename_map, FILENAME_BUF_SIZE);
+ h5_fixname(FILENAME[3], fapl, srcfilenamepct, FILENAME_BUF_SIZE);
+ h5_fixname_printf(srcfilenamepct_map_orig, fapl, srcfilenamepct_map, FILENAME_BUF_SIZE);
/* create tmp directory and get current working directory path */
if (HDmkdir(TMPDIR, (mode_t)0755) < 0 && errno != EEXIST)
@@ -260,10 +273,24 @@ test_vds_prefix_second(unsigned config, hid_t fapl)
TEST_ERROR
dcpl = -1;
+ HDfree(srcfilenamepct_map);
+ HDfree(srcfilenamepct);
+ HDfree(vfilename2);
+ HDfree(vfilename);
+ HDfree(srcfilename_map);
+ HDfree(srcfilename);
+
PASSED();
return 0;
error:
+ HDfree(srcfilenamepct_map);
+ HDfree(srcfilenamepct);
+ HDfree(vfilename2);
+ HDfree(vfilename);
+ HDfree(srcfilename_map);
+ HDfree(srcfilename);
+
H5E_BEGIN_TRY
{
for (i = 0; i < (int)(sizeof(srcdset) / sizeof(srcdset[0])); i++)
diff --git a/testpar/t_cache.c b/testpar/t_cache.c
index 71fbe1a..ca3d467 100644
--- a/testpar/t_cache.c
+++ b/testpar/t_cache.c
@@ -41,7 +41,7 @@ const char *FILENAME[NFILENAME] = {"CacheTestDummy", NULL};
#ifndef PATH_MAX
#define PATH_MAX 512
#endif /* !PATH_MAX */
-char filenames[NFILENAME][PATH_MAX];
+char * filenames[NFILENAME];
hid_t fapl; /* file access property list */
haddr_t max_addr = 0; /* used to store the end of
* the address space used by
@@ -192,7 +192,7 @@ struct datum {
#define NUM_DATA_ENTRIES 100000
-struct datum data[NUM_DATA_ENTRIES];
+struct datum *data = NULL;
/* Many tests use the size of data array as the size of test loops.
* On some machines, this results in unacceptably long test runs.
@@ -231,7 +231,7 @@ int virt_num_data_entries = NUM_DATA_ENTRIES;
*
*****************************************************************************/
-int data_index[NUM_DATA_ENTRIES];
+int *data_index = NULL;
/*****************************************************************************
* The following two #defines are used to control code that is in turn used
@@ -1116,6 +1116,8 @@ setup_derived_types(void)
MPI_Aint displs[9];
struct mssg_t sample; /* used to compute displacements */
+ HDmemset(&sample, 0, sizeof(struct mssg_t));
+
/* setup the displacements array */
if ((MPI_SUCCESS != MPI_Get_address(&sample.req, &displs[0])) ||
(MPI_SUCCESS != MPI_Get_address(&sample.src, &displs[1])) ||
@@ -2251,13 +2253,13 @@ datum_deserialize(const void *image_ptr, H5_ATTR_UNUSED size_t len, void *udata_
static herr_t
datum_image_len(const void *thing, size_t *image_len)
{
- int idx;
- struct datum *entry_ptr;
+ int idx;
+ const struct datum *entry_ptr;
HDassert(thing);
HDassert(image_len);
- entry_ptr = (struct datum *)thing;
+ entry_ptr = (const struct datum *)thing;
idx = addr_to_datum_index(entry_ptr->base_addr);
@@ -6932,6 +6934,23 @@ main(int argc, char **argv)
goto finish;
}
+ if (NULL == (data = HDmalloc(NUM_DATA_ENTRIES * sizeof(*data)))) {
+ HDprintf(" Couldn't allocate data array. Exiting.\n");
+ MPI_Abort(MPI_COMM_WORLD, -1);
+ }
+ if (NULL == (data_index = HDmalloc(NUM_DATA_ENTRIES * sizeof(*data_index)))) {
+ HDprintf(" Couldn't allocate data index array. Exiting.\n");
+ MPI_Abort(MPI_COMM_WORLD, -1);
+ }
+
+ HDmemset(filenames, 0, sizeof(filenames));
+ for (int i = 0; i < NFILENAME; i++) {
+ if (NULL == (filenames[i] = HDmalloc(PATH_MAX))) {
+ HDprintf("couldn't allocate filename array\n");
+ MPI_Abort(MPI_COMM_WORLD, -1);
+ }
+ }
+
set_up_file_communicator();
setup_derived_types();
@@ -6958,8 +6977,7 @@ main(int argc, char **argv)
/* fix the file names */
for (u = 0; u < sizeof(FILENAME) / sizeof(FILENAME[0]) - 1; ++u) {
- if (h5_fixname(FILENAME[u], fapl, filenames[u], sizeof(filenames[u])) == NULL) {
-
+ if (h5_fixname(FILENAME[u], fapl, filenames[u], PATH_MAX) == NULL) {
nerrors++;
if (verbose)
HDfprintf(stdout, "%d:%s: h5_fixname() failed.\n", world_mpi_rank, FUNC);
@@ -7047,14 +7065,19 @@ main(int argc, char **argv)
#endif
finish:
+ if (data_index)
+ HDfree(data_index);
+ if (data)
+ HDfree(data);
+
/* make sure all processes are finished before final report, cleanup
* and exit.
*/
MPI_Barrier(MPI_COMM_WORLD);
if (MAINPROCESS) { /* only process 0 reports */
HDprintf("===================================\n");
- if (failures) {
- HDprintf("***metadata cache tests detected %d failures***\n", failures);
+ if (nerrors || failures) {
+ HDprintf("***metadata cache tests detected %d failures***\n", nerrors + failures);
}
else {
HDprintf("metadata cache tests finished with no failures\n");
@@ -7071,5 +7094,5 @@ finish:
MPI_Finalize();
/* cannot just return (failures) because exit code is limited to 1byte */
- return (failures != 0);
+ return (nerrors != 0 || failures != 0);
}
diff --git a/testpar/t_filters_parallel.c b/testpar/t_filters_parallel.c
index bfb5897..409c4ed 100644
--- a/testpar/t_filters_parallel.c
+++ b/testpar/t_filters_parallel.c
@@ -7857,8 +7857,10 @@ test_edge_chunks_overlap(const char *parent_group, H5Z_filter_t filter_id, hid_t
* edge chunk and writes to just a portion of the edge chunk.
*/
static void
-test_edge_chunks_partial_write(const char *parent_group, H5Z_filter_t filter_id, hid_t fapl_id, hid_t dcpl_id,
- hid_t dxpl_id)
+test_edge_chunks_partial_write(const char H5_ATTR_PARALLEL_UNUSED * parent_group,
+ H5Z_filter_t H5_ATTR_PARALLEL_UNUSED filter_id,
+ hid_t H5_ATTR_PARALLEL_UNUSED fapl_id, hid_t H5_ATTR_PARALLEL_UNUSED dcpl_id,
+ hid_t H5_ATTR_PARALLEL_UNUSED dxpl_id)
{
/* TODO */
}
diff --git a/testpar/t_mdset.c b/testpar/t_mdset.c
index 6dfa6f8..aecd76b 100644
--- a/testpar/t_mdset.c
+++ b/testpar/t_mdset.c
@@ -1966,6 +1966,7 @@ rr_obj_hdr_flush_confusion_writer(MPI_Comm comm)
/* Tell the reader to check the file up to steps. */
steps++;
Reader_check(mrc, steps, steps_done);
+ VRFY((MPI_SUCCESS == mrc), "Reader_check failed");
/*
* Step 2: write attributes to each dataset
@@ -2020,6 +2021,7 @@ rr_obj_hdr_flush_confusion_writer(MPI_Comm comm)
/* Tell the reader to check the file up to steps. */
steps++;
Reader_check(mrc, steps, steps_done);
+ VRFY((MPI_SUCCESS == mrc), "Reader_check failed");
/*
* Step 3: write large attributes to each dataset
@@ -2067,6 +2069,7 @@ rr_obj_hdr_flush_confusion_writer(MPI_Comm comm)
/* Tell the reader to check the file up to steps. */
steps++;
Reader_check(mrc, steps, steps_done);
+ VRFY((MPI_SUCCESS == mrc), "Reader_check failed");
/*
* Step 4: write different large attributes to each dataset
@@ -2100,6 +2103,7 @@ rr_obj_hdr_flush_confusion_writer(MPI_Comm comm)
/* Tell the reader to check the file up to steps. */
steps++;
Reader_check(mrc, steps, steps_done);
+ VRFY((MPI_SUCCESS == mrc), "Reader_check failed");
/* Step 5: Close all objects and the file */
@@ -2154,10 +2158,12 @@ rr_obj_hdr_flush_confusion_writer(MPI_Comm comm)
/* Tell the reader to check the file up to steps. */
steps++;
Reader_check(mrc, steps, steps_done);
+ VRFY((MPI_SUCCESS == mrc), "Reader_check failed");
/* All done. Inform reader to end. */
steps = 0;
Reader_check(mrc, steps, steps_done);
+ VRFY((MPI_SUCCESS == mrc), "Reader_check failed");
if (verbose)
HDfprintf(stdout, "%0d:%s: Done.\n", mpi_rank, fcn_name);
diff --git a/testpar/t_mpi.c b/testpar/t_mpi.c
index a883f55..3fd83dc 100644
--- a/testpar/t_mpi.c
+++ b/testpar/t_mpi.c
@@ -41,18 +41,18 @@ static int errors_sum(int nerrs);
static int
test_mpio_overlap_writes(char *filename)
{
- int mpi_size, mpi_rank;
- MPI_Comm comm;
- MPI_Info info = MPI_INFO_NULL;
- int color, mrc;
- MPI_File fh;
- int i;
- int vrfyerrs, nerrs;
- unsigned char buf[4093]; /* use some prime number for size */
- int bufsize = sizeof(buf);
- MPI_Offset stride;
- MPI_Offset mpi_off;
- MPI_Status mpi_stat;
+ int mpi_size, mpi_rank;
+ MPI_Comm comm;
+ MPI_Info info = MPI_INFO_NULL;
+ int color, mrc;
+ MPI_File fh;
+ int i;
+ int vrfyerrs, nerrs;
+ unsigned char *buf = NULL;
+ int bufsize;
+ MPI_Offset stride;
+ MPI_Offset mpi_off;
+ MPI_Status mpi_stat;
if (VERBOSE_MED)
HDprintf("MPIO independent overlapping writes test on file %s\n", filename);
@@ -70,6 +70,13 @@ test_mpio_overlap_writes(char *filename)
return 0;
}
+ bufsize = 4093; /* use some prime number for size */
+ if (NULL == (buf = HDmalloc((size_t)bufsize))) {
+ if (MAINPROCESS)
+ HDprintf("couldn't allocate buffer\n");
+ return 1;
+ }
+
/* splits processes 0 to n-2 into one comm. and the last one into another */
color = ((mpi_rank < (mpi_size - 1)) ? 0 : 1);
mrc = MPI_Comm_split(MPI_COMM_WORLD, color, mpi_rank, &comm);
@@ -159,6 +166,9 @@ test_mpio_overlap_writes(char *filename)
*/
mrc = MPI_Barrier(MPI_COMM_WORLD);
VRFY((mrc == MPI_SUCCESS), "Sync before leaving test");
+
+ HDfree(buf);
+
return (nerrs);
}
diff --git a/testpar/t_pflush1.c b/testpar/t_pflush1.c
index 2a80f4a..c847895 100644
--- a/testpar/t_pflush1.c
+++ b/testpar/t_pflush1.c
@@ -25,7 +25,7 @@
const char *FILENAME[] = {"flush", "noflush", NULL};
-static int data_g[100][100];
+static int *data_g = NULL;
#define N_GROUPS 100
@@ -77,7 +77,7 @@ create_test_file(char *name, hid_t fapl_id)
/* Write some data */
for (i = 0; i < dims[0]; i++)
for (j = 0; j < dims[1]; j++)
- data_g[i][j] = (int)(i + (i * j) + j);
+ data_g[(i * 100) + j] = (int)(i + (i * j) + j);
if (H5Dwrite(did, H5T_NATIVE_INT, sid, sid, dxpl_id, data_g) < 0)
goto error;
@@ -146,6 +146,9 @@ main(int argc, char *argv[])
HDexit(EXIT_FAILURE);
}
+ if (NULL == (data_g = HDmalloc(100 * 100 * sizeof(*data_g))))
+ goto error;
+
if ((fapl_id = H5Pcreate(H5P_FILE_ACCESS)) < 0)
goto error;
if (H5Pset_fapl_mpio(fapl_id, comm, info) < 0)
@@ -192,6 +195,11 @@ main(int argc, char *argv[])
HDfflush(stdout);
HDfflush(stderr);
+ if (data_g) {
+ HDfree(data_g);
+ data_g = NULL;
+ }
+
/* Always exit with a failure code!
*
* In accordance with the standard, not having all processes
@@ -207,5 +215,9 @@ error:
HDfflush(stderr);
HDprintf("*** ERROR ***\n");
HDprintf("THERE WAS A REAL ERROR IN t_pflush1.\n");
+
+ if (data_g)
+ HDfree(data_g);
+
HD_exit(EXIT_FAILURE);
} /* end main() */
diff --git a/testpar/t_pflush2.c b/testpar/t_pflush2.c
index c96233a..a3df64c 100644
--- a/testpar/t_pflush2.c
+++ b/testpar/t_pflush2.c
@@ -26,7 +26,7 @@
const char *FILENAME[] = {"flush", "noflush", NULL};
-static int data_g[100][100];
+static int *data_g = NULL;
#define N_GROUPS 100
@@ -77,9 +77,10 @@ check_test_file(char *name, hid_t fapl_id)
for (i = 0; i < dims[0]; i++) {
for (j = 0; j < dims[1]; j++) {
val = (int)(i + (i * j) + j);
- if (data_g[i][j] != val) {
+ if (data_g[(i * 100) + j] != val) {
H5_FAILED();
- HDprintf(" data_g[%lu][%lu] = %d\n", (unsigned long)i, (unsigned long)j, data_g[i][j]);
+ HDprintf(" data_g[%lu][%lu] = %d\n", (unsigned long)i, (unsigned long)j,
+ data_g[(i * 100) + j]);
HDprintf(" should be %d\n", val);
}
}
@@ -170,6 +171,9 @@ main(int argc, char *argv[])
HDexit(EXIT_FAILURE);
}
+ if (NULL == (data_g = HDmalloc(100 * 100 * sizeof(*data_g))))
+ goto error;
+
if ((fapl_id1 = H5Pcreate(H5P_FILE_ACCESS)) < 0)
goto error;
if (H5Pset_fapl_mpio(fapl_id1, comm, info) < 0)
@@ -213,10 +217,18 @@ main(int argc, char *argv[])
h5_clean_files(&FILENAME[0], fapl_id1);
h5_clean_files(&FILENAME[1], fapl_id2);
+ if (data_g) {
+ HDfree(data_g);
+ data_g = NULL;
+ }
+
MPI_Finalize();
HDexit(EXIT_SUCCESS);
error:
+ if (data_g)
+ HDfree(data_g);
+
HDexit(EXIT_FAILURE);
} /* end main() */
diff --git a/testpar/t_shapesame.c b/testpar/t_shapesame.c
index ab9ce26..9d450f5 100644
--- a/testpar/t_shapesame.c
+++ b/testpar/t_shapesame.c
@@ -3975,7 +3975,7 @@ void * old_client_data; /* previous error handler arg.*/
#define NFILENAME 2
#define PARATESTFILE filenames[0]
const char *FILENAME[NFILENAME] = {"ShapeSameTest", NULL};
-char filenames[NFILENAME][PATH_MAX];
+char * filenames[NFILENAME];
hid_t fapl; /* file access property list */
#ifdef USE_PAUSE
@@ -4163,7 +4163,7 @@ parse_options(int argc, char **argv)
n = sizeof(FILENAME) / sizeof(FILENAME[0]) - 1; /* exclude the NULL */
for (i = 0; i < n; i++)
- if (h5_fixname(FILENAME[i], fapl, filenames[i], sizeof(filenames[i])) == NULL) {
+ if (h5_fixname(FILENAME[i], fapl, filenames[i], PATH_MAX) == NULL) {
HDprintf("h5_fixname failed\n");
nerrors++;
return (1);
@@ -4321,6 +4321,14 @@ main(int argc, char **argv)
H5open();
h5_show_hostname();
+ HDmemset(filenames, 0, sizeof(filenames));
+ for (int i = 0; i < NFILENAME; i++) {
+ if (NULL == (filenames[i] = HDmalloc(PATH_MAX))) {
+ HDprintf("couldn't allocate filename array\n");
+ MPI_Abort(MPI_COMM_WORLD, -1);
+ }
+ }
+
/* Initialize testing framework */
TestInit(argv[0], usage, parse_options);
@@ -4385,6 +4393,11 @@ main(int argc, char **argv)
HDprintf("===================================\n");
}
+ for (int i = 0; i < NFILENAME; i++) {
+ HDfree(filenames[i]);
+ filenames[i] = NULL;
+ }
+
/* close HDF5 library */
H5close();
diff --git a/testpar/t_span_tree.c b/testpar/t_span_tree.c
index 32d0265..e6fc9aa 100644
--- a/testpar/t_span_tree.c
+++ b/testpar/t_span_tree.c
@@ -42,6 +42,8 @@
#include "H5Spkg.h" /* Dataspaces */
#include "testphdf5.h"
+#define LOWER_DIM_SIZE_COMP_TEST__RUN_TEST__DEBUG 0
+
static void coll_write_test(int chunk_factor);
static void coll_read_test(int chunk_factor);
@@ -1430,8 +1432,7 @@ lower_dim_size_comp_test__verify_data(uint32_t *buf_ptr,
*-------------------------------------------------------------------------
*/
-#define LDSCT_DS_RANK 5
-#define LOWER_DIM_SIZE_COMP_TEST__RUN_TEST__DEBUG 0
+#define LDSCT_DS_RANK 5
static void
lower_dim_size_comp_test__run_test(const int chunk_edge_size, const hbool_t use_collective_io,
diff --git a/testpar/testphdf5.c b/testpar/testphdf5.c
index 7405554..ba763da 100644
--- a/testpar/testphdf5.c
+++ b/testpar/testphdf5.c
@@ -43,7 +43,7 @@ int dxfer_coll_type = DXFER_COLLECTIVE_IO;
#define NFILENAME 2
#define PARATESTFILE filenames[0]
const char *FILENAME[NFILENAME] = {"ParaTest", NULL};
-char filenames[NFILENAME][PATH_MAX];
+char * filenames[NFILENAME];
hid_t fapl; /* file access property list */
#ifdef USE_PAUSE
@@ -231,7 +231,7 @@ parse_options(int argc, char **argv)
n = sizeof(FILENAME) / sizeof(FILENAME[0]) - 1; /* exclude the NULL */
for (i = 0; i < n; i++)
- if (h5_fixname(FILENAME[i], fapl, filenames[i], sizeof(filenames[i])) == NULL) {
+ if (h5_fixname(FILENAME[i], fapl, filenames[i], PATH_MAX) == NULL) {
HDprintf("h5_fixname failed\n");
nerrors++;
return (1);
@@ -336,6 +336,14 @@ main(int argc, char **argv)
H5open();
h5_show_hostname();
+ HDmemset(filenames, 0, sizeof(filenames));
+ for (int i = 0; i < NFILENAME; i++) {
+ if (NULL == (filenames[i] = HDmalloc(PATH_MAX))) {
+ HDprintf("couldn't allocate filename array\n");
+ MPI_Abort(MPI_COMM_WORLD, -1);
+ }
+ }
+
/* Initialize testing framework */
TestInit(argv[0], usage, parse_options);
@@ -540,6 +548,11 @@ main(int argc, char **argv)
HDprintf("===================================\n");
}
+ for (int i = 0; i < NFILENAME; i++) {
+ HDfree(filenames[i]);
+ filenames[i] = NULL;
+ }
+
/* close HDF5 library */
H5close();
diff --git a/tools/lib/h5diff_array.c b/tools/lib/h5diff_array.c
index c465b7a..c10381d 100644
--- a/tools/lib/h5diff_array.c
+++ b/tools/lib/h5diff_array.c
@@ -1391,6 +1391,9 @@ character_compare_opt(unsigned char *mem1, unsigned char *mem2, hsize_t elemtno,
hbool_t both_zero = FALSE;
double per;
+ /* both_zero is set in the PER_UNSIGN macro but not used in this function */
+ (void)both_zero;
+
HDmemcpy(&temp1_uchar, mem1, sizeof(unsigned char));
HDmemcpy(&temp2_uchar, mem2, sizeof(unsigned char));
H5TOOLS_START_DEBUG(" %d=%d", temp1_uchar, temp2_uchar);
diff --git a/tools/src/h5diff/ph5diff_main.c b/tools/src/h5diff/ph5diff_main.c
index 8e5c3e8..75fb9a4 100644
--- a/tools/src/h5diff/ph5diff_main.c
+++ b/tools/src/h5diff/ph5diff_main.c
@@ -312,5 +312,5 @@ h5diff_exit(int status)
/* Always exit(0), since MPI implementations do weird stuff when they
* receive a non-zero exit value. - QAK
*/
- HDexit(0);
+ HDexit(status);
}
diff --git a/tools/src/h5dump/h5dump_xml.c b/tools/src/h5dump/h5dump_xml.c
index ec14fdc..74bd224 100644
--- a/tools/src/h5dump/h5dump_xml.c
+++ b/tools/src/h5dump/h5dump_xml.c
@@ -2354,14 +2354,21 @@ xml_dump_named_datatype(hid_t type, const char *name)
h5tools_context_t ctx; /* print context */
h5tool_format_t * outputformat = &xml_dataformat;
h5tool_format_t string_dataformat;
- char * tmp;
- char * dtxid;
- char * parentxid;
- char * t_tmp;
- char * t_prefix;
- char * t_name;
+ char * tmp = NULL;
+ char * dtxid = NULL;
+ char * parentxid = NULL;
+ char * t_tmp = NULL;
+ char * t_prefix = NULL;
+ char * t_name = NULL;
tmp = (char *)HDmalloc(HDstrlen(prefix) + HDstrlen(name) + 2);
+ if (tmp == NULL) {
+ indentation(dump_indent);
+ error_msg("internal error (file %s:line %d)\n", __FILE__, __LINE__);
+ h5tools_setstatus(EXIT_FAILURE);
+ goto done;
+ }
+
HDstrcpy(tmp, prefix);
HDstrcat(tmp, "/");
HDstrcat(tmp, name);
@@ -2616,6 +2623,13 @@ xml_dump_group(hid_t gid, const char *name)
}
else {
tmp = (char *)HDmalloc(HDstrlen(prefix) + HDstrlen(name) + 2);
+ if (tmp == NULL) {
+ indentation(dump_indent);
+ error_msg("internal error (file %s:line %d)\n", __FILE__, __LINE__);
+ h5tools_setstatus(EXIT_FAILURE);
+ return;
+ }
+
HDstrcpy(tmp, prefix);
par = HDstrdup(tmp);
cp = HDstrrchr(par, '/');
@@ -3126,8 +3140,11 @@ xml_print_strs(hid_t did, int source)
}
bp = (char *)buf;
- if (!is_vlstr)
+ if (!is_vlstr) {
onestring = (char *)HDcalloc(tsiz, sizeof(char));
+ if (onestring == NULL)
+ goto error;
+ }
/* setup */
HDmemset(&buffer, 0, sizeof(h5tools_str_t));
@@ -3749,6 +3766,14 @@ xml_dump_dataset(hid_t did, const char *name, struct subset_t H5_ATTR_UNUSED *ss
char *pstr = (char *)HDmalloc((size_t)100);
tmp = (char *)HDmalloc(HDstrlen(prefix) + HDstrlen(name) + 2);
+ if (tmp == NULL) {
+ error_msg("buffer allocation failed\n");
+ h5tools_setstatus(EXIT_FAILURE);
+ HDfree(rstr);
+ HDfree(pstr);
+ return;
+ }
+
HDstrcpy(tmp, prefix);
HDstrcat(tmp, "/");
HDstrcat(tmp, name);
diff --git a/tools/src/h5perf/sio_engine.c b/tools/src/h5perf/sio_engine.c
index dc2c68e..449e857 100644
--- a/tools/src/h5perf/sio_engine.c
+++ b/tools/src/h5perf/sio_engine.c
@@ -125,7 +125,6 @@ static hid_t h5dxpl = H5I_INVALID_HID; /* Dataset transfer property
* Purpose: SIO Engine where IO are executed.
* Return: results
* Programmer: Christian Chilan, April, 2008
- * Modifications:
*/
void
do_sio(parameters param, results *res)
@@ -136,18 +135,20 @@ do_sio(parameters param, results *res)
iotype iot; /* API type */
char base_name[256]; /* test file base name */
/* return codes */
- herr_t ret_code = 0; /*return code */
+ herr_t ret_code = 0; /* return code */
- char fname[FILENAME_MAX]; /* test file name */
- int i;
- /* HDF5 variables */
- herr_t hrc; /*HDF5 return code */
+ char *fname = NULL;
+ int i;
- /* Sanity check parameters */
+ /* HDF5 variables */
+ herr_t hrc; /* HDF5 return code */
/* IO type */
iot = param.io_type;
+ if (NULL == (fname = HDcalloc(FILENAME_MAX, sizeof(char))))
+ GOTOERROR(FAIL);
+
switch (iot) {
case POSIXIO:
fd.posixfd = -1;
@@ -269,8 +270,8 @@ done:
}
/* release generic resources */
- if (buffer)
- free(buffer);
+ HDfree(buffer);
+ HDfree(fname);
res->ret_code = ret_code;
}
@@ -1127,7 +1128,6 @@ done:
* Purpose: Sets file driver.
* Return: SUCCESS or FAIL
* Programmer: Christian Chilan, April, 2008
- * Modifications:
*/
hid_t
@@ -1166,9 +1166,11 @@ set_vfd(parameters *param)
H5FD_mem_t memb_map[H5FD_MEM_NTYPES];
hid_t memb_fapl[H5FD_MEM_NTYPES];
const char *memb_name[H5FD_MEM_NTYPES];
- char sv[H5FD_MEM_NTYPES][1024];
haddr_t memb_addr[H5FD_MEM_NTYPES];
H5FD_mem_t mt;
+ struct {
+ char arr[H5FD_MEM_NTYPES][1024];
+ } *sv = NULL;
HDmemset(memb_map, 0, sizeof memb_map);
HDmemset(memb_fapl, 0, sizeof memb_fapl);
@@ -1176,16 +1178,22 @@ set_vfd(parameters *param)
HDmemset(memb_addr, 0, sizeof memb_addr);
HDassert(HDstrlen(multi_letters) == H5FD_MEM_NTYPES);
+
+ if (NULL == (sv = HDcalloc(1, sizeof(*sv))))
+ return -1;
for (mt = H5FD_MEM_DEFAULT; mt < H5FD_MEM_NTYPES; mt++) {
memb_fapl[mt] = H5P_DEFAULT;
- HDsprintf(sv[mt], "%%s-%c.h5", multi_letters[mt]);
- memb_name[mt] = sv[mt];
+ HDsprintf(sv->arr[mt], "%%s-%c.h5", multi_letters[mt]);
+ memb_name[mt] = sv->arr[mt];
memb_addr[mt] = (haddr_t)MAX(mt - 1, 0) * (HADDR_MAX / 10);
}
if (H5Pset_fapl_multi(my_fapl, memb_map, memb_fapl, memb_name, memb_addr, FALSE) < 0) {
+ HDfree(sv);
return -1;
}
+
+ HDfree(sv);
}
else if (vfd == family) {
hsize_t fam_size = 1 * 1024 * 1024; /*100 MB*/
@@ -1264,14 +1272,18 @@ done:
* Purpose: Cleanup temporary file unless HDF5_NOCLEANUP is set.
* Return: void
* Programmer: Albert Cheng 2001/12/12
- * Modifications: Support for file drivers. Christian Chilan, April, 2008
*/
static void
do_cleanupfile(iotype iot, char *filename)
{
- char temp[2048];
- int j;
- hid_t driver;
+ char * temp = NULL;
+ size_t temp_sz;
+ int j;
+ hid_t driver;
+
+ temp_sz = (2048) * sizeof(char);
+ if (NULL == (temp = HDcalloc(1, temp_sz)))
+ goto done;
if (clean_file_g == -1)
clean_file_g = (HDgetenv("HDF5_NOCLEANUP") == NULL) ? 1 : 0;
@@ -1288,7 +1300,7 @@ do_cleanupfile(iotype iot, char *filename)
if (driver == H5FD_FAMILY) {
for (j = 0; /*void*/; j++) {
- HDsnprintf(temp, sizeof temp, filename, j);
+ HDsnprintf(temp, temp_sz, filename, j);
if (HDaccess(temp, F_OK) < 0)
break;
@@ -1307,10 +1319,10 @@ do_cleanupfile(iotype iot, char *filename)
}
else if (driver == H5FD_MULTI) {
H5FD_mem_t mt;
- assert(HDstrlen(multi_letters) == H5FD_MEM_NTYPES);
+ HDassert(HDstrlen(multi_letters) == H5FD_MEM_NTYPES);
for (mt = H5FD_MEM_DEFAULT; mt < H5FD_MEM_NTYPES; mt++) {
- HDsnprintf(temp, sizeof temp, "%s-%c.h5", filename, multi_letters[mt]);
+ HDsnprintf(temp, temp_sz, "%s-%c.h5", filename, multi_letters[mt]);
HDremove(temp); /*don't care if it fails*/
}
}
@@ -1327,4 +1339,7 @@ do_cleanupfile(iotype iot, char *filename)
break;
}
}
+
+done:
+ HDfree(temp);
}