summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--CMakeLists.txt133
-rw-r--r--MANIFEST19
-rw-r--r--c++/test/CMakeVFDTests.cmake33
-rw-r--r--config/clang-cxxflags9
-rw-r--r--config/clang-flags9
-rw-r--r--config/clang-warnings/noerror-general82
-rw-r--r--config/cmake/HDF5Macros.cmake38
-rw-r--r--config/cmake/HDFCXXCompilerFlags.cmake22
-rw-r--r--config/cmake/HDFCompilerFlags.cmake22
-rw-r--r--config/cmake_ext_mod/HDFMacros.cmake3
-rw-r--r--config/commence.am1
-rw-r--r--config/gnu-cxxflags15
-rw-r--r--config/gnu-flags11
-rw-r--r--config/gnu-warnings/cxx-developer-4.816
-rw-r--r--config/gnu-warnings/cxx-noerror-511
-rw-r--r--config/gnu-warnings/cxx-noerror-general32
-rw-r--r--config/gnu-warnings/no-cxx-developer-4.89
-rw-r--r--config/gnu-warnings/noerror-512
-rw-r--r--config/gnu-warnings/noerror-825
-rw-r--r--config/gnu-warnings/noerror-general92
-rw-r--r--configure.ac82
-rw-r--r--hl/tools/h5watch/CMakeTests.cmake68
-rw-r--r--hl/tools/h5watch/Makefile.am5
-rw-r--r--hl/tools/h5watch/swmr_check_compat_vfd.c55
-rw-r--r--hl/tools/h5watch/testh5watch.sh.in8
-rw-r--r--java/src/hdf/hdf5lib/H5.java62
-rw-r--r--java/src/jni/CMakeLists.txt20
-rw-r--r--java/src/jni/Makefile.am13
-rw-r--r--java/src/jni/h5jni_test.c53
-rw-r--r--java/src/jni/h5jni_test.h34
-rw-r--r--java/src/jni/h5pDXPLImp.c46
-rw-r--r--java/src/jni/h5pDXPLImp.h15
-rw-r--r--java/src/jni/h5util.c8
-rw-r--r--java/src/jni/h5vlImp.c21
-rw-r--r--java/src/jni/h5vlImp.h7
-rw-r--r--java/test/CMakeLists.txt20
-rw-r--r--java/test/H5TestUtils.java77
-rw-r--r--java/test/Makefile.am3
-rw-r--r--java/test/TestH5.java2
-rw-r--r--java/test/TestH5A.java2
-rw-r--r--java/test/TestH5Arw.java2
-rw-r--r--java/test/TestH5D.java2
-rw-r--r--java/test/TestH5Dparams.java1
-rw-r--r--java/test/TestH5Dplist.java2
-rw-r--r--java/test/TestH5Drw.java2
-rw-r--r--java/test/TestH5E.java2
-rw-r--r--java/test/TestH5Edefault.java1
-rw-r--r--java/test/TestH5Eparams.java2
-rw-r--r--java/test/TestH5Eregister.java1
-rw-r--r--java/test/TestH5F.java2
-rw-r--r--java/test/TestH5Fbasic.java2
-rw-r--r--java/test/TestH5Fparams.java2
-rw-r--r--java/test/TestH5Fswmr.java2
-rw-r--r--java/test/TestH5G.java2
-rw-r--r--java/test/TestH5Gbasic.java2
-rw-r--r--java/test/TestH5Giterate.java1
-rw-r--r--java/test/TestH5Lbasic.java2
-rw-r--r--java/test/TestH5Lcreate.java2
-rw-r--r--java/test/TestH5Lparams.java2
-rw-r--r--java/test/TestH5Obasic.java2
-rw-r--r--java/test/TestH5Ocopy.java2
-rw-r--r--java/test/TestH5Ocreate.java4
-rw-r--r--java/test/TestH5Oparams.java1
-rw-r--r--java/test/TestH5P.java2
-rw-r--r--java/test/TestH5PData.java2
-rw-r--r--java/test/TestH5PL.java1
-rw-r--r--java/test/TestH5Pfapl.java2
-rw-r--r--java/test/TestH5Pfaplhdfs.java2
-rw-r--r--java/test/TestH5Pfapls3.java2
-rw-r--r--java/test/TestH5Plist.java1
-rw-r--r--java/test/TestH5Pvirtual.java2
-rw-r--r--java/test/TestH5R.java2
-rw-r--r--java/test/TestH5Rref.java2
-rw-r--r--java/test/TestH5S.java1
-rw-r--r--java/test/TestH5Sbasic.java1
-rw-r--r--java/test/TestH5T.java2
-rw-r--r--java/test/TestH5Tbasic.java1
-rw-r--r--java/test/TestH5Tparams.java1
-rw-r--r--java/test/TestH5VL.java3
-rw-r--r--java/test/TestH5Z.java1
-rw-r--r--java/test/junit.sh.in13
-rw-r--r--release_docs/RELEASE.txt15
-rw-r--r--src/H5ACprivate.h18
-rw-r--r--src/H5Tconv.c4
-rw-r--r--src/H5VL.c34
-rw-r--r--src/H5VLpublic.h12
-rw-r--r--src/hdf5.h1
-rw-r--r--test/CMakeLists.txt42
-rw-r--r--test/CMakeVFDTests.cmake34
-rw-r--r--test/Makefile.am14
-rw-r--r--test/ShellTests.cmake9
-rw-r--r--test/cache_api.c2
-rw-r--r--test/links.c4
-rw-r--r--test/objcopy.c6
-rw-r--r--test/test_usecases.sh.in27
-rw-r--r--test/testflushrefresh.sh.in24
-rw-r--r--test/testswmr.sh.in3
-rw-r--r--test/testvdsswmr.sh.in5
-rw-r--r--test/tunicode.c2
-rw-r--r--testpar/CMakeVFDTests.cmake34
-rw-r--r--tools/lib/h5diff_array.c4
-rw-r--r--tools/test/h5diff/testh5diff.sh.in32
-rw-r--r--tools/test/h5dump/CMakeVFDTests.cmake19
-rw-r--r--tools/test/h5dump/testh5dumpvds.sh.in21
-rw-r--r--tools/test/h5ls/testh5ls.sh.in16
-rw-r--r--tools/test/h5ls/testh5lsvds.sh.in10
-rw-r--r--tools/test/h5repack/CMakeVFDTests.cmake32
-rw-r--r--tools/test/h5repack/h5repack.sh.in13
-rw-r--r--utils/CMakeLists.txt76
-rw-r--r--utils/Makefile.am19
-rw-r--r--utils/test/CMakeLists.txt38
-rw-r--r--utils/test/Makefile.am34
-rw-r--r--utils/test/swmr_check_compat_vfd.c (renamed from utils/swmr_compat_vfd.c)0
-rw-r--r--utils/test/vds_elink_compat_vol.c (renamed from utils/vds_elink_compat_vol.c)0
114 files changed, 676 insertions, 1207 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 662d050..2b5ff7f 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -137,78 +137,75 @@ mark_as_advanced (ALLOW_UNSUPPORTED)
#-----------------------------------------------------------------------------
# Set the core names of all the libraries
#-----------------------------------------------------------------------------
-set (HDF5_LIB_CORENAME "hdf5${HDF5_LIB_INFIX}")
-set (HDF5_TEST_LIB_CORENAME "hdf5${HDF5_LIB_INFIX}_test")
-set (HDF5_CPP_LIB_CORENAME "hdf5${HDF5_LIB_INFIX}_cpp")
-set (HDF5_HL_LIB_CORENAME "hdf5${HDF5_LIB_INFIX}_hl")
-set (HDF5_HL_CPP_LIB_CORENAME "hdf5${HDF5_LIB_INFIX}_hl_cpp")
-set (HDF5_TOOLS_LIB_CORENAME "hdf5${HDF5_LIB_INFIX}_tools")
-set (HDF5_UTILS_LIB_CORENAME "hdf5${HDF5_LIB_INFIX}_utils")
-set (HDF5_F90_LIB_CORENAME "hdf5${HDF5_LIB_INFIX}_fortran")
-set (HDF5_F90_C_LIB_CORENAME "hdf5${HDF5_LIB_INFIX}_f90cstub")
-set (HDF5_F90_TEST_LIB_CORENAME "hdf5${HDF5_LIB_INFIX}_test_fortran")
-set (HDF5_F90_C_TEST_LIB_CORENAME "hdf5${HDF5_LIB_INFIX}_test_f90cstub")
-set (HDF5_HL_F90_LIB_CORENAME "hdf5${HDF5_LIB_INFIX}_hl_fortran")
-set (HDF5_HL_F90_C_LIB_CORENAME "hdf5${HDF5_LIB_INFIX}_hl_f90cstub")
-set (HDF5_JAVA_JNI_LIB_CORENAME "hdf5${HDF5_LIB_INFIX}_java")
-set (HDF5_JAVA_JNI_TEST_LIB_CORENAME "hdf5${HDF5_LIB_INFIX}_java_test")
-set (HDF5_JAVA_HDF5_LIB_CORENAME "jarhdf5")
-set (HDF5_JAVA_TEST_LIB_CORENAME "jartest5")
+set (HDF5_LIB_CORENAME "hdf5${HDF5_LIB_INFIX}")
+set (HDF5_TEST_LIB_CORENAME "hdf5${HDF5_LIB_INFIX}_test")
+set (HDF5_CPP_LIB_CORENAME "hdf5${HDF5_LIB_INFIX}_cpp")
+set (HDF5_HL_LIB_CORENAME "hdf5${HDF5_LIB_INFIX}_hl")
+set (HDF5_HL_CPP_LIB_CORENAME "hdf5${HDF5_LIB_INFIX}_hl_cpp")
+set (HDF5_TOOLS_LIB_CORENAME "hdf5${HDF5_LIB_INFIX}_tools")
+set (HDF5_UTILS_LIB_CORENAME "hdf5${HDF5_LIB_INFIX}_utils")
+set (HDF5_F90_LIB_CORENAME "hdf5${HDF5_LIB_INFIX}_fortran")
+set (HDF5_F90_C_LIB_CORENAME "hdf5${HDF5_LIB_INFIX}_f90cstub")
+set (HDF5_F90_TEST_LIB_CORENAME "hdf5${HDF5_LIB_INFIX}_test_fortran")
+set (HDF5_F90_C_TEST_LIB_CORENAME "hdf5${HDF5_LIB_INFIX}_test_f90cstub")
+set (HDF5_HL_F90_LIB_CORENAME "hdf5${HDF5_LIB_INFIX}_hl_fortran")
+set (HDF5_HL_F90_C_LIB_CORENAME "hdf5${HDF5_LIB_INFIX}_hl_f90cstub")
+set (HDF5_JAVA_JNI_LIB_CORENAME "hdf5${HDF5_LIB_INFIX}_java")
+set (HDF5_JAVA_HDF5_LIB_CORENAME "jarhdf5")
+set (HDF5_JAVA_TEST_LIB_CORENAME "jartest5")
#-----------------------------------------------------------------------------
# Set the true names of all the libraries if customized by external project
#-----------------------------------------------------------------------------
-set (HDF5_LIB_NAME "${HDF5_EXTERNAL_LIB_PREFIX}${HDF5_LIB_CORENAME}")
-set (HDF5_TEST_LIB_NAME "${HDF5_EXTERNAL_LIB_PREFIX}${HDF5_TEST_LIB_CORENAME}")
-set (HDF5_CPP_LIB_NAME "${HDF5_EXTERNAL_LIB_PREFIX}${HDF5_CPP_LIB_CORENAME}")
-set (HDF5_HL_LIB_NAME "${HDF5_EXTERNAL_LIB_PREFIX}${HDF5_HL_LIB_CORENAME}")
-set (HDF5_HL_CPP_LIB_NAME "${HDF5_EXTERNAL_LIB_PREFIX}${HDF5_HL_CPP_LIB_CORENAME}")
-set (HDF5_TOOLS_LIB_NAME "${HDF5_EXTERNAL_LIB_PREFIX}${HDF5_TOOLS_LIB_CORENAME}")
-set (HDF5_UTILS_LIB_NAME "${HDF5_EXTERNAL_LIB_PREFIX}${HDF5_UTILS_LIB_CORENAME}")
-set (HDF5_F90_LIB_NAME "${HDF5_EXTERNAL_LIB_PREFIX}${HDF5_F90_LIB_CORENAME}")
-set (HDF5_F90_C_LIB_NAME "${HDF5_EXTERNAL_LIB_PREFIX}${HDF5_F90_C_LIB_CORENAME}")
-set (HDF5_F90_TEST_LIB_NAME "${HDF5_EXTERNAL_LIB_PREFIX}${HDF5_F90_TEST_LIB_CORENAME}")
-set (HDF5_F90_C_TEST_LIB_NAME "${HDF5_EXTERNAL_LIB_PREFIX}${HDF5_F90_C_TEST_LIB_CORENAME}")
-set (HDF5_HL_F90_LIB_NAME "${HDF5_EXTERNAL_LIB_PREFIX}${HDF5_HL_F90_LIB_CORENAME}")
-set (HDF5_HL_F90_C_LIB_NAME "${HDF5_EXTERNAL_LIB_PREFIX}${HDF5_HL_F90_C_LIB_CORENAME}")
-set (HDF5_JAVA_JNI_LIB_NAME "${HDF5_EXTERNAL_LIB_PREFIX}${HDF5_JAVA_JNI_LIB_CORENAME}")
-set (HDF5_JAVA_JNI_TEST_LIB_NAME "${HDF5_EXTERNAL_LIB_PREFIX}${HDF5_JAVA_JNI_TEST_LIB_CORENAME}")
-set (HDF5_JAVA_HDF5_LIB_NAME "${HDF5_EXTERNAL_LIB_PREFIX}${HDF5_JAVA_HDF5_LIB_CORENAME}")
-set (HDF5_JAVA_TEST_LIB_NAME "${HDF5_EXTERNAL_LIB_PREFIX}${HDF5_JAVA_TEST_LIB_CORENAME}")
+set (HDF5_LIB_NAME "${HDF5_EXTERNAL_LIB_PREFIX}${HDF5_LIB_CORENAME}")
+set (HDF5_TEST_LIB_NAME "${HDF5_EXTERNAL_LIB_PREFIX}${HDF5_TEST_LIB_CORENAME}")
+set (HDF5_CPP_LIB_NAME "${HDF5_EXTERNAL_LIB_PREFIX}${HDF5_CPP_LIB_CORENAME}")
+set (HDF5_HL_LIB_NAME "${HDF5_EXTERNAL_LIB_PREFIX}${HDF5_HL_LIB_CORENAME}")
+set (HDF5_HL_CPP_LIB_NAME "${HDF5_EXTERNAL_LIB_PREFIX}${HDF5_HL_CPP_LIB_CORENAME}")
+set (HDF5_TOOLS_LIB_NAME "${HDF5_EXTERNAL_LIB_PREFIX}${HDF5_TOOLS_LIB_CORENAME}")
+set (HDF5_UTILS_LIB_NAME "${HDF5_EXTERNAL_LIB_PREFIX}${HDF5_UTILS_LIB_CORENAME}")
+set (HDF5_F90_LIB_NAME "${HDF5_EXTERNAL_LIB_PREFIX}${HDF5_F90_LIB_CORENAME}")
+set (HDF5_F90_C_LIB_NAME "${HDF5_EXTERNAL_LIB_PREFIX}${HDF5_F90_C_LIB_CORENAME}")
+set (HDF5_F90_TEST_LIB_NAME "${HDF5_EXTERNAL_LIB_PREFIX}${HDF5_F90_TEST_LIB_CORENAME}")
+set (HDF5_F90_C_TEST_LIB_NAME "${HDF5_EXTERNAL_LIB_PREFIX}${HDF5_F90_C_TEST_LIB_CORENAME}")
+set (HDF5_HL_F90_LIB_NAME "${HDF5_EXTERNAL_LIB_PREFIX}${HDF5_HL_F90_LIB_CORENAME}")
+set (HDF5_HL_F90_C_LIB_NAME "${HDF5_EXTERNAL_LIB_PREFIX}${HDF5_HL_F90_C_LIB_CORENAME}")
+set (HDF5_JAVA_JNI_LIB_NAME "${HDF5_EXTERNAL_LIB_PREFIX}${HDF5_JAVA_JNI_LIB_CORENAME}")
+set (HDF5_JAVA_HDF5_LIB_NAME "${HDF5_EXTERNAL_LIB_PREFIX}${HDF5_JAVA_HDF5_LIB_CORENAME}")
+set (HDF5_JAVA_TEST_LIB_NAME "${HDF5_EXTERNAL_LIB_PREFIX}${HDF5_JAVA_TEST_LIB_CORENAME}")
#-----------------------------------------------------------------------------
# Set the target names of all the libraries
#-----------------------------------------------------------------------------
-set (HDF5_LIB_TARGET "${HDF5_LIB_CORENAME}-static")
-set (HDF5_TEST_LIB_TARGET "${HDF5_TEST_LIB_CORENAME}-static")
-set (HDF5_CPP_LIB_TARGET "${HDF5_CPP_LIB_CORENAME}-static")
-set (HDF5_HL_LIB_TARGET "${HDF5_HL_LIB_CORENAME}-static")
-set (HDF5_HL_CPP_LIB_TARGET "${HDF5_HL_CPP_LIB_CORENAME}-static")
-set (HDF5_TOOLS_LIB_TARGET "${HDF5_TOOLS_LIB_CORENAME}-static")
-set (HDF5_UTILS_LIB_TARGET "${HDF5_UTILS_LIB_CORENAME}-static")
-set (HDF5_F90_LIB_TARGET "${HDF5_F90_LIB_CORENAME}-static")
-set (HDF5_F90_C_LIB_TARGET "${HDF5_F90_C_LIB_CORENAME}-static")
-set (HDF5_F90_TEST_LIB_TARGET "${HDF5_F90_TEST_LIB_CORENAME}-static")
-set (HDF5_F90_C_TEST_LIB_TARGET "${HDF5_F90_C_TEST_LIB_CORENAME}-static")
-set (HDF5_HL_F90_LIB_TARGET "${HDF5_HL_F90_LIB_CORENAME}-static")
-set (HDF5_HL_F90_C_LIB_TARGET "${HDF5_HL_F90_C_LIB_CORENAME}-static")
-set (HDF5_JAVA_JNI_LIB_TARGET "${HDF5_JAVA_JNI_LIB_CORENAME}")
-set (HDF5_JAVA_JNI_TEST_LIB_TARGET "${HDF5_JAVA_JNI_TEST_LIB_CORENAME}")
-set (HDF5_JAVA_HDF5_LIB_TARGET "${HDF5_JAVA_HDF5_LIB_CORENAME}")
-set (HDF5_JAVA_TEST_LIB_TARGET "${HDF5_JAVA_TEST_LIB_CORENAME}")
-set (HDF5_LIBSH_TARGET "${HDF5_LIB_CORENAME}-shared")
-set (HDF5_TEST_LIBSH_TARGET "${HDF5_TEST_LIB_CORENAME}-shared")
-set (HDF5_CPP_LIBSH_TARGET "${HDF5_CPP_LIB_CORENAME}-shared")
-set (HDF5_HL_LIBSH_TARGET "${HDF5_HL_LIB_CORENAME}-shared")
-set (HDF5_HL_CPP_LIBSH_TARGET "${HDF5_HL_CPP_LIB_CORENAME}-shared")
-set (HDF5_TOOLS_LIBSH_TARGET "${HDF5_TOOLS_LIB_CORENAME}-shared")
-set (HDF5_UTILS_LIBSH_TARGET "${HDF5_UTILS_LIB_CORENAME}-shared")
-set (HDF5_F90_LIBSH_TARGET "${HDF5_F90_LIB_CORENAME}-shared")
-set (HDF5_F90_C_LIBSH_TARGET "${HDF5_F90_C_LIB_CORENAME}-shared")
-set (HDF5_F90_TEST_LIBSH_TARGET "${HDF5_F90_TEST_LIB_CORENAME}-shared")
-set (HDF5_F90_C_TEST_LIBSH_TARGET "${HDF5_F90_C_TEST_LIB_CORENAME}-shared")
-set (HDF5_HL_F90_LIBSH_TARGET "${HDF5_HL_F90_LIB_CORENAME}-shared")
-set (HDF5_HL_F90_C_LIBSH_TARGET "${HDF5_HL_F90_C_LIB_CORENAME}-shared")
+set (HDF5_LIB_TARGET "${HDF5_LIB_CORENAME}-static")
+set (HDF5_TEST_LIB_TARGET "${HDF5_TEST_LIB_CORENAME}-static")
+set (HDF5_CPP_LIB_TARGET "${HDF5_CPP_LIB_CORENAME}-static")
+set (HDF5_HL_LIB_TARGET "${HDF5_HL_LIB_CORENAME}-static")
+set (HDF5_HL_CPP_LIB_TARGET "${HDF5_HL_CPP_LIB_CORENAME}-static")
+set (HDF5_TOOLS_LIB_TARGET "${HDF5_TOOLS_LIB_CORENAME}-static")
+set (HDF5_UTILS_LIB_TARGET "${HDF5_UTILS_LIB_CORENAME}-static")
+set (HDF5_F90_LIB_TARGET "${HDF5_F90_LIB_CORENAME}-static")
+set (HDF5_F90_C_LIB_TARGET "${HDF5_F90_C_LIB_CORENAME}-static")
+set (HDF5_F90_TEST_LIB_TARGET "${HDF5_F90_TEST_LIB_CORENAME}-static")
+set (HDF5_F90_C_TEST_LIB_TARGET "${HDF5_F90_C_TEST_LIB_CORENAME}-static")
+set (HDF5_HL_F90_LIB_TARGET "${HDF5_HL_F90_LIB_CORENAME}-static")
+set (HDF5_HL_F90_C_LIB_TARGET "${HDF5_HL_F90_C_LIB_CORENAME}-static")
+set (HDF5_JAVA_JNI_LIB_TARGET "${HDF5_JAVA_JNI_LIB_CORENAME}")
+set (HDF5_JAVA_HDF5_LIB_TARGET "${HDF5_JAVA_HDF5_LIB_CORENAME}")
+set (HDF5_JAVA_TEST_LIB_TARGET "${HDF5_JAVA_TEST_LIB_CORENAME}")
+set (HDF5_LIBSH_TARGET "${HDF5_LIB_CORENAME}-shared")
+set (HDF5_TEST_LIBSH_TARGET "${HDF5_TEST_LIB_CORENAME}-shared")
+set (HDF5_CPP_LIBSH_TARGET "${HDF5_CPP_LIB_CORENAME}-shared")
+set (HDF5_HL_LIBSH_TARGET "${HDF5_HL_LIB_CORENAME}-shared")
+set (HDF5_HL_CPP_LIBSH_TARGET "${HDF5_HL_CPP_LIB_CORENAME}-shared")
+set (HDF5_TOOLS_LIBSH_TARGET "${HDF5_TOOLS_LIB_CORENAME}-shared")
+set (HDF5_UTILS_LIBSH_TARGET "${HDF5_UTILS_LIB_CORENAME}-shared")
+set (HDF5_F90_LIBSH_TARGET "${HDF5_F90_LIB_CORENAME}-shared")
+set (HDF5_F90_C_LIBSH_TARGET "${HDF5_F90_C_LIB_CORENAME}-shared")
+set (HDF5_F90_TEST_LIBSH_TARGET "${HDF5_F90_TEST_LIB_CORENAME}-shared")
+set (HDF5_F90_C_TEST_LIBSH_TARGET "${HDF5_F90_C_TEST_LIB_CORENAME}-shared")
+set (HDF5_HL_F90_LIBSH_TARGET "${HDF5_HL_F90_LIB_CORENAME}-shared")
+set (HDF5_HL_F90_C_LIBSH_TARGET "${HDF5_HL_F90_C_LIB_CORENAME}-shared")
#-----------------------------------------------------------------------------
# Define some CMake variables for use later in the project
@@ -949,6 +946,9 @@ if (BUILD_TESTING)
if (HDF5_TEST_VFD)
option (HDF5_TEST_FHEAP_VFD "Execute tests with different VFDs" ON)
mark_as_advanced (HDF5_TEST_FHEAP_VFD)
+
+ # Initialize the list of VFDs to be used for testing and create a test folder for each VFD
+ H5_SET_VFD_LIST()
endif ()
option (HDF5_TEST_PASSTHROUGH_VOL "Execute tests with different passthrough VOL connectors" OFF)
@@ -1007,10 +1007,7 @@ endif ()
# Option to build HDF5 Utilities
#-----------------------------------------------------------------------------
if (EXISTS "${HDF5_SOURCE_DIR}/utils" AND IS_DIRECTORY "${HDF5_SOURCE_DIR}/utils")
- option (HDF5_BUILD_UTILS "Build HDF5 Utils" ON)
- if (HDF5_BUILD_UTILS)
- add_subdirectory (utils)
- endif ()
+ add_subdirectory (utils)
endif ()
#-----------------------------------------------------------------------------
diff --git a/MANIFEST b/MANIFEST
index 6db5e86..2cdeb24 100644
--- a/MANIFEST
+++ b/MANIFEST
@@ -159,7 +159,6 @@
./config/clang-warnings/error-general
./config/clang-warnings/general
./config/clang-warnings/no-developer-general
-./config/clang-warnings/noerror-general
./config/gnu-warnings/4.8-4.last
./config/gnu-warnings/4.8
./config/gnu-warnings/4.9
@@ -174,10 +173,9 @@
./config/gnu-warnings/cxx-4.9
./config/gnu-warnings/cxx-5
./config/gnu-warnings/cxx-9
+./config/gnu-warnings/cxx-developer-4.8
./config/gnu-warnings/cxx-error-5
./config/gnu-warnings/cxx-error-general
-./config/gnu-warnings/cxx-noerror-5
-./config/gnu-warnings/cxx-noerror-general
./config/gnu-warnings/developer-4.8
./config/gnu-warnings/developer-7
./config/gnu-warnings/developer-8
@@ -192,12 +190,10 @@
./config/gnu-warnings/gfort-5
./config/gnu-warnings/gfort-6
./config/gnu-warnings/gfort-8
+./config/gnu-warnings/no-cxx-developer-4.8
./config/gnu-warnings/no-developer-4.8
./config/gnu-warnings/no-developer-8
./config/gnu-warnings/no-developer-general
-./config/gnu-warnings/noerror-5
-./config/gnu-warnings/noerror-8
-./config/gnu-warnings/noerror-general
./config/intel-warnings/15
./config/intel-warnings/18
./config/intel-warnings/developer-general
@@ -2985,8 +2981,6 @@
# Utils directory
./utils/Makefile.am
-./utils/swmr_compat_vfd.c
-./utils/vds_elink_compat_vol.c
# Mirror VFD utilities
./utils/mirror_vfd/Makefile.am
@@ -2996,6 +2990,11 @@
./utils/mirror_vfd/mirror_server_stop.c
./utils/mirror_vfd/mirror_writer.c
+# test utilities
+./utils/test/Makefile.am
+./utils/test/swmr_check_compat_vfd.c
+./utils/test/vds_elink_compat_vol.c
+
# high level libraries
./hl/Makefile.am
./hl/examples/Makefile.am
@@ -3107,7 +3106,6 @@
./hl/tools/h5watch/extend_dset.c
./hl/tools/h5watch/h5watch.c
./hl/tools/h5watch/h5watchgentest.c
-./hl/tools/h5watch/swmr_check_compat_vfd.c
./hl/tools/h5watch/testh5watch.sh.in
# expected test output from testing h5watch
@@ -3732,7 +3730,9 @@
./tools/test/misc/vds/CMakeLists.txt
./tools/test/perform/CMakeLists.txt
./tools/test/perform/CMakeTests.cmake
+
./utils/CMakeLists.txt
+./utils/test/CMakeLists.txt
./utils/mirror_vfd/CMakeLists.txt
# CMake-specific User Scripts
@@ -3848,3 +3848,4 @@
./tools/test/perform/Makefile.in
./utils/Makefile.in
./utils/mirror_vfd/Makefile.in
+./utils/test/Makefile.in
diff --git a/c++/test/CMakeVFDTests.cmake b/c++/test/CMakeVFDTests.cmake
index 6a74244..4f3d137 100644
--- a/c++/test/CMakeVFDTests.cmake
+++ b/c++/test/CMakeVFDTests.cmake
@@ -16,38 +16,6 @@
##############################################################################
##############################################################################
-set (VFD_LIST
- sec2
- stdio
- core
- core_paged
- split
- multi
- family
- splitter
- #log - log VFD currently has file space allocation bugs
-)
-
-if (H5_HAVE_DIRECT)
- set (VFD_LIST ${VFD_LIST} direct)
-endif ()
-if (H5_HAVE_PARALLEL)
- # MPI I/O VFD is currently incompatible with too many tests in the VFD test set
- # set (VFD_LIST ${VFD_LIST} mpio)
-endif ()
-if (H5_HAVE_MIRROR_VFD)
- set (VFD_LIST ${VFD_LIST} mirror)
-endif ()
-if (H5_HAVE_ROS3_VFD)
- set (VFD_LIST ${VFD_LIST} ros3)
-endif ()
-if (H5_HAVE_LIBHDFS)
- set (VFD_LIST ${VFD_LIST} hdfs)
-endif ()
-if (H5_HAVE_WINDOWS)
- set (VFD_LIST ${VFD_LIST} windows)
-endif ()
-
##############################################################################
##############################################################################
### T H E T E S T S M A C R O S ###
@@ -56,7 +24,6 @@ endif ()
macro (ADD_VFD_TEST vfdname resultcode)
if (NOT HDF5_ENABLE_USING_MEMCHECKER)
- file (MAKE_DIRECTORY "${PROJECT_BINARY_DIR}/${vfdname}")
add_test (
NAME CPP_VFD-${vfdname}-cpp_testhdf5-clear-objects
COMMAND ${CMAKE_COMMAND} -E remove
diff --git a/config/clang-cxxflags b/config/clang-cxxflags
index c585ce7..76f095f 100644
--- a/config/clang-cxxflags
+++ b/config/clang-cxxflags
@@ -20,15 +20,15 @@
#
# For now, do not promote any warnings to errors.
#
-PROMOTE_ERRORS_DFLT=no
+WARNINGS_AS_ERRORS_DFLT=no
#
# This filter rewrites -Werror= as -W, in that way demoting warnings
-# promoted to errors back to warnings, if PROMOTE_ERRORS is no.
+# promoted to errors back to warnings, if WARNINGS_AS_ERRORS is no.
#
demote_errors()
{
- if [ ${PROMOTE_ERRORS:-${PROMOTE_ERRORS_DFLT}} = no ]; then
+ if [ ${WARNINGS_AS_ERRORS:-${WARNINGS_AS_ERRORS_DFLT}} = no ]; then
sed 's,-Werror=,-W,g'
else
cat
@@ -44,7 +44,7 @@ demote_errors()
load_clang_arguments()
{
set -- $(for arg; do
- sed 's,#.*$,,' $srcdir/config/clang-warnings/${arg}
+ sed 's,#.*$,,' $srcdir/config/clang-warnings/${arg} | demote_errors
done)
IFS=' ' echo "$*"
}
@@ -161,7 +161,6 @@ if test "X-clang" = "X-$cxx_vendor" -o "X-Apple LLVM" = "X-$cxx_vendor"; then
H5_CXXFLAGS="$H5_CXXFLAGS $(load_clang_arguments general)"
H5_ECXXFLAGS="$H5_ECXXFLAGS $(load_clang_arguments error-general)"
- H5_NECXXFLAGS="$H5_NECXXFLAGS $(load_clang_arguments noerror-general)"
######################
# Developer warnings #
diff --git a/config/clang-flags b/config/clang-flags
index 92a8973..5c377ed 100644
--- a/config/clang-flags
+++ b/config/clang-flags
@@ -20,15 +20,15 @@
#
# For now, do not promote any warnings to errors.
#
-PROMOTE_ERRORS_DFLT=no
+WARNINGS_AS_ERRORS_DFLT=no
#
# This filter rewrites -Werror= as -W, in that way demoting warnings
-# promoted to errors back to warnings, if PROMOTE_ERRORS is no.
+# promoted to errors back to warnings, if WARNINGS_AS_ERRORS is no.
#
demote_errors()
{
- if [ ${PROMOTE_ERRORS:-${PROMOTE_ERRORS_DFLT}} = no ]; then
+ if [ ${WARNINGS_AS_ERRORS:-${WARNINGS_AS_ERRORS_DFLT}} = no ]; then
sed 's,-Werror=,-W,g'
else
cat
@@ -44,7 +44,7 @@ demote_errors()
load_clang_arguments()
{
set -- $(for arg; do
- sed 's,#.*$,,' $srcdir/config/clang-warnings/${arg}
+ sed 's,#.*$,,' $srcdir/config/clang-warnings/${arg} | demote_errors
done)
IFS=' ' echo "$*"
}
@@ -183,7 +183,6 @@ if test "X-clang" = "X-$cc_vendor" -o "X-Apple LLVM" = "X-$cc_vendor"; then
H5_CFLAGS="$H5_CFLAGS $(load_clang_arguments general)"
H5_ECFLAGS="$H5_ECFLAGS $(load_clang_arguments error-general)"
- H5_NECFLAGS="$H5_NECFLAGS $(load_clang_arguments noerror-general)"
######################
# Developer warnings #
diff --git a/config/clang-warnings/noerror-general b/config/clang-warnings/noerror-general
deleted file mode 100644
index 4690ebd..0000000
--- a/config/clang-warnings/noerror-general
+++ /dev/null
@@ -1,82 +0,0 @@
-#
-# These warnings will be treated as errors, using the error-general file,
-# when HDF5_ENABLE_WARNINGS_AS_ERRORS is set to true for CMake or
-# the --enable-warnings-as-errors option is specified for configure.
-# Otherwise this file will be used to treat them as warnings.
-#
--Wbad-function-cast
--Wimplicit-function-declaration
--Wincompatible-pointer-types
--Wmissing-declarations
--Wpacked
--Wshadow
--Wswitch
-#
-# NOTE: Following files are not compatible with incompatible-pointer-types as errors
-# src/H5Dchunk.c,src/H5Dint.c,src/H5Gint.c,src/H5HFcache.c,src/H5I.c,src/H5T.c
--Wno-error=incompatible-pointer-types-discards-qualifiers
-#
-#
-# NOTE: File Driver files are not compatible with these warnings as errors
-# H5FDdirect.c,H5FDmpio.c,H5FDros3.c,
-# -Werror=unused-function
-#
--Wunused-function
-#
-# H5FDdrvr_module.h
-# -Werror=unused-variable
-#
--Wunused-variable
-#
-# H5VLpassthru.c
-# -Werror=unused-parameter
-#
--Wunused-parameter
-#
-#
-#
-# NOTE: Tools files are not compatible with these warnings as errors
-# lib/h5tools.c
-# -Werror=cast-align
-#
--Wcast-align
-#
-# lib/h5tools_utils.c
-# -Werror=unused-parameter
-#
-#
-# NOTE: JNI files are not compatible with these warnings as errors
-# jni/h5pDCPLImp.c,jni/nativeData.c,jni/h5util.c,jni/h5rImp.c
-# jni/h5sImp.c,jni/h5tImp.c
-# -Werror=cast-align
-# jni/h5util.c
-# -Werror=format(-overflow)
-#
--Wformat
-#
-#
-#Examples and tests do not use the same set of extensive warning flags as libraries
-# Here is a list of tests and examples that have issues with the stricter warnings as error
-#
-# NOTE: Test files are not compatible with these warnings as errors
-# thread_id.c,
-# -Werror=unused-function
-# dsets.c
-# -Werror=unused-parameter
-#
-#
-# NOTE: Examples files are not compatible with these warnings as errors
-# h5_vds-eiger.c,h5_vds-exclim.c,h5_vds.c,h5_vds-exc.c,h5_vds-percival-unlim-maxmin.c
-# h5_vds-percival.c,h5_read.c,h5_rdwt.c,h5_mount.c,h5_extend.c,h5_extend_write.c
-# h5_write.c,h5_vds-simpleIO.c,h5_ref2reg_deprec.c,h5_crtgrp.c,h5_select.c
-# h5_vds-percival-unlim.c,h5_crtatt.c,h5_group.c,h5_attribute.c,h5_crtdat.c
-# h5_reference_deprec.c
-# h5_rdwt.c,h5_crtgrp.c,h5_crtatt.c,h5_crtdat.c
-# -Werror=strict-prototypes
-# h5_rdwt.c,h5_crtgrp.c,h5_crtatt.c,h5_crtdat.c
-# -Werror=old-style-definition
-# h5_vds-exclim.c,h5_vds.c,h5_vds-exc.c,
-# -Werror=unused-variable
-# h5_elink_unix2win.c,h5_extlink.c,h5_attribute.c
-# -Werror=unused-parameter
-
diff --git a/config/cmake/HDF5Macros.cmake b/config/cmake/HDF5Macros.cmake
index 090524a..1a0e8b3 100644
--- a/config/cmake/HDF5Macros.cmake
+++ b/config/cmake/HDF5Macros.cmake
@@ -58,5 +58,43 @@ macro (H5_SET_LIB_OPTIONS libtarget libname libtype libpackage)
endif ()
endif ()
endif ()
+endmacro ()
+
+# Initialize the list of VFDs to be used for testing and create a test folder for each VFD
+macro (H5_SET_VFD_LIST)
+ set (VFD_LIST
+ sec2
+ stdio
+ core
+ core_paged
+ split
+ multi
+ family
+ splitter
+ #log - log VFD currently has file space allocation bugs
+ )
+
+ if (H5_HAVE_DIRECT)
+ set (VFD_LIST ${VFD_LIST} direct)
+ endif ()
+ if (H5_HAVE_PARALLEL)
+ # MPI I/O VFD is currently incompatible with too many tests in the VFD test set
+ # set (VFD_LIST ${VFD_LIST} mpio)
+ endif ()
+ if (H5_HAVE_MIRROR_VFD)
+ set (VFD_LIST ${VFD_LIST} mirror)
+ endif ()
+ if (H5_HAVE_ROS3_VFD)
+ set (VFD_LIST ${VFD_LIST} ros3)
+ endif ()
+ if (H5_HAVE_LIBHDFS)
+ set (VFD_LIST ${VFD_LIST} hdfs)
+ endif ()
+ if (H5_HAVE_WINDOWS)
+ set (VFD_LIST ${VFD_LIST} windows)
+ endif ()
+ foreach (vfdtest ${VFD_LIST})
+ file (MAKE_DIRECTORY "${PROJECT_BINARY_DIR}/${vfdtest}")
+ endforeach ()
endmacro ()
diff --git a/config/cmake/HDFCXXCompilerFlags.cmake b/config/cmake/HDFCXXCompilerFlags.cmake
index e76150f..a5af43c 100644
--- a/config/cmake/HDFCXXCompilerFlags.cmake
+++ b/config/cmake/HDFCXXCompilerFlags.cmake
@@ -133,11 +133,7 @@ else ()
AND CMAKE_CXX_COMPILER_VERSION VERSION_GREATER_EQUAL 4.8)
# add the general CXX flags for g++ compiler versions 4.8 and above.
ADD_H5_FLAGS (HDF5_CMAKE_CXX_FLAGS "${HDF5_SOURCE_DIR}/config/gnu-warnings/cxx-general")
- if (HDF5_ENABLE_WARNINGS_AS_ERRORS)
- ADD_H5_FLAGS (H5_CXXFLAGS "${HDF5_SOURCE_DIR}/config/gnu-warnings/cxx-error-general")
- else ()
- ADD_H5_FLAGS (H5_CXXFLAGS "${HDF5_SOURCE_DIR}/config/gnu-warnings/cxx-noerror-general")
- endif ()
+ ADD_H5_FLAGS (H5_CXXFLAGS "${HDF5_SOURCE_DIR}/config/gnu-warnings/cxx-error-general")
endif ()
elseif (CMAKE_CXX_COMPILER_ID MATCHES "[Cc]lang")
ADD_H5_FLAGS (HDF5_CMAKE_CXX_FLAGS "${HDF5_SOURCE_DIR}/config/clang-warnings/general")
@@ -185,9 +181,9 @@ if (CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
ADD_H5_FLAGS (H5_CXXFLAGS "${HDF5_SOURCE_DIR}/config/gnu-warnings/cxx-4.8")
if (HDF5_ENABLE_DEV_WARNINGS)
# Use the C warnings as CXX warnings are the same
- ADD_H5_FLAGS (H5_CXXFLAGS "${HDF5_SOURCE_DIR}/config/gnu-warnings/developer-4.8")
+ ADD_H5_FLAGS (H5_CXXFLAGS "${HDF5_SOURCE_DIR}/config/gnu-warnings/cxx-developer-4.8")
else ()
- ADD_H5_FLAGS (H5_CXXFLAGS "${HDF5_SOURCE_DIR}/config/gnu-warnings/no-developer-4.8")
+ ADD_H5_FLAGS (H5_CXXFLAGS "${HDF5_SOURCE_DIR}/config/gnu-warnings/no-cxx-developer-4.8")
endif ()
endif ()
@@ -201,11 +197,7 @@ if (CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
if (NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS 5.0)
# autotools always add the C flags with the CXX flags
ADD_H5_FLAGS (H5_CXXFLAGS "${HDF5_SOURCE_DIR}/config/gnu-warnings/cxx-5")
- if (HDF5_ENABLE_WARNINGS_AS_ERRORS)
- ADD_H5_FLAGS (H5_CXXFLAGS "${HDF5_SOURCE_DIR}/config/gnu-warnings/cxx-error-5")
- else ()
- ADD_H5_FLAGS (H5_CXXFLAGS "${HDF5_SOURCE_DIR}/config/gnu-warnings/cxx-noerror-5")
- endif ()
+ ADD_H5_FLAGS (H5_CXXFLAGS "${HDF5_SOURCE_DIR}/config/gnu-warnings/cxx-error-5")
endif ()
# Append more extra warning flags that only gcc 6.x+ knows about
@@ -230,11 +222,7 @@ if (CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
if (NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS 8.0)
# Use the C warnings as CXX warnings are the same
ADD_H5_FLAGS (H5_CXXFLAGS "${HDF5_SOURCE_DIR}/config/gnu-warnings/8")
- if (HDF5_ENABLE_WARNINGS_AS_ERRORS)
- ADD_H5_FLAGS (H5_CXXFLAGS "${HDF5_SOURCE_DIR}/config/gnu-warnings/error-8")
- else ()
- ADD_H5_FLAGS (H5_CXXFLAGS "${HDF5_SOURCE_DIR}/config/gnu-warnings/noerror-8")
- endif ()
+ ADD_H5_FLAGS (H5_CXXFLAGS "${HDF5_SOURCE_DIR}/config/gnu-warnings/error-8")
if (HDF5_ENABLE_DEV_WARNINGS)
# Use the C warnings as CXX warnings are the same
ADD_H5_FLAGS (H5_CXXFLAGS "${HDF5_SOURCE_DIR}/config/gnu-warnings/developer-8")
diff --git a/config/cmake/HDFCompilerFlags.cmake b/config/cmake/HDFCompilerFlags.cmake
index 210e475..eb43b73 100644
--- a/config/cmake/HDFCompilerFlags.cmake
+++ b/config/cmake/HDFCompilerFlags.cmake
@@ -153,22 +153,14 @@ else ()
# Add general CFlags for GCC versions 4.8 and above
if (CMAKE_C_COMPILER_VERSION VERSION_GREATER_EQUAL 4.8)
ADD_H5_FLAGS (HDF5_CMAKE_C_FLAGS "${HDF5_SOURCE_DIR}/config/gnu-warnings/general")
- if (HDF5_ENABLE_WARNINGS_AS_ERRORS)
- ADD_H5_FLAGS (H5_CFLAGS "${HDF5_SOURCE_DIR}/config/gnu-warnings/error-general")
- else ()
- ADD_H5_FLAGS (H5_CFLAGS "${HDF5_SOURCE_DIR}/config/gnu-warnings/noerror-general")
- endif ()
+ ADD_H5_FLAGS (H5_CFLAGS "${HDF5_SOURCE_DIR}/config/gnu-warnings/error-general")
endif ()
# gcc automatically inlines based on the optimization level
# this is just a failsafe
list (APPEND H5_CFLAGS "-finline-functions")
elseif (CMAKE_C_COMPILER_ID MATCHES "[Cc]lang")
ADD_H5_FLAGS (HDF5_CMAKE_C_FLAGS "${HDF5_SOURCE_DIR}/config/clang-warnings/general")
- if (HDF5_ENABLE_WARNINGS_AS_ERRORS)
- ADD_H5_FLAGS (H5_CFLAGS "${HDF5_SOURCE_DIR}/config/clang-warnings/error-general")
- else ()
- ADD_H5_FLAGS (H5_CFLAGS "${HDF5_SOURCE_DIR}/config/clang-warnings/noerror-general")
- endif ()
+ ADD_H5_FLAGS (H5_CFLAGS "${HDF5_SOURCE_DIR}/config/clang-warnings/error-general")
elseif (CMAKE_C_COMPILER_ID STREQUAL "PGI")
list (APPEND HDF5_CMAKE_C_FLAGS "-Minform=inform")
endif ()
@@ -228,11 +220,7 @@ if (CMAKE_C_COMPILER_ID STREQUAL "GNU")
# Append more extra warning flags that only gcc 5.x+ knows about
if (NOT CMAKE_C_COMPILER_VERSION VERSION_LESS 5.0)
ADD_H5_FLAGS (H5_CFLAGS "${HDF5_SOURCE_DIR}/config/gnu-warnings/5")
- if (HDF5_ENABLE_WARNINGS_AS_ERRORS)
- ADD_H5_FLAGS (H5_CFLAGS "${HDF5_SOURCE_DIR}/config/gnu-warnings/error-5")
- else ()
- ADD_H5_FLAGS (H5_CFLAGS "${HDF5_SOURCE_DIR}/config/gnu-warnings/error-5")
- endif ()
+ ADD_H5_FLAGS (H5_CFLAGS "${HDF5_SOURCE_DIR}/config/gnu-warnings/error-5")
endif ()
# Append more extra warning flags that only gcc 6.x+ knows about
@@ -253,9 +241,7 @@ if (CMAKE_C_COMPILER_ID STREQUAL "GNU")
# Append more extra warning flags that only gcc 8.x+ knows about
if (NOT CMAKE_C_COMPILER_VERSION VERSION_LESS 8.0)
ADD_H5_FLAGS (H5_CFLAGS "${HDF5_SOURCE_DIR}/config/gnu-warnings/8")
- if (HDF5_ENABLE_WARNINGS_AS_ERRORS)
- ADD_H5_FLAGS (H5_CFLAGS "${HDF5_SOURCE_DIR}/config/gnu-warnings/error-8")
- endif ()
+ ADD_H5_FLAGS (H5_CFLAGS "${HDF5_SOURCE_DIR}/config/gnu-warnings/error-8")
if (HDF5_ENABLE_DEV_WARNINGS)
ADD_H5_FLAGS (H5_CFLAGS "${HDF5_SOURCE_DIR}/config/gnu-warnings/developer-8")
else ()
diff --git a/config/cmake_ext_mod/HDFMacros.cmake b/config/cmake_ext_mod/HDFMacros.cmake
index ae0ebca..6da2b74 100644
--- a/config/cmake_ext_mod/HDFMacros.cmake
+++ b/config/cmake_ext_mod/HDFMacros.cmake
@@ -464,6 +464,9 @@ macro (ADD_H5_FLAGS h5_flag_var infile)
list (GET TEST_FLAG_STREAM ${line} str_flag)
string (REGEX REPLACE "^#.*" "" str_flag "${str_flag}")
#message (TRACE "str_flag=${str_flag}")
+ if (NOT HDF5_ENABLE_WARNINGS_AS_ERRORS)
+ string (REGEX REPLACE "-Werror=" "-W" str_flag "${str_flag}")
+ endif ()
if (str_flag)
list (APPEND ${h5_flag_var} "${str_flag}")
endif ()
diff --git a/config/commence.am b/config/commence.am
index d0b042f..3fddc6a 100644
--- a/config/commence.am
+++ b/config/commence.am
@@ -36,7 +36,6 @@ LIBH5F=$(top_builddir)/fortran/src/libhdf5_fortran.la
LIBH5FTEST=$(top_builddir)/fortran/test/libh5test_fortran.la
LIBH5CPP=$(top_builddir)/c++/src/libhdf5_cpp.la
LIBH5JNI=$(top_builddir)/java/src/jni/libhdf5_java.la
-LIBH5JNITEST=$(top_builddir)/java/src/jni/libhdf5_java_test.la
LIBH5TOOLS=$(top_builddir)/tools/lib/libh5tools.la
LIBH5_HL=$(top_builddir)/hl/src/libhdf5_hl.la
LIBH5F_HL=$(top_builddir)/hl/fortran/src/libhdf5hl_fortran.la
diff --git a/config/gnu-cxxflags b/config/gnu-cxxflags
index 9f11406..56e89bc 100644
--- a/config/gnu-cxxflags
+++ b/config/gnu-cxxflags
@@ -20,15 +20,15 @@
#
# For now, do not promote any warnings to errors.
#
-PROMOTE_ERRORS_DFLT=no
+WARNINGS_AS_ERRORS_DFLT=no
#
# This filter rewrites -Werror= as -W, in that way demoting warnings
-# promoted to errors back to warnings, if PROMOTE_ERRORS is no.
+# promoted to errors back to warnings, if WARNINGS_AS_ERRORS is no.
#
demote_errors()
{
- if [ ${PROMOTE_ERRORS:-${PROMOTE_ERRORS_DFLT}} = no ]; then
+ if [ ${WARNINGS_AS_ERRORS:-${WARNINGS_AS_ERRORS_DFLT}} = no ]; then
sed 's,-Werror=,-W,g'
else
cat
@@ -44,7 +44,7 @@ demote_errors()
load_gnu_arguments()
{
set -- $(for arg; do
- sed 's,#.*$,,' $srcdir/config/gnu-warnings/${arg}
+ sed 's,#.*$,,' $srcdir/config/gnu-warnings/${arg} | demote_errors
done)
IFS=' ' echo "$*"
}
@@ -192,7 +192,6 @@ if test "X-g++" = "X-$cxx_vendor"; then
if test $cxx_vers_major -eq 4 -a $cxx_vers_minor -ge 8 -o $cxx_vers_major -ge 5; then
H5_CXXFLAGS="$H5_CXXFLAGS $(load_gnu_arguments cxx-general)"
H5_ECXXFLAGS="$H5_ECXXFLAGS $(load_gnu_arguments cxx-error-general)"
- H5_NECXXFLAGS="$H5_NECXXFLAGS $(load_gnu_arguments cxx-noerror-general)"
######################
# Developer warnings #
@@ -222,8 +221,8 @@ if test "X-g++" = "X-$cxx_vendor"; then
if test $cxx_vers_major -ge 5 -o $cxx_vers_major -eq 4 -a $cxx_vers_minor -ge 8; then
H5_CXXFLAGS="$H5_CXXFLAGS $(load_gnu_arguments cxx-4.8)"
# Use the C warnings as CXX warnings are the same
- DEVELOPER_WARNING_CXXFLAGS="$DEVELOPER_WARNING_CXXFLAGS $(load_gnu_arguments developer-4.8)"
- NO_DEVELOPER_WARNING_CXXFLAGS="$NO_DEVELOPER_WARNING_CXXFLAGS $(load_gnu_arguments no-developer-4.8)"
+ DEVELOPER_WARNING_CXXFLAGS="$DEVELOPER_WARNING_CXXFLAGS $(load_gnu_arguments cxx-developer-4.8)"
+ NO_DEVELOPER_WARNING_CXXFLAGS="$NO_DEVELOPER_WARNING_CXXFLAGS $(load_gnu_arguments no-cxx-developer-4.8)"
fi
# gcc >= 4.9
@@ -235,7 +234,6 @@ if test "X-g++" = "X-$cxx_vendor"; then
if test $cxx_vers_major -ge 5; then
H5_CXXFLAGS="$H5_CXXFLAGS $(load_gnu_arguments cxx-5)"
H5_ECXXFLAGS="$H5_ECXXFLAGS $(load_gnu_arguments cxx-error-5)"
- H5_NECXXFLAGS="$H5_NECXXFLAGS $(load_gnu_arguments cxx-noerror-5)"
fi
# gcc >= 6
@@ -256,7 +254,6 @@ if test "X-g++" = "X-$cxx_vendor"; then
# Use the C warnings as CXX warnings are the same
H5_CXXFLAGS="$H5_CXXFLAGS $(load_gnu_arguments 8)"
#H5_ECXXFLAGS="$H5_ECXXFLAGS $(load_gnu_arguments error-8)"
- #H5_NECXXFLAGS="$H5_NECXXFLAGS $(load_gnu_arguments noerror-8)"
# Use the C warnings as CXX warnings are the same
DEVELOPER_WARNING_CXXFLAGS="$DEVELOPER_WARNING_CXXFLAGS $(load_gnu_arguments developer-8)"
NO_DEVELOPER_WARNING_CXXFLAGS="$NO_DEVELOPER_WARNING_CXXFLAGS $(load_gnu_arguments no-developer-8)"
diff --git a/config/gnu-flags b/config/gnu-flags
index 3e4ceb2..89239df 100644
--- a/config/gnu-flags
+++ b/config/gnu-flags
@@ -20,15 +20,15 @@
#
# For now, do not promote any warnings to errors.
#
-PROMOTE_ERRORS_DFLT=no
+WARNINGS_AS_ERRORS_DFLT=no
#
# This filter rewrites -Werror= as -W, in that way demoting warnings
-# promoted to errors back to warnings, if PROMOTE_ERRORS is no.
+# promoted to errors back to warnings, if WARNINGS_AS_ERRORS is no.
#
demote_errors()
{
- if [ ${PROMOTE_ERRORS:-${PROMOTE_ERRORS_DFLT}} = no ]; then
+ if [ ${WARNINGS_AS_ERRORS:-${WARNINGS_AS_ERRORS_DFLT}} = no ]; then
sed 's,-Werror=,-W,g'
else
cat
@@ -44,7 +44,7 @@ demote_errors()
load_gnu_arguments()
{
set -- $(for arg; do
- sed 's,#.*$,,' $srcdir/config/gnu-warnings/${arg}
+ sed 's,#.*$,,' $srcdir/config/gnu-warnings/${arg} | demote_errors
done)
IFS=' ' echo "$*"
}
@@ -205,7 +205,6 @@ if test "X-gcc" = "X-$cc_vendor"; then
if test $cc_vers_major -eq 4 -a $cc_vers_minor -ge 8 -o $cc_vers_major -gt 4; then
H5_CFLAGS="$H5_CFLAGS $(load_gnu_arguments general)"
H5_ECFLAGS="$H5_ECFLAGS $(load_gnu_arguments error-general)"
- H5_NECFLAGS="$H5_NECFLAGS $(load_gnu_arguments noerror-general)"
######################
# Developer warnings #
@@ -245,7 +244,6 @@ if test "X-gcc" = "X-$cc_vendor"; then
if test $cc_vers_major -ge 5; then
H5_CFLAGS="$H5_CFLAGS $(load_gnu_arguments 5)"
H5_ECFLAGS="$H5_ECFLAGS $(load_gnu_arguments error-5)"
- H5_NECFLAGS="$H5_NECFLAGS $(load_gnu_arguments noerror-5)"
fi
# gcc >= 6
@@ -263,7 +261,6 @@ if test "X-gcc" = "X-$cc_vendor"; then
if test $cc_vers_major -ge 8; then
H5_CFLAGS="$H5_CFLAGS $(load_gnu_arguments 8)"
H5_ECFLAGS="$H5_ECFLAGS $(load_gnu_arguments error-8)"
- H5_NECFLAGS="$H5_NECFLAGS $(load_gnu_arguments noerror-8)"
DEVELOPER_WARNING_CFLAGS="$DEVELOPER_WARNING_CFLAGS $(load_gnu_arguments developer-8)"
NO_DEVELOPER_WARNING_CFLAGS="$NO_DEVELOPER_WARNING_CFLAGS $(load_gnu_arguments no-developer-8)"
fi
diff --git a/config/gnu-warnings/cxx-developer-4.8 b/config/gnu-warnings/cxx-developer-4.8
new file mode 100644
index 0000000..e0d975f
--- /dev/null
+++ b/config/gnu-warnings/cxx-developer-4.8
@@ -0,0 +1,16 @@
+# developer warning flags added for GCC >= 4.5
+#
+# developer warning flag added for GCC >= 4.6
+-Wsuggest-attribute=const
+
+# developer warning flags added for GCC >= 4.7
+-Wsuggest-attribute=noreturn
+-Wsuggest-attribute=pure
+#
+# It's not clear that -Wvector-operation-performance warnings are
+# actionable, so they are demoted to "developer" warnings.
+#
+-Wvector-operation-performance
+
+# developer warning flag added for GCC >= 4.8
+-Wsuggest-attribute=format
diff --git a/config/gnu-warnings/cxx-noerror-5 b/config/gnu-warnings/cxx-noerror-5
deleted file mode 100644
index 7bce3e8..0000000
--- a/config/gnu-warnings/cxx-noerror-5
+++ /dev/null
@@ -1,11 +0,0 @@
-#
-# In GCC 4.4.7, the compiler gripes about shadowed global
-# declarations when a local variable uses the name of a
-# function that's in a system header file. For some reason,
-# later versions of GCC (e.g., 5.2.0) don't complain about
-# the shadowed globals. Maybe later versions are less fussy?
-# Anyway, the shadowing seems to be harmless, and GCC 4.4.7
-# is not a supported compiler, so let us promote shadowed globals
-# warnings to errors only for GCC 5 and later.
-#
--Wshadow
diff --git a/config/gnu-warnings/cxx-noerror-general b/config/gnu-warnings/cxx-noerror-general
deleted file mode 100644
index 8cc1d94..0000000
--- a/config/gnu-warnings/cxx-noerror-general
+++ /dev/null
@@ -1,32 +0,0 @@
-#
-# HDF5 code should not trigger the following warnings under any
-# circumstances, so ask the compiler to treat them as errors:
-#
-# NOTE: c++/test files are not compatible with these warnings as errors
-# c++/test/tcompound.cpp
-# -Werror=cast-align
--Wcast-align
-# NOTE: c++/src files are not compatible with these warnings as errors
-# c++/src/H5Object.cpp
-# -Werror=missing-declarations
--Wmissing-declarations
--Wpacked
--Wredundant-decls
--Wswitch
-# NOTE: c++/test files are not compatible with these warnings as errors
-# c++/test/tattr.cpp
-# -Werror=unused-but-set-variable
--Wunused-but-set-variable
--Wunused-function
--Wunused-variable
-# NOTE: c++/src files are not compatible with these warnings as errors
-# c++/src/H5Object.cpp,c++/src/H5StrType.cpp,c++/src/H5PredType.cpp
-# -Werror=unused-parameter
--Wunused-parameter
-#
-# Other files not compatible
-# NOTE: c++/test files are not compatible with these warnings as errors
-# c++/test/titerate.cpp,c++/test/tarray.cpp
-# -Werror=missing-declarations
-# c++/test/titerate.cpp,c++/test/tarray.cpp,c++/test/tlinks.cpp,c++/test/ttypes.cpp,c++/test/dsets.cpp
-# -Werror=unused-parameter
diff --git a/config/gnu-warnings/no-cxx-developer-4.8 b/config/gnu-warnings/no-cxx-developer-4.8
new file mode 100644
index 0000000..3c3de93
--- /dev/null
+++ b/config/gnu-warnings/no-cxx-developer-4.8
@@ -0,0 +1,9 @@
+# no-developer warning flag added for GCC >= 4.6
+-Wno-suggest-attribute=const
+
+# no-developer warning flags added for GCC >= 4.7
+-Wno-suggest-attribute=noreturn
+-Wno-suggest-attribute=pure
+
+# no-developer warning flag added for GCC >= 4.8
+-Wno-suggest-attribute=format
diff --git a/config/gnu-warnings/noerror-5 b/config/gnu-warnings/noerror-5
deleted file mode 100644
index a7d40dd..0000000
--- a/config/gnu-warnings/noerror-5
+++ /dev/null
@@ -1,12 +0,0 @@
--Wincompatible-pointer-types
-#
-# In GCC 4.4.7, the compiler gripes about shadowed global
-# declarations when a local variable uses the name of a
-# function that's in a system header file. For some reason,
-# later versions of GCC (e.g., 5.2.0) don't complain about
-# the shadowed globals. Maybe later versions are less fussy?
-# Anyway, the shadowing seems to be harmless, and GCC 4.4.7
-# is not a supported compiler, so let us promote shadowed globals
-# warnings to errors only for GCC 5 and later.
-#
--Wshadow
diff --git a/config/gnu-warnings/noerror-8 b/config/gnu-warnings/noerror-8
deleted file mode 100644
index 2f54a4d..0000000
--- a/config/gnu-warnings/noerror-8
+++ /dev/null
@@ -1,25 +0,0 @@
-# NOTE: src/ files are not compatible with these warnings as errors
-# src/H5Dchunk.c
-# -Werror=cast-function-type
--Wcast-function-type
-#
-# For GCC 8, promote maybe-initialized warnings to an error. GCC 8
-# reports 0 maybe-uninitialized warnings where earlier versions
-# make many false reports. GCC 8 seems to analyze calls to static
-# in order to detect initializations that occur there. It's possible
-# that GCC 8 only performs that analysis at -O3, though.
-#
-#
-# NOTE: File Driver files are not compatible with these warnings as errors
-# H5FDlog.c,
-# -Werror=maybe-uninitialized
--Wmaybe-uninitialized
-# NOTE: src/ files are not compatible with these warnings as errors
-# src/H5Shyper.c,src/H5SL.c,src/H5Shyper.c
-# -Werror=maybe-uninitialized
-# NOTE: Test files are not compatible with these warnings as errors
-# test/cache_common.c,
-# -Werror=maybe-uninitialized
-# NOTE: hl/src/ files are not compatible with these warnings as errors
-# hl/src/H5DS.c,
-# -Werror=maybe-uninitialized
diff --git a/config/gnu-warnings/noerror-general b/config/gnu-warnings/noerror-general
deleted file mode 100644
index f49d89a..0000000
--- a/config/gnu-warnings/noerror-general
+++ /dev/null
@@ -1,92 +0,0 @@
-#
-# These warnings will be treated as errors, using the error-general file,
-# when HDF5_ENABLE_WARNINGS_AS_ERRORS is set to true for CMake or
-# the --enable-warnings-as-errors option is specified for configure.
-# Otherwise this file will be used to treat them as warnings.
-#
--Wbad-function-cast
--Wimplicit-function-declaration
--Wmissing-declarations
--Wmissing-prototypes
--Wnested-externs
--Wold-style-definition
--Wpacked
--Wpointer-sign
--Wpointer-to-int-cast
--Wredundant-decls
--Wstrict-prototypes
--Wswitch
-#
-#-Werror=discarded-qualifiers
-#
-#
-# NOTE: File Driver files are not compatible with these warnings as errors
-# H5FDdirect.c,H5FDmpio.c,H5FDros3.c,
-# -Werror=unused-function
-#
--Wunused-function
-#
-# H5FDdrvr_module.h
-# -Werror=unused-variable
-#
--Wunused-variable
-#
-# H5VLpassthru.c
-# -Werror=unused-parameter
-#
--Wunused-parameter
-#
-#
-#
-# NOTE: Tools files are not compatible with these warnings as errors
-# lib/h5tools.c
-# -Werror=cast-align
-#
--Wcast-align
-#
-# lib/h5diff_array.c
-# -Werror=unused-but-set-variable
-#
--Wunused-but-set-variable
-#
-# lib/h5tools_utils.c
-# -Werror=unused-parameter
-#
-#
-# NOTE: JNI files are not compatible with these warnings as errors
-# jni/h5pDCPLImp.c,jni/nativeData.c,jni/h5util.c,jni/h5rImp.c
-# jni/h5sImp.c,jni/h5tImp.c
-# -Werror=cast-align
-# jni/h5util.c
-# -Werror=format(-overflow)
-#
--Wformat
-#
-#
-#Examples and tests do not use the same set of extensive warning flags as libraries
-# Here is a list of tests and examples that have issues with the stricter warnings as error
-#
-# NOTE: Test files are not compatible with these warnings as errors
-# thread_id.c,
-# -Werror=unused-function
-# dsets.c
-# -Werror=unused-parameter
-# external.c,perform/sio_engine.c
-# -Werror=format(-truncation)
-#
-#
-# NOTE: Examples files are not compatible with these warnings as errors
-# h5_vds-eiger.c,h5_vds-exclim.c,h5_vds.c,h5_vds-exc.c,h5_vds-percival-unlim-maxmin.c
-# h5_vds-percival.c,h5_read.c,h5_rdwt.c,h5_mount.c,h5_extend.c,h5_extend_write.c
-# h5_write.c,h5_vds-simpleIO.c,h5_ref2reg_deprec.c,h5_crtgrp.c,h5_select.c
-# h5_vds-percival-unlim.c,h5_crtatt.c,h5_group.c,h5_attribute.c,h5_crtdat.c
-# h5_reference_deprec.c
-# h5_rdwt.c,h5_crtgrp.c,h5_crtatt.c,h5_crtdat.c
-# -Werror=strict-prototypes
-# h5_rdwt.c,h5_crtgrp.c,h5_crtatt.c,h5_crtdat.c
-# -Werror=old-style-definition
-# h5_vds-exclim.c,h5_vds.c,h5_vds-exc.c,
-# -Werror=unused-variable
-# h5_elink_unix2win.c,h5_extlink.c,h5_attribute.c
-# -Werror=unused-parameter
-
diff --git a/configure.ac b/configure.ac
index cd5a42a..7665f8e 100644
--- a/configure.ac
+++ b/configure.ac
@@ -237,6 +237,41 @@ elif test $hdf5_cv_host != $host; then
fi
## ----------------------------------------------------------------------
+## Check if we should consider certain compiler warnings as errors
+##
+## We have to set WARNINGS_AS_ERRORS before sourcing a $host_config
+## file, below.
+##
+## These should NOT be on by default as the risk of breakage is high
+## when compiling HDF5 on new (or new versions) of platforms and
+## compilers. It can also cause failures when header files we have no
+## control over (e.g. MPI, HDFS) raise warnings.
+##
+AC_MSG_CHECKING([enable warnings as errors])
+AC_ARG_ENABLE([warnings-as-errors],
+ [AS_HELP_STRING([--enable-warnings-as-errors],
+ [Determines whether certain warnings will be
+ considered errors. This is mainly for use
+ by HDF5 library developers.
+ [default=no]
+ ])],
+ [WARNINGS_AS_ERRORS=$enableval])
+
+## Set default
+if test "X-$WARNINGS_AS_ERRORS" = X- ; then
+ WARNINGS_AS_ERRORS=no
+fi
+
+case "X-$WARNINGS_AS_ERRORS" in
+ X-yes|X-no)
+ AC_MSG_RESULT([$WARNINGS_AS_ERRORS])
+ ;;
+ *)
+ AC_MSG_ERROR([Unrecognized value: $WARNINGS_AS_ERRORS])
+ ;;
+esac
+
+## ----------------------------------------------------------------------
## Source any special files that we need. These files normally aren't
## present but can be used by the maintainers to fine tune things like
## turning on debug or profiling flags for the compiler. The search order
@@ -2233,6 +2268,13 @@ case "X-$ASSERTS" in
;;
esac
+## Incorporate the potentially warning-to-error promoting flags after
+## feature tests. Some of the tests (e.g., `off_t`) generate compilation
+## errors with the flags we chose for the HDF5 library and tools.
+##
+H5_CFLAGS="$H5_CFLAGS $H5_ECFLAGS"
+H5_CXXFLAGS="$H5_CXXFLAGS $H5_ECXXFLAGS"
+
## ----------------------------------------------------------------------
## Check if developer warnings should be turned on
## These are warnings that provide suggestions like gcc's -Wsuggest-attribute.
@@ -2272,45 +2314,6 @@ case "X-$DEV_WARNINGS" in
esac
## ----------------------------------------------------------------------
-## Check if we should consider certain compiler warnings as errors
-##
-## These should NOT be on by default as the risk of breakage is high
-## when compiling HDF5 on new (or new versions) of platforms and
-## compilers. It can also cause failures when header files we have no
-## control over (e.g. MPI, HDFS) raise warnings.
-##
-AC_MSG_CHECKING([enable warnings as errors])
-AC_ARG_ENABLE([warnings-as-errors],
- [AS_HELP_STRING([--enable-warnings-as-errors],
- [Determines whether certain warnings will be
- considered errors. This is mainly for use
- by HDF5 library developers.
- [default=no]
- ])],
- [WARNINGS_AS_ERRORS=$enableval])
-
-## Set default
-if test "X-$WARNINGS_AS_ERRORS" = X- ; then
- WARNINGS_AS_ERRORS=no
-fi
-
-case "X-$WARNINGS_AS_ERRORS" in
- X-yes)
- H5_CFLAGS="$H5_CFLAGS $H5_ECFLAGS"
- H5_CXXFLAGS="$H5_CXXFLAGS $H5_ECXXFLAGS"
- AC_MSG_RESULT([yes])
- ;;
- X-no)
- H5_CFLAGS="$H5_CFLAGS $H5_NECFLAGS"
- H5_CXXFLAGS="$H5_CXXFLAGS $H5_NECXXFLAGS"
- AC_MSG_RESULT([no])
- ;;
- *)
- AC_MSG_ERROR([Unrecognized value: $WARNINGS_AS_ERRORS])
- ;;
-esac
-
-## ----------------------------------------------------------------------
## Check if the compiler should use profiling flags/settings
##
AC_MSG_CHECKING([profiling])
@@ -3998,6 +4001,7 @@ AC_CONFIG_FILES([src/libhdf5.settings
testpar/testpflush.sh
utils/Makefile
utils/mirror_vfd/Makefile
+ utils/test/Makefile
tools/Makefile
tools/lib/Makefile
tools/libtest/Makefile
diff --git a/hl/tools/h5watch/CMakeTests.cmake b/hl/tools/h5watch/CMakeTests.cmake
index dbda07f..b2f689b 100644
--- a/hl/tools/h5watch/CMakeTests.cmake
+++ b/hl/tools/h5watch/CMakeTests.cmake
@@ -149,18 +149,22 @@ add_custom_target(H5WATCH_files ALL COMMENT "Copying files needed by H5WATCH tes
# Check to see if the VFD specified by the HDF5_DRIVER environment variable
# supports SWMR.
-set (SWMR_INCOMPAT ${swmr_compat_vfd})
+add_test (
+ NAME H5WATCH-SWMR_INCOMPAT
+ COMMAND swmr_check_compat_vfd
+)
+set_tests_properties (H5WATCH-SWMR_INCOMPAT PROPERTIES FIXTURES_SETUP swmr_vfd_check_compat)
-if (NOT SWMR_INCOMPAT)
# Remove any output file left over from previous test run
- add_test (
- NAME H5WATCH-clearall-objects
- COMMAND ${CMAKE_COMMAND} -E remove WATCH.h5
- )
- if (last_test)
- set_tests_properties (H5WATCH-clearall-objects PROPERTIES DEPENDS ${last_test})
- endif ()
- set (last_test "H5WATCH-clearall-objects")
+add_test (
+ NAME H5WATCH-clearall-objects
+ COMMAND ${CMAKE_COMMAND} -E remove WATCH.h5
+)
+set_tests_properties (H5WATCH-clearall-objects PROPERTIES FIXTURES_REQUIRED swmr_vfd_check_compat)
+if (last_test)
+ set_tests_properties (H5WATCH-clearall-objects PROPERTIES DEPENDS ${last_test})
+endif ()
+set (last_test "H5WATCH-clearall-objects")
#################################################################################################
# #
@@ -182,32 +186,32 @@ if (NOT SWMR_INCOMPAT)
# #
#################################################################################################
# create the output files to be used.
- add_test (NAME H5WATCH-h5watchgentest COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} $<TARGET_FILE:h5watchgentest>)
- set_tests_properties (H5WATCH-h5watchgentest PROPERTIES
- WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles"
- DEPENDS "H5WATCH-clearall-objects"
- )
- set_tests_properties (H5WATCH-h5watchgentest PROPERTIES FIXTURES_SETUP gen_test_watch)
- set (last_test "H5WATCH-h5watchgentest")
+add_test (NAME H5WATCH-h5watchgentest COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} $<TARGET_FILE:h5watchgentest>)
+set_tests_properties (H5WATCH-h5watchgentest PROPERTIES
+ WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles"
+ DEPENDS "H5WATCH-clearall-objects"
+)
+set_tests_properties (H5WATCH-h5watchgentest PROPERTIES FIXTURES_SETUP gen_test_watch)
+set_tests_properties (H5WATCH-h5watchgentest PROPERTIES FIXTURES_REQUIRED swmr_vfd_check_compat)
+set (last_test "H5WATCH-h5watchgentest")
# Test on --help options
- ADD_H5_TEST (w-help1 0 --help)
+ADD_H5_TEST (w-help1 0 --help)
#
# Tests on expected failures
- ADD_H5_ERR_TEST (w-err-dset1 1 WATCH.h5)
- ADD_H5_ERR_TEST (w-err-dset2 1 WATCH.h5/group/DSET_CMPD)
- ADD_H5_ERR_TEST (w-err-dset-none 1 WATCH.h5/DSET_NONE)
- ADD_H5_ERR_TEST (w-err-dset-nomax 1 WATCH.h5/DSET_NOMAX)
- ADD_H5_ERR_TEST (w-err-file 1 ../WATCH.h5/DSET_CMPD)
- ADD_H5_TEST (w-err-width 1 --width=-8 WATCH.h5/DSET_ONE)
- ADD_H5_TEST (w-err-poll 1 --polling=-8 WATCH.h5/DSET_ONE)
- ADD_H5_TEST (w-err-poll0 1 --polling=0 WATCH.h5/DSET_ONE)
+ADD_H5_ERR_TEST (w-err-dset1 1 WATCH.h5)
+ADD_H5_ERR_TEST (w-err-dset2 1 WATCH.h5/group/DSET_CMPD)
+ADD_H5_ERR_TEST (w-err-dset-none 1 WATCH.h5/DSET_NONE)
+ADD_H5_ERR_TEST (w-err-dset-nomax 1 WATCH.h5/DSET_NOMAX)
+ADD_H5_ERR_TEST (w-err-file 1 ../WATCH.h5/DSET_CMPD)
+ADD_H5_TEST (w-err-width 1 --width=-8 WATCH.h5/DSET_ONE)
+ADD_H5_TEST (w-err-poll 1 --polling=-8 WATCH.h5/DSET_ONE)
+ADD_H5_TEST (w-err-poll0 1 --polling=0 WATCH.h5/DSET_ONE)
#
# Tests on invalid field names via --fields option for a compound typed dataset: DSET_CMPD
- ADD_H5_ERR_TEST (w-err-cmpd1 1 --fields=fieldx WATCH.h5/DSET_CMPD)
- ADD_H5_ERR_TEST (w-err-cmpd2 1 --fields=field1,field2. WATCH.h5/DSET_CMPD)
- ADD_H5_ERR_TEST (w-err-cmpd3 1 --fields=field1,field2, WATCH.h5/DSET_CMPD)
- ADD_H5_ERR_TEST (w-err-cmpd4 1 --fields=field1,field2.b.k WATCH.h5/DSET_CMPD)
- ADD_H5_ERR_TEST (w-err-cmpd5 1 --fields=field1 --fields=field2.b.k WATCH.h5/DSET_CMPD)
+ADD_H5_ERR_TEST (w-err-cmpd1 1 --fields=fieldx WATCH.h5/DSET_CMPD)
+ADD_H5_ERR_TEST (w-err-cmpd2 1 --fields=field1,field2. WATCH.h5/DSET_CMPD)
+ADD_H5_ERR_TEST (w-err-cmpd3 1 --fields=field1,field2, WATCH.h5/DSET_CMPD)
+ADD_H5_ERR_TEST (w-err-cmpd4 1 --fields=field1,field2.b.k WATCH.h5/DSET_CMPD)
+ADD_H5_ERR_TEST (w-err-cmpd5 1 --fields=field1 --fields=field2.b.k WATCH.h5/DSET_CMPD)
#
-endif ()
diff --git a/hl/tools/h5watch/Makefile.am b/hl/tools/h5watch/Makefile.am
index b569214..13bd820 100644
--- a/hl/tools/h5watch/Makefile.am
+++ b/hl/tools/h5watch/Makefile.am
@@ -24,7 +24,6 @@ AM_CPPFLAGS+=-I$(top_srcdir)/src -I$(top_srcdir)/tools/lib -I$(top_srcdir)/hl/sr
# These are our main targets, the tools
bin_PROGRAMS=h5watch
-noinst_PROGRAMS=
# Add h5watch specific linker flags here
h5watch_LDFLAGS = $(LT_STATIC_EXEC) $(AM_LDFLAGS)
@@ -37,8 +36,8 @@ if BUILD_TESTS_CONDITIONAL
AM_CPPFLAGS+=-I$(top_srcdir)/hl/test
TEST_SCRIPT=testh5watch.sh
check_SCRIPTS=$(TEST_SCRIPT)
- SCRIPT_DEPEND=extend_dset$(EXEEXT) h5watch$(EXEEXT)
- noinst_PROGRAMS+=h5watchgentest extend_dset
+ SCRIPT_DEPEND=swmr_check_compat_vfd$(EXEEXT) extend_dset$(EXEEXT) h5watch$(EXEEXT)
+ noinst_PROGRAMS=h5watchgentest extend_dset
# Add extend_dset specific preprocessor flags here
# (add the main test subdirectory to the include file path)
extend_dset_CPPFLAGS=$(AM_CPPFLAGS) -I$(top_srcdir)/test
diff --git a/hl/tools/h5watch/swmr_check_compat_vfd.c b/hl/tools/h5watch/swmr_check_compat_vfd.c
deleted file mode 100644
index b4021e4..0000000
--- a/hl/tools/h5watch/swmr_check_compat_vfd.c
+++ /dev/null
@@ -1,55 +0,0 @@
-/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
- * Copyright by The HDF Group. *
- * Copyright by the Board of Trustees of the University of Illinois. *
- * All rights reserved. *
- * *
- * This file is part of HDF5. The full HDF5 copyright notice, including *
- * terms governing use, modification, and redistribution, is contained in *
- * the COPYING file, which can be found at the root of the source code *
- * distribution tree, or in https://www.hdfgroup.org/licenses. *
- * If you do not have access to either file, you may request a copy from *
- * help@hdfgroup.org. *
- * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
-
-/* Purpose: This is a small program that checks if the HDF5_DRIVER
- * environment variable is set to a value that supports SWMR.
- *
- * It is intended for use in shell scripts.
- */
-
-#include <stdlib.h>
-
-#include "H5private.h"
-
-/* This file needs to access the file driver testing code */
-#define H5FD_FRIEND /*suppress error about including H5FDpkg */
-#define H5FD_TESTING
-#include "H5FDpkg.h" /* File drivers */
-
-/*-------------------------------------------------------------------------
- * Function: main
- *
- * Purpose: Inspects the HDF5_DRIVER environment variable, which
- * determines the VFD that the test harness will use with
- * the majority of the tests.
- *
- * Return: VFD supports SWMR: EXIT_SUCCESS
- *
- * VFD does not support SWMR
- * or failure: EXIT_FAILURE
- *
- *-------------------------------------------------------------------------
- */
-int
-main(void)
-{
- char *driver = NULL;
-
- driver = HDgetenv(HDF5_DRIVER);
-
- if (H5FD__supports_swmr_test(driver))
- return EXIT_SUCCESS;
- else
- return EXIT_FAILURE;
-
-} /* end main() */
diff --git a/hl/tools/h5watch/testh5watch.sh.in b/hl/tools/h5watch/testh5watch.sh.in
index 72e4140..04b6ef8 100644
--- a/hl/tools/h5watch/testh5watch.sh.in
+++ b/hl/tools/h5watch/testh5watch.sh.in
@@ -13,10 +13,16 @@
#
# Tests for the h5watch tool
#
+bindir=@bindir@
+
+# If the bindir directory is not set just use current (.).
+if test -z "$bindir"; then
+ bindir=.
+fi
# Check to see if the VFD specified by the HDF5_DRIVER environment variable
# supports SWMR.
-../../../utils/swmr_compat_vfd
+$bindir/swmr_check_compat_vfd
rc=$?
if [ $rc != 0 ] ; then
echo
diff --git a/java/src/hdf/hdf5lib/H5.java b/java/src/hdf/hdf5lib/H5.java
index 63547df..5380bd1 100644
--- a/java/src/hdf/hdf5lib/H5.java
+++ b/java/src/hdf/hdf5lib/H5.java
@@ -9622,6 +9622,38 @@ public class H5 implements java.io.Serializable {
public synchronized static native int H5Pset_hyper_vector_size(long dxpl_id, long vector_size)
throws HDF5LibraryException, NullPointerException;
+ /**
+ *
+ * Set flag to indicate that an API wrapper for a plugin's
+ * public wrapper API call (e.g. H5VLfile_create, H5FDopen, etc)
+ * should open a new API context for the API call.
+ *
+ * @param dxpl_id
+ * IN: Dataset transfer property list identifier.
+ * @param new_api_ctx
+ * IN: Indicate that API wrapper should create new API context
+ *
+ * @exception HDF5LibraryException
+ * - Error from the HDF-5 Library.
+ **/
+ public synchronized static native void H5Pset_plugin_new_api_context(long dxpl_id, boolean new_api_ctx)
+ throws HDF5LibraryException;
+
+ /**
+ * Retrieve "new API context" flag for plugin wrapper API calls.
+ *
+ * @param dxpl_id
+ * IN: Dataset transfer property list identifier.
+ *
+ * @return true if the given dxpl indicates API wrapper should create new API context
+ *
+ * @exception HDF5LibraryException
+ * - Error from the HDF-5 Library.
+ *
+ **/
+ public synchronized static native boolean H5Pget_plugin_new_api_context(long dxpl_id)
+ throws HDF5LibraryException;
+
// /////// Link creation property list (LCPL) routines ///////
/**
@@ -13460,7 +13492,7 @@ public class H5 implements java.io.Serializable {
* @exception HDF5LibraryException
* - Error from the HDF-5 Library.
**/
- public synchronized static native long H5VLregister_connector_by_name(String connector_name, long vipl_id);
+ public synchronized static native long H5VLregister_connector_by_name(String connector_name, long vipl_id) throws HDF5LibraryException;
/**
* H5VLregister_connector_by_value registers a new VOL connector as a member of the virtual object layer class.
*
@@ -13475,7 +13507,7 @@ public class H5 implements java.io.Serializable {
* @exception HDF5LibraryException
* - Error from the HDF-5 Library.
**/
- public synchronized static native long H5VLregister_connector_by_value(int connector_value, long vipl_id);
+ public synchronized static native long H5VLregister_connector_by_value(int connector_value, long vipl_id) throws HDF5LibraryException;
/**
* H5VLis_connector_registered_by_name tests whether a VOL class has been registered.
*
@@ -13487,7 +13519,7 @@ public class H5 implements java.io.Serializable {
* @exception HDF5LibraryException
* - Error from the HDF-5 Library.
**/
- public synchronized static native boolean H5VLis_connector_registered_by_name(String name);
+ public synchronized static native boolean H5VLis_connector_registered_by_name(String name) throws HDF5LibraryException;
/**
* H5VLis_connector_registered_by_value tests whether a VOL class has been registered.
*
@@ -13499,7 +13531,7 @@ public class H5 implements java.io.Serializable {
* @exception HDF5LibraryException
* - Error from the HDF-5 Library.
**/
- public synchronized static native boolean H5VLis_connector_registered_by_value(int connector_value);
+ public synchronized static native boolean H5VLis_connector_registered_by_value(int connector_value) throws HDF5LibraryException;
/**
* H5VLget_connector_id retrieves the ID for a registered VOL connector for a given object.
*
@@ -13511,7 +13543,7 @@ public class H5 implements java.io.Serializable {
* @exception HDF5LibraryException
* - Error from the HDF-5 Library.
**/
- public synchronized static native long H5VLget_connector_id(long object_id);
+ public synchronized static native long H5VLget_connector_id(long object_id) throws HDF5LibraryException;
/**
* H5VLget_connector_id_by_name retrieves the ID for a registered VOL connector.
*
@@ -13523,7 +13555,7 @@ public class H5 implements java.io.Serializable {
* @exception HDF5LibraryException
* - Error from the HDF-5 Library.
**/
- public synchronized static native long H5VLget_connector_id_by_name(String name);
+ public synchronized static native long H5VLget_connector_id_by_name(String name) throws HDF5LibraryException;
/**
* H5VLget_connector_id_by_value retrieves the ID for a registered VOL connector.
*
@@ -13535,7 +13567,7 @@ public class H5 implements java.io.Serializable {
* @exception HDF5LibraryException
* - Error from the HDF-5 Library.
**/
- public synchronized static native long H5VLget_connector_id_by_value(int connector_value);
+ public synchronized static native long H5VLget_connector_id_by_value(int connector_value) throws HDF5LibraryException;
/**
* H5VLget_connector_name returns the connector name for the VOL associated with the
* object or file ID.
@@ -13548,7 +13580,7 @@ public class H5 implements java.io.Serializable {
* @exception HDF5LibraryException
* - Error from the HDF-5 Library.
**/
- public synchronized static native String H5VLget_connector_name(long object_id);
+ public synchronized static native String H5VLget_connector_name(long object_id) throws HDF5LibraryException;
/**
* H5VLclose closes a VOL connector ID.
*
@@ -13558,7 +13590,7 @@ public class H5 implements java.io.Serializable {
* @exception HDF5LibraryException
* - Error from the HDF-5 Library.
**/
- public synchronized static native void H5VLclose(long connector_id);
+ public synchronized static native void H5VLclose(long connector_id) throws HDF5LibraryException;
/**
* H5VLunregister_connector removes a VOL connector ID from the library.
*
@@ -13568,7 +13600,17 @@ public class H5 implements java.io.Serializable {
* @exception HDF5LibraryException
* - Error from the HDF-5 Library.
**/
- public synchronized static native void H5VLunregister_connector(long connector_id);
+ public synchronized static native void H5VLunregister_connector(long connector_id) throws HDF5LibraryException;
+
+ /**
+ * H5VLfapl_is_native queries if a FAPL will use the native VOL connector.
+ *
+ * @param fapl_id
+ * The ID of the FAPL to query.
+ * @return true if fapl_id uses the native VOL connector.
+ *
+ **/
+ public synchronized static native boolean H5VLfapl_is_native(long fapl_id) throws HDF5LibraryException;
// /////// unimplemented ////////
// hid_t H5VLregister_connector(const H5VL_class_t *cls, hid_t vipl_id);
diff --git a/java/src/jni/CMakeLists.txt b/java/src/jni/CMakeLists.txt
index dff0a88..ab306ef 100644
--- a/java/src/jni/CMakeLists.txt
+++ b/java/src/jni/CMakeLists.txt
@@ -73,14 +73,6 @@ set (HDF5_JAVA_JNI_CHDRS
${HDF5_JAVA_JNI_SOURCE_DIR}/nativeData.h
)
-set (HDF5_JAVA_TEST_CSRCS
- ${HDF5_JAVA_JNI_SOURCE_DIR}/h5jni_test.c
-)
-
-set (HDF5_JAVA_TEST_CHDRS
- ${HDF5_JAVA_JNI_SOURCE_DIR}/h5jni_test.h
-)
-
set (CMAKE_INCLUDE_CURRENT_DIR_IN_INTERFACE ON)
########### JNI libraries always must be built shared ###############
@@ -95,18 +87,6 @@ set_target_properties (${HDF5_JAVA_JNI_LIB_TARGET} PROPERTIES FOLDER libraries/j
SET_GLOBAL_VARIABLE (HDF5_LIBRARIES_TO_EXPORT "${HDF5_LIBRARIES_TO_EXPORT};${HDF5_JAVA_JNI_LIB_TARGET}")
H5_SET_LIB_OPTIONS (${HDF5_JAVA_JNI_LIB_TARGET} ${HDF5_JAVA_JNI_LIB_NAME} SHARED "JAVA")
-# Build Testing library
-add_library (${HDF5_JAVA_JNI_TEST_LIB_TARGET} SHARED ${HDF5_JAVA_TEST_CSRCS} ${HDF5_JAVA_TEST_CHDRS})
-target_include_directories (${HDF5_JAVA_JNI_TEST_LIB_TARGET}
- PRIVATE "${HDF5_SRC_DIR};${HDF5_SRC_BINARY_DIR};${HDF5_JAVA_JNI_SOURCE_DIR};$<$<BOOL:${HDF5_ENABLE_PARALLEL}>:${MPI_C_INCLUDE_DIRS}>"
-)
-target_compile_options(${HDF5_JAVA_JNI_TEST_LIB_TARGET} PRIVATE "${HDF5_CMAKE_C_FLAGS}")
-TARGET_C_PROPERTIES (${HDF5_JAVA_JNI_TEST_LIB_TARGET} SHARED)
-target_link_libraries (${HDF5_JAVA_JNI_TEST_LIB_TARGET} PUBLIC ${HDF5_LIBSH_TARGET} ${HDF5_JAVA_JNI_LIB_TARGET})
-set_target_properties (${HDF5_JAVA_JNI_TEST_LIB_TARGET} PROPERTIES FOLDER libraries/jni)
-#SET_GLOBAL_VARIABLE (HDF5_LIBRARIES_TO_EXPORT "${HDF5_LIBRARIES_TO_EXPORT};${HDF5_JAVA_JNI_TEST_LIB_TARGET}")
-H5_SET_LIB_OPTIONS (${HDF5_JAVA_JNI_TEST_LIB_TARGET} ${HDF5_JAVA_JNI_TEST_LIB_NAME} SHARED "JAVA")
-
#-----------------------------------------------------------------------------
# Add Target to clang-format
#-----------------------------------------------------------------------------
diff --git a/java/src/jni/Makefile.am b/java/src/jni/Makefile.am
index d17d3d1..bf086d2 100644
--- a/java/src/jni/Makefile.am
+++ b/java/src/jni/Makefile.am
@@ -25,15 +25,12 @@ JAVA_API=yes
AM_CPPFLAGS+=-I$(top_srcdir)/src -I$(top_srcdir)/java/src/jni $(JNIFLAGS)
# This is our main target
-lib_LTLIBRARIES=libhdf5_java.la libhdf5_java_test.la
+lib_LTLIBRARIES=libhdf5_java.la
# Add libtool numbers to the HDF5 Java (JNI) library (from config/lt_vers.am)
libhdf5_java_la_LDFLAGS = -avoid-version -shared -export-dynamic -version-info $(LT_JAVA_VERS_INTERFACE):$(LT_JAVA_VERS_REVISION):$(LT_JAVA_VERS_AGE) $(AM_LDFLAGS)
-# Add libtool numbers to the HDF5 Java (JNI) library (from config/lt_vers.am)
-libhdf5_java_test_la_LDFLAGS = -avoid-version -shared -export-dynamic -version-info $(LT_JAVA_VERS_INTERFACE):$(LT_JAVA_VERS_REVISION):$(LT_JAVA_VERS_AGE) $(AM_LDFLAGS)
-
-# Source files for the main Java library
+# Source files for the library
libhdf5_java_la_SOURCES=exceptionImp.c h5Constants.c nativeData.c h5util.c h5Imp.c \
h5aImp.c h5dImp.c h5eImp.c h5fImp.c h5gImp.c h5iImp.c h5lImp.c h5oImp.c \
h5pImp.c h5pACPLImp.c h5pDAPLImp.c h5pDCPLImp.c h5pDXPLImp.c \
@@ -41,13 +38,7 @@ libhdf5_java_la_SOURCES=exceptionImp.c h5Constants.c nativeData.c h5util.c h5Imp
h5pOCPLImp.c h5pOCpyPLImp.c h5pStrCPLImp.c h5plImp.c h5rImp.c h5sImp.c h5tImp.c \
h5vlImp.c h5zImp.c
-# Source files for the Java testing library
-libhdf5_java_test_la_SOURCES=h5jni_test.c
-
# HDF5 Java (JNI) library depends on HDF5 Library.
libhdf5_java_la_LIBADD=$(LIBHDF5)
-# HDF5 Java (JNI) Testing library depends on HDF5 Library and Java Library.
-libhdf5_java_test_la_LIBADD=$(LIBHDF5) libhdf5_java.la
-
include $(top_srcdir)/config/conclude.am
diff --git a/java/src/jni/h5jni_test.c b/java/src/jni/h5jni_test.c
deleted file mode 100644
index 02f6a78..0000000
--- a/java/src/jni/h5jni_test.c
+++ /dev/null
@@ -1,53 +0,0 @@
-/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
- * Copyright by The HDF Group. *
- * All rights reserved. *
- * *
- * This file is part of HDF5. The full HDF5 copyright notice, including *
- * terms governing use, modification, and redistribution, is contained in *
- * the COPYING file, which can be found at the root of the source code *
- * distribution tree, or in https://www.hdfgroup.org/licenses. *
- * If you do not have access to either file, you may request a copy from *
- * help@hdfgroup.org. *
- * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
-
-/*
- * For details of the HDF libraries, see the HDF Documentation at:
- * http://hdfgroup.org/HDF5/doc/
- *
- */
-
-#ifdef __cplusplus
-extern "C" {
-#endif /* __cplusplus */
-
-#include <jni.h>
-#include <stdlib.h>
-#include "hdf5.h"
-#include "H5VLprivate.h"
-#include "h5jni.h"
-#include "h5jni_test.h"
-
-/*
- * Class: test_H5TestUtils
- * Method: H5VLfapl_is_native
- * Signature: (J)Z
- */
-JNIEXPORT jboolean JNICALL
-Java_test_H5TestUtils_H5VLfapl_1is_1native(JNIEnv *env, jclass clss, jlong fapl_id)
-{
- hbool_t bval = JNI_FALSE;
-
- UNUSED(clss);
-
- if (H5VL_fapl_is_native((hid_t)fapl_id, &bval) < 0)
- H5_LIBRARY_ERROR(ENVONLY);
-
- bval = (bval > 0) ? JNI_TRUE : JNI_FALSE;
-
-done:
- return (jboolean)bval;
-}
-
-#ifdef __cplusplus
-} /* end extern "C" */
-#endif /* __cplusplus */
diff --git a/java/src/jni/h5jni_test.h b/java/src/jni/h5jni_test.h
deleted file mode 100644
index 9f1968b..0000000
--- a/java/src/jni/h5jni_test.h
+++ /dev/null
@@ -1,34 +0,0 @@
-/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
- * Copyright by The HDF Group. *
- * All rights reserved. *
- * *
- * This file is part of HDF5. The full HDF5 copyright notice, including *
- * terms governing use, modification, and redistribution, is contained in *
- * the COPYING file, which can be found at the root of the source code *
- * distribution tree, or in https://www.hdfgroup.org/licenses. *
- * If you do not have access to either file, you may request a copy from *
- * help@hdfgroup.org. *
- * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
-
-#include <jni.h>
-/* Header for HDF5 JNI test routines */
-
-#ifndef Included_h5jni_test
-#define Included_h5jni_test
-
-#ifdef __cplusplus
-extern "C" {
-#endif /* __cplusplus */
-
-/*
- * Class: test_H5TestUtils
- * Method: H5VLfapl_is_native
- * Signature: (J)Z
- */
-JNIEXPORT jboolean JNICALL Java_test_H5TestUtils_H5VLfapl_1is_1native(JNIEnv *, jclass, jlong);
-
-#ifdef __cplusplus
-} /* end extern "C" */
-#endif /* __cplusplus */
-
-#endif /* Included_h5jni_test */
diff --git a/java/src/jni/h5pDXPLImp.c b/java/src/jni/h5pDXPLImp.c
index c555d53..12618a6 100644
--- a/java/src/jni/h5pDXPLImp.c
+++ b/java/src/jni/h5pDXPLImp.c
@@ -448,6 +448,52 @@ done:
} /* end Java_hdf_hdf5lib_H5_H5Pget_1btree_1ratios */
/*
+ * Class: hdf_hdf5lib_H5
+ * Method: H5Pset_plugin_new_api_context
+ * Signature: (JZ)V
+ */
+JNIEXPORT void JNICALL
+Java_hdf_hdf5lib_H5_H5Pset_1plugin_1new_1api_1context(JNIEnv *env, jclass clss, jlong dcpl_id,
+ jboolean new_api_ctx)
+{
+ hbool_t new_api_ctx_val;
+ herr_t retVal = FAIL;
+
+ UNUSED(clss);
+
+ new_api_ctx_val = (JNI_TRUE == new_api_ctx) ? TRUE : FALSE;
+
+ if ((retVal = H5Pset_plugin_new_api_context((hid_t)dcpl_id, (hbool_t)new_api_ctx_val)) < 0)
+ H5_LIBRARY_ERROR(ENVONLY);
+
+done:
+ return;
+} /* end Java_hdf_hdf5lib_H5_H5Pset_1plugin_1new_1api_1context */
+
+/*
+ * Class: hdf_hdf5lib_H5
+ * Method: H5Pget_plugin_new_api_context
+ * Signature: (J)Z
+ */
+JNIEXPORT jboolean JNICALL
+Java_hdf_hdf5lib_H5_H5Pget_1plugin_1new_1api_1context(JNIEnv *env, jclass clss, jlong dcpl_id)
+{
+ hbool_t new_api_ctx = FALSE;
+ jboolean bval = JNI_FALSE;
+
+ UNUSED(clss);
+
+ if (H5Pget_plugin_new_api_context((hid_t)dcpl_id, (hbool_t *)&new_api_ctx) < 0)
+ H5_LIBRARY_ERROR(ENVONLY);
+
+ if (new_api_ctx == TRUE)
+ bval = JNI_TRUE;
+
+done:
+ return bval;
+} /* end Java_hdf_hdf5lib_H5_H5Pget_1plugin_1new_1api_1context */
+
+/*
* TODO: H5Pset_vlen_mem_manager
*/
diff --git a/java/src/jni/h5pDXPLImp.h b/java/src/jni/h5pDXPLImp.h
index 21c40c4..c03d61c 100644
--- a/java/src/jni/h5pDXPLImp.h
+++ b/java/src/jni/h5pDXPLImp.h
@@ -134,6 +134,21 @@ JNIEXPORT jint JNICALL Java_hdf_hdf5lib_H5_H5Pget_1btree_1ratios(JNIEnv *, jclas
jdoubleArray, jdoubleArray);
/*
+ * Class: hdf_hdf5lib_H5
+ * Method: H5Pset_plugin_new_api_context
+ * Signature: (JZ)V
+ */
+JNIEXPORT void JNICALL Java_hdf_hdf5lib_H5_H5Pset_1plugin_1new_1api_1context(JNIEnv *, jclass, jlong,
+ jboolean);
+
+/*
+ * Class: hdf_hdf5lib_H5
+ * Method: H5Pget_plugin_new_api_context
+ * Signature: (J)Z
+ */
+JNIEXPORT jboolean JNICALL Java_hdf_hdf5lib_H5_H5Pget_1plugin_1new_1api_1context(JNIEnv *, jclass, jlong);
+
+/*
* TODO: H5Pset_vlen_mem_manager
*/
diff --git a/java/src/jni/h5util.c b/java/src/jni/h5util.c
index 4272205..2550ad9 100644
--- a/java/src/jni/h5util.c
+++ b/java/src/jni/h5util.c
@@ -658,8 +658,6 @@ h5str_sprint_reference(JNIEnv *env, h5str_t *out_str, void *ref_p)
int ret_value = FAIL;
- if (!h5str_append(out_str, " \""))
- H5_ASSERTION_ERROR(ENVONLY, "Unable to append string.");
buf_size = H5Rget_file_name(ref_vp, NULL, 0);
if (buf_size) {
ref_name = (char *)HDmalloc(sizeof(char) * (size_t)buf_size + 1);
@@ -697,8 +695,6 @@ h5str_sprint_reference(JNIEnv *env, h5str_t *out_str, void *ref_p)
ref_name = NULL;
}
}
- if (!h5str_append(out_str, "\""))
- H5_ASSERTION_ERROR(ENVONLY, "Unable to append string.");
ret_value = SUCCEED;
done:
@@ -725,6 +721,10 @@ h5str_region_dataset(JNIEnv *env, h5str_t *out_str, H5R_ref_t *ref_vp, int expan
if ((new_obj_sid = H5Ropen_region(ref_vp, H5P_DEFAULT, H5P_DEFAULT)) < 0)
H5_LIBRARY_ERROR(ENVONLY);
+ if (expand_data == 0)
+ if (h5str_sprint_reference(ENVONLY, out_str, ref_vp) < 0)
+ CHECK_JNI_EXCEPTION(ENVONLY, JNI_FALSE);
+
if ((region_type = H5Sget_select_type(new_obj_sid)) > H5S_SEL_ERROR) {
if (H5S_SEL_POINTS == region_type) {
if (h5str_dump_region_points(ENVONLY, out_str, new_obj_sid, new_obj_id, expand_data) < 0)
diff --git a/java/src/jni/h5vlImp.c b/java/src/jni/h5vlImp.c
index 40f8863..ae56e56 100644
--- a/java/src/jni/h5vlImp.c
+++ b/java/src/jni/h5vlImp.c
@@ -278,6 +278,27 @@ done:
return;
} /* end Java_hdf_hdf5lib_H5_H5VLunregister_1connector */
+/*
+ * Class: hdf_hdf5lib_H5
+ * Method: H5VLfapl_is_native
+ * Signature: (J)Z
+ */
+JNIEXPORT jboolean JNICALL
+Java_hdf_hdf5lib_H5_H5VLfapl_1is_1native(JNIEnv *env, jclass clss, jlong fapl_id)
+{
+ hbool_t bval = JNI_FALSE;
+
+ UNUSED(clss);
+
+ if (H5VLfapl_is_native((hid_t)fapl_id, &bval) < 0)
+ H5_LIBRARY_ERROR(ENVONLY);
+
+ bval = (bval > 0) ? JNI_TRUE : JNI_FALSE;
+
+done:
+ return (jboolean)bval;
+}
+
#ifdef __cplusplus
} /* end extern "C" */
#endif /* __cplusplus */
diff --git a/java/src/jni/h5vlImp.h b/java/src/jni/h5vlImp.h
index a17807f..0cc3366 100644
--- a/java/src/jni/h5vlImp.h
+++ b/java/src/jni/h5vlImp.h
@@ -93,6 +93,13 @@ JNIEXPORT void JNICALL Java_hdf_hdf5lib_H5_H5VLclose(JNIEnv *, jclass, jlong);
*/
JNIEXPORT void JNICALL Java_hdf_hdf5lib_H5_H5VLunregister_1connector(JNIEnv *, jclass, jlong);
+/*
+ * Class: hdf_hdf5lib_H5
+ * Method: H5VLfapl_is_native
+ * Signature: (J)Z
+ */
+JNIEXPORT jboolean JNICALL Java_hdf_hdf5lib_H5_H5VLfapl_1is_1native(JNIEnv *, jclass, jlong);
+
#ifdef __cplusplus
} /* end extern "C" */
#endif /* __cplusplus */
diff --git a/java/test/CMakeLists.txt b/java/test/CMakeLists.txt
index 44c95cb..ffaf5f5 100644
--- a/java/test/CMakeLists.txt
+++ b/java/test/CMakeLists.txt
@@ -5,10 +5,6 @@ set (CMAKE_VERBOSE_MAKEFILE 1)
set_directory_properties(PROPERTIES INCLUDE_DIRECTORIES "${HDF5_JAVA_JNI_BINARY_DIR};${HDF5_JAVA_HDF5_LIB_DIR}")
-set (HDF5_JAVA_TEST_JAR_SOURCES
- H5TestUtils.java
-)
-
set (HDF5_JAVA_TEST_SOURCES
TestH5
TestH5Eparams
@@ -72,19 +68,7 @@ if (HDF5_ENABLE_HDFS)
)
endif ()
-set (CMAKE_JAVA_INCLUDE_PATH "${HDF5_JAVA_LIB_DIR}/junit.jar;${HDF5_JAVA_LIB_DIR}/hamcrest-core.jar;${HDF5_JAVA_JARS};${HDF5_JAVA_LOGGING_JAR};${HDF5_JAVA_LOGGING_SIMPLE_JAR};${${HDF5_JAVA_TEST_LIB_TARGET}_JAR_FILE}")
-
-file (WRITE ${PROJECT_BINARY_DIR}/Manifest.txt
-"
-"
-)
-
-# Build Testing JAR
-add_jar (${HDF5_JAVA_TEST_LIB_TARGET} MANIFEST ${PROJECT_BINARY_DIR}/Manifest.txt ${HDF5_JAVA_TEST_JAR_SOURCES})
-add_dependencies (${HDF5_JAVA_TEST_LIB_TARGET} ${HDF5_JAVA_HDF5_LIB_TARGET})
-get_target_property (${HDF5_JAVA_TEST_LIB_TARGET}_JAR_FILE ${HDF5_JAVA_TEST_LIB_TARGET} JAR_FILE)
-
-set (CMAKE_JAVA_INCLUDE_PATH "${CMAKE_JAVA_INCLUDE_PATH};${${HDF5_JAVA_TEST_LIB_TARGET}_JAR_FILE}")
+set (CMAKE_JAVA_INCLUDE_PATH "${HDF5_JAVA_LIB_DIR}/junit.jar;${HDF5_JAVA_LIB_DIR}/hamcrest-core.jar;${HDF5_JAVA_JARS};${HDF5_JAVA_LOGGING_JAR};${HDF5_JAVA_LOGGING_SIMPLE_JAR}")
foreach (test_file ${HDF5_JAVA_TEST_SOURCES})
@@ -100,7 +84,6 @@ foreach (test_file ${HDF5_JAVA_TEST_SOURCES})
#get_target_property (${HDF5_JAVA_TEST_LIB_TARGET}_${test_file}_CLASSPATH ${HDF5_JAVA_TEST_LIB_TARGET}_${test_file} CLASSDIR)
add_dependencies (${HDF5_JAVA_TEST_LIB_TARGET}_${test_file} ${HDF5_JAVA_HDF5_LIB_TARGET})
- add_dependencies (${HDF5_JAVA_TEST_LIB_TARGET}_${test_file} ${HDF5_JAVA_TEST_LIB_TARGET})
set_target_properties (${HDF5_JAVA_TEST_LIB_TARGET}_${test_file} PROPERTIES FOLDER test/java)
endforeach ()
@@ -137,7 +120,6 @@ if (HDF5_TEST_JAVA AND HDF5_TEST_SERIAL)
foreach (CMAKE_INCLUDE_PATH ${CMAKE_JAVA_INCLUDE_PATH})
set (CMAKE_JAVA_CLASSPATH "${CMAKE_JAVA_CLASSPATH}${CMAKE_JAVA_INCLUDE_FLAG_SEP}${CMAKE_INCLUDE_PATH}")
endforeach ()
- set (CMAKE_JAVA_CLASSPATH "${CMAKE_JAVA_CLASSPATH}${CMAKE_JAVA_INCLUDE_FLAG_SEP}${${HDF5_JAVA_TEST_LIB_TARGET}_JAR_FILE}")
set (CMAKE_JAVA_CLASSPATH "${CMAKE_JAVA_CLASSPATH}${CMAKE_JAVA_INCLUDE_FLAG_SEP}${${HDF5_JAVA_TEST_LIB_TARGET}_${test_file}_JAR_FILE}")
add_test (
diff --git a/java/test/H5TestUtils.java b/java/test/H5TestUtils.java
deleted file mode 100644
index c96e856..0000000
--- a/java/test/H5TestUtils.java
+++ /dev/null
@@ -1,77 +0,0 @@
-/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
- * Copyright by The HDF Group. *
- * All rights reserved. *
- * *
- * This file is part of HDF5. The full HDF5 copyright notice, including *
- * terms governing use, modification, and redistribution, is contained in *
- * the COPYING file, which can be found at the root of the source code *
- * distribution tree, or in https://www.hdfgroup.org/licenses. *
- * If you do not have access to either file, you may request a copy from *
- * help@hdfgroup.org. *
- * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
-
-package test;
-
-import hdf.hdf5lib.H5;
-import hdf.hdf5lib.HDF5Constants;
-import hdf.hdf5lib.exceptions.HDF5Exception;
-import hdf.hdf5lib.exceptions.HDF5JavaException;
-import hdf.hdf5lib.exceptions.HDF5LibraryException;
-
-/**
- * This class contains testing routines for the Java interface which are
- * public, but are not meant for general use.
- **/
-public class H5TestUtils {
-
- private final static org.slf4j.Logger log = org.slf4j.LoggerFactory.getLogger(H5TestUtils.class);
-
- private static boolean isLibraryLoaded = false;
-
- static {
- loadH5TestLib();
- }
-
- /**
- * load native testing library
- */
- public static void loadH5TestLib() {
- String s_libraryName = null;
- String mappedName = null;
-
- // Make sure that the library is loaded only once
- if (isLibraryLoaded)
- return;
-
- try {
- s_libraryName = "hdf5_java_test";
- mappedName = System.mapLibraryName(s_libraryName);
- System.loadLibrary("hdf5_java_test");
- isLibraryLoaded = true;
- }
- catch (Throwable err) {
- err.printStackTrace();
- isLibraryLoaded = false;
- }
- finally {
- log.info("HDF5 Java test library: " + s_libraryName);
- log.debug(" resolved to: " + mappedName + "; ");
- log.info((isLibraryLoaded ? "" : " NOT") + " successfully loaded from java.library.path");
- }
-
- /* Important! Disable error output to C stdout */
- if (!log.isDebugEnabled())
- H5.H5error_off();
- }
-
- /**
- * H5VLfapl_is_native queries if a FAPL will use the native VOL connector.
- *
- * @param fapl_id
- * The ID of the FAPL to query.
- * @return true if fapl_id uses the native VOL connector.
- *
- **/
- public synchronized static native boolean H5VLfapl_is_native(long fapl_id) throws HDF5LibraryException;
-
-}
diff --git a/java/test/Makefile.am b/java/test/Makefile.am
index b69e019..ac3b619 100644
--- a/java/test/Makefile.am
+++ b/java/test/Makefile.am
@@ -36,8 +36,7 @@ AM_JAVACFLAGS = $(H5_JAVACFLAGS) -deprecation
TESTPACKAGE =
noinst_JAVA = \
- H5TestUtils.java \
- TestH5.java \
+ TestH5.java \
TestH5Eparams.java \
TestH5Eregister.java \
TestH5Fparams.java \
diff --git a/java/test/TestH5.java b/java/test/TestH5.java
index a5d0063..1f298f3 100644
--- a/java/test/TestH5.java
+++ b/java/test/TestH5.java
@@ -34,8 +34,6 @@ import hdf.hdf5lib.HDF5Constants;
import hdf.hdf5lib.exceptions.HDF5Exception;
import hdf.hdf5lib.exceptions.HDF5LibraryException;
-import test.H5TestUtils;
-
import org.junit.After;
import org.junit.Before;
import org.junit.Ignore;
diff --git a/java/test/TestH5A.java b/java/test/TestH5A.java
index 77652e3..f2134d2 100644
--- a/java/test/TestH5A.java
+++ b/java/test/TestH5A.java
@@ -30,8 +30,6 @@ import hdf.hdf5lib.exceptions.HDF5Exception;
import hdf.hdf5lib.exceptions.HDF5LibraryException;
import hdf.hdf5lib.structs.H5A_info_t;
-import test.H5TestUtils;
-
import org.junit.After;
import org.junit.Before;
import org.junit.Ignore;
diff --git a/java/test/TestH5Arw.java b/java/test/TestH5Arw.java
index a144ab7..8ce2fee 100644
--- a/java/test/TestH5Arw.java
+++ b/java/test/TestH5Arw.java
@@ -26,8 +26,6 @@ import hdf.hdf5lib.callbacks.H5A_iterate_t;
import hdf.hdf5lib.exceptions.HDF5Exception;
import hdf.hdf5lib.exceptions.HDF5LibraryException;
-import test.H5TestUtils;
-
import org.junit.After;
import org.junit.Before;
import org.junit.Rule;
diff --git a/java/test/TestH5D.java b/java/test/TestH5D.java
index 8b34516..dac3a9c 100644
--- a/java/test/TestH5D.java
+++ b/java/test/TestH5D.java
@@ -26,8 +26,6 @@ import hdf.hdf5lib.callbacks.H5D_iterate_t;
import hdf.hdf5lib.exceptions.HDF5Exception;
import hdf.hdf5lib.exceptions.HDF5LibraryException;
-import test.H5TestUtils;
-
import org.junit.After;
import org.junit.Before;
import org.junit.Rule;
diff --git a/java/test/TestH5Dparams.java b/java/test/TestH5Dparams.java
index 91a2d33..3661139 100644
--- a/java/test/TestH5Dparams.java
+++ b/java/test/TestH5Dparams.java
@@ -15,7 +15,6 @@ package test;
import static org.junit.Assert.assertTrue;
import hdf.hdf5lib.H5;
import hdf.hdf5lib.exceptions.HDF5LibraryException;
-import test.H5TestUtils;
import org.junit.After;
import org.junit.Before;
diff --git a/java/test/TestH5Dplist.java b/java/test/TestH5Dplist.java
index cfd9661..774b9dd 100644
--- a/java/test/TestH5Dplist.java
+++ b/java/test/TestH5Dplist.java
@@ -23,8 +23,6 @@ import hdf.hdf5lib.HDF5Constants;
import hdf.hdf5lib.exceptions.HDF5Exception;
import hdf.hdf5lib.exceptions.HDF5LibraryException;
-import test.H5TestUtils;
-
import org.junit.After;
import org.junit.Before;
import org.junit.Rule;
diff --git a/java/test/TestH5Drw.java b/java/test/TestH5Drw.java
index 782245f..69fb9d7 100644
--- a/java/test/TestH5Drw.java
+++ b/java/test/TestH5Drw.java
@@ -26,8 +26,6 @@ import hdf.hdf5lib.callbacks.H5D_iterate_t;
import hdf.hdf5lib.exceptions.HDF5Exception;
import hdf.hdf5lib.exceptions.HDF5LibraryException;
-import test.H5TestUtils;
-
import org.junit.After;
import org.junit.Before;
import org.junit.Rule;
diff --git a/java/test/TestH5E.java b/java/test/TestH5E.java
index d4a9c82..cad0a06 100644
--- a/java/test/TestH5E.java
+++ b/java/test/TestH5E.java
@@ -27,8 +27,6 @@ import hdf.hdf5lib.callbacks.H5E_walk_cb;
import hdf.hdf5lib.callbacks.H5E_walk_t;
import hdf.hdf5lib.structs.H5E_error2_t;
-import test.H5TestUtils;
-
import org.junit.After;
import org.junit.Before;
import org.junit.Ignore;
diff --git a/java/test/TestH5Edefault.java b/java/test/TestH5Edefault.java
index e807e27..9e93cea 100644
--- a/java/test/TestH5Edefault.java
+++ b/java/test/TestH5Edefault.java
@@ -18,7 +18,6 @@ import static org.junit.Assert.fail;
import hdf.hdf5lib.H5;
import hdf.hdf5lib.HDF5Constants;
import hdf.hdf5lib.exceptions.HDF5LibraryException;
-import test.H5TestUtils;
import org.junit.After;
import org.junit.Before;
diff --git a/java/test/TestH5Eparams.java b/java/test/TestH5Eparams.java
index 2e40e94..e55f1fc 100644
--- a/java/test/TestH5Eparams.java
+++ b/java/test/TestH5Eparams.java
@@ -27,8 +27,6 @@ import hdf.hdf5lib.callbacks.H5E_walk_cb;
import hdf.hdf5lib.callbacks.H5E_walk_t;
import hdf.hdf5lib.structs.H5E_error2_t;
-import test.H5TestUtils;
-
import org.junit.After;
import org.junit.Before;
import org.junit.Ignore;
diff --git a/java/test/TestH5Eregister.java b/java/test/TestH5Eregister.java
index cec51c2..99e8e5f 100644
--- a/java/test/TestH5Eregister.java
+++ b/java/test/TestH5Eregister.java
@@ -15,7 +15,6 @@ package test;
import static org.junit.Assert.assertTrue;
import static org.junit.Assert.fail;
import hdf.hdf5lib.H5;
-import test.H5TestUtils;
import org.junit.After;
import org.junit.Before;
diff --git a/java/test/TestH5F.java b/java/test/TestH5F.java
index d016b27..16786b9 100644
--- a/java/test/TestH5F.java
+++ b/java/test/TestH5F.java
@@ -23,8 +23,6 @@ import hdf.hdf5lib.H5;
import hdf.hdf5lib.HDF5Constants;
import hdf.hdf5lib.exceptions.HDF5LibraryException;
-import test.H5TestUtils;
-
import org.junit.After;
import org.junit.Before;
import org.junit.Rule;
diff --git a/java/test/TestH5Fbasic.java b/java/test/TestH5Fbasic.java
index 9310feb..4f3d928 100644
--- a/java/test/TestH5Fbasic.java
+++ b/java/test/TestH5Fbasic.java
@@ -24,8 +24,6 @@ import hdf.hdf5lib.H5;
import hdf.hdf5lib.HDF5Constants;
import hdf.hdf5lib.exceptions.HDF5LibraryException;
-import test.H5TestUtils;
-
import org.junit.After;
import org.junit.Before;
import org.junit.Rule;
diff --git a/java/test/TestH5Fparams.java b/java/test/TestH5Fparams.java
index accca98..0376485 100644
--- a/java/test/TestH5Fparams.java
+++ b/java/test/TestH5Fparams.java
@@ -24,8 +24,6 @@ import hdf.hdf5lib.HDF5Constants;
import hdf.hdf5lib.exceptions.HDF5FunctionArgumentException;
import hdf.hdf5lib.structs.H5F_info2_t;
-import test.H5TestUtils;
-
import org.junit.After;
import org.junit.Before;
import org.junit.Ignore;
diff --git a/java/test/TestH5Fswmr.java b/java/test/TestH5Fswmr.java
index 88d683b..1ec78fe 100644
--- a/java/test/TestH5Fswmr.java
+++ b/java/test/TestH5Fswmr.java
@@ -22,8 +22,6 @@ import hdf.hdf5lib.H5;
import hdf.hdf5lib.HDF5Constants;
import hdf.hdf5lib.exceptions.HDF5LibraryException;
-import test.H5TestUtils;
-
import org.junit.After;
import org.junit.Before;
import org.junit.Rule;
diff --git a/java/test/TestH5G.java b/java/test/TestH5G.java
index cf51100..edf2cbe 100644
--- a/java/test/TestH5G.java
+++ b/java/test/TestH5G.java
@@ -25,8 +25,6 @@ import hdf.hdf5lib.exceptions.HDF5LibraryException;
import hdf.hdf5lib.structs.H5G_info_t;
import hdf.hdf5lib.structs.H5O_token_t;
-import test.H5TestUtils;
-
import org.junit.After;
import org.junit.Before;
import org.junit.Rule;
diff --git a/java/test/TestH5Gbasic.java b/java/test/TestH5Gbasic.java
index 017452b..6e2e450 100644
--- a/java/test/TestH5Gbasic.java
+++ b/java/test/TestH5Gbasic.java
@@ -23,8 +23,6 @@ import hdf.hdf5lib.HDF5Constants;
import hdf.hdf5lib.exceptions.HDF5LibraryException;
import hdf.hdf5lib.structs.H5G_info_t;
-import test.H5TestUtils;
-
import org.junit.After;
import org.junit.Before;
import org.junit.Rule;
diff --git a/java/test/TestH5Giterate.java b/java/test/TestH5Giterate.java
index 7eb44b7..388d2ac 100644
--- a/java/test/TestH5Giterate.java
+++ b/java/test/TestH5Giterate.java
@@ -20,7 +20,6 @@ import hdf.hdf5lib.HDF5Constants;
import hdf.hdf5lib.exceptions.HDF5LibraryException;
import hdf.hdf5lib.structs.H5G_info_t;
import hdf.hdf5lib.structs.H5O_token_t;
-import test.H5TestUtils;
import org.junit.After;
import org.junit.Before;
diff --git a/java/test/TestH5Lbasic.java b/java/test/TestH5Lbasic.java
index 40397bf..a28fc3d 100644
--- a/java/test/TestH5Lbasic.java
+++ b/java/test/TestH5Lbasic.java
@@ -25,8 +25,6 @@ import hdf.hdf5lib.callbacks.H5L_iterate_opdata_t;
import hdf.hdf5lib.exceptions.HDF5LibraryException;
import hdf.hdf5lib.structs.H5L_info_t;
-import test.H5TestUtils;
-
import org.junit.After;
import org.junit.Before;
import org.junit.Rule;
diff --git a/java/test/TestH5Lcreate.java b/java/test/TestH5Lcreate.java
index 11c6d2c..44af2e5 100644
--- a/java/test/TestH5Lcreate.java
+++ b/java/test/TestH5Lcreate.java
@@ -27,8 +27,6 @@ import hdf.hdf5lib.exceptions.HDF5Exception;
import hdf.hdf5lib.exceptions.HDF5LibraryException;
import hdf.hdf5lib.structs.H5L_info_t;
-import test.H5TestUtils;
-
import org.junit.After;
import org.junit.Before;
import org.junit.Ignore;
diff --git a/java/test/TestH5Lparams.java b/java/test/TestH5Lparams.java
index 4a1ce7e..30ee242 100644
--- a/java/test/TestH5Lparams.java
+++ b/java/test/TestH5Lparams.java
@@ -16,8 +16,6 @@ import static org.junit.Assert.assertTrue;
import hdf.hdf5lib.H5;
import hdf.hdf5lib.exceptions.HDF5LibraryException;
-import test.H5TestUtils;
-
import org.junit.After;
import org.junit.Before;
import org.junit.Rule;
diff --git a/java/test/TestH5Obasic.java b/java/test/TestH5Obasic.java
index 4ab60bd..350b7aa 100644
--- a/java/test/TestH5Obasic.java
+++ b/java/test/TestH5Obasic.java
@@ -29,8 +29,6 @@ import hdf.hdf5lib.structs.H5O_token_t;
import hdf.hdf5lib.structs.H5O_hdr_info_t;
import hdf.hdf5lib.structs.H5_ih_info_t;
-import test.H5TestUtils;
-
import org.junit.After;
import org.junit.Before;
import org.junit.Rule;
diff --git a/java/test/TestH5Ocopy.java b/java/test/TestH5Ocopy.java
index df646ca..b3b1acd 100644
--- a/java/test/TestH5Ocopy.java
+++ b/java/test/TestH5Ocopy.java
@@ -23,8 +23,6 @@ import hdf.hdf5lib.HDF5Constants;
import hdf.hdf5lib.exceptions.HDF5Exception;
import hdf.hdf5lib.exceptions.HDF5LibraryException;
-import test.H5TestUtils;
-
import org.junit.After;
import org.junit.Before;
import org.junit.Ignore;
diff --git a/java/test/TestH5Ocreate.java b/java/test/TestH5Ocreate.java
index 3fc0f29..774a78d 100644
--- a/java/test/TestH5Ocreate.java
+++ b/java/test/TestH5Ocreate.java
@@ -27,8 +27,6 @@ import hdf.hdf5lib.exceptions.HDF5Exception;
import hdf.hdf5lib.exceptions.HDF5LibraryException;
import hdf.hdf5lib.structs.H5O_info_t;
-import test.H5TestUtils;
-
import org.junit.After;
import org.junit.Before;
import org.junit.Ignore;
@@ -278,7 +276,7 @@ public class TestH5Ocreate {
@Test
public void testH5Oget_info_externallink() {
- if (H5TestUtils.H5VLfapl_is_native(HDF5Constants.H5P_DEFAULT)) {
+ if (H5.H5VLfapl_is_native(HDF5Constants.H5P_DEFAULT)) {
H5O_info_t obj_info = null;
_createExternalLink(H5fid, H5_EXTFILE, "DT1", H5fid, "L1", HDF5Constants.H5P_DEFAULT, HDF5Constants.H5P_DEFAULT);
diff --git a/java/test/TestH5Oparams.java b/java/test/TestH5Oparams.java
index 3a6f602..5cbabe1 100644
--- a/java/test/TestH5Oparams.java
+++ b/java/test/TestH5Oparams.java
@@ -16,7 +16,6 @@ import static org.junit.Assert.assertTrue;
import hdf.hdf5lib.H5;
import hdf.hdf5lib.HDF5Constants;
import hdf.hdf5lib.exceptions.HDF5LibraryException;
-import test.H5TestUtils;
import org.junit.After;
import org.junit.Before;
diff --git a/java/test/TestH5P.java b/java/test/TestH5P.java
index 9db1e5a..3879128 100644
--- a/java/test/TestH5P.java
+++ b/java/test/TestH5P.java
@@ -26,8 +26,6 @@ import hdf.hdf5lib.exceptions.HDF5FunctionArgumentException;
import hdf.hdf5lib.exceptions.HDF5LibraryException;
import hdf.hdf5lib.structs.H5F_info2_t;
-import test.H5TestUtils;
-
import org.junit.After;
import org.junit.Before;
import org.junit.Ignore;
diff --git a/java/test/TestH5PData.java b/java/test/TestH5PData.java
index 9bf458c..8b04629 100644
--- a/java/test/TestH5PData.java
+++ b/java/test/TestH5PData.java
@@ -24,8 +24,6 @@ import hdf.hdf5lib.HDF5Constants;
import hdf.hdf5lib.exceptions.HDF5Exception;
import hdf.hdf5lib.exceptions.HDF5LibraryException;
-import test.H5TestUtils;
-
import org.junit.After;
import org.junit.Before;
import org.junit.Rule;
diff --git a/java/test/TestH5PL.java b/java/test/TestH5PL.java
index 738ff39..d44cc0b 100644
--- a/java/test/TestH5PL.java
+++ b/java/test/TestH5PL.java
@@ -17,7 +17,6 @@ import static org.junit.Assert.fail;
import hdf.hdf5lib.H5;
import hdf.hdf5lib.HDF5Constants;
import hdf.hdf5lib.exceptions.HDF5LibraryException;
-import test.H5TestUtils;
import org.junit.After;
import org.junit.Before;
diff --git a/java/test/TestH5Pfapl.java b/java/test/TestH5Pfapl.java
index 7d96aec..a65b52e 100644
--- a/java/test/TestH5Pfapl.java
+++ b/java/test/TestH5Pfapl.java
@@ -28,8 +28,6 @@ import hdf.hdf5lib.exceptions.HDF5LibraryException;
import hdf.hdf5lib.exceptions.HDF5PropertyListInterfaceException;
import hdf.hdf5lib.structs.H5AC_cache_config_t;
-import test.H5TestUtils;
-
import org.junit.After;
import org.junit.Before;
import org.junit.Rule;
diff --git a/java/test/TestH5Pfaplhdfs.java b/java/test/TestH5Pfaplhdfs.java
index 2631f99..d922666 100644
--- a/java/test/TestH5Pfaplhdfs.java
+++ b/java/test/TestH5Pfaplhdfs.java
@@ -24,8 +24,6 @@ import hdf.hdf5lib.exceptions.HDF5Exception;
import hdf.hdf5lib.exceptions.HDF5LibraryException;
import hdf.hdf5lib.structs.H5FD_hdfs_fapl_t;
-import test.H5TestUtils;
-
import org.junit.After;
import org.junit.Before;
import org.junit.Rule;
diff --git a/java/test/TestH5Pfapls3.java b/java/test/TestH5Pfapls3.java
index 48b1cfa..dda2716 100644
--- a/java/test/TestH5Pfapls3.java
+++ b/java/test/TestH5Pfapls3.java
@@ -24,8 +24,6 @@ import hdf.hdf5lib.exceptions.HDF5Exception;
import hdf.hdf5lib.exceptions.HDF5LibraryException;
import hdf.hdf5lib.structs.H5FD_ros3_fapl_t;
-import test.H5TestUtils;
-
import org.junit.After;
import org.junit.Before;
import org.junit.Rule;
diff --git a/java/test/TestH5Plist.java b/java/test/TestH5Plist.java
index 429915b..0d53071 100644
--- a/java/test/TestH5Plist.java
+++ b/java/test/TestH5Plist.java
@@ -44,7 +44,6 @@ import hdf.hdf5lib.callbacks.H5P_iterate_t;
import hdf.hdf5lib.exceptions.HDF5Exception;
import hdf.hdf5lib.exceptions.HDF5LibraryException;
import hdf.hdf5lib.structs.H5AC_cache_config_t;
-import test.H5TestUtils;
import org.junit.After;
import org.junit.Before;
diff --git a/java/test/TestH5Pvirtual.java b/java/test/TestH5Pvirtual.java
index f82cfab..0478356 100644
--- a/java/test/TestH5Pvirtual.java
+++ b/java/test/TestH5Pvirtual.java
@@ -24,8 +24,6 @@ import hdf.hdf5lib.HDF5Constants;
import hdf.hdf5lib.exceptions.HDF5Exception;
import hdf.hdf5lib.exceptions.HDF5LibraryException;
-import test.H5TestUtils;
-
import org.junit.After;
import org.junit.Before;
import org.junit.Ignore;
diff --git a/java/test/TestH5R.java b/java/test/TestH5R.java
index 381ed08..031b8e4 100644
--- a/java/test/TestH5R.java
+++ b/java/test/TestH5R.java
@@ -26,8 +26,6 @@ import hdf.hdf5lib.exceptions.HDF5Exception;
import hdf.hdf5lib.exceptions.HDF5LibraryException;
import hdf.hdf5lib.exceptions.HDF5FunctionArgumentException;
-import test.H5TestUtils;
-
import org.junit.After;
import org.junit.Before;
import org.junit.Ignore;
diff --git a/java/test/TestH5Rref.java b/java/test/TestH5Rref.java
index b682d95..5733aae 100644
--- a/java/test/TestH5Rref.java
+++ b/java/test/TestH5Rref.java
@@ -26,8 +26,6 @@ import hdf.hdf5lib.exceptions.HDF5Exception;
import hdf.hdf5lib.exceptions.HDF5LibraryException;
import hdf.hdf5lib.exceptions.HDF5FunctionArgumentException;
-import test.H5TestUtils;
-
import org.junit.After;
import org.junit.Before;
import org.junit.Ignore;
diff --git a/java/test/TestH5S.java b/java/test/TestH5S.java
index 22a36f5..7eeed7a 100644
--- a/java/test/TestH5S.java
+++ b/java/test/TestH5S.java
@@ -20,7 +20,6 @@ import hdf.hdf5lib.H5;
import hdf.hdf5lib.HDF5Constants;
import hdf.hdf5lib.exceptions.HDF5Exception;
import hdf.hdf5lib.exceptions.HDF5LibraryException;
-import test.H5TestUtils;
import org.junit.After;
import org.junit.Before;
diff --git a/java/test/TestH5Sbasic.java b/java/test/TestH5Sbasic.java
index e4d052e..548ac95 100644
--- a/java/test/TestH5Sbasic.java
+++ b/java/test/TestH5Sbasic.java
@@ -17,7 +17,6 @@ import static org.junit.Assert.fail;
import hdf.hdf5lib.H5;
import hdf.hdf5lib.HDF5Constants;
import hdf.hdf5lib.exceptions.HDF5LibraryException;
-import test.H5TestUtils;
import org.junit.After;
import org.junit.Before;
diff --git a/java/test/TestH5T.java b/java/test/TestH5T.java
index de30b63..ed4e2a9 100644
--- a/java/test/TestH5T.java
+++ b/java/test/TestH5T.java
@@ -23,8 +23,6 @@ import hdf.hdf5lib.HDF5Constants;
import hdf.hdf5lib.exceptions.HDF5Exception;
import hdf.hdf5lib.exceptions.HDF5LibraryException;
-import test.H5TestUtils;
-
import org.junit.After;
import org.junit.Before;
import org.junit.Rule;
diff --git a/java/test/TestH5Tbasic.java b/java/test/TestH5Tbasic.java
index 082a66e..7aac2ab 100644
--- a/java/test/TestH5Tbasic.java
+++ b/java/test/TestH5Tbasic.java
@@ -17,7 +17,6 @@ import static org.junit.Assert.assertTrue;
import static org.junit.Assert.fail;
import hdf.hdf5lib.H5;
import hdf.hdf5lib.HDF5Constants;
-import test.H5TestUtils;
import org.junit.After;
import org.junit.Before;
diff --git a/java/test/TestH5Tparams.java b/java/test/TestH5Tparams.java
index a19698d..92a034c 100644
--- a/java/test/TestH5Tparams.java
+++ b/java/test/TestH5Tparams.java
@@ -15,7 +15,6 @@ package test;
import static org.junit.Assert.assertTrue;
import hdf.hdf5lib.H5;
import hdf.hdf5lib.exceptions.HDF5LibraryException;
-import test.H5TestUtils;
import org.junit.After;
import org.junit.Before;
diff --git a/java/test/TestH5VL.java b/java/test/TestH5VL.java
index c1766ff..49f0788 100644
--- a/java/test/TestH5VL.java
+++ b/java/test/TestH5VL.java
@@ -19,7 +19,6 @@ import static org.junit.Assert.fail;
import hdf.hdf5lib.H5;
import hdf.hdf5lib.HDF5Constants;
import hdf.hdf5lib.exceptions.HDF5LibraryException;
-import test.H5TestUtils;
import java.io.File;
@@ -172,7 +171,7 @@ public class TestH5VL {
@Test(expected = HDF5LibraryException.class)
public void testH5VLfapl_is_native() throws Throwable {
- H5TestUtils.H5VLfapl_is_native(-1);
+ H5.H5VLfapl_is_native(-1);
}
}
diff --git a/java/test/TestH5Z.java b/java/test/TestH5Z.java
index 53e57de..fde8f1a 100644
--- a/java/test/TestH5Z.java
+++ b/java/test/TestH5Z.java
@@ -17,7 +17,6 @@ import static org.junit.Assert.fail;
import hdf.hdf5lib.H5;
import hdf.hdf5lib.HDF5Constants;
import hdf.hdf5lib.exceptions.HDF5LibraryException;
-import test.H5TestUtils;
import org.junit.After;
import org.junit.Before;
diff --git a/java/test/junit.sh.in b/java/test/junit.sh.in
index f2bb871..39db296 100644
--- a/java/test/junit.sh.in
+++ b/java/test/junit.sh.in
@@ -62,7 +62,6 @@ test -d $BLDLIBDIR || mkdir -p $BLDLIBDIR
LIST_LIBRARY_FILES="
$top_builddir/src/.libs/libhdf5.*
$top_builddir/java/src/jni/.libs/libhdf5_java.*
-$top_builddir/java/src/jni/.libs/libhdf5_java_test.*
"
LIST_JAR_TESTFILES="
$HDFLIB_HOME/hamcrest-core.jar
@@ -151,21 +150,13 @@ COPY_LIBFILES_TO_BLDLIBDIR()
fi
fi
done
-
- # Patch rpath for MacOS (Darwin) builds
if [ "$IS_DARWIN" = "yes" ]; then
(cd testlibs; \
install_name_tool -add_rpath @loader_path libhdf5_java.dylib; \
- install_name_tool -add_rpath @loader_path libhdf5_java_test.dylib; \
exist_path=` otool -l libhdf5_java.dylib | grep libhdf5 | grep -v java | awk '{print $2}'`; \
-# echo "exist_path=" $exist_path; \
- install_name_tool -change $exist_path @rpath/libhdf5.dylib libhdf5_java.dylib; \
- install_name_tool -change $exist_path @rpath/libhdf5.dylib libhdf5_java_test.dylib; \
- exist_path2=` otool -l libhdf5_java_test.dylib | grep libhdf5_java | grep -v java_test | awk '{print $2}'`; \
-# echo "exist_path2=" $exist_path2; \
- install_name_tool -change $exist_path2 @rpath/libhdf5_java.dylib libhdf5_java_test.dylib)
+ echo $exist_path; \
+ install_name_tool -change $exist_path @rpath/libhdf5.dylib libhdf5_java.dylib)
fi
-
# copy jar files. Used -f to make sure get a new copy
for tstfile in $COPY_JARTESTFILES
do
diff --git a/release_docs/RELEASE.txt b/release_docs/RELEASE.txt
index bf14fbc..d9a4e8e 100644
--- a/release_docs/RELEASE.txt
+++ b/release_docs/RELEASE.txt
@@ -47,6 +47,21 @@ New Features
Configuration:
-------------
+ - Refactored the utils folder.
+
+ Added subfolder test and moved the 'swmr_check_compat_vfd.c file'
+ from test into utils/test. Deleted the duplicate swmr_check_compat_vfd.c
+ file in hl/tools/h5watch folder. Also fixed vfd check options.
+
+ (ADB - 2021/10/18)
+
+ - Changed autotools and CMake configurations to derive both
+ compilation warnings-as-errors and warnings-only-warn configurations
+ from the same files, 'config/*/*error*'. Removed redundant files
+ 'config/*/*noerror*'.
+
+ (DCY - 2021/09/29)
+
- Added new option to control the build of High-Level tools
that default ON/enabled.
diff --git a/src/H5ACprivate.h b/src/H5ACprivate.h
index e9b8a47..d252d85 100644
--- a/src/H5ACprivate.h
+++ b/src/H5ACprivate.h
@@ -234,27 +234,27 @@ typedef struct H5AC_proxy_entry_t {
/* hbool_t evictions_enabled = */ TRUE, \
/* hbool_t set_initial_size = */ TRUE, \
/* size_t initial_size = */ ( 2 * 1024 * 1024), \
- /* double min_clean_fraction = */ 0.3f, \
+ /* double min_clean_fraction = */ 0.3, \
/* size_t max_size = */ (32 * 1024 * 1024), \
/* size_t min_size = */ (1 * 1024 * 1024), \
/* long int epoch_length = */ 50000, \
/* enum H5C_cache_incr_mode incr_mode = */ H5C_incr__threshold, \
- /* double lower_hr_threshold = */ 0.9f, \
- /* double increment = */ 2.0f, \
+ /* double lower_hr_threshold = */ 0.9, \
+ /* double increment = */ 2.0, \
/* hbool_t apply_max_increment = */ TRUE, \
/* size_t max_increment = */ (4 * 1024 * 1024), \
/* enum H5C_cache_flash_incr_mode */ \
/* flash_incr_mode = */ H5C_flash_incr__add_space, \
- /* double flash_multiple = */ 1.0f, \
- /* double flash_threshold = */ 0.25f, \
+ /* double flash_multiple = */ 1.0, \
+ /* double flash_threshold = */ 0.25, \
/* enum H5C_cache_decr_mode decr_mode = */ H5C_decr__age_out_with_threshold, \
- /* double upper_hr_threshold = */ 0.999f, \
- /* double decrement = */ 0.9f, \
+ /* double upper_hr_threshold = */ 0.999, \
+ /* double decrement = */ 0.9, \
/* hbool_t apply_max_decrement = */ TRUE, \
/* size_t max_decrement = */ (1 * 1024 * 1024), \
/* int epochs_before_eviction = */ 3, \
/* hbool_t apply_empty_reserve = */ TRUE, \
- /* double empty_reserve = */ 0.1f, \
+ /* double empty_reserve = */ 0.1, \
/* size_t dirty_bytes_threshold = */ (256 * 1024), \
/* int metadata_write_strategy = */ \
H5AC__DEFAULT_METADATA_WRITE_STRATEGY \
@@ -270,7 +270,7 @@ typedef struct H5AC_proxy_entry_t {
/* hbool_t evictions_enabled = */ TRUE, \
/* hbool_t set_initial_size = */ TRUE, \
/* size_t initial_size = */ ( 2 * 1024 * 1024), \
- /* double min_clean_fraction = */ 0.01f, \
+ /* double min_clean_fraction = */ 0.01, \
/* size_t max_size = */ (32 * 1024 * 1024), \
/* size_t min_size = */ ( 1 * 1024 * 1024), \
/* long int epoch_length = */ 50000, \
diff --git a/src/H5Tconv.c b/src/H5Tconv.c
index bcfe86e..08468eb 100644
--- a/src/H5Tconv.c
+++ b/src/H5Tconv.c
@@ -3210,14 +3210,14 @@ H5T__conv_vlen(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, si
HGOTO_ERROR(H5E_DATATYPE, H5E_CANTCOPY, FAIL, "unable to copy src type for conversion")
/* References need to know about the src file */
if (tsrc_cpy->shared->type == H5T_REFERENCE)
- if (H5T_set_loc(tsrc_cpy, src_vl->file_obj, src->shared->u.vlen.loc) < 0)
+ if (H5T_set_loc(tsrc_cpy, src_vl->file_obj, src_vl->loc) < 0)
HGOTO_ERROR(H5E_DATATYPE, H5E_CANTSET, FAIL, "can't set datatype location");
if (NULL == (tdst_cpy = H5T_copy(dst->shared->parent, H5T_COPY_ALL)))
HGOTO_ERROR(H5E_DATATYPE, H5E_CANTCOPY, FAIL, "unable to copy dst type for conversion")
/* References need to know about the dst file */
if (tdst_cpy->shared->type == H5T_REFERENCE)
- if (H5T_set_loc(tdst_cpy, dst_vl->file_obj, dst->shared->u.vlen.loc) < 0)
+ if (H5T_set_loc(tdst_cpy, dst_vl->file_obj, dst_vl->loc) < 0)
HGOTO_ERROR(H5E_DATATYPE, H5E_CANTSET, FAIL, "can't set datatype location");
if (((tsrc_id = H5I_register(H5I_DATATYPE, tsrc_cpy, FALSE)) < 0) ||
diff --git a/src/H5VL.c b/src/H5VL.c
index d3e7c94..64dacb5 100644
--- a/src/H5VL.c
+++ b/src/H5VL.c
@@ -1077,3 +1077,37 @@ H5VLunregister_opt_operation(H5VL_subclass_t subcls, const char *op_name)
done:
FUNC_LEAVE_API(ret_value)
} /* H5VLunregister_opt_operation() */
+
+/*-------------------------------------------------------------------------
+ * Function: H5VLfapl_is_native
+ *
+ * Purpose: Query if a FAPL will use the native VOL connector.
+ *
+ * Return: Success: Non-negative
+ * Failure: Negative
+ *
+ *-------------------------------------------------------------------------
+ */
+herr_t
+H5VLfapl_is_native(hid_t fapl_id, hbool_t *is_native)
+{
+ herr_t ret_value = SUCCEED;
+
+ FUNC_ENTER_API(FAIL)
+ H5TRACE2("e", "i*b", fapl_id, is_native);
+
+ /* Check args */
+ if (NULL == is_native)
+ HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid is_native pointer")
+
+ /* Check for default property list value */
+ if (H5P_DEFAULT == fapl_id)
+ fapl_id = H5P_FILE_ACCESS_DEFAULT;
+
+ /* Invoke the private API call */
+ if (H5VL_fapl_is_native(fapl_id, is_native) < 0)
+ HGOTO_ERROR(H5E_VOL, H5E_CANTGET, FAIL, "can't get VOL connector info")
+
+done:
+ FUNC_LEAVE_API(ret_value)
+} /* end H5VLfapl_is_native() */
diff --git a/src/H5VLpublic.h b/src/H5VLpublic.h
index 78e39e3..92e0dee 100644
--- a/src/H5VLpublic.h
+++ b/src/H5VLpublic.h
@@ -357,6 +357,18 @@ H5_DLL herr_t H5VLunregister_connector(hid_t connector_id);
*/
H5_DLL herr_t H5VLquery_optional(hid_t obj_id, H5VL_subclass_t subcls, int opt_type, uint64_t *flags);
+/**
+ * \ingroup H5VL
+ * \brief Determine if a fapl is set to use the native VOL connector.
+ *
+ * \fapl_id
+ * \param[out] is_native Whether the fapl uses the native VOL connector.
+ * \return \herr_t
+ *
+ * \since 1.13.0
+ */
+H5_DLL herr_t H5VLfapl_is_native(hid_t fapl_id, hbool_t *is_native);
+
#ifdef __cplusplus
}
#endif
diff --git a/src/hdf5.h b/src/hdf5.h
index 8751ec5..55a5838 100644
--- a/src/hdf5.h
+++ b/src/hdf5.h
@@ -46,6 +46,7 @@
#include "H5FDdevelop.h" /* File drivers */
#include "H5Idevelop.h" /* ID management */
#include "H5Ldevelop.h" /* Links */
+#include "H5Pdevelop.h" /* Plugins */
#include "H5Tdevelop.h" /* Datatypes */
#include "H5TSdevelop.h" /* Threadsafety */
#include "H5Zdevelop.h" /* Data filters */
diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt
index 4efe087..37e6af6 100644
--- a/test/CMakeLists.txt
+++ b/test/CMakeLists.txt
@@ -357,7 +357,7 @@ set (H5_TESTS
ros3
s3comms
hdfs
- mirror_vfd
+ #mirror_vfd # multiple source
ntypes
dangle
dtransform
@@ -378,6 +378,9 @@ set (H5_TESTS
cmpd_dtransform
event_set
)
+if (HDF5_BUILD_UTILS)
+ set (H5_TESTS ${H5_TESTS} mirror_vfd)
+endif ()
macro (ADD_H5_EXE file)
add_executable (${file} ${HDF5_TEST_SOURCE_DIR}/${file}.c)
@@ -552,30 +555,25 @@ if (HDF5_ENABLE_FORMATTERS)
clang_format (HDF5_TEST_thread_id_FORMAT thread_id)
endif ()
+if (HDF5_BUILD_UTILS)
#-- 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}>")
-if (NOT BUILD_SHARED_LIBS)
- TARGET_C_PROPERTIES (mirror_vfd STATIC)
- target_link_libraries (mirror_vfd PRIVATE ${HDF5_TEST_LIB_TARGET})
-else ()
- TARGET_C_PROPERTIES (mirror_vfd SHARED)
- target_link_libraries (mirror_vfd PRIVATE ${HDF5_TEST_LIBSH_TARGET})
-endif ()
-set_target_properties (mirror_vfd PROPERTIES FOLDER test)
-
-#-----------------------------------------------------------------------------
-# Add Target to clang-format
-#-----------------------------------------------------------------------------
-if (HDF5_ENABLE_FORMATTERS)
- clang_format (HDF5_TEST_mirror_vfd_FORMAT mirror_vfd)
-endif ()
+ target_include_directories (mirror_vfd PRIVATE "${HDF5_SRC_DIR};${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})
+ else ()
+ TARGET_C_PROPERTIES (mirror_vfd SHARED)
+ target_link_libraries (mirror_vfd PRIVATE ${HDF5_TEST_LIBSH_TARGET})
+ endif ()
+ set_target_properties (mirror_vfd PROPERTIES FOLDER test)
-#-----------------------------------------------------------------------------
-# Add Target to clang-format
-#-----------------------------------------------------------------------------
-if (HDF5_ENABLE_FORMATTERS)
- clang_format (HDF5_TEST_event_set_FORMAT event_set)
+ #-----------------------------------------------------------------------------
+ # Add Target to clang-format
+ #-----------------------------------------------------------------------------
+ if (HDF5_ENABLE_FORMATTERS)
+ clang_format (HDF5_TEST_mirror_vfd_FORMAT mirror_vfd)
+ endif ()
endif ()
##############################################################################
diff --git a/test/CMakeVFDTests.cmake b/test/CMakeVFDTests.cmake
index 723595b..130b0bf 100644
--- a/test/CMakeVFDTests.cmake
+++ b/test/CMakeVFDTests.cmake
@@ -17,40 +17,8 @@
##############################################################################
# included from CMakeTests.cmake
-set (VFD_LIST
- sec2
- stdio
- core
- core_paged
- split
- multi
- family
- splitter
- #log - log VFD currently has file space allocation bugs
-)
-
-if (H5_HAVE_DIRECT)
- set (VFD_LIST ${VFD_LIST} direct)
-endif ()
-if (H5_HAVE_PARALLEL)
- # MPI I/O VFD is currently incompatible with too many tests in the VFD test set
- # set (VFD_LIST ${VFD_LIST} mpio)
-endif ()
-if (H5_HAVE_MIRROR_VFD)
- set (VFD_LIST ${VFD_LIST} mirror)
-endif ()
-if (H5_HAVE_ROS3_VFD)
- set (VFD_LIST ${VFD_LIST} ros3)
-endif ()
-if (H5_HAVE_LIBHDFS)
- set (VFD_LIST ${VFD_LIST} hdfs)
-endif ()
-if (H5_HAVE_WINDOWS)
- set (VFD_LIST ${VFD_LIST} windows)
-endif ()
-
+# create more test folders for each VFD
foreach (vfdtest ${VFD_LIST})
- file (MAKE_DIRECTORY "${PROJECT_BINARY_DIR}/${vfdtest}")
file (MAKE_DIRECTORY "${PROJECT_BINARY_DIR}/${vfdtest}/testfiles")
file (MAKE_DIRECTORY "${PROJECT_BINARY_DIR}/${vfdtest}/testfiles/plist_files")
endforeach ()
diff --git a/test/Makefile.am b/test/Makefile.am
index b55a0fd..57f89b0 100644
--- a/test/Makefile.am
+++ b/test/Makefile.am
@@ -36,8 +36,7 @@ AM_CPPFLAGS+=-I$(top_srcdir)/src -I$(top_builddir)/src
# test_mirror.sh: mirror_vfd ../utils/mirror_vfd/*
# test_usecases.sh: use_append_chunk, use_append_mchunks, use_disable_mdc_flushes
TEST_SCRIPT = testerror.sh testlibinfo.sh testcheck_version.sh testlinks_env.sh testexternal_env.sh \
- testswmr.sh testvds_env.sh testvdsswmr.sh testflushrefresh.sh test_usecases.sh testabort_fail.sh \
- test_mirror.sh
+ testswmr.sh testvds_env.sh testvdsswmr.sh testflushrefresh.sh test_usecases.sh testabort_fail.sh
SCRIPT_DEPEND = error_test$(EXEEXT) err_compat$(EXEEXT) links_env$(EXEEXT) \
external_env$(EXEEXT) filenotclosed$(EXEEXT) del_many_dense_attrs$(EXEEXT) \
flushrefresh$(EXEEXT) use_append_chunk$(EXEEXT) use_append_mchunks$(EXEEXT) use_disable_mdc_flushes$(EXEEXT) \
@@ -50,6 +49,10 @@ if HAVE_SHARED_CONDITIONAL
SCRIPT_DEPEND += filter_plugin$(EXEEXT) vol_plugin$(EXEEXT)
endif
+if MIRROR_VFD_CONDITIONAL
+ TEST_SCRIPT += test_mirror.sh
+endif
+
check_SCRIPTS = $(TEST_SCRIPT)
# These are our main targets. They should be listed in the order to be
@@ -91,12 +94,15 @@ check_PROGRAMS=$(TEST_PROG) error_test err_compat tcheck_version \
use_append_chunk use_append_chunk_mirror use_append_mchunks use_disable_mdc_flushes \
swmr_generator swmr_start_write swmr_reader swmr_writer swmr_remove_reader \
swmr_remove_writer swmr_addrem_writer swmr_sparse_reader swmr_sparse_writer \
- vds_env vds_swmr_gen vds_swmr_reader vds_swmr_writer \
- mirror_vfd
+ vds_env vds_swmr_gen vds_swmr_reader vds_swmr_writer
if HAVE_SHARED_CONDITIONAL
check_PROGRAMS+= filter_plugin vfd_plugin vol_plugin
endif
+if MIRROR_VFD_CONDITIONAL
+ check_PROGRAMS+= mirror_vfd
+endif
+
# These programs generate test files for the tests. They don't need to be
# compiled every time we want to test the library. However, putting
# them in a conditional causes automake to generate rules so that they
diff --git a/test/ShellTests.cmake b/test/ShellTests.cmake
index 4074299..732091b 100644
--- a/test/ShellTests.cmake
+++ b/test/ShellTests.cmake
@@ -21,6 +21,7 @@ if (UNIX)
if (SH_PROGRAM)
set (srcdir ${HDF5_TEST_SOURCE_DIR})
set (bindir ${CMAKE_RUNTIME_OUTPUT_DIRECTORY})
+ set (testdir ${CMAKE_RUNTIME_OUTPUT_DIRECTORY})
##############################################################################
# configure scripts to test dir
##############################################################################
@@ -37,7 +38,7 @@ if (UNIX)
#shell script creates dir
#file (MAKE_DIRECTORY "${PROJECT_BINARY_DIR}/H5TEST/swmr_test")
add_custom_command (
- TARGET output_filter.sh
+ TARGET accum_swmr_reader
POST_BUILD
COMMAND ${CMAKE_COMMAND}
ARGS -E copy_if_different "${HDF5_SOURCE_DIR}/bin/output_filter.sh" "${HDF5_TEST_BINARY_DIR}/H5TEST/bin/output_filter.sh"
@@ -46,9 +47,11 @@ if (UNIX)
#shell script creates dir
#file (MAKE_DIRECTORY "${PROJECT_BINARY_DIR}/H5TEST/usecases_test")
- file (MAKE_DIRECTORY "${PROJECT_BINARY_DIR}/H5TEST/swmr_test")
+ #shell script creates dir
+ #file (MAKE_DIRECTORY "${PROJECT_BINARY_DIR}/H5TEST/swmr_test")
- file (MAKE_DIRECTORY "${PROJECT_BINARY_DIR}/H5TEST/vds_swmr_test")
+ #shell script creates dir
+ #file (MAKE_DIRECTORY "${PROJECT_BINARY_DIR}/H5TEST/vds_swmr_test")
##############################################################################
##############################################################################
diff --git a/test/cache_api.c b/test/cache_api.c
index 432dab3..ff74f64 100644
--- a/test/cache_api.c
+++ b/test/cache_api.c
@@ -546,7 +546,7 @@ check_file_mdc_api_calls(unsigned paged, hid_t fcpl_id)
/* size_t max_decrement = */ (1 * 1024 * 1024 - 1),
/* int epochs_before_eviction = */ 4,
/* hbool_t apply_empty_reserve = */ TRUE,
- /* double empty_reserve = */ 0.05f,
+ /* double empty_reserve = */ 0.05,
/* int dirty_bytes_threshold = */ (256 * 1024),
/* int metadata_write_strategy = */
H5AC__DEFAULT_METADATA_WRITE_STRATEGY};
diff --git a/test/links.c b/test/links.c
index 4627a35..1c01b0f 100644
--- a/test/links.c
+++ b/test/links.c
@@ -22659,6 +22659,10 @@ main(void)
HDputs(" External link tests skipped - not using native VOL connector, or using splitter "
"VFD");
}
+ else if (HDstrcmp(env_h5_drvr, "splitter") == 0) {
+ HDputs(" External link tests skipped - splitter VFD does not currently support external "
+ "links");
+ }
else {
/* tests for external link */
/* Test external file cache first, so it sees the default efc setting on the fapl
diff --git a/test/objcopy.c b/test/objcopy.c
index 3f28fa6..9f98cf9 100644
--- a/test/objcopy.c
+++ b/test/objcopy.c
@@ -11117,7 +11117,7 @@ test_copy_dataset_contig_cmpd_vl(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl,
buf[i].b.p = (int *)HDmalloc(buf[i].b.len * sizeof(int));
for (j = 0; j < buf[i].b.len; j++)
((int *)buf[i].b.p)[j] = (int)(i * 10 + j);
- buf[i].c = 1.0F / ((float)i + 1.0F);
+ buf[i].c = 1.0 / ((double)i + 1.0);
} /* end for */
/* Initialize the filenames */
@@ -11293,7 +11293,7 @@ test_copy_dataset_chunked_cmpd_vl(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl
buf[i].b.p = (int *)HDmalloc(buf[i].b.len * sizeof(int));
for (j = 0; j < buf[i].b.len; j++)
((int *)buf[i].b.p)[j] = (int)(i * 10 + j);
- buf[i].c = 1.0F / ((float)i + 1.0F);
+ buf[i].c = 1.0 / ((double)i + 1.0);
} /* end for */
/* Initialize the filenames */
@@ -11478,7 +11478,7 @@ test_copy_dataset_compact_cmpd_vl(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl
buf[i].b.p = (int *)HDmalloc(buf[i].b.len * sizeof(int));
for (j = 0; j < buf[i].b.len; j++)
((int *)buf[i].b.p)[j] = (int)(i * 10 + j);
- buf[i].c = 1.0F / ((float)i + 1.0F);
+ buf[i].c = 1.0 / ((double)i + 1.0);
} /* end for */
/* Initialize the filenames */
diff --git a/test/test_usecases.sh.in b/test/test_usecases.sh.in
index 7ba5583..3f7d5f1 100644
--- a/test/test_usecases.sh.in
+++ b/test/test_usecases.sh.in
@@ -21,8 +21,27 @@
# For now, it shows how to run the test cases programs. It only verifies the
# exit codes are okay (0).
+###############################################################################
+## test variables
+###############################################################################
+
+# Number of errors encountered during test run.
+nerrors=0
+
+# Define variables
+verbose=yes
+
+###############################################################################
+## Main
+###############################################################################
srcdir=@srcdir@
bindir=@bindir@
+testdir=@testdir@
+
+# The build (current) directory might be different than the source directory.
+if test -z "$srcdir"; then
+ srcdir=.
+fi
# If the bindir directory is not set just use current (.).
if test -z "$bindir"; then
@@ -36,7 +55,7 @@ fi
# Check to see if the VFD specified by the HDF5_DRIVER environment variable
# supports SWMR.
-../utils/swmr_compat_vfd
+$bindir/swmr_check_compat_vfd
rc=$?
if [[ $rc != 0 ]] ; then
echo
@@ -58,10 +77,6 @@ RESULT_SKIP="-SKIP-"
USECASES_PROGRAMS="use_append_chunk use_append_mchunks"
TESTNAME="Use Case"
-# Define variables
-nerrors=0
-verbose=yes
-
# Source in the output filter function definitions.
. $srcdir/../bin/output_filter.sh
@@ -128,7 +143,7 @@ TOOLTEST() {
# the test. Running each of these tests in its own directory should eliminate
# the problem.
mkdir usecases_test
-cp twriteorder usecases_test
+cp $bindir/twriteorder usecases_test
for FILE in use_*; do
case "$FILE" in
*.o) continue ;; ## don't copy the .o files
diff --git a/test/testflushrefresh.sh.in b/test/testflushrefresh.sh.in
index b58799a..3c7f13d 100644
--- a/test/testflushrefresh.sh.in
+++ b/test/testflushrefresh.sh.in
@@ -58,14 +58,28 @@ fi
###############################################################################
## Main
###############################################################################
+srcdir=@srcdir@
+bindir=@bindir@
+testdir=@testdir@
+
# The build (current) directory might be different than the source directory.
if test -z "$srcdir"; then
srcdir=.
fi
+# If the bindir directory is not set just use current (.).
+if test -z "$bindir"; then
+ bindir=.
+fi
+
+# If the testdir directory is not set just use current (.).
+if test -z "$testdir"; then
+ testdir=.
+fi
+
# Check to see if the VFD specified by the HDF5_DRIVER environment variable
# supports SWMR.
-../utils/swmr_compat_vfd
+$bindir/swmr_check_compat_vfd
rc=$?
if [ $rc -ne 0 ] ; then
echo
@@ -83,7 +97,7 @@ fi
# the test. Running each of these tests in its own directory should eliminate
# the problem.
mkdir -p flushrefresh_test
-cp flushrefresh flushrefresh_test
+cp $bindir/flushrefresh flushrefresh_test
# With the --disable-shared option, flushrefresh is built in the test directory,
# otherwise it is in test/.libs with a wrapper script named flushrefresh in
@@ -118,7 +132,7 @@ fi
# ========================
# Launch the Test Program.
# ========================
-./flushrefresh &
+$testdir/flushrefresh &
pid_main=$!
# =======================================
@@ -155,7 +169,7 @@ until [ $verification_done -eq 1 ]; do
verification_done=1
echo "all flush verification complete" > $endsignal
else
- ./flushrefresh $param1 $param2
+ $testdir/flushrefresh $param1 $param2
# Check for core dump
if [ $? -gt 0 ]; then
@@ -200,7 +214,7 @@ if [ $timedout -eq 0 ]; then
verification_done=2
echo "all refresh verification complete" > $endsignal
else
- ./flushrefresh $param1
+ $testdir/flushrefresh $param1
# Check for core dump
if [ $? -gt 0 ]; then
diff --git a/test/testswmr.sh.in b/test/testswmr.sh.in
index 0ae554c..cb60fce 100644
--- a/test/testswmr.sh.in
+++ b/test/testswmr.sh.in
@@ -18,6 +18,7 @@
srcdir=@srcdir@
bindir=@bindir@
+testdir=@testdir@
###############################################################################
## test parameters
@@ -110,7 +111,7 @@ fi
# Check to see if the VFD specified by the HDF5_DRIVER environment variable
# supports SWMR.
-../utils/swmr_compat_vfd
+$bindir/swmr_check_compat_vfd
rc=$?
if [ $rc -ne 0 ] ; then
echo
diff --git a/test/testvdsswmr.sh.in b/test/testvdsswmr.sh.in
index a1225a2..ea1d77d 100644
--- a/test/testvdsswmr.sh.in
+++ b/test/testvdsswmr.sh.in
@@ -18,6 +18,7 @@
srcdir=@srcdir@
bindir=@bindir@
+testdir=@testdir@
###############################################################################
## test parameters
@@ -96,7 +97,7 @@ fi
# Check to see if the VFD specified by the HDF5_DRIVER environment variable
# supports SWMR.
-../utils/swmr_compat_vfd
+$bindir/swmr_check_compat_vfd
rc=$?
if [ $rc -ne 0 ] ; then
echo
@@ -112,7 +113,7 @@ fi
# environment variable supports Virtual Datasets.
#
# Note: Depends on vds_elink_compat_vol tool from $(topdir)/utils
-../utils/vds_elink_compat_vol
+$bindir/vds_elink_compat_vol
rc=$?
if [ $rc -ne 0 ] ; then
echo
diff --git a/test/tunicode.c b/test/tunicode.c
index 1b696ac..7d4dba6 100644
--- a/test/tunicode.c
+++ b/test/tunicode.c
@@ -34,7 +34,7 @@
#define RANK 1
#define COMP_INT_VAL 7
#define COMP_FLOAT_VAL (-42.0F)
-#define COMP_DOUBLE_VAL 42.0F
+#define COMP_DOUBLE_VAL 42.0
/* Test function prototypes */
void test_fl_string(hid_t fid, const char *string);
diff --git a/testpar/CMakeVFDTests.cmake b/testpar/CMakeVFDTests.cmake
index 785c08d..12df1e9 100644
--- a/testpar/CMakeVFDTests.cmake
+++ b/testpar/CMakeVFDTests.cmake
@@ -15,46 +15,12 @@
### T E S T I N G ###
##############################################################################
##############################################################################
-set (VFD_LIST
- sec2
- stdio
- core
- core_paged
- split
- multi
- family
- splitter
- #log - log VFD currently has file space allocation bugs
-)
set (H5P_VFD_TESTS
t_pflush1
t_pflush2
)
-if (H5_HAVE_DIRECT)
- set (VFD_LIST ${VFD_LIST} direct)
-endif ()
-if (H5_HAVE_PARALLEL)
- set (VFD_LIST ${VFD_LIST} mpio)
-endif ()
-if (H5_HAVE_MIRROR_VFD)
- set (VFD_LIST ${VFD_LIST} mirror)
-endif ()
-if (H5_HAVE_ROS3_VFD)
- set (VFD_LIST ${VFD_LIST} ros3)
-endif ()
-if (H5_HAVE_LIBHDFS)
- set (VFD_LIST ${VFD_LIST} hdfs)
-endif ()
-if (H5_HAVE_WINDOWS)
- set (VFD_LIST ${VFD_LIST} windows)
-endif ()
-
-foreach (vfdtest ${VFD_LIST})
- file (MAKE_DIRECTORY "${PROJECT_BINARY_DIR}/${vfdtest}")
-endforeach ()
-
macro (ADD_VFD_TEST vfdname resultcode)
if (NOT HDF5_ENABLE_USING_MEMCHECKER)
foreach (h5_test ${H5P_VFD_TESTS})
diff --git a/tools/lib/h5diff_array.c b/tools/lib/h5diff_array.c
index 2d6c66c..e16a045 100644
--- a/tools/lib/h5diff_array.c
+++ b/tools/lib/h5diff_array.c
@@ -2070,7 +2070,7 @@ diff_ldouble_element(unsigned char *mem1, unsigned char *mem2, hsize_t elem_idx,
/* both not NaN, do the comparison */
if (!isnan1 && !isnan2) {
- if (ABS(temp1_double - temp2_double) > opts->delta) {
+ if ((double)ABS(temp1_double - temp2_double) > opts->delta) {
opts->print_percentage = 0;
print_pos(opts, elem_idx, 0);
if (print_data(opts)) {
@@ -2163,7 +2163,7 @@ diff_ldouble_element(unsigned char *mem1, unsigned char *mem2, hsize_t elem_idx,
}
nfound++;
}
- else if (per > opts->percent && ABS(temp1_double - temp2_double) > opts->delta) {
+ else if (per > opts->percent && (double)ABS(temp1_double - temp2_double) > opts->delta) {
opts->print_percentage = 1;
print_pos(opts, elem_idx, 0);
if (print_data(opts)) {
diff --git a/tools/test/h5diff/testh5diff.sh.in b/tools/test/h5diff/testh5diff.sh.in
index 103dd7b..573d657 100644
--- a/tools/test/h5diff/testh5diff.sh.in
+++ b/tools/test/h5diff/testh5diff.sh.in
@@ -35,7 +35,7 @@ EXIT_FAILURE=1
H5DIFF=../../src/h5diff/h5diff # The tool name
H5DIFF_BIN=`pwd`/$H5DIFF # The path of the tool binary
-VDS_ELINK_COMPAT_VOL=../../../utils/vds_elink_compat_vol # The vds_elink_compat_vol tool name
+VDS_ELINK_COMPAT_VOL=../../../utils/test/vds_elink_compat_vol # The vds_elink_compat_vol tool name
VDS_ELINK_COMPAT_VOL_BIN=`pwd`/$VDS_ELINK_COMPAT_VOL # The path of the vds_elink_compat_vol tool binary
RM='rm -rf'
@@ -600,7 +600,7 @@ $CP -f $SRC_TOOLS_TESTFILES/tvlstr.h5 $TESTDIR/tvlstr2.h5
# Check to see if the VOL connector specified by the HDF5_VOL_CONNECTOR
# environment variable supports virtual datasets (and external links)
#
-# Note: Depends on vds_elink_compat_vol tool from $(topdir)/utils
+# Note: Depends on vds_elink_compat_vol tool from $(topdir)/utils/test
$VDS_ELINK_COMPAT_VOL_BIN
COMPAT_VOL=$?
@@ -975,7 +975,6 @@ TOOLTEST h5diff_402.txt --follow-symlinks -v h5diff_softlinks.h5 h5diff_softlink
TOOLTEST h5diff_403.txt --follow-symlinks -v h5diff_softlinks.h5 h5diff_softlinks.h5 /softlink_dset1_1 /softlink_dset2
# extlink vs extlink (FILE)"
-# Note: Requires VOL connector that supports external links
ARGS="h5diff_404.txt --follow-symlinks -v h5diff_extlink_src.h5 h5diff_extlink_src.h5"
if [ $COMPAT_VOL -eq $EXIT_SUCCESS ]; then
TOOLTEST $ARGS
@@ -986,7 +985,6 @@ else
fi
# extlink vs dset"
-# Note: Requires VOL connector that supports external links
ARGS="h5diff_405.txt --follow-symlinks -v h5diff_extlink_src.h5 h5diff_extlink_trg.h5 /ext_link_dset1 /target_group2/x_dset"
if [ $COMPAT_VOL -eq $EXIT_SUCCESS ]; then
TOOLTEST $ARGS
@@ -997,7 +995,6 @@ else
fi
# dset vs extlink"
-# Note: Requires VOL connector that supports external links
ARGS="h5diff_406.txt --follow-symlinks -v h5diff_extlink_trg.h5 h5diff_extlink_src.h5 /target_group2/x_dset /ext_link_dset1"
if [ $COMPAT_VOL -eq $EXIT_SUCCESS ]; then
TOOLTEST $ARGS
@@ -1008,7 +1005,6 @@ else
fi
# extlink vs extlink"
-# Note: Requires VOL connector that supports external links
ARGS="h5diff_407.txt --follow-symlinks -v h5diff_extlink_src.h5 h5diff_extlink_src.h5 /ext_link_dset1 /ext_link_dset2"
if [ $COMPAT_VOL -eq $EXIT_SUCCESS ]; then
TOOLTEST $ARGS
@@ -1019,7 +1015,6 @@ else
fi
# softlink vs extlink"
-# Note: Requires VOL connector that supports external links
ARGS="h5diff_408.txt --follow-symlinks -v h5diff_softlinks.h5 h5diff_extlink_src.h5 /softlink_dset1_1 /ext_link_dset2"
if [ $COMPAT_VOL -eq $EXIT_SUCCESS ]; then
TOOLTEST $ARGS
@@ -1030,7 +1025,6 @@ else
fi
# extlink vs softlink "
-# Note: Requires VOL connector that supports external links
ARGS="h5diff_409.txt --follow-symlinks -v h5diff_extlink_src.h5 h5diff_softlinks.h5 /ext_link_dset2 /softlink_dset1_1"
if [ $COMPAT_VOL -eq $EXIT_SUCCESS ]; then
TOOLTEST $ARGS
@@ -1068,7 +1062,6 @@ TOOLTEST h5diff_417.txt --follow-symlinks -v h5diff_softlinks.h5 h5diff_softlink
TOOLTEST h5diff_418.txt --follow-symlinks -v h5diff_softlinks.h5 h5diff_softlinks.h5 /softlink_dset2 /softlink_noexist
# non-exist-extlink_file vs extlink"
-# Note: Requires VOL connector that supports external links
ARGS="h5diff_419.txt --follow-symlinks -v h5diff_extlink_src.h5 h5diff_extlink_src.h5 /ext_link_noexist2 /ext_link_dset2"
if [ $COMPAT_VOL -eq $EXIT_SUCCESS ]; then
TOOLTEST $ARGS
@@ -1079,7 +1072,6 @@ else
fi
# exlink vs non-exist-extlink_file"
-# Note: Requires VOL connector that supports external links
ARGS="h5diff_420.txt --follow-symlinks -v h5diff_extlink_src.h5 h5diff_extlink_src.h5 /ext_link_dset2 /ext_link_noexist2"
if [ $COMPAT_VOL -eq $EXIT_SUCCESS ]; then
TOOLTEST $ARGS
@@ -1090,7 +1082,6 @@ else
fi
# extlink vs non-exist-extlink_obj"
-# Note: Requires VOL connector that supports external links
ARGS="h5diff_421.txt --follow-symlinks -v h5diff_extlink_src.h5 h5diff_extlink_src.h5 /ext_link_dset2 /ext_link_noexist1"
if [ $COMPAT_VOL -eq $EXIT_SUCCESS ]; then
TOOLTEST $ARGS
@@ -1101,7 +1092,6 @@ else
fi
# non-exist-extlink_obj vs extlink"
-# Note: Requires VOL connector that supports external links
ARGS="h5diff_422.txt --follow-symlinks -v h5diff_extlink_src.h5 h5diff_extlink_src.h5 /ext_link_noexist1 /ext_link_dset2"
if [ $COMPAT_VOL -eq $EXIT_SUCCESS ]; then
TOOLTEST $ARGS
@@ -1112,7 +1102,6 @@ else
fi
# extlink_to_softlink_to_dset1 vs dset2"
-# Note: Requires VOL connector that supports external links
ARGS="h5diff_423.txt --follow-symlinks -v h5diff_ext2softlink_src.h5 h5diff_ext2softlink_trg.h5 /ext_link_to_slink1 /dset2"
if [ $COMPAT_VOL -eq $EXIT_SUCCESS ]; then
TOOLTEST $ARGS
@@ -1123,7 +1112,6 @@ else
fi
# dset2 vs extlink_to_softlink_to_dset1"
-# Note: Requires VOL connector that supports external links
ARGS="h5diff_424.txt --follow-symlinks -v h5diff_ext2softlink_trg.h5 h5diff_ext2softlink_src.h5 /dset2 /ext_link_to_slink1"
if [ $COMPAT_VOL -eq $EXIT_SUCCESS ]; then
TOOLTEST $ARGS
@@ -1134,7 +1122,6 @@ else
fi
# extlink_to_softlink_to_dset1 vs extlink_to_softlink_to_dset2"
-# Note: Requires VOL connector that supports external links
ARGS="h5diff_425.txt --follow-symlinks -v h5diff_ext2softlink_src.h5 h5diff_ext2softlink_src.h5 /ext_link_to_slink1 /ext_link_to_slink2"
if [ $COMPAT_VOL -eq $EXIT_SUCCESS ]; then
TOOLTEST $ARGS
@@ -1148,7 +1135,6 @@ fi
# # Dangling links compare (--follow-symlinks and --no-dangling-links)
# ##############################################################################
# dangling links --follow-symlinks (FILE to FILE)
-# Note: Requires VOL connector that supports external links
ARGS="h5diff_450.txt --follow-symlinks -v h5diff_danglelinks1.h5 h5diff_danglelinks2.h5"
if [ $COMPAT_VOL -eq $EXIT_SUCCESS ]; then
TOOLTEST $ARGS
@@ -1174,7 +1160,6 @@ TOOLTEST h5diff_454.txt --follow-symlinks -v --no-dangling-links h5diff_softli
TOOLTEST h5diff_455.txt --follow-symlinks -v --no-dangling-links h5diff_softlinks.h5 h5diff_softlinks.h5 /softlink_noexist /softlink_noexist
# dangling link found for ext links (FILE to FILE)
-# Note: Requires VOL connector that supports external links
ARGS="h5diff_456.txt --follow-symlinks -v --no-dangling-links h5diff_extlink_src.h5 h5diff_extlink_src.h5"
if [ $COMPAT_VOL -eq $EXIT_SUCCESS ]; then
TOOLTEST $ARGS
@@ -1185,7 +1170,6 @@ else
fi
# dangling link found for ext links (obj to obj). target file exist
-# Note: Requires VOL connector that supports external links
ARGS="h5diff_457.txt --follow-symlinks -v --no-dangling-links h5diff_extlink_src.h5 h5diff_extlink_src.h5 /ext_link_dset1 /ext_link_noexist1"
if [ $COMPAT_VOL -eq $EXIT_SUCCESS ]; then
TOOLTEST $ARGS
@@ -1196,7 +1180,6 @@ else
fi
# dangling link found for ext links (obj to obj). target file NOT exist
-# Note: Requires VOL connector that supports external links
ARGS="h5diff_458.txt --follow-symlinks -v --no-dangling-links h5diff_extlink_src.h5 h5diff_extlink_src.h5 /ext_link_dset1 /ext_link_noexist2"
if [ $COMPAT_VOL -eq $EXIT_SUCCESS ]; then
TOOLTEST $ARGS
@@ -1220,7 +1203,6 @@ TOOLTEST h5diff_467.txt -v --follow-symlinks h5diff_danglelinks1.h5 h5diff_dangl
# ext dangling vs. ext dangling
TOOLTEST h5diff_468.txt -v --follow-symlinks h5diff_danglelinks1.h5 h5diff_danglelinks2.h5 /ext_link4
# ext link vs. ext dangling
-# Note: Requires VOL connector that supports external links
ARGS="h5diff_469.txt -v --follow-symlinks h5diff_danglelinks1.h5 h5diff_danglelinks2.h5 /ext_link2"
if [ $COMPAT_VOL -eq $EXIT_SUCCESS ]; then
TOOLTEST $ARGS
@@ -1246,7 +1228,6 @@ TOOLTEST h5diff_475.txt -v h5diff_danglelinks1.h5 h5diff_danglelinks2.h5 /ext_li
# ##############################################################################
# root
TOOLTEST h5diff_500.txt -v h5diff_grp_recurse1.h5 h5diff_grp_recurse2.h5 / /
-# Note: Requires VOL connector that supports external links
ARGS="h5diff_501.txt -v --follow-symlinks h5diff_grp_recurse1.h5 h5diff_grp_recurse2.h5 / /"
if [ $COMPAT_VOL -eq $EXIT_SUCCESS ]; then
TOOLTEST $ARGS
@@ -1271,7 +1252,6 @@ TOOLTEST h5diff_506.txt -v --follow-symlinks h5diff_grp_recurse1.h5 h5diff_grp_r
# groups vs ext-link
TOOLTEST h5diff_507.txt -v h5diff_grp_recurse1.h5 h5diff_grp_recurse2.h5 /grp1 /elink_grp1
-# Note: Requires VOL connector that supports external links
ARGS="h5diff_508.txt -v --follow-symlinks h5diff_grp_recurse1.h5 h5diff_grp_recurse2.h5 /grp1 /elink_grp1"
if [ $COMPAT_VOL -eq $EXIT_SUCCESS ]; then
TOOLTEST $ARGS
@@ -1283,7 +1263,6 @@ fi
# soft-link vs ext-link
TOOLTEST h5diff_509.txt -v h5diff_grp_recurse1.h5 h5diff_grp_recurse2.h5 /slink_grp1 /elink_grp1
-# Note: Requires VOL connector that supports external links
ARGS="h5diff_510.txt -v --follow-symlinks h5diff_grp_recurse1.h5 h5diff_grp_recurse2.h5 /slink_grp1 /elink_grp1"
if [ $COMPAT_VOL -eq $EXIT_SUCCESS ]; then
TOOLTEST $ARGS
@@ -1295,7 +1274,6 @@ fi
# circled ext links
TOOLTEST h5diff_511.txt -v h5diff_grp_recurse1.h5 h5diff_grp_recurse2.h5 /grp10 /grp11
-# Note: Requires VOL connector that supports external links
ARGS="h5diff_512.txt -v --follow-symlinks h5diff_grp_recurse1.h5 h5diff_grp_recurse2.h5 /grp10 /grp11"
if [ $COMPAT_VOL -eq $EXIT_SUCCESS ]; then
TOOLTEST $ARGS
@@ -1307,7 +1285,6 @@ fi
# circled soft2ext-link vs soft2ext-link
TOOLTEST h5diff_513.txt -v h5diff_grp_recurse1.h5 h5diff_grp_recurse2.h5 /slink_grp10 /slink_grp11
-# Note: Requires VOL connector that supports external links
ARGS="h5diff_514.txt -v --follow-symlinks h5diff_grp_recurse1.h5 h5diff_grp_recurse2.h5 /slink_grp10 /slink_grp11"
if [ $COMPAT_VOL -eq $EXIT_SUCCESS ]; then
TOOLTEST $ARGS
@@ -1324,7 +1301,6 @@ fi
###############################################################################
# file vs file
TOOLTEST h5diff_515.txt -v h5diff_grp_recurse_ext1.h5 h5diff_grp_recurse_ext2-1.h5
-# Note: Requires VOL connector that supports external links
ARGS="h5diff_516.txt -v --follow-symlinks h5diff_grp_recurse_ext1.h5 h5diff_grp_recurse_ext2-1.h5"
if [ $COMPAT_VOL -eq $EXIT_SUCCESS ]; then
TOOLTEST $ARGS
@@ -1335,7 +1311,6 @@ else
fi
# group vs group
TOOLTEST h5diff_517.txt -v h5diff_grp_recurse_ext1.h5 h5diff_grp_recurse_ext2-1.h5 /g1
-# Note: Requires VOL connector that supports external links
ARGS="h5diff_518.txt -v --follow-symlinks h5diff_grp_recurse_ext1.h5 h5diff_grp_recurse_ext2-1.h5 /g1"
if [ $COMPAT_VOL -eq $EXIT_SUCCESS ]; then
TOOLTEST $ARGS
@@ -1419,8 +1394,6 @@ TOOLTEST h5diff_801.txt -v h5diff_dset1.h5 h5diff_dset3.h5 /g1/array /g1/array
# ##############################################################################
# VDS tests
# ##############################################################################
-
-# Note: Requires VOL connector that supports external links
ARGS="h5diff_v1.txt -v 1_vds.h5 2_vds.h5"
if [ $COMPAT_VOL -eq $EXIT_SUCCESS ]; then
TOOLTEST $ARGS
@@ -1432,7 +1405,6 @@ fi
TOOLTEST h5diff_v2.txt -r 1_vds.h5 2_vds.h5
-# Note: Requires VOL connector that supports external links
ARGS="h5diff_v3.txt -c 1_vds.h5 2_vds.h5"
if [ $COMPAT_VOL -eq $EXIT_SUCCESS ]; then
TOOLTEST $ARGS
diff --git a/tools/test/h5dump/CMakeVFDTests.cmake b/tools/test/h5dump/CMakeVFDTests.cmake
index 01834b3..b6e0bea 100644
--- a/tools/test/h5dump/CMakeVFDTests.cmake
+++ b/tools/test/h5dump/CMakeVFDTests.cmake
@@ -16,20 +16,6 @@
##############################################################################
##############################################################################
-set (VFD_H5DUMP_LIST
- sec2
- stdio
- core
- core_paged
- split
- multi
- family
-)
-
-if (H5_HAVE_DIRECT)
- set (VFD_H5DUMP_LIST ${VFD_H5DUMP_LIST} direct)
-endif ()
-
# --------------------------------------------------------------------
# Copy all the HDF5 files from the source directory into the test directory
# --------------------------------------------------------------------
@@ -37,8 +23,7 @@ set (HDF5_VFD_H5DUMP_FILES
packedbits
)
-foreach (vfdtest ${VFD_H5DUMP_LIST})
- file (MAKE_DIRECTORY "${PROJECT_BINARY_DIR}/${vfdname}")
+foreach (vfdtest ${VFD_LIST})
foreach (h5_tfile ${HDF5_VFD_H5DUMP_FILES})
HDFTEST_COPY_FILE("${HDF5_TOOLS_DIR}/testfiles/${h5_tfile}.h5" "${PROJECT_BINARY_DIR}/${vfdtest}/${h5_tfile}.h5" "HDF5_VFD_H5DUMP_files")
HDFTEST_COPY_FILE("${HDF5_TOOLS_DIR}/testfiles/${h5_tfile}.ddl" "${PROJECT_BINARY_DIR}/${vfdtest}/${h5_tfile}.ddl" "HDF5_VFD_H5DUMP_files")
@@ -79,7 +64,7 @@ endmacro ()
##############################################################################
# Run test with different Virtual File Driver
-foreach (vfd ${VFD_H5DUMP_LIST})
+foreach (vfd ${VFD_LIST})
# test for signed/unsigned datasets
ADD_VFD_H5DUMP_TEST (${vfd} packedbits 0 --enable-error-stack packedbits.h5)
endforeach ()
diff --git a/tools/test/h5dump/testh5dumpvds.sh.in b/tools/test/h5dump/testh5dumpvds.sh.in
index cd839b6..ba5723e 100644
--- a/tools/test/h5dump/testh5dumpvds.sh.in
+++ b/tools/test/h5dump/testh5dumpvds.sh.in
@@ -32,7 +32,7 @@ H5DIFF_BIN=`pwd`/$H5DIFF # The path of the h5diff tool binary
H5IMPORT=../../src/h5import/h5import # The h5import tool name
H5IMPORT_BIN=`pwd`/$H5IMPORT # The path of the h5import tool binary
-VDS_ELINK_COMPAT_VOL=../../../utils/vds_elink_compat_vol # The vds_elink_compat_vol tool name
+VDS_ELINK_COMPAT_VOL=../../../utils/test/vds_elink_compat_vol # The vds_elink_compat_vol tool name
VDS_ELINK_COMPAT_VOL_BIN=`pwd`/$VDS_ELINK_COMPAT_VOL # The path of the vds_elink_compat_vol tool binary
RM='rm -rf'
@@ -505,7 +505,7 @@ COPY_TESTFILES_TO_TESTDIR
# Check to see if the VOL connector specified by the HDF5_VOL_CONNECTOR
# environment variable supports virtual datasets (and external links)
#
-# Note: Depends on vds_elink_compat_vol tool from $(topdir)/utils
+# Note: Depends on vds_elink_compat_vol tool from $(topdir)/utils/test
$VDS_ELINK_COMPAT_VOL_BIN
COMPAT_VOL=$?
@@ -513,43 +513,26 @@ COMPAT_VOL=$?
# Data read
if test $USE_FILTER_DEFLATE = "yes" ; then
- # Note: Requires VOL connector that supports external links
COMPAT_VOL_TEST tvds-1.ddl --enable-error-stack 1_vds.h5
- # Note: Requires VOL connector that supports external links
COMPAT_VOL_TEST tvds-2.ddl --enable-error-stack 2_vds.h5
- # Note: Requires VOL connector that supports external links
COMPAT_VOL_TEST tvds-3_1.ddl --enable-error-stack 3_1_vds.h5
- # Note: Requires VOL connector that supports external links
COMPAT_VOL_TEST tvds-3_2.ddl --enable-error-stack 3_2_vds.h5
- # Note: Requires VOL connector that supports external links
COMPAT_VOL_TEST tvds-4.ddl --enable-error-stack 4_vds.h5
- # Note: Requires VOL connector that supports external links
COMPAT_VOL_TEST tvds-5.ddl --enable-error-stack 5_vds.h5
- # Note: Requires VOL connector that supports external links
COMPAT_VOL_TEST vds-first.ddl --vds-view-first-missing --enable-error-stack vds-percival-unlim-maxmin.h5
- # Note: Requires VOL connector that supports external links
COMPAT_VOL_TEST vds-gap1.ddl -d /VDS-Eiger --vds-gap-size=1 --enable-error-stack vds-eiger.h5
- # Note: Requires VOL connector that supports external links
COMPAT_VOL_TEST vds-gap2.ddl --vds-gap-size=2 --enable-error-stack vds-eiger.h5
fi
# Layout read
if test $USE_FILTER_DEFLATE = "yes" ; then
- # Note: Requires VOL connector that supports external links
COMPAT_VOL_TEST tvds_layout-1.ddl -p --enable-error-stack 1_vds.h5
- # Note: Requires VOL connector that supports external links
COMPAT_VOL_TEST tvds_layout-2.ddl -p --enable-error-stack 2_vds.h5
- # Note: Requires VOL connector that supports external links
COMPAT_VOL_TEST tvds_layout-3_1.ddl -p --enable-error-stack 3_1_vds.h5
- # Note: Requires VOL connector that supports external links
COMPAT_VOL_TEST tvds_layout-3_2.ddl -p --enable-error-stack 3_2_vds.h5
- # Note: Requires VOL connector that supports external links
COMPAT_VOL_TEST tvds_layout-4.ddl -p --enable-error-stack 4_vds.h5
- # Note: Requires VOL connector that supports external links
COMPAT_VOL_TEST tvds_layout-5.ddl -p --enable-error-stack 5_vds.h5
- # Note: Requires VOL connector that supports external links
COMPAT_VOL_TEST vds_layout-eiger.ddl -p --enable-error-stack vds-eiger.h5
- # Note: Requires VOL connector that supports external links
COMPAT_VOL_TEST vds_layout-maxmin.ddl -p --enable-error-stack vds-percival-unlim-maxmin.h5
fi
diff --git a/tools/test/h5ls/testh5ls.sh.in b/tools/test/h5ls/testh5ls.sh.in
index b08aa53..03af8c4 100644
--- a/tools/test/h5ls/testh5ls.sh.in
+++ b/tools/test/h5ls/testh5ls.sh.in
@@ -24,7 +24,7 @@ EXIT_FAILURE=1
H5LS=../../src/h5ls/h5ls # The tool name
H5LS_BIN=`pwd`/$H5LS # The path of the tool binary
-VDS_ELINK_COMPAT_VOL=../../../utils/vds_elink_compat_vol # The vds_elink_compat_vol tool name
+VDS_ELINK_COMPAT_VOL=../../../utils/test/vds_elink_compat_vol # The vds_elink_compat_vol tool name
VDS_ELINK_COMPAT_VOL_BIN=`pwd`/$VDS_ELINK_COMPAT_VOL # The path of the vds_elink_compat_vol tool binary
RM='rm -rf'
@@ -321,7 +321,7 @@ COPY_TESTFILES_TO_TESTDIR
# Check to see if the VOL connector specified by the HDF5_VOL_CONNECTOR
# environment variable supports virtual datasets (and external links)
#
-# Note: Depends on vds_elink_compat_vol tool from $(topdir)/utils
+# Note: Depends on vds_elink_compat_vol tool from $(topdir)/utils/test
$VDS_ELINK_COMPAT_VOL_BIN
COMPAT_VOL=$?
@@ -361,32 +361,21 @@ TOOLTEST tsoftlinks-5.ls 0 --follow-symlinks tsoftlinks.h5/soft_dset1
# test for displaying external and user-defined links with --follow-symlinks
TOOLTEST textlink-1.ls 0 -w80 -r textlink.h5
-# Note: Requires VOL connector that supports external links
COMPAT_VOL_TEST textlinksrc-1.ls 0 -w80 --follow-symlinks -r textlinksrc.h5
-# Note: Requires VOL connector that supports external links
COMPAT_VOL_TEST textlinksrc-2.ls 0 -w80 --follow-symlinks -rv textlinksrc.h5/ext_link5
-# Note: Requires VOL connector that supports external links
COMPAT_VOL_TEST textlinksrc-3.ls 0 -w80 --follow-symlinks -r textlinksrc.h5/ext_link1
TOOLTEST textlinksrc-4.ls 0 -w80 -r textlinksrc.h5
TOOLTEST textlinksrc-5.ls 0 -w80 -r textlinksrc.h5/ext_link1
-# Note: Requires VOL connector that supports external links
COMPAT_VOL_TEST textlinksrc-6.ls 0 -w80 --follow-symlinks textlinksrc.h5
-# Note: Requires VOL connector that supports external links
COMPAT_VOL_TEST textlinksrc-7.ls 0 -w80 --follow-symlinks textlinksrc.h5/ext_link1
-# Note: Requires VOL connector that supports external links
COMPAT_VOL_TEST tudlink-1.ls 0 -w80 -r tudlink.h5
# test for displaying external links with -E
# the option -E will be depriciated but keep it for backward compatibility
-# Note: Requires VOL connector that supports external links
COMPAT_VOL_TEST textlinksrc-1-old.ls 0 -w80 -Er textlinksrc.h5
-# Note: Requires VOL connector that supports external links
COMPAT_VOL_TEST textlinksrc-2-old.ls 0 -w80 -Erv textlinksrc.h5/ext_link5
-# Note: Requires VOL connector that supports external links
COMPAT_VOL_TEST textlinksrc-3-old.ls 0 -w80 -Er textlinksrc.h5/ext_link1
-# Note: Requires VOL connector that supports external links
COMPAT_VOL_TEST textlinksrc-6-old.ls 0 -w80 -E textlinksrc.h5
-# Note: Requires VOL connector that supports external links
COMPAT_VOL_TEST textlinksrc-7-old.ls 0 -w80 -E textlinksrc.h5/ext_link1
# tests for no-dangling-links
@@ -394,7 +383,6 @@ COMPAT_VOL_TEST textlinksrc-7-old.ls 0 -w80 -E textlinksrc.h5/ext_link1
# when used alone , expect to print out help and return exit code 1
TOOLTEST textlinksrc-nodangle-1.ls 1 -w80 --no-dangling-links textlinksrc.h5
# external dangling link - expected exit code 1
-# Note: Requires VOL connector that supports external links
COMPAT_VOL_TEST textlinksrc-nodangle-2.ls 1 -w80 --follow-symlinks --no-dangling-links textlinksrc.h5
# soft dangling link - expected exit code 1
TOOLTEST tsoftlinks-nodangle-1.ls 1 -w80 --follow-symlinks --no-dangling-links tsoftlinks.h5
diff --git a/tools/test/h5ls/testh5lsvds.sh.in b/tools/test/h5ls/testh5lsvds.sh.in
index 221cdc4..e9623b0 100644
--- a/tools/test/h5ls/testh5lsvds.sh.in
+++ b/tools/test/h5ls/testh5lsvds.sh.in
@@ -21,7 +21,7 @@ EXIT_FAILURE=1
H5LS=../../src/h5ls/h5ls # The tool name
H5LS_BIN=`pwd`/$H5LS # The path of the tool binary
-VDS_ELINK_COMPAT_VOL=../../../utils/vds_elink_compat_vol # The vds_elink_compat_vol tool name
+VDS_ELINK_COMPAT_VOL=../../../utils/test/vds_elink_compat_vol # The vds_elink_compat_vol tool name
VDS_ELINK_COMPAT_VOL_BIN=`pwd`/$VDS_ELINK_COMPAT_VOL # The path of the vds_elink_compat_vol tool binary
RM='rm -rf'
@@ -260,23 +260,17 @@ COPY_TESTFILES_TO_TESTDIR
# Check to see if the VOL connector specified by the HDF5_VOL_CONNECTOR
# environment variable supports virtual datasets (and external links)
#
-# Note: Depends on vds_elink_compat_vol tool from $(topdir)/utils
+# Note: Depends on vds_elink_compat_vol tool from $(topdir)/utils/test
$VDS_ELINK_COMPAT_VOL_BIN
COMPAT_VOL=$?
####### test for dataset vds ######
-# Note: Requires VOL connector that supports external links
COMPAT_VOL_TEST tvds-1.ls 0 -w80 -v -S 1_vds.h5
-# Note: Requires VOL connector that supports external links
COMPAT_VOL_TEST tvds-2.ls 0 -w80 -v -S 2_vds.h5
-# Note: Requires VOL connector that supports external links
COMPAT_VOL_TEST tvds-3_1.ls 0 -w80 -v -S 3_1_vds.h5
-# Note: Requires VOL connector that supports external links
COMPAT_VOL_TEST tvds-3_2.ls 0 -w80 -v -S 3_2_vds.h5
-# Note: Requires VOL connector that supports external links
COMPAT_VOL_TEST tvds-4.ls 0 -w80 -v -S 4_vds.h5
-# Note: Requires VOL connector that supports external links
COMPAT_VOL_TEST tvds-5.ls 0 -w80 -v -S 5_vds.h5
# Clean up temporary files/directories
diff --git a/tools/test/h5repack/CMakeVFDTests.cmake b/tools/test/h5repack/CMakeVFDTests.cmake
index 4f6e51d..e50414f 100644
--- a/tools/test/h5repack/CMakeVFDTests.cmake
+++ b/tools/test/h5repack/CMakeVFDTests.cmake
@@ -16,37 +16,6 @@
##############################################################################
##############################################################################
-set (VFD_LIST
- sec2
- stdio
- core
- core_paged
- split
- multi
- family
- splitter
- #log - log VFD currently has file space allocation bugs
-)
-
-if (H5_HAVE_DIRECT)
- set (VFD_LIST ${VFD_LIST} direct)
-endif ()
-if (H5_HAVE_PARALLEL)
- set (VFD_LIST ${VFD_LIST} mpio)
-endif ()
-if (H5_HAVE_MIRROR_VFD)
- set (VFD_LIST ${VFD_LIST} mirror)
-endif ()
-if (H5_HAVE_ROS3_VFD)
- set (VFD_LIST ${VFD_LIST} ros3)
-endif ()
-if (H5_HAVE_LIBHDFS)
- set (VFD_LIST ${VFD_LIST} hdfs)
-endif ()
-if (H5_HAVE_WINDOWS)
- set (VFD_LIST ${VFD_LIST} windows)
-endif ()
-
##############################################################################
##############################################################################
### T H E T E S T S M A C R O S ###
@@ -55,7 +24,6 @@ endif ()
macro (ADD_VFD_TEST vfdname resultcode)
if (NOT HDF5_ENABLE_USING_MEMCHECKER)
- file (MAKE_DIRECTORY "${PROJECT_BINARY_DIR}/${vfdname}")
add_test (
NAME H5REPACK-${vfdname}-h5repacktest-clear-objects
COMMAND ${CMAKE_COMMAND} -E remove
diff --git a/tools/test/h5repack/h5repack.sh.in b/tools/test/h5repack/h5repack.sh.in
index a694ba7..ef89899 100644
--- a/tools/test/h5repack/h5repack.sh.in
+++ b/tools/test/h5repack/h5repack.sh.in
@@ -39,7 +39,7 @@ H5DUMP_BIN=`pwd`/$H5DUMP # The path of the h5dump tool binary
H5STAT=../../src/h5stat/h5stat # The h5stat tool name
H5STAT_BIN=`pwd`/$H5STAT # The path of the h5stat tool binary
-VDS_ELINK_COMPAT_VOL=../../../utils/vds_elink_compat_vol # The vds_elink_compat_vol tool name
+VDS_ELINK_COMPAT_VOL=../../../utils/test/vds_elink_compat_vol # The vds_elink_compat_vol tool name
VDS_ELINK_COMPAT_VOL_BIN=`pwd`/$VDS_ELINK_COMPAT_VOL # The path of the vds_elink_compat_vol tool binary
RM='rm -rf'
@@ -1342,7 +1342,7 @@ COPY_TESTFILES_TO_TESTDIR
# Check to see if the VOL connector specified by the HDF5_VOL_CONNECTOR
# environment variable supports virtual datasets (and external links)
#
-# Note: Depends on vds_elink_compat_vol tool from $(topdir)/utils
+# Note: Depends on vds_elink_compat_vol tool from $(topdir)/utils/test
$VDS_ELINK_COMPAT_VOL_BIN
COMPAT_VOL=$?
@@ -1762,35 +1762,30 @@ TOOLTEST_META meta_long h5repack_layout.h5 --metadata_block_size=8192
if test $USE_FILTER_DEFLATE != "yes" ; then
SKIP vds_dset_chunk_20x10x5
else
- # Note: Requires VOL connector that supports external links
COMPAT_VOL_TEST VERIFY_LAYOUT_VDS vds_dset_chunk20x10x5 1_vds.h5 vds_dset CHUNKED --layout vds_dset:CHUNK=20x10x5
fi
if test $USE_FILTER_DEFLATE != "yes" ; then
SKIP vds_chunk2x5x8
else
- # Note: Requires VOL connector that supports external links
COMPAT_VOL_TEST VERIFY_LAYOUT_VDS vds_chunk2x5x8 3_1_vds.h5 vds_dset CHUNKED -l vds_dset:CHUNK=2x5x8
fi
if test $USE_FILTER_DEFLATE != "yes" ; then
SKIP vds_chunk3x6x9
else
- # Note: Requires VOL connector that supports external links
COMPAT_VOL_TEST VERIFY_LAYOUT_VDS vds_chunk3x6x9 2_vds.h5 vds_dset CHUNKED -l vds_dset:CHUNK=3x6x9
fi
if test $USE_FILTER_DEFLATE != "yes" ; then
SKIP vds_compa 4_vds.h5
else
- # Note: Requires VOL connector that supports external links
COMPAT_VOL_TEST VERIFY_LAYOUT_VDS vds_compa 4_vds.h5 vds_dset COMPACT -l vds_dset:COMPA
fi
if test $USE_FILTER_DEFLATE != "yes" ; then
SKIP vds_conti 4_vds.h5
else
- # Note: Requires VOL connector that supports external links
COMPAT_VOL_TEST VERIFY_LAYOUT_VDS vds_conti 4_vds.h5 vds_dset CONTIGUOUS -l vds_dset:CONTI
fi
@@ -1824,14 +1819,10 @@ VERIFY_EXTERNAL_CONSOLIDATION -l CONTI
#TOOLTEST_DUMP h5copy_extlinks_src-base h5copy_extlinks_src.h5 --enable-error-stack
TOOLTEST_DUMP tsoftlinks-base tsoftlinks.h5 --enable-error-stack
TOOLTEST_DUMP textlink-base textlink.h5 --enable-error-stack
-# Note: Requires VOL connector that supports external links
COMPAT_VOL_TEST TOOLTEST_DUMP textlinkfar-base textlinkfar.h5 --enable-error-stack
-# Note: Requires VOL connector that supports external links
COMPAT_VOL_TEST TOOLTEST_DUMP textlinksrc-base textlinksrc.h5 --enable-error-stack
-# Note: Requires VOL connector that supports external links
COMPAT_VOL_TEST TOOLTEST_DUMP textlinktar-base textlinktar.h5 --enable-error-stack
-# Note: Requires VOL connector that supports external links
COMPAT_VOL_TEST TOOLTESTSV h5copy_extlinks_src-merge h5copy_extlinks_src.h5 --merge
TOOLFAILSV tsoftlinks-merge tsoftlinks.h5 --merge
TOOLTESTSV textlink-merge textlink.h5 --merge
diff --git a/utils/CMakeLists.txt b/utils/CMakeLists.txt
index b79191f..7c263d1 100644
--- a/utils/CMakeLists.txt
+++ b/utils/CMakeLists.txt
@@ -1,77 +1,11 @@
cmake_minimum_required (VERSION 3.10)
project (HDF5_UTILS C)
-add_subdirectory (mirror_vfd)
-
-#-----------------------------------------------------------------------------
-# Add the swmr_compat_vfd executable
-#-----------------------------------------------------------------------------
-
-set (swmr_compat_vfd_SOURCES ${HDF5_UTILS_SOURCE_DIR}/swmr_compat_vfd.c)
-add_executable (swmr_compat_vfd ${swmr_compat_vfd_SOURCES})
-target_include_directories (swmr_compat_vfd PRIVATE "${HDF5_UTILS_DIR};${HDF5_SRC_DIR};${HDF5_TEST_SRC_DIR};${HDF5_SRC_BINARY_DIR};$<$<BOOL:${HDF5_ENABLE_PARALLEL}>:${MPI_C_INCLUDE_DIRS}>")
-if (NOT BUILD_SHARED_LIBS)
- TARGET_C_PROPERTIES (swmr_compat_vfd STATIC)
- target_link_libraries (swmr_compat_vfd PRIVATE ${HDF5_LIB_TARGET} ${HDF5_TEST_LIB_TARGET})
-else ()
- TARGET_C_PROPERTIES (swmr_compat_vfd SHARED)
- target_link_libraries (swmr_compat_vfd PRIVATE ${HDF5_LIBSH_TARGET} ${HDF5_TEST_LIBSH_TARGET})
-endif ()
-set_target_properties (swmr_compat_vfd PROPERTIES FOLDER utils)
-set_global_variable (HDF5_UTILS_TO_EXPORT "${HDF5_UTILS_TO_EXPORT};swmr_compat_vfd")
-set (H5_DEP_EXECUTABLES ${H5_DEP_EXECUTABLES} swmr_compat_vfd)
-
-#-----------------------------------------------------------------------------
-# Add Target to clang-format
-#-----------------------------------------------------------------------------
-if (HDF5_ENABLE_FORMATTERS)
- clang_format (HDF5_UTILS_FORMAT swmr_compat_vfd)
+if (BUILD_TESTING)
+ add_subdirectory (test)
endif ()
-#-----------------------------------------------------------------------------
-# Add the vds_elink_compat_vol executable
-#-----------------------------------------------------------------------------
-
-set (vds_elink_compat_vol_SOURCES ${HDF5_UTILS_SOURCE_DIR}/vds_elink_compat_vol.c)
-add_executable (vds_elink_compat_vol ${vds_elink_compat_vol_SOURCES})
-target_include_directories (vds_elink_compat_vol PRIVATE "${HDF5_UTILS_DIR};${HDF5_SRC_DIR};${HDF5_TEST_SRC_DIR};${HDF5_SRC_BINARY_DIR};$<$<BOOL:${HDF5_ENABLE_PARALLEL}>:${MPI_C_INCLUDE_DIRS}>")
-if (NOT BUILD_SHARED_LIBS)
- TARGET_C_PROPERTIES (vds_elink_compat_vol STATIC)
- target_link_libraries (vds_elink_compat_vol PRIVATE ${HDF5_LIB_TARGET} ${HDF5_TEST_LIB_TARGET})
-else ()
- TARGET_C_PROPERTIES (vds_elink_compat_vol SHARED)
- target_link_libraries (vds_elink_compat_vol PRIVATE ${HDF5_LIBSH_TARGET} ${HDF5_TEST_LIBSH_TARGET})
-endif ()
-set_target_properties (vds_elink_compat_vol PROPERTIES FOLDER utils)
-set_global_variable (HDF5_UTILS_TO_EXPORT "${HDF5_UTILS_TO_EXPORT};vds_elink_compat_vol")
-set (H5_DEP_EXECUTABLES ${H5_DEP_EXECUTABLES} vds_elink_compat_vol)
-
-#-----------------------------------------------------------------------------
-# Add Target to clang-format
-#-----------------------------------------------------------------------------
-if (HDF5_ENABLE_FORMATTERS)
- clang_format (HDF5_UTILS_FORMAT vds_elink_compat_vol)
-endif ()
-
-##############################################################################
-##############################################################################
-### I N S T A L L A T I O N ###
-##############################################################################
-##############################################################################
-
-#-----------------------------------------------------------------------------
-# Rules for Installation of tools using make Install target
-#-----------------------------------------------------------------------------
-if (HDF5_EXPORTED_TARGETS)
- foreach (exec ${H5_DEP_EXECUTABLES})
- INSTALL_PROGRAM_PDB (${exec} ${HDF5_INSTALL_BIN_DIR} utilsapplications)
- endforeach ()
-
- install (
- TARGETS
- ${H5_DEP_EXECUTABLES}
- EXPORT
- ${HDF5_EXPORTED_TARGETS}
- RUNTIME DESTINATION ${HDF5_INSTALL_BIN_DIR} COMPONENT utilsapplications
- )
+option (HDF5_BUILD_UTILS "Build HDF5 Utils" ON)
+if (HDF5_BUILD_UTILS)
+ add_subdirectory (mirror_vfd)
endif ()
diff --git a/utils/Makefile.am b/utils/Makefile.am
index 0f66c89..876dfb1 100644
--- a/utils/Makefile.am
+++ b/utils/Makefile.am
@@ -20,14 +20,19 @@ include $(top_srcdir)/config/commence.am
CONFIG=ordered
-# All subdirectories
-SUBDIRS=mirror_vfd
-
-AM_CPPFLAGS+=-I$(top_srcdir)/src -I$(top_builddir)/src -I$(top_srcdir)/test
+if BUILD_TESTS_CONDITIONAL
+ TESTUTIL_DIR =test
+else
+ TESTUTIL_DIR=
+endif
-noinst_PROGRAMS = vds_elink_compat_vol swmr_compat_vfd
+if MIRROR_VFD_CONDITIONAL
+ MIRROR_VFD_DIR = mirror_vfd
+else
+ MIRROR_VFD_DIR=
+endif
-# All programs depend on the hdf5 library
-LDADD=$(LIBH5TEST) $(LIBHDF5)
+# All subdirectories
+SUBDIRS=$(MIRROR_VFD_DIR) $(TESTUTIL_DIR)
include $(top_srcdir)/config/conclude.am
diff --git a/utils/test/CMakeLists.txt b/utils/test/CMakeLists.txt
new file mode 100644
index 0000000..64d5563
--- /dev/null
+++ b/utils/test/CMakeLists.txt
@@ -0,0 +1,38 @@
+cmake_minimum_required (VERSION 3.12)
+project (HDF5_TEST C)
+
+#################################################################################
+# Test program sources
+#################################################################################
+
+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_compile_options(${file} PRIVATE "${HDF5_CMAKE_C_FLAGS}")
+ if (NOT BUILD_SHARED_LIBS)
+ TARGET_C_PROPERTIES (${file} STATIC)
+ target_link_libraries (${file} PRIVATE ${HDF5_TEST_LIB_TARGET})
+ else ()
+ TARGET_C_PROPERTIES (${file} SHARED)
+ target_link_libraries (${file} PRIVATE ${HDF5_TEST_LIBSH_TARGET})
+ endif ()
+ set_target_properties (${file} PROPERTIES FOLDER test)
+endmacro ()
+
+##############################################################################
+### T E S T U T I L S ###
+##############################################################################
+set (H5_UTIL_TESTS)
+
+if (HDF5_TEST_SWMR)
+ set (H5_UTIL_TESTS ${H5_UTIL_TESTS}
+ swmr_check_compat_vfd
+ vds_elink_compat_vol
+)
+endif ()
+
+if (H5_UTIL_TESTS)
+ foreach (h5_test ${H5_UTIL_TESTS})
+ ADD_H5_EXE(${h5_test})
+ endforeach ()
+endif ()
diff --git a/utils/test/Makefile.am b/utils/test/Makefile.am
new file mode 100644
index 0000000..b2a8b3c
--- /dev/null
+++ b/utils/test/Makefile.am
@@ -0,0 +1,34 @@
+#
+# Copyright by The HDF Group.
+# Copyright by the Board of Trustees of the University of Illinois.
+# All rights reserved.
+#
+# This file is part of HDF5. The full HDF5 copyright notice, including
+# terms governing use, modification, and redistribution, is contained in
+# the COPYING file, which can be found at the root of the source code
+# distribution tree, or in https://www.hdfgroup.org/licenses.
+# If you do not have access to either file, you may request a copy from
+# help@hdfgroup.org.
+##
+## Makefile.am
+## Run automake to generate a Makefile.in from this file.
+#
+# HDF5 Library Makefile(.in)
+#
+
+include $(top_srcdir)/config/commence.am
+
+# Include src and tools/lib directories
+AM_CPPFLAGS+=-I$(top_srcdir)/src -I$(top_srcdir)/test -I$(top_srcdir)/tools/lib -I$(top_srcdir)/utils/test
+
+# These are our main targets, the tools
+
+noinst_PROGRAMS=swmr_check_compat_vfd vds_elink_compat_vol
+
+# Programs all depend on the hdf5 library, the tools library, and the HL
+# library.
+LDADD=$(LIBH5TEST) $(LIBHDF5)
+
+CHECK_CLEANFILES+=*.h5
+
+include $(top_srcdir)/config/conclude.am
diff --git a/utils/swmr_compat_vfd.c b/utils/test/swmr_check_compat_vfd.c
index 720c747..720c747 100644
--- a/utils/swmr_compat_vfd.c
+++ b/utils/test/swmr_check_compat_vfd.c
diff --git a/utils/vds_elink_compat_vol.c b/utils/test/vds_elink_compat_vol.c
index ebca924..ebca924 100644
--- a/utils/vds_elink_compat_vol.c
+++ b/utils/test/vds_elink_compat_vol.c