summaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorDana Robinson <43805+derobins@users.noreply.github.com>2022-07-05 23:55:18 (GMT)
committerGitHub <noreply@github.com>2022-07-05 23:55:18 (GMT)
commit5ceaf920eccbf5176065b0deeb27b124b821db76 (patch)
tree2bca04a4fd6fd27065c3e33335092970ef30b940 /test
parentac7bddf2af317d4bc34854f5565396da51ff12aa (diff)
downloadhdf5-feature/vfd_swmr.zip
hdf5-feature/vfd_swmr.tar.gz
hdf5-feature/vfd_swmr.tar.bz2
VFD SWMR: Warning fixes and minor cleanup (#1847)feature/vfd_swmr
* Normalization with develop * Moves remaining datatype code changes over from develop * Cleanup in examples files * Warning cleanup in VFD SWMR code * Committing clang-format changes * Warning cleanup * Warning reduction * More warning fixes * Committing clang-format changes * Even more warning reduction in the VFD SWMR tests * More warning fixes in the VFD SWMR tests * Even more VFD SWMR test warning fixes * Last warning fixes in VFD SWMR * Committing clang-format changes * Minor things missed from develop * Warning fixes from GitHub build failures * Committing clang-format changes * Fix for warning due to weird bit shift type promotion * Yet another attempt at fixing the integral promotion warning Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
Diffstat (limited to 'test')
-rw-r--r--test/cache.c6768
-rw-r--r--test/chunk_info.c96
-rw-r--r--test/objcopy_ref.c2
-rw-r--r--test/page_buffer.c45
-rw-r--r--test/test_swmr.sh.in42
-rw-r--r--test/vfd_swmr.c39
-rw-r--r--test/vfd_swmr_attrdset_writer.c99
-rw-r--r--test/vfd_swmr_bigset_writer.c389
-rw-r--r--test/vfd_swmr_dsetchks_writer.c107
-rw-r--r--test/vfd_swmr_dsetops_writer.c102
-rw-r--r--test/vfd_swmr_gfail_writer.c179
-rw-r--r--test/vfd_swmr_gperf_writer.c197
-rw-r--r--test/vfd_swmr_group_writer.c196
-rw-r--r--test/vfd_swmr_indep_rw_writer.c194
-rw-r--r--test/vfd_swmr_sparse_writer.c2
-rw-r--r--test/vfd_swmr_vlstr_reader.c99
-rw-r--r--test/vfd_swmr_vlstr_writer.c146
-rw-r--r--test/vfd_swmr_zoo_writer.c73
18 files changed, 3870 insertions, 4905 deletions
diff --git a/test/cache.c b/test/cache.c
index 2f69157..45e6263 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);
@@ -4829,7 +4844,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) {
@@ -4842,85 +4861,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,
@@ -4936,79 +4975,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,
@@ -5021,53 +5066,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,
@@ -5082,53 +5132,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,
@@ -5150,53 +5205,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,
@@ -5242,53 +5302,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,
@@ -5330,53 +5395,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,
@@ -5416,53 +5486,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,
@@ -5504,65 +5579,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,
@@ -5581,65 +5661,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,
@@ -5658,63 +5743,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,
@@ -5732,65 +5822,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,
@@ -5809,63 +5904,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,
@@ -5908,63 +6008,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,
@@ -6018,165 +6123,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,
@@ -6198,217 +6311,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,
@@ -6429,219 +6552,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,
@@ -6658,105 +6791,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,
@@ -6770,105 +6910,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,
@@ -6952,313 +7099,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,
@@ -7348,313 +7507,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,
@@ -7669,157 +7840,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,
@@ -7836,157 +8016,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,
@@ -7995,6 +8184,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);
@@ -8420,1013 +8612,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) {
@@ -10536,6 +9840,8 @@ check_flush_cache__flush_op_eviction_test(H5F_t *file_ptr)
reset_entries();
}
+ HDfree(expected);
+
} /* check_flush_cache__flush_op_eviction_test() */
/*-------------------------------------------------------------------------
@@ -11606,8 +10912,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;
@@ -11620,529 +10935,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,
@@ -12157,6 +11032,8 @@ check_flush_cache__single_entry(H5F_t *file_ptr)
/* expected_destroyed */ spec[i].expected_destroyed);
i++;
}
+
+ HDfree(spec);
}
} /* check_flush_cache__single_entry() */
@@ -26870,182 +25747,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();
@@ -27686,6 +26438,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();
}
@@ -32857,183 +31611,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();
@@ -33542,6 +32171,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();
}
@@ -33688,24 +32319,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) {
@@ -33860,6 +32517,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() */
/*-------------------------------------------------------------------------
@@ -33900,58 +32559,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) {
@@ -34218,6 +32879,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() */
/*-------------------------------------------------------------------------
@@ -34258,55 +32921,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,
@@ -34348,6 +32968,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) {
@@ -34614,6 +33278,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/chunk_info.c b/test/chunk_info.c
index b19f3df..f041c46 100644
--- a/test/chunk_info.c
+++ b/test/chunk_info.c
@@ -179,11 +179,18 @@ verify_get_chunk_info(hid_t dset, hid_t dspace, hsize_t chk_index, hsize_t exp_c
if (H5Dget_chunk_info(dset, dspace, chk_index, out_offset, &read_flt_msk, &addr, &size) < 0)
TEST_ERROR;
- CHECK(addr, HADDR_UNDEF, "H5Dget_chunk_info");
- VERIFY(size, exp_chk_size, "H5Dget_chunk_info, chunk size");
- VERIFY(read_flt_msk, exp_flt_msk, "H5Dget_chunk_info, filter mask");
- VERIFY(out_offset[0], exp_offset[0], "H5Dget_chunk_info, offset[0]");
- VERIFY(out_offset[1], exp_offset[1], "H5Dget_chunk_info, offset[1]");
+
+ if (HADDR_UNDEF == addr)
+ FAIL_PUTS_ERROR("address cannot be HADDR_UNDEF");
+ if (size != exp_chk_size)
+ FAIL_PUTS_ERROR("unexpected chunk size");
+ if (read_flt_msk != exp_flt_msk)
+ FAIL_PUTS_ERROR("unexpected filter mask");
+ if (out_offset[0] != exp_offset[0])
+ FAIL_PUTS_ERROR("unexpected offset[0]");
+ if (out_offset[1] != exp_offset[1])
+ FAIL_PUTS_ERROR("unexpected offset[1]");
+
return SUCCEED;
error:
@@ -213,9 +220,14 @@ verify_get_chunk_info_by_coord(hid_t dset, hsize_t *offset, hsize_t exp_chk_size
/* Get info of the chunk at logical coordinates specified by offset */
if (H5Dget_chunk_info_by_coord(dset, offset, &read_flt_msk, &addr, &size) < 0)
TEST_ERROR;
- CHECK(addr, HADDR_UNDEF, "H5Dget_chunk_info_by_coord");
- VERIFY(size, exp_chk_size, "H5Dget_chunk_info_by_coord, chunk size");
- VERIFY(read_flt_msk, exp_flt_msk, "H5Dget_chunk_info_by_coord, filter mask");
+
+ if (HADDR_UNDEF == addr)
+ FAIL_PUTS_ERROR("address cannot be HADDR_UNDEF");
+ if (size != exp_chk_size)
+ FAIL_PUTS_ERROR("unexpected chunk size");
+ if (read_flt_msk != exp_flt_msk)
+ FAIL_PUTS_ERROR("unexpected filter mask");
+
return SUCCEED;
error:
@@ -245,8 +257,12 @@ verify_empty_chunk_info(hid_t dset, hsize_t *offset)
/* Get info of the chunk at logical coordinates specified by offset */
if (H5Dget_chunk_info_by_coord(dset, offset, &read_flt_msk, &addr, &size) < 0)
TEST_ERROR;
- VERIFY(addr, HADDR_UNDEF, "H5Dget_chunk_info_by_coord, chunk address");
- VERIFY(size, EMPTY_CHK_SIZE, "H5Dget_chunk_info_by_coord, chunk size");
+
+ if (HADDR_UNDEF != addr)
+ FAIL_PUTS_ERROR("address was not HADDR_UNDEF");
+ if (EMPTY_CHK_SIZE != size)
+ FAIL_PUTS_ERROR("size was not EMPTY_CHK_SIZE");
+
return SUCCEED;
error:
@@ -428,12 +444,14 @@ verify_idx_nchunks(hid_t dset, hid_t dspace, H5D_chunk_index_t exp_idx_type, hsi
/* Get and verify the number of chunks */
if (H5Dget_num_chunks(dset, dspace, &nchunks) < 0)
TEST_ERROR;
- VERIFY(nchunks, exp_num_chunks, "H5Dget_num_chunks, number of chunks");
+ if (nchunks != exp_num_chunks)
+ FAIL_PUTS_ERROR("unexpected number of chunks");
/* Get and verify the number of chunks again, passing in H5S_ALL */
if (H5Dget_num_chunks(dset, H5S_ALL, &nchunks) < 0)
TEST_ERROR;
- VERIFY(nchunks, exp_num_chunks, "H5Dget_num_chunks, number of chunks");
+ if (nchunks != exp_num_chunks)
+ FAIL_PUTS_ERROR("unexpected number of chunks");
return SUCCEED;
@@ -603,7 +621,8 @@ test_get_chunk_info_highest_v18(hid_t fapl)
/* Get and verify the number of chunks written */
if (H5Dget_num_chunks(dset, dspace, &nchunks) < 0)
TEST_ERROR;
- VERIFY(nchunks, NUM_CHUNKS_WRITTEN, "H5Dget_num_chunks, number of chunks");
+ if (NUM_CHUNKS_WRITTEN != nchunks)
+ FAIL_PUTS_ERROR("unexpected number of chunks");
/* Get and verify info of the last written chunk again, passing in H5S_ALL
this time */
@@ -666,7 +685,8 @@ test_get_chunk_info_highest_v18(hid_t fapl)
/* Verify that the number of chunks is 0 */
if (H5Dget_num_chunks(dset, dspace, &nchunks) < 0)
TEST_ERROR;
- VERIFY(nchunks, NO_CHUNK_WRITTEN, "H5Dget_num_chunks, number of chunks");
+ if (NO_CHUNK_WRITTEN != nchunks)
+ FAIL_PUTS_ERROR("unexpected number of chunks");
/* Attempt to get info of a chunk from an empty dataset, should fail */
chk_index = OUTOFRANGE_CHK_INDEX;
@@ -1128,7 +1148,8 @@ test_chunk_info_fixed_array(const char *filename, hid_t fapl)
/* Get and verify the number of chunks written */
if (H5Dget_num_chunks(dset, dspace, &nchunks) < 0)
TEST_ERROR;
- VERIFY(nchunks, NUM_CHUNKS_WRITTEN, "H5Dget_num_chunks, number of chunks");
+ if (NUM_CHUNKS_WRITTEN != nchunks)
+ FAIL_PUTS_ERROR("unexpected number of chunks");
/* Get and verify info of each written chunk */
chk_index = 0;
@@ -1271,7 +1292,8 @@ test_chunk_info_extensible_array(const char *filename, hid_t fapl)
/* Get and verify the number of chunks written */
if (H5Dget_num_chunks(dset, dspace, &nchunks) < 0)
TEST_ERROR;
- VERIFY(nchunks, NUM_CHUNKS_WRITTEN, "H5Dget_num_chunks, number of chunks");
+ if (NUM_CHUNKS_WRITTEN != nchunks)
+ FAIL_PUTS_ERROR("unexpected number of chunks");
/* Get and verify info of each written chunk */
chk_index = 0;
@@ -1419,7 +1441,8 @@ test_chunk_info_version2_btrees(const char *filename, hid_t fapl)
/* Get and verify the number of chunks written */
if (H5Dget_num_chunks(dset, dspace, &nchunks) < 0)
TEST_ERROR;
- VERIFY(nchunks, NUM_CHUNKS_WRITTEN, "H5Dget_num_chunks, number of chunks");
+ if (NUM_CHUNKS_WRITTEN != nchunks)
+ FAIL_PUTS_ERROR("unexpected number of chunks");
/* Go through all written chunks, get their info and verify the values */
chk_index = 0;
@@ -1602,7 +1625,8 @@ test_basic_query(hid_t fapl)
/* Get the number of chunks and verify that no chunk has been written */
if (H5Dget_num_chunks(dset, dspace, &nchunks) < 0)
TEST_ERROR;
- VERIFY(nchunks, NO_CHUNK_WRITTEN, "H5Dget_num_chunks, number of chunks");
+ if (NO_CHUNK_WRITTEN != nchunks)
+ FAIL_PUTS_ERROR("unexpected number of chunks");
/* Initialize the array of chunk data for the single chunk */
for (ii = 0; ii < CHUNK_NX; ii++)
@@ -1618,7 +1642,8 @@ test_basic_query(hid_t fapl)
/* Get and verify that one chunk had been written */
if (H5Dget_num_chunks(dset, dspace, &nchunks) < 0)
TEST_ERROR;
- VERIFY(nchunks, ONE_CHUNK_WRITTEN, "H5Dget_num_chunks, number of chunks");
+ if (ONE_CHUNK_WRITTEN != nchunks)
+ FAIL_PUTS_ERROR("unexpected number of chunks");
/* Get and verify info of the first and only chunk */
if (verify_get_chunk_info(dset, H5S_ALL, 0, CHK_SIZE, offset, flt_msk) == FAIL)
@@ -1649,7 +1674,8 @@ test_basic_query(hid_t fapl)
/* Get and verify that two chunks had been written */
if (H5Dget_num_chunks(dset, dspace, &nchunks) < 0)
TEST_ERROR;
- VERIFY(nchunks, TWO_CHUNKS_WRITTEN, "H5Dget_num_chunks, number of chunks");
+ if (TWO_CHUNKS_WRITTEN != nchunks)
+ FAIL_PUTS_ERROR("unexpected number of chunks");
/* Get and verify info of the first written chunk in the dataset, its
offset should be (0,0) */
@@ -1685,20 +1711,28 @@ test_basic_query(hid_t fapl)
if (H5Dchunk_iter(dset, H5P_DEFAULT, &iter_cb, &udata) < 0)
TEST_ERROR;
- VERIFY(udata.last_index, 1, "Iterator did not iterate all chunks");
- VERIFY(chunk_infos[0].offset[0], 0, "Offset mismatch");
- VERIFY(chunk_infos[0].offset[1], 0, "Offset mismatch");
- VERIFY(chunk_infos[0].filter_mask, 0, "Filter mismatch");
- VERIFY(chunk_infos[0].nbytes, 96, "Size mismatch");
+ if (udata.last_index != 1)
+ FAIL_PUTS_ERROR("Iterator did not iterate over all chunks");
+ if (chunk_infos[0].offset[0] != 0)
+ FAIL_PUTS_ERROR("offset[0] mismatch");
+ if (chunk_infos[0].offset[1] != 0)
+ FAIL_PUTS_ERROR("offset[1] mismatch");
+ if (chunk_infos[0].filter_mask != 0)
+ FAIL_PUTS_ERROR("filter mask mismatch");
+ if (chunk_infos[0].nbytes != 96)
+ FAIL_PUTS_ERROR("size mismatch");
- VERIFY(chunk_infos[1].offset[0], 1, "Offset mismatch");
- VERIFY(chunk_infos[1].offset[1], 1, "Offset mismatch");
+ if (chunk_infos[1].offset[0] != 1)
+ FAIL_PUTS_ERROR("offset[0] mismatch");
+ if (chunk_infos[1].offset[1] != 1)
+ FAIL_PUTS_ERROR("offset[1] mismatch");
/* Iterate and stop after one iteration */
cptr = &(chunk_infos[0]);
if (H5Dchunk_iter(dset, H5P_DEFAULT, &iter_cb_stop, &cptr) < 0)
TEST_ERROR;
- VERIFY(cptr, &(chunk_infos[1]), "Verification of halted iterator failed\n");
+ if (cptr != &(chunk_infos[1]))
+ FAIL_PUTS_ERROR("Verification of halted iterator failed");
/* Iterate and fail after one iteration */
cptr = &(chunk_infos[0]);
@@ -1709,7 +1743,8 @@ test_basic_query(hid_t fapl)
H5E_END_TRY;
if (ret >= 0)
TEST_ERROR;
- VERIFY(cptr, &(chunk_infos[1]), "Verification of halted iterator failed\n");
+ if (cptr != &(chunk_infos[1]))
+ FAIL_PUTS_ERROR("Verification of halted iterator failed");
/* Release resourse */
if (H5Dclose(dset) < 0)
@@ -2102,7 +2137,8 @@ test_flt_msk_with_skip_compress(hid_t fapl)
/* Get and verify the number of chunks written */
if (H5Dget_num_chunks(dset, H5S_ALL, &nchunks) < 0)
TEST_ERROR;
- VERIFY(nchunks, ONE_CHUNK_WRITTEN, "H5Dget_num_chunks, number of chunks");
+ if (ONE_CHUNK_WRITTEN != nchunks)
+ FAIL_PUTS_ERROR("unexpected number of chunks");
/* Get and verify info of the first and only chunk */
chk_index = 0;
diff --git a/test/objcopy_ref.c b/test/objcopy_ref.c
index d10adf6..ef20cb4 100644
--- a/test/objcopy_ref.c
+++ b/test/objcopy_ref.c
@@ -939,8 +939,10 @@ compare_data(hid_t parent1, hid_t parent2, hid_t pid, hid_t tid, size_t nelmts,
H5R_ref_t *ref_buf1, *ref_buf2; /* Aliases for buffers to compare */
/* Loop over elements in buffers */
+ H5_GCC_CLANG_DIAG_OFF("cast-qual")
ref_buf1 = (H5R_ref_t *)buf1;
ref_buf2 = (H5R_ref_t *)buf2;
+ H5_GCC_CLANG_DIAG_ON("cast-qual")
for (u = 0; u < nelmts; u++, ref_buf1++, ref_buf2++) {
hid_t obj1_id, obj2_id; /* IDs for objects referenced */
H5O_type_t obj1_type, obj2_type; /* Types of objects referenced */
diff --git a/test/page_buffer.c b/test/page_buffer.c
index a97e245..35743d0 100644
--- a/test/page_buffer.c
+++ b/test/page_buffer.c
@@ -97,36 +97,51 @@ error:
static int
swmr_fapl_augment(hid_t fapl, const char *filename, uint32_t max_lag)
{
- H5F_vfd_swmr_config_t config = {.version = H5F__CURR_VFD_SWMR_CONFIG_VERSION,
- .tick_len = 4,
- .max_lag = max_lag,
- .writer = true,
- .maintain_metadata_file = true,
- .generate_updater_files = false,
- .md_pages_reserved = 128};
- char * bname = NULL;
- char * dname = NULL;
+ H5F_vfd_swmr_config_t *config = NULL;
+ char * bname = NULL;
+ char * dname = NULL;
+
+ if (NULL == (config = HDcalloc(1, sizeof(H5F_vfd_swmr_config_t))))
+ goto error;
+
+ config->version = H5F__CURR_VFD_SWMR_CONFIG_VERSION;
+ config->tick_len = 4;
+ config->max_lag = max_lag;
+ config->writer = TRUE;
+ config->maintain_metadata_file = TRUE;
+ config->generate_updater_files = FALSE;
+ config->md_pages_reserved = 128;
if (H5_dirname(filename, &dname) < 0) {
HDfprintf(stderr, "H5_dirname() failed\n");
- return -1;
+ goto error;
}
if (H5_basename(filename, &bname) < 0) {
HDfprintf(stderr, "H5_basename() failed\n");
- return -1;
+ goto error;
}
- HDsnprintf(config.md_file_path, sizeof(config.md_file_path), "%s", dname);
- HDsnprintf(config.md_file_name, sizeof(config.md_file_name), "%s.shadow", bname);
+ HDsnprintf(config->md_file_path, sizeof(config->md_file_path), "%s", dname);
+ HDsnprintf(config->md_file_name, sizeof(config->md_file_name), "%s.shadow", bname);
HDfree(dname);
HDfree(bname);
/* Enable VFD SWMR configuration */
- if (H5Pset_vfd_swmr_config(fapl, &config) < 0) {
+ if (H5Pset_vfd_swmr_config(fapl, config) < 0) {
HDfprintf(stderr, "H5Pset_vrd_swmr_config failed\n");
- return -1;
+ goto error;
}
+
+ HDfree(config);
+
return 0;
+
+error:
+ HDfree(dname);
+ HDfree(bname);
+ HDfree(config);
+
+ return -1;
}
static bool
diff --git a/test/test_swmr.sh.in b/test/test_swmr.sh.in
index cdf9d0b..012b024 100644
--- a/test/test_swmr.sh.in
+++ b/test/test_swmr.sh.in
@@ -171,7 +171,7 @@ do
$testdir/swmr_generator -q $compress $index_type
if test $? -ne 0; then
echo generator had error
- nerrors=$((nerrors + 1))
+ nerrors=`expr $nerrors + 1`
fi
# Launch the Generator with SWMR_WRITE
@@ -179,7 +179,7 @@ do
$testdir/swmr_generator -q -s $compress $index_type
if test $? -ne 0; then
echo generator had error
- nerrors=$((nerrors + 1))
+ nerrors=`expr $nerrors + 1`
fi
# Check for error and exit if one occurred
@@ -217,7 +217,7 @@ do
seed=""
$testdir/swmr_reader -q $Nsecs_add $seed 2>&1 |tee swmr_reader.out.$n &
pid_readers="$pid_readers $!"
- n=$((n + 1))
+ n=`expr $n + 1`
done
$DPRINT pid_readers=$pid_readers
$IFDEBUG ps
@@ -229,7 +229,7 @@ do
wait $xpid
if test $? -ne 0; then
echo reader had error
- nerrors=$((nerrors + 1))
+ nerrors=`expr $nerrors + 1`
fi
done
@@ -238,7 +238,7 @@ do
wait $pid_writer
if test $? -ne 0; then
echo writer had error
- nerrors=$((nerrors + 1))
+ nerrors=`expr $nerrors + 1`
fi
# Check for error and exit if one occurred
@@ -263,7 +263,7 @@ do
$testdir/swmr_generator -q -s $compress $index_type
if test $? -ne 0; then
echo generator had error
- nerrors=$((nerrors + 1))
+ nerrors=`expr $nerrors + 1`
fi
# Remove any possible writer message file before launching writer
@@ -289,7 +289,7 @@ do
seed=""
$testdir/swmr_reader -q $Nsecs_add $seed 2>&1 |tee swmr_reader.out.$n &
pid_readers="$pid_readers $!"
- n=$((n + 1))
+ n=`expr $n + 1`
done
$DPRINT pid_readers=$pid_readers
$IFDEBUG ps
@@ -301,7 +301,7 @@ do
wait $xpid
if test $? -ne 0; then
echo reader had error
- nerrors=$((nerrors + 1))
+ nerrors=`expr $nerrors + 1`
fi
done
@@ -310,7 +310,7 @@ do
wait $pid_writer
if test $? -ne 0; then
echo writer had error
- nerrors=$((nerrors + 1))
+ nerrors=`expr $nerrors + 1`
fi
# Check for error and exit if one occurred
@@ -352,7 +352,7 @@ do
seed=""
$testdir/swmr_remove_reader -q $Nsecs_rem $seed 2>&1 |tee swmr_reader.out.$n &
pid_readers="$pid_readers $!"
- n=$((n + 1))
+ n=`expr $n + 1`
done
$DPRINT pid_readers=$pid_readers
$IFDEBUG ps
@@ -364,7 +364,7 @@ do
wait $xpid
if test $? -ne 0; then
echo reader had error
- nerrors=$((nerrors + 1))
+ nerrors=`expr $nerrors + 1`
fi
done
@@ -373,7 +373,7 @@ do
wait $pid_writer
if test $? -ne 0; then
echo writer had error
- nerrors=$((nerrors + 1))
+ nerrors=`expr $nerrors + 1`
fi
# Check for error and exit if one occurred
@@ -398,7 +398,7 @@ do
$testdir/swmr_generator -q $compress $index_type
if test $? -ne 0; then
echo generator had error
- nerrors=$((nerrors + 1))
+ nerrors=`expr $nerrors + 1`
fi
# Launch the Writer (not in parallel - just to rebuild the datasets)
@@ -407,7 +407,7 @@ do
$testdir/swmr_writer -q $Nrecords $seed
if test $? -ne 0; then
echo writer had error
- nerrors=$((nerrors + 1))
+ nerrors=`expr $nerrors + 1`
fi
# Remove any possible writer message file before launching writer
@@ -433,7 +433,7 @@ do
seed=""
$testdir/swmr_remove_reader -q $Nsecs_addrem $seed 2>&1 |tee swmr_reader.out.$n &
pid_readers="$pid_readers $!"
- n=$((n + 1))
+ n=`expr $n + 1`
done
$DPRINT pid_readers=$pid_readers
$IFDEBUG ps
@@ -445,7 +445,7 @@ do
wait $xpid
if test $? -ne 0; then
echo reader had error
- nerrors=$((nerrors + 1))
+ nerrors=`expr $nerrors + 1`
fi
done
@@ -454,7 +454,7 @@ do
wait $pid_writer
if test $? -ne 0; then
echo writer had error
- nerrors=$((nerrors + 1))
+ nerrors=`expr $nerrors + 1`
fi
# Check for error and exit if one occurred
@@ -482,7 +482,7 @@ do
$testdir/swmr_generator -q $compress $index_type $seed
if test $? -ne 0; then
echo generator had error
- nerrors=$((nerrors + 1))
+ nerrors=`expr $nerrors + 1`
fi
# Remove any possible writer message file before launching writer
@@ -504,7 +504,7 @@ do
# The sparse reader spits out a LOT of data so it's set to 'quiet'
$testdir/swmr_sparse_reader -q $Nrecs_spa 2>&1 |tee swmr_reader.out.$n &
pid_readers="$pid_readers $!"
- n=$((n + 1))
+ n=`expr $n + 1`
done
$DPRINT pid_readers=$pid_readers
$IFDEBUG ps
@@ -514,7 +514,7 @@ do
wait $pid_writer
if test $? -ne 0; then
echo writer had error
- nerrors=$((nerrors + 1))
+ nerrors=`expr $nerrors + 1`
fi
# Collect exit code of the readers
@@ -523,7 +523,7 @@ do
wait $xpid
if test $? -ne 0; then
echo reader had error
- nerrors=$((nerrors + 1))
+ nerrors=`expr $nerrors + 1`
fi
done
diff --git a/test/vfd_swmr.c b/test/vfd_swmr.c
index 94c4910..8297961 100644
--- a/test/vfd_swmr.c
+++ b/test/vfd_swmr.c
@@ -95,7 +95,10 @@ static const char *namebases[] = {FILENAME, FILENAME2, FILENAME3, FNAME, NULL};
/* Size of "flags" field in the updater file header */
#define UD_SIZE_2 2
-#define Swap2Bytes(val) ((((val) >> 8) & 0x00FF) | (((val) << 8) & 0xFF00))
+/* Note that bitwise operations often perform integral promotion, so you have
+ * to cast the result to avoid warnings.
+ */
+#define Swap2Bytes(val) (uint16_t)((((val) >> 8) & 0x00FF) | (((val) << 8) & 0xFF00))
#define Swap8Bytes(val) \
((((val) >> 56) & 0x00000000000000FF) | (((val) >> 40) & 0x000000000000FF00) | \
@@ -4861,14 +4864,14 @@ error:
static unsigned
test_updater_generate_md_checksums(hid_t orig_fapl, hbool_t file_create)
{
- char filename[FILE_NAME_LEN]; /* Filename to use */
- hid_t fid = H5I_INVALID_HID; /* File ID */
- hid_t fcpl = H5I_INVALID_HID; /* File creation property list ID */
- hid_t fapl = H5I_INVALID_HID; /* File access property list ID */
- H5F_vfd_swmr_config_t config; /* Configuration for VFD SWMR */
- H5F_generate_md_ck_cb_t cb_info; /* Callback */
- H5F_t * f = NULL; /* Internal file object pointer */
- char * md_file_path_name;
+ char filename[FILE_NAME_LEN]; /* Filename to use */
+ hid_t fid = H5I_INVALID_HID; /* File ID */
+ hid_t fcpl = H5I_INVALID_HID; /* File creation property list ID */
+ hid_t fapl = H5I_INVALID_HID; /* File access property list ID */
+ H5F_vfd_swmr_config_t * config = NULL; /* Configuration for VFD SWMR */
+ H5F_generate_md_ck_cb_t cb_info; /* Callback */
+ H5F_t * f = NULL; /* Internal file object pointer */
+ char * md_file_path_name = NULL;
if (file_create) {
TESTING("VFD SWMR updater generate checksums for metadata file with H5Fcreate");
@@ -4879,16 +4882,19 @@ test_updater_generate_md_checksums(hid_t orig_fapl, hbool_t file_create)
h5_fixname(namebase4, orig_fapl, filename, sizeof(filename));
+ if (NULL == (config = HDmalloc(sizeof(H5F_vfd_swmr_config_t))))
+ TEST_ERROR;
+
/* config, tick_len, max_lag, presume_posix_semantics, writer,
* maintain_metadata_file, generate_updater_files, flush_raw_data, md_pages_reserved,
* md_file_path, md_file_name, updater_file_path */
- init_vfd_swmr_config(&config, 4, 7, FALSE, TRUE, TRUE, TRUE, TRUE, 2, NULL, MD_FILE, UD_FILE);
+ init_vfd_swmr_config(config, 4, 7, FALSE, TRUE, TRUE, TRUE, TRUE, 2, NULL, MD_FILE, UD_FILE);
if ((fapl = H5Pcopy(orig_fapl)) < 0)
FAIL_STACK_ERROR;
/* fapl, use_latest_format, only_meta_page, page_buf_size, config */
- if (vfd_swmr_fapl_augment(fapl, TRUE, FALSE, 4096, &config) < 0)
+ if (vfd_swmr_fapl_augment(fapl, TRUE, FALSE, 4096, config) < 0)
FAIL_STACK_ERROR;
if ((fcpl = vfd_swmr_create_fcpl(H5F_FSPACE_STRATEGY_PAGE, 4096)) < 0) {
@@ -4935,11 +4941,13 @@ test_updater_generate_md_checksums(hid_t orig_fapl, hbool_t file_create)
FAIL_STACK_ERROR;
/* Verify contents of checksum file and updater files */
- if (verify_ud_chk(md_file_path_name, config.updater_file_path) < 0)
+ if (verify_ud_chk(md_file_path_name, config->updater_file_path) < 0)
TEST_ERROR;
/* It's important to clean up the checksum and updater files. */
- clean_chk_ud_files(md_file_path_name, config.updater_file_path);
+ clean_chk_ud_files(md_file_path_name, config->updater_file_path);
+
+ HDfree(config);
PASSED();
@@ -4955,7 +4963,10 @@ error:
H5E_END_TRY;
/* It's important to clean up the chechsum and updater files. */
- clean_chk_ud_files(md_file_path_name, config.updater_file_path);
+ if (md_file_path_name && config)
+ clean_chk_ud_files(md_file_path_name, config->updater_file_path);
+
+ HDfree(config);
return 1;
diff --git a/test/vfd_swmr_attrdset_writer.c b/test/vfd_swmr_attrdset_writer.c
index 85ceb01..2602abe 100644
--- a/test/vfd_swmr_attrdset_writer.c
+++ b/test/vfd_swmr_attrdset_writer.c
@@ -66,16 +66,6 @@ typedef struct {
hbool_t use_vfd_swmr; /* For -S option */
} state_t;
-/* Initializations for state_t */
-#define ALL_HID_INITIALIZER \
- (state_t) \
- { \
- .file = H5I_INVALID_HID, .one_by_one_sid = H5I_INVALID_HID, .filename = "", \
- .filetype = H5T_NATIVE_UINT32, .asteps = 0, .csteps = 1, .dattrs = 0, .use_np = TRUE, \
- .use_vfd_swmr = TRUE, .compact = FALSE, .contig = FALSE, .chunked = FALSE, .vl_attr = FALSE, \
- .mod_attr = FALSE, .update_interval = READER_WAIT_TICKS \
- }
-
/* Structure to hold info for different dataset types */
typedef struct {
hid_t compact_did; /* ID for compact dataset */
@@ -226,7 +216,23 @@ state_init(state_t *s, int argc, const char *const *argv)
const char * s_opts = "pgkvmbqSNa:d:u:c:";
struct h5_long_options l_opts[] = {{NULL, 0, '\0'}};
- *s = ALL_HID_INITIALIZER;
+ s->file = H5I_INVALID_HID;
+ s->one_by_one_sid = H5I_INVALID_HID;
+ s->filetype = H5T_NATIVE_UINT32;
+ s->asteps = 0;
+ s->csteps = 1;
+ s->dattrs = 0;
+ s->use_np = TRUE;
+ s->use_vfd_swmr = TRUE;
+ s->compact = FALSE;
+ s->contig = FALSE;
+ s->chunked = FALSE;
+ s->vl_attr = FALSE;
+ s->mod_attr = FALSE;
+ s->update_interval = READER_WAIT_TICKS;
+
+ HDmemset(s->filename, 0, PATH_MAX);
+ HDmemset(s->progname, 0, PATH_MAX);
if (H5_basename(argv[0], &tfile) < 0) {
HDprintf("H5_basename failed\n");
@@ -1956,21 +1962,30 @@ error:
int
main(int argc, char **argv)
{
- hid_t fapl = H5I_INVALID_HID;
- hid_t fcpl = H5I_INVALID_HID;
- hbool_t writer = FALSE;
- state_t s;
- const char * personality;
- H5F_vfd_swmr_config_t config;
- np_state_t np;
- dsets_state_t ds;
-
- if (!state_init(&s, argc, (const char *const *)argv)) {
+ hid_t fapl = H5I_INVALID_HID;
+ hid_t fcpl = H5I_INVALID_HID;
+ hbool_t writer = FALSE;
+ state_t * s = NULL;
+ const char * personality;
+ H5F_vfd_swmr_config_t *config = NULL;
+ np_state_t np;
+ dsets_state_t ds;
+
+ if (NULL == (s = HDcalloc(1, sizeof(state_t)))) {
+ HDprintf("memory allocation failed");
+ TEST_ERROR;
+ }
+ if (NULL == (config = HDcalloc(1, sizeof(H5F_vfd_swmr_config_t)))) {
+ HDprintf("memory allocation failed");
+ TEST_ERROR;
+ }
+
+ if (!state_init(s, argc, (const char *const *)argv)) {
HDprintf("state_init() failed\n");
TEST_ERROR;
}
- personality = HDstrstr(s.progname, "vfd_swmr_attrdset_");
+ personality = HDstrstr(s->progname, "vfd_swmr_attrdset_");
if (personality != NULL && HDstrcmp(personality, "vfd_swmr_attrdset_writer") == 0)
writer = TRUE;
@@ -1984,10 +1999,10 @@ main(int argc, char **argv)
/* config, tick_len, max_lag, presume_posix_semantics, writer,
* maintain_metadata_file, generate_updater_files, flush_raw_data, md_pages_reserved,
* md_file_path, md_file_name, updater_file_path */
- init_vfd_swmr_config(&config, 4, 7, FALSE, writer, TRUE, FALSE, TRUE, 128, "./", "attrdset-shadow", NULL);
+ init_vfd_swmr_config(config, 4, 7, FALSE, writer, TRUE, FALSE, TRUE, 128, "./", "attrdset-shadow", NULL);
/* use_latest_format, use_vfd_swmr, only_meta_page, page_buf_size, config */
- if ((fapl = vfd_swmr_create_fapl(TRUE, s.use_vfd_swmr, TRUE, 4096, &config)) < 0) {
+ if ((fapl = vfd_swmr_create_fapl(TRUE, s->use_vfd_swmr, TRUE, 4096, config)) < 0) {
HDprintf("vfd_swmr_create_fapl() failed\n");
TEST_ERROR;
}
@@ -1999,41 +2014,41 @@ main(int argc, char **argv)
}
if (writer) {
- if ((s.file = H5Fcreate(s.filename, H5F_ACC_TRUNC, fcpl, fapl)) < 0) {
+ if ((s->file = H5Fcreate(s->filename, H5F_ACC_TRUNC, fcpl, fapl)) < 0) {
HDprintf("H5Fcreate failed\n");
TEST_ERROR;
}
- if (!create_dsets(&s, &ds)) {
+ if (!create_dsets(s, &ds)) {
HDprintf("create_dsets() failed\n");
TEST_ERROR;
}
}
else {
- if ((s.file = H5Fopen(s.filename, H5F_ACC_RDONLY, fapl)) < 0) {
+ if ((s->file = H5Fopen(s->filename, H5F_ACC_RDONLY, fapl)) < 0) {
HDprintf("H5Fopen failed\n");
TEST_ERROR;
}
- if (!open_dsets(&s, &ds)) {
+ if (!open_dsets(s, &ds)) {
HDprintf("open_dsets() failed\n");
TEST_ERROR;
}
}
/* Initiailze named pipes */
- if (s.use_np && !np_init(&np, writer)) {
+ if (s->use_np && !np_init(&np, writer)) {
HDprintf("np_init() failed\n");
TEST_ERROR;
}
if (writer) {
- if (!perform_dsets_operations(&s, &ds, &config, &np)) {
+ if (!perform_dsets_operations(s, &ds, config, &np)) {
HDprintf("perform_dsets_operations() failed\n");
TEST_ERROR;
}
}
else {
- if (!verify_dsets_operations(&s, &ds, &config, &np)) {
+ if (!verify_dsets_operations(s, &ds, config, &np)) {
HDprintf("verify_dsets_operations() failed\n");
TEST_ERROR;
}
@@ -2054,21 +2069,24 @@ main(int argc, char **argv)
TEST_ERROR;
}
- if (H5Fclose(s.file) < 0) {
+ if (H5Fclose(s->file) < 0) {
HDprintf("H5Fclose failed\n");
TEST_ERROR;
}
- if (H5Sclose(s.one_by_one_sid) < 0) {
+ if (H5Sclose(s->one_by_one_sid) < 0) {
HDprintf("H5Sclose failed\n");
TEST_ERROR;
}
- if (s.use_np && !np_close(&np, writer)) {
+ if (s->use_np && !np_close(&np, writer)) {
HDprintf("np_close() failed\n");
TEST_ERROR;
}
+ HDfree(s);
+ HDfree(config);
+
return EXIT_SUCCESS;
error:
@@ -2076,22 +2094,25 @@ error:
{
H5Pclose(fapl);
H5Pclose(fcpl);
- H5Fclose(s.file);
- H5Sclose(s.one_by_one_sid);
+ H5Fclose(s->file);
+ H5Sclose(s->one_by_one_sid);
}
H5E_END_TRY;
- if (s.use_np && np.fd_writer_to_reader >= 0)
+ if (s->use_np && np.fd_writer_to_reader >= 0)
HDclose(np.fd_writer_to_reader);
- if (s.use_np && np.fd_reader_to_writer >= 0)
+ if (s->use_np && np.fd_reader_to_writer >= 0)
HDclose(np.fd_reader_to_writer);
- if (s.use_np && !writer) {
+ if (s->use_np && !writer) {
HDremove(np.fifo_writer_to_reader);
HDremove(np.fifo_reader_to_writer);
}
+ HDfree(s);
+ HDfree(config);
+
return EXIT_FAILURE;
} /* main */
diff --git a/test/vfd_swmr_bigset_writer.c b/test/vfd_swmr_bigset_writer.c
index 508fc3b..9f39c77 100644
--- a/test/vfd_swmr_bigset_writer.c
+++ b/test/vfd_swmr_bigset_writer.c
@@ -129,20 +129,22 @@ typedef struct _sources {
hid_t ul, ur, bl, br;
} sources_t;
-#define MANY_FILES 4
+#define N_FILES 4
typedef struct {
hid_t * dataset;
sources_t * sources;
- hid_t file[MANY_FILES];
+ hid_t file[N_FILES];
hid_t dapl, filetype, memspace, one_by_one_sid, quadrant_dcpl;
unsigned ndatasets;
- const char *filename[MANY_FILES];
+ const char *filename[N_FILES];
char progname[PATH_MAX];
struct {
quadrant_t ul, ur, bl, br, src;
} quadrants;
- unsigned int depth, cols, rows;
+ unsigned int depth;
+ unsigned int cols;
+ unsigned int rows;
unsigned int asteps;
unsigned int nsteps;
unsigned int part_chunk;
@@ -187,61 +189,10 @@ typedef struct {
struct timespec time;
} exchange_info_t;
-/* Initializations for np_state_t */
-#define NP_INITIALIZER \
- (np_state_t) \
- { \
- .fifo_writer_to_reader = "./fifo_bigset_writer_to_reader", \
- .fifo_reader_to_writer = "./fifo_bigset_reader_to_writer", .fd_writer_to_reader = -1, \
- .fd_reader_to_writer = -1, .notify = 0, .verify = 0 \
- }
-
-static inline state_t
-state_initializer(void)
-{
- return (state_t){.memspace = H5I_INVALID_HID,
- .dapl = H5I_INVALID_HID,
- .file = {H5I_INVALID_HID, H5I_INVALID_HID, H5I_INVALID_HID, H5I_INVALID_HID},
- .filetype = H5T_NATIVE_UINT32,
- .one_by_one_sid = H5I_INVALID_HID,
- .quadrant_dcpl = H5I_INVALID_HID,
- .depth = DEPTH,
- .rows = ROWS,
- .cols = COLS,
- .ndatasets = 5,
- .asteps = 10,
- .nsteps = 100,
- .part_chunk = 0,
- .skip_chunk = SKIP_CHUNK,
- .over_extend = 1,
- .filename = {"", "", "", ""},
- .expand_2d = false,
- .test_3d = false,
- .vds = vds_off,
- .use_vfd_swmr = true,
- .use_legacy_swmr = false,
- .use_named_pipe = true,
- .use_aux_proc = false,
- .do_perf = false,
- .cross_chunk_read = false,
- .writer = true,
- .fixed_array = false,
- .one_dee_max_dims = {ROWS, H5S_UNLIMITED},
- .chunk_dims = {ROWS, COLS},
- .fsp_size = FSP_SIZE,
- .page_buf_size = PAGE_BUF_SIZE,
- .tick_len = TICK_LEN,
- .max_lag = MAX_LAG,
- .flush_raw_data = false,
- .mdc_init_size = 0,
- .chunk_cache_size = 0,
- .deflate_level = 0,
- .ival = (struct timespec){.tv_sec = MAX_READ_LEN_IN_SECONDS, .tv_nsec = 0}};
-}
-
static bool state_init(state_t *, int, char **);
-static hsize_t two_dee_max_dims[RANK2], three_dee_max_dims[RANK3];
+static hsize_t two_dee_max_dims[RANK2];
+static hsize_t three_dee_max_dims[RANK3];
static void
usage(const char *progname)
@@ -324,7 +275,6 @@ state_init(state_t *s, int argc, char **argv)
{
unsigned long tmp;
int opt;
- unsigned i;
const hsize_t dims = 1;
char * tfile = NULL;
char * end;
@@ -336,7 +286,49 @@ state_init(state_t *s, int argc, char **argv)
const char * s_opts = "ACFMNPRSTVa:bc:d:e:f:g:j:k:l:m:n:o:p:qr:s:tu:v:w:";
struct h5_long_options l_opts[] = {{NULL, 0, '\0'}};
- *s = state_initializer();
+ s->memspace = H5I_INVALID_HID;
+ s->dapl = H5I_INVALID_HID;
+ s->filetype = H5T_NATIVE_UINT32;
+ s->one_by_one_sid = H5I_INVALID_HID;
+ s->quadrant_dcpl = H5I_INVALID_HID;
+ s->depth = DEPTH;
+ s->rows = ROWS;
+ s->cols = COLS;
+ s->ndatasets = 5;
+ s->asteps = 10;
+ s->nsteps = 100;
+ s->part_chunk = 0;
+ s->skip_chunk = SKIP_CHUNK;
+ s->over_extend = 1;
+ s->expand_2d = false;
+ s->test_3d = false;
+ s->vds = vds_off;
+ s->use_vfd_swmr = true;
+ s->use_legacy_swmr = false;
+ s->use_named_pipe = true;
+ s->use_aux_proc = false;
+ s->do_perf = false;
+ s->cross_chunk_read = false;
+ s->writer = true, s->fixed_array = false, s->one_dee_max_dims[0] = ROWS;
+ s->one_dee_max_dims[1] = H5S_UNLIMITED;
+ s->chunk_dims[0] = ROWS;
+ s->chunk_dims[1] = COLS;
+ s->fsp_size = FSP_SIZE;
+ s->page_buf_size = PAGE_BUF_SIZE;
+ s->tick_len = TICK_LEN;
+ s->max_lag = MAX_LAG;
+ s->flush_raw_data = false;
+ s->mdc_init_size = 0;
+ s->chunk_cache_size = 0;
+ s->deflate_level = 0;
+
+ s->ival.tv_sec = MAX_READ_LEN_IN_SECONDS;
+ s->ival.tv_nsec = 0;
+
+ for (int i = 0; i < N_FILES; i++) {
+ s->file[i] = H5I_INVALID_HID;
+ s->filename[i] = "";
+ }
if (H5_basename(argv[0], &tfile) < 0) {
HDfprintf(stderr, "H5_basename failed\n");
@@ -448,9 +440,10 @@ state_init(state_t *s, int argc, char **argv)
s->part_chunk = (unsigned)tmp;
else if (opt == 'l') {
/* Translate the tick number to time represented by the timespec struct */
- float time = (float)(((unsigned)tmp * TICK_LEN) / 10.0);
- unsigned sec = (unsigned)time;
- unsigned nsec = (unsigned)((time - sec) * 10 * 1000 * 1000);
+ unsigned n_ticks = (unsigned)tmp * TICK_LEN;
+ float time = (float)n_ticks / 10.0F;
+ long sec = (long)time;
+ long nsec = (long)((time - (float)sec) * 10 * 1000 * 1000);
s->ival.tv_sec = sec;
s->ival.tv_nsec = nsec;
@@ -666,7 +659,7 @@ state_init(state_t *s, int argc, char **argv)
TEST_ERROR;
}
- for (i = 0; i < s->ndatasets; i++) {
+ for (unsigned i = 0; i < s->ndatasets; i++) {
s->dataset[i] = H5I_INVALID_HID;
s->sources[i].ul = s->sources[i].ur = s->sources[i].bl = s->sources[i].br = H5I_INVALID_HID;
}
@@ -938,7 +931,12 @@ error:
static bool
np_init(np_state_t *np, bool writer)
{
- *np = NP_INITIALIZER;
+ np->fifo_writer_to_reader = "./fifo_bigset_writer_to_reader";
+ np->fifo_reader_to_writer = "./fifo_bigset_reader_to_writer";
+ np->fd_writer_to_reader = -1;
+ np->fd_reader_to_writer = -1;
+ np->notify = 0;
+ np->verify = 0;
/*
* Use two named pipes(FIFO) to coordinate the writer and reader for
@@ -1028,11 +1026,11 @@ error:
/* Wait for the writer's notice before starting validation */
static int
-reader_verify(np_state_t np, int verify)
+reader_verify(np_state_t *np, int verify)
{
int notify;
- if (HDread(np.fd_writer_to_reader, &notify, sizeof(int)) < 0) {
+ if (HDread(np->fd_writer_to_reader, &notify, sizeof(int)) < 0) {
HDfprintf(stderr, "HDread failed\n");
TEST_ERROR;
}
@@ -1103,7 +1101,7 @@ error:
* This time period is from the writer finishing dataset creation to the reader finishing
* the validation of dataset creation */
static int
-reader_check_time_and_notify_writer(np_state_t *np, state_t s)
+reader_check_time_and_notify_writer(np_state_t *np, state_t *s)
{
struct timespec last = {0, 0};
@@ -1116,7 +1114,7 @@ reader_check_time_and_notify_writer(np_state_t *np, state_t s)
/* If the dataset validation takes longer than the expected time, issue a warning.
* This time period is from the writer finishing dataset creation to the reader finishing
* the validation of dataset creation */
- if (below_speed_limit(&last, &(s.ival))) {
+ if (below_speed_limit(&last, &(s->ival))) {
AT();
HDfprintf(stderr, "Warning: dataset validation took too long to finish\n");
}
@@ -1242,14 +1240,13 @@ md_ck_cb(char *md_file_path, uint64_t updater_seq_num)
if (chk_fp && HDfclose(chk_fp) != 0)
FAIL_STACK_ERROR;
- if (buf)
- HDfree(buf);
+ HDfree(buf);
return 0;
error:
- if (buf)
- HDfree(buf);
+ HDfree(buf);
+
if (md_fp)
HDfclose(md_fp);
if (chk_fp)
@@ -1580,13 +1577,13 @@ error:
}
static bool
-create_dsets(state_t s)
+create_dsets(state_t *s)
{
struct timespec start_time, end_time;
unsigned int which;
/* For checking the time spent in dataset creation. It's for running the writer alone */
- if (s.do_perf) {
+ if (s->do_perf) {
if (HDclock_gettime(CLOCK_MONOTONIC, &start_time) == -1) {
HDfprintf(stderr, "HDclock_gettime failed");
TEST_ERROR;
@@ -1596,14 +1593,14 @@ create_dsets(state_t s)
/* Create NDATASETS datasets as the reader is doing verification. So no communication with
* the reader during the creation of datasets.
*/
- for (which = 0; which < s.ndatasets; which++)
- if (!create_extensible_dset(&s, which)) {
+ for (which = 0; which < s->ndatasets; which++)
+ if (!create_extensible_dset(s, which)) {
HDfprintf(stderr, "create_extensible_dset failed: number %u\n", which);
TEST_ERROR;
}
/* For checking the time spent in dataset creation. It's for running the writer alone */
- if (s.do_perf) {
+ if (s->do_perf) {
if (HDclock_gettime(CLOCK_MONOTONIC, &end_time) == -1) {
HDfprintf(stderr, "HDclock_gettime failed");
TEST_ERROR;
@@ -1642,7 +1639,7 @@ error:
}
static mat_t *
-newmat(state_t s)
+newmat(state_t *s)
{
mat_t *mat;
@@ -1650,31 +1647,31 @@ newmat(state_t s)
* If partial chunk is enabled, the chunk size along the growing dimension
* is replaced with the partial size
*/
- if (s.test_3d) {
- if (s.part_chunk) {
- mat = HDmalloc(sizeof(*mat) + (s.part_chunk * s.rows * s.cols - 1) * sizeof(mat->elt[0]));
- mat->depth = s.part_chunk;
+ if (s->test_3d) {
+ if (s->part_chunk) {
+ mat = HDmalloc(sizeof(*mat) + (s->part_chunk * s->rows * s->cols - 1) * sizeof(mat->elt[0]));
+ mat->depth = s->part_chunk;
}
else {
- mat = HDmalloc(sizeof(*mat) + (s.depth * s.rows * s.cols - 1) * sizeof(mat->elt[0]));
- mat->depth = s.depth;
+ mat = HDmalloc(sizeof(*mat) + (s->depth * s->rows * s->cols - 1) * sizeof(mat->elt[0]));
+ mat->depth = s->depth;
}
- mat->rows = s.rows;
- mat->cols = s.cols;
+ mat->rows = s->rows;
+ mat->cols = s->cols;
}
else {
- if (s.part_chunk && !s.expand_2d) {
- mat = HDmalloc(sizeof(*mat) + (s.rows * s.part_chunk - 1) * sizeof(mat->elt[0]));
+ if (s->part_chunk && !s->expand_2d) {
+ mat = HDmalloc(sizeof(*mat) + (s->rows * s->part_chunk - 1) * sizeof(mat->elt[0]));
mat->depth = 1;
- mat->rows = s.rows;
- mat->cols = s.part_chunk;
+ mat->rows = s->rows;
+ mat->cols = s->part_chunk;
}
else {
- mat = HDmalloc(sizeof(*mat) + (s.rows * s.cols - 1) * sizeof(mat->elt[0]));
+ mat = HDmalloc(sizeof(*mat) + (s->rows * s->cols - 1) * sizeof(mat->elt[0]));
mat->depth = 1;
- mat->rows = s.rows;
- mat->cols = s.cols;
+ mat->rows = s->rows;
+ mat->cols = s->cols;
}
}
@@ -1771,7 +1768,7 @@ verify_matrix(mat_t *mat, unsigned int which, base_t base)
}
static unsigned int
-calc_total_steps(state_t s)
+calc_total_steps(state_t *s)
{
unsigned int total_steps = 0;
@@ -1781,20 +1778,20 @@ calc_total_steps(state_t s)
* 60. When the size of the partial chunk along the growing dimension is 5
* (treated as the new chunk size), the number of steps becomes 12.
*/
- if (s.test_3d) {
- if (s.part_chunk)
- total_steps = s.nsteps * s.depth / s.part_chunk;
+ if (s->test_3d) {
+ if (s->part_chunk)
+ total_steps = s->nsteps * s->depth / s->part_chunk;
else
- total_steps = s.nsteps;
+ total_steps = s->nsteps;
}
- else if (s.expand_2d) {
- total_steps = s.nsteps;
+ else if (s->expand_2d) {
+ total_steps = s->nsteps;
}
else {
- if (s.part_chunk)
- total_steps = s.nsteps * s.cols / s.part_chunk;
+ if (s->part_chunk)
+ total_steps = s->nsteps * s->cols / s->part_chunk;
else
- total_steps = s.nsteps;
+ total_steps = s->nsteps;
}
return total_steps;
@@ -2010,7 +2007,6 @@ verify_extensible_dset(state_t *s, unsigned int which, mat_t *mat, unsigned fini
hsize_t size2[RANK2], size3[RANK3];
base_t base, last;
unsigned int nchunks, step, ofs;
- int i;
h5_retry_t retry;
hbool_t do_try; /* more tries remain */
@@ -2173,7 +2169,7 @@ error:
}
static bool
-verify_dsets(state_t s, np_state_t *np, mat_t *mat)
+verify_dsets(state_t *s, np_state_t *np, mat_t *mat)
{
unsigned finished_step = 0;
unsigned which;
@@ -2189,16 +2185,16 @@ verify_dsets(state_t s, np_state_t *np, mat_t *mat)
/* Receive the notice of the writer finishing creation,
* including the number of chunks finished and the timestamp
*/
- if (s.use_named_pipe && HDread(np->fd_writer_to_reader, &last, sizeof(last)) < 0) {
+ if (s->use_named_pipe && HDread(np->fd_writer_to_reader, &last, sizeof(last)) < 0) {
HDfprintf(stderr, "HDread failed\n");
TEST_ERROR;
}
- for (which = 0; which < s.ndatasets; which++) {
+ for (which = 0; which < s->ndatasets; which++) {
/* Verify the chunks starting from the finished one in last round
* to the ones written in this round
*/
- if (!verify_extensible_dset(&s, which, mat, finished_step, last.step)) {
+ if (!verify_extensible_dset(s, which, mat, finished_step, last.step)) {
HDfprintf(stderr, "verify_extensible_dset failed\n");
TEST_ERROR;
}
@@ -2210,7 +2206,7 @@ verify_dsets(state_t s, np_state_t *np, mat_t *mat)
/* Make sure the chunk verification doesn't take longer than the expected time.
* This time period is from the writer finishing chunks to the reader finishing
* the validation of the chunks */
- if (s.use_named_pipe && below_speed_limit(&(last.time), &(s.ival))) {
+ if (s->use_named_pipe && below_speed_limit(&(last.time), &(s->ival))) {
AT();
HDfprintf(stderr, "Warning: verify_extensible_dset took too long to finish\n");
}
@@ -2218,7 +2214,7 @@ verify_dsets(state_t s, np_state_t *np, mat_t *mat)
/* For checking the time lapse between the writer's finishing writing a batch of chunks
* within a tick and the reader's finishing verifying those chunks
*/
- if (s.use_named_pipe && s.do_perf) {
+ if (s->use_named_pipe && s->do_perf) {
if (HDclock_gettime(CLOCK_MONOTONIC, &end_time) == -1) {
HDfprintf(stderr, "HDclock_gettime failed");
TEST_ERROR;
@@ -2238,7 +2234,7 @@ verify_dsets(state_t s, np_state_t *np, mat_t *mat)
} while (finished_step < total_steps);
/* Print out the performance information */
- if (s.use_named_pipe && s.do_perf && counter)
+ if (s->use_named_pipe && s->do_perf && counter)
HDfprintf(stdout, "Dataset verification: mean time = %lf, max time = %lf, min time = %lf\n",
total_time / (double)counter, max_time, min_time);
@@ -2456,20 +2452,20 @@ error:
}
static bool
-write_dsets(state_t s, np_state_t *np, mat_t *mat)
+write_dsets(state_t *s, np_state_t *np, mat_t *mat)
{
unsigned last_step, step, total_steps, which;
unsigned long long old_tick_num;
H5F_t * f = NULL;
struct timespec start_time, end_time;
- if (NULL == (f = (H5F_t *)H5VL_object(s.file[0]))) {
+ if (NULL == (f = (H5F_t *)H5VL_object(s->file[0]))) {
HDfprintf(stderr, "H5VL_object failed\n");
TEST_ERROR;
}
/* For checking the time spent in writing data. It's for running the writer alone */
- if (s.do_perf) {
+ if (s->do_perf) {
if (HDclock_gettime(CLOCK_MONOTONIC, &start_time) == -1) {
HDfprintf(stderr, "HDclock_gettime failed");
TEST_ERROR;
@@ -2488,10 +2484,10 @@ write_dsets(state_t s, np_state_t *np, mat_t *mat)
for (step = 0; step < total_steps; step++) {
/* Write as many as chunks before the tick number changes */
if (f->shared->tick_num == old_tick_num) {
- if (!s.skip_chunk || (s.skip_chunk && step % s.skip_chunk != 0)) {
- for (which = 0; which < s.ndatasets; which++) {
+ if (!s->skip_chunk || (s->skip_chunk && step % s->skip_chunk != 0)) {
+ for (which = 0; which < s->ndatasets; which++) {
dbgf(2, "step %d which %d\n", step, which);
- if (!write_extensible_dset(&s, which, step, mat)) {
+ if (!write_extensible_dset(s, which, step, mat)) {
HDfprintf(stderr, "write_extensible_dset failed\n");
TEST_ERROR;
}
@@ -2504,7 +2500,7 @@ write_dsets(state_t s, np_state_t *np, mat_t *mat)
*/
if (f->shared->tick_num > old_tick_num || step == (total_steps - 1)) {
last_step = step + 1;
- if (s.use_named_pipe && notify_reader(np, last_step) < 0) {
+ if (s->use_named_pipe && notify_reader(np, last_step) < 0) {
HDfprintf(stderr, "notify_reader failed\n");
TEST_ERROR;
}
@@ -2514,7 +2510,7 @@ write_dsets(state_t s, np_state_t *np, mat_t *mat)
}
/* For checking the time spent in writing data. It's for running the writer alone */
- if (s.do_perf) {
+ if (s->do_perf) {
double throughput;
double time_passed;
@@ -2526,13 +2522,13 @@ write_dsets(state_t s, np_state_t *np, mat_t *mat)
time_passed = TIME_PASSED(start_time, end_time);
/* Calculate the write speed */
- if (s.test_3d)
+ if (s->test_3d)
throughput =
- ((double)(sizeof(unsigned int) * s.depth * s.rows * s.cols * s.nsteps * s.ndatasets)) /
+ ((double)(sizeof(unsigned int) * s->depth * s->rows * s->cols * s->nsteps * s->ndatasets)) /
time_passed;
else
throughput =
- ((double)(sizeof(unsigned int) * s.rows * s.cols * s.nsteps * s.ndatasets)) / time_passed;
+ ((double)(sizeof(unsigned int) * s->rows * s->cols * s->nsteps * s->ndatasets)) / time_passed;
/* Print out the performance information */
HDfprintf(stdout,
@@ -2550,14 +2546,20 @@ error:
int
main(int argc, char **argv)
{
- mat_t * mat = NULL;
- hid_t fcpl = H5I_INVALID_HID;
- unsigned which;
- state_t s;
- np_state_t np;
- size_t i;
-
- if (!state_init(&s, argc, argv)) {
+ mat_t * mat = NULL;
+ hid_t fcpl = H5I_INVALID_HID;
+ state_t * s = NULL;
+ np_state_t * np = NULL;
+ H5F_vfd_swmr_config_t *config = NULL;
+
+ if (NULL == (s = HDcalloc(1, sizeof(state_t))))
+ TEST_ERROR;
+ if (NULL == (np = HDcalloc(1, sizeof(np_state_t))))
+ TEST_ERROR;
+ if (NULL == (config = HDcalloc(1, sizeof(H5F_vfd_swmr_config_t))))
+ TEST_ERROR;
+
+ if (!state_init(s, argc, argv)) {
HDfprintf(stderr, "state_init failed\n");
TEST_ERROR;
}
@@ -2568,18 +2570,19 @@ main(int argc, char **argv)
}
/* Set fs_strategy (file space strategy) and fs_page_size (file space page size) */
- if ((fcpl = vfd_swmr_create_fcpl(H5F_FSPACE_STRATEGY_PAGE, s.fsp_size)) < 0) {
+ if ((fcpl = vfd_swmr_create_fcpl(H5F_FSPACE_STRATEGY_PAGE, s->fsp_size)) < 0) {
HDfprintf(stderr, "vfd_swmr_create_fcpl failed\n");
TEST_ERROR;
}
- for (i = 0; i < NELMTS(s.file); i++) {
- hid_t fapl;
- H5F_vfd_swmr_config_t config;
- H5AC_cache_config_t mdc_config;
+ for (size_t i = 0; i < NELMTS(s->file); i++) {
+ hid_t fapl;
+ H5AC_cache_config_t mdc_config;
+
+ HDmemset(config, 0, sizeof(H5F_vfd_swmr_config_t));
- if (s.vds != vds_multi && i > 0) {
- s.file[i] = s.file[0];
+ if (s->vds != vds_multi && i > 0) {
+ s->file[i] = s->file[0];
continue;
}
@@ -2591,29 +2594,29 @@ main(int argc, char **argv)
/* If using the auxiliary process, the writer creates the updater files.
* The reader uses the metadata file generated by the auxiliary process. */
- if (s.writer) {
- init_vfd_swmr_config(&config, s.tick_len, s.max_lag, FALSE, s.writer, FALSE, TRUE,
- s.flush_raw_data, 128, "./", "bigset-shadow-%zu", "bigset_updater", i);
+ if (s->writer) {
+ init_vfd_swmr_config(config, s->tick_len, s->max_lag, FALSE, s->writer, FALSE, TRUE,
+ s->flush_raw_data, 128, "./", "bigset-shadow-%zu", "bigset_updater", i);
}
else {
- init_vfd_swmr_config(&config, s.tick_len, s.max_lag, FALSE, s.writer, TRUE, FALSE,
- s.flush_raw_data, 128, "./", "mdfile", NULL);
+ init_vfd_swmr_config(config, s->tick_len, s->max_lag, FALSE, s->writer, TRUE, FALSE,
+ s->flush_raw_data, 128, "./", "mdfile", NULL);
}
#else
- if (s.vds == vds_multi || s.vds == vds_single) {
- init_vfd_swmr_config(&config, s.tick_len, s.max_lag, TRUE, s.writer, TRUE, FALSE,
- s.flush_raw_data, 128, "", "", NULL);
+ if (s->vds == vds_multi || s->vds == vds_single) {
+ init_vfd_swmr_config(config, s->tick_len, s->max_lag, TRUE, s->writer, TRUE, FALSE,
+ s->flush_raw_data, 128, "", "%s", NULL, "");
}
else {
- init_vfd_swmr_config(&config, s.tick_len, s.max_lag, FALSE, s.writer, TRUE, FALSE,
- s.flush_raw_data, 128, "./", "bigset-shadow-%zu", NULL, i);
+ init_vfd_swmr_config(config, s->tick_len, s->max_lag, FALSE, s->writer, TRUE, FALSE,
+ s->flush_raw_data, 128, "./", "bigset-shadow-%zu", NULL, i);
}
#endif
/* use_latest_format, use_vfd_swmr, only_meta_page, page_buf_size, config */
- if ((fapl = vfd_swmr_create_fapl(true, s.use_vfd_swmr, true, s.page_buf_size, &config)) < 0) {
+ if ((fapl = vfd_swmr_create_fapl(true, s->use_vfd_swmr, true, s->page_buf_size, config)) < 0) {
HDfprintf(stderr, "vfd_swmr_create_fapl failed");
TEST_ERROR;
}
@@ -2621,7 +2624,7 @@ main(int argc, char **argv)
/* Set the initial size for the metadata cache between 1 and 32 in megabytes.
* Zero means using the default value, which is no-op.
*/
- if (s.mdc_init_size) {
+ if (s->mdc_init_size) {
mdc_config.version = H5AC__CURR_CACHE_CONFIG_VERSION;
if (H5Pget_mdc_config(fapl, &mdc_config) < 0) {
@@ -2631,7 +2634,7 @@ main(int argc, char **argv)
/* Convert the value to megabytes */
mdc_config.set_initial_size = TRUE;
- mdc_config.initial_size = s.mdc_init_size * 1024 * 1024;
+ mdc_config.initial_size = s->mdc_init_size * 1024 * 1024;
if (H5Pset_mdc_config(fapl, &mdc_config) < 0) {
HDfprintf(stderr, "H5Pset_mdc_config failed");
@@ -2652,11 +2655,11 @@ main(int argc, char **argv)
}
#endif
- s.file[i] = s.writer ? H5Fcreate(s.filename[i], H5F_ACC_TRUNC, fcpl, fapl)
- : H5Fopen(s.filename[i], H5F_ACC_RDONLY, fapl);
+ s->file[i] = s->writer ? H5Fcreate(s->filename[i], H5F_ACC_TRUNC, fcpl, fapl)
+ : H5Fopen(s->filename[i], H5F_ACC_RDONLY, fapl);
- if (s.file[i] == H5I_INVALID_HID) {
- HDfprintf(stderr, s.writer ? "H5Fcreate failed" : "H5Fopen failed");
+ if (s->file[i] == H5I_INVALID_HID) {
+ HDfprintf(stderr, s->writer ? "H5Fcreate failed" : "H5Fopen failed");
TEST_ERROR;
}
@@ -2667,15 +2670,15 @@ main(int argc, char **argv)
}
/* Initiailze named pipes */
- if (s.use_named_pipe && !np_init(&np, s.writer)) {
+ if (s->use_named_pipe && !np_init(np, s->writer)) {
HDfprintf(stderr, "np_init() failed\n");
TEST_ERROR;
}
- if (s.writer) {
+ if (s->writer) {
/* Writer tells reader to start */
- np.notify = 1;
- if (s.use_named_pipe && HDwrite(np.fd_writer_to_reader, &np.notify, sizeof(int)) < 0) {
+ np->notify = 1;
+ if (s->use_named_pipe && HDwrite(np->fd_writer_to_reader, &(np->notify), sizeof(int)) < 0) {
HDfprintf(stderr, "HDwrite failed\n");
TEST_ERROR;
}
@@ -2687,18 +2690,16 @@ main(int argc, char **argv)
}
/* Call H5Fvfd_swmr_end_tick to end the tick. No communication with the reader in this step */
- if (s.use_vfd_swmr && s.use_named_pipe) {
- unsigned long j;
-
- if (s.vds != vds_multi) {
- if (H5Fvfd_swmr_end_tick(s.file[0]) < 0) {
+ if (s->use_vfd_swmr && s->use_named_pipe) {
+ if (s->vds != vds_multi) {
+ if (H5Fvfd_swmr_end_tick(s->file[0]) < 0) {
HDfprintf(stderr, "H5Fvfd_swmr_end_tick failed\n");
TEST_ERROR;
}
}
else {
- for (j = 0; j < NELMTS(s.file); j++)
- if (H5Fvfd_swmr_end_tick(s.file[j]) < 0) {
+ for (unsigned long j = 0; j < NELMTS(s->file); j++)
+ if (H5Fvfd_swmr_end_tick(s->file[j]) < 0) {
HDfprintf(stderr, "H5Fvfd_swmr_end_tick failed\n");
TEST_ERROR;
}
@@ -2707,29 +2708,29 @@ main(int argc, char **argv)
/* Notify the reader of finishing dataset creation by sending the timestamp
* and wait for the reader to finish validation before proceeding */
- np.verify = 2;
- if (s.use_named_pipe && notify_and_wait_for_reader(&s, &np) < 0) {
+ np->verify = 2;
+ if (s->use_named_pipe && notify_and_wait_for_reader(s, np) < 0) {
HDfprintf(stderr, "notify_and_wait_for_reader failed\n");
TEST_ERROR;
}
/* Enable the Legacy SWMR writing mode if specified */
- if (s.use_legacy_swmr && H5Fstart_swmr_write(s.file[0]) < 0) {
+ if (s->use_legacy_swmr && H5Fstart_swmr_write(s->file[0]) < 0) {
HDfprintf(stderr, "failed to start the Legacy SWMR writing mode\n");
TEST_ERROR;
}
/* Start to write chunks. The writer writes as many chunks as possible within a tick, then
* notify the reader. But it doesn't receive back the reader's notice. */
- if (!write_dsets(s, &np, mat)) {
+ if (!write_dsets(s, np, mat)) {
HDfprintf(stderr, "write_dsets failed");
TEST_ERROR;
}
}
else {
/* Wait for the writer's notice before starting the validation of dataset creation */
- np.verify = 1;
- if (s.use_named_pipe && reader_verify(np, np.verify) < 0) {
+ np->verify = 1;
+ if (s->use_named_pipe && reader_verify(np, np->verify) < 0) {
HDfprintf(stderr, "reader_verify failed\n");
TEST_ERROR;
}
@@ -2737,7 +2738,7 @@ main(int argc, char **argv)
/* Open all the datasets as the writer is creating them. No communication with
* the writer during this step.
*/
- if (!open_extensible_dset(&s)) {
+ if (!open_extensible_dset(s)) {
HDfprintf(stderr, "open_extensible_dset failed\n");
TEST_ERROR;
}
@@ -2746,8 +2747,8 @@ main(int argc, char **argv)
* Make sure the dataset creation doesn't take longer than the expected time.
* This time period is from the writer finishing dataset creation to the reader finishing
* the validation of dataset creation */
- np.notify = 2;
- if (s.use_named_pipe && reader_check_time_and_notify_writer(&np, s) < 0) {
+ np->notify = 2;
+ if (s->use_named_pipe && reader_check_time_and_notify_writer(np, s) < 0) {
HDfprintf(stderr, "reader_check_time_and_notify_writer failed\n");
TEST_ERROR;
}
@@ -2755,14 +2756,14 @@ main(int argc, char **argv)
/* Once the reader starts to verify the datasets, it doesn't notify the writer any info.
* Both the reader and writer finish by themselves.
*/
- if (!verify_dsets(s, &np, mat)) {
+ if (!verify_dsets(s, np, mat)) {
HDfprintf(stderr, "verify_dsets failed\n");
TEST_ERROR;
}
}
- for (which = 0; which < s.ndatasets; which++)
- if (!close_extensible_dset(&s, which)) {
+ for (unsigned which = 0; which < s->ndatasets; which++)
+ if (!close_extensible_dset(s, which)) {
HDfprintf(stderr, "close_extensible_dset failed\n");
TEST_ERROR;
}
@@ -2772,18 +2773,20 @@ main(int argc, char **argv)
TEST_ERROR;
}
- if (s.use_named_pipe && !np_close(&np, s.writer)) {
+ if (s->use_named_pipe && !np_close(np, s->writer)) {
HDfprintf(stderr, "np_close() failed\n");
TEST_ERROR;
}
- if (!state_destroy(&s)) {
+ if (!state_destroy(s)) {
HDfprintf(stderr, "state_destroy failed\n");
TEST_ERROR;
}
- if (mat)
- HDfree(mat);
+ HDfree(mat);
+ HDfree(s);
+ HDfree(np);
+ HDfree(config);
return EXIT_SUCCESS;
@@ -2792,24 +2795,26 @@ error:
{
H5Pclose(fcpl);
- for (i = 0; i < NELMTS(s.file); i++)
- H5Fclose(s.file[i]);
+ for (size_t i = 0; i < NELMTS(s->file); i++)
+ H5Fclose(s->file[i]);
}
H5E_END_TRY;
- if (s.use_named_pipe && np.fd_writer_to_reader >= 0)
- HDclose(np.fd_writer_to_reader);
+ if (s->use_named_pipe && np->fd_writer_to_reader >= 0)
+ HDclose(np->fd_writer_to_reader);
- if (s.use_named_pipe && np.fd_reader_to_writer >= 0)
- HDclose(np.fd_reader_to_writer);
+ if (s->use_named_pipe && np->fd_reader_to_writer >= 0)
+ HDclose(np->fd_reader_to_writer);
- if (s.use_named_pipe && !s.writer) {
- HDremove(np.fifo_writer_to_reader);
- HDremove(np.fifo_reader_to_writer);
+ if (s->use_named_pipe && !s->writer) {
+ HDremove(np->fifo_writer_to_reader);
+ HDremove(np->fifo_reader_to_writer);
}
- if (mat)
- HDfree(mat);
+ HDfree(mat);
+ HDfree(s);
+ HDfree(np);
+ HDfree(config);
return EXIT_FAILURE;
}
diff --git a/test/vfd_swmr_dsetchks_writer.c b/test/vfd_swmr_dsetchks_writer.c
index 8847afd..a97f84f 100644
--- a/test/vfd_swmr_dsetchks_writer.c
+++ b/test/vfd_swmr_dsetchks_writer.c
@@ -93,17 +93,6 @@ typedef struct {
unsigned int ydecrs; /* -y <ydecrs> option */
} state_t;
-/* Initializations for state_t */
-#define ALL_HID_INITIALIZER \
- (state_t) \
- { \
- .filename = "", .file = H5I_INVALID_HID, .filetype = H5T_NATIVE_UINT32, \
- .update_interval = READER_WAIT_TICKS, .csteps = 1, .use_np = true, .use_vfd_swmr = true, \
- .use_filter = false, .flush_raw_data = true, .single_index = false, .implicit_index = false, \
- .fa_index = false, .ea_index = false, .bt2_index = false, .rows = 10, .cols = 5, .gwrites = 0, \
- .pwrites = 0, .twrites = 0, .lwrites = 0, .xincrs = 0, .ydecrs = 0 \
- }
-
/* Structure to hold info for different dataset types */
typedef struct {
hsize_t chunk_dims[2]; /* Chunk dimensions for all datasets except single_did */
@@ -268,7 +257,30 @@ state_init(state_t *s, int argc, char **argv)
const char * s_opts = "siferom:n:x:y:g:p:t:l:bqSNUu:c:";
struct h5_long_options l_opts[] = {{NULL, 0, '\0'}};
- *s = ALL_HID_INITIALIZER;
+ s->file = H5I_INVALID_HID;
+ s->filetype = H5T_NATIVE_UINT32;
+ s->update_interval = READER_WAIT_TICKS;
+ s->csteps = 1;
+ s->use_np = TRUE;
+ s->use_vfd_swmr = TRUE;
+ s->use_filter = FALSE;
+ s->flush_raw_data = TRUE;
+ s->single_index = FALSE;
+ s->implicit_index = FALSE;
+ s->fa_index = FALSE;
+ s->ea_index = FALSE;
+ s->bt2_index = FALSE;
+ s->rows = 10;
+ s->cols = 5;
+ s->gwrites = 0;
+ s->pwrites = 0;
+ s->twrites = 0;
+ s->lwrites = 0;
+ s->xincrs = 0;
+ s->ydecrs = 0;
+
+ HDmemset(s->filename, 0, PATH_MAX);
+ HDmemset(s->progname, 0, PATH_MAX);
if (H5_basename(argv[0], &tfile) < 0) {
HDprintf("H5_basename failed\n");
@@ -2283,21 +2295,30 @@ error:
int
main(int argc, char **argv)
{
- hid_t fapl = H5I_INVALID_HID;
- hid_t fcpl = H5I_INVALID_HID;
- bool writer = false;
- state_t s;
- const char * personality;
- H5F_vfd_swmr_config_t config;
- np_state_t np;
- dsets_state_t ds;
-
- if (!state_init(&s, argc, argv)) {
+ hid_t fapl = H5I_INVALID_HID;
+ hid_t fcpl = H5I_INVALID_HID;
+ bool writer = false;
+ state_t * s = NULL;
+ const char * personality;
+ H5F_vfd_swmr_config_t *config = NULL;
+ np_state_t np;
+ dsets_state_t ds;
+
+ if (NULL == (s = HDcalloc(1, sizeof(state_t)))) {
+ HDprintf("memory allocation failed");
+ TEST_ERROR;
+ }
+ if (NULL == (config = HDcalloc(1, sizeof(H5F_vfd_swmr_config_t)))) {
+ HDprintf("memory allocation failed");
+ TEST_ERROR;
+ }
+
+ if (!state_init(s, argc, argv)) {
HDprintf("state_init() failed\n");
TEST_ERROR;
}
- personality = HDstrstr(s.progname, "vfd_swmr_dsetchks_");
+ personality = HDstrstr(s->progname, "vfd_swmr_dsetchks_");
if (personality != NULL && HDstrcmp(personality, "vfd_swmr_dsetchks_writer") == 0)
writer = true;
@@ -2311,11 +2332,11 @@ main(int argc, char **argv)
/* config, tick_len, max_lag, presume_posix_semantics, writer,
* maintain_metadata_file, generate_updater_files, flush_raw_data, md_pages_reserved,
* md_file_path, md_file_name, updater_file_path */
- init_vfd_swmr_config(&config, 4, 7, FALSE, writer, TRUE, FALSE, s.flush_raw_data, 128, "./",
+ init_vfd_swmr_config(config, 4, 7, FALSE, writer, TRUE, FALSE, s->flush_raw_data, 128, "./",
"dsetchks-shadow", NULL);
/* use_latest_format, use_vfd_swmr, only_meta_page, page_buf_size, config */
- if ((fapl = vfd_swmr_create_fapl(true, s.use_vfd_swmr, true, 4096, &config)) < 0) {
+ if ((fapl = vfd_swmr_create_fapl(true, s->use_vfd_swmr, true, 4096, config)) < 0) {
HDprintf("vfd_swmr_create_fapl() failed\n");
TEST_ERROR;
}
@@ -2327,43 +2348,43 @@ main(int argc, char **argv)
}
if (writer) {
- if ((s.file = H5Fcreate(s.filename, H5F_ACC_TRUNC, fcpl, fapl)) < 0) {
+ if ((s->file = H5Fcreate(s->filename, H5F_ACC_TRUNC, fcpl, fapl)) < 0) {
HDprintf("H5Fcreate failed\n");
TEST_ERROR;
}
- if (!create_dsets(&s, &ds)) {
+ if (!create_dsets(s, &ds)) {
HDprintf("create_dsets() failed\n");
TEST_ERROR;
}
}
else {
- if ((s.file = H5Fopen(s.filename, H5F_ACC_RDONLY, fapl)) < 0) {
+ if ((s->file = H5Fopen(s->filename, H5F_ACC_RDONLY, fapl)) < 0) {
HDprintf("H5Fopen failed\n");
TEST_ERROR;
}
- if (!open_dsets(&s, &ds)) {
+ if (!open_dsets(s, &ds)) {
HDprintf("open_dsets() failed\n");
TEST_ERROR;
}
}
/* Initiailze named pipes */
- if (s.use_np && !np_init(&np, writer)) {
+ if (s->use_np && !np_init(&np, writer)) {
HDprintf("np_init() failed\n");
TEST_ERROR;
}
if (writer) {
- if (!perform_dsets_operations(&s, &ds, &config, &np)) {
+ if (!perform_dsets_operations(s, &ds, config, &np)) {
HDprintf("perform_dsets_operations() failed\n");
TEST_ERROR;
}
}
else {
- if (!verify_dsets_operations(&s, &ds, &config, &np, false)) {
+ if (!verify_dsets_operations(s, &ds, config, &np, false)) {
HDprintf("perform_dsets_operations() failed\n");
TEST_ERROR;
}
@@ -2384,9 +2405,9 @@ main(int argc, char **argv)
* Nothing needs to be done for -x or -y options
* (increase and decrease dataset dimension sizes).
*/
- if (!s.flush_raw_data && !s.xincrs && !s.ydecrs && s.use_np) {
+ if (!s->flush_raw_data && !s->xincrs && !s->ydecrs && s->use_np) {
- if (!closing_on_noflush(writer, &s, &ds, &config, &np))
+ if (!closing_on_noflush(writer, s, &ds, config, &np))
TEST_ERROR;
}
else {
@@ -2396,17 +2417,20 @@ main(int argc, char **argv)
TEST_ERROR;
}
- if (H5Fclose(s.file) < 0) {
+ if (H5Fclose(s->file) < 0) {
HDprintf("H5Fclose failed\n");
TEST_ERROR;
}
- if (s.use_np && !np_close(&np, writer)) {
+ if (s->use_np && !np_close(&np, writer)) {
HDprintf("np_close() failed\n");
TEST_ERROR;
}
}
+ HDfree(s);
+ HDfree(config);
+
return EXIT_SUCCESS;
error:
@@ -2414,21 +2438,24 @@ error:
{
H5Pclose(fapl);
H5Pclose(fcpl);
- H5Fclose(s.file);
+ H5Fclose(s->file);
}
H5E_END_TRY;
- if (s.use_np && np.fd_writer_to_reader >= 0)
+ if (s->use_np && np.fd_writer_to_reader >= 0)
HDclose(np.fd_writer_to_reader);
- if (s.use_np && np.fd_reader_to_writer >= 0)
+ if (s->use_np && np.fd_reader_to_writer >= 0)
HDclose(np.fd_reader_to_writer);
- if (s.use_np && !writer) {
+ if (s->use_np && !writer) {
HDremove(np.fifo_writer_to_reader);
HDremove(np.fifo_reader_to_writer);
}
+ HDfree(s);
+ HDfree(config);
+
return EXIT_FAILURE;
}
diff --git a/test/vfd_swmr_dsetops_writer.c b/test/vfd_swmr_dsetops_writer.c
index 8030be5..a238e95 100644
--- a/test/vfd_swmr_dsetops_writer.c
+++ b/test/vfd_swmr_dsetops_writer.c
@@ -91,17 +91,6 @@ typedef struct {
unsigned int lastwrite; /* The last operation (-s, -r, -l or -w) performed. */
} state_t;
-/* Initializations for state_t */
-#define ALL_HID_INITIALIZER \
- (state_t) \
- { \
- .filename = "", .file = H5I_INVALID_HID, .filetype = H5T_NATIVE_UINT32, \
- .update_interval = READER_WAIT_TICKS, .csteps = 1, .use_np = true, .use_vfd_swmr = true, \
- .flush_raw_data = true, .compact = false, .compact_write = false, .compact_elmts = MAX_COMPACT_ELMS, \
- .contig = false, .rows = 10, .cols = 5, .swrites = 0, .rwrites = 0, .lwrites = 0, .wwrites = 0, \
- .lastwrite = 0, .obj_ref = false, .reg_ref = false \
- }
-
/* Structure to hold info for different dataset types */
typedef struct {
hid_t compact_did; /* ID for compact dataset */
@@ -270,7 +259,29 @@ state_init(state_t *s, int argc, char **argv)
const char * s_opts = "pte:gkm:n:s:r:l:w:bqSNUORu:c:";
struct h5_long_options l_opts[] = {{NULL, 0, '\0'}};
- *s = ALL_HID_INITIALIZER;
+ s->file = H5I_INVALID_HID;
+ s->filetype = H5T_NATIVE_UINT32;
+ s->update_interval = READER_WAIT_TICKS;
+ s->csteps = 1;
+ s->use_np = TRUE;
+ s->use_vfd_swmr = TRUE;
+ s->flush_raw_data = TRUE;
+ s->compact = FALSE;
+ s->compact_write = FALSE;
+ s->compact_elmts = MAX_COMPACT_ELMS;
+ s->contig = FALSE;
+ s->rows = 10;
+ s->cols = 5;
+ s->swrites = 0;
+ s->rwrites = 0;
+ s->lwrites = 0;
+ s->wwrites = 0;
+ s->lastwrite = 0;
+ s->obj_ref = FALSE;
+ s->reg_ref = FALSE;
+
+ HDmemset(s->filename, 0, PATH_MAX);
+ HDmemset(s->progname, 0, PATH_MAX);
if (H5_basename(argv[0], &tfile) < 0) {
HDprintf("H5_basename failed\n");
@@ -2203,21 +2214,26 @@ error:
int
main(int argc, char **argv)
{
- hid_t fapl = H5I_INVALID_HID;
- hid_t fcpl = H5I_INVALID_HID;
- bool writer = FALSE;
- state_t s;
- const char * personality;
- H5F_vfd_swmr_config_t config;
- np_state_t np;
- dsets_state_t ds;
-
- if (!state_init(&s, argc, argv)) {
+ hid_t fapl = H5I_INVALID_HID;
+ hid_t fcpl = H5I_INVALID_HID;
+ bool writer = FALSE;
+ state_t * s = NULL;
+ const char * personality;
+ H5F_vfd_swmr_config_t *config = NULL;
+ np_state_t np;
+ dsets_state_t ds;
+
+ if (NULL == (s = HDcalloc(1, sizeof(state_t))))
+ TEST_ERROR;
+ if (NULL == (config = HDcalloc(1, sizeof(H5F_vfd_swmr_config_t))))
+ TEST_ERROR;
+
+ if (!state_init(s, argc, argv)) {
HDprintf("state_init() failed\n");
TEST_ERROR;
}
- personality = HDstrstr(s.progname, "vfd_swmr_dsetops_");
+ personality = HDstrstr(s->progname, "vfd_swmr_dsetops_");
if (personality != NULL && HDstrcmp(personality, "vfd_swmr_dsetops_writer") == 0)
writer = true;
@@ -2231,11 +2247,11 @@ main(int argc, char **argv)
/* config, tick_len, max_lag, presume_posix_semantics, writer,
* maintain_metadata_file, generate_updater_files, flush_raw_data, md_pages_reserved,
* md_file_path, md_file_name, updater_file_path */
- init_vfd_swmr_config(&config, 4, 7, FALSE, writer, TRUE, FALSE, s.flush_raw_data, 128, "./",
+ init_vfd_swmr_config(config, 4, 7, FALSE, writer, TRUE, FALSE, s->flush_raw_data, 128, "./",
"dsetops-shadow", NULL);
/* use_latest_format, use_vfd_swmr, only_meta_page, page_buf_size, config */
- if ((fapl = vfd_swmr_create_fapl(true, s.use_vfd_swmr, true, 4096, &config)) < 0) {
+ if ((fapl = vfd_swmr_create_fapl(true, s->use_vfd_swmr, true, 4096, config)) < 0) {
HDprintf("vfd_swmr_create_fapl() failed\n");
TEST_ERROR;
}
@@ -2247,43 +2263,43 @@ main(int argc, char **argv)
}
if (writer) {
- if ((s.file = H5Fcreate(s.filename, H5F_ACC_TRUNC, fcpl, fapl)) < 0) {
+ if ((s->file = H5Fcreate(s->filename, H5F_ACC_TRUNC, fcpl, fapl)) < 0) {
HDprintf("H5Fcreate failed\n");
TEST_ERROR;
}
- if (!create_dsets(&s, &ds)) {
+ if (!create_dsets(s, &ds)) {
HDprintf("create_dsets() failed\n");
TEST_ERROR;
}
}
else {
- if ((s.file = H5Fopen(s.filename, H5F_ACC_RDONLY, fapl)) < 0) {
+ if ((s->file = H5Fopen(s->filename, H5F_ACC_RDONLY, fapl)) < 0) {
HDprintf("H5Fopen failed\n");
TEST_ERROR;
}
- if (!open_dsets(&s, &ds)) {
+ if (!open_dsets(s, &ds)) {
HDprintf("open_dsets() failed\n");
TEST_ERROR;
}
}
/* Initiailze named pipes */
- if (s.use_np && !np_init(&np, writer)) {
+ if (s->use_np && !np_init(&np, writer)) {
HDprintf("np_init() failed\n");
TEST_ERROR;
}
if (writer) {
- if (!perform_dsets_operations(&s, &ds, &config, &np)) {
+ if (!perform_dsets_operations(s, &ds, config, &np)) {
HDprintf("perform_dsets_operations() failed\n");
TEST_ERROR;
}
}
else {
- if (!verify_dsets_operations(&s, &ds, &config, &np, false)) {
+ if (!verify_dsets_operations(s, &ds, config, &np, false)) {
HDprintf("perform_dsets_operations() failed\n");
TEST_ERROR;
}
@@ -2299,9 +2315,9 @@ main(int argc, char **argv)
TEST_ERROR;
}
- if (!s.flush_raw_data && s.use_np) {
+ if (!s->flush_raw_data && s->use_np) {
- if (!closing_on_noflush(writer, &s, &ds, &config, &np))
+ if (!closing_on_noflush(writer, s, &ds, config, &np))
TEST_ERROR;
}
else {
@@ -2311,17 +2327,20 @@ main(int argc, char **argv)
TEST_ERROR;
}
- if (H5Fclose(s.file) < 0) {
+ if (H5Fclose(s->file) < 0) {
HDprintf("H5Fclose failed\n");
TEST_ERROR;
}
- if (s.use_np && !np_close(&np, writer)) {
+ if (s->use_np && !np_close(&np, writer)) {
HDprintf("np_close() failed\n");
TEST_ERROR;
}
}
+ HDfree(s);
+ HDfree(config);
+
return EXIT_SUCCESS;
error:
@@ -2329,21 +2348,24 @@ error:
{
H5Pclose(fapl);
H5Pclose(fcpl);
- H5Fclose(s.file);
+ H5Fclose(s->file);
}
H5E_END_TRY;
- if (s.use_np && np.fd_writer_to_reader >= 0)
+ if (s->use_np && np.fd_writer_to_reader >= 0)
HDclose(np.fd_writer_to_reader);
- if (s.use_np && np.fd_reader_to_writer >= 0)
+ if (s->use_np && np.fd_reader_to_writer >= 0)
HDclose(np.fd_reader_to_writer);
- if (s.use_np && !writer) {
+ if (s->use_np && !writer) {
HDremove(np.fifo_writer_to_reader);
HDremove(np.fifo_reader_to_writer);
}
+ HDfree(s);
+ HDfree(config);
+
return EXIT_FAILURE;
}
diff --git a/test/vfd_swmr_gfail_writer.c b/test/vfd_swmr_gfail_writer.c
index 8b8f00e..8662c11 100644
--- a/test/vfd_swmr_gfail_writer.c
+++ b/test/vfd_swmr_gfail_writer.c
@@ -138,15 +138,6 @@ typedef struct {
int np_verify;
} state_t;
-#define ALL_HID_INITIALIZER \
- (state_t) \
- { \
- .file = H5I_INVALID_HID, .one_by_one_sid = H5I_INVALID_HID, .filename = "", \
- .filetype = H5T_NATIVE_UINT32, .nsteps = 10000, .use_vfd_swmr = true, .old_style_grp = false, \
- .use_named_pipes = true, .w_sleep_len = 112, .tick_len = 4, .max_lag = 7, .ps = 4096, .pbs = 4096, \
- .del_grp = false, .np_fd_w_to_r = -1, .np_fd_r_to_w = -1, .np_notify = 0, .np_verify = 0 \
- }
-
/*
* Operator function to be called by H5Literate.
*/
@@ -189,7 +180,26 @@ state_init(state_t *s, int argc, char **argv)
char * tfile = NULL;
char * end;
- *s = ALL_HID_INITIALIZER;
+ s->file = H5I_INVALID_HID;
+ s->one_by_one_sid = H5I_INVALID_HID;
+ s->filetype = H5T_NATIVE_UINT32;
+ s->nsteps = 1000;
+ s->use_vfd_swmr = true;
+ s->old_style_grp = false;
+ s->use_named_pipes = true;
+ s->w_sleep_len = 112;
+ s->tick_len = 4;
+ s->max_lag = 7;
+ s->ps = 4096;
+ s->pbs = 4096;
+ s->del_grp = false;
+ s->np_fd_w_to_r = -1;
+ s->np_fd_r_to_w = -1;
+ s->np_notify = 0;
+ s->np_verify = 0;
+
+ HDmemset(s->filename, 0, PATH_MAX);
+ HDmemset(s->progname, 0, PATH_MAX);
if (H5_basename(argv[0], &tfile) < 0) {
HDprintf("H5_basename failed\n");
@@ -280,8 +290,8 @@ state_init(state_t *s, int argc, char **argv)
return true;
error:
- if (tfile)
- HDfree(tfile);
+ HDfree(tfile);
+
return false;
}
@@ -409,16 +419,24 @@ np_rd_send(state_t *s)
* A boolean input parameter is used to choose
* either reader or writer.
* Return:
- * None
+ * True if succeed
+ * False if an error occurs in sending the message.
*/
-static void
+static bool
np_send_error(state_t *s, bool writer)
{
+ int fd = writer ? s->np_fd_w_to_r : s->np_fd_r_to_w;
+
s->np_notify = -1;
- if (writer)
- HDwrite(s->np_fd_w_to_r, &(s->np_notify), sizeof(int));
+
+ if (HDwrite(fd, &(s->np_notify), sizeof(int)) < 0) {
+ H5_FAILED();
+ AT();
+ HDprintf("HDwrite failed\n");
+ return false;
+ }
else
- HDwrite(s->np_fd_r_to_w, &(s->np_notify), sizeof(int));
+ return true;
}
/*-------------------------------------------------------------------------
@@ -513,27 +531,33 @@ error:
int
main(int argc, char **argv)
{
- hid_t fapl = H5I_INVALID_HID, fcpl = H5I_INVALID_HID;
- unsigned step;
- bool writer = false;
- state_t s;
- const char * personality;
- H5F_vfd_swmr_config_t config;
- const char * fifo_writer_to_reader = "./fifo_group_writer_to_reader";
- const char * fifo_reader_to_writer = "./fifo_group_reader_to_writer";
- int fd_writer_to_reader = -1, fd_reader_to_writer = -1;
- int notify = 0, verify = 0;
- bool wg_ret = false;
+ hid_t fapl = H5I_INVALID_HID;
+ hid_t fcpl = H5I_INVALID_HID;
+ unsigned step;
+ bool writer = false;
+ state_t * s = NULL;
+ const char * personality;
+ H5F_vfd_swmr_config_t *config = NULL;
+ const char * fifo_writer_to_reader = "./fifo_group_writer_to_reader";
+ const char * fifo_reader_to_writer = "./fifo_group_reader_to_writer";
+ int fd_writer_to_reader = -1, fd_reader_to_writer = -1;
+ int notify = 0, verify = 0;
+ bool wg_ret = false;
struct timespec start_time, end_time;
double temp_time;
- if (!state_init(&s, argc, argv)) {
+ if (NULL == (s = HDcalloc(1, sizeof(state_t))))
+ TEST_ERROR;
+ if (NULL == (config = HDcalloc(1, sizeof(H5F_vfd_swmr_config_t))))
+ TEST_ERROR;
+
+ if (!state_init(s, argc, argv)) {
HDprintf("state_init failed\n");
TEST_ERROR;
}
- personality = HDstrstr(s.progname, "vfd_swmr_gfail_");
+ personality = HDstrstr(s->progname, "vfd_swmr_gfail_");
if (personality != NULL && HDstrcmp(personality, "vfd_swmr_gfail_writer") == 0)
writer = true;
@@ -547,7 +571,7 @@ main(int argc, char **argv)
/* config, tick_len, max_lag, presume_posix_semantics, writer,
* maintain_metadata_file, generate_updater_files, flush_raw_data, md_pages_reserved,
* md_file_path, md_file_name, updater_file_path */
- init_vfd_swmr_config(&config, s.tick_len, s.max_lag, FALSE, writer, TRUE, FALSE, TRUE, 128, "./",
+ init_vfd_swmr_config(config, s->tick_len, s->max_lag, FALSE, writer, TRUE, FALSE, TRUE, 128, "./",
"group-shadow", NULL);
/* If old-style option is chosen, use the earliest file format(H5F_LIBVER_EARLIEST)
@@ -555,23 +579,23 @@ main(int argc, char **argv)
* vfd_swmr_create_fapl. Otherwise, the latest file format(H5F_LIBVER_LATEST)
* should be used as the second parameter of H5Pset_libver_bound().
* Also pass the use_vfd_swmr, only_meta_page, page_buf_size, config to vfd_swmr_create_fapl().*/
- if ((fapl = vfd_swmr_create_fapl(!s.old_style_grp, s.use_vfd_swmr, true, s.pbs, &config)) < 0) {
+ if ((fapl = vfd_swmr_create_fapl(!s->old_style_grp, s->use_vfd_swmr, true, s->pbs, config)) < 0) {
HDprintf("vfd_swmr_create_fapl failed\n");
TEST_ERROR;
}
/* Set fs_strategy (file space strategy) and fs_page_size (file space page size) */
- if ((fcpl = vfd_swmr_create_fcpl(H5F_FSPACE_STRATEGY_PAGE, s.ps)) < 0) {
+ if ((fcpl = vfd_swmr_create_fcpl(H5F_FSPACE_STRATEGY_PAGE, s->ps)) < 0) {
HDprintf("vfd_swmr_create_fcpl() failed");
TEST_ERROR;
}
if (writer)
- s.file = H5Fcreate(s.filename, H5F_ACC_TRUNC, fcpl, fapl);
+ s->file = H5Fcreate(s->filename, H5F_ACC_TRUNC, fcpl, fapl);
else
- s.file = H5Fopen(s.filename, H5F_ACC_RDONLY, fapl);
+ s->file = H5Fopen(s->filename, H5F_ACC_RDONLY, fapl);
- if (s.file < 0) {
+ if (s->file < 0) {
HDprintf("H5Fcreate/open failed\n");
TEST_ERROR;
}
@@ -580,7 +604,7 @@ main(int argc, char **argv)
* two-way communication.
* One is for the writer to write to the reader.
* The other one is for the reader to signal the writer. */
- if (s.use_named_pipes && writer) {
+ if (s->use_named_pipes && writer) {
/* Writer creates two named pipes(FIFO) */
if (HDmkfifo(fifo_writer_to_reader, 0600) < 0) {
HDprintf("HDmkfifo failed\n");
@@ -594,74 +618,74 @@ main(int argc, char **argv)
}
/* Both the writer and reader open the pipes */
- if (s.use_named_pipes && (fd_writer_to_reader = HDopen(fifo_writer_to_reader, O_RDWR)) < 0) {
+ if (s->use_named_pipes && (fd_writer_to_reader = HDopen(fifo_writer_to_reader, O_RDWR)) < 0) {
HDprintf("HDopen failed\n");
TEST_ERROR;
}
- if (s.use_named_pipes && (fd_reader_to_writer = HDopen(fifo_reader_to_writer, O_RDWR)) < 0) {
+ if (s->use_named_pipes && (fd_reader_to_writer = HDopen(fifo_reader_to_writer, O_RDWR)) < 0) {
HDprintf("HDopen failed\n");
TEST_ERROR;
}
/* Pass the named pipe information to the struct of state_t s, for attribute tests.*/
- if (s.use_named_pipes) {
- s.np_fd_w_to_r = fd_writer_to_reader;
- s.np_fd_r_to_w = fd_reader_to_writer;
- s.np_notify = notify;
- s.np_verify = verify;
+ if (s->use_named_pipes) {
+ s->np_fd_w_to_r = fd_writer_to_reader;
+ s->np_fd_r_to_w = fd_reader_to_writer;
+ s->np_notify = notify;
+ s->np_verify = verify;
}
if (writer) {
- for (step = 0; step < s.nsteps; step++) {
+ for (step = 0; step < s->nsteps; step++) {
dbgf(2, "writer: step %d\n", step);
- wg_ret = create_group(&s, step);
+ wg_ret = create_group(s, step);
if (wg_ret == false) {
- if (s.use_named_pipes)
- np_send_error(&s, true);
+ if (s->use_named_pipes && !np_send_error(s, true))
+ HDprintf("Error message send failed\n");
HDprintf("create groups failed\n");
TEST_ERROR;
}
}
- if (s.use_named_pipes && np_wr_send_receive(&s) == false) {
+ if (s->use_named_pipes && np_wr_send_receive(s) == false) {
HDprintf("writer: write group - verification failed.\n");
TEST_ERROR;
}
/* Delete 1000 groups if the del_grp option is true. */
- if (s.del_grp && s.nsteps > 1000) {
+ if (s->del_grp && s->nsteps > 1000) {
HDprintf("Deleting groups. \n");
- for (step = s.nsteps - 1; step >= (s.nsteps - 1000); step--) {
+ for (step = s->nsteps - 1; step >= (s->nsteps - 1000); step--) {
dbgf(2, "writer: deleting step %d\n", step);
- wg_ret = delete_group(&s, step);
+ wg_ret = delete_group(s, step);
if (wg_ret == false) {
HDprintf("delete group_operations failed\n");
TEST_ERROR;
}
}
/* end tick,may be not necessary. */
- if (H5Fvfd_swmr_end_tick(s.file) < 0)
+ if (H5Fvfd_swmr_end_tick(s->file) < 0)
TEST_ERROR;
}
/* May be necessary for the writer to wait a longer time before
- closing the file.
- The default value is 112 tenths of a second(4*s.tick_len*s.max_lag)
- if tick_len is 4 and max_lag is 7.
- */
- decisleep(s.w_sleep_len);
- }
- else { /*Reader */
- if (s.use_named_pipes) {
- if (false == np_rd_receive(&s)) {
+ * closing the file.
+ * The default value is 112 tenths of a second(4*s.tick_len*s.max_lag)
+ * if tick_len is 4 and max_lag is 7.
+ */
+ decisleep(s->w_sleep_len);
+ }
+ else { /* Reader */
+ if (s->use_named_pipes) {
+ if (false == np_rd_receive(s)) {
TEST_ERROR;
}
dbgf(2, "reader receives the message.\n");
- if (np_rd_send(&s) == false) {
+ if (np_rd_send(s) == false) {
TEST_ERROR;
}
dbgf(2, "reader sends the message.\n ");
@@ -673,7 +697,7 @@ main(int argc, char **argv)
}
HDprintf("Reader: call back function: check group names.\n");
- if (H5Literate(s.file, H5_INDEX_NAME, H5_ITER_NATIVE, NULL, op_func, NULL) < 0) {
+ if (H5Literate(s->file, H5_INDEX_NAME, H5_ITER_NATIVE, NULL, op_func, NULL) < 0) {
HDprintf("H5Literate failed \n");
TEST_ERROR;
}
@@ -695,29 +719,29 @@ main(int argc, char **argv)
TEST_ERROR;
}
- if (H5Sclose(s.one_by_one_sid) < 0) {
+ if (H5Sclose(s->one_by_one_sid) < 0) {
HDprintf("H5Sclose failed\n");
TEST_ERROR;
}
- if (H5Fclose(s.file) < 0) {
+ if (H5Fclose(s->file) < 0) {
HDprintf("H5Fclose failed\n");
TEST_ERROR;
}
/* Both the writer and reader close the named pipes */
- if (s.use_named_pipes && HDclose(fd_writer_to_reader) < 0) {
+ if (s->use_named_pipes && HDclose(fd_writer_to_reader) < 0) {
HDprintf("HDclose failed\n");
TEST_ERROR;
}
- if (s.use_named_pipes && HDclose(fd_reader_to_writer) < 0) {
+ if (s->use_named_pipes && HDclose(fd_reader_to_writer) < 0) {
HDprintf("HDclose failed\n");
TEST_ERROR;
}
/* Reader finishes last and deletes the named pipes */
- if (s.use_named_pipes && !writer) {
+ if (s->use_named_pipes && !writer) {
if (HDremove(fifo_writer_to_reader) != 0) {
HDprintf("HDremove failed\n");
TEST_ERROR;
@@ -729,6 +753,9 @@ main(int argc, char **argv)
}
}
+ HDfree(s);
+ HDfree(config);
+
return EXIT_SUCCESS;
error:
@@ -736,24 +763,28 @@ error:
{
H5Pclose(fapl);
H5Pclose(fcpl);
- H5Sclose(s.one_by_one_sid);
- H5Fclose(s.file);
+ H5Sclose(s->one_by_one_sid);
+ H5Fclose(s->file);
}
H5E_END_TRY;
- if (s.use_named_pipes && fd_writer_to_reader >= 0)
+ if (s->use_named_pipes && fd_writer_to_reader >= 0)
HDclose(fd_writer_to_reader);
- if (s.use_named_pipes && fd_reader_to_writer >= 0)
+ if (s->use_named_pipes && fd_reader_to_writer >= 0)
HDclose(fd_reader_to_writer);
- if (s.use_named_pipes && !writer) {
+ if (s->use_named_pipes && !writer) {
HDremove(fifo_writer_to_reader);
HDremove(fifo_reader_to_writer);
}
+ HDfree(s);
+ HDfree(config);
+
return EXIT_FAILURE;
}
+
/************************************************************
Operator function. Prints the name and type of the object
diff --git a/test/vfd_swmr_gperf_writer.c b/test/vfd_swmr_gperf_writer.c
index 88e8b6f..cedbaf5 100644
--- a/test/vfd_swmr_gperf_writer.c
+++ b/test/vfd_swmr_gperf_writer.c
@@ -97,18 +97,6 @@ typedef struct {
unsigned int nglevels;
} state_t;
-#define ALL_HID_INITIALIZER \
- (state_t) \
- { \
- .file = H5I_INVALID_HID, .one_by_one_sid = H5I_INVALID_HID, .filename = "", \
- .filetype = H5T_NATIVE_UINT32, .asteps = 1, .nsteps = 100, .use_vfd_swmr = true, \
- .old_style_grp = false, .grp_op_pattern = ' ', .grp_op_test = false, .at_pattern = ' ', \
- .attr_test = false, .tick_len = 4, .max_lag = 7, .gperf = false, .glog = false, .min_gc_time = 100., \
- .max_gc_time = 0., .mean_gc_time = 0., .total_gc_time = 0., .total_time = 0., .mean_time = 0., \
- .fo_total_time = 0., .fc_total_time = 0., .num_attrs = 1, .vlstr_test = false, .ps = 4096, \
- .pbs = 4096, .nglevels = 0 \
- }
-
static void
usage(const char *progname)
{
@@ -209,7 +197,37 @@ state_init(state_t *s, int argc, char **argv)
char * tfile = NULL;
char * end;
- *s = ALL_HID_INITIALIZER;
+ s->file = H5I_INVALID_HID;
+ s->one_by_one_sid = H5I_INVALID_HID;
+ s->filetype = H5T_NATIVE_UINT32;
+ s->asteps = 1;
+ s->nsteps = 100;
+ s->use_vfd_swmr = TRUE;
+ s->old_style_grp = FALSE;
+ s->grp_op_pattern = ' ';
+ s->grp_op_test = FALSE;
+ s->at_pattern = ' ';
+ s->attr_test = FALSE;
+ s->tick_len = 4;
+ s->max_lag = 7;
+ s->gperf = FALSE;
+ s->glog = FALSE;
+ s->min_gc_time = 100;
+ s->max_gc_time = 100;
+ s->mean_gc_time = 0.0;
+ s->total_gc_time = 0.0;
+ s->total_time = 0.0;
+ s->mean_time = 0.0;
+ s->fo_total_time = 0.0;
+ s->fc_total_time = 0.0;
+ s->num_attrs = 1;
+ s->vlstr_test = FALSE;
+ s->ps = 4096;
+ s->pbs = 4096;
+ s->nglevels = 0;
+
+ HDmemset(s->filename, 0, PATH_MAX);
+ HDmemset(s->progname, 0, PATH_MAX);
if (H5_basename(argv[0], &tfile) < 0) {
HDprintf("H5_basename failed\n");
@@ -2773,22 +2791,31 @@ error:
int
main(int argc, char **argv)
{
- hid_t fapl = H5I_INVALID_HID, fcpl = H5I_INVALID_HID;
- unsigned step;
- bool writer = false;
- state_t s;
- const char * personality;
- H5F_vfd_swmr_config_t config;
- bool wg_ret = false;
- struct timespec start_time, end_time;
- unsigned int num_elems_per_level = 0;
-
- if (!state_init(&s, argc, argv)) {
+ hid_t fapl = H5I_INVALID_HID, fcpl = H5I_INVALID_HID;
+ unsigned step;
+ bool writer = false;
+ state_t * s = NULL;
+ const char * personality;
+ H5F_vfd_swmr_config_t *config = NULL;
+ bool wg_ret = false;
+ struct timespec start_time, end_time;
+ unsigned int num_elems_per_level = 0;
+
+ if (NULL == (s = HDcalloc(1, sizeof(state_t)))) {
+ HDprintf("memory allocation failed");
+ TEST_ERROR;
+ }
+ if (NULL == (config = HDcalloc(1, sizeof(H5F_vfd_swmr_config_t)))) {
+ HDprintf("memory allocation failed");
+ TEST_ERROR;
+ }
+
+ if (!state_init(s, argc, argv)) {
HDprintf("state_init failed\n");
TEST_ERROR;
}
- personality = HDstrstr(s.progname, "vfd_swmr_gperf_");
+ personality = HDstrstr(s->progname, "vfd_swmr_gperf_");
if (personality != NULL && HDstrcmp(personality, "vfd_swmr_gperf_writer") == 0)
writer = true;
@@ -2807,69 +2834,66 @@ main(int argc, char **argv)
/* config, tick_len, max_lag, presume_posix_semantics, writer,
* maintain_metadata_file, generate_updater_files, flush_raw_data, md_pages_reserved,
* md_file_path, md_file_name, updater_file_path */
- init_vfd_swmr_config(&config, s.tick_len, s.max_lag, FALSE, writer, TRUE, FALSE, FALSE, 128, "./",
+ init_vfd_swmr_config(config, s->tick_len, s->max_lag, FALSE, writer, TRUE, FALSE, FALSE, 128, "./",
"group-shadow", NULL);
/* If the log flag is on, create the log file log-test under the current directory. */
- if (s.glog == true)
- init_vfd_swmr_log(&config, "./log-test");
+ if (s->glog == true)
+ init_vfd_swmr_log(config, "./log-test");
/* If old-style option is chosen, use the earliest file format(H5F_LIBVER_EARLIEST)
* as the second parameter of H5Pset_libver_bound() that is called by
* vfd_swmr_create_fapl. Otherwise, the latest file format(H5F_LIBVER_LATEST)
* should be used as the second parameter of H5Pset_libver_bound().
* Also pass the use_vfd_swmr, only_meta_page, page buffer size, config to vfd_swmr_create_fapl().*/
- if ((fapl = vfd_swmr_create_fapl(!s.old_style_grp, s.use_vfd_swmr, true, s.pbs, &config)) < 0) {
+ if ((fapl = vfd_swmr_create_fapl(!s->old_style_grp, s->use_vfd_swmr, true, s->pbs, config)) < 0) {
HDprintf("vfd_swmr_create_fapl failed\n");
TEST_ERROR;
}
/* Set fs_strategy (file space strategy) and fs_page_size (file space page size) */
- if ((fcpl = vfd_swmr_create_fcpl(H5F_FSPACE_STRATEGY_PAGE, s.ps)) < 0) {
+ if ((fcpl = vfd_swmr_create_fcpl(H5F_FSPACE_STRATEGY_PAGE, s->ps)) < 0) {
HDprintf("vfd_swmr_create_fcpl() failed");
TEST_ERROR;
}
- if (s.nglevels > 0) {
- if (s.grp_op_pattern != ' ' || s.at_pattern != ' ') {
+ if (s->nglevels > 0) {
+ if (s->grp_op_pattern != ' ' || s->at_pattern != ' ') {
HDprintf("For nested group creation test, only the default option is supported.\n");
HDprintf("Please re-run the tests with the appropriate option.\n");
TEST_ERROR;
}
}
- if (s.gperf) {
-
+ if (s->gperf) {
if (HDclock_gettime(CLOCK_MONOTONIC, &start_time) == -1) {
HDfprintf(stderr, "HDclock_gettime failed");
TEST_ERROR;
}
}
- s.file = H5Fcreate(s.filename, H5F_ACC_TRUNC, fcpl, fapl);
-
- if (s.gperf) {
+ s->file = H5Fcreate(s->filename, H5F_ACC_TRUNC, fcpl, fapl);
+ if (s->gperf) {
if (HDclock_gettime(CLOCK_MONOTONIC, &end_time) == -1) {
HDfprintf(stderr, "HDclock_gettime failed");
TEST_ERROR;
}
- s.fo_total_time = TIME_PASSED(start_time, end_time);
+ s->fo_total_time = TIME_PASSED(start_time, end_time);
}
- if (s.file < 0) {
+ if (s->file < 0) {
HDprintf("H5Fcreate failed\n");
TEST_ERROR;
}
/* If generating nested groups, calculate the maximum number of
elements per level. */
- if (s.nglevels > 0)
- num_elems_per_level = obtain_tree_level_elems(s.nsteps, s.nglevels);
-
- if (s.gperf) {
+ if (s->nglevels > 0)
+ num_elems_per_level = obtain_tree_level_elems(s->nsteps, s->nglevels);
+ if (s->gperf) {
if (HDclock_gettime(CLOCK_MONOTONIC, &start_time) == -1) {
HDfprintf(stderr, "HDclock_gettime failed");
TEST_ERROR;
@@ -2877,20 +2901,18 @@ main(int argc, char **argv)
}
/* If generating nested groups */
- if (s.nglevels > 0) {
-
+ if (s->nglevels > 0) {
/* for the recursive call, the groups under the root is treated as one level */
- wg_ret = gen_tree_struct(&s, s.nglevels + 1, num_elems_per_level, s.file);
+ wg_ret = gen_tree_struct(s, s->nglevels + 1, num_elems_per_level, s->file);
if (wg_ret == false) {
HDprintf("write nested group failed at group counter %u\n", grp_counter);
TEST_ERROR;
}
}
else {
- for (step = 0; step < s.nsteps; step++) {
-
+ for (step = 0; step < s->nsteps; step++) {
dbgf(2, "writer: step %d\n", step);
- wg_ret = group_operations(&s, step);
+ wg_ret = group_operations(s, step);
if (wg_ret == false) {
HDprintf("write_group failed at step %d\n", step);
TEST_ERROR;
@@ -2898,17 +2920,15 @@ main(int argc, char **argv)
}
}
- if (s.gperf) {
-
+ if (s->gperf) {
if (HDclock_gettime(CLOCK_MONOTONIC, &end_time) == -1) {
-
HDfprintf(stderr, "HDclock_gettime failed");
TEST_ERROR;
}
- s.total_time = TIME_PASSED(start_time, end_time);
- s.mean_time = s.total_time / s.nsteps;
- s.mean_gc_time = s.total_gc_time / s.nsteps;
+ s->total_time = TIME_PASSED(start_time, end_time);
+ s->mean_time = s->total_time / s->nsteps;
+ s->mean_gc_time = s->total_gc_time / s->nsteps;
}
if (H5Pclose(fapl) < 0) {
@@ -2921,68 +2941,61 @@ main(int argc, char **argv)
TEST_ERROR;
}
- if (H5Sclose(s.one_by_one_sid) < 0) {
+ if (H5Sclose(s->one_by_one_sid) < 0) {
HDprintf("H5Sclose failed\n");
TEST_ERROR;
}
- if (s.gperf) {
-
+ if (s->gperf) {
if (HDclock_gettime(CLOCK_MONOTONIC, &start_time) == -1) {
-
HDfprintf(stderr, "HDclock_gettime failed");
-
TEST_ERROR;
}
}
- if (H5Fclose(s.file) < 0) {
+ if (H5Fclose(s->file) < 0) {
HDprintf("H5Fclose failed\n");
TEST_ERROR;
}
- if (s.gperf) {
-
+ if (s->gperf) {
if (HDclock_gettime(CLOCK_MONOTONIC, &end_time) == -1) {
-
HDfprintf(stderr, "HDclock_gettime failed");
-
TEST_ERROR;
}
- s.fc_total_time = TIME_PASSED(start_time, end_time);
+ s->fc_total_time = TIME_PASSED(start_time, end_time);
}
/* Performance statistics summary */
- if (s.gperf) {
+ if (s->gperf) {
if (verbosity != 0) {
-
HDfprintf(stdout, "\nPerformance Test Configuration: ");
- if (s.use_vfd_swmr)
+ if (s->use_vfd_swmr)
HDfprintf(stdout, " Using VFD SWMR \n");
else
HDfprintf(stdout, " Not using VFD SWMR \n");
- if (s.old_style_grp)
+ if (s->old_style_grp)
HDfprintf(stdout, " Groups: Created via the earliest file format(old-style) \n");
else
HDfprintf(stdout, " Groups: Created via the latest file format(new-style) \n");
HDfprintf(stdout, "\n");
- HDfprintf(stdout, "The length of a tick = %u\n", s.tick_len);
- HDfprintf(stdout, "The maximum expected lag(in ticks)= %u\n", s.max_lag);
- HDfprintf(stdout, "The page size(in bytes) = %u\n", s.ps);
- HDfprintf(stdout, "The page buffer size(in bytes) = %u\n", s.pbs);
+ HDfprintf(stdout, "The length of a tick = %u\n", s->tick_len);
+ HDfprintf(stdout, "The maximum expected lag(in ticks)= %u\n", s->max_lag);
+ HDfprintf(stdout, "The page size(in bytes) = %u\n", s->ps);
+ HDfprintf(stdout, "The page buffer size(in bytes) = %u\n", s->pbs);
HDfprintf(stdout, "\n");
- HDfprintf(stdout, "Number of groups = %u\n", s.nsteps);
- HDfprintf(stdout, "Group Nested levels = %u\n", s.nglevels);
- HDfprintf(stdout, "Number of attributes = %u\n", s.num_attrs);
+ HDfprintf(stdout, "Number of groups = %u\n", s->nsteps);
+ HDfprintf(stdout, "Group Nested levels = %u\n", s->nglevels);
+ HDfprintf(stdout, "Number of attributes = %u\n", s->num_attrs);
HDfprintf(stdout, "Number of element per attribute = 1\n");
- if (s.vlstr_test)
+ if (s->vlstr_test)
HDfprintf(stdout, "Attribute datatype is variable length string. \n");
- else if (s.filetype == H5T_STD_U32BE)
+ else if (s->filetype == H5T_STD_U32BE)
HDfprintf(stdout, "Attribute datatype is big-endian unsigned 32-bit integer.\n");
else
HDfprintf(stdout, "Attribute datatype is native unsigned 32-bit integer.\n");
@@ -2990,19 +3003,22 @@ main(int argc, char **argv)
HDfprintf(stdout, "\n");
HDfprintf(stdout,
"(If the nested level is 0, all the groups are created directly under the root.)\n\n");
- HDfprintf(stdout, "group creation maximum time =%lf\n", s.max_gc_time);
- HDfprintf(stdout, "group creation minimum time =%lf\n", s.min_gc_time);
+ HDfprintf(stdout, "group creation maximum time =%lf\n", s->max_gc_time);
+ HDfprintf(stdout, "group creation minimum time =%lf\n", s->min_gc_time);
}
- HDfprintf(stdout, "group creation total time = %lf\n", s.total_gc_time);
- HDfprintf(stdout, "group creation mean time(per group) = %lf\n", s.mean_gc_time);
- HDfprintf(stdout, "group creation and attributes generation total time = %lf\n", s.total_time);
+ HDfprintf(stdout, "group creation total time = %lf\n", s->total_gc_time);
+ HDfprintf(stdout, "group creation mean time(per group) = %lf\n", s->mean_gc_time);
+ HDfprintf(stdout, "group creation and attributes generation total time = %lf\n", s->total_time);
HDfprintf(stdout, "group creation and attributes generation mean time(per group) = %lf\n",
- s.mean_time);
- HDfprintf(stdout, "H5Fcreate time = %lf\n", s.fo_total_time);
- HDfprintf(stdout, "H5Fclose time = %lf\n", s.fc_total_time);
+ s->mean_time);
+ HDfprintf(stdout, "H5Fcreate time = %lf\n", s->fo_total_time);
+ HDfprintf(stdout, "H5Fclose time = %lf\n", s->fc_total_time);
}
+ HDfree(config);
+ HDfree(s);
+
return EXIT_SUCCESS;
error:
@@ -3010,11 +3026,14 @@ error:
{
H5Pclose(fapl);
H5Pclose(fcpl);
- H5Sclose(s.one_by_one_sid);
- H5Fclose(s.file);
+ H5Sclose(s->one_by_one_sid);
+ H5Fclose(s->file);
}
H5E_END_TRY;
+ HDfree(config);
+ HDfree(s);
+
return EXIT_FAILURE;
}
diff --git a/test/vfd_swmr_group_writer.c b/test/vfd_swmr_group_writer.c
index dd387b2..c2b602b 100644
--- a/test/vfd_swmr_group_writer.c
+++ b/test/vfd_swmr_group_writer.c
@@ -51,17 +51,6 @@ typedef struct {
int np_verify;
} state_t;
-#define ALL_HID_INITIALIZER \
- (state_t) \
- { \
- .file = H5I_INVALID_HID, .one_by_one_sid = H5I_INVALID_HID, .filename = "", \
- .filetype = H5T_NATIVE_UINT32, .asteps = 10, .csteps = 10, .nsteps = 100, \
- .update_interval = READER_WAIT_TICKS, .use_vfd_swmr = TRUE, .old_style_grp = FALSE, \
- .use_named_pipes = TRUE, .grp_op_pattern = ' ', .grp_op_test = FALSE, .at_pattern = ' ', \
- .attr_test = FALSE, .tick_len = 4, .max_lag = 7, .ps = 4096, .pbs = 4096, .np_fd_w_to_r = -1, \
- .np_fd_r_to_w = -1, .np_notify = 0, .np_verify = 0 \
- }
-
static void
usage(const char *progname)
{
@@ -155,7 +144,31 @@ state_init(state_t *s, int argc, char **argv)
const char * s_opts = "SGa:bc:n:Nqu:t:m:B:s:A:O:";
struct h5_long_options l_opts[] = {{NULL, 0, '\0'}};
- *s = ALL_HID_INITIALIZER;
+ s->file = H5I_INVALID_HID;
+ s->one_by_one_sid = H5I_INVALID_HID;
+ s->filetype = H5T_NATIVE_UINT32;
+ s->asteps = 10;
+ s->csteps = 10;
+ s->nsteps = 100;
+ s->update_interval = READER_WAIT_TICKS;
+ s->use_vfd_swmr = TRUE;
+ s->old_style_grp = FALSE;
+ s->use_named_pipes = TRUE;
+ s->grp_op_pattern = ' ';
+ s->grp_op_test = FALSE;
+ s->at_pattern = ' ';
+ s->attr_test = FALSE;
+ s->tick_len = 4;
+ s->max_lag = 7;
+ s->ps = 4096;
+ s->pbs = 4096;
+ s->np_fd_w_to_r = -1;
+ s->np_fd_r_to_w = -1;
+ s->np_notify = 0;
+ s->np_verify = 0;
+
+ HDmemset(s->filename, 0, PATH_MAX);
+ HDmemset(s->progname, 0, PATH_MAX);
if (H5_basename(argv[0], &tfile) < 0) {
HDprintf("H5_basename failed\n");
@@ -461,16 +474,24 @@ np_rd_send(state_t *s)
* A boolean input parameter is used to choose
* either reader or writer.
* Return:
- * None
+ * True if succeed
+ * False if an error occurs in sending the message.
*/
-static void
-np_send_error(state_t *s, hbool_t writer)
+static bool
+np_send_error(state_t *s, bool writer)
{
+ int fd = writer ? s->np_fd_w_to_r : s->np_fd_r_to_w;
+
s->np_notify = -1;
- if (writer)
- HDwrite(s->np_fd_w_to_r, &(s->np_notify), sizeof(int));
+
+ if (HDwrite(fd, &(s->np_notify), sizeof(int)) < 0) {
+ H5_FAILED();
+ AT();
+ HDprintf("HDwrite failed\n");
+ return false;
+ }
else
- HDwrite(s->np_fd_r_to_w, &(s->np_notify), sizeof(int));
+ return true;
}
/*-------------------------------------------------------------------------
@@ -892,7 +913,8 @@ del_one_attr(state_t *s, hid_t obj_id, hbool_t is_dense, hbool_t is_vl_or_ohrc,
error:
if (s->use_named_pipes && s->attr_test == TRUE)
- np_send_error(s, TRUE);
+ if (!np_send_error(s, TRUE))
+ HDfprintf(stderr, "Sending error message failed");
error2:
return FALSE;
@@ -4974,25 +4996,30 @@ verify_group_operations(state_t *s, unsigned int which)
int
main(int argc, char **argv)
{
- hid_t fapl = H5I_INVALID_HID, fcpl = H5I_INVALID_HID;
- unsigned step;
- hbool_t writer = FALSE;
- state_t s;
- const char * personality;
- H5F_vfd_swmr_config_t config;
- const char * fifo_writer_to_reader = "./fifo_group_writer_to_reader";
- const char * fifo_reader_to_writer = "./fifo_group_reader_to_writer";
- int fd_writer_to_reader = -1, fd_reader_to_writer = -1;
- int notify = 0, verify = 0;
- hbool_t wg_ret = FALSE;
- hbool_t vg_ret = FALSE;
-
- if (!state_init(&s, argc, argv)) {
+ hid_t fapl = H5I_INVALID_HID, fcpl = H5I_INVALID_HID;
+ unsigned step;
+ hbool_t writer = FALSE;
+ state_t * s = NULL;
+ const char * personality;
+ H5F_vfd_swmr_config_t *config = NULL;
+ const char * fifo_writer_to_reader = "./fifo_group_writer_to_reader";
+ const char * fifo_reader_to_writer = "./fifo_group_reader_to_writer";
+ int fd_writer_to_reader = -1, fd_reader_to_writer = -1;
+ int notify = 0, verify = 0;
+ hbool_t wg_ret = FALSE;
+ hbool_t vg_ret = FALSE;
+
+ if (NULL == (s = HDcalloc(1, sizeof(state_t))))
+ TEST_ERROR;
+ if (NULL == (config = HDcalloc(1, sizeof(H5F_vfd_swmr_config_t))))
+ TEST_ERROR;
+
+ if (!state_init(s, argc, argv)) {
HDprintf("state_init failed\n");
TEST_ERROR;
}
- personality = HDstrstr(s.progname, "vfd_swmr_group_");
+ personality = HDstrstr(s->progname, "vfd_swmr_group_");
if (personality != NULL && HDstrcmp(personality, "vfd_swmr_group_writer") == 0)
writer = TRUE;
@@ -5006,7 +5033,7 @@ main(int argc, char **argv)
/* config, tick_len, max_lag, presume_posix_semantics, writer,
* maintain_metadata_file, generate_updater_files, flush_raw_data, md_pages_reserved,
* md_file_path, md_file_name, updater_file_path */
- init_vfd_swmr_config(&config, s.tick_len, s.max_lag, FALSE, writer, TRUE, FALSE, TRUE, 128, "./",
+ init_vfd_swmr_config(config, s->tick_len, s->max_lag, FALSE, writer, TRUE, FALSE, TRUE, 128, "./",
"group-shadow", NULL);
/* If old-style option is chosen, use the earliest file format(H5F_LIBVER_EARLIEST)
@@ -5014,23 +5041,23 @@ main(int argc, char **argv)
* vfd_swmr_create_fapl. Otherwise, the latest file format(H5F_LIBVER_LATEST)
* should be used as the second parameter of H5Pset_libver_bound().
* Also pass the use_vfd_swmr, only_meta_page, page_buf_size, config to vfd_swmr_create_fapl().*/
- if ((fapl = vfd_swmr_create_fapl(!s.old_style_grp, s.use_vfd_swmr, TRUE, s.pbs, &config)) < 0) {
+ if ((fapl = vfd_swmr_create_fapl(!s->old_style_grp, s->use_vfd_swmr, TRUE, s->pbs, config)) < 0) {
HDprintf("vfd_swmr_create_fapl failed\n");
TEST_ERROR;
}
/* Set fs_strategy (file space strategy) and fs_page_size (file space page size) */
- if ((fcpl = vfd_swmr_create_fcpl(H5F_FSPACE_STRATEGY_PAGE, s.ps)) < 0) {
+ if ((fcpl = vfd_swmr_create_fcpl(H5F_FSPACE_STRATEGY_PAGE, s->ps)) < 0) {
HDprintf("vfd_swmr_create_fcpl() failed");
TEST_ERROR;
}
if (writer)
- s.file = H5Fcreate(s.filename, H5F_ACC_TRUNC, fcpl, fapl);
+ s->file = H5Fcreate(s->filename, H5F_ACC_TRUNC, fcpl, fapl);
else
- s.file = H5Fopen(s.filename, H5F_ACC_RDONLY, fapl);
+ s->file = H5Fopen(s->filename, H5F_ACC_RDONLY, fapl);
- if (s.file < 0) {
+ if (s->file < 0) {
HDprintf("H5Fcreate/open failed\n");
TEST_ERROR;
}
@@ -5039,7 +5066,7 @@ main(int argc, char **argv)
* two-way communication so that the two sides can move forward together.
* One is for the writer to write to the reader.
* The other one is for the reader to signal the writer. */
- if (s.use_named_pipes && writer) {
+ if (s->use_named_pipes && writer) {
/* Writer creates two named pipes(FIFO) */
if (HDmkfifo(fifo_writer_to_reader, 0600) < 0) {
HDprintf("HDmkfifo failed\n");
@@ -5053,22 +5080,22 @@ main(int argc, char **argv)
}
/* Both the writer and reader open the pipes */
- if (s.use_named_pipes && (fd_writer_to_reader = HDopen(fifo_writer_to_reader, O_RDWR)) < 0) {
+ if (s->use_named_pipes && (fd_writer_to_reader = HDopen(fifo_writer_to_reader, O_RDWR)) < 0) {
HDprintf("HDopen failed\n");
TEST_ERROR;
}
- if (s.use_named_pipes && (fd_reader_to_writer = HDopen(fifo_reader_to_writer, O_RDWR)) < 0) {
+ if (s->use_named_pipes && (fd_reader_to_writer = HDopen(fifo_reader_to_writer, O_RDWR)) < 0) {
HDprintf("HDopen failed\n");
TEST_ERROR;
}
/* Pass the named pipe information to the struct of state_t s, for attribute tests.*/
- if (s.use_named_pipes) {
- s.np_fd_w_to_r = fd_writer_to_reader;
- s.np_fd_r_to_w = fd_reader_to_writer;
- s.np_notify = notify;
- s.np_verify = verify;
+ if (s->use_named_pipes) {
+ s->np_fd_w_to_r = fd_writer_to_reader;
+ s->np_fd_r_to_w = fd_reader_to_writer;
+ s->np_notify = notify;
+ s->np_verify = verify;
}
/* For attribute test, force the named pipe to communicate in every step.
@@ -5076,34 +5103,35 @@ main(int argc, char **argv)
* If the named pipe is not forced to communicate in every step, the reader may go ahead
* to verify the group and the attribute operations before the writer has a chance to
* carry out the corresponding operations. */
- if (s.attr_test && s.use_named_pipes)
- s.csteps = 1;
+ if (s->attr_test && s->use_named_pipes)
+ s->csteps = 1;
/* For group operation test, force the named pipe to communicate in every step. */
- if (s.grp_op_test && s.use_named_pipes)
- s.csteps = 1;
+ if (s->grp_op_test && s->use_named_pipes)
+ s->csteps = 1;
if (writer) {
- for (step = 0; step < s.nsteps; step++) {
+ for (step = 0; step < s->nsteps; step++) {
dbgf(2, "writer: step %d\n", step);
- wg_ret = group_operations(&s, step);
+ wg_ret = group_operations(s, step);
if (wg_ret == FALSE) {
/* At communication interval, notifies the reader about the failure and quit */
- if (s.use_named_pipes && s.attr_test != TRUE && s.grp_op_test != TRUE && step % s.csteps == 0)
- np_send_error(&s, TRUE);
+ if (s->use_named_pipes && s->attr_test != TRUE && s->grp_op_test != TRUE &&
+ step % s->csteps == 0)
+ np_send_error(s, TRUE);
HDprintf("write_group failed at step %d\n", step);
TEST_ERROR;
}
else {
/* At communication interval, notifies the reader and waits for its response */
- if (s.use_named_pipes && s.attr_test != TRUE && s.grp_op_test != TRUE &&
- step % s.csteps == 0) {
+ if (s->use_named_pipes && s->attr_test != TRUE && s->grp_op_test != TRUE &&
+ step % s->csteps == 0) {
- if (np_wr_send_receive(&s) == FALSE) {
+ if (np_wr_send_receive(s) == FALSE) {
HDprintf("writer: write group - verification failed.\n");
TEST_ERROR;
}
@@ -5112,39 +5140,41 @@ main(int argc, char **argv)
}
}
else {
- for (step = 0; step < s.nsteps; step++) {
+ for (step = 0; step < s->nsteps; step++) {
dbgf(1, "reader: step %d\n", step);
/* At communication interval, waits for the writer to finish creation before starting verification
*/
- if (s.use_named_pipes && s.attr_test != TRUE && s.grp_op_test != TRUE && step % s.csteps == 0) {
- if (FALSE == np_rd_receive(&s)) {
+ if (s->use_named_pipes && s->attr_test != TRUE && s->grp_op_test != TRUE &&
+ step % s->csteps == 0) {
+ if (FALSE == np_rd_receive(s)) {
TEST_ERROR;
}
}
/* For the default test, wait for a few ticks for the update to happen */
- if (s.use_named_pipes && s.attr_test == FALSE)
- decisleep(config.tick_len * s.update_interval);
+ if (s->use_named_pipes && s->attr_test == FALSE)
+ decisleep(config->tick_len * s->update_interval);
- vg_ret = verify_group_operations(&s, step);
+ vg_ret = verify_group_operations(s, step);
if (vg_ret == FALSE) {
HDprintf("verify_group_operations failed\n");
/* At communication interval, tell the writer about the failure and exit */
- if (s.use_named_pipes && s.attr_test != TRUE && s.grp_op_test != TRUE && step % s.csteps == 0)
- np_send_error(&s, FALSE);
+ if (s->use_named_pipes && s->attr_test != TRUE && s->grp_op_test != TRUE &&
+ step % s->csteps == 0)
+ np_send_error(s, FALSE);
TEST_ERROR;
}
else {
/* Send back the same notify value for acknowledgement to tell the writer
* move to the next step. */
- if (s.use_named_pipes && s.attr_test != TRUE && s.grp_op_test != TRUE &&
- step % s.csteps == 0) {
- if (np_rd_send(&s) == FALSE) {
+ if (s->use_named_pipes && s->attr_test != TRUE && s->grp_op_test != TRUE &&
+ step % s->csteps == 0) {
+ if (np_rd_send(s) == FALSE) {
TEST_ERROR;
}
}
@@ -5162,29 +5192,29 @@ main(int argc, char **argv)
TEST_ERROR;
}
- if (H5Sclose(s.one_by_one_sid) < 0) {
+ if (H5Sclose(s->one_by_one_sid) < 0) {
HDprintf("H5Sclose failed\n");
TEST_ERROR;
}
- if (H5Fclose(s.file) < 0) {
+ if (H5Fclose(s->file) < 0) {
HDprintf("H5Fclose failed\n");
TEST_ERROR;
}
/* Both the writer and reader close the named pipes */
- if (s.use_named_pipes && HDclose(fd_writer_to_reader) < 0) {
+ if (s->use_named_pipes && HDclose(fd_writer_to_reader) < 0) {
HDprintf("HDclose failed\n");
TEST_ERROR;
}
- if (s.use_named_pipes && HDclose(fd_reader_to_writer) < 0) {
+ if (s->use_named_pipes && HDclose(fd_reader_to_writer) < 0) {
HDprintf("HDclose failed\n");
TEST_ERROR;
}
/* Reader finishes last and deletes the named pipes */
- if (s.use_named_pipes && !writer) {
+ if (s->use_named_pipes && !writer) {
if (HDremove(fifo_writer_to_reader) != 0) {
HDprintf("HDremove failed\n");
TEST_ERROR;
@@ -5196,6 +5226,9 @@ main(int argc, char **argv)
}
}
+ HDfree(config);
+ HDfree(s);
+
return EXIT_SUCCESS;
error:
@@ -5203,22 +5236,25 @@ error:
{
H5Pclose(fapl);
H5Pclose(fcpl);
- H5Sclose(s.one_by_one_sid);
- H5Fclose(s.file);
+ H5Sclose(s->one_by_one_sid);
+ H5Fclose(s->file);
}
H5E_END_TRY;
- if (s.use_named_pipes && fd_writer_to_reader >= 0)
+ if (s->use_named_pipes && fd_writer_to_reader >= 0)
HDclose(fd_writer_to_reader);
- if (s.use_named_pipes && fd_reader_to_writer >= 0)
+ if (s->use_named_pipes && fd_reader_to_writer >= 0)
HDclose(fd_reader_to_writer);
- if (s.use_named_pipes && !writer) {
+ if (s->use_named_pipes && !writer) {
HDremove(fifo_writer_to_reader);
HDremove(fifo_reader_to_writer);
}
+ HDfree(config);
+ HDfree(s);
+
return EXIT_FAILURE;
}
diff --git a/test/vfd_swmr_indep_rw_writer.c b/test/vfd_swmr_indep_rw_writer.c
index 77eee74..bd79307 100644
--- a/test/vfd_swmr_indep_rw_writer.c
+++ b/test/vfd_swmr_indep_rw_writer.c
@@ -70,29 +70,6 @@ typedef struct {
hbool_t first_proc;
} state_t;
-/* Assign the initialized values to struct state_t declared above */
-static inline state_t
-state_initializer(void)
-{
- return (state_t){.file = {H5I_INVALID_HID, H5I_INVALID_HID},
- .filename = {"", ""},
- .r_dsetid = H5I_INVALID_HID,
- .dtype = H5T_NATIVE_UINT32,
- .fapl = H5I_INVALID_HID,
- .fcpl = H5I_INVALID_HID,
- .rows = DATA_ROWS,
- .cols = DATA_COLS,
- .rank = DATA_RANK,
- .dims = {DATA_ROWS, DATA_COLS},
- .max_lag = 7,
- .tick_len = 4,
- .ps = 4096,
- .pbs = 4096,
- .check_interval = 1,
- .use_vfd_swmr = TRUE,
- .first_proc = TRUE};
-}
-
/* Obtain the data value at index [i][j] for the 2D matrix.
All the routines related to the matrix are adapted from the vfd_swmr_bigset_writer.c. */
static uint32_t
@@ -120,18 +97,18 @@ error:
/* Allocate memory for the 2-D matrix. */
static mat_t *
-newmat(state_t s)
+newmat(state_t *s)
{
mat_t *mat;
- mat = HDmalloc(sizeof(*mat) + (s.rows * s.cols - 1) * sizeof(mat->elt[0]));
+ mat = HDmalloc(sizeof(*mat) + (s->rows * s->cols - 1) * sizeof(mat->elt[0]));
if (mat == NULL) {
HDfprintf(stderr, "HDmalloc failed\n");
TEST_ERROR;
}
- mat->rows = s.rows;
- mat->cols = s.cols;
+ mat->rows = s->rows;
+ mat->cols = s->cols;
return mat;
@@ -254,7 +231,26 @@ state_init(state_t *s, int argc, char **argv)
const char * s_opts = "Sqc:r:t:m:B:s:u:";
struct h5_long_options l_opts[] = {{NULL, 0, '\0'}};
- *s = state_initializer();
+ s->file[0] = H5I_INVALID_HID;
+ s->file[1] = H5I_INVALID_HID;
+ s->filename[0] = "";
+ s->filename[1] = "";
+ s->r_dsetid = H5I_INVALID_HID;
+ s->dtype = H5T_NATIVE_UINT32;
+ s->fapl = H5I_INVALID_HID;
+ s->fcpl = H5I_INVALID_HID;
+ s->rows = DATA_ROWS;
+ s->cols = DATA_COLS;
+ s->rank = DATA_RANK;
+ s->dims[0] = DATA_ROWS;
+ s->dims[1] = DATA_COLS;
+ s->max_lag = 7;
+ s->tick_len = 4;
+ s->ps = 4096;
+ s->pbs = 4096;
+ s->check_interval = 1;
+ s->use_vfd_swmr = TRUE;
+ s->first_proc = TRUE;
if (H5_basename(argv[0], &tfile) < 0) {
HDprintf("H5_basename failed\n");
@@ -362,16 +358,19 @@ static hbool_t
indep_init_vfd_swmr_config_plist(state_t *s, hbool_t writer, const char *mdf_name)
{
- H5F_vfd_swmr_config_t config;
+ H5F_vfd_swmr_config_t *config = NULL;
+
+ if (NULL == (config = HDcalloc(1, sizeof(H5F_vfd_swmr_config_t))))
+ TEST_ERROR;
/* config, tick_len, max_lag, presume_posix_semantics, writer,
* maintain_metadata_file, generate_updater_files, flush_raw_data, md_pages_reserved,
* md_file_path, md_file_name, updater_file_path */
- init_vfd_swmr_config(&config, s->tick_len, s->max_lag, FALSE, writer, TRUE, FALSE, TRUE, 128, "./",
+ init_vfd_swmr_config(config, s->tick_len, s->max_lag, FALSE, writer, TRUE, FALSE, TRUE, 128, "./",
mdf_name, NULL);
/* Pass the use_vfd_swmr, only_meta_page, page buffer size, config to vfd_swmr_create_fapl().*/
- if ((s->fapl = vfd_swmr_create_fapl(TRUE, s->use_vfd_swmr, TRUE, s->pbs, &config)) < 0) {
+ if ((s->fapl = vfd_swmr_create_fapl(TRUE, s->use_vfd_swmr, TRUE, s->pbs, config)) < 0) {
HDprintf("vfd_swmr_create_fapl failed\n");
TEST_ERROR;
}
@@ -382,9 +381,12 @@ indep_init_vfd_swmr_config_plist(state_t *s, hbool_t writer, const char *mdf_nam
TEST_ERROR;
}
+ HDfree(config);
+
return TRUE;
error:
+ HDfree(config);
return FALSE;
}
@@ -628,12 +630,14 @@ int
main(int argc, char **argv)
{
hbool_t writer = TRUE;
- state_t s;
- hbool_t ret = FALSE;
- unsigned i;
- mat_t * mat = NULL;
+ state_t *s = NULL;
+ mat_t * mat = NULL;
+ hbool_t ret = FALSE;
- if (!state_init(&s, argc, argv)) {
+ if (NULL == (s = HDcalloc(1, sizeof(state_t))))
+ TEST_ERROR;
+
+ if (!state_init(s, argc, argv)) {
HDfprintf(stderr, "state_init failed\n");
TEST_ERROR;
}
@@ -644,70 +648,70 @@ main(int argc, char **argv)
}
/* The first process writes a dataset in the first file and then reads a dataset from the second file.*/
- if (s.first_proc) {
+ if (s->first_proc) {
writer = TRUE;
- if (FALSE == indep_init_vfd_swmr_config_plist(&s, writer, "file1-shadow")) {
- HDfprintf(stderr, "Writer: Cannot initialize file property lists for file %s\n", s.filename[0]);
+ if (FALSE == indep_init_vfd_swmr_config_plist(s, writer, "file1-shadow")) {
+ HDfprintf(stderr, "Writer: Cannot initialize file property lists for file %s\n", s->filename[0]);
TEST_ERROR;
}
- s.file[0] = H5Fcreate(s.filename[0], H5F_ACC_TRUNC, s.fcpl, s.fapl);
- if (s.file[0] < 0) {
- HDfprintf(stderr, "H5Fcreate failed for the file %s\n", s.filename[0]);
+ s->file[0] = H5Fcreate(s->filename[0], H5F_ACC_TRUNC, s->fcpl, s->fapl);
+ if (s->file[0] < 0) {
+ HDfprintf(stderr, "H5Fcreate failed for the file %s\n", s->filename[0]);
TEST_ERROR;
}
- ret = write_dataset(&s, mat);
+ ret = write_dataset(s, mat);
if (ret == FALSE) {
- HDfprintf(stderr, "write_dataset failed for the file %s\n", s.filename[0]);
+ HDfprintf(stderr, "write_dataset failed for the file %s\n", s->filename[0]);
TEST_ERROR;
}
/* writer makes repeated HDF5 API calls
* to trigger EOT at approximately the correct time */
- for (i = 0; i < s.max_lag + 1; i++) {
- decisleep(s.tick_len);
+ for (unsigned i = 0; i < s->max_lag + 1; i++) {
+ decisleep(s->tick_len);
H5E_BEGIN_TRY
{
- H5Aexists(s.file[0], "nonexistent");
+ H5Aexists(s->file[0], "nonexistent");
}
H5E_END_TRY;
}
- if (FALSE == close_pl(&s)) {
- HDfprintf(stderr, "Fail to close file property lists for writing the file %s.\n", s.filename[0]);
+ if (FALSE == close_pl(s)) {
+ HDfprintf(stderr, "Fail to close file property lists for writing the file %s.\n", s->filename[0]);
TEST_ERROR;
}
writer = FALSE;
- if (FALSE == indep_init_vfd_swmr_config_plist(&s, writer, "file2-shadow")) {
- HDfprintf(stderr, "Reader: Cannot initialize file property lists for file %s\n", s.filename[1]);
+ if (FALSE == indep_init_vfd_swmr_config_plist(s, writer, "file2-shadow")) {
+ HDfprintf(stderr, "Reader: Cannot initialize file property lists for file %s\n", s->filename[1]);
TEST_ERROR;
}
- s.file[1] = H5Fopen(s.filename[1], H5F_ACC_RDONLY, s.fapl);
- if (s.file[1] < 0) {
- HDfprintf(stderr, "H5Fopen failed for the file %s\n", s.filename[1]);
+ s->file[1] = H5Fopen(s->filename[1], H5F_ACC_RDONLY, s->fapl);
+ if (s->file[1] < 0) {
+ HDfprintf(stderr, "H5Fopen failed for the file %s\n", s->filename[1]);
TEST_ERROR;
}
- ret = read_vrfy_dataset(&s, mat);
+ ret = read_vrfy_dataset(s, mat);
if (ret == FALSE) {
- HDfprintf(stderr, "read and verify dataset failed for file %s\n", s.filename[1]);
+ HDfprintf(stderr, "read and verify dataset failed for file %s\n", s->filename[1]);
TEST_ERROR;
}
- if (FALSE == close_pl(&s)) {
- HDfprintf(stderr, "Fail to close file property lists for reading the file %s.\n", s.filename[1]);
+ if (FALSE == close_pl(s)) {
+ HDfprintf(stderr, "Fail to close file property lists for reading the file %s.\n", s->filename[1]);
TEST_ERROR;
}
- if (H5Fclose(s.file[0]) < 0) {
- HDfprintf(stderr, "fail to close HDF5 file %s \n", s.filename[0]);
+ if (H5Fclose(s->file[0]) < 0) {
+ HDfprintf(stderr, "fail to close HDF5 file %s \n", s->filename[0]);
TEST_ERROR;
}
- if (H5Fclose(s.file[1]) < 0) {
- HDfprintf(stderr, "fail to close HDF5 file %s \n", s.filename[1]);
+ if (H5Fclose(s->file[1]) < 0) {
+ HDfprintf(stderr, "fail to close HDF5 file %s \n", s->filename[1]);
TEST_ERROR;
}
}
@@ -717,88 +721,88 @@ main(int argc, char **argv)
* then writes a dataset in the second file for the first process to read.
*/
writer = FALSE;
- if (FALSE == indep_init_vfd_swmr_config_plist(&s, writer, "file1-shadow")) {
- HDfprintf(stderr, "Reader: Cannot initialize file property lists for file %s\n", s.filename[0]);
+ if (FALSE == indep_init_vfd_swmr_config_plist(s, writer, "file1-shadow")) {
+ HDfprintf(stderr, "Reader: Cannot initialize file property lists for file %s\n", s->filename[0]);
TEST_ERROR;
}
- s.file[0] = H5Fopen(s.filename[0], H5F_ACC_RDONLY, s.fapl);
- if (s.file[0] < 0) {
- HDfprintf(stderr, "H5Fopen failed for the file %s\n", s.filename[0]);
+ s->file[0] = H5Fopen(s->filename[0], H5F_ACC_RDONLY, s->fapl);
+ if (s->file[0] < 0) {
+ HDfprintf(stderr, "H5Fopen failed for the file %s\n", s->filename[0]);
TEST_ERROR;
}
- ret = read_vrfy_dataset(&s, mat);
+ ret = read_vrfy_dataset(s, mat);
if (ret == FALSE) {
- HDfprintf(stderr, "read and verify dataset failed for file %s\n", s.filename[0]);
+ HDfprintf(stderr, "read and verify dataset failed for file %s\n", s->filename[0]);
TEST_ERROR;
}
- if (FALSE == close_pl(&s)) {
- HDfprintf(stderr, "Fail to close file property lists for reading the file %s.\n", s.filename[0]);
+ if (FALSE == close_pl(s)) {
+ HDfprintf(stderr, "Fail to close file property lists for reading the file %s.\n", s->filename[0]);
TEST_ERROR;
}
writer = TRUE;
- if (FALSE == indep_init_vfd_swmr_config_plist(&s, writer, "file2-shadow")) {
- HDfprintf(stderr, "writer: Cannot initialize file property lists for file %s\n", s.filename[1]);
+ if (FALSE == indep_init_vfd_swmr_config_plist(s, writer, "file2-shadow")) {
+ HDfprintf(stderr, "writer: Cannot initialize file property lists for file %s\n", s->filename[1]);
TEST_ERROR;
}
- s.file[1] = H5Fcreate(s.filename[1], H5F_ACC_TRUNC, s.fcpl, s.fapl);
- if (s.file[1] < 0) {
- HDfprintf(stderr, "H5Fcreate failed for the file %s\n", s.filename[1]);
+ s->file[1] = H5Fcreate(s->filename[1], H5F_ACC_TRUNC, s->fcpl, s->fapl);
+ if (s->file[1] < 0) {
+ HDfprintf(stderr, "H5Fcreate failed for the file %s\n", s->filename[1]);
TEST_ERROR;
}
- ret = write_dataset(&s, mat);
+ ret = write_dataset(s, mat);
if (ret == FALSE) {
- HDfprintf(stderr, "write_dataset failed for the file %s\n", s.filename[1]);
+ HDfprintf(stderr, "write_dataset failed for the file %s\n", s->filename[1]);
TEST_ERROR;
}
/* writer makes repeated HDF5 API calls
* to trigger EOT at approximately the correct time */
- for (i = 0; i < s.max_lag + 1; i++) {
- decisleep(s.tick_len);
+ for (unsigned i = 0; i < s->max_lag + 1; i++) {
+ decisleep(s->tick_len);
H5E_BEGIN_TRY
{
- H5Aexists(s.file[1], "nonexistent");
+ H5Aexists(s->file[1], "nonexistent");
}
H5E_END_TRY;
}
- if (FALSE == close_pl(&s)) {
- HDfprintf(stderr, "Fail to close file property lists for writing the file %s.\n", s.filename[1]);
+ if (FALSE == close_pl(s)) {
+ HDfprintf(stderr, "Fail to close file property lists for writing the file %s.\n", s->filename[1]);
TEST_ERROR;
}
- if (H5Fclose(s.file[0]) < 0) {
- HDfprintf(stderr, "fail to close HDF5 file %s \n", s.filename[0]);
+ if (H5Fclose(s->file[0]) < 0) {
+ HDfprintf(stderr, "fail to close HDF5 file %s \n", s->filename[0]);
TEST_ERROR;
}
- if (H5Fclose(s.file[1]) < 0) {
- HDfprintf(stderr, "fail to close HDF5 file %s \n", s.filename[1]);
+ if (H5Fclose(s->file[1]) < 0) {
+ HDfprintf(stderr, "fail to close HDF5 file %s \n", s->filename[1]);
TEST_ERROR;
}
}
- if (mat)
- HDfree(mat);
+ HDfree(mat);
+ HDfree(s);
return EXIT_SUCCESS;
error:
H5E_BEGIN_TRY
{
- H5Pclose(s.fapl);
- H5Pclose(s.fcpl);
- H5Fclose(s.file[0]);
- H5Fclose(s.file[1]);
+ H5Pclose(s->fapl);
+ H5Pclose(s->fcpl);
+ H5Fclose(s->file[0]);
+ H5Fclose(s->file[1]);
}
H5E_END_TRY;
- if (mat)
- HDfree(mat);
+ HDfree(mat);
+ HDfree(s);
return EXIT_FAILURE;
}
diff --git a/test/vfd_swmr_sparse_writer.c b/test/vfd_swmr_sparse_writer.c
index a233bb3..6c8d08e 100644
--- a/test/vfd_swmr_sparse_writer.c
+++ b/test/vfd_swmr_sparse_writer.c
@@ -34,8 +34,6 @@
#ifndef H5_HAVE_WIN32_API
-#include <err.h>
-
/****************/
/* Local Macros */
/****************/
diff --git a/test/vfd_swmr_vlstr_reader.c b/test/vfd_swmr_vlstr_reader.c
index dc403cf..c345b18 100644
--- a/test/vfd_swmr_vlstr_reader.c
+++ b/test/vfd_swmr_vlstr_reader.c
@@ -23,8 +23,6 @@
#ifndef H5_HAVE_WIN32_API
-#include <err.h>
-
typedef enum _step { CREATE = 0, LENGTHEN, SHORTEN, DELETE, NSTEPS } step_t;
static hbool_t caught_out_of_bounds = FALSE;
@@ -61,22 +59,29 @@ usage(const char *progname)
int
main(int argc, char **argv)
{
- hid_t fapl, fid, space, type;
- hid_t dset[2];
- char * content[2];
+ hid_t fapl = H5I_INVALID_HID;
+ hid_t fid = H5I_INVALID_HID;
+ hid_t space = H5I_INVALID_HID;
+ hid_t type = H5I_INVALID_HID;
+ hid_t dset[2] = {H5I_INVALID_HID, H5I_INVALID_HID};
+ char * content[2] = {NULL, NULL};
char name[2][96];
- int opt, i, ntimes = 100;
+ int opt;
+ int ntimes = 100;
unsigned long tmp;
hbool_t use_vfd_swmr = TRUE;
char * end;
const uint64_t delay_ns = 1100 * 1000; /* 1.1 ms */
testsel_t sel = TEST_NONE;
- H5F_vfd_swmr_config_t config;
+ H5F_vfd_swmr_config_t *config;
const char * s_opts = "Sn:qt:";
struct h5_long_options l_opts[] = {{NULL, 0, '\0'}};
HDassert(H5T_C_S1 != H5I_INVALID_HID);
+ if (NULL == (config = HDcalloc(1, sizeof(H5F_vfd_swmr_config_t))))
+ PUTS_ERROR("memory allocation failed");
+
while ((opt = H5_get_option(argc, (const char *const *)argv, s_opts, l_opts)) != EOF) {
switch (opt) {
case 'S':
@@ -85,12 +90,21 @@ main(int argc, char **argv)
case 'n':
errno = 0;
tmp = HDstrtoul(H5_optarg, &end, 0);
- if (end == optarg || *end != '\0')
- errx(EXIT_FAILURE, "couldn't parse `-n` argument `%s`", H5_optarg);
- else if (errno != 0)
- err(EXIT_FAILURE, "couldn't parse `-n` argument `%s`", H5_optarg);
- else if (tmp > INT_MAX)
- errx(EXIT_FAILURE, "`-n` argument `%lu` too large", tmp);
+ if (end == optarg || *end != '\0') {
+ HDfprintf(stderr, "couldn't parse `-n` argument `%s`", H5_optarg);
+ AT();
+ goto error;
+ }
+ else if (errno != 0) {
+ HDfprintf(stderr, "couldn't parse `-n` argument `%s`", H5_optarg);
+ AT();
+ goto error;
+ }
+ else if (tmp > INT_MAX) {
+ HDfprintf(stderr, "`-n` argument `%lu` too large", tmp);
+ AT();
+ goto error;
+ }
ntimes = (int)tmp;
break;
case 'q':
@@ -113,40 +127,34 @@ main(int argc, char **argv)
argc -= H5_optind;
if (argc > 0)
- errx(EXIT_FAILURE, "unexpected command-line arguments");
+ PUTS_ERROR("unexpected command-line arguments");
/* config, tick_len, max_lag, presume_posix_semantics, writer,
* maintain_metadata_file, generate_updater_files, flush_raw_data, md_pages_reserved,
* md_file_path, md_file_name, updater_file_path */
- init_vfd_swmr_config(&config, 4, 7, FALSE, false, TRUE, FALSE, TRUE, 128, "./", "vlstr-shadow", NULL);
+ init_vfd_swmr_config(config, 4, 7, FALSE, false, TRUE, FALSE, TRUE, 128, "./", "vlstr-shadow", NULL);
/* use_latest_format, use_vfd_swmr, only_meta_page, page_buf_size, config */
- fapl = vfd_swmr_create_fapl(TRUE, use_vfd_swmr, sel == TEST_OOB, 4096, &config);
+ if ((fapl = vfd_swmr_create_fapl(TRUE, use_vfd_swmr, sel == TEST_OOB, 4096, config)) < 0)
+ STACK_ERROR;
- if (fapl < 0)
- errx(EXIT_FAILURE, "vfd_swmr_create_fapl");
-
- fid = H5Fopen("vfd_swmr_vlstr.h5", H5F_ACC_RDONLY, fapl);
+ if ((fid = H5Fopen("vfd_swmr_vlstr.h5", H5F_ACC_RDONLY, fapl)) < 0)
+ STACK_ERROR;
/* Create the VL string datatype and a scalar dataspace */
if ((type = H5Tcopy(H5T_C_S1)) == H5I_INVALID_HID)
- errx(EXIT_FAILURE, "H5Tcopy");
+ STACK_ERROR;
if (H5Tset_size(type, H5T_VARIABLE) < 0)
- errx(EXIT_FAILURE, "H5Tset_size");
- space = H5Screate(H5S_SCALAR);
-
- if (space == H5I_INVALID_HID)
- errx(EXIT_FAILURE, "H5Screate");
-
- if (fid == H5I_INVALID_HID)
- errx(EXIT_FAILURE, "H5Fcreate");
+ STACK_ERROR;
+ if ((space = H5Screate(H5S_SCALAR)) < 0)
+ STACK_ERROR;
/* content 0 seq 1 short
* content 1 seq 1 long long long long long long long long
* content 1 seq 1 medium medium medium
*/
- for (i = 0; !caught_out_of_bounds && i < ntimes; (i % 2 == 0) ? H5_nanosleep(delay_ns) : 0, i++) {
+ for (int i = 0; !caught_out_of_bounds && i < ntimes; i++) {
estack_state_t es;
const int ndsets = 2;
const int which = i % ndsets;
@@ -159,7 +167,8 @@ main(int argc, char **argv)
dbgf(2, "iteration %d which %d", i, which);
(void)HDsnprintf(name[which], sizeof(name[which]), "dset-%d", which);
- es = disable_estack();
+ es = disable_estack();
+
dset[which] = H5Dopen2(fid, name[which], H5P_DEFAULT);
restore_estack(es);
if (caught_out_of_bounds || dset[which] == H5I_INVALID_HID) {
@@ -185,6 +194,9 @@ main(int argc, char **argv)
HDfree(content[which]);
content[which] = NULL;
}
+
+ if (i % 2 == 0)
+ H5_nanosleep(delay_ns);
}
if (caught_out_of_bounds)
@@ -194,16 +206,15 @@ main(int argc, char **argv)
HDfprintf(stderr, "read NULL\n");
if (H5Pclose(fapl) < 0)
- errx(EXIT_FAILURE, "H5Pclose(fapl)");
-
+ STACK_ERROR;
if (H5Tclose(type) < 0)
- errx(EXIT_FAILURE, "H5Tclose");
-
+ STACK_ERROR;
if (H5Sclose(space) < 0)
- errx(EXIT_FAILURE, "H5Sclose");
-
+ STACK_ERROR;
if (H5Fclose(fid) < 0)
- errx(EXIT_FAILURE, "H5Fclose");
+ STACK_ERROR;
+
+ HDfree(config);
if (sel == TEST_OOB)
return caught_out_of_bounds ? EXIT_SUCCESS : EXIT_FAILURE;
@@ -211,6 +222,18 @@ main(int argc, char **argv)
return read_null ? EXIT_SUCCESS : EXIT_FAILURE;
return EXIT_SUCCESS;
+
+error:
+ H5E_BEGIN_TRY
+ {
+ H5Pclose(fapl);
+ H5Tclose(type);
+ H5Sclose(space);
+ H5Fclose(fid);
+ }
+ H5E_END_TRY;
+
+ HDfree(config);
}
#else /* H5_HAVE_WIN32_API */
diff --git a/test/vfd_swmr_vlstr_writer.c b/test/vfd_swmr_vlstr_writer.c
index 6a747a2..9fabc23 100644
--- a/test/vfd_swmr_vlstr_writer.c
+++ b/test/vfd_swmr_vlstr_writer.c
@@ -24,32 +24,35 @@
#ifndef H5_HAVE_WIN32_API
-#include <err.h>
-
enum _step { CREATE = 0, LENGTHEN, SHORTEN, DELETE, NSTEPS } step_t;
static hbool_t caught_out_of_bounds = FALSE;
-static void
+static herr_t
write_vl_dset(hid_t dset, hid_t type, hid_t space, char *data)
{
if (H5Dwrite(dset, type, space, space, H5P_DEFAULT, &data) < 0)
- errx(EXIT_FAILURE, "%s: H5Dwrite", __func__);
+ STACK_ERROR;
if (H5Dflush(dset) < 0)
- errx(EXIT_FAILURE, "%s: H5Dflush", __func__);
+ STACK_ERROR;
+
+ return SUCCEED;
+error:
+ return FAIL;
}
static hid_t
create_vl_dset(hid_t file, hid_t type, hid_t space, const char *name)
{
- hid_t dset;
+ hid_t dset = H5I_INVALID_HID;
- dset = H5Dcreate2(file, name, type, space, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
-
- if (dset == H5I_INVALID_HID)
- errx(EXIT_FAILURE, "H5Dcreate2");
+ if ((dset = H5Dcreate2(file, name, type, space, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0)
+ STACK_ERROR;
return dset;
+
+error:
+ return H5I_INVALID_HID;
}
static void
@@ -87,8 +90,12 @@ usage(const char *progname)
int
main(int argc, char **argv)
{
- hid_t fapl, fcpl, fid, space, type;
- hid_t dset[2];
+ hid_t fapl = H5I_INVALID_HID;
+ hid_t fcpl = H5I_INVALID_HID;
+ hid_t fid = H5I_INVALID_HID;
+ hid_t space = H5I_INVALID_HID;
+ hid_t type = H5I_INVALID_HID;
+ hid_t dset[2] = {H5I_INVALID_HID, H5I_INVALID_HID};
char content[2][96];
char name[2][96];
H5F_t * f;
@@ -102,12 +109,15 @@ main(int argc, char **argv)
hbool_t use_vfd_swmr = TRUE;
const uint64_t delay_ns = 100 * 1000 * 1000; /* 100 ms */
testsel_t sel = TEST_NONE;
- H5F_vfd_swmr_config_t config;
- const char * s_opts = "SWfn:qt:";
- struct h5_long_options l_opts[] = {{NULL, 0, '\0'}};
+ H5F_vfd_swmr_config_t *config = NULL;
+ const char * s_opts = "SWfn:qt:";
+ struct h5_long_options l_opts[] = {{NULL, 0, '\0'}};
HDassert(H5T_C_S1 != H5I_INVALID_HID);
+ if (NULL == (config = HDcalloc(1, sizeof(H5F_vfd_swmr_config_t))))
+ PUTS_ERROR("unable to allocate memory");
+
while ((opt = H5_get_option(argc, (const char *const *)argv, s_opts, l_opts)) != EOF) {
switch (opt) {
case 'S':
@@ -122,12 +132,21 @@ main(int argc, char **argv)
case 'n':
errno = 0;
tmp = HDstrtoul(H5_optarg, &end, 0);
- if (end == H5_optarg || *end != '\0')
- errx(EXIT_FAILURE, "couldn't parse `-n` argument `%s`", H5_optarg);
- else if (errno != 0)
- err(EXIT_FAILURE, "couldn't parse `-n` argument `%s`", H5_optarg);
- else if (tmp > INT_MAX)
- errx(EXIT_FAILURE, "`-n` argument `%lu` too large", tmp);
+ if (end == H5_optarg || *end != '\0') {
+ HDfprintf(stderr, "couldn't parse `-n` argument `%s`", H5_optarg);
+ AT();
+ goto error;
+ }
+ else if (errno != 0) {
+ HDfprintf(stderr, "couldn't parse `-n` argument `%s`", H5_optarg);
+ AT();
+ goto error;
+ }
+ else if (tmp > INT_MAX) {
+ HDfprintf(stderr, "`-n` argument `%lu` too large", tmp);
+ AT();
+ goto error;
+ }
ntimes = (int)tmp;
break;
case 'q':
@@ -150,53 +169,48 @@ main(int argc, char **argv)
argc -= H5_optind;
if (argc > 0)
- errx(EXIT_FAILURE, "unexpected command-line arguments");
+ PUTS_ERROR("unexpected command-line arguments");
/* config, tick_len, max_lag, presume_posix_semantics, writer,
* maintain_metadata_file, generate_updater_files, flush_raw_data, md_pages_reserved,
* md_file_path, md_file_name, updater_file_path */
- init_vfd_swmr_config(&config, 4, 7, FALSE, true, TRUE, FALSE, TRUE, 128, "./", "vlstr-shadow", NULL);
+ init_vfd_swmr_config(config, 4, 7, FALSE, true, TRUE, FALSE, TRUE, 128, "./", "vlstr-shadow", NULL);
/* use_latest_format, use_vfd_swmr, only_meta_page, page_buf_size, config */
- fapl = vfd_swmr_create_fapl(TRUE, use_vfd_swmr, sel == TEST_OOB, 4096, &config);
-
- if (fapl < 0)
- errx(EXIT_FAILURE, "vfd_swmr_create_fapl");
+ if ((fapl = vfd_swmr_create_fapl(TRUE, use_vfd_swmr, sel == TEST_OOB, 4096, config)) < 0)
+ STACK_ERROR;
/* Set fs_strategy (file space strategy) and fs_page_size (file space page size) */
if ((fcpl = vfd_swmr_create_fcpl(H5F_FSPACE_STRATEGY_PAGE, 4096)) < 0)
- errx(EXIT_FAILURE, "vfd_swmr_create_fcpl");
+ STACK_ERROR;
- fid = H5Fcreate("vfd_swmr_vlstr.h5", H5F_ACC_TRUNC, fcpl, fapl);
+ if ((fid = H5Fcreate("vfd_swmr_vlstr.h5", H5F_ACC_TRUNC, fcpl, fapl)) < 0)
+ STACK_ERROR;
/* Create the VL string datatype and a scalar dataspace, or a
* fixed-length string datatype and a simple dataspace.
*/
if ((type = H5Tcopy(H5T_C_S1)) == H5I_INVALID_HID)
- errx(EXIT_FAILURE, "H5Tcopy");
+ STACK_ERROR;
if (!variable) {
if (H5Tset_size(type, 32) < 0)
- errx(EXIT_FAILURE, "H5Tset_size");
- space = H5Screate_simple(1, &dims, NULL);
+ STACK_ERROR;
+ if ((space = H5Screate_simple(1, &dims, NULL)) < 0)
+ STACK_ERROR;
}
else {
if (H5Tset_size(type, H5T_VARIABLE) < 0)
- errx(EXIT_FAILURE, "H5Tset_size");
- space = H5Screate(H5S_SCALAR);
+ STACK_ERROR;
+ if ((space = H5Screate(H5S_SCALAR)) < 0)
+ STACK_ERROR;
}
- if (space == H5I_INVALID_HID)
- errx(EXIT_FAILURE, "H5Screate");
-
if ((f = H5VL_object_verify(fid, H5I_FILE)) == NULL)
- errx(EXIT_FAILURE, "H5VL_object_verify");
+ STACK_ERROR;
cache = f->shared->cache;
- if (fid == H5I_INVALID_HID)
- errx(EXIT_FAILURE, "H5Fcreate");
-
block_signals(&oldsigs);
print_cache_hits(cache);
@@ -217,27 +231,29 @@ main(int argc, char **argv)
(void)HDsnprintf(content[which], sizeof(content[which]), "content %d seq %d short", which,
seq);
dset[which] = create_vl_dset(fid, type, space, name[which]);
- write_vl_dset(dset[which], type, space, content[which]);
+ if (write_vl_dset(dset[which], type, space, content[which]) < 0)
+ PUTS_ERROR("failed to write to VL dataset");
break;
case LENGTHEN:
(void)HDsnprintf(content[which], sizeof(content[which]),
"content %d seq %d long long long long long long long long", which, seq);
- write_vl_dset(dset[which], type, space, content[which]);
+ if (write_vl_dset(dset[which], type, space, content[which]) < 0)
+ PUTS_ERROR("failed to write to VL dataset");
break;
case SHORTEN:
(void)HDsnprintf(content[which], sizeof(content[which]),
"content %d seq %d medium medium medium", which, seq);
- write_vl_dset(dset[which], type, space, content[which]);
+ if (write_vl_dset(dset[which], type, space, content[which]) < 0)
+ PUTS_ERROR("failed to write to VL dataset");
break;
case DELETE:
if (H5Dclose(dset[which]) < 0)
- errx(EXIT_FAILURE, "H5Dclose");
- if (H5Ldelete(fid, name[which], H5P_DEFAULT) < 0) {
- errx(EXIT_FAILURE, "%s: H5Ldelete(, \"%s\", ) failed", __func__, name[which]);
- }
+ STACK_ERROR;
+ if (H5Ldelete(fid, name[which], H5P_DEFAULT) < 0)
+ STACK_ERROR;
break;
default:
- errx(EXIT_FAILURE, "%s: unknown step %d", __func__, step);
+ PUTS_ERROR("Unknown operation");
}
if (caught_out_of_bounds) {
@@ -254,21 +270,35 @@ main(int argc, char **argv)
restore_signals(&oldsigs);
if (H5Pclose(fapl) < 0)
- errx(EXIT_FAILURE, "H5Pclose(fapl)");
-
+ STACK_ERROR;
if (H5Pclose(fcpl) < 0)
- errx(EXIT_FAILURE, "H5Pclose(fcpl)");
-
+ STACK_ERROR;
if (H5Tclose(type) < 0)
- errx(EXIT_FAILURE, "H5Tclose");
-
+ STACK_ERROR;
if (H5Sclose(space) < 0)
- errx(EXIT_FAILURE, "H5Sclose");
-
+ STACK_ERROR;
if (H5Fclose(fid) < 0)
- errx(EXIT_FAILURE, "H5Fclose");
+ STACK_ERROR;
+
+ HDfree(config);
return EXIT_SUCCESS;
+
+error:
+
+ H5E_BEGIN_TRY
+ {
+ H5Pclose(fapl);
+ H5Pclose(fcpl);
+ H5Tclose(type);
+ H5Sclose(space);
+ H5Fclose(fid);
+ }
+ H5E_END_TRY;
+
+ HDfree(config);
+
+ return EXIT_FAILURE;
}
#else /* H5_HAVE_WIN32_API */
diff --git a/test/vfd_swmr_zoo_writer.c b/test/vfd_swmr_zoo_writer.c
index 4a6e61c..8ab6ecd 100644
--- a/test/vfd_swmr_zoo_writer.c
+++ b/test/vfd_swmr_zoo_writer.c
@@ -33,14 +33,14 @@ typedef struct _shared_ticks {
uint64_t reader_tick;
} shared_ticks_t;
-int fd_writer_to_reader = -1, fd_reader_to_writer = -1;
-const char * fifo_writer_to_reader = "./fifo_writer_to_reader";
-const char * fifo_reader_to_writer = "./fifo_reader_to_writer";
-hbool_t use_vfd_swmr = TRUE;
-hbool_t use_named_pipe = TRUE;
-hbool_t print_estack = FALSE;
-static H5F_vfd_swmr_config_t swmr_config;
-static hbool_t writer;
+int fd_writer_to_reader = -1, fd_reader_to_writer = -1;
+const char * fifo_writer_to_reader = "./fifo_writer_to_reader";
+const char * fifo_reader_to_writer = "./fifo_reader_to_writer";
+hbool_t use_vfd_swmr = TRUE;
+hbool_t use_named_pipe = TRUE;
+hbool_t print_estack = FALSE;
+static H5F_vfd_swmr_config_t *swmr_config = NULL;
+static hbool_t writer;
struct timespec ival = {MAX_READ_LEN_IN_SECONDS, 0}; /* Expected maximal time for reader's validation */
zoo_config_t config = {.proc_num = 0,
@@ -138,9 +138,10 @@ parse_command_line_options(int argc, char **argv)
{
/* Translate the tick number to time represented by the timespec struct */
- float time = (float)(((unsigned)tmpl * TICK_LEN) / 10.0);
- unsigned sec = (unsigned)time;
- unsigned nsec = (unsigned)((time - sec) * 10 * 1000 * 1000);
+ long n_ticks = (long)tmpl * TICK_LEN;
+ float time = (float)n_ticks / 10.0F;
+ long sec = (long)time;
+ long nsec = (long)((time - (float)sec) * 10 * 1000 * 1000);
ival.tv_sec = sec;
ival.tv_nsec = nsec;
@@ -247,8 +248,8 @@ notify_and_wait_for_reader(hid_t fid, int verify)
/* During the wait, writer makes repeated HDF5 API calls so as to trigger
* EOT at approximately the correct time */
- for (i = 0; i < swmr_config.max_lag + 1; i++) {
- decisleep(swmr_config.tick_len);
+ for (i = 0; i < swmr_config->max_lag + 1; i++) {
+ decisleep(swmr_config->tick_len);
H5E_BEGIN_TRY
{
@@ -443,15 +444,29 @@ error:
int
main(int argc, char **argv)
{
- hid_t fapl = H5I_INVALID_HID, fcpl = H5I_INVALID_HID, fid = H5I_INVALID_HID;
- H5F_t * f;
- H5C_t * cache;
- struct timespec lastmsgtime = {.tv_sec = 0, .tv_nsec = 0};
- char * progname = NULL;
- char * personality;
- estack_state_t es;
- H5F_vfd_swmr_config_t vfd_swmr_config;
- int notify = 0, verify = 0;
+ hid_t fapl = H5I_INVALID_HID, fcpl = H5I_INVALID_HID, fid = H5I_INVALID_HID;
+ H5F_t * f;
+ H5C_t * cache;
+ struct timespec lastmsgtime = {.tv_sec = 0, .tv_nsec = 0};
+ char * progname = NULL;
+ char * personality;
+ estack_state_t es;
+ H5F_vfd_swmr_config_t *vfd_swmr_config = NULL;
+ int notify = 0, verify = 0;
+
+ if (NULL == (vfd_swmr_config = HDcalloc(1, sizeof(H5F_vfd_swmr_config_t)))) {
+ H5_FAILED();
+ AT();
+ HDprintf("memory allocation failed");
+ goto error;
+ }
+
+ if (NULL == (swmr_config = HDcalloc(1, sizeof(H5F_vfd_swmr_config_t)))) {
+ H5_FAILED();
+ AT();
+ HDprintf("memory allocation failed");
+ goto error;
+ }
if (H5_basename(argv[0], &progname) < 0) {
H5_FAILED();
@@ -478,19 +493,19 @@ main(int argc, char **argv)
/* config, tick_len, max_lag, presume_posix_semantics, writer,
* maintain_metadata_file, generate_updater_files, flush_raw_data, md_pages_reserved,
* md_file_path, md_file_name, updater_file_path */
- init_vfd_swmr_config(&vfd_swmr_config, TICK_LEN, 7, FALSE, writer, TRUE, FALSE, TRUE, 128, "./",
+ init_vfd_swmr_config(vfd_swmr_config, TICK_LEN, 7, FALSE, writer, TRUE, FALSE, TRUE, 128, "./",
"zoo-shadow", NULL);
/* ? turn off use latest format argument via 1st argument? since later on it reset to early format */
/* use_latest_format, use_vfd_swmr, only_meta_page, page_buf_size, config */
- if ((fapl = vfd_swmr_create_fapl(TRUE, use_vfd_swmr, TRUE, 4096, &vfd_swmr_config)) < 0) {
+ if ((fapl = vfd_swmr_create_fapl(TRUE, use_vfd_swmr, TRUE, 4096, vfd_swmr_config)) < 0) {
H5_FAILED();
AT();
HDprintf("vfd_swmr_create_fapl");
goto error;
}
- if (use_vfd_swmr && H5Pget_vfd_swmr_config(fapl, &swmr_config) < 0) {
+ if (use_vfd_swmr && H5Pget_vfd_swmr_config(fapl, swmr_config) < 0) {
H5_FAILED();
AT();
HDprintf("H5Pget_vfd_swmr_config failed");
@@ -656,8 +671,9 @@ main(int argc, char **argv)
goto error;
}
- if (progname)
- HDfree(progname);
+ HDfree(progname);
+ HDfree(vfd_swmr_config);
+ HDfree(swmr_config);
if (use_named_pipe && close_named_pipes() < 0) {
H5_FAILED();
@@ -688,5 +704,8 @@ error:
HDremove(fifo_reader_to_writer);
}
+ HDfree(vfd_swmr_config);
+ HDfree(swmr_config);
+
return EXIT_FAILURE;
}