summaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorjhendersonHDF <jhenderson@hdfgroup.org>2022-07-22 20:03:12 (GMT)
committerGitHub <noreply@github.com>2022-07-22 20:03:12 (GMT)
commit27bb358f7ab1d23f3f8ce081c6b4f1602033e4d7 (patch)
treee8a69bdfbc16f9acf073ddb3ebff586eccfca009 /test
parent32caa567a26680c5f98d0ea0cc989c45c89dc654 (diff)
downloadhdf5-27bb358f7ab1d23f3f8ce081c6b4f1602033e4d7.zip
hdf5-27bb358f7ab1d23f3f8ce081c6b4f1602033e4d7.tar.gz
hdf5-27bb358f7ab1d23f3f8ce081c6b4f1602033e4d7.tar.bz2
Subfiling VFD (#1883)
* Added support for vector I/O calls to the VFD layer, and associated test code. Note that this includes the optimization to allow shortened sizes and types arrays to allow more space efficient representations of vectors in which all entries are of the same size and/or type. See the Selection I/o RFC for further details. Tested serial and parallel, debug and production on Charis. serial and parallel debug only on Jelly. * ran code formatter quick serial build and test on jelly * Add H5FD_read_selection() and H5FD_write_selection(). Currently only translate to scalar calls. Fix const buf in H5FD_write_vector(). * Format source * Fix comments * Add selection I/O to chunk code, used when: not using chunk cache, no datatype conversion, no I/O filters, no page buffer, not using collective I/O. Requires global variable H5_use_selection_io_g be set to TRUE. Implemented selection to vector I/O transaltion at the file driver layer. * Fix formatting unrelated to previous change to stop github from complaining. * Add full API support for selection I/O. Add tests for this. * Implement selection I/O for contiguous datasets. Fix bug in selection I/O translation. Add const qualifiers to some internal selection I/O routines to maintain const-correctness while avoiding memcpys. * Added vector read / write support to the MPIO VFD, with associated test code (see testpar/t_vfd.c). Note that this implementation does NOT support vector entries of size greater than 2 GB. This must be repaired before release, but it should be good enough for correctness testing. As MPIO requires vector I/O requests to be sorted in increasing address order, also added a vector sort utility in H5FDint.c This function is tested in passing by the MPIO vector I/O extension. In passing, repaired a bug in size / type vector extension management in H5FD_read/write_vector() Tested parallel debug and production on charis and Jelly. * Ran source code formatter * Add support for independent parallel I/O with selection I/O. Add HDF5_USE_SELECTION_IO env var to control selection I/O (default off). * Implement parallel collective support for selection I/O. * Fix comments and run formatter. * Update selection IO branch with develop (#1215) Merged branch 'develop' into selection_io * Sync with develop (#1262) Updated the branch with develop changes. * Implement big I/O support for vector I/O requests in the MPIO file driver. * Free arrays in H5FD__mpio_read/write_vector() as soon as they're not needed, to cut down on memory usage during I/O. * Address comments from code review. Fix const warnings with H5S_SEL_ITER_INIT(). * Committing clang-format changes * Feature/subfiling (#1464) * Initial checkin of merged sub-filing VFD. Passes regression tests (debug/shared/paralle) on Jelly. However, bugs and many compiler warnings remain -- not suitable for merge to develop. * Minor mods to src/H5FDsubfile_mpi.c to address errors reported by autogen.sh * Code formatting run -- no test * Merged my subfiling code fixes into the new selection_io_branch * Forgot to add the FindMERCURY.cmake file. This will probably disappear soon * attempting to make a more reliable subfile file open which doesn't return errors. For some unknown reason, the regular posix open will occasionally fail to create a subfile. Some better error handling for file close has been added. * added NULL option for H5FD_subfiling_config_t in H5Pset_fapl_subfiling (#1034) * NULL option automatically stacks IOC VFD for subfiling and returns a valid fapl. * added doxygen subfiling APIs * Various fixes which allow the IOR benchmark to run correctly * Lots of updates including the packaging up of the mercury_util source files to enable easier builds for our Benchmarking * Interim checkin of selection_io_with_subfiling_vfd branch Moddified testpar/t_vfd.c to test the subfiling vfd with default configuration. Must update this code to run with a variety of configurations -- most particularly multiple IO concentrators, and stripe depth small enough to test the other IO concentrators. testpar/t_vfd.c exposed a large number of race condidtions -- symtoms included: 1) Crashes (usually seg faults) 2) Heap corruption 3) Stack corruption 4) Double frees of heap space 5) Hangs 6) Out of order execution of I/O requests / violations of POSIX semantics 7) Swapped write requests Items 1 - 4 turned out to be primarily caused by file close issues -- specifically, the main I/O concentrator thread and its pool of worker threads were not being shut down properly on file close. Addressing this issue in combination with some other minor fixes seems to have addressed these issues. Items 5 & 6 appear to have been caused by issue of I/O requests to the thread pool in an order that did not maintain POSIX semantics. A rewrite of the I/O request dispatch code appears to have solved these issues. Item 7 seems to have been caused by multiple write requests from a given rank being read by the wrong worker thread. Code to issue "unique" tags for each write request via the ACK message appears to have cleaned this up. Note that the code is still in poor condtition. A partial list of known defects includes: a) Race condiditon on file close that allows superblock writes to arrive at the I/O concentrator after it has been shutdown. This defect is most evident when testpar/t_subfiling_vfd is run with 8 ranks. b) No error reporting from I/O concentrators -- must design and implement this. For now, mostly just asserts, which suggests that it should be run in debug mode. c) Much commented out and/or un-used code. d) Code orgnaization e) Build system with bits of Mercury is awkward -- think of shifting to pthreads with our own thread pool code. f) Need to add native support for vector and selection I/O to the subfiling VFD. g) Need to review, and posibly rework configuration code. h) Need to store subfile configuration data in a superblock extension message, and add code to use this data on file open. i) Test code is inadequate -- expect more issues as it is extended. In particular, there is no unit test code for the I/O request dispatch code. While I think it is correct at present, we need test code to verify this. Similarly, we need to test with multiple I/O concentrators and much smaller stripe depth. My actual code changes were limited to: src/H5FDioc.c src/H5FDioc_threads.c src/H5FDsubfile_int.c src/H5FDsubfile_mpi.c src/H5FDsubfiling.c src/H5FDsubfiling.h src/H5FDsubfiling_priv.h testpar/t_subfiling_vfd.c testpar/t_vfd.c I'm not sure what is going on with the deletions in src/mercury/src/util. Tested parallel/debug on Charis and Jelly * subfiling with selection IO (#1219) Merged branch 'selection_io' into subfiling branch. * Subfile name fixes (#1250) * fixed subfiling naming convention, and added leading zero to rank names. * Merge branch 'selection_io' into selection_io_with_subfiling_vfd (#1265) * Added script to join subfiles into a single HDF5 file (#1350) * Modified H5FD__subfiling_query() to report that the sub-filing VFD supports MPI This exposed issues with truncate and get EOF in the sub-filing VFD. I believe I have addressed these issues (get EOF not as fully tested as it should be), howeer, it exposed race conditions resulting in hangs. As of this writing, I have not been able to chase these down. Note that the tests that expose these race conditions are in testpar/t_subfiling_vfd.c, and are currently skipped. Unskip these tests to reproduce the race conditions. tested (to the extent possible) debug/parallel on charis and jelly. * Committing clang-format changes * fixed H5MM_free Co-authored-by: mainzer <mainzer#hdfgroup.org> Co-authored-by: jrmainzer <72230804+jrmainzer@users.noreply.github.com> Co-authored-by: Richard Warren <Richard.Warren@hdfgroup.org> Co-authored-by: Richard.Warren <richard.warren@jelly.ad.hdfgroup.org> Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com> * Move Subfiling VFD components into H5FDsubfiling source directory * Update Autotools build and add H5_HAVE_SUBFILING_VFD macro to H5pubconf.h * Tidy up CMake build of subfiling sources * Merge branch 'develop' into feature/subfiling (#1539) Merge branch 'develop' into feature/subfiling * Add VFD interface version field to Subfiling and IOC VFDs * Merge branch 'develop' into feature/subfiling (#1557) Merge branch 'develop' into feature/subfiling * Merge branch 'develop' into feature/subfiling (#1563) Merge branch 'develop' into feature/subfiling * Tidy up merge artifacts after rebase on develop * Fix incorrect variable in mirror VFD utils CMake * Ensure VFD values are always defined * Add subfiling to CMake VFD_LIST if built * Mark MPI I/O driver self-initialization global as static * Add Subfiling VFD to predefined VFDs for HDF5_DRIVER env. variable * Initial progress towards separating private vs. public subfiling code * include libgen.h in t_vfd tests for correct dirname/basename * Committing clang-format changes * removed mercury option, included subfiling header path (#1577) Added subfiling status to configure output, installed h5fuse.sh to build directory for use in future tests. * added check for stdatomic.h (#1578) * added check for stdatomic.h with subfiling * added H5_HAVE_SUBFILING_VFD for cmake * fix old-style-definition warning (#1582) * fix old-style-definition warning * added test for enable parallel with subfiling VFD (#1586) Fails if subfiling VFD is not used with parallel support. * Subfiling/IOC VFD fixes and tidying (#1619) * Rename CMake option for Subfiling VFD to be consistent with other VFDs * Miscellaneous Subfiling fixes Add error message for unset MPI communicator Support dynamic loading of subfiling VFD with default configuration * Temporary fix for subfile name issue * Added subfile checks (#1634) * added subfile checks * Feature/subfiling (#1655) * Subfiling/IOC VFD cleanup Fix misuse of MPI_COMM_WORLD in IOC VFD Propagate Subfiling FAPL MPI settings down to IOC FAPL in default configuration case Cleanup IOC VFD debugging code Change sprintf to snprintf in a few places * Major work on separating Subfiling and IOC VFDs from each other * Re-write async_completion func to not overuse stack * Replace usage of MPI_COMM_WORLD with file's actual MPI communicator * Refactor H5FDsubfile_mpi.c * Remove empty file H5FDsubfile_mpi.c * Separate IOC VFD errors to its own error stack * Committing clang-format changes * Remove H5TRACE macros from H5FDioc.c * Integrate H5FDioc_threads.c with IOC error stack * Fix for subfile name generation Use number of I/O concentrators from existing subfiling configuration file, if one exists * Add temporary barrier in "Get EOF" operation to prevent races on EOF Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com> * Fix for retrieval of machine Host ID * Default to MPI_COMM_WORLD if no MPI params set * added libs rt and pthreads (#1673) * added libs rt and pthreads * Feature/subfiling (#1689) * More tidying of IOC VFD and subfiling debug code * Remove old unused log file code * Clear FID from active file map on failure * Fix bug in generation of subfile names when truncating file * Change subfile names to start from 1 instead of 0 * Use long long for user-specified stripe size from environment variable * Skip 0-sized I/Os in low-level IOC I/O routines * Don't update EOF on read * Convert printed warning about data size mismatch to assertion * Don't add base file address to I/O addresses twice Base address should already be applied as part of H5FDwrite/read_vector calls * Account for 0-sized I/O vector entries in subfile write/read functions * Rewrite init_indep_io for clarity * Correction for IOC wraparound calculations * Some corrections to iovec calculations * Remove temporary barrier on EOF retrieval * Complete work request queue entry on error instead of skipping over * Account for stripe size wraparound for sf_col_offset calculation * Committing clang-format changes Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com> * Re-write and fix bugs in I/O vector filling routines (#1703) * Rewrite I/O vector filling routines for clarity * Fix bug with iovec_fill_last when last I/O size is 0 * added subfiling_dir line read (#1714) * added subfiling_dir line read and use it * shellcheck fixes * I/O request dispatch logic update (#1731) Short-circuit I/O request dispatch when head of I/O queue is an in-progress get EOF or truncate operation. This prevents an issue where a write operation can be dispatched alongside a get EOF/truncate operation, whereas all I/O requests are supposed to be ineligible for dispatch until the get EOF/truncate is completed * h5fuse.sh.in clean-up (#1757) * Added command-line options * Committing clang-format changes * Align with changes from develop * Mimic MPI I/O VFD for EOF handling * Initialize context_id field for work request objects * Use logfile for some debugging information * Use atomic store to set IOC ready flag * Use separate communicator for sending file EOF data Minor IOC cleanup * Use H5_subfile_fid_to_context to get context ID for file in Subfiling VFD * IOVEC calculation fixes * Updates for debugging code * Minor fixes for threaded code * Committing clang-format changes * Use separate MPI communicator for barrier operations * Committing clang-format changes * Rewrite EOF routine to use nonblocking MPI communication * Committing clang-format changes * Always dispatch I/O work requests in IOC main loop * Return distinct MPI communicator to library when requested * Minor warning cleanup * Committing clang-format changes * Generate h5fuse.sh from h5fuse.sh.in in CMake * Send truncate messages to correct IOC rank * Committing clang-format changes * Miscellaneous cleanup Post some MPI receives before sends Free some duplicated MPI communicator/Info objects Remove unnecessary extra MPI_Barrier * Warning cleanup * Fix for leaked MPI communicator * Retrieve file EOF on single rank and bcast it * Fixes for a few failure paths * Cleanup of IOC file opens * Committing clang-format changes * Use plan MPI_Send for send of EOF messages * Always check MPI thread support level during Subfiling init * Committing clang-format changes * Handle a hang on failure when IOCs can't open subfiles * Committing clang-format changes * Refactor file open status consensus check * Committing clang-format changes * Fix for MPI_Comm_free being called after MPI_Finalize * Fix VFD test by setting MPI params before setting subfiling on FAPL * Update Subfiling VFD error handling and error stack usage * Improvements for Subfiling logfiles * Remove prototypes for currently unused routines * Disable I/O queue stat collecting by default * Remove unused serialization mutex variable * Update VFD testing to take subfiling VFD into account * Fix usage of global subfiling application layout object * Minor fixes for failure pathways * Keep track of the number of failures in an IOC I/O queue * Make sure not to exceed MPI_TAG_UB value for data communication messages * Committing clang-format changes * Update for rename of some H5FD 'ctl' opcodes * Always include Subfiling's public header files in hdf5.h * Remove old unused code and comments * Implement support for per-file I/O queues Allows the subfiling VFD to have multiple HDF5 files open simultaneously * Use simple MPI_Iprobe over unnecessary MPI_Improbe * Committing clang-format changes * Update HDF5 testing to query driver for H5FD_FEAT_DEFAULT_VFD_COMPATIBLE flag * Fix a few bugs related to file multi-opens * Avoid calling MPI routines if subfiling gets reinitialized * Fix issue when files are closed in a random order * Update HDF5 testing to query VFD for "using MPI" feature flag * Register atexit handler in subfiling VFD to call MPI_Finalize after HDF5 closes * Fail for collective I/O requests until support is implemented * Correct VOL test function prototypes * Minor cleanup of old code and comments * Update mercury dependency * Cleanup of subfiling configuration structure * Committing clang-format changes * Build system updates for Subfiling VFD * Fix possible hang on failure in t_vfd tests caused by mismatched MPI_Barrier calls * Copy subfiling IOC fapl in "fapl get" method * Mirror subfiling superblock writes to stub file for legacy POSIX-y HDF5 applications * Allow collective I/O for MPI_BYTE types and rank 0 bcast strategy * Committing clang-format changes * Use different scheme for subfiling write message MPI tag calculations * Committing clang-format changes * Avoid performing fstat calls on all MPI ranks * Add MPI_Barrier before finalizing IOC threads * Use try_lock in I/O queue dispatch to minimize contention from worker threads * Use simple Waitall for nonblocking I/O waits * Add configurable IOC main thread delay and try_lock option to I/O queue dispatch * Fix bug that could cause serialization of non-overlapping I/O requests * Temporarily treat collective subfiling vector I/O calls as independent * Removed unused mercury bits * Add stubs for subfiling and IOC file delete callback * Update VFD testing for Subfiling VFD * Work around HDF5 metadata cache bug for Subfiling VFD when MPI Comm size = 1 * Committing clang-format changes Co-authored-by: mainzer <mainzer#hdfgroup.org> Co-authored-by: Neil Fortner <nfortne2@hdfgroup.org> Co-authored-by: Scot Breitenfeld <brtnfld@hdfgroup.org> Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: jrmainzer <72230804+jrmainzer@users.noreply.github.com> Co-authored-by: Richard Warren <Richard.Warren@hdfgroup.org> Co-authored-by: Richard.Warren <richard.warren@jelly.ad.hdfgroup.org>
Diffstat (limited to 'test')
-rw-r--r--test/CMakeLists.txt46
-rw-r--r--test/CMakeTests.cmake2
-rw-r--r--test/CMakeVFDTests.cmake77
-rw-r--r--test/cross_read.c13
-rw-r--r--test/dsets.c13
-rw-r--r--test/dtypes.c36
-rw-r--r--test/file_image.c5
-rw-r--r--test/fillval.c6
-rw-r--r--test/flush2.c11
-rw-r--r--test/getname.c14
-rw-r--r--test/h5test.c104
-rw-r--r--test/h5test.h4
-rw-r--r--test/lheap.c6
-rw-r--r--test/links.c20
-rw-r--r--test/mf.c3
-rw-r--r--test/mtime.c9
-rw-r--r--test/ntypes.c14
-rw-r--r--test/objcopy.c9
-rw-r--r--test/set_extent.c8
-rw-r--r--test/stab.c11
-rw-r--r--test/tarray.c16
-rw-r--r--test/tfile.c141
-rw-r--r--test/th5s.c8
-rw-r--r--test/titerate.c15
-rw-r--r--test/tmisc.c151
-rw-r--r--test/tsohm.c17
-rw-r--r--test/vds.c14
-rw-r--r--test/vds_env.c14
-rw-r--r--test/vol.c46
29 files changed, 544 insertions, 289 deletions
diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt
index 2026528..5bccc81 100644
--- a/test/CMakeLists.txt
+++ b/test/CMakeLists.txt
@@ -30,7 +30,7 @@ set (TEST_LIB_HEADERS
if (NOT ONLY_SHARED_LIBS)
add_library (${HDF5_TEST_LIB_TARGET} STATIC ${TEST_LIB_SOURCES} ${TEST_LIB_HEADERS})
target_include_directories (${HDF5_TEST_LIB_TARGET}
- PRIVATE "${HDF5_SRC_DIR};${HDF5_SRC_BINARY_DIR};${HDF5_TEST_BINARY_DIR};$<$<BOOL:${HDF5_ENABLE_PARALLEL}>:${MPI_C_INCLUDE_DIRS}>"
+ PRIVATE "${HDF5_SRC_INCLUDE_DIRS};${HDF5_SRC_BINARY_DIR};${HDF5_TEST_BINARY_DIR};$<$<BOOL:${HDF5_ENABLE_PARALLEL}>:${MPI_C_INCLUDE_DIRS}>"
INTERFACE "$<INSTALL_INTERFACE:$<INSTALL_PREFIX>/include>"
)
target_compile_options(${HDF5_TEST_LIB_TARGET} PRIVATE "${HDF5_CMAKE_C_FLAGS}")
@@ -52,7 +52,7 @@ endif ()
if (BUILD_SHARED_LIBS)
add_library (${HDF5_TEST_LIBSH_TARGET} SHARED ${TEST_LIB_SOURCES} ${TEST_LIB_HEADERS})
target_include_directories (${HDF5_TEST_LIBSH_TARGET}
- PRIVATE "${HDF5_SRC_DIR};${HDF5_SRC_BINARY_DIR};${HDF5_TEST_BINARY_DIR};$<$<BOOL:${HDF5_ENABLE_PARALLEL}>:${MPI_C_INCLUDE_DIRS}>"
+ PRIVATE "${HDF5_SRC_INCLUDE_DIRS};${HDF5_SRC_BINARY_DIR};${HDF5_TEST_BINARY_DIR};$<$<BOOL:${HDF5_ENABLE_PARALLEL}>:${MPI_C_INCLUDE_DIRS}>"
INTERFACE "$<INSTALL_INTERFACE:$<INSTALL_PREFIX>/include>"
)
target_compile_options(${HDF5_TEST_LIBSH_TARGET} PRIVATE "${HDF5_CMAKE_C_FLAGS}")
@@ -109,7 +109,7 @@ if (BUILD_SHARED_LIBS)
set (HDF5_TEST_PLUGIN_TARGET ${HDF5_TEST_PLUGIN_CORENAME})
add_library (${HDF5_TEST_PLUGIN_TARGET} SHARED ${HDF5_TEST_SOURCE_DIR}/${plugin_name}.c)
- target_include_directories (${HDF5_TEST_PLUGIN_TARGET} PRIVATE "${HDF5_SRC_DIR};${HDF5_SRC_BINARY_DIR};$<$<BOOL:${HDF5_ENABLE_PARALLEL}>:${MPI_C_INCLUDE_DIRS}>")
+ target_include_directories (${HDF5_TEST_PLUGIN_TARGET} PRIVATE "${HDF5_SRC_INCLUDE_DIRS};${HDF5_SRC_BINARY_DIR};$<$<BOOL:${HDF5_ENABLE_PARALLEL}>:${MPI_C_INCLUDE_DIRS}>")
TARGET_C_PROPERTIES (${HDF5_TEST_PLUGIN_TARGET} SHARED)
target_link_libraries (${HDF5_TEST_PLUGIN_TARGET} PUBLIC ${HDF5_TEST_LIBSH_TARGET})
H5_SET_LIB_OPTIONS (${HDF5_TEST_PLUGIN_TARGET} ${HDF5_TEST_PLUGIN_NAME} SHARED "LIB")
@@ -141,7 +141,7 @@ if (BUILD_SHARED_LIBS)
set (HDF5_TEST_PLUGIN_TARGET ${HDF5_TEST_PLUGIN_CORENAME})
add_library (${HDF5_TEST_PLUGIN_TARGET} SHARED ${HDF5_TEST_SOURCE_DIR}/${plugin_name}.c)
- target_include_directories (${HDF5_TEST_PLUGIN_TARGET} PRIVATE "${HDF5_SRC_DIR};${HDF5_SRC_BINARY_DIR};$<$<BOOL:${HDF5_ENABLE_PARALLEL}>:${MPI_C_INCLUDE_DIRS}>")
+ target_include_directories (${HDF5_TEST_PLUGIN_TARGET} PRIVATE "${HDF5_SRC_INCLUDE_DIRS};${HDF5_SRC_BINARY_DIR};$<$<BOOL:${HDF5_ENABLE_PARALLEL}>:${MPI_C_INCLUDE_DIRS}>")
TARGET_C_PROPERTIES (${HDF5_TEST_PLUGIN_TARGET} SHARED)
target_link_libraries (${HDF5_TEST_PLUGIN_TARGET} PUBLIC ${HDF5_TEST_LIBSH_TARGET})
H5_SET_LIB_OPTIONS (${HDF5_TEST_PLUGIN_TARGET} ${HDF5_TEST_PLUGIN_NAME} SHARED "LIB")
@@ -185,7 +185,7 @@ if (BUILD_SHARED_LIBS)
set (HDF5_VFD_PLUGIN_LIB_TARGET ${HDF5_VFD_PLUGIN_LIB_CORENAME})
add_library (${HDF5_VFD_PLUGIN_LIB_TARGET} SHARED ${HDF5_TEST_SOURCE_DIR}/${vfd_lib}.c)
- target_include_directories (${HDF5_VFD_PLUGIN_LIB_TARGET} PRIVATE "${HDF5_SRC_DIR};${HDF5_SRC_BINARY_DIR};$<$<BOOL:${HDF5_ENABLE_PARALLEL}>:${MPI_C_INCLUDE_DIRS}>")
+ target_include_directories (${HDF5_VFD_PLUGIN_LIB_TARGET} PRIVATE "${HDF5_SRC_INCLUDE_DIRS};${HDF5_SRC_BINARY_DIR};$<$<BOOL:${HDF5_ENABLE_PARALLEL}>:${MPI_C_INCLUDE_DIRS}>")
TARGET_C_PROPERTIES (${HDF5_VFD_PLUGIN_LIB_TARGET} SHARED)
target_link_libraries (${HDF5_VFD_PLUGIN_LIB_TARGET} PUBLIC ${HDF5_TEST_LIBSH_TARGET})
H5_SET_LIB_OPTIONS (${HDF5_VFD_PLUGIN_LIB_TARGET} ${HDF5_VFD_PLUGIN_LIB_NAME} SHARED "LIB")
@@ -229,7 +229,7 @@ if (BUILD_SHARED_LIBS)
set (HDF5_VOL_PLUGIN_LIB_TARGET ${HDF5_VOL_PLUGIN_LIB_CORENAME})
add_library (${HDF5_VOL_PLUGIN_LIB_TARGET} SHARED ${HDF5_TEST_SOURCE_DIR}/${vol_lib}.c)
- target_include_directories (${HDF5_VOL_PLUGIN_LIB_TARGET} PRIVATE "${HDF5_SRC_DIR};${HDF5_SRC_BINARY_DIR};$<$<BOOL:${HDF5_ENABLE_PARALLEL}>:${MPI_C_INCLUDE_DIRS}>")
+ target_include_directories (${HDF5_VOL_PLUGIN_LIB_TARGET} PRIVATE "${HDF5_SRC_INCLUDE_DIRS};${HDF5_SRC_BINARY_DIR};$<$<BOOL:${HDF5_ENABLE_PARALLEL}>:${MPI_C_INCLUDE_DIRS}>")
TARGET_C_PROPERTIES (${HDF5_VOL_PLUGIN_LIB_TARGET} SHARED)
target_link_libraries (${HDF5_VOL_PLUGIN_LIB_TARGET} PUBLIC ${HDF5_TEST_LIBSH_TARGET})
H5_SET_LIB_OPTIONS (${HDF5_VOL_PLUGIN_LIB_TARGET} ${HDF5_VOL_PLUGIN_LIB_NAME} SHARED "LIB")
@@ -388,7 +388,7 @@ endif ()
macro (ADD_H5_EXE file)
add_executable (${file} ${HDF5_TEST_SOURCE_DIR}/${file}.c)
- target_include_directories (${file} PRIVATE "${HDF5_SRC_DIR};${HDF5_SRC_BINARY_DIR};${HDF5_TEST_BINARY_DIR};$<$<BOOL:${HDF5_ENABLE_PARALLEL}>:${MPI_C_INCLUDE_DIRS}>")
+ target_include_directories (${file} PRIVATE "${HDF5_SRC_INCLUDE_DIRS};${HDF5_SRC_BINARY_DIR};${HDF5_TEST_BINARY_DIR};$<$<BOOL:${HDF5_ENABLE_PARALLEL}>:${MPI_C_INCLUDE_DIRS}>")
target_compile_options(${file} PRIVATE "${HDF5_CMAKE_C_FLAGS}")
if (NOT BUILD_SHARED_LIBS)
TARGET_C_PROPERTIES (${file} STATIC)
@@ -430,7 +430,7 @@ endforeach ()
#-- Adding test for chunk_info
add_executable (chunk_info ${HDF5_TEST_SOURCE_DIR}/chunk_info.c)
target_compile_options(chunk_info PRIVATE "${HDF5_CMAKE_C_FLAGS}")
-target_include_directories (chunk_info PRIVATE "${HDF5_SRC_DIR};${HDF5_SRC_BINARY_DIR};${HDF5_TEST_BINARY_DIR};$<$<BOOL:${HDF5_ENABLE_PARALLEL}>:${MPI_C_INCLUDE_DIRS}>")
+target_include_directories (chunk_info PRIVATE "${HDF5_SRC_INCLUDE_DIRS};${HDF5_SRC_BINARY_DIR};${HDF5_TEST_BINARY_DIR};$<$<BOOL:${HDF5_ENABLE_PARALLEL}>:${MPI_C_INCLUDE_DIRS}>")
if (NOT BUILD_SHARED_LIBS)
TARGET_C_PROPERTIES (chunk_info STATIC)
target_link_libraries (chunk_info PRIVATE ${HDF5_TEST_LIB_TARGET} ${LINK_COMP_LIBS})
@@ -450,7 +450,7 @@ endif ()
#-- Adding test for direct_chunk
add_executable (direct_chunk ${HDF5_TEST_SOURCE_DIR}/direct_chunk.c)
target_compile_options(direct_chunk PRIVATE "${HDF5_CMAKE_C_FLAGS}")
-target_include_directories (direct_chunk PRIVATE "${HDF5_SRC_DIR};${HDF5_SRC_BINARY_DIR};${HDF5_TEST_BINARY_DIR};$<$<BOOL:${HDF5_ENABLE_PARALLEL}>:${MPI_C_INCLUDE_DIRS}>")
+target_include_directories (direct_chunk PRIVATE "${HDF5_SRC_INCLUDE_DIRS};${HDF5_SRC_BINARY_DIR};${HDF5_TEST_BINARY_DIR};$<$<BOOL:${HDF5_ENABLE_PARALLEL}>:${MPI_C_INCLUDE_DIRS}>")
if (NOT BUILD_SHARED_LIBS)
TARGET_C_PROPERTIES (direct_chunk STATIC)
target_link_libraries (direct_chunk PRIVATE ${HDF5_TEST_LIB_TARGET} ${LINK_COMP_LIBS})
@@ -471,7 +471,7 @@ endif ()
#-- Adding test for testhdf5
add_executable (testhdf5 ${testhdf5_SOURCES})
target_compile_options(testhdf5 PRIVATE "${HDF5_CMAKE_C_FLAGS}")
-target_include_directories (testhdf5 PRIVATE "${HDF5_SRC_DIR};${HDF5_SRC_BINARY_DIR};$<$<BOOL:${HDF5_ENABLE_PARALLEL}>:${MPI_C_INCLUDE_DIRS}>")
+target_include_directories (testhdf5 PRIVATE "${HDF5_SRC_INCLUDE_DIRS};${HDF5_SRC_BINARY_DIR};$<$<BOOL:${HDF5_ENABLE_PARALLEL}>:${MPI_C_INCLUDE_DIRS}>")
if (NOT BUILD_SHARED_LIBS)
TARGET_C_PROPERTIES (testhdf5 STATIC)
target_link_libraries (testhdf5 PRIVATE ${HDF5_TEST_LIB_TARGET})
@@ -491,7 +491,7 @@ endif ()
#-- Adding test for cache_image
add_executable (cache_image ${cache_image_SOURCES})
target_compile_options(cache_image PRIVATE "${HDF5_CMAKE_C_FLAGS}")
-target_include_directories (cache_image PRIVATE "${HDF5_SRC_DIR};${HDF5_SRC_BINARY_DIR};$<$<BOOL:${HDF5_ENABLE_PARALLEL}>:${MPI_C_INCLUDE_DIRS}>")
+target_include_directories (cache_image PRIVATE "${HDF5_SRC_INCLUDE_DIRS};${HDF5_SRC_BINARY_DIR};$<$<BOOL:${HDF5_ENABLE_PARALLEL}>:${MPI_C_INCLUDE_DIRS}>")
if (NOT BUILD_SHARED_LIBS)
TARGET_C_PROPERTIES (cache_image STATIC)
target_link_libraries (cache_image PRIVATE ${HDF5_TEST_LIB_TARGET})
@@ -511,7 +511,7 @@ endif ()
#-- Adding test for ttsafe
add_executable (ttsafe ${ttsafe_SOURCES})
target_compile_options(ttsafe PRIVATE "${HDF5_CMAKE_C_FLAGS}")
-target_include_directories (ttsafe PRIVATE "${HDF5_SRC_DIR};${HDF5_SRC_BINARY_DIR};$<$<BOOL:${HDF5_ENABLE_PARALLEL}>:${MPI_C_INCLUDE_DIRS}>")
+target_include_directories (ttsafe PRIVATE "${HDF5_SRC_INCLUDE_DIRS};${HDF5_SRC_BINARY_DIR};$<$<BOOL:${HDF5_ENABLE_PARALLEL}>:${MPI_C_INCLUDE_DIRS}>")
if (NOT BUILD_SHARED_LIBS)
TARGET_C_PROPERTIES (ttsafe STATIC)
target_link_libraries (ttsafe PRIVATE ${HDF5_TEST_LIB_TARGET})
@@ -537,7 +537,7 @@ endif ()
#-- Adding test for thread_id
add_executable (thread_id ${HDF5_TEST_SOURCE_DIR}/thread_id.c)
target_compile_options(thread_id PRIVATE "${HDF5_CMAKE_C_FLAGS}")
-target_include_directories (thread_id PRIVATE "${HDF5_SRC_DIR};${HDF5_SRC_BINARY_DIR};$<$<BOOL:${HDF5_ENABLE_PARALLEL}>:${MPI_C_INCLUDE_DIRS}>")
+target_include_directories (thread_id PRIVATE "${HDF5_SRC_INCLUDE_DIRS};${HDF5_SRC_BINARY_DIR};$<$<BOOL:${HDF5_ENABLE_PARALLEL}>:${MPI_C_INCLUDE_DIRS}>")
if (NOT BUILD_SHARED_LIBS)
TARGET_C_PROPERTIES (thread_id STATIC)
target_link_libraries (thread_id PRIVATE ${HDF5_TEST_LIB_TARGET})
@@ -562,7 +562,7 @@ endif ()
if (HDF5_BUILD_UTILS) # requires mirror server
#-- Adding test for mirror_vfd
add_executable (mirror_vfd ${mirror_vfd_SOURCES})
- target_include_directories (mirror_vfd PRIVATE "${HDF5_SRC_DIR};${HDF5_SRC_BINARY_DIR};$<$<BOOL:${HDF5_ENABLE_PARALLEL}>:${MPI_C_INCLUDE_DIRS}>")
+ target_include_directories (mirror_vfd PRIVATE "${HDF5_SRC_INCLUDE_DIRS};${HDF5_SRC_BINARY_DIR};$<$<BOOL:${HDF5_ENABLE_PARALLEL}>:${MPI_C_INCLUDE_DIRS}>")
if (NOT BUILD_SHARED_LIBS)
TARGET_C_PROPERTIES (mirror_vfd STATIC)
target_link_libraries (mirror_vfd PRIVATE ${HDF5_TEST_LIB_TARGET})
@@ -641,7 +641,7 @@ set (H5_VDS_SWMR_TESTS
macro (ADD_H5_VDS_EXE file)
add_executable (${file} ${HDF5_TEST_SOURCE_DIR}/${file}.c ${HDF5_TEST_SOURCE_DIR}/vds_swmr.h)
- target_include_directories (${file} PRIVATE "${HDF5_SRC_DIR};${HDF5_BINARY_DIR};${HDF5_TEST_BINARY_DIR};$<$<BOOL:${HDF5_ENABLE_PARALLEL}>:${MPI_C_INCLUDE_DIRS}>")
+ target_include_directories (${file} PRIVATE "${HDF5_SRC_INCLUDE_DIRS};${HDF5_BINARY_DIR};${HDF5_TEST_BINARY_DIR};$<$<BOOL:${HDF5_ENABLE_PARALLEL}>:${MPI_C_INCLUDE_DIRS}>")
target_compile_options(${file} PRIVATE "${HDF5_CMAKE_C_FLAGS}")
if (NOT BUILD_SHARED_LIBS)
TARGET_C_PROPERTIES (${file} STATIC)
@@ -669,7 +669,7 @@ endforeach ()
# and it can't be renamed (i.e., no <foo>-shared).
add_executable (accum_swmr_reader ${HDF5_TEST_SOURCE_DIR}/accum_swmr_reader.c)
target_compile_options(accum_swmr_reader PRIVATE "${HDF5_CMAKE_C_FLAGS}")
-target_include_directories (accum_swmr_reader PRIVATE "${HDF5_SRC_DIR};${HDF5_SRC_BINARY_DIR};$<$<BOOL:${HDF5_ENABLE_PARALLEL}>:${MPI_C_INCLUDE_DIRS}>")
+target_include_directories (accum_swmr_reader PRIVATE "${HDF5_SRC_INCLUDE_DIRS};${HDF5_SRC_BINARY_DIR};$<$<BOOL:${HDF5_ENABLE_PARALLEL}>:${MPI_C_INCLUDE_DIRS}>")
if (NOT BUILD_SHARED_LIBS)
TARGET_C_PROPERTIES (accum_swmr_reader STATIC)
target_link_libraries (accum_swmr_reader PRIVATE ${HDF5_TEST_LIB_TARGET} ${HDF5_LIB_TARGET})
@@ -694,7 +694,7 @@ set_target_properties (accum PROPERTIES DEPENDS accum_swmr_reader)
##############################################################################
if (BUILD_SHARED_LIBS)
add_executable (filter_plugin ${HDF5_TEST_SOURCE_DIR}/filter_plugin.c)
- target_include_directories (filter_plugin PRIVATE "${HDF5_SRC_DIR};${HDF5_SRC_BINARY_DIR};$<$<BOOL:${HDF5_ENABLE_PARALLEL}>:${MPI_C_INCLUDE_DIRS}>")
+ target_include_directories (filter_plugin PRIVATE "${HDF5_SRC_INCLUDE_DIRS};${HDF5_SRC_BINARY_DIR};$<$<BOOL:${HDF5_ENABLE_PARALLEL}>:${MPI_C_INCLUDE_DIRS}>")
TARGET_C_PROPERTIES (filter_plugin SHARED)
target_link_libraries (filter_plugin PRIVATE ${HDF5_TEST_LIBSH_TARGET})
set_target_properties (filter_plugin PROPERTIES FOLDER test)
@@ -707,7 +707,7 @@ if (BUILD_SHARED_LIBS)
endif ()
add_executable (vfd_plugin ${HDF5_TEST_SOURCE_DIR}/vfd_plugin.c)
- target_include_directories (vfd_plugin PRIVATE "${HDF5_SRC_DIR};${HDF5_SRC_BINARY_DIR};$<$<BOOL:${HDF5_ENABLE_PARALLEL}>:${MPI_C_INCLUDE_DIRS}>")
+ target_include_directories (vfd_plugin PRIVATE "${HDF5_SRC_INCLUDE_DIRS};${HDF5_SRC_BINARY_DIR};$<$<BOOL:${HDF5_ENABLE_PARALLEL}>:${MPI_C_INCLUDE_DIRS}>")
TARGET_C_PROPERTIES (vfd_plugin SHARED)
target_link_libraries (vfd_plugin PRIVATE ${HDF5_TEST_LIBSH_TARGET})
set_target_properties (vfd_plugin PROPERTIES FOLDER test)
@@ -720,7 +720,7 @@ if (BUILD_SHARED_LIBS)
endif ()
add_executable (vol_plugin ${HDF5_TEST_SOURCE_DIR}/vol_plugin.c)
- target_include_directories (vol_plugin PRIVATE "${HDF5_SRC_DIR};${HDF5_SRC_BINARY_DIR};$<$<BOOL:${HDF5_ENABLE_PARALLEL}>:${MPI_C_INCLUDE_DIRS}>")
+ target_include_directories (vol_plugin PRIVATE "${HDF5_SRC_INCLUDE_DIRS};${HDF5_SRC_BINARY_DIR};$<$<BOOL:${HDF5_ENABLE_PARALLEL}>:${MPI_C_INCLUDE_DIRS}>")
TARGET_C_PROPERTIES (vol_plugin SHARED)
target_link_libraries (vol_plugin PRIVATE ${HDF5_TEST_LIBSH_TARGET})
set_target_properties (vol_plugin PROPERTIES FOLDER test)
@@ -739,7 +739,7 @@ endif ()
set (use_append_chunk_SOURCES ${HDF5_TEST_SOURCE_DIR}/use_append_chunk.c ${HDF5_TEST_SOURCE_DIR}/use_common.c ${HDF5_TEST_SOURCE_DIR}/use.h)
add_executable (use_append_chunk ${use_append_chunk_SOURCES})
target_compile_options(use_append_chunk PRIVATE "${HDF5_CMAKE_C_FLAGS}")
-target_include_directories (use_append_chunk PRIVATE "${HDF5_SRC_DIR};${HDF5_SRC_BINARY_DIR};$<$<BOOL:${HDF5_ENABLE_PARALLEL}>:${MPI_C_INCLUDE_DIRS}>")
+target_include_directories (use_append_chunk PRIVATE "${HDF5_SRC_INCLUDE_DIRS};${HDF5_SRC_BINARY_DIR};$<$<BOOL:${HDF5_ENABLE_PARALLEL}>:${MPI_C_INCLUDE_DIRS}>")
if (NOT BUILD_SHARED_LIBS)
TARGET_C_PROPERTIES (use_append_chunk STATIC)
target_link_libraries (use_append_chunk PRIVATE ${HDF5_TEST_LIB_TARGET})
@@ -760,7 +760,7 @@ if (HDF5_BUILD_UTILS) # requires mirror server
set (use_append_chunk_mirror_SOURCES ${HDF5_TEST_SOURCE_DIR}/use_append_chunk_mirror.c ${HDF5_TEST_SOURCE_DIR}/use_common.c ${HDF5_TEST_SOURCE_DIR}/use.h)
add_executable (use_append_chunk_mirror ${use_append_chunk_mirror_SOURCES})
target_compile_options(use_append_chunk_mirror PRIVATE "${HDF5_CMAKE_C_FLAGS}")
- target_include_directories (use_append_chunk_mirror PRIVATE "${HDF5_SRC_DIR};${HDF5_BINARY_DIR};$<$<BOOL:${HDF5_ENABLE_PARALLEL}>:${MPI_C_INCLUDE_DIRS}>")
+ target_include_directories (use_append_chunk_mirror PRIVATE "${HDF5_SRC_INCLUDE_DIRS};${HDF5_BINARY_DIR};$<$<BOOL:${HDF5_ENABLE_PARALLEL}>:${MPI_C_INCLUDE_DIRS}>")
if (NOT BUILD_SHARED_LIBS)
TARGET_C_PROPERTIES (use_append_chunk_mirror STATIC)
target_link_libraries (use_append_chunk_mirror PRIVATE ${HDF5_TEST_LIB_TARGET})
@@ -781,7 +781,7 @@ endif ()
set (use_append_mchunks_SOURCES ${HDF5_TEST_SOURCE_DIR}/use_append_mchunks.c ${HDF5_TEST_SOURCE_DIR}/use_common.c ${HDF5_TEST_SOURCE_DIR}/use.h)
add_executable (use_append_mchunks ${use_append_mchunks_SOURCES})
target_compile_options(use_append_mchunks PRIVATE "${HDF5_CMAKE_C_FLAGS}")
-target_include_directories (use_append_mchunks PRIVATE "${HDF5_SRC_DIR};${HDF5_SRC_BINARY_DIR};$<$<BOOL:${HDF5_ENABLE_PARALLEL}>:${MPI_C_INCLUDE_DIRS}>")
+target_include_directories (use_append_mchunks PRIVATE "${HDF5_SRC_INCLUDE_DIRS};${HDF5_SRC_BINARY_DIR};$<$<BOOL:${HDF5_ENABLE_PARALLEL}>:${MPI_C_INCLUDE_DIRS}>")
if (NOT BUILD_SHARED_LIBS)
TARGET_C_PROPERTIES (use_append_mchunks STATIC)
target_link_libraries (use_append_mchunks PRIVATE ${HDF5_TEST_LIB_TARGET})
@@ -801,7 +801,7 @@ endif ()
set (use_disable_mdc_flushes_SOURCES ${HDF5_TEST_SOURCE_DIR}/use_disable_mdc_flushes.c)
add_executable (use_disable_mdc_flushes ${use_disable_mdc_flushes_SOURCES})
target_compile_options(use_disable_mdc_flushes PRIVATE "${HDF5_CMAKE_C_FLAGS}")
-target_include_directories (use_disable_mdc_flushes PRIVATE "${HDF5_SRC_DIR};${HDF5_SRC_BINARY_DIR};$<$<BOOL:${HDF5_ENABLE_PARALLEL}>:${MPI_C_INCLUDE_DIRS}>")
+target_include_directories (use_disable_mdc_flushes PRIVATE "${HDF5_SRC_INCLUDE_DIRS};${HDF5_SRC_BINARY_DIR};$<$<BOOL:${HDF5_ENABLE_PARALLEL}>:${MPI_C_INCLUDE_DIRS}>")
if (NOT BUILD_SHARED_LIBS)
TARGET_C_PROPERTIES (use_disable_mdc_flushes STATIC)
target_link_libraries (use_disable_mdc_flushes PRIVATE ${HDF5_TEST_LIB_TARGET})
diff --git a/test/CMakeTests.cmake b/test/CMakeTests.cmake
index 72f7a8d..a0a0b01 100644
--- a/test/CMakeTests.cmake
+++ b/test/CMakeTests.cmake
@@ -945,7 +945,7 @@ endif ()
if (HDF5_BUILD_GENERATORS AND NOT ONLY_SHARED_LIBS)
macro (ADD_H5_GENERATOR genfile)
add_executable (${genfile} ${HDF5_TEST_SOURCE_DIR}/${genfile}.c)
- target_include_directories (${genfile} PRIVATE "${HDF5_SRC_DIR};${HDF5_SRC_BINARY_DIR};$<$<BOOL:${HDF5_ENABLE_PARALLEL}>:${MPI_C_INCLUDE_DIRS}>")
+ target_include_directories (${genfile} PRIVATE "${HDF5_SRC_INCLUDE_DIRS};${HDF5_SRC_BINARY_DIR};$<$<BOOL:${HDF5_ENABLE_PARALLEL}>:${MPI_C_INCLUDE_DIRS}>")
TARGET_C_PROPERTIES (${genfile} STATIC)
target_link_libraries (${genfile} PRIVATE ${HDF5_TEST_LIB_TARGET} ${HDF5_LIB_TARGET})
set_target_properties (${genfile} PROPERTIES FOLDER generator/test)
diff --git a/test/CMakeVFDTests.cmake b/test/CMakeVFDTests.cmake
index b371753..7648166 100644
--- a/test/CMakeVFDTests.cmake
+++ b/test/CMakeVFDTests.cmake
@@ -72,6 +72,35 @@ add_custom_target(HDF5_VFDTEST_LIB_files ALL COMMENT "Copying files needed by HD
external_env
vds_env
)
+
+ # Skip several tests with subfiling VFD, mostly due
+ # to no support for collective I/O
+ set (H5_VFD_subfiling_SKIP_TESTS
+ cache_api
+ chunk_info
+ cmpd_dset
+ cork
+ dangle
+ direct_chunk
+ dsets
+ dt_arith
+ dtransform
+ extend
+ fillval
+ filter_fail
+ istore
+ links
+ mf
+ objcopy
+ objcopy_ref
+ ohdr
+ set_extent
+ testhdf5
+ unlink
+ unregister
+ vol
+ )
+
if (NOT CYGWIN)
list (REMOVE_ITEM H5_VFD_SKIP_TESTS big cache)
endif ()
@@ -138,21 +167,23 @@ add_custom_target(HDF5_VFDTEST_LIB_files ALL COMMENT "Copying files needed by HD
endmacro ()
macro (DO_VFD_TEST vfdtest vfdname resultcode)
- add_test (NAME VFD-${vfdname}-${vfdtest}
- COMMAND "${CMAKE_COMMAND}"
- -D "TEST_EMULATOR=${CMAKE_CROSSCOMPILING_EMULATOR}"
- -D "TEST_PROGRAM=$<TARGET_FILE:${vfdtest}>"
- -D "TEST_ARGS:STRING="
- -D "TEST_VFD:STRING=${vfdname}"
- -D "TEST_EXPECT=${resultcode}"
- -D "TEST_OUTPUT=${vfdname}-${vfdtest}.out"
- -D "TEST_FOLDER=${PROJECT_BINARY_DIR}/${vfdname}"
- -P "${HDF_RESOURCES_DIR}/vfdTest.cmake"
- )
- set_tests_properties (VFD-${vfdname}-${vfdtest} PROPERTIES
- ENVIRONMENT "srcdir=${HDF5_TEST_BINARY_DIR}/${vfdname}"
- WORKING_DIRECTORY ${HDF5_TEST_BINARY_DIR}/${vfdname}
- )
+ if (NOT "${vfdtest}" IN_LIST H5_VFD_${vfdname}_SKIP_TESTS)
+ add_test (NAME VFD-${vfdname}-${vfdtest}
+ COMMAND "${CMAKE_COMMAND}"
+ -D "TEST_EMULATOR=${CMAKE_CROSSCOMPILING_EMULATOR}"
+ -D "TEST_PROGRAM=$<TARGET_FILE:${vfdtest}>"
+ -D "TEST_ARGS:STRING="
+ -D "TEST_VFD:STRING=${vfdname}"
+ -D "TEST_EXPECT=${resultcode}"
+ -D "TEST_OUTPUT=${vfdname}-${vfdtest}.out"
+ -D "TEST_FOLDER=${PROJECT_BINARY_DIR}/${vfdname}"
+ -P "${HDF_RESOURCES_DIR}/vfdTest.cmake"
+ )
+ set_tests_properties (VFD-${vfdname}-${vfdtest} PROPERTIES
+ ENVIRONMENT "srcdir=${HDF5_TEST_BINARY_DIR}/${vfdname}"
+ WORKING_DIRECTORY ${HDF5_TEST_BINARY_DIR}/${vfdname}
+ )
+ endif ()
endmacro ()
macro (ADD_VFD_TEST vfdname resultcode)
@@ -165,10 +196,18 @@ add_custom_target(HDF5_VFDTEST_LIB_files ALL COMMENT "Copying files needed by HD
endif ()
endif ()
endforeach ()
- set_tests_properties (VFD-${vfdname}-flush2 PROPERTIES DEPENDS VFD-${vfdname}-flush1)
- set_tests_properties (VFD-${vfdname}-flush1 PROPERTIES TIMEOUT 10)
- set_tests_properties (VFD-${vfdname}-flush2 PROPERTIES TIMEOUT 10)
- set_tests_properties (VFD-${vfdname}-istore PROPERTIES TIMEOUT ${CTEST_VERY_LONG_TIMEOUT})
+ if (NOT "flush2" IN_LIST H5_VFD_${vfdname}_SKIP_TESTS)
+ if (NOT "flush1" IN_LIST H5_VFD_${vfdname}_SKIP_TESTS)
+ set_tests_properties (VFD-${vfdname}-flush2 PROPERTIES DEPENDS VFD-${vfdname}-flush1)
+ endif ()
+ set_tests_properties (VFD-${vfdname}-flush2 PROPERTIES TIMEOUT 10)
+ endif ()
+ if (NOT "flush1" IN_LIST H5_VFD_${vfdname}_SKIP_TESTS)
+ set_tests_properties (VFD-${vfdname}-flush1 PROPERTIES TIMEOUT 10)
+ endif ()
+ if (NOT "istore" IN_LIST H5_VFD_${vfdname}_SKIP_TESTS)
+ set_tests_properties (VFD-${vfdname}-istore PROPERTIES TIMEOUT ${CTEST_VERY_LONG_TIMEOUT})
+ endif ()
if (NOT CYGWIN)
set_tests_properties (VFD-${vfdname}-cache PROPERTIES TIMEOUT ${CTEST_VERY_LONG_TIMEOUT})
endif ()
diff --git a/test/cross_read.c b/test/cross_read.c
index 85845e0..7b3a214 100644
--- a/test/cross_read.c
+++ b/test/cross_read.c
@@ -354,15 +354,20 @@ error:
int
main(void)
{
- char filename[1024];
- int nerrors = 0;
+ hbool_t driver_is_default_compatible;
+ char filename[1024];
+ int nerrors = 0;
h5_reset();
/*
- * Skip tests for VFDs that need modified filenames.
+ * Skip tests for VFDs that aren't compatible with default VFD.
*/
- if (h5_driver_uses_modified_filename()) {
+ if (h5_driver_is_default_vfd_compatible(H5P_DEFAULT, &driver_is_default_compatible) < 0) {
+ HDputs(" -- couldn't check if VFD is compatible with default VFD --");
+ HDexit(EXIT_SUCCESS);
+ }
+ if (!driver_is_default_compatible) {
HDputs(" -- SKIPPED for incompatible VFD --");
HDexit(EXIT_SUCCESS);
}
diff --git a/test/dsets.c b/test/dsets.c
index c1ac3ec..91f6315 100644
--- a/test/dsets.c
+++ b/test/dsets.c
@@ -15585,7 +15585,7 @@ main(void)
int nerrors = 0;
const char *envval;
hbool_t contig_addr_vfd; /* Whether VFD used has a contiguous address space */
- hbool_t driver_uses_modified_filename = h5_driver_uses_modified_filename();
+ hbool_t driver_is_default_compatible;
int i;
/* Don't run this test using certain file drivers */
@@ -15636,6 +15636,9 @@ main(void)
h5_reset();
fapl = h5_fileaccess();
+ if (h5_driver_is_default_vfd_compatible(fapl, &driver_is_default_compatible) < 0)
+ TEST_ERROR;
+
/* Turn off the chunk cache, so all the chunks are immediately written to disk */
if (H5Pget_cache(fapl, &mdc_nelmts, &rdcc_nelmts, &rdcc_nbytes, &rdcc_w0) < 0)
goto error;
@@ -15747,7 +15750,7 @@ main(void)
nerrors += (test_types(file) < 0 ? 1 : 0);
nerrors += (test_userblock_offset(envval, my_fapl, new_format) < 0 ? 1 : 0);
- if (!driver_uses_modified_filename) {
+ if (driver_is_default_compatible) {
nerrors += (test_missing_filter(file) < 0 ? 1 : 0);
}
@@ -15760,7 +15763,7 @@ main(void)
nerrors += (test_copy_dcpl(file, my_fapl) < 0 ? 1 : 0);
nerrors += (test_filter_delete(file) < 0 ? 1 : 0);
- if (!driver_uses_modified_filename) {
+ if (driver_is_default_compatible) {
nerrors += (test_filters_endianess() < 0 ? 1 : 0);
}
@@ -15782,7 +15785,7 @@ main(void)
nerrors += (test_layout_extend(my_fapl) < 0 ? 1 : 0);
nerrors += (test_fixed_array(my_fapl) < 0 ? 1 : 0);
- if (!driver_uses_modified_filename) {
+ if (driver_is_default_compatible) {
nerrors += (test_idx_compatible() < 0 ? 1 : 0);
}
@@ -15819,7 +15822,7 @@ main(void)
nerrors += (test_gather_error() < 0 ? 1 : 0);
/* Tests version bounds using its own file */
- if (!driver_uses_modified_filename) {
+ if (driver_is_default_compatible) {
nerrors += (test_versionbounds() < 0 ? 1 : 0);
}
diff --git a/test/dtypes.c b/test/dtypes.c
index f322d03..4aebed8 100644
--- a/test/dtypes.c
+++ b/test/dtypes.c
@@ -3661,6 +3661,7 @@ test_compound_18(void)
hsize_t dim = 1;
const char *testfile = H5_get_srcdir_filename(TESTFILE); /* Corrected test file name */
char filename[1024];
+ hbool_t driver_is_default_compatible;
herr_t ret;
TESTING("accessing objects with compound datatypes that have no fields");
@@ -3725,7 +3726,10 @@ test_compound_18(void)
if (H5Fclose(file) < 0)
FAIL_STACK_ERROR;
- if (!h5_driver_uses_modified_filename()) {
+ if (h5_driver_is_default_vfd_compatible(H5P_DEFAULT, &driver_is_default_compatible) < 0)
+ FAIL_PUTS_ERROR("can't check if VFD is default VFD compatible");
+
+ if (driver_is_default_compatible) {
/* Open Generated File */
/* (generated with gen_bad_compound.c) */
if ((file = H5Fopen(testfile, H5F_ACC_RDONLY, H5P_DEFAULT)) < 0)
@@ -8782,8 +8786,9 @@ error:
int
main(void)
{
- long nerrors = 0;
- hid_t fapl = H5I_INVALID_HID;
+ hbool_t driver_is_parallel;
+ long nerrors = 0;
+ hid_t fapl = H5I_INVALID_HID;
/* Set the random # seed */
HDsrandom((unsigned)HDtime(NULL));
@@ -8791,6 +8796,11 @@ main(void)
reset_hdf5();
fapl = h5_fileaccess();
+ if (h5_using_parallel_driver(fapl, &driver_is_parallel) < 0) {
+ HDprintf("Can't check if driver is parallel-enabled\n");
+ HDexit(EXIT_FAILURE);
+ }
+
if (ALIGNMENT)
HDprintf("Testing non-aligned conversions (ALIGNMENT=%d)....\n", ALIGNMENT);
@@ -8827,12 +8837,20 @@ main(void)
nerrors += test_compound_6();
nerrors += test_compound_7();
nerrors += test_compound_8();
- nerrors += test_compound_9();
- nerrors += test_compound_10();
+
+ if (!driver_is_parallel) {
+ nerrors += test_compound_9();
+ nerrors += test_compound_10();
+ }
+
nerrors += test_compound_11();
nerrors += test_compound_12();
nerrors += test_compound_13();
- nerrors += test_compound_14();
+
+ if (!driver_is_parallel) {
+ nerrors += test_compound_14();
+ }
+
nerrors += test_compound_15();
nerrors += test_compound_16();
nerrors += test_compound_17();
@@ -8843,7 +8861,11 @@ main(void)
nerrors += test_bitfield_funcs();
nerrors += test_opaque();
nerrors += test_set_order();
- nerrors += test_utf_ascii_conv();
+
+ if (!driver_is_parallel) {
+ nerrors += test_utf_ascii_conv();
+ }
+
nerrors += test_versionbounds();
if (nerrors) {
diff --git a/test/file_image.c b/test/file_image.c
index 45a2fa9..1ac39c3 100644
--- a/test/file_image.c
+++ b/test/file_image.c
@@ -1353,6 +1353,7 @@ main(void)
{
int errors = 0;
hid_t fapl;
+ hbool_t driver_is_default_compatible;
unsigned user;
h5_reset();
@@ -1362,7 +1363,9 @@ main(void)
errors += test_properties();
errors += test_callbacks();
- if (!h5_driver_uses_modified_filename()) {
+ if (h5_driver_is_default_vfd_compatible(H5P_DEFAULT, &driver_is_default_compatible) < 0)
+ errors++;
+ else if (driver_is_default_compatible) {
errors += test_core();
}
diff --git a/test/fillval.c b/test/fillval.c
index 9c2e2a3..e5a2133 100644
--- a/test/fillval.c
+++ b/test/fillval.c
@@ -2663,6 +2663,7 @@ main(int argc, char *argv[])
int nerrors = 0, argno, test_contig = 1, test_chunk = 1, test_compact = 1;
hid_t fapl = (-1), fapl2 = (-1); /* File access property lists */
unsigned new_format; /* Whether to use the new format or not */
+ hbool_t driver_is_default_compatible;
if (argc >= 2) {
test_contig = test_chunk = test_compact = 0;
@@ -2683,6 +2684,9 @@ main(int argc, char *argv[])
h5_reset();
fapl = h5_fileaccess();
+ if (h5_driver_is_default_vfd_compatible(fapl, &driver_is_default_compatible) < 0)
+ TEST_ERROR;
+
/* Property list tests */
nerrors += test_getset();
nerrors += test_getset_vl(fapl);
@@ -2723,7 +2727,7 @@ main(int argc, char *argv[])
nerrors += test_rdwr(my_fapl, FILENAME[3], H5D_CONTIGUOUS);
nerrors += test_extend(my_fapl, FILENAME[5], H5D_CONTIGUOUS);
- if (!h5_driver_uses_modified_filename()) {
+ if (driver_is_default_compatible) {
nerrors += test_compatible();
}
} /* end if */
diff --git a/test/flush2.c b/test/flush2.c
index 6965cef..99cad14 100644
--- a/test/flush2.c
+++ b/test/flush2.c
@@ -245,6 +245,7 @@ main(void)
char filename[1024]; /* filename */
hbool_t check_second_dset; /* whether or not to check the second dset */
H5E_auto2_t func; /* for shutting off error reporting */
+ hbool_t driver_is_default_vfd_compatible;
h5_reset();
if ((fapl_id = h5_fileaccess()) < 0)
@@ -254,6 +255,16 @@ main(void)
driver = HDgetenv(HDF5_DRIVER);
vfd_supports_swmr = H5FD__supports_swmr_test(driver);
+ if (h5_driver_is_default_vfd_compatible(fapl_id, &driver_is_default_vfd_compatible) < 0) {
+ HDprintf("Can't check if VFD is compatible with default VFD\n");
+ HDexit(EXIT_FAILURE);
+ }
+
+ if (!driver_is_default_vfd_compatible) {
+ HDprintf("Skipping SWMR tests for VFD incompatible with default VFD\n");
+ HDexit(EXIT_SUCCESS);
+ }
+
/* TEST 1 */
/* Check the case where the file was flushed */
TESTING("H5Fflush (part2 with flush)");
diff --git a/test/getname.c b/test/getname.c
index 877e567..c7d822e 100644
--- a/test/getname.c
+++ b/test/getname.c
@@ -3757,16 +3757,20 @@ error:
int
main(void)
{
- hid_t file_id = (-1);
- int nerrors = 0;
- hid_t fapl;
- char filename0[1024];
+ hid_t file_id = (-1);
+ int nerrors = 0;
+ hid_t fapl;
+ char filename0[1024];
+ hbool_t driver_is_parallel;
/* Reset the library and get the file access property list */
h5_reset();
fapl = h5_fileaccess();
h5_fixname(FILENAME[0], fapl, filename0, sizeof filename0);
+ if (h5_using_parallel_driver(fapl, &driver_is_parallel) < 0)
+ TEST_ERROR;
+
/* Create a new file_id using default create property but vfd access
* property.
*/
@@ -3776,7 +3780,7 @@ main(void)
/* Call "main" test routine */
nerrors += test_main(file_id, fapl);
- if (!h5_using_parallel_driver(NULL)) {
+ if (!driver_is_parallel) {
nerrors += test_obj_ref(fapl);
nerrors += test_reg_ref(fapl);
}
diff --git a/test/h5test.c b/test/h5test.c
index 8ec6047..31d85b1 100644
--- a/test/h5test.c
+++ b/test/h5test.c
@@ -1280,6 +1280,22 @@ h5_get_file_size(const char *filename, hid_t fapl)
/* Return total size */
return (tot_size);
} /* end if */
+ else if (driver == H5FD_SUBFILING) {
+ hsize_t size;
+ hid_t fid = H5I_INVALID_HID;
+
+ if ((fid = H5Fopen(filename, H5F_ACC_RDONLY, fapl)) < 0)
+ return -1;
+ if (H5Fget_filesize(fid, &size) < 0) {
+ H5Fclose(fid);
+ return -1;
+ }
+
+ if (H5Fclose(fid) < 0)
+ return -1;
+
+ return (h5_stat_size_t)size;
+ }
else {
/* Get the file's statistics */
if (0 == HDstat(filename, &sb))
@@ -2209,9 +2225,8 @@ h5_using_default_driver(const char *drv_name)
/*-------------------------------------------------------------------------
* Function: h5_using_parallel_driver
*
- * Purpose: Checks if the specified VFD name matches a parallel-enabled
- * VFD (usually `mpio`). If `drv_name` is NULL, the
- * HDF5_DRIVER environment is checked instead (if it is set).
+ * Purpose: Checks if the current VFD set on the given FAPL is a
+ * parallel-enabled VFD (The MPI I/O VFD, for example).
*
* This is mostly useful for avoiding tests that use features
* which are not currently supported for parallel HDF5, such
@@ -2221,51 +2236,72 @@ h5_using_default_driver(const char *drv_name)
*
*-------------------------------------------------------------------------
*/
-hbool_t
-h5_using_parallel_driver(const char *drv_name)
+herr_t
+h5_using_parallel_driver(hid_t fapl_id, hbool_t *driver_is_parallel)
{
- hbool_t ret_val = FALSE;
+ unsigned long feat_flags = 0;
+ hid_t driver_id = H5I_INVALID_HID;
+ herr_t ret_value = SUCCEED;
- if (!drv_name)
- drv_name = HDgetenv(HDF5_DRIVER);
+ HDassert(fapl_id >= 0);
+ HDassert(driver_is_parallel);
- if (drv_name)
- return (!HDstrcmp(drv_name, "mpio"));
+ if (fapl_id == H5P_DEFAULT)
+ fapl_id = H5P_FILE_ACCESS_DEFAULT;
- return ret_val;
+ if ((driver_id = H5Pget_driver(fapl_id)) < 0)
+ return FAIL;
+
+ if (H5FDdriver_query(driver_id, &feat_flags) < 0)
+ return FAIL;
+
+ *driver_is_parallel = (feat_flags & H5FD_FEAT_HAS_MPI);
+
+ return ret_value;
}
/*-------------------------------------------------------------------------
- * Function: h5_driver_uses_modified_filename
+ * Function: h5_driver_is_default_vfd_compatible
*
- * Purpose: Checks if the current VFD set by use of the HDF5_DRIVER
- * environment variable uses a modified filename. Examples
- * are the multi and family drivers.
+ * Purpose: Checks if the current VFD set on the given FAPL creates a
+ * file that is compatible with the default VFD. Some examples
+ * are the core and MPI I/O drivers. Some counterexamples are
+ * the multi and family drivers, which split the HDF5 file
+ * into several different files.
*
* This routine is helpful for skipping tests that use
- * pre-generated files. VFDs that use a modified filename will
- * not be able to find these files and those tests will fail.
- * Eventually, HDF5's testing framework should be modified to
- * not run VFD testing against tests that use pre-generated
- * files.
+ * pre-generated files. VFDs that create files which aren't
+ * compatible with the default VFD will generally not be able
+ * to open these pre-generated files and those particular
+ * tests will fail.
*
- * Return: TRUE/FALSE
+ * Return: Non-negative on success/Negative on failure
*
*-------------------------------------------------------------------------
*/
-hbool_t
-h5_driver_uses_modified_filename(void)
+herr_t
+h5_driver_is_default_vfd_compatible(hid_t fapl_id, hbool_t *default_vfd_compatible)
{
- hbool_t ret_val = FALSE;
- char * driver = HDgetenv(HDF5_DRIVER);
+ unsigned long feat_flags = 0;
+ hid_t driver_id = H5I_INVALID_HID;
+ herr_t ret_value = SUCCEED;
- if (driver) {
- ret_val = !HDstrcmp(driver, "multi") || !HDstrcmp(driver, "split") || !HDstrcmp(driver, "family") ||
- !HDstrcmp(driver, "splitter");
- }
+ HDassert(fapl_id >= 0);
+ HDassert(default_vfd_compatible);
- return ret_val;
-} /* end h5_driver_uses_modified_filename() */
+ if (fapl_id == H5P_DEFAULT)
+ fapl_id = H5P_FILE_ACCESS_DEFAULT;
+
+ if ((driver_id = H5Pget_driver(fapl_id)) < 0)
+ return FAIL;
+
+ if (H5FDdriver_query(driver_id, &feat_flags) < 0)
+ return FAIL;
+
+ *default_vfd_compatible = (feat_flags & H5FD_FEAT_DEFAULT_VFD_COMPATIBLE);
+
+ return ret_value;
+} /* end h5_driver_is_default_vfd_compatible() */
/*-------------------------------------------------------------------------
* Function: h5_driver_uses_multiple_files
@@ -2286,6 +2322,9 @@ h5_driver_uses_modified_filename(void)
* separate logical files. The splitter driver is an example
* of this type of driver.
*
+ * Eventually, this should become a VFD feature flag so this
+ * check is less fragile.
+ *
* Return: TRUE/FALSE
*
*-------------------------------------------------------------------------
@@ -2300,7 +2339,8 @@ h5_driver_uses_multiple_files(const char *drv_name, unsigned flags)
if (drv_name) {
if ((flags & H5_EXCLUDE_MULTIPART_DRIVERS) == 0) {
- if (!HDstrcmp(drv_name, "split") || !HDstrcmp(drv_name, "multi") || !HDstrcmp(drv_name, "family"))
+ if (!HDstrcmp(drv_name, "split") || !HDstrcmp(drv_name, "multi") ||
+ !HDstrcmp(drv_name, "family") || !HDstrcmp(drv_name, H5FD_SUBFILING_NAME))
return TRUE;
}
diff --git a/test/h5test.h b/test/h5test.h
index 052f6b5..3d18a2b 100644
--- a/test/h5test.h
+++ b/test/h5test.h
@@ -230,8 +230,8 @@ H5TEST_DLL int h5_compare_file_bytes(char *fname1, char *fname2);
H5TEST_DLL int h5_duplicate_file_by_bytes(const char *orig, const char *dest);
H5TEST_DLL herr_t h5_check_if_file_locking_enabled(hbool_t *are_enabled);
H5TEST_DLL hbool_t h5_using_default_driver(const char *drv_name);
-H5TEST_DLL hbool_t h5_using_parallel_driver(const char *drv_name);
-H5TEST_DLL hbool_t h5_driver_uses_modified_filename(void);
+H5TEST_DLL herr_t h5_using_parallel_driver(hid_t fapl_id, hbool_t *driver_is_parallel);
+H5TEST_DLL herr_t h5_driver_is_default_vfd_compatible(hid_t fapl_id, hbool_t *default_vfd_compatible);
H5TEST_DLL hbool_t h5_driver_uses_multiple_files(const char *drv_name, unsigned flags);
/* Functions that will replace components of a FAPL */
diff --git a/test/lheap.c b/test/lheap.c
index c9c6ca9..a6821db 100644
--- a/test/lheap.c
+++ b/test/lheap.c
@@ -59,6 +59,7 @@ main(void)
char buf[1024]; /* the value to store */
const char *s; /* value to read */
hbool_t api_ctx_pushed = FALSE; /* Whether API context pushed */
+ hbool_t driver_is_default_compatible;
/* Reset library */
h5_reset();
@@ -174,7 +175,10 @@ main(void)
goto error;
PASSED();
- if (!h5_driver_uses_modified_filename()) {
+ if (h5_driver_is_default_vfd_compatible(H5P_DEFAULT, &driver_is_default_compatible) < 0)
+ TEST_ERROR;
+
+ if (driver_is_default_compatible) {
/* Check opening existing file non-default sizes of lengths and addresses */
TESTING("opening pre-created file with non-default sizes");
{
diff --git a/test/links.c b/test/links.c
index b87b998..dbfd1ef 100644
--- a/test/links.c
+++ b/test/links.c
@@ -9896,11 +9896,12 @@ external_set_elink_cb(hid_t fapl, hbool_t new_format)
/* Family file driver cannot be used with family or multi drivers for member files */
/* Also disable parallel member drivers, because H5F_HAS_FEATURE(H5FD_FEAT_HAS_MPI)
would report FALSE, causing problems */
- base_driver = H5Pget_driver(fapl);
- op_data.base_fapl = (base_driver == H5FD_FAMILY || base_driver == H5FD_MULTI ||
- base_driver == H5FD_MPIO || base_driver == H5FD_CORE || base_driver == H5FD_DIRECT)
- ? H5P_DEFAULT
- : fapl;
+ base_driver = H5Pget_driver(fapl);
+ op_data.base_fapl =
+ (base_driver == H5FD_FAMILY || base_driver == H5FD_MULTI || base_driver == H5FD_MPIO ||
+ base_driver == H5FD_CORE || base_driver == H5FD_DIRECT || base_driver == H5FD_SUBFILING)
+ ? H5P_DEFAULT
+ : fapl;
op_data.fam_size = ELINK_CB_FAM_SIZE;
op_data.code = 0;
@@ -22554,7 +22555,7 @@ main(void)
unsigned minimize_dset_oh;
unsigned efc; /* Whether to use the external file cache */
const char *env_h5_drvr; /* File Driver value from environment */
- hbool_t driver_uses_modified_filename = h5_driver_uses_modified_filename();
+ hbool_t driver_is_default_compatible;
env_h5_drvr = HDgetenv(HDF5_DRIVER);
if (env_h5_drvr == NULL)
@@ -22563,6 +22564,9 @@ main(void)
h5_reset();
fapl = h5_fileaccess();
+ if (h5_driver_is_default_vfd_compatible(fapl, &driver_is_default_compatible) < 0)
+ TEST_ERROR;
+
/* fapl2 uses "latest version bounds" */
if ((fapl2 = H5Pcopy(fapl)) < 0)
TEST_ERROR;
@@ -22676,7 +22680,7 @@ main(void)
nerrors += external_link_closing_deprec(my_fapl, new_format) < 0 ? 1 : 0;
#endif /* H5_NO_DEPRECATED_SYMBOLS */
- if (!driver_uses_modified_filename) {
+ if (driver_is_default_compatible) {
nerrors += external_link_endian(new_format) < 0 ? 1 : 0;
}
@@ -22691,7 +22695,7 @@ main(void)
nerrors += external_link_reltar(my_fapl, new_format) < 0 ? 1 : 0;
nerrors += external_link_chdir(my_fapl, new_format) < 0 ? 1 : 0;
- if (!driver_uses_modified_filename) {
+ if (driver_is_default_compatible) {
nerrors += external_set_elink_fapl1(my_fapl, new_format) < 0 ? 1 : 0;
}
diff --git a/test/mf.c b/test/mf.c
index bed92e3..04ef59a 100644
--- a/test/mf.c
+++ b/test/mf.c
@@ -875,8 +875,7 @@ test_mf_tmp(const char *env_h5_drvr, hid_t fapl, hbool_t new_format)
TESTING("'temporary' file space allocation with old library format");
/* Can't run this test with multi-file VFDs */
- if (HDstrcmp(env_h5_drvr, "split") != 0 && HDstrcmp(env_h5_drvr, "multi") != 0 &&
- HDstrcmp(env_h5_drvr, "family") != 0) {
+ if (!h5_driver_uses_multiple_files(env_h5_drvr, 0)) {
char filename[FILENAME_LEN]; /* Filename to use */
H5F_t * f = NULL; /* Internal file object pointer */
h5_stat_size_t file_size, new_file_size; /* file size */
diff --git a/test/mtime.c b/test/mtime.c
index a7e01c2..0d56d15 100644
--- a/test/mtime.c
+++ b/test/mtime.c
@@ -60,13 +60,16 @@ main(void)
signed char buf1[32], buf2[32];
char filename[1024];
int token_cmp;
- hbool_t driver_uses_modified_filename = h5_driver_uses_modified_filename();
+ hbool_t driver_is_default_compatible;
h5_reset();
fapl = h5_fileaccess();
TESTING("modification time messages");
+ if (h5_driver_is_default_vfd_compatible(fapl, &driver_is_default_compatible) < 0)
+ TEST_ERROR;
+
/* Create the file, create a dataset, then close the file */
h5_fixname(FILENAME[0], fapl, filename, sizeof filename);
if ((file = H5Fcreate(filename, H5F_ACC_TRUNC, H5P_DEFAULT, fapl)) < 0)
@@ -132,7 +135,7 @@ main(void)
}
PASSED();
- if (!driver_uses_modified_filename) {
+ if (driver_is_default_compatible) {
/* Check opening existing file with old-style modification time information
* and make certain that the time is correct
*/
@@ -164,7 +167,7 @@ main(void)
PASSED();
}
- if (!driver_uses_modified_filename) {
+ if (driver_is_default_compatible) {
/* Check opening existing file with new-style modification time information
* and make certain that the time is correct
*/
diff --git a/test/ntypes.c b/test/ntypes.c
index 318fe2f..4a42f16 100644
--- a/test/ntypes.c
+++ b/test/ntypes.c
@@ -3153,9 +3153,10 @@ error:
int
main(void)
{
- hid_t file, fapl;
- int nerrors = 0;
- char filename[1024];
+ hid_t file, fapl;
+ int nerrors = 0;
+ char filename[1024];
+ hbool_t driver_is_parallel;
h5_reset();
fapl = h5_fileaccess();
@@ -3164,6 +3165,9 @@ main(void)
if ((file = H5Fcreate(filename, H5F_ACC_TRUNC, H5P_DEFAULT, fapl)) < 0)
goto error;
+ if (h5_using_parallel_driver(fapl, &driver_is_parallel) < 0)
+ goto error;
+
nerrors += test_atomic_dtype(file) < 0 ? 1 : 0;
nerrors += test_compound_dtype(file) < 0 ? 1 : 0;
nerrors += test_compound_dtype2(file) < 0 ? 1 : 0;
@@ -3173,14 +3177,14 @@ main(void)
nerrors += test_array_dtype(file) < 0 ? 1 : 0;
nerrors += test_array_dtype2(file) < 0 ? 1 : 0;
- if (!h5_using_parallel_driver(NULL)) {
+ if (!driver_is_parallel) {
nerrors += test_vl_dtype(file) < 0 ? 1 : 0;
nerrors += test_vlstr_dtype(file) < 0 ? 1 : 0;
}
nerrors += test_str_dtype(file) < 0 ? 1 : 0;
- if (!h5_using_parallel_driver(NULL)) {
+ if (!driver_is_parallel) {
nerrors += test_refer_dtype(file) < 0 ? 1 : 0;
nerrors += test_refer_dtype2(file) < 0 ? 1 : 0;
}
diff --git a/test/objcopy.c b/test/objcopy.c
index 62fb22e..3f8f70a 100644
--- a/test/objcopy.c
+++ b/test/objcopy.c
@@ -17313,6 +17313,7 @@ main(void)
int ExpressMode;
const char *env_h5_drvr; /* File Driver value from environment */
hbool_t same_file; /* Whether to run tests that only use one file */
+ hbool_t driver_is_default_compatible;
env_h5_drvr = HDgetenv(HDF5_DRIVER);
if (env_h5_drvr == NULL)
@@ -17322,6 +17323,9 @@ main(void)
h5_reset();
fapl = h5_fileaccess();
+ if (h5_driver_is_default_vfd_compatible(fapl, &driver_is_default_compatible) < 0)
+ TEST_ERROR;
+
ExpressMode = GetTestExpress();
if (ExpressMode > 1)
HDprintf("***Express test mode on. Some tests may be skipped\n");
@@ -17558,10 +17562,7 @@ main(void)
nerrors += test_copy_same_file_named_datatype(fcpl_src, src_fapl);
- /* Check if current driver might modify the filename. Skip these tests
- * if so, since the file is pre-generated.
- */
- if (!h5_driver_uses_modified_filename()) {
+ if (driver_is_default_compatible) {
/* Test with dataset opened in the file or not */
nerrors += test_copy_old_layout(fcpl_dst, dst_fapl, FALSE);
nerrors += test_copy_old_layout(fcpl_dst, dst_fapl, TRUE);
diff --git a/test/set_extent.c b/test/set_extent.c
index bba57fa..61290a3 100644
--- a/test/set_extent.c
+++ b/test/set_extent.c
@@ -230,9 +230,13 @@ do_ranks(hid_t fapl, hbool_t new_format)
hid_t dcpl = -1;
int fillvalue = FILL_VALUE;
unsigned config;
+ hbool_t driver_is_parallel;
TESTING_2("datasets with ranks 1 to 4 (all configurations)");
+ if (h5_using_parallel_driver(fapl, &driver_is_parallel) < 0)
+ TEST_ERROR;
+
/* Loop over different configurations for tests */
for (config = 0; config <= CONFIG_ALL; config++) {
/* Create DCPL and add appropriate settings */
@@ -343,7 +347,7 @@ do_ranks(hid_t fapl, hbool_t new_format)
goto error;
} /* end if */
- if (!h5_using_parallel_driver(NULL)) {
+ if (!driver_is_parallel) {
/* VL test */
if (test_random_rank4_vl(fapl, dcpl, do_fillvalue, disable_edge_filters, FALSE, index_type) <
0) {
@@ -367,7 +371,7 @@ do_ranks(hid_t fapl, hbool_t new_format)
goto error;
} /* end if */
- if (!h5_using_parallel_driver(NULL)) {
+ if (!driver_is_parallel) {
if (test_random_rank4_vl(fapl, dcpl, do_fillvalue, disable_edge_filters, TRUE,
index_type) < 0) {
DO_RANKS_PRINT_CONFIG("Randomized rank 4 variable length with sparse allocation")
diff --git a/test/stab.c b/test/stab.c
index b4c92a4..255ad39 100644
--- a/test/stab.c
+++ b/test/stab.c
@@ -1418,8 +1418,8 @@ main(void)
unsigned new_format; /* Whether to use the new format or not */
const char *env_h5_drvr; /* File Driver value from environment */
hbool_t contig_addr_vfd; /* Whether VFD used has a contiguous address space */
- hbool_t driver_uses_modified_filename = h5_driver_uses_modified_filename();
- int nerrors = 0;
+ hbool_t driver_is_default_compatible;
+ int nerrors = 0;
/* Get the VFD to use */
env_h5_drvr = HDgetenv(HDF5_DRIVER);
@@ -1433,6 +1433,9 @@ main(void)
h5_reset();
fapl = h5_fileaccess();
+ if (h5_driver_is_default_vfd_compatible(fapl, &driver_is_default_compatible) < 0)
+ TEST_ERROR;
+
/* Copy the file access property list */
if ((fapl2 = H5Pcopy(fapl)) < 0)
TEST_ERROR;
@@ -1476,7 +1479,7 @@ main(void)
nerrors += lifecycle(fcpl2, fapl2);
nerrors += long_compact(fcpl2, fapl2);
- if (!driver_uses_modified_filename) {
+ if (driver_is_default_compatible) {
nerrors += read_old();
}
@@ -1487,7 +1490,7 @@ main(void)
/* Old group API specific tests */
nerrors += old_api(fapl);
- if (!driver_uses_modified_filename) {
+ if (driver_is_default_compatible) {
nerrors += corrupt_stab_msg();
}
diff --git a/test/tarray.c b/test/tarray.c
index 3b17239..4669fc7 100644
--- a/test/tarray.c
+++ b/test/tarray.c
@@ -1919,7 +1919,8 @@ test_compat(void)
size_t off; /* Offset of compound field */
hid_t mtid; /* Datatype ID for field */
int i; /* Index variables */
- herr_t ret; /* Generic return value */
+ hbool_t driver_is_default_compatible;
+ herr_t ret; /* Generic return value */
/* Output message about test being performed */
MESSAGE(5, ("Testing Array Datatypes Compatibility Functionality\n"));
@@ -1934,6 +1935,13 @@ test_compat(void)
* the tarrold.h5 file.
*/
+ if (h5_driver_is_default_vfd_compatible(H5P_DEFAULT, &driver_is_default_compatible) < 0)
+ TestErrPrintf("can't check if VFD is default VFD compatible\n");
+ if (!driver_is_default_compatible) {
+ HDprintf(" -- SKIPPED --\n");
+ return;
+ }
+
/* Open the testfile */
fid1 = H5Fopen(testfile, H5F_ACC_RDONLY, H5P_DEFAULT);
CHECK_I(fid1, "H5Fopen");
@@ -2217,10 +2225,8 @@ test_array(void)
test_array_bkg(); /* Read compound datatype with array fields and background fields read */
- if (!h5_driver_uses_modified_filename()) {
- /* This test uses a custom file */
- test_compat(); /* Test compatibility changes for compound datatype fields */
- }
+ /* This test uses a custom file */
+ test_compat(); /* Test compatibility changes for compound datatype fields */
} /* end test_array() */
diff --git a/test/tfile.c b/test/tfile.c
index caf9c62..3babae5 100644
--- a/test/tfile.c
+++ b/test/tfile.c
@@ -1647,7 +1647,8 @@ test_file_is_accessible(const char *env_h5_drvr)
unsigned char buf[1024]; /* Buffer of data to write */
htri_t is_hdf5; /* Whether a file is an HDF5 file */
int posix_ret; /* Return value from POSIX calls */
- herr_t ret; /* Return value from HDF5 calls */
+ hbool_t driver_is_default_compatible;
+ herr_t ret; /* Return value from HDF5 calls */
/* Output message about test being performed */
MESSAGE(5, ("Testing Detection of HDF5 Files\n"));
@@ -1656,6 +1657,11 @@ test_file_is_accessible(const char *env_h5_drvr)
fapl_id = h5_fileaccess();
CHECK(fapl_id, H5I_INVALID_HID, "H5Pcreate");
+ if (h5_driver_is_default_vfd_compatible(fapl_id, &driver_is_default_compatible) < 0) {
+ TestErrPrintf("Can't check if VFD is compatible with default VFD");
+ return;
+ }
+
/* Fix up filenames */
h5_fixname(FILE_IS_ACCESSIBLE, fapl_id, filename, sizeof(filename));
h5_fixname(FILE_IS_ACCESSIBLE_NON_HDF5, fapl_id, non_hdf5_filename, sizeof(non_hdf5_filename));
@@ -1733,10 +1739,7 @@ test_file_is_accessible(const char *env_h5_drvr)
VERIFY(is_hdf5, TRUE, "H5Fis_accessible");
} /* end if */
- /* Don't run the below tests for drivers that use multiple
- * logical files, like the splitter driver.
- */
- if (!h5_driver_uses_multiple_files(env_h5_drvr, H5_EXCLUDE_MULTIPART_DRIVERS)) {
+ if (driver_is_default_compatible) {
/***********************/
/* EMPTY non-HDF5 file */
/***********************/
@@ -5536,10 +5539,19 @@ test_libver_bounds_copy(void)
hid_t fapl = -1; /* File access property list ID */
const char *src_fname; /* Source file name */
herr_t ret; /* Generic return value */
+ hbool_t driver_is_default_compatible;
/* Output message about the test being performed */
MESSAGE(5, ("Testing H5Ocopy a dataset in a 1.8 library file to a 1.10 library file\n"));
+ ret = h5_driver_is_default_vfd_compatible(H5P_DEFAULT, &driver_is_default_compatible);
+ CHECK_I(ret, "h5_driver_is_default_vfd_compatible");
+
+ if (!driver_is_default_compatible) {
+ HDprintf("-- SKIPPED --\n");
+ return;
+ }
+
/* Get the test file name */
src_fname = H5_get_srcdir_filename(SRC_FILE);
@@ -5598,10 +5610,7 @@ test_libver_bounds(void)
test_libver_bounds_real(H5F_LIBVER_EARLIEST, 1, H5F_LIBVER_LATEST, 2);
test_libver_bounds_real(H5F_LIBVER_LATEST, 2, H5F_LIBVER_EARLIEST, 2);
test_libver_bounds_open();
-
- if (!h5_driver_uses_modified_filename()) {
- test_libver_bounds_copy();
- }
+ test_libver_bounds_copy();
} /* end test_libver_bounds() */
/**************************************************************************************
@@ -6491,30 +6500,35 @@ test_libver_bounds_dataset(hid_t fapl)
dset = (H5D_t *)H5VL_object(did);
CHECK_PTR(dset, "H5VL_object");
- /* Verify the dataset's layout, fill value and filter pipeline message versions */
- /* Also verify the chunk indexing type */
- if (f->shared->low_bound == H5F_LIBVER_EARLIEST) {
- /* For layout message: the earliest version the library will set is 3 */
- /* For fill value message: the earliest version the library will set is 2 */
- VERIFY(dset->shared->layout.version, H5O_LAYOUT_VERSION_DEFAULT, "H5O_layout_ver_bounds");
- VERIFY(dset->shared->dcpl_cache.fill.version, H5O_FILL_VERSION_2, "H5O_fill_ver_bounds");
- }
- else {
- VERIFY(dset->shared->layout.version, H5O_layout_ver_bounds[f->shared->low_bound],
- "H5O_layout_ver_bounds");
- VERIFY(dset->shared->dcpl_cache.fill.version, H5O_fill_ver_bounds[f->shared->low_bound],
- "H5O_fill_ver_bounds");
- }
+ if (dset) {
+ /* Verify the dataset's layout, fill value and filter pipeline message versions */
+ /* Also verify the chunk indexing type */
+ if (f->shared->low_bound == H5F_LIBVER_EARLIEST) {
+ /* For layout message: the earliest version the library will set is 3 */
+ /* For fill value message: the earliest version the library will set is 2 */
+ VERIFY(dset->shared->layout.version, H5O_LAYOUT_VERSION_DEFAULT,
+ "H5O_layout_ver_bounds");
+ VERIFY(dset->shared->dcpl_cache.fill.version, H5O_FILL_VERSION_2,
+ "H5O_fill_ver_bounds");
+ }
+ else {
+ VERIFY(dset->shared->layout.version, H5O_layout_ver_bounds[f->shared->low_bound],
+ "H5O_layout_ver_bounds");
+ VERIFY(dset->shared->dcpl_cache.fill.version,
+ H5O_fill_ver_bounds[f->shared->low_bound], "H5O_fill_ver_bounds");
+ }
- /* Verify the filter pipeline message version */
- VERIFY(dset->shared->dcpl_cache.pline.version, H5O_pline_ver_bounds[f->shared->low_bound],
- "H5O_pline_ver_bounds");
+ /* Verify the filter pipeline message version */
+ VERIFY(dset->shared->dcpl_cache.pline.version, H5O_pline_ver_bounds[f->shared->low_bound],
+ "H5O_pline_ver_bounds");
- /* Verify the dataset's chunk indexing type */
- if (dset->shared->layout.version == H5O_LAYOUT_VERSION_LATEST)
- VERIFY(dset->shared->layout.u.chunk.idx_type, H5D_CHUNK_IDX_BT2, "chunk_index_type");
- else
- VERIFY(dset->shared->layout.u.chunk.idx_type, H5D_CHUNK_IDX_BTREE, "chunk_index_type");
+ /* Verify the dataset's chunk indexing type */
+ if (dset->shared->layout.version == H5O_LAYOUT_VERSION_LATEST)
+ VERIFY(dset->shared->layout.u.chunk.idx_type, H5D_CHUNK_IDX_BT2, "chunk_index_type");
+ else
+ VERIFY(dset->shared->layout.u.chunk.idx_type, H5D_CHUNK_IDX_BTREE,
+ "chunk_index_type");
+ }
/* Close the dataset */
ret = H5Dclose(did);
@@ -6739,13 +6753,19 @@ test_libver_bounds_dataspace(hid_t fapl)
tmp_space_contig = (H5S_t *)H5I_object(tmp_sid_contig);
CHECK_PTR(tmp_space_contig, "H5I_object");
- /* Verify versions for the three dataspaces */
- VERIFY(tmp_space->extent.version, H5O_sdspace_ver_bounds[f->shared->low_bound],
- "H5O_sdspace_ver_bounds");
- VERIFY(tmp_space_compact->extent.version, H5O_sdspace_ver_bounds[f->shared->low_bound],
- "H5O_sdspace_ver_bounds");
- VERIFY(tmp_space_contig->extent.version, H5O_sdspace_ver_bounds[f->shared->low_bound],
- "H5O_sdspace_ver_bounds");
+ if (tmp_space) {
+ /* Verify versions for the three dataspaces */
+ VERIFY(tmp_space->extent.version, H5O_sdspace_ver_bounds[f->shared->low_bound],
+ "H5O_sdspace_ver_bounds");
+ }
+ if (tmp_space_compact) {
+ VERIFY(tmp_space_compact->extent.version, H5O_sdspace_ver_bounds[f->shared->low_bound],
+ "H5O_sdspace_ver_bounds");
+ }
+ if (tmp_space_contig) {
+ VERIFY(tmp_space_contig->extent.version, H5O_sdspace_ver_bounds[f->shared->low_bound],
+ "H5O_sdspace_ver_bounds");
+ }
/* Close the three datasets */
ret = H5Dclose(did);
@@ -7063,24 +7083,26 @@ test_libver_bounds_datatype_check(hid_t fapl, hid_t tid)
dtype = (H5T_t *)H5I_object(dtid);
CHECK_PTR(dtype, "H5I_object");
- /* Verify the dataset's datatype message version */
- /* H5T_COMPOUND, H5T_ENUM, H5T_ARRAY:
- * --the library will set version according to low_bound
- * --H5T_ARRAY: the earliest version the library will set is 2
- * H5T_INTEGER, H5T_FLOAT, H5T_TIME, H5T_STRING, H5T_BITFIELD, H5T_OPAQUE, H5T_REFERENCE:
- * --the library will only use basic version
- */
- if (dtype->shared->type == H5T_COMPOUND || dtype->shared->type == H5T_ENUM ||
- dtype->shared->type == H5T_ARRAY) {
- if (dtype->shared->type == H5T_ARRAY && f->shared->low_bound == H5F_LIBVER_EARLIEST)
- VERIFY(dtype->shared->version, H5O_DTYPE_VERSION_2, "H5O_dtype_ver_bounds");
+ if (dtype) {
+ /* Verify the dataset's datatype message version */
+ /* H5T_COMPOUND, H5T_ENUM, H5T_ARRAY:
+ * --the library will set version according to low_bound
+ * --H5T_ARRAY: the earliest version the library will set is 2
+ * H5T_INTEGER, H5T_FLOAT, H5T_TIME, H5T_STRING, H5T_BITFIELD, H5T_OPAQUE, H5T_REFERENCE:
+ * --the library will only use basic version
+ */
+ if (dtype->shared->type == H5T_COMPOUND || dtype->shared->type == H5T_ENUM ||
+ dtype->shared->type == H5T_ARRAY) {
+ if (dtype->shared->type == H5T_ARRAY && f->shared->low_bound == H5F_LIBVER_EARLIEST)
+ VERIFY(dtype->shared->version, H5O_DTYPE_VERSION_2, "H5O_dtype_ver_bounds");
+ else
+ VERIFY(dtype->shared->version, H5O_dtype_ver_bounds[f->shared->low_bound],
+ "H5O_dtype_ver_bounds");
+ }
else
- VERIFY(dtype->shared->version, H5O_dtype_ver_bounds[f->shared->low_bound],
+ VERIFY(dtype->shared->version, H5O_dtype_ver_bounds[H5F_LIBVER_EARLIEST],
"H5O_dtype_ver_bounds");
}
- else
- VERIFY(dtype->shared->version, H5O_dtype_ver_bounds[H5F_LIBVER_EARLIEST],
- "H5O_dtype_ver_bounds");
/* Close the dataset */
ret = H5Dclose(did);
@@ -8017,9 +8039,9 @@ test_deprec(const char *env_h5_drvr)
void
test_file(void)
{
- const char *env_h5_drvr; /* File Driver value from environment */
- hid_t fapl_id = H5I_INVALID_HID; /* VFD-dependent fapl ID */
- hbool_t driver_uses_modified_filename = h5_driver_uses_modified_filename();
+ const char *env_h5_drvr; /* File Driver value from environment */
+ hid_t fapl_id = H5I_INVALID_HID; /* VFD-dependent fapl ID */
+ hbool_t driver_is_default_compatible;
herr_t ret;
/* Output message about test being performed */
@@ -8034,6 +8056,9 @@ test_file(void)
fapl_id = h5_fileaccess();
CHECK(fapl_id, H5I_INVALID_HID, "h5_fileaccess");
+ ret = h5_driver_is_default_vfd_compatible(fapl_id, &driver_is_default_compatible);
+ CHECK(ret, FAIL, "h5_driver_is_default_vfd_compatible");
+
test_file_create(); /* Test file creation(also creation templates)*/
test_file_open(env_h5_drvr); /* Test file opening */
test_file_reopen(); /* Test file reopening */
@@ -8057,7 +8082,7 @@ test_file(void)
env_h5_drvr); /* Tests that files created with a userblock have the correct size */
test_cached_stab_info(); /* Tests that files are created with cached stab info in the superblock */
- if (!driver_uses_modified_filename) {
+ if (driver_is_default_compatible) {
test_rw_noupdate(); /* Test to ensure that RW permissions don't write the file unless dirtied */
}
@@ -8078,7 +8103,7 @@ test_file(void)
test_sects_freespace(env_h5_drvr, FALSE); /* Test file public routine H5Fget_free_sections() */
/* Skipped testing for multi/split drivers */
- if (!driver_uses_modified_filename) {
+ if (driver_is_default_compatible) {
test_filespace_compatible(); /* Test compatibility for file space management */
test_filespace_round_compatible(); /* Testing file space compatibility for files from trunk to 1_8 to
diff --git a/test/th5s.c b/test/th5s.c
index 1bc19d4..ac82646 100644
--- a/test/th5s.c
+++ b/test/th5s.c
@@ -125,7 +125,8 @@ test_h5s_basic(void)
hsize_t max2[] = {SPACE2_MAX1, SPACE2_MAX2, SPACE2_MAX3, SPACE2_MAX4};
hsize_t tdims[4]; /* Dimension array to test with */
hsize_t tmax[4];
- hssize_t n; /* Number of dataspace elements */
+ hssize_t n; /* Number of dataspace elements */
+ hbool_t driver_is_default_compatible;
herr_t ret; /* Generic return value */
/* Output message about test being performed */
@@ -194,7 +195,10 @@ test_h5s_basic(void)
* If this test fails and the H5S_MAX_RANK variable has changed, follow
* the instructions in space_overflow.c for regenerating the th5s.h5 file.
*/
- if (!h5_driver_uses_modified_filename()) {
+ ret = h5_driver_is_default_vfd_compatible(H5P_DEFAULT, &driver_is_default_compatible);
+ CHECK_I(ret, "h5_driver_is_default_vfd_compatible");
+
+ if (driver_is_default_compatible) {
const char *testfile = H5_get_srcdir_filename(TESTFILE); /* Corrected test file name */
fid1 = H5Fopen(testfile, H5F_ACC_RDONLY, H5P_DEFAULT);
diff --git a/test/titerate.c b/test/titerate.c
index 5796f11..d870750 100644
--- a/test/titerate.c
+++ b/test/titerate.c
@@ -1009,6 +1009,7 @@ test_corrupted_attnamelen(void)
searched_err_t err_caught; /* Data to be passed to callback func */
int err_status; /* Status returned by H5Aiterate2 */
herr_t ret; /* Return value */
+ hbool_t driver_is_default_compatible;
const char * testfile = H5_get_srcdir_filename(CORRUPTED_ATNAMELEN_FILE); /* Corrected test file name */
const char *err_message = "attribute name has different length than stored length";
@@ -1017,6 +1018,14 @@ test_corrupted_attnamelen(void)
/* Output message about test being performed */
MESSAGE(5, ("Testing the Handling of Corrupted Attribute's Name Length\n"));
+ ret = h5_driver_is_default_vfd_compatible(H5P_DEFAULT, &driver_is_default_compatible);
+ CHECK(ret, FAIL, "h5_driver_is_default_vfd_compatible");
+
+ if (!driver_is_default_compatible) {
+ HDprintf("-- SKIPPED --\n");
+ return;
+ }
+
fid = H5Fopen(testfile, H5F_ACC_RDONLY, H5P_DEFAULT);
CHECK(fid, FAIL, "H5Fopen");
@@ -1175,10 +1184,8 @@ test_iterate(void)
#endif
} /* end for */
- if (!h5_driver_uses_modified_filename()) {
- /* Test the fix for issue HDFFV-10588 */
- test_corrupted_attnamelen();
- }
+ /* Test the fix for issue HDFFV-10588 */
+ test_corrupted_attnamelen();
/* Close FAPLs */
ret = H5Pclose(fapl);
diff --git a/test/tmisc.c b/test/tmisc.c
index f8bf602..9fa8f2f 100644
--- a/test/tmisc.c
+++ b/test/tmisc.c
@@ -190,7 +190,8 @@ typedef struct {
#define MISC14_METADATA_SIZE 4096
/* Definitions for misc. test #15 */
-#define MISC15_FILE "tmisc15.h5"
+#define MISC15_FILE "tmisc15.h5"
+#define MISC15_BUF_SIZE 1024
/* Definitions for misc. test #16 */
#define MISC16_FILE "tmisc16.h5"
@@ -1783,11 +1784,20 @@ test_misc10(void)
hid_t dcpl; /* Dataset creation property list */
hid_t space, type; /* Old dataset's dataspace & datatype */
const char *testfile = H5_get_srcdir_filename(MISC10_FILE_OLD); /* Corrected test file name */
+ hbool_t driver_is_default_compatible;
herr_t ret;
/* Output message about test being performed */
MESSAGE(5, ("Testing using old dataset creation property list\n"));
+ ret = h5_driver_is_default_vfd_compatible(H5P_DEFAULT, &driver_is_default_compatible);
+ CHECK(ret, FAIL, "h5_driver_is_default_vfd_compatible");
+
+ if (!driver_is_default_compatible) {
+ HDprintf("-- SKIPPED --\n");
+ return;
+ }
+
/*
* Open the old file and the dataset and get old settings.
*/
@@ -2736,14 +2746,21 @@ test_misc14(void)
static void
test_misc15(void)
{
+ char filename[MISC15_BUF_SIZE];
hid_t file; /* File ID */
hid_t fapl; /* File access property list */
herr_t ret; /* Generic return value */
+ fapl = h5_fileaccess();
+ h5_fixname(MISC15_FILE, fapl, filename, MISC15_BUF_SIZE);
+
/* Create the file & get it's FAPL */
- file = H5Fcreate(MISC15_FILE, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT);
+ file = H5Fcreate(filename, H5F_ACC_TRUNC, H5P_DEFAULT, fapl);
CHECK(file, FAIL, "H5Fcreate");
+ ret = H5Pclose(fapl);
+ CHECK(ret, FAIL, "H5Pclose");
+
fapl = H5Fget_access_plist(file);
CHECK(fapl, FAIL, "H5Fget_access_plist");
@@ -2754,7 +2771,7 @@ test_misc15(void)
CHECK(ret, FAIL, "H5Fclose");
/* Open the file & get it's FAPL again */
- file = H5Fopen(MISC15_FILE, H5F_ACC_RDONLY, H5P_DEFAULT);
+ file = H5Fopen(filename, H5F_ACC_RDONLY, H5P_DEFAULT);
CHECK(file, FAIL, "H5Fopen");
fapl = H5Fget_access_plist(file);
@@ -2764,13 +2781,13 @@ test_misc15(void)
CHECK(ret, FAIL, "H5Fclose");
/* Verify that the file is still OK */
- ret = H5Fis_accessible(MISC15_FILE, fapl);
- CHECK(ret, FAIL, "H5Fis_hdf5");
+ ret = H5Fis_accessible(filename, fapl);
+ CHECK(ret, FAIL, "H5Fis_accessible");
ret = H5Pclose(fapl);
CHECK(ret, FAIL, "H5Pclose");
- file = H5Fopen(MISC15_FILE, H5F_ACC_RDONLY, H5P_DEFAULT);
+ file = H5Fopen(filename, H5F_ACC_RDONLY, H5P_DEFAULT);
CHECK(file, FAIL, "H5Fopen");
ret = H5Fclose(file);
@@ -3670,11 +3687,20 @@ test_misc20(void)
unsigned version; /* Version of storage layout info */
hsize_t contig_size; /* Size of contiguous storage size from layout into */
const char *testfile = H5_get_srcdir_filename(MISC20_FILE_OLD); /* Corrected test file name */
- herr_t ret; /* Generic return value */
+ hbool_t driver_is_default_compatible;
+ herr_t ret; /* Generic return value */
/* Output message about test being performed */
MESSAGE(5, ("Testing large dimension truncation fix\n"));
+ ret = h5_driver_is_default_vfd_compatible(H5P_DEFAULT, &driver_is_default_compatible);
+ CHECK(ret, FAIL, "h5_driver_is_default_vfd_compatible");
+
+ if (!driver_is_default_compatible) {
+ HDprintf("-- SKIPPED --\n");
+ return;
+ }
+
/* Verify that chunks with dimensions that are too large get rejected */
/* Create a dataset creation property list */
@@ -4957,11 +4983,20 @@ test_misc25b(void)
hid_t fid; /* File ID */
hid_t gid; /* Group ID */
const char *testfile = H5_get_srcdir_filename(MISC25B_FILE); /* Corrected test file name */
- herr_t ret; /* Generic return value */
+ hbool_t driver_is_default_compatible;
+ herr_t ret; /* Generic return value */
/* Output message about test being performed */
MESSAGE(5, ("Exercise null object header message bug\n"));
+ ret = h5_driver_is_default_vfd_compatible(H5P_DEFAULT, &driver_is_default_compatible);
+ CHECK(ret, FAIL, "h5_driver_is_default_vfd_compatible");
+
+ if (!driver_is_default_compatible) {
+ HDprintf("-- SKIPPED --\n");
+ return;
+ }
+
/* Open file */
fid = H5Fopen(testfile, H5F_ACC_RDONLY, H5P_DEFAULT);
CHECK(fid, FAIL, "H5Fopen");
@@ -5209,11 +5244,20 @@ test_misc27(void)
hid_t fid; /* File ID */
hid_t gid; /* Group ID */
const char *testfile = H5_get_srcdir_filename(MISC27_FILE); /* Corrected test file name */
- herr_t ret; /* Generic return value */
+ hbool_t driver_is_default_compatible;
+ herr_t ret; /* Generic return value */
/* Output message about test being performed */
MESSAGE(5, ("Corrupt object header handling\n"));
+ ret = h5_driver_is_default_vfd_compatible(H5P_DEFAULT, &driver_is_default_compatible);
+ CHECK(ret, FAIL, "h5_driver_is_default_vfd_compatible");
+
+ if (!driver_is_default_compatible) {
+ HDprintf("-- SKIPPED --\n");
+ return;
+ }
+
/* Open the file */
fid = H5Fopen(testfile, H5F_ACC_RDONLY, H5P_DEFAULT);
CHECK(fid, FAIL, "H5Fopen");
@@ -5423,12 +5467,21 @@ test_misc28(void)
static void
test_misc29(void)
{
- hid_t fid; /* File ID */
- herr_t ret; /* Generic return value */
+ hbool_t driver_is_default_compatible;
+ hid_t fid; /* File ID */
+ herr_t ret; /* Generic return value */
/* Output message about test being performed */
MESSAGE(5, ("Speculative metadata reads\n"));
+ ret = h5_driver_is_default_vfd_compatible(H5P_DEFAULT, &driver_is_default_compatible);
+ CHECK(ret, FAIL, "h5_driver_is_default_vfd_compatible");
+
+ if (!driver_is_default_compatible) {
+ HDprintf("-- SKIPPED --\n");
+ return;
+ }
+
/* Make a copy of the data file from svn. */
ret = h5_make_local_copy(MISC29_ORIG_FILE, MISC29_COPY_FILE);
CHECK(ret, -1, "h5_make_local_copy");
@@ -5706,11 +5759,20 @@ test_misc33(void)
hid_t fid = -1; /* File ID */
const char *testfile = H5_get_srcdir_filename(MISC33_FILE); /* Corrected test file name */
H5O_info2_t oinfo; /* Structure for object metadata information */
- herr_t ret; /* Generic return value */
+ hbool_t driver_is_default_compatible;
+ herr_t ret; /* Generic return value */
/* Output message about test being performed */
MESSAGE(5, ("Testing that bad offset into the heap returns error"));
+ ret = h5_driver_is_default_vfd_compatible(H5P_DEFAULT, &driver_is_default_compatible);
+ CHECK(ret, FAIL, "h5_driver_is_default_vfd_compatible");
+
+ if (!driver_is_default_compatible) {
+ HDprintf("-- SKIPPED --\n");
+ return;
+ }
+
/* Open the test file */
fid = H5Fopen(testfile, H5F_ACC_RDONLY, H5P_DEFAULT);
CHECK(fid, FAIL, "H5Fopen");
@@ -6026,25 +6088,21 @@ test_misc36(void)
void
test_misc(void)
{
- hbool_t driver_uses_modified_filename = h5_driver_uses_modified_filename();
- hbool_t default_driver = h5_using_default_driver(NULL);
+ hbool_t default_driver = h5_using_default_driver(NULL);
/* Output message about test being performed */
MESSAGE(5, ("Testing Miscellaneous Routines\n"));
- test_misc1(); /* Test unlinking a dataset & immediately re-using name */
- test_misc2(); /* Test storing a VL-derived datatype in two different files */
- test_misc3(); /* Test reading from chunked dataset with non-zero fill value */
- test_misc4(); /* Test retrieving the fileno for various objects with H5Oget_info() */
- test_misc5(); /* Test several level deep nested compound & VL datatypes */
- test_misc6(); /* Test object header continuation code */
- test_misc7(); /* Test for sensible datatypes stored on disk */
- test_misc8(); /* Test storage sizes of various types of dataset storage */
- test_misc9(); /* Test for opening (not creating) core files */
-
- if (!driver_uses_modified_filename) {
- test_misc10(); /* Test for using dataset creation property lists from old files */
- }
+ test_misc1(); /* Test unlinking a dataset & immediately re-using name */
+ test_misc2(); /* Test storing a VL-derived datatype in two different files */
+ test_misc3(); /* Test reading from chunked dataset with non-zero fill value */
+ test_misc4(); /* Test retrieving the fileno for various objects with H5Oget_info() */
+ test_misc5(); /* Test several level deep nested compound & VL datatypes */
+ test_misc6(); /* Test object header continuation code */
+ test_misc7(); /* Test for sensible datatypes stored on disk */
+ test_misc8(); /* Test storage sizes of various types of dataset storage */
+ test_misc9(); /* Test for opening (not creating) core files */
+ test_misc10(); /* Test for using dataset creation property lists from old files */
if (default_driver) {
test_misc11(); /* Test for all properties of a file creation property list being stored */
@@ -6057,19 +6115,12 @@ test_misc(void)
}
test_misc14(); /* Test that deleted dataset's data is removed from sieve buffer correctly */
-
- if (!driver_uses_modified_filename) {
- test_misc15(); /* Test that checking a file's access property list more than once works */
- }
-
+ test_misc15(); /* Test that checking a file's access property list more than once works */
test_misc16(); /* Test array of fixed-length string */
test_misc17(); /* Test array of ASCII character */
test_misc18(); /* Test new object header information in H5O_info_t struct */
test_misc19(); /* Test incrementing & decrementing ref count on IDs */
-
- if (!driver_uses_modified_filename) {
- test_misc20(); /* Test problems with truncated dimensions in version 2 of storage layout message */
- }
+ test_misc20(); /* Test problems with truncated dimensions in version 2 of storage layout message */
#ifdef H5_HAVE_FILTER_SZIP
test_misc21(); /* Test that "late" allocation time is treated the same as "incremental", for chunked
@@ -6079,36 +6130,20 @@ test_misc(void)
test_misc23(); /* Test intermediate group creation */
test_misc24(); /* Test inappropriate API opens of objects */
test_misc25a(); /* Exercise null object header message merge bug */
-
- if (!driver_uses_modified_filename) {
- test_misc25b(); /* Exercise null object header message merge bug on existing file */
- }
-
+ test_misc25b(); /* Exercise null object header message merge bug on existing file */
test_misc25c(); /* Exercise another null object header message merge bug */
test_misc26(); /* Test closing property lists with long filter pipelines */
-
- if (!driver_uses_modified_filename) {
- test_misc27(); /* Test opening file with object that has bad # of object header messages */
- }
-
- test_misc28(); /* Test that chunks are cached appropriately */
-
- if (!driver_uses_modified_filename) {
- test_misc29(); /* Test that speculative metadata reads are handled correctly */
- }
-
- test_misc30(); /* Exercise local heap loading bug where free lists were getting dropped */
+ test_misc27(); /* Test opening file with object that has bad # of object header messages */
+ test_misc28(); /* Test that chunks are cached appropriately */
+ test_misc29(); /* Test that speculative metadata reads are handled correctly */
+ test_misc30(); /* Exercise local heap loading bug where free lists were getting dropped */
if (default_driver) {
test_misc31(); /* Test Reentering library through deprecated routines after H5close() */
}
test_misc32(); /* Test filter memory allocation functions */
-
- if (!driver_uses_modified_filename) {
- test_misc33(); /* Test to verify that H5HL_offset_into() returns error if offset exceeds heap block */
- }
-
+ test_misc33(); /* Test to verify that H5HL_offset_into() returns error if offset exceeds heap block */
test_misc34(); /* Test behavior of 0 and NULL in H5MM API calls */
test_misc35(); /* Test behavior of free-list & allocation statistics API calls */
test_misc36(); /* Exercise H5atclose and H5is_library_terminating */
diff --git a/test/tsohm.c b/test/tsohm.c
index 6b2b270..cf813a8 100644
--- a/test/tsohm.c
+++ b/test/tsohm.c
@@ -3293,11 +3293,20 @@ verify_dset_create_and_open_through_extlink_with_sohm(hid_t src_fcpl_id, hid_t d
static void
test_sohm_extlink(void)
{
- hid_t fcpl_id = -1;
- herr_t ret;
+ hid_t fcpl_id = -1;
+ hbool_t driver_is_default_compatible;
+ herr_t ret;
MESSAGE(5, ("Testing SOHM creation through external links\n"));
+ ret = h5_driver_is_default_vfd_compatible(H5P_DEFAULT, &driver_is_default_compatible);
+ CHECK_I(ret, "h5_driver_is_default_vfd_compatible");
+
+ if (!driver_is_default_compatible) {
+ HDprintf("-- SKIPPED --\n");
+ return;
+ }
+
fcpl_id = H5Pcreate(H5P_FILE_CREATE);
CHECK_I(fcpl_id, "H5Pcreate");
ret = H5Pset_shared_mesg_nindexes(fcpl_id, 1);
@@ -3851,9 +3860,7 @@ test_sohm(void)
test_sohm_delete_revert(); /* Test that a file with SOHMs becomes an
* empty file again when they are deleted. */
- if (!h5_driver_uses_modified_filename()) {
- test_sohm_extlink(); /* Test SOHMs when external links are used */
- }
+ test_sohm_extlink(); /* Test SOHMs when external links are used */
test_sohm_extend_dset(); /* Test extending shared datasets */
test_sohm_external_dtype(); /* Test using datatype in another file */
diff --git a/test/vds.c b/test/vds.c
index f6b1794..3da8ce2 100644
--- a/test/vds.c
+++ b/test/vds.c
@@ -12305,26 +12305,30 @@ main(void)
unsigned bit_config;
H5F_libver_t low, high; /* Low and high bounds */
const char * env_h5_drvr; /* File Driver value from environment */
+ hbool_t driver_is_parallel;
int nerrors = 0;
env_h5_drvr = HDgetenv(HDF5_DRIVER);
if (env_h5_drvr == NULL)
env_h5_drvr = "nomatch";
+ /* Testing setup */
+ h5_reset();
+ fapl = h5_fileaccess();
+
+ if (h5_using_parallel_driver(fapl, &driver_is_parallel) < 0)
+ TEST_ERROR;
+
/*
* Skip VDS tests for parallel-enabled and splitter VFDs. VDS currently
* doesn't support parallel reads and the splitter VFD has external
* link-related bugs.
*/
- if (h5_using_parallel_driver(env_h5_drvr) || !HDstrcmp(env_h5_drvr, "splitter")) {
+ if (driver_is_parallel || !HDstrcmp(env_h5_drvr, "splitter")) {
HDputs(" -- SKIPPED for incompatible VFD --");
HDexit(EXIT_SUCCESS);
}
- /* Testing setup */
- h5_reset();
- fapl = h5_fileaccess();
-
h5_fixname(FILENAME[0], fapl, filename, sizeof(filename));
/* Create FAPLs for VDS and source files */
diff --git a/test/vds_env.c b/test/vds_env.c
index c80384b..fb4a300 100644
--- a/test/vds_env.c
+++ b/test/vds_env.c
@@ -327,26 +327,30 @@ main(void)
unsigned bit_config;
H5F_libver_t low, high; /* Low and high bounds */
const char * env_h5_drvr; /* File Driver value from environment */
+ hbool_t driver_is_parallel;
int nerrors = 0;
env_h5_drvr = HDgetenv(HDF5_DRIVER);
if (env_h5_drvr == NULL)
env_h5_drvr = "nomatch";
+ /* Testing setup */
+ h5_reset();
+ fapl = h5_fileaccess();
+
+ if (h5_using_parallel_driver(fapl, &driver_is_parallel) < 0)
+ TEST_ERROR;
+
/*
* Skip VDS tests for parallel-enabled and splitter VFDs. VDS currently
* doesn't support parallel reads and the splitter VFD has external
* link-related bugs.
*/
- if (h5_using_parallel_driver(env_h5_drvr) || !HDstrcmp(env_h5_drvr, "splitter")) {
+ if (driver_is_parallel || !HDstrcmp(env_h5_drvr, "splitter")) {
HDputs(" -- SKIPPED for incompatible VFD --");
HDexit(EXIT_SUCCESS);
}
- /* Testing setup */
- h5_reset();
- fapl = h5_fileaccess();
-
/* Set to use the latest file format */
if ((my_fapl = H5Pcopy(fapl)) < 0)
TEST_ERROR;
diff --git a/test/vol.c b/test/vol.c
index 52758f3..a738063 100644
--- a/test/vol.c
+++ b/test/vol.c
@@ -948,7 +948,7 @@ error:
*-------------------------------------------------------------------------
*/
static herr_t
-test_basic_group_operation(const char *env_h5_drvr)
+test_basic_group_operation(void)
{
hid_t fid = H5I_INVALID_HID;
hid_t fapl_id = H5I_INVALID_HID;
@@ -957,6 +957,7 @@ test_basic_group_operation(const char *env_h5_drvr)
hid_t gcpl_id = H5I_INVALID_HID;
char filename[1024];
H5G_info_t info;
+ hbool_t driver_is_parallel;
TESTING("Basic VOL group operations");
@@ -991,8 +992,10 @@ test_basic_group_operation(const char *env_h5_drvr)
if (H5Gget_info_by_idx(fid, "/", H5_INDEX_NAME, H5_ITER_NATIVE, 0, &info, H5P_DEFAULT) < 0)
TEST_ERROR;
- /* H5Gflush - skip for MPIO file driver as flush calls cause assertions in the library */
- if (HDstrcmp(env_h5_drvr, "mpio") != 0)
+ /* H5Gflush - skip for parallel file drivers as flush calls cause assertions in the library */
+ if (h5_using_parallel_driver(fapl_id, &driver_is_parallel) < 0)
+ TEST_ERROR;
+ if (!driver_is_parallel)
if (H5Gflush(gid) < 0)
TEST_ERROR;
@@ -1052,7 +1055,7 @@ error:
*-------------------------------------------------------------------------
*/
static herr_t
-test_basic_dataset_operation(const char *env_h5_drvr)
+test_basic_dataset_operation(void)
{
hid_t fid = H5I_INVALID_HID;
hid_t fapl_id = H5I_INVALID_HID;
@@ -1072,6 +1075,8 @@ test_basic_dataset_operation(const char *env_h5_drvr)
haddr_t offset;
H5D_space_status_t status;
+ hbool_t driver_is_parallel;
+
int in_buf[N_ELEMENTS];
int out_buf[N_ELEMENTS];
@@ -1117,8 +1122,10 @@ test_basic_dataset_operation(const char *env_h5_drvr)
if (H5Dset_extent(did, &curr_dims) < 0)
TEST_ERROR;
- /* H5Dflush - skip for MPIO file driver as flush calls cause assertions in the library */
- if (HDstrcmp(env_h5_drvr, "mpio") != 0)
+ /* H5Dflush - skip for parallel file drivers as flush calls cause assertions in the library */
+ if (h5_using_parallel_driver(fapl_id, &driver_is_parallel) < 0)
+ TEST_ERROR;
+ if (!driver_is_parallel)
if (H5Dflush(did) < 0)
TEST_ERROR;
@@ -1508,14 +1515,15 @@ error:
*-------------------------------------------------------------------------
*/
static herr_t
-test_basic_datatype_operation(const char *env_h5_drvr)
+test_basic_datatype_operation(void)
{
- hid_t fid = H5I_INVALID_HID;
- hid_t fapl_id = H5I_INVALID_HID;
- hid_t tid = H5I_INVALID_HID;
- hid_t tid_anon = H5I_INVALID_HID;
- hid_t tcpl_id = H5I_INVALID_HID;
- char filename[1024];
+ hid_t fid = H5I_INVALID_HID;
+ hid_t fapl_id = H5I_INVALID_HID;
+ hid_t tid = H5I_INVALID_HID;
+ hid_t tid_anon = H5I_INVALID_HID;
+ hid_t tcpl_id = H5I_INVALID_HID;
+ char filename[1024];
+ hbool_t driver_is_parallel;
TESTING("Basic VOL datatype operations");
@@ -1532,8 +1540,10 @@ test_basic_datatype_operation(const char *env_h5_drvr)
if (H5Tcommit2(fid, NATIVE_VOL_TEST_DATATYPE_NAME, tid, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT) < 0)
TEST_ERROR;
- /* H5Tflush - skip for MPIO file driver as flush calls cause assertions in the library */
- if (HDstrcmp(env_h5_drvr, "mpio") != 0)
+ /* H5Tflush - skip for parallel file drivers as flush calls cause assertions in the library */
+ if (h5_using_parallel_driver(fapl_id, &driver_is_parallel) < 0)
+ TEST_ERROR;
+ if (!driver_is_parallel)
if (H5Tflush(tid) < 0)
TEST_ERROR;
@@ -2133,12 +2143,12 @@ main(void)
nerrors += test_register_opt_operation() < 0 ? 1 : 0;
nerrors += test_native_vol_init() < 0 ? 1 : 0;
nerrors += test_basic_file_operation(env_h5_drvr) < 0 ? 1 : 0;
- nerrors += test_basic_group_operation(env_h5_drvr) < 0 ? 1 : 0;
- nerrors += test_basic_dataset_operation(env_h5_drvr) < 0 ? 1 : 0;
+ nerrors += test_basic_group_operation() < 0 ? 1 : 0;
+ nerrors += test_basic_dataset_operation() < 0 ? 1 : 0;
nerrors += test_basic_attribute_operation() < 0 ? 1 : 0;
nerrors += test_basic_object_operation() < 0 ? 1 : 0;
nerrors += test_basic_link_operation() < 0 ? 1 : 0;
- nerrors += test_basic_datatype_operation(env_h5_drvr) < 0 ? 1 : 0;
+ nerrors += test_basic_datatype_operation() < 0 ? 1 : 0;
nerrors += test_async_vol_props() < 0 ? 1 : 0;
if (nerrors) {