diff options
author | Neil Fortner <fortnern@gmail.com> | 2024-02-23 17:06:06 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-02-23 17:06:06 (GMT) |
commit | 560e80c0ad8494a2e070aafde9cbcff11de99219 (patch) | |
tree | 5ddb917d293eb80471e66fb98fe88a159b0419e5 | |
parent | 3fd1e90df69462a0d55b5d830e8eee663fcb44bb (diff) | |
download | hdf5-560e80c0ad8494a2e070aafde9cbcff11de99219.zip hdf5-560e80c0ad8494a2e070aafde9cbcff11de99219.tar.gz hdf5-560e80c0ad8494a2e070aafde9cbcff11de99219.tar.bz2 |
Improve performance of flushing single objects (#4017)
Improve performance of flushing a single object, and remove metadata
cache flush markers
-rw-r--r-- | src/H5AC.c | 4 | ||||
-rw-r--r-- | src/H5ACprivate.h | 2 | ||||
-rw-r--r-- | src/H5C.c | 79 | ||||
-rw-r--r-- | src/H5Centry.c | 58 | ||||
-rw-r--r-- | src/H5Cint.c | 36 | ||||
-rw-r--r-- | src/H5Cpkg.h | 9 | ||||
-rw-r--r-- | src/H5Cprivate.h | 48 | ||||
-rw-r--r-- | src/H5Ctag.c | 148 | ||||
-rw-r--r-- | test/cache.c | 2267 | ||||
-rw-r--r-- | test/cache_common.h | 12 | ||||
-rw-r--r-- | test/cache_tagging.c | 11 |
11 files changed, 522 insertions, 2152 deletions
@@ -459,7 +459,7 @@ H5AC_dest(H5F_t *f) */ if (H5F_ACC_RDWR & H5F_INTENT(f)) { /* enable and load the skip list */ - if (H5C_set_slist_enabled(f->shared->cache, true, false) < 0) + if (H5C_set_slist_enabled(f->shared->cache, true, true) < 0) HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "can't enable skip list"); if (H5AC__flush_entries(f) < 0) @@ -1127,7 +1127,7 @@ H5AC_prep_for_file_flush(H5F_t *f) assert(f->shared); assert(f->shared->cache); - if (H5C_set_slist_enabled(f->shared->cache, true, false) < 0) + if (H5C_set_slist_enabled(f->shared->cache, true, true) < 0) HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "can't enable skip list"); done: diff --git a/src/H5ACprivate.h b/src/H5ACprivate.h index 5e23036..51f1b35 100644 --- a/src/H5ACprivate.h +++ b/src/H5ACprivate.h @@ -312,14 +312,12 @@ typedef struct H5AC_proxy_entry_t { */ #define H5AC__NO_FLAGS_SET H5C__NO_FLAGS_SET -#define H5AC__SET_FLUSH_MARKER_FLAG H5C__SET_FLUSH_MARKER_FLAG #define H5AC__DELETED_FLAG H5C__DELETED_FLAG #define H5AC__DIRTIED_FLAG H5C__DIRTIED_FLAG #define H5AC__PIN_ENTRY_FLAG H5C__PIN_ENTRY_FLAG #define H5AC__UNPIN_ENTRY_FLAG H5C__UNPIN_ENTRY_FLAG #define H5AC__FLUSH_INVALIDATE_FLAG H5C__FLUSH_INVALIDATE_FLAG #define H5AC__FLUSH_CLEAR_ONLY_FLAG H5C__FLUSH_CLEAR_ONLY_FLAG -#define H5AC__FLUSH_MARKED_ENTRIES_FLAG H5C__FLUSH_MARKED_ENTRIES_FLAG #define H5AC__FLUSH_IGNORE_PROTECTED_FLAG H5C__FLUSH_IGNORE_PROTECTED_FLAG #define H5AC__READ_ONLY_FLAG H5C__READ_ONLY_FLAG #define H5AC__FREE_FILE_SPACE_FLAG H5C__FREE_FILE_SPACE_FLAG @@ -493,7 +493,7 @@ H5C_dest(H5F_t *f) #endif /* H5AC_DUMP_IMAGE_STATS_ON_CLOSE */ /* Enable the slist, as it is needed in the flush */ - if (H5C_set_slist_enabled(f->shared->cache, true, false) < 0) + if (H5C_set_slist_enabled(f->shared->cache, true, true) < 0) HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "set slist enabled failed"); /* Flush and invalidate all cache entries */ @@ -567,7 +567,7 @@ H5C_evict(H5F_t *f) assert(f); /* Enable the slist, as it is needed in the flush */ - if (H5C_set_slist_enabled(f->shared->cache, true, false) < 0) + if (H5C_set_slist_enabled(f->shared->cache, true, true) < 0) HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "set slist enabled failed"); /* Flush and invalidate all cache entries except the pinned entries */ @@ -575,7 +575,7 @@ H5C_evict(H5F_t *f) HGOTO_ERROR(H5E_CACHE, H5E_CANTFLUSH, FAIL, "unable to evict entries in the cache"); /* Disable the slist */ - if (H5C_set_slist_enabled(f->shared->cache, false, true) < 0) + if (H5C_set_slist_enabled(f->shared->cache, false, false) < 0) HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "set slist disabled failed"); done: @@ -1042,41 +1042,32 @@ done: * * 1) Verifies that the slist is empty. * - * 2) Scans the index list, and inserts all dirty entries - * into the slist. + * 2) If the populate_slist parameter is true, scans the + * index list, and inserts all dirty entries into the + * slist. * * 3) Sets cache_ptr->slist_enabled = true. * - * Note that the clear_slist parameter is ignored if - * the slist_enabed parameter is true. - * * * If the slist_enabled_parameter is false, the function - * shuts down the slist. - * - * Normally the slist will be empty at this point, however - * that need not be the case if H5C_flush_cache() has been - * called with the H5C__FLUSH_MARKED_ENTRIES_FLAG. - * - * Thus shutdown proceeds as follows: + * shuts down the slist: * * 1) Test to see if the slist is empty. If it is, proceed * to step 3. * - * 2) Test to see if the clear_slist parameter is true. - * - * If it is, remove all entries from the slist. - * - * If it isn't, throw an error. + * 2) Remove all entries from the slist. * * 3) set cache_ptr->slist_enabled = false. * + * Note that the populate_slist parameter is ignored if + * the slist_enabed parameter is false. + * * Return: SUCCEED on success, and FAIL on failure. * *------------------------------------------------------------------------- */ herr_t -H5C_set_slist_enabled(H5C_t *cache_ptr, bool slist_enabled, bool clear_slist) +H5C_set_slist_enabled(H5C_t *cache_ptr, bool slist_enabled, bool populate_slist) { H5C_cache_entry_t *entry_ptr; herr_t ret_value = SUCCEED; /* Return value */ @@ -1097,40 +1088,30 @@ H5C_set_slist_enabled(H5C_t *cache_ptr, bool slist_enabled, bool clear_slist) */ cache_ptr->slist_enabled = true; - /* scan the index list and insert all dirty entries in the slist */ - entry_ptr = cache_ptr->il_head; - while (entry_ptr != NULL) { - if (entry_ptr->is_dirty) - H5C__INSERT_ENTRY_IN_SLIST(cache_ptr, entry_ptr, FAIL); - entry_ptr = entry_ptr->il_next; - } + if (populate_slist) { + /* scan the index list and insert all dirty entries in the slist */ + entry_ptr = cache_ptr->il_head; + while (entry_ptr != NULL) { + if (entry_ptr->is_dirty) + H5C__INSERT_ENTRY_IN_SLIST(cache_ptr, entry_ptr, FAIL); + entry_ptr = entry_ptr->il_next; + } - /* we don't maintain a dirty index len, so we can't do a cross - * check against it. Note that there is no point in cross checking - * against the dirty LRU size, as the dirty LRU may not be maintained, - * and in any case, there is no requirement that all dirty entries - * will reside on the dirty LRU. - */ - assert(cache_ptr->dirty_index_size == cache_ptr->slist_size); + /* we don't maintain a dirty index len, so we can't do a cross + * check against it. Note that there is no point in cross checking + * against the dirty LRU size, as the dirty LRU may not be maintained, + * and in any case, there is no requirement that all dirty entries + * will reside on the dirty LRU. + */ + assert(cache_ptr->dirty_index_size == cache_ptr->slist_size); + } } else { /* take down the skip list */ if (!cache_ptr->slist_enabled) HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "slist already disabled?"); - if ((cache_ptr->slist_len != 0) || (cache_ptr->slist_size != 0)) { - if (clear_slist) { - H5SL_node_t *node_ptr; - - node_ptr = H5SL_first(cache_ptr->slist_ptr); - while (node_ptr != NULL) { - entry_ptr = (H5C_cache_entry_t *)H5SL_item(node_ptr); - H5C__REMOVE_ENTRY_FROM_SLIST(cache_ptr, entry_ptr, false, FAIL); - node_ptr = H5SL_first(cache_ptr->slist_ptr); - } - } - else - HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "slist not empty?"); - } + if ((cache_ptr->slist_len != 0) || (cache_ptr->slist_size != 0)) + HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "slist not empty?"); cache_ptr->slist_enabled = false; diff --git a/src/H5Centry.c b/src/H5Centry.c index 2bbf9ac..fec1f4a 100644 --- a/src/H5Centry.c +++ b/src/H5Centry.c @@ -503,36 +503,24 @@ H5C__flush_single_entry(H5F_t *f, H5C_cache_entry_t *entry_ptr, unsigned flags) if (cache_ptr->slist_enabled) { if (entry_ptr->in_slist) { assert(entry_ptr->is_dirty); - if (entry_ptr->flush_marker && !entry_ptr->is_dirty) + if (!entry_ptr->is_dirty) HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "entry in slist failed sanity checks"); } /* end if */ - else { - assert(!entry_ptr->is_dirty); - assert(!entry_ptr->flush_marker); - if (entry_ptr->is_dirty || entry_ptr->flush_marker) - HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "entry failed sanity checks"); - } /* end else */ } - else { /* slist is disabled */ + else /* slist is disabled */ assert(!entry_ptr->in_slist); - if (!entry_ptr->is_dirty) - if (entry_ptr->flush_marker) - HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "flush marked clean entry?"); - } #endif /* H5C_DO_SANITY_CHECKS */ if (entry_ptr->is_protected) /* Attempt to flush a protected entry -- scream and die. */ HGOTO_ERROR(H5E_CACHE, H5E_PROTECT, FAIL, "Attempt to flush a protected entry"); - /* Set entry_ptr->flush_in_progress = true and set - * entry_ptr->flush_marker = false + /* Set entry_ptr->flush_in_progress = true * * We will set flush_in_progress back to false at the end if the * entry still exists at that point. */ entry_ptr->flush_in_progress = true; - entry_ptr->flush_marker = false; /* Preserve current dirty state for later */ was_dirty = entry_ptr->is_dirty; @@ -1240,7 +1228,6 @@ H5C__load_entry(H5F_t *f, entry->ro_ref_count = 0; entry->is_pinned = false; entry->in_slist = false; - entry->flush_marker = false; #ifdef H5_HAVE_PARALLEL entry->clear_on_unprotect = false; entry->flush_immediately = false; @@ -1897,7 +1884,6 @@ H5C__deserialize_prefetched_entry(H5F_t *f, H5C_t *cache_ptr, H5C_cache_entry_t ds_entry_ptr->ro_ref_count = 0; ds_entry_ptr->is_pinned = false; ds_entry_ptr->in_slist = false; - ds_entry_ptr->flush_marker = false; #ifdef H5_HAVE_PARALLEL ds_entry_ptr->clear_on_unprotect = false; ds_entry_ptr->flush_immediately = false; @@ -2095,7 +2081,6 @@ H5C_insert_entry(H5F_t *f, const H5C_class_t *type, haddr_t addr, void *thing, u #ifdef H5_HAVE_PARALLEL bool coll_access = false; /* whether access to the cache entry is done collectively */ #endif /* H5_HAVE_PARALLEL */ - bool set_flush_marker; bool write_permitted = true; size_t empty_space; H5C_cache_entry_t *entry_ptr = NULL; @@ -2125,9 +2110,8 @@ H5C_insert_entry(H5F_t *f, const H5C_class_t *type, haddr_t addr, void *thing, u HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "an extreme sanity check failed on entry"); #endif /* H5C_DO_EXTREME_SANITY_CHECKS */ - set_flush_marker = ((flags & H5C__SET_FLUSH_MARKER_FLAG) != 0); - insert_pinned = ((flags & H5C__PIN_ENTRY_FLAG) != 0); - flush_last = ((flags & H5C__FLUSH_LAST_FLAG) != 0); + insert_pinned = ((flags & H5C__PIN_ENTRY_FLAG) != 0); + flush_last = ((flags & H5C__FLUSH_LAST_FLAG) != 0); /* Get the ring type from the API context */ ring = H5CX_get_ring(); @@ -2301,7 +2285,6 @@ H5C_insert_entry(H5F_t *f, const H5C_class_t *type, haddr_t addr, void *thing, u /* New entries are presumed to be dirty */ assert(entry_ptr->is_dirty); - entry_ptr->flush_marker = set_flush_marker; H5C__INSERT_ENTRY_IN_SLIST(cache_ptr, entry_ptr, FAIL); H5C__UPDATE_RP_FOR_INSERTION(cache_ptr, entry_ptr, FAIL); @@ -2497,9 +2480,6 @@ H5C_mark_entry_clean(void *_thing) /* Mark the entry as clean if it isn't already */ entry_ptr->is_dirty = false; - /* Also reset the 'flush_marker' flag, since the entry shouldn't be flushed now */ - entry_ptr->flush_marker = false; - /* Modify cache data structures */ if (was_dirty) H5C__UPDATE_INDEX_FOR_ENTRY_CLEAN(cache_ptr, entry_ptr, FAIL); @@ -3426,7 +3406,6 @@ H5C_unprotect(H5F_t *f, haddr_t addr, void *thing, unsigned flags) H5C_t *cache_ptr; bool deleted; bool dirtied; - bool set_flush_marker; bool pin_entry; bool unpin_entry; bool free_file_space; @@ -3441,13 +3420,12 @@ H5C_unprotect(H5F_t *f, haddr_t addr, void *thing, unsigned flags) FUNC_ENTER_NOAPI(FAIL) - deleted = ((flags & H5C__DELETED_FLAG) != 0); - dirtied = ((flags & H5C__DIRTIED_FLAG) != 0); - set_flush_marker = ((flags & H5C__SET_FLUSH_MARKER_FLAG) != 0); - pin_entry = ((flags & H5C__PIN_ENTRY_FLAG) != 0); - unpin_entry = ((flags & H5C__UNPIN_ENTRY_FLAG) != 0); - free_file_space = ((flags & H5C__FREE_FILE_SPACE_FLAG) != 0); - take_ownership = ((flags & H5C__TAKE_OWNERSHIP_FLAG) != 0); + deleted = ((flags & H5C__DELETED_FLAG) != 0); + dirtied = ((flags & H5C__DIRTIED_FLAG) != 0); + pin_entry = ((flags & H5C__PIN_ENTRY_FLAG) != 0); + unpin_entry = ((flags & H5C__UNPIN_ENTRY_FLAG) != 0); + free_file_space = ((flags & H5C__FREE_FILE_SPACE_FLAG) != 0); + take_ownership = ((flags & H5C__TAKE_OWNERSHIP_FLAG) != 0); assert(f); assert(f->shared); @@ -3621,15 +3599,10 @@ H5C_unprotect(H5F_t *f, haddr_t addr, void *thing, unsigned flags) entry_ptr->is_protected = false; - /* if the entry is dirty, 'or' its flush_marker with the set flush flag, - * and then add it to the skip list if it isn't there already. - */ - if (entry_ptr->is_dirty) { - entry_ptr->flush_marker |= set_flush_marker; - if (!entry_ptr->in_slist) - /* this is a no-op if cache_ptr->slist_enabled is false */ - H5C__INSERT_ENTRY_IN_SLIST(cache_ptr, entry_ptr, FAIL); - } /* end if */ + /* if the entry is dirty, add it to the skip list if it isn't there already. */ + if (entry_ptr->is_dirty && !entry_ptr->in_slist) + /* this is a no-op if cache_ptr->slist_enabled is false */ + H5C__INSERT_ENTRY_IN_SLIST(cache_ptr, entry_ptr, FAIL); /* This implementation of the "deleted" option is a bit inefficient, as * we re-insert the entry to be deleted into the replacement policy @@ -4141,7 +4114,6 @@ H5C_remove_entry(void *_entry) /* Additional internal cache consistency checks */ assert(!entry->in_slist); - assert(!entry->flush_marker); assert(!entry->flush_in_progress); /* Note that the algorithm below is (very) similar to the set of operations diff --git a/src/H5Cint.c b/src/H5Cint.c index 31a947a..2e79a0d 100644 --- a/src/H5Cint.c +++ b/src/H5Cint.c @@ -1207,10 +1207,10 @@ H5C__flush_invalidate_ring(H5F_t *f, H5C_ring_t ring, unsigned flags) old_ring_pel_len = cur_ring_pel_len; while (cache_ptr->index_ring_len[ring] > 0) { - /* first, try to flush-destroy any dirty entries. Do this by + /* First, try to flush-destroy any dirty entries. Do this by * making a scan through the slist. Note that new dirty entries - * may be created by the flush call backs. Thus it is possible - * that the slist will not be empty after we finish the scan. + * may be created by the flush call back, thus we may need to + * restart the scan (see below). */ #ifdef H5C_DO_SANITY_CHECKS @@ -1573,7 +1573,6 @@ H5C__flush_ring(H5F_t *f, H5C_ring_t ring, unsigned flags) { H5C_t *cache_ptr = f->shared->cache; bool flushed_entries_last_pass; - bool flush_marked_entries; bool ignore_protected; bool tried_to_flush_protected_entry = false; bool restart_slist_scan; @@ -1603,12 +1602,10 @@ H5C__flush_ring(H5F_t *f, H5C_ring_t ring, unsigned flags) HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "an extreme sanity check failed on entry"); #endif /* H5C_DO_EXTREME_SANITY_CHECKS */ - ignore_protected = ((flags & H5C__FLUSH_IGNORE_PROTECTED_FLAG) != 0); - flush_marked_entries = ((flags & H5C__FLUSH_MARKED_ENTRIES_FLAG) != 0); + ignore_protected = ((flags & H5C__FLUSH_IGNORE_PROTECTED_FLAG) != 0); - if (!flush_marked_entries) - for (i = (int)H5C_RING_UNDEFINED; i < (int)ring; i++) - assert(cache_ptr->slist_ring_len[i] == 0); + for (i = (int)H5C_RING_UNDEFINED; i < (int)ring; i++) + assert(cache_ptr->slist_ring_len[i] == 0); assert(cache_ptr->flush_in_progress); @@ -1712,9 +1709,7 @@ H5C__flush_ring(H5F_t *f, H5C_ring_t ring, unsigned flags) */ assert(entry_ptr->in_slist); assert(entry_ptr->is_dirty); - - if (!flush_marked_entries || entry_ptr->flush_marker) - assert(entry_ptr->ring >= ring); + assert(entry_ptr->ring >= ring); /* Advance node pointer now, before we delete its target * from the slist. @@ -1727,19 +1722,14 @@ H5C__flush_ring(H5F_t *f, H5C_ring_t ring, unsigned flags) assert(next_entry_ptr->is_dirty); assert(next_entry_ptr->in_slist); - - if (!flush_marked_entries || next_entry_ptr->flush_marker) - assert(next_entry_ptr->ring >= ring); - + assert(next_entry_ptr->ring >= ring); assert(entry_ptr != next_entry_ptr); } /* end if */ else next_entry_ptr = NULL; - if ((!flush_marked_entries || entry_ptr->flush_marker) && - ((!entry_ptr->flush_me_last) || - ((entry_ptr->flush_me_last) && ((cache_ptr->num_last_entries >= cache_ptr->slist_len) || - (flush_marked_entries && entry_ptr->flush_marker)))) && + if (((!entry_ptr->flush_me_last) || + ((entry_ptr->flush_me_last) && cache_ptr->num_last_entries >= cache_ptr->slist_len)) && ((entry_ptr->flush_dep_nchildren == 0) || (entry_ptr->flush_dep_ndirty_children == 0)) && (entry_ptr->ring == ring)) { @@ -1790,10 +1780,8 @@ H5C__flush_ring(H5F_t *f, H5C_ring_t ring, unsigned flags) HGOTO_ERROR(H5E_CACHE, H5E_CANTFLUSH, FAIL, "cache has protected items"); #ifdef H5C_DO_SANITY_CHECKS - if (!flush_marked_entries) { - assert(cache_ptr->slist_ring_len[ring] == 0); - assert(cache_ptr->slist_ring_size[ring] == 0); - } /* end if */ + assert(cache_ptr->slist_ring_len[ring] == 0); + assert(cache_ptr->slist_ring_size[ring] == 0); #endif /* H5C_DO_SANITY_CHECKS */ done: diff --git a/src/H5Cpkg.h b/src/H5Cpkg.h index 5417684..4408774 100644 --- a/src/H5Cpkg.h +++ b/src/H5Cpkg.h @@ -2168,15 +2168,14 @@ typedef struct H5C_tag_info_t { * insert all dirtly entries in the skip list, and enable operations * on skip list by setting above control flag to true. * + * In the case of a partial flush (i.e. flush tagged entries), we only + * add tagged entries to the skip list, thus avoiding unnecessary scans + * over the entire cache. + * * At the end of a complete flush, we verify that the skip list is empty, * and set the control flag back to false, so as to avoid skip list * maintenance overhead until the next flush or close. * - * In the case of a partial flush (i.e. flush marked entries), we remove - * all remaining entries from the skip list, and then set the control flag - * back to false -- again avoiding skip list maintenance overhead until - * the next flush or close. - * * slist_enabled: Boolean flag used to control operation of the skip * list. If this filed is false, operations on the slist are * no-ops, and the slist must be empty. If it is true, diff --git a/src/H5Cprivate.h b/src/H5Cprivate.h index 3477e75..9f12312 100644 --- a/src/H5Cprivate.h +++ b/src/H5Cprivate.h @@ -134,7 +134,6 @@ * * * These flags apply to H5C_insert_entry(): - * H5C__SET_FLUSH_MARKER_FLAG * H5C__PIN_ENTRY_FLAG * H5C__FLUSH_LAST_FLAG ; super block only * H5C__FLUSH_COLLECTIVELY_FLAG ; super block only @@ -145,7 +144,6 @@ * H5C__FLUSH_COLLECTIVELY_FLAG ; super block only * * These flags apply to H5C_unprotect(): - * H5C__SET_FLUSH_MARKER_FLAG * H5C__DELETED_FLAG * H5C__DIRTIED_FLAG * H5C__PIN_ENTRY_FLAG @@ -162,7 +160,6 @@ * These flags apply to H5C_flush_cache(): * H5C__FLUSH_INVALIDATE_FLAG * H5C__FLUSH_CLEAR_ONLY_FLAG - * H5C__FLUSH_MARKED_ENTRIES_FLAG * H5C__FLUSH_IGNORE_PROTECTED_FLAG (can't use this flag in combination * with H5C__FLUSH_INVALIDATE_FLAG) * H5C__DURING_FLUSH_FLAG @@ -170,32 +167,29 @@ * These flags apply to H5C_flush_single_entry(): * H5C__FLUSH_INVALIDATE_FLAG * H5C__FLUSH_CLEAR_ONLY_FLAG - * H5C__FLUSH_MARKED_ENTRIES_FLAG * H5C__TAKE_OWNERSHIP_FLAG * H5C__DEL_FROM_SLIST_ON_DESTROY_FLAG * H5C__GENERATE_IMAGE_FLAG * H5C__UPDATE_PAGE_BUFFER_FLAG */ #define H5C__NO_FLAGS_SET 0x00000 -#define H5C__SET_FLUSH_MARKER_FLAG 0x00001 -#define H5C__DELETED_FLAG 0x00002 -#define H5C__DIRTIED_FLAG 0x00004 -#define H5C__PIN_ENTRY_FLAG 0x00008 -#define H5C__UNPIN_ENTRY_FLAG 0x00010 -#define H5C__FLUSH_INVALIDATE_FLAG 0x00020 -#define H5C__FLUSH_CLEAR_ONLY_FLAG 0x00040 -#define H5C__FLUSH_MARKED_ENTRIES_FLAG 0x00080 -#define H5C__FLUSH_IGNORE_PROTECTED_FLAG 0x00100 -#define H5C__READ_ONLY_FLAG 0x00200 -#define H5C__FREE_FILE_SPACE_FLAG 0x00400 -#define H5C__TAKE_OWNERSHIP_FLAG 0x00800 -#define H5C__FLUSH_LAST_FLAG 0x01000 -#define H5C__FLUSH_COLLECTIVELY_FLAG 0x02000 -#define H5C__EVICT_ALLOW_LAST_PINS_FLAG 0x04000 -#define H5C__DEL_FROM_SLIST_ON_DESTROY_FLAG 0x08000 -#define H5C__DURING_FLUSH_FLAG 0x10000 /* Set when the entire cache is being flushed */ -#define H5C__GENERATE_IMAGE_FLAG 0x20000 /* Set during parallel I/O */ -#define H5C__UPDATE_PAGE_BUFFER_FLAG 0x40000 /* Set during parallel I/O */ +#define H5C__DELETED_FLAG 0x00001 +#define H5C__DIRTIED_FLAG 0x00002 +#define H5C__PIN_ENTRY_FLAG 0x00004 +#define H5C__UNPIN_ENTRY_FLAG 0x00008 +#define H5C__FLUSH_INVALIDATE_FLAG 0x00010 +#define H5C__FLUSH_CLEAR_ONLY_FLAG 0x00020 +#define H5C__FLUSH_IGNORE_PROTECTED_FLAG 0x00040 +#define H5C__READ_ONLY_FLAG 0x00080 +#define H5C__FREE_FILE_SPACE_FLAG 0x00100 +#define H5C__TAKE_OWNERSHIP_FLAG 0x00200 +#define H5C__FLUSH_LAST_FLAG 0x00400 +#define H5C__FLUSH_COLLECTIVELY_FLAG 0x00800 +#define H5C__EVICT_ALLOW_LAST_PINS_FLAG 0x01000 +#define H5C__DEL_FROM_SLIST_ON_DESTROY_FLAG 0x02000 +#define H5C__DURING_FLUSH_FLAG 0x04000 /* Set when the entire cache is being flushed */ +#define H5C__GENERATE_IMAGE_FLAG 0x08000 /* Set during parallel I/O */ +#define H5C__UPDATE_PAGE_BUFFER_FLAG 0x10000 /* Set during parallel I/O */ /* Debugging/sanity checking/statistics settings */ /* #define H5C_DO_SANITY_CHECKS */ @@ -1074,11 +1068,6 @@ typedef int H5C_ring_t; * As a general rule, entries are placed in the list when they are * marked dirty. * - * flush_marker: Boolean flag indicating that the entry is to be flushed - * the next time H5C_flush_cache() is called with the - * H5C__FLUSH_MARKED_ENTRIES_FLAG. The flag is reset when - * the entry is flushed for whatever reason. - * * flush_me_last: Boolean flag indicating that this entry should not be * flushed from the cache until all other entries without the * flush_me_last flag set have been flushed. @@ -1557,7 +1546,6 @@ typedef struct H5C_cache_entry_t { int ro_ref_count; bool is_pinned; bool in_slist; - bool flush_marker; bool flush_me_last; #ifdef H5_HAVE_PARALLEL bool clear_on_unprotect; @@ -2207,7 +2195,7 @@ H5_DLL herr_t H5C_resize_entry(void *thing, size_t new_size); H5_DLL herr_t H5C_set_cache_auto_resize_config(H5C_t *cache_ptr, H5C_auto_size_ctl_t *config_ptr); H5_DLL herr_t H5C_set_cache_image_config(const H5F_t *f, H5C_t *cache_ptr, H5C_cache_image_ctl_t *config_ptr); H5_DLL herr_t H5C_set_evictions_enabled(H5C_t *cache_ptr, bool evictions_enabled); -H5_DLL herr_t H5C_set_slist_enabled(H5C_t *cache_ptr, bool slist_enabled, bool clear_slist); +H5_DLL herr_t H5C_set_slist_enabled(H5C_t *cache_ptr, bool slist_enabled, bool populate_slist); H5_DLL herr_t H5C_set_prefix(H5C_t *cache_ptr, char *prefix); H5_DLL herr_t H5C_stats(H5C_t *cache_ptr, const char *cache_name, bool display_detailed_stats); H5_DLL void H5C_stats__reset(H5C_t *cache_ptr); diff --git a/src/H5Ctag.c b/src/H5Ctag.c index a1a9f42..8da6c13 100644 --- a/src/H5Ctag.c +++ b/src/H5Ctag.c @@ -80,8 +80,6 @@ typedef struct { /* Local Prototypes */ /********************/ static herr_t H5C__iter_tagged_entries_real(H5C_t *cache, haddr_t tag, H5C_tag_iter_cb_t cb, void *cb_ctx); -static herr_t H5C__mark_tagged_entries(H5C_t *cache, haddr_t tag); -static herr_t H5C__flush_marked_entries(H5F_t *f); /*********************/ /* Package Variables */ @@ -520,101 +518,6 @@ done: FUNC_LEAVE_NOAPI(ret_value) } /* H5C_evict_tagged_entries() */ -/*------------------------------------------------------------------------- - * Function: H5C__mark_tagged_entries_cb - * - * Purpose: Callback to set the flush marker on dirty entries in the cache - * - * Return: H5_ITER_CONT (can't fail) - * - *------------------------------------------------------------------------- - */ -static int -H5C__mark_tagged_entries_cb(H5C_cache_entry_t *entry, void H5_ATTR_UNUSED *_ctx) -{ - /* Function enter macro */ - FUNC_ENTER_PACKAGE_NOERR - - /* Sanity checks */ - assert(entry); - - /* We only want to set the flush marker on entries that - * actually need flushed (i.e., dirty ones) */ - if (entry->is_dirty) - entry->flush_marker = true; - - FUNC_LEAVE_NOAPI(H5_ITER_CONT) -} /* H5C__mark_tagged_entries_cb() */ - -/*------------------------------------------------------------------------- - * Function: H5C__mark_tagged_entries - * - * Purpose: Set the flush marker on dirty entries in the cache that have - * the specified tag, as well as all globally tagged entries. - * - * Return: FAIL if error is detected, SUCCEED otherwise. - * - *------------------------------------------------------------------------- - */ -static herr_t -H5C__mark_tagged_entries(H5C_t *cache, haddr_t tag) -{ - herr_t ret_value = SUCCEED; /* Return value */ - - /* Function enter macro */ - FUNC_ENTER_PACKAGE - - /* Sanity check */ - assert(cache); - - /* Iterate through hash table entries, marking those with specified tag, as - * well as any major global entries which should always be flushed - * when flushing based on tag value */ - if (H5C__iter_tagged_entries(cache, tag, true, H5C__mark_tagged_entries_cb, NULL) < 0) - HGOTO_ERROR(H5E_CACHE, H5E_BADITER, FAIL, "Iteration of tagged entries failed"); - -done: - FUNC_LEAVE_NOAPI(ret_value) -} /* H5C__mark_tagged_entries() */ - -/*------------------------------------------------------------------------- - * Function: H5C__flush_marked_entries - * - * Purpose: Flushes all marked entries in the cache. - * - * Return: FAIL if error is detected, SUCCEED otherwise. - * - *------------------------------------------------------------------------- - */ -static herr_t -H5C__flush_marked_entries(H5F_t *f) -{ - herr_t ret_value = SUCCEED; - - FUNC_ENTER_PACKAGE - - /* Assertions */ - assert(f != NULL); - - /* Enable the slist, as it is needed in the flush */ - if (H5C_set_slist_enabled(f->shared->cache, true, false) < 0) - HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "set slist enabled failed"); - - /* Flush all marked entries */ - if (H5C_flush_cache(f, H5C__FLUSH_MARKED_ENTRIES_FLAG | H5C__FLUSH_IGNORE_PROTECTED_FLAG) < 0) - HGOTO_ERROR(H5E_CACHE, H5E_CANTFLUSH, FAIL, "Can't flush cache"); - - /* Disable the slist. Set the clear_slist parameter to true - * since we called H5C_flush_cache() with the - * H5C__FLUSH_MARKED_ENTRIES_FLAG. - */ - if (H5C_set_slist_enabled(f->shared->cache, false, true) < 0) - HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "disable slist failed"); - -done: - FUNC_LEAVE_NOAPI(ret_value) -} /* H5C__flush_marked_entries */ - #ifdef H5C_DO_TAGGING_SANITY_CHECKS /*------------------------------------------------------------------------- @@ -685,6 +588,36 @@ done: #endif /*------------------------------------------------------------------------- + * Function: H5C__flush_tagged_entries_cb + * + * Purpose: Callback to set the flush marker on dirty entries in the cache + * + * Return: H5_ITER_CONT (can't fail) + * + *------------------------------------------------------------------------- + */ +static int +H5C__flush_tagged_entries_cb(H5C_cache_entry_t *entry, void *_ctx) +{ + H5C_t *cache_ptr = (H5C_t *)_ctx; + int ret_value = H5_ITER_CONT; + + /* Function enter macro */ + FUNC_ENTER_PACKAGE + + /* Sanity checks */ + assert(entry); + assert(cache_ptr); + + /* We only want to add entries to the slist that actually need flushed (i.e., dirty ones) */ + if (entry->is_dirty) + H5C__INSERT_ENTRY_IN_SLIST(cache_ptr, entry, H5_ITER_ERROR); + +done: + FUNC_LEAVE_NOAPI(ret_value) +} /* H5C__flush_tagged_entries_cb() */ + +/*------------------------------------------------------------------------- * Function: H5C_flush_tagged_entries * * Purpose: Flushes all entries with the specified tag to disk. @@ -709,13 +642,22 @@ H5C_flush_tagged_entries(H5F_t *f, haddr_t tag) /* Get cache pointer */ cache = f->shared->cache; - /* Mark all entries with specified tag */ - if (H5C__mark_tagged_entries(cache, tag) < 0) - HGOTO_ERROR(H5E_CACHE, H5E_CANTFLUSH, FAIL, "Can't mark tagged entries"); + /* Enable the slist, as it is needed in the flush */ + if (H5C_set_slist_enabled(f->shared->cache, true, false) < 0) + HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "set slist enabled failed"); + + /* Iterate through hash table entries, adding those with specified tag to the slist, as well as any major + * global entries which should always be flushed when flushing based on tag value */ + if (H5C__iter_tagged_entries(cache, tag, true, H5C__flush_tagged_entries_cb, cache) < 0) + HGOTO_ERROR(H5E_CACHE, H5E_BADITER, FAIL, "Iteration of tagged entries failed"); + + /* Flush all entries in the slist */ + if (H5C_flush_cache(f, H5C__FLUSH_IGNORE_PROTECTED_FLAG) < 0) + HGOTO_ERROR(H5E_CACHE, H5E_CANTFLUSH, FAIL, "Can't flush cache"); - /* Flush all marked entries */ - if (H5C__flush_marked_entries(f) < 0) - HGOTO_ERROR(H5E_CACHE, H5E_CANTFLUSH, FAIL, "Can't flush marked entries"); + /* Disable the slist */ + if (H5C_set_slist_enabled(f->shared->cache, false, false) < 0) + HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "disable slist failed"); done: FUNC_LEAVE_NOAPI(ret_value) diff --git a/test/cache.c b/test/cache.c index 4e62886..09d6a1f 100644 --- a/test/cache.c +++ b/test/cache.c @@ -2779,16 +2779,14 @@ check_insert_entry(unsigned paged) if (pass) { insert_entry(file_ptr, entry_type, 0, H5C__NO_FLAGS_SET); - insert_entry(file_ptr, entry_type, 1, H5C__SET_FLUSH_MARKER_FLAG); - insert_entry(file_ptr, entry_type, 2, H5C__PIN_ENTRY_FLAG); - insert_entry(file_ptr, entry_type, 3, (H5C__SET_FLUSH_MARKER_FLAG | H5C__PIN_ENTRY_FLAG)); + insert_entry(file_ptr, entry_type, 1, H5C__PIN_ENTRY_FLAG); } /* Verify that the entries are inserted as desired. */ i = 0; base_addr = entries[0]; - while (pass && (i < 4)) { + while (pass && (i < 2)) { entry_ptr = &(base_addr[i]); /* Start by checking everything we can via H5C_get_entry_status() */ @@ -2815,7 +2813,7 @@ check_insert_entry(unsigned paged) if (pass) { /* verify that the pinned flag got set correctly */ - if ((i == 2) || (i == 3)) { + if (i == 1) { if (!is_pinned) { @@ -2841,24 +2839,6 @@ check_insert_entry(unsigned paged) if (pass) { - /* Verify that the flush marker got set correctly */ - if ((i == 1) || (i == 3)) { - - if (!((entry_ptr->header).flush_marker)) { - - pass = false; - failure_mssg = "Unexpected insert results 5."; - } - } - else if ((entry_ptr->header).flush_marker) { - - pass = false; - failure_mssg = "Unexpected insert results 6."; - } - } - - if (pass) { - /* Verify that pinned entries are in the pinned entry list */ if ((entry_ptr->header).is_pinned) { @@ -2927,15 +2907,15 @@ check_insert_entry(unsigned paged) if (pass) { - if ((cache_ptr->index_len != 4) || (cache_ptr->index_size != 4 * entry_sizes[entry_type]) || + if ((cache_ptr->index_len != 2) || (cache_ptr->index_size != 2 * entry_sizes[entry_type]) || ((cache_ptr->slist_enabled) && - ((cache_ptr->slist_len != 4) || (cache_ptr->slist_size != 4 * entry_sizes[entry_type]))) || - (cache_ptr->pl_len != 0) || (cache_ptr->pl_size != (size_t)0) || (cache_ptr->pel_len != 2) || - (cache_ptr->pel_size != 2 * entry_sizes[entry_type]) || (cache_ptr->LRU_list_len != 2) || - (cache_ptr->LRU_list_size != 2 * entry_sizes[entry_type]) + ((cache_ptr->slist_len != 2) || (cache_ptr->slist_size != 2 * entry_sizes[entry_type]))) || + (cache_ptr->pl_len != 0) || (cache_ptr->pl_size != (size_t)0) || (cache_ptr->pel_len != 1) || + (cache_ptr->pel_size != 1 * entry_sizes[entry_type]) || (cache_ptr->LRU_list_len != 1) || + (cache_ptr->LRU_list_size != 1 * entry_sizes[entry_type]) #if H5C_MAINTAIN_CLEAN_AND_DIRTY_LRU_LISTS - || (cache_ptr->dLRU_list_len != 2) || - (cache_ptr->dLRU_list_size != 2 * entry_sizes[entry_type]) || (cache_ptr->cLRU_list_len != 0) || + || (cache_ptr->dLRU_list_len != 1) || + (cache_ptr->dLRU_list_size != 1 * entry_sizes[entry_type]) || (cache_ptr->cLRU_list_len != 0) || (cache_ptr->cLRU_list_size != (size_t)0) #endif /* H5C_MAINTAIN_CLEAN_AND_DIRTY_LRU_LISTS */ ) { @@ -2951,14 +2931,12 @@ check_insert_entry(unsigned paged) #if H5C_COLLECT_CACHE_STATS if (pass) { - if ((cache_ptr->insertions[entry_type] != 4) || (cache_ptr->pinned_insertions[entry_type] != 2) || - (cache_ptr->pins[entry_type] != 2) || (cache_ptr->unpins[entry_type] != 0) || - (cache_ptr->dirty_pins[entry_type] != 0) || (cache_ptr->max_index_len != 4) || - (cache_ptr->max_index_size != 4 * entry_sizes[entry_type]) || - ((cache_ptr->slist_enabled) && - ((cache_ptr->slist_len != 4) || (cache_ptr->slist_size != 4 * entry_sizes[entry_type]))) || - (cache_ptr->max_pl_len != 0) || (cache_ptr->max_pl_size != (size_t)0) || - (cache_ptr->max_pel_len != 2) || (cache_ptr->max_pel_size != 2 * entry_sizes[entry_type])) { + if ((cache_ptr->insertions[entry_type] != 2) || (cache_ptr->pinned_insertions[entry_type] != 1) || + (cache_ptr->pins[entry_type] != 1) || (cache_ptr->unpins[entry_type] != 0) || + (cache_ptr->dirty_pins[entry_type] != 0) || (cache_ptr->max_index_len != 2) || + (cache_ptr->max_index_size != 2 * entry_sizes[entry_type]) || (cache_ptr->max_pl_len != 0) || + (cache_ptr->max_pl_size != (size_t)0) || (cache_ptr->max_pel_len != 1) || + (cache_ptr->max_pel_size != 1 * entry_sizes[entry_type])) { pass = false; failure_mssg = "Unexpected insert results 11."; @@ -2970,8 +2948,7 @@ check_insert_entry(unsigned paged) if (pass) { - unpin_entry(entry_type, 2); - unpin_entry(entry_type, 3); + unpin_entry(entry_type, 1); } if (pass) { @@ -3130,12 +3107,6 @@ check_flush_cache__empty_cache(H5F_t *file_ptr) "flush with flags = 0x08 failed on empty cache.\n") } - if (pass) { - - H5C_FLUSH_CACHE(file_ptr, H5C__FLUSH_MARKED_ENTRIES_FLAG, - "flush with flags = 0x10 failed on empty cache.\n") - } - } /* check_flush_cache__empty_cache() */ /*------------------------------------------------------------------------- @@ -3169,71 +3140,70 @@ check_flush_cache__multi_entry(H5F_t *file_ptr) int test_num = 1; unsigned int flush_flags = H5C__NO_FLAGS_SET; unsigned int spec_size = 8; - struct flush_cache_test_spec spec[8] = { - {/* entry_num = */ 0, - /* entry_type = */ PICO_ENTRY_TYPE, - /* entry_index = */ 100, - /* insert_flag = */ false, - /* flags = */ H5C__NO_FLAGS_SET, - /* expected_deserialized = */ true, - /* expected_serialized = */ false, - /* expected_destroyed = */ false}, - {/* entry_num = */ 1, - /* entry_type = */ PICO_ENTRY_TYPE, - /* entry_index = */ 75, - /* insert_flag = */ false, - /* flags = */ H5C__DIRTIED_FLAG, - /* expected_deserialized = */ true, - /* expected_serialized = */ true, - /* expected_destroyed = */ false}, - {/* entry_num = */ 2, - /* entry_type = */ PICO_ENTRY_TYPE, - /* entry_index = */ 25, - /* insert_flag = */ true, - /* flags = */ H5C__NO_FLAGS_SET, - /* expected_deserialized = */ false, - /* expected_serialized = */ true, - /* expected_destroyed = */ false}, - {/* entry_num = */ 3, - /* entry_type = */ PICO_ENTRY_TYPE, - /* entry_index = */ 50, - /* insert_flag = */ true, - /* flags = */ H5C__NO_FLAGS_SET, - /* expected_deserialized = */ false, - /* expected_serialized = */ true, - /* expected_destroyed = */ false}, - {/* entry_num = */ 4, - /* entry_type = */ MONSTER_ENTRY_TYPE, - /* entry_index = */ 10, - /* insert_flag = */ false, - /* flags = */ H5C__SET_FLUSH_MARKER_FLAG, - /* expected_deserialized = */ true, - /* expected_serialized = */ false, - /* expected_destroyed = */ false}, - {/* entry_num = */ 5, - /* entry_type = */ MONSTER_ENTRY_TYPE, - /* entry_index = */ 20, - /* insert_flag = */ false, - /* flags = */ H5C__DIRTIED_FLAG | H5C__SET_FLUSH_MARKER_FLAG, - /* expected_deserialized = */ true, - /* expected_serialized = */ true, - /* expected_destroyed = */ false}, - {/* entry_num = */ 6, - /* entry_type = */ MONSTER_ENTRY_TYPE, - /* entry_index = */ 30, - /* insert_flag = */ true, - /* flags = */ H5C__SET_FLUSH_MARKER_FLAG, - /* expected_deserialized = */ false, - /* expected_serialized = */ true, - /* expected_destroyed = */ false}, - {/* entry_num = */ 7, - /* entry_type = */ MONSTER_ENTRY_TYPE, - /* entry_index = */ 40, - /* insert_flag = */ true, - /* flags = */ H5C__SET_FLUSH_MARKER_FLAG, - /* expected_deserialized = */ false, - /* expected_serialized = */ true, - /* expected_destroyed = */ false}}; + struct flush_cache_test_spec spec[8] = {{/* entry_num = */ 0, + /* entry_type = */ PICO_ENTRY_TYPE, + /* entry_index = */ 100, + /* insert_flag = */ false, + /* flags = */ H5C__NO_FLAGS_SET, + /* expected_deserialized = */ true, + /* expected_serialized = */ false, + /* expected_destroyed = */ false}, + {/* entry_num = */ 1, + /* entry_type = */ PICO_ENTRY_TYPE, + /* entry_index = */ 75, + /* insert_flag = */ false, + /* flags = */ H5C__DIRTIED_FLAG, + /* expected_deserialized = */ true, + /* expected_serialized = */ true, + /* expected_destroyed = */ false}, + {/* entry_num = */ 2, + /* entry_type = */ PICO_ENTRY_TYPE, + /* entry_index = */ 25, + /* insert_flag = */ true, + /* flags = */ H5C__NO_FLAGS_SET, + /* expected_deserialized = */ false, + /* expected_serialized = */ true, + /* expected_destroyed = */ false}, + {/* entry_num = */ 3, + /* entry_type = */ PICO_ENTRY_TYPE, + /* entry_index = */ 50, + /* insert_flag = */ true, + /* flags = */ H5C__NO_FLAGS_SET, + /* expected_deserialized = */ false, + /* expected_serialized = */ true, + /* expected_destroyed = */ false}, + {/* entry_num = */ 4, + /* entry_type = */ MONSTER_ENTRY_TYPE, + /* entry_index = */ 10, + /* insert_flag = */ false, + /* flags = */ H5C__NO_FLAGS_SET, + /* expected_deserialized = */ true, + /* expected_serialized = */ false, + /* expected_destroyed = */ false}, + {/* entry_num = */ 5, + /* entry_type = */ MONSTER_ENTRY_TYPE, + /* entry_index = */ 20, + /* insert_flag = */ false, + /* flags = */ H5C__DIRTIED_FLAG, + /* expected_deserialized = */ true, + /* expected_serialized = */ true, + /* expected_destroyed = */ false}, + {/* entry_num = */ 6, + /* entry_type = */ MONSTER_ENTRY_TYPE, + /* entry_index = */ 30, + /* insert_flag = */ true, + /* flags = */ H5C__NO_FLAGS_SET, + /* expected_deserialized = */ false, + /* expected_serialized = */ true, + /* expected_destroyed = */ false}, + {/* entry_num = */ 7, + /* entry_type = */ MONSTER_ENTRY_TYPE, + /* entry_index = */ 40, + /* insert_flag = */ true, + /* flags = */ H5C__NO_FLAGS_SET, + /* expected_deserialized = */ false, + /* expected_serialized = */ true, + /* expected_destroyed = */ false}}; check_flush_cache__multi_entry_test(file_ptr, test_num, flush_flags, spec_size, spec); } @@ -3242,71 +3212,70 @@ check_flush_cache__multi_entry(H5F_t *file_ptr) int test_num = 2; unsigned int flush_flags = H5C__FLUSH_INVALIDATE_FLAG; unsigned int spec_size = 8; - struct flush_cache_test_spec spec[8] = { - {/* entry_num = */ 0, - /* entry_type = */ PICO_ENTRY_TYPE, - /* entry_index = */ 100, - /* insert_flag = */ false, - /* flags = */ H5C__NO_FLAGS_SET, - /* expected_deserialized = */ true, - /* expected_serialized = */ false, - /* expected_destroyed = */ true}, - {/* entry_num = */ 1, - /* entry_type = */ PICO_ENTRY_TYPE, - /* entry_index = */ 75, - /* insert_flag = */ false, - /* flags = */ H5C__DIRTIED_FLAG, - /* expected_deserialized = */ true, - /* expected_serialized = */ true, - /* expected_destroyed = */ true}, - {/* entry_num = */ 2, - /* entry_type = */ PICO_ENTRY_TYPE, - /* entry_index = */ 25, - /* insert_flag = */ true, - /* flags = */ H5C__NO_FLAGS_SET, - /* expected_deserialized = */ false, - /* expected_serialized = */ true, - /* expected_destroyed = */ true}, - {/* entry_num = */ 3, - /* entry_type = */ PICO_ENTRY_TYPE, - /* entry_index = */ 50, - /* insert_flag = */ true, - /* flags = */ H5C__NO_FLAGS_SET, - /* expected_deserialized = */ false, - /* expected_serialized = */ true, - /* expected_destroyed = */ true}, - {/* entry_num = */ 4, - /* entry_type = */ MONSTER_ENTRY_TYPE, - /* entry_index = */ 10, - /* insert_flag = */ false, - /* flags = */ H5C__SET_FLUSH_MARKER_FLAG, - /* expected_deserialized = */ true, - /* expected_serialized = */ false, - /* expected_destroyed = */ true}, - {/* entry_num = */ 5, - /* entry_type = */ MONSTER_ENTRY_TYPE, - /* entry_index = */ 20, - /* insert_flag = */ false, - /* flags = */ H5C__DIRTIED_FLAG | H5C__SET_FLUSH_MARKER_FLAG, - /* expected_deserialized = */ true, - /* expected_serialized = */ true, - /* expected_destroyed = */ true}, - {/* entry_num = */ 6, - /* entry_type = */ MONSTER_ENTRY_TYPE, - /* entry_index = */ 30, - /* insert_flag = */ true, - /* flags = */ H5C__SET_FLUSH_MARKER_FLAG, - /* expected_deserialized = */ false, - /* expected_serialized = */ true, - /* expected_destroyed = */ true}, - {/* entry_num = */ 7, - /* entry_type = */ MONSTER_ENTRY_TYPE, - /* entry_index = */ 40, - /* insert_flag = */ true, - /* flags = */ H5C__SET_FLUSH_MARKER_FLAG, - /* expected_deserialized = */ false, - /* expected_serialized = */ true, - /* expected_destroyed = */ true}}; + struct flush_cache_test_spec spec[8] = {{/* entry_num = */ 0, + /* entry_type = */ PICO_ENTRY_TYPE, + /* entry_index = */ 100, + /* insert_flag = */ false, + /* flags = */ H5C__NO_FLAGS_SET, + /* expected_deserialized = */ true, + /* expected_serialized = */ false, + /* expected_destroyed = */ true}, + {/* entry_num = */ 1, + /* entry_type = */ PICO_ENTRY_TYPE, + /* entry_index = */ 75, + /* insert_flag = */ false, + /* flags = */ H5C__DIRTIED_FLAG, + /* expected_deserialized = */ true, + /* expected_serialized = */ true, + /* expected_destroyed = */ true}, + {/* entry_num = */ 2, + /* entry_type = */ PICO_ENTRY_TYPE, + /* entry_index = */ 25, + /* insert_flag = */ true, + /* flags = */ H5C__NO_FLAGS_SET, + /* expected_deserialized = */ false, + /* expected_serialized = */ true, + /* expected_destroyed = */ true}, + {/* entry_num = */ 3, + /* entry_type = */ PICO_ENTRY_TYPE, + /* entry_index = */ 50, + /* insert_flag = */ true, + /* flags = */ H5C__NO_FLAGS_SET, + /* expected_deserialized = */ false, + /* expected_serialized = */ true, + /* expected_destroyed = */ true}, + {/* entry_num = */ 4, + /* entry_type = */ MONSTER_ENTRY_TYPE, + /* entry_index = */ 10, + /* insert_flag = */ false, + /* flags = */ H5C__NO_FLAGS_SET, + /* expected_deserialized = */ true, + /* expected_serialized = */ false, + /* expected_destroyed = */ true}, + {/* entry_num = */ 5, + /* entry_type = */ MONSTER_ENTRY_TYPE, + /* entry_index = */ 20, + /* insert_flag = */ false, + /* flags = */ H5C__DIRTIED_FLAG, + /* expected_deserialized = */ true, + /* expected_serialized = */ true, + /* expected_destroyed = */ true}, + {/* entry_num = */ 6, + /* entry_type = */ MONSTER_ENTRY_TYPE, + /* entry_index = */ 30, + /* insert_flag = */ true, + /* flags = */ H5C__NO_FLAGS_SET, + /* expected_deserialized = */ false, + /* expected_serialized = */ true, + /* expected_destroyed = */ true}, + {/* entry_num = */ 7, + /* entry_type = */ MONSTER_ENTRY_TYPE, + /* entry_index = */ 40, + /* insert_flag = */ true, + /* flags = */ H5C__NO_FLAGS_SET, + /* expected_deserialized = */ false, + /* expected_serialized = */ true, + /* expected_destroyed = */ true}}; check_flush_cache__multi_entry_test(file_ptr, test_num, flush_flags, spec_size, spec); } @@ -3315,512 +3284,215 @@ check_flush_cache__multi_entry(H5F_t *file_ptr) int test_num = 3; unsigned int flush_flags = H5C__FLUSH_CLEAR_ONLY_FLAG; unsigned int spec_size = 8; - struct flush_cache_test_spec spec[8] = { - {/* entry_num = */ 0, - /* entry_type = */ PICO_ENTRY_TYPE, - /* entry_index = */ 100, - /* insert_flag = */ false, - /* flags = */ H5C__NO_FLAGS_SET, - /* expected_deserialized = */ true, - /* expected_serialized = */ false, - /* expected_destroyed = */ false}, - {/* entry_num = */ 1, - /* entry_type = */ PICO_ENTRY_TYPE, - /* entry_index = */ 75, - /* insert_flag = */ false, - /* flags = */ H5C__DIRTIED_FLAG, - /* expected_deserialized = */ true, - /* expected_serialized = */ false, - /* expected_destroyed = */ false}, - {/* entry_num = */ 2, - /* entry_type = */ PICO_ENTRY_TYPE, - /* entry_index = */ 25, - /* insert_flag = */ true, - /* flags = */ H5C__NO_FLAGS_SET, - /* expected_deserialized = */ false, - /* expected_serialized = */ false, - /* expected_destroyed = */ false}, - {/* entry_num = */ 3, - /* entry_type = */ PICO_ENTRY_TYPE, - /* entry_index = */ 50, - /* insert_flag = */ true, - /* flags = */ H5C__NO_FLAGS_SET, - /* expected_deserialized = */ false, - /* expected_serialized = */ false, - /* expected_destroyed = */ false}, - {/* entry_num = */ 4, - /* entry_type = */ MONSTER_ENTRY_TYPE, - /* entry_index = */ 10, - /* insert_flag = */ false, - /* flags = */ H5C__SET_FLUSH_MARKER_FLAG, - /* expected_deserialized = */ true, - /* expected_serialized = */ false, - /* expected_destroyed = */ false}, - {/* entry_num = */ 5, - /* entry_type = */ MONSTER_ENTRY_TYPE, - /* entry_index = */ 20, - /* insert_flag = */ false, - /* flags = */ H5C__DIRTIED_FLAG | H5C__SET_FLUSH_MARKER_FLAG, - /* expected_deserialized = */ true, - /* expected_serialized = */ false, - /* expected_destroyed = */ false}, - {/* entry_num = */ 6, - /* entry_type = */ MONSTER_ENTRY_TYPE, - /* entry_index = */ 30, - /* insert_flag = */ true, - /* flags = */ H5C__SET_FLUSH_MARKER_FLAG, - /* expected_deserialized = */ false, - /* expected_serialized = */ false, - /* expected_destroyed = */ false}, - {/* entry_num = */ 7, - /* entry_type = */ MONSTER_ENTRY_TYPE, - /* entry_index = */ 40, - /* insert_flag = */ true, - /* flags = */ H5C__SET_FLUSH_MARKER_FLAG, - /* expected_deserialized = */ false, - /* expected_serialized = */ false, - /* expected_destroyed = */ false}}; + struct flush_cache_test_spec spec[8] = {{/* entry_num = */ 0, + /* entry_type = */ PICO_ENTRY_TYPE, + /* entry_index = */ 100, + /* insert_flag = */ false, + /* flags = */ H5C__NO_FLAGS_SET, + /* expected_deserialized = */ true, + /* expected_serialized = */ false, + /* expected_destroyed = */ false}, + {/* entry_num = */ 1, + /* entry_type = */ PICO_ENTRY_TYPE, + /* entry_index = */ 75, + /* insert_flag = */ false, + /* flags = */ H5C__DIRTIED_FLAG, + /* expected_deserialized = */ true, + /* expected_serialized = */ false, + /* expected_destroyed = */ false}, + {/* entry_num = */ 2, + /* entry_type = */ PICO_ENTRY_TYPE, + /* entry_index = */ 25, + /* insert_flag = */ true, + /* flags = */ H5C__NO_FLAGS_SET, + /* expected_deserialized = */ false, + /* expected_serialized = */ false, + /* expected_destroyed = */ false}, + {/* entry_num = */ 3, + /* entry_type = */ PICO_ENTRY_TYPE, + /* entry_index = */ 50, + /* insert_flag = */ true, + /* flags = */ H5C__NO_FLAGS_SET, + /* expected_deserialized = */ false, + /* expected_serialized = */ false, + /* expected_destroyed = */ false}, + {/* entry_num = */ 4, + /* entry_type = */ MONSTER_ENTRY_TYPE, + /* entry_index = */ 10, + /* insert_flag = */ false, + /* flags = */ H5C__NO_FLAGS_SET, + /* expected_deserialized = */ true, + /* expected_serialized = */ false, + /* expected_destroyed = */ false}, + {/* entry_num = */ 5, + /* entry_type = */ MONSTER_ENTRY_TYPE, + /* entry_index = */ 20, + /* insert_flag = */ false, + /* flags = */ H5C__DIRTIED_FLAG, + /* expected_deserialized = */ true, + /* expected_serialized = */ false, + /* expected_destroyed = */ false}, + {/* entry_num = */ 6, + /* entry_type = */ MONSTER_ENTRY_TYPE, + /* entry_index = */ 30, + /* insert_flag = */ true, + /* flags = */ H5C__NO_FLAGS_SET, + /* expected_deserialized = */ false, + /* expected_serialized = */ false, + /* expected_destroyed = */ false}, + {/* entry_num = */ 7, + /* entry_type = */ MONSTER_ENTRY_TYPE, + /* entry_index = */ 40, + /* insert_flag = */ true, + /* flags = */ H5C__NO_FLAGS_SET, + /* expected_deserialized = */ false, + /* expected_serialized = */ false, + /* expected_destroyed = */ false}}; check_flush_cache__multi_entry_test(file_ptr, test_num, flush_flags, spec_size, spec); } if (pass) { int test_num = 4; - unsigned int flush_flags = H5C__FLUSH_MARKED_ENTRIES_FLAG; - unsigned int spec_size = 8; - struct flush_cache_test_spec spec[8] = { - {/* entry_num = */ 0, - /* entry_type = */ PICO_ENTRY_TYPE, - /* entry_index = */ 100, - /* insert_flag = */ false, - /* flags = */ H5C__NO_FLAGS_SET, - /* expected_deserialized = */ true, - /* expected_serialized = */ false, - /* expected_destroyed = */ false}, - {/* entry_num = */ 1, - /* entry_type = */ PICO_ENTRY_TYPE, - /* entry_index = */ 75, - /* insert_flag = */ false, - /* flags = */ H5C__DIRTIED_FLAG, - /* expected_deserialized = */ true, - /* expected_serialized = */ false, - /* expected_destroyed = */ false}, - {/* entry_num = */ 2, - /* entry_type = */ PICO_ENTRY_TYPE, - /* entry_index = */ 25, - /* insert_flag = */ true, - /* flags = */ H5C__NO_FLAGS_SET, - /* expected_deserialized = */ false, - /* expected_serialized = */ false, - /* expected_destroyed = */ false}, - {/* entry_num = */ 3, - /* entry_type = */ PICO_ENTRY_TYPE, - /* entry_index = */ 50, - /* insert_flag = */ true, - /* flags = */ H5C__NO_FLAGS_SET, - /* expected_deserialized = */ false, - /* expected_serialized = */ false, - /* expected_destroyed = */ false}, - {/* entry_num = */ 4, - /* entry_type = */ MONSTER_ENTRY_TYPE, - /* entry_index = */ 10, - /* insert_flag = */ false, - /* flags = */ H5C__SET_FLUSH_MARKER_FLAG, - /* expected_deserialized = */ true, - /* expected_serialized = */ false, - /* expected_destroyed = */ false}, - {/* entry_num = */ 5, - /* entry_type = */ MONSTER_ENTRY_TYPE, - /* entry_index = */ 20, - /* insert_flag = */ false, - /* flags = */ H5C__DIRTIED_FLAG | H5C__SET_FLUSH_MARKER_FLAG, - /* expected_deserialized = */ true, - /* expected_serialized = */ true, - /* expected_destroyed = */ false}, - {/* entry_num = */ 6, - /* entry_type = */ MONSTER_ENTRY_TYPE, - /* entry_index = */ 30, - /* insert_flag = */ true, - /* flags = */ H5C__SET_FLUSH_MARKER_FLAG, - /* expected_deserialized = */ false, - /* expected_serialized = */ true, - /* expected_destroyed = */ false}, - {/* entry_num = */ 7, - /* entry_type = */ MONSTER_ENTRY_TYPE, - /* entry_index = */ 40, - /* insert_flag = */ true, - /* flags = */ H5C__SET_FLUSH_MARKER_FLAG, - /* expected_deserialized = */ false, - /* expected_serialized = */ true, - /* expected_destroyed = */ false}}; - - check_flush_cache__multi_entry_test(file_ptr, test_num, flush_flags, spec_size, spec); - } - - if (pass) { - int test_num = 5; unsigned int flush_flags = H5C__FLUSH_INVALIDATE_FLAG | H5C__FLUSH_CLEAR_ONLY_FLAG; unsigned int spec_size = 8; - struct flush_cache_test_spec spec[8] = { - {/* entry_num = */ 0, - /* entry_type = */ PICO_ENTRY_TYPE, - /* entry_index = */ 100, - /* insert_flag = */ false, - /* flags = */ H5C__NO_FLAGS_SET, - /* expected_deserialized = */ true, - /* expected_serialized = */ false, - /* expected_destroyed = */ true}, - {/* entry_num = */ 1, - /* entry_type = */ PICO_ENTRY_TYPE, - /* entry_index = */ 75, - /* insert_flag = */ false, - /* flags = */ H5C__DIRTIED_FLAG, - /* expected_deserialized = */ true, - /* expected_serialized = */ false, - /* expected_destroyed = */ true}, - {/* entry_num = */ 2, - /* entry_type = */ PICO_ENTRY_TYPE, - /* entry_index = */ 25, - /* insert_flag = */ true, - /* flags = */ H5C__NO_FLAGS_SET, - /* expected_deserialized = */ false, - /* expected_serialized = */ false, - /* expected_destroyed = */ true}, - {/* entry_num = */ 3, - /* entry_type = */ PICO_ENTRY_TYPE, - /* entry_index = */ 50, - /* insert_flag = */ true, - /* flags = */ H5C__NO_FLAGS_SET, - /* expected_deserialized = */ false, - /* expected_serialized = */ false, - /* expected_destroyed = */ true}, - {/* entry_num = */ 4, - /* entry_type = */ MONSTER_ENTRY_TYPE, - /* entry_index = */ 10, - /* insert_flag = */ false, - /* flags = */ H5C__SET_FLUSH_MARKER_FLAG, - /* expected_deserialized = */ true, - /* expected_serialized = */ false, - /* expected_destroyed = */ true}, - {/* entry_num = */ 5, - /* entry_type = */ MONSTER_ENTRY_TYPE, - /* entry_index = */ 20, - /* insert_flag = */ false, - /* flags = */ H5C__DIRTIED_FLAG | H5C__SET_FLUSH_MARKER_FLAG, - /* expected_deserialized = */ true, - /* expected_serialized = */ false, - /* expected_destroyed = */ true}, - {/* entry_num = */ 6, - /* entry_type = */ MONSTER_ENTRY_TYPE, - /* entry_index = */ 30, - /* insert_flag = */ true, - /* flags = */ H5C__SET_FLUSH_MARKER_FLAG, - /* expected_deserialized = */ false, - /* expected_serialized = */ false, - /* expected_destroyed = */ true}, - {/* entry_num = */ 7, - /* entry_type = */ MONSTER_ENTRY_TYPE, - /* entry_index = */ 40, - /* insert_flag = */ true, - /* flags = */ H5C__SET_FLUSH_MARKER_FLAG, - /* expected_deserialized = */ false, - /* expected_serialized = */ false, - /* expected_destroyed = */ true}}; - - check_flush_cache__multi_entry_test(file_ptr, test_num, flush_flags, spec_size, spec); - } - - if (pass) { - int test_num = 6; - unsigned int flush_flags = H5C__FLUSH_INVALIDATE_FLAG | H5C__FLUSH_MARKED_ENTRIES_FLAG; - unsigned int spec_size = 8; - struct flush_cache_test_spec spec[8] = { - {/* entry_num = */ 0, - /* entry_type = */ PICO_ENTRY_TYPE, - /* entry_index = */ 100, - /* insert_flag = */ false, - /* flags = */ H5C__NO_FLAGS_SET, - /* expected_deserialized = */ true, - /* expected_serialized = */ false, - /* expected_destroyed = */ true}, - {/* entry_num = */ 1, - /* entry_type = */ PICO_ENTRY_TYPE, - /* entry_index = */ 75, - /* insert_flag = */ false, - /* flags = */ H5C__DIRTIED_FLAG, - /* expected_deserialized = */ true, - /* expected_serialized = */ true, - /* expected_destroyed = */ true}, - {/* entry_num = */ 2, - /* entry_type = */ PICO_ENTRY_TYPE, - /* entry_index = */ 25, - /* insert_flag = */ true, - /* flags = */ H5C__NO_FLAGS_SET, - /* expected_deserialized = */ false, - /* expected_serialized = */ true, - /* expected_destroyed = */ true}, - {/* entry_num = */ 3, - /* entry_type = */ PICO_ENTRY_TYPE, - /* entry_index = */ 50, - /* insert_flag = */ true, - /* flags = */ H5C__NO_FLAGS_SET, - /* expected_deserialized = */ false, - /* expected_serialized = */ true, - /* expected_destroyed = */ true}, - {/* entry_num = */ 4, - /* entry_type = */ MONSTER_ENTRY_TYPE, - /* entry_index = */ 10, - /* insert_flag = */ false, - /* flags = */ H5C__SET_FLUSH_MARKER_FLAG, - /* expected_deserialized = */ true, - /* expected_serialized = */ false, - /* expected_destroyed = */ true}, - {/* entry_num = */ 5, - /* entry_type = */ MONSTER_ENTRY_TYPE, - /* entry_index = */ 20, - /* insert_flag = */ false, - /* flags = */ H5C__DIRTIED_FLAG | H5C__SET_FLUSH_MARKER_FLAG, - /* expected_deserialized = */ true, - /* expected_serialized = */ true, - /* expected_destroyed = */ true}, - {/* entry_num = */ 6, - /* entry_type = */ MONSTER_ENTRY_TYPE, - /* entry_index = */ 30, - /* insert_flag = */ true, - /* flags = */ H5C__SET_FLUSH_MARKER_FLAG, - /* expected_deserialized = */ false, - /* expected_serialized = */ true, - /* expected_destroyed = */ true}, - {/* entry_num = */ 7, - /* entry_type = */ MONSTER_ENTRY_TYPE, - /* entry_index = */ 40, - /* insert_flag = */ true, - /* flags = */ H5C__SET_FLUSH_MARKER_FLAG, - /* expected_deserialized = */ false, - /* expected_serialized = */ true, - /* expected_destroyed = */ true}}; - - check_flush_cache__multi_entry_test(file_ptr, test_num, flush_flags, spec_size, spec); - } - - if (pass) { - int test_num = 7; - unsigned int flush_flags = H5C__FLUSH_CLEAR_ONLY_FLAG | H5C__FLUSH_MARKED_ENTRIES_FLAG; - unsigned int spec_size = 8; - struct flush_cache_test_spec spec[8] = { - {/* entry_num = */ 0, - /* entry_type = */ PICO_ENTRY_TYPE, - /* entry_index = */ 100, - /* insert_flag = */ false, - /* flags = */ H5C__NO_FLAGS_SET, - /* expected_deserialized = */ true, - /* expected_serialized = */ false, - /* expected_destroyed = */ false}, - {/* entry_num = */ 1, - /* entry_type = */ PICO_ENTRY_TYPE, - /* entry_index = */ 75, - /* insert_flag = */ false, - /* flags = */ H5C__DIRTIED_FLAG, - /* expected_deserialized = */ true, - /* expected_serialized = */ false, - /* expected_destroyed = */ false}, - {/* entry_num = */ 2, - /* entry_type = */ PICO_ENTRY_TYPE, - /* entry_index = */ 25, - /* insert_flag = */ true, - /* flags = */ H5C__NO_FLAGS_SET, - /* expected_deserialized = */ false, - /* expected_serialized = */ false, - /* expected_destroyed = */ false}, - {/* entry_num = */ 3, - /* entry_type = */ PICO_ENTRY_TYPE, - /* entry_index = */ 50, - /* insert_flag = */ true, - /* flags = */ H5C__NO_FLAGS_SET, - /* expected_deserialized = */ false, - /* expected_serialized = */ false, - /* expected_destroyed = */ false}, - {/* entry_num = */ 4, - /* entry_type = */ MONSTER_ENTRY_TYPE, - /* entry_index = */ 10, - /* insert_flag = */ false, - /* flags = */ H5C__SET_FLUSH_MARKER_FLAG, - /* expected_deserialized = */ true, - /* expected_serialized = */ false, - /* expected_destroyed = */ false}, - {/* entry_num = */ 5, - /* entry_type = */ MONSTER_ENTRY_TYPE, - /* entry_index = */ 20, - /* insert_flag = */ false, - /* flags = */ H5C__DIRTIED_FLAG | H5C__SET_FLUSH_MARKER_FLAG, - /* expected_deserialized = */ true, - /* expected_serialized = */ false, - /* expected_destroyed = */ false}, - {/* entry_num = */ 6, - /* entry_type = */ MONSTER_ENTRY_TYPE, - /* entry_index = */ 30, - /* insert_flag = */ true, - /* flags = */ H5C__SET_FLUSH_MARKER_FLAG, - /* expected_deserialized = */ false, - /* expected_serialized = */ false, - /* expected_destroyed = */ false}, - {/* entry_num = */ 7, - /* entry_type = */ MONSTER_ENTRY_TYPE, - /* entry_index = */ 40, - /* insert_flag = */ true, - /* flags = */ H5C__SET_FLUSH_MARKER_FLAG, - /* expected_deserialized = */ false, - /* expected_serialized = */ false, - /* expected_destroyed = */ false}}; - - check_flush_cache__multi_entry_test(file_ptr, test_num, flush_flags, spec_size, spec); - } - - if (pass) { - int test_num = 8; - unsigned int flush_flags = - H5C__FLUSH_INVALIDATE_FLAG | H5C__FLUSH_CLEAR_ONLY_FLAG | H5C__FLUSH_MARKED_ENTRIES_FLAG; - unsigned int spec_size = 8; - struct flush_cache_test_spec spec[8] = { - {/* entry_num = */ 0, - /* entry_type = */ PICO_ENTRY_TYPE, - /* entry_index = */ 100, - /* insert_flag = */ false, - /* flags = */ H5C__NO_FLAGS_SET, - /* expected_deserialized = */ true, - /* expected_serialized = */ false, - /* expected_destroyed = */ true}, - {/* entry_num = */ 1, - /* entry_type = */ PICO_ENTRY_TYPE, - /* entry_index = */ 75, - /* insert_flag = */ false, - /* flags = */ H5C__DIRTIED_FLAG, - /* expected_deserialized = */ true, - /* expected_serialized = */ false, - /* expected_destroyed = */ true}, - {/* entry_num = */ 2, - /* entry_type = */ PICO_ENTRY_TYPE, - /* entry_index = */ 25, - /* insert_flag = */ true, - /* flags = */ H5C__NO_FLAGS_SET, - /* expected_deserialized = */ false, - /* expected_serialized = */ false, - /* expected_destroyed = */ true}, - {/* entry_num = */ 3, - /* entry_type = */ PICO_ENTRY_TYPE, - /* entry_index = */ 50, - /* insert_flag = */ true, - /* flags = */ H5C__NO_FLAGS_SET, - /* expected_deserialized = */ false, - /* expected_serialized = */ false, - /* expected_destroyed = */ true}, - {/* entry_num = */ 4, - /* entry_type = */ MONSTER_ENTRY_TYPE, - /* entry_index = */ 10, - /* insert_flag = */ false, - /* flags = */ H5C__SET_FLUSH_MARKER_FLAG, - /* expected_deserialized = */ true, - /* expected_serialized = */ false, - /* expected_destroyed = */ true}, - {/* entry_num = */ 5, - /* entry_type = */ MONSTER_ENTRY_TYPE, - /* entry_index = */ 20, - /* insert_flag = */ false, - /* flags = */ H5C__DIRTIED_FLAG | H5C__SET_FLUSH_MARKER_FLAG, - /* expected_deserialized = */ true, - /* expected_serialized = */ false, - /* expected_destroyed = */ true}, - {/* entry_num = */ 6, - /* entry_type = */ MONSTER_ENTRY_TYPE, - /* entry_index = */ 30, - /* insert_flag = */ true, - /* flags = */ H5C__SET_FLUSH_MARKER_FLAG, - /* expected_deserialized = */ false, - /* expected_serialized = */ false, - /* expected_destroyed = */ true}, - {/* entry_num = */ 7, - /* entry_type = */ MONSTER_ENTRY_TYPE, - /* entry_index = */ 40, - /* insert_flag = */ true, - /* flags = */ H5C__SET_FLUSH_MARKER_FLAG, - /* expected_deserialized = */ false, - /* expected_serialized = */ false, - /* expected_destroyed = */ true}}; + struct flush_cache_test_spec spec[8] = {{/* entry_num = */ 0, + /* entry_type = */ PICO_ENTRY_TYPE, + /* entry_index = */ 100, + /* insert_flag = */ false, + /* flags = */ H5C__NO_FLAGS_SET, + /* expected_deserialized = */ true, + /* expected_serialized = */ false, + /* expected_destroyed = */ true}, + {/* entry_num = */ 1, + /* entry_type = */ PICO_ENTRY_TYPE, + /* entry_index = */ 75, + /* insert_flag = */ false, + /* flags = */ H5C__DIRTIED_FLAG, + /* expected_deserialized = */ true, + /* expected_serialized = */ false, + /* expected_destroyed = */ true}, + {/* entry_num = */ 2, + /* entry_type = */ PICO_ENTRY_TYPE, + /* entry_index = */ 25, + /* insert_flag = */ true, + /* flags = */ H5C__NO_FLAGS_SET, + /* expected_deserialized = */ false, + /* expected_serialized = */ false, + /* expected_destroyed = */ true}, + {/* entry_num = */ 3, + /* entry_type = */ PICO_ENTRY_TYPE, + /* entry_index = */ 50, + /* insert_flag = */ true, + /* flags = */ H5C__NO_FLAGS_SET, + /* expected_deserialized = */ false, + /* expected_serialized = */ false, + /* expected_destroyed = */ true}, + {/* entry_num = */ 4, + /* entry_type = */ MONSTER_ENTRY_TYPE, + /* entry_index = */ 10, + /* insert_flag = */ false, + /* flags = */ H5C__NO_FLAGS_SET, + /* expected_deserialized = */ true, + /* expected_serialized = */ false, + /* expected_destroyed = */ true}, + {/* entry_num = */ 5, + /* entry_type = */ MONSTER_ENTRY_TYPE, + /* entry_index = */ 20, + /* insert_flag = */ false, + /* flags = */ H5C__DIRTIED_FLAG, + /* expected_deserialized = */ true, + /* expected_serialized = */ false, + /* expected_destroyed = */ true}, + {/* entry_num = */ 6, + /* entry_type = */ MONSTER_ENTRY_TYPE, + /* entry_index = */ 30, + /* insert_flag = */ true, + /* flags = */ H5C__NO_FLAGS_SET, + /* expected_deserialized = */ false, + /* expected_serialized = */ false, + /* expected_destroyed = */ true}, + {/* entry_num = */ 7, + /* entry_type = */ MONSTER_ENTRY_TYPE, + /* entry_index = */ 40, + /* insert_flag = */ true, + /* flags = */ H5C__NO_FLAGS_SET, + /* expected_deserialized = */ false, + /* expected_serialized = */ false, + /* expected_destroyed = */ true}}; check_flush_cache__multi_entry_test(file_ptr, test_num, flush_flags, spec_size, spec); } /* verify that all other flags are ignored */ if (pass) { - int test_num = 9; - unsigned int flush_flags = (unsigned)~(H5C__FLUSH_INVALIDATE_FLAG | H5C__FLUSH_CLEAR_ONLY_FLAG | - H5C__FLUSH_MARKED_ENTRIES_FLAG); + int test_num = 5; + unsigned int flush_flags = (unsigned)~(H5C__FLUSH_INVALIDATE_FLAG | H5C__FLUSH_CLEAR_ONLY_FLAG); unsigned int spec_size = 8; - struct flush_cache_test_spec spec[8] = { - {/* entry_num = */ 0, - /* entry_type = */ PICO_ENTRY_TYPE, - /* entry_index = */ 100, - /* insert_flag = */ false, - /* flags = */ H5C__NO_FLAGS_SET, - /* expected_deserialized = */ true, - /* expected_serialized = */ false, - /* expected_destroyed = */ false}, - {/* entry_num = */ 1, - /* entry_type = */ PICO_ENTRY_TYPE, - /* entry_index = */ 75, - /* insert_flag = */ false, - /* flags = */ H5C__DIRTIED_FLAG, - /* expected_deserialized = */ true, - /* expected_serialized = */ true, - /* expected_destroyed = */ false}, - {/* entry_num = */ 2, - /* entry_type = */ PICO_ENTRY_TYPE, - /* entry_index = */ 25, - /* insert_flag = */ true, - /* flags = */ H5C__NO_FLAGS_SET, - /* expected_deserialized = */ false, - /* expected_serialized = */ true, - /* expected_destroyed = */ false}, - {/* entry_num = */ 3, - /* entry_type = */ PICO_ENTRY_TYPE, - /* entry_index = */ 50, - /* insert_flag = */ true, - /* flags = */ H5C__NO_FLAGS_SET, - /* expected_deserialized = */ false, - /* expected_serialized = */ true, - /* expected_destroyed = */ false}, - {/* entry_num = */ 4, - /* entry_type = */ MONSTER_ENTRY_TYPE, - /* entry_index = */ 10, - /* insert_flag = */ false, - /* flags = */ H5C__SET_FLUSH_MARKER_FLAG, - /* expected_deserialized = */ true, - /* expected_serialized = */ false, - /* expected_destroyed = */ false}, - {/* entry_num = */ 5, - /* entry_type = */ MONSTER_ENTRY_TYPE, - /* entry_index = */ 20, - /* insert_flag = */ false, - /* flags = */ H5C__DIRTIED_FLAG | H5C__SET_FLUSH_MARKER_FLAG, - /* expected_deserialized = */ true, - /* expected_serialized = */ true, - /* expected_destroyed = */ false}, - {/* entry_num = */ 6, - /* entry_type = */ MONSTER_ENTRY_TYPE, - /* entry_index = */ 30, - /* insert_flag = */ true, - /* flags = */ H5C__SET_FLUSH_MARKER_FLAG, - /* expected_deserialized = */ false, - /* expected_serialized = */ true, - /* expected_destroyed = */ false}, - {/* entry_num = */ 7, - /* entry_type = */ MONSTER_ENTRY_TYPE, - /* entry_index = */ 40, - /* insert_flag = */ true, - /* flags = */ H5C__SET_FLUSH_MARKER_FLAG, - /* expected_deserialized = */ false, - /* expected_serialized = */ true, - /* expected_destroyed = */ false}}; + struct flush_cache_test_spec spec[8] = {{/* entry_num = */ 0, + /* entry_type = */ PICO_ENTRY_TYPE, + /* entry_index = */ 100, + /* insert_flag = */ false, + /* flags = */ H5C__NO_FLAGS_SET, + /* expected_deserialized = */ true, + /* expected_serialized = */ false, + /* expected_destroyed = */ false}, + {/* entry_num = */ 1, + /* entry_type = */ PICO_ENTRY_TYPE, + /* entry_index = */ 75, + /* insert_flag = */ false, + /* flags = */ H5C__DIRTIED_FLAG, + /* expected_deserialized = */ true, + /* expected_serialized = */ true, + /* expected_destroyed = */ false}, + {/* entry_num = */ 2, + /* entry_type = */ PICO_ENTRY_TYPE, + /* entry_index = */ 25, + /* insert_flag = */ true, + /* flags = */ H5C__NO_FLAGS_SET, + /* expected_deserialized = */ false, + /* expected_serialized = */ true, + /* expected_destroyed = */ false}, + {/* entry_num = */ 3, + /* entry_type = */ PICO_ENTRY_TYPE, + /* entry_index = */ 50, + /* insert_flag = */ true, + /* flags = */ H5C__NO_FLAGS_SET, + /* expected_deserialized = */ false, + /* expected_serialized = */ true, + /* expected_destroyed = */ false}, + {/* entry_num = */ 4, + /* entry_type = */ MONSTER_ENTRY_TYPE, + /* entry_index = */ 10, + /* insert_flag = */ false, + /* flags = */ H5C__NO_FLAGS_SET, + /* expected_deserialized = */ true, + /* expected_serialized = */ false, + /* expected_destroyed = */ false}, + {/* entry_num = */ 5, + /* entry_type = */ MONSTER_ENTRY_TYPE, + /* entry_index = */ 20, + /* insert_flag = */ false, + /* flags = */ H5C__DIRTIED_FLAG, + /* expected_deserialized = */ true, + /* expected_serialized = */ true, + /* expected_destroyed = */ false}, + {/* entry_num = */ 6, + /* entry_type = */ MONSTER_ENTRY_TYPE, + /* entry_index = */ 30, + /* insert_flag = */ true, + /* flags = */ H5C__NO_FLAGS_SET, + /* expected_deserialized = */ false, + /* expected_serialized = */ true, + /* expected_destroyed = */ false}, + {/* entry_num = */ 7, + /* entry_type = */ MONSTER_ENTRY_TYPE, + /* entry_index = */ 40, + /* insert_flag = */ true, + /* flags = */ H5C__NO_FLAGS_SET, + /* expected_deserialized = */ false, + /* expected_serialized = */ true, + /* expected_destroyed = */ false}}; check_flush_cache__multi_entry_test(file_ptr, test_num, flush_flags, spec_size, spec); } @@ -3885,7 +3557,7 @@ check_flush_cache__multi_entry(H5F_t *file_ptr) /* entry_type = */ MONSTER_ENTRY_TYPE, /* entry_index = */ 10, /* insert_flag = */ false, - /* flags = */ H5C__SET_FLUSH_MARKER_FLAG, + /* flags = */ H5C__NO_FLAGS_SET, /* num_pins = */ 4, /* pin_type[MAX_PINS] = */ {PICO_ENTRY_TYPE, PICO_ENTRY_TYPE, PICO_ENTRY_TYPE, PICO_ENTRY_TYPE, -1, -1, -1, -1}, @@ -3897,7 +3569,7 @@ check_flush_cache__multi_entry(H5F_t *file_ptr) /* entry_type = */ MONSTER_ENTRY_TYPE, /* entry_index = */ 20, /* insert_flag = */ false, - /* flags = */ H5C__DIRTIED_FLAG | H5C__SET_FLUSH_MARKER_FLAG, + /* flags = */ H5C__DIRTIED_FLAG, /* num_pins = */ 5, /* pin_type[MAX_PINS] = */ {PICO_ENTRY_TYPE, PICO_ENTRY_TYPE, PICO_ENTRY_TYPE, PICO_ENTRY_TYPE, MONSTER_ENTRY_TYPE, -1, -1, @@ -3910,7 +3582,7 @@ check_flush_cache__multi_entry(H5F_t *file_ptr) /* entry_type = */ MONSTER_ENTRY_TYPE, /* entry_index = */ 30, /* insert_flag = */ true, - /* flags = */ H5C__SET_FLUSH_MARKER_FLAG, + /* flags = */ H5C__NO_FLAGS_SET, /* num_pins = */ 6, /* pin_type[MAX_PINS] = */ {PICO_ENTRY_TYPE, PICO_ENTRY_TYPE, PICO_ENTRY_TYPE, PICO_ENTRY_TYPE, MONSTER_ENTRY_TYPE, @@ -3923,7 +3595,7 @@ check_flush_cache__multi_entry(H5F_t *file_ptr) /* entry_type = */ MONSTER_ENTRY_TYPE, /* entry_index = */ 40, /* insert_flag = */ true, - /* flags = */ H5C__SET_FLUSH_MARKER_FLAG, + /* flags = */ H5C__NO_FLAGS_SET, /* num_pins = */ 7, /* pin_type[MAX_PINS] = */ {PICO_ENTRY_TYPE, PICO_ENTRY_TYPE, PICO_ENTRY_TYPE, PICO_ENTRY_TYPE, MONSTER_ENTRY_TYPE, @@ -3990,7 +3662,7 @@ check_flush_cache__multi_entry(H5F_t *file_ptr) /* entry_type = */ MONSTER_ENTRY_TYPE, /* entry_index = */ 10, /* insert_flag = */ false, - /* flags = */ H5C__SET_FLUSH_MARKER_FLAG, + /* flags = */ H5C__NO_FLAGS_SET, /* num_pins = */ 0, /* pin_type[MAX_PINS] = */ {-1, -1, -1, -1, -1, -1, -1, -1}, /* pin_idx[MAX_PINS] = */ {-1, -1, -1, -1, -1, -1, -1, -1}, @@ -4001,7 +3673,7 @@ check_flush_cache__multi_entry(H5F_t *file_ptr) /* entry_type = */ MONSTER_ENTRY_TYPE, /* entry_index = */ 20, /* insert_flag = */ false, - /* flags = */ H5C__DIRTIED_FLAG | H5C__SET_FLUSH_MARKER_FLAG, + /* flags = */ H5C__DIRTIED_FLAG, /* num_pins = */ 1, /* pin_type[MAX_PINS] = */ {MONSTER_ENTRY_TYPE, -1, -1, -1, -1 - 1, -1, -1}, /* pin_idx[MAX_PINS] = */ {10, -1, -1, -1 - 1, -1, -1, -1}, @@ -4012,7 +3684,7 @@ check_flush_cache__multi_entry(H5F_t *file_ptr) /* entry_type = */ MONSTER_ENTRY_TYPE, /* entry_index = */ 30, /* insert_flag = */ true, - /* flags = */ H5C__SET_FLUSH_MARKER_FLAG, + /* flags = */ H5C__NO_FLAGS_SET, /* num_pins = */ 2, /* pin_type[MAX_PINS] = */ {MONSTER_ENTRY_TYPE, MONSTER_ENTRY_TYPE, -1, -1, -1, -1, -1, -1}, /* pin_idx[MAX_PINS] = */ {10, 20, -1, -1, -1, -1, -1, -1}, @@ -4023,7 +3695,7 @@ check_flush_cache__multi_entry(H5F_t *file_ptr) /* entry_type = */ MONSTER_ENTRY_TYPE, /* entry_index = */ 40, /* insert_flag = */ true, - /* flags = */ H5C__SET_FLUSH_MARKER_FLAG, + /* flags = */ H5C__NO_FLAGS_SET, /* num_pins = */ 3, /* pin_type[MAX_PINS] = */ {MONSTER_ENTRY_TYPE, MONSTER_ENTRY_TYPE, MONSTER_ENTRY_TYPE, -1, -1, -1, -1, -1}, @@ -4088,7 +3760,7 @@ check_flush_cache__multi_entry(H5F_t *file_ptr) /* entry_type = */ MONSTER_ENTRY_TYPE, /* entry_index = */ 10, /* insert_flag = */ false, - /* flags = */ H5C__SET_FLUSH_MARKER_FLAG, + /* flags = */ H5C__NO_FLAGS_SET, /* num_pins = */ 0, /* pin_type[MAX_PINS] = */ {-1, -1, -1, -1, -1, -1, -1, -1}, /* pin_idx[MAX_PINS] = */ {-1, -1, -1, -1, -1, -1, -1, -1}, @@ -4099,7 +3771,7 @@ check_flush_cache__multi_entry(H5F_t *file_ptr) /* entry_type = */ MONSTER_ENTRY_TYPE, /* entry_index = */ 20, /* insert_flag = */ false, - /* flags = */ H5C__DIRTIED_FLAG | H5C__SET_FLUSH_MARKER_FLAG, + /* flags = */ H5C__DIRTIED_FLAG, /* num_pins = */ 0, /* pin_type[MAX_PINS] = */ {-1, -1, -1, -1, -1, -1, -1, -1}, /* pin_idx[MAX_PINS] = */ {-1, -1, -1, -1, -1, -1, -1, -1}, @@ -4110,218 +3782,21 @@ check_flush_cache__multi_entry(H5F_t *file_ptr) /* entry_type = */ MONSTER_ENTRY_TYPE, /* entry_index = */ 30, /* insert_flag = */ true, - /* flags = */ H5C__SET_FLUSH_MARKER_FLAG, - /* num_pins = */ 0, - /* pin_type[MAX_PINS] = */ {-1, -1, -1, -1, -1, -1, -1, -1}, - /* pin_idx[MAX_PINS] = */ {-1, -1, -1, -1, -1, -1, -1, -1}, - /* expected_deserialized = */ false, - /* expected_serialized = */ false, - /* expected_destroyed = */ true}, - {/* entry_num = */ 7, - /* entry_type = */ MONSTER_ENTRY_TYPE, - /* entry_index = */ 40, - /* insert_flag = */ true, - /* flags = */ H5C__SET_FLUSH_MARKER_FLAG, - /* num_pins = */ 0, - /* pin_type[MAX_PINS] = */ {-1, -1, -1, -1, -1, -1, -1, -1}, - /* pin_idx[MAX_PINS] = */ {-1, -1, -1, -1, -1, -1, -1, -1}, - /* expected_deserialized = */ false, - /* expected_serialized = */ false, - /* expected_destroyed = */ true}}; - - check_flush_cache__pe_multi_entry_test(file_ptr, test_num, flush_flags, spec_size, spec); - } - - if (pass) { - int test_num = 4; - unsigned int flush_flags = H5C__FLUSH_INVALIDATE_FLAG | H5C__FLUSH_MARKED_ENTRIES_FLAG; - unsigned int spec_size = 8; - struct pe_flush_cache_test_spec spec[8] = { - {/* entry_num = */ 0, - /* entry_type = */ PICO_ENTRY_TYPE, - /* entry_index = */ 100, - /* insert_flag = */ false, /* flags = */ H5C__NO_FLAGS_SET, /* num_pins = */ 0, /* pin_type[MAX_PINS] = */ {-1, -1, -1, -1, -1, -1, -1, -1}, /* pin_idx[MAX_PINS] = */ {-1, -1, -1, -1, -1, -1, -1, -1}, - /* expected_deserialized = */ true, - /* expected_serialized = */ false, - /* expected_destroyed = */ true}, - {/* entry_num = */ 1, - /* entry_type = */ PICO_ENTRY_TYPE, - /* entry_index = */ 75, - /* insert_flag = */ false, - /* flags = */ H5C__DIRTIED_FLAG, - /* num_pins = */ 1, - /* pin_type[MAX_PINS] = */ {PICO_ENTRY_TYPE, -1, -1, -1, -1, -1, -1, -1}, - /* pin_idx[MAX_PINS] = */ {100, -1, -1, -1, -1, -1, -1, -1}, - /* expected_deserialized = */ true, - /* expected_serialized = */ true, - /* expected_destroyed = */ true}, - {/* entry_num = */ 2, - /* entry_type = */ PICO_ENTRY_TYPE, - /* entry_index = */ 25, - /* insert_flag = */ true, - /* flags = */ H5C__NO_FLAGS_SET, - /* num_pins = */ 1, - /* pin_type[MAX_PINS] = */ {PICO_ENTRY_TYPE, -1, -1, -1, -1, -1, -1, -1}, - /* pin_idx[MAX_PINS] = */ {100, -1, -1, -1, -1, -1, -1, -1}, /* expected_deserialized = */ false, - /* expected_serialized = */ true, - /* expected_destroyed = */ true}, - {/* entry_num = */ 3, - /* entry_type = */ PICO_ENTRY_TYPE, - /* entry_index = */ 50, - /* insert_flag = */ true, - /* flags = */ H5C__NO_FLAGS_SET, - /* num_pins = */ 1, - /* pin_type[MAX_PINS] = */ {PICO_ENTRY_TYPE, -1, -1, -1, -1, -1, -1, -1}, - /* pin_idx[MAX_PINS] = */ {100, -1, -1, -1, -1, -1, -1, -1}, - /* expected_deserialized = */ false, - /* expected_serialized = */ true, - /* expected_destroyed = */ true}, - {/* entry_num = */ 4, - /* entry_type = */ MONSTER_ENTRY_TYPE, - /* entry_index = */ 10, - /* insert_flag = */ false, - /* flags = */ H5C__SET_FLUSH_MARKER_FLAG, - /* num_pins = */ 0, - /* pin_type[MAX_PINS] = */ {-1, -1, -1, -1, -1, -1, -1, -1}, - /* pin_idx[MAX_PINS] = */ {-1, -1, -1, -1, -1, -1, -1, -1}, - /* expected_deserialized = */ true, /* expected_serialized = */ false, /* expected_destroyed = */ true}, - {/* entry_num = */ 5, - /* entry_type = */ MONSTER_ENTRY_TYPE, - /* entry_index = */ 20, - /* insert_flag = */ false, - /* flags = */ H5C__DIRTIED_FLAG, - /* num_pins = */ 4, - /* pin_type[MAX_PINS] = */ - {PICO_ENTRY_TYPE, PICO_ENTRY_TYPE, PICO_ENTRY_TYPE, PICO_ENTRY_TYPE, -1, -1, -1, -1}, - /* pin_idx[MAX_PINS] = */ {100, 75, 25, 50, -1, -1, -1, -1}, - /* expected_deserialized = */ true, - /* expected_serialized = */ true, - /* expected_destroyed = */ true}, - {/* entry_num = */ 6, - /* entry_type = */ MONSTER_ENTRY_TYPE, - /* entry_index = */ 30, - /* insert_flag = */ true, - /* flags = */ H5C__SET_FLUSH_MARKER_FLAG, - /* num_pins = */ 4, - /* pin_type[MAX_PINS] = */ - {PICO_ENTRY_TYPE, PICO_ENTRY_TYPE, PICO_ENTRY_TYPE, PICO_ENTRY_TYPE, -1, -1, -1, -1}, - /* pin_idx[MAX_PINS] = */ {100, 75, 25, 50, -1, -1, -1, -1}, - /* expected_deserialized = */ false, - /* expected_serialized = */ true, - /* expected_destroyed = */ true}, {/* entry_num = */ 7, /* entry_type = */ MONSTER_ENTRY_TYPE, /* entry_index = */ 40, /* insert_flag = */ true, - /* flags = */ H5C__SET_FLUSH_MARKER_FLAG, - /* num_pins = */ 0, - /* pin_type[MAX_PINS] = */ {-1, -1, -1, -1, -1, -1, -1, -1}, - /* pin_idx[MAX_PINS] = */ {-1, -1, -1, -1, -1, -1, -1, -1}, - /* expected_deserialized = */ false, - /* expected_serialized = */ true, - /* expected_destroyed = */ true}}; - - check_flush_cache__pe_multi_entry_test(file_ptr, test_num, flush_flags, spec_size, spec); - } - - if (pass) { - int test_num = 5; - unsigned int flush_flags = - H5C__FLUSH_INVALIDATE_FLAG | H5C__FLUSH_CLEAR_ONLY_FLAG | H5C__FLUSH_MARKED_ENTRIES_FLAG; - unsigned int spec_size = 8; - struct pe_flush_cache_test_spec spec[8] = { - {/* entry_num = */ 0, - /* entry_type = */ PICO_ENTRY_TYPE, - /* entry_index = */ 100, - /* insert_flag = */ false, /* flags = */ H5C__NO_FLAGS_SET, /* num_pins = */ 0, /* pin_type[MAX_PINS] = */ {-1, -1, -1, -1, -1, -1, -1, -1}, /* pin_idx[MAX_PINS] = */ {-1, -1, -1, -1, -1, -1, -1, -1}, - /* expected_deserialized = */ true, - /* expected_serialized = */ false, - /* expected_destroyed = */ true}, - {/* entry_num = */ 1, - /* entry_type = */ PICO_ENTRY_TYPE, - /* entry_index = */ 75, - /* insert_flag = */ false, - /* flags = */ H5C__DIRTIED_FLAG, - /* num_pins = */ 1, - /* pin_type[MAX_PINS] = */ {PICO_ENTRY_TYPE, -1, -1, -1, -1, -1, -1, -1}, - /* pin_idx[MAX_PINS] = */ {100, -1, -1, -1, -1, -1, -1, -1}, - /* expected_deserialized = */ true, - /* expected_serialized = */ false, - /* expected_destroyed = */ true}, - {/* entry_num = */ 2, - /* entry_type = */ PICO_ENTRY_TYPE, - /* entry_index = */ 25, - /* insert_flag = */ true, - /* flags = */ H5C__NO_FLAGS_SET, - /* num_pins = */ 1, - /* pin_type[MAX_PINS] = */ {PICO_ENTRY_TYPE, -1, -1, -1, -1, -1, -1, -1}, - /* pin_idx[MAX_PINS] = */ {100, -1, -1, -1, -1, -1, -1, -1}, - /* expected_deserialized = */ false, - /* expected_serialized = */ false, - /* expected_destroyed = */ true}, - {/* entry_num = */ 3, - /* entry_type = */ PICO_ENTRY_TYPE, - /* entry_index = */ 50, - /* insert_flag = */ true, - /* flags = */ H5C__NO_FLAGS_SET, - /* num_pins = */ 1, - /* pin_type[MAX_PINS] = */ {PICO_ENTRY_TYPE, -1, -1, -1, -1, -1, -1, -1}, - /* pin_idx[MAX_PINS] = */ {100, -1, -1, -1, -1, -1, -1, -1}, - /* expected_deserialized = */ false, - /* expected_serialized = */ false, - /* expected_destroyed = */ true}, - {/* entry_num = */ 4, - /* entry_type = */ MONSTER_ENTRY_TYPE, - /* entry_index = */ 10, - /* insert_flag = */ false, - /* flags = */ H5C__SET_FLUSH_MARKER_FLAG, - /* num_pins = */ 1, - /* pin_type[MAX_PINS] = */ {PICO_ENTRY_TYPE, -1, -1, -1, -1, -1, -1, -1}, - /* pin_idx[MAX_PINS] = */ {100, -1, -1, -1, -1, -1, -1, -1}, - /* expected_deserialized = */ true, - /* expected_serialized = */ false, - /* expected_destroyed = */ true}, - {/* entry_num = */ 5, - /* entry_type = */ MONSTER_ENTRY_TYPE, - /* entry_index = */ 20, - /* insert_flag = */ false, - /* flags = */ H5C__DIRTIED_FLAG | H5C__SET_FLUSH_MARKER_FLAG, - /* num_pins = */ 1, - /* pin_type[MAX_PINS] = */ {PICO_ENTRY_TYPE, -1, -1, -1, -1, -1, -1, -1}, - /* pin_idx[MAX_PINS] = */ {100, -1, -1, -1, -1, -1, -1, -1}, - /* expected_deserialized = */ true, - /* expected_serialized = */ false, - /* expected_destroyed = */ true}, - {/* entry_num = */ 6, - /* entry_type = */ MONSTER_ENTRY_TYPE, - /* entry_index = */ 30, - /* insert_flag = */ true, - /* flags = */ H5C__SET_FLUSH_MARKER_FLAG, - /* num_pins = */ 1, - /* pin_type[MAX_PINS] = */ {PICO_ENTRY_TYPE, -1, -1, -1, -1, -1, -1, -1}, - /* pin_idx[MAX_PINS] = */ {100, -1, -1, -1, -1, -1, -1, -1}, - /* expected_deserialized = */ false, - /* expected_serialized = */ false, - /* expected_destroyed = */ true}, - {/* entry_num = */ 7, - /* entry_type = */ MONSTER_ENTRY_TYPE, - /* entry_index = */ 40, - /* insert_flag = */ true, - /* flags = */ H5C__SET_FLUSH_MARKER_FLAG, - /* num_pins = */ 1, - /* pin_type[MAX_PINS] = */ {PICO_ENTRY_TYPE, -1, -1, -1, -1, -1, -1, -1}, - /* pin_idx[MAX_PINS] = */ {100, -1, -1, -1, -1, -1, -1, -1}, /* expected_deserialized = */ false, /* expected_serialized = */ false, /* expected_destroyed = */ true}}; @@ -5927,198 +5402,6 @@ check_flush_cache__flush_ops(H5F_t *file_ptr) if (pass) /* test #21 */ { - /* Now mix things up a bit. - * - * Load several entries, two of which have flush functions that - * resize, dirty, and move two entries that are not in the - * cache. Mark only one of these entries, and then flush the - * cache with the flush marked entries flag. - * - * This is the only test in which we test the - * H5C__FLUSH_MARKED_ENTRIES_FLAG. The hope is that since - * we test the two features extensively by themselves, so - * it should be sufficient to verify that they play together - * as expected. - */ - 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); - - assert(spec_size <= max_num_spec); - assert(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_protected = */ false, - /* is_pinned = */ false, - /* expected_deserialized = */ true, - /* expected_serialized = */ false, - /* 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_protected = */ false, - /* is_pinned = */ false, - /* expected_deserialized = */ true, - /* expected_serialized = */ false, - /* 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_protected = */ false, - /* is_pinned = */ false, - /* expected_deserialized = */ false, - /* expected_serialized = */ false, - /* 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_protected = */ false, - /* is_pinned = */ false, - /* expected_deserialized = */ false, - /* expected_serialized = */ 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, - expected_index_len, expected_index_size, check_size, checks); - reset_entries(); - } - - if (pass) /* test #22 */ - { /* Mix things up some more. * * Load lots of entries, some of which have flush functions that @@ -6128,7 +5411,7 @@ 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 = 22; + int test_num = 21; unsigned int flush_flags = H5C__NO_FLAGS_SET; int spec_size = 6; int check_size = 4; @@ -6359,9 +5642,9 @@ check_flush_cache__flush_ops(H5F_t *file_ptr) reset_entries(); } - if (pass) /* test #23 */ + if (pass) /* test #22 */ { - /* Repeat test #23 with the flush invalidate flag set. + /* Repeat test #21 with the flush invalidate flag set. * * Mix things up some more. * @@ -6372,7 +5655,7 @@ 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; + int test_num = 22; unsigned int flush_flags = H5C__FLUSH_INVALIDATE_FLAG; int spec_size = 6; int check_size = 4; @@ -6606,12 +5889,12 @@ check_flush_cache__flush_ops(H5F_t *file_ptr) * * Now create some tests mixing flush ops and pins. */ - if (pass) /* test #24 */ + if (pass) /* test #23 */ { /* Pico entries 50 and 150 pin pico entry 100, and also dirty * pico entry 100 on flush. */ - int test_num = 24; + int test_num = 23; unsigned int flush_flags = H5C__NO_FLAGS_SET; int spec_size = 3; int check_size = 0; @@ -6723,14 +6006,14 @@ check_flush_cache__flush_ops(H5F_t *file_ptr) expected_index_len, expected_index_size, check_size, checks); } - if (pass) /* test #25 */ + if (pass) /* test #24 */ { /* Repeat the previous test with the flush invalidate flag. * * Pico entries 50 and 150 pin pico entry 100, and also dirty * pico entry 100 on flush. */ - int test_num = 25; + int test_num = 24; unsigned int flush_flags = H5C__FLUSH_INVALIDATE_FLAG; int spec_size = 3; int check_size = 0; @@ -6842,7 +6125,7 @@ check_flush_cache__flush_ops(H5F_t *file_ptr) expected_index_len, expected_index_size, check_size, checks); } - if (pass) /* test #26 */ + if (pass) /* test #25 */ { /* This one is complex. * @@ -6919,7 +6202,7 @@ check_flush_cache__flush_ops(H5F_t *file_ptr) * dirties (VET, 650) * dirties (VET, 750) */ - int test_num = 26; + int test_num = 25; unsigned int flush_flags = H5C__NO_FLAGS_SET; int spec_size = 10; int check_size = 3; @@ -7246,9 +6529,9 @@ check_flush_cache__flush_ops(H5F_t *file_ptr) reset_entries(); } - if (pass) /* test #27 */ + if (pass) /* test #26 */ { - /* Repeat test #26 with the flush invalidate flag. + /* Repeat test #25 with the flush invalidate flag. * * In the following overview table, VET stands for * VARIABLE_ENTRY_TYPE. @@ -7327,7 +6610,7 @@ check_flush_cache__flush_ops(H5F_t *file_ptr) * dirties (VET, 650) * dirties (VET, 750) */ - int test_num = 27; + int test_num = 26; unsigned int flush_flags = H5C__FLUSH_INVALIDATE_FLAG; int spec_size = 10; int check_size = 3; @@ -7654,13 +6937,13 @@ check_flush_cache__flush_ops(H5F_t *file_ptr) reset_entries(); } - if (pass) /* test #28 */ + if (pass) /* test #27 */ { /* Test the expected fheap case, in which an entry dirties * and resizes itself, and dirties an entry which it has * pinned. */ - int test_num = 28; + int test_num = 27; unsigned int flush_flags = H5C__NO_FLAGS_SET; int spec_size = 5; int check_size = 0; @@ -7828,15 +7111,15 @@ check_flush_cache__flush_ops(H5F_t *file_ptr) reset_entries(); } - if (pass) /* test #29 */ + if (pass) /* test #28 */ { - /* Repeat test #28 with the flush invalidate flag. + /* Repeat test #27 with the flush invalidate flag. * * Test the expected fheap case, in which an entry dirties * and resizes itself, and dirties an entry which it has * pinned. */ - int test_num = 29; + int test_num = 28; unsigned int flush_flags = H5C__FLUSH_INVALIDATE_FLAG; int spec_size = 5; int check_size = 0; @@ -9640,36 +8923,6 @@ check_flush_cache__single_entry(H5F_t *file_ptr) /* entry_idx */ 0, /* insert_flag */ false, /* flags */ H5C__NO_FLAGS_SET, - /* flush_flags */ H5C__FLUSH_MARKED_ENTRIES_FLAG, - /* expected_deserialized */ true, - /* expected_serialized */ false, - /* expected_destroyed */ false); - } - - if (pass) { - - check_flush_cache__single_entry_test( - /* file_ptr */ file_ptr, - /* test_num */ 8, - /* entry_type */ PICO_ENTRY_TYPE, - /* entry_idx */ 0, - /* insert_flag */ false, - /* flags */ H5C__DIRTIED_FLAG, - /* flush_flags */ H5C__FLUSH_MARKED_ENTRIES_FLAG, - /* expected_deserialized */ true, - /* expected_serialized */ false, - /* expected_destroyed */ false); - } - - if (pass) { - - check_flush_cache__single_entry_test( - /* file_ptr */ file_ptr, - /* test_num */ 9, - /* entry_type */ PICO_ENTRY_TYPE, - /* entry_idx */ 0, - /* insert_flag */ false, - /* flags */ H5C__NO_FLAGS_SET, /* flush_flags */ H5C__FLUSH_INVALIDATE_FLAG | H5C__FLUSH_CLEAR_ONLY_FLAG, /* expected_deserialized */ true, /* expected_serialized */ false, @@ -9680,253 +8933,11 @@ check_flush_cache__single_entry(H5F_t *file_ptr) check_flush_cache__single_entry_test( /* file_ptr */ file_ptr, - /* test_num */ 10, - /* entry_type */ PICO_ENTRY_TYPE, - /* entry_idx */ 0, - /* insert_flag */ false, - /* flags */ H5C__DIRTIED_FLAG, - /* flush_flags */ H5C__FLUSH_INVALIDATE_FLAG | H5C__FLUSH_CLEAR_ONLY_FLAG, - /* expected_deserialized */ true, - /* expected_serialized */ false, - /* expected_destroyed */ true); - } - - if (pass) { - - check_flush_cache__single_entry_test( - /* file_ptr */ file_ptr, - /* test_num */ 11, - /* entry_type */ PICO_ENTRY_TYPE, - /* entry_idx */ 0, - /* insert_flag */ false, - /* flags */ H5C__NO_FLAGS_SET, - /* flush_flags */ H5C__FLUSH_MARKED_ENTRIES_FLAG | H5C__FLUSH_CLEAR_ONLY_FLAG, - /* expected_deserialized */ true, - /* expected_serialized */ false, - /* expected_destroyed */ false); - } - - if (pass) { - - check_flush_cache__single_entry_test( - /* file_ptr */ file_ptr, - /* test_num */ 12, - /* entry_type */ PICO_ENTRY_TYPE, - /* entry_idx */ 0, - /* insert_flag */ false, - /* flags */ H5C__DIRTIED_FLAG, - /* flush_flags */ H5C__FLUSH_MARKED_ENTRIES_FLAG | H5C__FLUSH_CLEAR_ONLY_FLAG, - /* expected_deserialized */ true, - /* expected_serialized */ false, - /* expected_destroyed */ false); - } - - if (pass) { - - check_flush_cache__single_entry_test( - /* file_ptr */ file_ptr, - /* test_num */ 13, - /* entry_type */ PICO_ENTRY_TYPE, - /* entry_idx */ 0, - /* insert_flag */ false, - /* flags */ H5C__NO_FLAGS_SET, - /* flush_flags */ H5C__FLUSH_MARKED_ENTRIES_FLAG | H5C__FLUSH_INVALIDATE_FLAG, - /* expected_deserialized */ true, - /* expected_serialized */ false, - /* expected_destroyed */ true); - } - - if (pass) { - - check_flush_cache__single_entry_test( - /* file_ptr */ file_ptr, - /* test_num */ 14, - /* entry_type */ PICO_ENTRY_TYPE, - /* entry_idx */ 0, - /* insert_flag */ false, - /* flags */ H5C__DIRTIED_FLAG, - /* flush_flags */ H5C__FLUSH_MARKED_ENTRIES_FLAG | H5C__FLUSH_INVALIDATE_FLAG, - /* expected_deserialized */ true, - /* expected_serialized */ true, - /* expected_destroyed */ true); - } - - if (pass) { - - check_flush_cache__single_entry_test( - /* file_ptr */ file_ptr, - /* test_num */ 15, - /* entry_type */ PICO_ENTRY_TYPE, - /* entry_idx */ 0, - /* insert_flag */ false, - /* flags */ H5C__NO_FLAGS_SET, - /* flush_flags */ H5C__FLUSH_INVALIDATE_FLAG | H5C__FLUSH_CLEAR_ONLY_FLAG | - H5C__FLUSH_MARKED_ENTRIES_FLAG, - /* expected_deserialized */ true, - /* expected_serialized */ false, - /* expected_destroyed */ true); - } - - if (pass) { - - check_flush_cache__single_entry_test( - /* file_ptr */ file_ptr, - /* test_num */ 16, + /* test_num */ 8, /* entry_type */ PICO_ENTRY_TYPE, /* entry_idx */ 0, /* insert_flag */ false, /* flags */ H5C__DIRTIED_FLAG, - /* flush_flags */ H5C__FLUSH_INVALIDATE_FLAG | H5C__FLUSH_CLEAR_ONLY_FLAG | - H5C__FLUSH_MARKED_ENTRIES_FLAG, - /* expected_deserialized */ true, - /* expected_serialized */ false, - /* expected_destroyed */ true); - } - - if (pass) { - - check_flush_cache__single_entry_test( - /* file_ptr */ file_ptr, - /* test_num */ 17, - /* entry_type */ PICO_ENTRY_TYPE, - /* entry_idx */ 0, - /* insert_flag */ false, - /* flags */ H5C__SET_FLUSH_MARKER_FLAG, - /* flush_flags */ H5C__NO_FLAGS_SET, - /* expected_deserialized */ true, - /* expected_serialized */ false, - /* expected_destroyed */ false); - } - - if (pass) { - - check_flush_cache__single_entry_test( - /* file_ptr */ file_ptr, - /* test_num */ 18, - /* entry_type */ PICO_ENTRY_TYPE, - /* entry_idx */ 0, - /* insert_flag */ false, - /* flags */ H5C__DIRTIED_FLAG | H5C__SET_FLUSH_MARKER_FLAG, - /* flush_flags */ H5C__NO_FLAGS_SET, - /* expected_deserialized */ true, - /* expected_serialized */ true, - /* expected_destroyed */ false); - } - - if (pass) { - - check_flush_cache__single_entry_test( - /* file_ptr */ file_ptr, - /* test_num */ 19, - /* entry_type */ PICO_ENTRY_TYPE, - /* entry_idx */ 0, - /* insert_flag */ false, - /* flags */ H5C__SET_FLUSH_MARKER_FLAG, - /* flush_flags */ H5C__FLUSH_CLEAR_ONLY_FLAG, - /* expected_deserialized */ true, - /* expected_serialized */ false, - /* expected_destroyed */ false); - } - - if (pass) { - - check_flush_cache__single_entry_test( - /* file_ptr */ file_ptr, - /* test_num */ 20, - /* entry_type */ PICO_ENTRY_TYPE, - /* entry_idx */ 0, - /* insert_flag */ false, - /* flags */ H5C__DIRTIED_FLAG | H5C__SET_FLUSH_MARKER_FLAG, - /* flush_flags */ H5C__FLUSH_CLEAR_ONLY_FLAG, - /* expected_deserialized */ true, - /* expected_serialized */ false, - /* expected_destroyed */ false); - } - - if (pass) { - - check_flush_cache__single_entry_test( - /* file_ptr */ file_ptr, - /* test_num */ 21, - /* entry_type */ PICO_ENTRY_TYPE, - /* entry_idx */ 0, - /* insert_flag */ false, - /* flags */ H5C__SET_FLUSH_MARKER_FLAG, - /* flush_flags */ H5C__FLUSH_INVALIDATE_FLAG, - /* expected_deserialized */ true, - /* expected_serialized */ false, - /* expected_destroyed */ true); - } - - if (pass) { - - check_flush_cache__single_entry_test( - /* file_ptr */ file_ptr, - /* test_num */ 22, - /* entry_type */ PICO_ENTRY_TYPE, - /* entry_idx */ 0, - /* insert_flag */ false, - /* flags */ H5C__DIRTIED_FLAG | H5C__SET_FLUSH_MARKER_FLAG, - /* flush_flags */ H5C__FLUSH_INVALIDATE_FLAG, - /* expected_deserialized */ true, - /* expected_serialized */ true, - /* expected_destroyed */ true); - } - - if (pass) { - - check_flush_cache__single_entry_test( - /* file_ptr */ file_ptr, - /* test_num */ 23, - /* entry_type */ PICO_ENTRY_TYPE, - /* entry_idx */ 0, - /* insert_flag */ false, - /* flags */ H5C__SET_FLUSH_MARKER_FLAG, - /* flush_flags */ H5C__FLUSH_MARKED_ENTRIES_FLAG, - /* expected_deserialized */ true, - /* expected_serialized */ false, - /* expected_destroyed */ false); - } - - if (pass) { - - check_flush_cache__single_entry_test( - /* file_ptr */ file_ptr, - /* test_num */ 24, - /* entry_type */ PICO_ENTRY_TYPE, - /* entry_idx */ 0, - /* insert_flag */ false, - /* flags */ H5C__DIRTIED_FLAG | H5C__SET_FLUSH_MARKER_FLAG, - /* flush_flags */ H5C__FLUSH_MARKED_ENTRIES_FLAG, - /* expected_deserialized */ true, - /* expected_serialized */ true, - /* expected_destroyed */ false); - } - - if (pass) { - - check_flush_cache__single_entry_test( - /* file_ptr */ file_ptr, - /* test_num */ 25, - /* entry_type */ PICO_ENTRY_TYPE, - /* entry_idx */ 0, - /* insert_flag */ false, - /* flags */ H5C__SET_FLUSH_MARKER_FLAG, - /* flush_flags */ H5C__FLUSH_INVALIDATE_FLAG | H5C__FLUSH_CLEAR_ONLY_FLAG, - /* expected_deserialized */ true, - /* expected_serialized */ false, - /* expected_destroyed */ true); - } - - if (pass) { - - check_flush_cache__single_entry_test( - /* file_ptr */ file_ptr, - /* test_num */ 26, - /* entry_type */ PICO_ENTRY_TYPE, - /* entry_idx */ 0, - /* insert_flag */ false, - /* flags */ H5C__DIRTIED_FLAG | H5C__SET_FLUSH_MARKER_FLAG, /* flush_flags */ H5C__FLUSH_INVALIDATE_FLAG | H5C__FLUSH_CLEAR_ONLY_FLAG, /* expected_deserialized */ true, /* expected_serialized */ false, @@ -9937,99 +8948,7 @@ check_flush_cache__single_entry(H5F_t *file_ptr) check_flush_cache__single_entry_test( /* file_ptr */ file_ptr, - /* test_num */ 27, - /* entry_type */ PICO_ENTRY_TYPE, - /* entry_idx */ 0, - /* insert_flag */ false, - /* flags */ H5C__SET_FLUSH_MARKER_FLAG, - /* flush_flags */ H5C__FLUSH_MARKED_ENTRIES_FLAG | H5C__FLUSH_CLEAR_ONLY_FLAG, - /* expected_deserialized */ true, - /* expected_serialized */ false, - /* expected_destroyed */ false); - } - - if (pass) { - - check_flush_cache__single_entry_test( - /* file_ptr */ file_ptr, - /* test_num */ 28, - /* entry_type */ PICO_ENTRY_TYPE, - /* entry_idx */ 0, - /* insert_flag */ false, - /* flags */ H5C__DIRTIED_FLAG | H5C__SET_FLUSH_MARKER_FLAG, - /* flush_flags */ H5C__FLUSH_MARKED_ENTRIES_FLAG | H5C__FLUSH_CLEAR_ONLY_FLAG, - /* expected_deserialized */ true, - /* expected_serialized */ false, - /* expected_destroyed */ false); - } - - if (pass) { - - check_flush_cache__single_entry_test( - /* file_ptr */ file_ptr, - /* test_num */ 29, - /* entry_type */ PICO_ENTRY_TYPE, - /* entry_idx */ 0, - /* insert_flag */ false, - /* flags */ H5C__SET_FLUSH_MARKER_FLAG, - /* flush_flags */ H5C__FLUSH_MARKED_ENTRIES_FLAG | H5C__FLUSH_INVALIDATE_FLAG, - /* expected_deserialized */ true, - /* expected_serialized */ false, - /* expected_destroyed */ true); - } - - if (pass) { - - check_flush_cache__single_entry_test( - /* file_ptr */ file_ptr, - /* test_num */ 30, - /* entry_type */ PICO_ENTRY_TYPE, - /* entry_idx */ 0, - /* insert_flag */ false, - /* flags */ H5C__DIRTIED_FLAG | H5C__SET_FLUSH_MARKER_FLAG, - /* flush_flags */ H5C__FLUSH_MARKED_ENTRIES_FLAG | H5C__FLUSH_INVALIDATE_FLAG, - /* expected_deserialized */ true, - /* expected_serialized */ true, - /* expected_destroyed */ true); - } - - if (pass) { - - check_flush_cache__single_entry_test( - /* file_ptr */ file_ptr, - /* test_num */ 31, - /* entry_type */ PICO_ENTRY_TYPE, - /* entry_idx */ 0, - /* insert_flag */ false, - /* flags */ H5C__SET_FLUSH_MARKER_FLAG, - /* flush_flags */ H5C__FLUSH_INVALIDATE_FLAG | H5C__FLUSH_CLEAR_ONLY_FLAG | - H5C__FLUSH_MARKED_ENTRIES_FLAG, - /* expected_deserialized */ true, - /* expected_serialized */ false, - /* expected_destroyed */ true); - } - - if (pass) { - - check_flush_cache__single_entry_test( - /* file_ptr */ file_ptr, - /* test_num */ 32, - /* entry_type */ PICO_ENTRY_TYPE, - /* entry_idx */ 0, - /* insert_flag */ false, - /* flags */ H5C__DIRTIED_FLAG | H5C__SET_FLUSH_MARKER_FLAG, - /* flush_flags */ H5C__FLUSH_INVALIDATE_FLAG | H5C__FLUSH_CLEAR_ONLY_FLAG | - H5C__FLUSH_MARKED_ENTRIES_FLAG, - /* expected_deserialized */ true, - /* expected_serialized */ false, - /* expected_destroyed */ true); - } - - if (pass) { - - check_flush_cache__single_entry_test( - /* file_ptr */ file_ptr, - /* test_num */ 33, + /* test_num */ 9, /* entry_type */ PICO_ENTRY_TYPE, /* entry_idx */ 0, /* insert_flag */ true, @@ -10044,7 +8963,7 @@ check_flush_cache__single_entry(H5F_t *file_ptr) check_flush_cache__single_entry_test( /* file_ptr */ file_ptr, - /* test_num */ 34, + /* test_num */ 10, /* entry_type */ PICO_ENTRY_TYPE, /* entry_idx */ 0, /* insert_flag */ true, @@ -10059,7 +8978,7 @@ check_flush_cache__single_entry(H5F_t *file_ptr) check_flush_cache__single_entry_test( /* file_ptr */ file_ptr, - /* test_num */ 35, + /* test_num */ 11, /* entry_type */ PICO_ENTRY_TYPE, /* entry_idx */ 0, /* insert_flag */ true, @@ -10074,7 +8993,7 @@ check_flush_cache__single_entry(H5F_t *file_ptr) check_flush_cache__single_entry_test( /* file_ptr */ file_ptr, - /* test_num */ 36, + /* test_num */ 12, /* entry_type */ PICO_ENTRY_TYPE, /* entry_idx */ 0, /* insert_flag */ true, @@ -10089,7 +9008,7 @@ check_flush_cache__single_entry(H5F_t *file_ptr) check_flush_cache__single_entry_test( /* file_ptr */ file_ptr, - /* test_num */ 37, + /* test_num */ 13, /* entry_type */ PICO_ENTRY_TYPE, /* entry_idx */ 0, /* insert_flag */ true, @@ -10104,7 +9023,7 @@ check_flush_cache__single_entry(H5F_t *file_ptr) check_flush_cache__single_entry_test( /* file_ptr */ file_ptr, - /* test_num */ 38, + /* test_num */ 14, /* entry_type */ PICO_ENTRY_TYPE, /* entry_idx */ 0, /* insert_flag */ true, @@ -10119,37 +9038,7 @@ check_flush_cache__single_entry(H5F_t *file_ptr) check_flush_cache__single_entry_test( /* file_ptr */ file_ptr, - /* test_num */ 39, - /* entry_type */ PICO_ENTRY_TYPE, - /* entry_idx */ 0, - /* insert_flag */ true, - /* flags */ H5C__NO_FLAGS_SET, - /* flush_flags */ H5C__FLUSH_MARKED_ENTRIES_FLAG, - /* expected_deserialized */ false, - /* expected_serialized */ false, - /* expected_destroyed */ false); - } - - if (pass) { - - check_flush_cache__single_entry_test( - /* file_ptr */ file_ptr, - /* test_num */ 40, - /* entry_type */ PICO_ENTRY_TYPE, - /* entry_idx */ 0, - /* insert_flag */ true, - /* flags */ H5C__NO_FLAGS_SET, - /* flush_flags */ H5C__FLUSH_MARKED_ENTRIES_FLAG, - /* expected_deserialized */ false, - /* expected_serialized */ false, - /* expected_destroyed */ false); - } - - if (pass) { - - check_flush_cache__single_entry_test( - /* file_ptr */ file_ptr, - /* test_num */ 41, + /* test_num */ 15, /* entry_type */ PICO_ENTRY_TYPE, /* entry_idx */ 0, /* insert_flag */ true, @@ -10164,7 +9053,7 @@ check_flush_cache__single_entry(H5F_t *file_ptr) check_flush_cache__single_entry_test( /* file_ptr */ file_ptr, - /* test_num */ 42, + /* test_num */ 16, /* entry_type */ PICO_ENTRY_TYPE, /* entry_idx */ 0, /* insert_flag */ true, @@ -10175,340 +9064,6 @@ check_flush_cache__single_entry(H5F_t *file_ptr) /* expected_destroyed */ true); } - if (pass) { - - check_flush_cache__single_entry_test( - /* file_ptr */ file_ptr, - /* test_num */ 43, - /* entry_type */ PICO_ENTRY_TYPE, - /* entry_idx */ 0, - /* insert_flag */ true, - /* flags */ H5C__NO_FLAGS_SET, - /* flush_flags */ H5C__FLUSH_MARKED_ENTRIES_FLAG | H5C__FLUSH_CLEAR_ONLY_FLAG, - /* expected_deserialized */ false, - /* expected_serialized */ false, - /* expected_destroyed */ false); - } - - if (pass) { - - check_flush_cache__single_entry_test( - /* file_ptr */ file_ptr, - /* test_num */ 44, - /* entry_type */ PICO_ENTRY_TYPE, - /* entry_idx */ 0, - /* insert_flag */ true, - /* flags */ H5C__NO_FLAGS_SET, - /* flush_flags */ H5C__FLUSH_MARKED_ENTRIES_FLAG | H5C__FLUSH_CLEAR_ONLY_FLAG, - /* expected_deserialized */ false, - /* expected_serialized */ false, - /* expected_destroyed */ false); - } - - if (pass) { - - check_flush_cache__single_entry_test( - /* file_ptr */ file_ptr, - /* test_num */ 45, - /* entry_type */ PICO_ENTRY_TYPE, - /* entry_idx */ 0, - /* insert_flag */ true, - /* flags */ H5C__NO_FLAGS_SET, - /* flush_flags */ H5C__FLUSH_MARKED_ENTRIES_FLAG | H5C__FLUSH_INVALIDATE_FLAG, - /* expected_deserialized */ false, - /* expected_serialized */ true, - /* expected_destroyed */ true); - } - - if (pass) { - - check_flush_cache__single_entry_test( - /* file_ptr */ file_ptr, - /* test_num */ 46, - /* entry_type */ PICO_ENTRY_TYPE, - /* entry_idx */ 0, - /* insert_flag */ true, - /* flags */ H5C__NO_FLAGS_SET, - /* flush_flags */ H5C__FLUSH_MARKED_ENTRIES_FLAG | H5C__FLUSH_INVALIDATE_FLAG, - /* expected_deserialized */ false, - /* expected_serialized */ true, - /* expected_destroyed */ true); - } - - if (pass) { - - check_flush_cache__single_entry_test( - /* file_ptr */ file_ptr, - /* test_num */ 47, - /* entry_type */ PICO_ENTRY_TYPE, - /* entry_idx */ 0, - /* insert_flag */ true, - /* flags */ H5C__NO_FLAGS_SET, - /* flush_flags */ H5C__FLUSH_INVALIDATE_FLAG | H5C__FLUSH_CLEAR_ONLY_FLAG | - H5C__FLUSH_MARKED_ENTRIES_FLAG, - /* expected_deserialized */ false, - /* expected_serialized */ false, - /* expected_destroyed */ true); - } - - if (pass) { - - check_flush_cache__single_entry_test( - /* file_ptr */ file_ptr, - /* test_num */ 48, - /* entry_type */ PICO_ENTRY_TYPE, - /* entry_idx */ 0, - /* insert_flag */ true, - /* flags */ H5C__NO_FLAGS_SET, - /* flush_flags */ H5C__FLUSH_INVALIDATE_FLAG | H5C__FLUSH_CLEAR_ONLY_FLAG | - H5C__FLUSH_MARKED_ENTRIES_FLAG, - /* expected_deserialized */ false, - /* expected_serialized */ false, - /* expected_destroyed */ true); - } - - if (pass) { - - check_flush_cache__single_entry_test( - /* file_ptr */ file_ptr, - /* test_num */ 49, - /* entry_type */ PICO_ENTRY_TYPE, - /* entry_idx */ 0, - /* insert_flag */ true, - /* flags */ H5C__SET_FLUSH_MARKER_FLAG, - /* flush_flags */ H5C__NO_FLAGS_SET, - /* expected_deserialized */ false, - /* expected_serialized */ true, - /* expected_destroyed */ false); - } - - if (pass) { - - check_flush_cache__single_entry_test( - /* file_ptr */ file_ptr, - /* test_num */ 50, - /* entry_type */ PICO_ENTRY_TYPE, - /* entry_idx */ 0, - /* insert_flag */ true, - /* flags */ H5C__SET_FLUSH_MARKER_FLAG, - /* flush_flags */ H5C__NO_FLAGS_SET, - /* expected_deserialized */ false, - /* expected_serialized */ true, - /* expected_destroyed */ false); - } - - if (pass) { - - check_flush_cache__single_entry_test( - /* file_ptr */ file_ptr, - /* test_num */ 51, - /* entry_type */ PICO_ENTRY_TYPE, - /* entry_idx */ 0, - /* insert_flag */ true, - /* flags */ H5C__SET_FLUSH_MARKER_FLAG, - /* flush_flags */ H5C__FLUSH_CLEAR_ONLY_FLAG, - /* expected_deserialized */ false, - /* expected_serialized */ false, - /* expected_destroyed */ false); - } - - if (pass) { - - check_flush_cache__single_entry_test( - /* file_ptr */ file_ptr, - /* test_num */ 52, - /* entry_type */ PICO_ENTRY_TYPE, - /* entry_idx */ 0, - /* insert_flag */ true, - /* flags */ H5C__SET_FLUSH_MARKER_FLAG, - /* flush_flags */ H5C__FLUSH_CLEAR_ONLY_FLAG, - /* expected_deserialized */ false, - /* expected_serialized */ false, - /* expected_destroyed */ false); - } - - if (pass) { - - check_flush_cache__single_entry_test( - /* file_ptr */ file_ptr, - /* test_num */ 53, - /* entry_type */ PICO_ENTRY_TYPE, - /* entry_idx */ 0, - /* insert_flag */ true, - /* flags */ H5C__SET_FLUSH_MARKER_FLAG, - /* flush_flags */ H5C__FLUSH_INVALIDATE_FLAG, - /* expected_deserialized */ false, - /* expected_serialized */ true, - /* expected_destroyed */ true); - } - - if (pass) { - - check_flush_cache__single_entry_test( - /* file_ptr */ file_ptr, - /* test_num */ 54, - /* entry_type */ PICO_ENTRY_TYPE, - /* entry_idx */ 0, - /* insert_flag */ true, - /* flags */ H5C__SET_FLUSH_MARKER_FLAG, - /* flush_flags */ H5C__FLUSH_INVALIDATE_FLAG, - /* expected_deserialized */ false, - /* expected_serialized */ true, - /* expected_destroyed */ true); - } - - if (pass) { - - check_flush_cache__single_entry_test( - /* file_ptr */ file_ptr, - /* test_num */ 55, - /* entry_type */ PICO_ENTRY_TYPE, - /* entry_idx */ 0, - /* insert_flag */ true, - /* flags */ H5C__SET_FLUSH_MARKER_FLAG, - /* flush_flags */ H5C__FLUSH_MARKED_ENTRIES_FLAG, - /* expected_deserialized */ false, - /* expected_serialized */ true, - /* expected_destroyed */ false); - } - - if (pass) { - - check_flush_cache__single_entry_test( - /* file_ptr */ file_ptr, - /* test_num */ 56, - /* entry_type */ PICO_ENTRY_TYPE, - /* entry_idx */ 0, - /* insert_flag */ true, - /* flags */ H5C__SET_FLUSH_MARKER_FLAG, - /* flush_flags */ H5C__FLUSH_MARKED_ENTRIES_FLAG, - /* expected_deserialized */ false, - /* expected_serialized */ true, - /* expected_destroyed */ false); - } - - if (pass) { - - check_flush_cache__single_entry_test( - /* file_ptr */ file_ptr, - /* test_num */ 57, - /* entry_type */ PICO_ENTRY_TYPE, - /* entry_idx */ 0, - /* insert_flag */ true, - /* flags */ H5C__SET_FLUSH_MARKER_FLAG, - /* flush_flags */ H5C__FLUSH_INVALIDATE_FLAG | H5C__FLUSH_CLEAR_ONLY_FLAG, - /* expected_deserialized */ false, - /* expected_serialized */ false, - /* expected_destroyed */ true); - } - - if (pass) { - - check_flush_cache__single_entry_test( - /* file_ptr */ file_ptr, - /* test_num */ 58, - /* entry_type */ PICO_ENTRY_TYPE, - /* entry_idx */ 0, - /* insert_flag */ true, - /* flags */ H5C__SET_FLUSH_MARKER_FLAG, - /* flush_flags */ H5C__FLUSH_INVALIDATE_FLAG | H5C__FLUSH_CLEAR_ONLY_FLAG, - /* expected_deserialized */ false, - /* expected_serialized */ false, - /* expected_destroyed */ true); - } - - if (pass) { - - check_flush_cache__single_entry_test( - /* file_ptr */ file_ptr, - /* test_num */ 59, - /* entry_type */ PICO_ENTRY_TYPE, - /* entry_idx */ 0, - /* insert_flag */ true, - /* flags */ H5C__SET_FLUSH_MARKER_FLAG, - /* flush_flags */ H5C__FLUSH_MARKED_ENTRIES_FLAG | H5C__FLUSH_CLEAR_ONLY_FLAG, - /* expected_deserialized */ false, - /* expected_serialized */ false, - /* expected_destroyed */ false); - } - - if (pass) { - - check_flush_cache__single_entry_test( - /* file_ptr */ file_ptr, - /* test_num */ 60, - /* entry_type */ PICO_ENTRY_TYPE, - /* entry_idx */ 0, - /* insert_flag */ true, - /* flags */ H5C__SET_FLUSH_MARKER_FLAG, - /* flush_flags */ H5C__FLUSH_MARKED_ENTRIES_FLAG | H5C__FLUSH_CLEAR_ONLY_FLAG, - /* expected_deserialized */ false, - /* expected_serialized */ false, - /* expected_destroyed */ false); - } - - if (pass) { - - check_flush_cache__single_entry_test( - /* file_ptr */ file_ptr, - /* test_num */ 61, - /* entry_type */ PICO_ENTRY_TYPE, - /* entry_idx */ 0, - /* insert_flag */ true, - /* flags */ H5C__SET_FLUSH_MARKER_FLAG, - /* flush_flags */ H5C__FLUSH_MARKED_ENTRIES_FLAG | H5C__FLUSH_INVALIDATE_FLAG, - /* expected_deserialized */ false, - /* expected_serialized */ true, - /* expected_destroyed */ true); - } - - if (pass) { - - check_flush_cache__single_entry_test( - /* file_ptr */ file_ptr, - /* test_num */ 62, - /* entry_type */ PICO_ENTRY_TYPE, - /* entry_idx */ 0, - /* insert_flag */ true, - /* flags */ H5C__SET_FLUSH_MARKER_FLAG, - /* flush_flags */ H5C__FLUSH_MARKED_ENTRIES_FLAG | H5C__FLUSH_INVALIDATE_FLAG, - /* expected_deserialized */ false, - /* expected_serialized */ true, - /* expected_destroyed */ true); - } - - if (pass) { - - check_flush_cache__single_entry_test( - /* file_ptr */ file_ptr, - /* test_num */ 63, - /* entry_type */ PICO_ENTRY_TYPE, - /* entry_idx */ 0, - /* insert_flag */ true, - /* flags */ H5C__SET_FLUSH_MARKER_FLAG, - /* flush_flags */ H5C__FLUSH_INVALIDATE_FLAG | H5C__FLUSH_CLEAR_ONLY_FLAG | - H5C__FLUSH_MARKED_ENTRIES_FLAG, - /* expected_deserialized */ false, - /* expected_serialized */ false, - /* expected_destroyed */ true); - } - - if (pass) { - - check_flush_cache__single_entry_test( - /* file_ptr */ file_ptr, - /* test_num */ 64, - /* entry_type */ PICO_ENTRY_TYPE, - /* entry_idx */ 0, - /* insert_flag */ true, - /* flags */ H5C__SET_FLUSH_MARKER_FLAG, - /* flush_flags */ H5C__FLUSH_INVALIDATE_FLAG | H5C__FLUSH_CLEAR_ONLY_FLAG | - H5C__FLUSH_MARKED_ENTRIES_FLAG, - /* expected_deserialized */ false, - /* expected_serialized */ false, - /* expected_destroyed */ true); - } - /* Now run single entry tests for pinned entries. Test all combinations * of: * @@ -10523,13 +9078,9 @@ check_flush_cache__single_entry(H5F_t *file_ptr) * * 5) Marked dirty by call to H5C_mark_entry_dirty() while pinned or not. * - * 6) Entry marked for flush or not. - * - * 7) Call flush with H5C__FLUSH_MARKED_ENTRIES_FLAG or not. - * - * 8) Call flush with H5C__FLUSH_CLEAR_ONLY_FLAG or not. + * 6) Call flush with H5C__FLUSH_CLEAR_ONLY_FLAG or not. * - * This yields a total of 256 tests. + * This yields a total of 64 tests. * * The tests and their expected results are given in the spec table * below. The values assigned to the expected_serialized, @@ -10548,24 +9099,10 @@ check_flush_cache__single_entry(H5F_t *file_ptr) * was adapted from, and it doesn't do any particular harm. * * In general, we expect an entry to be flushed if it is dirty, and - * flush in invoked WITHOUT the H5C__FLUSH_CLEAR_ONLY_FLAG. However, - * there are exceptions: If flush is invoked with the - * H5C__FLUSH_MARKED_ENTRIES_FLAG, only marked entries will be flushed. - * - * Further, unprotecting an entry with the H5C__SET_FLUSH_MARKER_FLAG - * will NOT mark the entry unless the entry has either been marked - * dirty either before or durting the unprotect call. This results in - * some counterintuitive entries in the table. It make be useful to - * look in the test code to see the exact order of operations. + * flush in invoked WITHOUT the H5C__FLUSH_CLEAR_ONLY_FLAG. * * Similarly, we expect an entry to be cleared if it is dirty, and - * flush is invoked WITH the H5C__FLUSH_CLEAR_ONLY_FLAG. Again, there - * are exceptions -- If flush is also invoked with the - * H5C__FLUSH_MARKED_ENTRIES_FLAG, only the marked entries will be - * cleared. - * - * The above comments about applying unprotect with the - * H5C__SET_FLUSH_MARKER_FLAG apply here as well. + * flush is invoked WITH the H5C__FLUSH_CLEAR_ONLY_FLAG. */ if (pass) { @@ -10573,14 +9110,14 @@ check_flush_cache__single_entry(H5F_t *file_ptr) struct pinned_single_entry_test_spec *spec = NULL; size_t i; - spec = malloc(256 * sizeof(struct pinned_single_entry_test_spec)); + spec = malloc(64 * 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++) { + for (i = 0; i < 64; i++) { int test_num; int entry_type; int entry_idx; @@ -10605,32 +9142,20 @@ check_flush_cache__single_entry(H5F_t *file_ptr) 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 + /* Flags are not used for this test */ - if ((i / 32) % 2) - flags = H5C__SET_FLUSH_MARKER_FLAG; - else - flags = H5C__NO_FLAGS_SET; + 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 + * Generate sequences of H5C__NO_FLAGS_SET, and H5C__FLUSH_CLEAR_ONLY_FLAG */ - switch (i / 64) { + switch (i / 32) { 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; @@ -10638,20 +9163,8 @@ check_flush_cache__single_entry(H5F_t *file_ptr) 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; - } + if (dirty_flag || mark_dirty || pop_mark_dirty_prot || pop_mark_dirty_pinned) + expected_serialized = true; } expected_destroyed = false; @@ -10673,7 +9186,7 @@ check_flush_cache__single_entry(H5F_t *file_ptr) } i = 0; - while (pass && (i < 256)) { + while (pass && (i < 64)) { check_flush_cache__pinned_single_entry_test( /* file_ptr */ file_ptr, /* test_num */ spec[i].test_num, @@ -13715,7 +12228,7 @@ check_flush_protected_err(unsigned paged) protect_entry(file_ptr, 0, 0); /* enable slist prior to flush */ - if ((pass) && (H5C_set_slist_enabled(cache_ptr, true, false) < 0)) { + if ((pass) && (H5C_set_slist_enabled(cache_ptr, true, true) < 0)) { pass = false; failure_mssg = "unable to enable slist prior to flush.\n"; diff --git a/test/cache_common.h b/test/cache_common.h index a9a8dbb..2e8a463 100644 --- a/test/cache_common.h +++ b/test/cache_common.h @@ -126,11 +126,6 @@ * for it to setup the slist on entry, and take it down * on exit. * - * Note that the slist need not be empty if the flags - * indicate a partial flush (i.e. - * H5C__FLUSH_MARKED_ENTRIES_FLAG). Compute clear_slist - * and pass it into H5C_set_slist_enabled as appropriate. - * * On error, set pass to false, and set failure_mssg * to the supplied error message. * @@ -140,12 +135,9 @@ #define H5C_FLUSH_CACHE(file, flags, fail_mssg) \ { \ - bool clear_slist; \ herr_t rslt; \ \ - clear_slist = ((flags & H5C__FLUSH_MARKED_ENTRIES_FLAG) != 0); \ - \ - rslt = H5C_set_slist_enabled((file)->shared->cache, true, false); \ + rslt = H5C_set_slist_enabled((file)->shared->cache, true, true); \ \ if (rslt >= 0) { \ \ @@ -154,7 +146,7 @@ \ if (rslt >= 0) { \ \ - rslt = H5C_set_slist_enabled((file)->shared->cache, false, clear_slist); \ + rslt = H5C_set_slist_enabled((file)->shared->cache, false, false); \ } \ \ if (rslt < 0) { \ diff --git a/test/cache_tagging.c b/test/cache_tagging.c index 61b1dbe..9a86b8a 100644 --- a/test/cache_tagging.c +++ b/test/cache_tagging.c @@ -264,10 +264,7 @@ error: * * Purpose: Asserts that there is an entry in the specified cache with * the provided entry id and provided tag. The function will - * fail if this is not the case. If found, this function will - * set the entry's flush_marker flag, so future verification - * attempts can skip over this entry, knowing it has already been - * checked. + * fail if this is not the case. * * Return: 0 on Success, -1 on Failure * @@ -328,7 +325,7 @@ evict_entries(hid_t fid) mark_all_entries_investigated(fid); /* setup the skip list prior to calling H5C_flush_cache() */ - if (H5C_set_slist_enabled(f->shared->cache, true, false) < 0) + if (H5C_set_slist_enabled(f->shared->cache, true, true) < 0) TEST_ERROR; /* Evict all we can from the cache to examine full tag creation tree */ @@ -337,8 +334,8 @@ evict_entries(hid_t fid) */ H5C_flush_cache(f, H5C__FLUSH_INVALIDATE_FLAG); - /* shutdown the slist -- allow it to be non-empty */ - if (H5C_set_slist_enabled(f->shared->cache, false, true) < 0) + /* shutdown the slist */ + if (H5C_set_slist_enabled(f->shared->cache, false, false) < 0) TEST_ERROR; return 0; |