summaryrefslogtreecommitdiffstats
path: root/test/cache.c
diff options
context:
space:
mode:
authorQuincey Koziol <koziol@hdfgroup.org>2016-12-30 10:22:48 (GMT)
committerQuincey Koziol <koziol@hdfgroup.org>2016-12-30 10:22:48 (GMT)
commit0610c41c75920b145a144e62df142977b605fc97 (patch)
tree4012f77323e147b1883a77cb0f0a17605720a1c0 /test/cache.c
parente500f2d3dadd72281bf4f24cbba175c0ed77a3b0 (diff)
downloadhdf5-0610c41c75920b145a144e62df142977b605fc97.zip
hdf5-0610c41c75920b145a144e62df142977b605fc97.tar.gz
hdf5-0610c41c75920b145a144e62df142977b605fc97.tar.bz2
Bring support for doubly-linked list of all entries in cache from incoming
cache image branch.
Diffstat (limited to 'test/cache.c')
-rw-r--r--test/cache.c48
1 files changed, 35 insertions, 13 deletions
diff --git a/test/cache.c b/test/cache.c
index 0cd0c99..ed4fceb 100644
--- a/test/cache.c
+++ b/test/cache.c
@@ -15913,7 +15913,6 @@ check_destroy_pinned_err(void)
unprotect_entry(file_ptr, 0, 0, H5C__PIN_ENTRY_FLAG);
if(H5C_dest(file_ptr, H5AC_ind_read_dxpl_id) >= 0) {
-
pass = FALSE;
failure_mssg = "destroy succeeded on cache with pinned entry.\n";
} /* end if */
@@ -34541,7 +34540,7 @@ cedds__expunge_dirty_entry_in_flush_test(H5F_t * file_ptr)
if(pass)
if((cache_ptr->slist_scan_restarts != 1) ||
(cache_ptr->LRU_scan_restarts != 0) ||
- (cache_ptr->hash_bucket_scan_restarts != 0)) {
+ (cache_ptr->index_scan_restarts != 0)) {
pass = FALSE;
failure_mssg = "unexpected scan restart stats in cedds__expunge_dirty_entry_in_flush_test().";
} /* end if */
@@ -34920,7 +34919,7 @@ cedds__H5C_make_space_in_cache(H5F_t * file_ptr)
if(pass)
if((cache_ptr->slist_scan_restarts != 0) ||
(cache_ptr->LRU_scan_restarts != 1) ||
- (cache_ptr->hash_bucket_scan_restarts != 0)) {
+ (cache_ptr->index_scan_restarts != 0)) {
pass = FALSE;
failure_mssg = "unexpected scan restart stats in cedds__H5C_make_space_in_cache().";
@@ -35330,7 +35329,7 @@ cedds__H5C__autoadjust__ageout__evict_aged_out_entries(H5F_t * file_ptr)
if(pass)
if((cache_ptr->slist_scan_restarts != 0) ||
(cache_ptr->LRU_scan_restarts != 1) ||
- (cache_ptr->hash_bucket_scan_restarts != 0)) {
+ (cache_ptr->index_scan_restarts != 0)) {
pass = FALSE;
failure_mssg = "unexpected scan restart stats in cedds__H5C__autoadjust__ageout__evict_aged_out_entries().";
@@ -35353,7 +35352,26 @@ cedds__H5C__autoadjust__ageout__evict_aged_out_entries(H5F_t * file_ptr)
/*-------------------------------------------------------------------------
* Function: cedds__H5C_flush_invalidate_cache__bucket_scan()
*
- * Purpose: Verify that H5C_flush_invalidate_cache() can handle
+ * Purpose: Note: We now use the index list when we scan the
+ * contents of the metadata cache, so in principal,
+ * this test is obsolete. However, even using the
+ * index list, restarts are possible, and must be
+ * handled gracefully.
+ *
+ * As it turns out, this test triggers index list
+ * scan restarts, and thus with minor changes is
+ * still a useful test.
+ *
+ * For this reason, with the exception of changing
+ * to check the index_scan_restart stat instead of
+ * hash bucket restarts, I'm leaving the test
+ * alone. If and when it starts to fail due to
+ * other changes, we can re-work it to test
+ * index list scan restarts explicitly.
+ *
+ * JRM -- 11/2/16
+ *
+ * Verify that H5C_flush_invalidate_cache() can handle
* the removal from the cache of the next item in
* its scans of hash buckets.
*
@@ -35455,20 +35473,20 @@ cedds__H5C_flush_invalidate_cache__bucket_scan(H5F_t * file_ptr)
if(cache_ptr == NULL) {
pass = FALSE;
- failure_mssg = "cache_ptr NULL on entry to cedds for H5C__autoadjust__ageout__evict_aged_out_entries() test.";
+ failure_mssg = "cache_ptr NULL on entry to cedds for cedds__H5C_flush_invalidate_cache__bucket_scan() test.";
}
else if((cache_ptr->index_len != 0) ||
(cache_ptr->index_size != 0)) {
pass = FALSE;
- failure_mssg = "cache not empty at start cedds for H5C__autoadjust__ageout__evict_aged_out_entries() test.";
+ failure_mssg = "cache not empty at start cedds for cedds__H5C_flush_invalidate_cache__bucket_scan() test.";
}
else if((cache_ptr->max_cache_size != (2 * 1024 * 1024)) ||
(cache_ptr->min_clean_size != (1 * 1024 * 1024))) {
pass = FALSE;
failure_mssg =
- "unexpected cache config at start of cedds H5C__autoadjust__ageout__evict_aged_out_entries() test.";
+ "unexpected cache config at start of cedds cedds__H5C_flush_invalidate_cache__bucket_scan() test.";
} else {
@@ -35696,9 +35714,13 @@ cedds__H5C_flush_invalidate_cache__bucket_scan(H5F_t * file_ptr)
} /* end if */
if(pass)
+ /* as this test is now checking for index list scan restarts,
+ * the following has been modified to check this instead of
+ * hash bucket scan restarts.
+ */
if((cache_ptr->slist_scan_restarts != 0) ||
(cache_ptr->LRU_scan_restarts != 0) ||
- (cache_ptr->hash_bucket_scan_restarts != 1)) {
+ (cache_ptr->index_scan_restarts != 1)) {
pass = FALSE;
failure_mssg = "unexpected scan restart stats in cedds__H5C_flush_invalidate_cache__bucket_scan().";
}
@@ -35912,7 +35934,7 @@ check_stats__smoke_check_1(H5F_t * file_ptr)
(cache_ptr->entries_scanned_to_make_space != 0) ||
(cache_ptr->slist_scan_restarts != 0) ||
(cache_ptr->LRU_scan_restarts != 0) ||
- (cache_ptr->hash_bucket_scan_restarts != 0)) {
+ (cache_ptr->index_scan_restarts != 0)) {
pass = FALSE;
failure_mssg = "Unexpected cache stats in check_stats__smoke_check_1(1).";
@@ -35997,7 +36019,7 @@ check_stats__smoke_check_1(H5F_t * file_ptr)
(cache_ptr->entries_scanned_to_make_space != 0) ||
(cache_ptr->slist_scan_restarts != 0) ||
(cache_ptr->LRU_scan_restarts != 0) ||
- (cache_ptr->hash_bucket_scan_restarts != 0)) {
+ (cache_ptr->index_scan_restarts != 0)) {
pass = FALSE;
failure_mssg = "Unexpected cache stats in check_stats__smoke_check_1(2).";
@@ -36082,7 +36104,7 @@ check_stats__smoke_check_1(H5F_t * file_ptr)
(cache_ptr->entries_scanned_to_make_space != 33) ||
(cache_ptr->slist_scan_restarts != 0) ||
(cache_ptr->LRU_scan_restarts != 0) ||
- (cache_ptr->hash_bucket_scan_restarts != 0)) {
+ (cache_ptr->index_scan_restarts != 0)) {
pass = FALSE;
failure_mssg = "Unexpected cache stats in check_stats__smoke_check_1(3).";
@@ -36186,7 +36208,7 @@ check_stats__smoke_check_1(H5F_t * file_ptr)
(cache_ptr->entries_scanned_to_make_space != 33) ||
(cache_ptr->slist_scan_restarts != 0) ||
(cache_ptr->LRU_scan_restarts != 0) ||
- (cache_ptr->hash_bucket_scan_restarts != 0)) {
+ (cache_ptr->index_scan_restarts != 0)) {
pass = FALSE;
failure_mssg = "Unexpected cache stats in check_stats__smoke_check_1(4).";