summaryrefslogtreecommitdiffstats
path: root/test/cache.c
diff options
context:
space:
mode:
authorQuincey Koziol <koziol@hdfgroup.org>2010-05-07 02:48:15 (GMT)
committerQuincey Koziol <koziol@hdfgroup.org>2010-05-07 02:48:15 (GMT)
commit5d8a2cca07e42684a323f0f007149f549bdbf307 (patch)
tree6d04c84977990ab0f332203e2703bf4235fbd902 /test/cache.c
parentec7f4dc603484d18cde1af79c2906c68cec1ad3b (diff)
downloadhdf5-5d8a2cca07e42684a323f0f007149f549bdbf307.zip
hdf5-5d8a2cca07e42684a323f0f007149f549bdbf307.tar.gz
hdf5-5d8a2cca07e42684a323f0f007149f549bdbf307.tar.bz2
[svn-r18740] Description:
Bring r18738 from metadata journaling 'merging' branch to trunk: Switch H5AC_resize_pinned_entry() to work on protected entries as well, and rename to H5AC_resize_entry() Tested on: FreeBSD/32 6.3 (duty) in debug mode FreeBSD/64 6.3 (liberty) w/C++ & FORTRAN, in debug mode Linux/32 2.6 (jam) w/PGI compilers, w/default API=1.8.x, w/C++ & FORTRAN, w/threadsafe, in debug mode Linux/64-amd64 2.6 (amani) w/Intel compilers, w/default API=1.6.x, w/C++ & FORTRAN, in production mode Solaris/32 2.10 (linew) w/deprecated symbols disabled, w/C++ & FORTRAN, w/szip filter, in production mode Linux/64-ia64 2.6 (cobalt) w/Intel compilers, w/C++ & FORTRAN, in production mode Linux/64-amd64 2.6 (abe) w/parallel, w/FORTRAN, in production mode Mac OS X/32 10.6.3 (amazon) in debug mode Mac OS X/32 10.6.3 (amazon) w/C++ & FORTRAN, w/threadsafe, in production mode
Diffstat (limited to 'test/cache.c')
-rw-r--r--test/cache.c48
1 files changed, 22 insertions, 26 deletions
diff --git a/test/cache.c b/test/cache.c
index 09cecf2..abe4d19 100644
--- a/test/cache.c
+++ b/test/cache.c
@@ -15138,13 +15138,13 @@ check_resize_entry(void)
if ( pass ) {
- result = H5C_resize_pinned_entry((void *)entry_ptr, (LARGE_ENTRY_SIZE / 4));
+ result = H5C_resize_entry((void *)entry_ptr, (LARGE_ENTRY_SIZE / 4));
if ( result < 0 ) {
pass = FALSE;
HDsnprintf(msg, (size_t)128,
- "H5C_resize_pinned_entry() reports failure 1.");
+ "H5C_resize_entry() reports failure 1.");
failure_mssg = msg;
}
@@ -15199,13 +15199,13 @@ check_resize_entry(void)
if ( pass ) {
- result = H5C_resize_pinned_entry((void *)entry_ptr, LARGE_ENTRY_SIZE);
+ result = H5C_resize_entry((void *)entry_ptr, LARGE_ENTRY_SIZE);
if ( result < 0 ) {
pass = FALSE;
HDsnprintf(msg, (size_t)128,
- "H5C_resize_pinned_entry() reports failure 2.");
+ "H5C_resize_entry() reports failure 2.");
failure_mssg = msg;
}
@@ -15571,13 +15571,13 @@ check_resize_entry(void)
if ( pass ) {
- result = H5C_resize_pinned_entry((void *)entry_ptr, (LARGE_ENTRY_SIZE / 4));
+ result = H5C_resize_entry((void *)entry_ptr, (LARGE_ENTRY_SIZE / 4));
if ( result < 0 ) {
pass = FALSE;
HDsnprintf(msg, (size_t)128,
- "H5C_resize_pinned_entry() reports failure 3.");
+ "H5C_resize_entry() reports failure 3.");
failure_mssg = msg;
}
@@ -15634,13 +15634,13 @@ check_resize_entry(void)
if ( pass ) {
- result = H5C_resize_pinned_entry((void *)entry_ptr, LARGE_ENTRY_SIZE);
+ result = H5C_resize_entry((void *)entry_ptr, LARGE_ENTRY_SIZE);
if ( result < 0 ) {
pass = FALSE;
HDsnprintf(msg, (size_t)128,
- "H5C_resize_pinned_entry() reports failure 4.");
+ "H5C_resize_entry() reports failure 4.");
failure_mssg = msg;
}
@@ -17642,7 +17642,7 @@ check_expunge_entry_errs(void)
/*-------------------------------------------------------------------------
* Function: check_resize_entry_errs()
*
- * Purpose: Verify that invalid calls to H5C_resize_pinned_entry()
+ * Purpose: Verify that invalid calls to H5C_resize_entry()
* generates errors as expected.
*
* Return: void
@@ -17650,10 +17650,6 @@ check_expunge_entry_errs(void)
* Programmer: John Mainzer
* 7/7/06
*
- * Modifications:
- *
- * None.
- *
*-------------------------------------------------------------------------
*/
@@ -17670,11 +17666,11 @@ check_resize_entry_errs(void)
pass = TRUE;
/* Allocate a cache, protect an entry, and then call
- * H5C_resize_pinned_entry() to resize it -- this should fail.
+ * H5C_resize_entry() to resize it -- this should succeed.
*
* Unprotect the the entry with the pinned flag, and then call
- * H5C_resize_pinned_entry() again with new size of zero.
- * This should fail too.
+ * H5C_resize_entry() again with new size of zero.
+ * This should fail.
*
* Finally, unpin the entry and destroy the cache.
* This should succeed.
@@ -17695,13 +17691,13 @@ check_resize_entry_errs(void)
if ( pass ) {
- result = H5C_resize_pinned_entry((void *)entry_ptr, (size_t)1);
+ result = H5C_resize_entry((void *)entry_ptr, (size_t)1);
- if ( result > 0 ) {
+ if ( result < 0 ) {
pass = FALSE;
failure_mssg =
- "Call to H5C_resize_pinned_entry on a protected entry succeeded.\n";
+ "Call to H5C_resize_entry on a protected entry failed.\n";
} else {
@@ -17712,13 +17708,13 @@ check_resize_entry_errs(void)
if ( pass ) {
- result = H5C_resize_pinned_entry((void *)entry_ptr, (size_t)0);
+ result = H5C_resize_entry((void *)entry_ptr, (size_t)0);
- if ( result > 0 ) {
+ if ( result >= 0 ) {
pass = FALSE;
failure_mssg =
- "Call to H5C_resize_pinned_entry with 0 new size succeeded.\n";
+ "Call to H5C_resize_entry with 0 new size succeeded.\n";
} else {
@@ -22042,7 +22038,7 @@ check_auto_cache_resize(void)
protect_entry(file_ptr, VARIABLE_ENTRY_TYPE, 10);
unprotect_entry(file_ptr, VARIABLE_ENTRY_TYPE, 10, NO_CHANGE,
H5C__PIN_ENTRY_FLAG);
- resize_pinned_entry(cache_ptr, VARIABLE_ENTRY_TYPE, 10, 2 * 1024);
+ resize_entry(file_ptr, VARIABLE_ENTRY_TYPE, 10, 2 * 1024, TRUE);
if ( ( pass ) &&
( ( ( cache_ptr->max_cache_size != (6 * 1024) ) ||
@@ -22060,7 +22056,7 @@ check_auto_cache_resize(void)
if ( pass ) {
- resize_pinned_entry(cache_ptr, VARIABLE_ENTRY_TYPE, 10, 10 * 1024);
+ resize_entry(file_ptr, VARIABLE_ENTRY_TYPE, 10, 10 * 1024, TRUE);
if ( ( pass ) &&
( ( ( cache_ptr->max_cache_size != (13 * 1024) ) ||
@@ -22081,7 +22077,7 @@ check_auto_cache_resize(void)
protect_entry(file_ptr, VARIABLE_ENTRY_TYPE, 11);
unprotect_entry(file_ptr, VARIABLE_ENTRY_TYPE, 11, NO_CHANGE,
H5C__PIN_ENTRY_FLAG);
- resize_pinned_entry(cache_ptr, VARIABLE_ENTRY_TYPE, 11, 10 * 1024);
+ resize_entry(file_ptr, VARIABLE_ENTRY_TYPE, 11, 10 * 1024, TRUE);
if ( ( pass ) &&
( ( ( cache_ptr->max_cache_size != (22 * 1024) ) ||
@@ -22102,7 +22098,7 @@ check_auto_cache_resize(void)
protect_entry(file_ptr, VARIABLE_ENTRY_TYPE, 12);
unprotect_entry(file_ptr, VARIABLE_ENTRY_TYPE, 12, NO_CHANGE,
H5C__PIN_ENTRY_FLAG);
- resize_pinned_entry(cache_ptr, VARIABLE_ENTRY_TYPE, 12, 10 * 1024);
+ resize_entry(file_ptr, VARIABLE_ENTRY_TYPE, 12, 10 * 1024, TRUE);
if ( ( pass ) &&
( ( ( cache_ptr->max_cache_size != (22 * 1024) ) ||