summaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorQuincey Koziol <koziol@hdfgroup.org>2017-01-29 07:19:37 (GMT)
committerQuincey Koziol <koziol@hdfgroup.org>2017-01-29 07:19:37 (GMT)
commit1949d5756d424be0b23fc127fc99140374a7dd13 (patch)
treee7d368b8bbcb589e48e88c1b781b08e16655a832 /test
parent5a776edb8156c36d3a7e2f9e23c6fb349eaa90e0 (diff)
downloadhdf5-1949d5756d424be0b23fc127fc99140374a7dd13.zip
hdf5-1949d5756d424be0b23fc127fc99140374a7dd13.tar.gz
hdf5-1949d5756d424be0b23fc127fc99140374a7dd13.tar.bz2
Cache image feature and testing
Diffstat (limited to 'test')
-rw-r--r--test/CMakeLists.txt22
-rw-r--r--test/CMakeTests.cmake16
-rw-r--r--test/Makefile.am6
-rw-r--r--test/cache.c10
-rw-r--r--test/enc_dec_plist.c7
-rw-r--r--test/gen_plist.c9
-rw-r--r--test/testfiles/plist_files/dapl_32bebin136 -> 186 bytes
-rw-r--r--test/testfiles/plist_files/dapl_32lebin136 -> 186 bytes
-rw-r--r--test/testfiles/plist_files/dapl_64bebin136 -> 186 bytes
-rw-r--r--test/testfiles/plist_files/dapl_64lebin136 -> 186 bytes
-rw-r--r--test/testfiles/plist_files/def_dapl_32bebin131 -> 181 bytes
-rw-r--r--test/testfiles/plist_files/def_dapl_32lebin131 -> 181 bytes
-rw-r--r--test/testfiles/plist_files/def_dapl_64bebin131 -> 181 bytes
-rw-r--r--test/testfiles/plist_files/def_dapl_64lebin131 -> 181 bytes
-rw-r--r--test/testfiles/plist_files/def_dxpl_32bebin225 -> 245 bytes
-rw-r--r--test/testfiles/plist_files/def_dxpl_32lebin225 -> 245 bytes
-rw-r--r--test/testfiles/plist_files/def_dxpl_64bebin225 -> 245 bytes
-rw-r--r--test/testfiles/plist_files/def_dxpl_64lebin225 -> 245 bytes
-rw-r--r--test/testfiles/plist_files/def_fapl_32bebin1460 -> 1520 bytes
-rw-r--r--test/testfiles/plist_files/def_fapl_32lebin1460 -> 1520 bytes
-rw-r--r--test/testfiles/plist_files/def_fapl_64bebin1460 -> 1520 bytes
-rw-r--r--test/testfiles/plist_files/def_fapl_64lebin1460 -> 1520 bytes
-rw-r--r--test/testfiles/plist_files/dxpl_32bebin229 -> 249 bytes
-rw-r--r--test/testfiles/plist_files/dxpl_32lebin229 -> 249 bytes
-rw-r--r--test/testfiles/plist_files/dxpl_64bebin229 -> 249 bytes
-rw-r--r--test/testfiles/plist_files/dxpl_64lebin229 -> 249 bytes
-rw-r--r--test/testfiles/plist_files/fapl_32bebin1462 -> 1522 bytes
-rw-r--r--test/testfiles/plist_files/fapl_32lebin1462 -> 1522 bytes
-rw-r--r--test/testfiles/plist_files/fapl_64bebin1462 -> 1522 bytes
-rw-r--r--test/testfiles/plist_files/fapl_64lebin1462 -> 1522 bytes
-rw-r--r--test/testfiles/plist_files/fcpl_32bebin413 -> 413 bytes
-rw-r--r--test/testfiles/plist_files/fcpl_32lebin413 -> 413 bytes
-rw-r--r--test/testfiles/plist_files/fcpl_64bebin413 -> 413 bytes
-rw-r--r--test/testfiles/plist_files/fcpl_64lebin413 -> 413 bytes
-rw-r--r--test/testfiles/plist_files/lapl_32bebin1565 -> 1625 bytes
-rw-r--r--test/testfiles/plist_files/lapl_32lebin1565 -> 1625 bytes
-rw-r--r--test/testfiles/plist_files/lapl_64bebin1565 -> 1625 bytes
-rw-r--r--test/testfiles/plist_files/lapl_64lebin1565 -> 1625 bytes
38 files changed, 63 insertions, 7 deletions
diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt
index bd73c84..fb9a647 100644
--- a/test/CMakeLists.txt
+++ b/test/CMakeLists.txt
@@ -269,6 +269,28 @@ endforeach ()
##############################################################################
##############################################################################
+#-- Adding test for cache_image
+add_executable (cache_image
+ ${HDF5_TEST_SOURCE_DIR}/cache_image.c
+ ${HDF5_TEST_SOURCE_DIR}/cache_common.c
+ ${HDF5_TEST_SOURCE_DIR}/genall5.c
+)
+TARGET_NAMING (cache_image STATIC)
+TARGET_C_PROPERTIES (cache_image STATIC " " " ")
+target_link_libraries (cache_image ${HDF5_LIB_TARGET} ${HDF5_TEST_LIB_TARGET})
+set_target_properties (cache_image PROPERTIES FOLDER test)
+if (BUILD_SHARED_LIBS)
+ add_executable (cache_image-shared
+ ${HDF5_TEST_SOURCE_DIR}/cache_image.c
+ ${HDF5_TEST_SOURCE_DIR}/cache_common.c
+ ${HDF5_TEST_SOURCE_DIR}/genall5.c
+ )
+ TARGET_NAMING (cache_image-shared SHARED)
+ TARGET_C_PROPERTIES (cache_image-shared SHARED " " " ")
+ target_link_libraries (cache_image-shared ${HDF5_TEST_LIBSH_TARGET} ${HDF5_LIBSH_TARGET})
+ set_target_properties (cache_image-shared PROPERTIES FOLDER test)
+endif (BUILD_SHARED_LIBS)
+
#-- Adding test for hyperslab
add_executable (hyperslab ${HDF5_TEST_SOURCE_DIR}/hyperslab.c)
TARGET_NAMING (hyperslab STATIC)
diff --git a/test/CMakeTests.cmake b/test/CMakeTests.cmake
index 20f43bc..05a9be0 100644
--- a/test/CMakeTests.cmake
+++ b/test/CMakeTests.cmake
@@ -729,6 +729,22 @@ if (NOT CYGWIN)
set_tests_properties (H5TEST-cache PROPERTIES TIMEOUT 1800)
endif ()
+#-- Adding test for cache_image
+add_test (
+ NAME H5TEST-clear-cache_image-objects
+ COMMAND ${CMAKE_COMMAND}
+ -E remove
+ cache_image_test.h5
+ WORKING_DIRECTORY
+ ${HDF5_TEST_BINARY_DIR}/H5TEST
+)
+add_test (NAME H5TEST-cache_image COMMAND $<TARGET_FILE:cache_image>)
+set_tests_properties (H5TEST-cache_image PROPERTIES
+ DEPENDS H5TEST-clear-cache_image-objects
+ ENVIRONMENT "srcdir=${HDF5_TEST_BINARY_DIR}/H5TEST"
+ WORKING_DIRECTORY ${HDF5_TEST_BINARY_DIR}/H5TEST
+)
+
#-- Adding test for err_compat
if (HDF5_ENABLE_DEPRECATED_SYMBOLS)
add_test (NAME H5TEST-clear-err_compat-objects
diff --git a/test/Makefile.am b/test/Makefile.am
index 50b2ee2..a26f355 100644
--- a/test/Makefile.am
+++ b/test/Makefile.am
@@ -44,7 +44,8 @@ check_SCRIPTS = $(TEST_SCRIPT)
# executed, generally most specific tests to least specific tests.
# As an exception, long-running tests should occur earlier in the list.
# This gives them more time to run when tests are executing in parallel.
-TEST_PROG= testhdf5 cache cache_api cache_tagging lheap ohdr stab gheap \
+TEST_PROG= testhdf5 \
+ cache cache_api cache_image cache_tagging lheap ohdr stab gheap \
evict_on_close farray earray btree2 fheap \
pool accum hyperslab istore bittests dt_arith \
dtypes dsets cmpd_dset filter_fail extend external efc objcopy links unlink \
@@ -114,6 +115,7 @@ LDADD=libh5test.la $(LIBHDF5)
# List the source files for tests that have more than one
ttsafe_SOURCES=ttsafe.c ttsafe_dcreate.c ttsafe_error.c ttsafe_cancel.c \
ttsafe_acreate.c
+cache_image_SOURCES=cache_image.c genall5.c
VFD_LIST = sec2 stdio core core_paged split multi family
if DIRECT_VFD_CONDITIONAL
@@ -174,7 +176,7 @@ CHECK_CLEANFILES+=accum.h5 cmpd_dset.h5 compact_dataset.h5 dataset.h5 dset_offse
flushrefresh_VERIFICATION_CHECKPOINT1 flushrefresh_VERIFICATION_CHECKPOINT2 \
flushrefresh_VERIFICATION_DONE accum_swmr_big.h5 ohdr_swmr.h5 \
cache_logging.h5 cache_logging.out \
- swmr[0-2].h5 tbogus.h5.copy
+ swmr[0-2].h5 tbogus.h5.copy cache_image_test.h5
# Sources for testhdf5 executable
testhdf5_SOURCES=testhdf5.c tarray.c tattr.c tchecksum.c tconfig.c tfile.c \
tgenprop.c th5o.c th5s.c tcoords.c theap.c tid.c titerate.c tmeta.c tmisc.c \
diff --git a/test/cache.c b/test/cache.c
index 5c95b77..9ca48e7 100644
--- a/test/cache.c
+++ b/test/cache.c
@@ -34580,7 +34580,7 @@ cedds__expunge_dirty_entry_in_flush_test(H5F_t * file_ptr)
/*-------------------------------------------------------------------------
* Function: cedds__H5C_make_space_in_cache()
*
- * Purpose: Verify that H5C_make_space_in_cache() can handle the
+ * Purpose: Verify that H5C__make_space_in_cache() can handle the
* removal from the cache of the next item in its reverse scan
* of the LRU list.
*
@@ -34590,7 +34590,7 @@ cedds__expunge_dirty_entry_in_flush_test(H5F_t * file_ptr)
* load an additional entry, triggering the flush of the last
* item, and thereby the deletion of the second to last item.
*
- * H5C_make_space_in_cache() should detect this deletion, and
+ * H5C__make_space_in_cache() should detect this deletion, and
* restart its scan of the LRU from the tail, instead of
* examining the now deleted next item up on the LRU.
*
@@ -34668,7 +34668,7 @@ cedds__H5C_make_space_in_cache(H5F_t * file_ptr)
if(cache_ptr == NULL) {
pass = FALSE;
- failure_mssg = "cache_ptr NULL on entry to cedds for H5C_make_space_in_cache() test.";
+ failure_mssg = "cache_ptr NULL on entry to cedds for H5C__make_space_in_cache() test.";
}
else if((cache_ptr->index_len != 0) ||
(cache_ptr->index_size != 0)) {
@@ -34808,7 +34808,7 @@ cedds__H5C_make_space_in_cache(H5F_t * file_ptr)
* and HET 0, 2, and 3 will be evicted to make room for the new
* monster entry (MET, 31).
*
- * Verify this. If H5C_make_space_in_cache() chokes, failure will
+ * Verify this. If H5C__make_space_in_cache() chokes, failure will
* be detected in protect_entry(). Thus end the "if(pass)" clause
* there so the error message will not be overwritten.
*/
@@ -34971,7 +34971,7 @@ cedds__H5C_make_space_in_cache(H5F_t * file_ptr)
* access the first item in the LRU repeatedly until the
* item, and thereby the deletion of the second to last item.
*
- * H5C_make_space_in_cache() should detect this deletion, and
+ * H5C__make_space_in_cache() should detect this deletion, and
* restart its scan of the LRU from the tail, instead of
* examining the now deleted next item up on the LRU.
*
diff --git a/test/enc_dec_plist.c b/test/enc_dec_plist.c
index 4f0147e..5179e8e 100644
--- a/test/enc_dec_plist.c
+++ b/test/enc_dec_plist.c
@@ -117,6 +117,11 @@ main(void)
0.2f,
(256 * 2048),
H5AC__DEFAULT_METADATA_WRITE_STRATEGY};
+ H5AC_cache_image_config_t my_cache_image_config = {
+ H5AC__CURR_CACHE_IMAGE_CONFIG_VERSION,
+ TRUE,
+ FALSE,
+ -1};
if(VERBOSE_MED)
printf("Encode/Decode DCPLs\n");
@@ -455,6 +460,8 @@ main(void)
FAIL_STACK_ERROR
if((H5Pset_mdc_config(fapl, &my_cache_config)) < 0)
FAIL_STACK_ERROR
+ if((H5Pset_mdc_image_config(fapl, &my_cache_image_config)) < 0)
+ FAIL_STACK_ERROR
if((H5Pset_core_write_tracking(fapl, TRUE, 1024 * 1024)) < 0)
FAIL_STACK_ERROR
diff --git a/test/gen_plist.c b/test/gen_plist.c
index c617ad0..8cb6c00 100644
--- a/test/gen_plist.c
+++ b/test/gen_plist.c
@@ -81,6 +81,12 @@ main(void)
0.2f,
(256 * 2048),
H5AC_METADATA_WRITE_STRATEGY__PROCESS_0_ONLY};
+ H5AC_cache_image_config_t my_cache_image_config = {
+ H5AC__CURR_CACHE_IMAGE_CONFIG_VERSION,
+ TRUE,
+ FALSE,
+ -1};
+
/* check endianess */
{
@@ -356,6 +362,9 @@ main(void)
assert(ret > 0);
if((ret = H5Pset_mdc_config(fapl1, &my_cache_config)) < 0)
assert(ret > 0);
+ if((ret = H5Pset_mdc_image_config(fapl1, &my_cache_image_config)) < 0)
+ assert(ret > 0);
+
if((ret = H5Pset_core_write_tracking(fapl1, TRUE, (size_t)(1024 * 1024))) < 0)
assert(ret > 0);
diff --git a/test/testfiles/plist_files/dapl_32be b/test/testfiles/plist_files/dapl_32be
index 4df4e7f..4dedda2 100644
--- a/test/testfiles/plist_files/dapl_32be
+++ b/test/testfiles/plist_files/dapl_32be
Binary files differ
diff --git a/test/testfiles/plist_files/dapl_32le b/test/testfiles/plist_files/dapl_32le
index 4df4e7f..4dedda2 100644
--- a/test/testfiles/plist_files/dapl_32le
+++ b/test/testfiles/plist_files/dapl_32le
Binary files differ
diff --git a/test/testfiles/plist_files/dapl_64be b/test/testfiles/plist_files/dapl_64be
index 4df4e7f..4dedda2 100644
--- a/test/testfiles/plist_files/dapl_64be
+++ b/test/testfiles/plist_files/dapl_64be
Binary files differ
diff --git a/test/testfiles/plist_files/dapl_64le b/test/testfiles/plist_files/dapl_64le
index 4df4e7f..4dedda2 100644
--- a/test/testfiles/plist_files/dapl_64le
+++ b/test/testfiles/plist_files/dapl_64le
Binary files differ
diff --git a/test/testfiles/plist_files/def_dapl_32be b/test/testfiles/plist_files/def_dapl_32be
index c9b7ea9..3df7289 100644
--- a/test/testfiles/plist_files/def_dapl_32be
+++ b/test/testfiles/plist_files/def_dapl_32be
Binary files differ
diff --git a/test/testfiles/plist_files/def_dapl_32le b/test/testfiles/plist_files/def_dapl_32le
index c9b7ea9..3df7289 100644
--- a/test/testfiles/plist_files/def_dapl_32le
+++ b/test/testfiles/plist_files/def_dapl_32le
Binary files differ
diff --git a/test/testfiles/plist_files/def_dapl_64be b/test/testfiles/plist_files/def_dapl_64be
index c9b7ea9..3df7289 100644
--- a/test/testfiles/plist_files/def_dapl_64be
+++ b/test/testfiles/plist_files/def_dapl_64be
Binary files differ
diff --git a/test/testfiles/plist_files/def_dapl_64le b/test/testfiles/plist_files/def_dapl_64le
index c9b7ea9..3df7289 100644
--- a/test/testfiles/plist_files/def_dapl_64le
+++ b/test/testfiles/plist_files/def_dapl_64le
Binary files differ
diff --git a/test/testfiles/plist_files/def_dxpl_32be b/test/testfiles/plist_files/def_dxpl_32be
index b13f456..3b77a32 100644
--- a/test/testfiles/plist_files/def_dxpl_32be
+++ b/test/testfiles/plist_files/def_dxpl_32be
Binary files differ
diff --git a/test/testfiles/plist_files/def_dxpl_32le b/test/testfiles/plist_files/def_dxpl_32le
index b13f456..3b77a32 100644
--- a/test/testfiles/plist_files/def_dxpl_32le
+++ b/test/testfiles/plist_files/def_dxpl_32le
Binary files differ
diff --git a/test/testfiles/plist_files/def_dxpl_64be b/test/testfiles/plist_files/def_dxpl_64be
index b13f456..3b77a32 100644
--- a/test/testfiles/plist_files/def_dxpl_64be
+++ b/test/testfiles/plist_files/def_dxpl_64be
Binary files differ
diff --git a/test/testfiles/plist_files/def_dxpl_64le b/test/testfiles/plist_files/def_dxpl_64le
index b13f456..3b77a32 100644
--- a/test/testfiles/plist_files/def_dxpl_64le
+++ b/test/testfiles/plist_files/def_dxpl_64le
Binary files differ
diff --git a/test/testfiles/plist_files/def_fapl_32be b/test/testfiles/plist_files/def_fapl_32be
index 6b6baee..3b35501 100644
--- a/test/testfiles/plist_files/def_fapl_32be
+++ b/test/testfiles/plist_files/def_fapl_32be
Binary files differ
diff --git a/test/testfiles/plist_files/def_fapl_32le b/test/testfiles/plist_files/def_fapl_32le
index 6b6baee..3b35501 100644
--- a/test/testfiles/plist_files/def_fapl_32le
+++ b/test/testfiles/plist_files/def_fapl_32le
Binary files differ
diff --git a/test/testfiles/plist_files/def_fapl_64be b/test/testfiles/plist_files/def_fapl_64be
index 6b6baee..3b35501 100644
--- a/test/testfiles/plist_files/def_fapl_64be
+++ b/test/testfiles/plist_files/def_fapl_64be
Binary files differ
diff --git a/test/testfiles/plist_files/def_fapl_64le b/test/testfiles/plist_files/def_fapl_64le
index 6b6baee..3b35501 100644
--- a/test/testfiles/plist_files/def_fapl_64le
+++ b/test/testfiles/plist_files/def_fapl_64le
Binary files differ
diff --git a/test/testfiles/plist_files/dxpl_32be b/test/testfiles/plist_files/dxpl_32be
index 5ff2ea0..22fbdc8 100644
--- a/test/testfiles/plist_files/dxpl_32be
+++ b/test/testfiles/plist_files/dxpl_32be
Binary files differ
diff --git a/test/testfiles/plist_files/dxpl_32le b/test/testfiles/plist_files/dxpl_32le
index 5ff2ea0..22fbdc8 100644
--- a/test/testfiles/plist_files/dxpl_32le
+++ b/test/testfiles/plist_files/dxpl_32le
Binary files differ
diff --git a/test/testfiles/plist_files/dxpl_64be b/test/testfiles/plist_files/dxpl_64be
index 5ff2ea0..22fbdc8 100644
--- a/test/testfiles/plist_files/dxpl_64be
+++ b/test/testfiles/plist_files/dxpl_64be
Binary files differ
diff --git a/test/testfiles/plist_files/dxpl_64le b/test/testfiles/plist_files/dxpl_64le
index 5ff2ea0..22fbdc8 100644
--- a/test/testfiles/plist_files/dxpl_64le
+++ b/test/testfiles/plist_files/dxpl_64le
Binary files differ
diff --git a/test/testfiles/plist_files/fapl_32be b/test/testfiles/plist_files/fapl_32be
index 65e2070..43e5e67 100644
--- a/test/testfiles/plist_files/fapl_32be
+++ b/test/testfiles/plist_files/fapl_32be
Binary files differ
diff --git a/test/testfiles/plist_files/fapl_32le b/test/testfiles/plist_files/fapl_32le
index 65e2070..43e5e67 100644
--- a/test/testfiles/plist_files/fapl_32le
+++ b/test/testfiles/plist_files/fapl_32le
Binary files differ
diff --git a/test/testfiles/plist_files/fapl_64be b/test/testfiles/plist_files/fapl_64be
index 65e2070..43e5e67 100644
--- a/test/testfiles/plist_files/fapl_64be
+++ b/test/testfiles/plist_files/fapl_64be
Binary files differ
diff --git a/test/testfiles/plist_files/fapl_64le b/test/testfiles/plist_files/fapl_64le
index 65e2070..43e5e67 100644
--- a/test/testfiles/plist_files/fapl_64le
+++ b/test/testfiles/plist_files/fapl_64le
Binary files differ
diff --git a/test/testfiles/plist_files/fcpl_32be b/test/testfiles/plist_files/fcpl_32be
index ffa5242..3ce8bf4 100644
--- a/test/testfiles/plist_files/fcpl_32be
+++ b/test/testfiles/plist_files/fcpl_32be
Binary files differ
diff --git a/test/testfiles/plist_files/fcpl_32le b/test/testfiles/plist_files/fcpl_32le
index ffa5242..3ce8bf4 100644
--- a/test/testfiles/plist_files/fcpl_32le
+++ b/test/testfiles/plist_files/fcpl_32le
Binary files differ
diff --git a/test/testfiles/plist_files/fcpl_64be b/test/testfiles/plist_files/fcpl_64be
index ffa5242..3ce8bf4 100644
--- a/test/testfiles/plist_files/fcpl_64be
+++ b/test/testfiles/plist_files/fcpl_64be
Binary files differ
diff --git a/test/testfiles/plist_files/fcpl_64le b/test/testfiles/plist_files/fcpl_64le
index ffa5242..3ce8bf4 100644
--- a/test/testfiles/plist_files/fcpl_64le
+++ b/test/testfiles/plist_files/fcpl_64le
Binary files differ
diff --git a/test/testfiles/plist_files/lapl_32be b/test/testfiles/plist_files/lapl_32be
index e9f43e2..f3e9865 100644
--- a/test/testfiles/plist_files/lapl_32be
+++ b/test/testfiles/plist_files/lapl_32be
Binary files differ
diff --git a/test/testfiles/plist_files/lapl_32le b/test/testfiles/plist_files/lapl_32le
index e9f43e2..f3e9865 100644
--- a/test/testfiles/plist_files/lapl_32le
+++ b/test/testfiles/plist_files/lapl_32le
Binary files differ
diff --git a/test/testfiles/plist_files/lapl_64be b/test/testfiles/plist_files/lapl_64be
index e9f43e2..f3e9865 100644
--- a/test/testfiles/plist_files/lapl_64be
+++ b/test/testfiles/plist_files/lapl_64be
Binary files differ
diff --git a/test/testfiles/plist_files/lapl_64le b/test/testfiles/plist_files/lapl_64le
index e9f43e2..f3e9865 100644
--- a/test/testfiles/plist_files/lapl_64le
+++ b/test/testfiles/plist_files/lapl_64le
Binary files differ