mirror of
https://github.com/HDFGroup/hdf5.git
synced 2026-09-25 04:09:44 +03:00
Fix cache image testing issues and re-enable testing (#6311)
Fix issue where chunked datasets could get setup with an incorrect chunking index type in parallel HDF5 Fix issue where metadata cache images with an undefined address and size of 0 couldn't be properly decoded Fix issue where a flag in H5Cimage.c wasn't getting set correctly for release builds of the library, leading to incorrect error checking when reconstructing metadata cache entries
This commit is contained in:
+21
-23
@@ -473,29 +473,27 @@ if (NOT CYGWIN)
|
||||
endif ()
|
||||
endif ()
|
||||
|
||||
if (TEST_CACHE_IMAGE)
|
||||
#-- Adding test for cache_image
|
||||
add_test (
|
||||
NAME H5TEST-cache_image-clear-objects
|
||||
COMMAND ${CMAKE_COMMAND} -E remove cache_image_test.h5
|
||||
WORKING_DIRECTORY ${HDF5_TEST_BINARY_DIR}/H5TEST
|
||||
)
|
||||
set_tests_properties (H5TEST-cache_image-clear-objects PROPERTIES FIXTURES_SETUP clear_cache_image)
|
||||
add_test (
|
||||
NAME H5TEST-cache_image-clean-objects
|
||||
COMMAND ${CMAKE_COMMAND} -E remove cache_image_test.h5
|
||||
WORKING_DIRECTORY ${HDF5_TEST_BINARY_DIR}/H5TEST
|
||||
)
|
||||
set_tests_properties (H5TEST-cache_image-clean-objects PROPERTIES FIXTURES_CLEANUP clear_cache_image)
|
||||
add_test (NAME H5TEST-cache_image COMMAND $<TARGET_FILE:cache_image>)
|
||||
set_tests_properties (H5TEST-cache_image PROPERTIES
|
||||
FIXTURES_REQUIRED clear_cache_image
|
||||
ENVIRONMENT "srcdir=${HDF5_TEST_BINARY_DIR}/H5TEST"
|
||||
WORKING_DIRECTORY ${HDF5_TEST_BINARY_DIR}/H5TEST
|
||||
)
|
||||
if ("H5TEST-cache_image" MATCHES "${HDF5_DISABLE_TESTS_REGEX}")
|
||||
set_tests_properties (H5TEST-cache_image PROPERTIES DISABLED true)
|
||||
endif ()
|
||||
#-- Adding test for cache_image
|
||||
add_test (
|
||||
NAME H5TEST-cache_image-clear-objects
|
||||
COMMAND ${CMAKE_COMMAND} -E remove cache_image_test.h5
|
||||
WORKING_DIRECTORY ${HDF5_TEST_BINARY_DIR}/H5TEST
|
||||
)
|
||||
set_tests_properties (H5TEST-cache_image-clear-objects PROPERTIES FIXTURES_SETUP clear_cache_image)
|
||||
add_test (
|
||||
NAME H5TEST-cache_image-clean-objects
|
||||
COMMAND ${CMAKE_COMMAND} -E remove cache_image_test.h5
|
||||
WORKING_DIRECTORY ${HDF5_TEST_BINARY_DIR}/H5TEST
|
||||
)
|
||||
set_tests_properties (H5TEST-cache_image-clean-objects PROPERTIES FIXTURES_CLEANUP clear_cache_image)
|
||||
add_test (NAME H5TEST-cache_image COMMAND $<TARGET_FILE:cache_image>)
|
||||
set_tests_properties (H5TEST-cache_image PROPERTIES
|
||||
FIXTURES_REQUIRED clear_cache_image
|
||||
ENVIRONMENT "srcdir=${HDF5_TEST_BINARY_DIR}/H5TEST"
|
||||
WORKING_DIRECTORY ${HDF5_TEST_BINARY_DIR}/H5TEST
|
||||
)
|
||||
if ("H5TEST-cache_image" MATCHES "${HDF5_DISABLE_TESTS_REGEX}")
|
||||
set_tests_properties (H5TEST-cache_image PROPERTIES DISABLED true)
|
||||
endif ()
|
||||
|
||||
#-- Adding test for external_env
|
||||
|
||||
+20
-14
@@ -529,7 +529,7 @@ open_hdf5_file(bool create_file, bool mdci_sbem_expected, bool read_only, bool s
|
||||
}
|
||||
|
||||
if (show_progress)
|
||||
fprintf(stdout, "%s: cp = %d.\n", fcn_name, cp++);
|
||||
fprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
|
||||
|
||||
/* create a file access property list. */
|
||||
if (pass) {
|
||||
@@ -544,7 +544,7 @@ open_hdf5_file(bool create_file, bool mdci_sbem_expected, bool read_only, bool s
|
||||
}
|
||||
|
||||
if (show_progress)
|
||||
fprintf(stdout, "%s: cp = %d.\n", fcn_name, cp++);
|
||||
fprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
|
||||
|
||||
/* call H5Pset_libver_bounds() on the fapl_id */
|
||||
if (pass) {
|
||||
@@ -557,7 +557,7 @@ open_hdf5_file(bool create_file, bool mdci_sbem_expected, bool read_only, bool s
|
||||
}
|
||||
|
||||
if (show_progress)
|
||||
fprintf(stdout, "%s: cp = %d.\n", fcn_name, cp++);
|
||||
fprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
|
||||
|
||||
/* get metadata cache image config -- verify that it is the default */
|
||||
if (pass) {
|
||||
@@ -581,7 +581,7 @@ open_hdf5_file(bool create_file, bool mdci_sbem_expected, bool read_only, bool s
|
||||
}
|
||||
|
||||
if (show_progress)
|
||||
fprintf(stdout, "%s: cp = %d.\n", fcn_name, cp++);
|
||||
fprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
|
||||
|
||||
/* set metadata cache image fapl entry if indicated */
|
||||
if ((pass) && (set_mdci_fapl)) {
|
||||
@@ -601,7 +601,7 @@ open_hdf5_file(bool create_file, bool mdci_sbem_expected, bool read_only, bool s
|
||||
}
|
||||
|
||||
if (show_progress)
|
||||
fprintf(stdout, "%s: cp = %d.\n", fcn_name, cp++);
|
||||
fprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
|
||||
|
||||
/* setup the persistent free space manager if indicated */
|
||||
if ((pass) && (config_fsm)) {
|
||||
@@ -623,7 +623,7 @@ open_hdf5_file(bool create_file, bool mdci_sbem_expected, bool read_only, bool s
|
||||
}
|
||||
|
||||
if (show_progress)
|
||||
fprintf(stdout, "%s: cp = %d.\n", fcn_name, cp++);
|
||||
fprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
|
||||
|
||||
/* set evict on close if indicated */
|
||||
if ((pass) && (set_eoc)) {
|
||||
@@ -636,7 +636,7 @@ open_hdf5_file(bool create_file, bool mdci_sbem_expected, bool read_only, bool s
|
||||
}
|
||||
|
||||
if (show_progress)
|
||||
fprintf(stdout, "%s: cp = %d.\n", fcn_name, cp++);
|
||||
fprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
|
||||
|
||||
/* open the file */
|
||||
if (pass) {
|
||||
@@ -686,7 +686,7 @@ open_hdf5_file(bool create_file, bool mdci_sbem_expected, bool read_only, bool s
|
||||
}
|
||||
|
||||
if (show_progress)
|
||||
fprintf(stdout, "%s: cp = %d.\n", fcn_name, cp++);
|
||||
fprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
|
||||
|
||||
/* get a pointer to the files internal data structure and then
|
||||
* to the cache structure
|
||||
@@ -705,7 +705,7 @@ open_hdf5_file(bool create_file, bool mdci_sbem_expected, bool read_only, bool s
|
||||
}
|
||||
|
||||
if (show_progress)
|
||||
fprintf(stdout, "%s: cp = %d.\n", fcn_name, cp++);
|
||||
fprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
|
||||
|
||||
/* verify expected metadata cache status */
|
||||
|
||||
@@ -724,7 +724,7 @@ open_hdf5_file(bool create_file, bool mdci_sbem_expected, bool read_only, bool s
|
||||
}
|
||||
|
||||
if (show_progress)
|
||||
fprintf(stdout, "%s: cp = %d.\n", fcn_name, cp++);
|
||||
fprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
|
||||
|
||||
if (pass) {
|
||||
|
||||
@@ -767,7 +767,7 @@ open_hdf5_file(bool create_file, bool mdci_sbem_expected, bool read_only, bool s
|
||||
}
|
||||
|
||||
if (show_progress)
|
||||
fprintf(stdout, "%s: cp = %d.\n", fcn_name, cp++);
|
||||
fprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
|
||||
|
||||
if ((pass) && (set_mdci_fapl)) {
|
||||
|
||||
@@ -781,7 +781,7 @@ open_hdf5_file(bool create_file, bool mdci_sbem_expected, bool read_only, bool s
|
||||
}
|
||||
|
||||
if (show_progress)
|
||||
fprintf(stdout, "%s: cp = %d.\n", fcn_name, cp++);
|
||||
fprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
|
||||
|
||||
if (pass) {
|
||||
|
||||
@@ -821,7 +821,7 @@ open_hdf5_file(bool create_file, bool mdci_sbem_expected, bool read_only, bool s
|
||||
}
|
||||
|
||||
if (show_progress)
|
||||
fprintf(stdout, "%s: cp = %d.\n", fcn_name, cp++);
|
||||
fprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass);
|
||||
|
||||
if (pass) {
|
||||
|
||||
@@ -831,7 +831,7 @@ open_hdf5_file(bool create_file, bool mdci_sbem_expected, bool read_only, bool s
|
||||
}
|
||||
|
||||
if (show_progress)
|
||||
fprintf(stdout, "%s: cp = %d -- exiting.\n", fcn_name, cp++);
|
||||
fprintf(stdout, "%s: cp = %d, pass = %d -- exiting.\n", fcn_name, cp++, pass);
|
||||
|
||||
} /* open_hdf5_file() */
|
||||
|
||||
@@ -6477,6 +6477,12 @@ cache_image_api_error_check_4(bool single_file_vfd)
|
||||
pass = false;
|
||||
failure_mssg = "h5_fileaccess() failed.\n";
|
||||
}
|
||||
|
||||
if (H5Pset_libver_bounds(fapl_id, H5F_LIBVER_EARLIEST, H5F_LIBVER_V18) < 0) {
|
||||
|
||||
pass = false;
|
||||
failure_mssg = "H5Pset_libver_bounds() failed.\n";
|
||||
}
|
||||
}
|
||||
|
||||
if (show_progress)
|
||||
|
||||
Reference in New Issue
Block a user