From 1b6d1ca4f0d1d69df592ef3c0353d158dec81b00 Mon Sep 17 00:00:00 2001 From: Allen Byrne Date: Fri, 28 Jun 2013 10:37:41 -0500 Subject: [svn-r23845] HDFFV-8394: Add Optional Examples source packaging option. Tested: local linux --- CMakeLists.txt | 25 ++++++++ MANIFEST | 4 ++ config/cmake/HDF518_Examples.cmake.in | 112 ++++++++++++++++++++++++++++++++++ release_docs/USING_CMake_Examples.txt | 12 ++++ 4 files changed, 153 insertions(+) create mode 100644 config/cmake/HDF518_Examples.cmake.in create mode 100644 release_docs/USING_CMake_Examples.txt diff --git a/CMakeLists.txt b/CMakeLists.txt index eddb4e9..b1a7f07 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1108,6 +1108,31 @@ INSTALL ( ) #----------------------------------------------------------------------------- +# Configure the HDF518_Examples.cmake file and the examples +#----------------------------------------------------------------------------- +OPTION (HDF5_PACK_EXAMPLES_FILE "Package the HDF5 Library Examples Compressed File" OFF) +IF (HDF5_PACK_EXAMPLES_FILE) + CONFIGURE_FILE ( + ${HDF5_RESOURCES_DIR}/HDF518_Examples.cmake.in + ${HDF5_BINARY_DIR}/HDF518_Examples.cmake @ONLY + ) + INSTALL ( + FILES ${HDF5_BINARY_DIR}/HDF518_Examples.cmake + DESTINATION ${HDF5_INSTALL_DATA_DIR} + COMPONENT hdfdocuments + ) + IF (EXISTS "${HDF5_EXAMPLES_COMPRESSED_PATH}/${HDF5_EXAMPLES_COMPRESSED_FILE}") + INSTALL ( + FILES + ${HDF5_EXAMPLES_COMPRESSED_PATH}/${HDF5_EXAMPLES_COMPRESSED_FILE} + ${HDF5_SOURCE_DIR}/release_docs/USING_CMake_Examples.txt + DESTINATION ${HDF5_INSTALL_DATA_DIR} + COMPONENT hdfdocuments + ) + ENDIF (EXISTS "${HDF5_EXAMPLES_COMPRESSED_PATH}/${HDF5_EXAMPLES_COMPRESSED_FILE}") +ENDIF (HDF5_PACK_EXAMPLES_FILE) + +#----------------------------------------------------------------------------- # Add Document File(s) to CMake Install #----------------------------------------------------------------------------- IF (NOT HDF5_EXTERNALLY_CONFIGURED) diff --git a/MANIFEST b/MANIFEST index f4fbe34..30d52f3 100644 --- a/MANIFEST +++ b/MANIFEST @@ -2401,6 +2401,10 @@ # CMake-specific User Files ./config/cmake/UserMacros/Windows_MT.cmake +# CMake-specific Examples Files +./config/cmake/HDF518_Examples.cmake.in +./release_docs/USING_CMake_Examples.txt + ./CMakeLists.txt ./CTestConfig.cmake ./UserMacros.cmake diff --git a/config/cmake/HDF518_Examples.cmake.in b/config/cmake/HDF518_Examples.cmake.in new file mode 100644 index 0000000..699e2d0 --- /dev/null +++ b/config/cmake/HDF518_Examples.cmake.in @@ -0,0 +1,112 @@ +cmake_minimum_required(VERSION 2.8.10 FATAL_ERROR) +############################################################################################################### +# This script will build and run the examples from a compressed file +# Execute from a command line: +# ctest -S HDF518_Examples.cmake,HDF5Examples-0.1.1-Source -C Release -O test.log +############################################################################################################### + +set(INSTALLDIR "@CMAKE_INSTALL_PREFIX@/@HDF5_PACKAGE_VERSION@") +set(CTEST_CMAKE_GENERATOR "@CMAKE_GENERATOR@") +set(STATICLIBRARIES "@H5_ENABLE_STATIC_LIB@") +set(CTEST_SOURCE_NAME ${CTEST_SCRIPT_ARG}) +set(CTEST_DASHBOARD_ROOT ${CTEST_SCRIPT_DIRECTORY}) +set(CTEST_BUILD_CONFIGURATION "Release") + +############################################################################################################### +# Adjust the following SET Commands as needed +############################################################################################################### +if(WIN32) + if(STATICLIBRARIES) + set(BUILD_OPTIONS "-DUSE_SHARED_LIBS:BOOL=OFF") + endif(STATICLIBRARIES) + set(ENV{HDF5_DIR} "${INSTALLDIR}/cmake/hdf5") + set(CTEST_BINARY_NAME ${CTEST_SOURCE_NAME}\\build) + set(CTEST_SOURCE_DIRECTORY "${CTEST_DASHBOARD_ROOT}\\${CTEST_SOURCE_NAME}") + set(CTEST_BINARY_DIRECTORY "${CTEST_DASHBOARD_ROOT}\\${CTEST_BINARY_NAME}") +else(WIN32) + if(STATICLIBRARIES) + set(BUILD_OPTIONS "-DUSE_SHARED_LIBS:BOOL=OFF -DCMAKE_ANSI_CFLAGS:STRING=-fPIC") + endif(STATICLIBRARIES) + set(ENV{HDF5_DIR} "${INSTALLDIR}/share/cmake/hdf5") + set(ENV{LD_LIBRARY_PATH} "${INSTALLDIR}/lib") + set(CTEST_BINARY_NAME ${CTEST_SOURCE_NAME}/build) + set(CTEST_SOURCE_DIRECTORY "${CTEST_DASHBOARD_ROOT}/${CTEST_SOURCE_NAME}") + set(CTEST_BINARY_DIRECTORY "${CTEST_DASHBOARD_ROOT}/${CTEST_BINARY_NAME}") +endif(WIN32) + +############################################################################################################### +# For any comments please contact cdashhelp@hdfgroup.org +# +############################################################################################################### + +#----------------------------------------------------------------------------- +# MAC machines need special option +#----------------------------------------------------------------------------- +if(APPLE) + # Compiler choice + execute_process(COMMAND xcrun --find cc OUTPUT_VARIABLE XCODE_CC OUTPUT_STRIP_TRAILING_WHITESPACE) + execute_process(COMMAND xcrun --find c++ OUTPUT_VARIABLE XCODE_CXX OUTPUT_STRIP_TRAILING_WHITESPACE) + set(ENV{CC} "${XCODE_CC}") + set(ENV{CXX} "${XCODE_CXX}") + # Shared fortran is not supported, build static + set(BUILD_OPTIONS "${BUILD_OPTIONS} -DBUILD_SHARED_LIBS:BOOL=OFF -DCMAKE_ANSI_CFLAGS:STRING=-fPIC") + set(BUILD_OPTIONS "${BUILD_OPTIONS} -DCTEST_USE_LAUNCHERS:BOOL=ON -DCMAKE_BUILD_WITH_INSTALL_RPATH:BOOL=OFF") +endif(APPLE) + +#----------------------------------------------------------------------------- +set(CTEST_CMAKE_COMMAND "\"${CMAKE_COMMAND}\"") +## Uncompress source in tar file provided +## -------------------------- +if(WIN32) + set(CTEST_7Z_COMMAND "C:/Program Files/7-Zip/7z.exe") + message("extracting... [${CTEST_7Z_COMMAND} x ${CTEST_SOURCE_NAME}.zip]") + execute_process(COMMAND ${CTEST_7Z_COMMAND} x ${CTEST_SOURCE_NAME}.zip RESULT_VARIABLE rv) +else(WIN32) + message("extracting... [${CTEST_CMAKE_COMMAND} -E tar -xvf ${CTEST_SOURCE_NAME}.tar.gz]") + execute_process(COMMAND tar -xvf ${CTEST_SOURCE_NAME}.tar.gz RESULT_VARIABLE rv) +endif(WIN32) + +if(NOT rv EQUAL 0) + message("extracting... [error-(${rv}) clean up]") + file(REMOVE_RECURSE "${CTEST_SOURCE_DIRECTORY}") + message(FATAL_ERROR "error: extract of ${CTEST_SOURCE_NAME} failed") +endif(NOT rv EQUAL 0) + +#----------------------------------------------------------------------------- +## Clear the build directory +## -------------------------- +set(CTEST_START_WITH_EMPTY_BINARY_DIRECTORY TRUE) +file(MAKE_DIRECTORY "${CTEST_BINARY_DIRECTORY}") +ctest_empty_binary_directory(${CTEST_BINARY_DIRECTORY}) + +# Use multiple CPU cores to build +include(ProcessorCount) +ProcessorCount(N) +if(NOT N EQUAL 0) + if(NOT WIN32) + set(CTEST_BUILD_FLAGS -j${N}) + endif(NOT WIN32) + set(ctest_test_args ${ctest_test_args} PARALLEL_LEVEL ${N}) +endif() +set (CTEST_CONFIGURE_COMMAND + "${CTEST_CMAKE_COMMAND} -C \"${CTEST_SOURCE_DIRECTORY}/config/cmake/cacheinit.cmake\" -DCMAKE_BUILD_TYPE:STRING=${CTEST_BUILD_CONFIGURATION} ${BUILD_OPTIONS} \"-G${CTEST_CMAKE_GENERATOR}\" \"${CTEST_SOURCE_DIRECTORY}\"" +) + +#----------------------------------------------------------------------------- +## -- set output to english +set($ENV{LC_MESSAGES} "en_EN") + +#----------------------------------------------------------------------------- + ## NORMAL process + ## -------------------------- + CTEST_START (Experimental) + CTEST_CONFIGURE (BUILD "${CTEST_BINARY_DIRECTORY}") + CTEST_READ_CUSTOM_FILES ("${CTEST_BINARY_DIRECTORY}") + CTEST_BUILD (BUILD "${CTEST_BINARY_DIRECTORY}" APPEND) + CTEST_TEST (BUILD "${CTEST_BINARY_DIRECTORY}" APPEND ${ctest_test_args} RETURN_VALUE res) + if(res GREATER 0) + message (FATAL_ERROR "tests FAILED") + endif(res GREATER 0) +#----------------------------------------------------------------------------- +############################################################################################################## +message("DONE") \ No newline at end of file diff --git a/release_docs/USING_CMake_Examples.txt b/release_docs/USING_CMake_Examples.txt new file mode 100644 index 0000000..33c43a3 --- /dev/null +++ b/release_docs/USING_CMake_Examples.txt @@ -0,0 +1,12 @@ +The compressed examples file, located in the HDF5 install folder, +can be built and tested with CMake and the supplied +HDF518_Examples.cmake file. It is recommended that you copy those +two files to your development location before continuing. + +The command line to be used is shown at the top of the file. Also, +the location of the HDF5 installation should be verified and +changed if necessary. + +When executed, the ctest script will save the results to the log file +indicated by the ctest command. If you wish the to see more build +and test information, add "-VV" to the ctest command. -- cgit v0.12 From a157eb2f689d873a53e96cfc486db423658c7902 Mon Sep 17 00:00:00 2001 From: HDF Tester Date: Sun, 30 Jun 2013 03:35:12 -0500 Subject: [svn-r23849] Snapshot version 1.9 release 156 --- README.txt | 2 +- c++/src/Makefile.in | 2 +- config/lt_vers.am | 2 +- configure | 22 +++++++++++----------- configure.ac | 2 +- fortran/src/Makefile.in | 2 +- hl/c++/src/Makefile.in | 2 +- hl/fortran/src/Makefile.in | 2 +- hl/src/Makefile.in | 2 +- release_docs/RELEASE.txt | 2 +- src/H5public.h | 4 ++-- src/Makefile.in | 2 +- vms/src/h5pubconf.h | 6 +++--- 13 files changed, 26 insertions(+), 26 deletions(-) diff --git a/README.txt b/README.txt index c417d3b..4618a94 100644 --- a/README.txt +++ b/README.txt @@ -1,4 +1,4 @@ -HDF5 version 1.9.156 currently under development +HDF5 version 1.9.157 currently under development Please refer to the release_docs/INSTALL file for installation instructions. ------------------------------------------------------------------------------ diff --git a/c++/src/Makefile.in b/c++/src/Makefile.in index cb01519..083df6e 100644 --- a/c++/src/Makefile.in +++ b/c++/src/Makefile.in @@ -467,7 +467,7 @@ CHECK_CLEANFILES = *.chkexe *.chklog *.clog # Add libtool shared library version numbers to the HDF5 library # See libtool versioning documentation online. LT_VERS_INTERFACE = 6 -LT_VERS_REVISION = 146 +LT_VERS_REVISION = 147 LT_VERS_AGE = 0 # Include src directory diff --git a/config/lt_vers.am b/config/lt_vers.am index c3ec683..42a12d6 100644 --- a/config/lt_vers.am +++ b/config/lt_vers.am @@ -17,7 +17,7 @@ # Add libtool shared library version numbers to the HDF5 library # See libtool versioning documentation online. LT_VERS_INTERFACE = 6 -LT_VERS_REVISION = 146 +LT_VERS_REVISION = 147 LT_VERS_AGE = 0 ## If the API changes *at all*, increment LT_VERS_INTERFACE and diff --git a/configure b/configure index 0eda393..ea06d4e 100755 --- a/configure +++ b/configure @@ -1,7 +1,7 @@ #! /bin/sh # From configure.ac Id: configure.ac 22697 2012-08-19 14:35:47Z hdftest . # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.69 for HDF5 1.9.156. +# Generated by GNU Autoconf 2.69 for HDF5 1.9.157. # # Report bugs to . # @@ -591,8 +591,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='HDF5' PACKAGE_TARNAME='hdf5' -PACKAGE_VERSION='1.9.156' -PACKAGE_STRING='HDF5 1.9.156' +PACKAGE_VERSION='1.9.157' +PACKAGE_STRING='HDF5 1.9.157' PACKAGE_BUGREPORT='help@hdfgroup.org' PACKAGE_URL='' @@ -1486,7 +1486,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures HDF5 1.9.156 to adapt to many kinds of systems. +\`configure' configures HDF5 1.9.157 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1556,7 +1556,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of HDF5 1.9.156:";; + short | recursive ) echo "Configuration of HDF5 1.9.157:";; esac cat <<\_ACEOF @@ -1752,7 +1752,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -HDF5 configure 1.9.156 +HDF5 configure 1.9.157 generated by GNU Autoconf 2.69 Copyright (C) 2012 Free Software Foundation, Inc. @@ -2846,7 +2846,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by HDF5 $as_me 1.9.156, which was +It was created by HDF5 $as_me 1.9.157, which was generated by GNU Autoconf 2.69. Invocation command line was $ $0 $@ @@ -3678,7 +3678,7 @@ fi # Define the identity of the package. PACKAGE='hdf5' - VERSION='1.9.156' + VERSION='1.9.157' cat >>confdefs.h <<_ACEOF @@ -31632,7 +31632,7 @@ Usage: $0 [OPTIONS] Report bugs to ." lt_cl_version="\ -HDF5 config.lt 1.9.156 +HDF5 config.lt 1.9.157 configured by $0, generated by GNU Autoconf 2.69. Copyright (C) 2011 Free Software Foundation, Inc. @@ -33762,7 +33762,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by HDF5 $as_me 1.9.156, which was +This file was extended by HDF5 $as_me 1.9.157, which was generated by GNU Autoconf 2.69. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -33828,7 +33828,7 @@ _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ -HDF5 config.status 1.9.156 +HDF5 config.status 1.9.157 configured by $0, generated by GNU Autoconf 2.69, with options \\"\$ac_cs_config\\" diff --git a/configure.ac b/configure.ac index 0a4d854..fbf3dce 100644 --- a/configure.ac +++ b/configure.ac @@ -26,7 +26,7 @@ AC_PREREQ([2.69]) ## NOTE: Do not forget to change the version number here when we do a ## release!!! ## -AC_INIT([HDF5], [1.9.156], [help@hdfgroup.org]) +AC_INIT([HDF5], [1.9.157], [help@hdfgroup.org]) AC_CONFIG_SRCDIR([src/H5.c]) AC_CONFIG_HEADER([src/H5config.h]) diff --git a/fortran/src/Makefile.in b/fortran/src/Makefile.in index 8b6036b..7b6a7a3 100644 --- a/fortran/src/Makefile.in +++ b/fortran/src/Makefile.in @@ -518,7 +518,7 @@ CHECK_CLEANFILES = *.chkexe *.chklog *.clog # Add libtool shared library version numbers to the HDF5 library # See libtool versioning documentation online. LT_VERS_INTERFACE = 6 -LT_VERS_REVISION = 146 +LT_VERS_REVISION = 147 LT_VERS_AGE = 0 # Include src directory in both Fortran and C flags (C compiler is used diff --git a/hl/c++/src/Makefile.in b/hl/c++/src/Makefile.in index 6639a92..e188d96 100644 --- a/hl/c++/src/Makefile.in +++ b/hl/c++/src/Makefile.in @@ -458,7 +458,7 @@ CHECK_CLEANFILES = *.chkexe *.chklog *.clog # Add libtool shared library version numbers to the HDF5 library # See libtool versioning documentation online. LT_VERS_INTERFACE = 6 -LT_VERS_REVISION = 146 +LT_VERS_REVISION = 147 LT_VERS_AGE = 0 # Include src directory diff --git a/hl/fortran/src/Makefile.in b/hl/fortran/src/Makefile.in index caed99d..a1b949a 100644 --- a/hl/fortran/src/Makefile.in +++ b/hl/fortran/src/Makefile.in @@ -474,7 +474,7 @@ CHECK_CLEANFILES = *.chkexe *.chklog *.clog # Add libtool shared library version numbers to the HDF5 library # See libtool versioning documentation online. LT_VERS_INTERFACE = 6 -LT_VERS_REVISION = 146 +LT_VERS_REVISION = 147 LT_VERS_AGE = 0 INCLUDES = -I$(top_srcdir)/src -I$(top_srcdir)/hl/src -I$(top_builddir)/hl/src \ -I$(top_srcdir)/fortran/src -I$(top_builddir)/fortran/src diff --git a/hl/src/Makefile.in b/hl/src/Makefile.in index 3f82131..99409e7 100644 --- a/hl/src/Makefile.in +++ b/hl/src/Makefile.in @@ -457,7 +457,7 @@ CHECK_CLEANFILES = *.chkexe *.chklog *.clog # Add libtool shared library version numbers to the HDF5 library # See libtool versioning documentation online. LT_VERS_INTERFACE = 6 -LT_VERS_REVISION = 146 +LT_VERS_REVISION = 147 LT_VERS_AGE = 0 # This library is our main target. diff --git a/release_docs/RELEASE.txt b/release_docs/RELEASE.txt index ed3ec6b..ed608ba 100644 --- a/release_docs/RELEASE.txt +++ b/release_docs/RELEASE.txt @@ -1,4 +1,4 @@ -HDF5 version 1.9.156 currently under development +HDF5 version 1.9.157 currently under development ================================================================================ diff --git a/src/H5public.h b/src/H5public.h index ad13851..63c7f1f 100644 --- a/src/H5public.h +++ b/src/H5public.h @@ -75,10 +75,10 @@ extern "C" { /* Version numbers */ #define H5_VERS_MAJOR 1 /* For major interface/format changes */ #define H5_VERS_MINOR 9 /* For minor interface/format changes */ -#define H5_VERS_RELEASE 156 /* For tweaks, bug-fixes, or development */ +#define H5_VERS_RELEASE 157 /* For tweaks, bug-fixes, or development */ #define H5_VERS_SUBRELEASE "" /* For pre-releases like snap0 */ /* Empty string for real releases. */ -#define H5_VERS_INFO "HDF5 library version: 1.9.156" /* Full version string */ +#define H5_VERS_INFO "HDF5 library version: 1.9.157" /* Full version string */ #define H5check() H5check_version(H5_VERS_MAJOR,H5_VERS_MINOR, \ H5_VERS_RELEASE) diff --git a/src/Makefile.in b/src/Makefile.in index ae0d0ff..f47e1c0 100644 --- a/src/Makefile.in +++ b/src/Makefile.in @@ -522,7 +522,7 @@ CHECK_CLEANFILES = *.chkexe *.chklog *.clog # Add libtool shared library version numbers to the HDF5 library # See libtool versioning documentation online. LT_VERS_INTERFACE = 6 -LT_VERS_REVISION = 146 +LT_VERS_REVISION = 147 LT_VERS_AGE = 0 H5detect_CFLAGS = -g $(AM_CFLAGS) diff --git a/vms/src/h5pubconf.h b/vms/src/h5pubconf.h index 7085a06..6e35eac 100644 --- a/vms/src/h5pubconf.h +++ b/vms/src/h5pubconf.h @@ -511,7 +511,7 @@ #define H5_PACKAGE_NAME "HDF5" /* Define to the full name and version of this package. */ -#define H5_PACKAGE_STRING "HDF5 1.9.156" +#define H5_PACKAGE_STRING "HDF5 1.9.157" /* Define to the one symbol short name of this package. */ #define H5_PACKAGE_TARNAME "hdf5" @@ -520,7 +520,7 @@ #define H5_PACKAGE_URL "" /* Define to the version of this package. */ -#define H5_PACKAGE_VERSION "1.9.156" +#define H5_PACKAGE_VERSION "1.9.157" /* Width for printf() for type `long long' or `__int64', use `ll' */ #define H5_PRINTF_LL_WIDTH "ll" @@ -683,7 +683,7 @@ /* #undef H5_USING_MEMCHECKER */ /* Version number of package */ -#define H5_VERSION "1.9.156" +#define H5_VERSION "1.9.157" /* Define if vsnprintf() returns the correct value for formatted strings that don't fit into size allowed */ -- cgit v0.12 From 53afd20aeb09fb2565811cc3dbf22890f0fcf900 Mon Sep 17 00:00:00 2001 From: Allen Byrne Date: Mon, 1 Jul 2013 09:23:04 -0500 Subject: [svn-r23854] HDFFV-8302: Add macros/code function to use coorect Windows (v)snprintf statement. Also fix use other uses of macros for windows. Tested --- hl/src/H5LTanalyze.c | 30 ++++++---- hl/src/H5LTanalyze.l | 4 ++ hl/src/H5LTparse.y | 4 ++ perform/sio_standalone.h | 23 +++++++- perform/zip_perf.c | 148 +++++++++++++++++++++++------------------------ src/H5FDstdio.c | 4 ++ src/H5system.c | 24 ++++++++ src/H5win32defs.h | 10 +++- 8 files changed, 157 insertions(+), 90 deletions(-) diff --git a/hl/src/H5LTanalyze.c b/hl/src/H5LTanalyze.c index 5ec795b..f02bed6 100644 --- a/hl/src/H5LTanalyze.c +++ b/hl/src/H5LTanalyze.c @@ -1400,54 +1400,58 @@ case 57: YY_RULE_SETUP #line 159 "H5LTanalyze.l" { +#ifdef H5_HAVE_WIN32_API + H5LTyylval.sval = _strdup(yytext); +#else /* H5_HAVE_WIN32_API */ H5LTyylval.sval = strdup(yytext); +#endif /* H5_HAVE_WIN32_API */ BEGIN INITIAL; return STRING; } YY_BREAK case 58: YY_RULE_SETUP -#line 165 "H5LTanalyze.l" +#line 169 "H5LTanalyze.l" {return token('{');} YY_BREAK case 59: YY_RULE_SETUP -#line 166 "H5LTanalyze.l" +#line 170 "H5LTanalyze.l" {return token('}');} YY_BREAK case 60: YY_RULE_SETUP -#line 167 "H5LTanalyze.l" +#line 171 "H5LTanalyze.l" {return token('[');} YY_BREAK case 61: YY_RULE_SETUP -#line 168 "H5LTanalyze.l" +#line 172 "H5LTanalyze.l" {return token(']');} YY_BREAK case 62: YY_RULE_SETUP -#line 169 "H5LTanalyze.l" +#line 173 "H5LTanalyze.l" {return token(':');} YY_BREAK case 63: YY_RULE_SETUP -#line 170 "H5LTanalyze.l" +#line 174 "H5LTanalyze.l" {return token(';');} YY_BREAK case 64: YY_RULE_SETUP -#line 171 "H5LTanalyze.l" +#line 175 "H5LTanalyze.l" ; YY_BREAK case 65: YY_RULE_SETUP -#line 172 "H5LTanalyze.l" +#line 176 "H5LTanalyze.l" { return 0; } YY_BREAK case 66: YY_RULE_SETUP -#line 174 "H5LTanalyze.l" +#line 178 "H5LTanalyze.l" ECHO; YY_BREAK #line 1432 "H5LTanalyze.c" @@ -2032,7 +2036,11 @@ FILE *file; #if YY_NEVER_INTERACTIVE b->yy_is_interactive = 0; #else - b->yy_is_interactive = file ? (isatty( fileno(file) ) > 0) : 0; +#ifdef H5_HAVE_WIN32_API + b->yy_is_interactive = file ? (isatty( _fileno(file) ) > 0) : 0; +#else /* H5_HAVE_WIN32_API */ + b->yy_is_interactive = file ? (isatty( fileno(file) ) > 0) : 0; +#endif /* H5_HAVE_WIN32_API */ #endif #endif } @@ -2327,7 +2335,7 @@ int main() return 0; } #endif -#line 174 "H5LTanalyze.l" +#line 178 "H5LTanalyze.l" int my_yyinput(char *buf, int max_size) { diff --git a/hl/src/H5LTanalyze.l b/hl/src/H5LTanalyze.l index 3f63f50..581672b 100644 --- a/hl/src/H5LTanalyze.l +++ b/hl/src/H5LTanalyze.l @@ -157,7 +157,11 @@ OPQ_TAG {return token(OPQ_TAG_TOKEN);} return token('"'); } [^\"]+ { +#ifdef H5_HAVE_WIN32_API + H5LTyylval.sval = _strdup(yytext); +#else /* H5_HAVE_WIN32_API */ H5LTyylval.sval = strdup(yytext); +#endif /* H5_HAVE_WIN32_API */ BEGIN INITIAL; return STRING; } diff --git a/hl/src/H5LTparse.y b/hl/src/H5LTparse.y index a021efc..b91e97e 100644 --- a/hl/src/H5LTparse.y +++ b/hl/src/H5LTparse.y @@ -329,7 +329,11 @@ enum_list : ; enum_def : '"' enum_symbol '"' { is_enum_memb = 1; /*indicate member of enum*/ +#ifdef H5_HAVE_WIN32_API + enum_memb_symbol = _strdup(yylval.sval); +#else /* H5_HAVE_WIN32_API */ enum_memb_symbol = strdup(yylval.sval); +#endif /* H5_HAVE_WIN32_API */ } enum_val ';' { diff --git a/perform/sio_standalone.h b/perform/sio_standalone.h index 677a8ae..b407ecb 100644 --- a/perform/sio_standalone.h +++ b/perform/sio_standalone.h @@ -62,7 +62,15 @@ */ #define HDabort() abort() #define HDabs(X) abs(X) +#ifdef H5_HAVE_WIN32_API +#define HDaccess(F,M) _access(F, M) +#define R_OK 4 /* Test for read permission. */ +#define W_OK 2 /* Test for write permission. */ +#define X_OK 1 /* Test for execute permission. */ +#define F_OK 0 /* Test for existence. */ +#else /* H5_HAVE_WIN32_API */ #define HDaccess(F,M) access(F, M) +#endif /* H5_HAVE_WIN32_API */ #define HDacos(X) acos(X) #ifdef H5_HAVE_ALARM #define HDalarm(N) alarm(N) @@ -214,7 +222,12 @@ H5_DLL int HDfprintf (FILE *stream, const char *fmt, ...); #define HDgetpwuid(U) getpwuid(U) #define HDgetrusage(X,S) getrusage(X,S) #define HDgets(S) gets(S) +#ifdef H5_HAVE_VISUAL_STUDIO + H5_DLL int Wgettimeofday(struct timeval *tv, struct timezone *tz); +#define HDgettimeofday(V,Z) Wgettimeofday(V,Z) +#else /* H5_HAVE_VISUAL_STUDIO */ #define HDgettimeofday(S,P) gettimeofday(S,P) +#endif /* H5_HAVE_VISUAL_STUDIO */ #define HDgetuid() getuid() #define HDgmtime(T) gmtime(T) #define HDisalnum(C) isalnum((int)(C)) /*cast for solaris warning*/ @@ -355,7 +368,8 @@ int HDremove_all(const char * fname); #define HDsinh(X) sinh(X) #define HDsleep(N) sleep(N) #ifdef H5_HAVE_WIN32_API -#define HDsnprintf _snprintf /*varargs*/ +H5_DLL int c99_snprintf(char* str, size_t size, const char* format, ...); +#define HDsnprintf c99_snprintf /*varargs*/ #else #define HDsnprintf snprintf /*varargs*/ #endif @@ -373,7 +387,11 @@ H5_DLL void HDsrand(unsigned int seed); #endif /* sscanf() variable arguments */ +#ifdef H5_HAVE_WIN32_API +#define HDstrcasecmp(A,B) _stricmp(A,B) +#else #define HDstrcasecmp(X,Y) strcasecmp(X,Y) +#endif #define HDstrcat(X,Y) strcat(X,Y) #define HDstrchr(S,C) strchr(S,C) #define HDstrcmp(X,Y) strcmp(X,Y) @@ -433,7 +451,8 @@ H5_DLL int64_t HDstrtoll (const char *s, const char **rest, int base); #define HDvprintf(FMT,A) vprintf(FMT,A) #define HDvsprintf(S,FMT,A) vsprintf(S,FMT,A) #ifdef H5_HAVE_WIN32_API -# define HDvsnprintf(S,N,FMT,A) _vsnprintf(S,N,FMT,A) +H5_DLL int c99_vsnprintf(char* str, size_t size, const char* format, va_list ap); +#define HDvsnprintf c99_vsnprintf #else # define HDvsnprintf(S,N,FMT,A) vsnprintf(S,N,FMT,A) #endif diff --git a/perform/zip_perf.c b/perform/zip_perf.c index 585dc13..f76e10b 100644 --- a/perform/zip_perf.c +++ b/perform/zip_perf.c @@ -157,11 +157,11 @@ error(const char *fmt, ...) va_list ap; va_start(ap, fmt); - fprintf(stderr, "%s: error: ", prog); - vfprintf(stderr, fmt, ap); - fprintf(stderr, "\n"); + HDfprintf(stderr, "%s: error: ", prog); + HDvfprintf(stderr, fmt, ap); + HDfprintf(stderr, "\n"); va_end(ap); - exit(EXIT_FAILURE); + HDexit(EXIT_FAILURE); } /* @@ -174,9 +174,9 @@ error(const char *fmt, ...) static void cleanup(void) { - if (!getenv("HDF5_NOCLEANUP")) - unlink(filename); - free(filename); + if (!HDgetenv("HDF5_NOCLEANUP")) + HDunlink(filename); + HDfree(filename); } static void @@ -189,7 +189,7 @@ write_file(Bytef *source, uLongf sourceLen) /* destination buffer needs to be at least 0.1% larger than sourceLen * plus 12 bytes */ destLen = (uLongf)((double)sourceLen + ((double)sourceLen * 0.1)) + 12; - dest = (Bytef *)malloc(destLen); + dest = (Bytef *)HDmalloc(destLen); if (!dest) error("out of memory"); @@ -204,7 +204,7 @@ write_file(Bytef *source, uLongf sourceLen) ((double)timer_start.tv_usec) / MICROSECOND); if (report_once_flag) { - printf("\tCompression Ratio: %g\n", ((double)destLen) / (double)sourceLen); + HDfprintf(stdout, "\tCompression Ratio: %g\n", ((double)destLen) / (double)sourceLen); report_once_flag = 0; } @@ -213,10 +213,10 @@ write_file(Bytef *source, uLongf sourceLen) /* loop to make sure we write everything out that we want to write */ for (;;) { - int rc = (int)write(output, d_ptr, (size_t)d_len); + int rc = (int)HDwrite(output, d_ptr, (size_t)d_len); if (rc == -1) - error(strerror(errno)); + error(HDstrerror(errno)); if (rc == (int)d_len) break; @@ -225,7 +225,7 @@ write_file(Bytef *source, uLongf sourceLen) d_ptr += rc; } - free(dest); + HDfree(dest); } /* @@ -299,7 +299,7 @@ static void get_unique_name(void) { const char *prefix = NULL; - const char *env = getenv("HDF5_PREFIX"); + const char *env = HDgetenv("HDF5_PREFIX"); if (env) prefix = env; @@ -309,19 +309,19 @@ get_unique_name(void) if (prefix) /* 2 = 1 for '/' + 1 for null terminator */ - filename = (char *) HDmalloc(strlen(prefix) + strlen(ZIP_PERF_FILE) + 2); + filename = (char *) HDmalloc(HDstrlen(prefix) + HDstrlen(ZIP_PERF_FILE) + 2); else - filename = (char *) HDmalloc(strlen(ZIP_PERF_FILE) + 1); + filename = (char *) HDmalloc(HDstrlen(ZIP_PERF_FILE) + 1); if (!filename) error("out of memory"); filename[0] = 0; if (prefix){ - strcpy(filename, prefix); - strcat(filename, "/"); + HDstrcpy(filename, prefix); + HDstrcat(filename, "/"); } - strcat(filename, ZIP_PERF_FILE); + HDstrcat(filename, ZIP_PERF_FILE); } /* @@ -334,30 +334,30 @@ get_unique_name(void) static void usage(void) { - printf("usage: %s [OPTIONS]\n", prog); - printf(" OPTIONS\n"); - printf(" -h, --help Print this usage message and exit\n"); - printf(" -1...-9 Level of compression, from 1 to 9\n"); - printf(" -c P, --compressability=P Percentage of compressability of the random\n"); - printf(" data you want [default: 0]"); - printf(" -s S, --file-size=S Maximum size of uncompressed file [default: 64M]\n"); - printf(" -B S, --max-buffer_size=S Maximum size of buffer [default: 1M]\n"); - printf(" -b S, --min-buffer_size=S Minumum size of buffer [default: 128K]\n"); - printf(" -p D, --prefix=D The directory prefix to place the file\n"); - printf(" -r, --random-test Use random data to write to the file\n"); - printf(" [default: no]\n"); - printf("\n"); - printf(" D - a directory which exists\n"); - printf(" P - a number between 0 and 100\n"); - printf(" S - is a size specifier, an integer >=0 followed by a size indicator:\n"); - printf("\n"); - printf(" K - Kilobyte (%d)\n", ONE_KB); - printf(" M - Megabyte (%d)\n", ONE_MB); - printf(" G - Gigabyte (%d)\n", ONE_GB); - printf("\n"); - printf(" Example: 37M = 37 Megabytes = %d bytes\n", 37 * ONE_MB); - printf("\n"); - fflush(stdout); + HDfprintf(stdout, "usage: %s [OPTIONS]\n", prog); + HDfprintf(stdout, " OPTIONS\n"); + HDfprintf(stdout, " -h, --help Print this usage message and exit\n"); + HDfprintf(stdout, " -1...-9 Level of compression, from 1 to 9\n"); + HDfprintf(stdout, " -c P, --compressability=P Percentage of compressability of the random\n"); + HDfprintf(stdout, " data you want [default: 0]"); + HDfprintf(stdout, " -s S, --file-size=S Maximum size of uncompressed file [default: 64M]\n"); + HDfprintf(stdout, " -B S, --max-buffer_size=S Maximum size of buffer [default: 1M]\n"); + HDfprintf(stdout, " -b S, --min-buffer_size=S Minumum size of buffer [default: 128K]\n"); + HDfprintf(stdout, " -p D, --prefix=D The directory prefix to place the file\n"); + HDfprintf(stdout, " -r, --random-test Use random data to write to the file\n"); + HDfprintf(stdout, " [default: no]\n"); + HDfprintf(stdout, "\n"); + HDfprintf(stdout, " D - a directory which exists\n"); + HDfprintf(stdout, " P - a number between 0 and 100\n"); + HDfprintf(stdout, " S - is a size specifier, an integer >=0 followed by a size indicator:\n"); + HDfprintf(stdout, "\n"); + HDfprintf(stdout, " K - Kilobyte (%d)\n", ONE_KB); + HDfprintf(stdout, " M - Megabyte (%d)\n", ONE_MB); + HDfprintf(stdout, " G - Gigabyte (%d)\n", ONE_GB); + HDfprintf(stdout, "\n"); + HDfprintf(stdout, " Example: 37M = 37 Megabytes = %d bytes\n", 37 * ONE_MB); + HDfprintf(stdout, "\n"); + HDfflush(stdout); } /* @@ -380,7 +380,7 @@ parse_size_directive(const char *size) unsigned long s; char *endptr; - s = strtoul(size, &endptr, 10); + s = HDstrtoul(size, &endptr, 10); if (endptr && *endptr) { while (*endptr != '\0' && (*endptr == ' ' || *endptr == '\t')) @@ -419,16 +419,16 @@ fill_with_random_data(Bytef *src, uLongf src_len) Bytef *buf = src; int fd = HDopen("/dev/urandom", O_RDONLY, 0); - printf("Using /dev/urandom for random data\n"); + HDfprintf(stdout, "Using /dev/urandom for random data\n"); if (fd < 0) - error(strerror(errno)); + error(HDstrerror(errno)); for (;;) { - ssize_t rc = read(fd, buf, src_len); + ssize_t rc = HDread(fd, buf, src_len); if (rc == -1) - error(strerror(errno)); + error(HDstrerror(errno)); if (rc == (ssize_t)len) break; @@ -437,7 +437,7 @@ fill_with_random_data(Bytef *src, uLongf src_len) len -= rc; } } else { - printf("Using random() for random data\n"); + HDfprintf(stdout, "Using random() for random data\n"); for (u = 0; u < src_len; ++u) src[u] = (Bytef)(0xff & HDrandom()); @@ -446,7 +446,7 @@ fill_with_random_data(Bytef *src, uLongf src_len) if (compress_percent) { unsigned long s = src_len * compress_percent / 100; - memset(src, '\0', s); + HDmemset(src, '\0', s); } } @@ -463,7 +463,7 @@ do_write_test(unsigned long file_size, unsigned long min_buf_size, register unsigned long i, iters; iters = file_size / src_len; - src = (Bytef *)calloc(1, sizeof(Bytef) * src_len); + src = (Bytef *)HDcalloc(1, sizeof(Bytef) * src_len); if (!src) { cleanup(); @@ -475,26 +475,26 @@ do_write_test(unsigned long file_size, unsigned long min_buf_size, if (random_test) fill_with_random_data(src, src_len); - printf("Buffer size == "); + HDfprintf(stdout, "Buffer size == "); if (src_len >= ONE_KB && (src_len % ONE_KB) == 0) { if (src_len >= ONE_MB && (src_len % ONE_MB) == 0) { - printf("%ldMB", src_len / ONE_MB); + HDfprintf(stdout, "%ldMB", src_len / ONE_MB); } else { - printf("%ldKB", src_len / ONE_KB); + HDfprintf(stdout, "%ldKB", src_len / ONE_KB); } } else { - printf("%ld", src_len); + HDfprintf(stdout, "%ld", src_len); } - printf("\n"); + HDfprintf(stdout, "\n"); /* do uncompressed data write */ HDgettimeofday(&timer_start, NULL); output = HDopen(filename, O_RDWR | O_CREAT, S_IRWXU); if (output == -1) - error(strerror(errno)); + error(HDstrerror(errno)); for (i = 0; i <= iters; ++i) { Bytef *s_ptr = src; @@ -502,10 +502,10 @@ do_write_test(unsigned long file_size, unsigned long min_buf_size, /* loop to make sure we write everything out that we want to write */ for (;;) { - ssize_t rc = write(output, s_ptr, s_len); + ssize_t rc = HDwrite(output, s_ptr, s_len); if (rc == -1) - error(strerror(errno)); + error(HDstrerror(errno)); if (rc == (ssize_t)s_len) break; @@ -515,7 +515,7 @@ do_write_test(unsigned long file_size, unsigned long min_buf_size, } } - close(output); + HDclose(output); HDgettimeofday(&timer_stop, NULL); total_time = ((double)timer_stop.tv_sec + @@ -523,17 +523,17 @@ do_write_test(unsigned long file_size, unsigned long min_buf_size, ((double)timer_start.tv_sec + ((double)timer_start.tv_usec) / MICROSECOND); - printf("\tUncompressed Write Time: %.2fs\n", total_time); - printf("\tUncompressed Write Throughput: %.2fMB/s\n", + HDfprintf(stdout, "\tUncompressed Write Time: %.2fs\n", total_time); + HDfprintf(stdout, "\tUncompressed Write Throughput: %.2fMB/s\n", MB_PER_SEC(file_size, total_time)); - unlink(filename); + HDunlink(filename); /* do compressed data write */ output = HDopen(filename, O_RDWR | O_CREAT, S_IRWXU); if (output == -1) - error(strerror(errno)); + error(HDstrerror(errno)); report_once_flag = 1; HDgettimeofday(&timer_start, NULL); @@ -541,7 +541,7 @@ do_write_test(unsigned long file_size, unsigned long min_buf_size, for (total_len = 0; total_len < file_size; total_len += src_len) write_file(src, src_len); - close(output); + HDclose(output); HDgettimeofday(&timer_stop, NULL); total_time = ((double)timer_stop.tv_sec + @@ -549,13 +549,13 @@ do_write_test(unsigned long file_size, unsigned long min_buf_size, ((double)timer_start.tv_sec + ((double)timer_start.tv_usec) / MICROSECOND); - printf("\tCompressed Write Time: %.2fs\n", total_time); - printf("\tCompressed Write Throughput: %.2fMB/s\n", + HDfprintf(stdout, "\tCompressed Write Time: %.2fs\n", total_time); + HDfprintf(stdout, "\tCompressed Write Throughput: %.2fMB/s\n", MB_PER_SEC(file_size, total_time)); - printf("\tCompression Time: %gs\n", compression_time); + HDfprintf(stdout, "\tCompression Time: %gs\n", compression_time); - unlink(filename); - free(src); + HDunlink(filename); + HDfree(src); } } @@ -593,7 +593,7 @@ main(int argc, char **argv) min_buf_size = parse_size_directive(opt_arg); break; case 'c': - compress_percent = (int)strtol(opt_arg, NULL, 10); + compress_percent = (int)HDstrtol(opt_arg, NULL, 10); if (compress_percent < 0) compress_percent = 0; @@ -626,12 +626,12 @@ main(int argc, char **argv) error("minmum buffer size (%d) exceeds maximum buffer size (%d)", min_buf_size, max_buf_size); - printf("Filesize: %ld\n", file_size); + HDfprintf(stdout, "Filesize: %ld\n", file_size); if (compress_level == Z_DEFAULT_COMPRESSION) - printf("Compression Level: 6\n"); + HDfprintf(stdout, "Compression Level: 6\n"); else - printf("Compression Level: %d\n", compress_level); + HDfprintf(stdout, "Compression Level: %d\n", compress_level); get_unique_name(); do_write_test(file_size, min_buf_size, max_buf_size); @@ -652,7 +652,7 @@ main(int argc, char **argv) int main(void) { - printf("No compression IO performance because zlib was not configured\n"); + HDfprintf(stdout, "No compression IO performance because zlib was not configured\n"); return EXIT_SUCCESS; } diff --git a/src/H5FDstdio.c b/src/H5FDstdio.c index 8f4f7f0..64919ed 100644 --- a/src/H5FDstdio.c +++ b/src/H5FDstdio.c @@ -414,7 +414,11 @@ H5FD_stdio_open( const char *name, unsigned flags, hid_t fapl_id, } /* Get the file descriptor (needed for truncate and some Windows information) */ +#ifdef H5_HAVE_WIN32_API + file->fd = _fileno(file->fp); +#else /* H5_HAVE_WIN32_API */ file->fd = fileno(file->fp); +#endif /* H5_HAVE_WIN32_API */ if(file->fd < 0) { free(file); fclose(f); diff --git a/src/H5system.c b/src/H5system.c index a93a128..85e554e 100644 --- a/src/H5system.c +++ b/src/H5system.c @@ -666,6 +666,30 @@ Wgetlogin() return NULL; } +int c99_snprintf(char* str, size_t size, const char* format, ...) +{ + int count; + va_list ap; + + va_start(ap, format); + count = c99_vsnprintf(str, size, format, ap); + va_end(ap); + + return count; +} + +int c99_vsnprintf(char* str, size_t size, const char* format, va_list ap) +{ + int count = -1; + + if (size != 0) + count = _vsnprintf_s(str, size, _TRUNCATE, format, ap); + if (count == -1) + count = _vscprintf(format, ap); + + return count; +} + #endif diff --git a/src/H5win32defs.h b/src/H5win32defs.h index e9b87625..d452925 100644 --- a/src/H5win32defs.h +++ b/src/H5win32defs.h @@ -29,6 +29,7 @@ typedef struct _stati64 h5_stat_t; typedef __int64 h5_stat_size_t; #define HDaccess(F,M) _access(F,M) +#define HDchdir(S) _chdir(S) #define HDclose(F) _close(F) #define HDdup(F) _dup(F) #define HDfdopen(N,S) _fdopen(N,S) @@ -47,16 +48,15 @@ typedef __int64 h5_stat_size_t; */ #define HDopen(S,F,M) _open(S,F|_O_BINARY,M) #define HDread(F,M,Z) _read(F,M,Z) +#define HDrmdir(S) _rmdir(S) #define HDsetvbuf(F,S,M,Z) setvbuf(F,S,M,(Z>1?Z:2)) #define HDsleep(S) Sleep(S*1000) #define HDstat(S,B) _stati64(S,B) #define HDstrcasecmp(A,B) _stricmp(A,B) #define HDstrtoull(S,R,N) _strtoui64(S,R,N) #define HDstrdup(S) _strdup(S) -#define HDsnprintf _snprintf /*varargs*/ #define HDtzset() _tzset() #define HDunlink(S) _unlink(S) -#define HDvsnprintf(S,N,FMT,A) _vsnprintf(S,N,FMT,A) #define HDwrite(F,M,Z) _write(F,M,Z) #ifdef H5_HAVE_VISUAL_STUDIO @@ -75,11 +75,15 @@ struct timezone { #endif /* __cplusplus */ H5_DLL int Wgettimeofday(struct timeval *tv, struct timezone *tz); H5_DLL char* Wgetlogin(); + H5_DLL int c99_snprintf(char* str, size_t size, const char* format, ...); + H5_DLL int c99_vsnprintf(char* str, size_t size, const char* format, va_list ap); #ifdef __cplusplus } #endif /* __cplusplus */ #define HDgettimeofday(V,Z) Wgettimeofday(V,Z) -#define HDgetlogin() Wgetlogin() +#define HDgetlogin() Wgetlogin() +#define HDsnprintf c99_snprintf /*varargs*/ +#define HDvsnprintf c99_vsnprintf #endif /* H5_HAVE_VISUAL_STUDIO */ -- cgit v0.12 From 259abfa83970f7da997e2b95c8357fd85b800bbe Mon Sep 17 00:00:00 2001 From: Neil Fortner Date: Tue, 2 Jul 2013 16:17:16 -0500 Subject: [svn-r23859] Add const tag to source buffers for H5Dscatter and H5Dgather. Tested: ummon --- src/H5Dpublic.h | 4 ++-- src/H5Dscatgath.c | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/H5Dpublic.h b/src/H5Dpublic.h index 484b176..4309d64 100644 --- a/src/H5Dpublic.h +++ b/src/H5Dpublic.h @@ -108,7 +108,7 @@ typedef herr_t (*H5D_operator_t)(void *elem, hid_t type_id, unsigned ndim, const hsize_t *point, void *operator_data); /* Define the operator function pointer for H5Dscatter() */ -typedef herr_t (*H5D_scatter_func_t)(void **src_buf/*out*/, +typedef herr_t (*H5D_scatter_func_t)(const void **src_buf/*out*/, size_t *src_buf_bytes_used/*out*/, void *op_data); @@ -142,7 +142,7 @@ H5_DLL herr_t H5Dfill(const void *fill, hid_t fill_type, void *buf, H5_DLL herr_t H5Dset_extent(hid_t dset_id, const hsize_t size[]); H5_DLL herr_t H5Dscatter(H5D_scatter_func_t op, void *op_data, hid_t type_id, hid_t dst_space_id, void *dst_buf); -H5_DLL herr_t H5Dgather(hid_t src_space_id, void *src_buf, hid_t type_id, +H5_DLL herr_t H5Dgather(hid_t src_space_id, const void *src_buf, hid_t type_id, size_t dst_buf_size, void *dst_buf, H5D_gather_func_t op, void *op_data); H5_DLL herr_t H5Ddebug(hid_t dset_id); diff --git a/src/H5Dscatgath.c b/src/H5Dscatgath.c index 60a8800..4b0846f 100644 --- a/src/H5Dscatgath.c +++ b/src/H5Dscatgath.c @@ -925,7 +925,7 @@ H5Dscatter(H5D_scatter_func_t op, void *op_data, hid_t type_id, H5S_t *dst_space; /* Dataspace */ H5S_sel_iter_t iter; /* Selection iteration info*/ hbool_t iter_init = FALSE; /* Selection iteration info has been initialized */ - void *src_buf = NULL; /* Source (contiguous) data buffer */ + const void *src_buf = NULL; /* Source (contiguous) data buffer */ size_t src_buf_nbytes = 0; /* Size of src_buf */ size_t type_size; /* Datatype element size */ hssize_t nelmts; /* Number of remaining elements in selection */ @@ -1018,8 +1018,8 @@ done: *------------------------------------------------------------------------- */ herr_t -H5Dgather(hid_t src_space_id, void *src_buf, hid_t type_id, size_t dst_buf_size, - void *dst_buf, H5D_gather_func_t op, void *op_data) +H5Dgather(hid_t src_space_id, const void *src_buf, hid_t type_id, + size_t dst_buf_size, void *dst_buf, H5D_gather_func_t op, void *op_data) { H5T_t *type; /* Datatype */ H5S_t *src_space; /* Dataspace */ -- cgit v0.12 From a0ccc0f0faf4c12c0ef81777f6d9ae5e1a1107f9 Mon Sep 17 00:00:00 2001 From: Allen Byrne Date: Wed, 3 Jul 2013 09:34:12 -0500 Subject: [svn-r23860] HDFFV-8322: reduce valgrind memory leaks for ex_image2 Tested:" local linux --- hl/examples/ex_image2.c | 8 ++++++++ hl/src/H5LT.c | 4 +++- 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/hl/examples/ex_image2.c b/hl/examples/ex_image2.c index 77398c4..76c3a75 100644 --- a/hl/examples/ex_image2.c +++ b/hl/examples/ex_image2.c @@ -46,6 +46,10 @@ int main( void ) /* make the image */ status=H5IMmake_image_8bit( file_id, IMAGE1_NAME, width, height, gbuf ); + if (gbuf) { + free(gbuf); + gbuf = NULL; + } /*------------------------------------------------------------------------- * define a palette, blue to red tones @@ -75,6 +79,10 @@ int main( void ) /* make dataset */ status=H5IMmake_image_24bit( file_id, IMAGE2_NAME, width, height, "INTERLACE_PIXEL", gbuf ); + if (gbuf) { + free(gbuf); + gbuf = NULL; + } /* close the file. */ H5Fclose( file_id ); diff --git a/hl/src/H5LT.c b/hl/src/H5LT.c index 88f8de4..b2c8949 100644 --- a/hl/src/H5LT.c +++ b/hl/src/H5LT.c @@ -2175,8 +2175,10 @@ hid_t H5LTtext_to_dtype(const char *text, H5LT_lang_t lang_type) input_len = HDstrlen(text); myinput = HDstrdup(text); - if((type_id = H5LTyyparse()) < 0) + if((type_id = H5LTyyparse()) < 0) { + HDfree(myinput); goto out; + } HDfree(myinput); input_len = 0; -- cgit v0.12 From 6da129cef05328a6935bb6ce65319944cdce5a95 Mon Sep 17 00:00:00 2001 From: Allen Byrne Date: Wed, 3 Jul 2013 09:58:09 -0500 Subject: [svn-r23861] HDFFV-8322: Mismatched free() / delete / delete [] for cpp_testhdf5 Tested:" local linux --- c++/test/tfilter.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/c++/test/tfilter.cpp b/c++/test/tfilter.cpp index 9e60655..257e4be 100644 --- a/c++/test/tfilter.cpp +++ b/c++/test/tfilter.cpp @@ -230,7 +230,7 @@ void test_szip_filter(H5File& file1) issue_fail_msg("test_szip_filter()", __LINE__, __FILE__, E.getCDetailMsg()); } - delete tconv_buf; + delete[] tconv_buf; } // if szip presents else { SKIPPED(); -- cgit v0.12 From dfcb3cebf17c20b6dfc0a1dd5178c2e2d01c4422 Mon Sep 17 00:00:00 2001 From: Mohamad Chaarawi Date: Wed, 3 Jul 2013 11:12:32 -0500 Subject: [svn-r23862] Change printfs in perform output and h5dump to prevent overflow. This fixes: https://jira.hdfgroup.uiuc.edu/browse/HDFFV-8450 Tested on Jam. --- perform/pio_engine.c | 56 +++++++++++++++++++++++------------------------ perform/pio_perf.c | 20 ++++++++--------- perform/sio_engine.c | 10 ++++----- perform/sio_perf.c | 12 +++++----- src/H5system.c | 3 ++- tools/h5dump/h5dump_ddl.c | 4 ++-- 6 files changed, 53 insertions(+), 52 deletions(-) diff --git a/perform/pio_engine.c b/perform/pio_engine.c index 0e3190c..87fa82c 100644 --- a/perform/pio_engine.c +++ b/perform/pio_engine.c @@ -245,52 +245,52 @@ do_pio(parameters param) /* Validate transfer buffer size & block size*/ if(blk_size<=0) { HDfprintf(stderr, - "Transfer block size (%Hd) must be > 0\n", (long long)blk_size); + "Transfer block size (%zu) must be > 0\n", blk_size); GOTOERROR(FAIL); } if(buf_size<=0) { HDfprintf(stderr, - "Transfer buffer size (%Hd) must be > 0\n", (long long)buf_size); + "Transfer buffer size (%zu) must be > 0\n", buf_size); GOTOERROR(FAIL); } if ((buf_size % blk_size) != 0){ HDfprintf(stderr, - "Transfer buffer size (%Hd) must be a multiple of the " - "interleaved I/O block size (%Hd)\n", - (long long)buf_size, (long long)blk_size); + "Transfer buffer size (%zu) must be a multiple of the " + "interleaved I/O block size (%zu)\n", + buf_size, blk_size); GOTOERROR(FAIL); } if((snbytes%pio_mpi_nprocs_g)!=0) { HDfprintf(stderr, - "Dataset size (%Hd) must be a multiple of the " - "number of processes (%d)\n", - (long long)snbytes, pio_mpi_nprocs_g); + "Dataset size (%" H5_PRINTF_LL_WIDTH "d) must be a multiple of the " + "number of processes (%d)\n", + (long long)snbytes, pio_mpi_nprocs_g); GOTOERROR(FAIL); } if (!param.dim2d){ if(((snbytes/pio_mpi_nprocs_g)%buf_size)!=0) { HDfprintf(stderr, - "Dataset size/process (%Hd) must be a multiple of the " - "trasfer buffer size (%Hd)\n", - (long long)(snbytes/pio_mpi_nprocs_g), (long long)buf_size); + "Dataset size/process (%" H5_PRINTF_LL_WIDTH "d) must be a multiple of the " + "trasfer buffer size (%zu)\n", + (long long)(snbytes/pio_mpi_nprocs_g), buf_size); GOTOERROR(FAIL); } } else { if((snbytes%buf_size)!=0) { HDfprintf(stderr, - "Dataset side size (%Hd) must be a multiple of the " - "trasfer buffer size (%Hd)\n", - (long long)snbytes, (long long)buf_size); + "Dataset side size (%" H5_PRINTF_LL_WIDTH "d) must be a multiple of the " + "trasfer buffer size (%zu)\n", + (long long)snbytes, buf_size); GOTOERROR(FAIL); } } /* Allocate transfer buffer */ if ((buffer = malloc(bsize)) == NULL){ - HDfprintf(stderr, "malloc for transfer buffer size (%Hd) failed\n", - (long long)(bsize)); + HDfprintf(stderr, "malloc for transfer buffer size (%zu) failed\n", + bsize); GOTOERROR(FAIL); } @@ -651,13 +651,13 @@ do_write(results *res, file_descr *fd, parameters *parms, long ndsets, HDprint_rank(output); if (!parms->dim2d) { HDfprintf(output, "Debug(do_write): " - "buf_size=%Hd, bytes_begin=%Hd, bytes_count=%Hd\n", - (long long)buf_size, (long long)bytes_begin[0], + "buf_size=%zu, bytes_begin=%" H5_PRINTF_LL_WIDTH "d, bytes_count=%" H5_PRINTF_LL_WIDTH "d\n", + buf_size, (long long)bytes_begin[0], (long long)bytes_count); } else { HDfprintf(output, "Debug(do_write): " - "linear buf_size=%Hd, bytes_begin=(%Hd,%Hd), bytes_count=%Hd\n", - (long long)buf_size*blk_size, (long long)bytes_begin[0], + "linear buf_size=%zu, bytes_begin=(%" H5_PRINTF_LL_WIDTH "d,%" H5_PRINTF_LL_WIDTH "d), bytes_count=%" H5_PRINTF_LL_WIDTH "d\n", + buf_size*blk_size, (long long)bytes_begin[0], (long long)bytes_begin[1], (long long)bytes_count); } } @@ -1625,13 +1625,13 @@ do_read(results *res, file_descr *fd, parameters *parms, long ndsets, HDprint_rank(output); if (!parms->dim2d) { HDfprintf(output, "Debug(do_write): " - "buf_size=%Hd, bytes_begin=%Hd, bytes_count=%Hd\n", - (long long)buf_size, (long long)bytes_begin[0], + "buf_size=%zu, bytes_begin=%" H5_PRINTF_LL_WIDTH "d, bytes_count=%" H5_PRINTF_LL_WIDTH "d\n", + buf_size, (long long)bytes_begin[0], (long long)bytes_count); } else { HDfprintf(output, "Debug(do_write): " - "linear buf_size=%Hd, bytes_begin=(%Hd,%Hd), bytes_count=%Hd\n", - (long long)buf_size*blk_size, (long long)bytes_begin[0], + "linear buf_size=%zu, bytes_begin=(%" H5_PRINTF_LL_WIDTH "d,%" H5_PRINTF_LL_WIDTH "d), bytes_count=%" H5_PRINTF_LL_WIDTH "d\n", + buf_size*blk_size, (long long)bytes_begin[0], (long long)bytes_begin[1], (long long)bytes_count); } } @@ -2336,10 +2336,10 @@ do_read(results *res, file_descr *fd, parameters *parms, long ndsets, if (++nerror < 20){ /* report at most 20 errors */ HDprint_rank(output); - HDfprintf(output, "read data error, expected (%Hd), " - "got (%Hd)\n", - (long long)pio_mpi_rank_g+1, - (long long)*(ucharptr-1)); + HDfprintf(output, "read data error, expected (%d), " + "got (%d)\n", + pio_mpi_rank_g+1, + (int)*(ucharptr-1)); } /* end if */ } /* end if */ } /* end for */ diff --git a/perform/pio_perf.c b/perform/pio_perf.c index 337e982..a47754b 100644 --- a/perform/pio_perf.c +++ b/perform/pio_perf.c @@ -1116,14 +1116,14 @@ recover_size_and_print(long long val, const char *end) if (val >= ONE_KB && (val % ONE_KB) == 0) { if (val >= ONE_MB && (val % ONE_MB) == 0) { if (val >= ONE_GB && (val % ONE_GB) == 0) - HDfprintf(output, "%HdGB%s", val / ONE_GB, end); + HDfprintf(output, "%" H5_PRINTF_LL_WIDTH "d""GB%s", val / ONE_GB, end); else - HDfprintf(output, "%HdMB%s", val / ONE_MB, end); + HDfprintf(output, "%" H5_PRINTF_LL_WIDTH "d""MB%s", val / ONE_MB, end); } else { - HDfprintf(output, "%HdKB%s", val / ONE_KB, end); + HDfprintf(output, "%" H5_PRINTF_LL_WIDTH "d""KB%s", val / ONE_KB, end); } } else { - HDfprintf(output, "%Hd%s", val, end); + HDfprintf(output, "%" H5_PRINTF_LL_WIDTH "d""%s", val, end); } } @@ -1150,12 +1150,12 @@ report_parameters(struct options *opts) HDfprintf(output, "rank %d: IO API=", rank); print_io_api(opts->io_types); - HDfprintf(output, "rank %d: Number of files=%Hd\n", rank, - (long long)opts->num_files); - HDfprintf(output, "rank %d: Number of datasets=%Hd\n", rank, - (long long)opts->num_dsets); - HDfprintf(output, "rank %d: Number of iterations=%Hd\n", rank, - (long long)opts->num_iters); + HDfprintf(output, "rank %d: Number of files=%ld\n", rank, + opts->num_files); + HDfprintf(output, "rank %d: Number of datasets=%ld\n", rank, + opts->num_dsets); + HDfprintf(output, "rank %d: Number of iterations=%d\n", rank, + opts->num_iters); HDfprintf(output, "rank %d: Number of processes=%d:%d\n", rank, opts->min_num_procs, opts->max_num_procs); diff --git a/perform/sio_engine.c b/perform/sio_engine.c index df2e21e..541a9b0 100644 --- a/perform/sio_engine.c +++ b/perform/sio_engine.c @@ -196,15 +196,15 @@ do_sio(parameters param) /* Validate transfer buffer size */ if (param.buf_size[i]<=0) { HDfprintf(stderr, - "Transfer buffer size[%d] (%Hd) must be > 0\n", i,(long long)buf_size[i]); + "Transfer buffer size[%d] (%zu) must be > 0\n", i,buf_size[i]); GOTOERROR(FAIL); } if ((param.dset_size[i]%param.buf_size[i])!=0) { HDfprintf(stderr, - "Dataset size[%d] (%Hd) must be a multiple of the " - "trasfer buffer size[%d] (%Hd)\n",param.rank, - (long long)param.dset_size[i], param.rank, (long long)param.buf_size[i]); + "Dataset size[%d] (%" H5_PRINTF_LL_WIDTH "d) must be a multiple of the " + "trasfer buffer size[%d] (%zu)\n",param.rank, + (long long)param.dset_size[i], param.rank, param.buf_size[i]); GOTOERROR(FAIL); } @@ -212,7 +212,7 @@ do_sio(parameters param) /* Allocate transfer buffer */ if ((buffer = malloc(linear_buf_size)) == NULL){ - HDfprintf(stderr, "malloc for transfer buffer size (%Hd) failed\n", (long long)(linear_buf_size)); + HDfprintf(stderr, "malloc for transfer buffer size (%zu) failed\n", linear_buf_size); GOTOERROR(FAIL); } diff --git a/perform/sio_perf.c b/perform/sio_perf.c index 16e1750..5c09e84 100644 --- a/perform/sio_perf.c +++ b/perform/sio_perf.c @@ -827,14 +827,14 @@ recover_size_and_print(long long val, const char *end) if (val >= ONE_KB && (val % ONE_KB) == 0) { if (val >= ONE_MB && (val % ONE_MB) == 0) { if (val >= ONE_GB && (val % ONE_GB) == 0) - HDfprintf(output, "%HdGB%s", val / ONE_GB, end); + HDfprintf(output, "%" H5_PRINTF_LL_WIDTH "d""GB%s", val / ONE_GB, end); else - HDfprintf(output, "%HdMB%s", val / ONE_MB, end); + HDfprintf(output, "%" H5_PRINTF_LL_WIDTH "d""MB%s", val / ONE_MB, end); } else { - HDfprintf(output, "%HdKB%s", val / ONE_KB, end); + HDfprintf(output, "%" H5_PRINTF_LL_WIDTH "d""KB%s", val / ONE_KB, end); } } else { - HDfprintf(output, "%Hd%s", val, end); + HDfprintf(output, "%" H5_PRINTF_LL_WIDTH "d""%s", val, end); } } @@ -860,8 +860,8 @@ report_parameters(struct options *opts) HDfprintf(output, "IO API="); print_io_api(opts->io_types); - HDfprintf(output, "Number of iterations=%Hd\n", - (long long)opts->num_iters); + HDfprintf(output, "Number of iterations=%d\n", + opts->num_iters); HDfprintf(output, "Dataset size="); diff --git a/src/H5system.c b/src/H5system.c index 85e554e..2a94028 100644 --- a/src/H5system.c +++ b/src/H5system.c @@ -189,7 +189,7 @@ HDfprintf(FILE *stream, const char *fmt, ...) } /* Extra type modifiers */ - if(HDstrchr("ZHhlqLI", *s)) { + if(HDstrchr("zZHhlqLI", *s)) { switch(*s) { /*lint --e{506} Don't issue warnings about constant value booleans */ /*lint --e{774} Don't issue warnings boolean within 'if' always evaluates false/true */ @@ -203,6 +203,7 @@ HDfprintf(FILE *stream, const char *fmt, ...) break; case 'Z': + case 'z': if(sizeof(size_t) < sizeof(long)) modifier[0] = '\0'; else if(sizeof(size_t) == sizeof(long)) diff --git a/tools/h5dump/h5dump_ddl.c b/tools/h5dump/h5dump_ddl.c index a9a23a5..bb54e3f 100644 --- a/tools/h5dump/h5dump_ddl.c +++ b/tools/h5dump/h5dump_ddl.c @@ -1179,9 +1179,9 @@ dump_fcpl(hid_t fid) indentation(dump_indent + COL); PRINTSTREAM(rawoutstream, "%s %u\n","OBJECTHEADER_VERSION", finfo.sohm.version); indentation(dump_indent + COL); - PRINTSTREAM(rawoutstream,"%s %Hd\n","OFFSET_SIZE", (long long)off_size); + PRINTSTREAM(rawoutstream,"%s %zu\n","OFFSET_SIZE", off_size); indentation(dump_indent + COL); - PRINTSTREAM(rawoutstream,"%s %Hd\n","LENGTH_SIZE", (long long)len_size); + PRINTSTREAM(rawoutstream,"%s %zu\n","LENGTH_SIZE", len_size); indentation(dump_indent + COL); PRINTSTREAM(rawoutstream, "%s %u\n","BTREE_RANK", sym_ik); indentation(dump_indent + COL); -- cgit v0.12 From dad8a4ddefcd970854c2e27c6c10364bb3f7a625 Mon Sep 17 00:00:00 2001 From: Jonathan Kim Date: Wed, 3 Jul 2013 17:33:25 -0500 Subject: [svn-r23863] Remove compile warnings due to missing switch defaults --- perform/overhead.c | 10 ++++++++ perform/sio_engine.c | 72 +++++++++++++++++++++++++++++++++++++++++++++++----- perform/sio_perf.c | 5 ++++ 3 files changed, 80 insertions(+), 7 deletions(-) diff --git a/perform/overhead.c b/perform/overhead.c index 0b40721..9341e64 100644 --- a/perform/overhead.c +++ b/perform/overhead.c @@ -250,6 +250,11 @@ test(fill_t fill_style, const double splits[], break; case FILL_ALL: abort(); + default: + /* unknown request */ + HDfprintf(stderr, "Unknown fill style\n"); + goto error; + break; } /* Write the chunk */ @@ -305,6 +310,11 @@ test(fill_t fill_style, const double splits[], break; case FILL_ALL: abort(); + default: + /* unknown request */ + HDfprintf(stderr, "Unknown fill style\n"); + goto error; + break; } if (HDfstat(fd, &sb) < 0) goto error; diff --git a/perform/sio_engine.c b/perform/sio_engine.c index df2e21e..4d6afd8 100644 --- a/perform/sio_engine.c +++ b/perform/sio_engine.c @@ -180,7 +180,7 @@ do_sio(parameters param) break; default: /* unknown request */ - fprintf(stderr, "Unknown IO type request (%d)\n", (int)iot); + HDfprintf(stderr, "Unknown IO type request (%d)\n", (int)iot); GOTOERROR(FAIL); } @@ -285,6 +285,10 @@ done: case HDF5: if (fd.h5fd != -1) hrc = do_fclose(iot, &fd); + break; + default: + /* unknown request */ + HDassert(0 && "Unknown IO type"); break; } @@ -331,6 +335,11 @@ sio_create_filename(iotype iot, const char *base_name, char *fullname, size_t si else if (vfd == multi) suffix = NULL; break; + default: + /* unknown request */ + HDfprintf(stderr, "Unknown IO type request (%d)\n", (int)iot); + HDassert(0 && "Unknown IO type"); + break; } /* First use the environment variable and then try the constant */ @@ -506,6 +515,11 @@ do_write(results *res, file_descr *fd, parameters *parms, void *buffer) } break; + + default: + HDfprintf(stderr, "Unknown IO type request (%d)\n", (int)parms->io_type); + GOTOERROR(FAIL); + break; } /* end switch */ @@ -546,7 +560,12 @@ do_write(results *res, file_descr *fd, parameters *parms, void *buffer) HDfprintf(stderr, "HDF5 Property List Close failed\n"); GOTOERROR(FAIL); } + break; + default: + /* unknown request */ + HDfprintf(stderr, "Unknown IO type request (%d)\n", (int)parms->io_type); + GOTOERROR(FAIL); break; } @@ -685,6 +704,12 @@ static herr_t dset_write(int local_dim, file_descr *fd, parameters *parms, void VRFY((hrc >= 0), "H5Dwrite"); break; + + default: + /* unknown request */ + HDfprintf(stderr, "Unknown IO type request (%d)\n", (int)parms->io_type); + HDassert(0 && "Unknown IO type"); + break; } /* switch (parms->io_type) */ } } @@ -832,7 +857,12 @@ do_read(results *res, file_descr *fd, parameters *parms, void *buffer) fprintf(stderr, "HDF5 Property List Create failed\n"); GOTOERROR(FAIL); } + break; + default: + /* unknown request */ + HDfprintf(stderr, "Unknown IO type request (%d)\n", (int)parms->io_type); + GOTOERROR(FAIL); break; } /* end switch */ @@ -849,9 +879,13 @@ do_read(results *res, file_descr *fd, parameters *parms, void *buffer) HDfprintf(stderr, "HDF5 Dataset open failed\n"); GOTOERROR(FAIL); } - break; - + + default: + /* unknown request */ + HDfprintf(stderr, "Unknown IO type request (%d)\n", (int)parms->io_type); + GOTOERROR(FAIL); + break; } /* end switch */ /* Start "raw data" read timer */ @@ -974,6 +1008,12 @@ static herr_t dset_read(int local_dim, file_descr *fd, parameters *parms, } #endif break; + + default: + /* unknown request */ + HDfprintf(stderr, "Unknown IO type request (%d)\n", (int)parms->io_type); + HDassert(0 && "Unknown IO type"); + break; } /* switch (parms->io_type) */ } } @@ -1086,6 +1126,12 @@ do_fopen(parameters *param, char *fname, file_descr *fd /*out*/, int flags) GOTOERROR(FAIL); } break; + + default: + /* unknown request */ + HDfprintf(stderr, "Unknown IO type request (%d)\n", (int)param->io_type); + GOTOERROR(FAIL); + break; } done: @@ -1208,6 +1254,12 @@ do_fclose(iotype iot, file_descr *fd /*out*/) fd->h5fd = -1; break; + + default: + /* unknown request */ + HDfprintf(stderr, "Unknown IO type request (%d)\n", (int)iot); + GOTOERROR(FAIL); + break; } done: @@ -1234,7 +1286,7 @@ do_cleanupfile(iotype iot, char *filename) if (clean_file_g){ - switch (iot) { + switch (iot) { case POSIXIO: HDremove(filename); break; @@ -1273,9 +1325,15 @@ do_cleanupfile(iotype iot, char *filename) HDremove(filename); } H5Pclose(fapl); - break; - } -} + break; + + default: + /* unknown request */ + HDfprintf(stderr, "Unknown IO type request (%d)\n", (int)iot); + HDassert(0 && "Unknown IO type"); + break; + } + } } #ifdef H5_HAVE_GPFS diff --git a/perform/sio_perf.c b/perform/sio_perf.c index 16e1750..985f3c4 100644 --- a/perform/sio_perf.c +++ b/perform/sio_perf.c @@ -482,6 +482,11 @@ run_test(iotype iot, parameters parms, struct options *opts) case HDF5: output_report("HDF5\n"); break; + default: + /* unknown request */ + HDfprintf(stderr, "Unknown IO type request (%d)\n", (int)iot); + HDassert(0 && "Unknown IO tpe"); + break; } /* allocate space for tables minmax and that it is sufficient */ -- cgit v0.12 From 3cb8efae13d38bec5cb46c626934ae6a8de9dfcf Mon Sep 17 00:00:00 2001 From: HDF Tester Date: Sun, 7 Jul 2013 03:33:31 -0500 Subject: [svn-r23865] Snapshot version 1.9 release 157 --- README.txt | 2 +- c++/src/Makefile.in | 2 +- config/lt_vers.am | 2 +- configure | 22 +++++++++++----------- configure.ac | 2 +- fortran/src/Makefile.in | 2 +- hl/c++/src/Makefile.in | 2 +- hl/fortran/src/Makefile.in | 2 +- hl/src/Makefile.in | 2 +- release_docs/RELEASE.txt | 2 +- src/H5public.h | 4 ++-- src/Makefile.in | 2 +- vms/src/h5pubconf.h | 6 +++--- 13 files changed, 26 insertions(+), 26 deletions(-) diff --git a/README.txt b/README.txt index 4618a94..a75e1f5 100644 --- a/README.txt +++ b/README.txt @@ -1,4 +1,4 @@ -HDF5 version 1.9.157 currently under development +HDF5 version 1.9.158 currently under development Please refer to the release_docs/INSTALL file for installation instructions. ------------------------------------------------------------------------------ diff --git a/c++/src/Makefile.in b/c++/src/Makefile.in index 083df6e..f726017 100644 --- a/c++/src/Makefile.in +++ b/c++/src/Makefile.in @@ -467,7 +467,7 @@ CHECK_CLEANFILES = *.chkexe *.chklog *.clog # Add libtool shared library version numbers to the HDF5 library # See libtool versioning documentation online. LT_VERS_INTERFACE = 6 -LT_VERS_REVISION = 147 +LT_VERS_REVISION = 148 LT_VERS_AGE = 0 # Include src directory diff --git a/config/lt_vers.am b/config/lt_vers.am index 42a12d6..27a13e0 100644 --- a/config/lt_vers.am +++ b/config/lt_vers.am @@ -17,7 +17,7 @@ # Add libtool shared library version numbers to the HDF5 library # See libtool versioning documentation online. LT_VERS_INTERFACE = 6 -LT_VERS_REVISION = 147 +LT_VERS_REVISION = 148 LT_VERS_AGE = 0 ## If the API changes *at all*, increment LT_VERS_INTERFACE and diff --git a/configure b/configure index ea06d4e..c8f49b4 100755 --- a/configure +++ b/configure @@ -1,7 +1,7 @@ #! /bin/sh # From configure.ac Id: configure.ac 22697 2012-08-19 14:35:47Z hdftest . # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.69 for HDF5 1.9.157. +# Generated by GNU Autoconf 2.69 for HDF5 1.9.158. # # Report bugs to . # @@ -591,8 +591,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='HDF5' PACKAGE_TARNAME='hdf5' -PACKAGE_VERSION='1.9.157' -PACKAGE_STRING='HDF5 1.9.157' +PACKAGE_VERSION='1.9.158' +PACKAGE_STRING='HDF5 1.9.158' PACKAGE_BUGREPORT='help@hdfgroup.org' PACKAGE_URL='' @@ -1486,7 +1486,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures HDF5 1.9.157 to adapt to many kinds of systems. +\`configure' configures HDF5 1.9.158 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1556,7 +1556,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of HDF5 1.9.157:";; + short | recursive ) echo "Configuration of HDF5 1.9.158:";; esac cat <<\_ACEOF @@ -1752,7 +1752,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -HDF5 configure 1.9.157 +HDF5 configure 1.9.158 generated by GNU Autoconf 2.69 Copyright (C) 2012 Free Software Foundation, Inc. @@ -2846,7 +2846,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by HDF5 $as_me 1.9.157, which was +It was created by HDF5 $as_me 1.9.158, which was generated by GNU Autoconf 2.69. Invocation command line was $ $0 $@ @@ -3678,7 +3678,7 @@ fi # Define the identity of the package. PACKAGE='hdf5' - VERSION='1.9.157' + VERSION='1.9.158' cat >>confdefs.h <<_ACEOF @@ -31632,7 +31632,7 @@ Usage: $0 [OPTIONS] Report bugs to ." lt_cl_version="\ -HDF5 config.lt 1.9.157 +HDF5 config.lt 1.9.158 configured by $0, generated by GNU Autoconf 2.69. Copyright (C) 2011 Free Software Foundation, Inc. @@ -33762,7 +33762,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by HDF5 $as_me 1.9.157, which was +This file was extended by HDF5 $as_me 1.9.158, which was generated by GNU Autoconf 2.69. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -33828,7 +33828,7 @@ _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ -HDF5 config.status 1.9.157 +HDF5 config.status 1.9.158 configured by $0, generated by GNU Autoconf 2.69, with options \\"\$ac_cs_config\\" diff --git a/configure.ac b/configure.ac index fbf3dce..cc57775 100644 --- a/configure.ac +++ b/configure.ac @@ -26,7 +26,7 @@ AC_PREREQ([2.69]) ## NOTE: Do not forget to change the version number here when we do a ## release!!! ## -AC_INIT([HDF5], [1.9.157], [help@hdfgroup.org]) +AC_INIT([HDF5], [1.9.158], [help@hdfgroup.org]) AC_CONFIG_SRCDIR([src/H5.c]) AC_CONFIG_HEADER([src/H5config.h]) diff --git a/fortran/src/Makefile.in b/fortran/src/Makefile.in index 7b6a7a3..cbacd68 100644 --- a/fortran/src/Makefile.in +++ b/fortran/src/Makefile.in @@ -518,7 +518,7 @@ CHECK_CLEANFILES = *.chkexe *.chklog *.clog # Add libtool shared library version numbers to the HDF5 library # See libtool versioning documentation online. LT_VERS_INTERFACE = 6 -LT_VERS_REVISION = 147 +LT_VERS_REVISION = 148 LT_VERS_AGE = 0 # Include src directory in both Fortran and C flags (C compiler is used diff --git a/hl/c++/src/Makefile.in b/hl/c++/src/Makefile.in index e188d96..2053fcf 100644 --- a/hl/c++/src/Makefile.in +++ b/hl/c++/src/Makefile.in @@ -458,7 +458,7 @@ CHECK_CLEANFILES = *.chkexe *.chklog *.clog # Add libtool shared library version numbers to the HDF5 library # See libtool versioning documentation online. LT_VERS_INTERFACE = 6 -LT_VERS_REVISION = 147 +LT_VERS_REVISION = 148 LT_VERS_AGE = 0 # Include src directory diff --git a/hl/fortran/src/Makefile.in b/hl/fortran/src/Makefile.in index a1b949a..7db954a 100644 --- a/hl/fortran/src/Makefile.in +++ b/hl/fortran/src/Makefile.in @@ -474,7 +474,7 @@ CHECK_CLEANFILES = *.chkexe *.chklog *.clog # Add libtool shared library version numbers to the HDF5 library # See libtool versioning documentation online. LT_VERS_INTERFACE = 6 -LT_VERS_REVISION = 147 +LT_VERS_REVISION = 148 LT_VERS_AGE = 0 INCLUDES = -I$(top_srcdir)/src -I$(top_srcdir)/hl/src -I$(top_builddir)/hl/src \ -I$(top_srcdir)/fortran/src -I$(top_builddir)/fortran/src diff --git a/hl/src/Makefile.in b/hl/src/Makefile.in index 99409e7..5de221a 100644 --- a/hl/src/Makefile.in +++ b/hl/src/Makefile.in @@ -457,7 +457,7 @@ CHECK_CLEANFILES = *.chkexe *.chklog *.clog # Add libtool shared library version numbers to the HDF5 library # See libtool versioning documentation online. LT_VERS_INTERFACE = 6 -LT_VERS_REVISION = 147 +LT_VERS_REVISION = 148 LT_VERS_AGE = 0 # This library is our main target. diff --git a/release_docs/RELEASE.txt b/release_docs/RELEASE.txt index ed608ba..62e94d5 100644 --- a/release_docs/RELEASE.txt +++ b/release_docs/RELEASE.txt @@ -1,4 +1,4 @@ -HDF5 version 1.9.157 currently under development +HDF5 version 1.9.158 currently under development ================================================================================ diff --git a/src/H5public.h b/src/H5public.h index 63c7f1f..eb37b34 100644 --- a/src/H5public.h +++ b/src/H5public.h @@ -75,10 +75,10 @@ extern "C" { /* Version numbers */ #define H5_VERS_MAJOR 1 /* For major interface/format changes */ #define H5_VERS_MINOR 9 /* For minor interface/format changes */ -#define H5_VERS_RELEASE 157 /* For tweaks, bug-fixes, or development */ +#define H5_VERS_RELEASE 158 /* For tweaks, bug-fixes, or development */ #define H5_VERS_SUBRELEASE "" /* For pre-releases like snap0 */ /* Empty string for real releases. */ -#define H5_VERS_INFO "HDF5 library version: 1.9.157" /* Full version string */ +#define H5_VERS_INFO "HDF5 library version: 1.9.158" /* Full version string */ #define H5check() H5check_version(H5_VERS_MAJOR,H5_VERS_MINOR, \ H5_VERS_RELEASE) diff --git a/src/Makefile.in b/src/Makefile.in index f47e1c0..88d7f02 100644 --- a/src/Makefile.in +++ b/src/Makefile.in @@ -522,7 +522,7 @@ CHECK_CLEANFILES = *.chkexe *.chklog *.clog # Add libtool shared library version numbers to the HDF5 library # See libtool versioning documentation online. LT_VERS_INTERFACE = 6 -LT_VERS_REVISION = 147 +LT_VERS_REVISION = 148 LT_VERS_AGE = 0 H5detect_CFLAGS = -g $(AM_CFLAGS) diff --git a/vms/src/h5pubconf.h b/vms/src/h5pubconf.h index 6e35eac..853dab5 100644 --- a/vms/src/h5pubconf.h +++ b/vms/src/h5pubconf.h @@ -511,7 +511,7 @@ #define H5_PACKAGE_NAME "HDF5" /* Define to the full name and version of this package. */ -#define H5_PACKAGE_STRING "HDF5 1.9.157" +#define H5_PACKAGE_STRING "HDF5 1.9.158" /* Define to the one symbol short name of this package. */ #define H5_PACKAGE_TARNAME "hdf5" @@ -520,7 +520,7 @@ #define H5_PACKAGE_URL "" /* Define to the version of this package. */ -#define H5_PACKAGE_VERSION "1.9.157" +#define H5_PACKAGE_VERSION "1.9.158" /* Width for printf() for type `long long' or `__int64', use `ll' */ #define H5_PRINTF_LL_WIDTH "ll" @@ -683,7 +683,7 @@ /* #undef H5_USING_MEMCHECKER */ /* Version number of package */ -#define H5_VERSION "1.9.157" +#define H5_VERSION "1.9.158" /* Define if vsnprintf() returns the correct value for formatted strings that don't fit into size allowed */ -- cgit v0.12 From 7cdea30a3a7d28c90fd0634a0a0ed9ebf8b0b7f8 Mon Sep 17 00:00:00 2001 From: Allen Byrne Date: Mon, 8 Jul 2013 11:28:48 -0500 Subject: [svn-r23870] Correct name of file reference --- release_docs/USING_HDF5_VS.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/release_docs/USING_HDF5_VS.txt b/release_docs/USING_HDF5_VS.txt index bbfc501..b817f7e 100644 --- a/release_docs/USING_HDF5_VS.txt +++ b/release_docs/USING_HDF5_VS.txt @@ -7,7 +7,7 @@ These suggestions are for Visual Studio users. Instructions for building and testing HDF5 applications using CMake can -be found in the USING_CMake.txt file found in this folder. +be found in the USING_HDF5_CMake.txt file found in this folder. The following two sections are helpful if you do not use CMake to build your applications. -- cgit v0.12 From 2efbc227cdf2b8e24efab6c180e429f442e95f2d Mon Sep 17 00:00:00 2001 From: Allen Byrne Date: Tue, 9 Jul 2013 08:36:26 -0500 Subject: [svn-r23875] HDFFV-8322: free allocation before throwing exception. Tested: local linux --- c++/src/H5CommonFG.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/c++/src/H5CommonFG.cpp b/c++/src/H5CommonFG.cpp index b3889a0..0651c29 100644 --- a/c++/src/H5CommonFG.cpp +++ b/c++/src/H5CommonFG.cpp @@ -568,8 +568,10 @@ H5std_string CommonFG::getComment( const char* name, size_t bufsize ) const // if H5Oget_comment_by_name returns SUCCEED, return the string comment, // otherwise, throw an exception - if( ret_value < 0 ) - throwException("getComment", "H5Oget_comment_by_name failed"); + if( ret_value < 0 ) { + delete []comment_C; + throwException("getComment", "H5Oget_comment_by_name failed"); + } H5std_string comment = H5std_string(comment_C); delete []comment_C; -- cgit v0.12 From 70de2942b2ea6bf42824828faae5fe7b3c7f3296 Mon Sep 17 00:00:00 2001 From: Neil Fortner Date: Tue, 9 Jul 2013 14:58:35 -0500 Subject: [svn-r23879] Add note to RELEASE.txt for r23859 Tested: kate --- release_docs/RELEASE.txt | 2 ++ 1 file changed, 2 insertions(+) diff --git a/release_docs/RELEASE.txt b/release_docs/RELEASE.txt index 62e94d5..f0bfd45 100644 --- a/release_docs/RELEASE.txt +++ b/release_docs/RELEASE.txt @@ -418,6 +418,8 @@ Bug Fixes since HDF5-1.8.0 release Library ------- + - Added const qualifier to source buffer parameters in H5Dgather and + H5D_scatter_func_t (H5Dscatter callback). (NAF - 2013/7/02) - Fixed an error involving failure to write fill values to the user's buffer when reading unallocated chunks from datasets that have a fill value set to H5D_FILL_VALUE_DEFAULT. A consequence of this -- cgit v0.12 From e266d672e7e2ddbe33d08869a09ce5cc22356ac7 Mon Sep 17 00:00:00 2001 From: Allen Byrne Date: Tue, 9 Jul 2013 15:44:24 -0500 Subject: [svn-r23880] Update Windows and VMs for next release --- release_docs/RELEASE.txt | 66 +++++++++++++++++++++++++++--------------------- 1 file changed, 37 insertions(+), 29 deletions(-) diff --git a/release_docs/RELEASE.txt b/release_docs/RELEASE.txt index f0bfd45..ae157a2 100644 --- a/release_docs/RELEASE.txt +++ b/release_docs/RELEASE.txt @@ -1156,19 +1156,20 @@ Supported Platforms (emu) Sun Fortran 95 8.6 SunOS_sparc Sun C++ 5.12 SunOS_sparc - Windows XP Visual Studio 2008 w/ Intel Fortran 10.1 (project files) - - Windows XP x64 Visual Studio 2008 w/ Intel Fortran 10.1 (project files) - - Windows 7 Visual Studio 2008 w/ Intel Fortran 11.1 (cmake) + Windows 7 Visual Studio 2008 w/ Intel Fortran 11 (cmake) Visual Studio 2010 w/ Intel Fortran 12 (cmake) + Visual Studio 2012 w/ Intel Fortran 13 (cmake) Cygwin(CYGWIN_NT-6.1 1.7.15(0.260/5/3) gcc(4.5.3) compiler and gfortran) (cmake and autotools) - Windows 7 x64 Visual Studio 2008 w/ Intel Fortran 11.1 (cmake) + Windows 7 x64 Visual Studio 2008 w/ Intel Fortran 11 (cmake) Visual Studio 2010 w/ Intel Fortran 12 (cmake) + Visual Studio 2012 w/ Intel Fortran 13 (cmake) Cygwin(CYGWIN_NT-6.1 1.7.15(0.260/5/3) gcc(4.5.3) compiler and gfortran) (cmake and autotools) + Windows 8 Visual Studio 2012 w/ Intel Fortran 13 (cmake) + + Windows 8 x64 Visual Studio 2012 w/ Intel Fortran 13 (cmake) Mac OS X Snow Leopard 10.6.8 gcc i686-apple-darwin11-llvm-gcc-4.2 (GCC) 4.2.1 from Xcode 3.2.6 Darwin Kernel Version 10.8.0 g++ i686-apple-darwin11-llvm-g++-4.2 (GCC) 4.2.1 from Xcode 3.2.6 @@ -1204,8 +1205,12 @@ Platform C F90/ F90 C++ zlib SZIP parallel F2003 parallel Solaris2.11 32-bit n y/y n y y y Solaris2.11 64-bit n y/n n y y y -Windows 7 y y/n n y y y -Windows 7 x64 y y/n n y y y +Windows 7 y y/y n y y y +Windows 7 x64 y y/y n y y y +Windows 7 Cygwin n y/n n y y y +Windows 7 x64 Cygwin n y/n n y y y +Windows 8 y y/y n y y y +Windows 8 x64 y y/y n y y y Mac OS X Snow Leopard 10.6.8 64-bit n y/y n y y y Mac OS X Lion 10.7.3 32-bit n y/y n y y n Mac OS X Lion 10.7.3 64-bit n y/y n y y y @@ -1226,6 +1231,10 @@ Solaris2.11 32-bit y y y y Solaris2.11 64-bit y y y y Windows 7 y y y y Windows 7 x64 y y y y +Windows 7 Cygwin n n n y +Windows 7 x64 Cygwin n n n y +Windows 8 y y y y +Windows 8 x64 y y y y Mac OS X Snow Leopard 10.6.8 64-bit y n y n Mac OS X Lion 10.7.3 32-bit y n y y Mac OS X Lion 10.7.3 64-bit y n y y @@ -1257,46 +1266,45 @@ The following platforms are not supported but have been tested for this release. g++ 4.6.1 20110422 gfortran 4.6.1 20110422 - Debian6.0.3 2.6.32-5-686 #1 SMP i686 GNU/Linux - gcc (Debian 4.4.5-8) 4.4.5 - GNU Fortran (Debian 4.4.5-8) 4.4.5 + Debian7.1.0 3.2.0-4-386 #1 SMP Debian 3.2.46-1 i386 GNU/Linux + gcc (Debian 4.7.2-5) 4.7.2 + GNU Fortran (Debian 4.7.2-5) 4.7.2 (cmake and autotools) - Debian6.0.3 2.6.32-5-amd64 #1 SMP x86_64 GNU/Linux - gcc (Debian 4.4.5-8) 4.4.5 - GNU Fortran (Debian 4.4.5-8) 4.4.5 + Debian7.1.0 3.2.0-4-amd64 #1 SMP Debian 3.2.46-1 x86_64 GNU/Linux + gcc (Debian 4.7.2-5) 4.7.2 + GNU Fortran (Debian 4.7.2-5) 4.7.2 (cmake and autotools) - Fedora17 3.5.2-1.fc17.i6866 #1 SMP i686 i686 i386 GNU/Linux - gcc (GCC) 4.7.0 20120507 (Red Hat 4.7.0-5) - GNU Fortran (GCC) 4.7.0 20120507 (Red Hat 4.7.0-5) + Fedora19 3.9.9-301.fc19.i6866 #1 SMP i686 i686 i386 GNU/Linux + gcc (GCC) 4.8.1 20130603 (Red Hat 4.8.1-1) + GNU Fortran (GCC) 4.8.1 20130603 (Red Hat 4.8.1-1) (cmake and autotools) - Fedora17 3.5.2-1.fc17.x86_64 #1 SMP x86_64 x86_64 x86_64 GNU/Linux - gcc (GCC) 4.7.0 20120507 (Red Hat 4.7.0-5) - GNU Fortran (GCC) 4.7.0 20120507 (Red Hat 4.7.0-5) + Fedora19 3.9.9-301.fc19.x86_64 #1 SMP x86_64 x86_64 x86_64 GNU/Linux + gcc (GCC) 4.8.1 20130603 (Red Hat 4.8.1-1) + GNU Fortran (GCC) 4.8.1 20130603 (Red Hat 4.8.1-1) (cmake and autotools) - SUSE 12.2 3.4.6-2.10-desktop #1 SMP PREEMPT i686 i686 i386 GNU/Linux + SUSE 12.3 3.4.6-2.10-desktop #1 SMP PREEMPT i686 i686 i386 GNU/Linux gcc (SUSE Linux) 4.7.1 GNU Fortran (SUSE Linux) 4.7.1 (cmake and autotools) - SUSE 12.2 3.4.6-2.10-desktop #1 SMP PREEMPT x86_64 x86_64 x86_64 GNU/Linux + SUSE 12.3 3.4.6-2.10-desktop #1 SMP PREEMPT x86_64 x86_64 x86_64 GNU/Linux gcc (SUSE Linux) 4.7.1 GNU Fortran (SUSE Linux) 4.7.1 (cmake and autotools) - Ubuntu 12.04 3.2.0-29-generic #46-Ubuntu SMP i686 GNU/Linux - gcc (Ubuntu/Linaro 4.6.3-1ubuntu5) 4.6.3 - GNU Fortran (Ubuntu/Linaro 4.6.3-1ubuntu5) 4.6.3 + Ubuntu 13.04 3.8.0-26-generic #38-Ubuntu SMP i686 GNU/Linux + gcc (Ubuntu/Linaro 4.7.3-1ubuntu1) 4.7.3 + GNU Fortran (Ubuntu/Linaro 4.6.3-1ubuntu1) 4.7.3 (cmake and autotools) - Ubuntu 12.04 3.2.0-29-generic #46-Ubuntu SMP x86_64 GNU/Linux - gcc (Ubuntu/Linaro 4.6.3-1ubuntu5) 4.6.3 - GNU Fortran (Ubuntu/Linaro 4.6.3-1ubuntu5) 4.6.3 + Ubuntu 13.04 3.8.0-26-generic #38-Ubuntu SMP x86_64 GNU/Linux + gcc (Ubuntu/Linaro 4.7.3-1ubuntu1) 4.7.3 + GNU Fortran (Ubuntu/Linaro 4.7.3-1ubuntu1) 4.7.3 (cmake and autotools) - (Use optimization level -O1) Cray Linux Environment (CLE) PrgEnv-pgi/4.0.46 hopper.nersc.gov pgcc 12.5-0 64-bit target on x86-64 Linux -tp shanghai -- cgit v0.12 From 5c1ee8c836a054beef717e2f61ed5e2d59a4d8ff Mon Sep 17 00:00:00 2001 From: Allen Byrne Date: Tue, 9 Jul 2013 15:47:16 -0500 Subject: [svn-r23882] Correct typo --- release_docs/RELEASE.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/release_docs/RELEASE.txt b/release_docs/RELEASE.txt index ae157a2..3d1916e 100644 --- a/release_docs/RELEASE.txt +++ b/release_docs/RELEASE.txt @@ -1266,7 +1266,7 @@ The following platforms are not supported but have been tested for this release. g++ 4.6.1 20110422 gfortran 4.6.1 20110422 - Debian7.1.0 3.2.0-4-386 #1 SMP Debian 3.2.46-1 i386 GNU/Linux + Debian7.1.0 3.2.0-4-686 #1 SMP Debian 3.2.46-1 i686 GNU/Linux gcc (Debian 4.7.2-5) 4.7.2 GNU Fortran (Debian 4.7.2-5) 4.7.2 (cmake and autotools) -- cgit v0.12 From ba44b1ae0835f9f52eaa8a31e5d55ef04638217e Mon Sep 17 00:00:00 2001 From: Frank Baker Date: Tue, 9 Jul 2013 16:00:53 -0500 Subject: [svn-r23883] Description: Add comment referring users to information regarding SZIP copyright and license terms. -- Addresses HDFFV-300. --- COPYING | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/COPYING b/COPYING index 25e79e7..faa7122 100644 --- a/COPYING +++ b/COPYING @@ -87,6 +87,12 @@ and/or accompanying materials: opinions of authors expressed herein do not necessarily state or reflect those of the United States Government or the University of California, and shall not be used for advertising or product endorsement purposes. + ----------------------------------------------------------------------------- +HDF5 is available with the SZIP compression library but SZIP is not part +of HDF5 and has separate copyright and license terms. See “Szip Compression +in HDF Products” (www.hdfgroup.org/doc_resource/SZIP/) for further details. + +----------------------------------------------------------------------------- -- cgit v0.12 From 25fe312b3c500689b92cb232464d7f4801a6ba44 Mon Sep 17 00:00:00 2001 From: Quincey Koziol Date: Thu, 11 Jul 2013 17:33:35 -0500 Subject: [svn-r23889] Description: Merge changes from Coverity branch to trunk: r20768: Switch to snprintf, HDstrncat, HDstrncpy to address coverity issue 832. r20812: Use HDstrncpy. --gh Tested on: Mac OSX/64 10.8.4 (amazon) w/debug Linux/32 2.4 (jam) w/debug --- src/H5Opline.c | 13 ++--- src/H5system.c | 153 +++++++++++++++++++++++++++++++++++---------------------- 2 files changed, 98 insertions(+), 68 deletions(-) diff --git a/src/H5Opline.c b/src/H5Opline.c index 1a2baa0..0a0f12a 100644 --- a/src/H5Opline.c +++ b/src/H5Opline.c @@ -183,7 +183,7 @@ H5O_pline_decode(H5F_t UNUSED *f, hid_t UNUSED dxpl_id, H5O_t UNUSED *open_oh, else filter->name = filter->_name; - HDstrcpy(filter->name, (const char *)p); + HDstrncpy(filter->name, (const char *)p, actual_name_length); p += name_length; } /* end if */ @@ -375,12 +375,9 @@ H5O_pline_copy(const void *_src, void *_dst/*out*/) /* Allocate space for the filter name, or use the internal buffer */ if(namelen > H5Z_COMMON_NAME_LEN) { - dst->filter[i].name = (char *)H5MM_malloc(namelen); + dst->filter[i].name = (char *)H5MM_strdup(src->filter[i].name); if(NULL == dst->filter[i].name) HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed for filter name") - - /* Copy name */ - HDstrcpy(dst->filter[i].name, src->filter[i].name); } /* end if */ else dst->filter[i].name = dst->filter[i]._name; @@ -464,7 +461,7 @@ H5O_pline_size(const H5F_t UNUSED *f, const void *mesg) } /* end else */ ret_value += 2 + /*filter identification number */ - ((pline->version == H5O_PLINE_VERSION_1 || pline->filter[i].id >= H5Z_FILTER_RESERVED) ? 2 : 0) + /*name length */ + (size_t)((pline->version == H5O_PLINE_VERSION_1 || pline->filter[i].id >= H5Z_FILTER_RESERVED) ? 2 : 0) + /*name length */ 2 + /*flags */ 2 + /*number of client data values */ (pline->version == H5O_PLINE_VERSION_1 ? (size_t)H5O_ALIGN_OLD(name_len) : name_len); /*length of the filter name */ @@ -633,7 +630,7 @@ H5O_pline_debug(H5F_t UNUSED *f, hid_t UNUSED dxpl_id, const void *mesg, FILE *s for(i = 0; i < pline->nused; i++) { char name[32]; - sprintf(name, "Filter at position %u", (unsigned)i); + HDsnprintf(name, sizeof(name), "Filter at position %u", (unsigned)i); HDfprintf(stream, "%*s%-*s\n", indent, "", fwidth, name); HDfprintf(stream, "%*s%-*s 0x%04x\n", indent + 3, "", MAX(0, fwidth - 3), "Filter identification:", @@ -656,7 +653,7 @@ H5O_pline_debug(H5F_t UNUSED *f, hid_t UNUSED dxpl_id, const void *mesg, FILE *s for(j = 0; j < pline->filter[i].cd_nelmts; j++) { char field_name[32]; - sprintf(field_name, "CD value %lu", (unsigned long)j); + HDsnprintf(field_name, sizeof(field_name), "CD value %lu", (unsigned long)j); HDfprintf(stream, "%*s%-*s %u\n", indent + 6, "", MAX(0, fwidth - 6), field_name, pline->filter[i].cd_values[j]); diff --git a/src/H5system.c b/src/H5system.c index 2a94028..4280066 100644 --- a/src/H5system.c +++ b/src/H5system.c @@ -114,6 +114,7 @@ HDfprintf(FILE *stream, const char *fmt, ...) char modifier[8]; int conv; char *rest, format_templ[128]; + int len; const char *s; va_list ap; @@ -138,7 +139,7 @@ HDfprintf(FILE *stream, const char *fmt, ...) s = fmt + 1; /* Flags */ - while(HDstrchr ("-+ #", *s)) { + while(HDstrchr("-+ #", *s)) { switch(*s) { case '-': leftjust = 1; @@ -155,6 +156,9 @@ HDfprintf(FILE *stream, const char *fmt, ...) case '#': prefix = 1; break; + + default: + HDassert(0 && "Unknown format flag"); } /* end switch */ /*lint !e744 Switch statement doesn't _need_ default */ s++; } /* end while */ @@ -243,16 +247,17 @@ HDfprintf(FILE *stream, const char *fmt, ...) conv = *s++; /* Create the format template */ - sprintf(format_templ, "%%%s%s%s%s%s", (leftjust ? "-" : ""), + len = 0; + len += HDsnprintf(format_templ, (sizeof(format_templ) - (size_t)(len + 1)), "%%%s%s%s%s%s", (leftjust ? "-" : ""), (plussign ? "+" : ""), (ldspace ? " " : ""), (prefix ? "#" : ""), (zerofill ? "0" : "")); if(fwidth > 0) - sprintf(format_templ+HDstrlen(format_templ), "%d", fwidth); + len += HDsnprintf(format_templ + len, (sizeof(format_templ) - (size_t)(len + 1)), "%d", fwidth); if(prec > 0) - sprintf(format_templ+HDstrlen(format_templ), ".%d", prec); + len += HDsnprintf(format_templ + len, (sizeof(format_templ) - (size_t)(len + 1)), ".%d", prec); if(*modifier) - sprintf(format_templ+HDstrlen(format_templ), "%s", modifier); - sprintf (format_templ+HDstrlen(format_templ), "%c", conv); + len += HDsnprintf(format_templ + len, (sizeof(format_templ) - (size_t)(len + 1)), "%s", modifier); + HDsnprintf(format_templ + len, (sizeof(format_templ) - (size_t)(len + 1)), "%c", conv); /* Conversion */ @@ -324,31 +329,42 @@ HDfprintf(FILE *stream, const char *fmt, ...) haddr_t x = va_arg (ap, haddr_t); /*lint !e732 Loss of sign not really occuring */ if(H5F_addr_defined(x)) { - sprintf(format_templ, "%%%s%s%s%s%s", + len = 0; + len += HDsnprintf(format_templ, (sizeof(format_templ) - (size_t)(len + 1)), "%%%s%s%s%s%s", (leftjust ? "-" : ""), (plussign ? "+" : ""), (ldspace ? " " : ""), (prefix ? "#" : ""), (zerofill ? "0" : "")); if(fwidth > 0) - sprintf(format_templ + HDstrlen(format_templ), "%d", fwidth); + len += HDsnprintf(format_templ + len, (sizeof(format_templ) - (size_t)(len + 1)), "%d", fwidth); /*lint --e{506} Don't issue warnings about constant value booleans */ /*lint --e{774} Don't issue warnings boolean within 'if' always evaluates false/true */ - if(sizeof(x) == H5_SIZEOF_INT) - HDstrcat(format_templ, "u"); - else if(sizeof(x) == H5_SIZEOF_LONG) - HDstrcat(format_templ, "lu"); + if(sizeof(x) == H5_SIZEOF_INT) { + HDstrncat(format_templ, "u", (sizeof(format_templ) - (size_t)(len + 1))); + len++; + } /* end if */ + else if(sizeof(x) == H5_SIZEOF_LONG) { + HDstrncat(format_templ, "lu", (sizeof(format_templ) - (size_t)(len + 1))); + len++; + } /* end if */ else if(sizeof(x) == H5_SIZEOF_LONG_LONG) { - HDstrcat(format_templ, H5_PRINTF_LL_WIDTH); - HDstrcat(format_templ, "u"); + HDstrncat(format_templ, H5_PRINTF_LL_WIDTH, (sizeof(format_templ) - (size_t)(len + 1))); + len += (int)sizeof(H5_PRINTF_LL_WIDTH); + HDstrncat(format_templ, "u", (sizeof(format_templ) - (size_t)(len + 1))); + len++; } n = fprintf(stream, format_templ, x); } else { - HDstrcpy(format_templ, "%"); - if(leftjust) - HDstrcat(format_templ, "-"); + len = 0; + HDstrncpy(format_templ, "%", (sizeof(format_templ) - (size_t)(len + 1))); + len++; + if(leftjust) { + HDstrncat(format_templ, "-", (sizeof(format_templ) - (size_t)(len + 1))); + len++; + } /* end if */ if(fwidth) - sprintf(format_templ+HDstrlen(format_templ), "%d", fwidth); - HDstrcat(format_templ, "s"); + len += HDsnprintf(format_templ + len, (sizeof(format_templ) - (size_t)(len + 1)), "%d", fwidth); + HDstrncat(format_templ, "s", (sizeof(format_templ) - (size_t)(len + 1))); fprintf(stream, format_templ, "UNDEF"); } } @@ -457,8 +473,9 @@ HDstrtoll(const char *s, const char **rest, int base) errno = 0; if (!s || (base && (base<2 || base>36))) { - if (rest) *rest = s; - return 0; + if (rest) + *rest = s; + return 0; } /* Skip white space */ @@ -466,21 +483,21 @@ HDstrtoll(const char *s, const char **rest, int base) /* Optional minus or plus sign */ if ('+'==*s) { - s++; + s++; } else if ('-'==*s) { - sign = -1; - s++; + sign = -1; + s++; } /* Zero base prefix */ if (0==base && '0'==*s && ('x'==s[1] || 'X'==s[1])) { - base = 16; - s += 2; + base = 16; + s += 2; } else if (0==base && '0'==*s) { - base = 8; - s++; + base = 8; + s++; } else if (0==base) { - base = 10; + base = 10; } /* Digits */ @@ -488,34 +505,39 @@ HDstrtoll(const char *s, const char **rest, int base) (base>10 && ((*s>='0' && *s<='9') || (*s>='a' && *s<'a'+base-10) || (*s>='A' && *s<'A'+base-10)))) { - if (!overflow) { - int64_t digit = 0; - if (*s>='0' && *s<='9') digit = *s - '0'; - else if (*s>='a' && *s<='z') digit = (*s-'a')+10; - else digit = (*s-'A')+10; - - if (acc*base+digit < acc) { - overflow = TRUE; - } else { - acc = acc*base + digit; - } - } - s++; + if (!overflow) { + int64_t digit = 0; + + if (*s>='0' && *s<='9') + digit = *s - '0'; + else if (*s>='a' && *s<='z') + digit = (*s-'a')+10; + else + digit = (*s-'A')+10; + + if (acc*base+digit < acc) { + overflow = TRUE; + } else { + acc = acc*base + digit; + } + } + s++; } /* Overflow */ if (overflow) { - if (sign>0) { - acc = ((uint64_t)1<<(8*sizeof(int64_t)-1))-1; - } else { - acc = (int64_t)((uint64_t)1<<(8*sizeof(int64_t)-1)); - } - errno = ERANGE; + if (sign>0) { + acc = ((uint64_t)1<<(8*sizeof(int64_t)-1))-1; + } else { + acc = (int64_t)((uint64_t)1<<(8*sizeof(int64_t)-1)); + } + errno = ERANGE; } /* Return values */ acc *= sign; - if (rest) *rest = s; + if (rest) + *rest = s; return acc; } /* end HDstrtoll() */ @@ -576,12 +598,13 @@ int HDremove_all(const char *fname) { int ret_value = -1; + size_t fname_len; char *_fname; - _fname = (char *)H5MM_malloc(HDstrlen(fname) + 3); /* to accomodate ;* and null */ + fname_len = HDstrlen(fname) + 3; /* to accomodate ";*" and null terminator */ + _fname = (char *)H5MM_malloc(fname_len); if(_fname) { - HDstrcpy(_fname, fname); - HDstrcat(_fname,";*"); + HDsnprintf(_fname, fname_len, "%s;*", fname); /* Do not use HDremove; function becomes recursive (see H5private.h file)*/ remove(_fname); H5MM_xfree(_fname); @@ -723,6 +746,10 @@ H5_build_extpath(const char *name, char **extpath/*out*/) FUNC_ENTER_NOAPI_NOINIT + /* Sanity check */ + HDassert(name); + HDassert(extpath); + /* Clear external path pointer to begin with */ *extpath = NULL; @@ -738,11 +765,13 @@ H5_build_extpath(const char *name, char **extpath/*out*/) } /* end if */ else { /* relative pathname */ char *retcwd; + size_t name_len; int drive; if(NULL == (cwdpath = (char *)H5MM_malloc(MAX_PATH_LEN))) HGOTO_ERROR(H5E_INTERNAL, H5E_NOSPACE, FAIL, "memory allocation failed") - if(NULL == (new_name = (char *)H5MM_strdup(name))) + name_len = HDstrlen(name) + 1; + if(NULL == (new_name = (char *)H5MM_malloc(name_len))) HGOTO_ERROR(H5E_INTERNAL, H5E_NOSPACE, FAIL, "memory allocation failed") /* @@ -754,7 +783,7 @@ H5_build_extpath(const char *name, char **extpath/*out*/) if(H5_CHECK_ABS_DRIVE(name)) { drive = name[0] - 'A' + 1; retcwd = HDgetdcwd(drive, cwdpath, MAX_PATH_LEN); - HDstrcpy(new_name, &name[2]); + HDstrncpy(new_name, &name[2], name_len); } /* end if */ /* * Windows: name[0] is a '/' or '\' @@ -763,20 +792,24 @@ H5_build_extpath(const char *name, char **extpath/*out*/) * OpenVMS: does not apply */ else if(H5_CHECK_ABS_PATH(name) && (0 != (drive = HDgetdrive()))) { - sprintf(cwdpath, "%c:%c", (drive+'A'-1), name[0]); + HDsnprintf(cwdpath, MAX_PATH_LEN, "%c:%c", (drive + 'A' - 1), name[0]); retcwd = cwdpath; - HDstrcpy(new_name, &name[1]); + HDstrncpy(new_name, &name[1], name_len); } /* totally relative for Unix, Windows, and OpenVMS: get current working directory */ - else + else { retcwd = HDgetcwd(cwdpath, MAX_PATH_LEN); + HDstrncpy(new_name, name, name_len); + } /* end if */ if(retcwd != NULL) { size_t cwdlen; size_t path_len; + HDassert(cwdpath); cwdlen = HDstrlen(cwdpath); HDassert(cwdlen); + HDassert(new_name); path_len = cwdlen + HDstrlen(new_name) + 2; if(NULL == (full_path = (char *)H5MM_malloc(path_len))) HGOTO_ERROR(H5E_INTERNAL, H5E_NOSPACE, FAIL, "memory allocation failed") @@ -793,7 +826,7 @@ H5_build_extpath(const char *name, char **extpath/*out*/) char *tmp = new_name; full_path[cwdlen - 1] = '\0'; - HDstrcat(full_path, ++tmp); + HDstrncat(full_path, ++tmp, HDstrlen(tmp)); } /* end if */ else HDstrncat(full_path, new_name, HDstrlen(new_name)); @@ -818,9 +851,9 @@ H5_build_extpath(const char *name, char **extpath/*out*/) done: /* Release resources */ if(cwdpath) - H5MM_xfree(cwdpath); + H5MM_xfree(cwdpath); if(new_name) - H5MM_xfree(new_name); + H5MM_xfree(new_name); FUNC_LEAVE_NOAPI(ret_value) } /* H5_build_extpath() */ -- cgit v0.12 From 4e12ec74aecab5b03a3d16db1d6fe922dcf22ce6 Mon Sep 17 00:00:00 2001 From: HDF Tester Date: Sun, 14 Jul 2013 03:31:23 -0500 Subject: [svn-r23895] Snapshot version 1.9 release 158 --- README.txt | 2 +- c++/src/Makefile.in | 2 +- config/lt_vers.am | 2 +- configure | 22 +++++++++++----------- configure.ac | 2 +- fortran/src/Makefile.in | 2 +- hl/c++/src/Makefile.in | 2 +- hl/fortran/src/Makefile.in | 2 +- hl/src/Makefile.in | 2 +- release_docs/RELEASE.txt | 2 +- src/H5public.h | 4 ++-- src/Makefile.in | 2 +- vms/src/h5pubconf.h | 6 +++--- 13 files changed, 26 insertions(+), 26 deletions(-) diff --git a/README.txt b/README.txt index a75e1f5..d9b23cb 100644 --- a/README.txt +++ b/README.txt @@ -1,4 +1,4 @@ -HDF5 version 1.9.158 currently under development +HDF5 version 1.9.159 currently under development Please refer to the release_docs/INSTALL file for installation instructions. ------------------------------------------------------------------------------ diff --git a/c++/src/Makefile.in b/c++/src/Makefile.in index f726017..48a7385 100644 --- a/c++/src/Makefile.in +++ b/c++/src/Makefile.in @@ -467,7 +467,7 @@ CHECK_CLEANFILES = *.chkexe *.chklog *.clog # Add libtool shared library version numbers to the HDF5 library # See libtool versioning documentation online. LT_VERS_INTERFACE = 6 -LT_VERS_REVISION = 148 +LT_VERS_REVISION = 149 LT_VERS_AGE = 0 # Include src directory diff --git a/config/lt_vers.am b/config/lt_vers.am index 27a13e0..4e17bbe 100644 --- a/config/lt_vers.am +++ b/config/lt_vers.am @@ -17,7 +17,7 @@ # Add libtool shared library version numbers to the HDF5 library # See libtool versioning documentation online. LT_VERS_INTERFACE = 6 -LT_VERS_REVISION = 148 +LT_VERS_REVISION = 149 LT_VERS_AGE = 0 ## If the API changes *at all*, increment LT_VERS_INTERFACE and diff --git a/configure b/configure index c8f49b4..9c3bf5f 100755 --- a/configure +++ b/configure @@ -1,7 +1,7 @@ #! /bin/sh # From configure.ac Id: configure.ac 22697 2012-08-19 14:35:47Z hdftest . # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.69 for HDF5 1.9.158. +# Generated by GNU Autoconf 2.69 for HDF5 1.9.159. # # Report bugs to . # @@ -591,8 +591,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='HDF5' PACKAGE_TARNAME='hdf5' -PACKAGE_VERSION='1.9.158' -PACKAGE_STRING='HDF5 1.9.158' +PACKAGE_VERSION='1.9.159' +PACKAGE_STRING='HDF5 1.9.159' PACKAGE_BUGREPORT='help@hdfgroup.org' PACKAGE_URL='' @@ -1486,7 +1486,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures HDF5 1.9.158 to adapt to many kinds of systems. +\`configure' configures HDF5 1.9.159 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1556,7 +1556,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of HDF5 1.9.158:";; + short | recursive ) echo "Configuration of HDF5 1.9.159:";; esac cat <<\_ACEOF @@ -1752,7 +1752,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -HDF5 configure 1.9.158 +HDF5 configure 1.9.159 generated by GNU Autoconf 2.69 Copyright (C) 2012 Free Software Foundation, Inc. @@ -2846,7 +2846,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by HDF5 $as_me 1.9.158, which was +It was created by HDF5 $as_me 1.9.159, which was generated by GNU Autoconf 2.69. Invocation command line was $ $0 $@ @@ -3678,7 +3678,7 @@ fi # Define the identity of the package. PACKAGE='hdf5' - VERSION='1.9.158' + VERSION='1.9.159' cat >>confdefs.h <<_ACEOF @@ -31632,7 +31632,7 @@ Usage: $0 [OPTIONS] Report bugs to ." lt_cl_version="\ -HDF5 config.lt 1.9.158 +HDF5 config.lt 1.9.159 configured by $0, generated by GNU Autoconf 2.69. Copyright (C) 2011 Free Software Foundation, Inc. @@ -33762,7 +33762,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by HDF5 $as_me 1.9.158, which was +This file was extended by HDF5 $as_me 1.9.159, which was generated by GNU Autoconf 2.69. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -33828,7 +33828,7 @@ _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ -HDF5 config.status 1.9.158 +HDF5 config.status 1.9.159 configured by $0, generated by GNU Autoconf 2.69, with options \\"\$ac_cs_config\\" diff --git a/configure.ac b/configure.ac index cc57775..45875ae 100644 --- a/configure.ac +++ b/configure.ac @@ -26,7 +26,7 @@ AC_PREREQ([2.69]) ## NOTE: Do not forget to change the version number here when we do a ## release!!! ## -AC_INIT([HDF5], [1.9.158], [help@hdfgroup.org]) +AC_INIT([HDF5], [1.9.159], [help@hdfgroup.org]) AC_CONFIG_SRCDIR([src/H5.c]) AC_CONFIG_HEADER([src/H5config.h]) diff --git a/fortran/src/Makefile.in b/fortran/src/Makefile.in index cbacd68..6051fc0 100644 --- a/fortran/src/Makefile.in +++ b/fortran/src/Makefile.in @@ -518,7 +518,7 @@ CHECK_CLEANFILES = *.chkexe *.chklog *.clog # Add libtool shared library version numbers to the HDF5 library # See libtool versioning documentation online. LT_VERS_INTERFACE = 6 -LT_VERS_REVISION = 148 +LT_VERS_REVISION = 149 LT_VERS_AGE = 0 # Include src directory in both Fortran and C flags (C compiler is used diff --git a/hl/c++/src/Makefile.in b/hl/c++/src/Makefile.in index 2053fcf..9b8b14e 100644 --- a/hl/c++/src/Makefile.in +++ b/hl/c++/src/Makefile.in @@ -458,7 +458,7 @@ CHECK_CLEANFILES = *.chkexe *.chklog *.clog # Add libtool shared library version numbers to the HDF5 library # See libtool versioning documentation online. LT_VERS_INTERFACE = 6 -LT_VERS_REVISION = 148 +LT_VERS_REVISION = 149 LT_VERS_AGE = 0 # Include src directory diff --git a/hl/fortran/src/Makefile.in b/hl/fortran/src/Makefile.in index 7db954a..36fcee8 100644 --- a/hl/fortran/src/Makefile.in +++ b/hl/fortran/src/Makefile.in @@ -474,7 +474,7 @@ CHECK_CLEANFILES = *.chkexe *.chklog *.clog # Add libtool shared library version numbers to the HDF5 library # See libtool versioning documentation online. LT_VERS_INTERFACE = 6 -LT_VERS_REVISION = 148 +LT_VERS_REVISION = 149 LT_VERS_AGE = 0 INCLUDES = -I$(top_srcdir)/src -I$(top_srcdir)/hl/src -I$(top_builddir)/hl/src \ -I$(top_srcdir)/fortran/src -I$(top_builddir)/fortran/src diff --git a/hl/src/Makefile.in b/hl/src/Makefile.in index 5de221a..b1bec13 100644 --- a/hl/src/Makefile.in +++ b/hl/src/Makefile.in @@ -457,7 +457,7 @@ CHECK_CLEANFILES = *.chkexe *.chklog *.clog # Add libtool shared library version numbers to the HDF5 library # See libtool versioning documentation online. LT_VERS_INTERFACE = 6 -LT_VERS_REVISION = 148 +LT_VERS_REVISION = 149 LT_VERS_AGE = 0 # This library is our main target. diff --git a/release_docs/RELEASE.txt b/release_docs/RELEASE.txt index 3d1916e..bf60ab4 100644 --- a/release_docs/RELEASE.txt +++ b/release_docs/RELEASE.txt @@ -1,4 +1,4 @@ -HDF5 version 1.9.158 currently under development +HDF5 version 1.9.159 currently under development ================================================================================ diff --git a/src/H5public.h b/src/H5public.h index eb37b34..c465962 100644 --- a/src/H5public.h +++ b/src/H5public.h @@ -75,10 +75,10 @@ extern "C" { /* Version numbers */ #define H5_VERS_MAJOR 1 /* For major interface/format changes */ #define H5_VERS_MINOR 9 /* For minor interface/format changes */ -#define H5_VERS_RELEASE 158 /* For tweaks, bug-fixes, or development */ +#define H5_VERS_RELEASE 159 /* For tweaks, bug-fixes, or development */ #define H5_VERS_SUBRELEASE "" /* For pre-releases like snap0 */ /* Empty string for real releases. */ -#define H5_VERS_INFO "HDF5 library version: 1.9.158" /* Full version string */ +#define H5_VERS_INFO "HDF5 library version: 1.9.159" /* Full version string */ #define H5check() H5check_version(H5_VERS_MAJOR,H5_VERS_MINOR, \ H5_VERS_RELEASE) diff --git a/src/Makefile.in b/src/Makefile.in index 88d7f02..ef13501 100644 --- a/src/Makefile.in +++ b/src/Makefile.in @@ -522,7 +522,7 @@ CHECK_CLEANFILES = *.chkexe *.chklog *.clog # Add libtool shared library version numbers to the HDF5 library # See libtool versioning documentation online. LT_VERS_INTERFACE = 6 -LT_VERS_REVISION = 148 +LT_VERS_REVISION = 149 LT_VERS_AGE = 0 H5detect_CFLAGS = -g $(AM_CFLAGS) diff --git a/vms/src/h5pubconf.h b/vms/src/h5pubconf.h index 853dab5..3ae0c21 100644 --- a/vms/src/h5pubconf.h +++ b/vms/src/h5pubconf.h @@ -511,7 +511,7 @@ #define H5_PACKAGE_NAME "HDF5" /* Define to the full name and version of this package. */ -#define H5_PACKAGE_STRING "HDF5 1.9.158" +#define H5_PACKAGE_STRING "HDF5 1.9.159" /* Define to the one symbol short name of this package. */ #define H5_PACKAGE_TARNAME "hdf5" @@ -520,7 +520,7 @@ #define H5_PACKAGE_URL "" /* Define to the version of this package. */ -#define H5_PACKAGE_VERSION "1.9.158" +#define H5_PACKAGE_VERSION "1.9.159" /* Width for printf() for type `long long' or `__int64', use `ll' */ #define H5_PRINTF_LL_WIDTH "ll" @@ -683,7 +683,7 @@ /* #undef H5_USING_MEMCHECKER */ /* Version number of package */ -#define H5_VERSION "1.9.158" +#define H5_VERSION "1.9.159" /* Define if vsnprintf() returns the correct value for formatted strings that don't fit into size allowed */ -- cgit v0.12 From 6d4656f116e0b656abc3390b0f972ac8961cc74b Mon Sep 17 00:00:00 2001 From: Allen Byrne Date: Mon, 15 Jul 2013 13:29:49 -0500 Subject: [svn-r23899] Change name to avoid conflicts in WDTP --- CMakeLists.txt | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index b1a7f07..2d8488b 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1110,8 +1110,8 @@ INSTALL ( #----------------------------------------------------------------------------- # Configure the HDF518_Examples.cmake file and the examples #----------------------------------------------------------------------------- -OPTION (HDF5_PACK_EXAMPLES_FILE "Package the HDF5 Library Examples Compressed File" OFF) -IF (HDF5_PACK_EXAMPLES_FILE) +OPTION (HDF5_PACK_EXAMPLES "Package the HDF5 Library Examples Compressed File" OFF) +IF (HDF5_PACK_EXAMPLES) CONFIGURE_FILE ( ${HDF5_RESOURCES_DIR}/HDF518_Examples.cmake.in ${HDF5_BINARY_DIR}/HDF518_Examples.cmake @ONLY @@ -1130,7 +1130,7 @@ IF (HDF5_PACK_EXAMPLES_FILE) COMPONENT hdfdocuments ) ENDIF (EXISTS "${HDF5_EXAMPLES_COMPRESSED_PATH}/${HDF5_EXAMPLES_COMPRESSED_FILE}") -ENDIF (HDF5_PACK_EXAMPLES_FILE) +ENDIF (HDF5_PACK_EXAMPLES) #----------------------------------------------------------------------------- # Add Document File(s) to CMake Install -- cgit v0.12 From 0bdce69c790ca1ea22e434615efa092dd27f42d1 Mon Sep 17 00:00:00 2001 From: Allen Byrne Date: Tue, 16 Jul 2013 08:48:45 -0500 Subject: [svn-r23905] Alter option name to avoid conflict with WDTP --- CMakeLists.txt | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 2d8488b..cb283a3 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1121,15 +1121,15 @@ IF (HDF5_PACK_EXAMPLES) DESTINATION ${HDF5_INSTALL_DATA_DIR} COMPONENT hdfdocuments ) - IF (EXISTS "${HDF5_EXAMPLES_COMPRESSED_PATH}/${HDF5_EXAMPLES_COMPRESSED_FILE}") + IF (EXISTS "${HDF5_EXAMPLES_COMPRESSED_DIR}/${HDF5_EXAMPLES_COMPRESSED}") INSTALL ( FILES - ${HDF5_EXAMPLES_COMPRESSED_PATH}/${HDF5_EXAMPLES_COMPRESSED_FILE} + ${HDF5_EXAMPLES_COMPRESSED_DIR}/${HDF5_EXAMPLES_COMPRESSED} ${HDF5_SOURCE_DIR}/release_docs/USING_CMake_Examples.txt DESTINATION ${HDF5_INSTALL_DATA_DIR} COMPONENT hdfdocuments ) - ENDIF (EXISTS "${HDF5_EXAMPLES_COMPRESSED_PATH}/${HDF5_EXAMPLES_COMPRESSED_FILE}") + ENDIF (EXISTS "${HDF5_EXAMPLES_COMPRESSED_DIR}/${HDF5_EXAMPLES_COMPRESSED}") ENDIF (HDF5_PACK_EXAMPLES) #----------------------------------------------------------------------------- -- cgit v0.12 From 3a316cfc638d104045ca22da0d73b0d7121237bc Mon Sep 17 00:00:00 2001 From: Albert Cheng Date: Thu, 18 Jul 2013 00:12:27 -0500 Subject: [svn-r23917] Bug fix: HDFFV-8392 tools/h5diff/testh5diff.sh is run in every "make check", even after it has passed in the previous run. The error was in the previous change made to Makefile.am when testh5diff.sh.in was created. The mistake was in the SCRIPT_DEPEND=h5diff$(EXEEXT) $(H5PDIFF) $(srcdir)/testh5diff.sh $(srcdir)/testh5diff.sh no longer existed. It is now generated in the current built directory from $(srcdir)/testh5diff.sh.in (which configure takes care of). I updated the dependance to SCRIPT_DEPEND=h5diff$(EXEEXT) $(H5PDIFF) testh5diff.sh and that fixes the error. Reviewed: HDF5-149 Tested: h5committested. --- tools/h5diff/Makefile.am | 2 +- tools/h5diff/Makefile.in | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/h5diff/Makefile.am b/tools/h5diff/Makefile.am index 190c083..05417f5 100644 --- a/tools/h5diff/Makefile.am +++ b/tools/h5diff/Makefile.am @@ -43,7 +43,7 @@ TEST_SCRIPT=testh5diff.sh check_PROGRAMS=$(TEST_PROG) check_SCRIPTS=$(TEST_SCRIPT) $(TEST_SCRIPT_PARA) # The parallel test script testph5diff.sh actually depends on testh5diff.sh. -SCRIPT_DEPEND=h5diff$(EXEEXT) $(H5PDIFF) $(srcdir)/testh5diff.sh +SCRIPT_DEPEND=h5diff$(EXEEXT) $(H5PDIFF) testh5diff.sh # Source files for the program h5diff_SOURCES=h5diff_main.c h5diff_common.c diff --git a/tools/h5diff/Makefile.in b/tools/h5diff/Makefile.in index 5567ceb..9b46f4e 100644 --- a/tools/h5diff/Makefile.in +++ b/tools/h5diff/Makefile.in @@ -456,7 +456,7 @@ TEST_PROG = h5diffgentest TEST_SCRIPT = testh5diff.sh check_SCRIPTS = $(TEST_SCRIPT) $(TEST_SCRIPT_PARA) # The parallel test script testph5diff.sh actually depends on testh5diff.sh. -SCRIPT_DEPEND = h5diff$(EXEEXT) $(H5PDIFF) $(srcdir)/testh5diff.sh +SCRIPT_DEPEND = h5diff$(EXEEXT) $(H5PDIFF) testh5diff.sh # Source files for the program h5diff_SOURCES = h5diff_main.c h5diff_common.c -- cgit v0.12 From 2f8642a903fe17d8b30808f804aced77d5c1788f Mon Sep 17 00:00:00 2001 From: Albert Cheng Date: Fri, 19 Jul 2013 17:10:13 -0500 Subject: [svn-r23925] Updated with fix for HDFFV-8392. Plus some indentation cleanup on other entries. --- release_docs/RELEASE.txt | 73 +++++++++++++++++++++++++----------------------- 1 file changed, 38 insertions(+), 35 deletions(-) diff --git a/release_docs/RELEASE.txt b/release_docs/RELEASE.txt index bf60ab4..a520378 100644 --- a/release_docs/RELEASE.txt +++ b/release_docs/RELEASE.txt @@ -1065,44 +1065,47 @@ Bug Fixes since HDF5-1.8.0 release C++ APIs -------- - - The constructor PropList::PropList(id) was fixed to act properly - according to the nature of 'id'. When 'id' is a property class id, - a new property list will be created. When 'id' id a property list id, - a copy of the property list will be made. (BMR - 2010/5/9) - - The parameters 'size' and 'bufsize' in CommonFG::getLinkval and - CommonFG::getComment, respectively, now have default values for - user's convenience. (BMR - 2009/10/23) - - NULL pointer accessing was fixed, bugzilla 1061. (BMR - 2009/10/05) - - read/write methods of DataSet and Attribute classes were fixed - to handle string correctly. (BMR - 2009/07/26) - - Fixed bug that caused segfaults in Attribute::read. (BMR - 2008/04/20) - - Fixed bug in PropList::getClassName to use portable HDfree instead - of free. (BMR - 2008/04/20) - - Fixed a design bug which allowed an Attribute object to create/modify - attributes (bugzilla #1068). The API class hierarchy was revised - to address the problem. Classes AbstractDS and Attribute are moved - out of H5Object. Class Attribute now multiply inherits from - IdComponent and AbstractDs and class DataSet from H5Object and - AbstractDs. In addition, the data member IdComponent::id was - moved into subclasses: Attribute, DataSet, DataSpace, DataType, - H5File, Group, and PropList. (BMR - 2008/08/10) - - IdComponent::dereference was incorrect and replaced as described - in "New Features" section. - (BMR - 2008/08/10) + - The constructor PropList::PropList(id) was fixed to act properly + according to the nature of 'id'. When 'id' is a property class id, + a new property list will be created. When 'id' id a property list id, + a copy of the property list will be made. (BMR - 2010/5/9) + - The parameters 'size' and 'bufsize' in CommonFG::getLinkval and + CommonFG::getComment, respectively, now have default values for + user's convenience. (BMR - 2009/10/23) + - NULL pointer accessing was fixed, bugzilla 1061. (BMR - 2009/10/05) + - read/write methods of DataSet and Attribute classes were fixed + to handle string correctly. (BMR - 2009/07/26) + - Fixed bug that caused segfaults in Attribute::read. (BMR - 2008/04/20) + - Fixed bug in PropList::getClassName to use portable HDfree instead + of free. (BMR - 2008/04/20) + - Fixed a design bug which allowed an Attribute object to create/modify + attributes (bugzilla #1068). The API class hierarchy was revised + to address the problem. Classes AbstractDS and Attribute are moved + out of H5Object. Class Attribute now multiply inherits from + IdComponent and AbstractDs and class DataSet from H5Object and + AbstractDs. In addition, the data member IdComponent::id was + moved into subclasses: Attribute, DataSet, DataSpace, DataType, + H5File, Group, and PropList. (BMR - 2008/08/10) + - IdComponent::dereference was incorrect and replaced as described + in "New Features" section. + (BMR - 2008/08/10) Testing ------- - - In some Mac system, testlibinfo.sh failed with this error: - Check file ../src/.libs/libhdf5.7.dylib - strings: object: ../src/.libs/libhdf5.7.dylib malformed object \ - (unknown load command 15) - The strings command of Mac inspects library files and older - versions of strings may not know newer library format, resulting - in errors. Fixed by sending the library file as stdin to the strings - coommand to avoid this problem. (AKC - 2013/03/08 HDFFV-8305) - - - Fixed a typo in the ERROR macro in test/testhdf5.h. It segmentation - faulted when used before. (AKC - 2013/02/12 HDFFV-8267) + - tools/h5diff/testh5diff.sh is run in every "make check", even after it + has passed in the previous run. It should not run again if there is no + code changes. Fixed. (AKC - 2013/07/19 HDFFV-8392) + - In some Mac system, testlibinfo.sh failed with this error: + Check file ../src/.libs/libhdf5.7.dylib + strings: object: ../src/.libs/libhdf5.7.dylib malformed object \ + (unknown load command 15) + The strings command of Mac inspects library files and older + versions of strings may not know newer library format, resulting + in errors. Fixed by sending the library file as stdin to the strings + coommand to avoid this problem. (AKC - 2013/03/08 HDFFV-8305) + + - Fixed a typo in the ERROR macro in test/testhdf5.h. It segmentation + faulted when used before. (AKC - 2013/02/12 HDFFV-8267) Supported Platforms -- cgit v0.12 From f26b04712eec8481b436050cc479fa7f57bb8a67 Mon Sep 17 00:00:00 2001 From: HDF Tester Date: Sun, 21 Jul 2013 03:38:01 -0500 Subject: [svn-r23926] Snapshot version 1.9 release 159 --- README.txt | 2 +- c++/src/Makefile.in | 2 +- config/lt_vers.am | 2 +- configure | 22 +++++++++++----------- configure.ac | 2 +- fortran/src/Makefile.in | 2 +- hl/c++/src/Makefile.in | 2 +- hl/fortran/src/Makefile.in | 2 +- hl/src/Makefile.in | 2 +- release_docs/RELEASE.txt | 2 +- src/H5public.h | 4 ++-- src/Makefile.in | 2 +- vms/src/h5pubconf.h | 6 +++--- 13 files changed, 26 insertions(+), 26 deletions(-) diff --git a/README.txt b/README.txt index d9b23cb..8044281 100644 --- a/README.txt +++ b/README.txt @@ -1,4 +1,4 @@ -HDF5 version 1.9.159 currently under development +HDF5 version 1.9.160 currently under development Please refer to the release_docs/INSTALL file for installation instructions. ------------------------------------------------------------------------------ diff --git a/c++/src/Makefile.in b/c++/src/Makefile.in index 48a7385..4793093 100644 --- a/c++/src/Makefile.in +++ b/c++/src/Makefile.in @@ -467,7 +467,7 @@ CHECK_CLEANFILES = *.chkexe *.chklog *.clog # Add libtool shared library version numbers to the HDF5 library # See libtool versioning documentation online. LT_VERS_INTERFACE = 6 -LT_VERS_REVISION = 149 +LT_VERS_REVISION = 150 LT_VERS_AGE = 0 # Include src directory diff --git a/config/lt_vers.am b/config/lt_vers.am index 4e17bbe..43ee967 100644 --- a/config/lt_vers.am +++ b/config/lt_vers.am @@ -17,7 +17,7 @@ # Add libtool shared library version numbers to the HDF5 library # See libtool versioning documentation online. LT_VERS_INTERFACE = 6 -LT_VERS_REVISION = 149 +LT_VERS_REVISION = 150 LT_VERS_AGE = 0 ## If the API changes *at all*, increment LT_VERS_INTERFACE and diff --git a/configure b/configure index 9c3bf5f..eacff2e 100755 --- a/configure +++ b/configure @@ -1,7 +1,7 @@ #! /bin/sh # From configure.ac Id: configure.ac 22697 2012-08-19 14:35:47Z hdftest . # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.69 for HDF5 1.9.159. +# Generated by GNU Autoconf 2.69 for HDF5 1.9.160. # # Report bugs to . # @@ -591,8 +591,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='HDF5' PACKAGE_TARNAME='hdf5' -PACKAGE_VERSION='1.9.159' -PACKAGE_STRING='HDF5 1.9.159' +PACKAGE_VERSION='1.9.160' +PACKAGE_STRING='HDF5 1.9.160' PACKAGE_BUGREPORT='help@hdfgroup.org' PACKAGE_URL='' @@ -1486,7 +1486,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures HDF5 1.9.159 to adapt to many kinds of systems. +\`configure' configures HDF5 1.9.160 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1556,7 +1556,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of HDF5 1.9.159:";; + short | recursive ) echo "Configuration of HDF5 1.9.160:";; esac cat <<\_ACEOF @@ -1752,7 +1752,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -HDF5 configure 1.9.159 +HDF5 configure 1.9.160 generated by GNU Autoconf 2.69 Copyright (C) 2012 Free Software Foundation, Inc. @@ -2846,7 +2846,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by HDF5 $as_me 1.9.159, which was +It was created by HDF5 $as_me 1.9.160, which was generated by GNU Autoconf 2.69. Invocation command line was $ $0 $@ @@ -3678,7 +3678,7 @@ fi # Define the identity of the package. PACKAGE='hdf5' - VERSION='1.9.159' + VERSION='1.9.160' cat >>confdefs.h <<_ACEOF @@ -31632,7 +31632,7 @@ Usage: $0 [OPTIONS] Report bugs to ." lt_cl_version="\ -HDF5 config.lt 1.9.159 +HDF5 config.lt 1.9.160 configured by $0, generated by GNU Autoconf 2.69. Copyright (C) 2011 Free Software Foundation, Inc. @@ -33762,7 +33762,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by HDF5 $as_me 1.9.159, which was +This file was extended by HDF5 $as_me 1.9.160, which was generated by GNU Autoconf 2.69. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -33828,7 +33828,7 @@ _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ -HDF5 config.status 1.9.159 +HDF5 config.status 1.9.160 configured by $0, generated by GNU Autoconf 2.69, with options \\"\$ac_cs_config\\" diff --git a/configure.ac b/configure.ac index 45875ae..6d615d6 100644 --- a/configure.ac +++ b/configure.ac @@ -26,7 +26,7 @@ AC_PREREQ([2.69]) ## NOTE: Do not forget to change the version number here when we do a ## release!!! ## -AC_INIT([HDF5], [1.9.159], [help@hdfgroup.org]) +AC_INIT([HDF5], [1.9.160], [help@hdfgroup.org]) AC_CONFIG_SRCDIR([src/H5.c]) AC_CONFIG_HEADER([src/H5config.h]) diff --git a/fortran/src/Makefile.in b/fortran/src/Makefile.in index 6051fc0..94b43ed 100644 --- a/fortran/src/Makefile.in +++ b/fortran/src/Makefile.in @@ -518,7 +518,7 @@ CHECK_CLEANFILES = *.chkexe *.chklog *.clog # Add libtool shared library version numbers to the HDF5 library # See libtool versioning documentation online. LT_VERS_INTERFACE = 6 -LT_VERS_REVISION = 149 +LT_VERS_REVISION = 150 LT_VERS_AGE = 0 # Include src directory in both Fortran and C flags (C compiler is used diff --git a/hl/c++/src/Makefile.in b/hl/c++/src/Makefile.in index 9b8b14e..9ad806f 100644 --- a/hl/c++/src/Makefile.in +++ b/hl/c++/src/Makefile.in @@ -458,7 +458,7 @@ CHECK_CLEANFILES = *.chkexe *.chklog *.clog # Add libtool shared library version numbers to the HDF5 library # See libtool versioning documentation online. LT_VERS_INTERFACE = 6 -LT_VERS_REVISION = 149 +LT_VERS_REVISION = 150 LT_VERS_AGE = 0 # Include src directory diff --git a/hl/fortran/src/Makefile.in b/hl/fortran/src/Makefile.in index 36fcee8..c850c03 100644 --- a/hl/fortran/src/Makefile.in +++ b/hl/fortran/src/Makefile.in @@ -474,7 +474,7 @@ CHECK_CLEANFILES = *.chkexe *.chklog *.clog # Add libtool shared library version numbers to the HDF5 library # See libtool versioning documentation online. LT_VERS_INTERFACE = 6 -LT_VERS_REVISION = 149 +LT_VERS_REVISION = 150 LT_VERS_AGE = 0 INCLUDES = -I$(top_srcdir)/src -I$(top_srcdir)/hl/src -I$(top_builddir)/hl/src \ -I$(top_srcdir)/fortran/src -I$(top_builddir)/fortran/src diff --git a/hl/src/Makefile.in b/hl/src/Makefile.in index b1bec13..cb32884 100644 --- a/hl/src/Makefile.in +++ b/hl/src/Makefile.in @@ -457,7 +457,7 @@ CHECK_CLEANFILES = *.chkexe *.chklog *.clog # Add libtool shared library version numbers to the HDF5 library # See libtool versioning documentation online. LT_VERS_INTERFACE = 6 -LT_VERS_REVISION = 149 +LT_VERS_REVISION = 150 LT_VERS_AGE = 0 # This library is our main target. diff --git a/release_docs/RELEASE.txt b/release_docs/RELEASE.txt index a520378..a89b070 100644 --- a/release_docs/RELEASE.txt +++ b/release_docs/RELEASE.txt @@ -1,4 +1,4 @@ -HDF5 version 1.9.159 currently under development +HDF5 version 1.9.160 currently under development ================================================================================ diff --git a/src/H5public.h b/src/H5public.h index c465962..1bd38eb 100644 --- a/src/H5public.h +++ b/src/H5public.h @@ -75,10 +75,10 @@ extern "C" { /* Version numbers */ #define H5_VERS_MAJOR 1 /* For major interface/format changes */ #define H5_VERS_MINOR 9 /* For minor interface/format changes */ -#define H5_VERS_RELEASE 159 /* For tweaks, bug-fixes, or development */ +#define H5_VERS_RELEASE 160 /* For tweaks, bug-fixes, or development */ #define H5_VERS_SUBRELEASE "" /* For pre-releases like snap0 */ /* Empty string for real releases. */ -#define H5_VERS_INFO "HDF5 library version: 1.9.159" /* Full version string */ +#define H5_VERS_INFO "HDF5 library version: 1.9.160" /* Full version string */ #define H5check() H5check_version(H5_VERS_MAJOR,H5_VERS_MINOR, \ H5_VERS_RELEASE) diff --git a/src/Makefile.in b/src/Makefile.in index ef13501..b00cc01 100644 --- a/src/Makefile.in +++ b/src/Makefile.in @@ -522,7 +522,7 @@ CHECK_CLEANFILES = *.chkexe *.chklog *.clog # Add libtool shared library version numbers to the HDF5 library # See libtool versioning documentation online. LT_VERS_INTERFACE = 6 -LT_VERS_REVISION = 149 +LT_VERS_REVISION = 150 LT_VERS_AGE = 0 H5detect_CFLAGS = -g $(AM_CFLAGS) diff --git a/vms/src/h5pubconf.h b/vms/src/h5pubconf.h index 3ae0c21..57c2936 100644 --- a/vms/src/h5pubconf.h +++ b/vms/src/h5pubconf.h @@ -511,7 +511,7 @@ #define H5_PACKAGE_NAME "HDF5" /* Define to the full name and version of this package. */ -#define H5_PACKAGE_STRING "HDF5 1.9.159" +#define H5_PACKAGE_STRING "HDF5 1.9.160" /* Define to the one symbol short name of this package. */ #define H5_PACKAGE_TARNAME "hdf5" @@ -520,7 +520,7 @@ #define H5_PACKAGE_URL "" /* Define to the version of this package. */ -#define H5_PACKAGE_VERSION "1.9.159" +#define H5_PACKAGE_VERSION "1.9.160" /* Width for printf() for type `long long' or `__int64', use `ll' */ #define H5_PRINTF_LL_WIDTH "ll" @@ -683,7 +683,7 @@ /* #undef H5_USING_MEMCHECKER */ /* Version number of package */ -#define H5_VERSION "1.9.159" +#define H5_VERSION "1.9.160" /* Define if vsnprintf() returns the correct value for formatted strings that don't fit into size allowed */ -- cgit v0.12 From a195bb78b9bede6207fc2491161428f7eb3c4272 Mon Sep 17 00:00:00 2001 From: Larry Knox Date: Wed, 24 Jul 2013 15:22:14 -0500 Subject: [svn-r23932] Changes applied to eliminate several compiler warnings in the test directory in files: dt_arith.c filter_fail.c big.c dynlib2.c dynlib3.c Also an HDassert(0 && "Unknown type"); statement was added to all 29 combinations of case OTHER: default: See crucible review HDF5-145 for more details. --- test/big.c | 5 ++++- test/dt_arith.c | 32 ++++++++++++++++++++++++++++++++ test/dynlib2.c | 3 +++ test/dynlib3.c | 3 +++ test/filter_fail.c | 4 ++-- 5 files changed, 44 insertions(+), 3 deletions(-) diff --git a/test/big.c b/test/big.c index dffbbeb..5a70c26 100644 --- a/test/big.c +++ b/test/big.c @@ -393,6 +393,10 @@ writer (char* filename, hid_t fapl, fsizes_t testsize, int wrt_n) HDfprintf(stdout, "Unexpected file size of NOFILE\n"); goto error; break; + + default: + HDassert(0 && "Invalid test size."); + break; } /* @@ -604,7 +608,6 @@ usage(void) int testvfd(vfd_t vfd) { hid_t fapl=-1; - hsize_t family_size; char filename[1024]; fsizes_t testsize; diff --git a/test/dt_arith.c b/test/dt_arith.c index 096b83e..9879887 100644 --- a/test/dt_arith.c +++ b/test/dt_arith.c @@ -1853,6 +1853,7 @@ test_conv_int_1(const char *name, hid_t src, hid_t dst) case FLT_LDOUBLE: case OTHER: default: + HDassert(0 && "Unknown type"); break; } } else if (INT_UCHAR==dst_type) { @@ -1903,6 +1904,7 @@ test_conv_int_1(const char *name, hid_t src, hid_t dst) case FLT_LDOUBLE: case OTHER: default: + HDassert(0 && "Unknown type"); break; } } else if (INT_SHORT==dst_type) { @@ -1954,6 +1956,7 @@ test_conv_int_1(const char *name, hid_t src, hid_t dst) case FLT_LDOUBLE: case OTHER: default: + HDassert(0 && "Unknown type"); break; } } else if (INT_USHORT==dst_type) { @@ -2004,6 +2007,7 @@ test_conv_int_1(const char *name, hid_t src, hid_t dst) case FLT_LDOUBLE: case OTHER: default: + HDassert(0 && "Unknown type"); break; } } else if (INT_INT==dst_type) { @@ -2054,6 +2058,7 @@ test_conv_int_1(const char *name, hid_t src, hid_t dst) case FLT_LDOUBLE: case OTHER: default: + HDassert(0 && "Unknown type"); break; } } else if (INT_UINT==dst_type) { @@ -2104,6 +2109,7 @@ test_conv_int_1(const char *name, hid_t src, hid_t dst) case FLT_LDOUBLE: case OTHER: default: + HDassert(0 && "Unknown type"); break; } } else if (INT_LONG==dst_type) { @@ -2154,6 +2160,7 @@ test_conv_int_1(const char *name, hid_t src, hid_t dst) case FLT_LDOUBLE: case OTHER: default: + HDassert(0 && "Unknown type"); break; } } else if (INT_ULONG==dst_type) { @@ -2204,6 +2211,7 @@ test_conv_int_1(const char *name, hid_t src, hid_t dst) case FLT_LDOUBLE: case OTHER: default: + HDassert(0 && "Unknown type"); break; } } else if (INT_LLONG==dst_type) { @@ -2254,6 +2262,7 @@ test_conv_int_1(const char *name, hid_t src, hid_t dst) case FLT_LDOUBLE: case OTHER: default: + HDassert(0 && "Unknown type"); break; } } else if (INT_ULLONG==dst_type) { @@ -2304,6 +2313,7 @@ test_conv_int_1(const char *name, hid_t src, hid_t dst) case FLT_LDOUBLE: case OTHER: default: + HDassert(0 && "Unknown type"); break; } } @@ -2482,6 +2492,7 @@ test_conv_int_1(const char *name, hid_t src, hid_t dst) case FLT_LDOUBLE: case OTHER: default: + HDassert(0 && "Unknown type"); break; } @@ -2535,6 +2546,7 @@ test_conv_int_1(const char *name, hid_t src, hid_t dst) case FLT_LDOUBLE: case OTHER: default: + HDassert(0 && "Unknown type"); break; } @@ -2578,6 +2590,7 @@ test_conv_int_1(const char *name, hid_t src, hid_t dst) case FLT_LDOUBLE: case OTHER: default: + HDassert(0 && "Unknown type"); break; } @@ -3867,6 +3880,7 @@ test_conv_int_fp(const char *name, int run_test, hid_t src, hid_t dst) case FLT_LDOUBLE: case OTHER: default: + HDassert(0 && "Unknown type"); break; } } else if (FLT_DOUBLE==dst_type) { @@ -3919,6 +3933,7 @@ test_conv_int_fp(const char *name, int run_test, hid_t src, hid_t dst) case FLT_LDOUBLE: case OTHER: default: + HDassert(0 && "Unknown type"); break; } #if H5_SIZEOF_LONG_DOUBLE !=0 @@ -3972,6 +3987,7 @@ test_conv_int_fp(const char *name, int run_test, hid_t src, hid_t dst) case FLT_LDOUBLE: case OTHER: default: + HDassert(0 && "Unknown type"); break; } #endif @@ -4004,6 +4020,7 @@ test_conv_int_fp(const char *name, int run_test, hid_t src, hid_t dst) case INT_ULLONG: case OTHER: default: + HDassert(0 && "Unknown type"); break; } } else if (INT_UCHAR==dst_type) { @@ -4035,6 +4052,7 @@ test_conv_int_fp(const char *name, int run_test, hid_t src, hid_t dst) case INT_ULLONG: case OTHER: default: + HDassert(0 && "Unknown type"); break; } } else if (INT_SHORT==dst_type) { @@ -4066,6 +4084,7 @@ test_conv_int_fp(const char *name, int run_test, hid_t src, hid_t dst) case INT_ULLONG: case OTHER: default: + HDassert(0 && "Unknown type"); break; } } else if (INT_USHORT==dst_type) { @@ -4097,6 +4116,7 @@ test_conv_int_fp(const char *name, int run_test, hid_t src, hid_t dst) case INT_ULLONG: case OTHER: default: + HDassert(0 && "Unknown type"); break; } } else if (INT_INT==dst_type) { @@ -4128,6 +4148,7 @@ test_conv_int_fp(const char *name, int run_test, hid_t src, hid_t dst) case INT_ULLONG: case OTHER: default: + HDassert(0 && "Unknown type"); break; } } else if (INT_UINT==dst_type) { @@ -4159,6 +4180,7 @@ test_conv_int_fp(const char *name, int run_test, hid_t src, hid_t dst) case INT_ULLONG: case OTHER: default: + HDassert(0 && "Unknown type"); break; } } else if (INT_LONG==dst_type) { @@ -4190,6 +4212,7 @@ test_conv_int_fp(const char *name, int run_test, hid_t src, hid_t dst) case INT_ULLONG: case OTHER: default: + HDassert(0 && "Unknown type"); break; } } else if (INT_ULONG==dst_type) { @@ -4221,6 +4244,7 @@ test_conv_int_fp(const char *name, int run_test, hid_t src, hid_t dst) case INT_ULLONG: case OTHER: default: + HDassert(0 && "Unknown type"); break; } } else if (INT_LLONG==dst_type) { @@ -4252,6 +4276,7 @@ test_conv_int_fp(const char *name, int run_test, hid_t src, hid_t dst) case INT_ULLONG: case OTHER: default: + HDassert(0 && "Unknown type"); break; } } else if (INT_ULLONG==dst_type) { @@ -4283,6 +4308,7 @@ test_conv_int_fp(const char *name, int run_test, hid_t src, hid_t dst) case INT_ULLONG: case OTHER: default: + HDassert(0 && "Unknown type"); break; } } @@ -4549,6 +4575,8 @@ test_conv_int_fp(const char *name, int run_test, hid_t src, hid_t dst) break; #endif case OTHER: + default: + HDassert(0 && "Unknown type"); break; } @@ -4612,6 +4640,8 @@ test_conv_int_fp(const char *name, int run_test, hid_t src, hid_t dst) break; #endif case OTHER: + default: + HDassert(0 && "Unknown type"); break; } @@ -4662,6 +4692,8 @@ test_conv_int_fp(const char *name, int run_test, hid_t src, hid_t dst) break; #endif case OTHER: + default: + HDassert(0 && "Unknown type"); break; } diff --git a/test/dynlib2.c b/test/dynlib2.c index a853ed0..0d8be2b 100644 --- a/test/dynlib2.c +++ b/test/dynlib2.c @@ -71,6 +71,9 @@ H5Z_filter_dynlib2(unsigned int flags, size_t cd_nelmts, if(cd_nelmts > 0) return(0); + /* Assignment to eliminate unused parameter warning. */ + cd_values = cd_values; + if(flags & H5Z_FLAG_REVERSE) { /*read*/ /* Divide the original value with MULTIPLIER */ while(buf_left > 0) { diff --git a/test/dynlib3.c b/test/dynlib3.c index 9560b86..b3a02ed 100644 --- a/test/dynlib3.c +++ b/test/dynlib3.c @@ -71,6 +71,9 @@ H5Z_filter_dynlib3(unsigned int flags, size_t cd_nelmts, if(cd_nelmts > 0) return(0); + /* Assignment to eliminate unused parameter warning. */ + cd_values = cd_values; + if(flags & H5Z_FLAG_REVERSE) { /*read*/ ret_value = *buf_size = nbytes - SUFFIX_LEN; } /* end if */ diff --git a/test/filter_fail.c b/test/filter_fail.c index c48be14..3dbb564 100644 --- a/test/filter_fail.c +++ b/test/filter_fail.c @@ -65,8 +65,8 @@ const H5Z_class2_t H5Z_FAIL_TEST[1] = {{ *------------------------------------------------------------------------- */ static size_t -filter_fail(unsigned int flags, size_t cd_nelmts, - const unsigned int *cd_values, size_t nbytes, +filter_fail(unsigned int flags, size_t UNUSED cd_nelmts, + const unsigned int UNUSED *cd_values, size_t nbytes, size_t *buf_size, void **buf) { int *dst = (int*)(*buf); -- cgit v0.12 From cb41664db2fdfb7da5cc754a0119364741d0dae4 Mon Sep 17 00:00:00 2001 From: Jerome Soumagne Date: Fri, 26 Jul 2013 12:05:38 -0500 Subject: [svn-r23937] Remove unused param / var warnings and fix H5HF_sect_single_dblock_info prototype --- hl/test/test_lite.c | 3 +-- src/H5Dint.c | 2 +- src/H5FDmulti.c | 2 ++ src/H5HFman.c | 2 +- src/H5HFpkg.h | 2 +- src/H5HFsection.c | 8 ++++---- 6 files changed, 10 insertions(+), 9 deletions(-) diff --git a/hl/test/test_lite.c b/hl/test/test_lite.c index 282755e..b649462 100644 --- a/hl/test/test_lite.c +++ b/hl/test/test_lite.c @@ -1813,10 +1813,9 @@ static int test_valid_path(void) { hid_t file_id, group; herr_t status; - FILE *fp = NULL; htri_t path_valid; const char *data_string_in = "test"; - + TESTING("H5LTpath_valid"); /* Create a new file using default properties. */ diff --git a/src/H5Dint.c b/src/H5Dint.c index 5545a98..d22c643 100644 --- a/src/H5Dint.c +++ b/src/H5Dint.c @@ -2358,7 +2358,7 @@ done: *------------------------------------------------------------------------- */ herr_t -H5D__mark(H5D_t *dataset, hid_t dxpl_id, unsigned flags) +H5D__mark(H5D_t *dataset, hid_t UNUSED dxpl_id, unsigned flags) { herr_t ret_value = SUCCEED; /* Return value */ diff --git a/src/H5FDmulti.c b/src/H5FDmulti.c index a3ce7f8..f907e0a 100644 --- a/src/H5FDmulti.c +++ b/src/H5FDmulti.c @@ -1784,6 +1784,7 @@ H5FD_multi_read(H5FD_t *_file, H5FD_mem_t type, hid_t dxpl_id, haddr_t addr, H5FD_mem_t mt, mmt, hi = H5FD_MEM_DEFAULT; haddr_t start_addr = 0; static const char *func = "H5FD_multi_read"; /* Function Name for error reporting */ + dxpl_id = dxpl_id; /* Suppress compiler warning */ /* Clear the error stack */ H5Eclear2(H5E_DEFAULT); @@ -1836,6 +1837,7 @@ H5FD_multi_write(H5FD_t *_file, H5FD_mem_t type, hid_t dxpl_id, haddr_t addr, H5FD_mem_t mt, mmt, hi = H5FD_MEM_DEFAULT; haddr_t start_addr = 0; static const char *func = "H5FD_multi_read"; /* Function Name for error reporting */ + dxpl_id = dxpl_id; /* Suppress compiler warning */ /* Clear the error stack */ H5Eclear2(H5E_DEFAULT); diff --git a/src/H5HFman.c b/src/H5HFman.c index 58e3318..b43356f 100644 --- a/src/H5HFman.c +++ b/src/H5HFman.c @@ -157,7 +157,7 @@ H5HF_man_insert(H5HF_hdr_t *hdr, hid_t dxpl_id, size_t obj_size, const void *obj HDassert(sec_node->sect_info.state == H5FS_SECT_LIVE); /* Retrieve direct block address from section */ - if(H5HF_sect_single_dblock_info(hdr, dxpl_id, sec_node, &dblock_addr, &dblock_size) < 0) + if(H5HF_sect_single_dblock_info(hdr, sec_node, &dblock_addr, &dblock_size) < 0) HGOTO_ERROR(H5E_HEAP, H5E_CANTGET, FAIL, "can't retrieve direct block information") /* Lock direct block */ diff --git a/src/H5HFpkg.h b/src/H5HFpkg.h index e0deca7..3e2db99 100644 --- a/src/H5HFpkg.h +++ b/src/H5HFpkg.h @@ -761,7 +761,7 @@ H5_DLL H5HF_free_section_t *H5HF_sect_single_new(hsize_t sect_off, size_t sect_size, H5HF_indirect_t *parent, unsigned par_entry); H5_DLL herr_t H5HF_sect_single_revive(H5HF_hdr_t *hdr, hid_t dxpl_id, H5HF_free_section_t *sect); -H5_DLL herr_t H5HF_sect_single_dblock_info(H5HF_hdr_t *hdr, hid_t dxpl_id, +H5_DLL herr_t H5HF_sect_single_dblock_info(H5HF_hdr_t *hdr, H5HF_free_section_t *sect, haddr_t *dblock_addr, size_t *dblock_size); H5_DLL herr_t H5HF_sect_single_reduce(H5HF_hdr_t *hdr, hid_t dxpl_id, H5HF_free_section_t *sect, size_t amt); diff --git a/src/H5HFsection.c b/src/H5HFsection.c index bf779a6..794d36c 100644 --- a/src/H5HFsection.c +++ b/src/H5HFsection.c @@ -648,7 +648,7 @@ done: *------------------------------------------------------------------------- */ herr_t -H5HF_sect_single_dblock_info(H5HF_hdr_t *hdr, hid_t dxpl_id, +H5HF_sect_single_dblock_info(H5HF_hdr_t *hdr, H5HF_free_section_t *sect, haddr_t *dblock_addr, size_t *dblock_size) { FUNC_ENTER_NOAPI_NOERR @@ -766,7 +766,7 @@ H5HF_sect_single_full_dblock(H5HF_hdr_t *hdr, hid_t dxpl_id, HDassert(hdr); /* Retrieve direct block address from section */ - if(H5HF_sect_single_dblock_info(hdr, dxpl_id, sect, &dblock_addr, &dblock_size) < 0) + if(H5HF_sect_single_dblock_info(hdr, sect, &dblock_addr, &dblock_size) < 0) HGOTO_ERROR(H5E_HEAP, H5E_CANTGET, FAIL, "can't retrieve direct block information") /* Check for section occupying entire direct block */ @@ -1087,7 +1087,7 @@ H5HF_sect_single_shrink(H5FS_section_info_t **_sect, void UNUSED *_udata) HGOTO_ERROR(H5E_HEAP, H5E_CANTINIT, FAIL, "can't revive single free section") /* Retrieve direct block address from section */ - if(H5HF_sect_single_dblock_info(hdr, dxpl_id, (*sect), &dblock_addr, &dblock_size) < 0) + if(H5HF_sect_single_dblock_info(hdr, (*sect), &dblock_addr, &dblock_size) < 0) HGOTO_ERROR(H5E_HEAP, H5E_CANTGET, FAIL, "can't retrieve direct block information") /* Protect the direct block for the section */ @@ -1197,7 +1197,7 @@ H5HF_sect_single_valid(const H5FS_section_class_t UNUSED *cls, const H5FS_sectio /* Retrieve direct block address from section */ /* (Casting away const OK - QAK) */ - status = H5HF_sect_single_dblock_info(iblock->hdr, H5AC_dxpl_id, (H5HF_free_section_t *)sect, &dblock_addr, &dblock_size); + status = H5HF_sect_single_dblock_info(iblock->hdr, (H5HF_free_section_t *)sect, &dblock_addr, &dblock_size); HDassert(status >= 0); HDassert(H5F_addr_eq(iblock->ents[sect->u.single.par_entry].addr, dblock_addr)); HDassert(dblock_size > 0); -- cgit v0.12 From 69e501fc70450eec20b5f20a248467347b69547c Mon Sep 17 00:00:00 2001 From: Mohamad Chaarawi Date: Fri, 26 Jul 2013 12:28:26 -0500 Subject: [svn-r23938] remove "switch missing default case" in src. --- src/H5SL.c | 6 ++++++ src/H5Shyper.c | 3 +++ src/H5T.c | 8 ++++++++ src/H5Tdbg.c | 2 ++ src/H5Znbit.c | 12 ++++++++++++ src/H5Zshuffle.c | 6 ++++++ src/H5checksum.c | 2 ++ src/H5system.c | 2 ++ 8 files changed, 41 insertions(+) diff --git a/src/H5SL.c b/src/H5SL.c index 5c46fd4..2e2ad1e 100644 --- a/src/H5SL.c +++ b/src/H5SL.c @@ -1668,6 +1668,9 @@ H5SL_below(H5SL_t *slist, const void *key) case H5SL_TYPE_GENERIC: H5SL_FIND(GENERIC, slist, x, const void, key, -) break; + + default: + HDassert(0 && "Unknown skiplist type!"); } /* end switch */ /* An exact match for 'key' must not have been found in list, if we get here */ @@ -1767,6 +1770,9 @@ H5SL_above(H5SL_t *slist, const void *key) case H5SL_TYPE_GENERIC: H5SL_FIND(GENERIC, slist, x, const void, key, -) break; + + default: + HDassert(0 && "Unknown skiplist type!"); } /* end switch */ /* An exact match for 'key' must not have been found in list, if we get here */ diff --git a/src/H5Shyper.c b/src/H5Shyper.c index d88ac35..f8d87e4 100644 --- a/src/H5Shyper.c +++ b/src/H5Shyper.c @@ -8249,6 +8249,9 @@ loc += fast_dim_buf_off; duffs_index = (fast_dim_count + 7) / 8; switch (fast_dim_count % 8) { + default: + HDassert(0 && "This Should never be executed!"); + break; case 0: do { diff --git a/src/H5T.c b/src/H5T.c index 080af8e..8f44035 100644 --- a/src/H5T.c +++ b/src/H5T.c @@ -3247,6 +3247,8 @@ H5T_copy(H5T_t *old_dt, H5T_copy_t method) new_dt->shared->state = H5T_STATE_RDONLY; } break; + default: + HGOTO_ERROR(H5E_DATATYPE, H5E_BADTYPE, NULL, "invalid copy method type") } /* end switch */ /* Update fields in the new struct, if we aren't sharing an already opened @@ -3449,6 +3451,8 @@ H5T_lock (H5T_t *dt, hbool_t immutable) case H5T_STATE_OPEN: /*void*/ break; + default: + HGOTO_ERROR(H5E_DATATYPE, H5E_BADTYPE, FAIL, "invalid datatype state") } done: @@ -4850,6 +4854,8 @@ H5T_oloc(H5T_t *dt) HDassert(dt->sh_loc.type == H5O_SHARE_TYPE_COMMITTED); ret_value = &dt->oloc; break; + default: + HGOTO_ERROR(H5E_DATATYPE, H5E_BADTYPE, NULL, "invalid datatype state") } /* end switch */ done: @@ -4888,6 +4894,8 @@ H5T_nameof(H5T_t *dt) case H5T_STATE_OPEN: ret_value = &(dt->path); break; + default: + HGOTO_ERROR(H5E_DATATYPE, H5E_BADTYPE, NULL, "invalid datatype state") } /* end switch */ done: diff --git a/src/H5Tdbg.c b/src/H5Tdbg.c index e5df7ff..fe204d8 100644 --- a/src/H5Tdbg.c +++ b/src/H5Tdbg.c @@ -237,6 +237,8 @@ H5T_debug(const H5T_t *dt, FILE *stream) case H5T_STATE_OPEN: s2 = "[named,open]"; break; + default: + HDassert(0 && "This Should never be executed!"); } /* end switch */ fprintf(stream, "%s%s {nbytes=%lu", s1, s2, (unsigned long)(dt->shared->size)); diff --git a/src/H5Znbit.c b/src/H5Znbit.c index 134ef3a..ebb534b 100644 --- a/src/H5Znbit.c +++ b/src/H5Znbit.c @@ -1093,6 +1093,8 @@ H5Z_nbit_decompress_one_array(unsigned char *data, size_t data_offset, parms_index++; /* skip size of no-op type */ H5Z_nbit_decompress_one_nooptype(data, data_offset, buffer, j, buf_len, total_size); break; + default: + HDassert(0 && "This Should never be executed!"); } /* end switch */ } @@ -1131,6 +1133,8 @@ H5Z_nbit_decompress_one_compound(unsigned char *data, size_t data_offset, H5Z_nbit_decompress_one_nooptype(data, data_offset+member_offset, buffer, j, buf_len, size); break; + default: + HDassert(0 && "This Should never be executed!"); } /* end switch */ } } @@ -1179,6 +1183,8 @@ H5Z_nbit_decompress(unsigned char *data, unsigned d_nelmts, unsigned char *buffe parms_index = 4; } break; + default: + HDassert(0 && "This Should never be executed!"); } /* end switch */ } @@ -1320,6 +1326,8 @@ static void H5Z_nbit_compress_one_array(unsigned char *data, size_t data_offset, parms_index++; /* skip size of no-op type */ H5Z_nbit_compress_one_nooptype(data, data_offset, buffer, j, buf_len, total_size); break; + default: + HDassert(0 && "This Should never be executed!"); } /* end switch */ } @@ -1358,6 +1366,8 @@ static void H5Z_nbit_compress_one_compound(unsigned char *data, size_t data_offs H5Z_nbit_compress_one_nooptype(data, data_offset+member_offset, buffer, j, buf_len, size); break; + default: + HDassert(0 && "This Should never be executed!"); } /* end switch */ } } @@ -1406,6 +1416,8 @@ static void H5Z_nbit_compress(unsigned char *data, unsigned d_nelmts, unsigned c parms_index = 4; } break; + default: + HDassert(0 && "This Should never be executed!"); } /* end switch */ /* Update the size to the new value after compression. If there are any bits hanging over in diff --git a/src/H5Zshuffle.c b/src/H5Zshuffle.c index 7aa0202..90509b0 100644 --- a/src/H5Zshuffle.c +++ b/src/H5Zshuffle.c @@ -183,6 +183,9 @@ H5Z_filter_shuffle(unsigned flags, size_t cd_nelmts, const unsigned cd_values[], duffs_index = (numofelements + 7) / 8; switch (numofelements % 8) { + default: + HDassert(0 && "This Should never be executed!"); + break; case 0: do { @@ -238,6 +241,9 @@ H5Z_filter_shuffle(unsigned flags, size_t cd_nelmts, const unsigned cd_values[], duffs_index = (numofelements + 7) / 8; switch (numofelements % 8) { + default: + HDassert(0 && "This Should never be executed!"); + break; case 0: do { diff --git a/src/H5checksum.c b/src/H5checksum.c index ec8b2b0..48e4ce5 100644 --- a/src/H5checksum.c +++ b/src/H5checksum.c @@ -422,6 +422,8 @@ H5_checksum_lookup3(const void *key, size_t length, uint32_t initval) case 1 : a+=k[0]; break; case 0 : goto done; + default: + HDassert(0 && "This Should never be executed!"); } H5_lookup3_final(a, b, c); diff --git a/src/H5system.c b/src/H5system.c index a93a128..e46964f 100644 --- a/src/H5system.c +++ b/src/H5system.c @@ -155,6 +155,8 @@ HDfprintf(FILE *stream, const char *fmt, ...) case '#': prefix = 1; break; + default: + HDassert(0 && "This Should never be executed!"); } /* end switch */ /*lint !e744 Switch statement doesn't _need_ default */ s++; } /* end while */ -- cgit v0.12 From cd7ba8ad55e7432bba2e778b6ffdceb7e8293907 Mon Sep 17 00:00:00 2001 From: Neil Fortner Date: Fri, 26 Jul 2013 17:14:03 -0500 Subject: [svn-r23939] Fix unused variables warnings in trunk Rename static functions in H5Adense.c, H5B2cache.c, H5Bcache.c Switch these functions to use FUNC_ENTER_STATIC* macros Tested: koala --- src/H5Adense.c | 88 +++++++++++++------------- src/H5B2cache.c | 192 ++++++++++++++++++++++++++++---------------------------- src/H5B2hdr.c | 4 +- src/H5B2stat.c | 2 +- src/H5Bcache.c | 64 +++++++++---------- src/H5Dchunk.c | 1 - src/H5FDmulti.c | 2 - src/H5G.c | 7 --- src/H5Gent.c | 2 +- src/H5Pocpl.c | 1 - src/H5dbg.c | 2 +- 11 files changed, 177 insertions(+), 188 deletions(-) diff --git a/src/H5Adense.c b/src/H5Adense.c index 4c10255..0b73a20 100644 --- a/src/H5Adense.c +++ b/src/H5Adense.c @@ -292,7 +292,7 @@ done: /*------------------------------------------------------------------------- - * Function: H5A_dense_fnd_cb + * Function: H5A__dense_fnd_cb * * Purpose: Callback when an attribute is located in an index * @@ -305,11 +305,11 @@ done: *------------------------------------------------------------------------- */ static herr_t -H5A_dense_fnd_cb(const H5A_t *attr, hbool_t *took_ownership, void *_user_attr) +H5A__dense_fnd_cb(const H5A_t *attr, hbool_t *took_ownership, void *_user_attr) { H5A_t const **user_attr = (H5A_t const **)_user_attr; /* User data from v2 B-tree attribute lookup */ - FUNC_ENTER_NOAPI_NOINIT + FUNC_ENTER_STATIC_NOERR /* * Check arguments. @@ -322,7 +322,7 @@ H5A_dense_fnd_cb(const H5A_t *attr, hbool_t *took_ownership, void *_user_attr) *took_ownership = TRUE; FUNC_LEAVE_NOAPI(SUCCEED) -} /* end H5A_dense_fnd_cb() */ +} /* end H5A__dense_fnd_cb() */ /*------------------------------------------------------------------------- @@ -395,7 +395,7 @@ H5A_dense_open(H5F_t *f, hid_t dxpl_id, const H5O_ainfo_t *ainfo, const char *na udata.name_hash = H5_checksum_lookup3(name, HDstrlen(name), 0); udata.flags = 0; udata.corder = 0; - udata.found_op = H5A_dense_fnd_cb; /* v2 B-tree comparison callback */ + udata.found_op = H5A__dense_fnd_cb; /* v2 B-tree comparison callback */ udata.found_op_data = &ret_value; /* Find & copy the attribute in the 'name' index */ @@ -578,7 +578,7 @@ done: /*------------------------------------------------------------------------- - * Function: H5A_dense_write_bt2_cb2 + * Function: H5A__dense_write_bt2_cb2 * * Purpose: v2 B-tree 'modify' callback to update the record for a creation * order index @@ -592,12 +592,12 @@ done: *------------------------------------------------------------------------- */ static herr_t -H5A_dense_write_bt2_cb2(void *_record, void *_op_data, hbool_t *changed) +H5A__dense_write_bt2_cb2(void *_record, void *_op_data, hbool_t *changed) { H5A_dense_bt2_corder_rec_t *record = (H5A_dense_bt2_corder_rec_t *)_record; /* Record from B-tree */ H5O_fheap_id_t *new_heap_id = (H5O_fheap_id_t *)_op_data; /* "op data" from v2 B-tree modify */ - FUNC_ENTER_NOAPI_NOINIT + FUNC_ENTER_STATIC_NOERR /* * Check arguments. @@ -612,11 +612,11 @@ H5A_dense_write_bt2_cb2(void *_record, void *_op_data, hbool_t *changed) *changed = TRUE; FUNC_LEAVE_NOAPI(SUCCEED) -} /* end H5A_dense_write_bt2_cb2() */ +} /* end H5A__dense_write_bt2_cb2() */ /*------------------------------------------------------------------------- - * Function: H5A_dense_write_bt2_cb + * Function: H5A__dense_write_bt2_cb * * Purpose: v2 B-tree 'modify' callback to update the data for an attribute * @@ -629,7 +629,7 @@ H5A_dense_write_bt2_cb2(void *_record, void *_op_data, hbool_t *changed) *------------------------------------------------------------------------- */ static herr_t -H5A_dense_write_bt2_cb(void *_record, void *_op_data, hbool_t *changed) +H5A__dense_write_bt2_cb(void *_record, void *_op_data, hbool_t *changed) { H5A_dense_bt2_name_rec_t *record = (H5A_dense_bt2_name_rec_t *)_record; /* Record from B-tree */ H5A_bt2_od_wrt_t *op_data = (H5A_bt2_od_wrt_t *)_op_data; /* "op data" from v2 B-tree modify */ @@ -638,7 +638,7 @@ H5A_dense_write_bt2_cb(void *_record, void *_op_data, hbool_t *changed) uint8_t attr_buf[H5A_ATTR_BUF_SIZE]; /* Buffer for serializing attribute */ herr_t ret_value = SUCCEED; /* Return value */ - FUNC_ENTER_NOAPI_NOINIT + FUNC_ENTER_STATIC /* * Check arguments. @@ -676,7 +676,7 @@ H5A_dense_write_bt2_cb(void *_record, void *_op_data, hbool_t *changed) udata.found_op_data = NULL; /* Modify record for creation order index */ - if(H5B2_modify(bt2_corder, op_data->dxpl_id, &udata, H5A_dense_write_bt2_cb2, &op_data->attr->sh_loc.u.heap_id) < 0) + if(H5B2_modify(bt2_corder, op_data->dxpl_id, &udata, H5A__dense_write_bt2_cb2, &op_data->attr->sh_loc.u.heap_id) < 0) HGOTO_ERROR(H5E_ATTR, H5E_CANTINSERT, FAIL, "unable to modify record in v2 B-tree") } /* end if */ @@ -727,7 +727,7 @@ done: HDONE_ERROR(H5E_ATTR, H5E_CLOSEERROR, FAIL, "can't close wrapped buffer") FUNC_LEAVE_NOAPI(ret_value) -} /* end H5A_dense_write_bt2_cb() */ +} /* end H5A__dense_write_bt2_cb() */ /*------------------------------------------------------------------------- @@ -814,7 +814,7 @@ H5A_dense_write(H5F_t *f, hid_t dxpl_id, const H5O_ainfo_t *ainfo, H5A_t *attr) op_data.corder_bt2_addr = ainfo->corder_bt2_addr; /* Modify attribute through 'name' tracking v2 B-tree */ - if(H5B2_modify(bt2_name, dxpl_id, &udata, H5A_dense_write_bt2_cb, &op_data) < 0) + if(H5B2_modify(bt2_name, dxpl_id, &udata, H5A__dense_write_bt2_cb, &op_data) < 0) HGOTO_ERROR(H5E_ATTR, H5E_CANTINSERT, FAIL, "unable to modify record in v2 B-tree") done: @@ -831,7 +831,7 @@ done: /*------------------------------------------------------------------------- - * Function: H5A_dense_copy_fh_cb + * Function: H5A__dense_copy_fh_cb * * Purpose: Callback for fractal heap operator, to make copy of attribute * for calling routine @@ -845,12 +845,12 @@ done: *------------------------------------------------------------------------- */ static herr_t -H5A_dense_copy_fh_cb(const void *obj, size_t UNUSED obj_len, void *_udata) +H5A__dense_copy_fh_cb(const void *obj, size_t UNUSED obj_len, void *_udata) { H5A_fh_ud_cp_t *udata = (H5A_fh_ud_cp_t *)_udata; /* User data for fractal heap 'op' callback */ herr_t ret_value = SUCCEED; /* Return value */ - FUNC_ENTER_NOAPI_NOINIT + FUNC_ENTER_STATIC /* Decode attribute information & keep a copy */ /* (we make a copy instead of calling the user/library callback directly in @@ -871,7 +871,7 @@ H5A_dense_copy_fh_cb(const void *obj, size_t UNUSED obj_len, void *_udata) done: FUNC_LEAVE_NOAPI(ret_value) -} /* end H5A_dense_copy_fh_cb() */ +} /* end H5A__dense_copy_fh_cb() */ /*------------------------------------------------------------------------- @@ -948,7 +948,7 @@ H5A_dense_rename(H5F_t *f, hid_t dxpl_id, const H5O_ainfo_t *ainfo, const char * udata.name_hash = H5_checksum_lookup3(old_name, HDstrlen(old_name), 0); udata.flags = 0; udata.corder = 0; - udata.found_op = H5A_dense_fnd_cb; /* v2 B-tree comparison callback */ + udata.found_op = H5A__dense_fnd_cb; /* v2 B-tree comparison callback */ udata.found_op_data = &attr_copy; /* Get copy of attribute through 'name' tracking v2 B-tree */ @@ -1030,7 +1030,7 @@ done: /*------------------------------------------------------------------------- - * Function: H5A_dense_iterate_bt2_cb + * Function: H5A__dense_iterate_bt2_cb * * Purpose: v2 B-tree callback for dense attribute storage iterator * @@ -1043,13 +1043,13 @@ done: *------------------------------------------------------------------------- */ static herr_t -H5A_dense_iterate_bt2_cb(const void *_record, void *_bt2_udata) +H5A__dense_iterate_bt2_cb(const void *_record, void *_bt2_udata) { const H5A_dense_bt2_name_rec_t *record = (const H5A_dense_bt2_name_rec_t *)_record; /* Record from B-tree */ H5A_bt2_ud_it_t *bt2_udata = (H5A_bt2_ud_it_t *)_bt2_udata; /* User data for callback */ herr_t ret_value = H5_ITER_CONT; /* Return value */ - FUNC_ENTER_NOAPI_NOINIT + FUNC_ENTER_STATIC /* Check for skipping attributes */ if(bt2_udata->skip > 0) @@ -1072,7 +1072,7 @@ H5A_dense_iterate_bt2_cb(const void *_record, void *_bt2_udata) fh_udata.attr = NULL; /* Call fractal heap 'op' routine, to copy the attribute information */ - if(H5HF_op(fheap, bt2_udata->dxpl_id, &record->id, H5A_dense_copy_fh_cb, &fh_udata) < 0) + if(H5HF_op(fheap, bt2_udata->dxpl_id, &record->id, H5A__dense_copy_fh_cb, &fh_udata) < 0) HGOTO_ERROR(H5E_ATTR, H5E_CANTOPERATE, H5_ITER_ERROR, "heap op callback failed") /* Check which type of callback to make */ @@ -1123,7 +1123,7 @@ H5A_dense_iterate_bt2_cb(const void *_record, void *_bt2_udata) done: FUNC_LEAVE_NOAPI(ret_value) -} /* end H5A_dense_iterate_bt2_cb() */ +} /* end H5A__dense_iterate_bt2_cb() */ /*------------------------------------------------------------------------- @@ -1231,7 +1231,7 @@ H5A_dense_iterate(H5F_t *f, hid_t dxpl_id, hid_t loc_id, const H5O_ainfo_t *ainf /* Iterate over the records in the v2 B-tree's "native" order */ /* (by hash of name) */ - if((ret_value = H5B2_iterate(bt2, dxpl_id, H5A_dense_iterate_bt2_cb, &udata)) < 0) + if((ret_value = H5B2_iterate(bt2, dxpl_id, H5A__dense_iterate_bt2_cb, &udata)) < 0) HERROR(H5E_ATTR, H5E_BADITER, "attribute iteration failed"); /* Update the last attribute examined, if requested */ @@ -1265,7 +1265,7 @@ done: /*------------------------------------------------------------------------- - * Function: H5A_dense_remove_bt2_cb + * Function: H5A__dense_remove_bt2_cb * * Purpose: v2 B-tree callback for dense attribute storage record removal * @@ -1278,7 +1278,7 @@ done: *------------------------------------------------------------------------- */ static herr_t -H5A_dense_remove_bt2_cb(const void *_record, void *_udata) +H5A__dense_remove_bt2_cb(const void *_record, void *_udata) { const H5A_dense_bt2_name_rec_t *record = (const H5A_dense_bt2_name_rec_t *)_record; H5A_bt2_ud_rm_t *udata = (H5A_bt2_ud_rm_t *)_udata; /* User data for callback */ @@ -1286,7 +1286,7 @@ H5A_dense_remove_bt2_cb(const void *_record, void *_udata) H5B2_t *bt2_corder = NULL; /* v2 B-tree handle for creation order index */ herr_t ret_value = SUCCEED; /* Return value */ - FUNC_ENTER_NOAPI_NOINIT + FUNC_ENTER_STATIC /* Check for removing the link from the creation order index */ if(H5F_addr_defined(udata->corder_bt2_addr)) { @@ -1325,7 +1325,7 @@ done: HDONE_ERROR(H5E_ATTR, H5E_CLOSEERROR, FAIL, "can't close v2 B-tree for creation order index") FUNC_LEAVE_NOAPI(ret_value) -} /* end H5A_dense_remove_bt2_cb() */ +} /* end H5A__dense_remove_bt2_cb() */ /*------------------------------------------------------------------------- @@ -1396,12 +1396,12 @@ H5A_dense_remove(H5F_t *f, hid_t dxpl_id, const H5O_ainfo_t *ainfo, const char * udata.common.shared_fheap = shared_fheap; udata.common.name = name; udata.common.name_hash = H5_checksum_lookup3(name, HDstrlen(name), 0); - udata.common.found_op = H5A_dense_fnd_cb; /* v2 B-tree comparison callback */ + udata.common.found_op = H5A__dense_fnd_cb; /* v2 B-tree comparison callback */ udata.common.found_op_data = &attr_copy; udata.corder_bt2_addr = ainfo->corder_bt2_addr; /* Remove the record from the name index v2 B-tree */ - if(H5B2_remove(bt2_name, dxpl_id, &udata, H5A_dense_remove_bt2_cb, &udata) < 0) + if(H5B2_remove(bt2_name, dxpl_id, &udata, H5A__dense_remove_bt2_cb, &udata) < 0) HGOTO_ERROR(H5E_ATTR, H5E_CANTREMOVE, FAIL, "unable to remove attribute from name index v2 B-tree") done: @@ -1420,7 +1420,7 @@ done: /*------------------------------------------------------------------------- - * Function: H5A_dense_remove_by_idx_bt2_cb + * Function: H5A__dense_remove_by_idx_bt2_cb * * Purpose: v2 B-tree callback for dense attribute storage record removal by index * @@ -1433,7 +1433,7 @@ done: *------------------------------------------------------------------------- */ static herr_t -H5A_dense_remove_by_idx_bt2_cb(const void *_record, void *_bt2_udata) +H5A__dense_remove_by_idx_bt2_cb(const void *_record, void *_bt2_udata) { H5HF_t *fheap; /* Fractal heap handle */ H5B2_t *bt2 = NULL; /* v2 B-tree handle for index */ @@ -1444,7 +1444,7 @@ H5A_dense_remove_by_idx_bt2_cb(const void *_record, void *_bt2_udata) hbool_t use_sh_loc; /* Whether to use the attribute's shared location or the separate one */ herr_t ret_value = SUCCEED; /* Return value */ - FUNC_ENTER_NOAPI_NOINIT + FUNC_ENTER_STATIC /* Set up the user data for fractal heap 'op' callback */ fh_udata.f = bt2_udata->f; @@ -1461,7 +1461,7 @@ H5A_dense_remove_by_idx_bt2_cb(const void *_record, void *_bt2_udata) /* Check whether to make a copy of the attribute or just need the shared location info */ if(H5F_addr_defined(bt2_udata->other_bt2_addr) || !(record->flags & H5O_MSG_FLAG_SHARED)) { /* Call fractal heap 'op' routine, to make copy of attribute to remove */ - if(H5HF_op(fheap, bt2_udata->dxpl_id, &record->id, H5A_dense_copy_fh_cb, &fh_udata) < 0) + if(H5HF_op(fheap, bt2_udata->dxpl_id, &record->id, H5A__dense_copy_fh_cb, &fh_udata) < 0) HGOTO_ERROR(H5E_ATTR, H5E_CANTOPERATE, FAIL, "attribute removal callback failed") HDassert(fh_udata.attr); @@ -1543,7 +1543,7 @@ done: H5O_msg_free(H5O_ATTR_ID, fh_udata.attr); FUNC_LEAVE_NOAPI(ret_value) -} /* end H5A_dense_remove_by_idx_bt2_cb() */ +} /* end H5A__dense_remove_by_idx_bt2_cb() */ /*------------------------------------------------------------------------- @@ -1644,7 +1644,7 @@ H5A_dense_remove_by_idx(H5F_t *f, hid_t dxpl_id, const H5O_ainfo_t *ainfo, udata.other_bt2_addr = idx_type == H5_INDEX_NAME ? ainfo->corder_bt2_addr : ainfo->name_bt2_addr; /* Remove the record from the name index v2 B-tree */ - if(H5B2_remove_by_idx(bt2, dxpl_id, order, n, H5A_dense_remove_by_idx_bt2_cb, &udata) < 0) + if(H5B2_remove_by_idx(bt2, dxpl_id, order, n, H5A__dense_remove_by_idx_bt2_cb, &udata) < 0) HGOTO_ERROR(H5E_ATTR, H5E_CANTREMOVE, FAIL, "unable to remove attribute from v2 B-tree index") } /* end if */ else { @@ -1768,7 +1768,7 @@ done: /*------------------------------------------------------------------------- - * Function: H5A_dense_delete_bt2_cb + * Function: H5A__dense_delete_bt2_cb * * Purpose: v2 B-tree callback for dense attribute storage deletion * @@ -1781,14 +1781,14 @@ done: *------------------------------------------------------------------------- */ static herr_t -H5A_dense_delete_bt2_cb(const void *_record, void *_bt2_udata) +H5A__dense_delete_bt2_cb(const void *_record, void *_bt2_udata) { const H5A_dense_bt2_name_rec_t *record = (const H5A_dense_bt2_name_rec_t *)_record; /* Record from B-tree */ H5A_bt2_ud_common_t *bt2_udata = (H5A_bt2_ud_common_t *)_bt2_udata; /* User data for callback */ H5A_t *attr = NULL; /* Attribute being removed */ herr_t ret_value = SUCCEED; /* Return value */ - FUNC_ENTER_NOAPI_NOINIT + FUNC_ENTER_STATIC /* Check for shared attribute */ if(record->flags & H5O_MSG_FLAG_SHARED) { @@ -1813,7 +1813,7 @@ H5A_dense_delete_bt2_cb(const void *_record, void *_bt2_udata) fh_udata.attr = NULL; /* Call fractal heap 'op' routine, to copy the attribute information */ - if(H5HF_op(bt2_udata->fheap, bt2_udata->dxpl_id, &record->id, H5A_dense_copy_fh_cb, &fh_udata) < 0) + if(H5HF_op(bt2_udata->fheap, bt2_udata->dxpl_id, &record->id, H5A__dense_copy_fh_cb, &fh_udata) < 0) HGOTO_ERROR(H5E_ATTR, H5E_CANTOPERATE, FAIL, "heap op callback failed") attr = fh_udata.attr; @@ -1829,7 +1829,7 @@ done: H5O_msg_free_real(H5O_MSG_ATTR, attr); FUNC_LEAVE_NOAPI(ret_value) -} /* end H5A_dense_delete_bt2_cb() */ +} /* end H5A__dense_delete_bt2_cb() */ /*------------------------------------------------------------------------- @@ -1876,7 +1876,7 @@ H5A_dense_delete(H5F_t *f, hid_t dxpl_id, H5O_ainfo_t *ainfo) udata.found_op_data = NULL; /* Delete name index v2 B-tree */ - if(H5B2_delete(f, dxpl_id, ainfo->name_bt2_addr, NULL, H5A_dense_delete_bt2_cb, &udata) < 0) + if(H5B2_delete(f, dxpl_id, ainfo->name_bt2_addr, NULL, H5A__dense_delete_bt2_cb, &udata) < 0) HGOTO_ERROR(H5E_ATTR, H5E_CANTDELETE, FAIL, "unable to delete v2 B-tree for name index") ainfo->name_bt2_addr = HADDR_UNDEF; diff --git a/src/H5B2cache.c b/src/H5B2cache.c index 2ee4ef7..a48d3a8 100644 --- a/src/H5B2cache.c +++ b/src/H5B2cache.c @@ -69,21 +69,21 @@ /********************/ /* Metadata cache callbacks */ -static H5B2_hdr_t *H5B2_cache_hdr_load(H5F_t *f, hid_t dxpl_id, haddr_t addr, void *udata); -static herr_t H5B2_cache_hdr_flush(H5F_t *f, hid_t dxpl_id, hbool_t destroy, haddr_t addr, H5B2_hdr_t *hdr, unsigned UNUSED * flags_ptr); -static herr_t H5B2_cache_hdr_dest(H5F_t *f, H5B2_hdr_t *hdr); -static herr_t H5B2_cache_hdr_clear(H5F_t *f, H5B2_hdr_t *hdr, hbool_t destroy); -static herr_t H5B2_cache_hdr_size(const H5F_t *f, const H5B2_hdr_t *hdr, size_t *size_ptr); -static H5B2_internal_t *H5B2_cache_internal_load(H5F_t *f, hid_t dxpl_id, haddr_t addr, void *udata); -static herr_t H5B2_cache_internal_flush(H5F_t *f, hid_t dxpl_id, hbool_t destroy, haddr_t addr, H5B2_internal_t *i, unsigned UNUSED * flags_ptr); -static herr_t H5B2_cache_internal_dest(H5F_t *f, H5B2_internal_t *internal); -static herr_t H5B2_cache_internal_clear(H5F_t *f, H5B2_internal_t *i, hbool_t destroy); -static herr_t H5B2_cache_internal_size(const H5F_t *f, const H5B2_internal_t *i, size_t *size_ptr); -static H5B2_leaf_t *H5B2_cache_leaf_load(H5F_t *f, hid_t dxpl_id, haddr_t addr, void *udata); -static herr_t H5B2_cache_leaf_flush(H5F_t *f, hid_t dxpl_id, hbool_t destroy, haddr_t addr, H5B2_leaf_t *l, unsigned UNUSED * flags_ptr); -static herr_t H5B2_cache_leaf_dest(H5F_t *f, H5B2_leaf_t *leaf); -static herr_t H5B2_cache_leaf_clear(H5F_t *f, H5B2_leaf_t *l, hbool_t destroy); -static herr_t H5B2_cache_leaf_size(const H5F_t *f, const H5B2_leaf_t *l, size_t *size_ptr); +static H5B2_hdr_t *H5B2__cache_hdr_load(H5F_t *f, hid_t dxpl_id, haddr_t addr, void *udata); +static herr_t H5B2__cache_hdr_flush(H5F_t *f, hid_t dxpl_id, hbool_t destroy, haddr_t addr, H5B2_hdr_t *hdr, unsigned UNUSED * flags_ptr); +static herr_t H5B2__cache_hdr_dest(H5F_t *f, H5B2_hdr_t *hdr); +static herr_t H5B2__cache_hdr_clear(H5F_t *f, H5B2_hdr_t *hdr, hbool_t destroy); +static herr_t H5B2__cache_hdr_size(const H5F_t *f, const H5B2_hdr_t *hdr, size_t *size_ptr); +static H5B2_internal_t *H5B2__cache_internal_load(H5F_t *f, hid_t dxpl_id, haddr_t addr, void *udata); +static herr_t H5B2__cache_internal_flush(H5F_t *f, hid_t dxpl_id, hbool_t destroy, haddr_t addr, H5B2_internal_t *i, unsigned UNUSED * flags_ptr); +static herr_t H5B2__cache_internal_dest(H5F_t *f, H5B2_internal_t *internal); +static herr_t H5B2__cache_internal_clear(H5F_t *f, H5B2_internal_t *i, hbool_t destroy); +static herr_t H5B2__cache_internal_size(const H5F_t *f, const H5B2_internal_t *i, size_t *size_ptr); +static H5B2_leaf_t *H5B2__cache_leaf_load(H5F_t *f, hid_t dxpl_id, haddr_t addr, void *udata); +static herr_t H5B2__cache_leaf_flush(H5F_t *f, hid_t dxpl_id, hbool_t destroy, haddr_t addr, H5B2_leaf_t *l, unsigned UNUSED * flags_ptr); +static herr_t H5B2__cache_leaf_dest(H5F_t *f, H5B2_leaf_t *leaf); +static herr_t H5B2__cache_leaf_clear(H5F_t *f, H5B2_leaf_t *l, hbool_t destroy); +static herr_t H5B2__cache_leaf_size(const H5F_t *f, const H5B2_leaf_t *l, size_t *size_ptr); /*********************/ @@ -93,34 +93,34 @@ static herr_t H5B2_cache_leaf_size(const H5F_t *f, const H5B2_leaf_t *l, size_t /* H5B2 inherits cache-like properties from H5AC */ const H5AC_class_t H5AC_BT2_HDR[1] = {{ H5AC_BT2_HDR_ID, - (H5AC_load_func_t)H5B2_cache_hdr_load, - (H5AC_flush_func_t)H5B2_cache_hdr_flush, - (H5AC_dest_func_t)H5B2_cache_hdr_dest, - (H5AC_clear_func_t)H5B2_cache_hdr_clear, + (H5AC_load_func_t)H5B2__cache_hdr_load, + (H5AC_flush_func_t)H5B2__cache_hdr_flush, + (H5AC_dest_func_t)H5B2__cache_hdr_dest, + (H5AC_clear_func_t)H5B2__cache_hdr_clear, (H5AC_notify_func_t)NULL, - (H5AC_size_func_t)H5B2_cache_hdr_size, + (H5AC_size_func_t)H5B2__cache_hdr_size, }}; /* H5B2 inherits cache-like properties from H5AC */ const H5AC_class_t H5AC_BT2_INT[1] = {{ H5AC_BT2_INT_ID, - (H5AC_load_func_t)H5B2_cache_internal_load, - (H5AC_flush_func_t)H5B2_cache_internal_flush, - (H5AC_dest_func_t)H5B2_cache_internal_dest, - (H5AC_clear_func_t)H5B2_cache_internal_clear, + (H5AC_load_func_t)H5B2__cache_internal_load, + (H5AC_flush_func_t)H5B2__cache_internal_flush, + (H5AC_dest_func_t)H5B2__cache_internal_dest, + (H5AC_clear_func_t)H5B2__cache_internal_clear, (H5AC_notify_func_t)NULL, - (H5AC_size_func_t)H5B2_cache_internal_size, + (H5AC_size_func_t)H5B2__cache_internal_size, }}; /* H5B2 inherits cache-like properties from H5AC */ const H5AC_class_t H5AC_BT2_LEAF[1] = {{ H5AC_BT2_LEAF_ID, - (H5AC_load_func_t)H5B2_cache_leaf_load, - (H5AC_flush_func_t)H5B2_cache_leaf_flush, - (H5AC_dest_func_t)H5B2_cache_leaf_dest, - (H5AC_clear_func_t)H5B2_cache_leaf_clear, + (H5AC_load_func_t)H5B2__cache_leaf_load, + (H5AC_flush_func_t)H5B2__cache_leaf_flush, + (H5AC_dest_func_t)H5B2__cache_leaf_dest, + (H5AC_clear_func_t)H5B2__cache_leaf_clear, (H5AC_notify_func_t)NULL, - (H5AC_size_func_t)H5B2_cache_leaf_size, + (H5AC_size_func_t)H5B2__cache_leaf_size, }}; @@ -136,7 +136,7 @@ const H5AC_class_t H5AC_BT2_LEAF[1] = {{ /*------------------------------------------------------------------------- - * Function: H5B2_cache_hdr_load + * Function: H5B2__cache_hdr_load * * Purpose: Loads a B-tree header from the disk. * @@ -150,7 +150,7 @@ const H5AC_class_t H5AC_BT2_LEAF[1] = {{ *------------------------------------------------------------------------- */ static H5B2_hdr_t * -H5B2_cache_hdr_load(H5F_t *f, hid_t dxpl_id, haddr_t addr, void *_udata) +H5B2__cache_hdr_load(H5F_t *f, hid_t dxpl_id, haddr_t addr, void *_udata) { H5B2_hdr_t *hdr = NULL; /* B-tree header */ H5B2_hdr_cache_ud_t *udata = (H5B2_hdr_cache_ud_t *)_udata; @@ -165,7 +165,7 @@ H5B2_cache_hdr_load(H5F_t *f, hid_t dxpl_id, haddr_t addr, void *_udata) const uint8_t *p; /* Pointer into raw data buffer */ H5B2_hdr_t *ret_value; /* Return value */ - FUNC_ENTER_NOAPI_NOINIT + FUNC_ENTER_STATIC /* Check arguments */ HDassert(f); @@ -256,11 +256,11 @@ done: HDONE_ERROR(H5E_BTREE, H5E_CANTRELEASE, NULL, "can't release v2 B-tree header") FUNC_LEAVE_NOAPI(ret_value) -} /* end H5B2_cache_hdr_load() */ /*lint !e818 Can't make udata a pointer to const */ +} /* end H5B2__cache_hdr_load() */ /*lint !e818 Can't make udata a pointer to const */ /*------------------------------------------------------------------------- - * Function: H5B2_cache_hdr_flush + * Function: H5B2__cache_hdr_flush * * Purpose: Flushes a dirty B-tree header to disk. * @@ -273,14 +273,14 @@ done: *------------------------------------------------------------------------- */ static herr_t -H5B2_cache_hdr_flush(H5F_t *f, hid_t dxpl_id, hbool_t destroy, haddr_t addr, +H5B2__cache_hdr_flush(H5F_t *f, hid_t dxpl_id, hbool_t destroy, haddr_t addr, H5B2_hdr_t *hdr, unsigned UNUSED * flags_ptr) { H5WB_t *wb = NULL; /* Wrapped buffer for header data */ uint8_t hdr_buf[H5B2_HDR_BUF_SIZE]; /* Buffer for header */ herr_t ret_value = SUCCEED; /* Return value */ - FUNC_ENTER_NOAPI_NOINIT + FUNC_ENTER_STATIC /* check arguments */ HDassert(f); @@ -351,7 +351,7 @@ H5B2_cache_hdr_flush(H5F_t *f, hid_t dxpl_id, hbool_t destroy, haddr_t addr, } /* end if */ if(destroy) - if(H5B2_cache_hdr_dest(f, hdr) < 0) + if(H5B2__cache_hdr_dest(f, hdr) < 0) HGOTO_ERROR(H5E_BTREE, H5E_CANTFREE, FAIL, "unable to destroy B-tree header") done: @@ -360,11 +360,11 @@ done: HDONE_ERROR(H5E_BTREE, H5E_CLOSEERROR, FAIL, "can't close wrapped buffer") FUNC_LEAVE_NOAPI(ret_value) -} /* H5B2_cache_hdr_flush() */ +} /* H5B2__cache_hdr_flush() */ /*------------------------------------------------------------------------- - * Function: H5B2_cache_hdr_dest + * Function: H5B2__cache_hdr_dest * * Purpose: Destroys a B-tree header in memory. * @@ -377,11 +377,11 @@ done: *------------------------------------------------------------------------- */ static herr_t -H5B2_cache_hdr_dest(H5F_t *f, H5B2_hdr_t *hdr) +H5B2__cache_hdr_dest(H5F_t *f, H5B2_hdr_t *hdr) { herr_t ret_value = SUCCEED; /* Return value */ - FUNC_ENTER_NOAPI_NOINIT + FUNC_ENTER_STATIC /* Check arguments */ HDassert(hdr); @@ -404,11 +404,11 @@ H5B2_cache_hdr_dest(H5F_t *f, H5B2_hdr_t *hdr) done: FUNC_LEAVE_NOAPI(ret_value) -} /* end H5B2_cache_hdr_dest() */ +} /* end H5B2__cache_hdr_dest() */ /*------------------------------------------------------------------------- - * Function: H5B2_cache_hdr_clear + * Function: H5B2__cache_hdr_clear * * Purpose: Mark a B-tree header in memory as non-dirty. * @@ -421,11 +421,11 @@ done: *------------------------------------------------------------------------- */ static herr_t -H5B2_cache_hdr_clear(H5F_t *f, H5B2_hdr_t *hdr, hbool_t destroy) +H5B2__cache_hdr_clear(H5F_t *f, H5B2_hdr_t *hdr, hbool_t destroy) { herr_t ret_value = SUCCEED; /* Return value */ - FUNC_ENTER_NOAPI_NOINIT + FUNC_ENTER_STATIC /* * Check arguments. @@ -436,16 +436,16 @@ H5B2_cache_hdr_clear(H5F_t *f, H5B2_hdr_t *hdr, hbool_t destroy) hdr->cache_info.is_dirty = FALSE; if(destroy) - if(H5B2_cache_hdr_dest(f, hdr) < 0) + if(H5B2__cache_hdr_dest(f, hdr) < 0) HGOTO_ERROR(H5E_BTREE, H5E_CANTFREE, FAIL, "unable to destroy B-tree header") done: FUNC_LEAVE_NOAPI(ret_value) -} /* end H5B2_cache_hdr_clear() */ +} /* end H5B2__cache_hdr_clear() */ /*------------------------------------------------------------------------- - * Function: H5B2_cache_hdr_size + * Function: H5B2__cache_hdr_size * * Purpose: Compute the size in bytes of a B-tree header * on disk, and return it in *size_ptr. On failure, @@ -460,9 +460,9 @@ done: *------------------------------------------------------------------------- */ static herr_t -H5B2_cache_hdr_size(const H5F_t UNUSED *f, const H5B2_hdr_t *hdr, size_t *size_ptr) +H5B2__cache_hdr_size(const H5F_t UNUSED *f, const H5B2_hdr_t *hdr, size_t *size_ptr) { - FUNC_ENTER_NOAPI_NOINIT + FUNC_ENTER_STATIC_NOERR /* check arguments */ HDassert(f); @@ -472,11 +472,11 @@ H5B2_cache_hdr_size(const H5F_t UNUSED *f, const H5B2_hdr_t *hdr, size_t *size_p *size_ptr = hdr->hdr_size; FUNC_LEAVE_NOAPI(SUCCEED) -} /* H5B2_cache_hdr_size() */ +} /* H5B2__cache_hdr_size() */ /*------------------------------------------------------------------------- - * Function: H5B2_cache_internal_load + * Function: H5B2__cache_internal_load * * Purpose: Loads a B-tree internal node from the disk. * @@ -490,7 +490,7 @@ H5B2_cache_hdr_size(const H5F_t UNUSED *f, const H5B2_hdr_t *hdr, size_t *size_p *------------------------------------------------------------------------- */ static H5B2_internal_t * -H5B2_cache_internal_load(H5F_t *f, hid_t dxpl_id, haddr_t addr, void *_udata) +H5B2__cache_internal_load(H5F_t *f, hid_t dxpl_id, haddr_t addr, void *_udata) { H5B2_internal_cache_ud_t *udata = (H5B2_internal_cache_ud_t *)_udata; /* Pointer to user data */ H5B2_internal_t *internal = NULL; /* Internal node read */ @@ -502,7 +502,7 @@ H5B2_cache_internal_load(H5F_t *f, hid_t dxpl_id, haddr_t addr, void *_udata) unsigned u; /* Local index variable */ H5B2_internal_t *ret_value; /* Return value */ - FUNC_ENTER_NOAPI_NOINIT + FUNC_ENTER_STATIC /* Check arguments */ HDassert(f); @@ -604,11 +604,11 @@ done: HDONE_ERROR(H5E_BTREE, H5E_CANTFREE, NULL, "unable to destroy B-tree internal node") FUNC_LEAVE_NOAPI(ret_value) -} /* H5B2_cache_internal_load() */ /*lint !e818 Can't make udata a pointer to const */ +} /* H5B2__cache_internal_load() */ /*lint !e818 Can't make udata a pointer to const */ /*------------------------------------------------------------------------- - * Function: H5B2_cache_internal_flush + * Function: H5B2__cache_internal_flush * * Purpose: Flushes a dirty B-tree internal node to disk. * @@ -621,11 +621,11 @@ done: *------------------------------------------------------------------------- */ static herr_t -H5B2_cache_internal_flush(H5F_t *f, hid_t dxpl_id, hbool_t destroy, haddr_t addr, H5B2_internal_t *internal, unsigned UNUSED * flags_ptr) +H5B2__cache_internal_flush(H5F_t *f, hid_t dxpl_id, hbool_t destroy, haddr_t addr, H5B2_internal_t *internal, unsigned UNUSED * flags_ptr) { herr_t ret_value = SUCCEED; /* Return value */ - FUNC_ENTER_NOAPI_NOINIT + FUNC_ENTER_STATIC /* check arguments */ HDassert(f); @@ -696,16 +696,16 @@ H5B2_cache_internal_flush(H5F_t *f, hid_t dxpl_id, hbool_t destroy, haddr_t addr } /* end if */ if(destroy) - if(H5B2_cache_internal_dest(f, internal) < 0) + if(H5B2__cache_internal_dest(f, internal) < 0) HGOTO_ERROR(H5E_BTREE, H5E_CANTFREE, FAIL, "unable to destroy B-tree internal node") done: FUNC_LEAVE_NOAPI(ret_value) -} /* H5B2_cache_internal_flush() */ +} /* H5B2__cache_internal_flush() */ /*------------------------------------------------------------------------- - * Function: H5B2_cache_internal_dest + * Function: H5B2__cache_internal_dest * * Purpose: Destroys a B-tree internal node in memory. * @@ -718,11 +718,11 @@ done: *------------------------------------------------------------------------- */ static herr_t -H5B2_cache_internal_dest(H5F_t *f, H5B2_internal_t *internal) +H5B2__cache_internal_dest(H5F_t *f, H5B2_internal_t *internal) { herr_t ret_value = SUCCEED; /* Return value */ - FUNC_ENTER_NOAPI_NOINIT + FUNC_ENTER_STATIC /* Check arguments */ HDassert(f); @@ -746,11 +746,11 @@ H5B2_cache_internal_dest(H5F_t *f, H5B2_internal_t *internal) done: FUNC_LEAVE_NOAPI(ret_value) -} /* end H5B2_cache_internal_dest() */ +} /* end H5B2__cache_internal_dest() */ /*------------------------------------------------------------------------- - * Function: H5B2_cache_internal_clear + * Function: H5B2__cache_internal_clear * * Purpose: Mark a B-tree internal node in memory as non-dirty. * @@ -763,11 +763,11 @@ done: *------------------------------------------------------------------------- */ static herr_t -H5B2_cache_internal_clear(H5F_t *f, H5B2_internal_t *internal, hbool_t destroy) +H5B2__cache_internal_clear(H5F_t *f, H5B2_internal_t *internal, hbool_t destroy) { herr_t ret_value = SUCCEED; - FUNC_ENTER_NOAPI_NOINIT + FUNC_ENTER_STATIC /* * Check arguments. @@ -778,16 +778,16 @@ H5B2_cache_internal_clear(H5F_t *f, H5B2_internal_t *internal, hbool_t destroy) internal->cache_info.is_dirty = FALSE; if(destroy) - if(H5B2_cache_internal_dest(f, internal) < 0) + if(H5B2__cache_internal_dest(f, internal) < 0) HGOTO_ERROR(H5E_BTREE, H5E_CANTFREE, FAIL, "unable to destroy B-tree internal node") done: FUNC_LEAVE_NOAPI(ret_value) -} /* end H5B2_cache_internal_clear() */ +} /* end H5B2__cache_internal_clear() */ /*------------------------------------------------------------------------- - * Function: H5B2_cache_internal_size + * Function: H5B2__cache_internal_size * * Purpose: Compute the size in bytes of a B-tree internal node * on disk, and return it in *size_ptr. On failure, @@ -802,9 +802,9 @@ done: *------------------------------------------------------------------------- */ static herr_t -H5B2_cache_internal_size(const H5F_t UNUSED *f, const H5B2_internal_t *internal, size_t *size_ptr) +H5B2__cache_internal_size(const H5F_t UNUSED *f, const H5B2_internal_t *internal, size_t *size_ptr) { - FUNC_ENTER_NOAPI_NOINIT_NOERR + FUNC_ENTER_STATIC_NOERR /* check arguments */ HDassert(internal); @@ -815,11 +815,11 @@ H5B2_cache_internal_size(const H5F_t UNUSED *f, const H5B2_internal_t *internal, *size_ptr = internal->hdr->node_size; FUNC_LEAVE_NOAPI(SUCCEED) -} /* H5B2_cache_internal_size() */ +} /* H5B2__cache_internal_size() */ /*------------------------------------------------------------------------- - * Function: H5B2_cache_leaf_load + * Function: H5B2__cache_leaf_load * * Purpose: Loads a B-tree leaf from the disk. * @@ -833,7 +833,7 @@ H5B2_cache_internal_size(const H5F_t UNUSED *f, const H5B2_internal_t *internal, *------------------------------------------------------------------------- */ static H5B2_leaf_t * -H5B2_cache_leaf_load(H5F_t UNUSED *f, hid_t dxpl_id, haddr_t addr, void *_udata) +H5B2__cache_leaf_load(H5F_t UNUSED *f, hid_t dxpl_id, haddr_t addr, void *_udata) { H5B2_leaf_cache_ud_t *udata = (H5B2_leaf_cache_ud_t *)_udata; H5B2_leaf_t *leaf = NULL; /* Pointer to lead node loaded */ @@ -844,7 +844,7 @@ H5B2_cache_leaf_load(H5F_t UNUSED *f, hid_t dxpl_id, haddr_t addr, void *_udata) unsigned u; /* Local index variable */ H5B2_leaf_t *ret_value; /* Return value */ - FUNC_ENTER_NOAPI_NOINIT + FUNC_ENTER_STATIC /* Check arguments */ HDassert(f); @@ -926,11 +926,11 @@ done: HDONE_ERROR(H5E_BTREE, H5E_CANTFREE, NULL, "unable to destroy B-tree leaf node") FUNC_LEAVE_NOAPI(ret_value) -} /* H5B2_cache_leaf_load() */ /*lint !e818 Can't make udata a pointer to const */ +} /* H5B2__cache_leaf_load() */ /*lint !e818 Can't make udata a pointer to const */ /*------------------------------------------------------------------------- - * Function: H5B2_cache_leaf_flush + * Function: H5B2__cache_leaf_flush * * Purpose: Flushes a dirty B-tree leaf node to disk. * @@ -943,11 +943,11 @@ done: *------------------------------------------------------------------------- */ static herr_t -H5B2_cache_leaf_flush(H5F_t *f, hid_t dxpl_id, hbool_t destroy, haddr_t addr, H5B2_leaf_t *leaf, unsigned UNUSED * flags_ptr) +H5B2__cache_leaf_flush(H5F_t *f, hid_t dxpl_id, hbool_t destroy, haddr_t addr, H5B2_leaf_t *leaf, unsigned UNUSED * flags_ptr) { herr_t ret_value = SUCCEED; /* Return value */ - FUNC_ENTER_NOAPI_NOINIT + FUNC_ENTER_STATIC /* check arguments */ HDassert(f); @@ -1004,16 +1004,16 @@ H5B2_cache_leaf_flush(H5F_t *f, hid_t dxpl_id, hbool_t destroy, haddr_t addr, H5 } /* end if */ if(destroy) - if(H5B2_cache_leaf_dest(f, leaf) < 0) + if(H5B2__cache_leaf_dest(f, leaf) < 0) HGOTO_ERROR(H5E_BTREE, H5E_CANTFREE, FAIL, "unable to destroy B-tree leaf node") done: FUNC_LEAVE_NOAPI(ret_value) -} /* H5B2_cache_leaf_flush() */ +} /* H5B2__cache_leaf_flush() */ /*------------------------------------------------------------------------- - * Function: H5B2_cache_leaf_dest + * Function: H5B2__cache_leaf_dest * * Purpose: Destroys a B-tree leaf node in memory. * @@ -1026,11 +1026,11 @@ done: *------------------------------------------------------------------------- */ static herr_t -H5B2_cache_leaf_dest(H5F_t *f, H5B2_leaf_t *leaf) +H5B2__cache_leaf_dest(H5F_t *f, H5B2_leaf_t *leaf) { herr_t ret_value = SUCCEED; /* Return value */ - FUNC_ENTER_NOAPI_NOINIT + FUNC_ENTER_STATIC /* Check arguments */ HDassert(f); @@ -1054,11 +1054,11 @@ H5B2_cache_leaf_dest(H5F_t *f, H5B2_leaf_t *leaf) done: FUNC_LEAVE_NOAPI(ret_value) -} /* end H5B2_cache_leaf_dest() */ +} /* end H5B2__cache_leaf_dest() */ /*------------------------------------------------------------------------- - * Function: H5B2_cache_leaf_clear + * Function: H5B2__cache_leaf_clear * * Purpose: Mark a B-tree leaf node in memory as non-dirty. * @@ -1071,11 +1071,11 @@ done: *------------------------------------------------------------------------- */ static herr_t -H5B2_cache_leaf_clear(H5F_t *f, H5B2_leaf_t *leaf, hbool_t destroy) +H5B2__cache_leaf_clear(H5F_t *f, H5B2_leaf_t *leaf, hbool_t destroy) { herr_t ret_value = SUCCEED; - FUNC_ENTER_NOAPI_NOINIT + FUNC_ENTER_STATIC /* * Check arguments. @@ -1086,16 +1086,16 @@ H5B2_cache_leaf_clear(H5F_t *f, H5B2_leaf_t *leaf, hbool_t destroy) leaf->cache_info.is_dirty = FALSE; if(destroy) - if(H5B2_cache_leaf_dest(f, leaf) < 0) + if(H5B2__cache_leaf_dest(f, leaf) < 0) HGOTO_ERROR(H5E_BTREE, H5E_CANTFREE, FAIL, "unable to destroy B-tree leaf node") done: FUNC_LEAVE_NOAPI(ret_value) -} /* end H5B2_cache_leaf_clear() */ +} /* end H5B2__cache_leaf_clear() */ /*------------------------------------------------------------------------- - * Function: H5B2_cache_leaf_size + * Function: H5B2__cache_leaf_size * * Purpose: Compute the size in bytes of a B-tree leaf node * on disk, and return it in *size_ptr. On failure, @@ -1110,9 +1110,9 @@ done: *------------------------------------------------------------------------- */ static herr_t -H5B2_cache_leaf_size(const H5F_t UNUSED *f, const H5B2_leaf_t *leaf, size_t *size_ptr) +H5B2__cache_leaf_size(const H5F_t UNUSED *f, const H5B2_leaf_t *leaf, size_t *size_ptr) { - FUNC_ENTER_NOAPI_NOERR + FUNC_ENTER_STATIC_NOERR /* check arguments */ HDassert(leaf); @@ -1123,5 +1123,5 @@ H5B2_cache_leaf_size(const H5F_t UNUSED *f, const H5B2_leaf_t *leaf, size_t *siz *size_ptr = leaf->hdr->node_size; FUNC_LEAVE_NOAPI(SUCCEED) -} /* H5B2_cache_leaf_size() */ +} /* H5B2__cache_leaf_size() */ diff --git a/src/H5B2hdr.c b/src/H5B2hdr.c index c90b296..60eff61 100644 --- a/src/H5B2hdr.c +++ b/src/H5B2hdr.c @@ -413,7 +413,7 @@ done: herr_t H5B2_hdr_fuse_incr(H5B2_hdr_t *hdr) { - FUNC_ENTER_NOAPI_NOINIT + FUNC_ENTER_NOAPI_NOINIT_NOERR /* Sanity check */ HDassert(hdr); @@ -441,7 +441,7 @@ H5B2_hdr_fuse_incr(H5B2_hdr_t *hdr) size_t H5B2_hdr_fuse_decr(H5B2_hdr_t *hdr) { - FUNC_ENTER_NOAPI_NOINIT + FUNC_ENTER_NOAPI_NOINIT_NOERR /* Sanity check */ HDassert(hdr); diff --git a/src/H5B2stat.c b/src/H5B2stat.c index a8f1fbd..5e48a6f 100644 --- a/src/H5B2stat.c +++ b/src/H5B2stat.c @@ -86,7 +86,7 @@ herr_t H5B2_stat_info(H5B2_t *bt2, H5B2_stat_t *info) { - FUNC_ENTER_NOAPI_NOINIT + FUNC_ENTER_NOAPI_NOINIT_NOERR /* Check arguments. */ HDassert(info); diff --git a/src/H5Bcache.c b/src/H5Bcache.c index 68fb920..968c5ee 100644 --- a/src/H5Bcache.c +++ b/src/H5Bcache.c @@ -55,11 +55,11 @@ /********************/ /* Metadata cache callbacks */ -static H5B_t *H5B_load(H5F_t *f, hid_t dxpl_id, haddr_t addr, void *udata); -static herr_t H5B_flush(H5F_t *f, hid_t dxpl_id, hbool_t destroy, haddr_t addr, H5B_t *b, unsigned UNUSED * flags_ptr); -static herr_t H5B_dest(H5F_t *f, H5B_t *bt); -static herr_t H5B_clear(H5F_t *f, H5B_t *b, hbool_t destroy); -static herr_t H5B_compute_size(const H5F_t *f, const H5B_t *bt, size_t *size_ptr); +static H5B_t *H5B__load(H5F_t *f, hid_t dxpl_id, haddr_t addr, void *udata); +static herr_t H5B__flush(H5F_t *f, hid_t dxpl_id, hbool_t destroy, haddr_t addr, H5B_t *b, unsigned UNUSED * flags_ptr); +static herr_t H5B__dest(H5F_t *f, H5B_t *bt); +static herr_t H5B__clear(H5F_t *f, H5B_t *b, hbool_t destroy); +static herr_t H5B__compute_size(const H5F_t *f, const H5B_t *bt, size_t *size_ptr); /*********************/ @@ -69,12 +69,12 @@ static herr_t H5B_compute_size(const H5F_t *f, const H5B_t *bt, size_t *size_ptr /* H5B inherits cache-like properties from H5AC */ const H5AC_class_t H5AC_BT[1] = {{ H5AC_BT_ID, - (H5AC_load_func_t)H5B_load, - (H5AC_flush_func_t)H5B_flush, - (H5AC_dest_func_t)H5B_dest, - (H5AC_clear_func_t)H5B_clear, + (H5AC_load_func_t)H5B__load, + (H5AC_flush_func_t)H5B__flush, + (H5AC_dest_func_t)H5B__dest, + (H5AC_clear_func_t)H5B__clear, (H5AC_notify_func_t)NULL, - (H5AC_size_func_t)H5B_compute_size, + (H5AC_size_func_t)H5B__compute_size, }}; /*******************/ @@ -84,7 +84,7 @@ const H5AC_class_t H5AC_BT[1] = {{ /*------------------------------------------------------------------------- - * Function: H5B_load + * Function: H5B__load * * Purpose: Loads a B-tree node from the disk. * @@ -98,7 +98,7 @@ const H5AC_class_t H5AC_BT[1] = {{ *------------------------------------------------------------------------- */ static H5B_t * -H5B_load(H5F_t *f, hid_t dxpl_id, haddr_t addr, void *_udata) +H5B__load(H5F_t *f, hid_t dxpl_id, haddr_t addr, void *_udata) { H5B_t *bt = NULL; /* Pointer to the deserialized B-tree node */ H5B_cache_ud_t *udata = (H5B_cache_ud_t *)_udata; /* User data for callback */ @@ -108,7 +108,7 @@ H5B_load(H5F_t *f, hid_t dxpl_id, haddr_t addr, void *_udata) unsigned u; /* Local index variable */ H5B_t *ret_value; /* Return value */ - FUNC_ENTER_NOAPI_NOINIT + FUNC_ENTER_STATIC /* Check arguments */ HDassert(f); @@ -189,11 +189,11 @@ done: HDONE_ERROR(H5E_BTREE, H5E_CANTFREE, NULL, "unable to destroy B-tree node") FUNC_LEAVE_NOAPI(ret_value) -} /* end H5B_load() */ /*lint !e818 Can't make udata a pointer to const */ +} /* end H5B__load() */ /*lint !e818 Can't make udata a pointer to const */ /*------------------------------------------------------------------------- - * Function: H5B_flush + * Function: H5B__flush * * Purpose: Flushes a dirty B-tree node to disk. * @@ -206,12 +206,12 @@ done: *------------------------------------------------------------------------- */ static herr_t -H5B_flush(H5F_t *f, hid_t dxpl_id, hbool_t destroy, haddr_t addr, H5B_t *bt, unsigned UNUSED * flags_ptr) +H5B__flush(H5F_t *f, hid_t dxpl_id, hbool_t destroy, haddr_t addr, H5B_t *bt, unsigned UNUSED * flags_ptr) { H5B_shared_t *shared; /* Pointer to shared B-tree info */ herr_t ret_value = SUCCEED; /* Return value */ - FUNC_ENTER_NOAPI_NOINIT + FUNC_ENTER_STATIC /* check arguments */ HDassert(f); @@ -275,16 +275,16 @@ H5B_flush(H5F_t *f, hid_t dxpl_id, hbool_t destroy, haddr_t addr, H5B_t *bt, uns } /* end if */ if(destroy) - if(H5B_dest(f, bt) < 0) + if(H5B__dest(f, bt) < 0) HGOTO_ERROR(H5E_BTREE, H5E_CANTFREE, FAIL, "unable to destroy B-tree node") done: FUNC_LEAVE_NOAPI(ret_value) -} /* end H5B_flush() */ +} /* end H5B__flush() */ /*------------------------------------------------------------------------- - * Function: H5B_dest + * Function: H5B__dest * * Purpose: Destroys a B-tree node in memory. * @@ -297,11 +297,11 @@ done: *------------------------------------------------------------------------- */ static herr_t -H5B_dest(H5F_t *f, H5B_t *bt) +H5B__dest(H5F_t *f, H5B_t *bt) { herr_t ret_value = SUCCEED; /* Return value */ - FUNC_ENTER_NOAPI_NOINIT + FUNC_ENTER_STATIC /* * Check arguments. @@ -333,11 +333,11 @@ H5B_dest(H5F_t *f, H5B_t *bt) done: FUNC_LEAVE_NOAPI(ret_value) -} /* end H5B_dest() */ +} /* end H5B__dest() */ /*------------------------------------------------------------------------- - * Function: H5B_clear + * Function: H5B__clear * * Purpose: Mark a B-tree node in memory as non-dirty. * @@ -350,11 +350,11 @@ done: *------------------------------------------------------------------------- */ static herr_t -H5B_clear(H5F_t *f, H5B_t *bt, hbool_t destroy) +H5B__clear(H5F_t *f, H5B_t *bt, hbool_t destroy) { herr_t ret_value = SUCCEED; - FUNC_ENTER_NOAPI_NOINIT + FUNC_ENTER_STATIC /* * Check arguments. @@ -365,16 +365,16 @@ H5B_clear(H5F_t *f, H5B_t *bt, hbool_t destroy) bt->cache_info.is_dirty = FALSE; if(destroy) - if(H5B_dest(f, bt) < 0) + if(H5B__dest(f, bt) < 0) HGOTO_ERROR(H5E_BTREE, H5E_CANTFREE, FAIL, "unable to destroy B-tree node") done: FUNC_LEAVE_NOAPI(ret_value) -} /* end H5B_clear() */ +} /* end H5B__clear() */ /*------------------------------------------------------------------------- - * Function: H5B_compute_size + * Function: H5B__compute_size * * Purpose: Compute the size in bytes of the specified instance of * H5B_t on disk, and return it in *len_ptr. On failure, @@ -388,11 +388,11 @@ done: *------------------------------------------------------------------------- */ static herr_t -H5B_compute_size(const H5F_t UNUSED *f, const H5B_t *bt, size_t *size_ptr) +H5B__compute_size(const H5F_t UNUSED *f, const H5B_t *bt, size_t *size_ptr) { H5B_shared_t *shared; /* Pointer to shared B-tree info */ - FUNC_ENTER_NOAPI_NOINIT + FUNC_ENTER_STATIC_NOERR /* check arguments */ HDassert(f); @@ -407,5 +407,5 @@ H5B_compute_size(const H5F_t UNUSED *f, const H5B_t *bt, size_t *size_ptr) *size_ptr = shared->sizeof_rnode; FUNC_LEAVE_NOAPI(SUCCEED) -} /* H5B_compute_size() */ +} /* H5B__compute_size() */ diff --git a/src/H5Dchunk.c b/src/H5Dchunk.c index dd1860f..db195ca 100644 --- a/src/H5Dchunk.c +++ b/src/H5Dchunk.c @@ -307,7 +307,6 @@ H5D__chunk_direct_write(const H5D_t *dset, hid_t dxpl_id, uint32_t filters, hsiz const H5D_rdcc_t *rdcc = &(dset->shared->cache.chunk); /*raw data chunk cache */ int space_ndims; /* Dataset's space rank */ hsize_t space_dim[H5O_LAYOUT_NDIMS]; /* Dataset's dataspace dimensions */ - H5FD_t *lf; herr_t ret_value = SUCCEED; /* Return value */ FUNC_ENTER_STATIC_TAG(dxpl_id, dset->oloc.addr, FAIL) diff --git a/src/H5FDmulti.c b/src/H5FDmulti.c index f907e0a..e5775ab 100644 --- a/src/H5FDmulti.c +++ b/src/H5FDmulti.c @@ -1783,7 +1783,6 @@ H5FD_multi_read(H5FD_t *_file, H5FD_mem_t type, hid_t dxpl_id, haddr_t addr, htri_t prop_exists = FALSE; /* Whether the multi VFD DXPL property already exists */ H5FD_mem_t mt, mmt, hi = H5FD_MEM_DEFAULT; haddr_t start_addr = 0; - static const char *func = "H5FD_multi_read"; /* Function Name for error reporting */ dxpl_id = dxpl_id; /* Suppress compiler warning */ /* Clear the error stack */ @@ -1836,7 +1835,6 @@ H5FD_multi_write(H5FD_t *_file, H5FD_mem_t type, hid_t dxpl_id, haddr_t addr, htri_t prop_exists = FALSE; /* Whether the multi VFD DXPL property already exists */ H5FD_mem_t mt, mmt, hi = H5FD_MEM_DEFAULT; haddr_t start_addr = 0; - static const char *func = "H5FD_multi_read"; /* Function Name for error reporting */ dxpl_id = dxpl_id; /* Suppress compiler warning */ /* Clear the error stack */ diff --git a/src/H5G.c b/src/H5G.c index bd4ad9b..4f2d0e1 100644 --- a/src/H5G.c +++ b/src/H5G.c @@ -495,14 +495,7 @@ done: hid_t H5Gget_create_plist(hid_t group_id) { - H5O_linfo_t linfo; /* Link info message */ - htri_t ginfo_exists; - htri_t linfo_exists; - htri_t pline_exists; H5G_t *group = NULL; - H5P_genplist_t *gcpl_plist; - H5P_genplist_t *new_plist; - hid_t new_gcpl_id = FAIL; hid_t ret_value = FAIL; FUNC_ENTER_API(FAIL) diff --git a/src/H5Gent.c b/src/H5Gent.c index 17893fa..2cef9f7 100644 --- a/src/H5Gent.c +++ b/src/H5Gent.c @@ -361,7 +361,7 @@ H5G__ent_copy(H5G_entry_t *dst, const H5G_entry_t *src, H5_copy_depth_t depth) void H5G__ent_reset(H5G_entry_t *ent) { - FUNC_ENTER_PACKAGE + FUNC_ENTER_PACKAGE_NOERR /* Check arguments */ HDassert(ent); diff --git a/src/H5Pocpl.c b/src/H5Pocpl.c index 2166020..32f6a1b 100644 --- a/src/H5Pocpl.c +++ b/src/H5Pocpl.c @@ -1195,7 +1195,6 @@ htri_t H5P_filter_in_pline(H5P_genplist_t *plist, H5Z_filter_t id) { H5O_pline_t pline; /* Filter pipeline */ - H5Z_filter_info_t *filter; /* Pointer to filter information */ htri_t ret_value = SUCCEED; /* Return value */ FUNC_ENTER_NOAPI(FAIL) diff --git a/src/H5dbg.c b/src/H5dbg.c index 5441895..2039a51 100644 --- a/src/H5dbg.c +++ b/src/H5dbg.c @@ -83,7 +83,7 @@ H5_buffer_dump(FILE *stream, int indent, const uint8_t *buf, { size_t u, v; /* Local index variable */ - FUNC_ENTER_NOAPI_NOINIT + FUNC_ENTER_NOAPI_NOINIT_NOERR /* * Check arguments. -- cgit v0.12 From ad7624ada3acaa03d1a588383250465f61e4838f Mon Sep 17 00:00:00 2001 From: Allen Byrne Date: Tue, 30 Jul 2013 12:04:23 -0500 Subject: [svn-r23944] Move stream functions into tools lib. Tested: local linux --- tools/h5dump/h5dump.c | 176 ++------------------------------------- tools/lib/h5tools.c | 224 ++++++++++++++++++++++++++++++++++++++++++++++++-- tools/lib/h5tools.h | 8 +- 3 files changed, 230 insertions(+), 178 deletions(-) diff --git a/tools/h5dump/h5dump.c b/tools/h5dump/h5dump.c index 9b304bd..8e60bf7 100644 --- a/tools/h5dump/h5dump.c +++ b/tools/h5dump/h5dump.c @@ -481,172 +481,6 @@ table_list_free(void) } /* end table_list_free() */ /*------------------------------------------------------------------------- - * Function: set_data_output_file - * - * Purpose: Open fname as the output file for dataset raw data. - * Set rawdatastream as its file stream. - * - * Return: 0 -- succeeded - * negative -- failed - * - * Programmer: Albert Cheng, 2000/09/30 - * - * Modifications: - * pvn June, 1, 2006. Add a switch for binary output - * - *------------------------------------------------------------------------- - */ -static int -set_data_output_file(const char *fname, int is_bin) -{ - int retvalue = FAIL; - FILE *f; /* temporary holding place for the stream pointer - * so that rawdatastream is changed only when succeeded */ - - if (rawdatastream && rawdatastream != stdout) { - if (HDfclose(rawdatastream)) - HDperror("closing rawdatastream"); - else - rawdatastream = NULL; - } - - /* First check if filename is string "NULL" */ - if (fname != NULL) { - /* binary output */ - if (is_bin) { - if ((f = HDfopen(fname, "wb")) != NULL) { - rawdatastream = f; - retvalue = SUCCEED; - } - } - else { - if ((f = HDfopen(fname, "w")) != NULL) { - rawdatastream = f; - retvalue = SUCCEED; - } - } - } - else { - rawdatastream = NULL; - retvalue = SUCCEED; - } - - return retvalue; -} - -/*------------------------------------------------------------------------- - * Function: set_attr_output_file - * - * Purpose: Open fname as the output file for attribute raw data. - * Set rawattrstream as its file stream. - * - * Return: 0 -- succeeded - * negative -- failed - * - *------------------------------------------------------------------------- - */ -static int -set_attr_output_file(const char *fname, int is_bin) -{ - int retvalue = FAIL; - FILE *f; /* temporary holding place for the stream pointer - * so that rawattrstream is changed only when succeeded */ - - if (rawattrstream && rawattrstream != stdout) { - if (HDfclose(rawattrstream)) - HDperror("closing rawattrstream"); - else - rawattrstream = NULL; - } - - /* First check if filename is string "NULL" */ - if (fname != NULL) { - if ((f = HDfopen(fname, "w")) != NULL) { - rawattrstream = f; - retvalue = SUCCEED; - } - } - else { - rawattrstream = NULL; - retvalue = SUCCEED; - } - - return retvalue; -} - -/*------------------------------------------------------------------------- - * Function: set_output_file - * - * Purpose: Open fname as the output file for raw output. - * Set rawoutstream as its file stream. - * - * Return: 0 -- succeeded - * negative -- failed - * - *------------------------------------------------------------------------- - */ -static int -set_output_file(const char *fname) -{ - int retvalue = FAIL; - FILE *f; /* temporary holding place for the stream pointer - * so that rawoutstream is changed only when succeeded */ - - if (rawoutstream && rawoutstream != stdout) { - if (HDfclose(rawoutstream)) - HDperror("closing rawoutstream"); - else - rawoutstream = NULL; - } - /* First check if filename is string "NULL" */ - if (fname != NULL) { - if ((f = HDfopen(fname, "w")) != NULL) { - rawoutstream = f; - retvalue = SUCCEED; - } - } - else { - rawoutstream = NULL; - retvalue = SUCCEED; - } - - return retvalue; -} - -/*------------------------------------------------------------------------- - * Function: set_error_file - * - * Purpose: Open fname as the error output file for dataset raw error. - * Set rawerrorstream as its file stream. - * - * Return: 0 -- succeeded - * negative -- failed - * - *------------------------------------------------------------------------- - */ -static int -set_error_file(const char *fname) -{ - int retvalue = FAIL; - FILE *f; /* temporary holding place for the stream pointer - * so that rawerrorstream is changed only when succeeded */ - - if (rawerrorstream && rawerrorstream != stderr) { - if (HDfclose(rawerrorstream)) - HDperror("closing rawerrorstream"); - else - rawerrorstream = NULL; - } - - if ((f = HDfopen(fname, "w")) != NULL) { - rawerrorstream = f; - retvalue = SUCCEED; - } - - return retvalue; -} - -/*------------------------------------------------------------------------- * Function: set_binary_form * * Purpose: set the binary form of output by translating from a string input @@ -1186,7 +1020,7 @@ parse_start: break; case 'O': - if (set_output_file(opt_arg) < 0) { + if (h5tools_set_output_file(opt_arg) < 0) { usage(h5tools_getprogname()); goto error; } @@ -1194,20 +1028,20 @@ parse_start: case 'o': if ( bin_output ) { - if (set_data_output_file(opt_arg, 1) < 0) { + if (h5tools_set_data_output_file(opt_arg, 1) < 0) { usage(h5tools_getprogname()); goto error; } } else { if(display_attr_data && !display_data) { - if (set_attr_output_file(opt_arg, 0) < 0) { + if (h5tools_set_attr_output_file(opt_arg, 0) < 0) { usage(h5tools_getprogname()); goto error; } } if(display_data || display_all) { - if (set_data_output_file(opt_arg, 0) < 0) { + if (h5tools_set_data_output_file(opt_arg, 0) < 0) { usage(h5tools_getprogname()); goto error; } @@ -1229,7 +1063,7 @@ parse_start: } bin_output = TRUE; if (outfname!=NULL) { - if (set_data_output_file(outfname, 1) < 0) { + if (h5tools_set_data_output_file(outfname, 1) < 0) { /* failed to set output file */ usage(h5tools_getprogname()); goto error; diff --git a/tools/lib/h5tools.c b/tools/lib/h5tools.c index 3e9c43e..2e48889 100644 --- a/tools/lib/h5tools.c +++ b/tools/lib/h5tools.c @@ -36,10 +36,11 @@ hid_t H5tools_ERR_CLS_g = -1; hid_t H5E_tools_g = -1; hid_t H5E_tools_min_id_g = -1; int compound_data; -FILE *rawattrstream; /* should initialize to stdout but gcc moans about it */ -FILE *rawdatastream; /* should initialize to stdout but gcc moans about it */ -FILE *rawoutstream; /* should initialize to stdout but gcc moans about it */ -FILE *rawerrorstream; /* should initialize to stderr but gcc moans about it */ +FILE *rawattrstream = NULL; /* should initialize to stdout but gcc moans about it */ +FILE *rawdatastream = NULL; /* should initialize to stdout but gcc moans about it */ +FILE *rawinstream = NULL; /* should initialize to stdin but gcc moans about it */ +FILE *rawoutstream = NULL; /* should initialize to stdout but gcc moans about it */ +FILE *rawerrorstream = NULL; /* should initialize to stderr but gcc moans about it */ int bin_output; /* binary output */ int bin_form; /* binary form */ int region_output; /* region output */ @@ -120,6 +121,8 @@ h5tools_init(void) rawattrstream = stdout; if (!rawdatastream) rawdatastream = stdout; + if (!rawinstream) + rawinstream = stdin; if (!rawoutstream) rawoutstream = stdout; if (!rawerrorstream) @@ -172,6 +175,12 @@ h5tools_close(void) else rawdatastream = NULL; } + if (rawinstream && rawinstream != stdin) { + if (fclose(rawinstream)) + perror("closing rawinstream"); + else + rawinstream = NULL; + } if (rawoutstream && rawoutstream != stdout) { if (fclose(rawoutstream)) perror("closing rawoutstream"); @@ -198,6 +207,211 @@ h5tools_close(void) } /*------------------------------------------------------------------------- + * Function: h5tools_set_data_output_file + * + * Purpose: Open fname as the output file for dataset raw data. + * Set rawdatastream as its file stream. + * + * Return: 0 -- succeeded + * negative -- failed + * + * Programmer: Albert Cheng, 2000/09/30 + * + * Modifications: + * pvn June, 1, 2006. Add a switch for binary output + * + *------------------------------------------------------------------------- + */ +int +h5tools_set_data_output_file(const char *fname, int is_bin) +{ + int retvalue = FAIL; + FILE *f; /* temporary holding place for the stream pointer + * so that rawdatastream is changed only when succeeded */ + + if (rawdatastream && rawdatastream != stdout) { + if (HDfclose(rawdatastream)) + HDperror("closing rawdatastream"); + else + rawdatastream = NULL; + } + + /* First check if filename is string "NULL" */ + if (fname != NULL) { + /* binary output */ + if (is_bin) { + if ((f = HDfopen(fname, "wb")) != NULL) { + rawdatastream = f; + retvalue = SUCCEED; + } + } + else { + if ((f = HDfopen(fname, "w")) != NULL) { + rawdatastream = f; + retvalue = SUCCEED; + } + } + } + else { + rawdatastream = NULL; + retvalue = SUCCEED; + } + + return retvalue; +} + +/*------------------------------------------------------------------------- + * Function: h5tools_set_attr_output_file + * + * Purpose: Open fname as the output file for attribute raw data. + * Set rawattrstream as its file stream. + * + * Return: 0 -- succeeded + * negative -- failed + * + *------------------------------------------------------------------------- + */ +int +h5tools_set_attr_output_file(const char *fname, int is_bin) +{ + int retvalue = FAIL; + FILE *f; /* temporary holding place for the stream pointer + * so that rawattrstream is changed only when succeeded */ + + if (rawattrstream && rawattrstream != stdout) { + if (HDfclose(rawattrstream)) + HDperror("closing rawattrstream"); + else + rawattrstream = NULL; + } + + /* First check if filename is string "NULL" */ + if (fname != NULL) { + if ((f = HDfopen(fname, "w")) != NULL) { + rawattrstream = f; + retvalue = SUCCEED; + } + } + else { + rawattrstream = NULL; + retvalue = SUCCEED; + } + + return retvalue; +} + +/*------------------------------------------------------------------------- + * Function: h5tools_set_input_file + * + * Purpose: Open fname as the input file for raw input. + * Set rawinstream as its file stream. + * + * Return: 0 -- succeeded + * negative -- failed + * + *------------------------------------------------------------------------- + */ +int +h5tools_set_input_file(const char *fname) +{ + int retvalue = FAIL; + FILE *f; /* temporary holding place for the stream pointer + * so that rawinstream is changed only when succeeded */ + + if (rawinstream && rawinstream != stdin) { + if (HDfclose(rawinstream)) + HDperror("closing rawinstream"); + else + rawinstream = NULL; + } + /* First check if filename is string "NULL" */ + if (fname != NULL) { + if ((f = HDfopen(fname, "r")) != NULL) { + rawinstream = f; + retvalue = SUCCEED; + } + } + else { + rawinstream = NULL; + retvalue = SUCCEED; + } + + return retvalue; +} + +/*------------------------------------------------------------------------- + * Function: h5tools_set_output_file + * + * Purpose: Open fname as the output file for raw output. + * Set rawoutstream as its file stream. + * + * Return: 0 -- succeeded + * negative -- failed + * + *------------------------------------------------------------------------- + */ +int +h5tools_set_output_file(const char *fname) +{ + int retvalue = FAIL; + FILE *f; /* temporary holding place for the stream pointer + * so that rawoutstream is changed only when succeeded */ + + if (rawoutstream && rawoutstream != stdout) { + if (HDfclose(rawoutstream)) + HDperror("closing rawoutstream"); + else + rawoutstream = NULL; + } + /* First check if filename is string "NULL" */ + if (fname != NULL) { + if ((f = HDfopen(fname, "w")) != NULL) { + rawoutstream = f; + retvalue = SUCCEED; + } + } + else { + rawoutstream = NULL; + retvalue = SUCCEED; + } + + return retvalue; +} + +/*------------------------------------------------------------------------- + * Function: h5tools_set_error_file + * + * Purpose: Open fname as the error output file for dataset raw error. + * Set rawerrorstream as its file stream. + * + * Return: 0 -- succeeded + * negative -- failed + * + *------------------------------------------------------------------------- + */ +int +h5tools_set_error_file(const char *fname) +{ + int retvalue = FAIL; + FILE *f; /* temporary holding place for the stream pointer + * so that rawerrorstream is changed only when succeeded */ + + if (rawerrorstream && rawerrorstream != stderr) { + if (HDfclose(rawerrorstream)) + HDperror("closing rawerrorstream"); + else + rawerrorstream = NULL; + } + + if ((f = HDfopen(fname, "w")) != NULL) { + rawerrorstream = f; + retvalue = SUCCEED; + } + + return retvalue; +} + +/*------------------------------------------------------------------------- * Audience: Private * Chapter: H5Tools Library * Purpose: Get a FAPL for a driver @@ -1468,7 +1682,7 @@ render_bin_output_region_blocks(hid_t region_space, hid_t region_id, * hssize_t npoints is the number of points in the region *------------------------------------------------------------------------- */ -static int +int render_bin_output_region_data_points(hid_t region_space, hid_t region_id, FILE *stream, hid_t container, int ndims, hid_t type_id, hssize_t npoints) diff --git a/tools/lib/h5tools.h b/tools/lib/h5tools.h index efadba4..5f834c5 100644 --- a/tools/lib/h5tools.h +++ b/tools/lib/h5tools.h @@ -532,6 +532,7 @@ H5TOOLS_DLLVAR int packed_data_length; /* lengtht of packed bits to display H5TOOLS_DLLVAR unsigned long long packed_data_mask; /* mask in which packed bits to display */ H5TOOLS_DLLVAR FILE *rawattrstream; /* output stream for raw attribute data */ H5TOOLS_DLLVAR FILE *rawdatastream; /* output stream for raw data */ +H5TOOLS_DLLVAR FILE *rawinstream; /* input stream for raw input */ H5TOOLS_DLLVAR FILE *rawoutstream; /* output stream for raw output */ H5TOOLS_DLLVAR FILE *rawerrorstream; /* output stream for raw error */ H5TOOLS_DLLVAR int bin_output; /* binary output */ @@ -549,6 +550,11 @@ H5TOOLS_DLLVAR int attr_data_output; /* attribute data output */ /* Definitions of useful routines */ H5TOOLS_DLL void h5tools_init(void); H5TOOLS_DLL void h5tools_close(void); +H5TOOLS_DLL int h5tools_set_data_output_file(const char *fname, int is_bin); +H5TOOLS_DLL int h5tools_set_attr_output_file(const char *fname, int is_bin); +H5TOOLS_DLL int h5tools_set_input_file(const char *fname); +H5TOOLS_DLL int h5tools_set_output_file(const char *fname); +H5TOOLS_DLL int h5tools_set_error_file(const char *fname); H5TOOLS_DLL hid_t h5tools_fopen(const char *fname, unsigned flags, hid_t fapl, const char *driver, char *drivername, size_t drivername_len); H5TOOLS_DLL hid_t h5tools_get_native_type(hid_t type); @@ -568,8 +574,6 @@ H5TOOLS_DLL void h5tools_region_simple_prefix(FILE *stream, const h5tool_form h5tools_context_t *ctx, hsize_t elmtno, hsize_t *ptdata, int secnum); H5TOOLS_DLL int render_bin_output(FILE *stream, hid_t container, hid_t tid, void *_mem, hsize_t nelmts); -H5TOOLS_DLL int render_bin_output_region_data_blocks(hid_t region_id, FILE *stream, - hid_t container, int ndims, hid_t type_id, hssize_t nblocks, hsize_t *ptdata); H5TOOLS_DLL hbool_t render_bin_output_region_blocks(hid_t region_space, hid_t region_id, FILE *stream, hid_t container); H5TOOLS_DLL hbool_t render_bin_output_region_points(hid_t region_space, hid_t region_id, -- cgit v0.12 From 5b6ae0b6039e5e28d60618ed41d50373c580fb3f Mon Sep 17 00:00:00 2001 From: Peter Cao Date: Tue, 30 Jul 2013 14:23:24 -0500 Subject: [svn-r23945] fixed HDFFV-8306 using file stream for output data --- tools/h5jam/h5unjam.c | 105 ++++++++++++++++---------------------------------- 1 file changed, 33 insertions(+), 72 deletions(-) diff --git a/tools/h5jam/h5unjam.c b/tools/h5jam/h5unjam.c index 691e2f2..83c6614 100644 --- a/tools/h5jam/h5unjam.c +++ b/tools/h5jam/h5unjam.c @@ -27,7 +27,7 @@ hsize_t write_pad( int , hsize_t ); hsize_t compute_pad( hsize_t ); -herr_t copy_to_file( int , int , ssize_t, ssize_t ); +herr_t copy_to_file( FILE *, FILE * , ssize_t, ssize_t ); int do_delete = FALSE; char *output_file = NULL; @@ -137,20 +137,28 @@ static int parse_command_line(int argc, const char *argv[]) { int opt = FALSE; - - /* parse command line options */ + + /* parse command line options */ while ((opt = get_option(argc, argv, s_opts, l_opts)) != EOF) { switch((char)opt) { case 'o': output_file = HDstrdup(opt_arg); - break; + if (output_file) + h5tools_set_data_output_file(output_file, 1); + break; case 'i': input_file = HDstrdup(opt_arg); - break; + if (input_file) + h5tools_set_input_file(input_file); + break;; case 'u': ub_file = HDstrdup(opt_arg); + if (ub_file) + h5tools_set_output_file(ub_file); + else + rawoutstream = stdout; break; case 'd': @@ -205,9 +213,6 @@ done: int main(int argc, const char *argv[]) { - int ifid = -1; - int ufid = -1; - int h5fid = -1; void *edata; H5E_auto2_t func; hid_t ifile = -1; @@ -222,24 +227,24 @@ main(int argc, const char *argv[]) h5tools_setprogname(PROGRAMNAME); h5tools_setstatus(EXIT_SUCCESS); - /* Disable error reporting */ + /* Disable error reporting */ H5Eget_auto2(H5E_DEFAULT, &func, &edata); H5Eset_auto2(H5E_DEFAULT, NULL, NULL); - /* Initialize h5tools lib */ + /* Initialize h5tools lib */ h5tools_init(); if(EXIT_FAILURE == parse_command_line(argc, argv)) goto done; if (input_file == NULL) { - /* no user block */ + /* no user block */ error_msg("missing arguemnt for HDF5 file input.\n"); help_ref_msg(stderr); h5tools_setstatus(EXIT_FAILURE); goto done; } - + testval = H5Fis_hdf5(input_file); if (testval <= 0) { @@ -283,14 +288,7 @@ main(int argc, const char *argv[]) goto done; } - ifid = HDopen(input_file,O_RDONLY,0); - if(ifid < 0) { - error_msg("unable to open input HDF5 file \"%s\"\n", input_file); - h5tools_setstatus(EXIT_FAILURE); - goto done; - } - - res = HDfstat(ifid, &sbuf); + res = HDfstat(fileno(rawinstream), &sbuf); if(res < 0) { error_msg("Can't stat file \"%s\"\n", input_file); h5tools_setstatus(EXIT_FAILURE); @@ -305,43 +303,15 @@ main(int argc, const char *argv[]) goto done; } - if (ub_file == NULL) { - /* write to sdtout */ - ufid = HDdup(1); - } - else { - ufid = HDopen(ub_file,O_WRONLY|O_CREAT|O_TRUNC, 0644 ); - - if (ufid < 0) { - error_msg("unable to open user block file for output\"%s\"\n", ub_file); - h5tools_setstatus(EXIT_FAILURE); - goto done; - } - } - if (output_file == NULL) { - h5fid = HDopen(input_file,O_WRONLY, 0); - - if (h5fid < 0) { error_msg("unable to open output HDF5 file \"%s\"\n", input_file); h5tools_setstatus(EXIT_FAILURE); goto done; - } } - else { - h5fid = HDopen(output_file,O_WRONLY|O_CREAT|O_TRUNC, 0644 ); - if (h5fid < 0) { - error_msg("unable to open output HDF5 file \"%s\"\n", output_file); - h5tools_setstatus(EXIT_FAILURE); - goto done; - } - } - - - /* copy from 0 to 'usize - 1' into ufid */ + /* copy from 0 to 'usize - 1' into ufid */ if (!do_delete) { - if(copy_to_file(ifid, ufid, 0, (ssize_t) usize) < 0) { + if(copy_to_file(rawinstream, rawoutstream, 0, (ssize_t) usize) < 0) { error_msg("unable to copy user block to output file \"%s\"\n", ub_file); h5tools_setstatus(EXIT_FAILURE); goto done; @@ -349,34 +319,25 @@ main(int argc, const char *argv[]) } /* copy from usize to end of file into h5fid, - * starting at end of user block if present - */ - if(copy_to_file(ifid, h5fid, (ssize_t) usize, (ssize_t)(fsize - (ssize_t)usize)) < 0) { + * starting at end of user block if present */ + if(copy_to_file(rawinstream, rawdatastream, (ssize_t) usize, (ssize_t)(fsize - (ssize_t)usize)) < 0) { error_msg("unable to copy hdf5 data to output file \"%s\"\n", output_file); h5tools_setstatus(EXIT_FAILURE); goto done; } - + done: if(input_file) HDfree(input_file); + if(output_file) HDfree(output_file); + if(ub_file) { HDfree(ub_file); - if(ufid >= 0) - status = HDclose(ufid); - HDassert(status >= 0); - } - - if(h5fid >= 0) { - status = HDclose(h5fid); - HDassert(status >= 0); - } - if(ifid >= 0) { - status = HDclose(ifid); - HDassert(status >= 0); } + + h5tools_close(); return h5tools_getstatus(); } @@ -388,7 +349,7 @@ done: * Returns 0 on success, -1 on failure. */ herr_t -copy_to_file( int infid, int ofid, ssize_t where, ssize_t how_much ) +copy_to_file( FILE *infid, FILE *ofid, ssize_t where, ssize_t how_much ) { static char buf[COPY_BUF_SIZE]; off_t to; @@ -406,20 +367,20 @@ copy_to_file( int infid, int ofid, ssize_t where, ssize_t how_much ) while(how_much > 0) { /* Seek to correct position in input file */ - HDlseek(infid,from,SEEK_SET); + HDfseek(infid,from,SEEK_SET); /* Read data to buffer */ if (how_much > COPY_BUF_SIZE) - nchars = HDread(infid,buf,(unsigned)COPY_BUF_SIZE); + nchars = HDfread(buf,1,(unsigned)COPY_BUF_SIZE,infid); else - nchars = HDread(infid,buf,(unsigned)how_much); + nchars = HDfread(buf, 1,(unsigned)how_much,infid); if(nchars < 0) { ret_value = -1; goto done; } /* end if */ /* Seek to correct position in output file */ - HDlseek(ofid,to,SEEK_SET); + HDfseek(ofid,to,SEEK_SET); /* Update positions/size */ how_much -= nchars; @@ -429,7 +390,7 @@ copy_to_file( int infid, int ofid, ssize_t where, ssize_t how_much ) /* Write nchars bytes to output file */ wnchars = nchars; while(nchars > 0) { - wnchars = HDwrite(ofid,buf,(unsigned)nchars); + wnchars = HDfwrite(buf, 1,(unsigned)nchars,ofid); if(wnchars < 0) { ret_value = -1; goto done; -- cgit v0.12 From ba181d404dd47666ca5005b2d845aac5ee0ae46e Mon Sep 17 00:00:00 2001 From: Allen Byrne Date: Wed, 31 Jul 2013 11:10:33 -0500 Subject: [svn-r23952] Update unjam file handling to eliminate infinite loops and use binary mode. Tested: windows --- tools/h5jam/h5unjam.c | 64 ++++++++++++++++++++++++++++----------------------- 1 file changed, 35 insertions(+), 29 deletions(-) diff --git a/tools/h5jam/h5unjam.c b/tools/h5jam/h5unjam.c index 83c6614..40358c6 100644 --- a/tools/h5jam/h5unjam.c +++ b/tools/h5jam/h5unjam.c @@ -150,13 +150,13 @@ parse_command_line(int argc, const char *argv[]) case 'i': input_file = HDstrdup(opt_arg); if (input_file) - h5tools_set_input_file(input_file); + h5tools_set_input_file(input_file, 1); break;; case 'u': ub_file = HDstrdup(opt_arg); if (ub_file) - h5tools_set_output_file(ub_file); + h5tools_set_output_file(ub_file, 1); else rawoutstream = stdout; break; @@ -288,7 +288,7 @@ main(int argc, const char *argv[]) goto done; } - res = HDfstat(fileno(rawinstream), &sbuf); + res = HDfstat(HDfileno(rawinstream), &sbuf); if(res < 0) { error_msg("Can't stat file \"%s\"\n", input_file); h5tools_setstatus(EXIT_FAILURE); @@ -320,7 +320,7 @@ main(int argc, const char *argv[]) /* copy from usize to end of file into h5fid, * starting at end of user block if present */ - if(copy_to_file(rawinstream, rawdatastream, (ssize_t) usize, (ssize_t)(fsize - (ssize_t)usize)) < 0) { + if(copy_to_file(rawinstream, rawdatastream, (ssize_t) usize, (ssize_t)(fsize - (ssize_t)usize)) < 0) { error_msg("unable to copy hdf5 data to output file \"%s\"\n", output_file); h5tools_setstatus(EXIT_FAILURE); goto done; @@ -349,54 +349,60 @@ done: * Returns 0 on success, -1 on failure. */ herr_t -copy_to_file( FILE *infid, FILE *ofid, ssize_t where, ssize_t how_much ) +copy_to_file( FILE *infid, FILE *ofid, ssize_t _where, ssize_t how_much ) { static char buf[COPY_BUF_SIZE]; + off_t where = (off_t)_where; off_t to; off_t from; - ssize_t nchars = -1; - ssize_t wnchars = -1; herr_t ret_value = 0; /* nothing to copy */ if(how_much <= 0) goto done; + /* rewind */ + HDfseek(infid, 0L, 0); + from = where; to = 0; - while(how_much > 0) { - /* Seek to correct position in input file */ - HDfseek(infid,from,SEEK_SET); + size_t bytes_in = 0; /* # of bytes to read */ + size_t bytes_read = 0; /* # of bytes actually read */ + size_t bytes_wrote = 0; /* # of bytes written */ - /* Read data to buffer */ if (how_much > COPY_BUF_SIZE) - nchars = HDfread(buf,1,(unsigned)COPY_BUF_SIZE,infid); + bytes_in = COPY_BUF_SIZE; else - nchars = HDfread(buf, 1,(unsigned)how_much,infid); - if(nchars < 0) { + bytes_in = how_much; + + /* Seek to correct position in input file */ + HDfseek(infid, from, SEEK_SET); + + /* Read data to buffer */ + bytes_read = HDfread(buf, (size_t)1, bytes_in, infid); + if(0 == bytes_read && HDferror(infid)) { ret_value = -1; goto done; } /* end if */ + if(0 == bytes_read && HDfeof(infid)) { + goto done; + } /* end if */ /* Seek to correct position in output file */ - HDfseek(ofid,to,SEEK_SET); + HDfseek(ofid, to, SEEK_SET); /* Update positions/size */ - how_much -= nchars; - from += nchars; - to += nchars; - - /* Write nchars bytes to output file */ - wnchars = nchars; - while(nchars > 0) { - wnchars = HDfwrite(buf, 1,(unsigned)nchars,ofid); - if(wnchars < 0) { - ret_value = -1; - goto done; - } /* end if */ - nchars -= wnchars; - } /* end while */ + how_much -= bytes_read; + from += bytes_read; + to += bytes_read; + + /* Write nchars bytes to output file */ + bytes_wrote = HDfwrite(buf, (size_t)1, bytes_read, ofid); + if(bytes_wrote != bytes_read || (0 == bytes_wrote && HDferror(ofid))) { /* error */ + ret_value = -1; + goto done; + } /* end if */ } /* end while */ done: -- cgit v0.12 From 4e1695576c49988a9d23c8f2a3d00601cb447593 Mon Sep 17 00:00:00 2001 From: Allen Byrne Date: Wed, 31 Jul 2013 11:22:40 -0500 Subject: [svn-r23953] Update stream handling to allow binary mode - due to unjam fix. Tested: local linux --- tools/h5dump/h5dump.c | 2 +- tools/lib/h5tools.c | 71 +++++++++++++++++++++++++++++++++++++++++---------- tools/lib/h5tools.h | 6 ++--- 3 files changed, 61 insertions(+), 18 deletions(-) diff --git a/tools/h5dump/h5dump.c b/tools/h5dump/h5dump.c index 8e60bf7..36192e0 100644 --- a/tools/h5dump/h5dump.c +++ b/tools/h5dump/h5dump.c @@ -1020,7 +1020,7 @@ parse_start: break; case 'O': - if (h5tools_set_output_file(opt_arg) < 0) { + if (h5tools_set_output_file(opt_arg, 0) < 0) { usage(h5tools_getprogname()); goto error; } diff --git a/tools/lib/h5tools.c b/tools/lib/h5tools.c index 2e48889..d229eec 100644 --- a/tools/lib/h5tools.c +++ b/tools/lib/h5tools.c @@ -287,9 +287,18 @@ h5tools_set_attr_output_file(const char *fname, int is_bin) /* First check if filename is string "NULL" */ if (fname != NULL) { - if ((f = HDfopen(fname, "w")) != NULL) { - rawattrstream = f; - retvalue = SUCCEED; + /* binary output */ + if (is_bin) { + if ((f = HDfopen(fname, "wb")) != NULL) { + rawattrstream = f; + retvalue = SUCCEED; + } + } + else { + if ((f = HDfopen(fname, "w")) != NULL) { + rawattrstream = f; + retvalue = SUCCEED; + } } } else { @@ -312,7 +321,7 @@ h5tools_set_attr_output_file(const char *fname, int is_bin) *------------------------------------------------------------------------- */ int -h5tools_set_input_file(const char *fname) +h5tools_set_input_file(const char *fname, int is_bin) { int retvalue = FAIL; FILE *f; /* temporary holding place for the stream pointer @@ -326,9 +335,18 @@ h5tools_set_input_file(const char *fname) } /* First check if filename is string "NULL" */ if (fname != NULL) { - if ((f = HDfopen(fname, "r")) != NULL) { - rawinstream = f; - retvalue = SUCCEED; + /* binary output */ + if (is_bin) { + if ((f = HDfopen(fname, "rb")) != NULL) { + rawinstream = f; + retvalue = SUCCEED; + } + } + else { + if ((f = HDfopen(fname, "r")) != NULL) { + rawinstream = f; + retvalue = SUCCEED; + } } } else { @@ -351,7 +369,7 @@ h5tools_set_input_file(const char *fname) *------------------------------------------------------------------------- */ int -h5tools_set_output_file(const char *fname) +h5tools_set_output_file(const char *fname, int is_bin) { int retvalue = FAIL; FILE *f; /* temporary holding place for the stream pointer @@ -365,9 +383,18 @@ h5tools_set_output_file(const char *fname) } /* First check if filename is string "NULL" */ if (fname != NULL) { - if ((f = HDfopen(fname, "w")) != NULL) { - rawoutstream = f; - retvalue = SUCCEED; + /* binary output */ + if (is_bin) { + if ((f = HDfopen(fname, "wb")) != NULL) { + rawoutstream = f; + retvalue = SUCCEED; + } + } + else { + if ((f = HDfopen(fname, "w")) != NULL) { + rawoutstream = f; + retvalue = SUCCEED; + } } } else { @@ -390,7 +417,7 @@ h5tools_set_output_file(const char *fname) *------------------------------------------------------------------------- */ int -h5tools_set_error_file(const char *fname) +h5tools_set_error_file(const char *fname, int is_bin) { int retvalue = FAIL; FILE *f; /* temporary holding place for the stream pointer @@ -403,8 +430,24 @@ h5tools_set_error_file(const char *fname) rawerrorstream = NULL; } - if ((f = HDfopen(fname, "w")) != NULL) { - rawerrorstream = f; + /* First check if filename is string "NULL" */ + if (fname != NULL) { + /* binary output */ + if (is_bin) { + if ((f = HDfopen(fname, "wb")) != NULL) { + rawerrorstream = f; + retvalue = SUCCEED; + } + } + else { + if ((f = HDfopen(fname, "w")) != NULL) { + rawerrorstream = f; + retvalue = SUCCEED; + } + } + } + else { + rawerrorstream = NULL; retvalue = SUCCEED; } diff --git a/tools/lib/h5tools.h b/tools/lib/h5tools.h index 5f834c5..ea6a44f 100644 --- a/tools/lib/h5tools.h +++ b/tools/lib/h5tools.h @@ -552,9 +552,9 @@ H5TOOLS_DLL void h5tools_init(void); H5TOOLS_DLL void h5tools_close(void); H5TOOLS_DLL int h5tools_set_data_output_file(const char *fname, int is_bin); H5TOOLS_DLL int h5tools_set_attr_output_file(const char *fname, int is_bin); -H5TOOLS_DLL int h5tools_set_input_file(const char *fname); -H5TOOLS_DLL int h5tools_set_output_file(const char *fname); -H5TOOLS_DLL int h5tools_set_error_file(const char *fname); +H5TOOLS_DLL int h5tools_set_input_file(const char *fname, int is_bin); +H5TOOLS_DLL int h5tools_set_output_file(const char *fname, int is_bin); +H5TOOLS_DLL int h5tools_set_error_file(const char *fname, int is_bin); H5TOOLS_DLL hid_t h5tools_fopen(const char *fname, unsigned flags, hid_t fapl, const char *driver, char *drivername, size_t drivername_len); H5TOOLS_DLL hid_t h5tools_get_native_type(hid_t type); -- cgit v0.12 From 7a96201ee1c4eb6bc02827cbd451ce006fa71fff Mon Sep 17 00:00:00 2001 From: Allen Byrne Date: Thu, 1 Aug 2013 09:42:30 -0500 Subject: [svn-r23960] HDFFV-8490: Reorder and group h5dump help text. Tested: local linux --- tools/h5dump/h5dump.c | 69 +++++++++++++----------- tools/testfiles/h5dump-help.txt | 55 ++++++++++--------- tools/testfiles/tnofilename-with-packed-bits.ddl | 55 ++++++++++--------- tools/testfiles/tpbitsIncomplete.ddl | 55 ++++++++++--------- tools/testfiles/tpbitsLengthExceeded.ddl | 55 ++++++++++--------- tools/testfiles/tpbitsLengthPositive.ddl | 55 ++++++++++--------- tools/testfiles/tpbitsMaxExceeded.ddl | 55 ++++++++++--------- tools/testfiles/tpbitsOffsetExceeded.ddl | 55 ++++++++++--------- tools/testfiles/tpbitsOffsetNegative.ddl | 55 ++++++++++--------- 9 files changed, 285 insertions(+), 224 deletions(-) diff --git a/tools/h5dump/h5dump.c b/tools/h5dump/h5dump.c index 36192e0..6218631 100644 --- a/tools/h5dump/h5dump.c +++ b/tools/h5dump/h5dump.c @@ -230,57 +230,61 @@ usage(const char *prog) PRINTSTREAM(rawoutstream, "usage: %s [OPTIONS] files\n", prog); PRINTVALSTREAM(rawoutstream, " OPTIONS\n"); PRINTVALSTREAM(rawoutstream, " -h, --help Print a usage message and exit\n"); + PRINTVALSTREAM(rawoutstream, " -V, --version Print version number and exit\n"); + PRINTVALSTREAM(rawoutstream, "--------------- Formatting Options ---------------\n"); + PRINTVALSTREAM(rawoutstream, " -e, --escape Escape non printing characters\n"); + PRINTVALSTREAM(rawoutstream, " -r, --string Print 1-byte integer datasets as ASCII\n"); + PRINTVALSTREAM(rawoutstream, " -y, --noindex Do not print array indices with the data\n"); + PRINTVALSTREAM(rawoutstream, " -m T, --format=T Set the floating point output format\n"); + PRINTVALSTREAM(rawoutstream, " -q Q, --sort_by=Q Sort groups and attributes by index Q\n"); + PRINTVALSTREAM(rawoutstream, " -z Z, --sort_order=Z Sort groups and attributes by order Z\n"); + PRINTVALSTREAM(rawoutstream, " --enable-error-stack Prints messages from the HDF5 error stack as they\n"); + PRINTVALSTREAM(rawoutstream, " occur.\n"); + PRINTVALSTREAM(rawoutstream, " --no-compact-subset Disable compact form of subsetting and allow the use\n"); + PRINTVALSTREAM(rawoutstream, " of \"[\" in dataset names.\n"); + PRINTVALSTREAM(rawoutstream, " -w N, --width=N Set the number of columns of output. A value of 0 (zero)\n"); + PRINTVALSTREAM(rawoutstream, " sets the number of columns to the maximum (65535).\n"); + PRINTVALSTREAM(rawoutstream, " Default width is 80 columns.\n"); + PRINTVALSTREAM(rawoutstream, "--------------- File Options ---------------\n"); PRINTVALSTREAM(rawoutstream, " -n, --contents Print a list of the file contents and exit\n"); PRINTVALSTREAM(rawoutstream, " Optional value 1 also prints attributes.\n"); PRINTVALSTREAM(rawoutstream, " -B, --superblock Print the content of the super block\n"); PRINTVALSTREAM(rawoutstream, " -H, --header Print the header only; no data is displayed\n"); - PRINTVALSTREAM(rawoutstream, " -A, --onlyattr Print the header and value of attributes\n"); - PRINTVALSTREAM(rawoutstream, " Optional value 0 suppresses printing attributes.\n"); - PRINTVALSTREAM(rawoutstream, " -i, --object-ids Print the object ids\n"); - PRINTVALSTREAM(rawoutstream, " -r, --string Print 1-byte integer datasets as ASCII\n"); - PRINTVALSTREAM(rawoutstream, " -e, --escape Escape non printing characters\n"); - PRINTVALSTREAM(rawoutstream, " -V, --version Print version number and exit\n"); + PRINTVALSTREAM(rawoutstream, " -f D, --filedriver=D Specify which driver to open the file with\n"); + PRINTVALSTREAM(rawoutstream, " -o F, --output=F Output raw data into file F\n"); + PRINTVALSTREAM(rawoutstream, " -b B, --binary=B Binary file output, of form B\n"); + PRINTVALSTREAM(rawoutstream, " -O F, --ddl=F Output ddl text into file F\n"); + PRINTVALSTREAM(rawoutstream, " Do not use filename F to suppress ddl display\n"); + PRINTVALSTREAM(rawoutstream, "--------------- Object Options ---------------\n"); PRINTVALSTREAM(rawoutstream, " -a P, --attribute=P Print the specified attribute\n"); PRINTVALSTREAM(rawoutstream, " If an attribute name contains a slash (/), escape the\n"); PRINTVALSTREAM(rawoutstream, " slash with a preceding backslash (\\).\n"); PRINTVALSTREAM(rawoutstream, " (See example section below.)\n"); PRINTVALSTREAM(rawoutstream, " -d P, --dataset=P Print the specified dataset\n"); - PRINTVALSTREAM(rawoutstream, " -y, --noindex Do not print array indices with the data\n"); - PRINTVALSTREAM(rawoutstream, " -p, --properties Print dataset filters, storage layout and fill value\n"); - PRINTVALSTREAM(rawoutstream, " -f D, --filedriver=D Specify which driver to open the file with\n"); PRINTVALSTREAM(rawoutstream, " -g P, --group=P Print the specified group and all members\n"); PRINTVALSTREAM(rawoutstream, " -l P, --soft-link=P Print the value(s) of the specified soft link\n"); - PRINTVALSTREAM(rawoutstream, " -o F, --output=F Output raw data into file F\n"); - PRINTVALSTREAM(rawoutstream, " -b B, --binary=B Binary file output, of form B\n"); PRINTVALSTREAM(rawoutstream, " -t P, --datatype=P Print the specified named datatype\n"); - PRINTVALSTREAM(rawoutstream, " -w N, --width=N Set the number of columns of output. A value of 0 (zero)\n"); - PRINTVALSTREAM(rawoutstream, " sets the number of columns to the maximum (65535).\n"); - PRINTVALSTREAM(rawoutstream, " Default width is 80 columns.\n"); - PRINTVALSTREAM(rawoutstream, " -m T, --format=T Set the floating point output format\n"); - PRINTVALSTREAM(rawoutstream, " -q Q, --sort_by=Q Sort groups and attributes by index Q\n"); - PRINTVALSTREAM(rawoutstream, " -z Z, --sort_order=Z Sort groups and attributes by order Z\n"); - PRINTVALSTREAM(rawoutstream, - " -M L, --packedbits=L Print packed bits as unsigned integers, using mask\n" - " format L for an integer dataset specified with\n" - " option -d. L is a list of offset,length values,\n" - " separated by commas. Offset is the beginning bit in\n" - " the data value and length is the number of bits of\n" - " the mask.\n" - ); + PRINTVALSTREAM(rawoutstream, " -A, --onlyattr Print the header and value of attributes\n"); + PRINTVALSTREAM(rawoutstream, " Optional value 0 suppresses printing attributes.\n"); + PRINTVALSTREAM(rawoutstream, "--------------- Object Property Options ---------------\n"); + PRINTVALSTREAM(rawoutstream, " -i, --object-ids Print the object ids\n"); + PRINTVALSTREAM(rawoutstream, " -p, --properties Print dataset filters, storage layout and fill value\n"); + PRINTVALSTREAM(rawoutstream, " -M L, --packedbits=L Print packed bits as unsigned integers, using mask\n"); + PRINTVALSTREAM(rawoutstream, " format L for an integer dataset specified with\n"); + PRINTVALSTREAM(rawoutstream, " option -d. L is a list of offset,length values,\n"); + PRINTVALSTREAM(rawoutstream, " separated by commas. Offset is the beginning bit in\n"); + PRINTVALSTREAM(rawoutstream, " the data value and length is the number of bits of\n"); + PRINTVALSTREAM(rawoutstream, " the mask.\n"); PRINTVALSTREAM(rawoutstream, " -R, --region Print dataset pointed by region references\n"); + PRINTVALSTREAM(rawoutstream, "--------------- XML Options ---------------\n"); PRINTVALSTREAM(rawoutstream, " -x, --xml Output in XML using Schema\n"); PRINTVALSTREAM(rawoutstream, " -u, --use-dtd Output in XML using DTD\n"); PRINTVALSTREAM(rawoutstream, " -D U, --xml-dtd=U Use the DTD or schema at U\n"); PRINTVALSTREAM(rawoutstream, " -X S, --xml-ns=S (XML Schema) Use qualified names n the XML\n"); PRINTVALSTREAM(rawoutstream, " \":\": no namespace, default: \"hdf5:\"\n"); PRINTVALSTREAM(rawoutstream, " E.g., to dump a file called `-f', use h5dump -- -f\n"); - PRINTVALSTREAM(rawoutstream, " --enable-error-stack Prints messages from the HDF5 error stack as they\n"); - PRINTVALSTREAM(rawoutstream, " occur.\n"); - PRINTVALSTREAM(rawoutstream, " --no-compact-subset Disable compact form of subsetting and allow the use\n"); - PRINTVALSTREAM(rawoutstream, " of \"[\" in dataset names.\n"); - PRINTVALSTREAM(rawoutstream, " -O F, --ddl=F Output ddl text into file F\n"); - PRINTVALSTREAM(rawoutstream, " Do not use filename F to suppress ddl display\n"); PRINTVALSTREAM(rawoutstream, "\n"); + PRINTVALSTREAM(rawoutstream, "--------------- Subsetting Options ---------------\n"); PRINTVALSTREAM(rawoutstream, " Subsetting is available by using the following options with a dataset\n"); PRINTVALSTREAM(rawoutstream, " attribute. Subsetting is done by selecting a hyperslab from the data.\n"); PRINTVALSTREAM(rawoutstream, " Thus, the options mirror those for performing a hyperslab selection.\n"); @@ -296,6 +300,7 @@ usage(const char *prog) PRINTVALSTREAM(rawoutstream, " number of dimensions in the dataspace being queried\n"); PRINTVALSTREAM(rawoutstream, " (Alternate compact form of subsetting is described in the Reference Manual)\n"); PRINTVALSTREAM(rawoutstream, "\n"); + PRINTVALSTREAM(rawoutstream, "--------------- Option Argument Conventions ---------------\n"); PRINTVALSTREAM(rawoutstream, " D - is the file driver to use in opening the file. Acceptable values\n"); PRINTVALSTREAM(rawoutstream, " are \"sec2\", \"family\", \"split\", \"multi\", \"direct\", and \"stream\". Without\n"); PRINTVALSTREAM(rawoutstream, " the file driver flag, the file will be opened with each driver in\n"); @@ -324,7 +329,7 @@ usage(const char *prog) PRINTVALSTREAM(rawoutstream, " Q - is the sort index type. It can be \"creation_order\" or \"name\" (default)\n"); PRINTVALSTREAM(rawoutstream, " Z - is the sort order type. It can be \"descending\" or \"ascending\" (default)\n"); PRINTVALSTREAM(rawoutstream, "\n"); - PRINTVALSTREAM(rawoutstream, " Examples:\n"); + PRINTVALSTREAM(rawoutstream, "--------------- Examples ---------------\n"); PRINTVALSTREAM(rawoutstream, "\n"); PRINTVALSTREAM(rawoutstream, " 1) Attribute foo of the group /bar_none in file quux.h5\n"); PRINTVALSTREAM(rawoutstream, "\n"); diff --git a/tools/testfiles/h5dump-help.txt b/tools/testfiles/h5dump-help.txt index b735b18..3a4864e 100644 --- a/tools/testfiles/h5dump-help.txt +++ b/tools/testfiles/h5dump-help.txt @@ -1,35 +1,45 @@ usage: h5dump [OPTIONS] files OPTIONS -h, --help Print a usage message and exit + -V, --version Print version number and exit +--------------- Formatting Options --------------- + -e, --escape Escape non printing characters + -r, --string Print 1-byte integer datasets as ASCII + -y, --noindex Do not print array indices with the data + -m T, --format=T Set the floating point output format + -q Q, --sort_by=Q Sort groups and attributes by index Q + -z Z, --sort_order=Z Sort groups and attributes by order Z + --enable-error-stack Prints messages from the HDF5 error stack as they + occur. + --no-compact-subset Disable compact form of subsetting and allow the use + of "[" in dataset names. + -w N, --width=N Set the number of columns of output. A value of 0 (zero) + sets the number of columns to the maximum (65535). + Default width is 80 columns. +--------------- File Options --------------- -n, --contents Print a list of the file contents and exit Optional value 1 also prints attributes. -B, --superblock Print the content of the super block -H, --header Print the header only; no data is displayed - -A, --onlyattr Print the header and value of attributes - Optional value 0 suppresses printing attributes. - -i, --object-ids Print the object ids - -r, --string Print 1-byte integer datasets as ASCII - -e, --escape Escape non printing characters - -V, --version Print version number and exit + -f D, --filedriver=D Specify which driver to open the file with + -o F, --output=F Output raw data into file F + -b B, --binary=B Binary file output, of form B + -O F, --ddl=F Output ddl text into file F + Do not use filename F to suppress ddl display +--------------- Object Options --------------- -a P, --attribute=P Print the specified attribute If an attribute name contains a slash (/), escape the slash with a preceding backslash (\). (See example section below.) -d P, --dataset=P Print the specified dataset - -y, --noindex Do not print array indices with the data - -p, --properties Print dataset filters, storage layout and fill value - -f D, --filedriver=D Specify which driver to open the file with -g P, --group=P Print the specified group and all members -l P, --soft-link=P Print the value(s) of the specified soft link - -o F, --output=F Output raw data into file F - -b B, --binary=B Binary file output, of form B -t P, --datatype=P Print the specified named datatype - -w N, --width=N Set the number of columns of output. A value of 0 (zero) - sets the number of columns to the maximum (65535). - Default width is 80 columns. - -m T, --format=T Set the floating point output format - -q Q, --sort_by=Q Sort groups and attributes by index Q - -z Z, --sort_order=Z Sort groups and attributes by order Z + -A, --onlyattr Print the header and value of attributes + Optional value 0 suppresses printing attributes. +--------------- Object Property Options --------------- + -i, --object-ids Print the object ids + -p, --properties Print dataset filters, storage layout and fill value -M L, --packedbits=L Print packed bits as unsigned integers, using mask format L for an integer dataset specified with option -d. L is a list of offset,length values, @@ -37,19 +47,15 @@ usage: h5dump [OPTIONS] files the data value and length is the number of bits of the mask. -R, --region Print dataset pointed by region references +--------------- XML Options --------------- -x, --xml Output in XML using Schema -u, --use-dtd Output in XML using DTD -D U, --xml-dtd=U Use the DTD or schema at U -X S, --xml-ns=S (XML Schema) Use qualified names n the XML ":": no namespace, default: "hdf5:" E.g., to dump a file called `-f', use h5dump -- -f - --enable-error-stack Prints messages from the HDF5 error stack as they - occur. - --no-compact-subset Disable compact form of subsetting and allow the use - of "[" in dataset names. - -O F, --ddl=F Output ddl text into file F - Do not use filename F to suppress ddl display +--------------- Subsetting Options --------------- Subsetting is available by using the following options with a dataset attribute. Subsetting is done by selecting a hyperslab from the data. Thus, the options mirror those for performing a hyperslab selection. @@ -65,6 +71,7 @@ usage: h5dump [OPTIONS] files number of dimensions in the dataspace being queried (Alternate compact form of subsetting is described in the Reference Manual) +--------------- Option Argument Conventions --------------- D - is the file driver to use in opening the file. Acceptable values are "sec2", "family", "split", "multi", "direct", and "stream". Without the file driver flag, the file will be opened with each driver in @@ -93,7 +100,7 @@ usage: h5dump [OPTIONS] files Q - is the sort index type. It can be "creation_order" or "name" (default) Z - is the sort order type. It can be "descending" or "ascending" (default) - Examples: +--------------- Examples --------------- 1) Attribute foo of the group /bar_none in file quux.h5 diff --git a/tools/testfiles/tnofilename-with-packed-bits.ddl b/tools/testfiles/tnofilename-with-packed-bits.ddl index e8d6d84..e8df31c 100644 --- a/tools/testfiles/tnofilename-with-packed-bits.ddl +++ b/tools/testfiles/tnofilename-with-packed-bits.ddl @@ -1,35 +1,45 @@ usage: h5dump [OPTIONS] files OPTIONS -h, --help Print a usage message and exit + -V, --version Print version number and exit +--------------- Formatting Options --------------- + -e, --escape Escape non printing characters + -r, --string Print 1-byte integer datasets as ASCII + -y, --noindex Do not print array indices with the data + -m T, --format=T Set the floating point output format + -q Q, --sort_by=Q Sort groups and attributes by index Q + -z Z, --sort_order=Z Sort groups and attributes by order Z + --enable-error-stack Prints messages from the HDF5 error stack as they + occur. + --no-compact-subset Disable compact form of subsetting and allow the use + of "[" in dataset names. + -w N, --width=N Set the number of columns of output. A value of 0 (zero) + sets the number of columns to the maximum (65535). + Default width is 80 columns. +--------------- File Options --------------- -n, --contents Print a list of the file contents and exit Optional value 1 also prints attributes. -B, --superblock Print the content of the super block -H, --header Print the header only; no data is displayed - -A, --onlyattr Print the header and value of attributes - Optional value 0 suppresses printing attributes. - -i, --object-ids Print the object ids - -r, --string Print 1-byte integer datasets as ASCII - -e, --escape Escape non printing characters - -V, --version Print version number and exit + -f D, --filedriver=D Specify which driver to open the file with + -o F, --output=F Output raw data into file F + -b B, --binary=B Binary file output, of form B + -O F, --ddl=F Output ddl text into file F + Do not use filename F to suppress ddl display +--------------- Object Options --------------- -a P, --attribute=P Print the specified attribute If an attribute name contains a slash (/), escape the slash with a preceding backslash (\). (See example section below.) -d P, --dataset=P Print the specified dataset - -y, --noindex Do not print array indices with the data - -p, --properties Print dataset filters, storage layout and fill value - -f D, --filedriver=D Specify which driver to open the file with -g P, --group=P Print the specified group and all members -l P, --soft-link=P Print the value(s) of the specified soft link - -o F, --output=F Output raw data into file F - -b B, --binary=B Binary file output, of form B -t P, --datatype=P Print the specified named datatype - -w N, --width=N Set the number of columns of output. A value of 0 (zero) - sets the number of columns to the maximum (65535). - Default width is 80 columns. - -m T, --format=T Set the floating point output format - -q Q, --sort_by=Q Sort groups and attributes by index Q - -z Z, --sort_order=Z Sort groups and attributes by order Z + -A, --onlyattr Print the header and value of attributes + Optional value 0 suppresses printing attributes. +--------------- Object Property Options --------------- + -i, --object-ids Print the object ids + -p, --properties Print dataset filters, storage layout and fill value -M L, --packedbits=L Print packed bits as unsigned integers, using mask format L for an integer dataset specified with option -d. L is a list of offset,length values, @@ -37,19 +47,15 @@ usage: h5dump [OPTIONS] files the data value and length is the number of bits of the mask. -R, --region Print dataset pointed by region references +--------------- XML Options --------------- -x, --xml Output in XML using Schema -u, --use-dtd Output in XML using DTD -D U, --xml-dtd=U Use the DTD or schema at U -X S, --xml-ns=S (XML Schema) Use qualified names n the XML ":": no namespace, default: "hdf5:" E.g., to dump a file called `-f', use h5dump -- -f - --enable-error-stack Prints messages from the HDF5 error stack as they - occur. - --no-compact-subset Disable compact form of subsetting and allow the use - of "[" in dataset names. - -O F, --ddl=F Output ddl text into file F - Do not use filename F to suppress ddl display +--------------- Subsetting Options --------------- Subsetting is available by using the following options with a dataset attribute. Subsetting is done by selecting a hyperslab from the data. Thus, the options mirror those for performing a hyperslab selection. @@ -65,6 +71,7 @@ usage: h5dump [OPTIONS] files number of dimensions in the dataspace being queried (Alternate compact form of subsetting is described in the Reference Manual) +--------------- Option Argument Conventions --------------- D - is the file driver to use in opening the file. Acceptable values are "sec2", "family", "split", "multi", "direct", and "stream". Without the file driver flag, the file will be opened with each driver in @@ -93,7 +100,7 @@ usage: h5dump [OPTIONS] files Q - is the sort index type. It can be "creation_order" or "name" (default) Z - is the sort order type. It can be "descending" or "ascending" (default) - Examples: +--------------- Examples --------------- 1) Attribute foo of the group /bar_none in file quux.h5 diff --git a/tools/testfiles/tpbitsIncomplete.ddl b/tools/testfiles/tpbitsIncomplete.ddl index 06c5613..c27e0ce 100644 --- a/tools/testfiles/tpbitsIncomplete.ddl +++ b/tools/testfiles/tpbitsIncomplete.ddl @@ -1,35 +1,45 @@ usage: h5dump [OPTIONS] files OPTIONS -h, --help Print a usage message and exit + -V, --version Print version number and exit +--------------- Formatting Options --------------- + -e, --escape Escape non printing characters + -r, --string Print 1-byte integer datasets as ASCII + -y, --noindex Do not print array indices with the data + -m T, --format=T Set the floating point output format + -q Q, --sort_by=Q Sort groups and attributes by index Q + -z Z, --sort_order=Z Sort groups and attributes by order Z + --enable-error-stack Prints messages from the HDF5 error stack as they + occur. + --no-compact-subset Disable compact form of subsetting and allow the use + of "[" in dataset names. + -w N, --width=N Set the number of columns of output. A value of 0 (zero) + sets the number of columns to the maximum (65535). + Default width is 80 columns. +--------------- File Options --------------- -n, --contents Print a list of the file contents and exit Optional value 1 also prints attributes. -B, --superblock Print the content of the super block -H, --header Print the header only; no data is displayed - -A, --onlyattr Print the header and value of attributes - Optional value 0 suppresses printing attributes. - -i, --object-ids Print the object ids - -r, --string Print 1-byte integer datasets as ASCII - -e, --escape Escape non printing characters - -V, --version Print version number and exit + -f D, --filedriver=D Specify which driver to open the file with + -o F, --output=F Output raw data into file F + -b B, --binary=B Binary file output, of form B + -O F, --ddl=F Output ddl text into file F + Do not use filename F to suppress ddl display +--------------- Object Options --------------- -a P, --attribute=P Print the specified attribute If an attribute name contains a slash (/), escape the slash with a preceding backslash (\). (See example section below.) -d P, --dataset=P Print the specified dataset - -y, --noindex Do not print array indices with the data - -p, --properties Print dataset filters, storage layout and fill value - -f D, --filedriver=D Specify which driver to open the file with -g P, --group=P Print the specified group and all members -l P, --soft-link=P Print the value(s) of the specified soft link - -o F, --output=F Output raw data into file F - -b B, --binary=B Binary file output, of form B -t P, --datatype=P Print the specified named datatype - -w N, --width=N Set the number of columns of output. A value of 0 (zero) - sets the number of columns to the maximum (65535). - Default width is 80 columns. - -m T, --format=T Set the floating point output format - -q Q, --sort_by=Q Sort groups and attributes by index Q - -z Z, --sort_order=Z Sort groups and attributes by order Z + -A, --onlyattr Print the header and value of attributes + Optional value 0 suppresses printing attributes. +--------------- Object Property Options --------------- + -i, --object-ids Print the object ids + -p, --properties Print dataset filters, storage layout and fill value -M L, --packedbits=L Print packed bits as unsigned integers, using mask format L for an integer dataset specified with option -d. L is a list of offset,length values, @@ -37,19 +47,15 @@ usage: h5dump [OPTIONS] files the data value and length is the number of bits of the mask. -R, --region Print dataset pointed by region references +--------------- XML Options --------------- -x, --xml Output in XML using Schema -u, --use-dtd Output in XML using DTD -D U, --xml-dtd=U Use the DTD or schema at U -X S, --xml-ns=S (XML Schema) Use qualified names n the XML ":": no namespace, default: "hdf5:" E.g., to dump a file called `-f', use h5dump -- -f - --enable-error-stack Prints messages from the HDF5 error stack as they - occur. - --no-compact-subset Disable compact form of subsetting and allow the use - of "[" in dataset names. - -O F, --ddl=F Output ddl text into file F - Do not use filename F to suppress ddl display +--------------- Subsetting Options --------------- Subsetting is available by using the following options with a dataset attribute. Subsetting is done by selecting a hyperslab from the data. Thus, the options mirror those for performing a hyperslab selection. @@ -65,6 +71,7 @@ usage: h5dump [OPTIONS] files number of dimensions in the dataspace being queried (Alternate compact form of subsetting is described in the Reference Manual) +--------------- Option Argument Conventions --------------- D - is the file driver to use in opening the file. Acceptable values are "sec2", "family", "split", "multi", "direct", and "stream". Without the file driver flag, the file will be opened with each driver in @@ -93,7 +100,7 @@ usage: h5dump [OPTIONS] files Q - is the sort index type. It can be "creation_order" or "name" (default) Z - is the sort order type. It can be "descending" or "ascending" (default) - Examples: +--------------- Examples --------------- 1) Attribute foo of the group /bar_none in file quux.h5 diff --git a/tools/testfiles/tpbitsLengthExceeded.ddl b/tools/testfiles/tpbitsLengthExceeded.ddl index ffd9910..58c0e05 100644 --- a/tools/testfiles/tpbitsLengthExceeded.ddl +++ b/tools/testfiles/tpbitsLengthExceeded.ddl @@ -1,35 +1,45 @@ usage: h5dump [OPTIONS] files OPTIONS -h, --help Print a usage message and exit + -V, --version Print version number and exit +--------------- Formatting Options --------------- + -e, --escape Escape non printing characters + -r, --string Print 1-byte integer datasets as ASCII + -y, --noindex Do not print array indices with the data + -m T, --format=T Set the floating point output format + -q Q, --sort_by=Q Sort groups and attributes by index Q + -z Z, --sort_order=Z Sort groups and attributes by order Z + --enable-error-stack Prints messages from the HDF5 error stack as they + occur. + --no-compact-subset Disable compact form of subsetting and allow the use + of "[" in dataset names. + -w N, --width=N Set the number of columns of output. A value of 0 (zero) + sets the number of columns to the maximum (65535). + Default width is 80 columns. +--------------- File Options --------------- -n, --contents Print a list of the file contents and exit Optional value 1 also prints attributes. -B, --superblock Print the content of the super block -H, --header Print the header only; no data is displayed - -A, --onlyattr Print the header and value of attributes - Optional value 0 suppresses printing attributes. - -i, --object-ids Print the object ids - -r, --string Print 1-byte integer datasets as ASCII - -e, --escape Escape non printing characters - -V, --version Print version number and exit + -f D, --filedriver=D Specify which driver to open the file with + -o F, --output=F Output raw data into file F + -b B, --binary=B Binary file output, of form B + -O F, --ddl=F Output ddl text into file F + Do not use filename F to suppress ddl display +--------------- Object Options --------------- -a P, --attribute=P Print the specified attribute If an attribute name contains a slash (/), escape the slash with a preceding backslash (\). (See example section below.) -d P, --dataset=P Print the specified dataset - -y, --noindex Do not print array indices with the data - -p, --properties Print dataset filters, storage layout and fill value - -f D, --filedriver=D Specify which driver to open the file with -g P, --group=P Print the specified group and all members -l P, --soft-link=P Print the value(s) of the specified soft link - -o F, --output=F Output raw data into file F - -b B, --binary=B Binary file output, of form B -t P, --datatype=P Print the specified named datatype - -w N, --width=N Set the number of columns of output. A value of 0 (zero) - sets the number of columns to the maximum (65535). - Default width is 80 columns. - -m T, --format=T Set the floating point output format - -q Q, --sort_by=Q Sort groups and attributes by index Q - -z Z, --sort_order=Z Sort groups and attributes by order Z + -A, --onlyattr Print the header and value of attributes + Optional value 0 suppresses printing attributes. +--------------- Object Property Options --------------- + -i, --object-ids Print the object ids + -p, --properties Print dataset filters, storage layout and fill value -M L, --packedbits=L Print packed bits as unsigned integers, using mask format L for an integer dataset specified with option -d. L is a list of offset,length values, @@ -37,19 +47,15 @@ usage: h5dump [OPTIONS] files the data value and length is the number of bits of the mask. -R, --region Print dataset pointed by region references +--------------- XML Options --------------- -x, --xml Output in XML using Schema -u, --use-dtd Output in XML using DTD -D U, --xml-dtd=U Use the DTD or schema at U -X S, --xml-ns=S (XML Schema) Use qualified names n the XML ":": no namespace, default: "hdf5:" E.g., to dump a file called `-f', use h5dump -- -f - --enable-error-stack Prints messages from the HDF5 error stack as they - occur. - --no-compact-subset Disable compact form of subsetting and allow the use - of "[" in dataset names. - -O F, --ddl=F Output ddl text into file F - Do not use filename F to suppress ddl display +--------------- Subsetting Options --------------- Subsetting is available by using the following options with a dataset attribute. Subsetting is done by selecting a hyperslab from the data. Thus, the options mirror those for performing a hyperslab selection. @@ -65,6 +71,7 @@ usage: h5dump [OPTIONS] files number of dimensions in the dataspace being queried (Alternate compact form of subsetting is described in the Reference Manual) +--------------- Option Argument Conventions --------------- D - is the file driver to use in opening the file. Acceptable values are "sec2", "family", "split", "multi", "direct", and "stream". Without the file driver flag, the file will be opened with each driver in @@ -93,7 +100,7 @@ usage: h5dump [OPTIONS] files Q - is the sort index type. It can be "creation_order" or "name" (default) Z - is the sort order type. It can be "descending" or "ascending" (default) - Examples: +--------------- Examples --------------- 1) Attribute foo of the group /bar_none in file quux.h5 diff --git a/tools/testfiles/tpbitsLengthPositive.ddl b/tools/testfiles/tpbitsLengthPositive.ddl index a54812b..8a93cbc 100644 --- a/tools/testfiles/tpbitsLengthPositive.ddl +++ b/tools/testfiles/tpbitsLengthPositive.ddl @@ -1,35 +1,45 @@ usage: h5dump [OPTIONS] files OPTIONS -h, --help Print a usage message and exit + -V, --version Print version number and exit +--------------- Formatting Options --------------- + -e, --escape Escape non printing characters + -r, --string Print 1-byte integer datasets as ASCII + -y, --noindex Do not print array indices with the data + -m T, --format=T Set the floating point output format + -q Q, --sort_by=Q Sort groups and attributes by index Q + -z Z, --sort_order=Z Sort groups and attributes by order Z + --enable-error-stack Prints messages from the HDF5 error stack as they + occur. + --no-compact-subset Disable compact form of subsetting and allow the use + of "[" in dataset names. + -w N, --width=N Set the number of columns of output. A value of 0 (zero) + sets the number of columns to the maximum (65535). + Default width is 80 columns. +--------------- File Options --------------- -n, --contents Print a list of the file contents and exit Optional value 1 also prints attributes. -B, --superblock Print the content of the super block -H, --header Print the header only; no data is displayed - -A, --onlyattr Print the header and value of attributes - Optional value 0 suppresses printing attributes. - -i, --object-ids Print the object ids - -r, --string Print 1-byte integer datasets as ASCII - -e, --escape Escape non printing characters - -V, --version Print version number and exit + -f D, --filedriver=D Specify which driver to open the file with + -o F, --output=F Output raw data into file F + -b B, --binary=B Binary file output, of form B + -O F, --ddl=F Output ddl text into file F + Do not use filename F to suppress ddl display +--------------- Object Options --------------- -a P, --attribute=P Print the specified attribute If an attribute name contains a slash (/), escape the slash with a preceding backslash (\). (See example section below.) -d P, --dataset=P Print the specified dataset - -y, --noindex Do not print array indices with the data - -p, --properties Print dataset filters, storage layout and fill value - -f D, --filedriver=D Specify which driver to open the file with -g P, --group=P Print the specified group and all members -l P, --soft-link=P Print the value(s) of the specified soft link - -o F, --output=F Output raw data into file F - -b B, --binary=B Binary file output, of form B -t P, --datatype=P Print the specified named datatype - -w N, --width=N Set the number of columns of output. A value of 0 (zero) - sets the number of columns to the maximum (65535). - Default width is 80 columns. - -m T, --format=T Set the floating point output format - -q Q, --sort_by=Q Sort groups and attributes by index Q - -z Z, --sort_order=Z Sort groups and attributes by order Z + -A, --onlyattr Print the header and value of attributes + Optional value 0 suppresses printing attributes. +--------------- Object Property Options --------------- + -i, --object-ids Print the object ids + -p, --properties Print dataset filters, storage layout and fill value -M L, --packedbits=L Print packed bits as unsigned integers, using mask format L for an integer dataset specified with option -d. L is a list of offset,length values, @@ -37,19 +47,15 @@ usage: h5dump [OPTIONS] files the data value and length is the number of bits of the mask. -R, --region Print dataset pointed by region references +--------------- XML Options --------------- -x, --xml Output in XML using Schema -u, --use-dtd Output in XML using DTD -D U, --xml-dtd=U Use the DTD or schema at U -X S, --xml-ns=S (XML Schema) Use qualified names n the XML ":": no namespace, default: "hdf5:" E.g., to dump a file called `-f', use h5dump -- -f - --enable-error-stack Prints messages from the HDF5 error stack as they - occur. - --no-compact-subset Disable compact form of subsetting and allow the use - of "[" in dataset names. - -O F, --ddl=F Output ddl text into file F - Do not use filename F to suppress ddl display +--------------- Subsetting Options --------------- Subsetting is available by using the following options with a dataset attribute. Subsetting is done by selecting a hyperslab from the data. Thus, the options mirror those for performing a hyperslab selection. @@ -65,6 +71,7 @@ usage: h5dump [OPTIONS] files number of dimensions in the dataspace being queried (Alternate compact form of subsetting is described in the Reference Manual) +--------------- Option Argument Conventions --------------- D - is the file driver to use in opening the file. Acceptable values are "sec2", "family", "split", "multi", "direct", and "stream". Without the file driver flag, the file will be opened with each driver in @@ -93,7 +100,7 @@ usage: h5dump [OPTIONS] files Q - is the sort index type. It can be "creation_order" or "name" (default) Z - is the sort order type. It can be "descending" or "ascending" (default) - Examples: +--------------- Examples --------------- 1) Attribute foo of the group /bar_none in file quux.h5 diff --git a/tools/testfiles/tpbitsMaxExceeded.ddl b/tools/testfiles/tpbitsMaxExceeded.ddl index 1a8dd11..21c5af4 100644 --- a/tools/testfiles/tpbitsMaxExceeded.ddl +++ b/tools/testfiles/tpbitsMaxExceeded.ddl @@ -1,35 +1,45 @@ usage: h5dump [OPTIONS] files OPTIONS -h, --help Print a usage message and exit + -V, --version Print version number and exit +--------------- Formatting Options --------------- + -e, --escape Escape non printing characters + -r, --string Print 1-byte integer datasets as ASCII + -y, --noindex Do not print array indices with the data + -m T, --format=T Set the floating point output format + -q Q, --sort_by=Q Sort groups and attributes by index Q + -z Z, --sort_order=Z Sort groups and attributes by order Z + --enable-error-stack Prints messages from the HDF5 error stack as they + occur. + --no-compact-subset Disable compact form of subsetting and allow the use + of "[" in dataset names. + -w N, --width=N Set the number of columns of output. A value of 0 (zero) + sets the number of columns to the maximum (65535). + Default width is 80 columns. +--------------- File Options --------------- -n, --contents Print a list of the file contents and exit Optional value 1 also prints attributes. -B, --superblock Print the content of the super block -H, --header Print the header only; no data is displayed - -A, --onlyattr Print the header and value of attributes - Optional value 0 suppresses printing attributes. - -i, --object-ids Print the object ids - -r, --string Print 1-byte integer datasets as ASCII - -e, --escape Escape non printing characters - -V, --version Print version number and exit + -f D, --filedriver=D Specify which driver to open the file with + -o F, --output=F Output raw data into file F + -b B, --binary=B Binary file output, of form B + -O F, --ddl=F Output ddl text into file F + Do not use filename F to suppress ddl display +--------------- Object Options --------------- -a P, --attribute=P Print the specified attribute If an attribute name contains a slash (/), escape the slash with a preceding backslash (\). (See example section below.) -d P, --dataset=P Print the specified dataset - -y, --noindex Do not print array indices with the data - -p, --properties Print dataset filters, storage layout and fill value - -f D, --filedriver=D Specify which driver to open the file with -g P, --group=P Print the specified group and all members -l P, --soft-link=P Print the value(s) of the specified soft link - -o F, --output=F Output raw data into file F - -b B, --binary=B Binary file output, of form B -t P, --datatype=P Print the specified named datatype - -w N, --width=N Set the number of columns of output. A value of 0 (zero) - sets the number of columns to the maximum (65535). - Default width is 80 columns. - -m T, --format=T Set the floating point output format - -q Q, --sort_by=Q Sort groups and attributes by index Q - -z Z, --sort_order=Z Sort groups and attributes by order Z + -A, --onlyattr Print the header and value of attributes + Optional value 0 suppresses printing attributes. +--------------- Object Property Options --------------- + -i, --object-ids Print the object ids + -p, --properties Print dataset filters, storage layout and fill value -M L, --packedbits=L Print packed bits as unsigned integers, using mask format L for an integer dataset specified with option -d. L is a list of offset,length values, @@ -37,19 +47,15 @@ usage: h5dump [OPTIONS] files the data value and length is the number of bits of the mask. -R, --region Print dataset pointed by region references +--------------- XML Options --------------- -x, --xml Output in XML using Schema -u, --use-dtd Output in XML using DTD -D U, --xml-dtd=U Use the DTD or schema at U -X S, --xml-ns=S (XML Schema) Use qualified names n the XML ":": no namespace, default: "hdf5:" E.g., to dump a file called `-f', use h5dump -- -f - --enable-error-stack Prints messages from the HDF5 error stack as they - occur. - --no-compact-subset Disable compact form of subsetting and allow the use - of "[" in dataset names. - -O F, --ddl=F Output ddl text into file F - Do not use filename F to suppress ddl display +--------------- Subsetting Options --------------- Subsetting is available by using the following options with a dataset attribute. Subsetting is done by selecting a hyperslab from the data. Thus, the options mirror those for performing a hyperslab selection. @@ -65,6 +71,7 @@ usage: h5dump [OPTIONS] files number of dimensions in the dataspace being queried (Alternate compact form of subsetting is described in the Reference Manual) +--------------- Option Argument Conventions --------------- D - is the file driver to use in opening the file. Acceptable values are "sec2", "family", "split", "multi", "direct", and "stream". Without the file driver flag, the file will be opened with each driver in @@ -93,7 +100,7 @@ usage: h5dump [OPTIONS] files Q - is the sort index type. It can be "creation_order" or "name" (default) Z - is the sort order type. It can be "descending" or "ascending" (default) - Examples: +--------------- Examples --------------- 1) Attribute foo of the group /bar_none in file quux.h5 diff --git a/tools/testfiles/tpbitsOffsetExceeded.ddl b/tools/testfiles/tpbitsOffsetExceeded.ddl index 7527131..52d901d 100644 --- a/tools/testfiles/tpbitsOffsetExceeded.ddl +++ b/tools/testfiles/tpbitsOffsetExceeded.ddl @@ -1,35 +1,45 @@ usage: h5dump [OPTIONS] files OPTIONS -h, --help Print a usage message and exit + -V, --version Print version number and exit +--------------- Formatting Options --------------- + -e, --escape Escape non printing characters + -r, --string Print 1-byte integer datasets as ASCII + -y, --noindex Do not print array indices with the data + -m T, --format=T Set the floating point output format + -q Q, --sort_by=Q Sort groups and attributes by index Q + -z Z, --sort_order=Z Sort groups and attributes by order Z + --enable-error-stack Prints messages from the HDF5 error stack as they + occur. + --no-compact-subset Disable compact form of subsetting and allow the use + of "[" in dataset names. + -w N, --width=N Set the number of columns of output. A value of 0 (zero) + sets the number of columns to the maximum (65535). + Default width is 80 columns. +--------------- File Options --------------- -n, --contents Print a list of the file contents and exit Optional value 1 also prints attributes. -B, --superblock Print the content of the super block -H, --header Print the header only; no data is displayed - -A, --onlyattr Print the header and value of attributes - Optional value 0 suppresses printing attributes. - -i, --object-ids Print the object ids - -r, --string Print 1-byte integer datasets as ASCII - -e, --escape Escape non printing characters - -V, --version Print version number and exit + -f D, --filedriver=D Specify which driver to open the file with + -o F, --output=F Output raw data into file F + -b B, --binary=B Binary file output, of form B + -O F, --ddl=F Output ddl text into file F + Do not use filename F to suppress ddl display +--------------- Object Options --------------- -a P, --attribute=P Print the specified attribute If an attribute name contains a slash (/), escape the slash with a preceding backslash (\). (See example section below.) -d P, --dataset=P Print the specified dataset - -y, --noindex Do not print array indices with the data - -p, --properties Print dataset filters, storage layout and fill value - -f D, --filedriver=D Specify which driver to open the file with -g P, --group=P Print the specified group and all members -l P, --soft-link=P Print the value(s) of the specified soft link - -o F, --output=F Output raw data into file F - -b B, --binary=B Binary file output, of form B -t P, --datatype=P Print the specified named datatype - -w N, --width=N Set the number of columns of output. A value of 0 (zero) - sets the number of columns to the maximum (65535). - Default width is 80 columns. - -m T, --format=T Set the floating point output format - -q Q, --sort_by=Q Sort groups and attributes by index Q - -z Z, --sort_order=Z Sort groups and attributes by order Z + -A, --onlyattr Print the header and value of attributes + Optional value 0 suppresses printing attributes. +--------------- Object Property Options --------------- + -i, --object-ids Print the object ids + -p, --properties Print dataset filters, storage layout and fill value -M L, --packedbits=L Print packed bits as unsigned integers, using mask format L for an integer dataset specified with option -d. L is a list of offset,length values, @@ -37,19 +47,15 @@ usage: h5dump [OPTIONS] files the data value and length is the number of bits of the mask. -R, --region Print dataset pointed by region references +--------------- XML Options --------------- -x, --xml Output in XML using Schema -u, --use-dtd Output in XML using DTD -D U, --xml-dtd=U Use the DTD or schema at U -X S, --xml-ns=S (XML Schema) Use qualified names n the XML ":": no namespace, default: "hdf5:" E.g., to dump a file called `-f', use h5dump -- -f - --enable-error-stack Prints messages from the HDF5 error stack as they - occur. - --no-compact-subset Disable compact form of subsetting and allow the use - of "[" in dataset names. - -O F, --ddl=F Output ddl text into file F - Do not use filename F to suppress ddl display +--------------- Subsetting Options --------------- Subsetting is available by using the following options with a dataset attribute. Subsetting is done by selecting a hyperslab from the data. Thus, the options mirror those for performing a hyperslab selection. @@ -65,6 +71,7 @@ usage: h5dump [OPTIONS] files number of dimensions in the dataspace being queried (Alternate compact form of subsetting is described in the Reference Manual) +--------------- Option Argument Conventions --------------- D - is the file driver to use in opening the file. Acceptable values are "sec2", "family", "split", "multi", "direct", and "stream". Without the file driver flag, the file will be opened with each driver in @@ -93,7 +100,7 @@ usage: h5dump [OPTIONS] files Q - is the sort index type. It can be "creation_order" or "name" (default) Z - is the sort order type. It can be "descending" or "ascending" (default) - Examples: +--------------- Examples --------------- 1) Attribute foo of the group /bar_none in file quux.h5 diff --git a/tools/testfiles/tpbitsOffsetNegative.ddl b/tools/testfiles/tpbitsOffsetNegative.ddl index 21b573d..82b6c88 100644 --- a/tools/testfiles/tpbitsOffsetNegative.ddl +++ b/tools/testfiles/tpbitsOffsetNegative.ddl @@ -1,35 +1,45 @@ usage: h5dump [OPTIONS] files OPTIONS -h, --help Print a usage message and exit + -V, --version Print version number and exit +--------------- Formatting Options --------------- + -e, --escape Escape non printing characters + -r, --string Print 1-byte integer datasets as ASCII + -y, --noindex Do not print array indices with the data + -m T, --format=T Set the floating point output format + -q Q, --sort_by=Q Sort groups and attributes by index Q + -z Z, --sort_order=Z Sort groups and attributes by order Z + --enable-error-stack Prints messages from the HDF5 error stack as they + occur. + --no-compact-subset Disable compact form of subsetting and allow the use + of "[" in dataset names. + -w N, --width=N Set the number of columns of output. A value of 0 (zero) + sets the number of columns to the maximum (65535). + Default width is 80 columns. +--------------- File Options --------------- -n, --contents Print a list of the file contents and exit Optional value 1 also prints attributes. -B, --superblock Print the content of the super block -H, --header Print the header only; no data is displayed - -A, --onlyattr Print the header and value of attributes - Optional value 0 suppresses printing attributes. - -i, --object-ids Print the object ids - -r, --string Print 1-byte integer datasets as ASCII - -e, --escape Escape non printing characters - -V, --version Print version number and exit + -f D, --filedriver=D Specify which driver to open the file with + -o F, --output=F Output raw data into file F + -b B, --binary=B Binary file output, of form B + -O F, --ddl=F Output ddl text into file F + Do not use filename F to suppress ddl display +--------------- Object Options --------------- -a P, --attribute=P Print the specified attribute If an attribute name contains a slash (/), escape the slash with a preceding backslash (\). (See example section below.) -d P, --dataset=P Print the specified dataset - -y, --noindex Do not print array indices with the data - -p, --properties Print dataset filters, storage layout and fill value - -f D, --filedriver=D Specify which driver to open the file with -g P, --group=P Print the specified group and all members -l P, --soft-link=P Print the value(s) of the specified soft link - -o F, --output=F Output raw data into file F - -b B, --binary=B Binary file output, of form B -t P, --datatype=P Print the specified named datatype - -w N, --width=N Set the number of columns of output. A value of 0 (zero) - sets the number of columns to the maximum (65535). - Default width is 80 columns. - -m T, --format=T Set the floating point output format - -q Q, --sort_by=Q Sort groups and attributes by index Q - -z Z, --sort_order=Z Sort groups and attributes by order Z + -A, --onlyattr Print the header and value of attributes + Optional value 0 suppresses printing attributes. +--------------- Object Property Options --------------- + -i, --object-ids Print the object ids + -p, --properties Print dataset filters, storage layout and fill value -M L, --packedbits=L Print packed bits as unsigned integers, using mask format L for an integer dataset specified with option -d. L is a list of offset,length values, @@ -37,19 +47,15 @@ usage: h5dump [OPTIONS] files the data value and length is the number of bits of the mask. -R, --region Print dataset pointed by region references +--------------- XML Options --------------- -x, --xml Output in XML using Schema -u, --use-dtd Output in XML using DTD -D U, --xml-dtd=U Use the DTD or schema at U -X S, --xml-ns=S (XML Schema) Use qualified names n the XML ":": no namespace, default: "hdf5:" E.g., to dump a file called `-f', use h5dump -- -f - --enable-error-stack Prints messages from the HDF5 error stack as they - occur. - --no-compact-subset Disable compact form of subsetting and allow the use - of "[" in dataset names. - -O F, --ddl=F Output ddl text into file F - Do not use filename F to suppress ddl display +--------------- Subsetting Options --------------- Subsetting is available by using the following options with a dataset attribute. Subsetting is done by selecting a hyperslab from the data. Thus, the options mirror those for performing a hyperslab selection. @@ -65,6 +71,7 @@ usage: h5dump [OPTIONS] files number of dimensions in the dataspace being queried (Alternate compact form of subsetting is described in the Reference Manual) +--------------- Option Argument Conventions --------------- D - is the file driver to use in opening the file. Acceptable values are "sec2", "family", "split", "multi", "direct", and "stream". Without the file driver flag, the file will be opened with each driver in @@ -93,7 +100,7 @@ usage: h5dump [OPTIONS] files Q - is the sort index type. It can be "creation_order" or "name" (default) Z - is the sort order type. It can be "descending" or "ascending" (default) - Examples: +--------------- Examples --------------- 1) Attribute foo of the group /bar_none in file quux.h5 -- cgit v0.12 From bf9b274e275015db04298c7d078d951d8a76f238 Mon Sep 17 00:00:00 2001 From: Larry Knox Date: Fri, 2 Aug 2013 16:23:39 -0500 Subject: [svn-r23964] Corrected "continuous" layout to "contiguous in h5repack -h output and comment. Jira issue HDFFV-8493. No test - text only change. --- tools/h5repack/h5repack_main.c | 2 +- tools/h5repack/h5repack_parse.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/h5repack/h5repack_main.c b/tools/h5repack/h5repack_main.c index f61c961..921b390 100644 --- a/tools/h5repack/h5repack_main.c +++ b/tools/h5repack/h5repack_main.c @@ -241,7 +241,7 @@ static void usage(const char *prog) printf(" can be:\n"); printf(" CHUNK, to apply chunking layout\n"); printf(" COMPA, to apply compact layout\n"); - printf(" CONTI, to apply continuous layout\n"); + printf(" CONTI, to apply contiguous layout\n"); printf(" is optional layout information\n"); printf(" CHUNK=DIM[xDIM...xDIM], the chunk size of each dimension\n"); printf(" COMPA (no parameter)\n"); diff --git a/tools/h5repack/h5repack_parse.c b/tools/h5repack/h5repack_parse.c index 70eadd2..9f798e9 100644 --- a/tools/h5repack/h5repack_parse.c +++ b/tools/h5repack/h5repack_parse.c @@ -460,7 +460,7 @@ obj_list_t* parse_filter(const char *str, * chunked. NULL, on error * the layout type can be: * CHUNK, to apply chunking layout - * CONTI, to apply continuous layout + * CONTI, to apply contiguous layout * COMPA, to apply compact layout * * Example: -- cgit v0.12 From f1b5d46cd045a9a705be6515a338e7bbb3298161 Mon Sep 17 00:00:00 2001 From: HDF Tester Date: Sun, 4 Aug 2013 03:35:17 -0500 Subject: [svn-r23968] Snapshot version 1.9 release 160 --- README.txt | 2 +- c++/src/Makefile.in | 2 +- config/lt_vers.am | 2 +- configure | 22 +++++++++++----------- configure.ac | 2 +- fortran/src/Makefile.in | 2 +- hl/c++/src/Makefile.in | 2 +- hl/fortran/src/Makefile.in | 2 +- hl/src/Makefile.in | 2 +- release_docs/RELEASE.txt | 2 +- src/H5public.h | 4 ++-- src/Makefile.in | 2 +- vms/src/h5pubconf.h | 6 +++--- 13 files changed, 26 insertions(+), 26 deletions(-) diff --git a/README.txt b/README.txt index 8044281..ce3a60b 100644 --- a/README.txt +++ b/README.txt @@ -1,4 +1,4 @@ -HDF5 version 1.9.160 currently under development +HDF5 version 1.9.161 currently under development Please refer to the release_docs/INSTALL file for installation instructions. ------------------------------------------------------------------------------ diff --git a/c++/src/Makefile.in b/c++/src/Makefile.in index 4793093..6e88509 100644 --- a/c++/src/Makefile.in +++ b/c++/src/Makefile.in @@ -467,7 +467,7 @@ CHECK_CLEANFILES = *.chkexe *.chklog *.clog # Add libtool shared library version numbers to the HDF5 library # See libtool versioning documentation online. LT_VERS_INTERFACE = 6 -LT_VERS_REVISION = 150 +LT_VERS_REVISION = 151 LT_VERS_AGE = 0 # Include src directory diff --git a/config/lt_vers.am b/config/lt_vers.am index 43ee967..e9ee77d 100644 --- a/config/lt_vers.am +++ b/config/lt_vers.am @@ -17,7 +17,7 @@ # Add libtool shared library version numbers to the HDF5 library # See libtool versioning documentation online. LT_VERS_INTERFACE = 6 -LT_VERS_REVISION = 150 +LT_VERS_REVISION = 151 LT_VERS_AGE = 0 ## If the API changes *at all*, increment LT_VERS_INTERFACE and diff --git a/configure b/configure index eacff2e..5c6e415 100755 --- a/configure +++ b/configure @@ -1,7 +1,7 @@ #! /bin/sh # From configure.ac Id: configure.ac 22697 2012-08-19 14:35:47Z hdftest . # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.69 for HDF5 1.9.160. +# Generated by GNU Autoconf 2.69 for HDF5 1.9.161. # # Report bugs to . # @@ -591,8 +591,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='HDF5' PACKAGE_TARNAME='hdf5' -PACKAGE_VERSION='1.9.160' -PACKAGE_STRING='HDF5 1.9.160' +PACKAGE_VERSION='1.9.161' +PACKAGE_STRING='HDF5 1.9.161' PACKAGE_BUGREPORT='help@hdfgroup.org' PACKAGE_URL='' @@ -1486,7 +1486,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures HDF5 1.9.160 to adapt to many kinds of systems. +\`configure' configures HDF5 1.9.161 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1556,7 +1556,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of HDF5 1.9.160:";; + short | recursive ) echo "Configuration of HDF5 1.9.161:";; esac cat <<\_ACEOF @@ -1752,7 +1752,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -HDF5 configure 1.9.160 +HDF5 configure 1.9.161 generated by GNU Autoconf 2.69 Copyright (C) 2012 Free Software Foundation, Inc. @@ -2846,7 +2846,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by HDF5 $as_me 1.9.160, which was +It was created by HDF5 $as_me 1.9.161, which was generated by GNU Autoconf 2.69. Invocation command line was $ $0 $@ @@ -3678,7 +3678,7 @@ fi # Define the identity of the package. PACKAGE='hdf5' - VERSION='1.9.160' + VERSION='1.9.161' cat >>confdefs.h <<_ACEOF @@ -31632,7 +31632,7 @@ Usage: $0 [OPTIONS] Report bugs to ." lt_cl_version="\ -HDF5 config.lt 1.9.160 +HDF5 config.lt 1.9.161 configured by $0, generated by GNU Autoconf 2.69. Copyright (C) 2011 Free Software Foundation, Inc. @@ -33762,7 +33762,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by HDF5 $as_me 1.9.160, which was +This file was extended by HDF5 $as_me 1.9.161, which was generated by GNU Autoconf 2.69. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -33828,7 +33828,7 @@ _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ -HDF5 config.status 1.9.160 +HDF5 config.status 1.9.161 configured by $0, generated by GNU Autoconf 2.69, with options \\"\$ac_cs_config\\" diff --git a/configure.ac b/configure.ac index 6d615d6..16f2e3e 100644 --- a/configure.ac +++ b/configure.ac @@ -26,7 +26,7 @@ AC_PREREQ([2.69]) ## NOTE: Do not forget to change the version number here when we do a ## release!!! ## -AC_INIT([HDF5], [1.9.160], [help@hdfgroup.org]) +AC_INIT([HDF5], [1.9.161], [help@hdfgroup.org]) AC_CONFIG_SRCDIR([src/H5.c]) AC_CONFIG_HEADER([src/H5config.h]) diff --git a/fortran/src/Makefile.in b/fortran/src/Makefile.in index 94b43ed..31d9871 100644 --- a/fortran/src/Makefile.in +++ b/fortran/src/Makefile.in @@ -518,7 +518,7 @@ CHECK_CLEANFILES = *.chkexe *.chklog *.clog # Add libtool shared library version numbers to the HDF5 library # See libtool versioning documentation online. LT_VERS_INTERFACE = 6 -LT_VERS_REVISION = 150 +LT_VERS_REVISION = 151 LT_VERS_AGE = 0 # Include src directory in both Fortran and C flags (C compiler is used diff --git a/hl/c++/src/Makefile.in b/hl/c++/src/Makefile.in index 9ad806f..d805db3 100644 --- a/hl/c++/src/Makefile.in +++ b/hl/c++/src/Makefile.in @@ -458,7 +458,7 @@ CHECK_CLEANFILES = *.chkexe *.chklog *.clog # Add libtool shared library version numbers to the HDF5 library # See libtool versioning documentation online. LT_VERS_INTERFACE = 6 -LT_VERS_REVISION = 150 +LT_VERS_REVISION = 151 LT_VERS_AGE = 0 # Include src directory diff --git a/hl/fortran/src/Makefile.in b/hl/fortran/src/Makefile.in index c850c03..353b844 100644 --- a/hl/fortran/src/Makefile.in +++ b/hl/fortran/src/Makefile.in @@ -474,7 +474,7 @@ CHECK_CLEANFILES = *.chkexe *.chklog *.clog # Add libtool shared library version numbers to the HDF5 library # See libtool versioning documentation online. LT_VERS_INTERFACE = 6 -LT_VERS_REVISION = 150 +LT_VERS_REVISION = 151 LT_VERS_AGE = 0 INCLUDES = -I$(top_srcdir)/src -I$(top_srcdir)/hl/src -I$(top_builddir)/hl/src \ -I$(top_srcdir)/fortran/src -I$(top_builddir)/fortran/src diff --git a/hl/src/Makefile.in b/hl/src/Makefile.in index cb32884..e189ecd 100644 --- a/hl/src/Makefile.in +++ b/hl/src/Makefile.in @@ -457,7 +457,7 @@ CHECK_CLEANFILES = *.chkexe *.chklog *.clog # Add libtool shared library version numbers to the HDF5 library # See libtool versioning documentation online. LT_VERS_INTERFACE = 6 -LT_VERS_REVISION = 150 +LT_VERS_REVISION = 151 LT_VERS_AGE = 0 # This library is our main target. diff --git a/release_docs/RELEASE.txt b/release_docs/RELEASE.txt index a89b070..dcdc2f9 100644 --- a/release_docs/RELEASE.txt +++ b/release_docs/RELEASE.txt @@ -1,4 +1,4 @@ -HDF5 version 1.9.160 currently under development +HDF5 version 1.9.161 currently under development ================================================================================ diff --git a/src/H5public.h b/src/H5public.h index 1bd38eb..9e05cc9 100644 --- a/src/H5public.h +++ b/src/H5public.h @@ -75,10 +75,10 @@ extern "C" { /* Version numbers */ #define H5_VERS_MAJOR 1 /* For major interface/format changes */ #define H5_VERS_MINOR 9 /* For minor interface/format changes */ -#define H5_VERS_RELEASE 160 /* For tweaks, bug-fixes, or development */ +#define H5_VERS_RELEASE 161 /* For tweaks, bug-fixes, or development */ #define H5_VERS_SUBRELEASE "" /* For pre-releases like snap0 */ /* Empty string for real releases. */ -#define H5_VERS_INFO "HDF5 library version: 1.9.160" /* Full version string */ +#define H5_VERS_INFO "HDF5 library version: 1.9.161" /* Full version string */ #define H5check() H5check_version(H5_VERS_MAJOR,H5_VERS_MINOR, \ H5_VERS_RELEASE) diff --git a/src/Makefile.in b/src/Makefile.in index b00cc01..276052e 100644 --- a/src/Makefile.in +++ b/src/Makefile.in @@ -522,7 +522,7 @@ CHECK_CLEANFILES = *.chkexe *.chklog *.clog # Add libtool shared library version numbers to the HDF5 library # See libtool versioning documentation online. LT_VERS_INTERFACE = 6 -LT_VERS_REVISION = 150 +LT_VERS_REVISION = 151 LT_VERS_AGE = 0 H5detect_CFLAGS = -g $(AM_CFLAGS) diff --git a/vms/src/h5pubconf.h b/vms/src/h5pubconf.h index 57c2936..f7d42b0 100644 --- a/vms/src/h5pubconf.h +++ b/vms/src/h5pubconf.h @@ -511,7 +511,7 @@ #define H5_PACKAGE_NAME "HDF5" /* Define to the full name and version of this package. */ -#define H5_PACKAGE_STRING "HDF5 1.9.160" +#define H5_PACKAGE_STRING "HDF5 1.9.161" /* Define to the one symbol short name of this package. */ #define H5_PACKAGE_TARNAME "hdf5" @@ -520,7 +520,7 @@ #define H5_PACKAGE_URL "" /* Define to the version of this package. */ -#define H5_PACKAGE_VERSION "1.9.160" +#define H5_PACKAGE_VERSION "1.9.161" /* Width for printf() for type `long long' or `__int64', use `ll' */ #define H5_PRINTF_LL_WIDTH "ll" @@ -683,7 +683,7 @@ /* #undef H5_USING_MEMCHECKER */ /* Version number of package */ -#define H5_VERSION "1.9.160" +#define H5_VERSION "1.9.161" /* Define if vsnprintf() returns the correct value for formatted strings that don't fit into size allowed */ -- cgit v0.12 From c902bbdd9041be89ffe6bc1f186ae166e03c435a Mon Sep 17 00:00:00 2001 From: Vailin Choi Date: Thu, 8 Aug 2013 12:24:43 -0500 Subject: [svn-r23975] This checkin contains-- A) Fix for HDFFV-1238: --Add 3 new options to allow users in setting threshold for small groups/datasets/attributes (tools/h5stat/h5stat.c) --Generate new test file for testing the new options (tools/h5stat/h5stat_gentest.c) --Add tests for the new options (tools/h5stat/testh5stat.sh.in) --Update expected output files (tools/h5stat/testfiles/*.ddl) B) Fix a bug in determining maximum dimension size for 1-D dataset in dataset_stats() (tools/h5stat/h5stat.c) --- tools/h5stat/h5stat.c | 163 ++++++++++--- tools/h5stat/h5stat_gentest.c | 333 +++++++++++++++++++++++---- tools/h5stat/testfiles/h5stat_filters-d.ddl | 6 +- tools/h5stat/testfiles/h5stat_filters-dT.ddl | 6 +- tools/h5stat/testfiles/h5stat_filters-g.ddl | 4 +- tools/h5stat/testfiles/h5stat_filters.ddl | 12 +- tools/h5stat/testfiles/h5stat_help1.ddl | 9 + tools/h5stat/testfiles/h5stat_help2.ddl | 9 + tools/h5stat/testfiles/h5stat_newgrat-UA.ddl | 2 +- tools/h5stat/testfiles/h5stat_newgrat.ddl | 37 ++- tools/h5stat/testfiles/h5stat_newgrat.h5 | Bin 6369482 -> 6362168 bytes tools/h5stat/testfiles/h5stat_tsohm.ddl | 12 +- tools/h5stat/testh5stat.sh.in | 66 +++++- 13 files changed, 535 insertions(+), 124 deletions(-) diff --git a/tools/h5stat/h5stat.c b/tools/h5stat/h5stat.c index dcc2c08..6fc1dc4 100644 --- a/tools/h5stat/h5stat.c +++ b/tools/h5stat/h5stat.c @@ -26,10 +26,13 @@ #define PROGRAMNAME "h5stat" /* Parameters to control statistics gathered */ -#define SIZE_SMALL_GROUPS 10 -#define SIZE_SMALL_ATTRS 10 -#define SIZE_SMALL_DSETS 10 -#define SIZE_SMALL_SECTS 10 + +/* Default threshold for small groups/datasets/attributes */ +#define DEF_SIZE_SMALL_GROUPS 10 +#define DEF_SIZE_SMALL_DSETS 10 +#define DEF_SIZE_SMALL_ATTRS 10 + +#define SIZE_SMALL_SECTS 10 #define H5_NFILTERS_IMPL 8 /* Number of currently implemented filters + one to accommodate for user-define filters + one @@ -69,22 +72,22 @@ typedef struct iter_t { unsigned long max_links; /* Maximum # of links to an object */ hsize_t max_fanout; /* Maximum fanout from a group */ - unsigned long num_small_groups[SIZE_SMALL_GROUPS]; /* Size of small groups tracked */ + unsigned long *num_small_groups; /* Size of small groups tracked */ unsigned group_nbins; /* Number of bins for group counts */ unsigned long *group_bins; /* Pointer to array of bins for group counts */ ohdr_info_t group_ohdr_info; /* Object header information for groups */ - hsize_t max_attrs; /* Maximum attributes from a group */ - unsigned long num_small_attrs[SIZE_SMALL_ATTRS]; /* Size of small attributes tracked */ + hsize_t max_attrs; /* Maximum attributes from a group */ + unsigned long *num_small_attrs; /* Size of small attributes tracked */ unsigned attr_nbins; /* Number of bins for attribute counts */ unsigned long *attr_bins; /* Pointer to array of bins for attribute counts */ unsigned max_dset_rank; /* Maximum rank of dataset */ unsigned long dset_rank_count[H5S_MAX_RANK]; /* Number of datasets of each rank */ hsize_t max_dset_dims; /* Maximum dimension size of dataset */ - unsigned long small_dset_dims[SIZE_SMALL_DSETS]; /* Size of dimensions of small datasets tracked */ + unsigned long *small_dset_dims; /* Size of dimensions of small datasets tracked */ unsigned long dset_layouts[H5D_NLAYOUTS]; /* Type of storage for each dataset */ - unsigned long dset_comptype[H5_NFILTERS_IMPL]; /* Number of currently implemented filters */ + unsigned long dset_comptype[H5_NFILTERS_IMPL]; /* Number of currently implemented filters */ unsigned long dset_ntypes; /* Number of diff. dataset datatypes found */ dtype_info_t *dset_type_info; /* Pointer to dataset datatype information found */ unsigned dset_dim_nbins; /* Number of bins for dataset dimensions */ @@ -134,15 +137,19 @@ static int display_dset_metadata = FALSE; /* display file space info f static int display_object = FALSE; /* not implemented yet */ +/* Initialize threshold for small groups/datasets/attributes */ +static int sgroups_threshold = DEF_SIZE_SMALL_GROUPS; +static int sdsets_threshold = DEF_SIZE_SMALL_DSETS; +static int sattrs_threshold = DEF_SIZE_SMALL_ATTRS; + /* a structure for handling the order command-line parameters come in */ struct handler_t { size_t obj_count; char **obj; }; - -static const char *s_opts ="ADdFfhGgsSTO:V"; -/* e.g. "filemetadata" has to precedue "file"; "groupmetadata" has to precede "group" etc. */ +static const char *s_opts ="Aa:Ddm:FfhGgl:sSTO:V"; +/* e.g. "filemetadata" has to precede "file"; "groupmetadata" has to precede "group" etc. */ static struct long_options l_opts[] = { {"help", no_arg, 'h'}, {"hel", no_arg, 'h'}, @@ -170,6 +177,10 @@ static struct long_options l_opts[] = { {"grou", no_arg, 'g'}, {"gro", no_arg, 'g'}, {"gr", no_arg, 'g'}, + { "links", require_arg, 'l' }, + { "link", require_arg, 'l' }, + { "lin", require_arg, 'l' }, + { "li", require_arg, 'l' }, {"dsetmetadata", no_arg, 'D'}, {"dsetmetadat", no_arg, 'D'}, {"dsetmetada", no_arg, 'D'}, @@ -181,6 +192,9 @@ static struct long_options l_opts[] = { {"dset", no_arg, 'd'}, {"dse", no_arg, 'd'}, {"ds", no_arg, 'd'}, + {"dims", require_arg, 'm'}, + {"dim", require_arg, 'm'}, + {"di", require_arg, 'm'}, {"dtypemetadata", no_arg, 'T'}, {"dtypemetadat", no_arg, 'T'}, {"dtypemetada", no_arg, 'T'}, @@ -212,6 +226,13 @@ static struct long_options l_opts[] = { { "attr", no_arg, 'A' }, { "att", no_arg, 'A' }, { "at", no_arg, 'A' }, + { "numattrs", require_arg, 'a' }, + { "numattr", require_arg, 'a' }, + { "numatt", require_arg, 'a' }, + { "numat", require_arg, 'a' }, + { "numa", require_arg, 'a' }, + { "num", require_arg, 'a' }, + { "nu", require_arg, 'a' }, { "freespace", no_arg, 's' }, { "freespac", no_arg, 's' }, { "freespa", no_arg, 's' }, @@ -237,6 +258,16 @@ leave(int ret) } + +/*------------------------------------------------------------------------- + * Function: usage + * + * Purpose: Compute the ceiling of log_10(x) + * + * Return: >0 on success, 0 on failure + * + *------------------------------------------------------------------------- + */ static void usage(const char *prog) { HDfflush(stdout); @@ -248,11 +279,20 @@ static void usage(const char *prog) HDfprintf(stdout, " -f, --file Print file information\n"); HDfprintf(stdout, " -F, --filemetadata Print file space information for file's metadata\n"); HDfprintf(stdout, " -g, --group Print group information\n"); + HDfprintf(stdout, " -l N, --links=N Set the threshold for the # of links when printing\n"); + HDfprintf(stdout, " information for small groups. N is an integer greater\n"); + HDfprintf(stdout, " than 0. The default threshold is 10.\n"); HDfprintf(stdout, " -G, --groupmetadata Print file space information for groups' metadata\n"); HDfprintf(stdout, " -d, --dset Print dataset information\n"); + HDfprintf(stdout, " -m N, --dims=N Set the threshold for the dimension sizes when printing\n"); + HDfprintf(stdout, " information for small datasets. N is an integer greater\n"); + HDfprintf(stdout, " than 0. The default threshold is 10.\n"); HDfprintf(stdout, " -D, --dsetmetadata Print file space information for datasets' metadata\n"); HDfprintf(stdout, " -T, --dtypemetadata Print datasets' datatype information\n"); HDfprintf(stdout, " -A, --attribute Print attribute information\n"); + HDfprintf(stdout, " -a N, --numattrs=N Set the threshold for the # of attributes when printing\n"); + HDfprintf(stdout, " information for small # of attributes. N is an integer greater\n"); + HDfprintf(stdout, " than 0. The default threshold is 10.\n"); HDfprintf(stdout, " -s, --freespace Print free space information\n"); HDfprintf(stdout, " -S, --summary Print summary of file space information\n"); } @@ -268,8 +308,6 @@ static void usage(const char *prog) * Programmer: Quincey Koziol * Monday, August 22, 2005 * - * Modifications: - * *------------------------------------------------------------------------- */ static unsigned @@ -311,7 +349,7 @@ attribute_stats(iter_t *iter, const H5O_info_t *oi) iter->attrs_heap_storage_size += oi->meta_size.attr.heap_size; /* Update small # of attribute count & limits */ - if(oi->num_attrs < SIZE_SMALL_ATTRS) + if(oi->num_attrs <= (hsize_t)sattrs_threshold) (iter->num_small_attrs[(size_t)oi->num_attrs])++; if(oi->num_attrs > iter->max_attrs) iter->max_attrs = oi->num_attrs; @@ -382,8 +420,10 @@ group_stats(iter_t *iter, const char *name, const H5O_info_t *oi) HDassert(ret >= 0); /* Update link stats */ - if(ginfo.nlinks < SIZE_SMALL_GROUPS) + /* Collect statistics for small groups */ + if(ginfo.nlinks < (hsize_t)sgroups_threshold) (iter->num_small_groups[(size_t)ginfo.nlinks])++; + /* Determine maximum link count */ if(ginfo.nlinks > iter->max_fanout) iter->max_fanout = ginfo.nlinks; @@ -514,8 +554,11 @@ dataset_stats(iter_t *iter, const char *name, const H5O_info_t *oi) /* Only gather dim size statistics on 1-D datasets */ if(ndims == 1) { - iter->max_dset_dims = dims[0]; - if(dims[0] < SIZE_SMALL_DSETS) + /* Determine maximum dimension size */ + if(dims[0] > iter->max_dset_dims) + iter->max_dset_dims = dims[0]; + /* Collect statistics for small datasets */ + if(dims[0] < (hsize_t)sdsets_threshold) (iter->small_dset_dims[(size_t)dims[0]])++; /* Add dim count to proper bin */ @@ -871,6 +914,15 @@ parse_command_line(int argc, const char *argv[], struct handler_t **hand_ret) display_group = TRUE; break; + case 'l': + sgroups_threshold = HDatoi(opt_arg); + if(sgroups_threshold < 1) { + error_msg("Invalid threshold for small groups\n"); + goto error; + } /* end if */ + + break; + case 'D': display_all = FALSE; display_dset_metadata = TRUE; @@ -881,6 +933,15 @@ parse_command_line(int argc, const char *argv[], struct handler_t **hand_ret) display_dset = TRUE; break; + case 'm': + sdsets_threshold = HDatoi(opt_arg); + if(sdsets_threshold < 1) { + error_msg("Invalid threshold for small datasets\n"); + goto error; + } /* end if */ + + break; + case 'T': display_all = FALSE; display_dset_dtype_meta = TRUE; @@ -891,6 +952,15 @@ parse_command_line(int argc, const char *argv[], struct handler_t **hand_ret) display_attr = TRUE; break; + case 'a': + sattrs_threshold = HDatoi(opt_arg); + if(sattrs_threshold < 1) { + error_msg("Invalid threshold for small # of attributes\n"); + goto error; + } /* end if */ + + break; + case 's': display_all = FALSE; display_free_sections = TRUE; @@ -967,18 +1037,31 @@ error: static void iter_free(iter_t *iter) { + /* Clear array of bins for group counts */ if(iter->group_bins) { HDfree(iter->group_bins); iter->group_bins = NULL; } /* end if */ + /* Clear array for tracking small groups */ + if(iter->num_small_groups) { + HDfree(iter->num_small_groups); + iter->num_small_groups = NULL; + } /* end if */ + /* Clear array of bins for attribute counts */ if(iter->attr_bins) { HDfree(iter->attr_bins); iter->attr_bins = NULL; } /* end if */ + /* Clear array for tracking small attributes */ + if(iter->num_small_attrs) { + HDfree(iter->num_small_attrs); + iter->num_small_attrs= NULL; + } /* end if */ + /* Clear dataset datatype information found */ if(iter->dset_type_info) { HDfree(iter->dset_type_info); @@ -991,6 +1074,12 @@ iter_free(iter_t *iter) iter->dset_dim_bins = NULL; } /* end if */ + /* Clear array of tracking 1-D small datasets */ + if(iter->small_dset_dims) { + HDfree(iter->small_dset_dims); + iter->small_dset_dims = NULL; + } /* end if */ + /* Clear array of bins for free-space section sizes */ if(iter->sect_bins) { HDfree(iter->sect_bins); @@ -1117,11 +1206,11 @@ print_group_info(const iter_t *iter) unsigned long total; /* Total count for various statistics */ unsigned u; /* Local index variable */ - printf("Small groups:\n"); + printf("Small groups (with 0 to %u links):\n", sgroups_threshold-1); total = 0; - for(u = 0; u < SIZE_SMALL_GROUPS; u++) { + for(u = 0; u < (unsigned)sgroups_threshold; u++) { if(iter->num_small_groups[u] > 0) { - printf("\t# of groups of size %u: %lu\n", u, iter->num_small_groups[u]); + printf("\t# of groups with %u link(s): %lu\n", u, iter->num_small_groups[u]); total += iter->num_small_groups[u]; } /* end if */ } /* end for */ @@ -1130,13 +1219,13 @@ print_group_info(const iter_t *iter) printf("Group bins:\n"); total = 0; if((iter->group_nbins > 0) && (iter->group_bins[0] > 0)) { - printf("\t# of groups of size 0: %lu\n", iter->group_bins[0]); + printf("\t# of groups with 0 link: %lu\n", iter->group_bins[0]); total = iter->group_bins[0]; } /* end if */ power = 1; for(u = 1; u < iter->group_nbins; u++) { if(iter->group_bins[u] > 0) { - printf("\t# of groups of size %lu - %lu: %lu\n", power, (power * 10) - 1, + printf("\t# of groups with %lu - %lu links: %lu\n", power, (power * 10) - 1, iter->group_bins[u]); total += iter->group_bins[u]; } /* end if */ @@ -1207,29 +1296,29 @@ print_dataset_info(const iter_t *iter) printf("1-D Dataset information:\n"); HDfprintf(stdout, "\tMax. dimension size of 1-D datasets: %Hu\n", iter->max_dset_dims); - printf("\tSmall 1-D datasets:\n"); + printf("\tSmall 1-D datasets (with dimension sizes 0 to %u):\n", sdsets_threshold - 1); total = 0; - for(u = 0; u < SIZE_SMALL_DSETS; u++) { + for(u = 0; u < (unsigned)sdsets_threshold; u++) { if(iter->small_dset_dims[u] > 0) { - printf("\t\t# of dataset dimensions of size %u: %lu\n", u, + printf("\t\t# of datasets with dimension sizes %u: %lu\n", u, iter->small_dset_dims[u]); total += iter->small_dset_dims[u]; } /* end if */ } /* end for */ - printf("\t\tTotal small datasets: %lu\n", total); + printf("\t\tTotal # of small datasets: %lu\n", total); /* Protect against no datasets in file */ if(iter->dset_dim_nbins > 0) { printf("\t1-D Dataset dimension bins:\n"); total = 0; if(iter->dset_dim_bins[0] > 0) { - printf("\t\t# of datasets of size 0: %lu\n", iter->dset_dim_bins[0]); + printf("\t\t# of datasets with dimension size 0: %lu\n", iter->dset_dim_bins[0]); total = iter->dset_dim_bins[0]; } /* end if */ power = 1; for(u = 1; u < iter->dset_dim_nbins; u++) { if(iter->dset_dim_bins[u] > 0) { - printf("\t\t# of datasets of size %lu - %lu: %lu\n", power, (power * 10) - 1, + printf("\t\t# of datasets with dimension size %lu - %lu: %lu\n", power, (power * 10) - 1, iter->dset_dim_bins[u]); total += iter->dset_dim_bins[u]; } /* end if */ @@ -1346,8 +1435,6 @@ print_dset_dtype_meta(const iter_t *iter) * Programmer: Vailin Choi * July 12, 2007 * - * Modifications: - * *------------------------------------------------------------------------- */ static herr_t @@ -1357,9 +1444,9 @@ print_attr_info(const iter_t *iter) unsigned long total; /* Total count for various statistics */ unsigned u; /* Local index variable */ - printf("Small # of attributes:\n"); + printf("Small # of attributes (objects with 1 to %u attributes):\n", sattrs_threshold); total = 0; - for(u = 1; u < SIZE_SMALL_ATTRS; u++) { + for(u = 1; u <= (unsigned)sattrs_threshold; u++) { if(iter->num_small_attrs[u] > 0) { printf("\t# of objects with %u attributes: %lu\n", u, iter->num_small_attrs[u]); total += iter->num_small_attrs[u]; @@ -1660,6 +1747,16 @@ main(int argc, const char *argv[]) iter.free_hdr = finfo.free.meta_size; } /* end else */ + iter.num_small_groups = (unsigned long *)calloc((size_t)sgroups_threshold, sizeof(unsigned long)); + iter.num_small_attrs = (unsigned long *)calloc((size_t)(sattrs_threshold+1), sizeof(unsigned long)); + iter.small_dset_dims = (unsigned long *)calloc((size_t)sdsets_threshold, sizeof(unsigned long)); + + if(iter.num_small_groups == NULL || iter.num_small_attrs == NULL || iter.small_dset_dims == NULL) { + error_msg("Unable to allocate memory for tracking small groups/datasets/attributes\n"); + h5tools_setstatus(EXIT_FAILURE); + goto done; + } + if((fcpl = H5Fget_create_plist(fid)) < 0) warn_msg("Unable to retrieve file creation property\n"); diff --git a/tools/h5stat/h5stat_gentest.c b/tools/h5stat/h5stat_gentest.c index a7bb4b0..5ad73f7 100644 --- a/tools/h5stat/h5stat_gentest.c +++ b/tools/h5stat/h5stat_gentest.c @@ -16,88 +16,325 @@ /* * Generate the binary hdf5 files for the h5stat tests. * Usage: just execute the program without any arguments will - * generate all the binary hdf5 files in the ./testfiles directory. + * generate all the binary hdf5 files * * If you regenerate the test files (e.g., changing some code, * trying it on a new platform, ...), you need to verify the correctness * of the expected output and update the corresponding *.ddl files. */ - -#include #include "hdf5.h" -#define FILE "h5stat_newgrat.h5" +/* For gen_newgrat_file() */ +#define NEWGRAT_FILE "h5stat_newgrat.h5" #define DATASET_NAME "DATASET_NAME" #define GROUP_NAME "GROUP" #define ATTR_NAME "ATTR" #define NUM_GRPS 35000 #define NUM_ATTRS 100 +/* For gen_threshold_file() */ +#define THRESHOLD_FILE "h5stat_threshold.h5" +#define THRES_ATTR_NAME "attr" +#define THRES_ATTR_GRP_NAME "grp_attr" +#define THRES_DSET_NAME "dset" +#define THRES_NUM 10 +#define THRES_NUM_25 25 + /* - * Generate 1.8 HDF5 file - * with NUM_GRPS groups - * with NUM_ATTRS attributes on the dataset + * Generate HDF5 file with latest format with + * NUM_GRPS groups and NUM_ATTRS attributes for the dataset + * */ -static void gen_file(void) +static void +gen_newgrat_file(const char *fname) { - hid_t fcpl; /* File creation property */ - hid_t fapl; /* File access property */ - hid_t file; /* File id */ - hid_t gid; /* Group id */ - hid_t type_id; /* Datatype id */ - hid_t space_id; /* Dataspace id */ - hid_t attr_id; /* Attribute id */ - hid_t dset_id; /* Dataset id */ - char name[30]; /* Group name */ - char attrname[30]; /* Attribute name */ - int ret; /* Return value */ - int i; /* Local index variable */ - - fapl = H5Pcreate(H5P_FILE_ACCESS); - ret = H5Pset_libver_bounds(fapl, H5F_LIBVER_LATEST, H5F_LIBVER_LATEST); - assert(ret >= 0); + hid_t fcpl; /* File creation property */ + hid_t fapl; /* File access property */ + hid_t fid; /* File id */ + hid_t gid; /* Group id */ + hid_t tid; /* Datatype id */ + hid_t sid; /* Dataspace id */ + hid_t attr_id; /* Attribute id */ + hid_t did; /* Dataset id */ + char name[30]; /* Group name */ + char attrname[30]; /* Attribute name */ + int i; /* Local index variable */ + + /* Get a copy file access property list */ + if((fapl = H5Pcreate(H5P_FILE_ACCESS)) < 0) + goto error; + + /* Set to use latest library format */ + if(H5Pset_libver_bounds(fapl, H5F_LIBVER_LATEST, H5F_LIBVER_LATEST) < 0) + goto error; + + /* Get a copy of file creation property list */ + if((fcpl = H5Pcreate(H5P_FILE_CREATE)) < 0) + goto error; /* Set file space handling strategy */ - fcpl = H5Pcreate(H5P_FILE_CREATE); - ret = H5Pset_file_space(fcpl, H5F_FILE_SPACE_ALL_PERSIST, (hsize_t)0); - assert(ret >= 0); + if(H5Pset_file_space(fcpl, H5F_FILE_SPACE_ALL_PERSIST, (hsize_t)0) < 0) + goto error; + + /* Create file */ + if((fid = H5Fcreate(fname, H5F_ACC_TRUNC, fcpl, fapl)) < 0) + goto error; - /* Create dataset */ - file = H5Fcreate(FILE, H5F_ACC_TRUNC, fcpl, fapl); + /* Create NUM_GRPS groups in the root group */ for(i = 1; i <= NUM_GRPS; i++) { sprintf(name, "%s%d", GROUP_NAME,i); - gid = H5Gcreate2(file, name, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT); - H5Gclose(gid); + if((gid = H5Gcreate2(fid, name, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) + goto error; + if(H5Gclose(gid) < 0) + goto error; } /* end for */ /* Create a datatype to commit and use */ - type_id = H5Tcopy(H5T_NATIVE_INT); + if((tid = H5Tcopy(H5T_NATIVE_INT)) < 0) + goto error; /* Create dataspace for dataset */ - space_id = H5Screate(H5S_SCALAR); + if((sid = H5Screate(H5S_SCALAR)) < 0) + goto error; + + /* Create dataset */ + if((did = H5Dcreate2(fid, DATASET_NAME, tid, sid, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) + goto error; - /* Create dataset */ - dset_id = H5Dcreate2(file, DATASET_NAME, type_id, space_id, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT); + /* Create NUM_ATTRS for the dataset */ for(i = 1; i <= NUM_ATTRS; i++) { sprintf(attrname, "%s%d", ATTR_NAME,i); - attr_id = H5Acreate2(dset_id, attrname, type_id, space_id, H5P_DEFAULT, H5P_DEFAULT); - ret = H5Aclose(attr_id); - assert(ret >= 0); + if((attr_id = H5Acreate2(did, attrname, tid, sid, H5P_DEFAULT, H5P_DEFAULT)) < 0) + goto error; + if(H5Aclose(attr_id) < 0) + goto error; } /* end for */ - ret = H5Dclose(dset_id); - assert(ret >= 0); - ret = H5Sclose(space_id); - assert(ret >= 0); - ret = H5Tclose(type_id); - assert(ret >= 0); - ret = H5Fclose(file); - assert(ret >= 0); -} + /* Close dataset, dataspace, datatype, file */ + if(H5Dclose(did) < 0) + goto error; + if(H5Sclose(sid) < 0) + goto error; + if(H5Tclose(tid) < 0) + goto error; + if(H5Fclose(fid) < 0) + goto error; + +error: + H5E_BEGIN_TRY { + H5Aclose(attr_id); + H5Dclose(did); + H5Tclose(tid); + H5Sclose(sid); + H5Gclose(gid); + H5Fclose(fid); + } H5E_END_TRY; + +} /* gen_newgrat_file() */ + +/* + * Generate an HDF5 file with groups, datasets, attributes for testing the options: + * -l N (--links=N): Set the threshold for # of links when printing information for small groups. + * -m N (--dims=N): Set the threshold for the # of dimension sizes when printing information for small datasets. + * -a N (--numattrs=N): Set the threshold for the # of attributes when printing information for small # of attributes. + */ +static void +gen_threshold_file(const char *fname) +{ + hid_t fid; /* File ID */ + hid_t sid0, sid1, sid2, sid3, sid4; /* Dataspace IDs */ + hid_t did; /* Dataset ID */ + hid_t attr_id; /* Attribute ID */ + hid_t gid; /* Group ID */ + hsize_t two_dims[] = {2, 5}; /* Dimension array */ + hsize_t one_dims[] = {6}; /* Dimension array */ + hsize_t zero_dims[] = {0}; /* Dimension array */ + char name[30]; /* Name */ + unsigned i; /* Local index variable */ + + /* Create file */ + if((fid = H5Fcreate(fname, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT)) < 0) + goto error; + + /* Create 1-D dataspace with zero dimension size */ + if((sid0 = H5Screate_simple(1, zero_dims, NULL)) < 0) + goto error; + + /* Create 1-D dataspace with non-zero dimension size*/ + if((sid1 = H5Screate_simple(1, one_dims, NULL)) < 0) + goto error; + + /* Create 2-D dataspace */ + if((sid2 = H5Screate_simple(2, two_dims, NULL)) < 0) + goto error; + + /* Create scalar dataspace */ + if((sid3 = H5Screate(H5S_SCALAR)) < 0) + goto error; + + /* Create null dataspace */ + if((sid4 = H5Screate(H5S_NULL)) < 0) + goto error; + + /* Create an attribute for the root group */ + if((attr_id = H5Acreate2(fid, "attr", H5T_NATIVE_INT, sid1, H5P_DEFAULT, H5P_DEFAULT)) < 0) + goto error; + if(H5Aclose(attr_id) < 0) + goto error; + + /* Create 1-D dataset with zero dimension size for the root group */ + if((did = H5Dcreate2(fid, "zero_dset", H5T_NATIVE_UCHAR, sid0, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) + goto error; + + /* Create 11 attributes for the dataset */ + for(i = 1; i <= (THRES_NUM+1); i++) { + sprintf(name, "%s%d", THRES_ATTR_NAME,i); + if((attr_id = H5Acreate2(did, name, H5T_NATIVE_INT, sid1, H5P_DEFAULT, H5P_DEFAULT)) < 0) + goto error; + if(H5Aclose(attr_id) < 0) + goto error; + } + if(H5Dclose(did) < 0) + goto error; + + /* Create dataset with scalar dataspace for the root group */ + if((did = H5Dcreate2(fid, "scalar_dset", H5T_NATIVE_UCHAR, sid3, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) + goto error; + if(H5Dclose(did) < 0) + goto error; + + /* Create dataset with null dataspace for the root group */ + if((did = H5Dcreate2(fid, "null_dset", H5T_NATIVE_UCHAR, sid4, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) + goto error; + if(H5Dclose(did) < 0) + goto error; + + /* Create 2-D dataset for the root group */ + if((did = H5Dcreate2(fid, "dset", H5T_NATIVE_UCHAR, sid2, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) + goto error; + + /* Create 10 attributes for the 2-D dataset */ + for(i = 1; i <= THRES_NUM; i++) { + sprintf(name, "%s%d", THRES_ATTR_NAME,i); + if((attr_id = H5Acreate2(did, name, H5T_NATIVE_INT, sid1, H5P_DEFAULT, H5P_DEFAULT)) < 0) + goto error; + if(H5Aclose(attr_id) < 0) + goto error; + } + if(H5Dclose(did) < 0) + goto error; + + /* Create first group */ + if((gid = H5Gcreate2(fid, "group1", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) + goto error; + + /* Create an attribute for the group */ + if((attr_id = H5Acreate2(gid, "ATTR", H5T_NATIVE_INT, sid3, H5P_DEFAULT, H5P_DEFAULT)) < 0) + goto error; + + /* Close attribute */ + if(H5Aclose(attr_id) < 0) + goto error; + + /* Create 10 1-D datasets with non-zero dimension size for the group */ + for(i = 1; i <= THRES_NUM; i++) { + /* set up dataset name */ + sprintf(name, "%s%d", THRES_DSET_NAME,i); + + /* Create the dataset */ + if((did = H5Dcreate2(gid, name, H5T_NATIVE_UCHAR, sid1, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) + goto error; + + /* Close the dataset */ + if(H5Dclose(did) < 0) + goto error; + } + + /* Close the group */ + if(H5Gclose(gid) < 0) + goto error; + + + /* Create second group */ + if((gid = H5Gcreate2(fid, "group2", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) + goto error; + + /* Create 25 attributes for the group */ + for(i = 1; i <= THRES_NUM_25; i++) { + /* Set up attribute name */ + sprintf(name, "%s%d", THRES_ATTR_GRP_NAME,i); + + /* Create the attribute */ + if((attr_id = H5Acreate2(gid, name, H5T_NATIVE_INT, sid2, H5P_DEFAULT, H5P_DEFAULT)) < 0) + goto error; + + /* Close the attribute */ + if(H5Aclose(attr_id) < 0) + goto error; + } + + /* Close the group */ + if(H5Gclose(gid) < 0) + goto error; + + /* Create third group */ + if((gid = H5Gcreate2(fid, "group3", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) + goto error; + + /* Create 9 1-D datasets with non-zero dimension size for the group */ + for(i = 1; i < THRES_NUM; i++) { + /* set up dataset name */ + sprintf(name, "%s%d", THRES_DSET_NAME,i); + + /* Create the dataset */ + if((did = H5Dcreate2(gid, name, H5T_NATIVE_UCHAR, sid1, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) + goto error; + + /* Close the dataset */ + if(H5Dclose(did) < 0) + goto error; + } + + /* Close the group */ + if(H5Gclose(gid) < 0) + goto error; + + + /* Close dataspaces */ + if(H5Sclose(sid0) < 0) + goto error; + if(H5Sclose(sid1) < 0) + goto error; + if(H5Sclose(sid2) < 0) + goto error; + if(H5Sclose(sid3) < 0) + goto error; + if(H5Sclose(sid4) < 0) + goto error; + + /* Close file */ + if(H5Fclose(fid) < 0) + goto error; + +error: + H5E_BEGIN_TRY { + H5Gclose(gid); + H5Aclose(attr_id); + H5Dclose(did); + H5Sclose(sid0); + H5Sclose(sid1); + H5Sclose(sid2); + H5Sclose(sid3); + H5Sclose(sid4); + H5Fclose(fid); + } H5E_END_TRY; + +} /* gen_threshold_file() */ int main(void) { - gen_file(); + gen_newgrat_file(NEWGRAT_FILE); + gen_threshold_file(THRESHOLD_FILE); return 0; } diff --git a/tools/h5stat/testfiles/h5stat_filters-d.ddl b/tools/h5stat/testfiles/h5stat_filters-d.ddl index 3cc9071..dae1f06 100644 --- a/tools/h5stat/testfiles/h5stat_filters-d.ddl +++ b/tools/h5stat/testfiles/h5stat_filters-d.ddl @@ -9,10 +9,10 @@ Dataset dimension information: # of dataset with rank 2: 14 1-D Dataset information: Max. dimension size of 1-D datasets: 100 - Small 1-D datasets: - Total small datasets: 0 + Small 1-D datasets (with dimension sizes 0 to 9): + Total # of small datasets: 0 1-D Dataset dimension bins: - # of datasets of size 100 - 999: 1 + # of datasets with dimension size 100 - 999: 1 Total # of datasets: 1 Dataset storage information: Total raw data size: 8659 diff --git a/tools/h5stat/testfiles/h5stat_filters-dT.ddl b/tools/h5stat/testfiles/h5stat_filters-dT.ddl index ae9121d..5c7a4ab 100644 --- a/tools/h5stat/testfiles/h5stat_filters-dT.ddl +++ b/tools/h5stat/testfiles/h5stat_filters-dT.ddl @@ -9,10 +9,10 @@ Dataset dimension information: # of dataset with rank 2: 14 1-D Dataset information: Max. dimension size of 1-D datasets: 100 - Small 1-D datasets: - Total small datasets: 0 + Small 1-D datasets (with dimension sizes 0 to 9): + Total # of small datasets: 0 1-D Dataset dimension bins: - # of datasets of size 100 - 999: 1 + # of datasets with dimension size 100 - 999: 1 Total # of datasets: 1 Dataset storage information: Total raw data size: 8659 diff --git a/tools/h5stat/testfiles/h5stat_filters-g.ddl b/tools/h5stat/testfiles/h5stat_filters-g.ddl index d488b8f..6cb791c 100644 --- a/tools/h5stat/testfiles/h5stat_filters-g.ddl +++ b/tools/h5stat/testfiles/h5stat_filters-g.ddl @@ -2,8 +2,8 @@ Expected output for 'h5stat -g h5stat_filters.h5' ############################# Filename: h5stat_filters.h5 -Small groups: +Small groups (with 0 to 9 links): Total # of small groups: 0 Group bins: - # of groups of size 10 - 99: 1 + # of groups with 10 - 99 links: 1 Total # of groups: 1 diff --git a/tools/h5stat/testfiles/h5stat_filters.ddl b/tools/h5stat/testfiles/h5stat_filters.ddl index ddafd81..0a6733d 100644 --- a/tools/h5stat/testfiles/h5stat_filters.ddl +++ b/tools/h5stat/testfiles/h5stat_filters.ddl @@ -35,10 +35,10 @@ File space information for file metadata (in bytes): Free-space managers: Header: 0 Amount of free space: 0 -Small groups: +Small groups (with 0 to 9 links): Total # of small groups: 0 Group bins: - # of groups of size 10 - 99: 1 + # of groups with 10 - 99 links: 1 Total # of groups: 1 Dataset dimension information: Max. rank of datasets: 2 @@ -47,10 +47,10 @@ Dataset dimension information: # of dataset with rank 2: 14 1-D Dataset information: Max. dimension size of 1-D datasets: 100 - Small 1-D datasets: - Total small datasets: 0 + Small 1-D datasets (with dimension sizes 0 to 9): + Total # of small datasets: 0 1-D Dataset dimension bins: - # of datasets of size 100 - 999: 1 + # of datasets with dimension size 100 - 999: 1 Total # of datasets: 1 Dataset storage information: Total raw data size: 8659 @@ -79,7 +79,7 @@ Dataset datatype information: Count (total/named) = (1/0) Size (desc./elmt) = (14/4) Total dataset datatype count: 15 -Small # of attributes: +Small # of attributes (objects with 1 to 10 attributes): Total # of objects with small # of attributes: 0 Attribute bins: Total # of objects with attributes: 0 diff --git a/tools/h5stat/testfiles/h5stat_help1.ddl b/tools/h5stat/testfiles/h5stat_help1.ddl index 5665b35..d79c99f 100644 --- a/tools/h5stat/testfiles/h5stat_help1.ddl +++ b/tools/h5stat/testfiles/h5stat_help1.ddl @@ -9,10 +9,19 @@ Usage: h5stat [OPTIONS] file -f, --file Print file information -F, --filemetadata Print file space information for file's metadata -g, --group Print group information + -l N, --links=N Set the threshold for the # of links when printing + information for small groups. N is an integer greater + than 0. The default threshold is 10. -G, --groupmetadata Print file space information for groups' metadata -d, --dset Print dataset information + -m N, --dims=N Set the threshold for the dimension sizes when printing + information for small datasets. N is an integer greater + than 0. The default threshold is 10. -D, --dsetmetadata Print file space information for datasets' metadata -T, --dtypemetadata Print datasets' datatype information -A, --attribute Print attribute information + -a N, --numattrs=N Set the threshold for the # of attributes when printing + information for small # of attributes. N is an integer greater + than 0. The default threshold is 10. -s, --freespace Print free space information -S, --summary Print summary of file space information diff --git a/tools/h5stat/testfiles/h5stat_help2.ddl b/tools/h5stat/testfiles/h5stat_help2.ddl index 3fb303a..af48e3a 100644 --- a/tools/h5stat/testfiles/h5stat_help2.ddl +++ b/tools/h5stat/testfiles/h5stat_help2.ddl @@ -9,10 +9,19 @@ Usage: h5stat [OPTIONS] file -f, --file Print file information -F, --filemetadata Print file space information for file's metadata -g, --group Print group information + -l N, --links=N Set the threshold for the # of links when printing + information for small groups. N is an integer greater + than 0. The default threshold is 10. -G, --groupmetadata Print file space information for groups' metadata -d, --dset Print dataset information + -m N, --dims=N Set the threshold for the dimension sizes when printing + information for small datasets. N is an integer greater + than 0. The default threshold is 10. -D, --dsetmetadata Print file space information for datasets' metadata -T, --dtypemetadata Print datasets' datatype information -A, --attribute Print attribute information + -a N, --numattrs=N Set the threshold for the # of attributes when printing + information for small # of attributes. N is an integer greater + than 0. The default threshold is 10. -s, --freespace Print free space information -S, --summary Print summary of file space information diff --git a/tools/h5stat/testfiles/h5stat_newgrat-UA.ddl b/tools/h5stat/testfiles/h5stat_newgrat-UA.ddl index 70f9a82..18f91f3 100644 --- a/tools/h5stat/testfiles/h5stat_newgrat-UA.ddl +++ b/tools/h5stat/testfiles/h5stat_newgrat-UA.ddl @@ -2,7 +2,7 @@ Expected output for 'h5stat -A h5stat_newgrat.h5' ############################# Filename: h5stat_newgrat.h5 -Small # of attributes: +Small # of attributes (objects with 1 to 10 attributes): Total # of objects with small # of attributes: 0 Attribute bins: # of objects with 100 - 999 attributes: 1 diff --git a/tools/h5stat/testfiles/h5stat_newgrat.ddl b/tools/h5stat/testfiles/h5stat_newgrat.ddl index b93fa17..7d4ef91 100644 --- a/tools/h5stat/testfiles/h5stat_newgrat.ddl +++ b/tools/h5stat/testfiles/h5stat_newgrat.ddl @@ -33,14 +33,14 @@ File space information for file metadata (in bytes): B-tree/List: 0 Heap: 0 Free-space managers: - Header: 1584 - Amount of free space: 6042 -Small groups: - # of groups of size 0: 35000 + Header: 180 + Amount of free space: 132 +Small groups (with 0 to 9 links): + # of groups with 0 link(s): 35000 Total # of small groups: 35000 Group bins: - # of groups of size 0: 35000 - # of groups of size 10000 - 99999: 1 + # of groups with 0 link: 35000 + # of groups with 10000 - 99999 links: 1 Total # of groups: 35001 Dataset dimension information: Max. rank of datasets: 0 @@ -48,8 +48,8 @@ Dataset dimension information: # of dataset with rank 0: 1 1-D Dataset information: Max. dimension size of 1-D datasets: 0 - Small 1-D datasets: - Total small datasets: 0 + Small 1-D datasets (with dimension sizes 0 to 9): + Total # of small datasets: 0 Dataset storage information: Total raw data size: 0 Total external raw data size: 0 @@ -74,7 +74,7 @@ Dataset datatype information: Count (total/named) = (1/0) Size (desc./elmt) = (14/4) Total dataset datatype count: 1 -Small # of attributes: +Small # of attributes (objects with 1 to 10 attributes): Total # of objects with small # of attributes: 0 Attribute bins: # of objects with 100 - 999 attributes: 1 @@ -83,20 +83,15 @@ Attribute bins: Free-space section threshold: 1 bytes Small size free-space sections (< 10 bytes): # of sections of size 1: 1 - # of sections of size 2: 12 - # of sections of size 3: 1 - # of sections of size 7: 1 - # of sections of size 8: 2 - Total # of small size sections: 17 + Total # of small size sections: 1 Free-space section bins: - # of sections of size 1 - 9: 17 - # of sections of size 10 - 99: 49 - # of sections of size 100 - 999: 27 - Total # of sections: 93 + # of sections of size 1 - 9: 1 + # of sections of size 10 - 99: 4 + Total # of sections: 5 File space management strategy: H5F_FILE_SPACE_ALL_PERSIST Summary of file space information: - File metadata: 6363440 bytes + File metadata: 6362036 bytes Raw data: 0 bytes - Amount/Percent of tracked free space: 6042 bytes/0.1% + Amount/Percent of tracked free space: 132 bytes/0.0% Unaccounted space: 0 bytes -Total space: 6369482 bytes +Total space: 6362168 bytes diff --git a/tools/h5stat/testfiles/h5stat_newgrat.h5 b/tools/h5stat/testfiles/h5stat_newgrat.h5 index cb5f47f..c919b71 100644 Binary files a/tools/h5stat/testfiles/h5stat_newgrat.h5 and b/tools/h5stat/testfiles/h5stat_newgrat.h5 differ diff --git a/tools/h5stat/testfiles/h5stat_tsohm.ddl b/tools/h5stat/testfiles/h5stat_tsohm.ddl index 6ee8aa8..788421b 100644 --- a/tools/h5stat/testfiles/h5stat_tsohm.ddl +++ b/tools/h5stat/testfiles/h5stat_tsohm.ddl @@ -35,11 +35,11 @@ File space information for file metadata (in bytes): Free-space managers: Header: 0 Amount of free space: 0 -Small groups: - # of groups of size 3: 1 +Small groups (with 0 to 9 links): + # of groups with 3 link(s): 1 Total # of small groups: 1 Group bins: - # of groups of size 1 - 9: 1 + # of groups with 1 - 9 links: 1 Total # of groups: 1 Dataset dimension information: Max. rank of datasets: 2 @@ -47,8 +47,8 @@ Dataset dimension information: # of dataset with rank 2: 3 1-D Dataset information: Max. dimension size of 1-D datasets: 0 - Small 1-D datasets: - Total small datasets: 0 + Small 1-D datasets (with dimension sizes 0 to 9): + Total # of small datasets: 0 Dataset storage information: Total raw data size: 0 Total external raw data size: 0 @@ -73,7 +73,7 @@ Dataset datatype information: Count (total/named) = (3/0) Size (desc./elmt) = (14/8) Total dataset datatype count: 3 -Small # of attributes: +Small # of attributes (objects with 1 to 10 attributes): Total # of objects with small # of attributes: 0 Attribute bins: Total # of objects with attributes: 0 diff --git a/tools/h5stat/testh5stat.sh.in b/tools/h5stat/testh5stat.sh.in index ab97698..f780c97 100644 --- a/tools/h5stat/testh5stat.sh.in +++ b/tools/h5stat/testh5stat.sh.in @@ -13,7 +13,12 @@ # http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have # access to either file, you may request a copy from help@hdfgroup.org. # -# Tests for the h5dump tool +# Tests for the h5stat tool +# +# Modifcations: +# Vailin Choi; July 2013 +# Add tests for -l, -m, -a options +# srcdir=@srcdir@ @@ -72,12 +77,14 @@ LIST_HDF5_TEST_FILES=" $SRC_H5STAT_TESTFILES/h5stat_filters.h5 $SRC_H5STAT_TESTFILES/h5stat_tsohm.h5 $SRC_H5STAT_TESTFILES/h5stat_newgrat.h5 +$SRC_H5STAT_TESTFILES/h5stat_threshold.h5 " LIST_OTHER_TEST_FILES=" $SRC_H5STAT_TESTFILES/h5stat_help1.ddl $SRC_H5STAT_TESTFILES/h5stat_help2.ddl $SRC_H5STAT_TESTFILES/h5stat_notexist.ddl +$SRC_H5STAT_TESTFILES/h5stat_nofile.ddl $SRC_H5STAT_TESTFILES/h5stat_filters.ddl $SRC_H5STAT_TESTFILES/h5stat_filters-file.ddl $SRC_H5STAT_TESTFILES/h5stat_filters-F.ddl @@ -90,6 +97,21 @@ $SRC_H5STAT_TESTFILES/h5stat_tsohm.ddl $SRC_H5STAT_TESTFILES/h5stat_newgrat.ddl $SRC_H5STAT_TESTFILES/h5stat_newgrat-UG.ddl $SRC_H5STAT_TESTFILES/h5stat_newgrat-UA.ddl +$SRC_H5STAT_TESTFILES/h5stat_err1_links.ddl +$SRC_H5STAT_TESTFILES/h5stat_links1.ddl +$SRC_H5STAT_TESTFILES/h5stat_links2.ddl +$SRC_H5STAT_TESTFILES/h5stat_links3.ddl +$SRC_H5STAT_TESTFILES/h5stat_links4.ddl +$SRC_H5STAT_TESTFILES/h5stat_links5.ddl +$SRC_H5STAT_TESTFILES/h5stat_err1_dims.ddl +$SRC_H5STAT_TESTFILES/h5stat_dims1.ddl +$SRC_H5STAT_TESTFILES/h5stat_dims2.ddl +$SRC_H5STAT_TESTFILES/h5stat_err1_numattrs.ddl +$SRC_H5STAT_TESTFILES/h5stat_err2_numattrs.ddl +$SRC_H5STAT_TESTFILES/h5stat_numattrs1.ddl +$SRC_H5STAT_TESTFILES/h5stat_numattrs2.ddl +$SRC_H5STAT_TESTFILES/h5stat_numattrs3.ddl +$SRC_H5STAT_TESTFILES/h5stat_numattrs4.ddl " # @@ -210,6 +232,7 @@ TOOLTEST h5stat_help1.ddl -h TOOLTEST h5stat_help2.ddl --help # Test when h5stat a file that does not exist TOOLTEST h5stat_notexist.ddl notexist.h5 +TOOLTEST h5stat_nofile.ddl '' # Test file with groups, compressed datasets, user-applied fileters, etc. # h5stat_filters.h5 is a copy of ../../testfiles/tfilters.h5 as of release 1.8.0-alpha4 @@ -229,6 +252,47 @@ TOOLTEST h5stat_tsohm.ddl h5stat_tsohm.h5 TOOLTEST h5stat_newgrat.ddl h5stat_newgrat.h5 TOOLTEST h5stat_newgrat-UG.ddl -G h5stat_newgrat.h5 TOOLTEST h5stat_newgrat-UA.ddl -A h5stat_newgrat.h5 +# +# Tests for -l (--links) option on h5stat_threshold.h5: +# -l 0 (incorrect threshold value) +# -g -l 8 +# --links=8 +# --links=20 -g +TOOLTEST h5stat_err1_links.ddl -l 0 h5stat_threshold.h5 +TOOLTEST h5stat_links1.ddl -g -l 8 h5stat_threshold.h5 +TOOLTEST h5stat_links2.ddl --links=8 h5stat_threshold.h5 +TOOLTEST h5stat_links3.ddl --links=20 -g h5stat_threshold.h5 +# +# Tests for -l (--links) option on h5stat_newgrat.h5: +# -g +# -g -l 40000 +TOOLTEST h5stat_links4.ddl -g h5stat_newgrat.h5 +TOOLTEST h5stat_links5.ddl -g -l 40000 h5stat_newgrat.h5 +# +# Tests for -m (--dims) option on h5stat_threshold.h5 +# -d --dims=-1 (incorrect threshold value) +# -gd -m 5 +# -d --di=15 +TOOLTEST h5stat_err1_dims.ddl -d --dims=-1 h5stat_threshold.h5 +TOOLTEST h5stat_dims1.ddl -gd -m 5 h5stat_threshold.h5 +TOOLTEST h5stat_dims2.ddl -d --di=15 h5stat_threshold.h5 +# +# Tests for -a option on h5stat_threshold.h5 +# -a -2 (incorrect threshold value) +# --numattrs (without threshold value) +# -AS -a 10 +# -a 1 +# -A --numattrs=25 +TOOLTEST h5stat_err1_numattrs.ddl -a -2 h5stat_threshold.h5 +TOOLTEST h5stat_err2_numattrs.ddl --numattrs h5stat_threshold.h5 +TOOLTEST h5stat_numattrs1.ddl -AS -a 10 h5stat_threshold.h5 +TOOLTEST h5stat_numattrs2.ddl -a 1 h5stat_threshold.h5 +TOOLTEST h5stat_numattrs3.ddl -A --numattrs=25 h5stat_threshold.h5 +# +# Tests for -a option on h5stat_newgrat.h5 +# -A -a 100 +TOOLTEST h5stat_numattrs4.ddl -A -a 100 h5stat_newgrat.h5 +# if test $nerrors -eq 0 ; then echo "All $TESTNAME tests passed." -- cgit v0.12 From f09101079e34903f963c7104268b4bd54d764bb5 Mon Sep 17 00:00:00 2001 From: Vailin Choi Date: Thu, 8 Aug 2013 14:19:03 -0500 Subject: [svn-r23976] The following files were missing from previous checkin rev #23975 for bug HDFFV-1238. h5committested. --- tools/h5stat/testfiles/h5stat_dims1.ddl | 47 +++++++++++ tools/h5stat/testfiles/h5stat_dims2.ddl | 38 +++++++++ tools/h5stat/testfiles/h5stat_err1_dims.ddl | 4 + tools/h5stat/testfiles/h5stat_err1_links.ddl | 4 + tools/h5stat/testfiles/h5stat_err1_numattrs.ddl | 4 + tools/h5stat/testfiles/h5stat_err2_numattrs.ddl | 4 + tools/h5stat/testfiles/h5stat_links1.ddl | 13 +++ tools/h5stat/testfiles/h5stat_links2.ddl | 107 ++++++++++++++++++++++++ tools/h5stat/testfiles/h5stat_links3.ddl | 15 ++++ tools/h5stat/testfiles/h5stat_links4.ddl | 11 +++ tools/h5stat/testfiles/h5stat_links5.ddl | 12 +++ tools/h5stat/testfiles/h5stat_nofile.ddl | 28 +++++++ tools/h5stat/testfiles/h5stat_numattrs1.ddl | 20 +++++ tools/h5stat/testfiles/h5stat_numattrs2.ddl | 107 ++++++++++++++++++++++++ tools/h5stat/testfiles/h5stat_numattrs3.ddl | 15 ++++ tools/h5stat/testfiles/h5stat_numattrs4.ddl | 11 +++ tools/h5stat/testfiles/h5stat_threshold.h5 | Bin 0 -> 16312 bytes 17 files changed, 440 insertions(+) create mode 100644 tools/h5stat/testfiles/h5stat_dims1.ddl create mode 100644 tools/h5stat/testfiles/h5stat_dims2.ddl create mode 100644 tools/h5stat/testfiles/h5stat_err1_dims.ddl create mode 100644 tools/h5stat/testfiles/h5stat_err1_links.ddl create mode 100644 tools/h5stat/testfiles/h5stat_err1_numattrs.ddl create mode 100644 tools/h5stat/testfiles/h5stat_err2_numattrs.ddl create mode 100644 tools/h5stat/testfiles/h5stat_links1.ddl create mode 100644 tools/h5stat/testfiles/h5stat_links2.ddl create mode 100644 tools/h5stat/testfiles/h5stat_links3.ddl create mode 100644 tools/h5stat/testfiles/h5stat_links4.ddl create mode 100644 tools/h5stat/testfiles/h5stat_links5.ddl create mode 100644 tools/h5stat/testfiles/h5stat_nofile.ddl create mode 100644 tools/h5stat/testfiles/h5stat_numattrs1.ddl create mode 100644 tools/h5stat/testfiles/h5stat_numattrs2.ddl create mode 100644 tools/h5stat/testfiles/h5stat_numattrs3.ddl create mode 100644 tools/h5stat/testfiles/h5stat_numattrs4.ddl create mode 100644 tools/h5stat/testfiles/h5stat_threshold.h5 diff --git a/tools/h5stat/testfiles/h5stat_dims1.ddl b/tools/h5stat/testfiles/h5stat_dims1.ddl new file mode 100644 index 0000000..182d31a --- /dev/null +++ b/tools/h5stat/testfiles/h5stat_dims1.ddl @@ -0,0 +1,47 @@ +############################# +Expected output for 'h5stat -gd -m 5 h5stat_threshold.h5' +############################# +Filename: h5stat_threshold.h5 +Small groups (with 0 to 9 links): + # of groups with 0 link(s): 1 + # of groups with 7 link(s): 1 + # of groups with 9 link(s): 1 + Total # of small groups: 3 +Group bins: + # of groups with 0 link: 1 + # of groups with 1 - 9 links: 2 + # of groups with 10 - 99 links: 1 + Total # of groups: 4 +Dataset dimension information: + Max. rank of datasets: 2 + Dataset ranks: + # of dataset with rank 0: 2 + # of dataset with rank 1: 20 + # of dataset with rank 2: 1 +1-D Dataset information: + Max. dimension size of 1-D datasets: 6 + Small 1-D datasets (with dimension sizes 0 to 4): + # of datasets with dimension sizes 0: 1 + Total # of small datasets: 1 + 1-D Dataset dimension bins: + # of datasets with dimension size 0: 1 + # of datasets with dimension size 1 - 9: 19 + Total # of datasets: 20 +Dataset storage information: + Total raw data size: 0 + Total external raw data size: 0 +Dataset layout information: + Dataset layout counts[COMPACT]: 0 + Dataset layout counts[CONTIG]: 23 + Dataset layout counts[CHUNKED]: 0 + Number of external files : 0 +Dataset filters information: + Number of datasets with: + NO filter: 23 + GZIP filter: 0 + SHUFFLE filter: 0 + FLETCHER32 filter: 0 + SZIP filter: 0 + NBIT filter: 0 + SCALEOFFSET filter: 0 + USER-DEFINED filter: 0 diff --git a/tools/h5stat/testfiles/h5stat_dims2.ddl b/tools/h5stat/testfiles/h5stat_dims2.ddl new file mode 100644 index 0000000..abf3f61 --- /dev/null +++ b/tools/h5stat/testfiles/h5stat_dims2.ddl @@ -0,0 +1,38 @@ +############################# +Expected output for 'h5stat -d --di=15 h5stat_threshold.h5' +############################# +Filename: h5stat_threshold.h5 +Dataset dimension information: + Max. rank of datasets: 2 + Dataset ranks: + # of dataset with rank 0: 2 + # of dataset with rank 1: 20 + # of dataset with rank 2: 1 +1-D Dataset information: + Max. dimension size of 1-D datasets: 6 + Small 1-D datasets (with dimension sizes 0 to 14): + # of datasets with dimension sizes 0: 1 + # of datasets with dimension sizes 6: 19 + Total # of small datasets: 20 + 1-D Dataset dimension bins: + # of datasets with dimension size 0: 1 + # of datasets with dimension size 1 - 9: 19 + Total # of datasets: 20 +Dataset storage information: + Total raw data size: 0 + Total external raw data size: 0 +Dataset layout information: + Dataset layout counts[COMPACT]: 0 + Dataset layout counts[CONTIG]: 23 + Dataset layout counts[CHUNKED]: 0 + Number of external files : 0 +Dataset filters information: + Number of datasets with: + NO filter: 23 + GZIP filter: 0 + SHUFFLE filter: 0 + FLETCHER32 filter: 0 + SZIP filter: 0 + NBIT filter: 0 + SCALEOFFSET filter: 0 + USER-DEFINED filter: 0 diff --git a/tools/h5stat/testfiles/h5stat_err1_dims.ddl b/tools/h5stat/testfiles/h5stat_err1_dims.ddl new file mode 100644 index 0000000..8f0686f --- /dev/null +++ b/tools/h5stat/testfiles/h5stat_err1_dims.ddl @@ -0,0 +1,4 @@ +############################# +Expected output for 'h5stat -d --dims=-1 h5stat_threshold.h5' +############################# +h5stat error: Invalid threshold for small datasets diff --git a/tools/h5stat/testfiles/h5stat_err1_links.ddl b/tools/h5stat/testfiles/h5stat_err1_links.ddl new file mode 100644 index 0000000..07987a2 --- /dev/null +++ b/tools/h5stat/testfiles/h5stat_err1_links.ddl @@ -0,0 +1,4 @@ +############################# +Expected output for 'h5stat -l 0 h5stat_threshold.h5' +############################# +h5stat error: Invalid threshold for small groups diff --git a/tools/h5stat/testfiles/h5stat_err1_numattrs.ddl b/tools/h5stat/testfiles/h5stat_err1_numattrs.ddl new file mode 100644 index 0000000..8eea546 --- /dev/null +++ b/tools/h5stat/testfiles/h5stat_err1_numattrs.ddl @@ -0,0 +1,4 @@ +############################# +Expected output for 'h5stat -a -2 h5stat_threshold.h5' +############################# +h5stat error: Invalid threshold for small # of attributes diff --git a/tools/h5stat/testfiles/h5stat_err2_numattrs.ddl b/tools/h5stat/testfiles/h5stat_err2_numattrs.ddl new file mode 100644 index 0000000..a1ecb31 --- /dev/null +++ b/tools/h5stat/testfiles/h5stat_err2_numattrs.ddl @@ -0,0 +1,4 @@ +############################# +Expected output for 'h5stat --numattrs h5stat_threshold.h5' +############################# +h5stat error: Invalid threshold for small # of attributes diff --git a/tools/h5stat/testfiles/h5stat_links1.ddl b/tools/h5stat/testfiles/h5stat_links1.ddl new file mode 100644 index 0000000..e77a788 --- /dev/null +++ b/tools/h5stat/testfiles/h5stat_links1.ddl @@ -0,0 +1,13 @@ +############################# +Expected output for 'h5stat -g -l 8 h5stat_threshold.h5' +############################# +Filename: h5stat_threshold.h5 +Small groups (with 0 to 7 links): + # of groups with 0 link(s): 1 + # of groups with 7 link(s): 1 + Total # of small groups: 2 +Group bins: + # of groups with 0 link: 1 + # of groups with 1 - 9 links: 2 + # of groups with 10 - 99 links: 1 + Total # of groups: 4 diff --git a/tools/h5stat/testfiles/h5stat_links2.ddl b/tools/h5stat/testfiles/h5stat_links2.ddl new file mode 100644 index 0000000..5207343 --- /dev/null +++ b/tools/h5stat/testfiles/h5stat_links2.ddl @@ -0,0 +1,107 @@ +############################# +Expected output for 'h5stat --links=8 h5stat_threshold.h5' +############################# +Filename: h5stat_threshold.h5 +File information + # of unique groups: 4 + # of unique datasets: 23 + # of unique named datatypes: 0 + # of unique links: 0 + # of unique other: 0 + Max. # of links to object: 1 + Max. # of objects in group: 10 +File space information for file metadata (in bytes): + Superblock: 96 + Superblock extension: 0 + User block: 0 + Object headers: (total/unused) + Groups: 3576/0 + Datasets(exclude compact data): 7896/2912 + Datatypes: 0/0 + Groups: + B-tree/List: 3816 + Heap: 744 + Attributes: + B-tree/List: 0 + Heap: 0 + Chunked datasets: + Index: 0 + Datasets: + Heap: 0 + Shared Messages: + Header: 0 + B-tree/List: 0 + Heap: 0 + Free-space managers: + Header: 0 + Amount of free space: 0 +Small groups (with 0 to 7 links): + # of groups with 0 link(s): 1 + # of groups with 7 link(s): 1 + Total # of small groups: 2 +Group bins: + # of groups with 0 link: 1 + # of groups with 1 - 9 links: 2 + # of groups with 10 - 99 links: 1 + Total # of groups: 4 +Dataset dimension information: + Max. rank of datasets: 2 + Dataset ranks: + # of dataset with rank 0: 2 + # of dataset with rank 1: 20 + # of dataset with rank 2: 1 +1-D Dataset information: + Max. dimension size of 1-D datasets: 6 + Small 1-D datasets (with dimension sizes 0 to 9): + # of datasets with dimension sizes 0: 1 + # of datasets with dimension sizes 6: 19 + Total # of small datasets: 20 + 1-D Dataset dimension bins: + # of datasets with dimension size 0: 1 + # of datasets with dimension size 1 - 9: 19 + Total # of datasets: 20 +Dataset storage information: + Total raw data size: 0 + Total external raw data size: 0 +Dataset layout information: + Dataset layout counts[COMPACT]: 0 + Dataset layout counts[CONTIG]: 23 + Dataset layout counts[CHUNKED]: 0 + Number of external files : 0 +Dataset filters information: + Number of datasets with: + NO filter: 23 + GZIP filter: 0 + SHUFFLE filter: 0 + FLETCHER32 filter: 0 + SZIP filter: 0 + NBIT filter: 0 + SCALEOFFSET filter: 0 + USER-DEFINED filter: 0 +Dataset datatype information: + # of unique datatypes used by datasets: 1 + Dataset datatype #0: + Count (total/named) = (23/0) + Size (desc./elmt) = (14/1) + Total dataset datatype count: 23 +Small # of attributes (objects with 1 to 10 attributes): + # of objects with 1 attributes: 2 + # of objects with 10 attributes: 1 + Total # of objects with small # of attributes: 3 +Attribute bins: + # of objects with 1 - 9 attributes: 2 + # of objects with 10 - 99 attributes: 3 + Total # of objects with attributes: 5 + Max. # of attributes to objects: 25 +Free-space section threshold: 1 bytes +Small size free-space sections (< 10 bytes): + Total # of small size sections: 0 +Free-space section bins: + Total # of sections: 0 +File space management strategy: H5F_FILE_SPACE_ALL +Summary of file space information: + File metadata: 16128 bytes + Raw data: 0 bytes + Amount/Percent of tracked free space: 0 bytes/0.0% + Unaccounted space: 184 bytes +Total space: 16312 bytes diff --git a/tools/h5stat/testfiles/h5stat_links3.ddl b/tools/h5stat/testfiles/h5stat_links3.ddl new file mode 100644 index 0000000..d0071d7 --- /dev/null +++ b/tools/h5stat/testfiles/h5stat_links3.ddl @@ -0,0 +1,15 @@ +############################# +Expected output for 'h5stat --links=20 -g h5stat_threshold.h5' +############################# +Filename: h5stat_threshold.h5 +Small groups (with 0 to 19 links): + # of groups with 0 link(s): 1 + # of groups with 7 link(s): 1 + # of groups with 9 link(s): 1 + # of groups with 10 link(s): 1 + Total # of small groups: 4 +Group bins: + # of groups with 0 link: 1 + # of groups with 1 - 9 links: 2 + # of groups with 10 - 99 links: 1 + Total # of groups: 4 diff --git a/tools/h5stat/testfiles/h5stat_links4.ddl b/tools/h5stat/testfiles/h5stat_links4.ddl new file mode 100644 index 0000000..ca3911c --- /dev/null +++ b/tools/h5stat/testfiles/h5stat_links4.ddl @@ -0,0 +1,11 @@ +############################# +Expected output for 'h5stat -g h5stat_newgrat.h5' +############################# +Filename: h5stat_newgrat.h5 +Small groups (with 0 to 9 links): + # of groups with 0 link(s): 35000 + Total # of small groups: 35000 +Group bins: + # of groups with 0 link: 35000 + # of groups with 10000 - 99999 links: 1 + Total # of groups: 35001 diff --git a/tools/h5stat/testfiles/h5stat_links5.ddl b/tools/h5stat/testfiles/h5stat_links5.ddl new file mode 100644 index 0000000..44ec161 --- /dev/null +++ b/tools/h5stat/testfiles/h5stat_links5.ddl @@ -0,0 +1,12 @@ +############################# +Expected output for 'h5stat -g -l 40000 h5stat_newgrat.h5' +############################# +Filename: h5stat_newgrat.h5 +Small groups (with 0 to 39999 links): + # of groups with 0 link(s): 35000 + # of groups with 35001 link(s): 1 + Total # of small groups: 35001 +Group bins: + # of groups with 0 link: 35000 + # of groups with 10000 - 99999 links: 1 + Total # of groups: 35001 diff --git a/tools/h5stat/testfiles/h5stat_nofile.ddl b/tools/h5stat/testfiles/h5stat_nofile.ddl new file mode 100644 index 0000000..cf20995 --- /dev/null +++ b/tools/h5stat/testfiles/h5stat_nofile.ddl @@ -0,0 +1,28 @@ +############################# +Expected output for 'h5stat ' +############################# +Usage: h5stat [OPTIONS] file + + OPTIONS + -h, --help Print a usage message and exit + -V, --version Print version number and exit + -f, --file Print file information + -F, --filemetadata Print file space information for file's metadata + -g, --group Print group information + -l N, --links=N Set the threshold for the # of links when printing + information for small groups. N is an integer greater + than 0. The default threshold is 10. + -G, --groupmetadata Print file space information for groups' metadata + -d, --dset Print dataset information + -m N, --dims=N Set the threshold for the dimension sizes when printing + information for small datasets. N is an integer greater + than 0. The default threshold is 10. + -D, --dsetmetadata Print file space information for datasets' metadata + -T, --dtypemetadata Print datasets' datatype information + -A, --attribute Print attribute information + -a N, --numattrs=N Set the threshold for the # of attributes when printing + information for small # of attributes. N is an integer greater + than 0. The default threshold is 10. + -s, --freespace Print free space information + -S, --summary Print summary of file space information +h5stat error: missing file name diff --git a/tools/h5stat/testfiles/h5stat_numattrs1.ddl b/tools/h5stat/testfiles/h5stat_numattrs1.ddl new file mode 100644 index 0000000..86cfcb0 --- /dev/null +++ b/tools/h5stat/testfiles/h5stat_numattrs1.ddl @@ -0,0 +1,20 @@ +############################# +Expected output for 'h5stat -AS -a 10 h5stat_threshold.h5' +############################# +Filename: h5stat_threshold.h5 +Small # of attributes (objects with 1 to 10 attributes): + # of objects with 1 attributes: 2 + # of objects with 10 attributes: 1 + Total # of objects with small # of attributes: 3 +Attribute bins: + # of objects with 1 - 9 attributes: 2 + # of objects with 10 - 99 attributes: 3 + Total # of objects with attributes: 5 + Max. # of attributes to objects: 25 +File space management strategy: H5F_FILE_SPACE_ALL +Summary of file space information: + File metadata: 16128 bytes + Raw data: 0 bytes + Amount/Percent of tracked free space: 0 bytes/0.0% + Unaccounted space: 184 bytes +Total space: 16312 bytes diff --git a/tools/h5stat/testfiles/h5stat_numattrs2.ddl b/tools/h5stat/testfiles/h5stat_numattrs2.ddl new file mode 100644 index 0000000..5ee3adf --- /dev/null +++ b/tools/h5stat/testfiles/h5stat_numattrs2.ddl @@ -0,0 +1,107 @@ +############################# +Expected output for 'h5stat -a 1 h5stat_threshold.h5' +############################# +Filename: h5stat_threshold.h5 +File information + # of unique groups: 4 + # of unique datasets: 23 + # of unique named datatypes: 0 + # of unique links: 0 + # of unique other: 0 + Max. # of links to object: 1 + Max. # of objects in group: 10 +File space information for file metadata (in bytes): + Superblock: 96 + Superblock extension: 0 + User block: 0 + Object headers: (total/unused) + Groups: 3576/0 + Datasets(exclude compact data): 7896/2912 + Datatypes: 0/0 + Groups: + B-tree/List: 3816 + Heap: 744 + Attributes: + B-tree/List: 0 + Heap: 0 + Chunked datasets: + Index: 0 + Datasets: + Heap: 0 + Shared Messages: + Header: 0 + B-tree/List: 0 + Heap: 0 + Free-space managers: + Header: 0 + Amount of free space: 0 +Small groups (with 0 to 9 links): + # of groups with 0 link(s): 1 + # of groups with 7 link(s): 1 + # of groups with 9 link(s): 1 + Total # of small groups: 3 +Group bins: + # of groups with 0 link: 1 + # of groups with 1 - 9 links: 2 + # of groups with 10 - 99 links: 1 + Total # of groups: 4 +Dataset dimension information: + Max. rank of datasets: 2 + Dataset ranks: + # of dataset with rank 0: 2 + # of dataset with rank 1: 20 + # of dataset with rank 2: 1 +1-D Dataset information: + Max. dimension size of 1-D datasets: 6 + Small 1-D datasets (with dimension sizes 0 to 9): + # of datasets with dimension sizes 0: 1 + # of datasets with dimension sizes 6: 19 + Total # of small datasets: 20 + 1-D Dataset dimension bins: + # of datasets with dimension size 0: 1 + # of datasets with dimension size 1 - 9: 19 + Total # of datasets: 20 +Dataset storage information: + Total raw data size: 0 + Total external raw data size: 0 +Dataset layout information: + Dataset layout counts[COMPACT]: 0 + Dataset layout counts[CONTIG]: 23 + Dataset layout counts[CHUNKED]: 0 + Number of external files : 0 +Dataset filters information: + Number of datasets with: + NO filter: 23 + GZIP filter: 0 + SHUFFLE filter: 0 + FLETCHER32 filter: 0 + SZIP filter: 0 + NBIT filter: 0 + SCALEOFFSET filter: 0 + USER-DEFINED filter: 0 +Dataset datatype information: + # of unique datatypes used by datasets: 1 + Dataset datatype #0: + Count (total/named) = (23/0) + Size (desc./elmt) = (14/1) + Total dataset datatype count: 23 +Small # of attributes (objects with 1 to 1 attributes): + # of objects with 1 attributes: 2 + Total # of objects with small # of attributes: 2 +Attribute bins: + # of objects with 1 - 9 attributes: 2 + # of objects with 10 - 99 attributes: 3 + Total # of objects with attributes: 5 + Max. # of attributes to objects: 25 +Free-space section threshold: 1 bytes +Small size free-space sections (< 10 bytes): + Total # of small size sections: 0 +Free-space section bins: + Total # of sections: 0 +File space management strategy: H5F_FILE_SPACE_ALL +Summary of file space information: + File metadata: 16128 bytes + Raw data: 0 bytes + Amount/Percent of tracked free space: 0 bytes/0.0% + Unaccounted space: 184 bytes +Total space: 16312 bytes diff --git a/tools/h5stat/testfiles/h5stat_numattrs3.ddl b/tools/h5stat/testfiles/h5stat_numattrs3.ddl new file mode 100644 index 0000000..515b76c --- /dev/null +++ b/tools/h5stat/testfiles/h5stat_numattrs3.ddl @@ -0,0 +1,15 @@ +############################# +Expected output for 'h5stat -A --numattrs=25 h5stat_threshold.h5' +############################# +Filename: h5stat_threshold.h5 +Small # of attributes (objects with 1 to 25 attributes): + # of objects with 1 attributes: 2 + # of objects with 10 attributes: 1 + # of objects with 11 attributes: 1 + # of objects with 25 attributes: 1 + Total # of objects with small # of attributes: 5 +Attribute bins: + # of objects with 1 - 9 attributes: 2 + # of objects with 10 - 99 attributes: 3 + Total # of objects with attributes: 5 + Max. # of attributes to objects: 25 diff --git a/tools/h5stat/testfiles/h5stat_numattrs4.ddl b/tools/h5stat/testfiles/h5stat_numattrs4.ddl new file mode 100644 index 0000000..515a4a9 --- /dev/null +++ b/tools/h5stat/testfiles/h5stat_numattrs4.ddl @@ -0,0 +1,11 @@ +############################# +Expected output for 'h5stat -A -a 100 h5stat_newgrat.h5' +############################# +Filename: h5stat_newgrat.h5 +Small # of attributes (objects with 1 to 100 attributes): + # of objects with 100 attributes: 1 + Total # of objects with small # of attributes: 1 +Attribute bins: + # of objects with 100 - 999 attributes: 1 + Total # of objects with attributes: 1 + Max. # of attributes to objects: 100 diff --git a/tools/h5stat/testfiles/h5stat_threshold.h5 b/tools/h5stat/testfiles/h5stat_threshold.h5 new file mode 100644 index 0000000..9f7c8c8 Binary files /dev/null and b/tools/h5stat/testfiles/h5stat_threshold.h5 differ -- cgit v0.12 From bdeb1f6c4329398e8369de299d61173f3d06c415 Mon Sep 17 00:00:00 2001 From: Vailin Choi Date: Thu, 8 Aug 2013 16:04:52 -0500 Subject: [svn-r23977] Update MANIFEST for previous checkin #23976. h5committested. --- MANIFEST | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/MANIFEST b/MANIFEST index 30d52f3..45099ca 100644 --- a/MANIFEST +++ b/MANIFEST @@ -1326,6 +1326,12 @@ # h5stat test files ./tools/h5stat/h5stat_gentest.c ./tools/h5stat/testh5stat.sh.in +./tools/h5stat/testfiles/h5stat_dims1.ddl +./tools/h5stat/testfiles/h5stat_dims2.ddl +./tools/h5stat/testfiles/h5stat_err1_dims.ddl +./tools/h5stat/testfiles/h5stat_err1_links.ddl +./tools/h5stat/testfiles/h5stat_err1_numattrs.ddl +./tools/h5stat/testfiles/h5stat_err2_numattrs.ddl ./tools/h5stat/testfiles/h5stat_filters.ddl ./tools/h5stat/testfiles/h5stat_filters-d.ddl ./tools/h5stat/testfiles/h5stat_filters-dT.ddl @@ -1337,11 +1343,22 @@ ./tools/h5stat/testfiles/h5stat_filters.h5 ./tools/h5stat/testfiles/h5stat_help1.ddl ./tools/h5stat/testfiles/h5stat_help2.ddl +./tools/h5stat/testfiles/h5stat_links1.ddl +./tools/h5stat/testfiles/h5stat_links2.ddl +./tools/h5stat/testfiles/h5stat_links3.ddl +./tools/h5stat/testfiles/h5stat_links4.ddl +./tools/h5stat/testfiles/h5stat_links5.ddl ./tools/h5stat/testfiles/h5stat_newgrat.ddl ./tools/h5stat/testfiles/h5stat_newgrat-UA.ddl ./tools/h5stat/testfiles/h5stat_newgrat-UG.ddl ./tools/h5stat/testfiles/h5stat_newgrat.h5 +./tools/h5stat/testfiles/h5stat_nofile.ddl ./tools/h5stat/testfiles/h5stat_notexist.ddl +./tools/h5stat/testfiles/h5stat_numattrs1.ddl +./tools/h5stat/testfiles/h5stat_numattrs2.ddl +./tools/h5stat/testfiles/h5stat_numattrs3.ddl +./tools/h5stat/testfiles/h5stat_numattrs4.ddl +./tools/h5stat/testfiles/h5stat_threshold.h5 ./tools/h5stat/testfiles/h5stat_tsohm.ddl ./tools/h5stat/testfiles/h5stat_tsohm.h5 -- cgit v0.12 From 111a57ca261c0145d6d1216809c448f98925b4aa Mon Sep 17 00:00:00 2001 From: Allen Byrne Date: Thu, 8 Aug 2013 16:25:32 -0500 Subject: [svn-r23978] Add Bundle and plist file. Update script file add icon --- CMakeLists.txt | 25 +++++++++++++++++++++++-- MANIFEST | 1 + config/cmake/CPack.cmake | 7 ++++++- config/cmake/hdf.gif | Bin 0 -> 1016 bytes 4 files changed, 30 insertions(+), 3 deletions(-) create mode 100644 config/cmake/hdf.gif diff --git a/CMakeLists.txt b/CMakeLists.txt index cb283a3..dc6e383 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1208,16 +1208,37 @@ IF (NOT HDF5_EXTERNALLY_CONFIGURED AND NOT HDF5_NO_PACKAGES) ENDIF (EXISTS "${HDF5_SOURCE_DIR}/release_docs") SET (CPACK_PACKAGE_RELOCATABLE TRUE) + SET (CPACK_GENERATOR "TGZ") IF (WIN32) - SET (CPACK_PACKAGE_INSTALL_REGISTRY_KEY "${HDF5_PACKAGE_NAME}-${HDF5_PACKAGE_VERSION}-${LIB_TYPE}") + LIST (APPEND CPACK_GENERATOR "NSIS") + SET (CPACK_PACKAGE_INSTALL_REGISTRY_KEY "${CPACK_PACKAGE_NAME}-${CPACK_PACKAGE_VERSION}-${LIB_TYPE}") SET (CPACK_MONOLITHIC_INSTALL ON) SET (CPACK_NSIS_CONTACT "${HDF5_PACKAGE_BUGREPORT}") SET (CPACK_NSIS_MODIFY_PATH ON) - SET (CPACK_NSIS_PACKAGE_NAME "HDF5 ${HDF5_PACKAGE_VERSION}") + SET (CPACK_NSIS_PACKAGE_NAME "HDF5 ${CPACK_PACKAGE_VERSION}") ELSEIF (APPLE) + LIST (APPEND CPACK_GENERATOR "DragNDrop") SET (CPACK_COMPONENTS_ALL_IN_ONE_PACKAGE ON) SET (CPACK_PACKAGE_DEFAULT_LOCATION "/opt/${CPACK_PACKAGE_NAME}") SET (CPACK_PACKAGING_INSTALL_PREFIX "/") + SET (CPACK_PACKAGE_FILE_NAME "${CPACK_PACKAGE_NAME}") + SET (CPACK_PACKAGE_ICON "${HDF5_RESOURCES_DIR}/hdf.gif") + SET (CPACK_SET_DESTDIR TRUE) # Required when packaging, and set CMAKE_INSTALL_PREFIX to "/". + + LIST (APPEND CPACK_GENERATOR "Bundle") + #----------------------------------------------------------------------------- + # Configure the Info.plist file for the install bundle + #----------------------------------------------------------------------------- + CONFIGURE_FILE ( + ${CMAKE_ROOT}/Modules/CPack.Info.plist.in + ${HDF5_BINARY_DIR}/CMakeFiles/Info.plist @ONLY + ) + SET (CMAKE_BUNDLE_NAME "${HDF5_PACKAGE_STRING}") + SET (CMAKE_BUNDLE_LOCATION "/") # make sure CMAKE_INSTALL_PREFIX ends in / + SET (CMAKE_INSTALL_PREFIX "/${CMAKE_BUNDLE_NAME}.framework/Versions/${CPACK_PACKAGE_VERSION}/${CPACK_PACKAGE_NAME}") + SET (CPACK_BUNDLE_ICON "${HDF5_RESOURCES_DIR}/hdf.gif") + SET (CPACK_BUNDLE_PLIST "${HDF5_BINARY_DIR}/CMakeFiles/Info.plist") +# SET (CPACK_BUNDLE_STARTUP_COMMAND "${HDF5_BINARY_DIR}/CMakeFiles/${HDF5_PACKAGE}${HDF_PACKAGE_EXT}-startup.sh") ELSE (WIN32) SET (CPACK_PACKAGING_INSTALL_PREFIX "/usr") SET (CPACK_COMPONENTS_ALL_IN_ONE_PACKAGE ON) diff --git a/MANIFEST b/MANIFEST index 45099ca..436ecb1 100644 --- a/MANIFEST +++ b/MANIFEST @@ -2412,6 +2412,7 @@ ./config/cmake/CTestCustom.cmake ./config/cmake/ConfigureChecks.cmake ./config/cmake/CPack.cmake +./config/cmake/hdf.gif ./config/cmake/NSIS.template.in ./config/cmake/NSIS.InstallOptions.ini.in diff --git a/config/cmake/CPack.cmake b/config/cmake/CPack.cmake index d96fe43..bdfa5b8 100644 --- a/config/cmake/CPack.cmake +++ b/config/cmake/CPack.cmake @@ -442,6 +442,7 @@ if(NOT CPACK_GENERATOR) endif() else() option(CPACK_BINARY_NSIS "Enable to build NSIS packages" ON) + option(CPACK_BINARY_WIX "Enable to build WiX packages" OFF) option(CPACK_BINARY_ZIP "Enable to build ZIP packages" OFF) endif() @@ -457,6 +458,7 @@ if(NOT CPACK_GENERATOR) cpack_optional_append(CPACK_GENERATOR CPACK_BINARY_TGZ TGZ) cpack_optional_append(CPACK_GENERATOR CPACK_BINARY_TBZ2 TBZ2) cpack_optional_append(CPACK_GENERATOR CPACK_BINARY_TZ TZ) + cpack_optional_append(CPACK_GENERATOR CPACK_BINARY_WIX WIX) cpack_optional_append(CPACK_GENERATOR CPACK_BINARY_ZIP ZIP) endif() @@ -487,7 +489,7 @@ endif() mark_as_advanced(CPACK_BINARY_CYGWIN CPACK_BINARY_PACKAGEMAKER CPACK_BINARY_OSXX11 CPACK_BINARY_STGZ CPACK_BINARY_TGZ CPACK_BINARY_TBZ2 CPACK_BINARY_DEB CPACK_BINARY_RPM CPACK_BINARY_TZ - CPACK_BINARY_NSIS CPACK_BINARY_ZIP CPACK_BINARY_BUNDLE + CPACK_BINARY_NSIS CPACK_BINARY_WIX CPACK_BINARY_ZIP CPACK_BINARY_BUNDLE CPACK_SOURCE_CYGWIN CPACK_SOURCE_TBZ2 CPACK_SOURCE_TGZ CPACK_SOURCE_TZ CPACK_SOURCE_ZIP CPACK_BINARY_DRAGNDROP) @@ -526,6 +528,9 @@ cpack_set_if_not_set(CPACK_INSTALL_PREFIX "${CMAKE_INSTALL_PREFIX}") cpack_set_if_not_set(CPACK_NSIS_INSTALLER_ICON_CODE "") cpack_set_if_not_set(CPACK_NSIS_INSTALLER_MUI_ICON_CODE "") +# WiX specific variables +cpack_set_if_not_set(CPACK_WIX_SIZEOF_VOID_P "${CMAKE_SIZEOF_VOID_P}") + if(DEFINED CPACK_COMPONENTS_ALL) if(CPACK_MONOLITHIC_INSTALL) message("CPack warning: both CPACK_COMPONENTS_ALL and CPACK_MONOLITHIC_INSTALL have been set.\nDefaulting to a monolithic installation.") diff --git a/config/cmake/hdf.gif b/config/cmake/hdf.gif new file mode 100644 index 0000000..656617b Binary files /dev/null and b/config/cmake/hdf.gif differ -- cgit v0.12 From f1bb1129f374aefd518d5e42ff5e8d27f376bda4 Mon Sep 17 00:00:00 2001 From: Allen Byrne Date: Fri, 9 Aug 2013 09:55:22 -0500 Subject: [svn-r23979] Correct Packaging var names. --- CMakeLists.txt | 8 ++++---- MANIFEST | 1 + config/cmake/CPack.Info.plist.in | 37 +++++++++++++++++++++++++++++++++++++ 3 files changed, 42 insertions(+), 4 deletions(-) create mode 100644 config/cmake/CPack.Info.plist.in diff --git a/CMakeLists.txt b/CMakeLists.txt index dc6e383..577f8ff 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1230,12 +1230,12 @@ IF (NOT HDF5_EXTERNALLY_CONFIGURED AND NOT HDF5_NO_PACKAGES) # Configure the Info.plist file for the install bundle #----------------------------------------------------------------------------- CONFIGURE_FILE ( - ${CMAKE_ROOT}/Modules/CPack.Info.plist.in + ${HDF5_RESOURCES_DIR}/CPack.Info.plist.in ${HDF5_BINARY_DIR}/CMakeFiles/Info.plist @ONLY ) - SET (CMAKE_BUNDLE_NAME "${HDF5_PACKAGE_STRING}") - SET (CMAKE_BUNDLE_LOCATION "/") # make sure CMAKE_INSTALL_PREFIX ends in / - SET (CMAKE_INSTALL_PREFIX "/${CMAKE_BUNDLE_NAME}.framework/Versions/${CPACK_PACKAGE_VERSION}/${CPACK_PACKAGE_NAME}") + SET (CPACK_BUNDLE_NAME "${HDF5_PACKAGE_STRING}") + SET (CPACK_BUNDLE_LOCATION "/") # make sure CMAKE_INSTALL_PREFIX ends in / + SET (CMAKE_INSTALL_PREFIX "/${CPACK_BUNDLE_NAME}.framework/Versions/${CPACK_PACKAGE_VERSION}/${CPACK_PACKAGE_NAME}/") SET (CPACK_BUNDLE_ICON "${HDF5_RESOURCES_DIR}/hdf.gif") SET (CPACK_BUNDLE_PLIST "${HDF5_BINARY_DIR}/CMakeFiles/Info.plist") # SET (CPACK_BUNDLE_STARTUP_COMMAND "${HDF5_BINARY_DIR}/CMakeFiles/${HDF5_PACKAGE}${HDF_PACKAGE_EXT}-startup.sh") diff --git a/MANIFEST b/MANIFEST index 436ecb1..2851a62 100644 --- a/MANIFEST +++ b/MANIFEST @@ -2412,6 +2412,7 @@ ./config/cmake/CTestCustom.cmake ./config/cmake/ConfigureChecks.cmake ./config/cmake/CPack.cmake +./config/cmake/CPack.Info.plist.in ./config/cmake/hdf.gif ./config/cmake/NSIS.template.in ./config/cmake/NSIS.InstallOptions.ini.in diff --git a/config/cmake/CPack.Info.plist.in b/config/cmake/CPack.Info.plist.in new file mode 100644 index 0000000..a701a61 --- /dev/null +++ b/config/cmake/CPack.Info.plist.in @@ -0,0 +1,37 @@ + + + + + +IFMajorVersion +@CPACK_PACKAGE_VERSION_MAJOR@ +IFMinorVersion +@CPACK_PACKAGE_VERSION_MINOR@ +IFPkgFlagAllowBackRev + +IFPkgFlagAuthorizationAction +AdminAuthorization +IFPkgFlagDefaultLocation +@CPACK_PACKAGE_DEFAULT_LOCATION@ +IFPkgFlagInstallFat + +IFPkgFlagIsRequired + +IFPkgFlagOverwritePermissions + +IFPkgFlagRelocatable +<@CPACK_PACKAGE_RELOCATABLE@/> +IFPkgFlagRestartAction +NoRestart +IFPkgFlagRootVolumeOnly + +IFPkgFlagUpdateInstalledLanguages + +IFPkgFlagUseUserMask + +IFPkgFormatVersion +0.10000000149011612 +CFBundleIdentifier +org.@CPACK_PACKAGE_VENDOR@.@CPACK_PACKAGE_NAME@@CPACK_MODULE_VERSION_SUFFIX@ + + -- cgit v0.12 From b5ad01c7e18ef29ef05543cd8d40e98efbbecc83 Mon Sep 17 00:00:00 2001 From: Allen Byrne Date: Fri, 9 Aug 2013 13:52:45 -0500 Subject: [svn-r23980] Add "_" to VS define. --- CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 577f8ff..aa3bbbf 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -343,7 +343,7 @@ SET (EXE_EXT "") IF (WIN32) SET (EXE_EXT ".exe") IF (NOT CYGWIN) - ADD_DEFINITIONS (-DBIND_TO_CURRENT_VCLIBS_VERSION=1) + ADD_DEFINITIONS (-D_BIND_TO_CURRENT_VCLIBS_VERSION=1) ADD_DEFINITIONS (-D_CRT_SECURE_NO_WARNINGS) ADD_DEFINITIONS (-D_CONSOLE) ENDIF (NOT CYGWIN) -- cgit v0.12 From 5dcd9c2dfcfe50cb8aea4e5ff4399aeb17d91296 Mon Sep 17 00:00:00 2001 From: Larry Knox Date: Fri, 9 Aug 2013 15:42:27 -0500 Subject: [svn-r23984] Merged 2 23932 from reduced_warnings branch: Changes applied to eliminate several compiler warnings in the test directory in files: dt_arith.c filter_fail.c big.c dynlib2.c dynlib3.c Also an HDassert(0 && "Unknown type"); statement was added to all 29 combination s of case OTHER: default: See crucible review HDF5-145 for more details. Tested with h5committest. --- test/big.c | 5 ++++- test/dt_arith.c | 32 ++++++++++++++++++++++++++++++++ test/dynlib2.c | 3 +++ test/dynlib3.c | 3 +++ test/filter_fail.c | 4 ++-- 5 files changed, 44 insertions(+), 3 deletions(-) diff --git a/test/big.c b/test/big.c index dffbbeb..5a70c26 100644 --- a/test/big.c +++ b/test/big.c @@ -393,6 +393,10 @@ writer (char* filename, hid_t fapl, fsizes_t testsize, int wrt_n) HDfprintf(stdout, "Unexpected file size of NOFILE\n"); goto error; break; + + default: + HDassert(0 && "Invalid test size."); + break; } /* @@ -604,7 +608,6 @@ usage(void) int testvfd(vfd_t vfd) { hid_t fapl=-1; - hsize_t family_size; char filename[1024]; fsizes_t testsize; diff --git a/test/dt_arith.c b/test/dt_arith.c index 096b83e..9879887 100644 --- a/test/dt_arith.c +++ b/test/dt_arith.c @@ -1853,6 +1853,7 @@ test_conv_int_1(const char *name, hid_t src, hid_t dst) case FLT_LDOUBLE: case OTHER: default: + HDassert(0 && "Unknown type"); break; } } else if (INT_UCHAR==dst_type) { @@ -1903,6 +1904,7 @@ test_conv_int_1(const char *name, hid_t src, hid_t dst) case FLT_LDOUBLE: case OTHER: default: + HDassert(0 && "Unknown type"); break; } } else if (INT_SHORT==dst_type) { @@ -1954,6 +1956,7 @@ test_conv_int_1(const char *name, hid_t src, hid_t dst) case FLT_LDOUBLE: case OTHER: default: + HDassert(0 && "Unknown type"); break; } } else if (INT_USHORT==dst_type) { @@ -2004,6 +2007,7 @@ test_conv_int_1(const char *name, hid_t src, hid_t dst) case FLT_LDOUBLE: case OTHER: default: + HDassert(0 && "Unknown type"); break; } } else if (INT_INT==dst_type) { @@ -2054,6 +2058,7 @@ test_conv_int_1(const char *name, hid_t src, hid_t dst) case FLT_LDOUBLE: case OTHER: default: + HDassert(0 && "Unknown type"); break; } } else if (INT_UINT==dst_type) { @@ -2104,6 +2109,7 @@ test_conv_int_1(const char *name, hid_t src, hid_t dst) case FLT_LDOUBLE: case OTHER: default: + HDassert(0 && "Unknown type"); break; } } else if (INT_LONG==dst_type) { @@ -2154,6 +2160,7 @@ test_conv_int_1(const char *name, hid_t src, hid_t dst) case FLT_LDOUBLE: case OTHER: default: + HDassert(0 && "Unknown type"); break; } } else if (INT_ULONG==dst_type) { @@ -2204,6 +2211,7 @@ test_conv_int_1(const char *name, hid_t src, hid_t dst) case FLT_LDOUBLE: case OTHER: default: + HDassert(0 && "Unknown type"); break; } } else if (INT_LLONG==dst_type) { @@ -2254,6 +2262,7 @@ test_conv_int_1(const char *name, hid_t src, hid_t dst) case FLT_LDOUBLE: case OTHER: default: + HDassert(0 && "Unknown type"); break; } } else if (INT_ULLONG==dst_type) { @@ -2304,6 +2313,7 @@ test_conv_int_1(const char *name, hid_t src, hid_t dst) case FLT_LDOUBLE: case OTHER: default: + HDassert(0 && "Unknown type"); break; } } @@ -2482,6 +2492,7 @@ test_conv_int_1(const char *name, hid_t src, hid_t dst) case FLT_LDOUBLE: case OTHER: default: + HDassert(0 && "Unknown type"); break; } @@ -2535,6 +2546,7 @@ test_conv_int_1(const char *name, hid_t src, hid_t dst) case FLT_LDOUBLE: case OTHER: default: + HDassert(0 && "Unknown type"); break; } @@ -2578,6 +2590,7 @@ test_conv_int_1(const char *name, hid_t src, hid_t dst) case FLT_LDOUBLE: case OTHER: default: + HDassert(0 && "Unknown type"); break; } @@ -3867,6 +3880,7 @@ test_conv_int_fp(const char *name, int run_test, hid_t src, hid_t dst) case FLT_LDOUBLE: case OTHER: default: + HDassert(0 && "Unknown type"); break; } } else if (FLT_DOUBLE==dst_type) { @@ -3919,6 +3933,7 @@ test_conv_int_fp(const char *name, int run_test, hid_t src, hid_t dst) case FLT_LDOUBLE: case OTHER: default: + HDassert(0 && "Unknown type"); break; } #if H5_SIZEOF_LONG_DOUBLE !=0 @@ -3972,6 +3987,7 @@ test_conv_int_fp(const char *name, int run_test, hid_t src, hid_t dst) case FLT_LDOUBLE: case OTHER: default: + HDassert(0 && "Unknown type"); break; } #endif @@ -4004,6 +4020,7 @@ test_conv_int_fp(const char *name, int run_test, hid_t src, hid_t dst) case INT_ULLONG: case OTHER: default: + HDassert(0 && "Unknown type"); break; } } else if (INT_UCHAR==dst_type) { @@ -4035,6 +4052,7 @@ test_conv_int_fp(const char *name, int run_test, hid_t src, hid_t dst) case INT_ULLONG: case OTHER: default: + HDassert(0 && "Unknown type"); break; } } else if (INT_SHORT==dst_type) { @@ -4066,6 +4084,7 @@ test_conv_int_fp(const char *name, int run_test, hid_t src, hid_t dst) case INT_ULLONG: case OTHER: default: + HDassert(0 && "Unknown type"); break; } } else if (INT_USHORT==dst_type) { @@ -4097,6 +4116,7 @@ test_conv_int_fp(const char *name, int run_test, hid_t src, hid_t dst) case INT_ULLONG: case OTHER: default: + HDassert(0 && "Unknown type"); break; } } else if (INT_INT==dst_type) { @@ -4128,6 +4148,7 @@ test_conv_int_fp(const char *name, int run_test, hid_t src, hid_t dst) case INT_ULLONG: case OTHER: default: + HDassert(0 && "Unknown type"); break; } } else if (INT_UINT==dst_type) { @@ -4159,6 +4180,7 @@ test_conv_int_fp(const char *name, int run_test, hid_t src, hid_t dst) case INT_ULLONG: case OTHER: default: + HDassert(0 && "Unknown type"); break; } } else if (INT_LONG==dst_type) { @@ -4190,6 +4212,7 @@ test_conv_int_fp(const char *name, int run_test, hid_t src, hid_t dst) case INT_ULLONG: case OTHER: default: + HDassert(0 && "Unknown type"); break; } } else if (INT_ULONG==dst_type) { @@ -4221,6 +4244,7 @@ test_conv_int_fp(const char *name, int run_test, hid_t src, hid_t dst) case INT_ULLONG: case OTHER: default: + HDassert(0 && "Unknown type"); break; } } else if (INT_LLONG==dst_type) { @@ -4252,6 +4276,7 @@ test_conv_int_fp(const char *name, int run_test, hid_t src, hid_t dst) case INT_ULLONG: case OTHER: default: + HDassert(0 && "Unknown type"); break; } } else if (INT_ULLONG==dst_type) { @@ -4283,6 +4308,7 @@ test_conv_int_fp(const char *name, int run_test, hid_t src, hid_t dst) case INT_ULLONG: case OTHER: default: + HDassert(0 && "Unknown type"); break; } } @@ -4549,6 +4575,8 @@ test_conv_int_fp(const char *name, int run_test, hid_t src, hid_t dst) break; #endif case OTHER: + default: + HDassert(0 && "Unknown type"); break; } @@ -4612,6 +4640,8 @@ test_conv_int_fp(const char *name, int run_test, hid_t src, hid_t dst) break; #endif case OTHER: + default: + HDassert(0 && "Unknown type"); break; } @@ -4662,6 +4692,8 @@ test_conv_int_fp(const char *name, int run_test, hid_t src, hid_t dst) break; #endif case OTHER: + default: + HDassert(0 && "Unknown type"); break; } diff --git a/test/dynlib2.c b/test/dynlib2.c index a853ed0..0d8be2b 100644 --- a/test/dynlib2.c +++ b/test/dynlib2.c @@ -71,6 +71,9 @@ H5Z_filter_dynlib2(unsigned int flags, size_t cd_nelmts, if(cd_nelmts > 0) return(0); + /* Assignment to eliminate unused parameter warning. */ + cd_values = cd_values; + if(flags & H5Z_FLAG_REVERSE) { /*read*/ /* Divide the original value with MULTIPLIER */ while(buf_left > 0) { diff --git a/test/dynlib3.c b/test/dynlib3.c index 9560b86..b3a02ed 100644 --- a/test/dynlib3.c +++ b/test/dynlib3.c @@ -71,6 +71,9 @@ H5Z_filter_dynlib3(unsigned int flags, size_t cd_nelmts, if(cd_nelmts > 0) return(0); + /* Assignment to eliminate unused parameter warning. */ + cd_values = cd_values; + if(flags & H5Z_FLAG_REVERSE) { /*read*/ ret_value = *buf_size = nbytes - SUFFIX_LEN; } /* end if */ diff --git a/test/filter_fail.c b/test/filter_fail.c index c48be14..3dbb564 100644 --- a/test/filter_fail.c +++ b/test/filter_fail.c @@ -65,8 +65,8 @@ const H5Z_class2_t H5Z_FAIL_TEST[1] = {{ *------------------------------------------------------------------------- */ static size_t -filter_fail(unsigned int flags, size_t cd_nelmts, - const unsigned int *cd_values, size_t nbytes, +filter_fail(unsigned int flags, size_t UNUSED cd_nelmts, + const unsigned int UNUSED *cd_values, size_t nbytes, size_t *buf_size, void **buf) { int *dst = (int*)(*buf); -- cgit v0.12 From 345e57b0b11b5f63bb99f28bb9013ce0955c9cc1 Mon Sep 17 00:00:00 2001 From: Jerome Soumagne Date: Fri, 9 Aug 2013 16:06:46 -0500 Subject: [svn-r23985] Merge commit 23937 from reduce_warning branch Remove unused param (src) and unused var (hl) warnings Tested on koala --- hl/test/test_lite.c | 3 +-- src/H5Dint.c | 2 +- src/H5FDmulti.c | 2 ++ src/H5HFman.c | 2 +- src/H5HFpkg.h | 2 +- src/H5HFsection.c | 8 ++++---- 6 files changed, 10 insertions(+), 9 deletions(-) diff --git a/hl/test/test_lite.c b/hl/test/test_lite.c index 282755e..b649462 100644 --- a/hl/test/test_lite.c +++ b/hl/test/test_lite.c @@ -1813,10 +1813,9 @@ static int test_valid_path(void) { hid_t file_id, group; herr_t status; - FILE *fp = NULL; htri_t path_valid; const char *data_string_in = "test"; - + TESTING("H5LTpath_valid"); /* Create a new file using default properties. */ diff --git a/src/H5Dint.c b/src/H5Dint.c index 5545a98..d22c643 100644 --- a/src/H5Dint.c +++ b/src/H5Dint.c @@ -2358,7 +2358,7 @@ done: *------------------------------------------------------------------------- */ herr_t -H5D__mark(H5D_t *dataset, hid_t dxpl_id, unsigned flags) +H5D__mark(H5D_t *dataset, hid_t UNUSED dxpl_id, unsigned flags) { herr_t ret_value = SUCCEED; /* Return value */ diff --git a/src/H5FDmulti.c b/src/H5FDmulti.c index a3ce7f8..f907e0a 100644 --- a/src/H5FDmulti.c +++ b/src/H5FDmulti.c @@ -1784,6 +1784,7 @@ H5FD_multi_read(H5FD_t *_file, H5FD_mem_t type, hid_t dxpl_id, haddr_t addr, H5FD_mem_t mt, mmt, hi = H5FD_MEM_DEFAULT; haddr_t start_addr = 0; static const char *func = "H5FD_multi_read"; /* Function Name for error reporting */ + dxpl_id = dxpl_id; /* Suppress compiler warning */ /* Clear the error stack */ H5Eclear2(H5E_DEFAULT); @@ -1836,6 +1837,7 @@ H5FD_multi_write(H5FD_t *_file, H5FD_mem_t type, hid_t dxpl_id, haddr_t addr, H5FD_mem_t mt, mmt, hi = H5FD_MEM_DEFAULT; haddr_t start_addr = 0; static const char *func = "H5FD_multi_read"; /* Function Name for error reporting */ + dxpl_id = dxpl_id; /* Suppress compiler warning */ /* Clear the error stack */ H5Eclear2(H5E_DEFAULT); diff --git a/src/H5HFman.c b/src/H5HFman.c index 58e3318..b43356f 100644 --- a/src/H5HFman.c +++ b/src/H5HFman.c @@ -157,7 +157,7 @@ H5HF_man_insert(H5HF_hdr_t *hdr, hid_t dxpl_id, size_t obj_size, const void *obj HDassert(sec_node->sect_info.state == H5FS_SECT_LIVE); /* Retrieve direct block address from section */ - if(H5HF_sect_single_dblock_info(hdr, dxpl_id, sec_node, &dblock_addr, &dblock_size) < 0) + if(H5HF_sect_single_dblock_info(hdr, sec_node, &dblock_addr, &dblock_size) < 0) HGOTO_ERROR(H5E_HEAP, H5E_CANTGET, FAIL, "can't retrieve direct block information") /* Lock direct block */ diff --git a/src/H5HFpkg.h b/src/H5HFpkg.h index e0deca7..3e2db99 100644 --- a/src/H5HFpkg.h +++ b/src/H5HFpkg.h @@ -761,7 +761,7 @@ H5_DLL H5HF_free_section_t *H5HF_sect_single_new(hsize_t sect_off, size_t sect_size, H5HF_indirect_t *parent, unsigned par_entry); H5_DLL herr_t H5HF_sect_single_revive(H5HF_hdr_t *hdr, hid_t dxpl_id, H5HF_free_section_t *sect); -H5_DLL herr_t H5HF_sect_single_dblock_info(H5HF_hdr_t *hdr, hid_t dxpl_id, +H5_DLL herr_t H5HF_sect_single_dblock_info(H5HF_hdr_t *hdr, H5HF_free_section_t *sect, haddr_t *dblock_addr, size_t *dblock_size); H5_DLL herr_t H5HF_sect_single_reduce(H5HF_hdr_t *hdr, hid_t dxpl_id, H5HF_free_section_t *sect, size_t amt); diff --git a/src/H5HFsection.c b/src/H5HFsection.c index bf779a6..794d36c 100644 --- a/src/H5HFsection.c +++ b/src/H5HFsection.c @@ -648,7 +648,7 @@ done: *------------------------------------------------------------------------- */ herr_t -H5HF_sect_single_dblock_info(H5HF_hdr_t *hdr, hid_t dxpl_id, +H5HF_sect_single_dblock_info(H5HF_hdr_t *hdr, H5HF_free_section_t *sect, haddr_t *dblock_addr, size_t *dblock_size) { FUNC_ENTER_NOAPI_NOERR @@ -766,7 +766,7 @@ H5HF_sect_single_full_dblock(H5HF_hdr_t *hdr, hid_t dxpl_id, HDassert(hdr); /* Retrieve direct block address from section */ - if(H5HF_sect_single_dblock_info(hdr, dxpl_id, sect, &dblock_addr, &dblock_size) < 0) + if(H5HF_sect_single_dblock_info(hdr, sect, &dblock_addr, &dblock_size) < 0) HGOTO_ERROR(H5E_HEAP, H5E_CANTGET, FAIL, "can't retrieve direct block information") /* Check for section occupying entire direct block */ @@ -1087,7 +1087,7 @@ H5HF_sect_single_shrink(H5FS_section_info_t **_sect, void UNUSED *_udata) HGOTO_ERROR(H5E_HEAP, H5E_CANTINIT, FAIL, "can't revive single free section") /* Retrieve direct block address from section */ - if(H5HF_sect_single_dblock_info(hdr, dxpl_id, (*sect), &dblock_addr, &dblock_size) < 0) + if(H5HF_sect_single_dblock_info(hdr, (*sect), &dblock_addr, &dblock_size) < 0) HGOTO_ERROR(H5E_HEAP, H5E_CANTGET, FAIL, "can't retrieve direct block information") /* Protect the direct block for the section */ @@ -1197,7 +1197,7 @@ H5HF_sect_single_valid(const H5FS_section_class_t UNUSED *cls, const H5FS_sectio /* Retrieve direct block address from section */ /* (Casting away const OK - QAK) */ - status = H5HF_sect_single_dblock_info(iblock->hdr, H5AC_dxpl_id, (H5HF_free_section_t *)sect, &dblock_addr, &dblock_size); + status = H5HF_sect_single_dblock_info(iblock->hdr, (H5HF_free_section_t *)sect, &dblock_addr, &dblock_size); HDassert(status >= 0); HDassert(H5F_addr_eq(iblock->ents[sect->u.single.par_entry].addr, dblock_addr)); HDassert(dblock_size > 0); -- cgit v0.12 From 825fe5689268fd48a325b3cc8d918e9c537f9283 Mon Sep 17 00:00:00 2001 From: Neil Fortner Date: Fri, 9 Aug 2013 16:59:14 -0500 Subject: [svn-r23987] Merge r23939 from reduce_warning branch to trunk Tested: jam, koala, ostrich (h5committest) Log from r23939: Fix unused variables warnings in trunk Rename static functions in H5Adense.c, H5B2cache.c, H5Bcache.c Switch these functions to use FUNC_ENTER_STATIC* macros Tested: koala --- src/H5Adense.c | 88 +++++++++++++------------- src/H5B2cache.c | 192 ++++++++++++++++++++++++++++---------------------------- src/H5B2hdr.c | 4 +- src/H5B2stat.c | 2 +- src/H5Bcache.c | 64 +++++++++---------- src/H5Dchunk.c | 1 - src/H5FDmulti.c | 2 - src/H5G.c | 7 --- src/H5Gent.c | 2 +- src/H5Pocpl.c | 1 - src/H5dbg.c | 2 +- 11 files changed, 177 insertions(+), 188 deletions(-) diff --git a/src/H5Adense.c b/src/H5Adense.c index 4c10255..0b73a20 100644 --- a/src/H5Adense.c +++ b/src/H5Adense.c @@ -292,7 +292,7 @@ done: /*------------------------------------------------------------------------- - * Function: H5A_dense_fnd_cb + * Function: H5A__dense_fnd_cb * * Purpose: Callback when an attribute is located in an index * @@ -305,11 +305,11 @@ done: *------------------------------------------------------------------------- */ static herr_t -H5A_dense_fnd_cb(const H5A_t *attr, hbool_t *took_ownership, void *_user_attr) +H5A__dense_fnd_cb(const H5A_t *attr, hbool_t *took_ownership, void *_user_attr) { H5A_t const **user_attr = (H5A_t const **)_user_attr; /* User data from v2 B-tree attribute lookup */ - FUNC_ENTER_NOAPI_NOINIT + FUNC_ENTER_STATIC_NOERR /* * Check arguments. @@ -322,7 +322,7 @@ H5A_dense_fnd_cb(const H5A_t *attr, hbool_t *took_ownership, void *_user_attr) *took_ownership = TRUE; FUNC_LEAVE_NOAPI(SUCCEED) -} /* end H5A_dense_fnd_cb() */ +} /* end H5A__dense_fnd_cb() */ /*------------------------------------------------------------------------- @@ -395,7 +395,7 @@ H5A_dense_open(H5F_t *f, hid_t dxpl_id, const H5O_ainfo_t *ainfo, const char *na udata.name_hash = H5_checksum_lookup3(name, HDstrlen(name), 0); udata.flags = 0; udata.corder = 0; - udata.found_op = H5A_dense_fnd_cb; /* v2 B-tree comparison callback */ + udata.found_op = H5A__dense_fnd_cb; /* v2 B-tree comparison callback */ udata.found_op_data = &ret_value; /* Find & copy the attribute in the 'name' index */ @@ -578,7 +578,7 @@ done: /*------------------------------------------------------------------------- - * Function: H5A_dense_write_bt2_cb2 + * Function: H5A__dense_write_bt2_cb2 * * Purpose: v2 B-tree 'modify' callback to update the record for a creation * order index @@ -592,12 +592,12 @@ done: *------------------------------------------------------------------------- */ static herr_t -H5A_dense_write_bt2_cb2(void *_record, void *_op_data, hbool_t *changed) +H5A__dense_write_bt2_cb2(void *_record, void *_op_data, hbool_t *changed) { H5A_dense_bt2_corder_rec_t *record = (H5A_dense_bt2_corder_rec_t *)_record; /* Record from B-tree */ H5O_fheap_id_t *new_heap_id = (H5O_fheap_id_t *)_op_data; /* "op data" from v2 B-tree modify */ - FUNC_ENTER_NOAPI_NOINIT + FUNC_ENTER_STATIC_NOERR /* * Check arguments. @@ -612,11 +612,11 @@ H5A_dense_write_bt2_cb2(void *_record, void *_op_data, hbool_t *changed) *changed = TRUE; FUNC_LEAVE_NOAPI(SUCCEED) -} /* end H5A_dense_write_bt2_cb2() */ +} /* end H5A__dense_write_bt2_cb2() */ /*------------------------------------------------------------------------- - * Function: H5A_dense_write_bt2_cb + * Function: H5A__dense_write_bt2_cb * * Purpose: v2 B-tree 'modify' callback to update the data for an attribute * @@ -629,7 +629,7 @@ H5A_dense_write_bt2_cb2(void *_record, void *_op_data, hbool_t *changed) *------------------------------------------------------------------------- */ static herr_t -H5A_dense_write_bt2_cb(void *_record, void *_op_data, hbool_t *changed) +H5A__dense_write_bt2_cb(void *_record, void *_op_data, hbool_t *changed) { H5A_dense_bt2_name_rec_t *record = (H5A_dense_bt2_name_rec_t *)_record; /* Record from B-tree */ H5A_bt2_od_wrt_t *op_data = (H5A_bt2_od_wrt_t *)_op_data; /* "op data" from v2 B-tree modify */ @@ -638,7 +638,7 @@ H5A_dense_write_bt2_cb(void *_record, void *_op_data, hbool_t *changed) uint8_t attr_buf[H5A_ATTR_BUF_SIZE]; /* Buffer for serializing attribute */ herr_t ret_value = SUCCEED; /* Return value */ - FUNC_ENTER_NOAPI_NOINIT + FUNC_ENTER_STATIC /* * Check arguments. @@ -676,7 +676,7 @@ H5A_dense_write_bt2_cb(void *_record, void *_op_data, hbool_t *changed) udata.found_op_data = NULL; /* Modify record for creation order index */ - if(H5B2_modify(bt2_corder, op_data->dxpl_id, &udata, H5A_dense_write_bt2_cb2, &op_data->attr->sh_loc.u.heap_id) < 0) + if(H5B2_modify(bt2_corder, op_data->dxpl_id, &udata, H5A__dense_write_bt2_cb2, &op_data->attr->sh_loc.u.heap_id) < 0) HGOTO_ERROR(H5E_ATTR, H5E_CANTINSERT, FAIL, "unable to modify record in v2 B-tree") } /* end if */ @@ -727,7 +727,7 @@ done: HDONE_ERROR(H5E_ATTR, H5E_CLOSEERROR, FAIL, "can't close wrapped buffer") FUNC_LEAVE_NOAPI(ret_value) -} /* end H5A_dense_write_bt2_cb() */ +} /* end H5A__dense_write_bt2_cb() */ /*------------------------------------------------------------------------- @@ -814,7 +814,7 @@ H5A_dense_write(H5F_t *f, hid_t dxpl_id, const H5O_ainfo_t *ainfo, H5A_t *attr) op_data.corder_bt2_addr = ainfo->corder_bt2_addr; /* Modify attribute through 'name' tracking v2 B-tree */ - if(H5B2_modify(bt2_name, dxpl_id, &udata, H5A_dense_write_bt2_cb, &op_data) < 0) + if(H5B2_modify(bt2_name, dxpl_id, &udata, H5A__dense_write_bt2_cb, &op_data) < 0) HGOTO_ERROR(H5E_ATTR, H5E_CANTINSERT, FAIL, "unable to modify record in v2 B-tree") done: @@ -831,7 +831,7 @@ done: /*------------------------------------------------------------------------- - * Function: H5A_dense_copy_fh_cb + * Function: H5A__dense_copy_fh_cb * * Purpose: Callback for fractal heap operator, to make copy of attribute * for calling routine @@ -845,12 +845,12 @@ done: *------------------------------------------------------------------------- */ static herr_t -H5A_dense_copy_fh_cb(const void *obj, size_t UNUSED obj_len, void *_udata) +H5A__dense_copy_fh_cb(const void *obj, size_t UNUSED obj_len, void *_udata) { H5A_fh_ud_cp_t *udata = (H5A_fh_ud_cp_t *)_udata; /* User data for fractal heap 'op' callback */ herr_t ret_value = SUCCEED; /* Return value */ - FUNC_ENTER_NOAPI_NOINIT + FUNC_ENTER_STATIC /* Decode attribute information & keep a copy */ /* (we make a copy instead of calling the user/library callback directly in @@ -871,7 +871,7 @@ H5A_dense_copy_fh_cb(const void *obj, size_t UNUSED obj_len, void *_udata) done: FUNC_LEAVE_NOAPI(ret_value) -} /* end H5A_dense_copy_fh_cb() */ +} /* end H5A__dense_copy_fh_cb() */ /*------------------------------------------------------------------------- @@ -948,7 +948,7 @@ H5A_dense_rename(H5F_t *f, hid_t dxpl_id, const H5O_ainfo_t *ainfo, const char * udata.name_hash = H5_checksum_lookup3(old_name, HDstrlen(old_name), 0); udata.flags = 0; udata.corder = 0; - udata.found_op = H5A_dense_fnd_cb; /* v2 B-tree comparison callback */ + udata.found_op = H5A__dense_fnd_cb; /* v2 B-tree comparison callback */ udata.found_op_data = &attr_copy; /* Get copy of attribute through 'name' tracking v2 B-tree */ @@ -1030,7 +1030,7 @@ done: /*------------------------------------------------------------------------- - * Function: H5A_dense_iterate_bt2_cb + * Function: H5A__dense_iterate_bt2_cb * * Purpose: v2 B-tree callback for dense attribute storage iterator * @@ -1043,13 +1043,13 @@ done: *------------------------------------------------------------------------- */ static herr_t -H5A_dense_iterate_bt2_cb(const void *_record, void *_bt2_udata) +H5A__dense_iterate_bt2_cb(const void *_record, void *_bt2_udata) { const H5A_dense_bt2_name_rec_t *record = (const H5A_dense_bt2_name_rec_t *)_record; /* Record from B-tree */ H5A_bt2_ud_it_t *bt2_udata = (H5A_bt2_ud_it_t *)_bt2_udata; /* User data for callback */ herr_t ret_value = H5_ITER_CONT; /* Return value */ - FUNC_ENTER_NOAPI_NOINIT + FUNC_ENTER_STATIC /* Check for skipping attributes */ if(bt2_udata->skip > 0) @@ -1072,7 +1072,7 @@ H5A_dense_iterate_bt2_cb(const void *_record, void *_bt2_udata) fh_udata.attr = NULL; /* Call fractal heap 'op' routine, to copy the attribute information */ - if(H5HF_op(fheap, bt2_udata->dxpl_id, &record->id, H5A_dense_copy_fh_cb, &fh_udata) < 0) + if(H5HF_op(fheap, bt2_udata->dxpl_id, &record->id, H5A__dense_copy_fh_cb, &fh_udata) < 0) HGOTO_ERROR(H5E_ATTR, H5E_CANTOPERATE, H5_ITER_ERROR, "heap op callback failed") /* Check which type of callback to make */ @@ -1123,7 +1123,7 @@ H5A_dense_iterate_bt2_cb(const void *_record, void *_bt2_udata) done: FUNC_LEAVE_NOAPI(ret_value) -} /* end H5A_dense_iterate_bt2_cb() */ +} /* end H5A__dense_iterate_bt2_cb() */ /*------------------------------------------------------------------------- @@ -1231,7 +1231,7 @@ H5A_dense_iterate(H5F_t *f, hid_t dxpl_id, hid_t loc_id, const H5O_ainfo_t *ainf /* Iterate over the records in the v2 B-tree's "native" order */ /* (by hash of name) */ - if((ret_value = H5B2_iterate(bt2, dxpl_id, H5A_dense_iterate_bt2_cb, &udata)) < 0) + if((ret_value = H5B2_iterate(bt2, dxpl_id, H5A__dense_iterate_bt2_cb, &udata)) < 0) HERROR(H5E_ATTR, H5E_BADITER, "attribute iteration failed"); /* Update the last attribute examined, if requested */ @@ -1265,7 +1265,7 @@ done: /*------------------------------------------------------------------------- - * Function: H5A_dense_remove_bt2_cb + * Function: H5A__dense_remove_bt2_cb * * Purpose: v2 B-tree callback for dense attribute storage record removal * @@ -1278,7 +1278,7 @@ done: *------------------------------------------------------------------------- */ static herr_t -H5A_dense_remove_bt2_cb(const void *_record, void *_udata) +H5A__dense_remove_bt2_cb(const void *_record, void *_udata) { const H5A_dense_bt2_name_rec_t *record = (const H5A_dense_bt2_name_rec_t *)_record; H5A_bt2_ud_rm_t *udata = (H5A_bt2_ud_rm_t *)_udata; /* User data for callback */ @@ -1286,7 +1286,7 @@ H5A_dense_remove_bt2_cb(const void *_record, void *_udata) H5B2_t *bt2_corder = NULL; /* v2 B-tree handle for creation order index */ herr_t ret_value = SUCCEED; /* Return value */ - FUNC_ENTER_NOAPI_NOINIT + FUNC_ENTER_STATIC /* Check for removing the link from the creation order index */ if(H5F_addr_defined(udata->corder_bt2_addr)) { @@ -1325,7 +1325,7 @@ done: HDONE_ERROR(H5E_ATTR, H5E_CLOSEERROR, FAIL, "can't close v2 B-tree for creation order index") FUNC_LEAVE_NOAPI(ret_value) -} /* end H5A_dense_remove_bt2_cb() */ +} /* end H5A__dense_remove_bt2_cb() */ /*------------------------------------------------------------------------- @@ -1396,12 +1396,12 @@ H5A_dense_remove(H5F_t *f, hid_t dxpl_id, const H5O_ainfo_t *ainfo, const char * udata.common.shared_fheap = shared_fheap; udata.common.name = name; udata.common.name_hash = H5_checksum_lookup3(name, HDstrlen(name), 0); - udata.common.found_op = H5A_dense_fnd_cb; /* v2 B-tree comparison callback */ + udata.common.found_op = H5A__dense_fnd_cb; /* v2 B-tree comparison callback */ udata.common.found_op_data = &attr_copy; udata.corder_bt2_addr = ainfo->corder_bt2_addr; /* Remove the record from the name index v2 B-tree */ - if(H5B2_remove(bt2_name, dxpl_id, &udata, H5A_dense_remove_bt2_cb, &udata) < 0) + if(H5B2_remove(bt2_name, dxpl_id, &udata, H5A__dense_remove_bt2_cb, &udata) < 0) HGOTO_ERROR(H5E_ATTR, H5E_CANTREMOVE, FAIL, "unable to remove attribute from name index v2 B-tree") done: @@ -1420,7 +1420,7 @@ done: /*------------------------------------------------------------------------- - * Function: H5A_dense_remove_by_idx_bt2_cb + * Function: H5A__dense_remove_by_idx_bt2_cb * * Purpose: v2 B-tree callback for dense attribute storage record removal by index * @@ -1433,7 +1433,7 @@ done: *------------------------------------------------------------------------- */ static herr_t -H5A_dense_remove_by_idx_bt2_cb(const void *_record, void *_bt2_udata) +H5A__dense_remove_by_idx_bt2_cb(const void *_record, void *_bt2_udata) { H5HF_t *fheap; /* Fractal heap handle */ H5B2_t *bt2 = NULL; /* v2 B-tree handle for index */ @@ -1444,7 +1444,7 @@ H5A_dense_remove_by_idx_bt2_cb(const void *_record, void *_bt2_udata) hbool_t use_sh_loc; /* Whether to use the attribute's shared location or the separate one */ herr_t ret_value = SUCCEED; /* Return value */ - FUNC_ENTER_NOAPI_NOINIT + FUNC_ENTER_STATIC /* Set up the user data for fractal heap 'op' callback */ fh_udata.f = bt2_udata->f; @@ -1461,7 +1461,7 @@ H5A_dense_remove_by_idx_bt2_cb(const void *_record, void *_bt2_udata) /* Check whether to make a copy of the attribute or just need the shared location info */ if(H5F_addr_defined(bt2_udata->other_bt2_addr) || !(record->flags & H5O_MSG_FLAG_SHARED)) { /* Call fractal heap 'op' routine, to make copy of attribute to remove */ - if(H5HF_op(fheap, bt2_udata->dxpl_id, &record->id, H5A_dense_copy_fh_cb, &fh_udata) < 0) + if(H5HF_op(fheap, bt2_udata->dxpl_id, &record->id, H5A__dense_copy_fh_cb, &fh_udata) < 0) HGOTO_ERROR(H5E_ATTR, H5E_CANTOPERATE, FAIL, "attribute removal callback failed") HDassert(fh_udata.attr); @@ -1543,7 +1543,7 @@ done: H5O_msg_free(H5O_ATTR_ID, fh_udata.attr); FUNC_LEAVE_NOAPI(ret_value) -} /* end H5A_dense_remove_by_idx_bt2_cb() */ +} /* end H5A__dense_remove_by_idx_bt2_cb() */ /*------------------------------------------------------------------------- @@ -1644,7 +1644,7 @@ H5A_dense_remove_by_idx(H5F_t *f, hid_t dxpl_id, const H5O_ainfo_t *ainfo, udata.other_bt2_addr = idx_type == H5_INDEX_NAME ? ainfo->corder_bt2_addr : ainfo->name_bt2_addr; /* Remove the record from the name index v2 B-tree */ - if(H5B2_remove_by_idx(bt2, dxpl_id, order, n, H5A_dense_remove_by_idx_bt2_cb, &udata) < 0) + if(H5B2_remove_by_idx(bt2, dxpl_id, order, n, H5A__dense_remove_by_idx_bt2_cb, &udata) < 0) HGOTO_ERROR(H5E_ATTR, H5E_CANTREMOVE, FAIL, "unable to remove attribute from v2 B-tree index") } /* end if */ else { @@ -1768,7 +1768,7 @@ done: /*------------------------------------------------------------------------- - * Function: H5A_dense_delete_bt2_cb + * Function: H5A__dense_delete_bt2_cb * * Purpose: v2 B-tree callback for dense attribute storage deletion * @@ -1781,14 +1781,14 @@ done: *------------------------------------------------------------------------- */ static herr_t -H5A_dense_delete_bt2_cb(const void *_record, void *_bt2_udata) +H5A__dense_delete_bt2_cb(const void *_record, void *_bt2_udata) { const H5A_dense_bt2_name_rec_t *record = (const H5A_dense_bt2_name_rec_t *)_record; /* Record from B-tree */ H5A_bt2_ud_common_t *bt2_udata = (H5A_bt2_ud_common_t *)_bt2_udata; /* User data for callback */ H5A_t *attr = NULL; /* Attribute being removed */ herr_t ret_value = SUCCEED; /* Return value */ - FUNC_ENTER_NOAPI_NOINIT + FUNC_ENTER_STATIC /* Check for shared attribute */ if(record->flags & H5O_MSG_FLAG_SHARED) { @@ -1813,7 +1813,7 @@ H5A_dense_delete_bt2_cb(const void *_record, void *_bt2_udata) fh_udata.attr = NULL; /* Call fractal heap 'op' routine, to copy the attribute information */ - if(H5HF_op(bt2_udata->fheap, bt2_udata->dxpl_id, &record->id, H5A_dense_copy_fh_cb, &fh_udata) < 0) + if(H5HF_op(bt2_udata->fheap, bt2_udata->dxpl_id, &record->id, H5A__dense_copy_fh_cb, &fh_udata) < 0) HGOTO_ERROR(H5E_ATTR, H5E_CANTOPERATE, FAIL, "heap op callback failed") attr = fh_udata.attr; @@ -1829,7 +1829,7 @@ done: H5O_msg_free_real(H5O_MSG_ATTR, attr); FUNC_LEAVE_NOAPI(ret_value) -} /* end H5A_dense_delete_bt2_cb() */ +} /* end H5A__dense_delete_bt2_cb() */ /*------------------------------------------------------------------------- @@ -1876,7 +1876,7 @@ H5A_dense_delete(H5F_t *f, hid_t dxpl_id, H5O_ainfo_t *ainfo) udata.found_op_data = NULL; /* Delete name index v2 B-tree */ - if(H5B2_delete(f, dxpl_id, ainfo->name_bt2_addr, NULL, H5A_dense_delete_bt2_cb, &udata) < 0) + if(H5B2_delete(f, dxpl_id, ainfo->name_bt2_addr, NULL, H5A__dense_delete_bt2_cb, &udata) < 0) HGOTO_ERROR(H5E_ATTR, H5E_CANTDELETE, FAIL, "unable to delete v2 B-tree for name index") ainfo->name_bt2_addr = HADDR_UNDEF; diff --git a/src/H5B2cache.c b/src/H5B2cache.c index 2ee4ef7..a48d3a8 100644 --- a/src/H5B2cache.c +++ b/src/H5B2cache.c @@ -69,21 +69,21 @@ /********************/ /* Metadata cache callbacks */ -static H5B2_hdr_t *H5B2_cache_hdr_load(H5F_t *f, hid_t dxpl_id, haddr_t addr, void *udata); -static herr_t H5B2_cache_hdr_flush(H5F_t *f, hid_t dxpl_id, hbool_t destroy, haddr_t addr, H5B2_hdr_t *hdr, unsigned UNUSED * flags_ptr); -static herr_t H5B2_cache_hdr_dest(H5F_t *f, H5B2_hdr_t *hdr); -static herr_t H5B2_cache_hdr_clear(H5F_t *f, H5B2_hdr_t *hdr, hbool_t destroy); -static herr_t H5B2_cache_hdr_size(const H5F_t *f, const H5B2_hdr_t *hdr, size_t *size_ptr); -static H5B2_internal_t *H5B2_cache_internal_load(H5F_t *f, hid_t dxpl_id, haddr_t addr, void *udata); -static herr_t H5B2_cache_internal_flush(H5F_t *f, hid_t dxpl_id, hbool_t destroy, haddr_t addr, H5B2_internal_t *i, unsigned UNUSED * flags_ptr); -static herr_t H5B2_cache_internal_dest(H5F_t *f, H5B2_internal_t *internal); -static herr_t H5B2_cache_internal_clear(H5F_t *f, H5B2_internal_t *i, hbool_t destroy); -static herr_t H5B2_cache_internal_size(const H5F_t *f, const H5B2_internal_t *i, size_t *size_ptr); -static H5B2_leaf_t *H5B2_cache_leaf_load(H5F_t *f, hid_t dxpl_id, haddr_t addr, void *udata); -static herr_t H5B2_cache_leaf_flush(H5F_t *f, hid_t dxpl_id, hbool_t destroy, haddr_t addr, H5B2_leaf_t *l, unsigned UNUSED * flags_ptr); -static herr_t H5B2_cache_leaf_dest(H5F_t *f, H5B2_leaf_t *leaf); -static herr_t H5B2_cache_leaf_clear(H5F_t *f, H5B2_leaf_t *l, hbool_t destroy); -static herr_t H5B2_cache_leaf_size(const H5F_t *f, const H5B2_leaf_t *l, size_t *size_ptr); +static H5B2_hdr_t *H5B2__cache_hdr_load(H5F_t *f, hid_t dxpl_id, haddr_t addr, void *udata); +static herr_t H5B2__cache_hdr_flush(H5F_t *f, hid_t dxpl_id, hbool_t destroy, haddr_t addr, H5B2_hdr_t *hdr, unsigned UNUSED * flags_ptr); +static herr_t H5B2__cache_hdr_dest(H5F_t *f, H5B2_hdr_t *hdr); +static herr_t H5B2__cache_hdr_clear(H5F_t *f, H5B2_hdr_t *hdr, hbool_t destroy); +static herr_t H5B2__cache_hdr_size(const H5F_t *f, const H5B2_hdr_t *hdr, size_t *size_ptr); +static H5B2_internal_t *H5B2__cache_internal_load(H5F_t *f, hid_t dxpl_id, haddr_t addr, void *udata); +static herr_t H5B2__cache_internal_flush(H5F_t *f, hid_t dxpl_id, hbool_t destroy, haddr_t addr, H5B2_internal_t *i, unsigned UNUSED * flags_ptr); +static herr_t H5B2__cache_internal_dest(H5F_t *f, H5B2_internal_t *internal); +static herr_t H5B2__cache_internal_clear(H5F_t *f, H5B2_internal_t *i, hbool_t destroy); +static herr_t H5B2__cache_internal_size(const H5F_t *f, const H5B2_internal_t *i, size_t *size_ptr); +static H5B2_leaf_t *H5B2__cache_leaf_load(H5F_t *f, hid_t dxpl_id, haddr_t addr, void *udata); +static herr_t H5B2__cache_leaf_flush(H5F_t *f, hid_t dxpl_id, hbool_t destroy, haddr_t addr, H5B2_leaf_t *l, unsigned UNUSED * flags_ptr); +static herr_t H5B2__cache_leaf_dest(H5F_t *f, H5B2_leaf_t *leaf); +static herr_t H5B2__cache_leaf_clear(H5F_t *f, H5B2_leaf_t *l, hbool_t destroy); +static herr_t H5B2__cache_leaf_size(const H5F_t *f, const H5B2_leaf_t *l, size_t *size_ptr); /*********************/ @@ -93,34 +93,34 @@ static herr_t H5B2_cache_leaf_size(const H5F_t *f, const H5B2_leaf_t *l, size_t /* H5B2 inherits cache-like properties from H5AC */ const H5AC_class_t H5AC_BT2_HDR[1] = {{ H5AC_BT2_HDR_ID, - (H5AC_load_func_t)H5B2_cache_hdr_load, - (H5AC_flush_func_t)H5B2_cache_hdr_flush, - (H5AC_dest_func_t)H5B2_cache_hdr_dest, - (H5AC_clear_func_t)H5B2_cache_hdr_clear, + (H5AC_load_func_t)H5B2__cache_hdr_load, + (H5AC_flush_func_t)H5B2__cache_hdr_flush, + (H5AC_dest_func_t)H5B2__cache_hdr_dest, + (H5AC_clear_func_t)H5B2__cache_hdr_clear, (H5AC_notify_func_t)NULL, - (H5AC_size_func_t)H5B2_cache_hdr_size, + (H5AC_size_func_t)H5B2__cache_hdr_size, }}; /* H5B2 inherits cache-like properties from H5AC */ const H5AC_class_t H5AC_BT2_INT[1] = {{ H5AC_BT2_INT_ID, - (H5AC_load_func_t)H5B2_cache_internal_load, - (H5AC_flush_func_t)H5B2_cache_internal_flush, - (H5AC_dest_func_t)H5B2_cache_internal_dest, - (H5AC_clear_func_t)H5B2_cache_internal_clear, + (H5AC_load_func_t)H5B2__cache_internal_load, + (H5AC_flush_func_t)H5B2__cache_internal_flush, + (H5AC_dest_func_t)H5B2__cache_internal_dest, + (H5AC_clear_func_t)H5B2__cache_internal_clear, (H5AC_notify_func_t)NULL, - (H5AC_size_func_t)H5B2_cache_internal_size, + (H5AC_size_func_t)H5B2__cache_internal_size, }}; /* H5B2 inherits cache-like properties from H5AC */ const H5AC_class_t H5AC_BT2_LEAF[1] = {{ H5AC_BT2_LEAF_ID, - (H5AC_load_func_t)H5B2_cache_leaf_load, - (H5AC_flush_func_t)H5B2_cache_leaf_flush, - (H5AC_dest_func_t)H5B2_cache_leaf_dest, - (H5AC_clear_func_t)H5B2_cache_leaf_clear, + (H5AC_load_func_t)H5B2__cache_leaf_load, + (H5AC_flush_func_t)H5B2__cache_leaf_flush, + (H5AC_dest_func_t)H5B2__cache_leaf_dest, + (H5AC_clear_func_t)H5B2__cache_leaf_clear, (H5AC_notify_func_t)NULL, - (H5AC_size_func_t)H5B2_cache_leaf_size, + (H5AC_size_func_t)H5B2__cache_leaf_size, }}; @@ -136,7 +136,7 @@ const H5AC_class_t H5AC_BT2_LEAF[1] = {{ /*------------------------------------------------------------------------- - * Function: H5B2_cache_hdr_load + * Function: H5B2__cache_hdr_load * * Purpose: Loads a B-tree header from the disk. * @@ -150,7 +150,7 @@ const H5AC_class_t H5AC_BT2_LEAF[1] = {{ *------------------------------------------------------------------------- */ static H5B2_hdr_t * -H5B2_cache_hdr_load(H5F_t *f, hid_t dxpl_id, haddr_t addr, void *_udata) +H5B2__cache_hdr_load(H5F_t *f, hid_t dxpl_id, haddr_t addr, void *_udata) { H5B2_hdr_t *hdr = NULL; /* B-tree header */ H5B2_hdr_cache_ud_t *udata = (H5B2_hdr_cache_ud_t *)_udata; @@ -165,7 +165,7 @@ H5B2_cache_hdr_load(H5F_t *f, hid_t dxpl_id, haddr_t addr, void *_udata) const uint8_t *p; /* Pointer into raw data buffer */ H5B2_hdr_t *ret_value; /* Return value */ - FUNC_ENTER_NOAPI_NOINIT + FUNC_ENTER_STATIC /* Check arguments */ HDassert(f); @@ -256,11 +256,11 @@ done: HDONE_ERROR(H5E_BTREE, H5E_CANTRELEASE, NULL, "can't release v2 B-tree header") FUNC_LEAVE_NOAPI(ret_value) -} /* end H5B2_cache_hdr_load() */ /*lint !e818 Can't make udata a pointer to const */ +} /* end H5B2__cache_hdr_load() */ /*lint !e818 Can't make udata a pointer to const */ /*------------------------------------------------------------------------- - * Function: H5B2_cache_hdr_flush + * Function: H5B2__cache_hdr_flush * * Purpose: Flushes a dirty B-tree header to disk. * @@ -273,14 +273,14 @@ done: *------------------------------------------------------------------------- */ static herr_t -H5B2_cache_hdr_flush(H5F_t *f, hid_t dxpl_id, hbool_t destroy, haddr_t addr, +H5B2__cache_hdr_flush(H5F_t *f, hid_t dxpl_id, hbool_t destroy, haddr_t addr, H5B2_hdr_t *hdr, unsigned UNUSED * flags_ptr) { H5WB_t *wb = NULL; /* Wrapped buffer for header data */ uint8_t hdr_buf[H5B2_HDR_BUF_SIZE]; /* Buffer for header */ herr_t ret_value = SUCCEED; /* Return value */ - FUNC_ENTER_NOAPI_NOINIT + FUNC_ENTER_STATIC /* check arguments */ HDassert(f); @@ -351,7 +351,7 @@ H5B2_cache_hdr_flush(H5F_t *f, hid_t dxpl_id, hbool_t destroy, haddr_t addr, } /* end if */ if(destroy) - if(H5B2_cache_hdr_dest(f, hdr) < 0) + if(H5B2__cache_hdr_dest(f, hdr) < 0) HGOTO_ERROR(H5E_BTREE, H5E_CANTFREE, FAIL, "unable to destroy B-tree header") done: @@ -360,11 +360,11 @@ done: HDONE_ERROR(H5E_BTREE, H5E_CLOSEERROR, FAIL, "can't close wrapped buffer") FUNC_LEAVE_NOAPI(ret_value) -} /* H5B2_cache_hdr_flush() */ +} /* H5B2__cache_hdr_flush() */ /*------------------------------------------------------------------------- - * Function: H5B2_cache_hdr_dest + * Function: H5B2__cache_hdr_dest * * Purpose: Destroys a B-tree header in memory. * @@ -377,11 +377,11 @@ done: *------------------------------------------------------------------------- */ static herr_t -H5B2_cache_hdr_dest(H5F_t *f, H5B2_hdr_t *hdr) +H5B2__cache_hdr_dest(H5F_t *f, H5B2_hdr_t *hdr) { herr_t ret_value = SUCCEED; /* Return value */ - FUNC_ENTER_NOAPI_NOINIT + FUNC_ENTER_STATIC /* Check arguments */ HDassert(hdr); @@ -404,11 +404,11 @@ H5B2_cache_hdr_dest(H5F_t *f, H5B2_hdr_t *hdr) done: FUNC_LEAVE_NOAPI(ret_value) -} /* end H5B2_cache_hdr_dest() */ +} /* end H5B2__cache_hdr_dest() */ /*------------------------------------------------------------------------- - * Function: H5B2_cache_hdr_clear + * Function: H5B2__cache_hdr_clear * * Purpose: Mark a B-tree header in memory as non-dirty. * @@ -421,11 +421,11 @@ done: *------------------------------------------------------------------------- */ static herr_t -H5B2_cache_hdr_clear(H5F_t *f, H5B2_hdr_t *hdr, hbool_t destroy) +H5B2__cache_hdr_clear(H5F_t *f, H5B2_hdr_t *hdr, hbool_t destroy) { herr_t ret_value = SUCCEED; /* Return value */ - FUNC_ENTER_NOAPI_NOINIT + FUNC_ENTER_STATIC /* * Check arguments. @@ -436,16 +436,16 @@ H5B2_cache_hdr_clear(H5F_t *f, H5B2_hdr_t *hdr, hbool_t destroy) hdr->cache_info.is_dirty = FALSE; if(destroy) - if(H5B2_cache_hdr_dest(f, hdr) < 0) + if(H5B2__cache_hdr_dest(f, hdr) < 0) HGOTO_ERROR(H5E_BTREE, H5E_CANTFREE, FAIL, "unable to destroy B-tree header") done: FUNC_LEAVE_NOAPI(ret_value) -} /* end H5B2_cache_hdr_clear() */ +} /* end H5B2__cache_hdr_clear() */ /*------------------------------------------------------------------------- - * Function: H5B2_cache_hdr_size + * Function: H5B2__cache_hdr_size * * Purpose: Compute the size in bytes of a B-tree header * on disk, and return it in *size_ptr. On failure, @@ -460,9 +460,9 @@ done: *------------------------------------------------------------------------- */ static herr_t -H5B2_cache_hdr_size(const H5F_t UNUSED *f, const H5B2_hdr_t *hdr, size_t *size_ptr) +H5B2__cache_hdr_size(const H5F_t UNUSED *f, const H5B2_hdr_t *hdr, size_t *size_ptr) { - FUNC_ENTER_NOAPI_NOINIT + FUNC_ENTER_STATIC_NOERR /* check arguments */ HDassert(f); @@ -472,11 +472,11 @@ H5B2_cache_hdr_size(const H5F_t UNUSED *f, const H5B2_hdr_t *hdr, size_t *size_p *size_ptr = hdr->hdr_size; FUNC_LEAVE_NOAPI(SUCCEED) -} /* H5B2_cache_hdr_size() */ +} /* H5B2__cache_hdr_size() */ /*------------------------------------------------------------------------- - * Function: H5B2_cache_internal_load + * Function: H5B2__cache_internal_load * * Purpose: Loads a B-tree internal node from the disk. * @@ -490,7 +490,7 @@ H5B2_cache_hdr_size(const H5F_t UNUSED *f, const H5B2_hdr_t *hdr, size_t *size_p *------------------------------------------------------------------------- */ static H5B2_internal_t * -H5B2_cache_internal_load(H5F_t *f, hid_t dxpl_id, haddr_t addr, void *_udata) +H5B2__cache_internal_load(H5F_t *f, hid_t dxpl_id, haddr_t addr, void *_udata) { H5B2_internal_cache_ud_t *udata = (H5B2_internal_cache_ud_t *)_udata; /* Pointer to user data */ H5B2_internal_t *internal = NULL; /* Internal node read */ @@ -502,7 +502,7 @@ H5B2_cache_internal_load(H5F_t *f, hid_t dxpl_id, haddr_t addr, void *_udata) unsigned u; /* Local index variable */ H5B2_internal_t *ret_value; /* Return value */ - FUNC_ENTER_NOAPI_NOINIT + FUNC_ENTER_STATIC /* Check arguments */ HDassert(f); @@ -604,11 +604,11 @@ done: HDONE_ERROR(H5E_BTREE, H5E_CANTFREE, NULL, "unable to destroy B-tree internal node") FUNC_LEAVE_NOAPI(ret_value) -} /* H5B2_cache_internal_load() */ /*lint !e818 Can't make udata a pointer to const */ +} /* H5B2__cache_internal_load() */ /*lint !e818 Can't make udata a pointer to const */ /*------------------------------------------------------------------------- - * Function: H5B2_cache_internal_flush + * Function: H5B2__cache_internal_flush * * Purpose: Flushes a dirty B-tree internal node to disk. * @@ -621,11 +621,11 @@ done: *------------------------------------------------------------------------- */ static herr_t -H5B2_cache_internal_flush(H5F_t *f, hid_t dxpl_id, hbool_t destroy, haddr_t addr, H5B2_internal_t *internal, unsigned UNUSED * flags_ptr) +H5B2__cache_internal_flush(H5F_t *f, hid_t dxpl_id, hbool_t destroy, haddr_t addr, H5B2_internal_t *internal, unsigned UNUSED * flags_ptr) { herr_t ret_value = SUCCEED; /* Return value */ - FUNC_ENTER_NOAPI_NOINIT + FUNC_ENTER_STATIC /* check arguments */ HDassert(f); @@ -696,16 +696,16 @@ H5B2_cache_internal_flush(H5F_t *f, hid_t dxpl_id, hbool_t destroy, haddr_t addr } /* end if */ if(destroy) - if(H5B2_cache_internal_dest(f, internal) < 0) + if(H5B2__cache_internal_dest(f, internal) < 0) HGOTO_ERROR(H5E_BTREE, H5E_CANTFREE, FAIL, "unable to destroy B-tree internal node") done: FUNC_LEAVE_NOAPI(ret_value) -} /* H5B2_cache_internal_flush() */ +} /* H5B2__cache_internal_flush() */ /*------------------------------------------------------------------------- - * Function: H5B2_cache_internal_dest + * Function: H5B2__cache_internal_dest * * Purpose: Destroys a B-tree internal node in memory. * @@ -718,11 +718,11 @@ done: *------------------------------------------------------------------------- */ static herr_t -H5B2_cache_internal_dest(H5F_t *f, H5B2_internal_t *internal) +H5B2__cache_internal_dest(H5F_t *f, H5B2_internal_t *internal) { herr_t ret_value = SUCCEED; /* Return value */ - FUNC_ENTER_NOAPI_NOINIT + FUNC_ENTER_STATIC /* Check arguments */ HDassert(f); @@ -746,11 +746,11 @@ H5B2_cache_internal_dest(H5F_t *f, H5B2_internal_t *internal) done: FUNC_LEAVE_NOAPI(ret_value) -} /* end H5B2_cache_internal_dest() */ +} /* end H5B2__cache_internal_dest() */ /*------------------------------------------------------------------------- - * Function: H5B2_cache_internal_clear + * Function: H5B2__cache_internal_clear * * Purpose: Mark a B-tree internal node in memory as non-dirty. * @@ -763,11 +763,11 @@ done: *------------------------------------------------------------------------- */ static herr_t -H5B2_cache_internal_clear(H5F_t *f, H5B2_internal_t *internal, hbool_t destroy) +H5B2__cache_internal_clear(H5F_t *f, H5B2_internal_t *internal, hbool_t destroy) { herr_t ret_value = SUCCEED; - FUNC_ENTER_NOAPI_NOINIT + FUNC_ENTER_STATIC /* * Check arguments. @@ -778,16 +778,16 @@ H5B2_cache_internal_clear(H5F_t *f, H5B2_internal_t *internal, hbool_t destroy) internal->cache_info.is_dirty = FALSE; if(destroy) - if(H5B2_cache_internal_dest(f, internal) < 0) + if(H5B2__cache_internal_dest(f, internal) < 0) HGOTO_ERROR(H5E_BTREE, H5E_CANTFREE, FAIL, "unable to destroy B-tree internal node") done: FUNC_LEAVE_NOAPI(ret_value) -} /* end H5B2_cache_internal_clear() */ +} /* end H5B2__cache_internal_clear() */ /*------------------------------------------------------------------------- - * Function: H5B2_cache_internal_size + * Function: H5B2__cache_internal_size * * Purpose: Compute the size in bytes of a B-tree internal node * on disk, and return it in *size_ptr. On failure, @@ -802,9 +802,9 @@ done: *------------------------------------------------------------------------- */ static herr_t -H5B2_cache_internal_size(const H5F_t UNUSED *f, const H5B2_internal_t *internal, size_t *size_ptr) +H5B2__cache_internal_size(const H5F_t UNUSED *f, const H5B2_internal_t *internal, size_t *size_ptr) { - FUNC_ENTER_NOAPI_NOINIT_NOERR + FUNC_ENTER_STATIC_NOERR /* check arguments */ HDassert(internal); @@ -815,11 +815,11 @@ H5B2_cache_internal_size(const H5F_t UNUSED *f, const H5B2_internal_t *internal, *size_ptr = internal->hdr->node_size; FUNC_LEAVE_NOAPI(SUCCEED) -} /* H5B2_cache_internal_size() */ +} /* H5B2__cache_internal_size() */ /*------------------------------------------------------------------------- - * Function: H5B2_cache_leaf_load + * Function: H5B2__cache_leaf_load * * Purpose: Loads a B-tree leaf from the disk. * @@ -833,7 +833,7 @@ H5B2_cache_internal_size(const H5F_t UNUSED *f, const H5B2_internal_t *internal, *------------------------------------------------------------------------- */ static H5B2_leaf_t * -H5B2_cache_leaf_load(H5F_t UNUSED *f, hid_t dxpl_id, haddr_t addr, void *_udata) +H5B2__cache_leaf_load(H5F_t UNUSED *f, hid_t dxpl_id, haddr_t addr, void *_udata) { H5B2_leaf_cache_ud_t *udata = (H5B2_leaf_cache_ud_t *)_udata; H5B2_leaf_t *leaf = NULL; /* Pointer to lead node loaded */ @@ -844,7 +844,7 @@ H5B2_cache_leaf_load(H5F_t UNUSED *f, hid_t dxpl_id, haddr_t addr, void *_udata) unsigned u; /* Local index variable */ H5B2_leaf_t *ret_value; /* Return value */ - FUNC_ENTER_NOAPI_NOINIT + FUNC_ENTER_STATIC /* Check arguments */ HDassert(f); @@ -926,11 +926,11 @@ done: HDONE_ERROR(H5E_BTREE, H5E_CANTFREE, NULL, "unable to destroy B-tree leaf node") FUNC_LEAVE_NOAPI(ret_value) -} /* H5B2_cache_leaf_load() */ /*lint !e818 Can't make udata a pointer to const */ +} /* H5B2__cache_leaf_load() */ /*lint !e818 Can't make udata a pointer to const */ /*------------------------------------------------------------------------- - * Function: H5B2_cache_leaf_flush + * Function: H5B2__cache_leaf_flush * * Purpose: Flushes a dirty B-tree leaf node to disk. * @@ -943,11 +943,11 @@ done: *------------------------------------------------------------------------- */ static herr_t -H5B2_cache_leaf_flush(H5F_t *f, hid_t dxpl_id, hbool_t destroy, haddr_t addr, H5B2_leaf_t *leaf, unsigned UNUSED * flags_ptr) +H5B2__cache_leaf_flush(H5F_t *f, hid_t dxpl_id, hbool_t destroy, haddr_t addr, H5B2_leaf_t *leaf, unsigned UNUSED * flags_ptr) { herr_t ret_value = SUCCEED; /* Return value */ - FUNC_ENTER_NOAPI_NOINIT + FUNC_ENTER_STATIC /* check arguments */ HDassert(f); @@ -1004,16 +1004,16 @@ H5B2_cache_leaf_flush(H5F_t *f, hid_t dxpl_id, hbool_t destroy, haddr_t addr, H5 } /* end if */ if(destroy) - if(H5B2_cache_leaf_dest(f, leaf) < 0) + if(H5B2__cache_leaf_dest(f, leaf) < 0) HGOTO_ERROR(H5E_BTREE, H5E_CANTFREE, FAIL, "unable to destroy B-tree leaf node") done: FUNC_LEAVE_NOAPI(ret_value) -} /* H5B2_cache_leaf_flush() */ +} /* H5B2__cache_leaf_flush() */ /*------------------------------------------------------------------------- - * Function: H5B2_cache_leaf_dest + * Function: H5B2__cache_leaf_dest * * Purpose: Destroys a B-tree leaf node in memory. * @@ -1026,11 +1026,11 @@ done: *------------------------------------------------------------------------- */ static herr_t -H5B2_cache_leaf_dest(H5F_t *f, H5B2_leaf_t *leaf) +H5B2__cache_leaf_dest(H5F_t *f, H5B2_leaf_t *leaf) { herr_t ret_value = SUCCEED; /* Return value */ - FUNC_ENTER_NOAPI_NOINIT + FUNC_ENTER_STATIC /* Check arguments */ HDassert(f); @@ -1054,11 +1054,11 @@ H5B2_cache_leaf_dest(H5F_t *f, H5B2_leaf_t *leaf) done: FUNC_LEAVE_NOAPI(ret_value) -} /* end H5B2_cache_leaf_dest() */ +} /* end H5B2__cache_leaf_dest() */ /*------------------------------------------------------------------------- - * Function: H5B2_cache_leaf_clear + * Function: H5B2__cache_leaf_clear * * Purpose: Mark a B-tree leaf node in memory as non-dirty. * @@ -1071,11 +1071,11 @@ done: *------------------------------------------------------------------------- */ static herr_t -H5B2_cache_leaf_clear(H5F_t *f, H5B2_leaf_t *leaf, hbool_t destroy) +H5B2__cache_leaf_clear(H5F_t *f, H5B2_leaf_t *leaf, hbool_t destroy) { herr_t ret_value = SUCCEED; - FUNC_ENTER_NOAPI_NOINIT + FUNC_ENTER_STATIC /* * Check arguments. @@ -1086,16 +1086,16 @@ H5B2_cache_leaf_clear(H5F_t *f, H5B2_leaf_t *leaf, hbool_t destroy) leaf->cache_info.is_dirty = FALSE; if(destroy) - if(H5B2_cache_leaf_dest(f, leaf) < 0) + if(H5B2__cache_leaf_dest(f, leaf) < 0) HGOTO_ERROR(H5E_BTREE, H5E_CANTFREE, FAIL, "unable to destroy B-tree leaf node") done: FUNC_LEAVE_NOAPI(ret_value) -} /* end H5B2_cache_leaf_clear() */ +} /* end H5B2__cache_leaf_clear() */ /*------------------------------------------------------------------------- - * Function: H5B2_cache_leaf_size + * Function: H5B2__cache_leaf_size * * Purpose: Compute the size in bytes of a B-tree leaf node * on disk, and return it in *size_ptr. On failure, @@ -1110,9 +1110,9 @@ done: *------------------------------------------------------------------------- */ static herr_t -H5B2_cache_leaf_size(const H5F_t UNUSED *f, const H5B2_leaf_t *leaf, size_t *size_ptr) +H5B2__cache_leaf_size(const H5F_t UNUSED *f, const H5B2_leaf_t *leaf, size_t *size_ptr) { - FUNC_ENTER_NOAPI_NOERR + FUNC_ENTER_STATIC_NOERR /* check arguments */ HDassert(leaf); @@ -1123,5 +1123,5 @@ H5B2_cache_leaf_size(const H5F_t UNUSED *f, const H5B2_leaf_t *leaf, size_t *siz *size_ptr = leaf->hdr->node_size; FUNC_LEAVE_NOAPI(SUCCEED) -} /* H5B2_cache_leaf_size() */ +} /* H5B2__cache_leaf_size() */ diff --git a/src/H5B2hdr.c b/src/H5B2hdr.c index c90b296..60eff61 100644 --- a/src/H5B2hdr.c +++ b/src/H5B2hdr.c @@ -413,7 +413,7 @@ done: herr_t H5B2_hdr_fuse_incr(H5B2_hdr_t *hdr) { - FUNC_ENTER_NOAPI_NOINIT + FUNC_ENTER_NOAPI_NOINIT_NOERR /* Sanity check */ HDassert(hdr); @@ -441,7 +441,7 @@ H5B2_hdr_fuse_incr(H5B2_hdr_t *hdr) size_t H5B2_hdr_fuse_decr(H5B2_hdr_t *hdr) { - FUNC_ENTER_NOAPI_NOINIT + FUNC_ENTER_NOAPI_NOINIT_NOERR /* Sanity check */ HDassert(hdr); diff --git a/src/H5B2stat.c b/src/H5B2stat.c index a8f1fbd..5e48a6f 100644 --- a/src/H5B2stat.c +++ b/src/H5B2stat.c @@ -86,7 +86,7 @@ herr_t H5B2_stat_info(H5B2_t *bt2, H5B2_stat_t *info) { - FUNC_ENTER_NOAPI_NOINIT + FUNC_ENTER_NOAPI_NOINIT_NOERR /* Check arguments. */ HDassert(info); diff --git a/src/H5Bcache.c b/src/H5Bcache.c index 68fb920..968c5ee 100644 --- a/src/H5Bcache.c +++ b/src/H5Bcache.c @@ -55,11 +55,11 @@ /********************/ /* Metadata cache callbacks */ -static H5B_t *H5B_load(H5F_t *f, hid_t dxpl_id, haddr_t addr, void *udata); -static herr_t H5B_flush(H5F_t *f, hid_t dxpl_id, hbool_t destroy, haddr_t addr, H5B_t *b, unsigned UNUSED * flags_ptr); -static herr_t H5B_dest(H5F_t *f, H5B_t *bt); -static herr_t H5B_clear(H5F_t *f, H5B_t *b, hbool_t destroy); -static herr_t H5B_compute_size(const H5F_t *f, const H5B_t *bt, size_t *size_ptr); +static H5B_t *H5B__load(H5F_t *f, hid_t dxpl_id, haddr_t addr, void *udata); +static herr_t H5B__flush(H5F_t *f, hid_t dxpl_id, hbool_t destroy, haddr_t addr, H5B_t *b, unsigned UNUSED * flags_ptr); +static herr_t H5B__dest(H5F_t *f, H5B_t *bt); +static herr_t H5B__clear(H5F_t *f, H5B_t *b, hbool_t destroy); +static herr_t H5B__compute_size(const H5F_t *f, const H5B_t *bt, size_t *size_ptr); /*********************/ @@ -69,12 +69,12 @@ static herr_t H5B_compute_size(const H5F_t *f, const H5B_t *bt, size_t *size_ptr /* H5B inherits cache-like properties from H5AC */ const H5AC_class_t H5AC_BT[1] = {{ H5AC_BT_ID, - (H5AC_load_func_t)H5B_load, - (H5AC_flush_func_t)H5B_flush, - (H5AC_dest_func_t)H5B_dest, - (H5AC_clear_func_t)H5B_clear, + (H5AC_load_func_t)H5B__load, + (H5AC_flush_func_t)H5B__flush, + (H5AC_dest_func_t)H5B__dest, + (H5AC_clear_func_t)H5B__clear, (H5AC_notify_func_t)NULL, - (H5AC_size_func_t)H5B_compute_size, + (H5AC_size_func_t)H5B__compute_size, }}; /*******************/ @@ -84,7 +84,7 @@ const H5AC_class_t H5AC_BT[1] = {{ /*------------------------------------------------------------------------- - * Function: H5B_load + * Function: H5B__load * * Purpose: Loads a B-tree node from the disk. * @@ -98,7 +98,7 @@ const H5AC_class_t H5AC_BT[1] = {{ *------------------------------------------------------------------------- */ static H5B_t * -H5B_load(H5F_t *f, hid_t dxpl_id, haddr_t addr, void *_udata) +H5B__load(H5F_t *f, hid_t dxpl_id, haddr_t addr, void *_udata) { H5B_t *bt = NULL; /* Pointer to the deserialized B-tree node */ H5B_cache_ud_t *udata = (H5B_cache_ud_t *)_udata; /* User data for callback */ @@ -108,7 +108,7 @@ H5B_load(H5F_t *f, hid_t dxpl_id, haddr_t addr, void *_udata) unsigned u; /* Local index variable */ H5B_t *ret_value; /* Return value */ - FUNC_ENTER_NOAPI_NOINIT + FUNC_ENTER_STATIC /* Check arguments */ HDassert(f); @@ -189,11 +189,11 @@ done: HDONE_ERROR(H5E_BTREE, H5E_CANTFREE, NULL, "unable to destroy B-tree node") FUNC_LEAVE_NOAPI(ret_value) -} /* end H5B_load() */ /*lint !e818 Can't make udata a pointer to const */ +} /* end H5B__load() */ /*lint !e818 Can't make udata a pointer to const */ /*------------------------------------------------------------------------- - * Function: H5B_flush + * Function: H5B__flush * * Purpose: Flushes a dirty B-tree node to disk. * @@ -206,12 +206,12 @@ done: *------------------------------------------------------------------------- */ static herr_t -H5B_flush(H5F_t *f, hid_t dxpl_id, hbool_t destroy, haddr_t addr, H5B_t *bt, unsigned UNUSED * flags_ptr) +H5B__flush(H5F_t *f, hid_t dxpl_id, hbool_t destroy, haddr_t addr, H5B_t *bt, unsigned UNUSED * flags_ptr) { H5B_shared_t *shared; /* Pointer to shared B-tree info */ herr_t ret_value = SUCCEED; /* Return value */ - FUNC_ENTER_NOAPI_NOINIT + FUNC_ENTER_STATIC /* check arguments */ HDassert(f); @@ -275,16 +275,16 @@ H5B_flush(H5F_t *f, hid_t dxpl_id, hbool_t destroy, haddr_t addr, H5B_t *bt, uns } /* end if */ if(destroy) - if(H5B_dest(f, bt) < 0) + if(H5B__dest(f, bt) < 0) HGOTO_ERROR(H5E_BTREE, H5E_CANTFREE, FAIL, "unable to destroy B-tree node") done: FUNC_LEAVE_NOAPI(ret_value) -} /* end H5B_flush() */ +} /* end H5B__flush() */ /*------------------------------------------------------------------------- - * Function: H5B_dest + * Function: H5B__dest * * Purpose: Destroys a B-tree node in memory. * @@ -297,11 +297,11 @@ done: *------------------------------------------------------------------------- */ static herr_t -H5B_dest(H5F_t *f, H5B_t *bt) +H5B__dest(H5F_t *f, H5B_t *bt) { herr_t ret_value = SUCCEED; /* Return value */ - FUNC_ENTER_NOAPI_NOINIT + FUNC_ENTER_STATIC /* * Check arguments. @@ -333,11 +333,11 @@ H5B_dest(H5F_t *f, H5B_t *bt) done: FUNC_LEAVE_NOAPI(ret_value) -} /* end H5B_dest() */ +} /* end H5B__dest() */ /*------------------------------------------------------------------------- - * Function: H5B_clear + * Function: H5B__clear * * Purpose: Mark a B-tree node in memory as non-dirty. * @@ -350,11 +350,11 @@ done: *------------------------------------------------------------------------- */ static herr_t -H5B_clear(H5F_t *f, H5B_t *bt, hbool_t destroy) +H5B__clear(H5F_t *f, H5B_t *bt, hbool_t destroy) { herr_t ret_value = SUCCEED; - FUNC_ENTER_NOAPI_NOINIT + FUNC_ENTER_STATIC /* * Check arguments. @@ -365,16 +365,16 @@ H5B_clear(H5F_t *f, H5B_t *bt, hbool_t destroy) bt->cache_info.is_dirty = FALSE; if(destroy) - if(H5B_dest(f, bt) < 0) + if(H5B__dest(f, bt) < 0) HGOTO_ERROR(H5E_BTREE, H5E_CANTFREE, FAIL, "unable to destroy B-tree node") done: FUNC_LEAVE_NOAPI(ret_value) -} /* end H5B_clear() */ +} /* end H5B__clear() */ /*------------------------------------------------------------------------- - * Function: H5B_compute_size + * Function: H5B__compute_size * * Purpose: Compute the size in bytes of the specified instance of * H5B_t on disk, and return it in *len_ptr. On failure, @@ -388,11 +388,11 @@ done: *------------------------------------------------------------------------- */ static herr_t -H5B_compute_size(const H5F_t UNUSED *f, const H5B_t *bt, size_t *size_ptr) +H5B__compute_size(const H5F_t UNUSED *f, const H5B_t *bt, size_t *size_ptr) { H5B_shared_t *shared; /* Pointer to shared B-tree info */ - FUNC_ENTER_NOAPI_NOINIT + FUNC_ENTER_STATIC_NOERR /* check arguments */ HDassert(f); @@ -407,5 +407,5 @@ H5B_compute_size(const H5F_t UNUSED *f, const H5B_t *bt, size_t *size_ptr) *size_ptr = shared->sizeof_rnode; FUNC_LEAVE_NOAPI(SUCCEED) -} /* H5B_compute_size() */ +} /* H5B__compute_size() */ diff --git a/src/H5Dchunk.c b/src/H5Dchunk.c index dd1860f..db195ca 100644 --- a/src/H5Dchunk.c +++ b/src/H5Dchunk.c @@ -307,7 +307,6 @@ H5D__chunk_direct_write(const H5D_t *dset, hid_t dxpl_id, uint32_t filters, hsiz const H5D_rdcc_t *rdcc = &(dset->shared->cache.chunk); /*raw data chunk cache */ int space_ndims; /* Dataset's space rank */ hsize_t space_dim[H5O_LAYOUT_NDIMS]; /* Dataset's dataspace dimensions */ - H5FD_t *lf; herr_t ret_value = SUCCEED; /* Return value */ FUNC_ENTER_STATIC_TAG(dxpl_id, dset->oloc.addr, FAIL) diff --git a/src/H5FDmulti.c b/src/H5FDmulti.c index f907e0a..e5775ab 100644 --- a/src/H5FDmulti.c +++ b/src/H5FDmulti.c @@ -1783,7 +1783,6 @@ H5FD_multi_read(H5FD_t *_file, H5FD_mem_t type, hid_t dxpl_id, haddr_t addr, htri_t prop_exists = FALSE; /* Whether the multi VFD DXPL property already exists */ H5FD_mem_t mt, mmt, hi = H5FD_MEM_DEFAULT; haddr_t start_addr = 0; - static const char *func = "H5FD_multi_read"; /* Function Name for error reporting */ dxpl_id = dxpl_id; /* Suppress compiler warning */ /* Clear the error stack */ @@ -1836,7 +1835,6 @@ H5FD_multi_write(H5FD_t *_file, H5FD_mem_t type, hid_t dxpl_id, haddr_t addr, htri_t prop_exists = FALSE; /* Whether the multi VFD DXPL property already exists */ H5FD_mem_t mt, mmt, hi = H5FD_MEM_DEFAULT; haddr_t start_addr = 0; - static const char *func = "H5FD_multi_read"; /* Function Name for error reporting */ dxpl_id = dxpl_id; /* Suppress compiler warning */ /* Clear the error stack */ diff --git a/src/H5G.c b/src/H5G.c index bd4ad9b..4f2d0e1 100644 --- a/src/H5G.c +++ b/src/H5G.c @@ -495,14 +495,7 @@ done: hid_t H5Gget_create_plist(hid_t group_id) { - H5O_linfo_t linfo; /* Link info message */ - htri_t ginfo_exists; - htri_t linfo_exists; - htri_t pline_exists; H5G_t *group = NULL; - H5P_genplist_t *gcpl_plist; - H5P_genplist_t *new_plist; - hid_t new_gcpl_id = FAIL; hid_t ret_value = FAIL; FUNC_ENTER_API(FAIL) diff --git a/src/H5Gent.c b/src/H5Gent.c index 17893fa..2cef9f7 100644 --- a/src/H5Gent.c +++ b/src/H5Gent.c @@ -361,7 +361,7 @@ H5G__ent_copy(H5G_entry_t *dst, const H5G_entry_t *src, H5_copy_depth_t depth) void H5G__ent_reset(H5G_entry_t *ent) { - FUNC_ENTER_PACKAGE + FUNC_ENTER_PACKAGE_NOERR /* Check arguments */ HDassert(ent); diff --git a/src/H5Pocpl.c b/src/H5Pocpl.c index 2166020..32f6a1b 100644 --- a/src/H5Pocpl.c +++ b/src/H5Pocpl.c @@ -1195,7 +1195,6 @@ htri_t H5P_filter_in_pline(H5P_genplist_t *plist, H5Z_filter_t id) { H5O_pline_t pline; /* Filter pipeline */ - H5Z_filter_info_t *filter; /* Pointer to filter information */ htri_t ret_value = SUCCEED; /* Return value */ FUNC_ENTER_NOAPI(FAIL) diff --git a/src/H5dbg.c b/src/H5dbg.c index 5441895..2039a51 100644 --- a/src/H5dbg.c +++ b/src/H5dbg.c @@ -83,7 +83,7 @@ H5_buffer_dump(FILE *stream, int indent, const uint8_t *buf, { size_t u, v; /* Local index variable */ - FUNC_ENTER_NOAPI_NOINIT + FUNC_ENTER_NOAPI_NOINIT_NOERR /* * Check arguments. -- cgit v0.12 From 5c3bd219637e8d6496ee109329a175c4d6054f3a Mon Sep 17 00:00:00 2001 From: Quincey Koziol Date: Sat, 10 Aug 2013 13:20:38 -0500 Subject: [svn-r23988] Description: Make compiler happier and issue less warnings. Tested on: Mac OSX/64 10.8.4 (amazon) w/gcc 4.8 --- src/H5Eprivate.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/H5Eprivate.h b/src/H5Eprivate.h index b2ca5eb..0e6def6 100644 --- a/src/H5Eprivate.h +++ b/src/H5Eprivate.h @@ -39,8 +39,9 @@ typedef struct H5E_t H5E_t; * (Shouldn't need to be used outside this header file) */ #define HCOMMON_ERROR(maj, min, ...) \ - HERROR(maj, min, __VA_ARGS__); \ - err_occurred = TRUE; + HERROR(maj, min, __VA_ARGS__); \ + err_occurred = TRUE; \ + err_occurred = err_occurred; /* Shut GCC warnings up! */ /* * HDONE_ERROR macro, used to facilitate error reporting between a -- cgit v0.12 From 407d3db6a4f6be686416546c2363e8a86b833a74 Mon Sep 17 00:00:00 2001 From: HDF Tester Date: Sun, 11 Aug 2013 03:37:02 -0500 Subject: [svn-r23989] Snapshot version 1.9 release 161 --- README.txt | 2 +- c++/src/Makefile.in | 2 +- config/lt_vers.am | 2 +- configure | 22 +++++++++++----------- configure.ac | 2 +- fortran/src/Makefile.in | 2 +- hl/c++/src/Makefile.in | 2 +- hl/fortran/src/Makefile.in | 2 +- hl/src/Makefile.in | 2 +- release_docs/RELEASE.txt | 2 +- src/H5public.h | 4 ++-- src/Makefile.in | 2 +- vms/src/h5pubconf.h | 6 +++--- 13 files changed, 26 insertions(+), 26 deletions(-) diff --git a/README.txt b/README.txt index ce3a60b..42d912b 100644 --- a/README.txt +++ b/README.txt @@ -1,4 +1,4 @@ -HDF5 version 1.9.161 currently under development +HDF5 version 1.9.162 currently under development Please refer to the release_docs/INSTALL file for installation instructions. ------------------------------------------------------------------------------ diff --git a/c++/src/Makefile.in b/c++/src/Makefile.in index 6e88509..261a7b0 100644 --- a/c++/src/Makefile.in +++ b/c++/src/Makefile.in @@ -467,7 +467,7 @@ CHECK_CLEANFILES = *.chkexe *.chklog *.clog # Add libtool shared library version numbers to the HDF5 library # See libtool versioning documentation online. LT_VERS_INTERFACE = 6 -LT_VERS_REVISION = 151 +LT_VERS_REVISION = 152 LT_VERS_AGE = 0 # Include src directory diff --git a/config/lt_vers.am b/config/lt_vers.am index e9ee77d..710e2a0 100644 --- a/config/lt_vers.am +++ b/config/lt_vers.am @@ -17,7 +17,7 @@ # Add libtool shared library version numbers to the HDF5 library # See libtool versioning documentation online. LT_VERS_INTERFACE = 6 -LT_VERS_REVISION = 151 +LT_VERS_REVISION = 152 LT_VERS_AGE = 0 ## If the API changes *at all*, increment LT_VERS_INTERFACE and diff --git a/configure b/configure index 5c6e415..c987d69 100755 --- a/configure +++ b/configure @@ -1,7 +1,7 @@ #! /bin/sh # From configure.ac Id: configure.ac 22697 2012-08-19 14:35:47Z hdftest . # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.69 for HDF5 1.9.161. +# Generated by GNU Autoconf 2.69 for HDF5 1.9.162. # # Report bugs to . # @@ -591,8 +591,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='HDF5' PACKAGE_TARNAME='hdf5' -PACKAGE_VERSION='1.9.161' -PACKAGE_STRING='HDF5 1.9.161' +PACKAGE_VERSION='1.9.162' +PACKAGE_STRING='HDF5 1.9.162' PACKAGE_BUGREPORT='help@hdfgroup.org' PACKAGE_URL='' @@ -1486,7 +1486,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures HDF5 1.9.161 to adapt to many kinds of systems. +\`configure' configures HDF5 1.9.162 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1556,7 +1556,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of HDF5 1.9.161:";; + short | recursive ) echo "Configuration of HDF5 1.9.162:";; esac cat <<\_ACEOF @@ -1752,7 +1752,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -HDF5 configure 1.9.161 +HDF5 configure 1.9.162 generated by GNU Autoconf 2.69 Copyright (C) 2012 Free Software Foundation, Inc. @@ -2846,7 +2846,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by HDF5 $as_me 1.9.161, which was +It was created by HDF5 $as_me 1.9.162, which was generated by GNU Autoconf 2.69. Invocation command line was $ $0 $@ @@ -3678,7 +3678,7 @@ fi # Define the identity of the package. PACKAGE='hdf5' - VERSION='1.9.161' + VERSION='1.9.162' cat >>confdefs.h <<_ACEOF @@ -31632,7 +31632,7 @@ Usage: $0 [OPTIONS] Report bugs to ." lt_cl_version="\ -HDF5 config.lt 1.9.161 +HDF5 config.lt 1.9.162 configured by $0, generated by GNU Autoconf 2.69. Copyright (C) 2011 Free Software Foundation, Inc. @@ -33762,7 +33762,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by HDF5 $as_me 1.9.161, which was +This file was extended by HDF5 $as_me 1.9.162, which was generated by GNU Autoconf 2.69. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -33828,7 +33828,7 @@ _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ -HDF5 config.status 1.9.161 +HDF5 config.status 1.9.162 configured by $0, generated by GNU Autoconf 2.69, with options \\"\$ac_cs_config\\" diff --git a/configure.ac b/configure.ac index 16f2e3e..0142353 100644 --- a/configure.ac +++ b/configure.ac @@ -26,7 +26,7 @@ AC_PREREQ([2.69]) ## NOTE: Do not forget to change the version number here when we do a ## release!!! ## -AC_INIT([HDF5], [1.9.161], [help@hdfgroup.org]) +AC_INIT([HDF5], [1.9.162], [help@hdfgroup.org]) AC_CONFIG_SRCDIR([src/H5.c]) AC_CONFIG_HEADER([src/H5config.h]) diff --git a/fortran/src/Makefile.in b/fortran/src/Makefile.in index 31d9871..65ebcaf 100644 --- a/fortran/src/Makefile.in +++ b/fortran/src/Makefile.in @@ -518,7 +518,7 @@ CHECK_CLEANFILES = *.chkexe *.chklog *.clog # Add libtool shared library version numbers to the HDF5 library # See libtool versioning documentation online. LT_VERS_INTERFACE = 6 -LT_VERS_REVISION = 151 +LT_VERS_REVISION = 152 LT_VERS_AGE = 0 # Include src directory in both Fortran and C flags (C compiler is used diff --git a/hl/c++/src/Makefile.in b/hl/c++/src/Makefile.in index d805db3..369ccc2 100644 --- a/hl/c++/src/Makefile.in +++ b/hl/c++/src/Makefile.in @@ -458,7 +458,7 @@ CHECK_CLEANFILES = *.chkexe *.chklog *.clog # Add libtool shared library version numbers to the HDF5 library # See libtool versioning documentation online. LT_VERS_INTERFACE = 6 -LT_VERS_REVISION = 151 +LT_VERS_REVISION = 152 LT_VERS_AGE = 0 # Include src directory diff --git a/hl/fortran/src/Makefile.in b/hl/fortran/src/Makefile.in index 353b844..85e4757 100644 --- a/hl/fortran/src/Makefile.in +++ b/hl/fortran/src/Makefile.in @@ -474,7 +474,7 @@ CHECK_CLEANFILES = *.chkexe *.chklog *.clog # Add libtool shared library version numbers to the HDF5 library # See libtool versioning documentation online. LT_VERS_INTERFACE = 6 -LT_VERS_REVISION = 151 +LT_VERS_REVISION = 152 LT_VERS_AGE = 0 INCLUDES = -I$(top_srcdir)/src -I$(top_srcdir)/hl/src -I$(top_builddir)/hl/src \ -I$(top_srcdir)/fortran/src -I$(top_builddir)/fortran/src diff --git a/hl/src/Makefile.in b/hl/src/Makefile.in index e189ecd..89428ff 100644 --- a/hl/src/Makefile.in +++ b/hl/src/Makefile.in @@ -457,7 +457,7 @@ CHECK_CLEANFILES = *.chkexe *.chklog *.clog # Add libtool shared library version numbers to the HDF5 library # See libtool versioning documentation online. LT_VERS_INTERFACE = 6 -LT_VERS_REVISION = 151 +LT_VERS_REVISION = 152 LT_VERS_AGE = 0 # This library is our main target. diff --git a/release_docs/RELEASE.txt b/release_docs/RELEASE.txt index dcdc2f9..c14dec0 100644 --- a/release_docs/RELEASE.txt +++ b/release_docs/RELEASE.txt @@ -1,4 +1,4 @@ -HDF5 version 1.9.161 currently under development +HDF5 version 1.9.162 currently under development ================================================================================ diff --git a/src/H5public.h b/src/H5public.h index 9e05cc9..f203bd1 100644 --- a/src/H5public.h +++ b/src/H5public.h @@ -75,10 +75,10 @@ extern "C" { /* Version numbers */ #define H5_VERS_MAJOR 1 /* For major interface/format changes */ #define H5_VERS_MINOR 9 /* For minor interface/format changes */ -#define H5_VERS_RELEASE 161 /* For tweaks, bug-fixes, or development */ +#define H5_VERS_RELEASE 162 /* For tweaks, bug-fixes, or development */ #define H5_VERS_SUBRELEASE "" /* For pre-releases like snap0 */ /* Empty string for real releases. */ -#define H5_VERS_INFO "HDF5 library version: 1.9.161" /* Full version string */ +#define H5_VERS_INFO "HDF5 library version: 1.9.162" /* Full version string */ #define H5check() H5check_version(H5_VERS_MAJOR,H5_VERS_MINOR, \ H5_VERS_RELEASE) diff --git a/src/Makefile.in b/src/Makefile.in index 276052e..05e0476 100644 --- a/src/Makefile.in +++ b/src/Makefile.in @@ -522,7 +522,7 @@ CHECK_CLEANFILES = *.chkexe *.chklog *.clog # Add libtool shared library version numbers to the HDF5 library # See libtool versioning documentation online. LT_VERS_INTERFACE = 6 -LT_VERS_REVISION = 151 +LT_VERS_REVISION = 152 LT_VERS_AGE = 0 H5detect_CFLAGS = -g $(AM_CFLAGS) diff --git a/vms/src/h5pubconf.h b/vms/src/h5pubconf.h index f7d42b0..ada9370 100644 --- a/vms/src/h5pubconf.h +++ b/vms/src/h5pubconf.h @@ -511,7 +511,7 @@ #define H5_PACKAGE_NAME "HDF5" /* Define to the full name and version of this package. */ -#define H5_PACKAGE_STRING "HDF5 1.9.161" +#define H5_PACKAGE_STRING "HDF5 1.9.162" /* Define to the one symbol short name of this package. */ #define H5_PACKAGE_TARNAME "hdf5" @@ -520,7 +520,7 @@ #define H5_PACKAGE_URL "" /* Define to the version of this package. */ -#define H5_PACKAGE_VERSION "1.9.161" +#define H5_PACKAGE_VERSION "1.9.162" /* Width for printf() for type `long long' or `__int64', use `ll' */ #define H5_PRINTF_LL_WIDTH "ll" @@ -683,7 +683,7 @@ /* #undef H5_USING_MEMCHECKER */ /* Version number of package */ -#define H5_VERSION "1.9.161" +#define H5_VERSION "1.9.162" /* Define if vsnprintf() returns the correct value for formatted strings that don't fit into size allowed */ -- cgit v0.12 From f801cf4618277f7c61fa378a3934bb635c276e98 Mon Sep 17 00:00:00 2001 From: Allen Byrne Date: Mon, 12 Aug 2013 14:52:09 -0500 Subject: [svn-r23991] Reorder grouping --- tools/h5dump/h5dump.c | 46 ++++++++++++------------ tools/testfiles/h5dump-help.txt | 46 ++++++++++++------------ tools/testfiles/tnofilename-with-packed-bits.ddl | 46 ++++++++++++------------ tools/testfiles/tpbitsIncomplete.ddl | 46 ++++++++++++------------ tools/testfiles/tpbitsLengthExceeded.ddl | 46 ++++++++++++------------ tools/testfiles/tpbitsLengthPositive.ddl | 46 ++++++++++++------------ tools/testfiles/tpbitsMaxExceeded.ddl | 46 ++++++++++++------------ tools/testfiles/tpbitsOffsetExceeded.ddl | 46 ++++++++++++------------ tools/testfiles/tpbitsOffsetNegative.ddl | 46 ++++++++++++------------ 9 files changed, 207 insertions(+), 207 deletions(-) diff --git a/tools/h5dump/h5dump.c b/tools/h5dump/h5dump.c index 6218631..be6ee7f 100644 --- a/tools/h5dump/h5dump.c +++ b/tools/h5dump/h5dump.c @@ -231,20 +231,6 @@ usage(const char *prog) PRINTVALSTREAM(rawoutstream, " OPTIONS\n"); PRINTVALSTREAM(rawoutstream, " -h, --help Print a usage message and exit\n"); PRINTVALSTREAM(rawoutstream, " -V, --version Print version number and exit\n"); - PRINTVALSTREAM(rawoutstream, "--------------- Formatting Options ---------------\n"); - PRINTVALSTREAM(rawoutstream, " -e, --escape Escape non printing characters\n"); - PRINTVALSTREAM(rawoutstream, " -r, --string Print 1-byte integer datasets as ASCII\n"); - PRINTVALSTREAM(rawoutstream, " -y, --noindex Do not print array indices with the data\n"); - PRINTVALSTREAM(rawoutstream, " -m T, --format=T Set the floating point output format\n"); - PRINTVALSTREAM(rawoutstream, " -q Q, --sort_by=Q Sort groups and attributes by index Q\n"); - PRINTVALSTREAM(rawoutstream, " -z Z, --sort_order=Z Sort groups and attributes by order Z\n"); - PRINTVALSTREAM(rawoutstream, " --enable-error-stack Prints messages from the HDF5 error stack as they\n"); - PRINTVALSTREAM(rawoutstream, " occur.\n"); - PRINTVALSTREAM(rawoutstream, " --no-compact-subset Disable compact form of subsetting and allow the use\n"); - PRINTVALSTREAM(rawoutstream, " of \"[\" in dataset names.\n"); - PRINTVALSTREAM(rawoutstream, " -w N, --width=N Set the number of columns of output. A value of 0 (zero)\n"); - PRINTVALSTREAM(rawoutstream, " sets the number of columns to the maximum (65535).\n"); - PRINTVALSTREAM(rawoutstream, " Default width is 80 columns.\n"); PRINTVALSTREAM(rawoutstream, "--------------- File Options ---------------\n"); PRINTVALSTREAM(rawoutstream, " -n, --contents Print a list of the file contents and exit\n"); PRINTVALSTREAM(rawoutstream, " Optional value 1 also prints attributes.\n"); @@ -276,6 +262,20 @@ usage(const char *prog) PRINTVALSTREAM(rawoutstream, " the data value and length is the number of bits of\n"); PRINTVALSTREAM(rawoutstream, " the mask.\n"); PRINTVALSTREAM(rawoutstream, " -R, --region Print dataset pointed by region references\n"); + PRINTVALSTREAM(rawoutstream, "--------------- Formatting Options ---------------\n"); + PRINTVALSTREAM(rawoutstream, " -e, --escape Escape non printing characters\n"); + PRINTVALSTREAM(rawoutstream, " -r, --string Print 1-byte integer datasets as ASCII\n"); + PRINTVALSTREAM(rawoutstream, " -y, --noindex Do not print array indices with the data\n"); + PRINTVALSTREAM(rawoutstream, " -m T, --format=T Set the floating point output format\n"); + PRINTVALSTREAM(rawoutstream, " -q Q, --sort_by=Q Sort groups and attributes by index Q\n"); + PRINTVALSTREAM(rawoutstream, " -z Z, --sort_order=Z Sort groups and attributes by order Z\n"); + PRINTVALSTREAM(rawoutstream, " --enable-error-stack Prints messages from the HDF5 error stack as they\n"); + PRINTVALSTREAM(rawoutstream, " occur.\n"); + PRINTVALSTREAM(rawoutstream, " --no-compact-subset Disable compact form of subsetting and allow the use\n"); + PRINTVALSTREAM(rawoutstream, " of \"[\" in dataset names.\n"); + PRINTVALSTREAM(rawoutstream, " -w N, --width=N Set the number of columns of output. A value of 0 (zero)\n"); + PRINTVALSTREAM(rawoutstream, " sets the number of columns to the maximum (65535).\n"); + PRINTVALSTREAM(rawoutstream, " Default width is 80 columns.\n"); PRINTVALSTREAM(rawoutstream, "--------------- XML Options ---------------\n"); PRINTVALSTREAM(rawoutstream, " -x, --xml Output in XML using Schema\n"); PRINTVALSTREAM(rawoutstream, " -u, --use-dtd Output in XML using DTD\n"); @@ -306,15 +306,7 @@ usage(const char *prog) PRINTVALSTREAM(rawoutstream, " the file driver flag, the file will be opened with each driver in\n"); PRINTVALSTREAM(rawoutstream, " turn and in the order specified above until one driver succeeds\n"); PRINTVALSTREAM(rawoutstream, " in opening the file.\n"); - PRINTVALSTREAM(rawoutstream, " These are the letters that are appended to the file name(without .h5) when opening\n"); - PRINTVALSTREAM(rawoutstream, " names for the split(m,r) and multi(s,b,r,g,l,o) drivers. They are:\n"); - PRINTVALSTREAM(rawoutstream, " m: All meta data when using the split driver.\n"); - PRINTVALSTREAM(rawoutstream, " s: The userblock, superblock, and driver info block\n"); - PRINTVALSTREAM(rawoutstream, " b: B-tree nodes\n"); - PRINTVALSTREAM(rawoutstream, " r: Dataset raw data\n"); - PRINTVALSTREAM(rawoutstream, " g: Global heap\n"); - PRINTVALSTREAM(rawoutstream, " l: local heap (object names)\n"); - PRINTVALSTREAM(rawoutstream, " o: object headers\n"); + PRINTVALSTREAM(rawoutstream, " See examples below for family, split, and multi driver special file name usage.\n"); PRINTVALSTREAM(rawoutstream, "\n"); PRINTVALSTREAM(rawoutstream, " F - is a filename.\n"); PRINTVALSTREAM(rawoutstream, " P - is the full path from the root group to the object.\n"); @@ -360,6 +352,14 @@ usage(const char *prog) PRINTVALSTREAM(rawoutstream, "\n"); PRINTVALSTREAM(rawoutstream, " h5dump -d /foo -f split splitfile\n"); PRINTVALSTREAM(rawoutstream, "\n"); + PRINTVALSTREAM(rawoutstream, " 7) Dataset foo in multi files mf-s.h5, mf-b.h5, mf-r.h5, mf-g.h5, mf-l.h5 and mf-o.h5\n"); + PRINTVALSTREAM(rawoutstream, "\n"); + PRINTVALSTREAM(rawoutstream, " h5dump -d /foo -f multi mf\n"); + PRINTVALSTREAM(rawoutstream, "\n"); + PRINTVALSTREAM(rawoutstream, " 8) Dataset foo in family files fam00000.h5 fam00001.h5 and fam00002.h5\n"); + PRINTVALSTREAM(rawoutstream, "\n"); + PRINTVALSTREAM(rawoutstream, " h5dump -d /foo -f family fam%05d.h5\n"); + PRINTVALSTREAM(rawoutstream, "\n"); } diff --git a/tools/testfiles/h5dump-help.txt b/tools/testfiles/h5dump-help.txt index 3a4864e..82b7323 100644 --- a/tools/testfiles/h5dump-help.txt +++ b/tools/testfiles/h5dump-help.txt @@ -2,20 +2,6 @@ usage: h5dump [OPTIONS] files OPTIONS -h, --help Print a usage message and exit -V, --version Print version number and exit ---------------- Formatting Options --------------- - -e, --escape Escape non printing characters - -r, --string Print 1-byte integer datasets as ASCII - -y, --noindex Do not print array indices with the data - -m T, --format=T Set the floating point output format - -q Q, --sort_by=Q Sort groups and attributes by index Q - -z Z, --sort_order=Z Sort groups and attributes by order Z - --enable-error-stack Prints messages from the HDF5 error stack as they - occur. - --no-compact-subset Disable compact form of subsetting and allow the use - of "[" in dataset names. - -w N, --width=N Set the number of columns of output. A value of 0 (zero) - sets the number of columns to the maximum (65535). - Default width is 80 columns. --------------- File Options --------------- -n, --contents Print a list of the file contents and exit Optional value 1 also prints attributes. @@ -47,6 +33,20 @@ usage: h5dump [OPTIONS] files the data value and length is the number of bits of the mask. -R, --region Print dataset pointed by region references +--------------- Formatting Options --------------- + -e, --escape Escape non printing characters + -r, --string Print 1-byte integer datasets as ASCII + -y, --noindex Do not print array indices with the data + -m T, --format=T Set the floating point output format + -q Q, --sort_by=Q Sort groups and attributes by index Q + -z Z, --sort_order=Z Sort groups and attributes by order Z + --enable-error-stack Prints messages from the HDF5 error stack as they + occur. + --no-compact-subset Disable compact form of subsetting and allow the use + of "[" in dataset names. + -w N, --width=N Set the number of columns of output. A value of 0 (zero) + sets the number of columns to the maximum (65535). + Default width is 80 columns. --------------- XML Options --------------- -x, --xml Output in XML using Schema -u, --use-dtd Output in XML using DTD @@ -77,15 +77,7 @@ usage: h5dump [OPTIONS] files the file driver flag, the file will be opened with each driver in turn and in the order specified above until one driver succeeds in opening the file. - These are the letters that are appended to the file name(without .h5) when opening - names for the split(m,r) and multi(s,b,r,g,l,o) drivers. They are: - m: All meta data when using the split driver. - s: The userblock, superblock, and driver info block - b: B-tree nodes - r: Dataset raw data - g: Global heap - l: local heap (object names) - o: object headers + See examples below for family, split, and multi driver special file name usage. F - is a filename. P - is the full path from the root group to the object. @@ -131,3 +123,11 @@ usage: h5dump [OPTIONS] files h5dump -d /foo -f split splitfile + 7) Dataset foo in multi files mf-s.h5, mf-b.h5, mf-r.h5, mf-g.h5, mf-l.h5 and mf-o.h5 + + h5dump -d /foo -f multi mf + + 8) Dataset foo in family files fam00000.h5 fam00001.h5 and fam00002.h5 + + h5dump -d /foo -f family fam-574932464.h5 + diff --git a/tools/testfiles/tnofilename-with-packed-bits.ddl b/tools/testfiles/tnofilename-with-packed-bits.ddl index e8df31c..bb0a876 100644 --- a/tools/testfiles/tnofilename-with-packed-bits.ddl +++ b/tools/testfiles/tnofilename-with-packed-bits.ddl @@ -2,20 +2,6 @@ usage: h5dump [OPTIONS] files OPTIONS -h, --help Print a usage message and exit -V, --version Print version number and exit ---------------- Formatting Options --------------- - -e, --escape Escape non printing characters - -r, --string Print 1-byte integer datasets as ASCII - -y, --noindex Do not print array indices with the data - -m T, --format=T Set the floating point output format - -q Q, --sort_by=Q Sort groups and attributes by index Q - -z Z, --sort_order=Z Sort groups and attributes by order Z - --enable-error-stack Prints messages from the HDF5 error stack as they - occur. - --no-compact-subset Disable compact form of subsetting and allow the use - of "[" in dataset names. - -w N, --width=N Set the number of columns of output. A value of 0 (zero) - sets the number of columns to the maximum (65535). - Default width is 80 columns. --------------- File Options --------------- -n, --contents Print a list of the file contents and exit Optional value 1 also prints attributes. @@ -47,6 +33,20 @@ usage: h5dump [OPTIONS] files the data value and length is the number of bits of the mask. -R, --region Print dataset pointed by region references +--------------- Formatting Options --------------- + -e, --escape Escape non printing characters + -r, --string Print 1-byte integer datasets as ASCII + -y, --noindex Do not print array indices with the data + -m T, --format=T Set the floating point output format + -q Q, --sort_by=Q Sort groups and attributes by index Q + -z Z, --sort_order=Z Sort groups and attributes by order Z + --enable-error-stack Prints messages from the HDF5 error stack as they + occur. + --no-compact-subset Disable compact form of subsetting and allow the use + of "[" in dataset names. + -w N, --width=N Set the number of columns of output. A value of 0 (zero) + sets the number of columns to the maximum (65535). + Default width is 80 columns. --------------- XML Options --------------- -x, --xml Output in XML using Schema -u, --use-dtd Output in XML using DTD @@ -77,15 +77,7 @@ usage: h5dump [OPTIONS] files the file driver flag, the file will be opened with each driver in turn and in the order specified above until one driver succeeds in opening the file. - These are the letters that are appended to the file name(without .h5) when opening - names for the split(m,r) and multi(s,b,r,g,l,o) drivers. They are: - m: All meta data when using the split driver. - s: The userblock, superblock, and driver info block - b: B-tree nodes - r: Dataset raw data - g: Global heap - l: local heap (object names) - o: object headers + See examples below for family, split, and multi driver special file name usage. F - is a filename. P - is the full path from the root group to the object. @@ -131,4 +123,12 @@ usage: h5dump [OPTIONS] files h5dump -d /foo -f split splitfile + 7) Dataset foo in multi files mf-s.h5, mf-b.h5, mf-r.h5, mf-g.h5, mf-l.h5 and mf-o.h5 + + h5dump -d /foo -f multi mf + + 8) Dataset foo in family files fam00000.h5 fam00001.h5 and fam00002.h5 + + h5dump -d /foo -f family fam-574932464.h5 + h5dump error: missing file name diff --git a/tools/testfiles/tpbitsIncomplete.ddl b/tools/testfiles/tpbitsIncomplete.ddl index c27e0ce..1292049 100644 --- a/tools/testfiles/tpbitsIncomplete.ddl +++ b/tools/testfiles/tpbitsIncomplete.ddl @@ -2,20 +2,6 @@ usage: h5dump [OPTIONS] files OPTIONS -h, --help Print a usage message and exit -V, --version Print version number and exit ---------------- Formatting Options --------------- - -e, --escape Escape non printing characters - -r, --string Print 1-byte integer datasets as ASCII - -y, --noindex Do not print array indices with the data - -m T, --format=T Set the floating point output format - -q Q, --sort_by=Q Sort groups and attributes by index Q - -z Z, --sort_order=Z Sort groups and attributes by order Z - --enable-error-stack Prints messages from the HDF5 error stack as they - occur. - --no-compact-subset Disable compact form of subsetting and allow the use - of "[" in dataset names. - -w N, --width=N Set the number of columns of output. A value of 0 (zero) - sets the number of columns to the maximum (65535). - Default width is 80 columns. --------------- File Options --------------- -n, --contents Print a list of the file contents and exit Optional value 1 also prints attributes. @@ -47,6 +33,20 @@ usage: h5dump [OPTIONS] files the data value and length is the number of bits of the mask. -R, --region Print dataset pointed by region references +--------------- Formatting Options --------------- + -e, --escape Escape non printing characters + -r, --string Print 1-byte integer datasets as ASCII + -y, --noindex Do not print array indices with the data + -m T, --format=T Set the floating point output format + -q Q, --sort_by=Q Sort groups and attributes by index Q + -z Z, --sort_order=Z Sort groups and attributes by order Z + --enable-error-stack Prints messages from the HDF5 error stack as they + occur. + --no-compact-subset Disable compact form of subsetting and allow the use + of "[" in dataset names. + -w N, --width=N Set the number of columns of output. A value of 0 (zero) + sets the number of columns to the maximum (65535). + Default width is 80 columns. --------------- XML Options --------------- -x, --xml Output in XML using Schema -u, --use-dtd Output in XML using DTD @@ -77,15 +77,7 @@ usage: h5dump [OPTIONS] files the file driver flag, the file will be opened with each driver in turn and in the order specified above until one driver succeeds in opening the file. - These are the letters that are appended to the file name(without .h5) when opening - names for the split(m,r) and multi(s,b,r,g,l,o) drivers. They are: - m: All meta data when using the split driver. - s: The userblock, superblock, and driver info block - b: B-tree nodes - r: Dataset raw data - g: Global heap - l: local heap (object names) - o: object headers + See examples below for family, split, and multi driver special file name usage. F - is a filename. P - is the full path from the root group to the object. @@ -131,4 +123,12 @@ usage: h5dump [OPTIONS] files h5dump -d /foo -f split splitfile + 7) Dataset foo in multi files mf-s.h5, mf-b.h5, mf-r.h5, mf-g.h5, mf-l.h5 and mf-o.h5 + + h5dump -d /foo -f multi mf + + 8) Dataset foo in family files fam00000.h5 fam00001.h5 and fam00002.h5 + + h5dump -d /foo -f family fam-574932464.h5 + h5dump error: Bad mask list(0,2,2,1,0,2,2,) diff --git a/tools/testfiles/tpbitsLengthExceeded.ddl b/tools/testfiles/tpbitsLengthExceeded.ddl index 58c0e05..12f2f2a 100644 --- a/tools/testfiles/tpbitsLengthExceeded.ddl +++ b/tools/testfiles/tpbitsLengthExceeded.ddl @@ -2,20 +2,6 @@ usage: h5dump [OPTIONS] files OPTIONS -h, --help Print a usage message and exit -V, --version Print version number and exit ---------------- Formatting Options --------------- - -e, --escape Escape non printing characters - -r, --string Print 1-byte integer datasets as ASCII - -y, --noindex Do not print array indices with the data - -m T, --format=T Set the floating point output format - -q Q, --sort_by=Q Sort groups and attributes by index Q - -z Z, --sort_order=Z Sort groups and attributes by order Z - --enable-error-stack Prints messages from the HDF5 error stack as they - occur. - --no-compact-subset Disable compact form of subsetting and allow the use - of "[" in dataset names. - -w N, --width=N Set the number of columns of output. A value of 0 (zero) - sets the number of columns to the maximum (65535). - Default width is 80 columns. --------------- File Options --------------- -n, --contents Print a list of the file contents and exit Optional value 1 also prints attributes. @@ -47,6 +33,20 @@ usage: h5dump [OPTIONS] files the data value and length is the number of bits of the mask. -R, --region Print dataset pointed by region references +--------------- Formatting Options --------------- + -e, --escape Escape non printing characters + -r, --string Print 1-byte integer datasets as ASCII + -y, --noindex Do not print array indices with the data + -m T, --format=T Set the floating point output format + -q Q, --sort_by=Q Sort groups and attributes by index Q + -z Z, --sort_order=Z Sort groups and attributes by order Z + --enable-error-stack Prints messages from the HDF5 error stack as they + occur. + --no-compact-subset Disable compact form of subsetting and allow the use + of "[" in dataset names. + -w N, --width=N Set the number of columns of output. A value of 0 (zero) + sets the number of columns to the maximum (65535). + Default width is 80 columns. --------------- XML Options --------------- -x, --xml Output in XML using Schema -u, --use-dtd Output in XML using DTD @@ -77,15 +77,7 @@ usage: h5dump [OPTIONS] files the file driver flag, the file will be opened with each driver in turn and in the order specified above until one driver succeeds in opening the file. - These are the letters that are appended to the file name(without .h5) when opening - names for the split(m,r) and multi(s,b,r,g,l,o) drivers. They are: - m: All meta data when using the split driver. - s: The userblock, superblock, and driver info block - b: B-tree nodes - r: Dataset raw data - g: Global heap - l: local heap (object names) - o: object headers + See examples below for family, split, and multi driver special file name usage. F - is a filename. P - is the full path from the root group to the object. @@ -131,4 +123,12 @@ usage: h5dump [OPTIONS] files h5dump -d /foo -f split splitfile + 7) Dataset foo in multi files mf-s.h5, mf-b.h5, mf-r.h5, mf-g.h5, mf-l.h5 and mf-o.h5 + + h5dump -d /foo -f multi mf + + 8) Dataset foo in family files fam00000.h5 fam00001.h5 and fam00002.h5 + + h5dump -d /foo -f family fam-574932464.h5 + h5dump error: Packed Bit offset+length value(65) too large. Max is 64 diff --git a/tools/testfiles/tpbitsLengthPositive.ddl b/tools/testfiles/tpbitsLengthPositive.ddl index 8a93cbc..c98ce67 100644 --- a/tools/testfiles/tpbitsLengthPositive.ddl +++ b/tools/testfiles/tpbitsLengthPositive.ddl @@ -2,20 +2,6 @@ usage: h5dump [OPTIONS] files OPTIONS -h, --help Print a usage message and exit -V, --version Print version number and exit ---------------- Formatting Options --------------- - -e, --escape Escape non printing characters - -r, --string Print 1-byte integer datasets as ASCII - -y, --noindex Do not print array indices with the data - -m T, --format=T Set the floating point output format - -q Q, --sort_by=Q Sort groups and attributes by index Q - -z Z, --sort_order=Z Sort groups and attributes by order Z - --enable-error-stack Prints messages from the HDF5 error stack as they - occur. - --no-compact-subset Disable compact form of subsetting and allow the use - of "[" in dataset names. - -w N, --width=N Set the number of columns of output. A value of 0 (zero) - sets the number of columns to the maximum (65535). - Default width is 80 columns. --------------- File Options --------------- -n, --contents Print a list of the file contents and exit Optional value 1 also prints attributes. @@ -47,6 +33,20 @@ usage: h5dump [OPTIONS] files the data value and length is the number of bits of the mask. -R, --region Print dataset pointed by region references +--------------- Formatting Options --------------- + -e, --escape Escape non printing characters + -r, --string Print 1-byte integer datasets as ASCII + -y, --noindex Do not print array indices with the data + -m T, --format=T Set the floating point output format + -q Q, --sort_by=Q Sort groups and attributes by index Q + -z Z, --sort_order=Z Sort groups and attributes by order Z + --enable-error-stack Prints messages from the HDF5 error stack as they + occur. + --no-compact-subset Disable compact form of subsetting and allow the use + of "[" in dataset names. + -w N, --width=N Set the number of columns of output. A value of 0 (zero) + sets the number of columns to the maximum (65535). + Default width is 80 columns. --------------- XML Options --------------- -x, --xml Output in XML using Schema -u, --use-dtd Output in XML using DTD @@ -77,15 +77,7 @@ usage: h5dump [OPTIONS] files the file driver flag, the file will be opened with each driver in turn and in the order specified above until one driver succeeds in opening the file. - These are the letters that are appended to the file name(without .h5) when opening - names for the split(m,r) and multi(s,b,r,g,l,o) drivers. They are: - m: All meta data when using the split driver. - s: The userblock, superblock, and driver info block - b: B-tree nodes - r: Dataset raw data - g: Global heap - l: local heap (object names) - o: object headers + See examples below for family, split, and multi driver special file name usage. F - is a filename. P - is the full path from the root group to the object. @@ -131,4 +123,12 @@ usage: h5dump [OPTIONS] files h5dump -d /foo -f split splitfile + 7) Dataset foo in multi files mf-s.h5, mf-b.h5, mf-r.h5, mf-g.h5, mf-l.h5 and mf-o.h5 + + h5dump -d /foo -f multi mf + + 8) Dataset foo in family files fam00000.h5 fam00001.h5 and fam00002.h5 + + h5dump -d /foo -f family fam-574932464.h5 + h5dump error: Packed Bit length value(0) must be positive. diff --git a/tools/testfiles/tpbitsMaxExceeded.ddl b/tools/testfiles/tpbitsMaxExceeded.ddl index 21c5af4..46319d1 100644 --- a/tools/testfiles/tpbitsMaxExceeded.ddl +++ b/tools/testfiles/tpbitsMaxExceeded.ddl @@ -2,20 +2,6 @@ usage: h5dump [OPTIONS] files OPTIONS -h, --help Print a usage message and exit -V, --version Print version number and exit ---------------- Formatting Options --------------- - -e, --escape Escape non printing characters - -r, --string Print 1-byte integer datasets as ASCII - -y, --noindex Do not print array indices with the data - -m T, --format=T Set the floating point output format - -q Q, --sort_by=Q Sort groups and attributes by index Q - -z Z, --sort_order=Z Sort groups and attributes by order Z - --enable-error-stack Prints messages from the HDF5 error stack as they - occur. - --no-compact-subset Disable compact form of subsetting and allow the use - of "[" in dataset names. - -w N, --width=N Set the number of columns of output. A value of 0 (zero) - sets the number of columns to the maximum (65535). - Default width is 80 columns. --------------- File Options --------------- -n, --contents Print a list of the file contents and exit Optional value 1 also prints attributes. @@ -47,6 +33,20 @@ usage: h5dump [OPTIONS] files the data value and length is the number of bits of the mask. -R, --region Print dataset pointed by region references +--------------- Formatting Options --------------- + -e, --escape Escape non printing characters + -r, --string Print 1-byte integer datasets as ASCII + -y, --noindex Do not print array indices with the data + -m T, --format=T Set the floating point output format + -q Q, --sort_by=Q Sort groups and attributes by index Q + -z Z, --sort_order=Z Sort groups and attributes by order Z + --enable-error-stack Prints messages from the HDF5 error stack as they + occur. + --no-compact-subset Disable compact form of subsetting and allow the use + of "[" in dataset names. + -w N, --width=N Set the number of columns of output. A value of 0 (zero) + sets the number of columns to the maximum (65535). + Default width is 80 columns. --------------- XML Options --------------- -x, --xml Output in XML using Schema -u, --use-dtd Output in XML using DTD @@ -77,15 +77,7 @@ usage: h5dump [OPTIONS] files the file driver flag, the file will be opened with each driver in turn and in the order specified above until one driver succeeds in opening the file. - These are the letters that are appended to the file name(without .h5) when opening - names for the split(m,r) and multi(s,b,r,g,l,o) drivers. They are: - m: All meta data when using the split driver. - s: The userblock, superblock, and driver info block - b: B-tree nodes - r: Dataset raw data - g: Global heap - l: local heap (object names) - o: object headers + See examples below for family, split, and multi driver special file name usage. F - is a filename. P - is the full path from the root group to the object. @@ -131,4 +123,12 @@ usage: h5dump [OPTIONS] files h5dump -d /foo -f split splitfile + 7) Dataset foo in multi files mf-s.h5, mf-b.h5, mf-r.h5, mf-g.h5, mf-l.h5 and mf-o.h5 + + h5dump -d /foo -f multi mf + + 8) Dataset foo in family files fam00000.h5 fam00001.h5 and fam00002.h5 + + h5dump -d /foo -f family fam-574932464.h5 + h5dump error: Too many masks requested (max. 8). Mask list(0,1,0,1,1,1,2,1,3,1,4,1,5,1,6,1,7,1) diff --git a/tools/testfiles/tpbitsOffsetExceeded.ddl b/tools/testfiles/tpbitsOffsetExceeded.ddl index 52d901d..8f240c5 100644 --- a/tools/testfiles/tpbitsOffsetExceeded.ddl +++ b/tools/testfiles/tpbitsOffsetExceeded.ddl @@ -2,20 +2,6 @@ usage: h5dump [OPTIONS] files OPTIONS -h, --help Print a usage message and exit -V, --version Print version number and exit ---------------- Formatting Options --------------- - -e, --escape Escape non printing characters - -r, --string Print 1-byte integer datasets as ASCII - -y, --noindex Do not print array indices with the data - -m T, --format=T Set the floating point output format - -q Q, --sort_by=Q Sort groups and attributes by index Q - -z Z, --sort_order=Z Sort groups and attributes by order Z - --enable-error-stack Prints messages from the HDF5 error stack as they - occur. - --no-compact-subset Disable compact form of subsetting and allow the use - of "[" in dataset names. - -w N, --width=N Set the number of columns of output. A value of 0 (zero) - sets the number of columns to the maximum (65535). - Default width is 80 columns. --------------- File Options --------------- -n, --contents Print a list of the file contents and exit Optional value 1 also prints attributes. @@ -47,6 +33,20 @@ usage: h5dump [OPTIONS] files the data value and length is the number of bits of the mask. -R, --region Print dataset pointed by region references +--------------- Formatting Options --------------- + -e, --escape Escape non printing characters + -r, --string Print 1-byte integer datasets as ASCII + -y, --noindex Do not print array indices with the data + -m T, --format=T Set the floating point output format + -q Q, --sort_by=Q Sort groups and attributes by index Q + -z Z, --sort_order=Z Sort groups and attributes by order Z + --enable-error-stack Prints messages from the HDF5 error stack as they + occur. + --no-compact-subset Disable compact form of subsetting and allow the use + of "[" in dataset names. + -w N, --width=N Set the number of columns of output. A value of 0 (zero) + sets the number of columns to the maximum (65535). + Default width is 80 columns. --------------- XML Options --------------- -x, --xml Output in XML using Schema -u, --use-dtd Output in XML using DTD @@ -77,15 +77,7 @@ usage: h5dump [OPTIONS] files the file driver flag, the file will be opened with each driver in turn and in the order specified above until one driver succeeds in opening the file. - These are the letters that are appended to the file name(without .h5) when opening - names for the split(m,r) and multi(s,b,r,g,l,o) drivers. They are: - m: All meta data when using the split driver. - s: The userblock, superblock, and driver info block - b: B-tree nodes - r: Dataset raw data - g: Global heap - l: local heap (object names) - o: object headers + See examples below for family, split, and multi driver special file name usage. F - is a filename. P - is the full path from the root group to the object. @@ -131,4 +123,12 @@ usage: h5dump [OPTIONS] files h5dump -d /foo -f split splitfile + 7) Dataset foo in multi files mf-s.h5, mf-b.h5, mf-r.h5, mf-g.h5, mf-l.h5 and mf-o.h5 + + h5dump -d /foo -f multi mf + + 8) Dataset foo in family files fam00000.h5 fam00001.h5 and fam00002.h5 + + h5dump -d /foo -f family fam-574932464.h5 + h5dump error: Packed Bit offset value(64) must be between 0 and 63 diff --git a/tools/testfiles/tpbitsOffsetNegative.ddl b/tools/testfiles/tpbitsOffsetNegative.ddl index 82b6c88..593d980 100644 --- a/tools/testfiles/tpbitsOffsetNegative.ddl +++ b/tools/testfiles/tpbitsOffsetNegative.ddl @@ -2,20 +2,6 @@ usage: h5dump [OPTIONS] files OPTIONS -h, --help Print a usage message and exit -V, --version Print version number and exit ---------------- Formatting Options --------------- - -e, --escape Escape non printing characters - -r, --string Print 1-byte integer datasets as ASCII - -y, --noindex Do not print array indices with the data - -m T, --format=T Set the floating point output format - -q Q, --sort_by=Q Sort groups and attributes by index Q - -z Z, --sort_order=Z Sort groups and attributes by order Z - --enable-error-stack Prints messages from the HDF5 error stack as they - occur. - --no-compact-subset Disable compact form of subsetting and allow the use - of "[" in dataset names. - -w N, --width=N Set the number of columns of output. A value of 0 (zero) - sets the number of columns to the maximum (65535). - Default width is 80 columns. --------------- File Options --------------- -n, --contents Print a list of the file contents and exit Optional value 1 also prints attributes. @@ -47,6 +33,20 @@ usage: h5dump [OPTIONS] files the data value and length is the number of bits of the mask. -R, --region Print dataset pointed by region references +--------------- Formatting Options --------------- + -e, --escape Escape non printing characters + -r, --string Print 1-byte integer datasets as ASCII + -y, --noindex Do not print array indices with the data + -m T, --format=T Set the floating point output format + -q Q, --sort_by=Q Sort groups and attributes by index Q + -z Z, --sort_order=Z Sort groups and attributes by order Z + --enable-error-stack Prints messages from the HDF5 error stack as they + occur. + --no-compact-subset Disable compact form of subsetting and allow the use + of "[" in dataset names. + -w N, --width=N Set the number of columns of output. A value of 0 (zero) + sets the number of columns to the maximum (65535). + Default width is 80 columns. --------------- XML Options --------------- -x, --xml Output in XML using Schema -u, --use-dtd Output in XML using DTD @@ -77,15 +77,7 @@ usage: h5dump [OPTIONS] files the file driver flag, the file will be opened with each driver in turn and in the order specified above until one driver succeeds in opening the file. - These are the letters that are appended to the file name(without .h5) when opening - names for the split(m,r) and multi(s,b,r,g,l,o) drivers. They are: - m: All meta data when using the split driver. - s: The userblock, superblock, and driver info block - b: B-tree nodes - r: Dataset raw data - g: Global heap - l: local heap (object names) - o: object headers + See examples below for family, split, and multi driver special file name usage. F - is a filename. P - is the full path from the root group to the object. @@ -131,4 +123,12 @@ usage: h5dump [OPTIONS] files h5dump -d /foo -f split splitfile + 7) Dataset foo in multi files mf-s.h5, mf-b.h5, mf-r.h5, mf-g.h5, mf-l.h5 and mf-o.h5 + + h5dump -d /foo -f multi mf + + 8) Dataset foo in family files fam00000.h5 fam00001.h5 and fam00002.h5 + + h5dump -d /foo -f family fam-574932464.h5 + h5dump error: Bad mask list(-1,1) -- cgit v0.12 From a3204d77e7e8f7b15b01a424ac1789e1f29ad210 Mon Sep 17 00:00:00 2001 From: Allen Byrne Date: Mon, 12 Aug 2013 15:53:54 -0500 Subject: [svn-r23994] Correct printf % handling --- tools/h5dump/h5dump.c | 2 +- tools/testfiles/h5dump-help.txt | 2 +- tools/testfiles/tnofilename-with-packed-bits.ddl | 2 +- tools/testfiles/tpbitsIncomplete.ddl | 2 +- tools/testfiles/tpbitsLengthExceeded.ddl | 2 +- tools/testfiles/tpbitsLengthPositive.ddl | 2 +- tools/testfiles/tpbitsMaxExceeded.ddl | 2 +- tools/testfiles/tpbitsOffsetExceeded.ddl | 2 +- tools/testfiles/tpbitsOffsetNegative.ddl | 2 +- 9 files changed, 9 insertions(+), 9 deletions(-) diff --git a/tools/h5dump/h5dump.c b/tools/h5dump/h5dump.c index be6ee7f..8a2e503 100644 --- a/tools/h5dump/h5dump.c +++ b/tools/h5dump/h5dump.c @@ -358,7 +358,7 @@ usage(const char *prog) PRINTVALSTREAM(rawoutstream, "\n"); PRINTVALSTREAM(rawoutstream, " 8) Dataset foo in family files fam00000.h5 fam00001.h5 and fam00002.h5\n"); PRINTVALSTREAM(rawoutstream, "\n"); - PRINTVALSTREAM(rawoutstream, " h5dump -d /foo -f family fam%05d.h5\n"); + PRINTVALSTREAM(rawoutstream, " h5dump -d /foo -f family fam%%05d.h5\n"); PRINTVALSTREAM(rawoutstream, "\n"); } diff --git a/tools/testfiles/h5dump-help.txt b/tools/testfiles/h5dump-help.txt index 82b7323..4367cb5 100644 --- a/tools/testfiles/h5dump-help.txt +++ b/tools/testfiles/h5dump-help.txt @@ -129,5 +129,5 @@ usage: h5dump [OPTIONS] files 8) Dataset foo in family files fam00000.h5 fam00001.h5 and fam00002.h5 - h5dump -d /foo -f family fam-574932464.h5 + h5dump -d /foo -f family fam%05d.h5 diff --git a/tools/testfiles/tnofilename-with-packed-bits.ddl b/tools/testfiles/tnofilename-with-packed-bits.ddl index bb0a876..e22cd82 100644 --- a/tools/testfiles/tnofilename-with-packed-bits.ddl +++ b/tools/testfiles/tnofilename-with-packed-bits.ddl @@ -129,6 +129,6 @@ usage: h5dump [OPTIONS] files 8) Dataset foo in family files fam00000.h5 fam00001.h5 and fam00002.h5 - h5dump -d /foo -f family fam-574932464.h5 + h5dump -d /foo -f family fam%05d.h5 h5dump error: missing file name diff --git a/tools/testfiles/tpbitsIncomplete.ddl b/tools/testfiles/tpbitsIncomplete.ddl index 1292049..a7e1d02 100644 --- a/tools/testfiles/tpbitsIncomplete.ddl +++ b/tools/testfiles/tpbitsIncomplete.ddl @@ -129,6 +129,6 @@ usage: h5dump [OPTIONS] files 8) Dataset foo in family files fam00000.h5 fam00001.h5 and fam00002.h5 - h5dump -d /foo -f family fam-574932464.h5 + h5dump -d /foo -f family fam%05d.h5 h5dump error: Bad mask list(0,2,2,1,0,2,2,) diff --git a/tools/testfiles/tpbitsLengthExceeded.ddl b/tools/testfiles/tpbitsLengthExceeded.ddl index 12f2f2a..62ca870 100644 --- a/tools/testfiles/tpbitsLengthExceeded.ddl +++ b/tools/testfiles/tpbitsLengthExceeded.ddl @@ -129,6 +129,6 @@ usage: h5dump [OPTIONS] files 8) Dataset foo in family files fam00000.h5 fam00001.h5 and fam00002.h5 - h5dump -d /foo -f family fam-574932464.h5 + h5dump -d /foo -f family fam%05d.h5 h5dump error: Packed Bit offset+length value(65) too large. Max is 64 diff --git a/tools/testfiles/tpbitsLengthPositive.ddl b/tools/testfiles/tpbitsLengthPositive.ddl index c98ce67..2a69f14 100644 --- a/tools/testfiles/tpbitsLengthPositive.ddl +++ b/tools/testfiles/tpbitsLengthPositive.ddl @@ -129,6 +129,6 @@ usage: h5dump [OPTIONS] files 8) Dataset foo in family files fam00000.h5 fam00001.h5 and fam00002.h5 - h5dump -d /foo -f family fam-574932464.h5 + h5dump -d /foo -f family fam%05d.h5 h5dump error: Packed Bit length value(0) must be positive. diff --git a/tools/testfiles/tpbitsMaxExceeded.ddl b/tools/testfiles/tpbitsMaxExceeded.ddl index 46319d1..aafdd91 100644 --- a/tools/testfiles/tpbitsMaxExceeded.ddl +++ b/tools/testfiles/tpbitsMaxExceeded.ddl @@ -129,6 +129,6 @@ usage: h5dump [OPTIONS] files 8) Dataset foo in family files fam00000.h5 fam00001.h5 and fam00002.h5 - h5dump -d /foo -f family fam-574932464.h5 + h5dump -d /foo -f family fam%05d.h5 h5dump error: Too many masks requested (max. 8). Mask list(0,1,0,1,1,1,2,1,3,1,4,1,5,1,6,1,7,1) diff --git a/tools/testfiles/tpbitsOffsetExceeded.ddl b/tools/testfiles/tpbitsOffsetExceeded.ddl index 8f240c5..960f62b 100644 --- a/tools/testfiles/tpbitsOffsetExceeded.ddl +++ b/tools/testfiles/tpbitsOffsetExceeded.ddl @@ -129,6 +129,6 @@ usage: h5dump [OPTIONS] files 8) Dataset foo in family files fam00000.h5 fam00001.h5 and fam00002.h5 - h5dump -d /foo -f family fam-574932464.h5 + h5dump -d /foo -f family fam%05d.h5 h5dump error: Packed Bit offset value(64) must be between 0 and 63 diff --git a/tools/testfiles/tpbitsOffsetNegative.ddl b/tools/testfiles/tpbitsOffsetNegative.ddl index 593d980..c113866 100644 --- a/tools/testfiles/tpbitsOffsetNegative.ddl +++ b/tools/testfiles/tpbitsOffsetNegative.ddl @@ -129,6 +129,6 @@ usage: h5dump [OPTIONS] files 8) Dataset foo in family files fam00000.h5 fam00001.h5 and fam00002.h5 - h5dump -d /foo -f family fam-574932464.h5 + h5dump -d /foo -f family fam%05d.h5 h5dump error: Bad mask list(-1,1) -- cgit v0.12 From 5d0b400f690631f3ad5ce56070e1fca34ef5042b Mon Sep 17 00:00:00 2001 From: Allen Byrne Date: Mon, 12 Aug 2013 16:58:31 -0500 Subject: [svn-r23996] HDFFV-7989: Add any_path option to search the file for paths. New test added, scripts updated, help text updated. Tested: local linux --- MANIFEST | 2 + release_docs/RELEASE.txt | 6 +- tools/h5dump/CMakeLists.txt | 47 +++++ tools/h5dump/h5dump.c | 17 +- tools/h5dump/h5dump_ddl.c | 208 ++++++++++++++++++++++- tools/h5dump/h5dump_ddl.h | 1 + tools/h5dump/testh5dump.sh.in | 10 ++ tools/testfiles/h5dump-help.txt | 2 + tools/testfiles/tall-7.ddl | 9 + tools/testfiles/tall-7N.ddl | 17 ++ tools/testfiles/tnofilename-with-packed-bits.ddl | 2 + tools/testfiles/tpbitsIncomplete.ddl | 2 + tools/testfiles/tpbitsLengthExceeded.ddl | 2 + tools/testfiles/tpbitsLengthPositive.ddl | 2 + tools/testfiles/tpbitsMaxExceeded.ddl | 2 + tools/testfiles/tpbitsOffsetExceeded.ddl | 2 + tools/testfiles/tpbitsOffsetNegative.ddl | 2 + 17 files changed, 330 insertions(+), 3 deletions(-) create mode 100644 tools/testfiles/tall-7.ddl create mode 100644 tools/testfiles/tall-7N.ddl diff --git a/MANIFEST b/MANIFEST index 2851a62..e07a2f5 100644 --- a/MANIFEST +++ b/MANIFEST @@ -1396,6 +1396,8 @@ ./tools/testfiles/tall-5s.ddl ./tools/testfiles/tall-6.ddl ./tools/testfiles/tall-6.exp +./tools/testfiles/tall-7.ddl +./tools/testfiles/tall-7N.ddl ./tools/testfiles/tall.h5 ./tools/testfiles/tarray1.ddl ./tools/testfiles/tarray1.h5 diff --git a/release_docs/RELEASE.txt b/release_docs/RELEASE.txt index c14dec0..1d84f71 100644 --- a/release_docs/RELEASE.txt +++ b/release_docs/RELEASE.txt @@ -279,7 +279,11 @@ New Features Tools: ------ - - h5dump: Fixed displaying comporession ratio for unknown or user-defined + - h5dump: Added option -N --any_path, which searches the file for paths that + match the search path. HDFFV-7989 (ADB - 2013/08/12). + - h5dump: Added optional arg 0 to -A, which excludes attributes from display. + HDFFV-8134 (ADB - 2013/08/01). + - h5dump: Fixed displaying compression ratio for unknown or user-defined filters. HDFFV-8344 (XCAO 2013/03/19) - h5dump: Changed UNKNOWN_FILTER to USER_DEFINED_FILTER for user defined filter. HDFFV-8346 (XCAO 2013/03/19) diff --git a/tools/h5dump/CMakeLists.txt b/tools/h5dump/CMakeLists.txt index 8d15e2b..2510bfe 100644 --- a/tools/h5dump/CMakeLists.txt +++ b/tools/h5dump/CMakeLists.txt @@ -58,6 +58,8 @@ IF (BUILD_TESTING) ${HDF5_TOOLS_SRC_DIR}/testfiles/tall-4s.ddl ${HDF5_TOOLS_SRC_DIR}/testfiles/tall-5s.ddl ${HDF5_TOOLS_SRC_DIR}/testfiles/tall-6.ddl + ${HDF5_TOOLS_SRC_DIR}/testfiles/tall-7.ddl + ${HDF5_TOOLS_SRC_DIR}/testfiles/tall-7N.ddl ${HDF5_TOOLS_SRC_DIR}/testfiles/tallfilters.ddl ${HDF5_TOOLS_SRC_DIR}/testfiles/tarray1.ddl ${HDF5_TOOLS_SRC_DIR}/testfiles/tarray1_big.ddl @@ -752,6 +754,39 @@ IF (BUILD_TESTING) ENDIF (HDF5_ENABLE_USING_MEMCHECKER) ENDMACRO (ADD_H5_TEST file) + MACRO (ADD_H5_TEST_N resultfile resultcode) + # If using memchecker add tests without using scripts + IF (HDF5_ENABLE_USING_MEMCHECKER) + ADD_TEST (NAME H5DUMP-N-${resultfile} COMMAND $ ${ARGN}) + SET_TESTS_PROPERTIES (H5DUMP-N-${resultfile} PROPERTIES WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles/std") + IF (NOT ${resultcode} STREQUAL "0") + SET_TESTS_PROPERTIES (H5DUMP-N-${resultfile} PROPERTIES WILL_FAIL "true") + ENDIF (NOT ${resultcode} STREQUAL "0") + IF (NOT "${last_test}" STREQUAL "") + SET_TESTS_PROPERTIES (H5DUMP-N-${resultfile} PROPERTIES DEPENDS ${last_test}) + ENDIF (NOT "${last_test}" STREQUAL "") + ELSE (HDF5_ENABLE_USING_MEMCHECKER) + ADD_TEST ( + NAME H5DUMP-N-${resultfile}-clear-objects + COMMAND ${CMAKE_COMMAND} + -E remove ${resultfile}-N.bin ${resultfile}-N.out ${resultfile}-N.out.err + ) + SET_TESTS_PROPERTIES (H5DUMP-N-${resultfile}-clear-objects PROPERTIES WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles/std") + ADD_TEST ( + NAME H5DUMP-N-${resultfile} + COMMAND "${CMAKE_COMMAND}" + -D "TEST_PROGRAM=$" + -D "TEST_ARGS:STRING=${ARGN}" + -D "TEST_FOLDER=${PROJECT_BINARY_DIR}/testfiles/std" + -D "TEST_OUTPUT=${resultfile}-N.out" + -D "TEST_EXPECT=${resultcode}" + -D "TEST_REFERENCE=${resultfile}.ddl" + -P "${HDF5_RESOURCES_DIR}/runTest.cmake" + ) + SET_TESTS_PROPERTIES (H5DUMP-N-${resultfile} PROPERTIES DEPENDS "H5DUMP-N-${resultfile}-clear-objects") + ENDIF (HDF5_ENABLE_USING_MEMCHECKER) + ENDMACRO (ADD_H5_TEST_N file) + MACRO (ADD_H5_TEST_EXPORT resultfile targetfile resultcode) # If using memchecker add tests without using scripts IF (HDF5_ENABLE_USING_MEMCHECKER) @@ -1087,6 +1122,10 @@ IF (BUILD_TESTING) tall-6.txt tall-6.out tall-6.out.err + tall-7.out + tall-7.out.err + tall-7N.out + tall-7N.out.err tallfilters.out tallfilters.out.err tarray1.out @@ -1415,6 +1454,7 @@ IF (BUILD_TESTING) ADD_H5_TEST (tattr-1 0 --enable-error-stack tattr.h5) # test for displaying the selected attributes of string type and scalar space ADD_H5_TEST (tattr-2 0 --enable-error-stack -a /\\\\/attr1 --attribute /attr4 --attribute=/attr5 tattr.h5) + ADD_H5_TEST_N (tattr-2 0 --enable-error-stack -N /\\\\/attr1 --any_object /attr4 --any_object=/attr5 tattr.h5) # test for header and error messages ADD_H5ERR_MASK_TEST (tattr-3 1 --enable-error-stack --header -a /attr2 --attribute=/attr tattr.h5) # test for displaying attributes in shared datatype (also in group and dataset) @@ -1427,6 +1467,7 @@ IF (BUILD_TESTING) ADD_H5_TEST (tudlink-1 0 --enable-error-stack tudlink.h5) # test for displaying the selected link ADD_H5_TEST (tslink-2 0 --enable-error-stack -l slink2 tslink.h5) + ADD_H5_TEST_N (tslink-2 0 --enable-error-stack -N slink2 tslink.h5) ADD_H5_TEST (tudlink-2 0 --enable-error-stack -l udlink2 tudlink.h5) # test for displaying dangling soft links ADD_H5ERR_MASK_TEST (tslink-D 0 --enable-error-stack -d /slink1 tslink.h5) @@ -1436,12 +1477,15 @@ IF (BUILD_TESTING) ADD_H5_TEST (thlink-2 0 --enable-error-stack -d /g1/dset2 --dataset /dset1 --dataset=/g1/g1.1/dset3 thlink.h5) ADD_H5_TEST (thlink-3 0 --enable-error-stack -d /g1/g1.1/dset3 --dataset /g1/dset2 --dataset=/dset1 thlink.h5) ADD_H5_TEST (thlink-4 0 --enable-error-stack -g /g1 thlink.h5) + ADD_H5_TEST_N (thlink-4 0 --enable-error-stack -N /g1 thlink.h5) ADD_H5_TEST (thlink-5 0 --enable-error-stack -d /dset1 -g /g2 -d /g1/dset2 thlink.h5) + ADD_H5_TEST_N (thlink-5 0 --enable-error-stack -N /dset1 -N /g2 -N /g1/dset2 thlink.h5) # tests for compound data types ADD_H5_TEST (tcomp-1 0 --enable-error-stack tcompound.h5) # test for named data types ADD_H5_TEST (tcomp-2 0 --enable-error-stack -t /type1 --datatype /type2 --datatype=/group1/type3 tcompound.h5) + ADD_H5_TEST_N (tcomp-2 0 --enable-error-stack -N /type1 --any_object /type2 --any_object=/group1/type3 tcompound.h5) # test for unamed type ADD_H5ERR_MASK_TEST (tcomp-3 0 "--enable-error-stack;-t;/#6632;-g;/group2;tcompound.h5") # test complicated compound datatype @@ -1455,6 +1499,9 @@ IF (BUILD_TESTING) ADD_H5ERR_MASK_TEST (tall-1 0 --enable-error-stack tall.h5) ADD_H5_TEST (tall-2 0 --enable-error-stack --header -g /g1/g1.1 -a attr2 tall.h5) ADD_H5_TEST (tall-3 0 --enable-error-stack -d /g2/dset2.1 -l /g1/g1.2/g1.2.1/slink tall.h5) + ADD_H5_TEST_N (tall-3 0 --enable-error-stack -N /g2/dset2.1 -N /g1/g1.2/g1.2.1/slink tall.h5) + ADD_H5_TEST (tall-7 0 --enable-error-stack -a attr1 tall.h5) + ADD_H5_TEST (tall-7N 0 --enable-error-stack -N attr1 tall.h5) # test for loop detection ADD_H5_TEST (tloop-1 0 --enable-error-stack tloop.h5) diff --git a/tools/h5dump/h5dump.c b/tools/h5dump/h5dump.c index 8a2e503..618318c 100644 --- a/tools/h5dump/h5dump.c +++ b/tools/h5dump/h5dump.c @@ -71,7 +71,7 @@ struct handler_t { */ /* The following initialization makes use of C language cancatenating */ /* "xxx" "yyy" into "xxxyyy". */ -static const char *s_opts = "hn*peyBHirVa:c:d:f:g:k:l:t:w:xD:uX:o*b*F:s:S:A*q:z:m:RECM:O*"; +static const char *s_opts = "hn*peyBHirVa:c:d:f:g:k:l:t:w:xD:uX:o*b*F:s:S:A*q:z:m:RECM:O*N:"; static struct long_options l_opts[] = { { "help", no_arg, 'h' }, { "hel", no_arg, 'h' }, @@ -188,6 +188,7 @@ static struct long_options l_opts[] = { { "packed-bits", require_arg, 'M' }, { "no-compact-subset", no_arg, 'C' }, { "ddl", optional_arg, 'O' }, + { "any_object", require_arg, 'N' }, { NULL, 0, '\0' } }; @@ -250,6 +251,8 @@ usage(const char *prog) PRINTVALSTREAM(rawoutstream, " -g P, --group=P Print the specified group and all members\n"); PRINTVALSTREAM(rawoutstream, " -l P, --soft-link=P Print the value(s) of the specified soft link\n"); PRINTVALSTREAM(rawoutstream, " -t P, --datatype=P Print the specified named datatype\n"); + PRINTVALSTREAM(rawoutstream, " -N P, --any_path=P Print any attribute, dataset, group, datatype, or link that matches P\n"); + PRINTVALSTREAM(rawoutstream, " P can be the absolute path or just a relative path.\n"); PRINTVALSTREAM(rawoutstream, " -A, --onlyattr Print the header and value of attributes\n"); PRINTVALSTREAM(rawoutstream, " Optional value 0 suppresses printing attributes.\n"); PRINTVALSTREAM(rawoutstream, "--------------- Object Property Options ---------------\n"); @@ -958,6 +961,18 @@ parse_start: } last_was_dset = FALSE; break; + case 'N': + display_all = 0; + + for (i = 0; i < argc; i++) + if (!hand[i].func) { + hand[i].func = handle_paths; + hand[i].obj = HDstrdup(opt_arg); + break; + } + + last_was_dset = FALSE; + break; case 'a': display_all = 0; diff --git a/tools/h5dump/h5dump_ddl.c b/tools/h5dump/h5dump_ddl.c index bb54e3f..157aa15 100644 --- a/tools/h5dump/h5dump_ddl.c +++ b/tools/h5dump/h5dump_ddl.c @@ -24,6 +24,16 @@ #include "h5dump_extern.h" #include "h5dump_ddl.h" +typedef struct { + hid_t fid; /* File ID being traversed */ + char *op_name; /* Object name wanted */ +} trav_handle_udata_t; + +typedef struct { + char *path; /* Path of object being searched */ + char *op_name; /* Object name wanted */ +} trav_attr_udata_t; + /*------------------------------------------------------------------------- * Function: dump_datatype * @@ -1288,6 +1298,203 @@ dump_fcontents(hid_t fid) PRINTSTREAM(rawoutstream, " %s\n",END); } +static herr_t +attr_search(hid_t oid, const char *attr_name, const H5A_info_t UNUSED *ainfo, void *_op_data) +{ + herr_t ret = SUCCEED; + int i; + int j; + int k; + char *obj_attrname; + char *obj_op_name; + char *obj_name; + trav_attr_udata_t *attr_data = (trav_attr_udata_t*)_op_data; + char *buf = attr_data->path; + char *op_name = attr_data->op_name; + + j = (int)HDstrlen(op_name) - 1; + /* find the last / */ + while(j >= 0) { + if (op_name[j] == '/' && (j==0 || (j>0 && op_name[j-1]!='\\'))) + break; + j--; + } + + obj_op_name = h5tools_str_replace(op_name + j + 1, "\\/", "/"); + + if(obj_op_name == NULL) { + h5tools_setstatus(EXIT_FAILURE); + ret = FAIL; + } + else { + if(HDstrcmp(attr_name, obj_op_name)==0) { + /* object name */ + i = (int)HDstrlen(buf); + j = (int)HDstrlen(op_name); + k = (size_t)i + 1 + (size_t)j + 1 + 2; + obj_name = (char *)HDmalloc((size_t)k); + if(obj_name == NULL) { + h5tools_setstatus(EXIT_FAILURE); + ret = FAIL; + } + else { + HDmemset(obj_name, '\0', (size_t)k); + if(op_name[0] != '/') { + HDstrncat(obj_name, buf, (size_t)i + 1); + if(buf[i-1] != '/') + HDstrncat(obj_name, "/", 2); + } + HDstrncat(obj_name, op_name, (size_t)j + 1); + + handle_attributes(oid, obj_name, NULL, 0, NULL); + HDfree(obj_name); + } + } + HDfree(obj_op_name); + } + return ret; +} /* end attr_search() */ + +static herr_t +obj_search(const char *path, const H5O_info_t *oi, const char *already_visited, void *_op_data) +{ + trav_handle_udata_t *handle_data = (trav_handle_udata_t*)_op_data; + char *op_name = (char*)handle_data->op_name; + + trav_attr_udata_t attr_data; + attr_data.path = (char*)path; + attr_data.op_name = op_name; + H5Aiterate_by_name(handle_data->fid, path, H5_INDEX_NAME, H5_ITER_INC, NULL, attr_search, (void*)&attr_data, H5P_DEFAULT); + + if(HDstrcmp(path, op_name)==0) { + switch(oi->type) { + case H5O_TYPE_GROUP: + handle_groups(handle_data->fid, path, NULL, 0, NULL); + break; + case H5O_TYPE_DATASET: + handle_datasets(handle_data->fid, path, NULL, 0, NULL); + break; + case H5O_TYPE_NAMED_DATATYPE: + handle_datatypes(handle_data->fid, path, NULL, 0, NULL); + break; + case H5O_TYPE_UNKNOWN: + case H5O_TYPE_NTYPES: + default: + error_msg("unknown object type value\n"); + h5tools_setstatus(EXIT_FAILURE); + } /* end switch */ + } + + return 0; +} /* end obj_search() */ + +static herr_t +lnk_search(const char *path, const H5L_info_t *li, void *_op_data) +{ + int search_len; + int k; + char *search_name; + trav_handle_udata_t *handle_data = (trav_handle_udata_t*)_op_data; + char *op_name = (char*)handle_data->op_name; + + search_len = HDstrlen(op_name); + if(search_len > 0 && op_name[0] != '/') { + k = 2; + } + else + k = 1; + search_name = (char *)HDmalloc(search_len + k); + if(search_name == NULL) { + error_msg("creating temporary link\n"); + h5tools_setstatus(EXIT_FAILURE); + } + else { + if (k == 2) { + HDstrcpy(search_name, "/"); + HDstrncat(search_name, op_name, (size_t)search_len + 1); + } + else + HDstrncpy(search_name, op_name, (size_t)search_len + 1); + search_name[search_len + k] = '\0'; + + if(HDstrcmp(path, search_name) == 0) { + switch(li->type) { + case H5L_TYPE_SOFT: + case H5L_TYPE_EXTERNAL: + handle_links(handle_data->fid, op_name, NULL, 0, NULL); + break; + + case H5L_TYPE_HARD: + case H5L_TYPE_MAX: + case H5L_TYPE_ERROR: + default: + error_msg("unknown link type value\n"); + h5tools_setstatus(EXIT_FAILURE); + break; + } /* end switch() */ + } + HDfree(search_name); + } + return 0; +} /* end lnk_search() */ + +/*------------------------------------------------------------------------- + * Function: handle_paths + * + * Purpose: Handle objects from the command. + * + * Return: void + * + *------------------------------------------------------------------------- + */ +void +handle_paths(hid_t fid, const char *path_name, void* data, int pe, const char *display_name) +{ + hid_t obj_id = -1; + hid_t gid = -1; + H5O_info_t oinfo; + + if((gid = H5Gopen2(fid, "/", H5P_DEFAULT)) < 0) { + error_msg("unable to open root group\n"); + h5tools_setstatus(EXIT_FAILURE); + } + else { + hid_t gcpl_id; + unsigned crt_order_flags; + unsigned attr_crt_order_flags; + + if ((gcpl_id = H5Gget_create_plist(gid)) < 0) { + error_msg("error in getting group creation property list ID\n"); + h5tools_setstatus(EXIT_FAILURE); + } + + /* query the group creation properties for attributes */ + if (H5Pget_attr_creation_order(gcpl_id, &attr_crt_order_flags) < 0) { + error_msg("error in getting group creation properties\n"); + h5tools_setstatus(EXIT_FAILURE); + } + + /* query the group creation properties */ + if(H5Pget_link_creation_order(gcpl_id, &crt_order_flags) < 0) { + error_msg("error in getting group creation properties\n"); + h5tools_setstatus(EXIT_FAILURE); + } + + if(H5Pclose(gcpl_id) < 0) { + error_msg("error in closing group creation property list ID\n"); + h5tools_setstatus(EXIT_FAILURE); + } + trav_handle_udata_t handle_udata; /* User data for traversal */ + + handle_udata.fid = fid; + handle_udata.op_name = (char*)path_name; + if(h5trav_visit(fid, "/", TRUE, TRUE, obj_search, lnk_search, &handle_udata) < 0) { + error_msg("error traversing information\n"); + h5tools_setstatus(EXIT_FAILURE); + } + } +} + /*------------------------------------------------------------------------- * Function: handle_attributes * @@ -1363,7 +1570,6 @@ handle_attributes(hid_t fid, const char *attr, void UNUSED * data, int UNUSED pe attr_name = h5tools_str_replace(attr + j + 1, "\\/", "/"); - /* handle error case: cannot open the object with the attribute */ if((oid = H5Oopen(fid, obj_name, H5P_DEFAULT)) < 0) { /* setup */ diff --git a/tools/h5dump/h5dump_ddl.h b/tools/h5dump/h5dump_ddl.h index c769194..4511f7b 100644 --- a/tools/h5dump/h5dump_ddl.h +++ b/tools/h5dump/h5dump_ddl.h @@ -37,6 +37,7 @@ void dump_fcontents(hid_t fid); /* callback function used by H5Aiterate2() */ herr_t dump_attr_cb(hid_t loc_id, const char *attr_name, const H5A_info_t *info, void *_op_data); +void handle_paths(hid_t fid, const char *path_name, void *data, int pe, const char *display_name); void handle_datasets(hid_t fid, const char *dset, void *data, int pe, const char *display_name); void handle_attributes(hid_t fid, const char *attr, void UNUSED * data, int UNUSED pe, const char UNUSED *display_name); void handle_groups(hid_t fid, const char *group, void UNUSED *data, int pe, const char *display_name); diff --git a/tools/h5dump/testh5dump.sh.in b/tools/h5dump/testh5dump.sh.in index 0e3cfda..fc79d28 100644 --- a/tools/h5dump/testh5dump.sh.in +++ b/tools/h5dump/testh5dump.sh.in @@ -182,6 +182,8 @@ $SRC_H5DUMP_TESTFILES/tall-4s.ddl $SRC_H5DUMP_TESTFILES/tall-5s.ddl $SRC_H5DUMP_TESTFILES/tall-6.ddl $SRC_H5DUMP_TESTFILES/tall-6.exp +$SRC_H5DUMP_TESTFILES/tall-7.ddl +$SRC_H5DUMP_TESTFILES/tall-7N.ddl $SRC_H5DUMP_TESTFILES/tallfilters.ddl $SRC_H5DUMP_TESTFILES/tarray1.ddl $SRC_H5DUMP_TESTFILES/tarray1_big.ddl @@ -912,6 +914,7 @@ TOOLTEST4 tdset-2.ddl --enable-error-stack -H -d dset1 -d /dset2 --dataset=dset3 TOOLTEST tattr-1.ddl --enable-error-stack tattr.h5 # test for displaying the selected attributes of string type and scalar space TOOLTEST tattr-2.ddl --enable-error-stack -a "/\/attr1" --attribute /attr4 --attribute=/attr5 tattr.h5 +TOOLTEST tattr-2.ddl --enable-error-stack -N "/\/attr1" --any_object /attr4 --any_object=/attr5 tattr.h5 # test for header and error messages TOOLTEST4 tattr-3.ddl --enable-error-stack --header -a /attr2 --attribute=/attr tattr.h5 # test for displaying at least 9 attributes on root from a BE machine @@ -924,6 +927,7 @@ TOOLTEST tslink-1.ddl --enable-error-stack tslink.h5 TOOLTEST tudlink-1.ddl --enable-error-stack tudlink.h5 # test for displaying the selected link TOOLTEST tslink-2.ddl --enable-error-stack -l slink2 tslink.h5 +TOOLTEST tslink-2.ddl --enable-error-stack -N slink2 tslink.h5 TOOLTEST tudlink-2.ddl --enable-error-stack -l udlink2 tudlink.h5 # test for displaying dangling soft links TOOLTEST4 tslink-D.ddl --enable-error-stack -d /slink1 tslink.h5 @@ -933,12 +937,15 @@ TOOLTEST thlink-1.ddl --enable-error-stack thlink.h5 TOOLTEST thlink-2.ddl --enable-error-stack -d /g1/dset2 --dataset /dset1 --dataset=/g1/g1.1/dset3 thlink.h5 TOOLTEST thlink-3.ddl --enable-error-stack -d /g1/g1.1/dset3 --dataset /g1/dset2 --dataset=/dset1 thlink.h5 TOOLTEST thlink-4.ddl --enable-error-stack -g /g1 thlink.h5 +TOOLTEST thlink-4.ddl --enable-error-stack -N /g1 thlink.h5 TOOLTEST thlink-5.ddl --enable-error-stack -d /dset1 -g /g2 -d /g1/dset2 thlink.h5 +TOOLTEST thlink-5.ddl --enable-error-stack -N /dset1 -N /g2 -N /g1/dset2 thlink.h5 # tests for compound data types TOOLTEST tcomp-1.ddl --enable-error-stack tcompound.h5 # test for named data types TOOLTEST tcomp-2.ddl --enable-error-stack -t /type1 --datatype /type2 --datatype=/group1/type3 tcompound.h5 +TOOLTEST tcomp-2.ddl --enable-error-stack -N /type1 --any_object /type2 --any_object=/group1/type3 tcompound.h5 # test for unamed type TOOLTEST4 tcomp-3.ddl --enable-error-stack -t /#6632 -g /group2 tcompound.h5 # test complicated compound datatype @@ -952,6 +959,9 @@ TOOLTEST tnestedcmpddt.ddl --enable-error-stack tnestedcmpddt.h5 TOOLTEST4 tall-1.ddl --enable-error-stack tall.h5 TOOLTEST tall-2.ddl --enable-error-stack --header -g /g1/g1.1 -a attr2 tall.h5 TOOLTEST tall-3.ddl --enable-error-stack -d /g2/dset2.1 -l /g1/g1.2/g1.2.1/slink tall.h5 +TOOLTEST tall-3.ddl --enable-error-stack -N /g2/dset2.1 -N /g1/g1.2/g1.2.1/slink tall.h5 +TOOLTEST tall-7.ddl --enable-error-stack -a attr1 tall.h5 +TOOLTEST tall-7N.ddl --enable-error-stack -N attr1 tall.h5 # test for loop detection TOOLTEST tloop-1.ddl --enable-error-stack tloop.h5 diff --git a/tools/testfiles/h5dump-help.txt b/tools/testfiles/h5dump-help.txt index 4367cb5..2a59a32 100644 --- a/tools/testfiles/h5dump-help.txt +++ b/tools/testfiles/h5dump-help.txt @@ -21,6 +21,8 @@ usage: h5dump [OPTIONS] files -g P, --group=P Print the specified group and all members -l P, --soft-link=P Print the value(s) of the specified soft link -t P, --datatype=P Print the specified named datatype + -N P, --any_path=P Print any attribute, dataset, group, datatype, or link that matches P + P can be the absolute path or just a relative path. -A, --onlyattr Print the header and value of attributes Optional value 0 suppresses printing attributes. --------------- Object Property Options --------------- diff --git a/tools/testfiles/tall-7.ddl b/tools/testfiles/tall-7.ddl new file mode 100644 index 0000000..f0ad5ea --- /dev/null +++ b/tools/testfiles/tall-7.ddl @@ -0,0 +1,9 @@ +HDF5 "tall.h5" { +ATTRIBUTE "attr1" { + DATATYPE H5T_STD_I8BE + DATASPACE SIMPLE { ( 10 ) / ( 10 ) } + DATA { + (0): 97, 98, 99, 100, 101, 102, 103, 104, 105, 0 + } +} +} diff --git a/tools/testfiles/tall-7N.ddl b/tools/testfiles/tall-7N.ddl new file mode 100644 index 0000000..cba5774 --- /dev/null +++ b/tools/testfiles/tall-7N.ddl @@ -0,0 +1,17 @@ +HDF5 "tall.h5" { +ATTRIBUTE "attr1" { + DATATYPE H5T_STD_I8BE + DATASPACE SIMPLE { ( 10 ) / ( 10 ) } + DATA { + (0): 97, 98, 99, 100, 101, 102, 103, 104, 105, 0 + } +} +ATTRIBUTE "attr1" { + DATATYPE H5T_STD_I8BE + DATASPACE SIMPLE { ( 27 ) / ( 27 ) } + DATA { + (0): 49, 115, 116, 32, 97, 116, 116, 114, 105, 98, 117, 116, 101, 32, 111, + (15): 102, 32, 100, 115, 101, 116, 49, 46, 49, 46, 49, 0 + } +} +} diff --git a/tools/testfiles/tnofilename-with-packed-bits.ddl b/tools/testfiles/tnofilename-with-packed-bits.ddl index e22cd82..1ad1249 100644 --- a/tools/testfiles/tnofilename-with-packed-bits.ddl +++ b/tools/testfiles/tnofilename-with-packed-bits.ddl @@ -21,6 +21,8 @@ usage: h5dump [OPTIONS] files -g P, --group=P Print the specified group and all members -l P, --soft-link=P Print the value(s) of the specified soft link -t P, --datatype=P Print the specified named datatype + -N P, --any_path=P Print any attribute, dataset, group, datatype, or link that matches P + P can be the absolute path or just a relative path. -A, --onlyattr Print the header and value of attributes Optional value 0 suppresses printing attributes. --------------- Object Property Options --------------- diff --git a/tools/testfiles/tpbitsIncomplete.ddl b/tools/testfiles/tpbitsIncomplete.ddl index a7e1d02..1468ad1 100644 --- a/tools/testfiles/tpbitsIncomplete.ddl +++ b/tools/testfiles/tpbitsIncomplete.ddl @@ -21,6 +21,8 @@ usage: h5dump [OPTIONS] files -g P, --group=P Print the specified group and all members -l P, --soft-link=P Print the value(s) of the specified soft link -t P, --datatype=P Print the specified named datatype + -N P, --any_path=P Print any attribute, dataset, group, datatype, or link that matches P + P can be the absolute path or just a relative path. -A, --onlyattr Print the header and value of attributes Optional value 0 suppresses printing attributes. --------------- Object Property Options --------------- diff --git a/tools/testfiles/tpbitsLengthExceeded.ddl b/tools/testfiles/tpbitsLengthExceeded.ddl index 62ca870..557f2a7 100644 --- a/tools/testfiles/tpbitsLengthExceeded.ddl +++ b/tools/testfiles/tpbitsLengthExceeded.ddl @@ -21,6 +21,8 @@ usage: h5dump [OPTIONS] files -g P, --group=P Print the specified group and all members -l P, --soft-link=P Print the value(s) of the specified soft link -t P, --datatype=P Print the specified named datatype + -N P, --any_path=P Print any attribute, dataset, group, datatype, or link that matches P + P can be the absolute path or just a relative path. -A, --onlyattr Print the header and value of attributes Optional value 0 suppresses printing attributes. --------------- Object Property Options --------------- diff --git a/tools/testfiles/tpbitsLengthPositive.ddl b/tools/testfiles/tpbitsLengthPositive.ddl index 2a69f14..342e4e8 100644 --- a/tools/testfiles/tpbitsLengthPositive.ddl +++ b/tools/testfiles/tpbitsLengthPositive.ddl @@ -21,6 +21,8 @@ usage: h5dump [OPTIONS] files -g P, --group=P Print the specified group and all members -l P, --soft-link=P Print the value(s) of the specified soft link -t P, --datatype=P Print the specified named datatype + -N P, --any_path=P Print any attribute, dataset, group, datatype, or link that matches P + P can be the absolute path or just a relative path. -A, --onlyattr Print the header and value of attributes Optional value 0 suppresses printing attributes. --------------- Object Property Options --------------- diff --git a/tools/testfiles/tpbitsMaxExceeded.ddl b/tools/testfiles/tpbitsMaxExceeded.ddl index aafdd91..eb569d2 100644 --- a/tools/testfiles/tpbitsMaxExceeded.ddl +++ b/tools/testfiles/tpbitsMaxExceeded.ddl @@ -21,6 +21,8 @@ usage: h5dump [OPTIONS] files -g P, --group=P Print the specified group and all members -l P, --soft-link=P Print the value(s) of the specified soft link -t P, --datatype=P Print the specified named datatype + -N P, --any_path=P Print any attribute, dataset, group, datatype, or link that matches P + P can be the absolute path or just a relative path. -A, --onlyattr Print the header and value of attributes Optional value 0 suppresses printing attributes. --------------- Object Property Options --------------- diff --git a/tools/testfiles/tpbitsOffsetExceeded.ddl b/tools/testfiles/tpbitsOffsetExceeded.ddl index 960f62b..a00b561 100644 --- a/tools/testfiles/tpbitsOffsetExceeded.ddl +++ b/tools/testfiles/tpbitsOffsetExceeded.ddl @@ -21,6 +21,8 @@ usage: h5dump [OPTIONS] files -g P, --group=P Print the specified group and all members -l P, --soft-link=P Print the value(s) of the specified soft link -t P, --datatype=P Print the specified named datatype + -N P, --any_path=P Print any attribute, dataset, group, datatype, or link that matches P + P can be the absolute path or just a relative path. -A, --onlyattr Print the header and value of attributes Optional value 0 suppresses printing attributes. --------------- Object Property Options --------------- diff --git a/tools/testfiles/tpbitsOffsetNegative.ddl b/tools/testfiles/tpbitsOffsetNegative.ddl index c113866..aa6e79b 100644 --- a/tools/testfiles/tpbitsOffsetNegative.ddl +++ b/tools/testfiles/tpbitsOffsetNegative.ddl @@ -21,6 +21,8 @@ usage: h5dump [OPTIONS] files -g P, --group=P Print the specified group and all members -l P, --soft-link=P Print the value(s) of the specified soft link -t P, --datatype=P Print the specified named datatype + -N P, --any_path=P Print any attribute, dataset, group, datatype, or link that matches P + P can be the absolute path or just a relative path. -A, --onlyattr Print the header and value of attributes Optional value 0 suppresses printing attributes. --------------- Object Property Options --------------- -- cgit v0.12 From 4935d0bfab430ba1b374fb600216ec34075442fe Mon Sep 17 00:00:00 2001 From: Allen Byrne Date: Tue, 13 Aug 2013 08:44:24 -0500 Subject: [svn-r23999] Move declaration to top of block - fix for windows. --- tools/h5dump/h5dump_ddl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/h5dump/h5dump_ddl.c b/tools/h5dump/h5dump_ddl.c index 157aa15..d46cb56 100644 --- a/tools/h5dump/h5dump_ddl.c +++ b/tools/h5dump/h5dump_ddl.c @@ -1462,6 +1462,7 @@ handle_paths(hid_t fid, const char *path_name, void* data, int pe, const char *d hid_t gcpl_id; unsigned crt_order_flags; unsigned attr_crt_order_flags; + trav_handle_udata_t handle_udata; /* User data for traversal */ if ((gcpl_id = H5Gget_create_plist(gid)) < 0) { error_msg("error in getting group creation property list ID\n"); @@ -1484,7 +1485,6 @@ handle_paths(hid_t fid, const char *path_name, void* data, int pe, const char *d error_msg("error in closing group creation property list ID\n"); h5tools_setstatus(EXIT_FAILURE); } - trav_handle_udata_t handle_udata; /* User data for traversal */ handle_udata.fid = fid; handle_udata.op_name = (char*)path_name; -- cgit v0.12 From e8d0919d43fe2a8a4d1aa2984d97d6e8d12a4b7d Mon Sep 17 00:00:00 2001 From: Allen Byrne Date: Tue, 13 Aug 2013 12:48:57 -0500 Subject: [svn-r24002] Fix 32-bit and valgrind issues with new handle_paths code - correct math of adding a NULL to a string. Tested: local linux (valgrind) and h5committest --- tools/h5dump/h5dump_ddl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/h5dump/h5dump_ddl.c b/tools/h5dump/h5dump_ddl.c index d46cb56..765cee4 100644 --- a/tools/h5dump/h5dump_ddl.c +++ b/tools/h5dump/h5dump_ddl.c @@ -1415,7 +1415,7 @@ lnk_search(const char *path, const H5L_info_t *li, void *_op_data) } else HDstrncpy(search_name, op_name, (size_t)search_len + 1); - search_name[search_len + k] = '\0'; + search_name[search_len + k - 1] = '\0'; if(HDstrcmp(path, search_name) == 0) { switch(li->type) { -- cgit v0.12 From 8b2f7c2183f2c60ace5750995befdfb080fc064a Mon Sep 17 00:00:00 2001 From: Allen Byrne Date: Tue, 13 Aug 2013 12:50:56 -0500 Subject: [svn-r24003] Remove check for GetConsoleScreenBuffer in CYGWIN (false positive). Updated CDash site name in cmake script. --- bin/cmakehdf5 | 4 ++-- config/cmake/ConfigureChecks.cmake | 4 +++- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/bin/cmakehdf5 b/bin/cmakehdf5 index 2480497..874df5d 100755 --- a/bin/cmakehdf5 +++ b/bin/cmakehdf5 @@ -76,7 +76,7 @@ set (CTEST_MAX_N 8) set (LOCAL_NO_SUBMIT TRUE) # No CDash submit. set (MODEL "Experimental") set (CDASH_LOCAL TRUE) -set (SITE_BUILDNAME_SUFFIX "SHARED") +set (SITE_BUILDNAME_SUFFIX "cmakehdf5") # -- URL set for internal check, default is to not update set (LOCAL_SKIP_UPDATE TRUE) @@ -225,7 +225,7 @@ EOF # Run ctest -ctest -S $cfgfile -C Release -O ctest.log +ctest -S $cfgfile -C Release -V -O ctest.log exit_code=$? if [ $exit_code = 0 ]; then echo Complete without error diff --git a/config/cmake/ConfigureChecks.cmake b/config/cmake/ConfigureChecks.cmake index cce71c7..d4b23eb 100644 --- a/config/cmake/ConfigureChecks.cmake +++ b/config/cmake/ConfigureChecks.cmake @@ -172,7 +172,9 @@ IF (WINDOWS) IF (NOT MINGW) SET (H5_HAVE_GETHOSTNAME 1) ENDIF (NOT MINGW) - SET (H5_HAVE_GETCONSOLESCREENBUFFERINFO 1) + IF (NOT UNIX AND NOT CYGWIN AND NOT MINGW) + SET (H5_HAVE_GETCONSOLESCREENBUFFERINFO 1) + ENDIF (NOT UNIX AND NOT CYGWIN AND NOT MINGW) SET (H5_HAVE_FUNCTION 1) SET (H5_GETTIMEOFDAY_GIVES_TZ 1) SET (H5_HAVE_TIMEZONE 1) -- cgit v0.12 From 33d5f5d1e8f66b9ed6112744c03d546e95fb3022 Mon Sep 17 00:00:00 2001 From: Allen Byrne Date: Tue, 13 Aug 2013 12:53:23 -0500 Subject: [svn-r24004] HDFFV-8319 and -8321: Cleanup autotools code. Also remove GetConsoleScreenInfo check from cygwin configure. Tested: h5committest --- configure | 91 +++++++++++++++++-------------------------- configure.ac | 27 +++++-------- fortran/src/h5fc.in | 24 ++++++------ release_docs/INSTALL | 4 +- release_docs/INSTALL_parallel | 6 +-- 5 files changed, 63 insertions(+), 89 deletions(-) diff --git a/configure b/configure index c987d69..c552f84 100755 --- a/configure +++ b/configure @@ -5243,14 +5243,6 @@ if test "X$HDF_FORTRAN" = "Xyes"; then ## -------------------------------------------------------------------- - ## General Fortran flags - ## Only add FFLAGS to FCFLAGS if it's set. - if test "x$FFLAGS" != "x" ; then - AM_FCFLAGS="${AM_FCFLAGS} ${FFLAGS}" - FCFLAGS="${FCFLAGS} ${FFLAGS}" - fi - - ## -------------------------------------------------------------------- ## Fortran source extention ## ac_ext=${ac_fc_srcext-f} @@ -26922,7 +26914,7 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ## ---------------------------------------------------------------------- ## How do we figure out the width of a tty in characters? ## -for ac_func in _getvideoconfig gettextinfo GetConsoleScreenBufferInfo +for ac_func in _getvideoconfig gettextinfo do : as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" @@ -26934,6 +26926,23 @@ _ACEOF fi done +case "`uname`" in + CYGWIN*) + ;; + *) + for ac_func in GetConsoleScreenBufferInfo +do : + ac_fn_c_check_func "$LINENO" "GetConsoleScreenBufferInfo" "ac_cv_func_GetConsoleScreenBufferInfo" +if test "x$ac_cv_func_GetConsoleScreenBufferInfo" = xyes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_GETCONSOLESCREENBUFFERINFO 1 +_ACEOF + +fi +done + + ;; +esac for ac_func in _scrsize ioctl do : as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` @@ -28361,44 +28370,30 @@ _ACEOF if ac_fn_fc_try_link "$LINENO"; then : else - as_ac_Lib=`$as_echo "ac_cv_lib_mpi_ - include 'mpif.h' - integer:: ierr - call mpi_file_open( ierr )" | $as_tr_sh` -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for - include 'mpif.h' - integer:: ierr - call mpi_file_open( ierr ) in -lmpi" >&5 -$as_echo_n "checking for - include 'mpif.h' - integer:: ierr - call mpi_file_open( ierr ) in -lmpi... " >&6; } -if eval \${$as_ac_Lib+:} false; then : + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for mpi_file_open in -lmpi" >&5 +$as_echo_n "checking for mpi_file_open in -lmpi... " >&6; } +if ${ac_cv_lib_mpi_mpi_file_open+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lmpi $LIBS" cat > conftest.$ac_ext <<_ACEOF program main - call - include 'mpif.h' - integer:: ierr - call mpi_file_open( ierr ) + call mpi_file_open end _ACEOF if ac_fn_fc_try_link "$LINENO"; then : - eval "$as_ac_Lib=yes" + ac_cv_lib_mpi_mpi_file_open=yes else - eval "$as_ac_Lib=no" + ac_cv_lib_mpi_mpi_file_open=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -eval ac_res=\$$as_ac_Lib - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } -if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then : +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_mpi_mpi_file_open" >&5 +$as_echo "$ac_cv_lib_mpi_mpi_file_open" >&6; } +if test "x$ac_cv_lib_mpi_mpi_file_open" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_LIBMPI 1 _ACEOF @@ -28427,44 +28422,30 @@ _ACEOF if ac_fn_fc_try_link "$LINENO"; then : else - as_ac_Lib=`$as_echo "ac_cv_lib_mpio_ - include 'mpif.h' - integer:: ierr - call mpi_file_open( ierr )" | $as_tr_sh` -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for - include 'mpif.h' - integer:: ierr - call mpi_file_open( ierr ) in -lmpio" >&5 -$as_echo_n "checking for - include 'mpif.h' - integer:: ierr - call mpi_file_open( ierr ) in -lmpio... " >&6; } -if eval \${$as_ac_Lib+:} false; then : + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for mpi_file_open in -lmpio" >&5 +$as_echo_n "checking for mpi_file_open in -lmpio... " >&6; } +if ${ac_cv_lib_mpio_mpi_file_open+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lmpio $LIBS" cat > conftest.$ac_ext <<_ACEOF program main - call - include 'mpif.h' - integer:: ierr - call mpi_file_open( ierr ) + call mpi_file_open end _ACEOF if ac_fn_fc_try_link "$LINENO"; then : - eval "$as_ac_Lib=yes" + ac_cv_lib_mpio_mpi_file_open=yes else - eval "$as_ac_Lib=no" + ac_cv_lib_mpio_mpi_file_open=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -eval ac_res=\$$as_ac_Lib - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } -if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then : +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_mpio_mpi_file_open" >&5 +$as_echo "$ac_cv_lib_mpio_mpi_file_open" >&6; } +if test "x$ac_cv_lib_mpio_mpi_file_open" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_LIBMPIO 1 _ACEOF diff --git a/configure.ac b/configure.ac index 0142353..7cfb3ff 100644 --- a/configure.ac +++ b/configure.ac @@ -433,14 +433,6 @@ if test "X$HDF_FORTRAN" = "Xyes"; then AC_SUBST([OBJECT_NAMELEN_DEFAULT_F]) ## -------------------------------------------------------------------- - ## General Fortran flags - ## Only add FFLAGS to FCFLAGS if it's set. - if test "x$FFLAGS" != "x" ; then - AM_FCFLAGS="${AM_FCFLAGS} ${FFLAGS}" - FCFLAGS="${FCFLAGS} ${FFLAGS}" - fi - - ## -------------------------------------------------------------------- ## Fortran source extention ## AC_FC_SRCEXT([f90]) @@ -2156,7 +2148,14 @@ AC_TRY_COMPILE([ ## ---------------------------------------------------------------------- ## How do we figure out the width of a tty in characters? ## -AC_CHECK_FUNCS([_getvideoconfig gettextinfo GetConsoleScreenBufferInfo]) +AC_CHECK_FUNCS([_getvideoconfig gettextinfo]) +case "`uname`" in + CYGWIN*) + ;; + *) + AC_CHECK_FUNCS([GetConsoleScreenBufferInfo]) + ;; +esac AC_CHECK_FUNCS([_scrsize ioctl]) AC_MSG_CHECKING([for struct videoconfig]) @@ -2716,10 +2715,7 @@ case "X-$enable_parallel" in integer:: ierr call mpi_file_open( ierr ) end],, - [AC_CHECK_LIB([mpi], [ - include 'mpif.h' - integer:: ierr - call mpi_file_open( ierr )],, [PARALLEL=no])]) + [AC_CHECK_LIB([mpi], [mpi_file_open],, [PARALLEL=no])]) ## Then try link a simple MPI-IO program. If fail, try again with ## -lmpio. @@ -2730,10 +2726,7 @@ case "X-$enable_parallel" in integer:: ierr call mpi_file_open( ierr ) end],, - [AC_CHECK_LIB([mpio], [ - include 'mpif.h' - integer:: ierr - call mpi_file_open( ierr )],, [PARALLEL=no])]) + [AC_CHECK_LIB([mpio], [mpi_file_open],, [PARALLEL=no])]) fi ## Change to the C language diff --git a/fortran/src/h5fc.in b/fortran/src/h5fc.in index d052046..1285541 100644 --- a/fortran/src/h5fc.in +++ b/fortran/src/h5fc.in @@ -36,15 +36,15 @@ HL="@HL@" ## ## ## (Advanced usage - know what you're doing - you're on your own here.) ## ## The three variables below can be used to insert paths and flags in ## -## FFLAGS, LDFLAGS, or LIBS in the h5fc compile line: ## -## $FLINKER $FFLAGS $H5BLD_FFLAGS $F9XSUFFIXFLAG $LDFLAGS $LIBS ## +## FCFLAGS, LDFLAGS, or LIBS in the h5fc compile line: ## +## $FLINKER $FCFLAGS $H5BLD_FCFLAGS $F9XSUFFIXFLAG $LDFLAGS $LIBS ## ## $fmodules $link_objs $link_args $shared_link ## ## ## -## These settings can be overriden by setting HDF5_FFLAGS, ## +## These settings can be overriden by setting HDF5_FCFLAGS, ## ## HDF5_LDFLAGS, or HDF5_LIBS in the environment. ## ## ## ############################################################################ -FFLAGSBASE="" +FCFLAGSBASE="" LDFLAGSBASE="" LIBSBASE="" @@ -77,15 +77,15 @@ SHOW="eval" FCBASE="@FC@" FLINKERBASE="@FC@" -# FFLAGS and LDFLAGS are reserved for use by the script user. +# FCFLAGS and LDFLAGS are reserved for use by the script user. # FLAGS brought from the hdf5 build are put in H5BLD_*FLAGS. -# User's FFLAGS come after their H5BLD counterparts. User's LDFLAGS come just +# User's FCFLAGS come after their H5BLD counterparts. User's LDFLAGS come just # before clibpath, user's LIBS come after $link_objs and before the hdf5 # libraries in $link_args, followed by any external library paths and libraries # from AM_LDFLAGS, LDFLAGS, AM_LIBS or LIBS carried in from the hdf5 build. # The order of the flags is intended to give precedence to the user's flags. -H5BLD_FFLAGS="@AM_FCFLAGS@ @FCFLAGS@" +H5BLD_FCFLAGS="@AM_FCFLAGS@ @FCFLAGS@" F9XMODFLAG="@F9XMODFLAG@" F9XSUFFIXFLAG="@F9XSUFFIXFLAG@" H5BLD_LDFLAGS="@AM_LDFLAGS@ @LDFLAGS@" @@ -93,7 +93,7 @@ H5BLD_LIBS="@LIBS@" FC="${HDF5_FC:-$FCBASE}" FLINKER="${HDF5_FLINKER:-$FLINKERBASE}" -FFLAGS="${HDF5_FFLAGS:-$FFLAGSBASE}" +FCFLAGS="${HDF5_FCFLAGS:-$FCFLAGSBASE}" LDFLAGS="${HDF5_LDFLAGS:-$LDFLAGSBASE}" LIBS="${HDF5_LIBS:-$LIBSBASE}" @@ -140,7 +140,7 @@ usage() { echo " in the 'Things You Can Modify to Override...'" section of $prog_name echo " " echo " Variable Current value to be replaced" - echo " HDF5_FFLAGS \"$CFLAGSBASE\"" + echo " HDF5_FCFLAGS \"$CFLAGSBASE\"" echo " HDF5_LDFLAGS \"$LDFLAGSBASE\"" echo " HDF5_LIBS \"$LIBSBASE\"" echo " " @@ -287,7 +287,7 @@ if test "x$do_compile" = "xyes"; then fi - $SHOW $FC $H5BLD_FFLAGS $FFLAGS ${F9XSUFFIXFLAG} ${fmodules} $compile_args + $SHOW $FC $H5BLD_FCFLAGS $FCFLAGS ${F9XSUFFIXFLAG} ${fmodules} $compile_args status=$? if test "$status" != "0"; then @@ -358,12 +358,12 @@ if test "x$do_link" = "xyes"; then # module. It's okay if they're included twice in the compile line. link_args="$link_args $H5BLD_LDFLAGS $H5BLD_LIBS" - # User's FFLAGS come after their H5BLD counterparts. User's LDFLAGS come just + # User's FCFLAGS come after their H5BLD counterparts. User's LDFLAGS come just # before clibpath, user's LIBS come after $link_objs and before the hdf5 # libraries in $link_args, followed by any external library paths and libraries # from AM_LDFLAGS, LDFLAGS, AM_LIBS or LIBS carried in from the hdf5 build. # The order of the flags is intended to give precedence to the user's flags. - $SHOW $FLINKER $FFLAGS $H5BLD_FFLAGS $F9XSUFFIXFLAG $LDFLAGS $fmodules $link_objs $LIBS $link_args $shared_link + $SHOW $FLINKER $FCFLAGS $H5BLD_FCFLAGS $F9XSUFFIXFLAG $LDFLAGS $fmodules $link_objs $LIBS $link_args $shared_link status=$? fi diff --git a/release_docs/INSTALL b/release_docs/INSTALL index c1c7df6..96f4f6e 100644 --- a/release_docs/INSTALL +++ b/release_docs/INSTALL @@ -289,10 +289,10 @@ CONTENTS To configure AIX 64-bit support including the Fortran and C++ APIs, (Note: need to set $AR to 'ar -X 64'.) Serial: - $ CFLAGS=-q64 FFLAGS=-q64 CXXFLAGS=-q64 AR='ar -X 64'\ + $ CFLAGS=-q64 FCFLAGS=-q64 CXXFLAGS=-q64 AR='ar -X 64'\ ./configure --enable-fortran Parallel: (C++ not supported with parallel) - $ CFLAGS=-q64 FFLAGS=-q64 AR='ar -X 64'\ + $ CFLAGS=-q64 FCFLAGS=-q64 AR='ar -X 64'\ ./configure --enable-fortran 4.3.4. Additional compilation flags diff --git a/release_docs/INSTALL_parallel b/release_docs/INSTALL_parallel index 03b3ecf..6f60165 100644 --- a/release_docs/INSTALL_parallel +++ b/release_docs/INSTALL_parallel @@ -86,12 +86,12 @@ Then do the following steps: # Read the Details section about parallel tests. $ make install -We also suggest that you add "-qxlf90=autodealloc" to FFLAGS when building +We also suggest that you add "-qxlf90=autodealloc" to FCFLAGS when building parallel with fortran enabled. This can be done by invoking: - setenv FFLAGS -qxlf90=autodealloc # 32 bit build + setenv FCFLAGS -qxlf90=autodealloc # 32 bit build or - setenv FFLAGS "-q64 -qxlf90=autodealloc" # 64 bit build + setenv FCFLAGS "-q64 -qxlf90=autodealloc" # 64 bit build prior to running configure. Recall that the "-q64" is necessary for 64 bit builds. -- cgit v0.12 From af92c5f1e02e8f2df8dafd257251c1c967b3be34 Mon Sep 17 00:00:00 2001 From: Allen Byrne Date: Tue, 13 Aug 2013 14:01:21 -0500 Subject: [svn-r24005] Remove check for GetConsoleScreenBuffer in CYGWIN (false positive). --- config/cmake/ConfigureChecks.cmake | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/config/cmake/ConfigureChecks.cmake b/config/cmake/ConfigureChecks.cmake index d4b23eb..b467a15 100644 --- a/config/cmake/ConfigureChecks.cmake +++ b/config/cmake/ConfigureChecks.cmake @@ -612,7 +612,9 @@ IF (NOT WINDOWS) CHECK_FUNCTION_EXISTS (_getvideoconfig H5_HAVE__GETVIDEOCONFIG) CHECK_FUNCTION_EXISTS (gettextinfo H5_HAVE_GETTEXTINFO) CHECK_FUNCTION_EXISTS (_scrsize H5_HAVE__SCRSIZE) - CHECK_FUNCTION_EXISTS (GetConsoleScreenBufferInfo H5_HAVE_GETCONSOLESCREENBUFFERINFO) + IF (NOT CYGWIN AND NOT MINGW) + CHECK_FUNCTION_EXISTS (GetConsoleScreenBufferInfo H5_HAVE_GETCONSOLESCREENBUFFERINFO) + ENDIF (NOT CYGWIN AND NOT MINGW) CHECK_SYMBOL_EXISTS (TIOCGWINSZ "sys/ioctl.h" H5_HAVE_TIOCGWINSZ) CHECK_SYMBOL_EXISTS (TIOCGETD "sys/ioctl.h" H5_HAVE_TIOCGETD) ENDIF (NOT WINDOWS) -- cgit v0.12 From b6f7e6e79c7f8121559165195e6ad6b9872dff3f Mon Sep 17 00:00:00 2001 From: Allen Byrne Date: Tue, 13 Aug 2013 15:29:09 -0500 Subject: [svn-r24007] Update configure to support 64-bit cygwin Tested: cygwin --- MANIFEST | 1 + bin/config.guess | 8 ++-- config/x86_64-pc-cygwin | 121 ++++++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 126 insertions(+), 4 deletions(-) create mode 100644 config/x86_64-pc-cygwin diff --git a/MANIFEST b/MANIFEST index e07a2f5..ce1cc5b 100644 --- a/MANIFEST +++ b/MANIFEST @@ -113,6 +113,7 @@ ./config/powerpc-ibm-aix5.x ./config/solaris2.x ./config/sv1-cray +./config/x86_64-pc-cygwin ./config/x86_64-redstorm-linux-gnu ./config/site-specific/BlankForm diff --git a/bin/config.guess b/bin/config.guess index f32079a..03fe473 100755 --- a/bin/config.guess +++ b/bin/config.guess @@ -778,9 +778,9 @@ EOF echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; esac exit ;; - i*:CYGWIN*:*) - echo ${UNAME_MACHINE}-pc-cygwin - exit ;; + i*:CYGWIN*:* | x*:CYGWIN*:*) + echo ${UNAME_MACHINE}-pc-cygwin + exit ;; *:MINGW*:*) echo ${UNAME_MACHINE}-pc-mingw32 exit ;; @@ -815,7 +815,7 @@ EOF i*:UWIN*:*) echo ${UNAME_MACHINE}-pc-uwin exit ;; - amd64:CYGWIN*:*:* | x86_64:CYGWIN*:*:*) + amd64:CYGWIN*:*:*) echo x86_64-unknown-cygwin exit ;; p*:CYGWIN*:*) diff --git a/config/x86_64-pc-cygwin b/config/x86_64-pc-cygwin new file mode 100644 index 0000000..9b1ab74 --- /dev/null +++ b/config/x86_64-pc-cygwin @@ -0,0 +1,121 @@ +# -*- shell-script -*- +# +# 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 files COPYING and Copyright.html. COPYING can be found at the root +# of the source code distribution tree; Copyright.html can be found at the +# root level of an installed copy of the electronic HDF5 document set and +# is linked from the top-level documents page. It can also be found at +# http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have +# access to either file, you may request a copy from help@hdfgroup.org. + + +# This file is part of the HDF5 build script. It is processed shortly +# after configure starts and defines, among other things, flags for +# the various compile modes. +# +# See BlankForm in this directory for details. + +# The default compiler is `gcc'. +if test -z "$CC"; then + CC=gcc + CC_BASENAME=gcc +fi + +# Figure out GNU C compiler flags +. $srcdir/config/gnu-flags + +# Figure out PGI C compiler flags +. $srcdir/config/pgi-flags + +# Figure out Intel C compiler flags +. $srcdir/config/intel-flags + +# The default Fortran 90 compiler +if test "X-" = "X-$FC"; then + case $CC_BASENAME in + gcc*) + FC=gfortran + FCLIBS=-lgcc + FC_BASENAME=gfortran + ;; + pgcc*) + FC=pgf90 + FC_BASENAME=pgf90 + ;; + icc*) + FC=ifort + FC_BASENAME=ifort + ;; + mpicc*) + FC=mpif90 + FC_BASENAME=mpif90 + ;; + esac +else + case $FC in + # The PGI and Intel compilers are automatically detected below + ifc*|ifort*|pgf90*) + ;; + gfortran) + FCLIBS=-lgcc + ;; + g95) + FCLIBS=-lgcc + ;; + *) + # Figure out which compiler we are using: pgf90 or Absoft f95 + RM='rm -f' + tmpfile=/tmp/cmpver.$$ + $FC -V >$tmpfile + if test -s "$tmpfile"; then + if( grep -s 'Absoft' $tmpfile > /dev/null) then + FC_BASENAME=f95 + fi + if( grep -s 'pgf90' $tmpfile > /dev/null) then + FC_BASENAME=pgf90 + fi + fi + $RM $tmpfile + ;; + esac +fi + +# Figure out PGI F90 compiler flags +. $srcdir/config/pgi-fflags + +# Figure out Intel F90 compiler flags +. $srcdir/config/intel-fflags + +case $FC_BASENAME in + # + # Absoft compiler + # + f95) + # Set required flag for compiling C stubs + H5_CFLAGS="$H5_CFLAGS -DH5_ABSOFT" + + F9XSUFFIXFLAG="" +# We force compiler to use upper case for external names +# (just in case since this should be a default EIP) + H5_FCFLAGS="$H5_FCFLAGS -YEXT_NAMES=UCS" + FSEARCH_DIRS="" + DEBUG_FCFLAGS="-g" + PROD_FCFLAGS="-O" + PROFILE_FCFLAGS="-g -pg" + f9x_flags_set=yes + ;; + +esac + +# The default C++ compiler + +# The default compiler is `g++'. +if test -z "$CXX"; then + CXX=g++ + CXX_BASENAME=g++ +fi -- cgit v0.12 From 453f95c192ee8db44299b02abf95698e8bf247ce Mon Sep 17 00:00:00 2001 From: Quincey Koziol Date: Thu, 15 Aug 2013 08:24:28 -0500 Subject: [svn-r24011] Description: Clean up a few warnings Tested on: Mac OSX 10.8.4 (amazon) w/C++ & FORTRAN (too minor to require h5committest) --- hl/test/test_ds.c | 2 +- test/dt_arith.c | 4 ++++ tools/h5diff/h5diffgentest.c | 24 ++++++++++++++++++++++++ tools/h5repack/h5repack_opttable.c | 2 +- tools/lib/h5tools.c | 2 +- tools/misc/h5repart.c | 2 +- 6 files changed, 32 insertions(+), 4 deletions(-) diff --git a/hl/test/test_ds.c b/hl/test/test_ds.c index 1bfa23f..57a2b89 100644 --- a/hl/test/test_ds.c +++ b/hl/test/test_ds.c @@ -3126,7 +3126,7 @@ static int test_simple(void) if(H5DSget_scale_name(dsid, name_out, (size_t)name_len+1) < 0) goto out; - if(HDstrncmp("Latitude set 0",name_out, sizeof(name_out))!=0) + if(HDstrncmp("Latitude set 0",name_out, name_len)!=0) goto out; if(name_out) { HDfree(name_out); diff --git a/test/dt_arith.c b/test/dt_arith.c index 9879887..9f003a6 100644 --- a/test/dt_arith.c +++ b/test/dt_arith.c @@ -3455,6 +3455,8 @@ done: HDexit(MIN((int)fails_all_tests, 254)); else if(run_test==TEST_DENORM || run_test==TEST_SPECIAL) HDexit(0); + HDassert(0 && "Should not reach this point!"); + return 1; #else reset_hdf5(); @@ -3476,6 +3478,8 @@ error: HDexit(MIN(MAX((int)fails_all_tests, 1), 254)); else if(run_test==TEST_DENORM || run_test==TEST_SPECIAL) HDexit(1); + HDassert(0 && "Should not reach this point!"); + return 1; #else reset_hdf5(); if(run_test==TEST_NOOP || run_test==TEST_NORMAL) diff --git a/tools/h5diff/h5diffgentest.c b/tools/h5diff/h5diffgentest.c index 7c69154..b5e0ae6 100644 --- a/tools/h5diff/h5diffgentest.c +++ b/tools/h5diff/h5diffgentest.c @@ -4261,15 +4261,39 @@ test_enums(const char *fname) tid = H5Tenum_create(H5T_NATIVE_INT); enum_val = 0; status = H5Tenum_insert(tid, "YIN", &enum_val); + if (status < 0) + { + fprintf(stderr, "Error: %s> H5Tenum_insert failed.\n", fname); + status = FAIL; + goto out; + } enum_val = 1; status = H5Tenum_insert(tid, "YANG", &enum_val); + if (status < 0) + { + fprintf(stderr, "Error: %s> H5Tenum_insert failed.\n", fname); + status = FAIL; + goto out; + } /*----------------------------------------------------------------------- * Create datasets containing enum data. *---------------------------------------------------------------------*/ status = write_dset(fid, 1, &dims, "dset1", tid, data1); + if (status < 0) + { + fprintf(stderr, "Error: %s> write_dset failed.\n", fname); + status = FAIL; + goto out; + } status = write_dset(fid, 1, &dims, "dset2", tid, data2); + if (status < 0) + { + fprintf(stderr, "Error: %s> write_dset failed.\n", fname); + status = FAIL; + goto out; + } out: /*----------------------------------------------------------------------- diff --git a/tools/h5repack/h5repack_opttable.c b/tools/h5repack/h5repack_opttable.c index 00e4bea..bcddbb9 100644 --- a/tools/h5repack/h5repack_opttable.c +++ b/tools/h5repack/h5repack_opttable.c @@ -388,7 +388,7 @@ pack_info_t* options_get_object( const char *path, pack_opttbl_t *table ) { unsigned int i; - const char tbl_path[MAX_NC_NAME+1]; /* +1 for start with "/" case */ + char tbl_path[MAX_NC_NAME+1]; /* +1 for start with "/" case */ for ( i = 0; i < table->nelems; i++) diff --git a/tools/lib/h5tools.c b/tools/lib/h5tools.c index d229eec..7b43d2e 100644 --- a/tools/lib/h5tools.c +++ b/tools/lib/h5tools.c @@ -75,7 +75,7 @@ static const char *drivernames[]={ /* This enum should match the entries in the above drivers_list since they * are indexes into the drivers_list array. */ -enum { +typedef enum { SEC2_IDX = 0 ,FAMILY_IDX ,SPLIT_IDX diff --git a/tools/misc/h5repart.c b/tools/misc/h5repart.c index d41dfc9..07f6bfd 100644 --- a/tools/misc/h5repart.c +++ b/tools/misc/h5repart.c @@ -301,7 +301,7 @@ main (int argc, char *argv[]) n = blk_size; if (dst_is_family) n = (size_t)MIN((off_t)n, dst_size-dst_offset); if (left_overs) { - n = (size_t)MIN (n, left_overs); + n = (size_t)MIN ((off_t)n, left_overs); left_overs -= n; need_write = FALSE; } else if (src_offset Date: Fri, 16 Aug 2013 14:36:32 -0500 Subject: [svn-r24015] A bug fix when merging changes from the trunk to 1.8 for h5stat bug fix HDFFV-1238: Fix a problem when using opt_arg that is NULL for the new options added: -l N, -m N, -a N. h5committested. --- tools/h5stat/h5stat.c | 39 ++++++++++++++++++++++++--------------- 1 file changed, 24 insertions(+), 15 deletions(-) diff --git a/tools/h5stat/h5stat.c b/tools/h5stat/h5stat.c index 6fc1dc4..a5d7eef 100644 --- a/tools/h5stat/h5stat.c +++ b/tools/h5stat/h5stat.c @@ -915,11 +915,14 @@ parse_command_line(int argc, const char *argv[], struct handler_t **hand_ret) break; case 'l': - sgroups_threshold = HDatoi(opt_arg); - if(sgroups_threshold < 1) { - error_msg("Invalid threshold for small groups\n"); - goto error; - } /* end if */ + if(opt_arg) { + sgroups_threshold = HDatoi(opt_arg); + if(sgroups_threshold < 1) { + error_msg("Invalid threshold for small groups\n"); + goto error; + } + } else + error_msg("Missing threshold for small groups\n"); break; @@ -934,11 +937,14 @@ parse_command_line(int argc, const char *argv[], struct handler_t **hand_ret) break; case 'm': - sdsets_threshold = HDatoi(opt_arg); - if(sdsets_threshold < 1) { - error_msg("Invalid threshold for small datasets\n"); - goto error; - } /* end if */ + if(opt_arg) { + sdsets_threshold = HDatoi(opt_arg); + if(sdsets_threshold < 1) { + error_msg("Invalid threshold for small datasets\n"); + goto error; + } + } else + error_msg("Missing threshold for small datasets\n"); break; @@ -953,11 +959,14 @@ parse_command_line(int argc, const char *argv[], struct handler_t **hand_ret) break; case 'a': - sattrs_threshold = HDatoi(opt_arg); - if(sattrs_threshold < 1) { - error_msg("Invalid threshold for small # of attributes\n"); - goto error; - } /* end if */ + if(opt_arg) { + sattrs_threshold = HDatoi(opt_arg); + if(sattrs_threshold < 1) { + error_msg("Invalid threshold for small # of attributes\n"); + goto error; + } + } else + error_msg("Missing threshold for small # of attributes\n"); break; -- cgit v0.12 From d663d78cd274a48b702a2d3ce17fa6bb01be1ae1 Mon Sep 17 00:00:00 2001 From: Albert Cheng Date: Fri, 16 Aug 2013 18:14:23 -0500 Subject: [svn-r24017] Bug fix: HDFFV-8500 The new gcc v4.8.* compilers does not work well with dt_arith which failed in production mode. Solution: A temporary patch by removing any optimization (-O*) from the PROD_CFLAGS so that dt_arith will pass for now. A more through investigation is needed. Tested: Jam and Koala where it failed and now passes. --- config/gnu-flags | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/config/gnu-flags b/config/gnu-flags index a79cc72..eef38ad 100644 --- a/config/gnu-flags +++ b/config/gnu-flags @@ -156,6 +156,11 @@ case "$cc_vendor-$cc_version" in gcc-3.*) PROD_CFLAGS="-O3" ;; + gcc-4.8.*) + # temp patch: when GCC 4.8.x is used for Linux, dt_arith fails if -O* + # is used. Remove any -O* flags. (AKC HDFFV-8500) + PROD_CFLAGS="`echo $PROD_CFLAGS | sed -e 's/-O[0-3]*//'`" + ;; gcc-4.*) PROD_CFLAGS="-O3" ;; -- cgit v0.12 From 308c378ccd9310b19c12d524d123cf5d352b6260 Mon Sep 17 00:00:00 2001 From: Quincey Koziol Date: Sat, 17 Aug 2013 15:05:27 -0500 Subject: [svn-r24020] Description: Clean up compiler warnings Tested on: Mac OSX/64 10.8.4 (amazon) w/C++ & FORTRAN (too minor to require h5committest) --- fortran/src/H5Of.c | 2 - fortran/src/H5Rf.c | 1 - hl/fortran/src/H5LTf90proto.h | 11 +- hl/src/H5DS.c | 8 +- hl/src/H5LT.c | 1 - hl/src/H5LTprivate.h | 1 + hl/test/test_lite.c | 4 +- perform/sio_engine.c | 20 +- src/H5B2hdr.c | 2 +- src/H5C.c | 4 + test/cache.c | 1108 +++++++++++++++++++++-------------------- test/cache_common.h | 2 +- test/mf.c | 4 +- test/objcopy.c | 18 - test/tarray.c | 11 - test/trefer.c | 2 +- test/ttsafe_error.c | 2 - tools/h5copy/h5copy.c | 16 +- tools/h5diff/h5diffgentest.c | 9 +- tools/h5dump/h5dump_ddl.c | 15 +- tools/h5dump/h5dump_ddl.h | 5 +- tools/h5dump/h5dump_xml.c | 3 +- tools/h5dump/h5dumpgentest.c | 11 +- tools/h5import/h5import.c | 3 - tools/misc/h5mkgrp.c | 28 +- 25 files changed, 626 insertions(+), 665 deletions(-) diff --git a/fortran/src/H5Of.c b/fortran/src/H5Of.c index 8e75989..05eafcf 100644 --- a/fortran/src/H5Of.c +++ b/fortran/src/H5Of.c @@ -320,7 +320,6 @@ nh5oget_info_by_name_c (hid_t_f *loc_id, _fcd name, size_t_f *namelen, hid_t_f * char *c_name = NULL; /* Buffer to hold C string */ int_f ret_value = 0; /* Return value */ H5O_info_t Oinfo; - struct tm *ts; /* * Convert FORTRAN name to C name @@ -599,7 +598,6 @@ nh5oexists_by_name_c (hid_t_f *loc_id, _fcd name, size_t_f *namelen, hid_t_f *la { char *c_name = NULL; /* Buffer to hold C string */ int_f ret_value = 0; /* Return value */ - htri_t status = 0; /* * Convert FORTRAN name to C name diff --git a/fortran/src/H5Rf.c b/fortran/src/H5Rf.c index 0799e11..bca050e 100644 --- a/fortran/src/H5Rf.c +++ b/fortran/src/H5Rf.c @@ -355,7 +355,6 @@ nh5rget_region_ptr_c(hid_t_f *dset_id, void *ref, hid_t_f *space_id) /******/ { hid_t c_space_id; - hdset_reg_ref_t ref_c; int_f ret_value = 0; /* diff --git a/hl/fortran/src/H5LTf90proto.h b/hl/fortran/src/H5LTf90proto.h index 8618fc6..332a7e2 100644 --- a/hl/fortran/src/H5LTf90proto.h +++ b/hl/fortran/src/H5LTf90proto.h @@ -212,10 +212,6 @@ nh5dsattach_scale_c( hid_t_f *did, hid_t_f *dsid, int_f *idx); HDF5_HL_F90CSTUBDLL int_f -nh5dsattach_scale_c( hid_t_f *did, hid_t_f *dsid, int_f *idx); - -HDF5_HL_F90CSTUBDLL -int_f nh5dsdetach_scale_c( hid_t_f *did, hid_t_f *dsid, int_f *idx); HDF5_HL_F90CSTUBDLL @@ -224,16 +220,15 @@ nh5dsis_attached_c( hid_t_f *did, hid_t_f *dsid, int_f *idx, int_f *c_is_attache HDF5_HL_F90CSTUBDLL int_f -nh5dsget_label_c(hid_t_f *did, int_f *idx, _fcd label, size_t_f *size); +nh5dsis_scale_c(hid_t_f *did, int_f *is_scale); HDF5_HL_F90CSTUBDLL int_f -nh5dsis_scale_c(hid_t_f *did, int_f *is_scale); - +nh5dsset_label_c(hid_t_f *did, int_f *idx, _fcd label, int_f *labellen); HDF5_HL_F90CSTUBDLL int_f -nh5dsset_label_c(hid_t_f *did, int_f *idx, _fcd label, int_f *labellen); +nh5dsget_label_c(hid_t_f *did, int_f *idx, _fcd label, size_t_f *size); HDF5_HL_F90CSTUBDLL int_f diff --git a/hl/src/H5DS.c b/hl/src/H5DS.c index cb3a1ce..5f8cd50 100644 --- a/hl/src/H5DS.c +++ b/hl/src/H5DS.c @@ -1872,12 +1872,9 @@ ssize_t H5DSget_scale_name(hid_t did, if (H5Sclose(sid) < 0) goto out; if (buf) - { free(buf); - buf=NULL; - } - return (ssize_t) MAX(0,nbytes-1); + return (ssize_t)(nbytes - 1); /* error zone */ out: @@ -1887,10 +1884,7 @@ out: H5Sclose(sid); } H5E_END_TRY; if (buf) - { free(buf); - buf=NULL; - } return FAIL; } diff --git a/hl/src/H5LT.c b/hl/src/H5LT.c index b2c8949..98f2ff2 100644 --- a/hl/src/H5LT.c +++ b/hl/src/H5LT.c @@ -2161,7 +2161,6 @@ out: */ hid_t H5LTtext_to_dtype(const char *text, H5LT_lang_t lang_type) { - extern int H5LTyyparse(void); hid_t type_id; if(lang_type <= H5LT_LANG_ERR || lang_type >= H5LT_NO_LANG) diff --git a/hl/src/H5LTprivate.h b/hl/src/H5LTprivate.h index 69616b1..0ee6b5c 100644 --- a/hl/src/H5LTprivate.h +++ b/hl/src/H5LTprivate.h @@ -48,5 +48,6 @@ H5_HLDLL herr_t H5LT_find_attribute( hid_t loc_id, const char *name ); H5_HLDLL char* H5LT_dtype_to_text(hid_t dtype, char *dt_str, H5LT_lang_t lang, size_t *slen, hbool_t no_user_buf); +H5_HLDLL int H5LTyyparse(void); #endif diff --git a/hl/test/test_lite.c b/hl/test/test_lite.c index b649462..bcf6663 100644 --- a/hl/test/test_lite.c +++ b/hl/test/test_lite.c @@ -1812,7 +1812,6 @@ out: static int test_valid_path(void) { hid_t file_id, group; - herr_t status; htri_t path_valid; const char *data_string_in = "test"; @@ -1943,7 +1942,8 @@ static int test_valid_path(void) /* * Close the file. */ - status = H5Fclose (file_id); + if(H5Fclose (file_id) < 0) + goto out; /* Create another file for checking external links */ diff --git a/perform/sio_engine.c b/perform/sio_engine.c index 0953507..8539f75 100644 --- a/perform/sio_engine.c +++ b/perform/sio_engine.c @@ -1149,25 +1149,25 @@ done: hid_t set_vfd(parameters *param) { - hid_t fapl = -1; + hid_t my_fapl = -1; vfdtype vfd; vfd = param->vfd; - if ((fapl=H5Pcreate(H5P_FILE_ACCESS))<0) return -1; + if ((my_fapl=H5Pcreate(H5P_FILE_ACCESS))<0) return -1; if (vfd == sec2) { /* Unix read() and write() system calls */ - if (H5Pset_fapl_sec2(fapl)<0) return -1; + if (H5Pset_fapl_sec2(my_fapl)<0) return -1; } else if (vfd == stdio) { /* Standard C fread() and fwrite() system calls */ - if (H5Pset_fapl_stdio(fapl)<0) return -1; + if (H5Pset_fapl_stdio(my_fapl)<0) return -1; } else if (vfd == core) { /* In-core temporary file with 1MB increment */ - if (H5Pset_fapl_core(fapl, (size_t)1024*1024, TRUE)<0) return -1; + if (H5Pset_fapl_core(my_fapl, (size_t)1024*1024, TRUE)<0) return -1; } else if (vfd == split) { /* Split meta data and raw data each using default driver */ - if (H5Pset_fapl_split(fapl, + if (H5Pset_fapl_split(my_fapl, "-m.h5", H5P_DEFAULT, "-r.h5", H5P_DEFAULT)<0) return -1; @@ -1193,7 +1193,7 @@ set_vfd(parameters *param) memb_addr[mt] = MAX(mt-1,0)*(HADDR_MAX/10); } - if (H5Pset_fapl_multi(fapl, memb_map, memb_fapl, memb_name, + if (H5Pset_fapl_multi(my_fapl, memb_map, memb_fapl, memb_name, memb_addr, FALSE)<0) { return -1; } @@ -1203,20 +1203,20 @@ set_vfd(parameters *param) /* Family of files, each 1MB and using the default driver */ /* if ((val=HDstrtok(NULL, " \t\n\r"))) fam_size = (hsize_t)(HDstrtod(val, NULL) * 1024*1024); */ - if (H5Pset_fapl_family(fapl, fam_size, H5P_DEFAULT)<0) + if (H5Pset_fapl_family(my_fapl, fam_size, H5P_DEFAULT)<0) return -1; } else if (vfd == direct) { #ifdef H5_HAVE_DIRECT /* Linux direct read() and write() system calls. Set memory boundary, file block size, * and copy buffer size to the default values. */ - if (H5Pset_fapl_direct(fapl, 1024, 4096, 8*4096)<0) return -1; + if (H5Pset_fapl_direct(my_fapl, 1024, 4096, 8*4096)<0) return -1; #endif } else { /* Unknown driver */ return -1; } - return fapl; + return my_fapl; } /* diff --git a/src/H5B2hdr.c b/src/H5B2hdr.c index 60eff61..2148f1e 100644 --- a/src/H5B2hdr.c +++ b/src/H5B2hdr.c @@ -601,6 +601,6 @@ done: if(H5AC_unprotect(hdr->f, dxpl_id, H5AC_BT2_HDR, hdr->addr, hdr, cache_flags) < 0) HDONE_ERROR(H5E_BTREE, H5E_CANTUNPROTECT, FAIL, "unable to release B-tree header") - FUNC_LEAVE_NOAPI(SUCCEED) + FUNC_LEAVE_NOAPI(ret_value) } /* end H5B2_hdr_delete() */ diff --git a/src/H5C.c b/src/H5C.c index 0946af9..a63f98e 100644 --- a/src/H5C.c +++ b/src/H5C.c @@ -3339,7 +3339,9 @@ H5C_move_entry(H5C_t * cache_ptr, haddr_t old_addr, haddr_t new_addr) { +#if H5C_MAINTAIN_CLEAN_AND_DIRTY_LRU_LISTS hbool_t was_dirty; +#endif /* H5C_MAINTAIN_CLEAN_AND_DIRTY_LRU_LISTS */ H5C_cache_entry_t * entry_ptr = NULL; H5C_cache_entry_t * test_entry_ptr = NULL; #if H5C_DO_SANITY_CHECKS @@ -3436,7 +3438,9 @@ H5C_move_entry(H5C_t * cache_ptr, if ( ! ( entry_ptr->destroy_in_progress ) ) { +#if H5C_MAINTAIN_CLEAN_AND_DIRTY_LRU_LISTS was_dirty = entry_ptr->is_dirty; +#endif /* H5C_MAINTAIN_CLEAN_AND_DIRTY_LRU_LISTS */ if ( ! ( entry_ptr->flush_in_progress ) ) { diff --git a/test/cache.c b/test/cache.c index ba51a38..5ad1314 100644 --- a/test/cache.c +++ b/test/cache.c @@ -994,7 +994,7 @@ smoke_check_5(void) /* hbool_t set_initial_size = */ TRUE, /* size_t initial_size = */ (2 * 1024 * 1024), - /* double min_clean_fraction = */ 0.1, + /* double min_clean_fraction = */ 0.1f, /* size_t max_size = */ (32 * 1024 * 1025), /* size_t min_size = */ (512 * 1024), @@ -1004,24 +1004,24 @@ smoke_check_5(void) /* enum H5C_cache_incr_mode incr_mode = */ H5C_incr__threshold, - /* double lower_hr_threshold = */ 0.75, + /* double lower_hr_threshold = */ 0.75f, - /* double increment = */ 2.0, + /* double increment = */ 2.0f, /* 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__off, - /* double flash_multiple = */ 2.0, - /* double flash_threshold = */ 0.5, + /* double flash_multiple = */ 2.0f, + /* double flash_threshold = */ 0.5f, /* enum H5C_cache_decr_mode decr_mode = */ H5C_decr__threshold, - /* double upper_hr_threshold = */ 0.995, + /* double upper_hr_threshold = */ 0.995f, - /* double decrement = */ 0.9, + /* double decrement = */ 0.9f, /* hbool_t apply_max_decrement = */ TRUE, /* size_t max_decrement = */ (1 * 1024 * 1024), @@ -1029,7 +1029,7 @@ smoke_check_5(void) /* int32_t epochs_before_eviction = */ 3, /* hbool_t apply_empty_reserve = */ TRUE, - /* double empty_reserve = */ 0.5 + /* double empty_reserve = */ 0.5f }; TESTING("smoke check #5 -- all clean, ins, prot, unprot, AR cache 1"); @@ -1230,7 +1230,7 @@ smoke_check_6(void) /* hbool_t set_initial_size = */ TRUE, /* size_t initial_size = */ (2 * 1024 * 1024), - /* double min_clean_fraction = */ 0.1, + /* double min_clean_fraction = */ 0.1f, /* size_t max_size = */ (32 * 1024 * 1025), /* size_t min_size = */ (512 * 1024), @@ -1240,24 +1240,24 @@ smoke_check_6(void) /* enum H5C_cache_incr_mode incr_mode = */ H5C_incr__threshold, - /* double lower_hr_threshold = */ 0.75, + /* double lower_hr_threshold = */ 0.75f, - /* double increment = */ 2.0, + /* double increment = */ 2.0f, /* 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__off, - /* double flash_multiple = */ 2.0, - /* double flash_threshold = */ 0.5, + /* double flash_multiple = */ 2.0f, + /* double flash_threshold = */ 0.5f, /* enum H5C_cache_decr_mode decr_mode = */ H5C_decr__threshold, - /* double upper_hr_threshold = */ 0.995, + /* double upper_hr_threshold = */ 0.995f, - /* double decrement = */ 0.9, + /* double decrement = */ 0.9f, /* hbool_t apply_max_decrement = */ TRUE, /* size_t max_decrement = */ (1 * 1024 * 1024), @@ -1265,7 +1265,7 @@ smoke_check_6(void) /* int32_t epochs_before_eviction = */ 3, /* hbool_t apply_empty_reserve = */ TRUE, - /* double empty_reserve = */ 0.05 + /* double empty_reserve = */ 0.05f }; TESTING("smoke check #6 -- ~1/2 dirty, ins, prot, unprot, AR cache 1"); @@ -1463,7 +1463,7 @@ smoke_check_7(void) /* hbool_t set_initial_size = */ TRUE, /* size_t initial_size = */ (2 * 1024 * 1024), - /* double min_clean_fraction = */ 0.1, + /* double min_clean_fraction = */ 0.1f, /* size_t max_size = */ (32 * 1024 * 1025), /* size_t min_size = */ (512 * 1024), @@ -1473,25 +1473,25 @@ smoke_check_7(void) /* enum H5C_cache_incr_mode incr_mode = */ H5C_incr__threshold, - /* double lower_hr_threshold = */ 0.75, + /* double lower_hr_threshold = */ 0.75f, - /* double increment = */ 2.0, + /* double increment = */ 2.0f, /* hbool_t apply_max_increment = */ TRUE, /* size_t max_increment = */ (8 * 1024 * 1024), /* enum H5C_cache_flash_incr_mode */ /* flash_incr_mode = */ H5C_flash_incr__off, - /* double flash_multiple = */ 2.0, - /* double flash_threshold = */ 0.5, + /* double flash_multiple = */ 2.0f, + /* double flash_threshold = */ 0.5f, /* enum H5C_cache_decr_mode decr_mode = */ H5C_decr__age_out_with_threshold, - /* double upper_hr_threshold = */ 0.995, + /* double upper_hr_threshold = */ 0.995f, - /* double decrement = */ 0.9, + /* double decrement = */ 0.9f, /* hbool_t apply_max_decrement = */ TRUE, /* size_t max_decrement = */ (1 * 1024 * 1024), @@ -1499,7 +1499,7 @@ smoke_check_7(void) /* int32_t epochs_before_eviction = */ 3, /* hbool_t apply_empty_reserve = */ TRUE, - /* double empty_reserve = */ 0.1 + /* double empty_reserve = */ 0.1f }; TESTING("smoke check #7 -- all clean, ins, prot, unprot, AR cache 2"); @@ -1697,7 +1697,7 @@ smoke_check_8(void) /* hbool_t set_initial_size = */ TRUE, /* size_t initial_size = */ (2 * 1024 * 1024), - /* double min_clean_fraction = */ 0.1, + /* double min_clean_fraction = */ 0.1f, /* size_t max_size = */ (32 * 1024 * 1025), /* size_t min_size = */ (512 * 1024), @@ -1707,25 +1707,25 @@ smoke_check_8(void) /* enum H5C_cache_incr_mode incr_mode = */ H5C_incr__threshold, - /* double lower_hr_threshold = */ 0.75, + /* double lower_hr_threshold = */ 0.75f, - /* double increment = */ 2.0, + /* double increment = */ 2.0f, /* 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__off, - /* double flash_multiple = */ 2.0, - /* double flash_threshold = */ 0.5, + /* double flash_multiple = */ 2.0f, + /* double flash_threshold = */ 0.5f, /* enum H5C_cache_decr_mode decr_mode = */ H5C_decr__age_out_with_threshold, - /* double upper_hr_threshold = */ 0.995, + /* double upper_hr_threshold = */ 0.995f, - /* double decrement = */ 0.9, + /* double decrement = */ 0.9f, /* hbool_t apply_max_decrement = */ TRUE, /* size_t max_decrement = */ (1 * 1024 * 1024), @@ -1733,7 +1733,7 @@ smoke_check_8(void) /* int32_t epochs_before_eviction = */ 3, /* hbool_t apply_empty_reserve = */ TRUE, - /* double empty_reserve = */ 0.1 + /* double empty_reserve = */ 0.1f }; TESTING("smoke check #8 -- ~1/2 dirty, ins, prot, unprot, AR cache 2"); @@ -13944,7 +13944,9 @@ check_multiple_read_protect(void) { const char * fcn_name = "check_multiple_read_protect()"; H5F_t * file_ptr = NULL; +#if H5C_COLLECT_CACHE_STATS H5C_t * cache_ptr = NULL; +#endif /* H5C_COLLECT_CACHE_STATS */ test_entry_t * entry_ptr; TESTING("multiple read only protects on a single entry"); @@ -13978,7 +13980,9 @@ check_multiple_read_protect(void) file_ptr = setup_cache((size_t)(2 * 1024), (size_t)(1 * 1024)); +#if H5C_COLLECT_CACHE_STATS cache_ptr = file_ptr->shared->cache; +#endif /* H5C_COLLECT_CACHE_STATS */ entry_ptr = &((entries[0])[0]); @@ -18037,7 +18041,7 @@ check_auto_cache_resize(void) /* hbool_t set_initial_size = */ TRUE, /* size_t initial_size = */ (512 * 1024), - /* double min_clean_fraction = */ 0.5, + /* double min_clean_fraction = */ 0.5f, /* size_t max_size = */ (14 * 1024 * 1024), /* size_t min_size = */ (512 * 1024), @@ -18047,24 +18051,24 @@ check_auto_cache_resize(void) /* enum H5C_cache_incr_mode incr_mode = */ H5C_incr__threshold, - /* double lower_hr_threshold = */ 0.75, + /* double lower_hr_threshold = */ 0.75f, - /* double increment = */ 2.0, + /* double increment = */ 2.0f, /* 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__off, - /* double flash_multiple = */ 2.0, - /* double flash_threshold = */ 0.5, + /* double flash_multiple = */ 2.0f, + /* double flash_threshold = */ 0.5f, /* enum H5C_cache_decr_mode decr_mode = */ H5C_decr__threshold, - /* double upper_hr_threshold = */ 0.995, + /* double upper_hr_threshold = */ 0.995f, - /* double decrement = */ 0.1, + /* double decrement = */ 0.1f, /* hbool_t apply_max_decrement = */ TRUE, /* size_t max_decrement = */ (1 * 1024 * 1024), @@ -18072,7 +18076,7 @@ check_auto_cache_resize(void) /* int32_t epochs_before_eviction = */ 3, /* hbool_t apply_empty_reserve = */ TRUE, - /* double empty_reserve = */ 0.05 + /* double empty_reserve = */ 0.05f }; TESTING("automatic cache resizing"); @@ -18423,7 +18427,7 @@ check_auto_cache_resize(void) auto_size_ctl.set_initial_size = TRUE; auto_size_ctl.initial_size = 4 * 1000 * 1000 + 10; - auto_size_ctl.min_clean_fraction = 0.1; + auto_size_ctl.min_clean_fraction = 0.1f; auto_size_ctl.max_size = 8 * 1000 * 1000; auto_size_ctl.min_size = 500 * 1000; @@ -18433,22 +18437,22 @@ check_auto_cache_resize(void) auto_size_ctl.incr_mode = H5C_incr__threshold; - auto_size_ctl.lower_hr_threshold = 0.75; + auto_size_ctl.lower_hr_threshold = 0.75f; - auto_size_ctl.increment = 2.0; + auto_size_ctl.increment = 2.0f; auto_size_ctl.apply_max_increment = TRUE; auto_size_ctl.max_increment = (4 * 1000 * 1000); auto_size_ctl.flash_incr_mode = H5C_flash_incr__off; - auto_size_ctl.flash_multiple = 2.0; - auto_size_ctl.flash_threshold = 0.5; + auto_size_ctl.flash_multiple = 2.0f; + auto_size_ctl.flash_threshold = 0.5f; auto_size_ctl.decr_mode = H5C_decr__threshold; - auto_size_ctl.upper_hr_threshold = 0.995; + auto_size_ctl.upper_hr_threshold = 0.995f; - auto_size_ctl.decrement = 0.5; + auto_size_ctl.decrement = 0.5f; auto_size_ctl.apply_max_decrement = TRUE; auto_size_ctl.max_decrement = (1 * 1000 * 1000); @@ -18456,7 +18460,7 @@ check_auto_cache_resize(void) auto_size_ctl.epochs_before_eviction = 3; auto_size_ctl.apply_empty_reserve = TRUE; - auto_size_ctl.empty_reserve = 0.05; + auto_size_ctl.empty_reserve = 0.05f; result = H5C_set_cache_auto_resize_config(cache_ptr, &auto_size_ctl); @@ -18766,7 +18770,7 @@ check_auto_cache_resize(void) auto_size_ctl.set_initial_size = TRUE; auto_size_ctl.initial_size = 4 * 1024 * 1024; - auto_size_ctl.min_clean_fraction = 0.5; + auto_size_ctl.min_clean_fraction = 0.5f; auto_size_ctl.max_size = 16 * 1024 * 1024; auto_size_ctl.min_size = 1 * 1024 * 1024; @@ -18776,22 +18780,22 @@ check_auto_cache_resize(void) auto_size_ctl.incr_mode = H5C_incr__threshold; - auto_size_ctl.lower_hr_threshold = 0.75; + auto_size_ctl.lower_hr_threshold = 0.75f; - auto_size_ctl.increment = 4.0; + auto_size_ctl.increment = 4.0f; auto_size_ctl.apply_max_increment = FALSE; auto_size_ctl.max_increment = (4 * 1024 * 1024); auto_size_ctl.flash_incr_mode = H5C_flash_incr__off; - auto_size_ctl.flash_multiple = 2.0; - auto_size_ctl.flash_threshold = 0.5; + auto_size_ctl.flash_multiple = 2.0f; + auto_size_ctl.flash_threshold = 0.5f; auto_size_ctl.decr_mode = H5C_decr__threshold; - auto_size_ctl.upper_hr_threshold = 0.995; + auto_size_ctl.upper_hr_threshold = 0.995f; - auto_size_ctl.decrement = 0.25; + auto_size_ctl.decrement = 0.25f; auto_size_ctl.apply_max_decrement = FALSE; auto_size_ctl.max_decrement = (1 * 1024 * 1024); @@ -18799,7 +18803,7 @@ check_auto_cache_resize(void) auto_size_ctl.epochs_before_eviction = 3; auto_size_ctl.apply_empty_reserve = TRUE; - auto_size_ctl.empty_reserve = 0.05; + auto_size_ctl.empty_reserve = 0.05f; result = H5C_set_cache_auto_resize_config(cache_ptr, &auto_size_ctl); @@ -18953,7 +18957,7 @@ check_auto_cache_resize(void) auto_size_ctl.set_initial_size = TRUE; auto_size_ctl.initial_size = 8 * 1024 * 1024; - auto_size_ctl.min_clean_fraction = 0.5; + auto_size_ctl.min_clean_fraction = 0.5f; auto_size_ctl.max_size = 8 * 1024 * 1024; auto_size_ctl.min_size = 512 * 1024; @@ -18963,23 +18967,23 @@ check_auto_cache_resize(void) auto_size_ctl.incr_mode = H5C_incr__threshold; - auto_size_ctl.lower_hr_threshold = 0.75; + auto_size_ctl.lower_hr_threshold = 0.75f; - auto_size_ctl.increment = 2.0; + auto_size_ctl.increment = 2.0f; auto_size_ctl.apply_max_increment = TRUE; auto_size_ctl.max_increment = (4 * 1024 * 1024); auto_size_ctl.flash_incr_mode = H5C_flash_incr__off; - auto_size_ctl.flash_multiple = 2.0; - auto_size_ctl.flash_threshold = 0.5; + auto_size_ctl.flash_multiple = 2.0f; + auto_size_ctl.flash_threshold = 0.5f; auto_size_ctl.decr_mode = H5C_decr__age_out; - auto_size_ctl.upper_hr_threshold = 0.995; + auto_size_ctl.upper_hr_threshold = 0.995f; - auto_size_ctl.decrement = 0.5; + auto_size_ctl.decrement = 0.5f; auto_size_ctl.apply_max_decrement = FALSE; auto_size_ctl.max_decrement = (1 * 1024 * 1024); @@ -18987,7 +18991,7 @@ check_auto_cache_resize(void) auto_size_ctl.epochs_before_eviction = 3; auto_size_ctl.apply_empty_reserve = FALSE; - auto_size_ctl.empty_reserve = 0.05; + auto_size_ctl.empty_reserve = 0.05f; result = H5C_set_cache_auto_resize_config(cache_ptr, &auto_size_ctl); @@ -19368,7 +19372,7 @@ check_auto_cache_resize(void) auto_size_ctl.set_initial_size = TRUE; auto_size_ctl.initial_size = 8 * 1024 * 1024; - auto_size_ctl.min_clean_fraction = 0.5; + auto_size_ctl.min_clean_fraction = 0.5f; auto_size_ctl.max_size = 8 * 1024 * 1024; auto_size_ctl.min_size = 512 * 1024; @@ -19378,23 +19382,23 @@ check_auto_cache_resize(void) auto_size_ctl.incr_mode = H5C_incr__threshold; - auto_size_ctl.lower_hr_threshold = 0.75; + auto_size_ctl.lower_hr_threshold = 0.75f; - auto_size_ctl.increment = 2.0; + auto_size_ctl.increment = 2.0f; auto_size_ctl.apply_max_increment = TRUE; auto_size_ctl.max_increment = (4 * 1024 * 1024); auto_size_ctl.flash_incr_mode = H5C_flash_incr__off; - auto_size_ctl.flash_multiple = 2.0; - auto_size_ctl.flash_threshold = 0.5; + auto_size_ctl.flash_multiple = 2.0f; + auto_size_ctl.flash_threshold = 0.5f; auto_size_ctl.decr_mode = H5C_decr__age_out; - auto_size_ctl.upper_hr_threshold = 0.995; + auto_size_ctl.upper_hr_threshold = 0.995f; - auto_size_ctl.decrement = 0.5; + auto_size_ctl.decrement = 0.5f; auto_size_ctl.apply_max_decrement = TRUE; auto_size_ctl.max_decrement = (1 * 1024 * 1024); @@ -19402,7 +19406,7 @@ check_auto_cache_resize(void) auto_size_ctl.epochs_before_eviction = 3; auto_size_ctl.apply_empty_reserve = FALSE; - auto_size_ctl.empty_reserve = 0.05; + auto_size_ctl.empty_reserve = 0.05f; result = H5C_set_cache_auto_resize_config(cache_ptr, &auto_size_ctl); @@ -19896,7 +19900,7 @@ check_auto_cache_resize(void) auto_size_ctl.set_initial_size = TRUE; auto_size_ctl.initial_size = 8 * 1024 * 1024; - auto_size_ctl.min_clean_fraction = 0.5; + auto_size_ctl.min_clean_fraction = 0.5f; auto_size_ctl.max_size = 8 * 1024 * 1024; auto_size_ctl.min_size = 512 * 1024; @@ -19906,23 +19910,23 @@ check_auto_cache_resize(void) auto_size_ctl.incr_mode = H5C_incr__threshold; - auto_size_ctl.lower_hr_threshold = 0.75; + auto_size_ctl.lower_hr_threshold = 0.75f; - auto_size_ctl.increment = 2.0; + auto_size_ctl.increment = 2.0f; auto_size_ctl.apply_max_increment = TRUE; auto_size_ctl.max_increment = (4 * 1024 * 1024); auto_size_ctl.flash_incr_mode = H5C_flash_incr__off; - auto_size_ctl.flash_multiple = 2.0; - auto_size_ctl.flash_threshold = 0.5; + auto_size_ctl.flash_multiple = 2.0f; + auto_size_ctl.flash_threshold = 0.5f; auto_size_ctl.decr_mode = H5C_decr__age_out; - auto_size_ctl.upper_hr_threshold = 0.995; + auto_size_ctl.upper_hr_threshold = 0.995f; - auto_size_ctl.decrement = 0.5; + auto_size_ctl.decrement = 0.5f; auto_size_ctl.apply_max_decrement = FALSE; auto_size_ctl.max_decrement = (1 * 1024 * 1024); @@ -19930,7 +19934,7 @@ check_auto_cache_resize(void) auto_size_ctl.epochs_before_eviction = 3; auto_size_ctl.apply_empty_reserve = TRUE; - auto_size_ctl.empty_reserve = 0.5; /* for ease of testing */ + auto_size_ctl.empty_reserve = 0.5f; /* for ease of testing */ result = H5C_set_cache_auto_resize_config(cache_ptr, &auto_size_ctl); @@ -20312,7 +20316,7 @@ check_auto_cache_resize(void) auto_size_ctl.set_initial_size = TRUE; auto_size_ctl.initial_size = 8 * 1024 * 1024; - auto_size_ctl.min_clean_fraction = 0.5; + auto_size_ctl.min_clean_fraction = 0.5f; auto_size_ctl.max_size = 8 * 1024 * 1024; auto_size_ctl.min_size = 512 * 1024; @@ -20322,23 +20326,23 @@ check_auto_cache_resize(void) auto_size_ctl.incr_mode = H5C_incr__off; - auto_size_ctl.lower_hr_threshold = 0.75; + auto_size_ctl.lower_hr_threshold = 0.75f; - auto_size_ctl.increment = 2.0; + auto_size_ctl.increment = 2.0f; auto_size_ctl.apply_max_increment = TRUE; auto_size_ctl.max_increment = (4 * 1024 * 1024); auto_size_ctl.flash_incr_mode = H5C_flash_incr__off; - auto_size_ctl.flash_multiple = 2.0; - auto_size_ctl.flash_threshold = 0.5; + auto_size_ctl.flash_multiple = 2.0f; + auto_size_ctl.flash_threshold = 0.5f; auto_size_ctl.decr_mode = H5C_decr__age_out_with_threshold; auto_size_ctl.upper_hr_threshold = 0.999; /* for ease of testing */ - auto_size_ctl.decrement = 0.5; + auto_size_ctl.decrement = 0.5f; auto_size_ctl.apply_max_decrement = FALSE; auto_size_ctl.max_decrement = (1 * 1024 * 1024); @@ -20346,7 +20350,7 @@ check_auto_cache_resize(void) auto_size_ctl.epochs_before_eviction = 1; /* for ease of testing */ auto_size_ctl.apply_empty_reserve = FALSE; - auto_size_ctl.empty_reserve = 0.05; + auto_size_ctl.empty_reserve = 0.05f; result = H5C_set_cache_auto_resize_config(cache_ptr, &auto_size_ctl); @@ -20575,7 +20579,7 @@ check_auto_cache_resize(void) auto_size_ctl.set_initial_size = TRUE; auto_size_ctl.initial_size = 8 * 1000 * 1024; - auto_size_ctl.min_clean_fraction = 0.5; + auto_size_ctl.min_clean_fraction = 0.5f; auto_size_ctl.max_size = 8 * 1000 * 1024; auto_size_ctl.min_size = 512 * 1024; @@ -20585,23 +20589,23 @@ check_auto_cache_resize(void) auto_size_ctl.incr_mode = H5C_incr__threshold; - auto_size_ctl.lower_hr_threshold = 0.75; + auto_size_ctl.lower_hr_threshold = 0.75f; - auto_size_ctl.increment = 2.0; + auto_size_ctl.increment = 2.0f; auto_size_ctl.apply_max_increment = TRUE; auto_size_ctl.max_increment = (4 * 1024 * 1024); auto_size_ctl.flash_incr_mode = H5C_flash_incr__off; - auto_size_ctl.flash_multiple = 2.0; - auto_size_ctl.flash_threshold = 0.5; + auto_size_ctl.flash_multiple = 2.0f; + auto_size_ctl.flash_threshold = 0.5f; auto_size_ctl.decr_mode = H5C_decr__age_out_with_threshold; - auto_size_ctl.upper_hr_threshold = 0.999; /* for ease of testing */ + auto_size_ctl.upper_hr_threshold = 0.999f; /* for ease of testing */ - auto_size_ctl.decrement = 0.5; + auto_size_ctl.decrement = 0.5f; auto_size_ctl.apply_max_decrement = TRUE; auto_size_ctl.max_decrement = (1 * 1000 * 1024); @@ -20609,7 +20613,7 @@ check_auto_cache_resize(void) auto_size_ctl.epochs_before_eviction = 1; /* for ease of testing */ auto_size_ctl.apply_empty_reserve = TRUE; - auto_size_ctl.empty_reserve = 0.5; /* for ease of testing */ + auto_size_ctl.empty_reserve = 0.5f; /* for ease of testing */ result = H5C_set_cache_auto_resize_config(cache_ptr, &auto_size_ctl); @@ -21157,7 +21161,7 @@ check_auto_cache_resize(void) auto_size_ctl.set_initial_size = TRUE; auto_size_ctl.initial_size = 64 * 1024; - auto_size_ctl.min_clean_fraction = 0.5; + auto_size_ctl.min_clean_fraction = 0.5f; auto_size_ctl.max_size = 1024 * 1024; auto_size_ctl.min_size = 5 * 1024; @@ -21167,23 +21171,23 @@ check_auto_cache_resize(void) auto_size_ctl.incr_mode = H5C_incr__threshold; - auto_size_ctl.lower_hr_threshold = 0.75; + auto_size_ctl.lower_hr_threshold = 0.75f; - auto_size_ctl.increment = 2.0; + auto_size_ctl.increment = 2.0f; auto_size_ctl.apply_max_increment = TRUE; auto_size_ctl.max_increment = (32 * 1024); auto_size_ctl.flash_incr_mode = H5C_flash_incr__add_space; - auto_size_ctl.flash_multiple = 1.0; - auto_size_ctl.flash_threshold = 0.5; + auto_size_ctl.flash_multiple = 1.0f; + auto_size_ctl.flash_threshold = 0.5f; auto_size_ctl.decr_mode = H5C_decr__age_out_with_threshold; - auto_size_ctl.upper_hr_threshold = 0.999; /* for ease of testing */ + auto_size_ctl.upper_hr_threshold = 0.999f; /* for ease of testing */ - auto_size_ctl.decrement = 0.5; + auto_size_ctl.decrement = 0.5f; auto_size_ctl.apply_max_decrement = TRUE; auto_size_ctl.max_decrement = (1 * 1000 * 1024); @@ -21191,7 +21195,7 @@ check_auto_cache_resize(void) auto_size_ctl.epochs_before_eviction = 1; /* for ease of testing */ auto_size_ctl.apply_empty_reserve = TRUE; - auto_size_ctl.empty_reserve = 0.5; /* for ease of testing */ + auto_size_ctl.empty_reserve = 0.5f; /* for ease of testing */ result = H5C_set_cache_auto_resize_config(cache_ptr, &auto_size_ctl); @@ -21962,7 +21966,7 @@ check_auto_cache_resize(void) auto_size_ctl.set_initial_size = TRUE; auto_size_ctl.initial_size = 4 * 1024; - auto_size_ctl.min_clean_fraction = 0.5; + auto_size_ctl.min_clean_fraction = 0.5f; auto_size_ctl.max_size = 20 * 1024; auto_size_ctl.min_size = 4 * 1024; @@ -21972,23 +21976,23 @@ check_auto_cache_resize(void) auto_size_ctl.incr_mode = H5C_incr__threshold; - auto_size_ctl.lower_hr_threshold = 0.75; + auto_size_ctl.lower_hr_threshold = 0.75f; - auto_size_ctl.increment = 2.0; + auto_size_ctl.increment = 2.0f; auto_size_ctl.apply_max_increment = TRUE; auto_size_ctl.max_increment = (4 * 1024); auto_size_ctl.flash_incr_mode = H5C_flash_incr__add_space; - auto_size_ctl.flash_multiple = 2.0; - auto_size_ctl.flash_threshold = 0.4; + auto_size_ctl.flash_multiple = 2.0f; + auto_size_ctl.flash_threshold = 0.4f; auto_size_ctl.decr_mode = H5C_decr__age_out_with_threshold; - auto_size_ctl.upper_hr_threshold = 0.999; /* for ease of testing */ + auto_size_ctl.upper_hr_threshold = 0.999f; /* for ease of testing */ - auto_size_ctl.decrement = 0.5; + auto_size_ctl.decrement = 0.5f; auto_size_ctl.apply_max_decrement = TRUE; auto_size_ctl.max_decrement = (2 * 1024); @@ -21996,7 +22000,7 @@ check_auto_cache_resize(void) auto_size_ctl.epochs_before_eviction = 1; /* for ease of testing */ auto_size_ctl.apply_empty_reserve = TRUE; - auto_size_ctl.empty_reserve = 0.5; /* for ease of testing */ + auto_size_ctl.empty_reserve = 0.5f; /* for ease of testing */ result = H5C_set_cache_auto_resize_config(cache_ptr, &auto_size_ctl); @@ -22242,7 +22246,7 @@ check_auto_cache_resize_disable(void) /* hbool_t set_initial_size = */ TRUE, /* size_t initial_size = */ (512 * 1024), - /* double min_clean_fraction = */ 0.5, + /* double min_clean_fraction = */ 0.5f, /* size_t max_size = */ (14 * 1024 * 1024), /* size_t min_size = */ (512 * 1024), @@ -22252,24 +22256,24 @@ check_auto_cache_resize_disable(void) /* enum H5C_cache_incr_mode incr_mode = */ H5C_incr__threshold, - /* double lower_hr_threshold = */ 0.75, + /* double lower_hr_threshold = */ 0.75f, - /* double increment = */ 2.0, + /* double increment = */ 2.0f, /* 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__off, - /* double flash_multiple = */ 1.0, - /* double flash_threshold = */ 0.25, + /* double flash_multiple = */ 1.0f, + /* double flash_threshold = */ 0.25f, /* enum H5C_cache_decr_mode decr_mode = */ H5C_decr__threshold, - /* double upper_hr_threshold = */ 0.995, + /* double upper_hr_threshold = */ 0.995f, - /* double decrement = */ 0.1, + /* double decrement = */ 0.1f, /* hbool_t apply_max_decrement = */ TRUE, /* size_t max_decrement = */ (1 * 1024 * 1024), @@ -22277,7 +22281,7 @@ check_auto_cache_resize_disable(void) /* int32_t epochs_before_eviction = */ 3, /* hbool_t apply_empty_reserve = */ TRUE, - /* double empty_reserve = */ 0.05 + /* double empty_reserve = */ 0.05f }; TESTING("automatic cache resize disable"); @@ -22349,7 +22353,7 @@ check_auto_cache_resize_disable(void) auto_size_ctl.set_initial_size = TRUE; auto_size_ctl.initial_size = 4 * 1024 * 1024; - auto_size_ctl.min_clean_fraction = 0.5; + auto_size_ctl.min_clean_fraction = 0.5f; auto_size_ctl.max_size = 16 * 1024 * 1024; auto_size_ctl.min_size = 1 * 1024 * 1024; @@ -22359,23 +22363,23 @@ check_auto_cache_resize_disable(void) auto_size_ctl.incr_mode = H5C_incr__threshold; - auto_size_ctl.lower_hr_threshold = 0.75; + auto_size_ctl.lower_hr_threshold = 0.75f; - auto_size_ctl.increment = 1.0; /* disable size increases */ + auto_size_ctl.increment = 1.0f; /* disable size increases */ auto_size_ctl.apply_max_increment = FALSE; auto_size_ctl.max_increment = (4 * 1024 * 1024); auto_size_ctl.flash_incr_mode = H5C_flash_incr__off; - auto_size_ctl.flash_multiple = 2.0; - auto_size_ctl.flash_threshold = 0.5; + auto_size_ctl.flash_multiple = 2.0f; + auto_size_ctl.flash_threshold = 0.5f; auto_size_ctl.decr_mode = H5C_decr__threshold; - auto_size_ctl.upper_hr_threshold = 0.995; + auto_size_ctl.upper_hr_threshold = 0.995f; - auto_size_ctl.decrement = 0.5; + auto_size_ctl.decrement = 0.5f; auto_size_ctl.apply_max_decrement = FALSE; auto_size_ctl.max_decrement = (1 * 1024 * 1024); @@ -22383,7 +22387,7 @@ check_auto_cache_resize_disable(void) auto_size_ctl.epochs_before_eviction = 3; auto_size_ctl.apply_empty_reserve = TRUE; - auto_size_ctl.empty_reserve = 0.05; + auto_size_ctl.empty_reserve = 0.05f; result = H5C_set_cache_auto_resize_config(cache_ptr, &auto_size_ctl); @@ -22507,7 +22511,7 @@ check_auto_cache_resize_disable(void) auto_size_ctl.set_initial_size = TRUE; auto_size_ctl.initial_size = 4 * 1024 * 1024; - auto_size_ctl.min_clean_fraction = 0.5; + auto_size_ctl.min_clean_fraction = 0.5f; auto_size_ctl.max_size = 16 * 1024 * 1024; auto_size_ctl.min_size = 1 * 1024 * 1024; @@ -22517,22 +22521,22 @@ check_auto_cache_resize_disable(void) auto_size_ctl.incr_mode = H5C_incr__threshold; - auto_size_ctl.lower_hr_threshold = 0.0; /* disable size increases */ + auto_size_ctl.lower_hr_threshold = 0.0f; /* disable size increases */ - auto_size_ctl.increment = 2.0; + auto_size_ctl.increment = 2.0f; auto_size_ctl.apply_max_increment = FALSE; auto_size_ctl.max_increment = (4 * 1024 * 1024); auto_size_ctl.flash_incr_mode = H5C_flash_incr__off; - auto_size_ctl.flash_multiple = 2.0; - auto_size_ctl.flash_threshold = 0.5; + auto_size_ctl.flash_multiple = 2.0f; + auto_size_ctl.flash_threshold = 0.5f; auto_size_ctl.decr_mode = H5C_decr__threshold; - auto_size_ctl.upper_hr_threshold = 0.995; - auto_size_ctl.decrement = 0.5; + auto_size_ctl.upper_hr_threshold = 0.995f; + auto_size_ctl.decrement = 0.5f; auto_size_ctl.apply_max_decrement = FALSE; auto_size_ctl.max_decrement = (1 * 1024 * 1024); @@ -22540,7 +22544,7 @@ check_auto_cache_resize_disable(void) auto_size_ctl.epochs_before_eviction = 3; auto_size_ctl.apply_empty_reserve = TRUE; - auto_size_ctl.empty_reserve = 0.05; + auto_size_ctl.empty_reserve = 0.05f; result = H5C_set_cache_auto_resize_config(cache_ptr, &auto_size_ctl); @@ -22664,7 +22668,7 @@ check_auto_cache_resize_disable(void) auto_size_ctl.set_initial_size = TRUE; auto_size_ctl.initial_size = 4 * 1024 * 1024; - auto_size_ctl.min_clean_fraction = 0.5; + auto_size_ctl.min_clean_fraction = 0.5f; auto_size_ctl.max_size = 16 * 1024 * 1024; auto_size_ctl.min_size = 1 * 1024 * 1024; @@ -22674,23 +22678,23 @@ check_auto_cache_resize_disable(void) auto_size_ctl.incr_mode = H5C_incr__off; - auto_size_ctl.lower_hr_threshold = 0.75; + auto_size_ctl.lower_hr_threshold = 0.75f; - auto_size_ctl.increment = 2.0; + auto_size_ctl.increment = 2.0f; auto_size_ctl.apply_max_increment = FALSE; auto_size_ctl.max_increment = (4 * 1024 * 1024); auto_size_ctl.flash_incr_mode = H5C_flash_incr__off; - auto_size_ctl.flash_multiple = 2.0; - auto_size_ctl.flash_threshold = 0.5; + auto_size_ctl.flash_multiple = 2.0f; + auto_size_ctl.flash_threshold = 0.5f; auto_size_ctl.decr_mode = H5C_decr__threshold; - auto_size_ctl.upper_hr_threshold = 0.995; + auto_size_ctl.upper_hr_threshold = 0.995f; - auto_size_ctl.decrement = 0.5; + auto_size_ctl.decrement = 0.5f; auto_size_ctl.apply_max_decrement = FALSE; auto_size_ctl.max_decrement = (1 * 1024 * 1024); @@ -22698,7 +22702,7 @@ check_auto_cache_resize_disable(void) auto_size_ctl.epochs_before_eviction = 3; auto_size_ctl.apply_empty_reserve = TRUE; - auto_size_ctl.empty_reserve = 0.05; + auto_size_ctl.empty_reserve = 0.05f; result = H5C_set_cache_auto_resize_config(cache_ptr, &auto_size_ctl); @@ -22821,7 +22825,7 @@ check_auto_cache_resize_disable(void) auto_size_ctl.set_initial_size = TRUE; auto_size_ctl.initial_size = 4 * 1024 * 1024; - auto_size_ctl.min_clean_fraction = 0.5; + auto_size_ctl.min_clean_fraction = 0.5f; auto_size_ctl.max_size = 16 * 1024 * 1024; auto_size_ctl.min_size = 1 * 1024 * 1024; @@ -22831,23 +22835,23 @@ check_auto_cache_resize_disable(void) auto_size_ctl.incr_mode = H5C_incr__threshold; - auto_size_ctl.lower_hr_threshold = 0.75; + auto_size_ctl.lower_hr_threshold = 0.75f; - auto_size_ctl.increment = 2.0; + auto_size_ctl.increment = 2.0f; auto_size_ctl.apply_max_increment = TRUE; auto_size_ctl.max_increment = (2 * 1024 * 1024); auto_size_ctl.flash_incr_mode = H5C_flash_incr__off; - auto_size_ctl.flash_multiple = 2.0; - auto_size_ctl.flash_threshold = 0.5; + auto_size_ctl.flash_multiple = 2.0f; + auto_size_ctl.flash_threshold = 0.5f; auto_size_ctl.decr_mode = H5C_decr__threshold; - auto_size_ctl.upper_hr_threshold = 0.995; + auto_size_ctl.upper_hr_threshold = 0.995f; - auto_size_ctl.decrement = 1.0; /* disable size decreases */ + auto_size_ctl.decrement = 1.0f; /* disable size decreases */ auto_size_ctl.apply_max_decrement = TRUE; auto_size_ctl.max_decrement = (1 * 1024 * 1024); @@ -22855,7 +22859,7 @@ check_auto_cache_resize_disable(void) auto_size_ctl.epochs_before_eviction = 3; auto_size_ctl.apply_empty_reserve = TRUE; - auto_size_ctl.empty_reserve = 0.05; + auto_size_ctl.empty_reserve = 0.05f; result = H5C_set_cache_auto_resize_config(cache_ptr, &auto_size_ctl); @@ -22978,7 +22982,7 @@ check_auto_cache_resize_disable(void) auto_size_ctl.set_initial_size = TRUE; auto_size_ctl.initial_size = 4 * 1024 * 1024; - auto_size_ctl.min_clean_fraction = 0.5; + auto_size_ctl.min_clean_fraction = 0.5f; auto_size_ctl.max_size = 16 * 1024 * 1024; auto_size_ctl.min_size = 1 * 1024 * 1024; @@ -22988,23 +22992,23 @@ check_auto_cache_resize_disable(void) auto_size_ctl.incr_mode = H5C_incr__threshold; - auto_size_ctl.lower_hr_threshold = 0.75; + auto_size_ctl.lower_hr_threshold = 0.75f; - auto_size_ctl.increment = 2.0; + auto_size_ctl.increment = 2.0f; auto_size_ctl.apply_max_increment = TRUE; auto_size_ctl.max_increment = (2 * 1024 * 1024); auto_size_ctl.flash_incr_mode = H5C_flash_incr__off; - auto_size_ctl.flash_multiple = 2.0; - auto_size_ctl.flash_threshold = 0.5; + auto_size_ctl.flash_multiple = 2.0f; + auto_size_ctl.flash_threshold = 0.5f; auto_size_ctl.decr_mode = H5C_decr__threshold; - auto_size_ctl.upper_hr_threshold = 1.0; /* disable size decreases */ + auto_size_ctl.upper_hr_threshold = 1.0f; /* disable size decreases */ - auto_size_ctl.decrement = 0.5; + auto_size_ctl.decrement = 0.5f; auto_size_ctl.apply_max_decrement = TRUE; auto_size_ctl.max_decrement = (1 * 1024 * 1024); @@ -23012,7 +23016,7 @@ check_auto_cache_resize_disable(void) auto_size_ctl.epochs_before_eviction = 3; auto_size_ctl.apply_empty_reserve = TRUE; - auto_size_ctl.empty_reserve = 0.05; + auto_size_ctl.empty_reserve = 0.05f; result = H5C_set_cache_auto_resize_config(cache_ptr, &auto_size_ctl); @@ -23134,7 +23138,7 @@ check_auto_cache_resize_disable(void) auto_size_ctl.set_initial_size = TRUE; auto_size_ctl.initial_size = 4 * 1024 * 1024; - auto_size_ctl.min_clean_fraction = 0.5; + auto_size_ctl.min_clean_fraction = 0.5f; auto_size_ctl.max_size = 16 * 1024 * 1024; auto_size_ctl.min_size = 1 * 1024 * 1024; @@ -23144,23 +23148,23 @@ check_auto_cache_resize_disable(void) auto_size_ctl.incr_mode = H5C_incr__threshold; - auto_size_ctl.lower_hr_threshold = 0.75; + auto_size_ctl.lower_hr_threshold = 0.75f; - auto_size_ctl.increment = 2.0; + auto_size_ctl.increment = 2.0f; auto_size_ctl.apply_max_increment = TRUE; auto_size_ctl.max_increment = (2 * 1024 * 1024); auto_size_ctl.flash_incr_mode = H5C_flash_incr__off; - auto_size_ctl.flash_multiple = 2.0; - auto_size_ctl.flash_threshold = 0.5; + auto_size_ctl.flash_multiple = 2.0f; + auto_size_ctl.flash_threshold = 0.5f; auto_size_ctl.decr_mode = H5C_decr__off; - auto_size_ctl.upper_hr_threshold = 0.995; + auto_size_ctl.upper_hr_threshold = 0.995f; - auto_size_ctl.decrement = 0.5; + auto_size_ctl.decrement = 0.5f; auto_size_ctl.apply_max_decrement = TRUE; auto_size_ctl.max_decrement = (1 * 1024 * 1024); @@ -23168,7 +23172,7 @@ check_auto_cache_resize_disable(void) auto_size_ctl.epochs_before_eviction = 3; auto_size_ctl.apply_empty_reserve = TRUE; - auto_size_ctl.empty_reserve = 0.05; + auto_size_ctl.empty_reserve = 0.05f; result = H5C_set_cache_auto_resize_config(cache_ptr, &auto_size_ctl); @@ -23292,7 +23296,7 @@ check_auto_cache_resize_disable(void) auto_size_ctl.set_initial_size = TRUE; auto_size_ctl.initial_size = 4 * 1024 * 1024; - auto_size_ctl.min_clean_fraction = 0.5; + auto_size_ctl.min_clean_fraction = 0.5f; auto_size_ctl.max_size = 16 * 1024 * 1024; auto_size_ctl.min_size = 1 * 1024 * 1024; @@ -23302,23 +23306,23 @@ check_auto_cache_resize_disable(void) auto_size_ctl.incr_mode = H5C_incr__threshold; - auto_size_ctl.lower_hr_threshold = 0.75; + auto_size_ctl.lower_hr_threshold = 0.75f; - auto_size_ctl.increment = 2.0; + auto_size_ctl.increment = 2.0f; auto_size_ctl.apply_max_increment = TRUE; auto_size_ctl.max_increment = (2 * 1024 * 1024); auto_size_ctl.flash_incr_mode = H5C_flash_incr__off; - auto_size_ctl.flash_multiple = 2.0; - auto_size_ctl.flash_threshold = 0.5; + auto_size_ctl.flash_multiple = 2.0f; + auto_size_ctl.flash_threshold = 0.5f; auto_size_ctl.decr_mode = H5C_decr__age_out; - auto_size_ctl.upper_hr_threshold = 0.995; + auto_size_ctl.upper_hr_threshold = 0.995f; - auto_size_ctl.decrement = 0.5; + auto_size_ctl.decrement = 0.5f; auto_size_ctl.apply_max_decrement = TRUE; auto_size_ctl.max_decrement = 0; /* disable decrement */ @@ -23326,7 +23330,7 @@ check_auto_cache_resize_disable(void) auto_size_ctl.epochs_before_eviction = 1; auto_size_ctl.apply_empty_reserve = TRUE; - auto_size_ctl.empty_reserve = 0.05; + auto_size_ctl.empty_reserve = 0.05f; result = H5C_set_cache_auto_resize_config(cache_ptr, &auto_size_ctl); @@ -23518,7 +23522,7 @@ check_auto_cache_resize_disable(void) auto_size_ctl.set_initial_size = TRUE; auto_size_ctl.initial_size = 4 * 1024 * 1024; - auto_size_ctl.min_clean_fraction = 0.5; + auto_size_ctl.min_clean_fraction = 0.5f; auto_size_ctl.max_size = 16 * 1024 * 1024; auto_size_ctl.min_size = 1 * 1024 * 1024; @@ -23528,23 +23532,23 @@ check_auto_cache_resize_disable(void) auto_size_ctl.incr_mode = H5C_incr__threshold; - auto_size_ctl.lower_hr_threshold = 0.75; + auto_size_ctl.lower_hr_threshold = 0.75f; - auto_size_ctl.increment = 2.0; + auto_size_ctl.increment = 2.0f; auto_size_ctl.apply_max_increment = TRUE; auto_size_ctl.max_increment = (2 * 1024 * 1024); auto_size_ctl.flash_incr_mode = H5C_flash_incr__off; - auto_size_ctl.flash_multiple = 2.0; - auto_size_ctl.flash_threshold = 0.5; + auto_size_ctl.flash_multiple = 2.0f; + auto_size_ctl.flash_threshold = 0.5f; auto_size_ctl.decr_mode = H5C_decr__age_out; - auto_size_ctl.upper_hr_threshold = 0.995; + auto_size_ctl.upper_hr_threshold = 0.995f; - auto_size_ctl.decrement = 0.5; + auto_size_ctl.decrement = 0.5f; auto_size_ctl.apply_max_decrement = TRUE; auto_size_ctl.max_decrement = (1 * 1024 * 1024); @@ -23552,7 +23556,7 @@ check_auto_cache_resize_disable(void) auto_size_ctl.epochs_before_eviction = 1; auto_size_ctl.apply_empty_reserve = TRUE; - auto_size_ctl.empty_reserve = 1.0; /* disable decrement */ + auto_size_ctl.empty_reserve = 1.0f; /* disable decrement */ result = H5C_set_cache_auto_resize_config(cache_ptr, &auto_size_ctl); @@ -23751,7 +23755,7 @@ check_auto_cache_resize_disable(void) auto_size_ctl.set_initial_size = TRUE; auto_size_ctl.initial_size = 4 * 1024 * 1024; - auto_size_ctl.min_clean_fraction = 0.5; + auto_size_ctl.min_clean_fraction = 0.5f; auto_size_ctl.max_size = 16 * 1024 * 1024; auto_size_ctl.min_size = 1 * 1024 * 1024; @@ -23761,23 +23765,23 @@ check_auto_cache_resize_disable(void) auto_size_ctl.incr_mode = H5C_incr__threshold; - auto_size_ctl.lower_hr_threshold = 0.75; + auto_size_ctl.lower_hr_threshold = 0.75f; - auto_size_ctl.increment = 2.0; + auto_size_ctl.increment = 2.0f; auto_size_ctl.apply_max_increment = TRUE; auto_size_ctl.max_increment = (2 * 1024 * 1024); auto_size_ctl.flash_incr_mode = H5C_flash_incr__off; - auto_size_ctl.flash_multiple = 2.0; - auto_size_ctl.flash_threshold = 0.5; + auto_size_ctl.flash_multiple = 2.0f; + auto_size_ctl.flash_threshold = 0.5f; auto_size_ctl.decr_mode = H5C_decr__age_out_with_threshold; - auto_size_ctl.upper_hr_threshold = 1.0; + auto_size_ctl.upper_hr_threshold = 1.0f; - auto_size_ctl.decrement = 0.5; + auto_size_ctl.decrement = 0.5f; auto_size_ctl.apply_max_decrement = TRUE; auto_size_ctl.max_decrement = (1 * 1024 * 1024); @@ -23785,7 +23789,7 @@ check_auto_cache_resize_disable(void) auto_size_ctl.epochs_before_eviction = 1; auto_size_ctl.apply_empty_reserve = TRUE; - auto_size_ctl.empty_reserve = 0.05; + auto_size_ctl.empty_reserve = 0.05f; result = H5C_set_cache_auto_resize_config(cache_ptr, &auto_size_ctl); @@ -23988,7 +23992,7 @@ check_auto_cache_resize_disable(void) auto_size_ctl.set_initial_size = TRUE; auto_size_ctl.initial_size = 2 * 1024 * 1024; - auto_size_ctl.min_clean_fraction = 0.5; + auto_size_ctl.min_clean_fraction = 0.5f; auto_size_ctl.max_size = 16 * 1024 * 1024; auto_size_ctl.min_size = 1 * 1024 * 1024; @@ -23998,23 +24002,23 @@ check_auto_cache_resize_disable(void) auto_size_ctl.incr_mode = H5C_incr__threshold; - auto_size_ctl.lower_hr_threshold = 0.0; /* disable size increases */ + auto_size_ctl.lower_hr_threshold = 0.0f; /* disable size increases */ - auto_size_ctl.increment = 2.0; + auto_size_ctl.increment = 2.0f; auto_size_ctl.apply_max_increment = TRUE; auto_size_ctl.max_increment = (2 * 1024 * 1024); auto_size_ctl.flash_incr_mode = H5C_flash_incr__off; - auto_size_ctl.flash_multiple = 2.0; - auto_size_ctl.flash_threshold = 0.5; + auto_size_ctl.flash_multiple = 2.0f; + auto_size_ctl.flash_threshold = 0.5f; auto_size_ctl.decr_mode = H5C_decr__threshold; - auto_size_ctl.upper_hr_threshold = 1.0; /* disable size decreases */ + auto_size_ctl.upper_hr_threshold = 1.0f; /* disable size decreases */ - auto_size_ctl.decrement = 0.5; + auto_size_ctl.decrement = 0.5f; auto_size_ctl.apply_max_decrement = TRUE; auto_size_ctl.max_decrement = (1 * 1024 * 1024); @@ -24022,7 +24026,7 @@ check_auto_cache_resize_disable(void) auto_size_ctl.epochs_before_eviction = 3; auto_size_ctl.apply_empty_reserve = TRUE; - auto_size_ctl.empty_reserve = 0.05; + auto_size_ctl.empty_reserve = 0.05f; result = H5C_set_cache_auto_resize_config(cache_ptr, &auto_size_ctl); @@ -24115,7 +24119,7 @@ check_auto_cache_resize_disable(void) auto_size_ctl.set_initial_size = TRUE; auto_size_ctl.initial_size = 4 * 1024 * 1024; - auto_size_ctl.min_clean_fraction = 0.25; + auto_size_ctl.min_clean_fraction = 0.25f; auto_size_ctl.max_size = 16 * 1024 * 1024; auto_size_ctl.min_size = 1 * 1024 * 1024; @@ -24125,23 +24129,23 @@ check_auto_cache_resize_disable(void) auto_size_ctl.incr_mode = H5C_incr__threshold; - auto_size_ctl.lower_hr_threshold = 0.75; + auto_size_ctl.lower_hr_threshold = 0.75f; - auto_size_ctl.increment = 1.0; /* disable size increment */ + auto_size_ctl.increment = 1.0f; /* disable size increment */ auto_size_ctl.apply_max_increment = TRUE; auto_size_ctl.max_increment = (2 * 1024 * 1024); auto_size_ctl.flash_incr_mode = H5C_flash_incr__off; - auto_size_ctl.flash_multiple = 2.0; - auto_size_ctl.flash_threshold = 0.5; + auto_size_ctl.flash_multiple = 2.0f; + auto_size_ctl.flash_threshold = 0.5f; auto_size_ctl.decr_mode = H5C_decr__threshold; - auto_size_ctl.upper_hr_threshold = 0.995; + auto_size_ctl.upper_hr_threshold = 0.995f; - auto_size_ctl.decrement = 1.0; /* disable size decrement */ + auto_size_ctl.decrement = 1.0f; /* disable size decrement */ auto_size_ctl.apply_max_decrement = TRUE; auto_size_ctl.max_decrement = (1 * 1024 * 1024); @@ -24149,7 +24153,7 @@ check_auto_cache_resize_disable(void) auto_size_ctl.epochs_before_eviction = 3; auto_size_ctl.apply_empty_reserve = TRUE; - auto_size_ctl.empty_reserve = 0.05; + auto_size_ctl.empty_reserve = 0.05f; result = H5C_set_cache_auto_resize_config(cache_ptr, &auto_size_ctl); @@ -24242,7 +24246,7 @@ check_auto_cache_resize_disable(void) auto_size_ctl.set_initial_size = FALSE; auto_size_ctl.initial_size = 2 * 1024 * 1024; - auto_size_ctl.min_clean_fraction = 0.5; + auto_size_ctl.min_clean_fraction = 0.5f; auto_size_ctl.max_size = 6 * 1024 * 1024; /* no resize */ auto_size_ctl.min_size = 6 * 1024 * 1024; /* no resize */ @@ -24252,23 +24256,23 @@ check_auto_cache_resize_disable(void) auto_size_ctl.incr_mode = H5C_incr__threshold; - auto_size_ctl.lower_hr_threshold = 0.75; + auto_size_ctl.lower_hr_threshold = 0.75f; - auto_size_ctl.increment = 2.0; + auto_size_ctl.increment = 2.0f; auto_size_ctl.apply_max_increment = TRUE; auto_size_ctl.max_increment = (2 * 1024 * 1024); auto_size_ctl.flash_incr_mode = H5C_flash_incr__off; - auto_size_ctl.flash_multiple = 2.0; - auto_size_ctl.flash_threshold = 0.5; + auto_size_ctl.flash_multiple = 2.0f; + auto_size_ctl.flash_threshold = 0.5f; auto_size_ctl.decr_mode = H5C_decr__threshold; - auto_size_ctl.upper_hr_threshold = 0.995; + auto_size_ctl.upper_hr_threshold = 0.995f; - auto_size_ctl.decrement = 0.5; + auto_size_ctl.decrement = 0.5f; auto_size_ctl.apply_max_decrement = TRUE; auto_size_ctl.max_decrement = (1 * 1024 * 1024); @@ -24276,7 +24280,7 @@ check_auto_cache_resize_disable(void) auto_size_ctl.epochs_before_eviction = 3; auto_size_ctl.apply_empty_reserve = TRUE; - auto_size_ctl.empty_reserve = 0.05; + auto_size_ctl.empty_reserve = 0.05f; result = H5C_set_cache_auto_resize_config(cache_ptr, &auto_size_ctl); @@ -24369,7 +24373,7 @@ check_auto_cache_resize_disable(void) auto_size_ctl.set_initial_size = TRUE; auto_size_ctl.initial_size = 4 * 1024 * 1024; - auto_size_ctl.min_clean_fraction = 0.25; + auto_size_ctl.min_clean_fraction = 0.25f; auto_size_ctl.max_size = 16 * 1024 * 1024; auto_size_ctl.min_size = 1 * 1024 * 1024; @@ -24379,23 +24383,23 @@ check_auto_cache_resize_disable(void) auto_size_ctl.incr_mode = H5C_incr__threshold; - auto_size_ctl.lower_hr_threshold = 0.75; + auto_size_ctl.lower_hr_threshold = 0.75f; - auto_size_ctl.increment = 1.0; /* disable size increment */ + auto_size_ctl.increment = 1.0f; /* disable size increment */ auto_size_ctl.apply_max_increment = TRUE; auto_size_ctl.max_increment = (2 * 1024 * 1024); auto_size_ctl.flash_incr_mode = H5C_flash_incr__off; - auto_size_ctl.flash_multiple = 2.0; - auto_size_ctl.flash_threshold = 0.5; + auto_size_ctl.flash_multiple = 2.0f; + auto_size_ctl.flash_threshold = 0.5f; auto_size_ctl.decr_mode = H5C_decr__threshold; - auto_size_ctl.upper_hr_threshold = 1.0; /* disable size decrement */ + auto_size_ctl.upper_hr_threshold = 1.0f; /* disable size decrement */ - auto_size_ctl.decrement = 0.5; + auto_size_ctl.decrement = 0.5f; auto_size_ctl.apply_max_decrement = TRUE; auto_size_ctl.max_decrement = (1 * 1024 * 1024); @@ -24403,7 +24407,7 @@ check_auto_cache_resize_disable(void) auto_size_ctl.epochs_before_eviction = 3; auto_size_ctl.apply_empty_reserve = TRUE; - auto_size_ctl.empty_reserve = 0.05; + auto_size_ctl.empty_reserve = 0.05f; result = H5C_set_cache_auto_resize_config(cache_ptr, &auto_size_ctl); @@ -24496,7 +24500,7 @@ check_auto_cache_resize_disable(void) auto_size_ctl.set_initial_size = TRUE; auto_size_ctl.initial_size = 4 * 1024 * 1024; - auto_size_ctl.min_clean_fraction = 0.5; + auto_size_ctl.min_clean_fraction = 0.5f; auto_size_ctl.max_size = 16 * 1024 * 1024; auto_size_ctl.min_size = 1 * 1024 * 1024; @@ -24506,23 +24510,23 @@ check_auto_cache_resize_disable(void) auto_size_ctl.incr_mode = H5C_incr__threshold; - auto_size_ctl.lower_hr_threshold = 0.0; /* disable size increment */ + auto_size_ctl.lower_hr_threshold = 0.0f; /* disable size increment */ - auto_size_ctl.increment = 2.0; + auto_size_ctl.increment = 2.0f; auto_size_ctl.apply_max_increment = TRUE; auto_size_ctl.max_increment = (2 * 1024 * 1024); auto_size_ctl.flash_incr_mode = H5C_flash_incr__off; - auto_size_ctl.flash_multiple = 2.0; - auto_size_ctl.flash_threshold = 0.5; + auto_size_ctl.flash_multiple = 2.0f; + auto_size_ctl.flash_threshold = 0.5f; auto_size_ctl.decr_mode = H5C_decr__threshold; - auto_size_ctl.upper_hr_threshold = 0.995; + auto_size_ctl.upper_hr_threshold = 0.995f; - auto_size_ctl.decrement = 1.0; /* disable size decrement */ + auto_size_ctl.decrement = 1.0f; /* disable size decrement */ auto_size_ctl.apply_max_decrement = TRUE; auto_size_ctl.max_decrement = (1 * 1024 * 1024); @@ -24530,7 +24534,7 @@ check_auto_cache_resize_disable(void) auto_size_ctl.epochs_before_eviction = 3; auto_size_ctl.apply_empty_reserve = TRUE; - auto_size_ctl.empty_reserve = 0.05; + auto_size_ctl.empty_reserve = 0.05f; result = H5C_set_cache_auto_resize_config(cache_ptr, &auto_size_ctl); @@ -24624,7 +24628,7 @@ check_auto_cache_resize_disable(void) auto_size_ctl.set_initial_size = TRUE; auto_size_ctl.initial_size = 4 * 1024 * 1024; - auto_size_ctl.min_clean_fraction = 0.5; + auto_size_ctl.min_clean_fraction = 0.5f; auto_size_ctl.max_size = 16 * 1024 * 1024; auto_size_ctl.min_size = 1 * 1024 * 1024; @@ -24634,23 +24638,23 @@ check_auto_cache_resize_disable(void) auto_size_ctl.incr_mode = H5C_incr__off; - auto_size_ctl.lower_hr_threshold = 0.75; + auto_size_ctl.lower_hr_threshold = 0.75f; - auto_size_ctl.increment = 2.0; + auto_size_ctl.increment = 2.0f; auto_size_ctl.apply_max_increment = TRUE; auto_size_ctl.max_increment = (2 * 1024 * 1024); auto_size_ctl.flash_incr_mode = H5C_flash_incr__off; - auto_size_ctl.flash_multiple = 2.0; - auto_size_ctl.flash_threshold = 0.5; + auto_size_ctl.flash_multiple = 2.0f; + auto_size_ctl.flash_threshold = 0.5f; auto_size_ctl.decr_mode = H5C_decr__off; - auto_size_ctl.upper_hr_threshold = 0.995; + auto_size_ctl.upper_hr_threshold = 0.995f; - auto_size_ctl.decrement = 0.5; + auto_size_ctl.decrement = 0.5f; auto_size_ctl.apply_max_decrement = TRUE; auto_size_ctl.max_decrement = (1 * 1024 * 1024); @@ -24658,7 +24662,7 @@ check_auto_cache_resize_disable(void) auto_size_ctl.epochs_before_eviction = 3; auto_size_ctl.apply_empty_reserve = TRUE; - auto_size_ctl.empty_reserve = 0.05; + auto_size_ctl.empty_reserve = 0.05f; result = H5C_set_cache_auto_resize_config(cache_ptr, &auto_size_ctl); @@ -24780,7 +24784,7 @@ check_auto_cache_resize_disable(void) auto_size_ctl.set_initial_size = TRUE; auto_size_ctl.initial_size = 64 * 1024; - auto_size_ctl.min_clean_fraction = 0.5; + auto_size_ctl.min_clean_fraction = 0.5f; auto_size_ctl.max_size = 256 * 1024; auto_size_ctl.min_size = 32 * 1024; @@ -24790,23 +24794,23 @@ check_auto_cache_resize_disable(void) auto_size_ctl.incr_mode = H5C_incr__threshold; - auto_size_ctl.lower_hr_threshold = 0.75; + auto_size_ctl.lower_hr_threshold = 0.75f; - auto_size_ctl.increment = 2.0; + auto_size_ctl.increment = 2.0f; auto_size_ctl.apply_max_increment = TRUE; auto_size_ctl.max_increment = (2 * 1024); auto_size_ctl.flash_incr_mode = H5C_flash_incr__off; - auto_size_ctl.flash_multiple = 1.0; - auto_size_ctl.flash_threshold = 0.25; + auto_size_ctl.flash_multiple = 1.0f; + auto_size_ctl.flash_threshold = 0.25f; auto_size_ctl.decr_mode = H5C_decr__age_out_with_threshold; - auto_size_ctl.upper_hr_threshold = 0.995; + auto_size_ctl.upper_hr_threshold = 0.995f; - auto_size_ctl.decrement = 0.5; + auto_size_ctl.decrement = 0.5f; auto_size_ctl.apply_max_decrement = TRUE; auto_size_ctl.max_decrement = (1 * 1024); @@ -24814,7 +24818,7 @@ check_auto_cache_resize_disable(void) auto_size_ctl.epochs_before_eviction = 3; auto_size_ctl.apply_empty_reserve = TRUE; - auto_size_ctl.empty_reserve = 0.05; + auto_size_ctl.empty_reserve = 0.05f; result = H5C_set_cache_auto_resize_config(cache_ptr, &auto_size_ctl); @@ -24966,7 +24970,7 @@ check_auto_cache_resize_epoch_markers(void) /* hbool_t set_initial_size = */ TRUE, /* size_t initial_size = */ (512 * 1024), - /* double min_clean_fraction = */ 0.5, + /* double min_clean_fraction = */ 0.5f, /* size_t max_size = */ (14 * 1024 * 1024), /* size_t min_size = */ (512 * 1024), @@ -24976,24 +24980,24 @@ check_auto_cache_resize_epoch_markers(void) /* enum H5C_cache_incr_mode incr_mode = */ H5C_incr__threshold, - /* double lower_hr_threshold = */ 0.75, + /* double lower_hr_threshold = */ 0.75f, - /* double increment = */ 2.0, + /* double increment = */ 2.0f, /* 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__off, - /* double flash_multiple = */ 2.0, - /* double flash_threshold = */ 0.5, + /* double flash_multiple = */ 2.0f, + /* double flash_threshold = */ 0.5f, /* enum H5C_cache_decr_mode decr_mode = */ H5C_decr__threshold, - /* double upper_hr_threshold = */ 0.995, + /* double upper_hr_threshold = */ 0.995f, - /* double decrement = */ 0.1, + /* double decrement = */ 0.1f, /* hbool_t apply_max_decrement = */ TRUE, /* size_t max_decrement = */ (1 * 1024 * 1024), @@ -25001,7 +25005,7 @@ check_auto_cache_resize_epoch_markers(void) /* int32_t epochs_before_eviction = */ 3, /* hbool_t apply_empty_reserve = */ TRUE, - /* double empty_reserve = */ 0.05 + /* double empty_reserve = */ 0.05f }; TESTING("automatic cache resize epoch marker management"); @@ -25054,7 +25058,7 @@ check_auto_cache_resize_epoch_markers(void) auto_size_ctl.set_initial_size = TRUE; auto_size_ctl.initial_size = 8 * 1024 * 1024; - auto_size_ctl.min_clean_fraction = 0.5; + auto_size_ctl.min_clean_fraction = 0.5f; auto_size_ctl.max_size = 8 * 1024 * 1024; auto_size_ctl.min_size = 512 * 1024; @@ -25064,23 +25068,23 @@ check_auto_cache_resize_epoch_markers(void) auto_size_ctl.incr_mode = H5C_incr__off; - auto_size_ctl.lower_hr_threshold = 0.75; + auto_size_ctl.lower_hr_threshold = 0.75f; - auto_size_ctl.increment = 2.0; + auto_size_ctl.increment = 2.0f; auto_size_ctl.apply_max_increment = TRUE; auto_size_ctl.max_increment = (4 * 1024 * 1024); auto_size_ctl.flash_incr_mode = H5C_flash_incr__off; - auto_size_ctl.flash_multiple = 2.0; - auto_size_ctl.flash_threshold = 0.5; + auto_size_ctl.flash_multiple = 2.0f; + auto_size_ctl.flash_threshold = 0.5f; auto_size_ctl.decr_mode = H5C_decr__age_out; - auto_size_ctl.upper_hr_threshold = 0.995; + auto_size_ctl.upper_hr_threshold = 0.995f; - auto_size_ctl.decrement = 0.5; + auto_size_ctl.decrement = 0.5f; auto_size_ctl.apply_max_decrement = FALSE; auto_size_ctl.max_decrement = (1 * 1024 * 1024); @@ -25088,7 +25092,7 @@ check_auto_cache_resize_epoch_markers(void) auto_size_ctl.epochs_before_eviction = 10; auto_size_ctl.apply_empty_reserve = FALSE; - auto_size_ctl.empty_reserve = 0.05; + auto_size_ctl.empty_reserve = 0.05f; result = H5C_set_cache_auto_resize_config(cache_ptr, &auto_size_ctl); @@ -25228,7 +25232,7 @@ check_auto_cache_resize_epoch_markers(void) auto_size_ctl.set_initial_size = TRUE; auto_size_ctl.initial_size = 8 * 1024 * 1024; - auto_size_ctl.min_clean_fraction = 0.5; + auto_size_ctl.min_clean_fraction = 0.5f; auto_size_ctl.max_size = 8 * 1024 * 1024; auto_size_ctl.min_size = 512 * 1024; @@ -25238,23 +25242,23 @@ check_auto_cache_resize_epoch_markers(void) auto_size_ctl.incr_mode = H5C_incr__off; - auto_size_ctl.lower_hr_threshold = 0.75; + auto_size_ctl.lower_hr_threshold = 0.75f; - auto_size_ctl.increment = 2.0; + auto_size_ctl.increment = 2.0f; auto_size_ctl.apply_max_increment = TRUE; auto_size_ctl.max_increment = (4 * 1024 * 1024); auto_size_ctl.flash_incr_mode = H5C_flash_incr__off; - auto_size_ctl.flash_multiple = 2.0; - auto_size_ctl.flash_threshold = 0.5; + auto_size_ctl.flash_multiple = 2.0f; + auto_size_ctl.flash_threshold = 0.5f; auto_size_ctl.decr_mode = H5C_decr__age_out; - auto_size_ctl.upper_hr_threshold = 0.995; + auto_size_ctl.upper_hr_threshold = 0.995f; - auto_size_ctl.decrement = 0.5; + auto_size_ctl.decrement = 0.5f; auto_size_ctl.apply_max_decrement = FALSE; auto_size_ctl.max_decrement = (1 * 1024 * 1024); @@ -25262,7 +25266,7 @@ check_auto_cache_resize_epoch_markers(void) auto_size_ctl.epochs_before_eviction = 1; auto_size_ctl.apply_empty_reserve = FALSE; - auto_size_ctl.empty_reserve = 0.05; + auto_size_ctl.empty_reserve = 0.05f; result = H5C_set_cache_auto_resize_config(cache_ptr, &auto_size_ctl); @@ -25349,7 +25353,7 @@ check_auto_cache_resize_epoch_markers(void) auto_size_ctl.set_initial_size = TRUE; auto_size_ctl.initial_size = 8 * 1024 * 1024; - auto_size_ctl.min_clean_fraction = 0.5; + auto_size_ctl.min_clean_fraction = 0.5f; auto_size_ctl.max_size = 8 * 1024 * 1024; auto_size_ctl.min_size = 512 * 1024; @@ -25359,23 +25363,23 @@ check_auto_cache_resize_epoch_markers(void) auto_size_ctl.incr_mode = H5C_incr__off; - auto_size_ctl.lower_hr_threshold = 0.75; + auto_size_ctl.lower_hr_threshold = 0.75f; - auto_size_ctl.increment = 2.0; + auto_size_ctl.increment = 2.0f; auto_size_ctl.apply_max_increment = TRUE; auto_size_ctl.max_increment = (4 * 1024 * 1024); auto_size_ctl.flash_incr_mode = H5C_flash_incr__off; - auto_size_ctl.flash_multiple = 2.0; - auto_size_ctl.flash_threshold = 0.5; + auto_size_ctl.flash_multiple = 2.0f; + auto_size_ctl.flash_threshold = 0.5f; auto_size_ctl.decr_mode = H5C_decr__threshold; - auto_size_ctl.upper_hr_threshold = 0.995; + auto_size_ctl.upper_hr_threshold = 0.995f; - auto_size_ctl.decrement = 0.5; + auto_size_ctl.decrement = 0.5f; auto_size_ctl.apply_max_decrement = FALSE; auto_size_ctl.max_decrement = (1 * 1024 * 1024); @@ -25383,7 +25387,7 @@ check_auto_cache_resize_epoch_markers(void) auto_size_ctl.epochs_before_eviction = 1; auto_size_ctl.apply_empty_reserve = FALSE; - auto_size_ctl.empty_reserve = 0.05; + auto_size_ctl.empty_reserve = 0.05f; result = H5C_set_cache_auto_resize_config(cache_ptr, &auto_size_ctl); @@ -25428,7 +25432,7 @@ check_auto_cache_resize_epoch_markers(void) auto_size_ctl.set_initial_size = TRUE; auto_size_ctl.initial_size = 8 * 1024 * 1024; - auto_size_ctl.min_clean_fraction = 0.5; + auto_size_ctl.min_clean_fraction = 0.5f; auto_size_ctl.max_size = 8 * 1024 * 1024; auto_size_ctl.min_size = 512 * 1024; @@ -25438,23 +25442,23 @@ check_auto_cache_resize_epoch_markers(void) auto_size_ctl.incr_mode = H5C_incr__off; - auto_size_ctl.lower_hr_threshold = 0.75; + auto_size_ctl.lower_hr_threshold = 0.75f; - auto_size_ctl.increment = 2.0; + auto_size_ctl.increment = 2.0f; auto_size_ctl.apply_max_increment = TRUE; auto_size_ctl.max_increment = (4 * 1024 * 1024); auto_size_ctl.flash_incr_mode = H5C_flash_incr__off; - auto_size_ctl.flash_multiple = 2.0; - auto_size_ctl.flash_threshold = 0.5; + auto_size_ctl.flash_multiple = 2.0f; + auto_size_ctl.flash_threshold = 0.5f; auto_size_ctl.decr_mode = H5C_decr__age_out_with_threshold; - auto_size_ctl.upper_hr_threshold = 0.995; + auto_size_ctl.upper_hr_threshold = 0.995f; - auto_size_ctl.decrement = 0.5; + auto_size_ctl.decrement = 0.5f; auto_size_ctl.apply_max_decrement = FALSE; auto_size_ctl.max_decrement = (1 * 1024 * 1024); @@ -25462,7 +25466,7 @@ check_auto_cache_resize_epoch_markers(void) auto_size_ctl.epochs_before_eviction = 10; auto_size_ctl.apply_empty_reserve = FALSE; - auto_size_ctl.empty_reserve = 0.05; + auto_size_ctl.empty_reserve = 0.05f; result = H5C_set_cache_auto_resize_config(cache_ptr, &auto_size_ctl); @@ -25541,7 +25545,7 @@ check_auto_cache_resize_epoch_markers(void) auto_size_ctl.set_initial_size = TRUE; auto_size_ctl.initial_size = 8 * 1024 * 1024; - auto_size_ctl.min_clean_fraction = 0.5; + auto_size_ctl.min_clean_fraction = 0.5f; auto_size_ctl.max_size = 8 * 1024 * 1024; auto_size_ctl.min_size = 512 * 1024; @@ -25551,23 +25555,23 @@ check_auto_cache_resize_epoch_markers(void) auto_size_ctl.incr_mode = H5C_incr__off; - auto_size_ctl.lower_hr_threshold = 0.75; + auto_size_ctl.lower_hr_threshold = 0.75f; - auto_size_ctl.increment = 2.0; + auto_size_ctl.increment = 2.0f; auto_size_ctl.apply_max_increment = TRUE; auto_size_ctl.max_increment = (4 * 1024 * 1024); auto_size_ctl.flash_incr_mode = H5C_flash_incr__off; - auto_size_ctl.flash_multiple = 2.0; - auto_size_ctl.flash_threshold = 0.5; + auto_size_ctl.flash_multiple = 2.0f; + auto_size_ctl.flash_threshold = 0.5f; auto_size_ctl.decr_mode = H5C_decr__off; - auto_size_ctl.upper_hr_threshold = 0.995; + auto_size_ctl.upper_hr_threshold = 0.995f; - auto_size_ctl.decrement = 0.5; + auto_size_ctl.decrement = 0.5f; auto_size_ctl.apply_max_decrement = FALSE; auto_size_ctl.max_decrement = (1 * 1024 * 1024); @@ -25575,7 +25579,7 @@ check_auto_cache_resize_epoch_markers(void) auto_size_ctl.epochs_before_eviction = 10; auto_size_ctl.apply_empty_reserve = FALSE; - auto_size_ctl.empty_reserve = 0.05; + auto_size_ctl.empty_reserve = 0.05f; result = H5C_set_cache_auto_resize_config(cache_ptr, &auto_size_ctl); @@ -25672,7 +25676,7 @@ check_auto_cache_resize_input_errs(void) /* hbool_t set_initial_size = */ TRUE, /* size_t initial_size = */ (512 * 1024), - /* double min_clean_fraction = */ 0.5, + /* double min_clean_fraction = */ 0.5f, /* size_t max_size = */ (16 * 1024 * 1024), /* size_t min_size = */ (512 * 1024), @@ -25682,24 +25686,24 @@ check_auto_cache_resize_input_errs(void) /* enum H5C_cache_incr_mode incr_mode = */ H5C_incr__threshold, - /* double lower_hr_threshold = */ 0.75, + /* double lower_hr_threshold = */ 0.75f, - /* double increment = */ 2.0, + /* double increment = */ 2.0f, /* 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__off, - /* double flash_multiple = */ 2.0, - /* double flash_threshold = */ 0.5, + /* double flash_multiple = */ 2.0f, + /* double flash_threshold = */ 0.5f, /* enum H5C_cache_decr_mode decr_mode = */ H5C_decr__threshold, - /* double upper_hr_threshold = */ 0.995, + /* double upper_hr_threshold = */ 0.995f, - /* double decrement = */ 0.1, + /* double decrement = */ 0.1f, /* hbool_t apply_max_decrement = */ TRUE, /* size_t max_decrement = */ (1 * 1024 * 1024), @@ -25707,7 +25711,7 @@ check_auto_cache_resize_input_errs(void) /* int32_t epochs_before_eviction = */ 3, /* hbool_t apply_empty_reserve = */ TRUE, - /* double empty_reserve = */ 0.05 + /* double empty_reserve = */ 0.05f }; H5C_auto_size_ctl_t invalid_auto_size_ctl; @@ -25779,7 +25783,7 @@ check_auto_cache_resize_input_errs(void) invalid_auto_size_ctl.set_initial_size = TRUE; invalid_auto_size_ctl.initial_size = 4 * 1024 * 1024; - invalid_auto_size_ctl.min_clean_fraction = 0.5; + invalid_auto_size_ctl.min_clean_fraction = 0.5f; invalid_auto_size_ctl.max_size = 16 * 1024 * 1024; invalid_auto_size_ctl.min_size = 1 * 1024 * 1024; @@ -25789,23 +25793,23 @@ check_auto_cache_resize_input_errs(void) invalid_auto_size_ctl.incr_mode = H5C_incr__threshold; - invalid_auto_size_ctl.lower_hr_threshold = 0.7; + invalid_auto_size_ctl.lower_hr_threshold = 0.7f; - invalid_auto_size_ctl.increment = 2.0; + invalid_auto_size_ctl.increment = 2.0f; invalid_auto_size_ctl.apply_max_increment = TRUE; invalid_auto_size_ctl.max_increment = (2 * 1024 * 1024); invalid_auto_size_ctl.flash_incr_mode = H5C_flash_incr__off; - invalid_auto_size_ctl.flash_multiple = 2.0; - invalid_auto_size_ctl.flash_threshold = 0.5; + invalid_auto_size_ctl.flash_multiple = 2.0f; + invalid_auto_size_ctl.flash_threshold = 0.5f; invalid_auto_size_ctl.decr_mode = H5C_decr__threshold; - invalid_auto_size_ctl.upper_hr_threshold = 0.999; + invalid_auto_size_ctl.upper_hr_threshold = 0.999f; - invalid_auto_size_ctl.decrement = 0.5; + invalid_auto_size_ctl.decrement = 0.5f; invalid_auto_size_ctl.apply_max_decrement = TRUE; invalid_auto_size_ctl.max_decrement = (1 * 1024 * 1024); @@ -25813,7 +25817,7 @@ check_auto_cache_resize_input_errs(void) invalid_auto_size_ctl.epochs_before_eviction = 3; invalid_auto_size_ctl.apply_empty_reserve = TRUE; - invalid_auto_size_ctl.empty_reserve = 0.05; + invalid_auto_size_ctl.empty_reserve = 0.05f; result = H5C_set_cache_auto_resize_config(NULL, &invalid_auto_size_ctl); @@ -25854,7 +25858,7 @@ check_auto_cache_resize_input_errs(void) invalid_auto_size_ctl.set_initial_size = TRUE; invalid_auto_size_ctl.initial_size = 4 * 1024 * 1024; - invalid_auto_size_ctl.min_clean_fraction = 0.5; + invalid_auto_size_ctl.min_clean_fraction = 0.5f; invalid_auto_size_ctl.max_size = 16 * 1024 * 1024; invalid_auto_size_ctl.min_size = 1 * 1024 * 1024; @@ -25864,23 +25868,23 @@ check_auto_cache_resize_input_errs(void) invalid_auto_size_ctl.incr_mode = H5C_incr__threshold; - invalid_auto_size_ctl.lower_hr_threshold = 0.7; + invalid_auto_size_ctl.lower_hr_threshold = 0.7f; - invalid_auto_size_ctl.increment = 2.0; + invalid_auto_size_ctl.increment = 2.0f; invalid_auto_size_ctl.apply_max_increment = TRUE; invalid_auto_size_ctl.max_increment = (2 * 1024 * 1024); invalid_auto_size_ctl.flash_incr_mode = H5C_flash_incr__off; - invalid_auto_size_ctl.flash_multiple = 2.0; - invalid_auto_size_ctl.flash_threshold = 0.5; + invalid_auto_size_ctl.flash_multiple = 2.0f; + invalid_auto_size_ctl.flash_threshold = 0.5f; invalid_auto_size_ctl.decr_mode = H5C_decr__threshold; - invalid_auto_size_ctl.upper_hr_threshold = 0.999; + invalid_auto_size_ctl.upper_hr_threshold = 0.999f; - invalid_auto_size_ctl.decrement = 0.5; + invalid_auto_size_ctl.decrement = 0.5f; invalid_auto_size_ctl.apply_max_decrement = TRUE; invalid_auto_size_ctl.max_decrement = (1 * 1024 * 1024); @@ -25888,7 +25892,7 @@ check_auto_cache_resize_input_errs(void) invalid_auto_size_ctl.epochs_before_eviction = 3; invalid_auto_size_ctl.apply_empty_reserve = TRUE; - invalid_auto_size_ctl.empty_reserve = 0.05; + invalid_auto_size_ctl.empty_reserve = 0.05f; result = H5C_set_cache_auto_resize_config(cache_ptr, &invalid_auto_size_ctl); @@ -25930,7 +25934,7 @@ check_auto_cache_resize_input_errs(void) invalid_auto_size_ctl.initial_size = 16 * 1024 * 1024 + 1; /* INVALID */ - invalid_auto_size_ctl.min_clean_fraction = 0.5; + invalid_auto_size_ctl.min_clean_fraction = 0.5f; invalid_auto_size_ctl.max_size = 16 * 1024 * 1024; invalid_auto_size_ctl.min_size = 1 * 1024 * 1024; @@ -25940,23 +25944,23 @@ check_auto_cache_resize_input_errs(void) invalid_auto_size_ctl.incr_mode = H5C_incr__threshold; - invalid_auto_size_ctl.lower_hr_threshold = 0.75; + invalid_auto_size_ctl.lower_hr_threshold = 0.75f; - invalid_auto_size_ctl.increment = 2.0; + invalid_auto_size_ctl.increment = 2.0f; invalid_auto_size_ctl.apply_max_increment = TRUE; invalid_auto_size_ctl.max_increment = (2 * 1024 * 1024); invalid_auto_size_ctl.flash_incr_mode = H5C_flash_incr__off; - invalid_auto_size_ctl.flash_multiple = 2.0; - invalid_auto_size_ctl.flash_threshold = 0.5; + invalid_auto_size_ctl.flash_multiple = 2.0f; + invalid_auto_size_ctl.flash_threshold = 0.5f; invalid_auto_size_ctl.decr_mode = H5C_decr__threshold; - invalid_auto_size_ctl.upper_hr_threshold = 0.999; + invalid_auto_size_ctl.upper_hr_threshold = 0.999f; - invalid_auto_size_ctl.decrement = 0.5; + invalid_auto_size_ctl.decrement = 0.5f; invalid_auto_size_ctl.apply_max_decrement = TRUE; invalid_auto_size_ctl.max_decrement = (1 * 1024 * 1024); @@ -25964,7 +25968,7 @@ check_auto_cache_resize_input_errs(void) invalid_auto_size_ctl.epochs_before_eviction = 3; invalid_auto_size_ctl.apply_empty_reserve = TRUE; - invalid_auto_size_ctl.empty_reserve = 0.05; + invalid_auto_size_ctl.empty_reserve = 0.05f; result = H5C_set_cache_auto_resize_config(cache_ptr, &invalid_auto_size_ctl); @@ -26003,7 +26007,7 @@ check_auto_cache_resize_input_errs(void) invalid_auto_size_ctl.initial_size = 1 * 1024 * 1024 - 1; /* INVALID */ - invalid_auto_size_ctl.min_clean_fraction = 0.5; + invalid_auto_size_ctl.min_clean_fraction = 0.5f; invalid_auto_size_ctl.max_size = 16 * 1024 * 1024; invalid_auto_size_ctl.min_size = 1 * 1024 * 1024; @@ -26013,23 +26017,23 @@ check_auto_cache_resize_input_errs(void) invalid_auto_size_ctl.incr_mode = H5C_incr__threshold; - invalid_auto_size_ctl.lower_hr_threshold = 0.75; + invalid_auto_size_ctl.lower_hr_threshold = 0.75f; - invalid_auto_size_ctl.increment = 2.0; + invalid_auto_size_ctl.increment = 2.0f; invalid_auto_size_ctl.apply_max_increment = TRUE; invalid_auto_size_ctl.max_increment = (2 * 1024 * 1024); invalid_auto_size_ctl.flash_incr_mode = H5C_flash_incr__off; - invalid_auto_size_ctl.flash_multiple = 2.0; - invalid_auto_size_ctl.flash_threshold = 0.5; + invalid_auto_size_ctl.flash_multiple = 2.0f; + invalid_auto_size_ctl.flash_threshold = 0.5f; invalid_auto_size_ctl.decr_mode = H5C_decr__threshold; - invalid_auto_size_ctl.upper_hr_threshold = 0.999; + invalid_auto_size_ctl.upper_hr_threshold = 0.999f; - invalid_auto_size_ctl.decrement = 0.5; + invalid_auto_size_ctl.decrement = 0.5f; invalid_auto_size_ctl.apply_max_decrement = TRUE; invalid_auto_size_ctl.max_decrement = (1 * 1024 * 1024); @@ -26037,7 +26041,7 @@ check_auto_cache_resize_input_errs(void) invalid_auto_size_ctl.epochs_before_eviction = 3; invalid_auto_size_ctl.apply_empty_reserve = TRUE; - invalid_auto_size_ctl.empty_reserve = 0.05; + invalid_auto_size_ctl.empty_reserve = 0.05f; result = H5C_set_cache_auto_resize_config(cache_ptr, &invalid_auto_size_ctl); @@ -26078,7 +26082,7 @@ check_auto_cache_resize_input_errs(void) invalid_auto_size_ctl.set_initial_size = TRUE; invalid_auto_size_ctl.initial_size = 4 * 1024 * 1024; - invalid_auto_size_ctl.min_clean_fraction = 1.00001; /* INVALID */ + invalid_auto_size_ctl.min_clean_fraction = 1.00001f; /* INVALID */ invalid_auto_size_ctl.max_size = 16 * 1024 * 1024; invalid_auto_size_ctl.min_size = 1 * 1024 * 1024; @@ -26088,23 +26092,23 @@ check_auto_cache_resize_input_errs(void) invalid_auto_size_ctl.incr_mode = H5C_incr__threshold; - invalid_auto_size_ctl.lower_hr_threshold = 0.75; + invalid_auto_size_ctl.lower_hr_threshold = 0.75f; - invalid_auto_size_ctl.increment = 2.0; + invalid_auto_size_ctl.increment = 2.0f; invalid_auto_size_ctl.apply_max_increment = TRUE; invalid_auto_size_ctl.max_increment = (2 * 1024 * 1024); invalid_auto_size_ctl.flash_incr_mode = H5C_flash_incr__off; - invalid_auto_size_ctl.flash_multiple = 2.0; - invalid_auto_size_ctl.flash_threshold = 0.5; + invalid_auto_size_ctl.flash_multiple = 2.0f; + invalid_auto_size_ctl.flash_threshold = 0.5f; invalid_auto_size_ctl.decr_mode = H5C_decr__threshold; - invalid_auto_size_ctl.upper_hr_threshold = 0.999; + invalid_auto_size_ctl.upper_hr_threshold = 0.999f; - invalid_auto_size_ctl.decrement = 0.5; + invalid_auto_size_ctl.decrement = 0.5f; invalid_auto_size_ctl.apply_max_decrement = TRUE; invalid_auto_size_ctl.max_decrement = (1 * 1024 * 1024); @@ -26112,7 +26116,7 @@ check_auto_cache_resize_input_errs(void) invalid_auto_size_ctl.epochs_before_eviction = 3; invalid_auto_size_ctl.apply_empty_reserve = TRUE; - invalid_auto_size_ctl.empty_reserve = 0.05; + invalid_auto_size_ctl.empty_reserve = 0.05f; result = H5C_set_cache_auto_resize_config(cache_ptr, &invalid_auto_size_ctl); @@ -26150,7 +26154,7 @@ check_auto_cache_resize_input_errs(void) invalid_auto_size_ctl.set_initial_size = TRUE; invalid_auto_size_ctl.initial_size = 4 * 1024 * 1024; - invalid_auto_size_ctl.min_clean_fraction = -0.00001; /* INVALID */ + invalid_auto_size_ctl.min_clean_fraction = -0.00001f; /* INVALID */ invalid_auto_size_ctl.max_size = 16 * 1024 * 1024; invalid_auto_size_ctl.min_size = 1 * 1024 * 1024; @@ -26160,23 +26164,23 @@ check_auto_cache_resize_input_errs(void) invalid_auto_size_ctl.incr_mode = H5C_incr__threshold; - invalid_auto_size_ctl.lower_hr_threshold = 0.75; + invalid_auto_size_ctl.lower_hr_threshold = 0.75f; - invalid_auto_size_ctl.increment = 2.0; + invalid_auto_size_ctl.increment = 2.0f; invalid_auto_size_ctl.apply_max_increment = TRUE; invalid_auto_size_ctl.max_increment = (2 * 1024 * 1024); invalid_auto_size_ctl.flash_incr_mode = H5C_flash_incr__off; - invalid_auto_size_ctl.flash_multiple = 2.0; - invalid_auto_size_ctl.flash_threshold = 0.5; + invalid_auto_size_ctl.flash_multiple = 2.0f; + invalid_auto_size_ctl.flash_threshold = 0.5f; invalid_auto_size_ctl.decr_mode = H5C_decr__threshold; - invalid_auto_size_ctl.upper_hr_threshold = 0.999; + invalid_auto_size_ctl.upper_hr_threshold = 0.999f; - invalid_auto_size_ctl.decrement = 0.5; + invalid_auto_size_ctl.decrement = 0.5f; invalid_auto_size_ctl.apply_max_decrement = TRUE; invalid_auto_size_ctl.max_decrement = (1 * 1024 * 1024); @@ -26184,7 +26188,7 @@ check_auto_cache_resize_input_errs(void) invalid_auto_size_ctl.epochs_before_eviction = 3; invalid_auto_size_ctl.apply_empty_reserve = TRUE; - invalid_auto_size_ctl.empty_reserve = 0.05; + invalid_auto_size_ctl.empty_reserve = 0.05f; result = H5C_set_cache_auto_resize_config(cache_ptr, &invalid_auto_size_ctl); @@ -26225,7 +26229,7 @@ check_auto_cache_resize_input_errs(void) invalid_auto_size_ctl.set_initial_size = TRUE; invalid_auto_size_ctl.initial_size = 4 * 1024 * 1024; - invalid_auto_size_ctl.min_clean_fraction = 0.5; + invalid_auto_size_ctl.min_clean_fraction = 0.5f; invalid_auto_size_ctl.max_size = H5C__MAX_MAX_CACHE_SIZE + 1; /* INVALID */ @@ -26236,23 +26240,23 @@ check_auto_cache_resize_input_errs(void) invalid_auto_size_ctl.incr_mode = H5C_incr__threshold; - invalid_auto_size_ctl.lower_hr_threshold = 0.75; + invalid_auto_size_ctl.lower_hr_threshold = 0.75f; - invalid_auto_size_ctl.increment = 2.0; + invalid_auto_size_ctl.increment = 2.0f; invalid_auto_size_ctl.apply_max_increment = TRUE; invalid_auto_size_ctl.max_increment = (2 * 1024 * 1024); invalid_auto_size_ctl.flash_incr_mode = H5C_flash_incr__off; - invalid_auto_size_ctl.flash_multiple = 2.0; - invalid_auto_size_ctl.flash_threshold = 0.5; + invalid_auto_size_ctl.flash_multiple = 2.0f; + invalid_auto_size_ctl.flash_threshold = 0.5f; invalid_auto_size_ctl.decr_mode = H5C_decr__threshold; - invalid_auto_size_ctl.upper_hr_threshold = 0.999; + invalid_auto_size_ctl.upper_hr_threshold = 0.999f; - invalid_auto_size_ctl.decrement = 0.5; + invalid_auto_size_ctl.decrement = 0.5f; invalid_auto_size_ctl.apply_max_decrement = TRUE; invalid_auto_size_ctl.max_decrement = (1 * 1024 * 1024); @@ -26260,7 +26264,7 @@ check_auto_cache_resize_input_errs(void) invalid_auto_size_ctl.epochs_before_eviction = 3; invalid_auto_size_ctl.apply_empty_reserve = TRUE; - invalid_auto_size_ctl.empty_reserve = 0.05; + invalid_auto_size_ctl.empty_reserve = 0.05f; result = H5C_set_cache_auto_resize_config(cache_ptr, &invalid_auto_size_ctl); @@ -26298,7 +26302,7 @@ check_auto_cache_resize_input_errs(void) invalid_auto_size_ctl.set_initial_size = TRUE; invalid_auto_size_ctl.initial_size = 4 * 1024 * 1024; - invalid_auto_size_ctl.min_clean_fraction = 0.5; + invalid_auto_size_ctl.min_clean_fraction = 0.5f; invalid_auto_size_ctl.max_size = 1 * 1024 * 1024;/* INVALID */ invalid_auto_size_ctl.min_size = 1 * 1024 * 1024 + 1;/*PAIR */ @@ -26308,23 +26312,23 @@ check_auto_cache_resize_input_errs(void) invalid_auto_size_ctl.incr_mode = H5C_incr__threshold; - invalid_auto_size_ctl.lower_hr_threshold = 0.75; + invalid_auto_size_ctl.lower_hr_threshold = 0.75f; - invalid_auto_size_ctl.increment = 2.0; + invalid_auto_size_ctl.increment = 2.0f; invalid_auto_size_ctl.apply_max_increment = TRUE; invalid_auto_size_ctl.max_increment = (2 * 1024 * 1024); invalid_auto_size_ctl.flash_incr_mode = H5C_flash_incr__off; - invalid_auto_size_ctl.flash_multiple = 2.0; - invalid_auto_size_ctl.flash_threshold = 0.5; + invalid_auto_size_ctl.flash_multiple = 2.0f; + invalid_auto_size_ctl.flash_threshold = 0.5f; invalid_auto_size_ctl.decr_mode = H5C_decr__threshold; - invalid_auto_size_ctl.upper_hr_threshold = 0.999; + invalid_auto_size_ctl.upper_hr_threshold = 0.999f; - invalid_auto_size_ctl.decrement = 0.5; + invalid_auto_size_ctl.decrement = 0.5f; invalid_auto_size_ctl.apply_max_decrement = TRUE; invalid_auto_size_ctl.max_decrement = (1 * 1024 * 1024); @@ -26332,7 +26336,7 @@ check_auto_cache_resize_input_errs(void) invalid_auto_size_ctl.epochs_before_eviction = 3; invalid_auto_size_ctl.apply_empty_reserve = TRUE; - invalid_auto_size_ctl.empty_reserve = 0.05; + invalid_auto_size_ctl.empty_reserve = 0.05f; result = H5C_set_cache_auto_resize_config(cache_ptr, &invalid_auto_size_ctl); @@ -26370,7 +26374,7 @@ check_auto_cache_resize_input_errs(void) invalid_auto_size_ctl.set_initial_size = TRUE; invalid_auto_size_ctl.initial_size = 4 * 1024 * 1024; - invalid_auto_size_ctl.min_clean_fraction = 0.5; + invalid_auto_size_ctl.min_clean_fraction = 0.5f; invalid_auto_size_ctl.max_size = 16 * 1024 * 1024; invalid_auto_size_ctl.min_size = H5C__MIN_MAX_CACHE_SIZE - 1; @@ -26380,23 +26384,23 @@ check_auto_cache_resize_input_errs(void) invalid_auto_size_ctl.incr_mode = H5C_incr__threshold; - invalid_auto_size_ctl.lower_hr_threshold = 0.75; + invalid_auto_size_ctl.lower_hr_threshold = 0.75f; - invalid_auto_size_ctl.increment = 2.0; + invalid_auto_size_ctl.increment = 2.0f; invalid_auto_size_ctl.apply_max_increment = TRUE; invalid_auto_size_ctl.max_increment = (2 * 1024 * 1024); invalid_auto_size_ctl.flash_incr_mode = H5C_flash_incr__off; - invalid_auto_size_ctl.flash_multiple = 2.0; - invalid_auto_size_ctl.flash_threshold = 0.5; + invalid_auto_size_ctl.flash_multiple = 2.0f; + invalid_auto_size_ctl.flash_threshold = 0.5f; invalid_auto_size_ctl.decr_mode = H5C_decr__threshold; - invalid_auto_size_ctl.upper_hr_threshold = 0.999; + invalid_auto_size_ctl.upper_hr_threshold = 0.999f; - invalid_auto_size_ctl.decrement = 0.5; + invalid_auto_size_ctl.decrement = 0.5f; invalid_auto_size_ctl.apply_max_decrement = TRUE; invalid_auto_size_ctl.max_decrement = (1 * 1024 * 1024); @@ -26404,7 +26408,7 @@ check_auto_cache_resize_input_errs(void) invalid_auto_size_ctl.epochs_before_eviction = 3; invalid_auto_size_ctl.apply_empty_reserve = TRUE; - invalid_auto_size_ctl.empty_reserve = 0.05; + invalid_auto_size_ctl.empty_reserve = 0.05f; result = H5C_set_cache_auto_resize_config(cache_ptr, &invalid_auto_size_ctl); @@ -26445,7 +26449,7 @@ check_auto_cache_resize_input_errs(void) invalid_auto_size_ctl.set_initial_size = TRUE; invalid_auto_size_ctl.initial_size = 4 * 1024 * 1024; - invalid_auto_size_ctl.min_clean_fraction = 0.1; + invalid_auto_size_ctl.min_clean_fraction = 0.1f; invalid_auto_size_ctl.max_size = 16 * 1024 * 1024; invalid_auto_size_ctl.min_size = 1 * 1024 * 1024; @@ -26455,23 +26459,23 @@ check_auto_cache_resize_input_errs(void) invalid_auto_size_ctl.incr_mode = H5C_incr__threshold; - invalid_auto_size_ctl.lower_hr_threshold = 0.75; + invalid_auto_size_ctl.lower_hr_threshold = 0.75f; - invalid_auto_size_ctl.increment = 2.0; + invalid_auto_size_ctl.increment = 2.0f; invalid_auto_size_ctl.apply_max_increment = TRUE; invalid_auto_size_ctl.max_increment = (2 * 1024 * 1024); invalid_auto_size_ctl.flash_incr_mode = H5C_flash_incr__off; - invalid_auto_size_ctl.flash_multiple = 2.0; - invalid_auto_size_ctl.flash_threshold = 0.5; + invalid_auto_size_ctl.flash_multiple = 2.0f; + invalid_auto_size_ctl.flash_threshold = 0.5f; invalid_auto_size_ctl.decr_mode = H5C_decr__threshold; - invalid_auto_size_ctl.upper_hr_threshold = 0.999; + invalid_auto_size_ctl.upper_hr_threshold = 0.999f; - invalid_auto_size_ctl.decrement = 0.9; + invalid_auto_size_ctl.decrement = 0.9f; invalid_auto_size_ctl.apply_max_decrement = TRUE; invalid_auto_size_ctl.max_decrement = (1 * 1024 * 1024); @@ -26479,7 +26483,7 @@ check_auto_cache_resize_input_errs(void) invalid_auto_size_ctl.epochs_before_eviction = 3; invalid_auto_size_ctl.apply_empty_reserve = TRUE; - invalid_auto_size_ctl.empty_reserve = 0.05; + invalid_auto_size_ctl.empty_reserve = 0.05f; result = H5C_set_cache_auto_resize_config(cache_ptr, &invalid_auto_size_ctl); @@ -26517,7 +26521,7 @@ check_auto_cache_resize_input_errs(void) invalid_auto_size_ctl.set_initial_size = TRUE; invalid_auto_size_ctl.initial_size = 4 * 1024 * 1024; - invalid_auto_size_ctl.min_clean_fraction = 0.1; + invalid_auto_size_ctl.min_clean_fraction = 0.1f; invalid_auto_size_ctl.max_size = 16 * 1024 * 1024; invalid_auto_size_ctl.min_size = 1 * 1024 * 1024; @@ -26527,23 +26531,23 @@ check_auto_cache_resize_input_errs(void) invalid_auto_size_ctl.incr_mode = H5C_incr__threshold; - invalid_auto_size_ctl.lower_hr_threshold = 0.75; + invalid_auto_size_ctl.lower_hr_threshold = 0.75f; - invalid_auto_size_ctl.increment = 2.0; + invalid_auto_size_ctl.increment = 2.0f; invalid_auto_size_ctl.apply_max_increment = TRUE; invalid_auto_size_ctl.max_increment = (2 * 1024 * 1024); invalid_auto_size_ctl.flash_incr_mode = H5C_flash_incr__off; - invalid_auto_size_ctl.flash_multiple = 2.0; - invalid_auto_size_ctl.flash_threshold = 0.5; + invalid_auto_size_ctl.flash_multiple = 2.0f; + invalid_auto_size_ctl.flash_threshold = 0.5f; invalid_auto_size_ctl.decr_mode = H5C_decr__threshold; - invalid_auto_size_ctl.upper_hr_threshold = 0.999; + invalid_auto_size_ctl.upper_hr_threshold = 0.999f; - invalid_auto_size_ctl.decrement = 0.9; + invalid_auto_size_ctl.decrement = 0.9f; invalid_auto_size_ctl.apply_max_decrement = TRUE; invalid_auto_size_ctl.max_decrement = (1 * 1024 * 1024); @@ -26551,7 +26555,7 @@ check_auto_cache_resize_input_errs(void) invalid_auto_size_ctl.epochs_before_eviction = 3; invalid_auto_size_ctl.apply_empty_reserve = TRUE; - invalid_auto_size_ctl.empty_reserve = 0.05; + invalid_auto_size_ctl.empty_reserve = 0.05f; result = H5C_set_cache_auto_resize_config(cache_ptr, &invalid_auto_size_ctl); @@ -26592,7 +26596,7 @@ check_auto_cache_resize_input_errs(void) invalid_auto_size_ctl.set_initial_size = TRUE; invalid_auto_size_ctl.initial_size = 4 * 1024 * 1024; - invalid_auto_size_ctl.min_clean_fraction = 0.1; + invalid_auto_size_ctl.min_clean_fraction = 0.1f; invalid_auto_size_ctl.max_size = 16 * 1024 * 1024; invalid_auto_size_ctl.min_size = 1 * 1024 * 1024; @@ -26603,23 +26607,23 @@ check_auto_cache_resize_input_errs(void) invalid_auto_size_ctl.incr_mode = (enum H5C_cache_incr_mode) -1; /* INVALID */ - invalid_auto_size_ctl.lower_hr_threshold = 0.75; + invalid_auto_size_ctl.lower_hr_threshold = 0.75f; - invalid_auto_size_ctl.increment = 2.0; + invalid_auto_size_ctl.increment = 2.0f; invalid_auto_size_ctl.apply_max_increment = TRUE; invalid_auto_size_ctl.max_increment = (2 * 1024 * 1024); invalid_auto_size_ctl.flash_incr_mode = H5C_flash_incr__off; - invalid_auto_size_ctl.flash_multiple = 2.0; - invalid_auto_size_ctl.flash_threshold = 0.5; + invalid_auto_size_ctl.flash_multiple = 2.0f; + invalid_auto_size_ctl.flash_threshold = 0.5f; invalid_auto_size_ctl.decr_mode = H5C_decr__threshold; - invalid_auto_size_ctl.upper_hr_threshold = 0.999; + invalid_auto_size_ctl.upper_hr_threshold = 0.999f; - invalid_auto_size_ctl.decrement = 0.9; + invalid_auto_size_ctl.decrement = 0.9f; invalid_auto_size_ctl.apply_max_decrement = TRUE; invalid_auto_size_ctl.max_decrement = (1 * 1024 * 1024); @@ -26627,7 +26631,7 @@ check_auto_cache_resize_input_errs(void) invalid_auto_size_ctl.epochs_before_eviction = 3; invalid_auto_size_ctl.apply_empty_reserve = TRUE; - invalid_auto_size_ctl.empty_reserve = 0.05; + invalid_auto_size_ctl.empty_reserve = 0.05f; result = H5C_set_cache_auto_resize_config(cache_ptr, &invalid_auto_size_ctl); @@ -26665,7 +26669,7 @@ check_auto_cache_resize_input_errs(void) invalid_auto_size_ctl.set_initial_size = TRUE; invalid_auto_size_ctl.initial_size = 4 * 1024 * 1024; - invalid_auto_size_ctl.min_clean_fraction = 0.1; + invalid_auto_size_ctl.min_clean_fraction = 0.1f; invalid_auto_size_ctl.max_size = 16 * 1024 * 1024; invalid_auto_size_ctl.min_size = 1 * 1024 * 1024; @@ -26676,23 +26680,23 @@ check_auto_cache_resize_input_errs(void) invalid_auto_size_ctl.incr_mode = (enum H5C_cache_incr_mode) 2; /* INVALID */ - invalid_auto_size_ctl.lower_hr_threshold = 0.75; + invalid_auto_size_ctl.lower_hr_threshold = 0.75f; - invalid_auto_size_ctl.increment = 2.0; + invalid_auto_size_ctl.increment = 2.0f; invalid_auto_size_ctl.apply_max_increment = TRUE; invalid_auto_size_ctl.max_increment = (2 * 1024 * 1024); invalid_auto_size_ctl.flash_incr_mode = H5C_flash_incr__off; - invalid_auto_size_ctl.flash_multiple = 2.0; - invalid_auto_size_ctl.flash_threshold = 0.5; + invalid_auto_size_ctl.flash_multiple = 2.0f; + invalid_auto_size_ctl.flash_threshold = 0.5f; invalid_auto_size_ctl.decr_mode = H5C_decr__threshold; - invalid_auto_size_ctl.upper_hr_threshold = 0.999; + invalid_auto_size_ctl.upper_hr_threshold = 0.999f; - invalid_auto_size_ctl.decrement = 0.9; + invalid_auto_size_ctl.decrement = 0.9f; invalid_auto_size_ctl.apply_max_decrement = TRUE; invalid_auto_size_ctl.max_decrement = (1 * 1024 * 1024); @@ -26700,7 +26704,7 @@ check_auto_cache_resize_input_errs(void) invalid_auto_size_ctl.epochs_before_eviction = 3; invalid_auto_size_ctl.apply_empty_reserve = TRUE; - invalid_auto_size_ctl.empty_reserve = 0.05; + invalid_auto_size_ctl.empty_reserve = 0.05f; result = H5C_set_cache_auto_resize_config(cache_ptr, &invalid_auto_size_ctl); @@ -26741,7 +26745,7 @@ check_auto_cache_resize_input_errs(void) invalid_auto_size_ctl.set_initial_size = TRUE; invalid_auto_size_ctl.initial_size = 4 * 1024 * 1024; - invalid_auto_size_ctl.min_clean_fraction = 0.5; + invalid_auto_size_ctl.min_clean_fraction = 0.5f; invalid_auto_size_ctl.max_size = 16 * 1024 * 1024; invalid_auto_size_ctl.min_size = 1 * 1024 * 1024; @@ -26751,23 +26755,23 @@ check_auto_cache_resize_input_errs(void) invalid_auto_size_ctl.incr_mode = H5C_incr__threshold; - invalid_auto_size_ctl.lower_hr_threshold = 0.7; + invalid_auto_size_ctl.lower_hr_threshold = 0.7f; - invalid_auto_size_ctl.increment = 2.0; + invalid_auto_size_ctl.increment = 2.0f; invalid_auto_size_ctl.apply_max_increment = TRUE; invalid_auto_size_ctl.max_increment = (2 * 1024 * 1024); invalid_auto_size_ctl.flash_incr_mode = H5C_flash_incr__off; - invalid_auto_size_ctl.flash_multiple = 2.0; - invalid_auto_size_ctl.flash_threshold = 0.5; + invalid_auto_size_ctl.flash_multiple = 2.0f; + invalid_auto_size_ctl.flash_threshold = 0.5f; invalid_auto_size_ctl.decr_mode = H5C_decr__threshold; - invalid_auto_size_ctl.upper_hr_threshold = 1.01; /* INVALID */ + invalid_auto_size_ctl.upper_hr_threshold = 1.01f; /* INVALID */ - invalid_auto_size_ctl.decrement = 0.5; + invalid_auto_size_ctl.decrement = 0.5f; invalid_auto_size_ctl.apply_max_decrement = TRUE; invalid_auto_size_ctl.max_decrement = (1 * 1024 * 1024); @@ -26775,7 +26779,7 @@ check_auto_cache_resize_input_errs(void) invalid_auto_size_ctl.epochs_before_eviction = 3; invalid_auto_size_ctl.apply_empty_reserve = TRUE; - invalid_auto_size_ctl.empty_reserve = 0.05; + invalid_auto_size_ctl.empty_reserve = 0.05f; result = H5C_set_cache_auto_resize_config(cache_ptr, &invalid_auto_size_ctl); @@ -26813,7 +26817,7 @@ check_auto_cache_resize_input_errs(void) invalid_auto_size_ctl.set_initial_size = TRUE; invalid_auto_size_ctl.initial_size = 4 * 1024 * 1024; - invalid_auto_size_ctl.min_clean_fraction = 0.5; + invalid_auto_size_ctl.min_clean_fraction = 0.5f; invalid_auto_size_ctl.max_size = 16 * 1024 * 1024; invalid_auto_size_ctl.min_size = 1 * 1024 * 1024; @@ -26823,23 +26827,23 @@ check_auto_cache_resize_input_errs(void) invalid_auto_size_ctl.incr_mode = H5C_incr__threshold; - invalid_auto_size_ctl.lower_hr_threshold = 0.8; /* INVALID */ + invalid_auto_size_ctl.lower_hr_threshold = 0.8f; /* INVALID */ - invalid_auto_size_ctl.increment = 2.0; + invalid_auto_size_ctl.increment = 2.0f; invalid_auto_size_ctl.apply_max_increment = TRUE; invalid_auto_size_ctl.max_increment = (2 * 1024 * 1024); invalid_auto_size_ctl.flash_incr_mode = H5C_flash_incr__off; - invalid_auto_size_ctl.flash_multiple = 2.0; - invalid_auto_size_ctl.flash_threshold = 0.5; + invalid_auto_size_ctl.flash_multiple = 2.0f; + invalid_auto_size_ctl.flash_threshold = 0.5f; invalid_auto_size_ctl.decr_mode = H5C_decr__threshold; - invalid_auto_size_ctl.upper_hr_threshold = 0.7; /* INVALID */ + invalid_auto_size_ctl.upper_hr_threshold = 0.7f; /* INVALID */ - invalid_auto_size_ctl.decrement = 0.5; + invalid_auto_size_ctl.decrement = 0.5f; invalid_auto_size_ctl.apply_max_decrement = TRUE; invalid_auto_size_ctl.max_decrement = (1 * 1024 * 1024); @@ -26847,7 +26851,7 @@ check_auto_cache_resize_input_errs(void) invalid_auto_size_ctl.epochs_before_eviction = 3; invalid_auto_size_ctl.apply_empty_reserve = TRUE; - invalid_auto_size_ctl.empty_reserve = 0.05; + invalid_auto_size_ctl.empty_reserve = 0.05f; result = H5C_set_cache_auto_resize_config(cache_ptr, &invalid_auto_size_ctl); @@ -26885,7 +26889,7 @@ check_auto_cache_resize_input_errs(void) invalid_auto_size_ctl.set_initial_size = TRUE; invalid_auto_size_ctl.initial_size = 4 * 1024 * 1024; - invalid_auto_size_ctl.min_clean_fraction = 0.5; + invalid_auto_size_ctl.min_clean_fraction = 0.5f; invalid_auto_size_ctl.max_size = 16 * 1024 * 1024; invalid_auto_size_ctl.min_size = 1 * 1024 * 1024; @@ -26895,23 +26899,23 @@ check_auto_cache_resize_input_errs(void) invalid_auto_size_ctl.incr_mode = H5C_incr__threshold; - invalid_auto_size_ctl.lower_hr_threshold = -0.0001; /* INVALID */ + invalid_auto_size_ctl.lower_hr_threshold = -0.0001f; /* INVALID */ - invalid_auto_size_ctl.increment = 2.0; + invalid_auto_size_ctl.increment = 2.0f; invalid_auto_size_ctl.apply_max_increment = TRUE; invalid_auto_size_ctl.max_increment = (2 * 1024 * 1024); invalid_auto_size_ctl.flash_incr_mode = H5C_flash_incr__off; - invalid_auto_size_ctl.flash_multiple = 2.0; - invalid_auto_size_ctl.flash_threshold = 0.5; + invalid_auto_size_ctl.flash_multiple = 2.0f; + invalid_auto_size_ctl.flash_threshold = 0.5f; invalid_auto_size_ctl.decr_mode = H5C_decr__threshold; - invalid_auto_size_ctl.upper_hr_threshold = 0.999; + invalid_auto_size_ctl.upper_hr_threshold = 0.999f; - invalid_auto_size_ctl.decrement = 0.5; + invalid_auto_size_ctl.decrement = 0.5f; invalid_auto_size_ctl.apply_max_decrement = TRUE; invalid_auto_size_ctl.max_decrement = (1 * 1024 * 1024); @@ -26919,7 +26923,7 @@ check_auto_cache_resize_input_errs(void) invalid_auto_size_ctl.epochs_before_eviction = 3; invalid_auto_size_ctl.apply_empty_reserve = TRUE; - invalid_auto_size_ctl.empty_reserve = 0.05; + invalid_auto_size_ctl.empty_reserve = 0.05f; result = H5C_set_cache_auto_resize_config(cache_ptr, &invalid_auto_size_ctl); @@ -26960,7 +26964,7 @@ check_auto_cache_resize_input_errs(void) invalid_auto_size_ctl.set_initial_size = TRUE; invalid_auto_size_ctl.initial_size = 4 * 1024 * 1024; - invalid_auto_size_ctl.min_clean_fraction = 0.1; + invalid_auto_size_ctl.min_clean_fraction = 0.1f; invalid_auto_size_ctl.max_size = 16 * 1024 * 1024; invalid_auto_size_ctl.min_size = 1 * 1024 * 1024; @@ -26970,23 +26974,23 @@ check_auto_cache_resize_input_errs(void) invalid_auto_size_ctl.incr_mode = H5C_incr__threshold; - invalid_auto_size_ctl.lower_hr_threshold = 0.75; + invalid_auto_size_ctl.lower_hr_threshold = 0.75f; - invalid_auto_size_ctl.increment = 0.99999; /* INVALID */ + invalid_auto_size_ctl.increment = 0.99999f; /* INVALID */ invalid_auto_size_ctl.apply_max_increment = TRUE; invalid_auto_size_ctl.max_increment = (2 * 1024 * 1024); invalid_auto_size_ctl.flash_incr_mode = H5C_flash_incr__off; - invalid_auto_size_ctl.flash_multiple = 2.0; - invalid_auto_size_ctl.flash_threshold = 0.5; + invalid_auto_size_ctl.flash_multiple = 2.0f; + invalid_auto_size_ctl.flash_threshold = 0.5f; invalid_auto_size_ctl.decr_mode = H5C_decr__threshold; - invalid_auto_size_ctl.upper_hr_threshold = 0.999; + invalid_auto_size_ctl.upper_hr_threshold = 0.999f; - invalid_auto_size_ctl.decrement = 0.5; + invalid_auto_size_ctl.decrement = 0.5f; invalid_auto_size_ctl.apply_max_decrement = TRUE; invalid_auto_size_ctl.max_decrement = (1 * 1024 * 1024); @@ -26994,7 +26998,7 @@ check_auto_cache_resize_input_errs(void) invalid_auto_size_ctl.epochs_before_eviction = 3; invalid_auto_size_ctl.apply_empty_reserve = TRUE; - invalid_auto_size_ctl.empty_reserve = 0.05; + invalid_auto_size_ctl.empty_reserve = 0.05f; result = H5C_set_cache_auto_resize_config(cache_ptr, &invalid_auto_size_ctl); @@ -27035,7 +27039,7 @@ check_auto_cache_resize_input_errs(void) invalid_auto_size_ctl.set_initial_size = TRUE; invalid_auto_size_ctl.initial_size = 4 * 1024 * 1024; - invalid_auto_size_ctl.min_clean_fraction = 0.1; + invalid_auto_size_ctl.min_clean_fraction = 0.1f; invalid_auto_size_ctl.max_size = 16 * 1024 * 1024; invalid_auto_size_ctl.min_size = 1 * 1024 * 1024; @@ -27045,24 +27049,24 @@ check_auto_cache_resize_input_errs(void) invalid_auto_size_ctl.incr_mode = H5C_incr__threshold; - invalid_auto_size_ctl.lower_hr_threshold = 0.75; + invalid_auto_size_ctl.lower_hr_threshold = 0.75f; - invalid_auto_size_ctl.increment = 2.0; + invalid_auto_size_ctl.increment = 2.0f; invalid_auto_size_ctl.apply_max_increment = TRUE; invalid_auto_size_ctl.max_increment = (2 * 1024 * 1024); invalid_auto_size_ctl.flash_incr_mode = (enum H5C_cache_flash_incr_mode) -1; /* INVALID */ - invalid_auto_size_ctl.flash_multiple = 2.0; - invalid_auto_size_ctl.flash_threshold = 0.5; + invalid_auto_size_ctl.flash_multiple = 2.0f; + invalid_auto_size_ctl.flash_threshold = 0.5f; invalid_auto_size_ctl.decr_mode = H5C_decr__threshold; - invalid_auto_size_ctl.upper_hr_threshold = 0.999; + invalid_auto_size_ctl.upper_hr_threshold = 0.999f; - invalid_auto_size_ctl.decrement = 0.9; + invalid_auto_size_ctl.decrement = 0.9f; invalid_auto_size_ctl.apply_max_decrement = TRUE; invalid_auto_size_ctl.max_decrement = (1 * 1024 * 1024); @@ -27070,7 +27074,7 @@ check_auto_cache_resize_input_errs(void) invalid_auto_size_ctl.epochs_before_eviction = 3; invalid_auto_size_ctl.apply_empty_reserve = TRUE; - invalid_auto_size_ctl.empty_reserve = 0.05; + invalid_auto_size_ctl.empty_reserve = 0.05f; result = H5C_set_cache_auto_resize_config(cache_ptr, &invalid_auto_size_ctl); @@ -27110,7 +27114,7 @@ check_auto_cache_resize_input_errs(void) invalid_auto_size_ctl.set_initial_size = TRUE; invalid_auto_size_ctl.initial_size = 4 * 1024 * 1024; - invalid_auto_size_ctl.min_clean_fraction = 0.1; + invalid_auto_size_ctl.min_clean_fraction = 0.1f; invalid_auto_size_ctl.max_size = 16 * 1024 * 1024; invalid_auto_size_ctl.min_size = 1 * 1024 * 1024; @@ -27120,24 +27124,24 @@ check_auto_cache_resize_input_errs(void) invalid_auto_size_ctl.incr_mode = H5C_incr__threshold; - invalid_auto_size_ctl.lower_hr_threshold = 0.75; + invalid_auto_size_ctl.lower_hr_threshold = 0.75f; - invalid_auto_size_ctl.increment = 2.0; + invalid_auto_size_ctl.increment = 2.0f; invalid_auto_size_ctl.apply_max_increment = TRUE; invalid_auto_size_ctl.max_increment = (2 * 1024 * 1024); invalid_auto_size_ctl.flash_incr_mode = H5C_flash_incr__add_space; - invalid_auto_size_ctl.flash_multiple = 0.09; /* INVALID */ - invalid_auto_size_ctl.flash_threshold = 0.5; + invalid_auto_size_ctl.flash_multiple = 0.09f; /* INVALID */ + invalid_auto_size_ctl.flash_threshold = 0.5f; invalid_auto_size_ctl.decr_mode = H5C_decr__threshold; - invalid_auto_size_ctl.upper_hr_threshold = 0.999; + invalid_auto_size_ctl.upper_hr_threshold = 0.999f; - invalid_auto_size_ctl.decrement = 0.9; + invalid_auto_size_ctl.decrement = 0.9f; invalid_auto_size_ctl.apply_max_decrement = TRUE; invalid_auto_size_ctl.max_decrement = (1 * 1024 * 1024); @@ -27145,7 +27149,7 @@ check_auto_cache_resize_input_errs(void) invalid_auto_size_ctl.epochs_before_eviction = 3; invalid_auto_size_ctl.apply_empty_reserve = TRUE; - invalid_auto_size_ctl.empty_reserve = 0.05; + invalid_auto_size_ctl.empty_reserve = 0.05f; result = H5C_set_cache_auto_resize_config(cache_ptr, &invalid_auto_size_ctl); @@ -27183,7 +27187,7 @@ check_auto_cache_resize_input_errs(void) invalid_auto_size_ctl.set_initial_size = TRUE; invalid_auto_size_ctl.initial_size = 4 * 1024 * 1024; - invalid_auto_size_ctl.min_clean_fraction = 0.1; + invalid_auto_size_ctl.min_clean_fraction = 0.1f; invalid_auto_size_ctl.max_size = 16 * 1024 * 1024; invalid_auto_size_ctl.min_size = 1 * 1024 * 1024; @@ -27193,24 +27197,24 @@ check_auto_cache_resize_input_errs(void) invalid_auto_size_ctl.incr_mode = H5C_incr__threshold; - invalid_auto_size_ctl.lower_hr_threshold = 0.75; + invalid_auto_size_ctl.lower_hr_threshold = 0.75f; - invalid_auto_size_ctl.increment = 2.0; + invalid_auto_size_ctl.increment = 2.0f; invalid_auto_size_ctl.apply_max_increment = TRUE; invalid_auto_size_ctl.max_increment = (2 * 1024 * 1024); invalid_auto_size_ctl.flash_incr_mode = H5C_flash_incr__add_space; - invalid_auto_size_ctl.flash_multiple = 10.01; /* INVALID */ - invalid_auto_size_ctl.flash_threshold = 0.5; + invalid_auto_size_ctl.flash_multiple = 10.01f; /* INVALID */ + invalid_auto_size_ctl.flash_threshold = 0.5f; invalid_auto_size_ctl.decr_mode = H5C_decr__threshold; - invalid_auto_size_ctl.upper_hr_threshold = 0.999; + invalid_auto_size_ctl.upper_hr_threshold = 0.999f; - invalid_auto_size_ctl.decrement = 0.9; + invalid_auto_size_ctl.decrement = 0.9f; invalid_auto_size_ctl.apply_max_decrement = TRUE; invalid_auto_size_ctl.max_decrement = (1 * 1024 * 1024); @@ -27218,7 +27222,7 @@ check_auto_cache_resize_input_errs(void) invalid_auto_size_ctl.epochs_before_eviction = 3; invalid_auto_size_ctl.apply_empty_reserve = TRUE; - invalid_auto_size_ctl.empty_reserve = 0.05; + invalid_auto_size_ctl.empty_reserve = 0.05f; result = H5C_set_cache_auto_resize_config(cache_ptr, &invalid_auto_size_ctl); @@ -27258,7 +27262,7 @@ check_auto_cache_resize_input_errs(void) invalid_auto_size_ctl.set_initial_size = TRUE; invalid_auto_size_ctl.initial_size = 4 * 1024 * 1024; - invalid_auto_size_ctl.min_clean_fraction = 0.1; + invalid_auto_size_ctl.min_clean_fraction = 0.1f; invalid_auto_size_ctl.max_size = 16 * 1024 * 1024; invalid_auto_size_ctl.min_size = 1 * 1024 * 1024; @@ -27268,24 +27272,24 @@ check_auto_cache_resize_input_errs(void) invalid_auto_size_ctl.incr_mode = H5C_incr__threshold; - invalid_auto_size_ctl.lower_hr_threshold = 0.75; + invalid_auto_size_ctl.lower_hr_threshold = 0.75f; - invalid_auto_size_ctl.increment = 2.0; + invalid_auto_size_ctl.increment = 2.0f; invalid_auto_size_ctl.apply_max_increment = TRUE; invalid_auto_size_ctl.max_increment = (2 * 1024 * 1024); invalid_auto_size_ctl.flash_incr_mode = H5C_flash_incr__add_space; - invalid_auto_size_ctl.flash_multiple = 1.0; - invalid_auto_size_ctl.flash_threshold = 0.09; /* INVALID */ + invalid_auto_size_ctl.flash_multiple = 1.0f; + invalid_auto_size_ctl.flash_threshold = 0.09f; /* INVALID */ invalid_auto_size_ctl.decr_mode = H5C_decr__threshold; - invalid_auto_size_ctl.upper_hr_threshold = 0.999; + invalid_auto_size_ctl.upper_hr_threshold = 0.999f; - invalid_auto_size_ctl.decrement = 0.9; + invalid_auto_size_ctl.decrement = 0.9f; invalid_auto_size_ctl.apply_max_decrement = TRUE; invalid_auto_size_ctl.max_decrement = (1 * 1024 * 1024); @@ -27293,7 +27297,7 @@ check_auto_cache_resize_input_errs(void) invalid_auto_size_ctl.epochs_before_eviction = 3; invalid_auto_size_ctl.apply_empty_reserve = TRUE; - invalid_auto_size_ctl.empty_reserve = 0.05; + invalid_auto_size_ctl.empty_reserve = 0.05f; result = H5C_set_cache_auto_resize_config(cache_ptr, &invalid_auto_size_ctl); @@ -27331,7 +27335,7 @@ check_auto_cache_resize_input_errs(void) invalid_auto_size_ctl.set_initial_size = TRUE; invalid_auto_size_ctl.initial_size = 4 * 1024 * 1024; - invalid_auto_size_ctl.min_clean_fraction = 0.1; + invalid_auto_size_ctl.min_clean_fraction = 0.1f; invalid_auto_size_ctl.max_size = 16 * 1024 * 1024; invalid_auto_size_ctl.min_size = 1 * 1024 * 1024; @@ -27341,24 +27345,24 @@ check_auto_cache_resize_input_errs(void) invalid_auto_size_ctl.incr_mode = H5C_incr__threshold; - invalid_auto_size_ctl.lower_hr_threshold = 0.75; + invalid_auto_size_ctl.lower_hr_threshold = 0.75f; - invalid_auto_size_ctl.increment = 2.0; + invalid_auto_size_ctl.increment = 2.0f; invalid_auto_size_ctl.apply_max_increment = TRUE; invalid_auto_size_ctl.max_increment = (2 * 1024 * 1024); invalid_auto_size_ctl.flash_incr_mode = H5C_flash_incr__add_space; - invalid_auto_size_ctl.flash_multiple = 1.0; - invalid_auto_size_ctl.flash_threshold = 1.001; /* INVALID */ + invalid_auto_size_ctl.flash_multiple = 1.0f; + invalid_auto_size_ctl.flash_threshold = 1.001f; /* INVALID */ invalid_auto_size_ctl.decr_mode = H5C_decr__threshold; - invalid_auto_size_ctl.upper_hr_threshold = 0.999; + invalid_auto_size_ctl.upper_hr_threshold = 0.999f; - invalid_auto_size_ctl.decrement = 0.9; + invalid_auto_size_ctl.decrement = 0.9f; invalid_auto_size_ctl.apply_max_decrement = TRUE; invalid_auto_size_ctl.max_decrement = (1 * 1024 * 1024); @@ -27366,7 +27370,7 @@ check_auto_cache_resize_input_errs(void) invalid_auto_size_ctl.epochs_before_eviction = 3; invalid_auto_size_ctl.apply_empty_reserve = TRUE; - invalid_auto_size_ctl.empty_reserve = 0.05; + invalid_auto_size_ctl.empty_reserve = 0.05f; result = H5C_set_cache_auto_resize_config(cache_ptr, &invalid_auto_size_ctl); @@ -27407,7 +27411,7 @@ check_auto_cache_resize_input_errs(void) invalid_auto_size_ctl.set_initial_size = TRUE; invalid_auto_size_ctl.initial_size = 4 * 1024 * 1024; - invalid_auto_size_ctl.min_clean_fraction = 0.1; + invalid_auto_size_ctl.min_clean_fraction = 0.1f; invalid_auto_size_ctl.max_size = 16 * 1024 * 1024; invalid_auto_size_ctl.min_size = 1 * 1024 * 1024; @@ -27417,24 +27421,24 @@ check_auto_cache_resize_input_errs(void) invalid_auto_size_ctl.incr_mode = H5C_incr__threshold; - invalid_auto_size_ctl.lower_hr_threshold = 0.75; + invalid_auto_size_ctl.lower_hr_threshold = 0.75f; - invalid_auto_size_ctl.increment = 2.0; + invalid_auto_size_ctl.increment = 2.0f; invalid_auto_size_ctl.apply_max_increment = TRUE; invalid_auto_size_ctl.max_increment = (2 * 1024 * 1024); invalid_auto_size_ctl.flash_incr_mode = H5C_flash_incr__off; - invalid_auto_size_ctl.flash_multiple = 2.0; - invalid_auto_size_ctl.flash_threshold = 0.5; + invalid_auto_size_ctl.flash_multiple = 2.0f; + invalid_auto_size_ctl.flash_threshold = 0.5f; invalid_auto_size_ctl.decr_mode = (enum H5C_cache_decr_mode) -1; /* INVALID */ - invalid_auto_size_ctl.upper_hr_threshold = 0.999; + invalid_auto_size_ctl.upper_hr_threshold = 0.999f; - invalid_auto_size_ctl.decrement = 0.9; + invalid_auto_size_ctl.decrement = 0.9f; invalid_auto_size_ctl.apply_max_decrement = TRUE; invalid_auto_size_ctl.max_decrement = (1 * 1024 * 1024); @@ -27442,7 +27446,7 @@ check_auto_cache_resize_input_errs(void) invalid_auto_size_ctl.epochs_before_eviction = 3; invalid_auto_size_ctl.apply_empty_reserve = TRUE; - invalid_auto_size_ctl.empty_reserve = 0.05; + invalid_auto_size_ctl.empty_reserve = 0.05f; result = H5C_set_cache_auto_resize_config(cache_ptr, &invalid_auto_size_ctl); @@ -27480,7 +27484,7 @@ check_auto_cache_resize_input_errs(void) invalid_auto_size_ctl.set_initial_size = TRUE; invalid_auto_size_ctl.initial_size = 4 * 1024 * 1024; - invalid_auto_size_ctl.min_clean_fraction = 0.1; + invalid_auto_size_ctl.min_clean_fraction = 0.1f; invalid_auto_size_ctl.max_size = 16 * 1024 * 1024; invalid_auto_size_ctl.min_size = 1 * 1024 * 1024; @@ -27490,24 +27494,24 @@ check_auto_cache_resize_input_errs(void) invalid_auto_size_ctl.incr_mode = H5C_incr__threshold; - invalid_auto_size_ctl.lower_hr_threshold = 0.75; + invalid_auto_size_ctl.lower_hr_threshold = 0.75f; - invalid_auto_size_ctl.increment = 2.0; + invalid_auto_size_ctl.increment = 2.0f; invalid_auto_size_ctl.apply_max_increment = TRUE; invalid_auto_size_ctl.max_increment = (2 * 1024 * 1024); invalid_auto_size_ctl.flash_incr_mode = H5C_flash_incr__off; - invalid_auto_size_ctl.flash_multiple = 2.0; - invalid_auto_size_ctl.flash_threshold = 0.5; + invalid_auto_size_ctl.flash_multiple = 2.0f; + invalid_auto_size_ctl.flash_threshold = 0.5f; invalid_auto_size_ctl.decr_mode = (enum H5C_cache_decr_mode) 4; /* INVALID */ - invalid_auto_size_ctl.upper_hr_threshold = 0.999; + invalid_auto_size_ctl.upper_hr_threshold = 0.999f; - invalid_auto_size_ctl.decrement = 0.9; + invalid_auto_size_ctl.decrement = 0.9f; invalid_auto_size_ctl.apply_max_decrement = TRUE; invalid_auto_size_ctl.max_decrement = (1 * 1024 * 1024); @@ -27515,7 +27519,7 @@ check_auto_cache_resize_input_errs(void) invalid_auto_size_ctl.epochs_before_eviction = 3; invalid_auto_size_ctl.apply_empty_reserve = TRUE; - invalid_auto_size_ctl.empty_reserve = 0.05; + invalid_auto_size_ctl.empty_reserve = 0.05f; result = H5C_set_cache_auto_resize_config(cache_ptr, &invalid_auto_size_ctl); @@ -27556,7 +27560,7 @@ check_auto_cache_resize_input_errs(void) invalid_auto_size_ctl.set_initial_size = TRUE; invalid_auto_size_ctl.initial_size = 4 * 1024 * 1024; - invalid_auto_size_ctl.min_clean_fraction = 0.1; + invalid_auto_size_ctl.min_clean_fraction = 0.1f; invalid_auto_size_ctl.max_size = 16 * 1024 * 1024; invalid_auto_size_ctl.min_size = 1 * 1024 * 1024; @@ -27566,23 +27570,23 @@ check_auto_cache_resize_input_errs(void) invalid_auto_size_ctl.incr_mode = H5C_incr__threshold; - invalid_auto_size_ctl.lower_hr_threshold = 0.75; + invalid_auto_size_ctl.lower_hr_threshold = 0.75f; - invalid_auto_size_ctl.increment = 2.0; + invalid_auto_size_ctl.increment = 2.0f; invalid_auto_size_ctl.apply_max_increment = TRUE; invalid_auto_size_ctl.max_increment = (2 * 1024 * 1024); invalid_auto_size_ctl.flash_incr_mode = H5C_flash_incr__off; - invalid_auto_size_ctl.flash_multiple = 2.0; - invalid_auto_size_ctl.flash_threshold = 0.5; + invalid_auto_size_ctl.flash_multiple = 2.0f; + invalid_auto_size_ctl.flash_threshold = 0.5f; invalid_auto_size_ctl.decr_mode = H5C_decr__threshold; - invalid_auto_size_ctl.upper_hr_threshold = 0.999; + invalid_auto_size_ctl.upper_hr_threshold = 0.999f; - invalid_auto_size_ctl.decrement = 1.000001; /* INVALID */ + invalid_auto_size_ctl.decrement = 1.000001f; /* INVALID */ invalid_auto_size_ctl.apply_max_decrement = TRUE; invalid_auto_size_ctl.max_decrement = (1 * 1024 * 1024); @@ -27590,7 +27594,7 @@ check_auto_cache_resize_input_errs(void) invalid_auto_size_ctl.epochs_before_eviction = 3; invalid_auto_size_ctl.apply_empty_reserve = TRUE; - invalid_auto_size_ctl.empty_reserve = 0.05; + invalid_auto_size_ctl.empty_reserve = 0.05f; result = H5C_set_cache_auto_resize_config(cache_ptr, &invalid_auto_size_ctl); @@ -27628,7 +27632,7 @@ check_auto_cache_resize_input_errs(void) invalid_auto_size_ctl.set_initial_size = TRUE; invalid_auto_size_ctl.initial_size = 4 * 1024 * 1024; - invalid_auto_size_ctl.min_clean_fraction = 0.1; + invalid_auto_size_ctl.min_clean_fraction = 0.1f; invalid_auto_size_ctl.max_size = 16 * 1024 * 1024; invalid_auto_size_ctl.min_size = 1 * 1024 * 1024; @@ -27638,23 +27642,23 @@ check_auto_cache_resize_input_errs(void) invalid_auto_size_ctl.incr_mode = H5C_incr__threshold; - invalid_auto_size_ctl.lower_hr_threshold = 0.75; + invalid_auto_size_ctl.lower_hr_threshold = 0.75f; - invalid_auto_size_ctl.increment = 2.0; + invalid_auto_size_ctl.increment = 2.0f; invalid_auto_size_ctl.apply_max_increment = TRUE; invalid_auto_size_ctl.max_increment = (2 * 1024 * 1024); invalid_auto_size_ctl.flash_incr_mode = H5C_flash_incr__off; - invalid_auto_size_ctl.flash_multiple = 2.0; - invalid_auto_size_ctl.flash_threshold = 0.5; + invalid_auto_size_ctl.flash_multiple = 2.0f; + invalid_auto_size_ctl.flash_threshold = 0.5f; invalid_auto_size_ctl.decr_mode = H5C_decr__threshold; - invalid_auto_size_ctl.upper_hr_threshold = 0.999; + invalid_auto_size_ctl.upper_hr_threshold = 0.999f; - invalid_auto_size_ctl.decrement = -0.000001; /* INVALID */ + invalid_auto_size_ctl.decrement = -0.000001f; /* INVALID */ invalid_auto_size_ctl.apply_max_decrement = TRUE; invalid_auto_size_ctl.max_decrement = (1 * 1024 * 1024); @@ -27662,7 +27666,7 @@ check_auto_cache_resize_input_errs(void) invalid_auto_size_ctl.epochs_before_eviction = 3; invalid_auto_size_ctl.apply_empty_reserve = TRUE; - invalid_auto_size_ctl.empty_reserve = 0.05; + invalid_auto_size_ctl.empty_reserve = 0.05f; result = H5C_set_cache_auto_resize_config(cache_ptr, &invalid_auto_size_ctl); @@ -27703,7 +27707,7 @@ check_auto_cache_resize_input_errs(void) invalid_auto_size_ctl.set_initial_size = TRUE; invalid_auto_size_ctl.initial_size = 4 * 1024 * 1024; - invalid_auto_size_ctl.min_clean_fraction = 0.1; + invalid_auto_size_ctl.min_clean_fraction = 0.1f; invalid_auto_size_ctl.max_size = 16 * 1024 * 1024; invalid_auto_size_ctl.min_size = 1 * 1024 * 1024; @@ -27713,23 +27717,23 @@ check_auto_cache_resize_input_errs(void) invalid_auto_size_ctl.incr_mode = H5C_incr__threshold; - invalid_auto_size_ctl.lower_hr_threshold = 0.75; + invalid_auto_size_ctl.lower_hr_threshold = 0.75f; - invalid_auto_size_ctl.increment = 2.0; + invalid_auto_size_ctl.increment = 2.0f; invalid_auto_size_ctl.apply_max_increment = TRUE; invalid_auto_size_ctl.max_increment = (2 * 1024 * 1024); invalid_auto_size_ctl.flash_incr_mode = H5C_flash_incr__off; - invalid_auto_size_ctl.flash_multiple = 2.0; - invalid_auto_size_ctl.flash_threshold = 0.5; + invalid_auto_size_ctl.flash_multiple = 2.0f; + invalid_auto_size_ctl.flash_threshold = 0.5f; invalid_auto_size_ctl.decr_mode = H5C_decr__age_out; - invalid_auto_size_ctl.upper_hr_threshold = 0.999; + invalid_auto_size_ctl.upper_hr_threshold = 0.999f; - invalid_auto_size_ctl.decrement = 0.9; + invalid_auto_size_ctl.decrement = 0.9f; invalid_auto_size_ctl.apply_max_decrement = TRUE; invalid_auto_size_ctl.max_decrement = (1 * 1024 * 1024); @@ -27737,7 +27741,7 @@ check_auto_cache_resize_input_errs(void) invalid_auto_size_ctl.epochs_before_eviction = 0; /* INVALID */ invalid_auto_size_ctl.apply_empty_reserve = TRUE; - invalid_auto_size_ctl.empty_reserve = 0.05; + invalid_auto_size_ctl.empty_reserve = 0.05f; result = H5C_set_cache_auto_resize_config(cache_ptr, &invalid_auto_size_ctl); @@ -27774,7 +27778,7 @@ check_auto_cache_resize_input_errs(void) invalid_auto_size_ctl.set_initial_size = TRUE; invalid_auto_size_ctl.initial_size = 4 * 1024 * 1024; - invalid_auto_size_ctl.min_clean_fraction = 0.1; + invalid_auto_size_ctl.min_clean_fraction = 0.1f; invalid_auto_size_ctl.max_size = 16 * 1024 * 1024; invalid_auto_size_ctl.min_size = 1 * 1024 * 1024; @@ -27784,23 +27788,23 @@ check_auto_cache_resize_input_errs(void) invalid_auto_size_ctl.incr_mode = H5C_incr__threshold; - invalid_auto_size_ctl.lower_hr_threshold = 0.75; + invalid_auto_size_ctl.lower_hr_threshold = 0.75f; - invalid_auto_size_ctl.increment = 2.0; + invalid_auto_size_ctl.increment = 2.0f; invalid_auto_size_ctl.apply_max_increment = TRUE; invalid_auto_size_ctl.max_increment = (2 * 1024 * 1024); invalid_auto_size_ctl.flash_incr_mode = H5C_flash_incr__off; - invalid_auto_size_ctl.flash_multiple = 2.0; - invalid_auto_size_ctl.flash_threshold = 0.5; + invalid_auto_size_ctl.flash_multiple = 2.0f; + invalid_auto_size_ctl.flash_threshold = 0.5f; invalid_auto_size_ctl.decr_mode = H5C_decr__age_out_with_threshold; - invalid_auto_size_ctl.upper_hr_threshold = 0.999; + invalid_auto_size_ctl.upper_hr_threshold = 0.999f; - invalid_auto_size_ctl.decrement = 0.9; + invalid_auto_size_ctl.decrement = 0.9f; invalid_auto_size_ctl.apply_max_decrement = TRUE; invalid_auto_size_ctl.max_decrement = (1 * 1024 * 1024); @@ -27809,7 +27813,7 @@ check_auto_cache_resize_input_errs(void) H5C__MAX_EPOCH_MARKERS + 1; /* INVALID */ invalid_auto_size_ctl.apply_empty_reserve = TRUE; - invalid_auto_size_ctl.empty_reserve = 0.05; + invalid_auto_size_ctl.empty_reserve = 0.05f; result = H5C_set_cache_auto_resize_config(cache_ptr, &invalid_auto_size_ctl); @@ -27849,7 +27853,7 @@ check_auto_cache_resize_input_errs(void) invalid_auto_size_ctl.set_initial_size = TRUE; invalid_auto_size_ctl.initial_size = 4 * 1024 * 1024; - invalid_auto_size_ctl.min_clean_fraction = 0.1; + invalid_auto_size_ctl.min_clean_fraction = 0.1f; invalid_auto_size_ctl.max_size = 16 * 1024 * 1024; invalid_auto_size_ctl.min_size = 1 * 1024 * 1024; @@ -27859,23 +27863,23 @@ check_auto_cache_resize_input_errs(void) invalid_auto_size_ctl.incr_mode = H5C_incr__threshold; - invalid_auto_size_ctl.lower_hr_threshold = 0.75; + invalid_auto_size_ctl.lower_hr_threshold = 0.75f; - invalid_auto_size_ctl.increment = 2.0; + invalid_auto_size_ctl.increment = 2.0f; invalid_auto_size_ctl.apply_max_increment = TRUE; invalid_auto_size_ctl.max_increment = (2 * 1024 * 1024); invalid_auto_size_ctl.flash_incr_mode = H5C_flash_incr__off; - invalid_auto_size_ctl.flash_multiple = 2.0; - invalid_auto_size_ctl.flash_threshold = 0.5; + invalid_auto_size_ctl.flash_multiple = 2.0f; + invalid_auto_size_ctl.flash_threshold = 0.5f; invalid_auto_size_ctl.decr_mode = H5C_decr__age_out; - invalid_auto_size_ctl.upper_hr_threshold = 0.999; + invalid_auto_size_ctl.upper_hr_threshold = 0.999f; - invalid_auto_size_ctl.decrement = 0.9; + invalid_auto_size_ctl.decrement = 0.9f; invalid_auto_size_ctl.apply_max_decrement = TRUE; invalid_auto_size_ctl.max_decrement = (1 * 1024 * 1024); @@ -27883,7 +27887,7 @@ check_auto_cache_resize_input_errs(void) invalid_auto_size_ctl.epochs_before_eviction = 3; invalid_auto_size_ctl.apply_empty_reserve = TRUE; - invalid_auto_size_ctl.empty_reserve = -0.0000001; /* INVALID */ + invalid_auto_size_ctl.empty_reserve = -0.0000001f; /* INVALID */ result = H5C_set_cache_auto_resize_config(cache_ptr, &invalid_auto_size_ctl); @@ -27920,7 +27924,7 @@ check_auto_cache_resize_input_errs(void) invalid_auto_size_ctl.set_initial_size = TRUE; invalid_auto_size_ctl.initial_size = 4 * 1024 * 1024; - invalid_auto_size_ctl.min_clean_fraction = 0.1; + invalid_auto_size_ctl.min_clean_fraction = 0.1f; invalid_auto_size_ctl.max_size = 16 * 1024 * 1024; invalid_auto_size_ctl.min_size = 1 * 1024 * 1024; @@ -27930,23 +27934,23 @@ check_auto_cache_resize_input_errs(void) invalid_auto_size_ctl.incr_mode = H5C_incr__threshold; - invalid_auto_size_ctl.lower_hr_threshold = 0.75; + invalid_auto_size_ctl.lower_hr_threshold = 0.75f; - invalid_auto_size_ctl.increment = 2.0; + invalid_auto_size_ctl.increment = 2.0f; invalid_auto_size_ctl.apply_max_increment = TRUE; invalid_auto_size_ctl.max_increment = (2 * 1024 * 1024); invalid_auto_size_ctl.flash_incr_mode = H5C_flash_incr__off; - invalid_auto_size_ctl.flash_multiple = 2.0; - invalid_auto_size_ctl.flash_threshold = 0.5; + invalid_auto_size_ctl.flash_multiple = 2.0f; + invalid_auto_size_ctl.flash_threshold = 0.5f; invalid_auto_size_ctl.decr_mode = H5C_decr__age_out_with_threshold; - invalid_auto_size_ctl.upper_hr_threshold = 0.999; + invalid_auto_size_ctl.upper_hr_threshold = 0.999f; - invalid_auto_size_ctl.decrement = 0.9; + invalid_auto_size_ctl.decrement = 0.9f; invalid_auto_size_ctl.apply_max_decrement = TRUE; invalid_auto_size_ctl.max_decrement = (1 * 1024 * 1024); @@ -27955,7 +27959,7 @@ check_auto_cache_resize_input_errs(void) H5C__MAX_EPOCH_MARKERS + 1; /* INVALID */ invalid_auto_size_ctl.apply_empty_reserve = TRUE; - invalid_auto_size_ctl.empty_reserve = 0.05; + invalid_auto_size_ctl.empty_reserve = 0.05f; result = H5C_set_cache_auto_resize_config(cache_ptr, &invalid_auto_size_ctl); @@ -28089,7 +28093,7 @@ check_auto_cache_resize_aux_fcns(void) /* hbool_t set_initial_size = */ TRUE, /* size_t initial_size = */ (1 * 1024 * 1024), - /* double min_clean_fraction = */ 0.5, + /* double min_clean_fraction = */ 0.5f, /* size_t max_size = */ (16 * 1024 * 1025), /* size_t min_size = */ (512 * 1024), @@ -28099,24 +28103,24 @@ check_auto_cache_resize_aux_fcns(void) /* enum H5C_cache_incr_mode incr_mode = */ H5C_incr__off, - /* double lower_hr_threshold = */ 0.75, + /* double lower_hr_threshold = */ 0.75f, - /* double increment = */ 2.0, + /* double increment = */ 2.0f, /* 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__off, - /* double flash_multiple = */ 2.0, - /* double flash_threshold = */ 0.5, + /* double flash_multiple = */ 2.0f, + /* double flash_threshold = */ 0.5f, /* enum H5C_cache_decr_mode decr_mode = */ H5C_decr__off, - /* double upper_hr_threshold = */ 0.995, + /* double upper_hr_threshold = */ 0.995f, - /* double decrement = */ 0.9, + /* double decrement = */ 0.9f, /* hbool_t apply_max_decrement = */ TRUE, /* size_t max_decrement = */ (1 * 1024 * 1024), @@ -28124,7 +28128,7 @@ check_auto_cache_resize_aux_fcns(void) /* int32_t epochs_before_eviction = */ 3, /* hbool_t apply_empty_reserve = */ TRUE, - /* double empty_reserve = */ 0.5 + /* double empty_reserve = */ 0.5f }; @@ -28266,7 +28270,7 @@ check_auto_cache_resize_aux_fcns(void) pass = FALSE; failure_mssg = "H5C_get_cache_hit_rate failed.\n"; - } else if ( ! DBL_REL_EQUAL(hit_rate, 0.5, FP_EPSILON) ) { /* i.e. hit_rate != 0.5 */ + } else if ( ! DBL_REL_EQUAL(hit_rate, 0.5f, FP_EPSILON) ) { /* i.e. hit_rate != 0.5 */ pass = FALSE; failure_mssg = diff --git a/test/cache_common.h b/test/cache_common.h index d7e7f1a..1165de4 100644 --- a/test/cache_common.h +++ b/test/cache_common.h @@ -482,7 +482,7 @@ if ( ( (cache_ptr) == NULL ) || \ } /* Epsilon for floating-point comparisons */ -#define FP_EPSILON 0.000001 +#define FP_EPSILON 0.000001f /* misc type definitions */ diff --git a/test/mf.c b/test/mf.c index 8af5bc7..aacf087 100644 --- a/test/mf.c +++ b/test/mf.c @@ -7375,7 +7375,7 @@ test_dichotomy(const char *env_h5_drvr, hid_t fapl) char filename[FILENAME_LEN]; /* Filename to use */ H5F_t *f = NULL; /* Internal file object pointer */ H5FD_mem_t type, stype; - haddr_t addr1, addr2, addr3, saddr1, saddr2; + haddr_t addr1, addr3, saddr1, saddr2; hbool_t contig_addr_vfd; /* Whether VFD used has a contigous address space */ TESTING("Allocation from raw or metadata free-space manager"); @@ -7399,7 +7399,7 @@ test_dichotomy(const char *env_h5_drvr, hid_t fapl) addr1 = H5MF_alloc(f, type, H5P_DATASET_XFER_DEFAULT, (hsize_t)TEST_BLOCK_SIZE30); /* Allocate the second block of type H5FD_MEM_SUPER */ - addr2 = H5MF_alloc(f, type, H5P_DATASET_XFER_DEFAULT, (hsize_t)TEST_BLOCK_SIZE50); + H5MF_alloc(f, type, H5P_DATASET_XFER_DEFAULT, (hsize_t)TEST_BLOCK_SIZE50); /* Allocate the first block of type H5FD_MEM_DRAW */ stype = H5FD_MEM_DRAW; diff --git a/test/objcopy.c b/test/objcopy.c index d7da8f3..1377b96 100644 --- a/test/objcopy.c +++ b/test/objcopy.c @@ -9588,9 +9588,7 @@ test_copy_cdt_merge_cdt(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid_t ds hid_t sid = -1; /* Dataspace ID */ hid_t aid = -1; /* Attribute ID */ hid_t ocpypl_id = -1; /* Object copy plist ID */ - int i; /* Local index variable */ hsize_t dim1d[1]; /* dimension sizes */ - int buf[DIM_SIZE_1]; /* Buffer for data */ H5O_info_t oinfo; /* Object info */ haddr_t exp_addr; /* Expected object addresses */ char src_filename[NAME_BUF_SIZE]; /* Source file name */ @@ -9601,10 +9599,6 @@ test_copy_cdt_merge_cdt(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid_t ds else TESTING("H5Ocopy(): merging various committed datatypes") - /* set initial data values */ - for (i=0; i=0) status = H5Dwrite (dset, filetype, H5S_ALL, H5S_ALL, H5P_DEFAULT, wdata); + HDassert(status >= 0); } /* * Close and release resources. */ status = H5Dclose (dset); + HDassert(status >= 0); status = H5Sclose (space); + HDassert(status >= 0); status = H5Tclose (filetype); + HDassert(status >= 0); status = H5Fclose (file); + HDassert(status >= 0); } static void gent_empty(void) @@ -7397,14 +7402,17 @@ gent_charsets(void) sid = H5Screate_simple( 1, dim, NULL ); fid = H5Fcreate( FILE68, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT ); status = H5Tset_cset( ascii_dtid, H5T_CSET_ASCII ); + HDassert(status >= 0); H5Tinsert( charset_dtid, "ascii", HOFFSET(CharSetInfo, ascii_p_ ), ascii_dtid ); status = H5Tset_cset( utf8_dtid, H5T_CSET_UTF8 ); + HDassert(status >= 0); H5Tinsert( charset_dtid, "utf8", HOFFSET( CharSetInfo, utf8_p_ ), utf8_dtid ); did = H5Dcreate2( fid, "CharSets", charset_dtid, sid, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT ); status = H5Dwrite( did, charset_dtid, H5S_ALL, H5S_ALL, H5P_DEFAULT, writeData ); + HDassert(status >= 0); H5Tclose( charset_dtid ); H5Tclose( ascii_dtid ); @@ -7415,7 +7423,7 @@ gent_charsets(void) } static void gent_compound_intsizes(void) { - hid_t fid, dataset, space, root; + hid_t fid, dataset, space; hsize_t dims[2]; hsize_t array_dim8[]={F70_XDIM,F70_YDIM8}; /* Array dimensions */ hsize_t array_dim16[]={F70_XDIM,F70_YDIM16}; /* Array dimensions */ @@ -7992,7 +8000,6 @@ static void gent_nested_compound_dt(void) { /* test nested data type */ dset3_t dset3[10]; enumtype dset4[] = {RED, GREEN, BLUE, GREEN, WHITE, BLUE}; - dset1_t dset5[10]; int i, j, k; unsigned ndims; diff --git a/tools/h5import/h5import.c b/tools/h5import/h5import.c index 9497e58..7038a95 100644 --- a/tools/h5import/h5import.c +++ b/tools/h5import/h5import.c @@ -1009,10 +1009,7 @@ static int processStrHDFData(FILE *strm, struct Input *in, hid_t file_id) char *str2 = NULL; char *str3 = NULL; char str[1024] = ""; - char c; - int results; int j; - int nlines = 0; int line; /*------------------------------------------------------------------------- diff --git a/tools/misc/h5mkgrp.c b/tools/misc/h5mkgrp.c index b9fb588..8dee706 100644 --- a/tools/misc/h5mkgrp.c +++ b/tools/misc/h5mkgrp.c @@ -115,7 +115,7 @@ usage: h5mkgrp [OPTIONS] FILE GROUP...\n\ *------------------------------------------------------------------------- */ static int -parse_command_line(int argc, const char *argv[], param_t *params) +parse_command_line(int argc, const char *argv[], param_t *parms) { int opt; /* Option from command line */ size_t curr_group; /* Current group name to copy */ @@ -136,17 +136,17 @@ parse_command_line(int argc, const char *argv[], param_t *params) /* Create objects with the latest version of the format */ case 'l': - params->latest = TRUE; + parms->latest = TRUE; break; /* Create parent groups */ case 'p': - params->parents = TRUE; + parms->parents = TRUE; break; /* Verbose output */ case 'v': - params->verbose = TRUE; + parms->verbose = TRUE; break; /* Display version */ @@ -169,7 +169,7 @@ parse_command_line(int argc, const char *argv[], param_t *params) } /* end if */ /* Retrieve file name */ - params->fname = HDstrdup(argv[opt_ind]); + parms->fname = HDstrdup(argv[opt_ind]); opt_ind++; /* Check for group(s) to be created */ @@ -180,24 +180,24 @@ parse_command_line(int argc, const char *argv[], param_t *params) } /* end if */ /* Allocate space for the group name pointers */ - params->ngroups = (argc - opt_ind); - params->groups = HDmalloc(params->ngroups * sizeof(char *)); + parms->ngroups = (argc - opt_ind); + parms->groups = HDmalloc(parms->ngroups * sizeof(char *)); /* Retrieve the group names */ curr_group = 0; while(opt_ind < argc) { - params->groups[curr_group] = HDstrdup(argv[opt_ind]); + parms->groups[curr_group] = HDstrdup(argv[opt_ind]); curr_group++; opt_ind++; } /* end while */ #ifdef QAK -HDfprintf(stderr, "params->parents = %t\n", params->parents); -HDfprintf(stderr, "params->verbose = %t\n", params->verbose); -HDfprintf(stderr, "params->fname = '%s'\n", params->fname); -HDfprintf(stderr, "params->ngroups = %Zu\n", params->ngroups); -for(curr_group = 0; curr_group < params->ngroups; curr_group++) - HDfprintf(stderr, "params->group[%Zu] = '%s'\n", curr_group, params->groups[curr_group]); +HDfprintf(stderr, "parms->parents = %t\n", parms->parents); +HDfprintf(stderr, "parms->verbose = %t\n", parms->verbose); +HDfprintf(stderr, "parms->fname = '%s'\n", parms->fname); +HDfprintf(stderr, "parms->ngroups = %Zu\n", parms->ngroups); +for(curr_group = 0; curr_group < parms->ngroups; curr_group++) + HDfprintf(stderr, "parms->group[%Zu] = '%s'\n", curr_group, parms->groups[curr_group]); #endif /* QAK */ return(0); -- cgit v0.12 From 28c2f17960084abec05b3fe1c5650cc5a2e164be Mon Sep 17 00:00:00 2001 From: Allen Byrne Date: Mon, 19 Aug 2013 11:02:29 -0500 Subject: [svn-r24022] any_object option should be any_path --- tools/h5dump/CMakeLists.txt | 4 ++-- tools/h5dump/h5dump.c | 2 +- tools/h5dump/testh5dump.sh.in | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/tools/h5dump/CMakeLists.txt b/tools/h5dump/CMakeLists.txt index 2510bfe..df9cc5f 100644 --- a/tools/h5dump/CMakeLists.txt +++ b/tools/h5dump/CMakeLists.txt @@ -1454,7 +1454,7 @@ IF (BUILD_TESTING) ADD_H5_TEST (tattr-1 0 --enable-error-stack tattr.h5) # test for displaying the selected attributes of string type and scalar space ADD_H5_TEST (tattr-2 0 --enable-error-stack -a /\\\\/attr1 --attribute /attr4 --attribute=/attr5 tattr.h5) - ADD_H5_TEST_N (tattr-2 0 --enable-error-stack -N /\\\\/attr1 --any_object /attr4 --any_object=/attr5 tattr.h5) + ADD_H5_TEST_N (tattr-2 0 --enable-error-stack -N /\\\\/attr1 --any_path /attr4 --any_path=/attr5 tattr.h5) # test for header and error messages ADD_H5ERR_MASK_TEST (tattr-3 1 --enable-error-stack --header -a /attr2 --attribute=/attr tattr.h5) # test for displaying attributes in shared datatype (also in group and dataset) @@ -1485,7 +1485,7 @@ IF (BUILD_TESTING) ADD_H5_TEST (tcomp-1 0 --enable-error-stack tcompound.h5) # test for named data types ADD_H5_TEST (tcomp-2 0 --enable-error-stack -t /type1 --datatype /type2 --datatype=/group1/type3 tcompound.h5) - ADD_H5_TEST_N (tcomp-2 0 --enable-error-stack -N /type1 --any_object /type2 --any_object=/group1/type3 tcompound.h5) + ADD_H5_TEST_N (tcomp-2 0 --enable-error-stack -N /type1 --any_path /type2 --any_path=/group1/type3 tcompound.h5) # test for unamed type ADD_H5ERR_MASK_TEST (tcomp-3 0 "--enable-error-stack;-t;/#6632;-g;/group2;tcompound.h5") # test complicated compound datatype diff --git a/tools/h5dump/h5dump.c b/tools/h5dump/h5dump.c index 618318c..ea38c61 100644 --- a/tools/h5dump/h5dump.c +++ b/tools/h5dump/h5dump.c @@ -188,7 +188,7 @@ static struct long_options l_opts[] = { { "packed-bits", require_arg, 'M' }, { "no-compact-subset", no_arg, 'C' }, { "ddl", optional_arg, 'O' }, - { "any_object", require_arg, 'N' }, + { "any_path", require_arg, 'N' }, { NULL, 0, '\0' } }; diff --git a/tools/h5dump/testh5dump.sh.in b/tools/h5dump/testh5dump.sh.in index fc79d28..77a0113 100644 --- a/tools/h5dump/testh5dump.sh.in +++ b/tools/h5dump/testh5dump.sh.in @@ -914,7 +914,7 @@ TOOLTEST4 tdset-2.ddl --enable-error-stack -H -d dset1 -d /dset2 --dataset=dset3 TOOLTEST tattr-1.ddl --enable-error-stack tattr.h5 # test for displaying the selected attributes of string type and scalar space TOOLTEST tattr-2.ddl --enable-error-stack -a "/\/attr1" --attribute /attr4 --attribute=/attr5 tattr.h5 -TOOLTEST tattr-2.ddl --enable-error-stack -N "/\/attr1" --any_object /attr4 --any_object=/attr5 tattr.h5 +TOOLTEST tattr-2.ddl --enable-error-stack -N "/\/attr1" --any_path /attr4 --any_path=/attr5 tattr.h5 # test for header and error messages TOOLTEST4 tattr-3.ddl --enable-error-stack --header -a /attr2 --attribute=/attr tattr.h5 # test for displaying at least 9 attributes on root from a BE machine @@ -945,7 +945,7 @@ TOOLTEST thlink-5.ddl --enable-error-stack -N /dset1 -N /g2 -N /g1/dset2 thlink. TOOLTEST tcomp-1.ddl --enable-error-stack tcompound.h5 # test for named data types TOOLTEST tcomp-2.ddl --enable-error-stack -t /type1 --datatype /type2 --datatype=/group1/type3 tcompound.h5 -TOOLTEST tcomp-2.ddl --enable-error-stack -N /type1 --any_object /type2 --any_object=/group1/type3 tcompound.h5 +TOOLTEST tcomp-2.ddl --enable-error-stack -N /type1 --any_path /type2 --any_path=/group1/type3 tcompound.h5 # test for unamed type TOOLTEST4 tcomp-3.ddl --enable-error-stack -t /#6632 -g /group2 tcompound.h5 # test complicated compound datatype -- cgit v0.12 From b503983d858b4c42ed60ec1275e45a807b6b1198 Mon Sep 17 00:00:00 2001 From: Allen Byrne Date: Mon, 19 Aug 2013 11:26:14 -0500 Subject: [svn-r24023] Added tests to CMakeLists.txt that were only added to the *nix script. Tested: local linux --- tools/h5stat/CMakeLists.txt | 91 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 91 insertions(+) diff --git a/tools/h5stat/CMakeLists.txt b/tools/h5stat/CMakeLists.txt index 78f39dd..4a775ee 100644 --- a/tools/h5stat/CMakeLists.txt +++ b/tools/h5stat/CMakeLists.txt @@ -44,6 +44,7 @@ IF (BUILD_TESTING) h5stat_help1.ddl h5stat_help2.ddl h5stat_notexist.ddl + h5stat_nofile.ddl h5stat_filters.ddl h5stat_filters-file.ddl h5stat_filters-F.ddl @@ -56,11 +57,27 @@ IF (BUILD_TESTING) h5stat_newgrat.ddl h5stat_newgrat-UG.ddl h5stat_newgrat-UA.ddl + h5stat_err1_links.ddl + h5stat_links1.ddl + h5stat_links2.ddl + h5stat_links3.ddl + h5stat_links4.ddl + h5stat_links5.ddl + h5stat_err1_dims.ddl + h5stat_dims1.ddl + h5stat_dims2.ddl + h5stat_err1_numattrs.ddl + h5stat_err2_numattrs.ddl + h5stat_numattrs1.ddl + h5stat_numattrs2.ddl + h5stat_numattrs3.ddl + h5stat_numattrs4.ddl ) SET (HDF5_REFERENCE_TEST_FILES h5stat_filters.h5 h5stat_tsohm.h5 h5stat_newgrat.h5 + h5stat_threshold.h5 ) FOREACH (ddl_file ${HDF5_REFERENCE_FILES}) @@ -140,6 +157,8 @@ IF (BUILD_TESTING) h5stat_help2.out.err h5stat_notexist.out h5stat_notexist.out.err + h5stat_nofile.out + h5stat_nofile.out.err h5stat_filters.out h5stat_filters.out.err h5stat_filters-file.out @@ -164,6 +183,36 @@ IF (BUILD_TESTING) h5stat_newgrat-UG.out.err h5stat_newgrat-UA.out h5stat_newgrat-UA.out.err + h5stat_err1_links.out + h5stat_err1_links.out.err + h5stat_links1.out + h5stat_links1.out.err + h5stat_links2.out + h5stat_links2.out.err + h5stat_links3.out + h5stat_links3.out.err + h5stat_links4.out + h5stat_links4.out.err + h5stat_links5.out + h5stat_links5.out.err + h5stat_err1_dims.out + h5stat_err1_dims.out.err + h5stat_dims1.out + h5stat_dims1.out.err + h5stat_dims2.out + h5stat_dims2.out.err + h5stat_err1_numattrs.out + h5stat_err1_numattrs.out.err + h5stat_err2_numattrs.out + h5stat_err2_numattrs.out.err + h5stat_numattrs1.out + h5stat_numattrs1.out.err + h5stat_numattrs2.out + h5stat_numattrs2.out.err + h5stat_numattrs3.out + h5stat_numattrs3.out.err + h5stat_numattrs4.out + h5stat_numattrs4.out.err ) IF (NOT "${last_test}" STREQUAL "") SET_TESTS_PROPERTIES (H5STAT-clearall-objects PROPERTIES DEPENDS ${last_test}) @@ -177,6 +226,7 @@ IF (BUILD_TESTING) # Test when h5stat a file that does not exist ADD_H5_TEST (h5stat_notexist 1 notexist.h5) + ADD_H5_TEST (h5stat_nofile 1 '') # Test file with groups, compressed datasets, user-applied fileters, etc. # h5stat_filters.h5 is a copy of ../../testfiles/tfilters.h5 as of release 1.8.0-alpha4 @@ -195,6 +245,47 @@ IF (BUILD_TESTING) ADD_H5_TEST (h5stat_newgrat 0 h5stat_newgrat.h5) ADD_H5_TEST (h5stat_newgrat-UG 0 -G h5stat_newgrat.h5) ADD_H5_TEST (h5stat_newgrat-UA 0 -A h5stat_newgrat.h5) +# +# Tests for -l (--links) option on h5stat_threshold.h5: +# -l 0 (incorrect threshold value) +# -g -l 8 +# --links=8 +# --links=20 -g + ADD_H5_TEST (h5stat_err1_links 1 -l 0 h5stat_threshold.h5) + ADD_H5_TEST (h5stat_links1 0 -g -l 8 h5stat_threshold.h5) + ADD_H5_TEST (h5stat_links2 0 --links=8 h5stat_threshold.h5) + ADD_H5_TEST (h5stat_links3 0 --links=20 -g h5stat_threshold.h5) +# +# Tests for -l (--links) option on h5stat_newgrat.h5: +# -g +# -g -l 40000 + ADD_H5_TEST (h5stat_links4 0 -g h5stat_newgrat.h5) + ADD_H5_TEST (h5stat_links5 0 -g -l 40000 h5stat_newgrat.h5) +# +# Tests for -m (--dims) option on h5stat_threshold.h5 +# -d --dims=-1 (incorrect threshold value) +# -gd -m 5 +# -d --di=15 + ADD_H5_TEST (h5stat_err1_dims 1 -d --dims=-1 h5stat_threshold.h5) + ADD_H5_TEST (h5stat_dims1 0 -gd -m 5 h5stat_threshold.h5) + ADD_H5_TEST (h5stat_dims2 0 -d --di=15 h5stat_threshold.h5) +# +# Tests for -a option on h5stat_threshold.h5 +# -a -2 (incorrect threshold value) +# --numattrs (without threshold value) +# -AS -a 10 +# -a 1 +# -A --numattrs=25 + ADD_H5_TEST (h5stat_err1_numattrs 1 -a -2 h5stat_threshold.h5) + ADD_H5_TEST (h5stat_err2_numattrs 1 --numattrs h5stat_threshold.h5) + ADD_H5_TEST (h5stat_numattrs1 0 -AS -a 10 h5stat_threshold.h5) + ADD_H5_TEST (h5stat_numattrs2 0 -a 1 h5stat_threshold.h5) + ADD_H5_TEST (h5stat_numattrs3 0 -A --numattrs=25 h5stat_threshold.h5) +# +# Tests for -a option on h5stat_newgrat.h5 +# -A -a 100 + ADD_H5_TEST (h5stat_numattrs4 0 -A -a 100 h5stat_newgrat.h5) +# ENDIF (BUILD_TESTING) ############################################################################## -- cgit v0.12 From c502d81a8c87dd2bce47a5476e3331b04fc69322 Mon Sep 17 00:00:00 2001 From: Allen Byrne Date: Mon, 19 Aug 2013 16:49:44 -0500 Subject: [svn-r24029] Move TESTS to seperate file to allow easier editing by all developers. Tested: local linux --- CMakeFilters.cmake | 122 ++ CMakeInstallation.cmake | 402 +++++++ CMakeLists.txt | 524 +-------- MANIFEST | 29 + c++/examples/CMakeLists.txt | 24 +- c++/examples/CMakeTests.cmake | 29 + c++/test/CMakeLists.txt | 40 +- c++/test/CMakeTests.cmake | 46 + examples/CMakeLists.txt | 57 +- examples/CMakeTests.cmake | 62 + fortran/examples/CMakeLists.txt | 26 +- fortran/examples/CMakeTests.cmake | 28 + fortran/test/CMakeLists.txt | 14 +- fortran/test/CMakeTests.cmake | 26 + fortran/testpar/CMakeLists.txt | 2 +- fortran/testpar/CMakeTests.cmake | 7 + hl/c++/examples/CMakeLists.txt | 2 +- hl/c++/examples/CMakeTests.cmake | 8 + hl/c++/test/CMakeLists.txt | 36 +- hl/c++/test/CMakeTests.cmake | 8 + hl/examples/CMakeLists.txt | 36 +- hl/examples/CMakeTests.cmake | 28 + hl/fortran/examples/CMakeLists.txt | 10 +- hl/fortran/examples/CMakeTests.cmake | 10 + hl/fortran/test/CMakeLists.txt | 22 +- hl/fortran/test/CMakeTests.cmake | 28 + hl/test/CMakeLists.txt | 70 +- hl/test/CMakeTests.cmake | 70 ++ hl/tools/CMakeLists.txt | 30 +- hl/tools/CMakeTests.cmake | 40 + perform/CMakeLists.txt | 62 +- perform/CMakeTests.cmake | 61 + test/CMakeLists.txt | 711 +---------- test/CMakeTests.cmake | 717 ++++++++++++ testpar/CMakeLists.txt | 59 +- testpar/CMakeTests.cmake | 63 + tools/h5copy/CMakeLists.txt | 381 +----- tools/h5copy/CMakeTests.cmake | 381 ++++++ tools/h5diff/CMakeLists.txt | 1382 +--------------------- tools/h5diff/CMakeTests.cmake | 1382 ++++++++++++++++++++++ tools/h5dump/CMakeLists.txt | 2141 +--------------------------------- tools/h5dump/CMakeTests.cmake | 1367 ++++++++++++++++++++++ tools/h5dump/CMakeTestsPBITS.cmake | 367 ++++++ tools/h5dump/CMakeTestsXML.cmake | 442 +++++++ tools/h5import/CMakeLists.txt | 477 +------- tools/h5import/CMakeTests.cmake | 478 ++++++++ tools/h5jam/CMakeLists.txt | 428 +------ tools/h5jam/CMakeTests.cmake | 428 +++++++ tools/h5ls/CMakeLists.txt | 401 +------ tools/h5ls/CMakeTests.cmake | 402 +++++++ tools/h5repack/CMakeLists.txt | 937 +-------------- tools/h5repack/CMakeTests.cmake | 937 +++++++++++++++ tools/h5stat/CMakeLists.txt | 256 +--- tools/h5stat/CMakeTests.cmake | 257 ++++ tools/misc/CMakeLists.txt | 272 +---- tools/misc/CMakeTests.cmake | 272 +++++ 56 files changed, 8579 insertions(+), 8318 deletions(-) create mode 100644 CMakeFilters.cmake create mode 100644 CMakeInstallation.cmake create mode 100644 c++/examples/CMakeTests.cmake create mode 100644 c++/test/CMakeTests.cmake create mode 100644 examples/CMakeTests.cmake create mode 100644 fortran/examples/CMakeTests.cmake create mode 100644 fortran/test/CMakeTests.cmake create mode 100644 fortran/testpar/CMakeTests.cmake create mode 100644 hl/c++/examples/CMakeTests.cmake create mode 100644 hl/c++/test/CMakeTests.cmake create mode 100644 hl/examples/CMakeTests.cmake create mode 100644 hl/fortran/examples/CMakeTests.cmake create mode 100644 hl/fortran/test/CMakeTests.cmake create mode 100644 hl/test/CMakeTests.cmake create mode 100644 hl/tools/CMakeTests.cmake create mode 100644 perform/CMakeTests.cmake create mode 100644 test/CMakeTests.cmake create mode 100644 testpar/CMakeTests.cmake create mode 100644 tools/h5copy/CMakeTests.cmake create mode 100644 tools/h5diff/CMakeTests.cmake create mode 100644 tools/h5dump/CMakeTests.cmake create mode 100644 tools/h5dump/CMakeTestsPBITS.cmake create mode 100644 tools/h5dump/CMakeTestsXML.cmake create mode 100644 tools/h5import/CMakeTests.cmake create mode 100644 tools/h5jam/CMakeTests.cmake create mode 100644 tools/h5ls/CMakeTests.cmake create mode 100644 tools/h5repack/CMakeTests.cmake create mode 100644 tools/h5stat/CMakeTests.cmake create mode 100644 tools/misc/CMakeTests.cmake diff --git a/CMakeFilters.cmake b/CMakeFilters.cmake new file mode 100644 index 0000000..01594d0 --- /dev/null +++ b/CMakeFilters.cmake @@ -0,0 +1,122 @@ + +#----------------------------------------------------------------------------- +# Options for HDF5 Filters +#----------------------------------------------------------------------------- +MACRO (HDF5_SETUP_FILTERS FILTER) + OPTION (HDF5_USE_FILTER_${FILTER} "Use the ${FILTER} Filter" ON) + IF (HDF5_USE_FILTER_${FILTER}) + SET (H5_HAVE_FILTER_${FILTER} 1) + SET (FILTERS "${FILTERS} ${FILTER}") + ENDIF (HDF5_USE_FILTER_${FILTER}) + # MESSAGE (STATUS "Filter ${FILTER} is ${HDF5_USE_FILTER_${FILTER}}") +ENDMACRO (HDF5_SETUP_FILTERS) + +HDF5_SETUP_FILTERS (SHUFFLE) +HDF5_SETUP_FILTERS (FLETCHER32) +HDF5_SETUP_FILTERS (NBIT) +HDF5_SETUP_FILTERS (SCALEOFFSET) + +INCLUDE (ExternalProject) +OPTION (HDF5_ALLOW_EXTERNAL_SUPPORT "Allow External Library Building (NO SVN TGZ)" "NO") +IF (HDF5_ALLOW_EXTERNAL_SUPPORT MATCHES "SVN" OR HDF5_ALLOW_EXTERNAL_SUPPORT MATCHES "TGZ") + OPTION (ZLIB_USE_EXTERNAL "Use External Library Building for ZLIB" 1) + OPTION (SZIP_USE_EXTERNAL "Use External Library Building for SZIP" 1) + IF (HDF5_ALLOW_EXTERNAL_SUPPORT MATCHES "SVN") + SET (ZLIB_URL ${ZLIB_SVN_URL}) + SET (SZIP_URL ${SZIP_SVN_URL}) + ELSEIF (HDF5_ALLOW_EXTERNAL_SUPPORT MATCHES "TGZ") + IF (NOT TGZ_PATH) + SET (TGZ_PATH ${HDF5_SOURCE_DIR}) + ENDIF (NOT TGZ_PATH) + SET (ZLIB_URL ${TGZ_PATH}/${ZLIB_TGZ_NAME}) + SET (SZIP_URL ${TGZ_PATH}/${SZIP_TGZ_NAME}) + ELSE (HDF5_ALLOW_EXTERNAL_SUPPORT MATCHES "SVN") + SET (ZLIB_USE_EXTERNAL 0) + SET (SZIP_USE_EXTERNAL 0) + ENDIF (HDF5_ALLOW_EXTERNAL_SUPPORT MATCHES "SVN") +ENDIF (HDF5_ALLOW_EXTERNAL_SUPPORT MATCHES "SVN" OR HDF5_ALLOW_EXTERNAL_SUPPORT MATCHES "TGZ") + +#----------------------------------------------------------------------------- +# Option for ZLib support +#----------------------------------------------------------------------------- +OPTION (HDF5_ENABLE_Z_LIB_SUPPORT "Enable Zlib Filters" OFF) +IF (HDF5_ENABLE_Z_LIB_SUPPORT) + IF (NOT H5_ZLIB_HEADER) + IF (NOT ZLIB_USE_EXTERNAL) + FIND_PACKAGE (ZLIB NAMES ${ZLIB_PACKAGE_NAME}${HDF_PACKAGE_EXT}) + IF (NOT ZLIB_FOUND) + FIND_PACKAGE (ZLIB) # Legacy find + ENDIF (NOT ZLIB_FOUND) + ENDIF (NOT ZLIB_USE_EXTERNAL) + IF (ZLIB_FOUND) + SET (H5_HAVE_FILTER_DEFLATE 1) + SET (H5_HAVE_ZLIB_H 1) + SET (H5_HAVE_LIBZ 1) + SET (H5_ZLIB_HEADER "zlib.h") + SET (ZLIB_INCLUDE_DIR_GEN ${ZLIB_INCLUDE_DIR}) + SET (ZLIB_INCLUDE_DIRS ${ZLIB_INCLUDE_DIR}) + ELSE (ZLIB_FOUND) + IF (HDF5_ALLOW_EXTERNAL_SUPPORT MATCHES "SVN" OR HDF5_ALLOW_EXTERNAL_SUPPORT MATCHES "TGZ") + EXTERNAL_ZLIB_LIBRARY (${HDF5_ALLOW_EXTERNAL_SUPPORT} ${LIB_TYPE}) + SET (H5_HAVE_FILTER_DEFLATE 1) + SET (H5_HAVE_ZLIB_H 1) + SET (H5_HAVE_LIBZ 1) + MESSAGE (STATUS "Filter ZLIB is built") + ELSE (HDF5_ALLOW_EXTERNAL_SUPPORT MATCHES "SVN" OR HDF5_ALLOW_EXTERNAL_SUPPORT MATCHES "TGZ") + MESSAGE (FATAL_ERROR " ZLib is Required for ZLib support in HDF5") + ENDIF (HDF5_ALLOW_EXTERNAL_SUPPORT MATCHES "SVN" OR HDF5_ALLOW_EXTERNAL_SUPPORT MATCHES "TGZ") + ENDIF (ZLIB_FOUND) + ELSE (NOT H5_ZLIB_HEADER) + # This project is being called from within another and ZLib is already configured + SET (H5_HAVE_FILTER_DEFLATE 1) + SET (H5_HAVE_ZLIB_H 1) + SET (H5_HAVE_LIBZ 1) + ENDIF (NOT H5_ZLIB_HEADER) + IF (H5_HAVE_FILTER_DEFLATE) + SET (EXTERNAL_FILTERS "${EXTERNAL_FILTERS} DEFLATE") + ENDIF (H5_HAVE_FILTER_DEFLATE) + SET (LINK_LIBS ${LINK_LIBS} ${ZLIB_LIBRARIES}) + INCLUDE_DIRECTORIES (${ZLIB_INCLUDE_DIRS}) + MESSAGE (STATUS "Filter ZLIB is ON") +ENDIF (HDF5_ENABLE_Z_LIB_SUPPORT) + +#----------------------------------------------------------------------------- +# Option for SzLib support +#----------------------------------------------------------------------------- +OPTION (HDF5_ENABLE_SZIP_SUPPORT "Use SZip Filter" OFF) +IF (HDF5_ENABLE_SZIP_SUPPORT) + OPTION (HDF5_ENABLE_SZIP_ENCODING "Use SZip Encoding" OFF) + IF (NOT SZIP_USE_EXTERNAL) + FIND_PACKAGE (SZIP NAMES ${SZIP_PACKAGE_NAME}${HDF_PACKAGE_EXT}) + IF (NOT SZIP_FOUND) + FIND_PACKAGE (SZIP) # Legacy find + ENDIF (NOT SZIP_FOUND) + ENDIF (NOT SZIP_USE_EXTERNAL) + IF (SZIP_FOUND) + SET (H5_HAVE_FILTER_SZIP 1) + SET (H5_HAVE_SZLIB_H 1) + SET (H5_HAVE_LIBSZ 1) + SET (SZIP_INCLUDE_DIR_GEN ${SZIP_INCLUDE_DIR}) + SET (SZIP_INCLUDE_DIRS ${SZIP_INCLUDE_DIR}) + ELSE (SZIP_FOUND) + IF (HDF5_ALLOW_EXTERNAL_SUPPORT MATCHES "SVN" OR HDF5_ALLOW_EXTERNAL_SUPPORT MATCHES "TGZ") + EXTERNAL_SZIP_LIBRARY (${HDF5_ALLOW_EXTERNAL_SUPPORT} ${LIB_TYPE} ${HDF5_ENABLE_SZIP_ENCODING}) + SET (H5_HAVE_FILTER_SZIP 1) + SET (H5_HAVE_SZLIB_H 1) + SET (H5_HAVE_LIBSZ 1) + MESSAGE (STATUS "Filter SZIP is built") + ELSE (HDF5_ALLOW_EXTERNAL_SUPPORT MATCHES "SVN" OR HDF5_ALLOW_EXTERNAL_SUPPORT MATCHES "TGZ") + MESSAGE (FATAL_ERROR "SZIP is Required for SZIP support in HDF5") + ENDIF (HDF5_ALLOW_EXTERNAL_SUPPORT MATCHES "SVN" OR HDF5_ALLOW_EXTERNAL_SUPPORT MATCHES "TGZ") + ENDIF (SZIP_FOUND) + SET (LINK_LIBS ${LINK_LIBS} ${SZIP_LIBRARIES}) + INCLUDE_DIRECTORIES (${SZIP_INCLUDE_DIR}) + MESSAGE (STATUS "Filter SZIP is ON") + IF (H5_HAVE_FILTER_SZIP) + SET (EXTERNAL_FILTERS "${EXTERNAL_FILTERS} DECODE") + ENDIF (H5_HAVE_FILTER_SZIP) + IF (HDF5_ENABLE_SZIP_ENCODING) + SET (H5_HAVE_SZIP_ENCODER 1) + SET (EXTERNAL_FILTERS "${EXTERNAL_FILTERS} ENCODE") + ENDIF (HDF5_ENABLE_SZIP_ENCODING) +ENDIF (HDF5_ENABLE_SZIP_SUPPORT) diff --git a/CMakeInstallation.cmake b/CMakeInstallation.cmake new file mode 100644 index 0000000..8a7cf16 --- /dev/null +++ b/CMakeInstallation.cmake @@ -0,0 +1,402 @@ + +#----------------------------------------------------------------------------- +# Add file(s) to CMake Install +#----------------------------------------------------------------------------- +IF (NOT HDF5_INSTALL_NO_DEVELOPMENT) + INSTALL ( + FILES ${PROJECT_BINARY_DIR}/H5pubconf.h + DESTINATION ${HDF5_INSTALL_INCLUDE_DIR} + COMPONENT headers + ) +ENDIF (NOT HDF5_INSTALL_NO_DEVELOPMENT) + +#----------------------------------------------------------------------------- +# Add Target(s) to CMake Install for import into other projects +#----------------------------------------------------------------------------- +IF (NOT HDF5_EXTERNALLY_CONFIGURED) + INSTALL ( + EXPORT ${HDF5_EXPORTED_TARGETS} + DESTINATION ${HDF5_INSTALL_CMAKE_DIR}/${HDF5_PACKAGE} + FILE ${HDF5_PACKAGE}${HDF_PACKAGE_EXT}-targets.cmake + COMPONENT configinstall + ) +ENDIF (NOT HDF5_EXTERNALLY_CONFIGURED) + +#----------------------------------------------------------------------------- +# Export all exported targets to the build tree for use by parent project +#----------------------------------------------------------------------------- +IF (NOT HDF5_EXTERNALLY_CONFIGURED) + EXPORT ( + TARGETS ${HDF5_LIBRARIES_TO_EXPORT} ${HDF5_LIB_DEPENDENCIES} + FILE ${HDF5_PACKAGE}${HDF_PACKAGE_EXT}-targets.cmake + ) +ENDIF (NOT HDF5_EXTERNALLY_CONFIGURED) + +#----------------------------------------------------------------------------- +# Configure the hdf5-config.cmake file for the build directory +#----------------------------------------------------------------------------- +SET (HDF5_INCLUDES_BUILD_TIME + ${HDF5_SRC_DIR} ${HDF5_CPP_SRC_DIR} ${HDF5_HL_SRC_DIR} + ${HDF5_TOOLS_SRC_DIR} ${HDF5_BINARY_DIR} +) +SET (HDF5_VERSION_STRING @HDF5_PACKAGE_VERSION@) +SET (HDF5_VERSION_MAJOR @HDF5_PACKAGE_VERSION_MAJOR@) +SET (HDF5_VERSION_MINOR @HDF5_PACKAGE_VERSION_MINOR@) + +CONFIGURE_FILE ( + ${HDF5_RESOURCES_DIR}/hdf5-config.cmake.build.in + ${HDF5_BINARY_DIR}/${HDF5_PACKAGE}${HDF_PACKAGE_EXT}-config.cmake @ONLY +) + +#----------------------------------------------------------------------------- +# Configure the FindHDF5.cmake file for the install directory +#----------------------------------------------------------------------------- +IF (NOT HDF5_EXTERNALLY_CONFIGURED) + CONFIGURE_FILE ( + ${HDF5_RESOURCES_DIR}/FindHDF5.cmake.in + ${HDF5_BINARY_DIR}/CMakeFiles/FindHDF5${HDF_PACKAGE_EXT}.cmake @ONLY + ) + INSTALL ( + FILES ${HDF5_BINARY_DIR}/CMakeFiles/FindHDF5${HDF_PACKAGE_EXT}.cmake + DESTINATION ${HDF5_INSTALL_CMAKE_DIR}/${HDF5_PACKAGE} + COMPONENT configinstall + ) +ENDIF (NOT HDF5_EXTERNALLY_CONFIGURED) + +#----------------------------------------------------------------------------- +# Configure the hdf5-config.cmake file for the install directory +#----------------------------------------------------------------------------- +IF (NOT HDF5_EXTERNALLY_CONFIGURED) + CONFIGURE_FILE ( + ${HDF5_RESOURCES_DIR}/hdf5-config.cmake.install.in + ${HDF5_BINARY_DIR}/CMakeFiles/${HDF5_PACKAGE}${HDF_PACKAGE_EXT}-config.cmake @ONLY + ) + INSTALL ( + FILES ${HDF5_BINARY_DIR}/CMakeFiles/${HDF5_PACKAGE}${HDF_PACKAGE_EXT}-config.cmake + DESTINATION ${HDF5_INSTALL_CMAKE_DIR}/${HDF5_PACKAGE} + COMPONENT configinstall + ) +ENDIF (NOT HDF5_EXTERNALLY_CONFIGURED) + +#----------------------------------------------------------------------------- +# Configure the hdf5-config-version .cmake file for the install directory +#----------------------------------------------------------------------------- +IF (NOT HDF5_EXTERNALLY_CONFIGURED) + CONFIGURE_FILE ( + ${HDF5_RESOURCES_DIR}/hdf5-config-version.cmake.in + ${HDF5_BINARY_DIR}/CMakeFiles/${HDF5_PACKAGE}${HDF_PACKAGE_EXT}-config-version.cmake @ONLY + ) + INSTALL ( + FILES ${HDF5_BINARY_DIR}/CMakeFiles/${HDF5_PACKAGE}${HDF_PACKAGE_EXT}-config-version.cmake + DESTINATION ${HDF5_INSTALL_CMAKE_DIR}/${HDF5_PACKAGE} + COMPONENT configinstall + ) +ENDIF (NOT HDF5_EXTERNALLY_CONFIGURED) + +#----------------------------------------------------------------------------- +# Configure the libhdf5.settings file for the lib info +#----------------------------------------------------------------------------- +IF (H5_WORDS_BIGENDIAN) + SET (BYTESEX big-endian) +ELSE (H5_WORDS_BIGENDIAN) + SET (BYTESEX little-endian) +ENDIF (H5_WORDS_BIGENDIAN) +CONFIGURE_FILE ( + ${HDF5_RESOURCES_DIR}/libhdf5.settings.cmake.in + ${HDF5_BINARY_DIR}/libhdf5.settings @ONLY +) +INSTALL ( + FILES ${HDF5_BINARY_DIR}/libhdf5.settings + DESTINATION ${HDF5_INSTALL_CMAKE_DIR}/${HDF5_PACKAGE} + COMPONENT libraries +) + +#----------------------------------------------------------------------------- +# Configure the HDF518_Examples.cmake file and the examples +#----------------------------------------------------------------------------- +OPTION (HDF5_PACK_EXAMPLES "Package the HDF5 Library Examples Compressed File" OFF) +IF (HDF5_PACK_EXAMPLES) + CONFIGURE_FILE ( + ${HDF5_RESOURCES_DIR}/HDF518_Examples.cmake.in + ${HDF5_BINARY_DIR}/HDF518_Examples.cmake @ONLY + ) + INSTALL ( + FILES ${HDF5_BINARY_DIR}/HDF518_Examples.cmake + DESTINATION ${HDF5_INSTALL_DATA_DIR} + COMPONENT hdfdocuments + ) + IF (EXISTS "${HDF5_EXAMPLES_COMPRESSED_DIR}/${HDF5_EXAMPLES_COMPRESSED}") + INSTALL ( + FILES + ${HDF5_EXAMPLES_COMPRESSED_DIR}/${HDF5_EXAMPLES_COMPRESSED} + ${HDF5_SOURCE_DIR}/release_docs/USING_CMake_Examples.txt + DESTINATION ${HDF5_INSTALL_DATA_DIR} + COMPONENT hdfdocuments + ) + ENDIF (EXISTS "${HDF5_EXAMPLES_COMPRESSED_DIR}/${HDF5_EXAMPLES_COMPRESSED}") +ENDIF (HDF5_PACK_EXAMPLES) + +#----------------------------------------------------------------------------- +# Add Document File(s) to CMake Install +#----------------------------------------------------------------------------- +IF (NOT HDF5_EXTERNALLY_CONFIGURED) + INSTALL ( + FILES + ${HDF5_SOURCE_DIR}/ACKNOWLEDGMENTS + ${HDF5_SOURCE_DIR}/COPYING + DESTINATION ${HDF5_INSTALL_DATA_DIR} + COMPONENT hdfdocuments + ) + IF (EXISTS "${HDF5_SOURCE_DIR}/release_docs" AND IS_DIRECTORY "${HDF5_SOURCE_DIR}/release_docs") + SET (release_files + ${HDF5_SOURCE_DIR}/release_docs/USING_HDF5_CMake.txt + ${HDF5_SOURCE_DIR}/release_docs/COPYING + ${HDF5_SOURCE_DIR}/release_docs/RELEASE.txt + ) + IF (WIN32 AND NOT CYGWIN) + SET (release_files + ${release_files} + ${HDF5_SOURCE_DIR}/release_docs/USING_HDF5_VS.txt + ) + ENDIF (WIN32 AND NOT CYGWIN) + IF (HDF5_PACK_INSTALL_DOCS) + SET (release_files + ${release_files} + ${HDF5_SOURCE_DIR}/release_docs/INSTALL_CMake.txt + ${HDF5_SOURCE_DIR}/release_docs/HISTORY-1_8.txt + ${HDF5_SOURCE_DIR}/release_docs/INSTALL + ) + IF (WIN32) + IF (NOT CYGWIN) + SET (release_files + ${release_files} + ${HDF5_SOURCE_DIR}/release_docs/INSTALL_Windows.txt + ) + ELSE (NOT CYGWIN) + SET (release_files + ${release_files} + ${HDF5_SOURCE_DIR}/release_docs/INSTALL_Cygwin.txt + ) + ENDIF (NOT CYGWIN) + ENDIF (WIN32) + IF (HDF5_ENABLE_PARALLEL) + SET (release_files + ${release_files} + ${HDF5_SOURCE_DIR}/release_docs/INSTALL_parallel + ) + ENDIF (HDF5_ENABLE_PARALLEL) + ENDIF (HDF5_PACK_INSTALL_DOCS) + INSTALL ( + FILES ${release_files} + DESTINATION ${HDF5_INSTALL_DATA_DIR} + COMPONENT hdfdocuments + ) + ENDIF (EXISTS "${HDF5_SOURCE_DIR}/release_docs" AND IS_DIRECTORY "${HDF5_SOURCE_DIR}/release_docs") +ENDIF (NOT HDF5_EXTERNALLY_CONFIGURED) + +#----------------------------------------------------------------------------- +# Set the cpack variables +#----------------------------------------------------------------------------- +IF (NOT HDF5_EXTERNALLY_CONFIGURED AND NOT HDF5_NO_PACKAGES) + SET (CPACK_PACKAGE_VENDOR "HDF_Group") + SET (CPACK_PACKAGE_NAME "${HDF5_PACKAGE_NAME}") + SET (CPACK_PACKAGE_INSTALL_DIRECTORY "${HDF5_PACKAGE_NAME}") + SET (CPACK_PACKAGE_VERSION "${HDF5_PACKAGE_VERSION}") + SET (CPACK_PACKAGE_VERSION_MAJOR "${HDF5_PACKAGE_VERSION_MAJOR}") + SET (CPACK_PACKAGE_VERSION_MINOR "${HDF5_PACKAGE_VERSION_MINOR}") + SET (CPACK_PACKAGE_VERSION_PATCH "") + IF (EXISTS "${HDF5_SOURCE_DIR}/release_docs") + SET (CPACK_PACKAGE_DESCRIPTION_FILE "${CMAKE_CURRENT_SOURCE_DIR}/release_docs/RELEASE.txt") + SET (CPACK_RESOURCE_FILE_LICENSE "${CMAKE_CURRENT_SOURCE_DIR}/release_docs/COPYING") + SET (CPACK_RESOURCE_FILE_README "${CMAKE_CURRENT_SOURCE_DIR}/release_docs/RELEASE.txt") + ENDIF (EXISTS "${HDF5_SOURCE_DIR}/release_docs") + SET (CPACK_PACKAGE_RELOCATABLE TRUE) + + SET (CPACK_GENERATOR "TGZ") + IF (WIN32) + LIST (APPEND CPACK_GENERATOR "NSIS") + SET (CPACK_PACKAGE_INSTALL_REGISTRY_KEY "${CPACK_PACKAGE_NAME}-${CPACK_PACKAGE_VERSION}-${LIB_TYPE}") + SET (CPACK_MONOLITHIC_INSTALL ON) + SET (CPACK_NSIS_CONTACT "${HDF5_PACKAGE_BUGREPORT}") + SET (CPACK_NSIS_MODIFY_PATH ON) + SET (CPACK_NSIS_PACKAGE_NAME "HDF5 ${CPACK_PACKAGE_VERSION}") + ELSEIF (APPLE) + LIST (APPEND CPACK_GENERATOR "DragNDrop") + SET (CPACK_COMPONENTS_ALL_IN_ONE_PACKAGE ON) + SET (CPACK_PACKAGE_DEFAULT_LOCATION "/opt/${CPACK_PACKAGE_NAME}") + SET (CPACK_PACKAGING_INSTALL_PREFIX "/") + SET (CPACK_PACKAGE_FILE_NAME "${CPACK_PACKAGE_NAME}") + SET (CPACK_PACKAGE_ICON "${HDF5_RESOURCES_DIR}/hdf.gif") + SET (CPACK_SET_DESTDIR TRUE) # Required when packaging, and set CMAKE_INSTALL_PREFIX to "/". + + LIST (APPEND CPACK_GENERATOR "Bundle") + #----------------------------------------------------------------------------- + # Configure the Info.plist file for the install bundle + #----------------------------------------------------------------------------- + CONFIGURE_FILE ( + ${HDF5_RESOURCES_DIR}/CPack.Info.plist.in + ${HDF5_BINARY_DIR}/CMakeFiles/Info.plist @ONLY + ) + SET (CPACK_BUNDLE_NAME "${HDF5_PACKAGE_STRING}") + SET (CPACK_BUNDLE_LOCATION "/") # make sure CMAKE_INSTALL_PREFIX ends in / + SET (CMAKE_INSTALL_PREFIX "/${CPACK_BUNDLE_NAME}.framework/Versions/${CPACK_PACKAGE_VERSION}/${CPACK_PACKAGE_NAME}/") + SET (CPACK_BUNDLE_ICON "${HDF5_RESOURCES_DIR}/hdf.gif") + SET (CPACK_BUNDLE_PLIST "${HDF5_BINARY_DIR}/CMakeFiles/Info.plist") +# SET (CPACK_BUNDLE_STARTUP_COMMAND "${HDF5_BINARY_DIR}/CMakeFiles/${HDF5_PACKAGE}${HDF_PACKAGE_EXT}-startup.sh") + ELSE (WIN32) + SET (CPACK_PACKAGING_INSTALL_PREFIX "/usr") + SET (CPACK_COMPONENTS_ALL_IN_ONE_PACKAGE ON) + + SET (CPACK_DEBIAN_PACKAGE_SECTION "Libraries") + SET (CPACK_DEBIAN_PACKAGE_MAINTAINER "${HDF5_PACKAGE_BUGREPORT}") + + SET (CPACK_RPM_COMPONENT_INSTALL ON) + SET (CPACK_RPM_PACKAGE_RELOCATABLE ON) + SET (CPACK_RPM_PACKAGE_LICENSE "BSD-style") + SET (CPACK_RPM_PACKAGE_GROUP "Development/Libraries") + SET (CPACK_RPM_PACKAGE_URL "${HDF5_PACKAGE_URL}") + SET (CPACK_RPM_PACKAGE_SUMMARY "HDF5 is a unique technology suite that makes possible the management of extremely large and complex data collections.") + SET (CPACK_RPM_PACKAGE_DESCRIPTION + "The HDF5 technology suite includes: + + * A versatile data model that can represent very complex data objects and a wide variety of metadata. + + * A completely portable file format with no limit on the number or size of data objects in the collection. + + * A software library that runs on a range of computational platforms, from laptops to massively parallel systems, and implements a high-level API with C, C++, Fortran 90, and Java interfaces. + + * A rich set of integrated performance features that allow for access time and storage space optimizations. + + * Tools and applications for managing, manipulating, viewing, and analyzing the data in the collection. + +The HDF5 data model, file format, API, library, and tools are open and distributed without charge. +" + ) + ENDIF (WIN32) + + INCLUDE(InstallRequiredSystemLibraries) + + SET (CPACK_INSTALL_CMAKE_PROJECTS "${HDF5_BINARY_DIR};HDF5;ALL;/") + + IF (HDF5_PACKAGE_EXTLIBS) + IF (HDF5_ALLOW_EXTERNAL_SUPPORT MATCHES "SVN" OR HDF5_ALLOW_EXTERNAL_SUPPORT MATCHES "TGZ") + IF (ZLIB_FOUND AND ZLIB_USE_EXTERNAL) + SET (CPACK_INSTALL_CMAKE_PROJECTS "${CPACK_INSTALL_CMAKE_PROJECTS};${ZLIB_INCLUDE_DIR_GEN};ZLIB;libraries;/") + SET (CPACK_INSTALL_CMAKE_PROJECTS "${CPACK_INSTALL_CMAKE_PROJECTS};${ZLIB_INCLUDE_DIR_GEN};ZLIB;headers;/") + SET (CPACK_INSTALL_CMAKE_PROJECTS "${CPACK_INSTALL_CMAKE_PROJECTS};${ZLIB_INCLUDE_DIR_GEN};ZLIB;configinstall;/") + ENDIF (ZLIB_FOUND AND ZLIB_USE_EXTERNAL) + IF (SZIP_FOUND AND SZIP_USE_EXTERNAL) + SET (CPACK_INSTALL_CMAKE_PROJECTS "${CPACK_INSTALL_CMAKE_PROJECTS};${SZIP_INCLUDE_DIR_GEN};SZIP;libraries;/") + SET (CPACK_INSTALL_CMAKE_PROJECTS "${CPACK_INSTALL_CMAKE_PROJECTS};${SZIP_INCLUDE_DIR_GEN};SZIP;headers;/") + SET (CPACK_INSTALL_CMAKE_PROJECTS "${CPACK_INSTALL_CMAKE_PROJECTS};${SZIP_INCLUDE_DIR_GEN};SZIP;configinstall;/") + ENDIF (SZIP_FOUND AND SZIP_USE_EXTERNAL) + ENDIF (HDF5_ALLOW_EXTERNAL_SUPPORT MATCHES "SVN" OR HDF5_ALLOW_EXTERNAL_SUPPORT MATCHES "TGZ") + ENDIF (HDF5_PACKAGE_EXTLIBS) + + INCLUDE (CPack) + + #--------------------------------------------------------------------------- + # Now list the cpack commands + #--------------------------------------------------------------------------- + CPACK_ADD_COMPONENT (hdfapplications + DISPLAY_NAME "HDF5 Applications" + DEPENDS libraries + GROUP Applications + ) + CPACK_ADD_COMPONENT (libraries + DISPLAY_NAME "HDF5 Libraries" + GROUP Runtime + ) + CPACK_ADD_COMPONENT (headers + DISPLAY_NAME "HDF5 Headers" + DEPENDS libraries + GROUP Development + ) + CPACK_ADD_COMPONENT (hdfdocuments + DISPLAY_NAME "HDF5 Documents" + GROUP Documents + ) + CPACK_ADD_COMPONENT (configinstall + DISPLAY_NAME "HDF5 CMake files" + DEPENDS libraries + GROUP Development + ) + + IF (HDF5_BUILD_FORTRAN) + CPACK_ADD_COMPONENT (fortlibraries + DISPLAY_NAME "HDF5 Fortran Libraries" + DEPENDS libraries + GROUP Runtime + ) + CPACK_ADD_COMPONENT (fortheaders + DISPLAY_NAME "HDF5 Fortran Headers" + DEPENDS fortlibraries + GROUP Development + ) + ENDIF (HDF5_BUILD_FORTRAN) + + IF (HDF5_BUILD_CPP_LIB) + CPACK_ADD_COMPONENT (cpplibraries + DISPLAY_NAME "HDF5 C++ Libraries" + DEPENDS libraries + GROUP Runtime + ) + CPACK_ADD_COMPONENT (cppheaders + DISPLAY_NAME "HDF5 C++ Headers" + DEPENDS cpplibraries + GROUP Development + ) + ENDIF (HDF5_BUILD_CPP_LIB) + + IF (HDF5_BUILD_TOOLS) + CPACK_ADD_COMPONENT (toolsapplications + DISPLAY_NAME "HDF5 Tools Applications" + DEPENDS toolslibraries + GROUP Applications + ) + CPACK_ADD_COMPONENT (toolslibraries + DISPLAY_NAME "HDF5 Tools Libraries" + DEPENDS libraries + GROUP Runtime + ) + CPACK_ADD_COMPONENT (toolsheaders + DISPLAY_NAME "HDF5 Tools Headers" + DEPENDS toolslibraries + GROUP Development + ) + ENDIF (HDF5_BUILD_TOOLS) + + IF (HDF5_BUILD_HL_LIB) + CPACK_ADD_COMPONENT (hllibraries + DISPLAY_NAME "HDF5 HL Libraries" + DEPENDS libraries + GROUP Runtime + ) + CPACK_ADD_COMPONENT (hlheaders + DISPLAY_NAME "HDF5 HL Headers" + DEPENDS hllibraries + GROUP Development + ) + CPACK_ADD_COMPONENT (hltoolsapplications + DISPLAY_NAME "HDF5 HL Tools Applications" + DEPENDS hllibraries + GROUP Applications + ) + CPACK_ADD_COMPONENT (hlcpplibraries + DISPLAY_NAME "HDF5 HL C++ Libraries" + DEPENDS hllibraries + GROUP Runtime + ) + CPACK_ADD_COMPONENT (hlcppheaders + DISPLAY_NAME "HDF5 HL C++ Headers" + DEPENDS hlcpplibraries + GROUP Development + ) + CPACK_ADD_COMPONENT (hlfortlibraries + DISPLAY_NAME "HDF5 HL Fortran Libraries" + DEPENDS fortlibraries + GROUP Runtime + ) + ENDIF (HDF5_BUILD_HL_LIB) + +ENDIF (NOT HDF5_EXTERNALLY_CONFIGURED AND NOT HDF5_NO_PACKAGES) diff --git a/CMakeLists.txt b/CMakeLists.txt index aa3bbbf..4e3d753 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -677,127 +677,7 @@ ENDIF (HDF5_USE_18_API_DEFAULT) #----------------------------------------------------------------------------- INCLUDE (UserMacros.cmake) -#----------------------------------------------------------------------------- -# Options for HDF5 Filters -#----------------------------------------------------------------------------- -MACRO (HDF5_SETUP_FILTERS FILTER) - OPTION (HDF5_USE_FILTER_${FILTER} "Use the ${FILTER} Filter" ON) - IF (HDF5_USE_FILTER_${FILTER}) - SET (H5_HAVE_FILTER_${FILTER} 1) - SET (FILTERS "${FILTERS} ${FILTER}") - ENDIF (HDF5_USE_FILTER_${FILTER}) - # MESSAGE (STATUS "Filter ${FILTER} is ${HDF5_USE_FILTER_${FILTER}}") -ENDMACRO (HDF5_SETUP_FILTERS) - -HDF5_SETUP_FILTERS (SHUFFLE) -HDF5_SETUP_FILTERS (FLETCHER32) -HDF5_SETUP_FILTERS (NBIT) -HDF5_SETUP_FILTERS (SCALEOFFSET) - -INCLUDE (ExternalProject) -OPTION (HDF5_ALLOW_EXTERNAL_SUPPORT "Allow External Library Building (NO SVN TGZ)" "NO") -IF (HDF5_ALLOW_EXTERNAL_SUPPORT MATCHES "SVN" OR HDF5_ALLOW_EXTERNAL_SUPPORT MATCHES "TGZ") - OPTION (ZLIB_USE_EXTERNAL "Use External Library Building for ZLIB" 1) - OPTION (SZIP_USE_EXTERNAL "Use External Library Building for SZIP" 1) - IF (HDF5_ALLOW_EXTERNAL_SUPPORT MATCHES "SVN") - SET (ZLIB_URL ${ZLIB_SVN_URL}) - SET (SZIP_URL ${SZIP_SVN_URL}) - ELSEIF (HDF5_ALLOW_EXTERNAL_SUPPORT MATCHES "TGZ") - IF (NOT TGZ_PATH) - SET (TGZ_PATH ${HDF5_SOURCE_DIR}) - ENDIF (NOT TGZ_PATH) - SET (ZLIB_URL ${TGZ_PATH}/${ZLIB_TGZ_NAME}) - SET (SZIP_URL ${TGZ_PATH}/${SZIP_TGZ_NAME}) - ELSE (HDF5_ALLOW_EXTERNAL_SUPPORT MATCHES "SVN") - SET (ZLIB_USE_EXTERNAL 0) - SET (SZIP_USE_EXTERNAL 0) - ENDIF (HDF5_ALLOW_EXTERNAL_SUPPORT MATCHES "SVN") -ENDIF (HDF5_ALLOW_EXTERNAL_SUPPORT MATCHES "SVN" OR HDF5_ALLOW_EXTERNAL_SUPPORT MATCHES "TGZ") - -#----------------------------------------------------------------------------- -# Option for ZLib support -#----------------------------------------------------------------------------- -OPTION (HDF5_ENABLE_Z_LIB_SUPPORT "Enable Zlib Filters" OFF) -IF (HDF5_ENABLE_Z_LIB_SUPPORT) - IF (NOT H5_ZLIB_HEADER) - IF (NOT ZLIB_USE_EXTERNAL) - FIND_PACKAGE (ZLIB NAMES ${ZLIB_PACKAGE_NAME}${HDF_PACKAGE_EXT}) - IF (NOT ZLIB_FOUND) - FIND_PACKAGE (ZLIB) # Legacy find - ENDIF (NOT ZLIB_FOUND) - ENDIF (NOT ZLIB_USE_EXTERNAL) - IF (ZLIB_FOUND) - SET (H5_HAVE_FILTER_DEFLATE 1) - SET (H5_HAVE_ZLIB_H 1) - SET (H5_HAVE_LIBZ 1) - SET (H5_ZLIB_HEADER "zlib.h") - SET (ZLIB_INCLUDE_DIR_GEN ${ZLIB_INCLUDE_DIR}) - SET (ZLIB_INCLUDE_DIRS ${ZLIB_INCLUDE_DIR}) - ELSE (ZLIB_FOUND) - IF (HDF5_ALLOW_EXTERNAL_SUPPORT MATCHES "SVN" OR HDF5_ALLOW_EXTERNAL_SUPPORT MATCHES "TGZ") - EXTERNAL_ZLIB_LIBRARY (${HDF5_ALLOW_EXTERNAL_SUPPORT} ${LIB_TYPE}) - SET (H5_HAVE_FILTER_DEFLATE 1) - SET (H5_HAVE_ZLIB_H 1) - SET (H5_HAVE_LIBZ 1) - MESSAGE (STATUS "Filter ZLIB is built") - ELSE (HDF5_ALLOW_EXTERNAL_SUPPORT MATCHES "SVN" OR HDF5_ALLOW_EXTERNAL_SUPPORT MATCHES "TGZ") - MESSAGE (FATAL_ERROR " ZLib is Required for ZLib support in HDF5") - ENDIF (HDF5_ALLOW_EXTERNAL_SUPPORT MATCHES "SVN" OR HDF5_ALLOW_EXTERNAL_SUPPORT MATCHES "TGZ") - ENDIF (ZLIB_FOUND) - ELSE (NOT H5_ZLIB_HEADER) - # This project is being called from within another and ZLib is already configured - SET (H5_HAVE_FILTER_DEFLATE 1) - SET (H5_HAVE_ZLIB_H 1) - SET (H5_HAVE_LIBZ 1) - ENDIF (NOT H5_ZLIB_HEADER) - IF (H5_HAVE_FILTER_DEFLATE) - SET (EXTERNAL_FILTERS "${EXTERNAL_FILTERS} DEFLATE") - ENDIF (H5_HAVE_FILTER_DEFLATE) - SET (LINK_LIBS ${LINK_LIBS} ${ZLIB_LIBRARIES}) - INCLUDE_DIRECTORIES (${ZLIB_INCLUDE_DIRS}) - MESSAGE (STATUS "Filter ZLIB is ON") -ENDIF (HDF5_ENABLE_Z_LIB_SUPPORT) - -#----------------------------------------------------------------------------- -# Option for SzLib support -#----------------------------------------------------------------------------- -OPTION (HDF5_ENABLE_SZIP_SUPPORT "Use SZip Filter" OFF) -IF (HDF5_ENABLE_SZIP_SUPPORT) - OPTION (HDF5_ENABLE_SZIP_ENCODING "Use SZip Encoding" OFF) - IF (NOT SZIP_USE_EXTERNAL) - FIND_PACKAGE (SZIP NAMES ${SZIP_PACKAGE_NAME}${HDF_PACKAGE_EXT}) - IF (NOT SZIP_FOUND) - FIND_PACKAGE (SZIP) # Legacy find - ENDIF (NOT SZIP_FOUND) - ENDIF (NOT SZIP_USE_EXTERNAL) - IF (SZIP_FOUND) - SET (H5_HAVE_FILTER_SZIP 1) - SET (H5_HAVE_SZLIB_H 1) - SET (H5_HAVE_LIBSZ 1) - SET (SZIP_INCLUDE_DIR_GEN ${SZIP_INCLUDE_DIR}) - SET (SZIP_INCLUDE_DIRS ${SZIP_INCLUDE_DIR}) - ELSE (SZIP_FOUND) - IF (HDF5_ALLOW_EXTERNAL_SUPPORT MATCHES "SVN" OR HDF5_ALLOW_EXTERNAL_SUPPORT MATCHES "TGZ") - EXTERNAL_SZIP_LIBRARY (${HDF5_ALLOW_EXTERNAL_SUPPORT} ${LIB_TYPE} ${HDF5_ENABLE_SZIP_ENCODING}) - SET (H5_HAVE_FILTER_SZIP 1) - SET (H5_HAVE_SZLIB_H 1) - SET (H5_HAVE_LIBSZ 1) - MESSAGE (STATUS "Filter SZIP is built") - ELSE (HDF5_ALLOW_EXTERNAL_SUPPORT MATCHES "SVN" OR HDF5_ALLOW_EXTERNAL_SUPPORT MATCHES "TGZ") - MESSAGE (FATAL_ERROR "SZIP is Required for SZIP support in HDF5") - ENDIF (HDF5_ALLOW_EXTERNAL_SUPPORT MATCHES "SVN" OR HDF5_ALLOW_EXTERNAL_SUPPORT MATCHES "TGZ") - ENDIF (SZIP_FOUND) - SET (LINK_LIBS ${LINK_LIBS} ${SZIP_LIBRARIES}) - INCLUDE_DIRECTORIES (${SZIP_INCLUDE_DIR}) - MESSAGE (STATUS "Filter SZIP is ON") - IF (H5_HAVE_FILTER_SZIP) - SET (EXTERNAL_FILTERS "${EXTERNAL_FILTERS} DECODE") - ENDIF (H5_HAVE_FILTER_SZIP) - IF (HDF5_ENABLE_SZIP_ENCODING) - SET (H5_HAVE_SZIP_ENCODER 1) - SET (EXTERNAL_FILTERS "${EXTERNAL_FILTERS} ENCODE") - ENDIF (HDF5_ENABLE_SZIP_ENCODING) -ENDIF (HDF5_ENABLE_SZIP_SUPPORT) +INCLUDE (CMakeFilters.cmake) #----------------------------------------------------------------------------- # Option for external libraries on windows @@ -995,404 +875,4 @@ ENDIF (EXISTS "${HDF5_SOURCE_DIR}/hl" AND IS_DIRECTORY "${HDF5_SOURCE_DIR}/hl") #----------------------------------------------------------------------------- CONFIGURE_FILE (${HDF5_RESOURCES_DIR}/H5pubconf.h.in ${HDF5_BINARY_DIR}/H5pubconf.h @ONLY) -#----------------------------------------------------------------------------- -# Add file(s) to CMake Install -#----------------------------------------------------------------------------- -IF (NOT HDF5_INSTALL_NO_DEVELOPMENT) - INSTALL ( - FILES ${PROJECT_BINARY_DIR}/H5pubconf.h - DESTINATION ${HDF5_INSTALL_INCLUDE_DIR} - COMPONENT headers - ) -ENDIF (NOT HDF5_INSTALL_NO_DEVELOPMENT) - -#----------------------------------------------------------------------------- -# Add Target(s) to CMake Install for import into other projects -#----------------------------------------------------------------------------- -IF (NOT HDF5_EXTERNALLY_CONFIGURED) - INSTALL ( - EXPORT ${HDF5_EXPORTED_TARGETS} - DESTINATION ${HDF5_INSTALL_CMAKE_DIR}/${HDF5_PACKAGE} - FILE ${HDF5_PACKAGE}${HDF_PACKAGE_EXT}-targets.cmake - COMPONENT configinstall - ) -ENDIF (NOT HDF5_EXTERNALLY_CONFIGURED) - -#----------------------------------------------------------------------------- -# Export all exported targets to the build tree for use by parent project -#----------------------------------------------------------------------------- -IF (NOT HDF5_EXTERNALLY_CONFIGURED) - EXPORT ( - TARGETS ${HDF5_LIBRARIES_TO_EXPORT} ${HDF5_LIB_DEPENDENCIES} - FILE ${HDF5_PACKAGE}${HDF_PACKAGE_EXT}-targets.cmake - ) -ENDIF (NOT HDF5_EXTERNALLY_CONFIGURED) - -#----------------------------------------------------------------------------- -# Configure the hdf5-config.cmake file for the build directory -#----------------------------------------------------------------------------- -SET (HDF5_INCLUDES_BUILD_TIME - ${HDF5_SRC_DIR} ${HDF5_CPP_SRC_DIR} ${HDF5_HL_SRC_DIR} - ${HDF5_TOOLS_SRC_DIR} ${HDF5_BINARY_DIR} -) -SET (HDF5_VERSION_STRING @HDF5_PACKAGE_VERSION@) -SET (HDF5_VERSION_MAJOR @HDF5_PACKAGE_VERSION_MAJOR@) -SET (HDF5_VERSION_MINOR @HDF5_PACKAGE_VERSION_MINOR@) - -CONFIGURE_FILE ( - ${HDF5_RESOURCES_DIR}/hdf5-config.cmake.build.in - ${HDF5_BINARY_DIR}/${HDF5_PACKAGE}${HDF_PACKAGE_EXT}-config.cmake @ONLY -) - -#----------------------------------------------------------------------------- -# Configure the FindHDF5.cmake file for the install directory -#----------------------------------------------------------------------------- -IF (NOT HDF5_EXTERNALLY_CONFIGURED) - CONFIGURE_FILE ( - ${HDF5_RESOURCES_DIR}/FindHDF5.cmake.in - ${HDF5_BINARY_DIR}/CMakeFiles/FindHDF5${HDF_PACKAGE_EXT}.cmake @ONLY - ) - INSTALL ( - FILES ${HDF5_BINARY_DIR}/CMakeFiles/FindHDF5${HDF_PACKAGE_EXT}.cmake - DESTINATION ${HDF5_INSTALL_CMAKE_DIR}/${HDF5_PACKAGE} - COMPONENT configinstall - ) -ENDIF (NOT HDF5_EXTERNALLY_CONFIGURED) - -#----------------------------------------------------------------------------- -# Configure the hdf5-config.cmake file for the install directory -#----------------------------------------------------------------------------- -IF (NOT HDF5_EXTERNALLY_CONFIGURED) - CONFIGURE_FILE ( - ${HDF5_RESOURCES_DIR}/hdf5-config.cmake.install.in - ${HDF5_BINARY_DIR}/CMakeFiles/${HDF5_PACKAGE}${HDF_PACKAGE_EXT}-config.cmake @ONLY - ) - INSTALL ( - FILES ${HDF5_BINARY_DIR}/CMakeFiles/${HDF5_PACKAGE}${HDF_PACKAGE_EXT}-config.cmake - DESTINATION ${HDF5_INSTALL_CMAKE_DIR}/${HDF5_PACKAGE} - COMPONENT configinstall - ) -ENDIF (NOT HDF5_EXTERNALLY_CONFIGURED) - -#----------------------------------------------------------------------------- -# Configure the hdf5-config-version .cmake file for the install directory -#----------------------------------------------------------------------------- -IF (NOT HDF5_EXTERNALLY_CONFIGURED) - CONFIGURE_FILE ( - ${HDF5_RESOURCES_DIR}/hdf5-config-version.cmake.in - ${HDF5_BINARY_DIR}/CMakeFiles/${HDF5_PACKAGE}${HDF_PACKAGE_EXT}-config-version.cmake @ONLY - ) - INSTALL ( - FILES ${HDF5_BINARY_DIR}/CMakeFiles/${HDF5_PACKAGE}${HDF_PACKAGE_EXT}-config-version.cmake - DESTINATION ${HDF5_INSTALL_CMAKE_DIR}/${HDF5_PACKAGE} - COMPONENT configinstall - ) -ENDIF (NOT HDF5_EXTERNALLY_CONFIGURED) - -#----------------------------------------------------------------------------- -# Configure the libhdf5.settings file for the lib info -#----------------------------------------------------------------------------- -IF (H5_WORDS_BIGENDIAN) - SET (BYTESEX big-endian) -ELSE (H5_WORDS_BIGENDIAN) - SET (BYTESEX little-endian) -ENDIF (H5_WORDS_BIGENDIAN) -CONFIGURE_FILE ( - ${HDF5_RESOURCES_DIR}/libhdf5.settings.cmake.in - ${HDF5_BINARY_DIR}/libhdf5.settings @ONLY -) -INSTALL ( - FILES ${HDF5_BINARY_DIR}/libhdf5.settings - DESTINATION ${HDF5_INSTALL_CMAKE_DIR}/${HDF5_PACKAGE} - COMPONENT libraries -) - -#----------------------------------------------------------------------------- -# Configure the HDF518_Examples.cmake file and the examples -#----------------------------------------------------------------------------- -OPTION (HDF5_PACK_EXAMPLES "Package the HDF5 Library Examples Compressed File" OFF) -IF (HDF5_PACK_EXAMPLES) - CONFIGURE_FILE ( - ${HDF5_RESOURCES_DIR}/HDF518_Examples.cmake.in - ${HDF5_BINARY_DIR}/HDF518_Examples.cmake @ONLY - ) - INSTALL ( - FILES ${HDF5_BINARY_DIR}/HDF518_Examples.cmake - DESTINATION ${HDF5_INSTALL_DATA_DIR} - COMPONENT hdfdocuments - ) - IF (EXISTS "${HDF5_EXAMPLES_COMPRESSED_DIR}/${HDF5_EXAMPLES_COMPRESSED}") - INSTALL ( - FILES - ${HDF5_EXAMPLES_COMPRESSED_DIR}/${HDF5_EXAMPLES_COMPRESSED} - ${HDF5_SOURCE_DIR}/release_docs/USING_CMake_Examples.txt - DESTINATION ${HDF5_INSTALL_DATA_DIR} - COMPONENT hdfdocuments - ) - ENDIF (EXISTS "${HDF5_EXAMPLES_COMPRESSED_DIR}/${HDF5_EXAMPLES_COMPRESSED}") -ENDIF (HDF5_PACK_EXAMPLES) - -#----------------------------------------------------------------------------- -# Add Document File(s) to CMake Install -#----------------------------------------------------------------------------- -IF (NOT HDF5_EXTERNALLY_CONFIGURED) - INSTALL ( - FILES - ${HDF5_SOURCE_DIR}/ACKNOWLEDGMENTS - ${HDF5_SOURCE_DIR}/COPYING - DESTINATION ${HDF5_INSTALL_DATA_DIR} - COMPONENT hdfdocuments - ) - IF (EXISTS "${HDF5_SOURCE_DIR}/release_docs" AND IS_DIRECTORY "${HDF5_SOURCE_DIR}/release_docs") - SET (release_files - ${HDF5_SOURCE_DIR}/release_docs/USING_HDF5_CMake.txt - ${HDF5_SOURCE_DIR}/release_docs/COPYING - ${HDF5_SOURCE_DIR}/release_docs/RELEASE.txt - ) - IF (WIN32 AND NOT CYGWIN) - SET (release_files - ${release_files} - ${HDF5_SOURCE_DIR}/release_docs/USING_HDF5_VS.txt - ) - ENDIF (WIN32 AND NOT CYGWIN) - IF (HDF5_PACK_INSTALL_DOCS) - SET (release_files - ${release_files} - ${HDF5_SOURCE_DIR}/release_docs/INSTALL_CMake.txt - ${HDF5_SOURCE_DIR}/release_docs/HISTORY-1_8.txt - ${HDF5_SOURCE_DIR}/release_docs/INSTALL - ) - IF (WIN32) - IF (NOT CYGWIN) - SET (release_files - ${release_files} - ${HDF5_SOURCE_DIR}/release_docs/INSTALL_Windows.txt - ) - ELSE (NOT CYGWIN) - SET (release_files - ${release_files} - ${HDF5_SOURCE_DIR}/release_docs/INSTALL_Cygwin.txt - ) - ENDIF (NOT CYGWIN) - ENDIF (WIN32) - IF (HDF5_ENABLE_PARALLEL) - SET (release_files - ${release_files} - ${HDF5_SOURCE_DIR}/release_docs/INSTALL_parallel - ) - ENDIF (HDF5_ENABLE_PARALLEL) - ENDIF (HDF5_PACK_INSTALL_DOCS) - INSTALL ( - FILES ${release_files} - DESTINATION ${HDF5_INSTALL_DATA_DIR} - COMPONENT hdfdocuments - ) - ENDIF (EXISTS "${HDF5_SOURCE_DIR}/release_docs" AND IS_DIRECTORY "${HDF5_SOURCE_DIR}/release_docs") -ENDIF (NOT HDF5_EXTERNALLY_CONFIGURED) - -#----------------------------------------------------------------------------- -# Set the cpack variables -#----------------------------------------------------------------------------- -IF (NOT HDF5_EXTERNALLY_CONFIGURED AND NOT HDF5_NO_PACKAGES) - SET (CPACK_PACKAGE_VENDOR "HDF_Group") - SET (CPACK_PACKAGE_NAME "${HDF5_PACKAGE_NAME}") - SET (CPACK_PACKAGE_INSTALL_DIRECTORY "${HDF5_PACKAGE_NAME}") - SET (CPACK_PACKAGE_VERSION "${HDF5_PACKAGE_VERSION}") - SET (CPACK_PACKAGE_VERSION_MAJOR "${HDF5_PACKAGE_VERSION_MAJOR}") - SET (CPACK_PACKAGE_VERSION_MINOR "${HDF5_PACKAGE_VERSION_MINOR}") - SET (CPACK_PACKAGE_VERSION_PATCH "") - IF (EXISTS "${HDF5_SOURCE_DIR}/release_docs") - SET (CPACK_PACKAGE_DESCRIPTION_FILE "${CMAKE_CURRENT_SOURCE_DIR}/release_docs/RELEASE.txt") - SET (CPACK_RESOURCE_FILE_LICENSE "${CMAKE_CURRENT_SOURCE_DIR}/release_docs/COPYING") - SET (CPACK_RESOURCE_FILE_README "${CMAKE_CURRENT_SOURCE_DIR}/release_docs/RELEASE.txt") - ENDIF (EXISTS "${HDF5_SOURCE_DIR}/release_docs") - SET (CPACK_PACKAGE_RELOCATABLE TRUE) - - SET (CPACK_GENERATOR "TGZ") - IF (WIN32) - LIST (APPEND CPACK_GENERATOR "NSIS") - SET (CPACK_PACKAGE_INSTALL_REGISTRY_KEY "${CPACK_PACKAGE_NAME}-${CPACK_PACKAGE_VERSION}-${LIB_TYPE}") - SET (CPACK_MONOLITHIC_INSTALL ON) - SET (CPACK_NSIS_CONTACT "${HDF5_PACKAGE_BUGREPORT}") - SET (CPACK_NSIS_MODIFY_PATH ON) - SET (CPACK_NSIS_PACKAGE_NAME "HDF5 ${CPACK_PACKAGE_VERSION}") - ELSEIF (APPLE) - LIST (APPEND CPACK_GENERATOR "DragNDrop") - SET (CPACK_COMPONENTS_ALL_IN_ONE_PACKAGE ON) - SET (CPACK_PACKAGE_DEFAULT_LOCATION "/opt/${CPACK_PACKAGE_NAME}") - SET (CPACK_PACKAGING_INSTALL_PREFIX "/") - SET (CPACK_PACKAGE_FILE_NAME "${CPACK_PACKAGE_NAME}") - SET (CPACK_PACKAGE_ICON "${HDF5_RESOURCES_DIR}/hdf.gif") - SET (CPACK_SET_DESTDIR TRUE) # Required when packaging, and set CMAKE_INSTALL_PREFIX to "/". - - LIST (APPEND CPACK_GENERATOR "Bundle") - #----------------------------------------------------------------------------- - # Configure the Info.plist file for the install bundle - #----------------------------------------------------------------------------- - CONFIGURE_FILE ( - ${HDF5_RESOURCES_DIR}/CPack.Info.plist.in - ${HDF5_BINARY_DIR}/CMakeFiles/Info.plist @ONLY - ) - SET (CPACK_BUNDLE_NAME "${HDF5_PACKAGE_STRING}") - SET (CPACK_BUNDLE_LOCATION "/") # make sure CMAKE_INSTALL_PREFIX ends in / - SET (CMAKE_INSTALL_PREFIX "/${CPACK_BUNDLE_NAME}.framework/Versions/${CPACK_PACKAGE_VERSION}/${CPACK_PACKAGE_NAME}/") - SET (CPACK_BUNDLE_ICON "${HDF5_RESOURCES_DIR}/hdf.gif") - SET (CPACK_BUNDLE_PLIST "${HDF5_BINARY_DIR}/CMakeFiles/Info.plist") -# SET (CPACK_BUNDLE_STARTUP_COMMAND "${HDF5_BINARY_DIR}/CMakeFiles/${HDF5_PACKAGE}${HDF_PACKAGE_EXT}-startup.sh") - ELSE (WIN32) - SET (CPACK_PACKAGING_INSTALL_PREFIX "/usr") - SET (CPACK_COMPONENTS_ALL_IN_ONE_PACKAGE ON) - - SET (CPACK_DEBIAN_PACKAGE_SECTION "Libraries") - SET (CPACK_DEBIAN_PACKAGE_MAINTAINER "${HDF5_PACKAGE_BUGREPORT}") - - SET (CPACK_RPM_COMPONENT_INSTALL ON) - SET (CPACK_RPM_PACKAGE_RELOCATABLE ON) - SET (CPACK_RPM_PACKAGE_LICENSE "BSD-style") - SET (CPACK_RPM_PACKAGE_GROUP "Development/Libraries") - SET (CPACK_RPM_PACKAGE_URL "${HDF5_PACKAGE_URL}") - SET (CPACK_RPM_PACKAGE_SUMMARY "HDF5 is a unique technology suite that makes possible the management of extremely large and complex data collections.") - SET (CPACK_RPM_PACKAGE_DESCRIPTION - "The HDF5 technology suite includes: - - * A versatile data model that can represent very complex data objects and a wide variety of metadata. - - * A completely portable file format with no limit on the number or size of data objects in the collection. - - * A software library that runs on a range of computational platforms, from laptops to massively parallel systems, and implements a high-level API with C, C++, Fortran 90, and Java interfaces. - - * A rich set of integrated performance features that allow for access time and storage space optimizations. - - * Tools and applications for managing, manipulating, viewing, and analyzing the data in the collection. - -The HDF5 data model, file format, API, library, and tools are open and distributed without charge. -" - ) - ENDIF (WIN32) - - INCLUDE(InstallRequiredSystemLibraries) - - SET (CPACK_INSTALL_CMAKE_PROJECTS "${HDF5_BINARY_DIR};HDF5;ALL;/") - - IF (HDF5_PACKAGE_EXTLIBS) - IF (HDF5_ALLOW_EXTERNAL_SUPPORT MATCHES "SVN" OR HDF5_ALLOW_EXTERNAL_SUPPORT MATCHES "TGZ") - IF (ZLIB_FOUND AND ZLIB_USE_EXTERNAL) - SET (CPACK_INSTALL_CMAKE_PROJECTS "${CPACK_INSTALL_CMAKE_PROJECTS};${ZLIB_INCLUDE_DIR_GEN};ZLIB;libraries;/") - SET (CPACK_INSTALL_CMAKE_PROJECTS "${CPACK_INSTALL_CMAKE_PROJECTS};${ZLIB_INCLUDE_DIR_GEN};ZLIB;headers;/") - SET (CPACK_INSTALL_CMAKE_PROJECTS "${CPACK_INSTALL_CMAKE_PROJECTS};${ZLIB_INCLUDE_DIR_GEN};ZLIB;configinstall;/") - ENDIF (ZLIB_FOUND AND ZLIB_USE_EXTERNAL) - IF (SZIP_FOUND AND SZIP_USE_EXTERNAL) - SET (CPACK_INSTALL_CMAKE_PROJECTS "${CPACK_INSTALL_CMAKE_PROJECTS};${SZIP_INCLUDE_DIR_GEN};SZIP;libraries;/") - SET (CPACK_INSTALL_CMAKE_PROJECTS "${CPACK_INSTALL_CMAKE_PROJECTS};${SZIP_INCLUDE_DIR_GEN};SZIP;headers;/") - SET (CPACK_INSTALL_CMAKE_PROJECTS "${CPACK_INSTALL_CMAKE_PROJECTS};${SZIP_INCLUDE_DIR_GEN};SZIP;configinstall;/") - ENDIF (SZIP_FOUND AND SZIP_USE_EXTERNAL) - ENDIF (HDF5_ALLOW_EXTERNAL_SUPPORT MATCHES "SVN" OR HDF5_ALLOW_EXTERNAL_SUPPORT MATCHES "TGZ") - ENDIF (HDF5_PACKAGE_EXTLIBS) - - INCLUDE (CPack) - - #--------------------------------------------------------------------------- - # Now list the cpack commands - #--------------------------------------------------------------------------- - CPACK_ADD_COMPONENT (hdfapplications - DISPLAY_NAME "HDF5 Applications" - DEPENDS libraries - GROUP Applications - ) - CPACK_ADD_COMPONENT (libraries - DISPLAY_NAME "HDF5 Libraries" - GROUP Runtime - ) - CPACK_ADD_COMPONENT (headers - DISPLAY_NAME "HDF5 Headers" - DEPENDS libraries - GROUP Development - ) - CPACK_ADD_COMPONENT (hdfdocuments - DISPLAY_NAME "HDF5 Documents" - GROUP Documents - ) - CPACK_ADD_COMPONENT (configinstall - DISPLAY_NAME "HDF5 CMake files" - DEPENDS libraries - GROUP Development - ) - - IF (HDF5_BUILD_FORTRAN) - CPACK_ADD_COMPONENT (fortlibraries - DISPLAY_NAME "HDF5 Fortran Libraries" - DEPENDS libraries - GROUP Runtime - ) - CPACK_ADD_COMPONENT (fortheaders - DISPLAY_NAME "HDF5 Fortran Headers" - DEPENDS fortlibraries - GROUP Development - ) - ENDIF (HDF5_BUILD_FORTRAN) - - IF (HDF5_BUILD_CPP_LIB) - CPACK_ADD_COMPONENT (cpplibraries - DISPLAY_NAME "HDF5 C++ Libraries" - DEPENDS libraries - GROUP Runtime - ) - CPACK_ADD_COMPONENT (cppheaders - DISPLAY_NAME "HDF5 C++ Headers" - DEPENDS cpplibraries - GROUP Development - ) - ENDIF (HDF5_BUILD_CPP_LIB) - - IF (HDF5_BUILD_TOOLS) - CPACK_ADD_COMPONENT (toolsapplications - DISPLAY_NAME "HDF5 Tools Applications" - DEPENDS toolslibraries - GROUP Applications - ) - CPACK_ADD_COMPONENT (toolslibraries - DISPLAY_NAME "HDF5 Tools Libraries" - DEPENDS libraries - GROUP Runtime - ) - CPACK_ADD_COMPONENT (toolsheaders - DISPLAY_NAME "HDF5 Tools Headers" - DEPENDS toolslibraries - GROUP Development - ) - ENDIF (HDF5_BUILD_TOOLS) - - IF (HDF5_BUILD_HL_LIB) - CPACK_ADD_COMPONENT (hllibraries - DISPLAY_NAME "HDF5 HL Libraries" - DEPENDS libraries - GROUP Runtime - ) - CPACK_ADD_COMPONENT (hlheaders - DISPLAY_NAME "HDF5 HL Headers" - DEPENDS hllibraries - GROUP Development - ) - CPACK_ADD_COMPONENT (hltoolsapplications - DISPLAY_NAME "HDF5 HL Tools Applications" - DEPENDS hllibraries - GROUP Applications - ) - CPACK_ADD_COMPONENT (hlcpplibraries - DISPLAY_NAME "HDF5 HL C++ Libraries" - DEPENDS hllibraries - GROUP Runtime - ) - CPACK_ADD_COMPONENT (hlcppheaders - DISPLAY_NAME "HDF5 HL C++ Headers" - DEPENDS hlcpplibraries - GROUP Development - ) - CPACK_ADD_COMPONENT (hlfortlibraries - DISPLAY_NAME "HDF5 HL Fortran Libraries" - DEPENDS fortlibraries - GROUP Runtime - ) - ENDIF (HDF5_BUILD_HL_LIB) - -ENDIF (NOT HDF5_EXTERNALLY_CONFIGURED AND NOT HDF5_NO_PACKAGES) +INCLUDE (CMakeInstallation.cmake) diff --git a/MANIFEST b/MANIFEST index ce1cc5b..9911380 100644 --- a/MANIFEST +++ b/MANIFEST @@ -2428,45 +2428,74 @@ ./release_docs/USING_CMake_Examples.txt ./CMakeLists.txt +./CMakeFilters.cmake +./CMakeInstallation.cmake ./CTestConfig.cmake ./UserMacros.cmake ./c++/CMakeLists.txt ./c++/examples/CMakeLists.txt +./c++/examples/CMakeTests.cmake ./c++/src/CMakeLists.txt ./c++/test/CMakeLists.txt +./c++/test/CMakeTests.cmake ./examples/CMakeLists.txt +./examples/CMakeTests.cmake ./examples/run-all-ex.sh ./examples/run-c-ex.sh.in ./fortran/CMakeLists.txt ./fortran/examples/CMakeLists.txt +./fortran/examples/CMakeTests.cmake ./fortran/src/CMakeLists.txt ./fortran/test/CMakeLists.txt +./fortran/test/CMakeTests.cmake ./fortran/testpar/CMakeLists.txt +./fortran/testpar/CMakeTests.cmake ./hl/CMakeLists.txt ./hl/c++/CMakeLists.txt ./hl/c++/examples/CMakeLists.txt +./hl/c++/examples/CMakeTests.cmake ./hl/c++/src/CMakeLists.txt ./hl/c++/test/CMakeLists.txt +./hl/c++/test/CMakeTests.cmake ./hl/examples/CMakeLists.txt +./hl/examples/CMakeTests.cmake ./hl/fortran/CMakeLists.txt ./hl/fortran/examples/CMakeLists.txt +./hl/fortran/examples/CMakeTests.cmake ./hl/fortran/src/CMakeLists.txt ./hl/fortran/test/CMakeLists.txt +./hl/fortran/test/CMakeTests.cmake ./hl/src/CMakeLists.txt ./hl/test/CMakeLists.txt +./hl/test/CMakeTests.cmake ./hl/tools/CMakeLists.txt +./hl/tools/CMakeTests.cmake ./perform/CMakeLists.txt +./perform/CMakeTests.cmake ./src/CMakeLists.txt ./test/CMakeLists.txt +./test/CMakeTests.cmake ./testpar/CMakeLists.txt +./testpar/CMakeTests.cmake ./tools/CMakeLists.txt ./tools/h5copy/CMakeLists.txt +./tools/h5copy/CMakeTests.cmake ./tools/h5diff/CMakeLists.txt +./tools/h5diff/CMakeTests.cmake ./tools/h5dump/CMakeLists.txt +./tools/h5dump/CMakeTests.cmake +./tools/h5dump/CMakeTestsPBITS.cmake +./tools/h5dump/CMakeTestsXML.cmake ./tools/h5import/CMakeLists.txt +./tools/h5import/CMakeTests.cmake ./tools/h5jam/CMakeLists.txt +./tools/h5jam/CMakeTests.cmake ./tools/h5ls/CMakeLists.txt +./tools/h5ls/CMakeTests.cmake ./tools/h5repack/CMakeLists.txt +./tools/h5repack/CMakeTests.cmake ./tools/h5stat/CMakeLists.txt +./tools/h5stat/CMakeTests.cmake ./tools/lib/CMakeLists.txt ./tools/misc/CMakeLists.txt +./tools/misc/CMakeTests.cmake diff --git a/c++/examples/CMakeLists.txt b/c++/examples/CMakeLists.txt index dd8e45d..c25b98c 100644 --- a/c++/examples/CMakeLists.txt +++ b/c++/examples/CMakeLists.txt @@ -29,27 +29,5 @@ FOREACH (example ${examples}) ENDFOREACH (example ${examples}) IF (BUILD_TESTING) - # Remove any output file left over from previous test run - ADD_TEST ( - NAME cpp_ex-clear-objects - COMMAND ${CMAKE_COMMAND} - -E remove - Group.h5 - SDS.h5 - SDScompound.h5 - SDSextendible.h5 - Select.h5 - ) - IF (NOT "${last_test}" STREQUAL "") - SET_TESTS_PROPERTIES (cpp_ex-clear-objects PROPERTIES DEPENDS ${last_test}) - ENDIF (NOT "${last_test}" STREQUAL "") - SET (last_test "cpp_ex-clear-objects") - - FOREACH (example ${examples}) - ADD_TEST (NAME cpp_ex_${example} COMMAND $) - IF (NOT "${last_test}" STREQUAL "") - SET_TESTS_PROPERTIES (cpp_ex_${example} PROPERTIES DEPENDS ${last_test}) - ENDIF (NOT "${last_test}" STREQUAL "") - SET (last_test "cpp_ex_${example}") - ENDFOREACH (example ${examples}) + INCLUDE (CMakeTests.cmake) ENDIF (BUILD_TESTING) diff --git a/c++/examples/CMakeTests.cmake b/c++/examples/CMakeTests.cmake new file mode 100644 index 0000000..47f8ffa --- /dev/null +++ b/c++/examples/CMakeTests.cmake @@ -0,0 +1,29 @@ + +############################################################################## +############################################################################## +### T E S T I N G ### +############################################################################## +############################################################################## + # Remove any output file left over from previous test run + ADD_TEST ( + NAME cpp_ex-clear-objects + COMMAND ${CMAKE_COMMAND} + -E remove + Group.h5 + SDS.h5 + SDScompound.h5 + SDSextendible.h5 + Select.h5 + ) + IF (NOT "${last_test}" STREQUAL "") + SET_TESTS_PROPERTIES (cpp_ex-clear-objects PROPERTIES DEPENDS ${last_test}) + ENDIF (NOT "${last_test}" STREQUAL "") + SET (last_test "cpp_ex-clear-objects") + + FOREACH (example ${examples}) + ADD_TEST (NAME cpp_ex_${example} COMMAND $) + IF (NOT "${last_test}" STREQUAL "") + SET_TESTS_PROPERTIES (cpp_ex_${example} PROPERTIES DEPENDS ${last_test}) + ENDIF (NOT "${last_test}" STREQUAL "") + SET (last_test "cpp_ex_${example}") + ENDFOREACH (example ${examples}) diff --git a/c++/test/CMakeLists.txt b/c++/test/CMakeLists.txt index b31185e..e498fc5 100644 --- a/c++/test/CMakeLists.txt +++ b/c++/test/CMakeLists.txt @@ -52,42 +52,4 @@ ADD_CUSTOM_COMMAND ( ARGS -E copy_if_different ${HDF5_CPP_TEST_SOURCE_DIR}/th5s.h5 ${PROJECT_BINARY_DIR}/th5s.h5 ) -ADD_TEST (NAME cpp_testhdf5 COMMAND $) - -IF (HDF5_TEST_VFD) - - SET (VFD_LIST - sec2 - stdio - core - split - multi - family - ) - - IF (DIRECT_VFD) - SET (VFD_LIST ${VFD_LIST} direct) - ENDIF (DIRECT_VFD) - - MACRO (ADD_VFD_TEST vfdname resultcode) - IF (NOT HDF5_ENABLE_USING_MEMCHECKER) - ADD_TEST ( - NAME VFD-${vfdname}-cpp_testhdf5 - COMMAND "${CMAKE_COMMAND}" - -D "TEST_PROGRAM=$" - -D "TEST_ARGS:STRING=" - -D "TEST_VFD:STRING=${vfdname}" - -D "TEST_EXPECT=${resultcode}" - -D "TEST_OUTPUT=cpp_testhdf5" - -D "TEST_FOLDER=${PROJECT_BINARY_DIR}" - -P "${HDF5_RESOURCES_DIR}/vfdTest.cmake" - ) - ENDIF (NOT HDF5_ENABLE_USING_MEMCHECKER) - ENDMACRO (ADD_VFD_TEST) - - # Run test with different Virtual File Driver - FOREACH (vfd ${VFD_LIST}) - ADD_VFD_TEST (${vfd} 0) - ENDFOREACH (vfd ${VFD_LIST}) - -ENDIF (HDF5_TEST_VFD) +INCLUDE (CMakeTests.cmake) diff --git a/c++/test/CMakeTests.cmake b/c++/test/CMakeTests.cmake new file mode 100644 index 0000000..f2a10e2 --- /dev/null +++ b/c++/test/CMakeTests.cmake @@ -0,0 +1,46 @@ + +############################################################################## +############################################################################## +### T E S T I N G ### +############################################################################## +############################################################################## + +ADD_TEST (NAME cpp_testhdf5 COMMAND $) + +IF (HDF5_TEST_VFD) + + SET (VFD_LIST + sec2 + stdio + core + split + multi + family + ) + + IF (DIRECT_VFD) + SET (VFD_LIST ${VFD_LIST} direct) + ENDIF (DIRECT_VFD) + + MACRO (ADD_VFD_TEST vfdname resultcode) + IF (NOT HDF5_ENABLE_USING_MEMCHECKER) + ADD_TEST ( + NAME VFD-${vfdname}-cpp_testhdf5 + COMMAND "${CMAKE_COMMAND}" + -D "TEST_PROGRAM=$" + -D "TEST_ARGS:STRING=" + -D "TEST_VFD:STRING=${vfdname}" + -D "TEST_EXPECT=${resultcode}" + -D "TEST_OUTPUT=cpp_testhdf5" + -D "TEST_FOLDER=${PROJECT_BINARY_DIR}" + -P "${HDF5_RESOURCES_DIR}/vfdTest.cmake" + ) + ENDIF (NOT HDF5_ENABLE_USING_MEMCHECKER) + ENDMACRO (ADD_VFD_TEST) + + # Run test with different Virtual File Driver + FOREACH (vfd ${VFD_LIST}) + ADD_VFD_TEST (${vfd} 0) + ENDFOREACH (vfd ${VFD_LIST}) + +ENDIF (HDF5_TEST_VFD) diff --git a/examples/CMakeLists.txt b/examples/CMakeLists.txt index 01daf69..e7a1326 100644 --- a/examples/CMakeLists.txt +++ b/examples/CMakeLists.txt @@ -53,60 +53,5 @@ IF (H5_HAVE_PARALLEL) ENDIF (H5_HAVE_PARALLEL) IF (BUILD_TESTING) - FILE (MAKE_DIRECTORY ${PROJECT_BINARY_DIR}/red ${PROJECT_BINARY_DIR}/blue ${PROJECT_BINARY_DIR}/u2w) - - # Remove any output file left over from previous test run - ADD_TEST ( - NAME EXAMPLES-clear-objects - COMMAND ${CMAKE_COMMAND} - -E remove - Attributes.h5 - btrees_file.h5 - cmprss.h5 - default_file.h5 - dset.h5 - extend.h5 - extlink_prefix_source.h5 - extlink_source.h5 - extlink_target.h5 - group.h5 - groups.h5 - hard_link.h5 - mount1.h5 - mount2.h5 - one_index_file.h5 - only_dspaces_and_attrs_file.h5 - only_huge_mesgs_file.h5 - REF_REG.h5 - refere.h5 - SDS.h5 - SDScompound.h5 - SDSextendible.h5 - Select.h5 - separate_indexes_file.h5 - small_lists_file.h5 - soft_link.h5 - subset.h5 - unix2win.h5 - ) - IF (NOT "${last_test}" STREQUAL "") - SET_TESTS_PROPERTIES (EXAMPLES-clear-objects PROPERTIES DEPENDS ${last_test}) - ENDIF (NOT "${last_test}" STREQUAL "") - SET (last_test "EXAMPLES-clear-objects") - - FOREACH (example ${examples}) - ADD_TEST (NAME EXAMPLES-${example} COMMAND $) - IF (NOT "${last_test}" STREQUAL "") - SET_TESTS_PROPERTIES (EXAMPLES-${example} PROPERTIES DEPENDS ${last_test}) - ENDIF (NOT "${last_test}" STREQUAL "") - SET (last_test "EXAMPLES-${example}") - ENDFOREACH (example ${examples}) - - IF (H5_HAVE_PARALLEL) - ADD_TEST (NAME EXAMPLES-ph5example COMMAND $) - IF (NOT "${last_test}" STREQUAL "") - SET_TESTS_PROPERTIES (EXAMPLES-ph5example PROPERTIES DEPENDS ${last_test}) - ENDIF (NOT "${last_test}" STREQUAL "") - SET (last_test "EXAMPLES-ph5example") - ENDIF (H5_HAVE_PARALLEL) + INCLUDE (CMakeTests.cmake) ENDIF (BUILD_TESTING) diff --git a/examples/CMakeTests.cmake b/examples/CMakeTests.cmake new file mode 100644 index 0000000..1f896df --- /dev/null +++ b/examples/CMakeTests.cmake @@ -0,0 +1,62 @@ + +############################################################################## +############################################################################## +### T E S T I N G ### +############################################################################## +############################################################################## + FILE (MAKE_DIRECTORY ${PROJECT_BINARY_DIR}/red ${PROJECT_BINARY_DIR}/blue ${PROJECT_BINARY_DIR}/u2w) + + # Remove any output file left over from previous test run + ADD_TEST ( + NAME EXAMPLES-clear-objects + COMMAND ${CMAKE_COMMAND} + -E remove + Attributes.h5 + btrees_file.h5 + cmprss.h5 + default_file.h5 + dset.h5 + extend.h5 + extlink_prefix_source.h5 + extlink_source.h5 + extlink_target.h5 + group.h5 + groups.h5 + hard_link.h5 + mount1.h5 + mount2.h5 + one_index_file.h5 + only_dspaces_and_attrs_file.h5 + only_huge_mesgs_file.h5 + REF_REG.h5 + refere.h5 + SDS.h5 + SDScompound.h5 + SDSextendible.h5 + Select.h5 + separate_indexes_file.h5 + small_lists_file.h5 + soft_link.h5 + subset.h5 + unix2win.h5 + ) + IF (NOT "${last_test}" STREQUAL "") + SET_TESTS_PROPERTIES (EXAMPLES-clear-objects PROPERTIES DEPENDS ${last_test}) + ENDIF (NOT "${last_test}" STREQUAL "") + SET (last_test "EXAMPLES-clear-objects") + + FOREACH (example ${examples}) + ADD_TEST (NAME EXAMPLES-${example} COMMAND $) + IF (NOT "${last_test}" STREQUAL "") + SET_TESTS_PROPERTIES (EXAMPLES-${example} PROPERTIES DEPENDS ${last_test}) + ENDIF (NOT "${last_test}" STREQUAL "") + SET (last_test "EXAMPLES-${example}") + ENDFOREACH (example ${examples}) + + IF (H5_HAVE_PARALLEL) + ADD_TEST (NAME EXAMPLES-ph5example COMMAND $) + IF (NOT "${last_test}" STREQUAL "") + SET_TESTS_PROPERTIES (EXAMPLES-ph5example PROPERTIES DEPENDS ${last_test}) + ENDIF (NOT "${last_test}" STREQUAL "") + SET (last_test "EXAMPLES-ph5example") + ENDIF (H5_HAVE_PARALLEL) diff --git a/fortran/examples/CMakeLists.txt b/fortran/examples/CMakeLists.txt index e514a6e..f57df63 100644 --- a/fortran/examples/CMakeLists.txt +++ b/fortran/examples/CMakeLists.txt @@ -54,15 +54,6 @@ FOREACH (example ${examples}) ) SET_TARGET_PROPERTIES (f90_ex_${example} PROPERTIES LINKER_LANGUAGE Fortran) SET_TARGET_PROPERTIES (f90_ex_${example} PROPERTIES FOLDER examples/fortran) - - IF (BUILD_TESTING) - ADD_TEST (NAME f90_ex_${example} COMMAND $) - IF (NOT "${last_test}" STREQUAL "") - SET_TESTS_PROPERTIES (f90_ex_${example} PROPERTIES DEPENDS ${last_test}) - ENDIF (NOT "${last_test}" STREQUAL "") - SET (last_test "f90_ex_${example}") - ENDIF (BUILD_TESTING) - ENDFOREACH (example ${examples}) IF (HDF5_ENABLE_F2003) @@ -81,14 +72,6 @@ IF (HDF5_ENABLE_F2003) ) SET_TARGET_PROPERTIES (f03_ex_${example} PROPERTIES LINKER_LANGUAGE Fortran) SET_TARGET_PROPERTIES (f03_ex_${example} PROPERTIES FOLDER examples/fortran03) - - IF (BUILD_TESTING) - ADD_TEST (NAME f03_ex_${example} COMMAND $) - IF (NOT "${last_test}" STREQUAL "") - SET_TESTS_PROPERTIES (f03_ex_${example} PROPERTIES DEPENDS ${last_test}) - ENDIF (NOT "${last_test}" STREQUAL "") - SET (last_test "f03_ex_${example}") - ENDIF (BUILD_TESTING) ENDFOREACH (example ${F2003_examples}) ENDIF (HDF5_ENABLE_F2003) @@ -109,9 +92,8 @@ IF (H5_HAVE_PARALLEL AND MPI_Fortran_FOUND) ) SET_TARGET_PROPERTIES (f90_ex_ph5example PROPERTIES LINKER_LANGUAGE Fortran) SET_TARGET_PROPERTIES (f90_ex_ph5example PROPERTIES FOLDER examples/fortran) - - IF (BUILD_TESTING) - ADD_TEST (NAME f90_ex_ph5example COMMAND ${MPIEXEC} ${MPIEXEC_PREFLAGS} ${MPIEXEC_NUMPROC_FLAG} ${MPIEXEC_MAX_NUMPROCS} ${MPIEXEC_POSTFLAGS} $) - ENDIF (BUILD_TESTING) - ENDIF (H5_HAVE_PARALLEL AND MPI_Fortran_FOUND) + +IF (BUILD_TESTING) + INCLUDE (CMakeTests.cmake) +ENDIF (BUILD_TESTING) diff --git a/fortran/examples/CMakeTests.cmake b/fortran/examples/CMakeTests.cmake new file mode 100644 index 0000000..d5b201c --- /dev/null +++ b/fortran/examples/CMakeTests.cmake @@ -0,0 +1,28 @@ + +############################################################################## +############################################################################## +### T E S T I N G ### +############################################################################## +############################################################################## + +FOREACH (example ${examples}) + ADD_TEST (NAME f90_ex_${example} COMMAND $) + IF (NOT "${last_test}" STREQUAL "") + SET_TESTS_PROPERTIES (f90_ex_${example} PROPERTIES DEPENDS ${last_test}) + ENDIF (NOT "${last_test}" STREQUAL "") + SET (last_test "f90_ex_${example}") +ENDFOREACH (example ${examples}) + +IF (HDF5_ENABLE_F2003) + FOREACH (example ${F2003_examples}) + ADD_TEST (NAME f03_ex_${example} COMMAND $) + IF (NOT "${last_test}" STREQUAL "") + SET_TESTS_PROPERTIES (f03_ex_${example} PROPERTIES DEPENDS ${last_test}) + ENDIF (NOT "${last_test}" STREQUAL "") + SET (last_test "f03_ex_${example}") + ENDFOREACH (example ${F2003_examples}) +ENDIF (HDF5_ENABLE_F2003) + +IF (H5_HAVE_PARALLEL AND MPI_Fortran_FOUND) + ADD_TEST (NAME f90_ex_ph5example COMMAND ${MPIEXEC} ${MPIEXEC_PREFLAGS} ${MPIEXEC_NUMPROC_FLAG} ${MPIEXEC_MAX_NUMPROCS} ${MPIEXEC_POSTFLAGS} $) +ENDIF (H5_HAVE_PARALLEL AND MPI_Fortran_FOUND) diff --git a/fortran/test/CMakeLists.txt b/fortran/test/CMakeLists.txt index 72f239e..643ec94 100644 --- a/fortran/test/CMakeLists.txt +++ b/fortran/test/CMakeLists.txt @@ -73,9 +73,6 @@ ENDIF (WIN32 AND MSVC) SET_TARGET_PROPERTIES (testhdf5_fortran PROPERTIES LINKER_LANGUAGE Fortran) SET_TARGET_PROPERTIES (testhdf5_fortran PROPERTIES FOLDER test/fortran) -ADD_TEST (NAME testhdf5_fortran COMMAND $) -SET_TESTS_PROPERTIES(testhdf5_fortran PROPERTIES PASS_REGULAR_EXPRESSION "[ ]*0 error.s") - #-- Adding test for testhdf5_fortran_1_8 ADD_EXECUTABLE (testhdf5_fortran_1_8 fortranlib_test_1_8.f90 @@ -97,9 +94,6 @@ ENDIF (WIN32 AND MSVC) SET_TARGET_PROPERTIES (testhdf5_fortran_1_8 PROPERTIES LINKER_LANGUAGE Fortran) SET_TARGET_PROPERTIES (testhdf5_fortran_1_8 PROPERTIES FOLDER test/fortran) -ADD_TEST (NAME testhdf5_fortran_1_8 COMMAND $) -SET_TESTS_PROPERTIES(testhdf5_fortran_1_8 PROPERTIES PASS_REGULAR_EXPRESSION "[ ]*0 error.s") - #-- Adding test for fortranlib_test_F03 IF (HDF5_ENABLE_F2003) ADD_EXECUTABLE (fortranlib_test_F03 @@ -124,9 +118,6 @@ IF (HDF5_ENABLE_F2003) ENDIF (WIN32 AND MSVC) SET_TARGET_PROPERTIES (fortranlib_test_F03 PROPERTIES LINKER_LANGUAGE Fortran) SET_TARGET_PROPERTIES (fortranlib_test_F03 PROPERTIES FOLDER test/fortran) - - ADD_TEST (NAME fortranlib_test_F03 COMMAND $) - SET_TESTS_PROPERTIES(fortranlib_test_F03 PROPERTIES PASS_REGULAR_EXPRESSION "[ ]*0 error.s") ENDIF (HDF5_ENABLE_F2003) #-- Adding test for fflush1 @@ -144,8 +135,6 @@ ENDIF (WIN32 AND MSVC) SET_TARGET_PROPERTIES (fflush1 PROPERTIES LINKER_LANGUAGE Fortran) SET_TARGET_PROPERTIES (fflush1 PROPERTIES FOLDER test/fortran) -ADD_TEST (NAME fflush1 COMMAND $) - #-- Adding test for fflush2 ADD_EXECUTABLE (fflush2 fflush2.f90) TARGET_NAMING (fflush2 ${LIB_TYPE}) @@ -161,5 +150,4 @@ ENDIF (WIN32 AND MSVC) SET_TARGET_PROPERTIES (fflush2 PROPERTIES LINKER_LANGUAGE Fortran) SET_TARGET_PROPERTIES (fflush2 PROPERTIES FOLDER test/fortran) -ADD_TEST (NAME fflush2 COMMAND $) -SET_TESTS_PROPERTIES(fflush2 PROPERTIES DEPENDS fflush1) +INCLUDE (CMakeTests.cmake) diff --git a/fortran/test/CMakeTests.cmake b/fortran/test/CMakeTests.cmake new file mode 100644 index 0000000..d381b62 --- /dev/null +++ b/fortran/test/CMakeTests.cmake @@ -0,0 +1,26 @@ + +############################################################################## +############################################################################## +### T E S T I N G ### +############################################################################## +############################################################################## + +ADD_TEST (NAME testhdf5_fortran COMMAND $) +SET_TESTS_PROPERTIES(testhdf5_fortran PROPERTIES PASS_REGULAR_EXPRESSION "[ ]*0 error.s") + +#-- Adding test for testhdf5_fortran_1_8 +ADD_TEST (NAME testhdf5_fortran_1_8 COMMAND $) +SET_TESTS_PROPERTIES(testhdf5_fortran_1_8 PROPERTIES PASS_REGULAR_EXPRESSION "[ ]*0 error.s") + +#-- Adding test for fortranlib_test_F03 +IF (HDF5_ENABLE_F2003) + ADD_TEST (NAME fortranlib_test_F03 COMMAND $) + SET_TESTS_PROPERTIES(fortranlib_test_F03 PROPERTIES PASS_REGULAR_EXPRESSION "[ ]*0 error.s") +ENDIF (HDF5_ENABLE_F2003) + +#-- Adding test for fflush1 +ADD_TEST (NAME fflush1 COMMAND $) + +#-- Adding test for fflush2 +ADD_TEST (NAME fflush2 COMMAND $) +SET_TESTS_PROPERTIES(fflush2 PROPERTIES DEPENDS fflush1) diff --git a/fortran/testpar/CMakeLists.txt b/fortran/testpar/CMakeLists.txt index 76b6023..d1aba51 100644 --- a/fortran/testpar/CMakeLists.txt +++ b/fortran/testpar/CMakeLists.txt @@ -30,4 +30,4 @@ ENDIF (WIN32 AND MSVC) SET_TARGET_PROPERTIES (parallel_test PROPERTIES LINKER_LANGUAGE Fortran) SET_TARGET_PROPERTIES (parallel_test PROPERTIES FOLDER test/fortran) -ADD_TEST (NAME parallel_test COMMAND ${MPIEXEC} ${MPIEXEC_PREFLAGS} ${MPIEXEC_NUMPROC_FLAG} ${MPIEXEC_MAX_NUMPROCS} ${MPIEXEC_POSTFLAGS} $) +INCLUDE (CMakeTests.cmake) diff --git a/fortran/testpar/CMakeTests.cmake b/fortran/testpar/CMakeTests.cmake new file mode 100644 index 0000000..2cd7ed0 --- /dev/null +++ b/fortran/testpar/CMakeTests.cmake @@ -0,0 +1,7 @@ + +############################################################################## +############################################################################## +### T E S T I N G ### +############################################################################## +############################################################################## +ADD_TEST (NAME parallel_test COMMAND ${MPIEXEC} ${MPIEXEC_PREFLAGS} ${MPIEXEC_NUMPROC_FLAG} ${MPIEXEC_MAX_NUMPROCS} ${MPIEXEC_POSTFLAGS} $) diff --git a/hl/c++/examples/CMakeLists.txt b/hl/c++/examples/CMakeLists.txt index aa4221f..f762839 100644 --- a/hl/c++/examples/CMakeLists.txt +++ b/hl/c++/examples/CMakeLists.txt @@ -22,5 +22,5 @@ TARGET_LINK_LIBRARIES ( SET_TARGET_PROPERTIES (ptExampleFL PROPERTIES FOLDER examples/hl/cpp) IF (BUILD_TESTING) - ADD_TEST (NAME cpp_hl_ex_ptExampleFL COMMAND $) + INCLUDE (CMakeTests.cmake) ENDIF (BUILD_TESTING) diff --git a/hl/c++/examples/CMakeTests.cmake b/hl/c++/examples/CMakeTests.cmake new file mode 100644 index 0000000..95cc8b4 --- /dev/null +++ b/hl/c++/examples/CMakeTests.cmake @@ -0,0 +1,8 @@ + +############################################################################## +############################################################################## +### T E S T I N G ### +############################################################################## +############################################################################## + +ADD_TEST (NAME cpp_hl_ex_ptExampleFL COMMAND $) diff --git a/hl/c++/test/CMakeLists.txt b/hl/c++/test/CMakeLists.txt index 6633426..46229ba 100644 --- a/hl/c++/test/CMakeLists.txt +++ b/hl/c++/test/CMakeLists.txt @@ -11,23 +11,21 @@ INCLUDE_DIRECTORIES (${HDF5_HL_SRC_DIR}/c++/src) # Add in the unit tests for the packet table c++ wrapper # -------------------------------------------------------------------- -IF (BUILD_TESTING) - INCLUDE_DIRECTORIES (${HDF5_TEST_SRC_DIR}) - INCLUDE_DIRECTORIES (${HDF5_HL_SRC_DIR}/test) - INCLUDE_DIRECTORIES (${HDF5_CPP_SRC_DIR}/src) +INCLUDE_DIRECTORIES (${HDF5_TEST_SRC_DIR}) +INCLUDE_DIRECTORIES (${HDF5_HL_SRC_DIR}/test) +INCLUDE_DIRECTORIES (${HDF5_CPP_SRC_DIR}/src) - ADD_EXECUTABLE (hl_ptableTest ${HDF5_HL_CPP_TEST_SOURCE_DIR}/ptableTest.cpp) - TARGET_C_PROPERTIES (hl_ptableTest " " " ") - TARGET_NAMING (hl_ptableTest ${LIB_TYPE}) - TARGET_LINK_LIBRARIES ( - hl_ptableTest - ${HDF5_LIB_TARGET} - ${HDF5_TEST_LIB_TARGET} - ${HDF5_CPP_LIB_TARGET} - ${HDF5_HL_LIB_TARGET} - ${HDF5_HL_CPP_LIB_TARGET} - ) - SET_TARGET_PROPERTIES (hl_ptableTest PROPERTIES FOLDER test/hl/cpp) - - ADD_TEST (NAME hl_ptableTest COMMAND $) -ENDIF (BUILD_TESTING) +ADD_EXECUTABLE (hl_ptableTest ${HDF5_HL_CPP_TEST_SOURCE_DIR}/ptableTest.cpp) +TARGET_C_PROPERTIES (hl_ptableTest " " " ") +TARGET_NAMING (hl_ptableTest ${LIB_TYPE}) +TARGET_LINK_LIBRARIES ( + hl_ptableTest + ${HDF5_LIB_TARGET} + ${HDF5_TEST_LIB_TARGET} + ${HDF5_CPP_LIB_TARGET} + ${HDF5_HL_LIB_TARGET} + ${HDF5_HL_CPP_LIB_TARGET} +) +SET_TARGET_PROPERTIES (hl_ptableTest PROPERTIES FOLDER test/hl/cpp) + +INCLUDE (CMakeTests.cmake) diff --git a/hl/c++/test/CMakeTests.cmake b/hl/c++/test/CMakeTests.cmake new file mode 100644 index 0000000..cb9454b --- /dev/null +++ b/hl/c++/test/CMakeTests.cmake @@ -0,0 +1,8 @@ + +############################################################################## +############################################################################## +### T E S T I N G ### +############################################################################## +############################################################################## + + ADD_TEST (NAME hl_ptableTest COMMAND $) diff --git a/hl/examples/CMakeLists.txt b/hl/examples/CMakeLists.txt index b702754..36c799d 100644 --- a/hl/examples/CMakeLists.txt +++ b/hl/examples/CMakeLists.txt @@ -1,20 +1,6 @@ cmake_minimum_required (VERSION 2.8.10) PROJECT (HDF5_HL_EXAMPLES ) -SET (HDF5_TEST_FILES -) - -FOREACH (h5_file ${HDF5_TEST_FILES}) - SET (dest "${PROJECT_BINARY_DIR}/${h5_file}") - #MESSAGE (STATUS " Copying ${h5_file}") - ADD_CUSTOM_COMMAND ( - TARGET h5dump - POST_BUILD - COMMAND ${CMAKE_COMMAND} - ARGS -E copy_if_different ${PROJECT_SOURCE_DIR}/${h5_file} ${dest} - ) -ENDFOREACH (h5_file ${HDF5_TEST_FILES}) - #----------------------------------------------------------------------------- # Define Sources #----------------------------------------------------------------------------- @@ -46,30 +32,10 @@ FOREACH (example ${examples}) TARGET_C_PROPERTIES (hl_ex_${example} " " " ") TARGET_LINK_LIBRARIES (hl_ex_${example} ${HDF5_HL_LIB_TARGET} ${HDF5_LIB_TARGET}) SET_TARGET_PROPERTIES (hl_ex_${example} PROPERTIES FOLDER examples/hl) - - IF (BUILD_TESTING) - ADD_TEST (NAME hl_ex_${example} COMMAND $) - ENDIF (BUILD_TESTING) ENDFOREACH (example ${examples}) IF (BUILD_TESTING) - SET_TESTS_PROPERTIES (hl_ex_ex_lite2 PROPERTIES DEPENDS hl_ex_ex_lite1) -ENDIF (BUILD_TESTING) -IF (BUILD_TESTING) - SET (HDF5_TEST_FILES - image24pixel.txt - image8.txt - ) + INCLUDE (CMakeTests.cmake) - FOREACH (h5_file ${HDF5_TEST_FILES}) - SET (dest "${PROJECT_BINARY_DIR}/${h5_file}") - #MESSAGE (STATUS " Copying ${h5_file}") - ADD_CUSTOM_COMMAND ( - TARGET hl_ex_ex_ds1 - POST_BUILD - COMMAND ${CMAKE_COMMAND} - ARGS -E copy_if_different ${PROJECT_SOURCE_DIR}/${h5_file} ${dest} - ) - ENDFOREACH (h5_file ${HDF5_TEST_FILES}) ENDIF (BUILD_TESTING) diff --git a/hl/examples/CMakeTests.cmake b/hl/examples/CMakeTests.cmake new file mode 100644 index 0000000..e1ccba0 --- /dev/null +++ b/hl/examples/CMakeTests.cmake @@ -0,0 +1,28 @@ + +############################################################################## +############################################################################## +### T E S T I N G ### +############################################################################## +############################################################################## + +SET (HDF5_TEST_FILES + image24pixel.txt + image8.txt +) + +FOREACH (h5_file ${HDF5_TEST_FILES}) + SET (dest "${PROJECT_BINARY_DIR}/${h5_file}") + #MESSAGE (STATUS " Copying ${h5_file}") + ADD_CUSTOM_COMMAND ( + TARGET hl_ex_ex_ds1 + POST_BUILD + COMMAND ${CMAKE_COMMAND} + ARGS -E copy_if_different ${PROJECT_SOURCE_DIR}/${h5_file} ${dest} + ) +ENDFOREACH (h5_file ${HDF5_TEST_FILES}) + +FOREACH (example ${examples}) + ADD_TEST (NAME hl_ex_${example} COMMAND $) +ENDFOREACH (example ${examples}) + +SET_TESTS_PROPERTIES (hl_ex_ex_lite2 PROPERTIES DEPENDS hl_ex_ex_lite1) diff --git a/hl/fortran/examples/CMakeLists.txt b/hl/fortran/examples/CMakeLists.txt index df7fd24..0f663c7 100644 --- a/hl/fortran/examples/CMakeLists.txt +++ b/hl/fortran/examples/CMakeLists.txt @@ -27,8 +27,10 @@ FOREACH (example ${examples}) SET_TARGET_PROPERTIES (hl_f90_ex_${example} PROPERTIES LINKER_LANGUAGE Fortran) SET_TARGET_PROPERTIES (hl_f90_ex_${example} PROPERTIES FOLDER examples/hl/fortran) - IF (BUILD_TESTING) - ADD_TEST (NAME hl_f90_ex_${example} COMMAND $) - ENDIF (BUILD_TESTING) - ENDFOREACH (example ${examples}) + +IF (BUILD_TESTING) + + INCLUDE (CMakeTests.cmake) + +ENDIF (BUILD_TESTING) diff --git a/hl/fortran/examples/CMakeTests.cmake b/hl/fortran/examples/CMakeTests.cmake new file mode 100644 index 0000000..7e6c348 --- /dev/null +++ b/hl/fortran/examples/CMakeTests.cmake @@ -0,0 +1,10 @@ + +############################################################################## +############################################################################## +### T E S T I N G ### +############################################################################## +############################################################################## + +FOREACH (example ${examples}) + ADD_TEST (NAME hl_f90_ex_${example} COMMAND $) +ENDFOREACH (example ${examples}) diff --git a/hl/fortran/test/CMakeLists.txt b/hl/fortran/test/CMakeLists.txt index 7e7aa1d..2084162 100644 --- a/hl/fortran/test/CMakeLists.txt +++ b/hl/fortran/test/CMakeLists.txt @@ -6,20 +6,6 @@ PROJECT (HDF5_HL_FORTRAN_TESTS C CXX Fortran) #----------------------------------------------------------------------------- INCLUDE_DIRECTORIES (${CMAKE_Fortran_MODULE_DIRECTORY} ${HDF5_F90_BINARY_DIR} ${HDF5_F90_SRC_DIR}/src) -# Remove any output file left over from previous test run -ADD_TEST ( - NAME hl_fortran_test-clear-objects - COMMAND ${CMAKE_COMMAND} - -E remove - dsetf1.h5 - dsetf2.h5 - dsetf3.h5 - dsetf4.h5 - dsetf5.h5 - f1image.h5 - f1tab.h5 -) - #-- Adding test for hl_f90_tstds ADD_EXECUTABLE (hl_f90_tstds tstds.f90) TARGET_NAMING (hl_f90_tstds ${LIB_TYPE}) @@ -28,8 +14,6 @@ TARGET_LINK_LIBRARIES (hl_f90_tstds ${HDF5_HL_F90_LIB_TARGET} ${HDF5_F90_LIB_TAR SET_TARGET_PROPERTIES (hl_f90_tstds PROPERTIES LINKER_LANGUAGE Fortran) SET_TARGET_PROPERTIES (hl_f90_tstds PROPERTIES FOLDER test/hl/fortran) -ADD_TEST (NAME hl_f90_tstds COMMAND $) - #-- Adding test for hl_f90_tstlite ADD_EXECUTABLE (hl_f90_tstlite tstlite.f90) TARGET_NAMING (hl_f90_tstlite ${LIB_TYPE}) @@ -38,8 +22,6 @@ TARGET_LINK_LIBRARIES (hl_f90_tstlite ${HDF5_HL_F90_LIB_TARGET} ${HDF5_F90_LIB_T SET_TARGET_PROPERTIES (hl_f90_tstlite PROPERTIES LINKER_LANGUAGE Fortran) SET_TARGET_PROPERTIES (hl_f90_tstlite PROPERTIES FOLDER test/hl/fortran) -ADD_TEST (NAME hl_f90_tstlite COMMAND $) - #-- Adding test for hl_f90_tstimage ADD_EXECUTABLE (hl_f90_tstimage tstimage.f90) TARGET_NAMING (hl_f90_tstimage ${LIB_TYPE}) @@ -48,8 +30,6 @@ TARGET_LINK_LIBRARIES (hl_f90_tstimage ${HDF5_HL_F90_LIB_TARGET} ${HDF5_F90_LIB SET_TARGET_PROPERTIES (hl_f90_tstimage PROPERTIES LINKER_LANGUAGE Fortran) SET_TARGET_PROPERTIES (hl_f90_tstimage PROPERTIES FOLDER test/hl/fortran) -ADD_TEST (NAME hl_f90_tstimage COMMAND $) - #-- Adding test for hl_f90_tsttable ADD_EXECUTABLE (hl_f90_tsttable tsttable.f90) TARGET_NAMING (hl_f90_tsttable ${LIB_TYPE}) @@ -58,4 +38,4 @@ TARGET_LINK_LIBRARIES (hl_f90_tsttable ${HDF5_HL_F90_LIB_TARGET} ${HDF5_F90_LIB_ SET_TARGET_PROPERTIES (hl_f90_tsttable PROPERTIES LINKER_LANGUAGE Fortran) SET_TARGET_PROPERTIES (hl_f90_tsttable PROPERTIES FOLDER test/hl/fortran) -ADD_TEST (NAME hl_f90_tsttable COMMAND $) +INCLUDE (CMakeTests.cmake) diff --git a/hl/fortran/test/CMakeTests.cmake b/hl/fortran/test/CMakeTests.cmake new file mode 100644 index 0000000..96209aa --- /dev/null +++ b/hl/fortran/test/CMakeTests.cmake @@ -0,0 +1,28 @@ + +############################################################################## +############################################################################## +### T E S T I N G ### +############################################################################## +############################################################################## + +# Remove any output file left over from previous test run +ADD_TEST ( + NAME hl_fortran_test-clear-objects + COMMAND ${CMAKE_COMMAND} + -E remove + dsetf1.h5 + dsetf2.h5 + dsetf3.h5 + dsetf4.h5 + dsetf5.h5 + f1image.h5 + f1tab.h5 +) + +ADD_TEST (NAME hl_f90_tstds COMMAND $) + +ADD_TEST (NAME hl_f90_tstlite COMMAND $) + +ADD_TEST (NAME hl_f90_tstimage COMMAND $) + +ADD_TEST (NAME hl_f90_tsttable COMMAND $) diff --git a/hl/test/CMakeLists.txt b/hl/test/CMakeLists.txt index 9cb61e0..f969dbf 100644 --- a/hl/test/CMakeLists.txt +++ b/hl/test/CMakeLists.txt @@ -20,7 +20,7 @@ INCLUDE_DIRECTORIES (${HDF5_TEST_SRC_DIR}) # -------------------------------------------------------------------- # Macro used to add a unit test # -------------------------------------------------------------------- -MACRO (HL_ADD_TEST hl_name files) +MACRO (HL_ADD_EXE hl_name) ADD_EXECUTABLE (hl_${hl_name} ${hl_name}.c) TARGET_NAMING (hl_${hl_name} ${LIB_TYPE}) TARGET_C_PROPERTIES (hl_${hl_name} " " " ") @@ -30,66 +30,14 @@ MACRO (HL_ADD_TEST hl_name files) ${HDF5_TEST_LIB_TARGET} ) SET_TARGET_PROPERTIES (hl_${hl_name} PROPERTIES FOLDER test/hl) +ENDMACRO (HL_ADD_EXE) - ADD_TEST (NAME hl_${hl_name} COMMAND $) - IF (NOT "${last_test}" STREQUAL "") - SET_TESTS_PROPERTIES (hl_${hl_name} PROPERTIES DEPENDS ${last_test}) - ENDIF (NOT "${last_test}" STREQUAL "") - - # -------------------------------------------------------------------- - #-- Copy the necessary files. - # -------------------------------------------------------------------- - FOREACH (h5_file ${files}) - SET (dest "${HDF5_HL_TEST_BINARY_DIR}/${h5_file}") - #MESSAGE (STATUS " Copying HL Test File ${h5_file} to ${dest}") - ADD_CUSTOM_COMMAND ( - TARGET hl_${hl_name} - PRE_BUILD - COMMAND ${CMAKE_COMMAND} - ARGS -E copy_if_different ${HDF5_HL_TEST_SOURCE_DIR}/${h5_file} ${dest} - ) - - ENDFOREACH (h5_file ${HL_REFERENCE_TEST_FILES}) -ENDMACRO (HL_ADD_TEST) - -# Remove any output file left over from previous test run -ADD_TEST ( - NAME hl_test-clear-objects - COMMAND ${CMAKE_COMMAND} - -E remove - combine_tables1.h5 - combine_tables2.h5 - test_detach.h5 - test_ds1.h5 - test_ds2.h5 - test_ds3.h5 - test_ds4.h5 - test_ds5.h5 - test_ds6.h5 - test_ds7.h5 - test_ds8.h5 - test_ds9.h5 - test_dectris.h5 - test_image1.h5 - test_image2.h5 - test_image3.h5 - test_lite1.h5 - test_lite2.h5 - test_packet_compress.h5 - test_packet_table.h5 - test_table.h5 -) -IF (NOT "${last_test}" STREQUAL "") - SET_TESTS_PROPERTIES (hl_test-clear-objects PROPERTIES DEPENDS ${last_test}) -ENDIF (NOT "${last_test}" STREQUAL "") -SET (last_test "hl_test-clear-objects") - -HL_ADD_TEST (test_ds "dsdata.txt;dslat.txt;dslon.txt;test_ds_be.h5;test_ds_le.h5") -HL_ADD_TEST (test_dset_opt "") -HL_ADD_TEST (test_image "image8.txt;sepia.pal;earth.pal;image24pixel.txt;image24plane.txt;usa.wri") -HL_ADD_TEST (test_lite "dtype_file.txt") -HL_ADD_TEST (test_packet "") -HL_ADD_TEST (test_table "test_table_be.h5;test_table_cray.h5;test_table_le.h5") +HL_ADD_EXE (test_ds) +HL_ADD_EXE (test_dset_opt) +HL_ADD_EXE (test_image) +HL_ADD_EXE (test_lite) +HL_ADD_EXE (test_packet) +HL_ADD_EXE (test_table) # -------------------------------------------------------------------- # This executable is used to generate test files for the test_ds test. @@ -106,3 +54,5 @@ IF (HDF5_BUILD_GENERATORS AND NOT BUILD_SHARED_LIBS) ) SET_TARGET_PROPERTIES (hl_gen_test_ds PROPERTIES FOLDER test/hl/gen) ENDIF (HDF5_BUILD_GENERATORS AND NOT BUILD_SHARED_LIBS) + +INCLUDE (CMakeTests.cmake) diff --git a/hl/test/CMakeTests.cmake b/hl/test/CMakeTests.cmake new file mode 100644 index 0000000..aa9c1c3 --- /dev/null +++ b/hl/test/CMakeTests.cmake @@ -0,0 +1,70 @@ + +############################################################################## +############################################################################## +### T E S T I N G ### +############################################################################## +############################################################################## + +# -------------------------------------------------------------------- +# Macro used to add a unit test +# -------------------------------------------------------------------- +MACRO (HL_ADD_TEST hl_name files) + ADD_TEST (NAME hl_${hl_name} COMMAND $) + IF (NOT "${last_test}" STREQUAL "") + SET_TESTS_PROPERTIES (hl_${hl_name} PROPERTIES DEPENDS ${last_test}) + ENDIF (NOT "${last_test}" STREQUAL "") + + # -------------------------------------------------------------------- + #-- Copy the necessary files. + # -------------------------------------------------------------------- + FOREACH (h5_file ${files}) + SET (dest "${HDF5_HL_TEST_BINARY_DIR}/${h5_file}") + #MESSAGE (STATUS " Copying HL Test File ${h5_file} to ${dest}") + ADD_CUSTOM_COMMAND ( + TARGET hl_${hl_name} + PRE_BUILD + COMMAND ${CMAKE_COMMAND} + ARGS -E copy_if_different ${HDF5_HL_TEST_SOURCE_DIR}/${h5_file} ${dest} + ) + + ENDFOREACH (h5_file ${HL_REFERENCE_TEST_FILES}) +ENDMACRO (HL_ADD_TEST) + +# Remove any output file left over from previous test run +ADD_TEST ( + NAME hl_test-clear-objects + COMMAND ${CMAKE_COMMAND} + -E remove + combine_tables1.h5 + combine_tables2.h5 + test_detach.h5 + test_ds1.h5 + test_ds2.h5 + test_ds3.h5 + test_ds4.h5 + test_ds5.h5 + test_ds6.h5 + test_ds7.h5 + test_ds8.h5 + test_ds9.h5 + test_dectris.h5 + test_image1.h5 + test_image2.h5 + test_image3.h5 + test_lite1.h5 + test_lite2.h5 + test_packet_compress.h5 + test_packet_table.h5 + test_table.h5 +) +IF (NOT "${last_test}" STREQUAL "") + SET_TESTS_PROPERTIES (hl_test-clear-objects PROPERTIES DEPENDS ${last_test}) +ENDIF (NOT "${last_test}" STREQUAL "") +SET (last_test "hl_test-clear-objects") + +HL_ADD_TEST (test_ds "dsdata.txt;dslat.txt;dslon.txt;test_ds_be.h5;test_ds_le.h5") +HL_ADD_TEST (test_dset_opt "") +HL_ADD_TEST (test_image "image8.txt;sepia.pal;earth.pal;image24pixel.txt;image24plane.txt;usa.wri") +HL_ADD_TEST (test_lite "dtype_file.txt") +HL_ADD_TEST (test_packet "") +HL_ADD_TEST (test_table "test_table_be.h5;test_table_cray.h5;test_table_le.h5") diff --git a/hl/tools/CMakeLists.txt b/hl/tools/CMakeLists.txt index 1deff23..256ff89 100644 --- a/hl/tools/CMakeLists.txt +++ b/hl/tools/CMakeLists.txt @@ -34,20 +34,24 @@ TARGET_C_PROPERTIES (h52gif " " " ") TARGET_LINK_LIBRARIES (h52gif ${HDF5_HL_LIB_TARGET} ${HDF5_LIB_TARGET} ${HDF5_TOOLS_LIB_TARGET}) SET_TARGET_PROPERTIES (h52gif PROPERTIES FOLDER tools/hl) -# -------------------------------------------------------------------- -# This executable can generate the actual test files - Currently not -# used in the CMake Build system as we rely on the test files that are -# shipped with HDF5 source archives -# -------------------------------------------------------------------- -IF (HDF5_BUILD_GENERATORS AND NOT BUILD_SHARED_LIBS) - ADD_EXECUTABLE (hl_h52gifgentest ${HDF5_HL_TOOLS_SOURCE_DIR}/gif2h5/h52gifgentst.c) - TARGET_NAMING (hl_h52gifgentest ${LIB_TYPE}) - TARGET_C_PROPERTIES (hl_h52gifgentest " " " ") - TARGET_LINK_LIBRARIES (hl_h52gifgentest ${HDF5_HL_LIB_TARGET} ${HDF5_LIB_TARGET}) - SET_TARGET_PROPERTIES (hl_h52gifgentest PROPERTIES FOLDER generator/tools/hl) +IF (BUILD_TESTING) + # -------------------------------------------------------------------- + # This executable can generate the actual test files - Currently not + # used in the CMake Build system as we rely on the test files that are + # shipped with HDF5 source archives + # -------------------------------------------------------------------- + IF (HDF5_BUILD_GENERATORS AND NOT BUILD_SHARED_LIBS) + ADD_EXECUTABLE (hl_h52gifgentest ${HDF5_HL_TOOLS_SOURCE_DIR}/gif2h5/h52gifgentst.c) + TARGET_NAMING (hl_h52gifgentest ${LIB_TYPE}) + TARGET_C_PROPERTIES (hl_h52gifgentest " " " ") + TARGET_LINK_LIBRARIES (hl_h52gifgentest ${HDF5_HL_LIB_TARGET} ${HDF5_LIB_TARGET}) + SET_TARGET_PROPERTIES (hl_h52gifgentest PROPERTIES FOLDER generator/tools/hl) -# ADD_TEST (NAME hl_h52gifgentest COMMAND $) -ENDIF (HDF5_BUILD_GENERATORS AND NOT BUILD_SHARED_LIBS) +# ADD_TEST (NAME hl_h52gifgentest COMMAND $) + ENDIF (HDF5_BUILD_GENERATORS AND NOT BUILD_SHARED_LIBS) + + INCLUDE (CMakeTests.cmake) +ENDIF (BUILD_TESTING) #----------------------------------------------------------------------------- # Add file(s) to CMake Install diff --git a/hl/tools/CMakeTests.cmake b/hl/tools/CMakeTests.cmake new file mode 100644 index 0000000..9f987fd --- /dev/null +++ b/hl/tools/CMakeTests.cmake @@ -0,0 +1,40 @@ + +############################################################################## +############################################################################## +### T E S T I N G ### +############################################################################## +############################################################################## + +# Make testfiles dir under build dir +FILE (MAKE_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles") + +# +# copy test files from source to build dir +# + +ADD_CUSTOM_COMMAND ( + TARGET gif2h5 + POST_BUILD + COMMAND ${CMAKE_COMMAND} + ARGS -E copy_if_different ${HDF5_HL_TOOLS_SOURCE_DIR}/gif2h5/testfiles/image1.gif ${PROJECT_BINARY_DIR}/testfiles/image1.gif +) + +ADD_CUSTOM_COMMAND ( + TARGET h52gif + POST_BUILD + COMMAND ${CMAKE_COMMAND} + ARGS -E copy_if_different ${HDF5_HL_TOOLS_SOURCE_DIR}/gif2h5/testfiles/h52giftst.h5 ${PROJECT_BINARY_DIR}/testfiles/h52giftst.h5 +) + +# Remove any output file left over from previous test run +ADD_TEST ( + NAME HL_TOOLS-clear-objects + COMMAND ${CMAKE_COMMAND} + -E remove + image1.gif + image1.h5 +) + +ADD_TEST (NAME HL_TOOLS_h52gif COMMAND $ testfiles/h52giftst.h5 image1.gif -i image) + +ADD_TEST (NAME HL_TOOLS_gif2h5 COMMAND $ testfiles/image1.gif image1.h5) diff --git a/perform/CMakeLists.txt b/perform/CMakeLists.txt index f3aed76..0a6fa10 100644 --- a/perform/CMakeLists.txt +++ b/perform/CMakeLists.txt @@ -137,64 +137,4 @@ IF (H5_HAVE_PARALLEL) ENDIF (HDF5_BUILD_PARALLEL_ALL) ENDIF (H5_HAVE_PARALLEL) - -############################################################################## -############################################################################## -### T E S T I N G ### -############################################################################## -############################################################################## - -ADD_CUSTOM_COMMAND ( - TARGET zip_perf - POST_BUILD - COMMAND ${CMAKE_COMMAND} - ARGS -E copy_if_different ${HDF5_TOOLS_SRC_DIR}/testfiles/tfilters.h5 ${PROJECT_BINARY_DIR}/tfilters.h5 -) - -#----------------------------------------------------------------------------- -# Add Tests -#----------------------------------------------------------------------------- - -# Remove any output file left over from previous test run -ADD_TEST ( - NAME PERFORM_h5perform-clear-objects - COMMAND ${CMAKE_COMMAND} - -E remove - chunk.h5 - iopipe.h5 - iopipe.raw - x-diag-rd.dat - x-diag-wr.dat - x-rowmaj-rd.dat - x-rowmaj-wr.dat - x-gnuplot -) - -ADD_TEST (NAME PERFORM_h5perf_serial COMMAND $) - -IF (HDF5_BUILD_PERFORM_STANDALONE) - ADD_TEST (NAME PERFORM_h5perf_serial_alone COMMAND $) -ENDIF (HDF5_BUILD_PERFORM_STANDALONE) - -ADD_TEST (NAME PERFORM_chunk COMMAND $) - -ADD_TEST (NAME PERFORM_iopipe COMMAND $) - -ADD_TEST (NAME PERFORM_overhead COMMAND $) - -ADD_TEST (NAME PERFORM_perf_meta COMMAND $) - -ADD_TEST (NAME PERFORM_zip_perf_help COMMAND $ "-h") -ADD_TEST (NAME PERFORM_zip_perf COMMAND $ tfilters.h5) - -IF (H5_HAVE_PARALLEL) - ADD_TEST (NAME PERFORM_h5perf COMMAND ${MPIEXEC} ${MPIEXEC_PREFLAGS} ${MPIEXEC_NUMPROC_FLAG} ${MPIEXEC_MAX_NUMPROCS} ${MPIEXEC_POSTFLAGS} $) - - IF (HDF5_BUILD_PERFORM_STANDALONE) - ADD_TEST (NAME PERFORM_h5perf_alone COMMAND ${MPIEXEC} ${MPIEXEC_PREFLAGS} ${MPIEXEC_NUMPROC_FLAG} ${MPIEXEC_MAX_NUMPROCS} ${MPIEXEC_POSTFLAGS} $) - ENDIF (HDF5_BUILD_PERFORM_STANDALONE) - - IF (HDF5_BUILD_PARALLEL_ALL) - ADD_TEST (NAME PERFORM_benchpar COMMAND ${MPIEXEC} ${MPIEXEC_PREFLAGS} ${MPIEXEC_NUMPROC_FLAG} ${MPIEXEC_MAX_NUMPROCS} ${MPIEXEC_POSTFLAGS} $) - ENDIF (HDF5_BUILD_PARALLEL_ALL) -ENDIF (H5_HAVE_PARALLEL) +INCLUDE (CMakeTests.cmake) diff --git a/perform/CMakeTests.cmake b/perform/CMakeTests.cmake new file mode 100644 index 0000000..fab6ab2 --- /dev/null +++ b/perform/CMakeTests.cmake @@ -0,0 +1,61 @@ + +############################################################################## +############################################################################## +### T E S T I N G ### +############################################################################## +############################################################################## + +ADD_CUSTOM_COMMAND ( + TARGET zip_perf + POST_BUILD + COMMAND ${CMAKE_COMMAND} + ARGS -E copy_if_different ${HDF5_TOOLS_SRC_DIR}/testfiles/tfilters.h5 ${PROJECT_BINARY_DIR}/tfilters.h5 +) + +#----------------------------------------------------------------------------- +# Add Tests +#----------------------------------------------------------------------------- + +# Remove any output file left over from previous test run +ADD_TEST ( + NAME PERFORM_h5perform-clear-objects + COMMAND ${CMAKE_COMMAND} + -E remove + chunk.h5 + iopipe.h5 + iopipe.raw + x-diag-rd.dat + x-diag-wr.dat + x-rowmaj-rd.dat + x-rowmaj-wr.dat + x-gnuplot +) + +ADD_TEST (NAME PERFORM_h5perf_serial COMMAND $) + +IF (HDF5_BUILD_PERFORM_STANDALONE) + ADD_TEST (NAME PERFORM_h5perf_serial_alone COMMAND $) +ENDIF (HDF5_BUILD_PERFORM_STANDALONE) + +ADD_TEST (NAME PERFORM_chunk COMMAND $) + +ADD_TEST (NAME PERFORM_iopipe COMMAND $) + +ADD_TEST (NAME PERFORM_overhead COMMAND $) + +ADD_TEST (NAME PERFORM_perf_meta COMMAND $) + +ADD_TEST (NAME PERFORM_zip_perf_help COMMAND $ "-h") +ADD_TEST (NAME PERFORM_zip_perf COMMAND $ tfilters.h5) + +IF (H5_HAVE_PARALLEL) + ADD_TEST (NAME PERFORM_h5perf COMMAND ${MPIEXEC} ${MPIEXEC_PREFLAGS} ${MPIEXEC_NUMPROC_FLAG} ${MPIEXEC_MAX_NUMPROCS} ${MPIEXEC_POSTFLAGS} $) + + IF (HDF5_BUILD_PERFORM_STANDALONE) + ADD_TEST (NAME PERFORM_h5perf_alone COMMAND ${MPIEXEC} ${MPIEXEC_PREFLAGS} ${MPIEXEC_NUMPROC_FLAG} ${MPIEXEC_MAX_NUMPROCS} ${MPIEXEC_POSTFLAGS} $) + ENDIF (HDF5_BUILD_PERFORM_STANDALONE) + + IF (HDF5_BUILD_PARALLEL_ALL) + ADD_TEST (NAME PERFORM_benchpar COMMAND ${MPIEXEC} ${MPIEXEC_PREFLAGS} ${MPIEXEC_NUMPROC_FLAG} ${MPIEXEC_MAX_NUMPROCS} ${MPIEXEC_POSTFLAGS} $) + ENDIF (HDF5_BUILD_PARALLEL_ALL) +ENDIF (H5_HAVE_PARALLEL) diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt index 741976b..84bc114 100644 --- a/test/CMakeLists.txt +++ b/test/CMakeLists.txt @@ -120,713 +120,4 @@ IF (BUILD_SHARED_LIBS) ENDFOREACH (test_lib ${TEST2_PLUGIN_LIBS}) ENDIF (BUILD_SHARED_LIBS) -# -------------------------------------------------------------------- -# Copy all the HDF5 files from the test directory into the source directory -# -------------------------------------------------------------------- -SET (HDF5_TEST_FILES - tnullspace.h5 -) - -FOREACH (h5_tfile ${HDF5_TEST_FILES}) - SET (dest "${PROJECT_BINARY_DIR}/${h5_tfile}") - #MESSAGE (STATUS " Copying ${h5_tfile}") - ADD_CUSTOM_COMMAND ( - TARGET ${HDF5_TEST_LIB_TARGET} - POST_BUILD - COMMAND ${CMAKE_COMMAND} - ARGS -E copy_if_different ${HDF5_TOOLS_SRC_DIR}/testfiles/${h5_tfile} ${dest} - ) -ENDFOREACH (h5_tfile ${HDF5_TEST_FILES}) - -# -------------------------------------------------------------------- -# Copy all the HDF5 files from the test directory into the source directory -# -------------------------------------------------------------------- -SET (HDF5_REFERENCE_FILES - err_compat_1 - err_compat_2 - error_test_1 - error_test_2 - links_env.out -) - -FOREACH (ref_file ${HDF5_REFERENCE_FILES}) - SET (dest "${PROJECT_BINARY_DIR}/${ref_file}") - #MESSAGE (STATUS " Copying ${h5_file}") - ADD_CUSTOM_COMMAND ( - TARGET ${HDF5_TEST_LIB_TARGET} - POST_BUILD - COMMAND ${XLATE_UTILITY} - ARGS ${HDF5_TEST_SOURCE_DIR}/testfiles/${ref_file} ${dest} -l3 - ) -ENDFOREACH (ref_file ${HDF5_REFERENCE_FILES}) - -# -------------------------------------------------------------------- -# Copy test files from test/testfiles/plist_files dir to test dir -# -------------------------------------------------------------------- -SET (HDF5_REFERENCE_PLIST_FILES - acpl_be - acpl_le - dapl_be - dapl_le - dcpl_be - dcpl_le - dxpl_be - dxpl_le - fapl_be - fapl_le - fcpl_be - fcpl_le - gcpl_be - gcpl_le - lapl_be - lapl_le - lcpl_be - lcpl_le - ocpl_be - ocpl_le - ocpypl_be - ocpypl_le - strcpl_be - strcpl_le -) - -FOREACH (plistfile ${HDF5_REFERENCE_PLIST_FILES}) - SET (dest "${PROJECT_BINARY_DIR}/${plistfile}") - #MESSAGE (STATUS " Copying ${plistfile} to ${dset}") - ADD_CUSTOM_COMMAND ( - TARGET ${HDF5_TEST_LIB_TARGET} - POST_BUILD - COMMAND ${CMAKE_COMMAND} - ARGS -E copy_if_different ${HDF5_TEST_SOURCE_DIR}/testfiles/plist_files/${plistfile} ${dest} - ) -ENDFOREACH (plistfile ${HDF5_REFERENCE_PLIST_FILES}) - -# -------------------------------------------------------------------- -#-- Copy all the HDF5 files from the test directory into the source directory -# -------------------------------------------------------------------- -SET (HDF5_REFERENCE_TEST_FILES - be_data.h5 - be_extlink1.h5 - be_extlink2.h5 - corrupt_stab_msg.h5 - deflate.h5 - family_v16_00000.h5 - family_v16_00001.h5 - family_v16_00002.h5 - family_v16_00003.h5 - filespace_1_6.h5 - filespace_1_8.h5 - file_image_core_test.h5 - fill_old.h5 - filter_error.h5 - group_old.h5 - le_data.h5 - le_extlink1.h5 - le_extlink2.h5 - mergemsg.h5 - multi_file_v16-r.h5 - multi_file_v16-s.h5 - noencoder.h5 - specmetaread.h5 - tarrold.h5 - tbad_msg_count.h5 - tbogus.h5 - test_filters_be.h5 - test_filters_le.h5 - th5s.h5 - tlayouto.h5 - tmtimen.h5 - tmtimeo.h5 - tsizeslheap.h5 -) - -FOREACH (h5_file ${HDF5_REFERENCE_TEST_FILES}) - SET (dest "${HDF5_TEST_BINARY_DIR}/${h5_file}") - #MESSAGE (STATUS " Copying ${h5_file} to ${dest}") - ADD_CUSTOM_COMMAND ( - TARGET ${HDF5_TEST_LIB_TARGET} - POST_BUILD - COMMAND ${CMAKE_COMMAND} - ARGS -E copy_if_different ${HDF5_TEST_SOURCE_DIR}/${h5_file} ${dest} - ) -ENDFOREACH (h5_file ${HDF5_REFERENCE_TEST_FILES}) - -SET (testhdf5_SRCS - ${HDF5_TEST_SOURCE_DIR}/testhdf5.c - ${HDF5_TEST_SOURCE_DIR}/tarray.c - ${HDF5_TEST_SOURCE_DIR}/tattr.c - ${HDF5_TEST_SOURCE_DIR}/tchecksum.c - ${HDF5_TEST_SOURCE_DIR}/tconfig.c - ${HDF5_TEST_SOURCE_DIR}/tcoords.c - ${HDF5_TEST_SOURCE_DIR}/tfile.c - ${HDF5_TEST_SOURCE_DIR}/tgenprop.c - ${HDF5_TEST_SOURCE_DIR}/th5o.c - ${HDF5_TEST_SOURCE_DIR}/th5s.c - ${HDF5_TEST_SOURCE_DIR}/theap.c - ${HDF5_TEST_SOURCE_DIR}/tid.c - ${HDF5_TEST_SOURCE_DIR}/titerate.c - ${HDF5_TEST_SOURCE_DIR}/tmeta.c - ${HDF5_TEST_SOURCE_DIR}/tmisc.c - ${HDF5_TEST_SOURCE_DIR}/trefer.c - ${HDF5_TEST_SOURCE_DIR}/trefstr.c - ${HDF5_TEST_SOURCE_DIR}/tselect.c - ${HDF5_TEST_SOURCE_DIR}/tskiplist.c - ${HDF5_TEST_SOURCE_DIR}/tsohm.c - ${HDF5_TEST_SOURCE_DIR}/ttime.c - ${HDF5_TEST_SOURCE_DIR}/ttst.c - ${HDF5_TEST_SOURCE_DIR}/tunicode.c - ${HDF5_TEST_SOURCE_DIR}/tvltypes.c - ${HDF5_TEST_SOURCE_DIR}/tvlstr.c -) - -#-- Adding test for testhdf5 -ADD_EXECUTABLE (testhdf5 ${testhdf5_SRCS}) -TARGET_NAMING (testhdf5 ${LIB_TYPE}) -TARGET_C_PROPERTIES (testhdf5 " " " ") -TARGET_LINK_LIBRARIES (testhdf5 ${HDF5_TEST_LIB_TARGET} ${HDF5_LIB_TARGET}) -SET_TARGET_PROPERTIES (testhdf5 PROPERTIES FOLDER test) - -# Remove any output file left over from previous test run -ADD_TEST ( - NAME h5test-clear-testhdf5-objects - COMMAND ${CMAKE_COMMAND} - -E remove - coord.h5 - sys_file1 - tattr.h5 - tfile1.h5 - tfile2.h5 - tfile3.h5 - tfile4.h5 - tfile5.h5 - tfile6.h5 - th5o_file - th5s1.h5 - tselect.h5 - tsohm.h5 - tsohm_dst.h5 - tsohm_src.h5 -) - -IF (HDF5_ENABLE_USING_MEMCHECKER) - ADD_TEST (NAME testhdf5-base COMMAND $ -x heap -x file -x select) - SET_TESTS_PROPERTIES(testhdf5-base PROPERTIES DEPENDS h5test-clear-testhdf5-objects) - SET_TESTS_PROPERTIES(testhdf5-base PROPERTIES ENVIRONMENT HDF5_ALARM_SECONDS=3600) - ADD_TEST (NAME testhdf5-heap COMMAND $ -o heap) - SET_TESTS_PROPERTIES(testhdf5-heap PROPERTIES DEPENDS h5test-clear-testhdf5-objects) - SET_TESTS_PROPERTIES(testhdf5-heap PROPERTIES ENVIRONMENT HDF5_ALARM_SECONDS=3600) - ADD_TEST (NAME testhdf5-file COMMAND $ -o file) - SET_TESTS_PROPERTIES(testhdf5-file PROPERTIES DEPENDS h5test-clear-testhdf5-objects) - SET_TESTS_PROPERTIES(testhdf5-file PROPERTIES ENVIRONMENT HDF5_ALARM_SECONDS=3600) - ADD_TEST (NAME testhdf5-select COMMAND $ -o select) - SET_TESTS_PROPERTIES(testhdf5-select PROPERTIES DEPENDS h5test-clear-testhdf5-objects) - SET_TESTS_PROPERTIES(testhdf5-select PROPERTIES ENVIRONMENT HDF5_ALARM_SECONDS=3600) -ELSE (HDF5_ENABLE_USING_MEMCHECKER) - ADD_TEST (NAME testhdf5 COMMAND $) - SET_TESTS_PROPERTIES(testhdf5 PROPERTIES DEPENDS h5test-clear-testhdf5-objects) -ENDIF (HDF5_ENABLE_USING_MEMCHECKER) - -############################################################################## -############################################################################## -### T H E T E S T S M A C R O S ### -############################################################################## -############################################################################## - -MACRO (ADD_H5_TEST file) - ADD_EXECUTABLE (${file} ${HDF5_TEST_SOURCE_DIR}/${file}.c) - TARGET_NAMING (${file} ${LIB_TYPE}) - TARGET_C_PROPERTIES (${file} " " " ") - TARGET_LINK_LIBRARIES (${file} ${HDF5_TEST_LIB_TARGET} ${HDF5_LIB_TARGET}) - SET_TARGET_PROPERTIES (${file} PROPERTIES FOLDER test) - - ADD_TEST (NAME ${file} COMMAND $) -ENDMACRO (ADD_H5_TEST file) - -# Remove any output file left over from previous test run -ADD_TEST ( - NAME h5test-clear-objects - COMMAND ${CMAKE_COMMAND} - -E remove - dt_arith1.h5 - dt_arith2.h5 - dtransform.h5 - dtypes4.h5 - dtypes5.h5 - efc0.h5 - efc1.h5 - efc2.h5 - efc3.h5 - efc4.h5 - efc5.h5 - extlinks16A00000.h5 - extlinks16A00001.h5 - extlinks16A00002.h5 - extlinks16B-b.h5 - extlinks16B-g.h5 - extlinks16B-l.h5 - extlinks16B-r.h5 - extlinks16B-s.h5 - extlinks19B00000.h5 - extlinks19B00001.h5 - extlinks19B00002.h5 - extlinks19B00003.h5 - extlinks19B00004.h5 - extlinks19B00005.h5 - extlinks19B00006.h5 - extlinks19B00007.h5 - extlinks19B00008.h5 - extlinks19B00009.h5 - extlinks19B00010.h5 - extlinks19B00011.h5 - extlinks19B00012.h5 - extlinks19B00013.h5 - extlinks19B00014.h5 - extlinks19B00015.h5 - extlinks19B00016.h5 - extlinks19B00017.h5 - extlinks19B00018.h5 - extlinks19B00019.h5 - extlinks19B00020.h5 - extlinks19B00021.h5 - extlinks19B00022.h5 - extlinks19B00023.h5 - extlinks19B00024.h5 - extlinks19B00025.h5 - extlinks19B00026.h5 - extlinks19B00027.h5 - extlinks19B00028.h5 - fheap.h5 - new_multi_file_v16-r.h5 - new_multi_file_v16-s.h5 - objcopy_ext.dat - testmeta.h5 - tstint1.h5 - tstint2.h5 - unregister_filter_1.h5 - unregister_filter_2.h5 -) - -SET (H5_TESTS - accum - lheap - ohdr - stab - gheap - #cache - #cache_api - #cache_tagging - pool - hyperslab - istore - bittests - dt_arith - dtypes - cmpd_dset - filter_fail - extend - external - efc - objcopy - links - unlink - big - mtime - fillval - mount - flush1 - flush2 - app_ref - enum - set_extent - #ttsafe - getname - vfd - ntypes - dangle - dtransform - reserved - cross_read - freespace - mf - farray - earray - btree2 - fheap - #error_test - #err_compat - tcheck_version - testmeta - #links_env - file_image - enc_dec_plist - enc_dec_plist_with_endianess - unregister -) - -FOREACH (test ${H5_TESTS}) - ADD_H5_TEST(${test}) - SET_TESTS_PROPERTIES(${test} PROPERTIES DEPENDS h5test-clear-objects) -ENDFOREACH (test ${H5_TESTS}) - -SET_TESTS_PROPERTIES(flush2 PROPERTIES DEPENDS flush1) - -############################################################################## -############################################################################## -### A D D I T I O N A L T E S T S ### -############################################################################## -############################################################################## - -#-- Adding test for cache -ADD_EXECUTABLE (cache ${HDF5_TEST_SOURCE_DIR}/cache.c ${HDF5_TEST_SOURCE_DIR}/cache_common.c) -TARGET_NAMING (cache ${LIB_TYPE}) -TARGET_C_PROPERTIES (cache " " " ") -TARGET_LINK_LIBRARIES (cache ${HDF5_LIB_TARGET} ${HDF5_TEST_LIB_TARGET}) -SET_TARGET_PROPERTIES (cache PROPERTIES FOLDER test) -ADD_TEST ( - NAME h5test-clear-cache-objects - COMMAND ${CMAKE_COMMAND} - -E remove - cache_test.h5 -) -ADD_TEST (NAME cache COMMAND $) -SET_TESTS_PROPERTIES(cache PROPERTIES DEPENDS h5test-clear-cache-objects) - -#-- Adding test for cache_api -ADD_EXECUTABLE (cache_api ${HDF5_TEST_SOURCE_DIR}/cache_api.c ${HDF5_TEST_SOURCE_DIR}/cache_common.c) -TARGET_NAMING (cache_api ${LIB_TYPE}) -TARGET_C_PROPERTIES (cache_api " " " ") -TARGET_LINK_LIBRARIES (cache_api ${HDF5_LIB_TARGET} ${HDF5_TEST_LIB_TARGET}) -SET_TARGET_PROPERTIES (cache_api PROPERTIES FOLDER test) - -ADD_TEST ( - NAME h5test-clear-cache_api-objects - COMMAND ${CMAKE_COMMAND} - -E remove - cache_api_test.h5 -) -ADD_TEST (NAME cache_api COMMAND $) -SET_TESTS_PROPERTIES(cache_api PROPERTIES DEPENDS h5test-clear-cache_api-objects) - -#-- Adding test for cache_tagging -ADD_EXECUTABLE (cache_tagging ${HDF5_TEST_SOURCE_DIR}/cache_tagging.c ${HDF5_TEST_SOURCE_DIR}/cache_common.c) -TARGET_NAMING (cache_tagging ${LIB_TYPE}) -TARGET_C_PROPERTIES (cache_tagging " " " ") -TARGET_LINK_LIBRARIES (cache_tagging ${HDF5_LIB_TARGET} ${HDF5_TEST_LIB_TARGET}) -SET_TARGET_PROPERTIES (cache_tagging PROPERTIES FOLDER test) - -ADD_TEST ( - NAME h5test-clear-cache_tagging-objects - COMMAND ${CMAKE_COMMAND} - -E remove - tagging_test.h5 - tagging_ext_test.h5 -) -ADD_TEST (NAME cache_tagging COMMAND $) -SET_TESTS_PROPERTIES(cache_tagging PROPERTIES DEPENDS h5test-clear-cache_tagging-objects) - -#-- Adding test for ttsafe -ADD_EXECUTABLE (ttsafe - ${HDF5_TEST_SOURCE_DIR}/ttsafe.c - ${HDF5_TEST_SOURCE_DIR}/ttsafe_dcreate.c - ${HDF5_TEST_SOURCE_DIR}/ttsafe_error.c - ${HDF5_TEST_SOURCE_DIR}/ttsafe_cancel.c - ${HDF5_TEST_SOURCE_DIR}/ttsafe_acreate.c -) -TARGET_NAMING (ttsafe ${LIB_TYPE}) -TARGET_C_PROPERTIES (ttsafe " " " ") -TARGET_LINK_LIBRARIES (ttsafe ${HDF5_LIB_TARGET} ${HDF5_TEST_LIB_TARGET}) -SET_TARGET_PROPERTIES (ttsafe PROPERTIES FOLDER test) - -ADD_TEST ( - NAME h5test-clear-ttsafe-objects - COMMAND ${CMAKE_COMMAND} - -E remove - ttsafe_error.h5 - ttsafe_dcreate.h5 - ttsafe_cancel.h5 - ttsafe_acreate.h5 -) -ADD_TEST (NAME ttsafe COMMAND $) -SET_TESTS_PROPERTIES(ttsafe PROPERTIES DEPENDS h5test-clear-ttsafe-objects) - -#-- Adding test for err_compat -IF (HDF5_ENABLE_DEPRECATED_SYMBOLS) - ADD_EXECUTABLE (err_compat ${HDF5_TEST_SOURCE_DIR}/err_compat.c) - TARGET_NAMING (err_compat ${LIB_TYPE}) - TARGET_C_PROPERTIES (err_compat " " " ") - TARGET_LINK_LIBRARIES (err_compat ${HDF5_LIB_TARGET} ${HDF5_TEST_LIB_TARGET}) - SET_TARGET_PROPERTIES (err_compat PROPERTIES FOLDER test) - - ADD_TEST ( - NAME h5test-clear-err_compat-objects - COMMAND ${CMAKE_COMMAND} - -E remove - err_compat.txt - err_compat.txt.err - ) - ADD_TEST (NAME err_compat COMMAND "${CMAKE_COMMAND}" - -D "TEST_PROGRAM=$" - -D "TEST_ARGS:STRING=" - -D "TEST_EXPECT=0" - -D "TEST_MASK_ERROR=true" - -D "TEST_OUTPUT=err_compat.txt" - -D "TEST_REFERENCE=err_compat_1" - -D "TEST_FOLDER=${PROJECT_BINARY_DIR}" - -P "${HDF5_RESOURCES_DIR}/runTest.cmake" - ) - SET_TESTS_PROPERTIES(err_compat PROPERTIES DEPENDS h5test-clear-err_compat-objects) -ENDIF (HDF5_ENABLE_DEPRECATED_SYMBOLS) - -#-- Adding test for error_test -ADD_EXECUTABLE (error_test ${HDF5_TEST_SOURCE_DIR}/error_test.c) -TARGET_NAMING (error_test ${LIB_TYPE}) -TARGET_C_PROPERTIES (error_test " " " ") -TARGET_LINK_LIBRARIES (error_test ${HDF5_LIB_TARGET} ${HDF5_TEST_LIB_TARGET}) -SET_TARGET_PROPERTIES (error_test PROPERTIES FOLDER test) - -ADD_TEST ( - NAME h5test-clear-error_test-objects - COMMAND ${CMAKE_COMMAND} - -E remove - error_test.txt - error_test.txt.err -) -ADD_TEST (NAME error_test COMMAND "${CMAKE_COMMAND}" - -D "TEST_PROGRAM=$" - -D "TEST_ARGS:STRING=" - -D "TEST_EXPECT=0" - -D "TEST_MASK_ERROR=true" - -D "TEST_OUTPUT=error_test.txt" - -D "TEST_REFERENCE=error_test_1" - -D "TEST_FOLDER=${PROJECT_BINARY_DIR}" - -P "${HDF5_RESOURCES_DIR}/runTest.cmake" -) -SET_TESTS_PROPERTIES(error_test PROPERTIES DEPENDS h5test-clear-error_test-objects) -SET_TESTS_PROPERTIES (error_test PROPERTIES ENVIRONMENT "HDF5_PLUGIN_PRELOAD=::") - -#-- Adding test for links_env -ADD_EXECUTABLE (links_env ${HDF5_TEST_SOURCE_DIR}/links_env.c) -TARGET_NAMING (links_env ${LIB_TYPE}) -TARGET_C_PROPERTIES (links_env " " " ") -TARGET_LINK_LIBRARIES (links_env ${HDF5_LIB_TARGET} ${HDF5_TEST_LIB_TARGET}) -SET_TARGET_PROPERTIES (links_env PROPERTIES FOLDER test) - -ADD_TEST ( - NAME h5test-clear-links_env-objects - COMMAND ${CMAKE_COMMAND} - -E remove - links_env.txt - links_env.txt.err - extlinks_env0.h5 - extlinks_env1.h5 - tmp/extlinks_env1.h5 -) -ADD_TEST (NAME links_env COMMAND "${CMAKE_COMMAND}" - -D "TEST_PROGRAM=$" - -D "TEST_ARGS:STRING=" - -D "TEST_ENV_VAR:STRING=HDF5_EXT_PREFIX" - -D "TEST_ENV_VALUE:STRING=.:tmp" - -D "TEST_EXPECT=0" - -D "TEST_OUTPUT=links_env.txt" - -D "TEST_REFERENCE=links_env.out" - -D "TEST_FOLDER=${PROJECT_BINARY_DIR}" - -P "${HDF5_RESOURCES_DIR}/runTest.cmake" -) -SET_TESTS_PROPERTIES(links_env PROPERTIES DEPENDS h5test-clear-links_env-objects) - -#-- Adding test for libinfo -SET (GREP_RUNNER ${PROJECT_BINARY_DIR}/GrepRunner.cmake) -FILE (WRITE ${GREP_RUNNER} - "FILE (STRINGS \${TEST_PROGRAM} TEST_RESULT REGEX \"SUMMARY OF THE HDF5 CONFIGURATION\") -IF (\${TEST_RESULT} STREQUAL \"0\") - MESSAGE (FATAL_ERROR \"Failed: The output: \${TEST_RESULT} of \${TEST_PROGRAM} did not contain SUMMARY OF THE HDF5 CONFIGURATION\") -ELSE (\${TEST_RESULT} STREQUAL \"0\") - MESSAGE (STATUS \"COMMAND Result: \${TEST_RESULT}\") -ENDIF (\${TEST_RESULT} STREQUAL \"0\") -" -) - -ADD_TEST (NAME testlibinfo COMMAND ${CMAKE_COMMAND} -D "TEST_PROGRAM=$" -P "${GREP_RUNNER}") - -############################################################################## -### P L U G I N T E S T S -############################################################################## -IF (BUILD_SHARED_LIBS) - - IF (WIN32 AND NOT CYGWIN) - SET(CMAKE_SEP "\;") - ELSE (WIN32 AND NOT CYGWIN) - SET(CMAKE_SEP ":") - ENDIF(WIN32 AND NOT CYGWIN) - - ADD_EXECUTABLE (plugin ${HDF5_TEST_SOURCE_DIR}/plugin.c) - TARGET_NAMING (plugin ${LIB_TYPE}) - TARGET_C_PROPERTIES (plugin " " " ") - TARGET_LINK_LIBRARIES (plugin ${HDF5_TEST_PLUGIN_LIB_TARGET}) - SET_TARGET_PROPERTIES (plugin PROPERTIES FOLDER test) - - ADD_TEST (NAME H5PLUGIN-plugin COMMAND $) - SET_TESTS_PROPERTIES (H5PLUGIN-plugin PROPERTIES ENVIRONMENT "HDF5_PLUGIN_PATH=${CMAKE_BINARY_DIR}/testdir1${CMAKE_SEP}${CMAKE_BINARY_DIR}/testdir2") -ELSE (BUILD_SHARED_LIBS) - MESSAGE (STATUS " **** Plugins libraries must be built as shared libraries **** ") - ADD_TEST ( - NAME H5PLUGIN-SKIPPED - COMMAND ${CMAKE_COMMAND} -E echo "SKIP H5PLUGIN TESTING" - ) -ENDIF (BUILD_SHARED_LIBS) - -############################################################################## -############################################################################## -### V F D T E S T S ### -############################################################################## -############################################################################## - -IF (HDF5_TEST_VFD) - - SET (VFD_LIST - sec2 - stdio - core - split - multi - family - ) - - SET (H5_VFD_TESTS - testhdf5 - accum - lheap - ohdr - stab - gheap - cache - cache_api - cache_tagging - pool - hyperslab - istore - bittests - dt_arith - dtypes - cmpd_dset - filter_fail - extend - external - efc - objcopy - links - unlink - big - mtime - fillval - mount - flush1 - flush2 - app_ref - enum - set_extent - ttsafe - getname - vfd - ntypes - dangle - dtransform - reserved - cross_read - freespace - mf - farray - earray - btree2 - #fheap - error_test - err_compat - tcheck_version - testmeta - links_env - unregister -) - - IF (DIRECT_VFD) - SET (VFD_LIST ${VFD_LIST} direct) - ENDIF (DIRECT_VFD) - - MACRO (ADD_VFD_TEST vfdname resultcode) - FOREACH (test ${H5_VFD_TESTS}) - ADD_TEST ( - NAME VFD-${vfdname}-${test} - COMMAND "${CMAKE_COMMAND}" - -D "TEST_PROGRAM=$" - -D "TEST_ARGS:STRING=" - -D "TEST_VFD:STRING=${vfdname}" - -D "TEST_EXPECT=${resultcode}" - -D "TEST_OUTPUT=${test}" - -D "TEST_FOLDER=${PROJECT_BINARY_DIR}" - -P "${HDF5_RESOURCES_DIR}/vfdTest.cmake" - ) - ENDFOREACH (test ${H5_VFD_TESTS}) - IF (HDF5_TEST_FHEAP_VFD) - ADD_TEST ( - NAME VFD-${vfdname}-fheap - COMMAND "${CMAKE_COMMAND}" - -D "TEST_PROGRAM=$" - -D "TEST_ARGS:STRING=" - -D "TEST_VFD:STRING=${vfdname}" - -D "TEST_EXPECT=${resultcode}" - -D "TEST_OUTPUT=fheap" - -D "TEST_FOLDER=${PROJECT_BINARY_DIR}" - -P "${HDF5_RESOURCES_DIR}/vfdTest.cmake" - ) - ENDIF (HDF5_TEST_FHEAP_VFD) - ENDMACRO (ADD_VFD_TEST) - - # Run test with different Virtual File Driver - FOREACH (vfd ${VFD_LIST}) - ADD_VFD_TEST (${vfd} 0) - ENDFOREACH (vfd ${VFD_LIST}) - -ENDIF (HDF5_TEST_VFD) - -############################################################################## -############################################################################## -### T H E G E N E R A T O R S ### -############################################################################## -############################################################################## - -IF (HDF5_BUILD_GENERATORS AND NOT BUILD_SHARED_LIBS) - MACRO (ADD_H5_GENERATOR genfile) - ADD_EXECUTABLE (${genfile} ${HDF5_TEST_SOURCE_DIR}/${genfile}.c) - TARGET_NAMING (${genfile} ${LIB_TYPE}) - TARGET_C_PROPERTIES (${genfile} " " " ") - TARGET_LINK_LIBRARIES (${genfile} ${HDF5_TEST_LIB_TARGET} ${HDF5_LIB_TARGET}) - SET_TARGET_PROPERTIES (${genfile} PROPERTIES FOLDER generator/test) - ENDMACRO (ADD_H5_GENERATOR genfile) - - # generator executables - SET (H5_GENERATORS - gen_bad_ohdr - gen_bogus - gen_cross - gen_deflate - gen_filters - gen_new_array - gen_new_fill - gen_new_group - gen_new_mtime - gen_new_super - gen_noencoder - gen_nullspace - gen_udlinks - space_overflow - gen_filespace - gen_specmetaread - gen_sizes_lheap - gen_file_image - gen_plist - ) - - FOREACH (gen ${H5_GENERATORS}) - ADD_H5_GENERATOR (${gen}) - ENDFOREACH (gen ${H5_GENERATORS}) - -ENDIF (HDF5_BUILD_GENERATORS AND NOT BUILD_SHARED_LIBS) +INCLUDE (CMakeTests.cmake) diff --git a/test/CMakeTests.cmake b/test/CMakeTests.cmake new file mode 100644 index 0000000..2f48bbe --- /dev/null +++ b/test/CMakeTests.cmake @@ -0,0 +1,717 @@ + +############################################################################## +############################################################################## +### T E S T I N G ### +############################################################################## +############################################################################## + +# -------------------------------------------------------------------- +# Copy all the HDF5 files from the test directory into the source directory +# -------------------------------------------------------------------- +SET (HDF5_TEST_FILES + tnullspace.h5 +) + +FOREACH (h5_tfile ${HDF5_TEST_FILES}) + SET (dest "${PROJECT_BINARY_DIR}/${h5_tfile}") + #MESSAGE (STATUS " Copying ${h5_tfile}") + ADD_CUSTOM_COMMAND ( + TARGET ${HDF5_TEST_LIB_TARGET} + POST_BUILD + COMMAND ${CMAKE_COMMAND} + ARGS -E copy_if_different ${HDF5_TOOLS_SRC_DIR}/testfiles/${h5_tfile} ${dest} + ) +ENDFOREACH (h5_tfile ${HDF5_TEST_FILES}) + +# -------------------------------------------------------------------- +# Copy all the HDF5 files from the test directory into the source directory +# -------------------------------------------------------------------- +SET (HDF5_REFERENCE_FILES + err_compat_1 + err_compat_2 + error_test_1 + error_test_2 + links_env.out +) + +FOREACH (ref_file ${HDF5_REFERENCE_FILES}) + SET (dest "${PROJECT_BINARY_DIR}/${ref_file}") + #MESSAGE (STATUS " Copying ${h5_file}") + ADD_CUSTOM_COMMAND ( + TARGET ${HDF5_TEST_LIB_TARGET} + POST_BUILD + COMMAND ${XLATE_UTILITY} + ARGS ${HDF5_TEST_SOURCE_DIR}/testfiles/${ref_file} ${dest} -l3 + ) +ENDFOREACH (ref_file ${HDF5_REFERENCE_FILES}) + +# -------------------------------------------------------------------- +# Copy test files from test/testfiles/plist_files dir to test dir +# -------------------------------------------------------------------- +SET (HDF5_REFERENCE_PLIST_FILES + acpl_be + acpl_le + dapl_be + dapl_le + dcpl_be + dcpl_le + dxpl_be + dxpl_le + fapl_be + fapl_le + fcpl_be + fcpl_le + gcpl_be + gcpl_le + lapl_be + lapl_le + lcpl_be + lcpl_le + ocpl_be + ocpl_le + ocpypl_be + ocpypl_le + strcpl_be + strcpl_le +) + +FOREACH (plistfile ${HDF5_REFERENCE_PLIST_FILES}) + SET (dest "${PROJECT_BINARY_DIR}/${plistfile}") + #MESSAGE (STATUS " Copying ${plistfile} to ${dset}") + ADD_CUSTOM_COMMAND ( + TARGET ${HDF5_TEST_LIB_TARGET} + POST_BUILD + COMMAND ${CMAKE_COMMAND} + ARGS -E copy_if_different ${HDF5_TEST_SOURCE_DIR}/testfiles/plist_files/${plistfile} ${dest} + ) +ENDFOREACH (plistfile ${HDF5_REFERENCE_PLIST_FILES}) + +# -------------------------------------------------------------------- +#-- Copy all the HDF5 files from the test directory into the source directory +# -------------------------------------------------------------------- +SET (HDF5_REFERENCE_TEST_FILES + be_data.h5 + be_extlink1.h5 + be_extlink2.h5 + corrupt_stab_msg.h5 + deflate.h5 + family_v16_00000.h5 + family_v16_00001.h5 + family_v16_00002.h5 + family_v16_00003.h5 + filespace_1_6.h5 + filespace_1_8.h5 + file_image_core_test.h5 + fill_old.h5 + filter_error.h5 + group_old.h5 + le_data.h5 + le_extlink1.h5 + le_extlink2.h5 + mergemsg.h5 + multi_file_v16-r.h5 + multi_file_v16-s.h5 + noencoder.h5 + specmetaread.h5 + tarrold.h5 + tbad_msg_count.h5 + tbogus.h5 + test_filters_be.h5 + test_filters_le.h5 + th5s.h5 + tlayouto.h5 + tmtimen.h5 + tmtimeo.h5 + tsizeslheap.h5 +) + +FOREACH (h5_file ${HDF5_REFERENCE_TEST_FILES}) + SET (dest "${HDF5_TEST_BINARY_DIR}/${h5_file}") + #MESSAGE (STATUS " Copying ${h5_file} to ${dest}") + ADD_CUSTOM_COMMAND ( + TARGET ${HDF5_TEST_LIB_TARGET} + POST_BUILD + COMMAND ${CMAKE_COMMAND} + ARGS -E copy_if_different ${HDF5_TEST_SOURCE_DIR}/${h5_file} ${dest} + ) +ENDFOREACH (h5_file ${HDF5_REFERENCE_TEST_FILES}) + +SET (testhdf5_SRCS + ${HDF5_TEST_SOURCE_DIR}/testhdf5.c + ${HDF5_TEST_SOURCE_DIR}/tarray.c + ${HDF5_TEST_SOURCE_DIR}/tattr.c + ${HDF5_TEST_SOURCE_DIR}/tchecksum.c + ${HDF5_TEST_SOURCE_DIR}/tconfig.c + ${HDF5_TEST_SOURCE_DIR}/tcoords.c + ${HDF5_TEST_SOURCE_DIR}/tfile.c + ${HDF5_TEST_SOURCE_DIR}/tgenprop.c + ${HDF5_TEST_SOURCE_DIR}/th5o.c + ${HDF5_TEST_SOURCE_DIR}/th5s.c + ${HDF5_TEST_SOURCE_DIR}/theap.c + ${HDF5_TEST_SOURCE_DIR}/tid.c + ${HDF5_TEST_SOURCE_DIR}/titerate.c + ${HDF5_TEST_SOURCE_DIR}/tmeta.c + ${HDF5_TEST_SOURCE_DIR}/tmisc.c + ${HDF5_TEST_SOURCE_DIR}/trefer.c + ${HDF5_TEST_SOURCE_DIR}/trefstr.c + ${HDF5_TEST_SOURCE_DIR}/tselect.c + ${HDF5_TEST_SOURCE_DIR}/tskiplist.c + ${HDF5_TEST_SOURCE_DIR}/tsohm.c + ${HDF5_TEST_SOURCE_DIR}/ttime.c + ${HDF5_TEST_SOURCE_DIR}/ttst.c + ${HDF5_TEST_SOURCE_DIR}/tunicode.c + ${HDF5_TEST_SOURCE_DIR}/tvltypes.c + ${HDF5_TEST_SOURCE_DIR}/tvlstr.c +) + +#-- Adding test for testhdf5 +ADD_EXECUTABLE (testhdf5 ${testhdf5_SRCS}) +TARGET_NAMING (testhdf5 ${LIB_TYPE}) +TARGET_C_PROPERTIES (testhdf5 " " " ") +TARGET_LINK_LIBRARIES (testhdf5 ${HDF5_TEST_LIB_TARGET} ${HDF5_LIB_TARGET}) +SET_TARGET_PROPERTIES (testhdf5 PROPERTIES FOLDER test) + +# Remove any output file left over from previous test run +ADD_TEST ( + NAME h5test-clear-testhdf5-objects + COMMAND ${CMAKE_COMMAND} + -E remove + coord.h5 + sys_file1 + tattr.h5 + tfile1.h5 + tfile2.h5 + tfile3.h5 + tfile4.h5 + tfile5.h5 + tfile6.h5 + th5o_file + th5s1.h5 + tselect.h5 + tsohm.h5 + tsohm_dst.h5 + tsohm_src.h5 +) + +IF (HDF5_ENABLE_USING_MEMCHECKER) + ADD_TEST (NAME testhdf5-base COMMAND $ -x heap -x file -x select) + SET_TESTS_PROPERTIES(testhdf5-base PROPERTIES DEPENDS h5test-clear-testhdf5-objects) + SET_TESTS_PROPERTIES(testhdf5-base PROPERTIES ENVIRONMENT HDF5_ALARM_SECONDS=3600) + ADD_TEST (NAME testhdf5-heap COMMAND $ -o heap) + SET_TESTS_PROPERTIES(testhdf5-heap PROPERTIES DEPENDS h5test-clear-testhdf5-objects) + SET_TESTS_PROPERTIES(testhdf5-heap PROPERTIES ENVIRONMENT HDF5_ALARM_SECONDS=3600) + ADD_TEST (NAME testhdf5-file COMMAND $ -o file) + SET_TESTS_PROPERTIES(testhdf5-file PROPERTIES DEPENDS h5test-clear-testhdf5-objects) + SET_TESTS_PROPERTIES(testhdf5-file PROPERTIES ENVIRONMENT HDF5_ALARM_SECONDS=3600) + ADD_TEST (NAME testhdf5-select COMMAND $ -o select) + SET_TESTS_PROPERTIES(testhdf5-select PROPERTIES DEPENDS h5test-clear-testhdf5-objects) + SET_TESTS_PROPERTIES(testhdf5-select PROPERTIES ENVIRONMENT HDF5_ALARM_SECONDS=3600) +ELSE (HDF5_ENABLE_USING_MEMCHECKER) + ADD_TEST (NAME testhdf5 COMMAND $) + SET_TESTS_PROPERTIES(testhdf5 PROPERTIES DEPENDS h5test-clear-testhdf5-objects) +ENDIF (HDF5_ENABLE_USING_MEMCHECKER) + +############################################################################## +############################################################################## +### T H E T E S T S M A C R O S ### +############################################################################## +############################################################################## + +MACRO (ADD_H5_TEST file) + ADD_EXECUTABLE (${file} ${HDF5_TEST_SOURCE_DIR}/${file}.c) + TARGET_NAMING (${file} ${LIB_TYPE}) + TARGET_C_PROPERTIES (${file} " " " ") + TARGET_LINK_LIBRARIES (${file} ${HDF5_TEST_LIB_TARGET} ${HDF5_LIB_TARGET}) + SET_TARGET_PROPERTIES (${file} PROPERTIES FOLDER test) + + ADD_TEST (NAME ${file} COMMAND $) +ENDMACRO (ADD_H5_TEST file) + +# Remove any output file left over from previous test run +ADD_TEST ( + NAME h5test-clear-objects + COMMAND ${CMAKE_COMMAND} + -E remove + dt_arith1.h5 + dt_arith2.h5 + dtransform.h5 + dtypes4.h5 + dtypes5.h5 + efc0.h5 + efc1.h5 + efc2.h5 + efc3.h5 + efc4.h5 + efc5.h5 + extlinks16A00000.h5 + extlinks16A00001.h5 + extlinks16A00002.h5 + extlinks16B-b.h5 + extlinks16B-g.h5 + extlinks16B-l.h5 + extlinks16B-r.h5 + extlinks16B-s.h5 + extlinks19B00000.h5 + extlinks19B00001.h5 + extlinks19B00002.h5 + extlinks19B00003.h5 + extlinks19B00004.h5 + extlinks19B00005.h5 + extlinks19B00006.h5 + extlinks19B00007.h5 + extlinks19B00008.h5 + extlinks19B00009.h5 + extlinks19B00010.h5 + extlinks19B00011.h5 + extlinks19B00012.h5 + extlinks19B00013.h5 + extlinks19B00014.h5 + extlinks19B00015.h5 + extlinks19B00016.h5 + extlinks19B00017.h5 + extlinks19B00018.h5 + extlinks19B00019.h5 + extlinks19B00020.h5 + extlinks19B00021.h5 + extlinks19B00022.h5 + extlinks19B00023.h5 + extlinks19B00024.h5 + extlinks19B00025.h5 + extlinks19B00026.h5 + extlinks19B00027.h5 + extlinks19B00028.h5 + fheap.h5 + new_multi_file_v16-r.h5 + new_multi_file_v16-s.h5 + objcopy_ext.dat + testmeta.h5 + tstint1.h5 + tstint2.h5 + unregister_filter_1.h5 + unregister_filter_2.h5 +) + +SET (H5_TESTS + accum + lheap + ohdr + stab + gheap + #cache + #cache_api + #cache_tagging + pool + hyperslab + istore + bittests + dt_arith + dtypes + cmpd_dset + filter_fail + extend + external + efc + objcopy + links + unlink + big + mtime + fillval + mount + flush1 + flush2 + app_ref + enum + set_extent + #ttsafe + getname + vfd + ntypes + dangle + dtransform + reserved + cross_read + freespace + mf + farray + earray + btree2 + fheap + #error_test + #err_compat + tcheck_version + testmeta + #links_env + file_image + enc_dec_plist + enc_dec_plist_with_endianess + unregister +) + +FOREACH (test ${H5_TESTS}) + ADD_H5_TEST(${test}) + SET_TESTS_PROPERTIES(${test} PROPERTIES DEPENDS h5test-clear-objects) +ENDFOREACH (test ${H5_TESTS}) + +SET_TESTS_PROPERTIES(flush2 PROPERTIES DEPENDS flush1) + +############################################################################## +############################################################################## +### A D D I T I O N A L T E S T S ### +############################################################################## +############################################################################## + +#-- Adding test for cache +ADD_EXECUTABLE (cache ${HDF5_TEST_SOURCE_DIR}/cache.c ${HDF5_TEST_SOURCE_DIR}/cache_common.c) +TARGET_NAMING (cache ${LIB_TYPE}) +TARGET_C_PROPERTIES (cache " " " ") +TARGET_LINK_LIBRARIES (cache ${HDF5_LIB_TARGET} ${HDF5_TEST_LIB_TARGET}) +SET_TARGET_PROPERTIES (cache PROPERTIES FOLDER test) +ADD_TEST ( + NAME h5test-clear-cache-objects + COMMAND ${CMAKE_COMMAND} + -E remove + cache_test.h5 +) +ADD_TEST (NAME cache COMMAND $) +SET_TESTS_PROPERTIES(cache PROPERTIES DEPENDS h5test-clear-cache-objects) + +#-- Adding test for cache_api +ADD_EXECUTABLE (cache_api ${HDF5_TEST_SOURCE_DIR}/cache_api.c ${HDF5_TEST_SOURCE_DIR}/cache_common.c) +TARGET_NAMING (cache_api ${LIB_TYPE}) +TARGET_C_PROPERTIES (cache_api " " " ") +TARGET_LINK_LIBRARIES (cache_api ${HDF5_LIB_TARGET} ${HDF5_TEST_LIB_TARGET}) +SET_TARGET_PROPERTIES (cache_api PROPERTIES FOLDER test) + +ADD_TEST ( + NAME h5test-clear-cache_api-objects + COMMAND ${CMAKE_COMMAND} + -E remove + cache_api_test.h5 +) +ADD_TEST (NAME cache_api COMMAND $) +SET_TESTS_PROPERTIES(cache_api PROPERTIES DEPENDS h5test-clear-cache_api-objects) + +#-- Adding test for cache_tagging +ADD_EXECUTABLE (cache_tagging ${HDF5_TEST_SOURCE_DIR}/cache_tagging.c ${HDF5_TEST_SOURCE_DIR}/cache_common.c) +TARGET_NAMING (cache_tagging ${LIB_TYPE}) +TARGET_C_PROPERTIES (cache_tagging " " " ") +TARGET_LINK_LIBRARIES (cache_tagging ${HDF5_LIB_TARGET} ${HDF5_TEST_LIB_TARGET}) +SET_TARGET_PROPERTIES (cache_tagging PROPERTIES FOLDER test) + +ADD_TEST ( + NAME h5test-clear-cache_tagging-objects + COMMAND ${CMAKE_COMMAND} + -E remove + tagging_test.h5 + tagging_ext_test.h5 +) +ADD_TEST (NAME cache_tagging COMMAND $) +SET_TESTS_PROPERTIES(cache_tagging PROPERTIES DEPENDS h5test-clear-cache_tagging-objects) + +#-- Adding test for ttsafe +ADD_EXECUTABLE (ttsafe + ${HDF5_TEST_SOURCE_DIR}/ttsafe.c + ${HDF5_TEST_SOURCE_DIR}/ttsafe_dcreate.c + ${HDF5_TEST_SOURCE_DIR}/ttsafe_error.c + ${HDF5_TEST_SOURCE_DIR}/ttsafe_cancel.c + ${HDF5_TEST_SOURCE_DIR}/ttsafe_acreate.c +) +TARGET_NAMING (ttsafe ${LIB_TYPE}) +TARGET_C_PROPERTIES (ttsafe " " " ") +TARGET_LINK_LIBRARIES (ttsafe ${HDF5_LIB_TARGET} ${HDF5_TEST_LIB_TARGET}) +SET_TARGET_PROPERTIES (ttsafe PROPERTIES FOLDER test) + +ADD_TEST ( + NAME h5test-clear-ttsafe-objects + COMMAND ${CMAKE_COMMAND} + -E remove + ttsafe_error.h5 + ttsafe_dcreate.h5 + ttsafe_cancel.h5 + ttsafe_acreate.h5 +) +ADD_TEST (NAME ttsafe COMMAND $) +SET_TESTS_PROPERTIES(ttsafe PROPERTIES DEPENDS h5test-clear-ttsafe-objects) + +#-- Adding test for err_compat +IF (HDF5_ENABLE_DEPRECATED_SYMBOLS) + ADD_EXECUTABLE (err_compat ${HDF5_TEST_SOURCE_DIR}/err_compat.c) + TARGET_NAMING (err_compat ${LIB_TYPE}) + TARGET_C_PROPERTIES (err_compat " " " ") + TARGET_LINK_LIBRARIES (err_compat ${HDF5_LIB_TARGET} ${HDF5_TEST_LIB_TARGET}) + SET_TARGET_PROPERTIES (err_compat PROPERTIES FOLDER test) + + ADD_TEST ( + NAME h5test-clear-err_compat-objects + COMMAND ${CMAKE_COMMAND} + -E remove + err_compat.txt + err_compat.txt.err + ) + ADD_TEST (NAME err_compat COMMAND "${CMAKE_COMMAND}" + -D "TEST_PROGRAM=$" + -D "TEST_ARGS:STRING=" + -D "TEST_EXPECT=0" + -D "TEST_MASK_ERROR=true" + -D "TEST_OUTPUT=err_compat.txt" + -D "TEST_REFERENCE=err_compat_1" + -D "TEST_FOLDER=${PROJECT_BINARY_DIR}" + -P "${HDF5_RESOURCES_DIR}/runTest.cmake" + ) + SET_TESTS_PROPERTIES(err_compat PROPERTIES DEPENDS h5test-clear-err_compat-objects) +ENDIF (HDF5_ENABLE_DEPRECATED_SYMBOLS) + +#-- Adding test for error_test +ADD_EXECUTABLE (error_test ${HDF5_TEST_SOURCE_DIR}/error_test.c) +TARGET_NAMING (error_test ${LIB_TYPE}) +TARGET_C_PROPERTIES (error_test " " " ") +TARGET_LINK_LIBRARIES (error_test ${HDF5_LIB_TARGET} ${HDF5_TEST_LIB_TARGET}) +SET_TARGET_PROPERTIES (error_test PROPERTIES FOLDER test) + +ADD_TEST ( + NAME h5test-clear-error_test-objects + COMMAND ${CMAKE_COMMAND} + -E remove + error_test.txt + error_test.txt.err +) +ADD_TEST (NAME error_test COMMAND "${CMAKE_COMMAND}" + -D "TEST_PROGRAM=$" + -D "TEST_ARGS:STRING=" + -D "TEST_EXPECT=0" + -D "TEST_MASK_ERROR=true" + -D "TEST_OUTPUT=error_test.txt" + -D "TEST_REFERENCE=error_test_1" + -D "TEST_FOLDER=${PROJECT_BINARY_DIR}" + -P "${HDF5_RESOURCES_DIR}/runTest.cmake" +) +SET_TESTS_PROPERTIES(error_test PROPERTIES DEPENDS h5test-clear-error_test-objects) +SET_TESTS_PROPERTIES (error_test PROPERTIES ENVIRONMENT "HDF5_PLUGIN_PRELOAD=::") + +#-- Adding test for links_env +ADD_EXECUTABLE (links_env ${HDF5_TEST_SOURCE_DIR}/links_env.c) +TARGET_NAMING (links_env ${LIB_TYPE}) +TARGET_C_PROPERTIES (links_env " " " ") +TARGET_LINK_LIBRARIES (links_env ${HDF5_LIB_TARGET} ${HDF5_TEST_LIB_TARGET}) +SET_TARGET_PROPERTIES (links_env PROPERTIES FOLDER test) + +ADD_TEST ( + NAME h5test-clear-links_env-objects + COMMAND ${CMAKE_COMMAND} + -E remove + links_env.txt + links_env.txt.err + extlinks_env0.h5 + extlinks_env1.h5 + tmp/extlinks_env1.h5 +) +ADD_TEST (NAME links_env COMMAND "${CMAKE_COMMAND}" + -D "TEST_PROGRAM=$" + -D "TEST_ARGS:STRING=" + -D "TEST_ENV_VAR:STRING=HDF5_EXT_PREFIX" + -D "TEST_ENV_VALUE:STRING=.:tmp" + -D "TEST_EXPECT=0" + -D "TEST_OUTPUT=links_env.txt" + -D "TEST_REFERENCE=links_env.out" + -D "TEST_FOLDER=${PROJECT_BINARY_DIR}" + -P "${HDF5_RESOURCES_DIR}/runTest.cmake" +) +SET_TESTS_PROPERTIES(links_env PROPERTIES DEPENDS h5test-clear-links_env-objects) + +#-- Adding test for libinfo +SET (GREP_RUNNER ${PROJECT_BINARY_DIR}/GrepRunner.cmake) +FILE (WRITE ${GREP_RUNNER} + "FILE (STRINGS \${TEST_PROGRAM} TEST_RESULT REGEX \"SUMMARY OF THE HDF5 CONFIGURATION\") +IF (\${TEST_RESULT} STREQUAL \"0\") + MESSAGE (FATAL_ERROR \"Failed: The output: \${TEST_RESULT} of \${TEST_PROGRAM} did not contain SUMMARY OF THE HDF5 CONFIGURATION\") +ELSE (\${TEST_RESULT} STREQUAL \"0\") + MESSAGE (STATUS \"COMMAND Result: \${TEST_RESULT}\") +ENDIF (\${TEST_RESULT} STREQUAL \"0\") +" +) + +ADD_TEST (NAME testlibinfo COMMAND ${CMAKE_COMMAND} -D "TEST_PROGRAM=$" -P "${GREP_RUNNER}") + +############################################################################## +### P L U G I N T E S T S +############################################################################## +IF (BUILD_SHARED_LIBS) + + IF (WIN32 AND NOT CYGWIN) + SET(CMAKE_SEP "\;") + ELSE (WIN32 AND NOT CYGWIN) + SET(CMAKE_SEP ":") + ENDIF(WIN32 AND NOT CYGWIN) + + ADD_EXECUTABLE (plugin ${HDF5_TEST_SOURCE_DIR}/plugin.c) + TARGET_NAMING (plugin ${LIB_TYPE}) + TARGET_C_PROPERTIES (plugin " " " ") + TARGET_LINK_LIBRARIES (plugin ${HDF5_TEST_PLUGIN_LIB_TARGET}) + SET_TARGET_PROPERTIES (plugin PROPERTIES FOLDER test) + + ADD_TEST (NAME H5PLUGIN-plugin COMMAND $) + SET_TESTS_PROPERTIES (H5PLUGIN-plugin PROPERTIES ENVIRONMENT "HDF5_PLUGIN_PATH=${CMAKE_BINARY_DIR}/testdir1${CMAKE_SEP}${CMAKE_BINARY_DIR}/testdir2") +ELSE (BUILD_SHARED_LIBS) + MESSAGE (STATUS " **** Plugins libraries must be built as shared libraries **** ") + ADD_TEST ( + NAME H5PLUGIN-SKIPPED + COMMAND ${CMAKE_COMMAND} -E echo "SKIP H5PLUGIN TESTING" + ) +ENDIF (BUILD_SHARED_LIBS) + +############################################################################## +############################################################################## +### V F D T E S T S ### +############################################################################## +############################################################################## + +IF (HDF5_TEST_VFD) + + SET (VFD_LIST + sec2 + stdio + core + split + multi + family + ) + + SET (H5_VFD_TESTS + testhdf5 + accum + lheap + ohdr + stab + gheap + cache + cache_api + cache_tagging + pool + hyperslab + istore + bittests + dt_arith + dtypes + cmpd_dset + filter_fail + extend + external + efc + objcopy + links + unlink + big + mtime + fillval + mount + flush1 + flush2 + app_ref + enum + set_extent + ttsafe + getname + vfd + ntypes + dangle + dtransform + reserved + cross_read + freespace + mf + farray + earray + btree2 + #fheap + error_test + err_compat + tcheck_version + testmeta + links_env + unregister +) + + IF (DIRECT_VFD) + SET (VFD_LIST ${VFD_LIST} direct) + ENDIF (DIRECT_VFD) + + MACRO (ADD_VFD_TEST vfdname resultcode) + FOREACH (test ${H5_VFD_TESTS}) + ADD_TEST ( + NAME VFD-${vfdname}-${test} + COMMAND "${CMAKE_COMMAND}" + -D "TEST_PROGRAM=$" + -D "TEST_ARGS:STRING=" + -D "TEST_VFD:STRING=${vfdname}" + -D "TEST_EXPECT=${resultcode}" + -D "TEST_OUTPUT=${test}" + -D "TEST_FOLDER=${PROJECT_BINARY_DIR}" + -P "${HDF5_RESOURCES_DIR}/vfdTest.cmake" + ) + ENDFOREACH (test ${H5_VFD_TESTS}) + IF (HDF5_TEST_FHEAP_VFD) + ADD_TEST ( + NAME VFD-${vfdname}-fheap + COMMAND "${CMAKE_COMMAND}" + -D "TEST_PROGRAM=$" + -D "TEST_ARGS:STRING=" + -D "TEST_VFD:STRING=${vfdname}" + -D "TEST_EXPECT=${resultcode}" + -D "TEST_OUTPUT=fheap" + -D "TEST_FOLDER=${PROJECT_BINARY_DIR}" + -P "${HDF5_RESOURCES_DIR}/vfdTest.cmake" + ) + ENDIF (HDF5_TEST_FHEAP_VFD) + ENDMACRO (ADD_VFD_TEST) + + # Run test with different Virtual File Driver + FOREACH (vfd ${VFD_LIST}) + ADD_VFD_TEST (${vfd} 0) + ENDFOREACH (vfd ${VFD_LIST}) + +ENDIF (HDF5_TEST_VFD) + +############################################################################## +############################################################################## +### T H E G E N E R A T O R S ### +############################################################################## +############################################################################## + +IF (HDF5_BUILD_GENERATORS AND NOT BUILD_SHARED_LIBS) + MACRO (ADD_H5_GENERATOR genfile) + ADD_EXECUTABLE (${genfile} ${HDF5_TEST_SOURCE_DIR}/${genfile}.c) + TARGET_NAMING (${genfile} ${LIB_TYPE}) + TARGET_C_PROPERTIES (${genfile} " " " ") + TARGET_LINK_LIBRARIES (${genfile} ${HDF5_TEST_LIB_TARGET} ${HDF5_LIB_TARGET}) + SET_TARGET_PROPERTIES (${genfile} PROPERTIES FOLDER generator/test) + ENDMACRO (ADD_H5_GENERATOR genfile) + + # generator executables + SET (H5_GENERATORS + gen_bad_ohdr + gen_bogus + gen_cross + gen_deflate + gen_filters + gen_new_array + gen_new_fill + gen_new_group + gen_new_mtime + gen_new_super + gen_noencoder + gen_nullspace + gen_udlinks + space_overflow + gen_filespace + gen_specmetaread + gen_sizes_lheap + gen_file_image + gen_plist + ) + + FOREACH (gen ${H5_GENERATORS}) + ADD_H5_GENERATOR (${gen}) + ENDFOREACH (gen ${H5_GENERATORS}) + +ENDIF (HDF5_BUILD_GENERATORS AND NOT BUILD_SHARED_LIBS) diff --git a/testpar/CMakeLists.txt b/testpar/CMakeLists.txt index 04aa383..30cdcda 100644 --- a/testpar/CMakeLists.txt +++ b/testpar/CMakeLists.txt @@ -33,17 +33,13 @@ TARGET_C_PROPERTIES (testphdf5 " " " ") TARGET_LINK_LIBRARIES (testphdf5 ${HDF5_TEST_LIB_TARGET} ${HDF5_LIB_TARGET} ${LINK_LIBS}) SET_TARGET_PROPERTIES (testphdf5 PROPERTIES FOLDER test/par) -ADD_TEST (NAME TEST_PAR_testphdf5 COMMAND ${MPIEXEC} ${MPIEXEC_PREFLAGS} ${MPIEXEC_NUMPROC_FLAG} ${MPIEXEC_MAX_NUMPROCS} ${MPIEXEC_POSTFLAGS} $) - -MACRO (ADD_H5P_TEST file) +MACRO (ADD_H5P_EXE file) ADD_EXECUTABLE (${file} ${HDF5_TEST_PAR_SOURCE_DIR}/${file}.c) TARGET_NAMING (${file} ${LIB_TYPE}) TARGET_C_PROPERTIES (${file} " " " ") TARGET_LINK_LIBRARIES (${file} ${HDF5_TEST_LIB_TARGET} ${HDF5_LIB_TARGET} ${LINK_LIBS}) SET_TARGET_PROPERTIES (${file} PROPERTIES FOLDER test/par) - - ADD_TEST (NAME TEST_PAR_${file} COMMAND ${MPIEXEC} ${MPIEXEC_PREFLAGS} ${MPIEXEC_NUMPROC_FLAG} ${MPIEXEC_MAX_NUMPROCS} ${MPIEXEC_POSTFLAGS} $) -ENDMACRO (ADD_H5P_TEST file) +ENDMACRO (ADD_H5P_EXE file) SET (H5P_TESTS t_mpi @@ -55,56 +51,11 @@ SET (H5P_TESTS ) FOREACH (testp ${H5P_TESTS}) - ADD_H5P_TEST(${testp}) + ADD_H5P_EXE(${testp}) ENDFOREACH (testp ${H5P_TESTS}) -SET_TESTS_PROPERTIES(TEST_PAR_t_pflush2 PROPERTIES DEPENDS TEST_PAR_t_pflush1) - IF (NOT WIN32) - ADD_H5P_TEST(t_posix_compliant) + ADD_H5P_EXE(t_posix_compliant) ENDIF (NOT WIN32) - -IF (HDF5_TEST_VFD) - - SET (VFD_LIST - sec2 - stdio - core - split - multi - family - ) - - SET (H5P_VFD_TESTS - t_pflush1 - t_pflush2 - ) - - IF (DIRECT_VFD) - SET (VFD_LIST ${VFD_LIST} direct) - ENDIF (DIRECT_VFD) - - MACRO (ADD_VFD_TEST vfdname resultcode) - IF (NOT HDF5_ENABLE_USING_MEMCHECKER) - FOREACH (test ${H5P_VFD_TESTS}) - ADD_TEST ( - NAME VFD-${vfdname}-${test} - COMMAND "${CMAKE_COMMAND}" - -D "TEST_PROGRAM=$" - -D "TEST_ARGS:STRING=" - -D "TEST_VFD:STRING=${vfdname}" - -D "TEST_EXPECT=${resultcode}" - -D "TEST_OUTPUT=${test}" - -D "TEST_FOLDER=${PROJECT_BINARY_DIR}" - -P "${HDF5_RESOURCES_DIR}/vfdTest.cmake" - ) - ENDFOREACH (test ${H5P_VFD_TESTS}) - ENDIF (NOT HDF5_ENABLE_USING_MEMCHECKER) - ENDMACRO (ADD_VFD_TEST) - - # Run test with different Virtual File Driver - FOREACH (vfd ${VFD_LIST}) - ADD_VFD_TEST (${vfd} 0) - ENDFOREACH (vfd ${VFD_LIST}) -ENDIF (HDF5_TEST_VFD) +INCLUDE (CMakeTests.cmake) diff --git a/testpar/CMakeTests.cmake b/testpar/CMakeTests.cmake new file mode 100644 index 0000000..bc8fc90 --- /dev/null +++ b/testpar/CMakeTests.cmake @@ -0,0 +1,63 @@ + +############################################################################## +############################################################################## +### T E S T I N G ### +############################################################################## +############################################################################## + +ADD_TEST (NAME TEST_PAR_testphdf5 COMMAND ${MPIEXEC} ${MPIEXEC_PREFLAGS} ${MPIEXEC_NUMPROC_FLAG} ${MPIEXEC_MAX_NUMPROCS} ${MPIEXEC_POSTFLAGS} $) + +FOREACH (testp ${H5P_TESTS}) + ADD_TEST (NAME TEST_PAR_${testp} COMMAND ${MPIEXEC} ${MPIEXEC_PREFLAGS} ${MPIEXEC_NUMPROC_FLAG} ${MPIEXEC_MAX_NUMPROCS} ${MPIEXEC_POSTFLAGS} $) +ENDFOREACH (testp ${H5P_TESTS}) + +SET_TESTS_PROPERTIES(TEST_PAR_t_pflush2 PROPERTIES DEPENDS TEST_PAR_t_pflush1) + +IF (NOT WIN32) + ADD_TEST (NAME TEST_PAR_t_posix_compliant COMMAND ${MPIEXEC} ${MPIEXEC_PREFLAGS} ${MPIEXEC_NUMPROC_FLAG} ${MPIEXEC_MAX_NUMPROCS} ${MPIEXEC_POSTFLAGS} $) +ENDIF (NOT WIN32) + +IF (HDF5_TEST_VFD) + + SET (VFD_LIST + sec2 + stdio + core + split + multi + family + ) + + SET (H5P_VFD_TESTS + t_pflush1 + t_pflush2 + ) + + IF (DIRECT_VFD) + SET (VFD_LIST ${VFD_LIST} direct) + ENDIF (DIRECT_VFD) + + MACRO (ADD_VFD_TEST vfdname resultcode) + IF (NOT HDF5_ENABLE_USING_MEMCHECKER) + FOREACH (test ${H5P_VFD_TESTS}) + ADD_TEST ( + NAME VFD-${vfdname}-${test} + COMMAND "${CMAKE_COMMAND}" + -D "TEST_PROGRAM=$" + -D "TEST_ARGS:STRING=" + -D "TEST_VFD:STRING=${vfdname}" + -D "TEST_EXPECT=${resultcode}" + -D "TEST_OUTPUT=${test}" + -D "TEST_FOLDER=${PROJECT_BINARY_DIR}" + -P "${HDF5_RESOURCES_DIR}/vfdTest.cmake" + ) + ENDFOREACH (test ${H5P_VFD_TESTS}) + ENDIF (NOT HDF5_ENABLE_USING_MEMCHECKER) + ENDMACRO (ADD_VFD_TEST) + + # Run test with different Virtual File Driver + FOREACH (vfd ${VFD_LIST}) + ADD_VFD_TEST (${vfd} 0) + ENDFOREACH (vfd ${VFD_LIST}) + +ENDIF (HDF5_TEST_VFD) diff --git a/tools/h5copy/CMakeLists.txt b/tools/h5copy/CMakeLists.txt index 137edb0..6faf332 100644 --- a/tools/h5copy/CMakeLists.txt +++ b/tools/h5copy/CMakeLists.txt @@ -17,12 +17,6 @@ SET_TARGET_PROPERTIES (h5copy PROPERTIES FOLDER tools) SET (H5_DEP_EXECUTABLES h5copy) -############################################################################## -############################################################################## -### T E S T I N G ### -############################################################################## -############################################################################## - IF (BUILD_TESTING) IF (HDF5_BUILD_GENERATORS AND NOT BUILD_SHARED_LIBS) ADD_EXECUTABLE (h5copygentest ${HDF5_TOOLS_H5COPY_SOURCE_DIR}/h5copygentest.c) @@ -33,381 +27,8 @@ IF (BUILD_TESTING) #ADD_TEST (NAME h5copygentest COMMAND $) ENDIF (HDF5_BUILD_GENERATORS AND NOT BUILD_SHARED_LIBS) - - # -------------------------------------------------------------------- - # Copy all the HDF5 files from the source directory into the test directory - # -------------------------------------------------------------------- - SET (LIST_HDF5_TEST_FILES - ${HDF5_TOOLS_H5COPY_SOURCE_DIR}/testfiles/h5copy_extlinks_src.h5 - ${HDF5_TOOLS_H5COPY_SOURCE_DIR}/testfiles/h5copy_extlinks_trg.h5 - ${HDF5_TOOLS_H5COPY_SOURCE_DIR}/testfiles/h5copy_ref.h5 - ${HDF5_TOOLS_H5COPY_SOURCE_DIR}/testfiles/h5copytst.h5 - ) - - SET (LIST_OTHER_TEST_FILES - ${HDF5_TOOLS_H5COPY_SOURCE_DIR}/testfiles/h5copy_misc1.out - ) - - FILE (MAKE_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles") - - FOREACH (listfiles ${LIST_HDF5_TEST_FILES} ${LIST_OTHER_TEST_FILES}) - GET_FILENAME_COMPONENT(fname "${listfiles}" NAME) - SET (dest "${PROJECT_BINARY_DIR}/testfiles/${fname}") - #MESSAGE (STATUS " Copying ${listfiles}") - ADD_CUSTOM_COMMAND ( - TARGET h5copy - POST_BUILD - COMMAND ${CMAKE_COMMAND} - ARGS -E copy_if_different ${listfiles} ${dest} - ) - ENDFOREACH (listfiles ${LIST_HDF5_TEST_FILES} ${LIST_OTHER_TEST_FILES}) - -############################################################################## -############################################################################## -### T H E T E S T S M A C R O S ### -############################################################################## -############################################################################## - # - # Perform h5copy according to passing parmeters - # - MACRO (ADD_H5_F_TEST testname resultcode infile fparam vparam sparam srcname dparam dstname) - IF (NOT HDF5_ENABLE_USING_MEMCHECKER) - # Remove any output file left over from previous test run - ADD_TEST ( - NAME H5COPY_F-${testname}-clear-objects - COMMAND ${CMAKE_COMMAND} - -E remove - ./testfiles/${testname}.out.h5 - ) - ENDIF (NOT HDF5_ENABLE_USING_MEMCHECKER) - - ADD_TEST ( - NAME H5COPY_F-${testname} - COMMAND $ -f ${fparam} -i ./testfiles/${infile} -o ./testfiles/${testname}.out.h5 ${vparam} ${sparam} ${srcname} ${dparam} ${dstname} ${ARGN} - ) - IF (HDF5_ENABLE_USING_MEMCHECKER) - IF (NOT "${last_test}" STREQUAL "") - SET_TESTS_PROPERTIES (H5COPY_F-${testname} PROPERTIES DEPENDS ${last_test}) - ENDIF (NOT "${last_test}" STREQUAL "") - ELSE (HDF5_ENABLE_USING_MEMCHECKER) - SET_TESTS_PROPERTIES (H5COPY_F-${testname} PROPERTIES DEPENDS H5COPY_F-${testname}-clear-objects) - ENDIF (HDF5_ENABLE_USING_MEMCHECKER) - - # resultcode=2 will cause the test to skip the diff test - IF (NOT ${resultcode} STREQUAL "2") - ADD_TEST ( - NAME H5COPY_F-${testname}-DIFF - COMMAND $ -q ./testfiles/${infile} ./testfiles/${testname}.out.h5 ${srcname} ${dstname} - ) - SET_TESTS_PROPERTIES(H5COPY_F-${testname}-DIFF PROPERTIES DEPENDS H5COPY_F-${testname}) - IF (${resultcode} STREQUAL "1") - SET_TESTS_PROPERTIES (H5COPY_F-${testname}-DIFF PROPERTIES WILL_FAIL "true") - ENDIF (${resultcode} STREQUAL "1") - ENDIF (NOT ${resultcode} STREQUAL "2") - ENDMACRO (ADD_H5_F_TEST) - - MACRO (ADD_H5_TEST testname resultcode infile vparam sparam srcname dparam dstname) - IF (NOT HDF5_ENABLE_USING_MEMCHECKER) - # Remove any output file left over from previous test run - ADD_TEST ( - NAME H5COPY-${testname}-clear-objects - COMMAND ${CMAKE_COMMAND} - -E remove - ./testfiles/${testname}.out.h5 - ) - ENDIF (NOT HDF5_ENABLE_USING_MEMCHECKER) - - ADD_TEST ( - NAME H5COPY-${testname} - COMMAND $ -i ./testfiles/${infile} -o ./testfiles/${testname}.out.h5 ${vparam} ${sparam} ${srcname} ${dparam} ${dstname} ${ARGN} - ) - IF (HDF5_ENABLE_USING_MEMCHECKER) - IF (NOT "${last_test}" STREQUAL "") - SET_TESTS_PROPERTIES (H5COPY-${testname} PROPERTIES DEPENDS ${last_test}) - ENDIF (NOT "${last_test}" STREQUAL "") - ELSE (HDF5_ENABLE_USING_MEMCHECKER) - SET_TESTS_PROPERTIES (H5COPY-${testname} PROPERTIES DEPENDS H5COPY-${testname}-clear-objects) - ENDIF (HDF5_ENABLE_USING_MEMCHECKER) - - # resultcode=2 will cause the test to skip the diff test - IF (NOT ${resultcode} STREQUAL "2") - ADD_TEST ( - NAME H5COPY-${testname}-DIFF - COMMAND $ -q ./testfiles/${infile} ./testfiles/${testname}.out.h5 ${srcname} ${dstname} - ) - SET_TESTS_PROPERTIES(H5COPY-${testname}-DIFF PROPERTIES DEPENDS H5COPY-${testname}) - IF (${resultcode} STREQUAL "1") - SET_TESTS_PROPERTIES (H5COPY-${testname}-DIFF PROPERTIES WILL_FAIL "true") - ENDIF (${resultcode} STREQUAL "1") - ENDIF (NOT ${resultcode} STREQUAL "2") - ENDMACRO (ADD_H5_TEST) - - MACRO (ADD_H5_TEST2 testname resultcode infile psparam pdparam vparam sparam srcname dparam dstname) - IF (NOT HDF5_ENABLE_USING_MEMCHECKER) - # Remove any output file left over from previous test run - ADD_TEST ( - NAME H5COPY-${testname}-clear-objects - COMMAND ${CMAKE_COMMAND} - -E remove - ./testfiles/${testname}.out.h5 - ) - ENDIF (NOT HDF5_ENABLE_USING_MEMCHECKER) - - ADD_TEST ( - NAME H5COPY-${testname}-prefill - COMMAND $ -i ./testfiles/${infile} -o ./testfiles/${testname}.out.h5 -v -s ${psparam} -d ${pdparam} - ) - IF (HDF5_ENABLE_USING_MEMCHECKER) - IF (NOT "${last_test}" STREQUAL "") - SET_TESTS_PROPERTIES (H5COPY-${testname}-prefill PROPERTIES DEPENDS ${last_test}) - ENDIF (NOT "${last_test}" STREQUAL "") - ELSE (HDF5_ENABLE_USING_MEMCHECKER) - SET_TESTS_PROPERTIES (H5COPY-${testname}-prefill PROPERTIES DEPENDS H5COPY-${testname}-clear-objects) - ENDIF (HDF5_ENABLE_USING_MEMCHECKER) - - ADD_TEST ( - NAME H5COPY-${testname} - COMMAND $ -i ./testfiles/${infile} -o ./testfiles/${testname}.out.h5 ${vparam} ${sparam} ${srcname} ${dparam} ${dstname} ${ARGN} - ) - SET_TESTS_PROPERTIES (H5COPY-${testname} PROPERTIES DEPENDS H5COPY-${testname}-prefill) - # resultcode=2 will cause the test to skip the diff test - IF (NOT ${resultcode} STREQUAL "2") - ADD_TEST ( - NAME H5COPY-${testname}-DIFF - COMMAND $ -q ./testfiles/${infile} ./testfiles/${testname}.out.h5 ${srcname} ${dstname} - ) - SET_TESTS_PROPERTIES(H5COPY-${testname}-DIFF PROPERTIES DEPENDS H5COPY-${testname}) - IF (${resultcode} STREQUAL "1") - SET_TESTS_PROPERTIES (H5COPY-${testname}-DIFF PROPERTIES WILL_FAIL "true") - ENDIF (${resultcode} STREQUAL "1") - ENDIF (NOT ${resultcode} STREQUAL "2") - ENDMACRO (ADD_H5_TEST2) - - MACRO (ADD_H5_TEST_SAME testname resultcode pfile psparam pdparam vparam sparam srcname dparam dstname) - IF (NOT HDF5_ENABLE_USING_MEMCHECKER) - # Remove any output file left over from previous test run - ADD_TEST ( - NAME H5COPY_SAME-${testname}-clear-objects - COMMAND ${CMAKE_COMMAND} - -E remove - ./testfiles/${testname}.out.h5 - ) - ENDIF (NOT HDF5_ENABLE_USING_MEMCHECKER) - - ADD_TEST ( - NAME H5COPY_SAME-${testname}-prefill - COMMAND $ -i ./testfiles/${pfile} -o ./testfiles/${testname}.out.h5 -v -s ${psparam} -d ${pdparam} - ) - IF (HDF5_ENABLE_USING_MEMCHECKER) - IF (NOT "${last_test}" STREQUAL "") - SET_TESTS_PROPERTIES (H5COPY_SAME-${testname}-prefill PROPERTIES DEPENDS ${last_test}) - ENDIF (NOT "${last_test}" STREQUAL "") - ELSE (HDF5_ENABLE_USING_MEMCHECKER) - SET_TESTS_PROPERTIES (H5COPY_SAME-${testname}-prefill PROPERTIES DEPENDS H5COPY_SAME-${testname}-clear-objects) - ENDIF (HDF5_ENABLE_USING_MEMCHECKER) - - ADD_TEST ( - NAME H5COPY_SAME-${testname} - COMMAND $ -i ./testfiles/${testname}.out.h5 -o ./testfiles/${testname}.out.h5 ${vparam} ${sparam} ${srcname} ${dparam} ${dstname} ${ARGN} - ) - SET_TESTS_PROPERTIES (H5COPY_SAME-${testname} PROPERTIES DEPENDS H5COPY_SAME-${testname}-prefill) - # resultcode=2 will cause the test to skip the diff test - IF (NOT ${resultcode} STREQUAL "2") - ADD_TEST ( - NAME H5COPY_SAME-${testname}-DIFF - COMMAND $ -q ./testfiles/${testname}.out.h5 ./testfiles/${testname}.out.h5 ${srcname} ${dstname} - ) - SET_TESTS_PROPERTIES(H5COPY_SAME-${testname}-DIFF PROPERTIES DEPENDS H5COPY_SAME-${testname}) - IF (${resultcode} STREQUAL "1") - SET_TESTS_PROPERTIES (H5COPY_SAME-${testname}-DIFF PROPERTIES WILL_FAIL "true") - ENDIF (${resultcode} STREQUAL "1") - ENDIF (NOT ${resultcode} STREQUAL "2") - ENDMACRO (ADD_H5_TEST_SAME) - - # - # Similiar to ADD_H5_TEST macro. Compare to outputs from source & target - # files instead of checking with h5ls. - # - MACRO (ADD_H5_CMP_TEST testname resultcode infile vparam sparam srcname dparam dstname) - # If using memchecker add tests without using scripts - IF (HDF5_ENABLE_USING_MEMCHECKER) - ADD_TEST (NAME H5COPY-CMP-${testname} COMMAND $ -i ./testfiles/${infile} -o ./testfiles/${testname}.out.h5 ${vparam} ${sparam} ${srcname} ${dparam} ${dstname} ${ARGN}) - IF (${resultcode} STREQUAL "1") - SET_TESTS_PROPERTIES (H5COPY-CMP-${testname} PROPERTIES WILL_FAIL "true") - ENDIF (${resultcode} STREQUAL "1") - IF (NOT "${last_test}" STREQUAL "") - SET_TESTS_PROPERTIES (H5COPY-CMP-${testname} PROPERTIES DEPENDS ${last_test}) - ENDIF (NOT "${last_test}" STREQUAL "") - ELSE (HDF5_ENABLE_USING_MEMCHECKER) - # Remove any output file left over from previous test run - ADD_TEST ( - NAME H5COPY-CMP-${testname}-clear-objects - COMMAND ${CMAKE_COMMAND} - -E remove - ./testfiles/${testname}.out.h5 - ./testfiles/${testname}.out.out - ./testfiles/${testname}.out.out.err - ) - ADD_TEST ( - NAME H5COPY-CMP-${testname} - COMMAND "${CMAKE_COMMAND}" - -D "TEST_PROGRAM=$" - -D "TEST_ARGS=-i;./testfiles/${infile};-o;./testfiles/${testname}.out.h5;${vparam};${sparam};${srcname};${dparam};${dstname}" - -D "TEST_FOLDER=${PROJECT_BINARY_DIR}" - -D "TEST_OUTPUT=./testfiles/${testname}.out.out" - -D "TEST_EXPECT=${resultcode}" - -D "TEST_REFERENCE=./testfiles/${testname}.out" - -D "TEST_MASK=true" - -P "${HDF5_RESOURCES_DIR}/runTest.cmake" - ) - SET_TESTS_PROPERTIES (H5COPY-CMP-${testname} PROPERTIES DEPENDS H5COPY-CMP-${testname}-clear-objects) - ENDIF (HDF5_ENABLE_USING_MEMCHECKER) - ENDMACRO (ADD_H5_CMP_TEST) - -############################################################################## -############################################################################## -### T H E T E S T S ### -############################################################################## -############################################################################## - - # -------------------------------------------------------------------- - # test file names - # -------------------------------------------------------------------- - SET (HDF_FILE1 h5copytst) - SET (HDF_FILE2 h5copy_ref) - SET (HDF_EXT_SRC_FILE h5copy_extlinks_src) - SET (HDF_EXT_TRG_FILE h5copy_extlinks_trg) - - IF (HDF5_ENABLE_USING_MEMCHECKER) - # Remove any output file left over from previous test run - ADD_TEST ( - NAME H5COPY-clearall-objects - COMMAND ${CMAKE_COMMAND} - -E remove - simple.out.h5 - chunk.out.h5 - compact.out.h5 - compound.out.h5 - compressed.out.h5 - named_vl.out.h5 - nested_vl.out.h5 - simple_top.out.h5 - dsrename.out.h5 - grp_empty.out.h5 - grp_dsets.out.h5 - grp_nested.out.h5 - simple_group.out.h5 - grp_rename.out.h5 - grp_dsets_rename.out.h5 - A_B1_simple.out.h5 - A_B2_simple2.out.h5 - C_D_simple.out.h5 - E_F_grp_dsets.out.h5 - G_H_grp_nested.out.h5 - region_ref.out.h5 - ext_link.out.h5 - ext_link_f.out.h5 - ext_dangle_noobj.out.h5 - ext_dangle_noobj_f.out.h5 - ext_dangle_nofile.out.h5 - ext_dangle_nofile_f.out.h5 - ext_link_group.out.h5 - ext_link_group_f.out.h5 - samefile1.out.h5 - samefile2.out.h5 - h5copy_misc1.out.h5 - h5copy_misc1.out.out - h5copy_misc1.out.out.err - ) - SET_TESTS_PROPERTIES (H5COPY-clearall-objects PROPERTIES WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles") - IF (NOT "${last_test}" STREQUAL "") - SET_TESTS_PROPERTIES (H5COPY-clearall-objects PROPERTIES DEPENDS ${last_test}) - ENDIF (NOT "${last_test}" STREQUAL "") - SET (last_test "H5COPY-clearall-objects") - ENDIF (HDF5_ENABLE_USING_MEMCHECKER) - - # "Test copying various forms of datasets" - ADD_H5_TEST (simple 0 ${HDF_FILE1}.h5 -v -s simple -d simple) - ADD_H5_TEST (chunk 0 ${HDF_FILE1}.h5 -v -s chunk -d chunk) - ADD_H5_TEST (compact 0 ${HDF_FILE1}.h5 -v -s compact -d compact) - ADD_H5_TEST (compound 0 ${HDF_FILE1}.h5 -v -s compound -d compound) - ADD_H5_TEST (compressed 0 ${HDF_FILE1}.h5 -v -s compressed -d compressed) - ADD_H5_TEST (named_vl 0 ${HDF_FILE1}.h5 -v -s named_vl -d named_vl) - ADD_H5_TEST (nested_vl 0 ${HDF_FILE1}.h5 -v -s nested_vl -d nested_vl) - - # "Test copying dataset within group in source file to root of destination" - ADD_H5_TEST (simple_top 0 ${HDF_FILE1}.h5 -v -s grp_dsets/simple -d simple_top) - - # "Test copying & renaming dataset" - ADD_H5_TEST (dsrename 0 ${HDF_FILE1}.h5 -v -s compound -d rename) - - # "Test copying empty, 'full' & 'nested' groups" - ADD_H5_TEST (grp_empty 0 ${HDF_FILE1}.h5 -v -s grp_empty -d grp_empty) - ADD_H5_TEST (grp_dsets 0 ${HDF_FILE1}.h5 -v -s grp_dsets -d grp_dsets) - ADD_H5_TEST (grp_nested 0 ${HDF_FILE1}.h5 -v -s grp_nested -d grp_nested) - - # "Test copying dataset within group in source file to group in destination" - ADD_H5_TEST2 (simple_group 0 ${HDF_FILE1}.h5 grp_dsets grp_dsets -v -s /grp_dsets/simple -d /grp_dsets/simple_group) - - # "Test copying & renaming group" - ADD_H5_TEST (grp_rename 0 ${HDF_FILE1}.h5 -v -s grp_dsets -d grp_rename) - - # "Test copying 'full' group hierarchy into group in destination file" - ADD_H5_TEST2 (grp_dsets_rename 0 ${HDF_FILE1}.h5 grp_dsets grp_rename -v -s grp_dsets -d /grp_rename/grp_dsets) - - # "Test copying objects into group hier. that doesn't exist yet in destination file" - ADD_H5_TEST (A_B1_simple 0 ${HDF_FILE1}.h5 -vp -s simple -d /A/B1/simple) - ADD_H5_TEST (A_B2_simple2 0 ${HDF_FILE1}.h5 -vp -s simple -d /A/B2/simple2) - ADD_H5_TEST (C_D_simple 0 ${HDF_FILE1}.h5 -vp -s /grp_dsets/simple -d /C/D/simple) - ADD_H5_TEST (E_F_grp_dsets 0 ${HDF_FILE1}.h5 -vp -s /grp_dsets -d /E/F/grp_dsets) - ADD_H5_TEST (G_H_grp_nested 0 ${HDF_FILE1}.h5 -vp -s /grp_nested -d /G/H/grp_nested) - -############# COPY REFERENCES ############## - - # "Test copying object and region references" - ADD_H5_F_TEST (region_ref 2 ${HDF_FILE2}.h5 ref -v -s / -d /COPY) - -############# COPY EXT LINKS ############## - - # "Test copying external link directly without -f ext" - ADD_H5_TEST (ext_link 2 ${HDF_EXT_SRC_FILE}.h5 -v -s /group_ext/extlink_dset -d /copy1_dset) - - # "Test copying external link directly with -f ext" - ADD_H5_F_TEST (ext_link_f 2 ${HDF_EXT_SRC_FILE}.h5 ext -v -s /group_ext/extlink_dset -d /copy2_dset) - - # "Test copying dangling external link (no obj) directly without -f ext" - ADD_H5_TEST (ext_dangle_noobj 2 ${HDF_EXT_SRC_FILE}.h5 -v -s /group_ext/extlink_notyet1 -d /copy_dangle1_1) - - # "Test copying dangling external link (no obj) directly with -f ext" - ADD_H5_F_TEST (ext_dangle_noobj_f 2 ${HDF_EXT_SRC_FILE}.h5 ext -v -s /group_ext/extlink_notyet1 -d /copy_dangle1_2) - - # "Test copying dangling external link (no file) directly without -f ext" - ADD_H5_TEST (ext_dangle_nofile 2 ${HDF_EXT_SRC_FILE}.h5 -v -s /group_ext/extlink_notyet2 -d /copy_dangle2_1) - - # "Test copying dangling external link (no file) directly with -f ext" - ADD_H5_F_TEST (ext_dangle_nofile_f 2 ${HDF_EXT_SRC_FILE}.h5 ext -v -s /group_ext/extlink_notyet2 -d /copy_dangle2_2) - - # "Test copying a group contains external links without -f ext" - ADD_H5_TEST (ext_link_group 2 ${HDF_EXT_SRC_FILE}.h5 -v -s /group_ext -d /copy1_group) - - # "Test copying a group contains external links with -f ext" - ADD_H5_F_TEST (ext_link_group_f 2 ${HDF_EXT_SRC_FILE}.h5 ext -v -s /group_ext -d /copy2_group) - -############# Test misc. ############## - - #----------------------------------------------------------------- - # "Test copying object into group which doesn't exist, without -p" - # - ADD_H5_CMP_TEST (h5copy_misc1 1 ${HDF_FILE1}.h5 -v -s /simple -d /g1/g2/simple) - - #------------------------------------------- - # "Test copying objects to the same file " - # - # - dataset - ADD_H5_TEST_SAME (samefile1 0 ${HDF_FILE1}.h5 /simple /simple -v -s /simple -d /simple_cp) - # - group with some datasets - ADD_H5_TEST_SAME (samefile2 0 ${HDF_FILE1}.h5 /grp_dsets /grp_dsets -v -s /grp_dsets -d /grp_dsets_cp) + INCLUDE (CMakeTests.cmake) ENDIF (BUILD_TESTING) ############################################################################## diff --git a/tools/h5copy/CMakeTests.cmake b/tools/h5copy/CMakeTests.cmake new file mode 100644 index 0000000..a4cce03 --- /dev/null +++ b/tools/h5copy/CMakeTests.cmake @@ -0,0 +1,381 @@ + +############################################################################## +############################################################################## +### T E S T I N G ### +############################################################################## +############################################################################## + + # -------------------------------------------------------------------- + # Copy all the HDF5 files from the source directory into the test directory + # -------------------------------------------------------------------- + SET (LIST_HDF5_TEST_FILES + ${HDF5_TOOLS_H5COPY_SOURCE_DIR}/testfiles/h5copy_extlinks_src.h5 + ${HDF5_TOOLS_H5COPY_SOURCE_DIR}/testfiles/h5copy_extlinks_trg.h5 + ${HDF5_TOOLS_H5COPY_SOURCE_DIR}/testfiles/h5copy_ref.h5 + ${HDF5_TOOLS_H5COPY_SOURCE_DIR}/testfiles/h5copytst.h5 + ) + + SET (LIST_OTHER_TEST_FILES + ${HDF5_TOOLS_H5COPY_SOURCE_DIR}/testfiles/h5copy_misc1.out + ) + + FILE (MAKE_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles") + + FOREACH (listfiles ${LIST_HDF5_TEST_FILES} ${LIST_OTHER_TEST_FILES}) + GET_FILENAME_COMPONENT(fname "${listfiles}" NAME) + SET (dest "${PROJECT_BINARY_DIR}/testfiles/${fname}") + #MESSAGE (STATUS " Copying ${listfiles}") + ADD_CUSTOM_COMMAND ( + TARGET h5copy + POST_BUILD + COMMAND ${CMAKE_COMMAND} + ARGS -E copy_if_different ${listfiles} ${dest} + ) + ENDFOREACH (listfiles ${LIST_HDF5_TEST_FILES} ${LIST_OTHER_TEST_FILES}) + +############################################################################## +############################################################################## +### T H E T E S T S M A C R O S ### +############################################################################## +############################################################################## + + # + # Perform h5copy according to passing parmeters + # + MACRO (ADD_H5_F_TEST testname resultcode infile fparam vparam sparam srcname dparam dstname) + IF (NOT HDF5_ENABLE_USING_MEMCHECKER) + # Remove any output file left over from previous test run + ADD_TEST ( + NAME H5COPY_F-${testname}-clear-objects + COMMAND ${CMAKE_COMMAND} + -E remove + ./testfiles/${testname}.out.h5 + ) + ENDIF (NOT HDF5_ENABLE_USING_MEMCHECKER) + + ADD_TEST ( + NAME H5COPY_F-${testname} + COMMAND $ -f ${fparam} -i ./testfiles/${infile} -o ./testfiles/${testname}.out.h5 ${vparam} ${sparam} ${srcname} ${dparam} ${dstname} ${ARGN} + ) + IF (HDF5_ENABLE_USING_MEMCHECKER) + IF (NOT "${last_test}" STREQUAL "") + SET_TESTS_PROPERTIES (H5COPY_F-${testname} PROPERTIES DEPENDS ${last_test}) + ENDIF (NOT "${last_test}" STREQUAL "") + ELSE (HDF5_ENABLE_USING_MEMCHECKER) + SET_TESTS_PROPERTIES (H5COPY_F-${testname} PROPERTIES DEPENDS H5COPY_F-${testname}-clear-objects) + ENDIF (HDF5_ENABLE_USING_MEMCHECKER) + + # resultcode=2 will cause the test to skip the diff test + IF (NOT ${resultcode} STREQUAL "2") + ADD_TEST ( + NAME H5COPY_F-${testname}-DIFF + COMMAND $ -q ./testfiles/${infile} ./testfiles/${testname}.out.h5 ${srcname} ${dstname} + ) + SET_TESTS_PROPERTIES(H5COPY_F-${testname}-DIFF PROPERTIES DEPENDS H5COPY_F-${testname}) + IF (${resultcode} STREQUAL "1") + SET_TESTS_PROPERTIES (H5COPY_F-${testname}-DIFF PROPERTIES WILL_FAIL "true") + ENDIF (${resultcode} STREQUAL "1") + ENDIF (NOT ${resultcode} STREQUAL "2") + ENDMACRO (ADD_H5_F_TEST) + + MACRO (ADD_H5_TEST testname resultcode infile vparam sparam srcname dparam dstname) + IF (NOT HDF5_ENABLE_USING_MEMCHECKER) + # Remove any output file left over from previous test run + ADD_TEST ( + NAME H5COPY-${testname}-clear-objects + COMMAND ${CMAKE_COMMAND} + -E remove + ./testfiles/${testname}.out.h5 + ) + ENDIF (NOT HDF5_ENABLE_USING_MEMCHECKER) + + ADD_TEST ( + NAME H5COPY-${testname} + COMMAND $ -i ./testfiles/${infile} -o ./testfiles/${testname}.out.h5 ${vparam} ${sparam} ${srcname} ${dparam} ${dstname} ${ARGN} + ) + IF (HDF5_ENABLE_USING_MEMCHECKER) + IF (NOT "${last_test}" STREQUAL "") + SET_TESTS_PROPERTIES (H5COPY-${testname} PROPERTIES DEPENDS ${last_test}) + ENDIF (NOT "${last_test}" STREQUAL "") + ELSE (HDF5_ENABLE_USING_MEMCHECKER) + SET_TESTS_PROPERTIES (H5COPY-${testname} PROPERTIES DEPENDS H5COPY-${testname}-clear-objects) + ENDIF (HDF5_ENABLE_USING_MEMCHECKER) + + # resultcode=2 will cause the test to skip the diff test + IF (NOT ${resultcode} STREQUAL "2") + ADD_TEST ( + NAME H5COPY-${testname}-DIFF + COMMAND $ -q ./testfiles/${infile} ./testfiles/${testname}.out.h5 ${srcname} ${dstname} + ) + SET_TESTS_PROPERTIES(H5COPY-${testname}-DIFF PROPERTIES DEPENDS H5COPY-${testname}) + IF (${resultcode} STREQUAL "1") + SET_TESTS_PROPERTIES (H5COPY-${testname}-DIFF PROPERTIES WILL_FAIL "true") + ENDIF (${resultcode} STREQUAL "1") + ENDIF (NOT ${resultcode} STREQUAL "2") + ENDMACRO (ADD_H5_TEST) + + MACRO (ADD_H5_TEST2 testname resultcode infile psparam pdparam vparam sparam srcname dparam dstname) + IF (NOT HDF5_ENABLE_USING_MEMCHECKER) + # Remove any output file left over from previous test run + ADD_TEST ( + NAME H5COPY-${testname}-clear-objects + COMMAND ${CMAKE_COMMAND} + -E remove + ./testfiles/${testname}.out.h5 + ) + ENDIF (NOT HDF5_ENABLE_USING_MEMCHECKER) + + ADD_TEST ( + NAME H5COPY-${testname}-prefill + COMMAND $ -i ./testfiles/${infile} -o ./testfiles/${testname}.out.h5 -v -s ${psparam} -d ${pdparam} + ) + IF (HDF5_ENABLE_USING_MEMCHECKER) + IF (NOT "${last_test}" STREQUAL "") + SET_TESTS_PROPERTIES (H5COPY-${testname}-prefill PROPERTIES DEPENDS ${last_test}) + ENDIF (NOT "${last_test}" STREQUAL "") + ELSE (HDF5_ENABLE_USING_MEMCHECKER) + SET_TESTS_PROPERTIES (H5COPY-${testname}-prefill PROPERTIES DEPENDS H5COPY-${testname}-clear-objects) + ENDIF (HDF5_ENABLE_USING_MEMCHECKER) + + ADD_TEST ( + NAME H5COPY-${testname} + COMMAND $ -i ./testfiles/${infile} -o ./testfiles/${testname}.out.h5 ${vparam} ${sparam} ${srcname} ${dparam} ${dstname} ${ARGN} + ) + SET_TESTS_PROPERTIES (H5COPY-${testname} PROPERTIES DEPENDS H5COPY-${testname}-prefill) + # resultcode=2 will cause the test to skip the diff test + IF (NOT ${resultcode} STREQUAL "2") + ADD_TEST ( + NAME H5COPY-${testname}-DIFF + COMMAND $ -q ./testfiles/${infile} ./testfiles/${testname}.out.h5 ${srcname} ${dstname} + ) + SET_TESTS_PROPERTIES(H5COPY-${testname}-DIFF PROPERTIES DEPENDS H5COPY-${testname}) + IF (${resultcode} STREQUAL "1") + SET_TESTS_PROPERTIES (H5COPY-${testname}-DIFF PROPERTIES WILL_FAIL "true") + ENDIF (${resultcode} STREQUAL "1") + ENDIF (NOT ${resultcode} STREQUAL "2") + ENDMACRO (ADD_H5_TEST2) + + MACRO (ADD_H5_TEST_SAME testname resultcode pfile psparam pdparam vparam sparam srcname dparam dstname) + IF (NOT HDF5_ENABLE_USING_MEMCHECKER) + # Remove any output file left over from previous test run + ADD_TEST ( + NAME H5COPY_SAME-${testname}-clear-objects + COMMAND ${CMAKE_COMMAND} + -E remove + ./testfiles/${testname}.out.h5 + ) + ENDIF (NOT HDF5_ENABLE_USING_MEMCHECKER) + + ADD_TEST ( + NAME H5COPY_SAME-${testname}-prefill + COMMAND $ -i ./testfiles/${pfile} -o ./testfiles/${testname}.out.h5 -v -s ${psparam} -d ${pdparam} + ) + IF (HDF5_ENABLE_USING_MEMCHECKER) + IF (NOT "${last_test}" STREQUAL "") + SET_TESTS_PROPERTIES (H5COPY_SAME-${testname}-prefill PROPERTIES DEPENDS ${last_test}) + ENDIF (NOT "${last_test}" STREQUAL "") + ELSE (HDF5_ENABLE_USING_MEMCHECKER) + SET_TESTS_PROPERTIES (H5COPY_SAME-${testname}-prefill PROPERTIES DEPENDS H5COPY_SAME-${testname}-clear-objects) + ENDIF (HDF5_ENABLE_USING_MEMCHECKER) + + ADD_TEST ( + NAME H5COPY_SAME-${testname} + COMMAND $ -i ./testfiles/${testname}.out.h5 -o ./testfiles/${testname}.out.h5 ${vparam} ${sparam} ${srcname} ${dparam} ${dstname} ${ARGN} + ) + SET_TESTS_PROPERTIES (H5COPY_SAME-${testname} PROPERTIES DEPENDS H5COPY_SAME-${testname}-prefill) + # resultcode=2 will cause the test to skip the diff test + IF (NOT ${resultcode} STREQUAL "2") + ADD_TEST ( + NAME H5COPY_SAME-${testname}-DIFF + COMMAND $ -q ./testfiles/${testname}.out.h5 ./testfiles/${testname}.out.h5 ${srcname} ${dstname} + ) + SET_TESTS_PROPERTIES(H5COPY_SAME-${testname}-DIFF PROPERTIES DEPENDS H5COPY_SAME-${testname}) + IF (${resultcode} STREQUAL "1") + SET_TESTS_PROPERTIES (H5COPY_SAME-${testname}-DIFF PROPERTIES WILL_FAIL "true") + ENDIF (${resultcode} STREQUAL "1") + ENDIF (NOT ${resultcode} STREQUAL "2") + ENDMACRO (ADD_H5_TEST_SAME) + + # + # Similiar to ADD_H5_TEST macro. Compare to outputs from source & target + # files instead of checking with h5ls. + # + MACRO (ADD_H5_CMP_TEST testname resultcode infile vparam sparam srcname dparam dstname) + # If using memchecker add tests without using scripts + IF (HDF5_ENABLE_USING_MEMCHECKER) + ADD_TEST (NAME H5COPY-CMP-${testname} COMMAND $ -i ./testfiles/${infile} -o ./testfiles/${testname}.out.h5 ${vparam} ${sparam} ${srcname} ${dparam} ${dstname} ${ARGN}) + IF (${resultcode} STREQUAL "1") + SET_TESTS_PROPERTIES (H5COPY-CMP-${testname} PROPERTIES WILL_FAIL "true") + ENDIF (${resultcode} STREQUAL "1") + IF (NOT "${last_test}" STREQUAL "") + SET_TESTS_PROPERTIES (H5COPY-CMP-${testname} PROPERTIES DEPENDS ${last_test}) + ENDIF (NOT "${last_test}" STREQUAL "") + ELSE (HDF5_ENABLE_USING_MEMCHECKER) + # Remove any output file left over from previous test run + ADD_TEST ( + NAME H5COPY-CMP-${testname}-clear-objects + COMMAND ${CMAKE_COMMAND} + -E remove + ./testfiles/${testname}.out.h5 + ./testfiles/${testname}.out.out + ./testfiles/${testname}.out.out.err + ) + ADD_TEST ( + NAME H5COPY-CMP-${testname} + COMMAND "${CMAKE_COMMAND}" + -D "TEST_PROGRAM=$" + -D "TEST_ARGS=-i;./testfiles/${infile};-o;./testfiles/${testname}.out.h5;${vparam};${sparam};${srcname};${dparam};${dstname}" + -D "TEST_FOLDER=${PROJECT_BINARY_DIR}" + -D "TEST_OUTPUT=./testfiles/${testname}.out.out" + -D "TEST_EXPECT=${resultcode}" + -D "TEST_REFERENCE=./testfiles/${testname}.out" + -D "TEST_MASK=true" + -P "${HDF5_RESOURCES_DIR}/runTest.cmake" + ) + SET_TESTS_PROPERTIES (H5COPY-CMP-${testname} PROPERTIES DEPENDS H5COPY-CMP-${testname}-clear-objects) + ENDIF (HDF5_ENABLE_USING_MEMCHECKER) + ENDMACRO (ADD_H5_CMP_TEST) + +############################################################################## +############################################################################## +### T H E T E S T S ### +############################################################################## +############################################################################## + + # -------------------------------------------------------------------- + # test file names + # -------------------------------------------------------------------- + SET (HDF_FILE1 h5copytst) + SET (HDF_FILE2 h5copy_ref) + SET (HDF_EXT_SRC_FILE h5copy_extlinks_src) + SET (HDF_EXT_TRG_FILE h5copy_extlinks_trg) + + IF (HDF5_ENABLE_USING_MEMCHECKER) + # Remove any output file left over from previous test run + ADD_TEST ( + NAME H5COPY-clearall-objects + COMMAND ${CMAKE_COMMAND} + -E remove + simple.out.h5 + chunk.out.h5 + compact.out.h5 + compound.out.h5 + compressed.out.h5 + named_vl.out.h5 + nested_vl.out.h5 + simple_top.out.h5 + dsrename.out.h5 + grp_empty.out.h5 + grp_dsets.out.h5 + grp_nested.out.h5 + simple_group.out.h5 + grp_rename.out.h5 + grp_dsets_rename.out.h5 + A_B1_simple.out.h5 + A_B2_simple2.out.h5 + C_D_simple.out.h5 + E_F_grp_dsets.out.h5 + G_H_grp_nested.out.h5 + region_ref.out.h5 + ext_link.out.h5 + ext_link_f.out.h5 + ext_dangle_noobj.out.h5 + ext_dangle_noobj_f.out.h5 + ext_dangle_nofile.out.h5 + ext_dangle_nofile_f.out.h5 + ext_link_group.out.h5 + ext_link_group_f.out.h5 + samefile1.out.h5 + samefile2.out.h5 + h5copy_misc1.out.h5 + h5copy_misc1.out.out + h5copy_misc1.out.out.err + ) + SET_TESTS_PROPERTIES (H5COPY-clearall-objects PROPERTIES WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles") + IF (NOT "${last_test}" STREQUAL "") + SET_TESTS_PROPERTIES (H5COPY-clearall-objects PROPERTIES DEPENDS ${last_test}) + ENDIF (NOT "${last_test}" STREQUAL "") + SET (last_test "H5COPY-clearall-objects") + ENDIF (HDF5_ENABLE_USING_MEMCHECKER) + + # "Test copying various forms of datasets" + ADD_H5_TEST (simple 0 ${HDF_FILE1}.h5 -v -s simple -d simple) + ADD_H5_TEST (chunk 0 ${HDF_FILE1}.h5 -v -s chunk -d chunk) + ADD_H5_TEST (compact 0 ${HDF_FILE1}.h5 -v -s compact -d compact) + ADD_H5_TEST (compound 0 ${HDF_FILE1}.h5 -v -s compound -d compound) + ADD_H5_TEST (compressed 0 ${HDF_FILE1}.h5 -v -s compressed -d compressed) + ADD_H5_TEST (named_vl 0 ${HDF_FILE1}.h5 -v -s named_vl -d named_vl) + ADD_H5_TEST (nested_vl 0 ${HDF_FILE1}.h5 -v -s nested_vl -d nested_vl) + + # "Test copying dataset within group in source file to root of destination" + ADD_H5_TEST (simple_top 0 ${HDF_FILE1}.h5 -v -s grp_dsets/simple -d simple_top) + + # "Test copying & renaming dataset" + ADD_H5_TEST (dsrename 0 ${HDF_FILE1}.h5 -v -s compound -d rename) + + # "Test copying empty, 'full' & 'nested' groups" + ADD_H5_TEST (grp_empty 0 ${HDF_FILE1}.h5 -v -s grp_empty -d grp_empty) + ADD_H5_TEST (grp_dsets 0 ${HDF_FILE1}.h5 -v -s grp_dsets -d grp_dsets) + ADD_H5_TEST (grp_nested 0 ${HDF_FILE1}.h5 -v -s grp_nested -d grp_nested) + + # "Test copying dataset within group in source file to group in destination" + ADD_H5_TEST2 (simple_group 0 ${HDF_FILE1}.h5 grp_dsets grp_dsets -v -s /grp_dsets/simple -d /grp_dsets/simple_group) + + # "Test copying & renaming group" + ADD_H5_TEST (grp_rename 0 ${HDF_FILE1}.h5 -v -s grp_dsets -d grp_rename) + + # "Test copying 'full' group hierarchy into group in destination file" + ADD_H5_TEST2 (grp_dsets_rename 0 ${HDF_FILE1}.h5 grp_dsets grp_rename -v -s grp_dsets -d /grp_rename/grp_dsets) + + # "Test copying objects into group hier. that doesn't exist yet in destination file" + ADD_H5_TEST (A_B1_simple 0 ${HDF_FILE1}.h5 -vp -s simple -d /A/B1/simple) + ADD_H5_TEST (A_B2_simple2 0 ${HDF_FILE1}.h5 -vp -s simple -d /A/B2/simple2) + ADD_H5_TEST (C_D_simple 0 ${HDF_FILE1}.h5 -vp -s /grp_dsets/simple -d /C/D/simple) + ADD_H5_TEST (E_F_grp_dsets 0 ${HDF_FILE1}.h5 -vp -s /grp_dsets -d /E/F/grp_dsets) + ADD_H5_TEST (G_H_grp_nested 0 ${HDF_FILE1}.h5 -vp -s /grp_nested -d /G/H/grp_nested) + +############# COPY REFERENCES ############## + + # "Test copying object and region references" + ADD_H5_F_TEST (region_ref 2 ${HDF_FILE2}.h5 ref -v -s / -d /COPY) + +############# COPY EXT LINKS ############## + + # "Test copying external link directly without -f ext" + ADD_H5_TEST (ext_link 2 ${HDF_EXT_SRC_FILE}.h5 -v -s /group_ext/extlink_dset -d /copy1_dset) + + # "Test copying external link directly with -f ext" + ADD_H5_F_TEST (ext_link_f 2 ${HDF_EXT_SRC_FILE}.h5 ext -v -s /group_ext/extlink_dset -d /copy2_dset) + + # "Test copying dangling external link (no obj) directly without -f ext" + ADD_H5_TEST (ext_dangle_noobj 2 ${HDF_EXT_SRC_FILE}.h5 -v -s /group_ext/extlink_notyet1 -d /copy_dangle1_1) + + # "Test copying dangling external link (no obj) directly with -f ext" + ADD_H5_F_TEST (ext_dangle_noobj_f 2 ${HDF_EXT_SRC_FILE}.h5 ext -v -s /group_ext/extlink_notyet1 -d /copy_dangle1_2) + + # "Test copying dangling external link (no file) directly without -f ext" + ADD_H5_TEST (ext_dangle_nofile 2 ${HDF_EXT_SRC_FILE}.h5 -v -s /group_ext/extlink_notyet2 -d /copy_dangle2_1) + + # "Test copying dangling external link (no file) directly with -f ext" + ADD_H5_F_TEST (ext_dangle_nofile_f 2 ${HDF_EXT_SRC_FILE}.h5 ext -v -s /group_ext/extlink_notyet2 -d /copy_dangle2_2) + + # "Test copying a group contains external links without -f ext" + ADD_H5_TEST (ext_link_group 2 ${HDF_EXT_SRC_FILE}.h5 -v -s /group_ext -d /copy1_group) + + # "Test copying a group contains external links with -f ext" + ADD_H5_F_TEST (ext_link_group_f 2 ${HDF_EXT_SRC_FILE}.h5 ext -v -s /group_ext -d /copy2_group) + +############# Test misc. ############## + + #----------------------------------------------------------------- + # "Test copying object into group which doesn't exist, without -p" + # + ADD_H5_CMP_TEST (h5copy_misc1 1 ${HDF_FILE1}.h5 -v -s /simple -d /g1/g2/simple) + + #------------------------------------------- + # "Test copying objects to the same file " + # + # - dataset + ADD_H5_TEST_SAME (samefile1 0 ${HDF_FILE1}.h5 /simple /simple -v -s /simple -d /simple_cp) + # - group with some datasets + ADD_H5_TEST_SAME (samefile2 0 ${HDF_FILE1}.h5 /grp_dsets /grp_dsets -v -s /grp_dsets -d /grp_dsets_cp) diff --git a/tools/h5diff/CMakeLists.txt b/tools/h5diff/CMakeLists.txt index e4e722a..d79c290 100644 --- a/tools/h5diff/CMakeLists.txt +++ b/tools/h5diff/CMakeLists.txt @@ -31,12 +31,6 @@ IF (H5_HAVE_PARALLEL) SET_TARGET_PROPERTIES (ph5diff PROPERTIES FOLDER tools) ENDIF (H5_HAVE_PARALLEL) -############################################################################## -############################################################################## -### T E S T I N G ### -############################################################################## -############################################################################## - IF (BUILD_TESTING) # -------------------------------------------------------------------- # Add the h5diff and test executables @@ -50,1382 +44,8 @@ IF (BUILD_TESTING) #ADD_TEST (NAME h5diffgentest COMMAND $) ENDIF (HDF5_BUILD_GENERATORS AND NOT BUILD_SHARED_LIBS) - - # -------------------------------------------------------------------- - # Copy all the HDF5 files from the test directory into the source directory - # -------------------------------------------------------------------- - SET (LIST_HDF5_TEST_FILES - ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_basic1.h5 - ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_basic2.h5 - ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_types.h5 - ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_dtypes.h5 - ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_attr1.h5 - ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_attr2.h5 - ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_dset1.h5 - ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_dset2.h5 - ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_hyper1.h5 - ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_hyper2.h5 - ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_empty.h5 - ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_links.h5 - ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_softlinks.h5 - ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_linked_softlink.h5 - ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_extlink_src.h5 - ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_extlink_trg.h5 - ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_ext2softlink_src.h5 - ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_ext2softlink_trg.h5 - ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_dset_zero_dim_size1.h5 - ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_dset_zero_dim_size2.h5 - ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_danglelinks1.h5 - ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_danglelinks2.h5 - ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_grp_recurse1.h5 - ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_grp_recurse2.h5 - ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_grp_recurse_ext1.h5 - ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_grp_recurse_ext2-1.h5 - ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_grp_recurse_ext2-2.h5 - ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_grp_recurse_ext2-3.h5 - ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_exclude1-1.h5 - ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_exclude1-2.h5 - ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_exclude2-1.h5 - ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_exclude2-2.h5 - ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_exclude3-1.h5 - ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_exclude3-2.h5 - ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_comp_vl_strs.h5 - ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_attr_v_level1.h5 - ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_attr_v_level2.h5 - ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/compounds_array_vlen1.h5 - ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/compounds_array_vlen2.h5 - ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/non_comparables1.h5 - ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/non_comparables2.h5 - ) - - SET (LIST_OTHER_TEST_FILES - ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_10.txt - ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_100.txt - ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_101.txt - ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_102.txt - ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_103.txt - ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_104.txt - ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_11.txt - ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_12.txt - ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_13.txt - ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_14.txt - ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_15.txt - ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_16_1.txt - ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_16_2.txt - ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_16_3.txt - ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_17.txt - ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_171.txt - ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_172.txt - ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_18_1.txt - ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_18.txt - ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_20.txt - ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_200.txt - ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_201.txt - ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_202.txt - ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_203.txt - ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_204.txt - ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_205.txt - ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_206.txt - ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_207.txt - ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_208.txt - ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_220.txt - ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_221.txt - ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_222.txt - ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_223.txt - ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_224.txt - ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_21.txt - ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_22.txt - ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_23.txt - ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_24.txt - ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_25.txt - ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_26.txt - ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_27.txt - ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_28.txt - ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_300.txt - ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_400.txt - ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_401.txt - ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_402.txt - ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_403.txt - ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_404.txt - ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_405.txt - ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_406.txt - ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_407.txt - ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_408.txt - ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_409.txt - ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_410.txt - ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_411.txt - ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_412.txt - ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_413.txt - ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_414.txt - ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_415.txt - ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_416.txt - ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_417.txt - ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_418.txt - ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_419.txt - ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_420.txt - ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_421.txt - ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_422.txt - ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_423.txt - ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_424.txt - ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_425.txt - ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_450.txt - ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_451.txt - ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_452.txt - ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_453.txt - ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_454.txt - ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_455.txt - ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_456.txt - ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_457.txt - ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_458.txt - ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_459.txt - ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_465.txt - ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_466.txt - ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_467.txt - ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_468.txt - ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_469.txt - ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_471.txt - ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_472.txt - ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_473.txt - ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_474.txt - ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_475.txt - ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_480.txt - ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_481.txt - ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_482.txt - ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_483.txt - ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_484.txt - ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_485.txt - ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_486.txt - ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_487.txt - ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_50.txt - ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_51.txt - ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_52.txt - ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_53.txt - ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_54.txt - ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_55.txt - ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_56.txt - ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_57.txt - ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_58.txt - ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_59.txt - ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_500.txt - ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_501.txt - ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_502.txt - ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_503.txt - ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_504.txt - ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_505.txt - ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_506.txt - ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_507.txt - ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_508.txt - ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_509.txt - ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_510.txt - ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_511.txt - ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_512.txt - ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_513.txt - ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_514.txt - ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_515.txt - ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_516.txt - ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_517.txt - ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_518.txt - ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_530.txt - ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_540.txt - ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_600.txt - ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_601.txt - ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_603.txt - ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_604.txt - ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_605.txt - ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_606.txt - ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_607.txt - ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_608.txt - ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_609.txt - ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_610.txt - ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_612.txt - ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_613.txt - ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_614.txt - ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_615.txt - ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_616.txt - ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_617.txt - ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_618.txt - ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_619.txt - ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_621.txt - ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_622.txt - ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_623.txt - ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_624.txt - ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_625.txt - ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_626.txt - ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_627.txt - ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_628.txt - ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_629.txt - ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_630.txt - ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_631.txt - ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_640.txt - ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_641.txt - ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_642.txt - ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_643.txt - ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_644.txt - ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_645.txt - ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_646.txt - ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_70.txt - ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_700.txt - ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_701.txt - ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_702.txt - ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_703.txt - ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_704.txt - ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_705.txt - ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_706.txt - ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_707.txt - ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_708.txt - ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_709.txt - ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_710.txt - ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_80.txt - ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_90.txt - ) - - # Make testfiles dir under build dir - FILE (MAKE_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles") - - # - # copy test files from source to build dir - # - FOREACH (h5_tstfiles ${LIST_HDF5_TEST_FILES} ${LIST_OTHER_TEST_FILES}) - GET_FILENAME_COMPONENT(fname "${h5_tstfiles}" NAME) - SET (dest "${PROJECT_BINARY_DIR}/testfiles/${fname}") - #MESSAGE (STATUS " Copying ${fname}") - ADD_CUSTOM_COMMAND ( - TARGET h5diff - POST_BUILD - COMMAND ${CMAKE_COMMAND} - ARGS -E copy_if_different ${h5_tstfiles} ${dest} - ) - ENDFOREACH (h5_tstfiles ${LIST_HDF5_TEST_FILES} ${LIST_OTHER_TEST_FILES}) - - - # - # Overwrite system dependent files (Windows) - # - IF (WIN32 AND NOT CYGWIN) - ADD_CUSTOM_COMMAND ( - TARGET h5diff - POST_BUILD - COMMAND ${CMAKE_COMMAND} - ARGS -E copy_if_different ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_101w.txt ${PROJECT_BINARY_DIR}/testfiles/h5diff_101.txt - ) - - ADD_CUSTOM_COMMAND ( - TARGET h5diff - POST_BUILD - COMMAND ${CMAKE_COMMAND} - ARGS -E copy_if_different ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_102w.txt ${PROJECT_BINARY_DIR}/testfiles/h5diff_102.txt - ) - ADD_CUSTOM_COMMAND ( - TARGET h5diff - POST_BUILD - COMMAND ${CMAKE_COMMAND} - ARGS -E copy_if_different ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_103w.txt ${PROJECT_BINARY_DIR}/testfiles/h5diff_103.txt - ) - - ADD_CUSTOM_COMMAND ( - TARGET h5diff - POST_BUILD - COMMAND ${CMAKE_COMMAND} - ARGS -E copy_if_different ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_104w.txt ${PROJECT_BINARY_DIR}/testfiles/h5diff_104.txt - ) - ENDIF (WIN32 AND NOT CYGWIN) - -############################################################################## -############################################################################## -### T H E T E S T S M A C R O S ### -############################################################################## -############################################################################## - - MACRO (ADD_H5_TEST resultfile resultcode) - # If using memchecker add tests without using scripts - IF (HDF5_ENABLE_USING_MEMCHECKER) - ADD_TEST (NAME H5DIFF-${resultfile} COMMAND $ ${ARGN}) - SET_TESTS_PROPERTIES (H5DIFF-${resultfile} PROPERTIES WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles") - IF (NOT ${resultcode} STREQUAL "0") - SET_TESTS_PROPERTIES (H5DIFF-${resultfile} PROPERTIES WILL_FAIL "true") - ENDIF (NOT ${resultcode} STREQUAL "0") - IF (NOT "${last_test}" STREQUAL "") - SET_TESTS_PROPERTIES (H5DIFF-${resultfile} PROPERTIES DEPENDS ${last_test}) - ENDIF (NOT "${last_test}" STREQUAL "") - ELSE (HDF5_ENABLE_USING_MEMCHECKER) - ADD_TEST ( - NAME H5DIFF-${resultfile}-clear-objects - COMMAND ${CMAKE_COMMAND} - -E remove ./testfiles/${resultfile}.out ./testfiles/${resultfile}.out.err - ) - ADD_TEST ( - NAME H5DIFF-${resultfile} - COMMAND "${CMAKE_COMMAND}" - -D "TEST_PROGRAM=$" - -D "TEST_ARGS:STRING=${ARGN}" - -D "TEST_FOLDER=${PROJECT_BINARY_DIR}/testfiles" - -D "TEST_OUTPUT=${resultfile}.out" - -D "TEST_EXPECT=${resultcode}" - -D "TEST_REFERENCE=${resultfile}.txt" - -D "TEST_APPEND=EXIT CODE:" - -P "${HDF5_RESOURCES_DIR}/runTest.cmake" - ) - SET_TESTS_PROPERTIES (H5DIFF-${resultfile} PROPERTIES DEPENDS "H5DIFF-${resultfile}-clear-objects") - ENDIF (HDF5_ENABLE_USING_MEMCHECKER) - IF (H5_HAVE_PARALLEL) - ADD_PH5_TEST (${resultfile} ${resultcode} ${ARGN}) - ENDIF (H5_HAVE_PARALLEL) - ENDMACRO (ADD_H5_TEST file) - - MACRO (ADD_PH5_TEST resultfile resultcode) - # If using memchecker add tests without using scripts - IF (HDF5_ENABLE_USING_MEMCHECKER) - ADD_TEST (NAME PH5DIFF-${resultfile} COMMAND $ ${MPIEXEC} ${MPIEXEC_PREFLAGS} ${MPIEXEC_NUMPROC_FLAG} ${MPIEXEC_MAX_NUMPROCS} ${MPIEXEC_POSTFLAGS} ${ARGN}) - SET_TESTS_PROPERTIES (PH5DIFF-${resultfile} PROPERTIES WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles") - IF (NOT ${resultcode} STREQUAL "0") - SET_TESTS_PROPERTIES (PH5DIFF-${resultfile} PROPERTIES WILL_FAIL "true") - ENDIF (NOT ${resultcode} STREQUAL "0") - IF (NOT "${last_test}" STREQUAL "") - SET_TESTS_PROPERTIES (PH5DIFF-${resultfile} PROPERTIES DEPENDS ${last_test}) - ENDIF (NOT "${last_test}" STREQUAL "") - ELSE (HDF5_ENABLE_USING_MEMCHECKER) - ADD_TEST ( - NAME PH5DIFF-${resultfile}-clear-objects - COMMAND ${CMAKE_COMMAND} - -E remove ./testfiles/${resultfile}_p.out ./testfiles/${resultfile}_p.out.err - ) - ADD_TEST ( - NAME PH5DIFF-${resultfile} - COMMAND "${CMAKE_COMMAND}" - -D "TEST_PROGRAM=${MPIEXEC};${MPIEXEC_PREFLAGS};${MPIEXEC_NUMPROC_FLAG};${MPIEXEC_MAX_NUMPROCS};${MPIEXEC_POSTFLAGS};$" - -D "TEST_ARGS:STRING=${ARGN}" - -D "TEST_FOLDER=${PROJECT_BINARY_DIR}/testfiles" - -D "TEST_OUTPUT=P_${resultfile}.out" - -D "TEST_EXPECT=${resultcode}" - -D "TEST_REFERENCE=${resultfile}.txt" -# -D "TEST_APPEND=EXIT CODE: [0-9]" -# -D "TEST_REF_FILTER=EXIT CODE: 0" - -D "TEST_SKIP_COMPARE=TRUE" - -P "${HDF5_RESOURCES_DIR}/prunTest.cmake" - ) - SET_TESTS_PROPERTIES (PH5DIFF-${resultfile} PROPERTIES DEPENDS "PH5DIFF-${resultfile}-clear-objects") - ENDIF (HDF5_ENABLE_USING_MEMCHECKER) - ENDMACRO (ADD_PH5_TEST file) - - # ADD_H5_NO_OUTPUT_TEST - # Purpose to verify only exitcode without output comparison - # Don't use this if possible; this may be removed. - MACRO (ADD_H5_NO_OUTPUT_TEST testname resultcode) - # If using memchecker add tests without using scripts - IF (NOT HDF5_ENABLE_USING_MEMCHECKER) - ADD_TEST ( - NAME H5DIFF-${testname}-clear-objects - COMMAND ${CMAKE_COMMAND} - -E remove ./testfiles/${testname}.out ./testfiles/${testname}.out.err - ) - # if there was a previous test - IF (NOT "${last_test}" STREQUAL "") - SET_TESTS_PROPERTIES (H5DIFF-${testname}-clear-objects PROPERTIES DEPENDS ${last_test}) - ENDIF (NOT "${last_test}" STREQUAL "") - ENDIF (NOT HDF5_ENABLE_USING_MEMCHECKER) - - ADD_TEST (NAME H5DIFF-${testname} COMMAND $ ${ARGN}) - IF (NOT ${resultcode} STREQUAL "0") - SET_TESTS_PROPERTIES (H5DIFF-${testname} PROPERTIES WILL_FAIL "true") - ENDIF (NOT ${resultcode} STREQUAL "0") - - IF (HDF5_ENABLE_USING_MEMCHECKER) - IF (NOT "${last_test}" STREQUAL "") - SET_TESTS_PROPERTIES (H5DIFF-${testname} PROPERTIES DEPENDS ${last_test}) - ENDIF (NOT "${last_test}" STREQUAL "") - ELSE (HDF5_ENABLE_USING_MEMCHECKER) - SET_TESTS_PROPERTIES (H5DIFF-${testname} PROPERTIES DEPENDS H5DIFF-${testname}-clear-objects) - ENDIF (HDF5_ENABLE_USING_MEMCHECKER) - ENDMACRO (ADD_H5_NO_OUTPUT_TEST) - -############################################################################## -############################################################################## -### T H E T E S T S ### -############################################################################## -############################################################################## - - # -------------------------------------------------------------------- - # test file names - # -------------------------------------------------------------------- - SET (FILE1 h5diff_basic1.h5) - SET (FILE2 h5diff_basic2.h5) - SET (FILE3 h5diff_types.h5) - SET (FILE4 h5diff_dtypes.h5) - SET (FILE5 h5diff_attr1.h5) - SET (FILE6 h5diff_attr2.h5) - SET (FILE7 h5diff_dset1.h5) - SET (FILE8 h5diff_dset2.h5) - SET (FILE9 h5diff_hyper1.h5) - SET (FILE10 h5diff_hyper2.h5) - SET (FILE11 h5diff_empty.h5) - SET (FILE12 h5diff_links.h5) - SET (FILE13 h5diff_softlinks.h5) - SET (FILE14 h5diff_linked_softlink.h5) - SET (FILE15 h5diff_extlink_src.h5) - SET (FILE16 h5diff_extlink_trg.h5) - SET (FILE17 h5diff_ext2softlink_src.h5) - SET (FILE18 h5diff_ext2softlink_trg.h5) - SET (FILE19 h5diff_dset_zero_dim_size1.h5) - SET (FILE20 h5diff_dset_zero_dim_size2.h5) - SET (DANGLE_LINK_FILE1 h5diff_danglelinks1.h5) - SET (DANGLE_LINK_FILE2 h5diff_danglelinks2.h5) - SET (GRP_RECURSE_FILE1 h5diff_grp_recurse1.h5) - SET (GRP_RECURSE_FILE2 h5diff_grp_recurse2.h5) - # group recursive - same structure via external links through files - SET (GRP_RECURSE1_EXT h5diff_grp_recurse_ext1.h5) - SET (GRP_RECURSE2_EXT1 h5diff_grp_recurse_ext2-1.h5) - SET (GRP_RECURSE2_EXT2 h5diff_grp_recurse_ext2-2.h5) - SET (GRP_RECURSE2_EXT3 h5diff_grp_recurse_ext2-3.h5) - # same structure, same obj name with different value - SET (EXCLUDE_FILE1_1 h5diff_exclude1-1.h5) - SET (EXCLUDE_FILE1_2 h5diff_exclude1-2.h5) - # different structure and obj names - SET (EXCLUDE_FILE2_1 h5diff_exclude2-1.h5) - SET (EXCLUDE_FILE2_2 h5diff_exclude2-2.h5) - # Only one file contains unique objs. Common objs are same. - SET (EXCLUDE_FILE3_1 h5diff_exclude3-1.h5) - SET (EXCLUDE_FILE3_2 h5diff_exclude3-2.h5) - # compound type with multiple vlen string types - SET (COMP_VL_STRS_FILE h5diff_comp_vl_strs.h5) - # container types (array,vlen) with multiple nested compound types - SET (COMPS_ARRAY_VLEN_FILE1 compounds_array_vlen1.h5) - SET (COMPS_ARRAY_VLEN_FILE2 compounds_array_vlen2.h5) - # attrs with verbose option level - SET (ATTR_VERBOSE_LEVEL_FILE1 h5diff_attr_v_level1.h5) - SET (ATTR_VERBOSE_LEVEL_FILE2 h5diff_attr_v_level2.h5) - - IF (HDF5_ENABLE_USING_MEMCHECKER) - # Remove any output file left over from previous test run - ADD_TEST ( - NAME H5DIFF-clearall-objects - COMMAND ${CMAKE_COMMAND} - -E remove - h5diff_10.out - h5diff_10.out.err - h5diff_100.out - h5diff_100.out.err - h5diff_101.out - h5diff_101.out.err - h5diff_102.out - h5diff_102.out.err - h5diff_103.out - h5diff_103.out.err - h5diff_104.out - h5diff_104.out.err - h5diff_11.out - h5diff_11.out.err - h5diff_12.out - h5diff_12.out.err - h5diff_13.out - h5diff_13.out.err - h5diff_14.out - h5diff_14.out.err - h5diff_15.out - h5diff_15.out.err - h5diff_16_1.out - h5diff_16_1.out.err - h5diff_16_2.out - h5diff_16_2.out.err - h5diff_16_3.out - h5diff_16_3.out.err - h5diff_17.out - h5diff_17.out.err - h5diff_171.out - h5diff_171.out.err - h5diff_172.out - h5diff_172.out.err - h5diff_18_1.out - h5diff_18_1.out.err - h5diff_18.out - h5diff_18.out.err - h5diff_20.out - h5diff_20.out.err - h5diff_200.out - h5diff_200.out.err - h5diff_201.out - h5diff_201.out.err - h5diff_202.out - h5diff_202.out.err - h5diff_203.out - h5diff_203.out.err - h5diff_204.out - h5diff_204.out.err - h5diff_205.out - h5diff_205.out.err - h5diff_206.out - h5diff_206.out.err - h5diff_207.out - h5diff_207.out.err - h5diff_208.out - h5diff_208.out.err - h5diff_220.out - h5diff_220.out.err - h5diff_221.out - h5diff_221.out.err - h5diff_222.out - h5diff_222.out.err - h5diff_223.out - h5diff_223.out.err - h5diff_224.out - h5diff_224.out.err - h5diff_21.out - h5diff_21.out.err - h5diff_22.out - h5diff_22.out.err - h5diff_23.out - h5diff_23.out.err - h5diff_24.out - h5diff_24.out.err - h5diff_25.out - h5diff_25.out.err - h5diff_26.out - h5diff_26.out.err - h5diff_27.out - h5diff_27.out.err - h5diff_28.out - h5diff_28.out.err - h5diff_300.out - h5diff_300.out.err - h5diff_400.out - h5diff_400.out.err - h5diff_401.out - h5diff_401.out.err - h5diff_402.out - h5diff_402.out.err - h5diff_403.out - h5diff_403.out.err - h5diff_404.out - h5diff_404.out.err - h5diff_405.out - h5diff_405.out.err - h5diff_406.out - h5diff_406.out.err - h5diff_407.out - h5diff_407.out.err - h5diff_408.out - h5diff_408.out.err - h5diff_409.out - h5diff_409.out.err - h5diff_410.out - h5diff_410.out.err - h5diff_411.out - h5diff_411.out.err - h5diff_412.out - h5diff_412.out.err - h5diff_413.out - h5diff_413.out.err - h5diff_414.out - h5diff_414.out.err - h5diff_415.out - h5diff_415.out.err - h5diff_416.out - h5diff_416.out.err - h5diff_417.out - h5diff_417.out.err - h5diff_418.out - h5diff_418.out.err - h5diff_419.out - h5diff_419.out.err - h5diff_420.out - h5diff_420.out.err - h5diff_421.out - h5diff_421.out.err - h5diff_422.out - h5diff_422.out.err - h5diff_423.out - h5diff_423.out.err - h5diff_424.out - h5diff_424.out.err - h5diff_425.out - h5diff_425.out.err - h5diff_450.out - h5diff_450.out.err - h5diff_451.out - h5diff_451.out.err - h5diff_452.out - h5diff_452.out.err - h5diff_453.out - h5diff_453.out.err - h5diff_454.out - h5diff_454.out.err - h5diff_455.out - h5diff_455.out.err - h5diff_456.out - h5diff_456.out.err - h5diff_457.out - h5diff_457.out.err - h5diff_458.out - h5diff_458.out.err - h5diff_459.out - h5diff_459.out.err - h5diff_465.out - h5diff_465.out.err - h5diff_466.out - h5diff_466.out.err - h5diff_467.out - h5diff_467.out.err - h5diff_468.out - h5diff_468.out.err - h5diff_469.out - h5diff_469.out.err - h5diff_471.out - h5diff_471.out.err - h5diff_472.out - h5diff_472.out.err - h5diff_473.out - h5diff_473.out.err - h5diff_474.out - h5diff_474.out.err - h5diff_475.out - h5diff_475.out.err - h5diff_480.out - h5diff_480.out.err - h5diff_481.out - h5diff_481.out.err - h5diff_482.out - h5diff_482.out.err - h5diff_483.out - h5diff_483.out.err - h5diff_484.out - h5diff_484.out.err - h5diff_50.out - h5diff_50.out.err - h5diff_51.out - h5diff_51.out.err - h5diff_52.out - h5diff_52.out.err - h5diff_53.out - h5diff_53.out.err - h5diff_54.out - h5diff_54.out.err - h5diff_55.out - h5diff_55.out.err - h5diff_56.out - h5diff_56.out.err - h5diff_57.out - h5diff_57.out.err - h5diff_58.out - h5diff_58.out.err - h5diff_59.out - h5diff_59.out.err - h5diff_500.out - h5diff_500.out.err - h5diff_501.out - h5diff_501.out.err - h5diff_502.out - h5diff_502.out.err - h5diff_503.out - h5diff_503.out.err - h5diff_504.out - h5diff_504.out.err - h5diff_505.out - h5diff_505.out.err - h5diff_506.out - h5diff_506.out.err - h5diff_507.out - h5diff_507.out.err - h5diff_508.out - h5diff_508.out.err - h5diff_509.out - h5diff_509.out.err - h5diff_510.out - h5diff_510.out.err - h5diff_511.out - h5diff_511.out.err - h5diff_512.out - h5diff_512.out.err - h5diff_513.out - h5diff_513.out.err - h5diff_514.out - h5diff_514.out.err - h5diff_515.out - h5diff_515.out.err - h5diff_516.out - h5diff_516.out.err - h5diff_517.out - h5diff_517.out.err - h5diff_518.out - h5diff_518.out.err - h5diff_530.out - h5diff_530.out.err - h5diff_540.out - h5diff_540.out.err - h5diff_600.out - h5diff_600.out.err - h5diff_601.out - h5diff_601.out.err - h5diff_603.out - h5diff_603.out.err - h5diff_604.out - h5diff_604.out.err - h5diff_605.out - h5diff_605.out.err - h5diff_606.out - h5diff_606.out.err - h5diff_607.out - h5diff_607.out.err - h5diff_608.out - h5diff_608.out.err - h5diff_609.out - h5diff_609.out.err - h5diff_610.out - h5diff_610.out.err - h5diff_612.out - h5diff_612.out.err - h5diff_613.out - h5diff_613.out.err - h5diff_614.out - h5diff_614.out.err - h5diff_615.out - h5diff_615.out.err - h5diff_616.out - h5diff_616.out.err - h5diff_617.out - h5diff_617.out.err - h5diff_618.out - h5diff_618.out.err - h5diff_619.out - h5diff_619.out.err - h5diff_621.out - h5diff_621.out.err - h5diff_622.out - h5diff_622.out.err - h5diff_623.out - h5diff_623.out.err - h5diff_624.out - h5diff_624.out.err - h5diff_625.out - h5diff_625.out.err - h5diff_626.out - h5diff_626.out.err - h5diff_627.out - h5diff_627.out.err - h5diff_628.out - h5diff_628.out.err - h5diff_629.out - h5diff_629.out.err - h5diff_640.out - h5diff_640.out.err - h5diff_641.out - h5diff_641.out.err - h5diff_642.out - h5diff_642.out.err - h5diff_643.out - h5diff_643.out.err - h5diff_644.out - h5diff_644.out.err - h5diff_645.out - h5diff_645.out.err - h5diff_646.out - h5diff_646.out.err - h5diff_70.out - h5diff_70.out.err - h5diff_700.out - h5diff_700.out.err - h5diff_701.out - h5diff_701.out.err - h5diff_702.out - h5diff_702.out.err - h5diff_703.out - h5diff_703.out.err - h5diff_704.out - h5diff_704.out.err - h5diff_705.out - h5diff_705.out.err - h5diff_706.out - h5diff_706.out.err - h5diff_707.out - h5diff_707.out.err - h5diff_708.out - h5diff_708.out.err - h5diff_709.out - h5diff_709.out.err - h5diff_710.out - h5diff_710.out.err - h5diff_80.out - h5diff_80.out.err - h5diff_90.out - h5diff_90.out.err - ) - SET_TESTS_PROPERTIES (H5DIFF-clearall-objects PROPERTIES WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles") - IF (NOT "${last_test}" STREQUAL "") - SET_TESTS_PROPERTIES (H5DIFF-clearall-objects PROPERTIES DEPENDS ${last_test}) - ENDIF (NOT "${last_test}" STREQUAL "") - SET (last_test "H5DIFF-clearall-objects") - ENDIF (HDF5_ENABLE_USING_MEMCHECKER) - -# ############################################################################ -# # Common usage -# ############################################################################ - -# 1.0 -ADD_H5_TEST (h5diff_10 0 -h) - -# 1.1 normal mode -ADD_H5_TEST (h5diff_11 1 ${FILE1} ${FILE2}) - -# 1.2 normal mode with objects -ADD_H5_TEST (h5diff_12 1 ${FILE1} ${FILE2} g1/dset1 g1/dset2) - -# 1.3 report mode -ADD_H5_TEST (h5diff_13 1 -r ${FILE1} ${FILE2}) - -# 1.4 report mode with objects -ADD_H5_TEST (h5diff_14 1 -r ${FILE1} ${FILE2} g1/dset1 g1/dset2) - -# 1.5 with -d -ADD_H5_TEST (h5diff_15 1 --report --delta=5 ${FILE1} ${FILE2} g1/dset3 g1/dset4) - -# 1.6.1 with -p (int) -ADD_H5_TEST (h5diff_16_1 1 -v -p 0.02 ${FILE1} ${FILE1} g1/dset5 g1/dset6) - -# 1.6.2 with -p (unsigned long_long) -ADD_H5_TEST (h5diff_16_2 1 --verbose --relative=0.02 ${FILE1} ${FILE1} g1/dset7 g1/dset8) - -# 1.6.3 with -p (double) -ADD_H5_TEST (h5diff_16_3 1 -v -p 0.02 ${FILE1} ${FILE1} g1/dset9 g1/dset10) - -# 1.7 verbose mode -ADD_H5_TEST (h5diff_17 1 -v ${FILE1} ${FILE2}) - -# 1.7 test 32-bit INFINITY -ADD_H5_TEST (h5diff_171 0 -v ${FILE1} ${FILE1} /g1/fp19 /g1/fp19_COPY) - -# 1.7 test 64-bit INFINITY -ADD_H5_TEST (h5diff_172 0 -v ${FILE1} ${FILE1} /g1/fp20 /g1/fp20_COPY) - -# 1.8 quiet mode -ADD_H5_TEST (h5diff_18 1 -q ${FILE1} ${FILE2}) - -# 1.8 -v and -q -ADD_H5_TEST (h5diff_18_1 2 -v -q ${FILE1} ${FILE2}) - -# ############################################################################## -# # not comparable types -# ############################################################################## - -# 2.0 -ADD_H5_TEST (h5diff_20 0 -v ${FILE3} ${FILE3} dset g1) - -# 2.1 -ADD_H5_TEST (h5diff_21 0 -v ${FILE3} ${FILE3} dset l1) - -# 2.2 -ADD_H5_TEST (h5diff_22 0 -v ${FILE3} ${FILE3} dset t1) - -# ############################################################################## -# # compare groups, types, links (no differences and differences) -# ############################################################################## - -# 2.3 -ADD_H5_TEST (h5diff_23 0 -v ${FILE3} ${FILE3} g1 g1) - -# 2.4 -ADD_H5_TEST (h5diff_24 0 -v ${FILE3} ${FILE3} t1 t1) - -# 2.5 -ADD_H5_TEST (h5diff_25 0 -v ${FILE3} ${FILE3} l1 l1) - -# 2.6 -ADD_H5_TEST (h5diff_26 0 -v ${FILE3} ${FILE3} g1 g2) - -# 2.7 -ADD_H5_TEST (h5diff_27 1 -v ${FILE3} ${FILE3} t1 t2) - -# 2.8 -ADD_H5_TEST (h5diff_28 1 -v ${FILE3} ${FILE3} l1 l2) - -# ############################################################################## -# # Dataset datatypes -# ############################################################################## - -# 5.0 -ADD_H5_TEST (h5diff_50 1 -v ${FILE4} ${FILE4} dset0a dset0b) - -# 5.1 -ADD_H5_TEST (h5diff_51 1 -v ${FILE4} ${FILE4} dset1a dset1b) - -# 5.2 -ADD_H5_TEST (h5diff_52 1 -v ${FILE4} ${FILE4} dset2a dset2b) - -# 5.3 -ADD_H5_TEST (h5diff_53 1 -v ${FILE4} ${FILE4} dset3a dset4b) - -# 5.4 -ADD_H5_TEST (h5diff_54 1 -v ${FILE4} ${FILE4} dset4a dset4b) - -# 5.5 -ADD_H5_TEST (h5diff_55 1 -v ${FILE4} ${FILE4} dset5a dset5b) - -# 5.6 -ADD_H5_TEST (h5diff_56 1 -v ${FILE4} ${FILE4} dset6a dset6b) - -# 5.7 -ADD_H5_TEST (h5diff_57 0 -v ${FILE4} ${FILE4} dset7a dset7b) - -# 5.8 (region reference) -ADD_H5_TEST (h5diff_58 1 -v ${FILE7} ${FILE8} refreg) - -# test for both dset and attr with same type but with different size -# ( HDDFV-7942 ) -ADD_H5_TEST (h5diff_59 0 -v ${FILE4} ${FILE4} dset11a dset11b) - -# ############################################################################## -# # Error messages -# ############################################################################## - -# 6.0: Check if the command line number of arguments is less than 3 -ADD_H5_TEST (h5diff_600 1 ${FILE1}) - -# 6.1: Check if non-exist object name is specified -ADD_H5_TEST (h5diff_601 2 ${FILE1} ${FILE1} nono_obj) - -# ############################################################################## -# # -d -# ############################################################################## - -# 6.3: negative value -ADD_H5_TEST (h5diff_603 1 -d -4 ${FILE1} ${FILE2} g1/dset3 g1/dset4) - -# 6.4: zero -ADD_H5_TEST (h5diff_604 1 -d 0 ${FILE1} ${FILE2} g1/dset3 g1/dset4) - -# 6.5: non number -ADD_H5_TEST (h5diff_605 1 -d u ${FILE1} ${FILE2} g1/dset3 g1/dset4) - -# 6.6: hexadecimal -ADD_H5_TEST (h5diff_606 1 -d 0x1 ${FILE1} ${FILE2} g1/dset3 g1/dset4) - -# 6.7: string -ADD_H5_TEST (h5diff_607 1 -d "1" ${FILE1} ${FILE2} g1/dset3 g1/dset4) - -# 6.8: use system epsilon -ADD_H5_TEST (h5diff_608 1 --use-system-epsilon ${FILE1} ${FILE2} g1/dset3 g1/dset4) - -# 6.9: number larger than biggest difference -ADD_H5_TEST (h5diff_609 0 -d 200 ${FILE1} ${FILE2} g1/dset3 g1/dset4) - -# 6.10: number smaller than smallest difference -ADD_H5_TEST (h5diff_610 1 -d 1 ${FILE1} ${FILE2} g1/dset3 g1/dset4) - -# ############################################################################## -# # -p -# ############################################################################## - -# 6.12: negative value -ADD_H5_TEST (h5diff_612 1 -p -4 ${FILE1} ${FILE2} g1/dset3 g1/dset4) - -# 6.13: zero -ADD_H5_TEST (h5diff_613 1 -p 0 ${FILE1} ${FILE2} g1/dset3 g1/dset4) - -# 6.14: non number -ADD_H5_TEST (h5diff_614 1 -p u ${FILE1} ${FILE2} g1/dset3 g1/dset4) - -# 6.15: hexadecimal -ADD_H5_TEST (h5diff_615 1 -p 0x1 ${FILE1} ${FILE2} g1/dset3 g1/dset4) - -# 6.16: string -ADD_H5_TEST (h5diff_616 1 -p "0.21" ${FILE1} ${FILE2} g1/dset3 g1/dset4) - -# 6.17: repeated option -ADD_H5_TEST (h5diff_617 1 -p 0.21 -p 0.22 ${FILE1} ${FILE2} g1/dset3 g1/dset4) - -# 6.18: number larger than biggest difference -ADD_H5_TEST (h5diff_618 0 -p 2 ${FILE1} ${FILE2} g1/dset3 g1/dset4) - -# 6.19: number smaller than smallest difference -ADD_H5_TEST (h5diff_619 1 -p 0.005 ${FILE1} ${FILE2} g1/dset3 g1/dset4) - -# ############################################################################## -# # -n -# ############################################################################## - -# 6.21: negative value -ADD_H5_TEST (h5diff_621 1 -n -4 ${FILE1} ${FILE2} g1/dset3 g1/dset4) - -# 6.22: zero -ADD_H5_TEST (h5diff_622 1 -n 0 ${FILE1} ${FILE2} g1/dset3 g1/dset4) - -# 6.23: non number -ADD_H5_TEST (h5diff_623 1 -n u ${FILE1} ${FILE2} g1/dset3 g1/dset4) - -# 6.24: hexadecimal -ADD_H5_TEST (h5diff_624 1 -n 0x1 ${FILE1} ${FILE2} g1/dset3 g1/dset4) - -# 6.25: string -ADD_H5_TEST (h5diff_625 1 -n "2" ${FILE1} ${FILE2} g1/dset3 g1/dset4) - -# 6.26: repeated option -ADD_H5_TEST (h5diff_626 1 -n 2 -n 3 ${FILE1} ${FILE2} g1/dset3 g1/dset4) - -# 6.27: number larger than biggest difference -ADD_H5_TEST (h5diff_627 1 --count=200 ${FILE1} ${FILE2} g1/dset3 g1/dset4) - -# 6.28: number smaller than smallest difference -ADD_H5_TEST (h5diff_628 1 -n 1 ${FILE1} ${FILE2} g1/dset3 g1/dset4) - -# Disabling this test as it hangs - LRK 20090618 -# 6.29 non valid files -#ADD_H5_TEST (h5diff_629 2 file1.h6 file2.h6) - -# ############################################################################## -# # NaN -# ############################################################################## -# 6.30: test (NaN == NaN) must be true based on our documentation -- XCAO -ADD_H5_TEST (h5diff_630 0 -v -d "0.0001" ${FILE1} ${FILE1} g1/fp18 g1/fp18_COPY) -ADD_H5_TEST (h5diff_631 0 -v --use-system-epsilon ${FILE1} ${FILE1} g1/fp18 g1/fp18_COPY) - -# ############################################################################## -# 7. attributes -# ############################################################################## -ADD_H5_TEST (h5diff_70 1 -v ${FILE5} ${FILE6}) - -# ################################################## -# attrs with verbose option level -# ################################################## -ADD_H5_TEST (h5diff_700 1 -v1 ${FILE5} ${FILE6}) -ADD_H5_TEST (h5diff_701 1 -v2 ${FILE5} ${FILE6}) -ADD_H5_TEST (h5diff_702 1 --verbose=1 ${FILE5} ${FILE6}) -ADD_H5_TEST (h5diff_703 1 --verbose=2 ${FILE5} ${FILE6}) - -# same attr number , all same attr name -ADD_H5_TEST (h5diff_704 1 -v2 ${ATTR_VERBOSE_LEVEL_FILE1} ${ATTR_VERBOSE_LEVEL_FILE2} /g) - -# same attr number , some same attr name -ADD_H5_TEST (h5diff_705 1 -v2 ${ATTR_VERBOSE_LEVEL_FILE1} ${ATTR_VERBOSE_LEVEL_FILE2} /dset) - -# same attr number , all different attr name -ADD_H5_TEST (h5diff_706 1 -v2 ${ATTR_VERBOSE_LEVEL_FILE1} ${ATTR_VERBOSE_LEVEL_FILE2} /ntype) - -# different attr number , same attr name (intersected) -ADD_H5_TEST (h5diff_707 1 -v2 ${ATTR_VERBOSE_LEVEL_FILE1} ${ATTR_VERBOSE_LEVEL_FILE2} /g2) - -# different attr number , all different attr name -ADD_H5_TEST (h5diff_708 1 -v2 ${ATTR_VERBOSE_LEVEL_FILE1} ${ATTR_VERBOSE_LEVEL_FILE2} /g3) - -# when no attributes exist in both objects -ADD_H5_TEST (h5diff_709 0 -v2 ${ATTR_VERBOSE_LEVEL_FILE1} ${ATTR_VERBOSE_LEVEL_FILE2} /g4) - -# file vs file -ADD_H5_TEST (h5diff_710 1 -v2 ${ATTR_VERBOSE_LEVEL_FILE1} ${ATTR_VERBOSE_LEVEL_FILE2}) - -# ############################################################################## -# 8. all dataset datatypes -# ############################################################################## -ADD_H5_TEST (h5diff_80 1 -v ${FILE7} ${FILE8}) - -# 9. compare a file with itself -ADD_H5_TEST (h5diff_90 0 -v ${FILE2} ${FILE2}) - -# 10. read by hyperslab, print indexes -#if test -n "$pmode" -a "$mydomainname" = hdfgroup.uiuc.edu; then -# # skip this test which sometimes hangs in some THG machines -# MESSAGE (STATUS "SKIP -v ${FILE9} ${FILE10}) -#else -# ADD_H5_TEST (h5diff_100 1 -v ${FILE9} ${FILE10}) -#fi - -# 11. floating point comparison -ADD_H5_TEST (h5diff_101 1 -v ${FILE1} ${FILE1} g1/d1 g1/d2) - -ADD_H5_TEST (h5diff_102 1 -v ${FILE1} ${FILE1} g1/fp1 g1/fp2) - -# with --use-system-epsilon for double value. expect less differences -ADD_H5_TEST (h5diff_103 1 -v --use-system-epsilon ${FILE1} ${FILE1} g1/d1 -g1/d2) - -# with --use-system-epsilon for float value. expect less differences -ADD_H5_TEST (h5diff_104 1 -v --use-system-epsilon ${FILE1} ${FILE1} g1/fp1 -g1/fp2) - -# not comparable -c flag -ADD_H5_TEST (h5diff_200 0 ${FILE2} ${FILE2} g2/dset1 g2/dset2) - -ADD_H5_TEST (h5diff_201 0 -c ${FILE2} ${FILE2} g2/dset1 g2/dset2) - -ADD_H5_TEST (h5diff_202 0 -c ${FILE2} ${FILE2} g2/dset2 g2/dset3) - -ADD_H5_TEST (h5diff_203 0 -c ${FILE2} ${FILE2} g2/dset3 g2/dset4) - -ADD_H5_TEST (h5diff_204 0 -c ${FILE2} ${FILE2} g2/dset4 g2/dset5) - -ADD_H5_TEST (h5diff_205 0 -c ${FILE2} ${FILE2} g2/dset5 g2/dset6) - -# not comparable in compound -ADD_H5_TEST (h5diff_206 0 -c ${FILE2} ${FILE2} g2/dset7 g2/dset8) - -ADD_H5_TEST (h5diff_207 0 -c ${FILE2} ${FILE2} g2/dset8 g2/dset9) - -# not comparable in dataspace of zero dimension size -ADD_H5_TEST (h5diff_208 0 -c ${FILE19} ${FILE20}) - -# non-comparable dataset with comparable attribute, and other comparable datasets. -# All the rest comparables should display differences. -ADD_H5_TEST (h5diff_220 1 -c non_comparables1.h5 non_comparables2.h5 /g1) - -# comparable dataset with non-comparable attribute and other comparable attributes. -# Also test non-compatible attributes with different type, dimention, rank. -# All the rest comparables should display differences. -ADD_H5_TEST (h5diff_221 1 -c non_comparables1.h5 non_comparables2.h5 /g2) - -# entire file -# All the rest comparables should display differences -ADD_H5_TEST (h5diff_222 1 -c non_comparables1.h5 non_comparables2.h5) - -# non-comparable test for common objects (same name) with different object types -# (HDFFV-7644) -ADD_H5_TEST (h5diff_223 0 -c non_comparables1.h5 non_comparables2.h5 /diffobjtypes) -# swap files -ADD_H5_TEST (h5diff_224 0 -c non_comparables2.h5 non_comparables1.h5 /diffobjtypes) - -# ############################################################################## -# # Links compare without --follow-symlinks nor --no-dangling-links -# ############################################################################## -# test for bug1749 -ADD_H5_TEST (h5diff_300 1 -v ${FILE12} ${FILE12} /link_g1 /link_g2) - -# ############################################################################## -# # Links compare with --follow-symlinks Only -# ############################################################################## -# soft links file to file -ADD_H5_TEST (h5diff_400 0 --follow-symlinks -v ${FILE13} ${FILE13}) - -# softlink vs dset" -ADD_H5_TEST (h5diff_401 1 --follow-symlinks -v ${FILE13} ${FILE13} /softlink_dset1_1 /target_dset2) - -# dset vs softlink" -ADD_H5_TEST (h5diff_402 1 --follow-symlinks -v ${FILE13} ${FILE13} /target_dset2 /softlink_dset1_1) - -# softlink vs softlink" -ADD_H5_TEST (h5diff_403 1 --follow-symlinks -v ${FILE13} ${FILE13} /softlink_dset1_1 /softlink_dset2) - -# extlink vs extlink (FILE)" -ADD_H5_TEST (h5diff_404 0 --follow-symlinks -v ${FILE15} ${FILE15}) - -# extlink vs dset" -ADD_H5_TEST (h5diff_405 1 --follow-symlinks -v ${FILE15} ${FILE16} /ext_link_dset1 /target_group2/x_dset) - -# dset vs extlink" -ADD_H5_TEST (h5diff_406 1 --follow-symlinks -v ${FILE16} ${FILE15} /target_group2/x_dset /ext_link_dset1) - -# extlink vs extlink" -ADD_H5_TEST (h5diff_407 1 --follow-symlinks -v ${FILE15} ${FILE15} /ext_link_dset1 /ext_link_dset2) - -# softlink vs extlink" -ADD_H5_TEST (h5diff_408 1 --follow-symlinks -v ${FILE13} ${FILE15} /softlink_dset1_1 /ext_link_dset2) - -# extlink vs softlink " -ADD_H5_TEST (h5diff_409 1 --follow-symlinks -v ${FILE15} ${FILE13} /ext_link_dset2 /softlink_dset1_1) - -# linked_softlink vs linked_softlink (FILE)" -ADD_H5_TEST (h5diff_410 0 --follow-symlinks -v ${FILE14} ${FILE14}) - -# dset2 vs linked_softlink_dset1" -ADD_H5_TEST (h5diff_411 1 --follow-symlinks -v ${FILE14} ${FILE14} /target_dset2 /softlink1_to_slink2) - -# linked_softlink_dset1 vs dset2" -ADD_H5_TEST (h5diff_412 1 --follow-symlinks -v ${FILE14} ${FILE14} /softlink1_to_slink2 /target_dset2) - -# linked_softlink_to_dset1 vs linked_softlink_to_dset2" -ADD_H5_TEST (h5diff_413 1 --follow-symlinks -v ${FILE14} ${FILE14} /softlink1_to_slink2 /softlink2_to_slink2) - -# group vs linked_softlink_group1" -ADD_H5_TEST (h5diff_414 1 --follow-symlinks -v ${FILE14} ${FILE14} /target_group /softlink3_to_slink2) - -# linked_softlink_group1 vs group" -ADD_H5_TEST (h5diff_415 1 --follow-symlinks -v ${FILE14} ${FILE14} /softlink3_to_slink2 /target_group) - -# linked_softlink_to_group1 vs linked_softlink_to_group2" -ADD_H5_TEST (h5diff_416 0 --follow-symlinks -v ${FILE14} ${FILE14} /softlink3_to_slink2 /softlink4_to_slink2) - -# non-exist-softlink vs softlink" -ADD_H5_TEST (h5diff_417 1 --follow-symlinks -v ${FILE13} ${FILE13} /softlink_noexist /softlink_dset2) - -# softlink vs non-exist-softlink" -ADD_H5_TEST (h5diff_418 1 --follow-symlinks -v ${FILE13} ${FILE13} /softlink_dset2 /softlink_noexist) - -# non-exist-extlink_file vs extlink" -ADD_H5_TEST (h5diff_419 1 --follow-symlinks -v ${FILE15} ${FILE15} /ext_link_noexist2 /ext_link_dset2) - -# exlink vs non-exist-extlink_file" -ADD_H5_TEST (h5diff_420 1 --follow-symlinks -v ${FILE15} ${FILE15} /ext_link_dset2 /ext_link_noexist2) - -# extlink vs non-exist-extlink_obj" -ADD_H5_TEST (h5diff_421 1 --follow-symlinks -v ${FILE15} ${FILE15} /ext_link_dset2 /ext_link_noexist1) - -# non-exist-extlink_obj vs extlink" -ADD_H5_TEST (h5diff_422 1 --follow-symlinks -v ${FILE15} ${FILE15} /ext_link_noexist1 /ext_link_dset2) - -# extlink_to_softlink_to_dset1 vs dset2" -ADD_H5_TEST (h5diff_423 1 --follow-symlinks -v ${FILE17} ${FILE18} /ext_link_to_slink1 /dset2) - -# dset2 vs extlink_to_softlink_to_dset1" -ADD_H5_TEST (h5diff_424 1 --follow-symlinks -v ${FILE18} ${FILE17} /dset2 /ext_link_to_slink1) - -# extlink_to_softlink_to_dset1 vs extlink_to_softlink_to_dset2" -ADD_H5_TEST (h5diff_425 1 --follow-symlinks -v ${FILE17} ${FILE17} /ext_link_to_slink1 /ext_link_to_slink2) - -# ############################################################################## -# # Dangling links compare (--follow-symlinks and --no-dangling-links) -# ############################################################################## -# dangling links --follow-symlinks (FILE to FILE) -ADD_H5_TEST (h5diff_450 1 --follow-symlinks -v ${DANGLE_LINK_FILE1} ${DANGLE_LINK_FILE2}) - -# dangling links --follow-symlinks and --no-dangling-links (FILE to FILE) -ADD_H5_TEST (h5diff_451 2 --follow-symlinks -v --no-dangling-links ${DANGLE_LINK_FILE1} ${DANGLE_LINK_FILE2}) - -# try --no-dangling-links without --follow-symlinks options -ADD_H5_TEST (h5diff_452 2 --no-dangling-links ${FILE13} ${FILE13}) - -# dangling link found for soft links (FILE to FILE) -ADD_H5_TEST (h5diff_453 2 --follow-symlinks -v --no-dangling-links ${FILE13} ${FILE13}) - -# dangling link found for soft links (obj to obj) -ADD_H5_TEST (h5diff_454 2 --follow-symlinks -v --no-dangling-links ${FILE13} ${FILE13} /softlink_dset2 /softlink_noexist) - -# dangling link found for soft links (obj to obj) Both dangle links -ADD_H5_TEST (h5diff_455 2 --follow-symlinks -v --no-dangling-links ${FILE13} ${FILE13} /softlink_noexist /softlink_noexist) - -# dangling link found for ext links (FILE to FILE) -ADD_H5_TEST (h5diff_456 2 --follow-symlinks -v --no-dangling-links ${FILE15} ${FILE15}) - -# dangling link found for ext links (obj to obj). target file exist -ADD_H5_TEST (h5diff_457 2 --follow-symlinks -v --no-dangling-links ${FILE15} ${FILE15} /ext_link_dset1 /ext_link_noexist1) - -# dangling link found for ext links (obj to obj). target file NOT exist -ADD_H5_TEST (h5diff_458 2 --follow-symlinks -v --no-dangling-links ${FILE15} ${FILE15} /ext_link_dset1 /ext_link_noexist2) - -# dangling link found for ext links (obj to obj). Both dangle links -ADD_H5_TEST (h5diff_459 2 --follow-symlinks -v --no-dangling-links ${FILE15} ${FILE15} /ext_link_noexist1 /ext_link_noexist2) - -# dangling link --follow-symlinks (obj vs obj) -# (HDFFV-7836) -ADD_H5_TEST (h5diff_465 0 --follow-symlinks h5diff_danglelinks1.h5 h5diff_danglelinks2.h5 /soft_link1) -# (HDFFV-7835) -# soft dangling vs. soft dangling -ADD_H5_TEST (h5diff_466 0 -v --follow-symlinks h5diff_danglelinks1.h5 h5diff_danglelinks2.h5 /soft_link1) -# soft link vs. soft dangling -ADD_H5_TEST (h5diff_467 1 -v --follow-symlinks h5diff_danglelinks1.h5 h5diff_danglelinks2.h5 /soft_link2) -# ext dangling vs. ext dangling -ADD_H5_TEST (h5diff_468 0 -v --follow-symlinks h5diff_danglelinks1.h5 h5diff_danglelinks2.h5 /ext_link4) -# ext link vs. ext dangling -ADD_H5_TEST (h5diff_469 1 -v --follow-symlinks h5diff_danglelinks1.h5 h5diff_danglelinks2.h5 /ext_link2) - -#--------------------------------------------------- -# dangling links without follow symlink -# (HDFFV-7998) -# test - soft dangle links (same and different paths), -# - external dangle links (same and different paths) -ADD_H5_TEST (h5diff_471 1 -v h5diff_danglelinks1.h5 h5diff_danglelinks2.h5) -ADD_H5_TEST (h5diff_472 0 -v h5diff_danglelinks1.h5 h5diff_danglelinks2.h5 /soft_link1) -ADD_H5_TEST (h5diff_473 1 -v h5diff_danglelinks1.h5 h5diff_danglelinks2.h5 /soft_link4) -ADD_H5_TEST (h5diff_474 0 -v h5diff_danglelinks1.h5 h5diff_danglelinks2.h5 /ext_link4) -ADD_H5_TEST (h5diff_475 1 -v h5diff_danglelinks1.h5 h5diff_danglelinks2.h5 /ext_link1) - - -# ############################################################################## -# # test for group diff recursivly -# ############################################################################## -# root -ADD_H5_TEST (h5diff_500 1 -v ${GRP_RECURSE_FILE1} ${GRP_RECURSE_FILE2} / /) -ADD_H5_TEST (h5diff_501 1 -v --follow-symlinks ${GRP_RECURSE_FILE1} ${GRP_RECURSE_FILE2} / /) - -# root vs group -ADD_H5_TEST (h5diff_502 1 -v ${GRP_RECURSE_FILE1} ${GRP_RECURSE_FILE2} / /grp1/grp2/grp3) - -# group vs group (same name and structure) -ADD_H5_TEST (h5diff_503 0 -v ${GRP_RECURSE_FILE1} ${GRP_RECURSE_FILE2} /grp1 /grp1) - -# group vs group (different name and structure) -ADD_H5_TEST (h5diff_504 1 -v ${GRP_RECURSE_FILE1} ${GRP_RECURSE_FILE2} /grp1/grp2 /grp1/grp2/grp3) - -# groups vs soft-link -ADD_H5_TEST (h5diff_505 0 -v ${GRP_RECURSE_FILE1} ${GRP_RECURSE_FILE2} /grp1 /slink_grp1) -ADD_H5_TEST (h5diff_506 0 -v --follow-symlinks ${GRP_RECURSE_FILE1} ${GRP_RECURSE_FILE2} /grp1/grp2 /slink_grp2) - -# groups vs ext-link -ADD_H5_TEST (h5diff_507 0 -v ${GRP_RECURSE_FILE1} ${GRP_RECURSE_FILE2} /grp1 /elink_grp1) -ADD_H5_TEST (h5diff_508 0 -v --follow-symlinks ${GRP_RECURSE_FILE1} ${GRP_RECURSE_FILE2} /grp1 /elink_grp1) - -# soft-link vs ext-link -ADD_H5_TEST (h5diff_509 0 -v ${GRP_RECURSE_FILE1} ${GRP_RECURSE_FILE2} /slink_grp1 /elink_grp1) -ADD_H5_TEST (h5diff_510 0 -v --follow-symlinks ${GRP_RECURSE_FILE1} ${GRP_RECURSE_FILE2} /slink_grp1 /elink_grp1) - -# circled ext links -ADD_H5_TEST (h5diff_511 1 -v ${GRP_RECURSE_FILE1} ${GRP_RECURSE_FILE2} /grp10 /grp11) -ADD_H5_TEST (h5diff_512 1 -v --follow-symlinks ${GRP_RECURSE_FILE1} ${GRP_RECURSE_FILE2} /grp10 /grp11) - -# circled soft2ext-link vs soft2ext-link -ADD_H5_TEST (h5diff_513 1 -v ${GRP_RECURSE_FILE1} ${GRP_RECURSE_FILE2} /slink_grp10 /slink_grp11) -ADD_H5_TEST (h5diff_514 1 -v --follow-symlinks ${GRP_RECURSE_FILE1} ${GRP_RECURSE_FILE2} /slink_grp10 /slink_grp11) - -############################################################################### -# Test for group recursive diff via multi-linked external links -# With follow-symlinks, file $GRP_RECURSE1_EXT and $GRP_RECURSE2_EXT1 should -# be same with the external links. -############################################################################### -# file vs file -ADD_H5_TEST (h5diff_515 1 -v ${GRP_RECURSE1_EXT} ${GRP_RECURSE2_EXT1}) -ADD_H5_TEST (h5diff_516 0 -v --follow-symlinks ${GRP_RECURSE1_EXT} ${GRP_RECURSE2_EXT1}) -# group vs group -ADD_H5_TEST (h5diff_517 1 -v ${GRP_RECURSE1_EXT} ${GRP_RECURSE2_EXT1} /g1) -ADD_H5_TEST (h5diff_518 0 -v --follow-symlinks ${GRP_RECURSE1_EXT} ${GRP_RECURSE2_EXT1} /g1) - -# ############################################################################## -# # Exclude path (--exclude-path) -# ############################################################################## -# -# Same structure, same names and different value. -# -# Exclude the object with different value. Expect return - same -ADD_H5_TEST (h5diff_480 0 -v --exclude-path /group1/dset3 ${EXCLUDE_FILE1_1} ${EXCLUDE_FILE1_2}) -# Verify different by not excluding. Expect return - diff -ADD_H5_TEST (h5diff_481 1 -v ${EXCLUDE_FILE1_1} ${EXCLUDE_FILE1_2}) - -# -# Different structure, different names. -# -# Exclude all the different objects. Expect return - same -ADD_H5_TEST (h5diff_482 0 -v --exclude-path "/group1" --exclude-path "/dset1" ${EXCLUDE_FILE2_1} ${EXCLUDE_FILE2_2}) -# Exclude only some different objects. Expect return - diff -ADD_H5_TEST (h5diff_483 1 -v --exclude-path "/group1" ${EXCLUDE_FILE2_1} ${EXCLUDE_FILE2_2}) - -# Exclude from group compare -ADD_H5_TEST (h5diff_484 0 -v --exclude-path "/dset3" ${EXCLUDE_FILE1_1} ${EXCLUDE_FILE1_2} /group1) - -# -# Only one file contains unique objs. Common objs are same. -# (HDFFV-7837) -# -ADD_H5_TEST (h5diff_485 0 -v --exclude-path "/group1" h5diff_exclude3-1.h5 h5diff_exclude3-2.h5) -ADD_H5_TEST (h5diff_486 0 -v --exclude-path "/group1" h5diff_exclude3-2.h5 h5diff_exclude3-1.h5) -ADD_H5_TEST (h5diff_487 1 -v --exclude-path "/group1/dset" h5diff_exclude3-1.h5 h5diff_exclude3-2.h5) - - - -# ############################################################################## -# # diff various multiple vlen and fixed strings in a compound type dataset -# ############################################################################## -ADD_H5_TEST (h5diff_530 0 -v ${COMP_VL_STRS_FILE} ${COMP_VL_STRS_FILE} /group /group_copy) - -# ############################################################################## -# # Test container types (array,vlen) with multiple nested compound types -# # Complex compound types in dataset and attribute -# ############################################################################## -ADD_H5_TEST (h5diff_540 1 -v ${COMPS_ARRAY_VLEN_FILE1} ${COMPS_ARRAY_VLEN_FILE2}) -# ############################################################################## -# # Test mutually exclusive options -# ############################################################################## -# -# Test with -d , -p and --use-system-epsilon. -ADD_H5_TEST (h5diff_640 1 -v -d 5 -p 0.05 --use-system-epsilon ${FILE1} ${FILE2} /g1/dset3 /g1/dset4) -ADD_H5_TEST (h5diff_641 1 -v -d 5 -p 0.05 ${FILE1} ${FILE2} /g1/dset3 /g1/dset4) -ADD_H5_TEST (h5diff_642 1 -v -p 0.05 -d 5 ${FILE1} ${FILE2} /g1/dset3 /g1/dset4) -ADD_H5_TEST (h5diff_643 1 -v -d 5 --use-system-epsilon ${FILE1} ${FILE2} /g1/dset3 /g1/dset4) -ADD_H5_TEST (h5diff_644 1 -v --use-system-epsilon -d 5 ${FILE1} ${FILE2} /g1/dset3 /g1/dset4) -ADD_H5_TEST (h5diff_645 1 -v -p 0.05 --use-system-epsilon ${FILE1} ${FILE2} /g1/dset3 /g1/dset4) -ADD_H5_TEST (h5diff_646 1 -v --use-system-epsilon -p 0.05 ${FILE1} ${FILE2} /g1/dset3 /g1/dset4) + INCLUDE (CMakeTests.cmake) ENDIF (BUILD_TESTING) diff --git a/tools/h5diff/CMakeTests.cmake b/tools/h5diff/CMakeTests.cmake new file mode 100644 index 0000000..cac4f84 --- /dev/null +++ b/tools/h5diff/CMakeTests.cmake @@ -0,0 +1,1382 @@ + +############################################################################## +############################################################################## +### T E S T I N G ### +############################################################################## +############################################################################## + + # -------------------------------------------------------------------- + # Copy all the HDF5 files from the test directory into the source directory + # -------------------------------------------------------------------- + SET (LIST_HDF5_TEST_FILES + ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_basic1.h5 + ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_basic2.h5 + ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_types.h5 + ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_dtypes.h5 + ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_attr1.h5 + ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_attr2.h5 + ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_dset1.h5 + ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_dset2.h5 + ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_hyper1.h5 + ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_hyper2.h5 + ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_empty.h5 + ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_links.h5 + ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_softlinks.h5 + ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_linked_softlink.h5 + ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_extlink_src.h5 + ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_extlink_trg.h5 + ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_ext2softlink_src.h5 + ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_ext2softlink_trg.h5 + ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_dset_zero_dim_size1.h5 + ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_dset_zero_dim_size2.h5 + ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_danglelinks1.h5 + ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_danglelinks2.h5 + ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_grp_recurse1.h5 + ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_grp_recurse2.h5 + ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_grp_recurse_ext1.h5 + ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_grp_recurse_ext2-1.h5 + ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_grp_recurse_ext2-2.h5 + ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_grp_recurse_ext2-3.h5 + ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_exclude1-1.h5 + ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_exclude1-2.h5 + ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_exclude2-1.h5 + ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_exclude2-2.h5 + ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_exclude3-1.h5 + ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_exclude3-2.h5 + ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_comp_vl_strs.h5 + ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_attr_v_level1.h5 + ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_attr_v_level2.h5 + ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/compounds_array_vlen1.h5 + ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/compounds_array_vlen2.h5 + ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/non_comparables1.h5 + ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/non_comparables2.h5 + ) + + SET (LIST_OTHER_TEST_FILES + ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_10.txt + ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_100.txt + ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_101.txt + ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_102.txt + ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_103.txt + ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_104.txt + ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_11.txt + ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_12.txt + ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_13.txt + ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_14.txt + ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_15.txt + ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_16_1.txt + ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_16_2.txt + ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_16_3.txt + ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_17.txt + ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_171.txt + ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_172.txt + ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_18_1.txt + ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_18.txt + ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_20.txt + ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_200.txt + ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_201.txt + ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_202.txt + ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_203.txt + ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_204.txt + ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_205.txt + ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_206.txt + ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_207.txt + ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_208.txt + ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_220.txt + ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_221.txt + ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_222.txt + ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_223.txt + ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_224.txt + ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_21.txt + ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_22.txt + ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_23.txt + ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_24.txt + ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_25.txt + ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_26.txt + ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_27.txt + ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_28.txt + ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_300.txt + ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_400.txt + ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_401.txt + ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_402.txt + ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_403.txt + ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_404.txt + ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_405.txt + ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_406.txt + ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_407.txt + ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_408.txt + ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_409.txt + ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_410.txt + ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_411.txt + ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_412.txt + ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_413.txt + ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_414.txt + ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_415.txt + ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_416.txt + ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_417.txt + ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_418.txt + ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_419.txt + ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_420.txt + ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_421.txt + ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_422.txt + ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_423.txt + ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_424.txt + ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_425.txt + ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_450.txt + ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_451.txt + ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_452.txt + ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_453.txt + ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_454.txt + ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_455.txt + ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_456.txt + ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_457.txt + ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_458.txt + ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_459.txt + ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_465.txt + ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_466.txt + ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_467.txt + ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_468.txt + ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_469.txt + ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_471.txt + ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_472.txt + ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_473.txt + ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_474.txt + ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_475.txt + ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_480.txt + ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_481.txt + ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_482.txt + ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_483.txt + ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_484.txt + ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_485.txt + ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_486.txt + ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_487.txt + ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_50.txt + ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_51.txt + ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_52.txt + ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_53.txt + ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_54.txt + ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_55.txt + ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_56.txt + ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_57.txt + ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_58.txt + ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_59.txt + ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_500.txt + ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_501.txt + ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_502.txt + ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_503.txt + ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_504.txt + ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_505.txt + ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_506.txt + ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_507.txt + ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_508.txt + ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_509.txt + ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_510.txt + ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_511.txt + ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_512.txt + ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_513.txt + ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_514.txt + ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_515.txt + ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_516.txt + ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_517.txt + ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_518.txt + ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_530.txt + ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_540.txt + ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_600.txt + ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_601.txt + ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_603.txt + ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_604.txt + ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_605.txt + ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_606.txt + ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_607.txt + ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_608.txt + ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_609.txt + ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_610.txt + ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_612.txt + ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_613.txt + ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_614.txt + ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_615.txt + ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_616.txt + ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_617.txt + ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_618.txt + ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_619.txt + ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_621.txt + ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_622.txt + ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_623.txt + ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_624.txt + ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_625.txt + ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_626.txt + ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_627.txt + ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_628.txt + ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_629.txt + ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_630.txt + ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_631.txt + ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_640.txt + ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_641.txt + ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_642.txt + ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_643.txt + ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_644.txt + ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_645.txt + ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_646.txt + ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_70.txt + ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_700.txt + ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_701.txt + ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_702.txt + ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_703.txt + ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_704.txt + ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_705.txt + ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_706.txt + ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_707.txt + ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_708.txt + ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_709.txt + ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_710.txt + ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_80.txt + ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_90.txt + ) + + # Make testfiles dir under build dir + FILE (MAKE_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles") + + # + # copy test files from source to build dir + # + FOREACH (h5_tstfiles ${LIST_HDF5_TEST_FILES} ${LIST_OTHER_TEST_FILES}) + GET_FILENAME_COMPONENT(fname "${h5_tstfiles}" NAME) + SET (dest "${PROJECT_BINARY_DIR}/testfiles/${fname}") + #MESSAGE (STATUS " Copying ${fname}") + ADD_CUSTOM_COMMAND ( + TARGET h5diff + POST_BUILD + COMMAND ${CMAKE_COMMAND} + ARGS -E copy_if_different ${h5_tstfiles} ${dest} + ) + ENDFOREACH (h5_tstfiles ${LIST_HDF5_TEST_FILES} ${LIST_OTHER_TEST_FILES}) + + + # + # Overwrite system dependent files (Windows) + # + IF (WIN32 AND NOT CYGWIN) + ADD_CUSTOM_COMMAND ( + TARGET h5diff + POST_BUILD + COMMAND ${CMAKE_COMMAND} + ARGS -E copy_if_different ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_101w.txt ${PROJECT_BINARY_DIR}/testfiles/h5diff_101.txt + ) + + ADD_CUSTOM_COMMAND ( + TARGET h5diff + POST_BUILD + COMMAND ${CMAKE_COMMAND} + ARGS -E copy_if_different ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_102w.txt ${PROJECT_BINARY_DIR}/testfiles/h5diff_102.txt + ) + ADD_CUSTOM_COMMAND ( + TARGET h5diff + POST_BUILD + COMMAND ${CMAKE_COMMAND} + ARGS -E copy_if_different ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_103w.txt ${PROJECT_BINARY_DIR}/testfiles/h5diff_103.txt + ) + + ADD_CUSTOM_COMMAND ( + TARGET h5diff + POST_BUILD + COMMAND ${CMAKE_COMMAND} + ARGS -E copy_if_different ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_104w.txt ${PROJECT_BINARY_DIR}/testfiles/h5diff_104.txt + ) + ENDIF (WIN32 AND NOT CYGWIN) + +############################################################################## +############################################################################## +### T H E T E S T S M A C R O S ### +############################################################################## +############################################################################## + + MACRO (ADD_H5_TEST resultfile resultcode) + # If using memchecker add tests without using scripts + IF (HDF5_ENABLE_USING_MEMCHECKER) + ADD_TEST (NAME H5DIFF-${resultfile} COMMAND $ ${ARGN}) + SET_TESTS_PROPERTIES (H5DIFF-${resultfile} PROPERTIES WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles") + IF (NOT ${resultcode} STREQUAL "0") + SET_TESTS_PROPERTIES (H5DIFF-${resultfile} PROPERTIES WILL_FAIL "true") + ENDIF (NOT ${resultcode} STREQUAL "0") + IF (NOT "${last_test}" STREQUAL "") + SET_TESTS_PROPERTIES (H5DIFF-${resultfile} PROPERTIES DEPENDS ${last_test}) + ENDIF (NOT "${last_test}" STREQUAL "") + ELSE (HDF5_ENABLE_USING_MEMCHECKER) + ADD_TEST ( + NAME H5DIFF-${resultfile}-clear-objects + COMMAND ${CMAKE_COMMAND} + -E remove ./testfiles/${resultfile}.out ./testfiles/${resultfile}.out.err + ) + ADD_TEST ( + NAME H5DIFF-${resultfile} + COMMAND "${CMAKE_COMMAND}" + -D "TEST_PROGRAM=$" + -D "TEST_ARGS:STRING=${ARGN}" + -D "TEST_FOLDER=${PROJECT_BINARY_DIR}/testfiles" + -D "TEST_OUTPUT=${resultfile}.out" + -D "TEST_EXPECT=${resultcode}" + -D "TEST_REFERENCE=${resultfile}.txt" + -D "TEST_APPEND=EXIT CODE:" + -P "${HDF5_RESOURCES_DIR}/runTest.cmake" + ) + SET_TESTS_PROPERTIES (H5DIFF-${resultfile} PROPERTIES DEPENDS "H5DIFF-${resultfile}-clear-objects") + ENDIF (HDF5_ENABLE_USING_MEMCHECKER) + IF (H5_HAVE_PARALLEL) + ADD_PH5_TEST (${resultfile} ${resultcode} ${ARGN}) + ENDIF (H5_HAVE_PARALLEL) + ENDMACRO (ADD_H5_TEST file) + + MACRO (ADD_PH5_TEST resultfile resultcode) + # If using memchecker add tests without using scripts + IF (HDF5_ENABLE_USING_MEMCHECKER) + ADD_TEST (NAME PH5DIFF-${resultfile} COMMAND $ ${MPIEXEC} ${MPIEXEC_PREFLAGS} ${MPIEXEC_NUMPROC_FLAG} ${MPIEXEC_MAX_NUMPROCS} ${MPIEXEC_POSTFLAGS} ${ARGN}) + SET_TESTS_PROPERTIES (PH5DIFF-${resultfile} PROPERTIES WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles") + IF (NOT ${resultcode} STREQUAL "0") + SET_TESTS_PROPERTIES (PH5DIFF-${resultfile} PROPERTIES WILL_FAIL "true") + ENDIF (NOT ${resultcode} STREQUAL "0") + IF (NOT "${last_test}" STREQUAL "") + SET_TESTS_PROPERTIES (PH5DIFF-${resultfile} PROPERTIES DEPENDS ${last_test}) + ENDIF (NOT "${last_test}" STREQUAL "") + ELSE (HDF5_ENABLE_USING_MEMCHECKER) + ADD_TEST ( + NAME PH5DIFF-${resultfile}-clear-objects + COMMAND ${CMAKE_COMMAND} + -E remove ./testfiles/${resultfile}_p.out ./testfiles/${resultfile}_p.out.err + ) + ADD_TEST ( + NAME PH5DIFF-${resultfile} + COMMAND "${CMAKE_COMMAND}" + -D "TEST_PROGRAM=${MPIEXEC};${MPIEXEC_PREFLAGS};${MPIEXEC_NUMPROC_FLAG};${MPIEXEC_MAX_NUMPROCS};${MPIEXEC_POSTFLAGS};$" + -D "TEST_ARGS:STRING=${ARGN}" + -D "TEST_FOLDER=${PROJECT_BINARY_DIR}/testfiles" + -D "TEST_OUTPUT=P_${resultfile}.out" + -D "TEST_EXPECT=${resultcode}" + -D "TEST_REFERENCE=${resultfile}.txt" +# -D "TEST_APPEND=EXIT CODE: [0-9]" +# -D "TEST_REF_FILTER=EXIT CODE: 0" + -D "TEST_SKIP_COMPARE=TRUE" + -P "${HDF5_RESOURCES_DIR}/prunTest.cmake" + ) + SET_TESTS_PROPERTIES (PH5DIFF-${resultfile} PROPERTIES DEPENDS "PH5DIFF-${resultfile}-clear-objects") + ENDIF (HDF5_ENABLE_USING_MEMCHECKER) + ENDMACRO (ADD_PH5_TEST file) + + # ADD_H5_NO_OUTPUT_TEST + # Purpose to verify only exitcode without output comparison + # Don't use this if possible; this may be removed. + MACRO (ADD_H5_NO_OUTPUT_TEST testname resultcode) + # If using memchecker add tests without using scripts + IF (NOT HDF5_ENABLE_USING_MEMCHECKER) + ADD_TEST ( + NAME H5DIFF-${testname}-clear-objects + COMMAND ${CMAKE_COMMAND} + -E remove ./testfiles/${testname}.out ./testfiles/${testname}.out.err + ) + # if there was a previous test + IF (NOT "${last_test}" STREQUAL "") + SET_TESTS_PROPERTIES (H5DIFF-${testname}-clear-objects PROPERTIES DEPENDS ${last_test}) + ENDIF (NOT "${last_test}" STREQUAL "") + ENDIF (NOT HDF5_ENABLE_USING_MEMCHECKER) + + ADD_TEST (NAME H5DIFF-${testname} COMMAND $ ${ARGN}) + IF (NOT ${resultcode} STREQUAL "0") + SET_TESTS_PROPERTIES (H5DIFF-${testname} PROPERTIES WILL_FAIL "true") + ENDIF (NOT ${resultcode} STREQUAL "0") + + IF (HDF5_ENABLE_USING_MEMCHECKER) + IF (NOT "${last_test}" STREQUAL "") + SET_TESTS_PROPERTIES (H5DIFF-${testname} PROPERTIES DEPENDS ${last_test}) + ENDIF (NOT "${last_test}" STREQUAL "") + ELSE (HDF5_ENABLE_USING_MEMCHECKER) + SET_TESTS_PROPERTIES (H5DIFF-${testname} PROPERTIES DEPENDS H5DIFF-${testname}-clear-objects) + ENDIF (HDF5_ENABLE_USING_MEMCHECKER) + ENDMACRO (ADD_H5_NO_OUTPUT_TEST) + +############################################################################## +############################################################################## +### T H E T E S T S ### +############################################################################## +############################################################################## + + # -------------------------------------------------------------------- + # test file names + # -------------------------------------------------------------------- + SET (FILE1 h5diff_basic1.h5) + SET (FILE2 h5diff_basic2.h5) + SET (FILE3 h5diff_types.h5) + SET (FILE4 h5diff_dtypes.h5) + SET (FILE5 h5diff_attr1.h5) + SET (FILE6 h5diff_attr2.h5) + SET (FILE7 h5diff_dset1.h5) + SET (FILE8 h5diff_dset2.h5) + SET (FILE9 h5diff_hyper1.h5) + SET (FILE10 h5diff_hyper2.h5) + SET (FILE11 h5diff_empty.h5) + SET (FILE12 h5diff_links.h5) + SET (FILE13 h5diff_softlinks.h5) + SET (FILE14 h5diff_linked_softlink.h5) + SET (FILE15 h5diff_extlink_src.h5) + SET (FILE16 h5diff_extlink_trg.h5) + SET (FILE17 h5diff_ext2softlink_src.h5) + SET (FILE18 h5diff_ext2softlink_trg.h5) + SET (FILE19 h5diff_dset_zero_dim_size1.h5) + SET (FILE20 h5diff_dset_zero_dim_size2.h5) + SET (DANGLE_LINK_FILE1 h5diff_danglelinks1.h5) + SET (DANGLE_LINK_FILE2 h5diff_danglelinks2.h5) + SET (GRP_RECURSE_FILE1 h5diff_grp_recurse1.h5) + SET (GRP_RECURSE_FILE2 h5diff_grp_recurse2.h5) + # group recursive - same structure via external links through files + SET (GRP_RECURSE1_EXT h5diff_grp_recurse_ext1.h5) + SET (GRP_RECURSE2_EXT1 h5diff_grp_recurse_ext2-1.h5) + SET (GRP_RECURSE2_EXT2 h5diff_grp_recurse_ext2-2.h5) + SET (GRP_RECURSE2_EXT3 h5diff_grp_recurse_ext2-3.h5) + # same structure, same obj name with different value + SET (EXCLUDE_FILE1_1 h5diff_exclude1-1.h5) + SET (EXCLUDE_FILE1_2 h5diff_exclude1-2.h5) + # different structure and obj names + SET (EXCLUDE_FILE2_1 h5diff_exclude2-1.h5) + SET (EXCLUDE_FILE2_2 h5diff_exclude2-2.h5) + # Only one file contains unique objs. Common objs are same. + SET (EXCLUDE_FILE3_1 h5diff_exclude3-1.h5) + SET (EXCLUDE_FILE3_2 h5diff_exclude3-2.h5) + # compound type with multiple vlen string types + SET (COMP_VL_STRS_FILE h5diff_comp_vl_strs.h5) + # container types (array,vlen) with multiple nested compound types + SET (COMPS_ARRAY_VLEN_FILE1 compounds_array_vlen1.h5) + SET (COMPS_ARRAY_VLEN_FILE2 compounds_array_vlen2.h5) + # attrs with verbose option level + SET (ATTR_VERBOSE_LEVEL_FILE1 h5diff_attr_v_level1.h5) + SET (ATTR_VERBOSE_LEVEL_FILE2 h5diff_attr_v_level2.h5) + + IF (HDF5_ENABLE_USING_MEMCHECKER) + # Remove any output file left over from previous test run + ADD_TEST ( + NAME H5DIFF-clearall-objects + COMMAND ${CMAKE_COMMAND} + -E remove + h5diff_10.out + h5diff_10.out.err + h5diff_100.out + h5diff_100.out.err + h5diff_101.out + h5diff_101.out.err + h5diff_102.out + h5diff_102.out.err + h5diff_103.out + h5diff_103.out.err + h5diff_104.out + h5diff_104.out.err + h5diff_11.out + h5diff_11.out.err + h5diff_12.out + h5diff_12.out.err + h5diff_13.out + h5diff_13.out.err + h5diff_14.out + h5diff_14.out.err + h5diff_15.out + h5diff_15.out.err + h5diff_16_1.out + h5diff_16_1.out.err + h5diff_16_2.out + h5diff_16_2.out.err + h5diff_16_3.out + h5diff_16_3.out.err + h5diff_17.out + h5diff_17.out.err + h5diff_171.out + h5diff_171.out.err + h5diff_172.out + h5diff_172.out.err + h5diff_18_1.out + h5diff_18_1.out.err + h5diff_18.out + h5diff_18.out.err + h5diff_20.out + h5diff_20.out.err + h5diff_200.out + h5diff_200.out.err + h5diff_201.out + h5diff_201.out.err + h5diff_202.out + h5diff_202.out.err + h5diff_203.out + h5diff_203.out.err + h5diff_204.out + h5diff_204.out.err + h5diff_205.out + h5diff_205.out.err + h5diff_206.out + h5diff_206.out.err + h5diff_207.out + h5diff_207.out.err + h5diff_208.out + h5diff_208.out.err + h5diff_220.out + h5diff_220.out.err + h5diff_221.out + h5diff_221.out.err + h5diff_222.out + h5diff_222.out.err + h5diff_223.out + h5diff_223.out.err + h5diff_224.out + h5diff_224.out.err + h5diff_21.out + h5diff_21.out.err + h5diff_22.out + h5diff_22.out.err + h5diff_23.out + h5diff_23.out.err + h5diff_24.out + h5diff_24.out.err + h5diff_25.out + h5diff_25.out.err + h5diff_26.out + h5diff_26.out.err + h5diff_27.out + h5diff_27.out.err + h5diff_28.out + h5diff_28.out.err + h5diff_300.out + h5diff_300.out.err + h5diff_400.out + h5diff_400.out.err + h5diff_401.out + h5diff_401.out.err + h5diff_402.out + h5diff_402.out.err + h5diff_403.out + h5diff_403.out.err + h5diff_404.out + h5diff_404.out.err + h5diff_405.out + h5diff_405.out.err + h5diff_406.out + h5diff_406.out.err + h5diff_407.out + h5diff_407.out.err + h5diff_408.out + h5diff_408.out.err + h5diff_409.out + h5diff_409.out.err + h5diff_410.out + h5diff_410.out.err + h5diff_411.out + h5diff_411.out.err + h5diff_412.out + h5diff_412.out.err + h5diff_413.out + h5diff_413.out.err + h5diff_414.out + h5diff_414.out.err + h5diff_415.out + h5diff_415.out.err + h5diff_416.out + h5diff_416.out.err + h5diff_417.out + h5diff_417.out.err + h5diff_418.out + h5diff_418.out.err + h5diff_419.out + h5diff_419.out.err + h5diff_420.out + h5diff_420.out.err + h5diff_421.out + h5diff_421.out.err + h5diff_422.out + h5diff_422.out.err + h5diff_423.out + h5diff_423.out.err + h5diff_424.out + h5diff_424.out.err + h5diff_425.out + h5diff_425.out.err + h5diff_450.out + h5diff_450.out.err + h5diff_451.out + h5diff_451.out.err + h5diff_452.out + h5diff_452.out.err + h5diff_453.out + h5diff_453.out.err + h5diff_454.out + h5diff_454.out.err + h5diff_455.out + h5diff_455.out.err + h5diff_456.out + h5diff_456.out.err + h5diff_457.out + h5diff_457.out.err + h5diff_458.out + h5diff_458.out.err + h5diff_459.out + h5diff_459.out.err + h5diff_465.out + h5diff_465.out.err + h5diff_466.out + h5diff_466.out.err + h5diff_467.out + h5diff_467.out.err + h5diff_468.out + h5diff_468.out.err + h5diff_469.out + h5diff_469.out.err + h5diff_471.out + h5diff_471.out.err + h5diff_472.out + h5diff_472.out.err + h5diff_473.out + h5diff_473.out.err + h5diff_474.out + h5diff_474.out.err + h5diff_475.out + h5diff_475.out.err + h5diff_480.out + h5diff_480.out.err + h5diff_481.out + h5diff_481.out.err + h5diff_482.out + h5diff_482.out.err + h5diff_483.out + h5diff_483.out.err + h5diff_484.out + h5diff_484.out.err + h5diff_50.out + h5diff_50.out.err + h5diff_51.out + h5diff_51.out.err + h5diff_52.out + h5diff_52.out.err + h5diff_53.out + h5diff_53.out.err + h5diff_54.out + h5diff_54.out.err + h5diff_55.out + h5diff_55.out.err + h5diff_56.out + h5diff_56.out.err + h5diff_57.out + h5diff_57.out.err + h5diff_58.out + h5diff_58.out.err + h5diff_59.out + h5diff_59.out.err + h5diff_500.out + h5diff_500.out.err + h5diff_501.out + h5diff_501.out.err + h5diff_502.out + h5diff_502.out.err + h5diff_503.out + h5diff_503.out.err + h5diff_504.out + h5diff_504.out.err + h5diff_505.out + h5diff_505.out.err + h5diff_506.out + h5diff_506.out.err + h5diff_507.out + h5diff_507.out.err + h5diff_508.out + h5diff_508.out.err + h5diff_509.out + h5diff_509.out.err + h5diff_510.out + h5diff_510.out.err + h5diff_511.out + h5diff_511.out.err + h5diff_512.out + h5diff_512.out.err + h5diff_513.out + h5diff_513.out.err + h5diff_514.out + h5diff_514.out.err + h5diff_515.out + h5diff_515.out.err + h5diff_516.out + h5diff_516.out.err + h5diff_517.out + h5diff_517.out.err + h5diff_518.out + h5diff_518.out.err + h5diff_530.out + h5diff_530.out.err + h5diff_540.out + h5diff_540.out.err + h5diff_600.out + h5diff_600.out.err + h5diff_601.out + h5diff_601.out.err + h5diff_603.out + h5diff_603.out.err + h5diff_604.out + h5diff_604.out.err + h5diff_605.out + h5diff_605.out.err + h5diff_606.out + h5diff_606.out.err + h5diff_607.out + h5diff_607.out.err + h5diff_608.out + h5diff_608.out.err + h5diff_609.out + h5diff_609.out.err + h5diff_610.out + h5diff_610.out.err + h5diff_612.out + h5diff_612.out.err + h5diff_613.out + h5diff_613.out.err + h5diff_614.out + h5diff_614.out.err + h5diff_615.out + h5diff_615.out.err + h5diff_616.out + h5diff_616.out.err + h5diff_617.out + h5diff_617.out.err + h5diff_618.out + h5diff_618.out.err + h5diff_619.out + h5diff_619.out.err + h5diff_621.out + h5diff_621.out.err + h5diff_622.out + h5diff_622.out.err + h5diff_623.out + h5diff_623.out.err + h5diff_624.out + h5diff_624.out.err + h5diff_625.out + h5diff_625.out.err + h5diff_626.out + h5diff_626.out.err + h5diff_627.out + h5diff_627.out.err + h5diff_628.out + h5diff_628.out.err + h5diff_629.out + h5diff_629.out.err + h5diff_640.out + h5diff_640.out.err + h5diff_641.out + h5diff_641.out.err + h5diff_642.out + h5diff_642.out.err + h5diff_643.out + h5diff_643.out.err + h5diff_644.out + h5diff_644.out.err + h5diff_645.out + h5diff_645.out.err + h5diff_646.out + h5diff_646.out.err + h5diff_70.out + h5diff_70.out.err + h5diff_700.out + h5diff_700.out.err + h5diff_701.out + h5diff_701.out.err + h5diff_702.out + h5diff_702.out.err + h5diff_703.out + h5diff_703.out.err + h5diff_704.out + h5diff_704.out.err + h5diff_705.out + h5diff_705.out.err + h5diff_706.out + h5diff_706.out.err + h5diff_707.out + h5diff_707.out.err + h5diff_708.out + h5diff_708.out.err + h5diff_709.out + h5diff_709.out.err + h5diff_710.out + h5diff_710.out.err + h5diff_80.out + h5diff_80.out.err + h5diff_90.out + h5diff_90.out.err + ) + SET_TESTS_PROPERTIES (H5DIFF-clearall-objects PROPERTIES WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles") + IF (NOT "${last_test}" STREQUAL "") + SET_TESTS_PROPERTIES (H5DIFF-clearall-objects PROPERTIES DEPENDS ${last_test}) + ENDIF (NOT "${last_test}" STREQUAL "") + SET (last_test "H5DIFF-clearall-objects") + ENDIF (HDF5_ENABLE_USING_MEMCHECKER) + +# ############################################################################ +# # Common usage +# ############################################################################ + +# 1.0 +ADD_H5_TEST (h5diff_10 0 -h) + +# 1.1 normal mode +ADD_H5_TEST (h5diff_11 1 ${FILE1} ${FILE2}) + +# 1.2 normal mode with objects +ADD_H5_TEST (h5diff_12 1 ${FILE1} ${FILE2} g1/dset1 g1/dset2) + +# 1.3 report mode +ADD_H5_TEST (h5diff_13 1 -r ${FILE1} ${FILE2}) + +# 1.4 report mode with objects +ADD_H5_TEST (h5diff_14 1 -r ${FILE1} ${FILE2} g1/dset1 g1/dset2) + +# 1.5 with -d +ADD_H5_TEST (h5diff_15 1 --report --delta=5 ${FILE1} ${FILE2} g1/dset3 g1/dset4) + +# 1.6.1 with -p (int) +ADD_H5_TEST (h5diff_16_1 1 -v -p 0.02 ${FILE1} ${FILE1} g1/dset5 g1/dset6) + +# 1.6.2 with -p (unsigned long_long) +ADD_H5_TEST (h5diff_16_2 1 --verbose --relative=0.02 ${FILE1} ${FILE1} g1/dset7 g1/dset8) + +# 1.6.3 with -p (double) +ADD_H5_TEST (h5diff_16_3 1 -v -p 0.02 ${FILE1} ${FILE1} g1/dset9 g1/dset10) + +# 1.7 verbose mode +ADD_H5_TEST (h5diff_17 1 -v ${FILE1} ${FILE2}) + +# 1.7 test 32-bit INFINITY +ADD_H5_TEST (h5diff_171 0 -v ${FILE1} ${FILE1} /g1/fp19 /g1/fp19_COPY) + +# 1.7 test 64-bit INFINITY +ADD_H5_TEST (h5diff_172 0 -v ${FILE1} ${FILE1} /g1/fp20 /g1/fp20_COPY) + +# 1.8 quiet mode +ADD_H5_TEST (h5diff_18 1 -q ${FILE1} ${FILE2}) + +# 1.8 -v and -q +ADD_H5_TEST (h5diff_18_1 2 -v -q ${FILE1} ${FILE2}) + +# ############################################################################## +# # not comparable types +# ############################################################################## + +# 2.0 +ADD_H5_TEST (h5diff_20 0 -v ${FILE3} ${FILE3} dset g1) + +# 2.1 +ADD_H5_TEST (h5diff_21 0 -v ${FILE3} ${FILE3} dset l1) + +# 2.2 +ADD_H5_TEST (h5diff_22 0 -v ${FILE3} ${FILE3} dset t1) + +# ############################################################################## +# # compare groups, types, links (no differences and differences) +# ############################################################################## + +# 2.3 +ADD_H5_TEST (h5diff_23 0 -v ${FILE3} ${FILE3} g1 g1) + +# 2.4 +ADD_H5_TEST (h5diff_24 0 -v ${FILE3} ${FILE3} t1 t1) + +# 2.5 +ADD_H5_TEST (h5diff_25 0 -v ${FILE3} ${FILE3} l1 l1) + +# 2.6 +ADD_H5_TEST (h5diff_26 0 -v ${FILE3} ${FILE3} g1 g2) + +# 2.7 +ADD_H5_TEST (h5diff_27 1 -v ${FILE3} ${FILE3} t1 t2) + +# 2.8 +ADD_H5_TEST (h5diff_28 1 -v ${FILE3} ${FILE3} l1 l2) + +# ############################################################################## +# # Dataset datatypes +# ############################################################################## + +# 5.0 +ADD_H5_TEST (h5diff_50 1 -v ${FILE4} ${FILE4} dset0a dset0b) + +# 5.1 +ADD_H5_TEST (h5diff_51 1 -v ${FILE4} ${FILE4} dset1a dset1b) + +# 5.2 +ADD_H5_TEST (h5diff_52 1 -v ${FILE4} ${FILE4} dset2a dset2b) + +# 5.3 +ADD_H5_TEST (h5diff_53 1 -v ${FILE4} ${FILE4} dset3a dset4b) + +# 5.4 +ADD_H5_TEST (h5diff_54 1 -v ${FILE4} ${FILE4} dset4a dset4b) + +# 5.5 +ADD_H5_TEST (h5diff_55 1 -v ${FILE4} ${FILE4} dset5a dset5b) + +# 5.6 +ADD_H5_TEST (h5diff_56 1 -v ${FILE4} ${FILE4} dset6a dset6b) + +# 5.7 +ADD_H5_TEST (h5diff_57 0 -v ${FILE4} ${FILE4} dset7a dset7b) + +# 5.8 (region reference) +ADD_H5_TEST (h5diff_58 1 -v ${FILE7} ${FILE8} refreg) + +# test for both dset and attr with same type but with different size +# ( HDDFV-7942 ) +ADD_H5_TEST (h5diff_59 0 -v ${FILE4} ${FILE4} dset11a dset11b) + +# ############################################################################## +# # Error messages +# ############################################################################## + +# 6.0: Check if the command line number of arguments is less than 3 +ADD_H5_TEST (h5diff_600 1 ${FILE1}) + +# 6.1: Check if non-exist object name is specified +ADD_H5_TEST (h5diff_601 2 ${FILE1} ${FILE1} nono_obj) + +# ############################################################################## +# # -d +# ############################################################################## + +# 6.3: negative value +ADD_H5_TEST (h5diff_603 1 -d -4 ${FILE1} ${FILE2} g1/dset3 g1/dset4) + +# 6.4: zero +ADD_H5_TEST (h5diff_604 1 -d 0 ${FILE1} ${FILE2} g1/dset3 g1/dset4) + +# 6.5: non number +ADD_H5_TEST (h5diff_605 1 -d u ${FILE1} ${FILE2} g1/dset3 g1/dset4) + +# 6.6: hexadecimal +ADD_H5_TEST (h5diff_606 1 -d 0x1 ${FILE1} ${FILE2} g1/dset3 g1/dset4) + +# 6.7: string +ADD_H5_TEST (h5diff_607 1 -d "1" ${FILE1} ${FILE2} g1/dset3 g1/dset4) + +# 6.8: use system epsilon +ADD_H5_TEST (h5diff_608 1 --use-system-epsilon ${FILE1} ${FILE2} g1/dset3 g1/dset4) + +# 6.9: number larger than biggest difference +ADD_H5_TEST (h5diff_609 0 -d 200 ${FILE1} ${FILE2} g1/dset3 g1/dset4) + +# 6.10: number smaller than smallest difference +ADD_H5_TEST (h5diff_610 1 -d 1 ${FILE1} ${FILE2} g1/dset3 g1/dset4) + +# ############################################################################## +# # -p +# ############################################################################## + +# 6.12: negative value +ADD_H5_TEST (h5diff_612 1 -p -4 ${FILE1} ${FILE2} g1/dset3 g1/dset4) + +# 6.13: zero +ADD_H5_TEST (h5diff_613 1 -p 0 ${FILE1} ${FILE2} g1/dset3 g1/dset4) + +# 6.14: non number +ADD_H5_TEST (h5diff_614 1 -p u ${FILE1} ${FILE2} g1/dset3 g1/dset4) + +# 6.15: hexadecimal +ADD_H5_TEST (h5diff_615 1 -p 0x1 ${FILE1} ${FILE2} g1/dset3 g1/dset4) + +# 6.16: string +ADD_H5_TEST (h5diff_616 1 -p "0.21" ${FILE1} ${FILE2} g1/dset3 g1/dset4) + +# 6.17: repeated option +ADD_H5_TEST (h5diff_617 1 -p 0.21 -p 0.22 ${FILE1} ${FILE2} g1/dset3 g1/dset4) + +# 6.18: number larger than biggest difference +ADD_H5_TEST (h5diff_618 0 -p 2 ${FILE1} ${FILE2} g1/dset3 g1/dset4) + +# 6.19: number smaller than smallest difference +ADD_H5_TEST (h5diff_619 1 -p 0.005 ${FILE1} ${FILE2} g1/dset3 g1/dset4) + +# ############################################################################## +# # -n +# ############################################################################## + +# 6.21: negative value +ADD_H5_TEST (h5diff_621 1 -n -4 ${FILE1} ${FILE2} g1/dset3 g1/dset4) + +# 6.22: zero +ADD_H5_TEST (h5diff_622 1 -n 0 ${FILE1} ${FILE2} g1/dset3 g1/dset4) + +# 6.23: non number +ADD_H5_TEST (h5diff_623 1 -n u ${FILE1} ${FILE2} g1/dset3 g1/dset4) + +# 6.24: hexadecimal +ADD_H5_TEST (h5diff_624 1 -n 0x1 ${FILE1} ${FILE2} g1/dset3 g1/dset4) + +# 6.25: string +ADD_H5_TEST (h5diff_625 1 -n "2" ${FILE1} ${FILE2} g1/dset3 g1/dset4) + +# 6.26: repeated option +ADD_H5_TEST (h5diff_626 1 -n 2 -n 3 ${FILE1} ${FILE2} g1/dset3 g1/dset4) + +# 6.27: number larger than biggest difference +ADD_H5_TEST (h5diff_627 1 --count=200 ${FILE1} ${FILE2} g1/dset3 g1/dset4) + +# 6.28: number smaller than smallest difference +ADD_H5_TEST (h5diff_628 1 -n 1 ${FILE1} ${FILE2} g1/dset3 g1/dset4) + +# Disabling this test as it hangs - LRK 20090618 +# 6.29 non valid files +#ADD_H5_TEST (h5diff_629 2 file1.h6 file2.h6) + +# ############################################################################## +# # NaN +# ############################################################################## +# 6.30: test (NaN == NaN) must be true based on our documentation -- XCAO +ADD_H5_TEST (h5diff_630 0 -v -d "0.0001" ${FILE1} ${FILE1} g1/fp18 g1/fp18_COPY) +ADD_H5_TEST (h5diff_631 0 -v --use-system-epsilon ${FILE1} ${FILE1} g1/fp18 g1/fp18_COPY) + +# ############################################################################## +# 7. attributes +# ############################################################################## +ADD_H5_TEST (h5diff_70 1 -v ${FILE5} ${FILE6}) + +# ################################################## +# attrs with verbose option level +# ################################################## +ADD_H5_TEST (h5diff_700 1 -v1 ${FILE5} ${FILE6}) +ADD_H5_TEST (h5diff_701 1 -v2 ${FILE5} ${FILE6}) +ADD_H5_TEST (h5diff_702 1 --verbose=1 ${FILE5} ${FILE6}) +ADD_H5_TEST (h5diff_703 1 --verbose=2 ${FILE5} ${FILE6}) + +# same attr number , all same attr name +ADD_H5_TEST (h5diff_704 1 -v2 ${ATTR_VERBOSE_LEVEL_FILE1} ${ATTR_VERBOSE_LEVEL_FILE2} /g) + +# same attr number , some same attr name +ADD_H5_TEST (h5diff_705 1 -v2 ${ATTR_VERBOSE_LEVEL_FILE1} ${ATTR_VERBOSE_LEVEL_FILE2} /dset) + +# same attr number , all different attr name +ADD_H5_TEST (h5diff_706 1 -v2 ${ATTR_VERBOSE_LEVEL_FILE1} ${ATTR_VERBOSE_LEVEL_FILE2} /ntype) + +# different attr number , same attr name (intersected) +ADD_H5_TEST (h5diff_707 1 -v2 ${ATTR_VERBOSE_LEVEL_FILE1} ${ATTR_VERBOSE_LEVEL_FILE2} /g2) + +# different attr number , all different attr name +ADD_H5_TEST (h5diff_708 1 -v2 ${ATTR_VERBOSE_LEVEL_FILE1} ${ATTR_VERBOSE_LEVEL_FILE2} /g3) + +# when no attributes exist in both objects +ADD_H5_TEST (h5diff_709 0 -v2 ${ATTR_VERBOSE_LEVEL_FILE1} ${ATTR_VERBOSE_LEVEL_FILE2} /g4) + +# file vs file +ADD_H5_TEST (h5diff_710 1 -v2 ${ATTR_VERBOSE_LEVEL_FILE1} ${ATTR_VERBOSE_LEVEL_FILE2}) + +# ############################################################################## +# 8. all dataset datatypes +# ############################################################################## +ADD_H5_TEST (h5diff_80 1 -v ${FILE7} ${FILE8}) + +# 9. compare a file with itself +ADD_H5_TEST (h5diff_90 0 -v ${FILE2} ${FILE2}) + +# 10. read by hyperslab, print indexes +#if test -n "$pmode" -a "$mydomainname" = hdfgroup.uiuc.edu; then +# # skip this test which sometimes hangs in some THG machines +# MESSAGE (STATUS "SKIP -v ${FILE9} ${FILE10}) +#else +# ADD_H5_TEST (h5diff_100 1 -v ${FILE9} ${FILE10}) +#fi + +# 11. floating point comparison +ADD_H5_TEST (h5diff_101 1 -v ${FILE1} ${FILE1} g1/d1 g1/d2) + +ADD_H5_TEST (h5diff_102 1 -v ${FILE1} ${FILE1} g1/fp1 g1/fp2) + +# with --use-system-epsilon for double value. expect less differences +ADD_H5_TEST (h5diff_103 1 -v --use-system-epsilon ${FILE1} ${FILE1} g1/d1 +g1/d2) + +# with --use-system-epsilon for float value. expect less differences +ADD_H5_TEST (h5diff_104 1 -v --use-system-epsilon ${FILE1} ${FILE1} g1/fp1 +g1/fp2) + +# not comparable -c flag +ADD_H5_TEST (h5diff_200 0 ${FILE2} ${FILE2} g2/dset1 g2/dset2) + +ADD_H5_TEST (h5diff_201 0 -c ${FILE2} ${FILE2} g2/dset1 g2/dset2) + +ADD_H5_TEST (h5diff_202 0 -c ${FILE2} ${FILE2} g2/dset2 g2/dset3) + +ADD_H5_TEST (h5diff_203 0 -c ${FILE2} ${FILE2} g2/dset3 g2/dset4) + +ADD_H5_TEST (h5diff_204 0 -c ${FILE2} ${FILE2} g2/dset4 g2/dset5) + +ADD_H5_TEST (h5diff_205 0 -c ${FILE2} ${FILE2} g2/dset5 g2/dset6) + +# not comparable in compound +ADD_H5_TEST (h5diff_206 0 -c ${FILE2} ${FILE2} g2/dset7 g2/dset8) + +ADD_H5_TEST (h5diff_207 0 -c ${FILE2} ${FILE2} g2/dset8 g2/dset9) + +# not comparable in dataspace of zero dimension size +ADD_H5_TEST (h5diff_208 0 -c ${FILE19} ${FILE20}) + +# non-comparable dataset with comparable attribute, and other comparable datasets. +# All the rest comparables should display differences. +ADD_H5_TEST (h5diff_220 1 -c non_comparables1.h5 non_comparables2.h5 /g1) + +# comparable dataset with non-comparable attribute and other comparable attributes. +# Also test non-compatible attributes with different type, dimention, rank. +# All the rest comparables should display differences. +ADD_H5_TEST (h5diff_221 1 -c non_comparables1.h5 non_comparables2.h5 /g2) + +# entire file +# All the rest comparables should display differences +ADD_H5_TEST (h5diff_222 1 -c non_comparables1.h5 non_comparables2.h5) + +# non-comparable test for common objects (same name) with different object types +# (HDFFV-7644) +ADD_H5_TEST (h5diff_223 0 -c non_comparables1.h5 non_comparables2.h5 /diffobjtypes) +# swap files +ADD_H5_TEST (h5diff_224 0 -c non_comparables2.h5 non_comparables1.h5 /diffobjtypes) + +# ############################################################################## +# # Links compare without --follow-symlinks nor --no-dangling-links +# ############################################################################## +# test for bug1749 +ADD_H5_TEST (h5diff_300 1 -v ${FILE12} ${FILE12} /link_g1 /link_g2) + +# ############################################################################## +# # Links compare with --follow-symlinks Only +# ############################################################################## +# soft links file to file +ADD_H5_TEST (h5diff_400 0 --follow-symlinks -v ${FILE13} ${FILE13}) + +# softlink vs dset" +ADD_H5_TEST (h5diff_401 1 --follow-symlinks -v ${FILE13} ${FILE13} /softlink_dset1_1 /target_dset2) + +# dset vs softlink" +ADD_H5_TEST (h5diff_402 1 --follow-symlinks -v ${FILE13} ${FILE13} /target_dset2 /softlink_dset1_1) + +# softlink vs softlink" +ADD_H5_TEST (h5diff_403 1 --follow-symlinks -v ${FILE13} ${FILE13} /softlink_dset1_1 /softlink_dset2) + +# extlink vs extlink (FILE)" +ADD_H5_TEST (h5diff_404 0 --follow-symlinks -v ${FILE15} ${FILE15}) + +# extlink vs dset" +ADD_H5_TEST (h5diff_405 1 --follow-symlinks -v ${FILE15} ${FILE16} /ext_link_dset1 /target_group2/x_dset) + +# dset vs extlink" +ADD_H5_TEST (h5diff_406 1 --follow-symlinks -v ${FILE16} ${FILE15} /target_group2/x_dset /ext_link_dset1) + +# extlink vs extlink" +ADD_H5_TEST (h5diff_407 1 --follow-symlinks -v ${FILE15} ${FILE15} /ext_link_dset1 /ext_link_dset2) + +# softlink vs extlink" +ADD_H5_TEST (h5diff_408 1 --follow-symlinks -v ${FILE13} ${FILE15} /softlink_dset1_1 /ext_link_dset2) + +# extlink vs softlink " +ADD_H5_TEST (h5diff_409 1 --follow-symlinks -v ${FILE15} ${FILE13} /ext_link_dset2 /softlink_dset1_1) + +# linked_softlink vs linked_softlink (FILE)" +ADD_H5_TEST (h5diff_410 0 --follow-symlinks -v ${FILE14} ${FILE14}) + +# dset2 vs linked_softlink_dset1" +ADD_H5_TEST (h5diff_411 1 --follow-symlinks -v ${FILE14} ${FILE14} /target_dset2 /softlink1_to_slink2) + +# linked_softlink_dset1 vs dset2" +ADD_H5_TEST (h5diff_412 1 --follow-symlinks -v ${FILE14} ${FILE14} /softlink1_to_slink2 /target_dset2) + +# linked_softlink_to_dset1 vs linked_softlink_to_dset2" +ADD_H5_TEST (h5diff_413 1 --follow-symlinks -v ${FILE14} ${FILE14} /softlink1_to_slink2 /softlink2_to_slink2) + +# group vs linked_softlink_group1" +ADD_H5_TEST (h5diff_414 1 --follow-symlinks -v ${FILE14} ${FILE14} /target_group /softlink3_to_slink2) + +# linked_softlink_group1 vs group" +ADD_H5_TEST (h5diff_415 1 --follow-symlinks -v ${FILE14} ${FILE14} /softlink3_to_slink2 /target_group) + +# linked_softlink_to_group1 vs linked_softlink_to_group2" +ADD_H5_TEST (h5diff_416 0 --follow-symlinks -v ${FILE14} ${FILE14} /softlink3_to_slink2 /softlink4_to_slink2) + +# non-exist-softlink vs softlink" +ADD_H5_TEST (h5diff_417 1 --follow-symlinks -v ${FILE13} ${FILE13} /softlink_noexist /softlink_dset2) + +# softlink vs non-exist-softlink" +ADD_H5_TEST (h5diff_418 1 --follow-symlinks -v ${FILE13} ${FILE13} /softlink_dset2 /softlink_noexist) + +# non-exist-extlink_file vs extlink" +ADD_H5_TEST (h5diff_419 1 --follow-symlinks -v ${FILE15} ${FILE15} /ext_link_noexist2 /ext_link_dset2) + +# exlink vs non-exist-extlink_file" +ADD_H5_TEST (h5diff_420 1 --follow-symlinks -v ${FILE15} ${FILE15} /ext_link_dset2 /ext_link_noexist2) + +# extlink vs non-exist-extlink_obj" +ADD_H5_TEST (h5diff_421 1 --follow-symlinks -v ${FILE15} ${FILE15} /ext_link_dset2 /ext_link_noexist1) + +# non-exist-extlink_obj vs extlink" +ADD_H5_TEST (h5diff_422 1 --follow-symlinks -v ${FILE15} ${FILE15} /ext_link_noexist1 /ext_link_dset2) + +# extlink_to_softlink_to_dset1 vs dset2" +ADD_H5_TEST (h5diff_423 1 --follow-symlinks -v ${FILE17} ${FILE18} /ext_link_to_slink1 /dset2) + +# dset2 vs extlink_to_softlink_to_dset1" +ADD_H5_TEST (h5diff_424 1 --follow-symlinks -v ${FILE18} ${FILE17} /dset2 /ext_link_to_slink1) + +# extlink_to_softlink_to_dset1 vs extlink_to_softlink_to_dset2" +ADD_H5_TEST (h5diff_425 1 --follow-symlinks -v ${FILE17} ${FILE17} /ext_link_to_slink1 /ext_link_to_slink2) + +# ############################################################################## +# # Dangling links compare (--follow-symlinks and --no-dangling-links) +# ############################################################################## +# dangling links --follow-symlinks (FILE to FILE) +ADD_H5_TEST (h5diff_450 1 --follow-symlinks -v ${DANGLE_LINK_FILE1} ${DANGLE_LINK_FILE2}) + +# dangling links --follow-symlinks and --no-dangling-links (FILE to FILE) +ADD_H5_TEST (h5diff_451 2 --follow-symlinks -v --no-dangling-links ${DANGLE_LINK_FILE1} ${DANGLE_LINK_FILE2}) + +# try --no-dangling-links without --follow-symlinks options +ADD_H5_TEST (h5diff_452 2 --no-dangling-links ${FILE13} ${FILE13}) + +# dangling link found for soft links (FILE to FILE) +ADD_H5_TEST (h5diff_453 2 --follow-symlinks -v --no-dangling-links ${FILE13} ${FILE13}) + +# dangling link found for soft links (obj to obj) +ADD_H5_TEST (h5diff_454 2 --follow-symlinks -v --no-dangling-links ${FILE13} ${FILE13} /softlink_dset2 /softlink_noexist) + +# dangling link found for soft links (obj to obj) Both dangle links +ADD_H5_TEST (h5diff_455 2 --follow-symlinks -v --no-dangling-links ${FILE13} ${FILE13} /softlink_noexist /softlink_noexist) + +# dangling link found for ext links (FILE to FILE) +ADD_H5_TEST (h5diff_456 2 --follow-symlinks -v --no-dangling-links ${FILE15} ${FILE15}) + +# dangling link found for ext links (obj to obj). target file exist +ADD_H5_TEST (h5diff_457 2 --follow-symlinks -v --no-dangling-links ${FILE15} ${FILE15} /ext_link_dset1 /ext_link_noexist1) + +# dangling link found for ext links (obj to obj). target file NOT exist +ADD_H5_TEST (h5diff_458 2 --follow-symlinks -v --no-dangling-links ${FILE15} ${FILE15} /ext_link_dset1 /ext_link_noexist2) + +# dangling link found for ext links (obj to obj). Both dangle links +ADD_H5_TEST (h5diff_459 2 --follow-symlinks -v --no-dangling-links ${FILE15} ${FILE15} /ext_link_noexist1 /ext_link_noexist2) + +# dangling link --follow-symlinks (obj vs obj) +# (HDFFV-7836) +ADD_H5_TEST (h5diff_465 0 --follow-symlinks h5diff_danglelinks1.h5 h5diff_danglelinks2.h5 /soft_link1) +# (HDFFV-7835) +# soft dangling vs. soft dangling +ADD_H5_TEST (h5diff_466 0 -v --follow-symlinks h5diff_danglelinks1.h5 h5diff_danglelinks2.h5 /soft_link1) +# soft link vs. soft dangling +ADD_H5_TEST (h5diff_467 1 -v --follow-symlinks h5diff_danglelinks1.h5 h5diff_danglelinks2.h5 /soft_link2) +# ext dangling vs. ext dangling +ADD_H5_TEST (h5diff_468 0 -v --follow-symlinks h5diff_danglelinks1.h5 h5diff_danglelinks2.h5 /ext_link4) +# ext link vs. ext dangling +ADD_H5_TEST (h5diff_469 1 -v --follow-symlinks h5diff_danglelinks1.h5 h5diff_danglelinks2.h5 /ext_link2) + +#--------------------------------------------------- +# dangling links without follow symlink +# (HDFFV-7998) +# test - soft dangle links (same and different paths), +# - external dangle links (same and different paths) +ADD_H5_TEST (h5diff_471 1 -v h5diff_danglelinks1.h5 h5diff_danglelinks2.h5) +ADD_H5_TEST (h5diff_472 0 -v h5diff_danglelinks1.h5 h5diff_danglelinks2.h5 /soft_link1) +ADD_H5_TEST (h5diff_473 1 -v h5diff_danglelinks1.h5 h5diff_danglelinks2.h5 /soft_link4) +ADD_H5_TEST (h5diff_474 0 -v h5diff_danglelinks1.h5 h5diff_danglelinks2.h5 /ext_link4) +ADD_H5_TEST (h5diff_475 1 -v h5diff_danglelinks1.h5 h5diff_danglelinks2.h5 /ext_link1) + + +# ############################################################################## +# # test for group diff recursivly +# ############################################################################## +# root +ADD_H5_TEST (h5diff_500 1 -v ${GRP_RECURSE_FILE1} ${GRP_RECURSE_FILE2} / /) +ADD_H5_TEST (h5diff_501 1 -v --follow-symlinks ${GRP_RECURSE_FILE1} ${GRP_RECURSE_FILE2} / /) + +# root vs group +ADD_H5_TEST (h5diff_502 1 -v ${GRP_RECURSE_FILE1} ${GRP_RECURSE_FILE2} / /grp1/grp2/grp3) + +# group vs group (same name and structure) +ADD_H5_TEST (h5diff_503 0 -v ${GRP_RECURSE_FILE1} ${GRP_RECURSE_FILE2} /grp1 /grp1) + +# group vs group (different name and structure) +ADD_H5_TEST (h5diff_504 1 -v ${GRP_RECURSE_FILE1} ${GRP_RECURSE_FILE2} /grp1/grp2 /grp1/grp2/grp3) + +# groups vs soft-link +ADD_H5_TEST (h5diff_505 0 -v ${GRP_RECURSE_FILE1} ${GRP_RECURSE_FILE2} /grp1 /slink_grp1) +ADD_H5_TEST (h5diff_506 0 -v --follow-symlinks ${GRP_RECURSE_FILE1} ${GRP_RECURSE_FILE2} /grp1/grp2 /slink_grp2) + +# groups vs ext-link +ADD_H5_TEST (h5diff_507 0 -v ${GRP_RECURSE_FILE1} ${GRP_RECURSE_FILE2} /grp1 /elink_grp1) +ADD_H5_TEST (h5diff_508 0 -v --follow-symlinks ${GRP_RECURSE_FILE1} ${GRP_RECURSE_FILE2} /grp1 /elink_grp1) + +# soft-link vs ext-link +ADD_H5_TEST (h5diff_509 0 -v ${GRP_RECURSE_FILE1} ${GRP_RECURSE_FILE2} /slink_grp1 /elink_grp1) +ADD_H5_TEST (h5diff_510 0 -v --follow-symlinks ${GRP_RECURSE_FILE1} ${GRP_RECURSE_FILE2} /slink_grp1 /elink_grp1) + +# circled ext links +ADD_H5_TEST (h5diff_511 1 -v ${GRP_RECURSE_FILE1} ${GRP_RECURSE_FILE2} /grp10 /grp11) +ADD_H5_TEST (h5diff_512 1 -v --follow-symlinks ${GRP_RECURSE_FILE1} ${GRP_RECURSE_FILE2} /grp10 /grp11) + +# circled soft2ext-link vs soft2ext-link +ADD_H5_TEST (h5diff_513 1 -v ${GRP_RECURSE_FILE1} ${GRP_RECURSE_FILE2} /slink_grp10 /slink_grp11) +ADD_H5_TEST (h5diff_514 1 -v --follow-symlinks ${GRP_RECURSE_FILE1} ${GRP_RECURSE_FILE2} /slink_grp10 /slink_grp11) + +############################################################################### +# Test for group recursive diff via multi-linked external links +# With follow-symlinks, file $GRP_RECURSE1_EXT and $GRP_RECURSE2_EXT1 should +# be same with the external links. +############################################################################### +# file vs file +ADD_H5_TEST (h5diff_515 1 -v ${GRP_RECURSE1_EXT} ${GRP_RECURSE2_EXT1}) +ADD_H5_TEST (h5diff_516 0 -v --follow-symlinks ${GRP_RECURSE1_EXT} ${GRP_RECURSE2_EXT1}) +# group vs group +ADD_H5_TEST (h5diff_517 1 -v ${GRP_RECURSE1_EXT} ${GRP_RECURSE2_EXT1} /g1) +ADD_H5_TEST (h5diff_518 0 -v --follow-symlinks ${GRP_RECURSE1_EXT} ${GRP_RECURSE2_EXT1} /g1) + +# ############################################################################## +# # Exclude path (--exclude-path) +# ############################################################################## +# +# Same structure, same names and different value. +# +# Exclude the object with different value. Expect return - same +ADD_H5_TEST (h5diff_480 0 -v --exclude-path /group1/dset3 ${EXCLUDE_FILE1_1} ${EXCLUDE_FILE1_2}) +# Verify different by not excluding. Expect return - diff +ADD_H5_TEST (h5diff_481 1 -v ${EXCLUDE_FILE1_1} ${EXCLUDE_FILE1_2}) + +# +# Different structure, different names. +# +# Exclude all the different objects. Expect return - same +ADD_H5_TEST (h5diff_482 0 -v --exclude-path "/group1" --exclude-path "/dset1" ${EXCLUDE_FILE2_1} ${EXCLUDE_FILE2_2}) +# Exclude only some different objects. Expect return - diff +ADD_H5_TEST (h5diff_483 1 -v --exclude-path "/group1" ${EXCLUDE_FILE2_1} ${EXCLUDE_FILE2_2}) + +# Exclude from group compare +ADD_H5_TEST (h5diff_484 0 -v --exclude-path "/dset3" ${EXCLUDE_FILE1_1} ${EXCLUDE_FILE1_2} /group1) + +# +# Only one file contains unique objs. Common objs are same. +# (HDFFV-7837) +# +ADD_H5_TEST (h5diff_485 0 -v --exclude-path "/group1" h5diff_exclude3-1.h5 h5diff_exclude3-2.h5) +ADD_H5_TEST (h5diff_486 0 -v --exclude-path "/group1" h5diff_exclude3-2.h5 h5diff_exclude3-1.h5) +ADD_H5_TEST (h5diff_487 1 -v --exclude-path "/group1/dset" h5diff_exclude3-1.h5 h5diff_exclude3-2.h5) + + + +# ############################################################################## +# # diff various multiple vlen and fixed strings in a compound type dataset +# ############################################################################## +ADD_H5_TEST (h5diff_530 0 -v ${COMP_VL_STRS_FILE} ${COMP_VL_STRS_FILE} /group /group_copy) + +# ############################################################################## +# # Test container types (array,vlen) with multiple nested compound types +# # Complex compound types in dataset and attribute +# ############################################################################## +ADD_H5_TEST (h5diff_540 1 -v ${COMPS_ARRAY_VLEN_FILE1} ${COMPS_ARRAY_VLEN_FILE2}) + +# ############################################################################## +# # Test mutually exclusive options +# ############################################################################## +# +# Test with -d , -p and --use-system-epsilon. +ADD_H5_TEST (h5diff_640 1 -v -d 5 -p 0.05 --use-system-epsilon ${FILE1} ${FILE2} /g1/dset3 /g1/dset4) +ADD_H5_TEST (h5diff_641 1 -v -d 5 -p 0.05 ${FILE1} ${FILE2} /g1/dset3 /g1/dset4) +ADD_H5_TEST (h5diff_642 1 -v -p 0.05 -d 5 ${FILE1} ${FILE2} /g1/dset3 /g1/dset4) +ADD_H5_TEST (h5diff_643 1 -v -d 5 --use-system-epsilon ${FILE1} ${FILE2} /g1/dset3 /g1/dset4) +ADD_H5_TEST (h5diff_644 1 -v --use-system-epsilon -d 5 ${FILE1} ${FILE2} /g1/dset3 /g1/dset4) +ADD_H5_TEST (h5diff_645 1 -v -p 0.05 --use-system-epsilon ${FILE1} ${FILE2} /g1/dset3 /g1/dset4) +ADD_H5_TEST (h5diff_646 1 -v --use-system-epsilon -p 0.05 ${FILE1} ${FILE2} /g1/dset3 /g1/dset4) diff --git a/tools/h5dump/CMakeLists.txt b/tools/h5dump/CMakeLists.txt index df9cc5f..30ff215 100644 --- a/tools/h5dump/CMakeLists.txt +++ b/tools/h5dump/CMakeLists.txt @@ -21,12 +21,6 @@ SET_TARGET_PROPERTIES (h5dump PROPERTIES FOLDER tools) SET (H5_DEP_EXECUTABLES h5dump) -############################################################################## -############################################################################## -### T E S T I N G ### -############################################################################## -############################################################################## - IF (BUILD_TESTING) # -------------------------------------------------------------------- # Add the h5dump test executable @@ -40,2141 +34,12 @@ IF (BUILD_TESTING) #ADD_TEST (NAME h5dumpgentest COMMAND $) ENDIF (HDF5_BUILD_GENERATORS AND NOT BUILD_SHARED_LIBS) - - # -------------------------------------------------------------------- - # Copy all the HDF5 files from the test directory into the source directory - # -------------------------------------------------------------------- - SET (HDF5_REFERENCE_FILES - ${HDF5_TOOLS_SRC_DIR}/testfiles/charsets.ddl - ${HDF5_TOOLS_SRC_DIR}/testfiles/file_space.ddl - ${HDF5_TOOLS_SRC_DIR}/testfiles/filter_fail.ddl - ${HDF5_TOOLS_SRC_DIR}/testfiles/packedbits.ddl - ${HDF5_TOOLS_SRC_DIR}/testfiles/tall-1.ddl - ${HDF5_TOOLS_SRC_DIR}/testfiles/tall-2.ddl - ${HDF5_TOOLS_SRC_DIR}/testfiles/tall-2A.ddl - ${HDF5_TOOLS_SRC_DIR}/testfiles/tall-2A0.ddl - ${HDF5_TOOLS_SRC_DIR}/testfiles/tall-2B.ddl - ${HDF5_TOOLS_SRC_DIR}/testfiles/tall-3.ddl - ${HDF5_TOOLS_SRC_DIR}/testfiles/tall-4s.ddl - ${HDF5_TOOLS_SRC_DIR}/testfiles/tall-5s.ddl - ${HDF5_TOOLS_SRC_DIR}/testfiles/tall-6.ddl - ${HDF5_TOOLS_SRC_DIR}/testfiles/tall-7.ddl - ${HDF5_TOOLS_SRC_DIR}/testfiles/tall-7N.ddl - ${HDF5_TOOLS_SRC_DIR}/testfiles/tallfilters.ddl - ${HDF5_TOOLS_SRC_DIR}/testfiles/tarray1.ddl - ${HDF5_TOOLS_SRC_DIR}/testfiles/tarray1_big.ddl - ${HDF5_TOOLS_SRC_DIR}/testfiles/tarray2.ddl - ${HDF5_TOOLS_SRC_DIR}/testfiles/tarray3.ddl - ${HDF5_TOOLS_SRC_DIR}/testfiles/tarray4.ddl - ${HDF5_TOOLS_SRC_DIR}/testfiles/tarray5.ddl - ${HDF5_TOOLS_SRC_DIR}/testfiles/tarray6.ddl - ${HDF5_TOOLS_SRC_DIR}/testfiles/tarray7.ddl - ${HDF5_TOOLS_SRC_DIR}/testfiles/tarray8.ddl - ${HDF5_TOOLS_SRC_DIR}/testfiles/tattr-1.ddl - ${HDF5_TOOLS_SRC_DIR}/testfiles/tattr-2.ddl - ${HDF5_TOOLS_SRC_DIR}/testfiles/tattr-3.ddl - ${HDF5_TOOLS_SRC_DIR}/testfiles/tattr-4_be.ddl - ${HDF5_TOOLS_SRC_DIR}/testfiles/tattrcontents1.ddl - ${HDF5_TOOLS_SRC_DIR}/testfiles/tattrcontents2.ddl - ${HDF5_TOOLS_SRC_DIR}/testfiles/tattrintsize.ddl - ${HDF5_TOOLS_SRC_DIR}/testfiles/tattrreg.ddl - ${HDF5_TOOLS_SRC_DIR}/testfiles/tattrregR.ddl - ${HDF5_TOOLS_SRC_DIR}/testfiles/tbin1.ddl - ${HDF5_TOOLS_SRC_DIR}/testfiles/tbin1.ddl - ${HDF5_TOOLS_SRC_DIR}/testfiles/tbin2.ddl - ${HDF5_TOOLS_SRC_DIR}/testfiles/tbin3.ddl - ${HDF5_TOOLS_SRC_DIR}/testfiles/tbin4.ddl - ${HDF5_TOOLS_SRC_DIR}/testfiles/tbinregR.ddl - ${HDF5_TOOLS_SRC_DIR}/testfiles/tbigdims.ddl - ${HDF5_TOOLS_SRC_DIR}/testfiles/tboot1.ddl - ${HDF5_TOOLS_SRC_DIR}/testfiles/tboot2.ddl - ${HDF5_TOOLS_SRC_DIR}/testfiles/tchar1.ddl - ${HDF5_TOOLS_SRC_DIR}/testfiles/tchunked.ddl - ${HDF5_TOOLS_SRC_DIR}/testfiles/tcmpdattrintsize.ddl - ${HDF5_TOOLS_SRC_DIR}/testfiles/tcmpdintsize.ddl - ${HDF5_TOOLS_SRC_DIR}/testfiles/tcomp-1.ddl - ${HDF5_TOOLS_SRC_DIR}/testfiles/tcomp-2.ddl - ${HDF5_TOOLS_SRC_DIR}/testfiles/tcomp-3.ddl - ${HDF5_TOOLS_SRC_DIR}/testfiles/tcomp-4.ddl - ${HDF5_TOOLS_SRC_DIR}/testfiles/tcompact.ddl - ${HDF5_TOOLS_SRC_DIR}/testfiles/tcontents.ddl - ${HDF5_TOOLS_SRC_DIR}/testfiles/tcontiguos.ddl - ${HDF5_TOOLS_SRC_DIR}/testfiles/tdatareg.ddl - ${HDF5_TOOLS_SRC_DIR}/testfiles/tdataregR.ddl - ${HDF5_TOOLS_SRC_DIR}/testfiles/tdeflate.ddl - ${HDF5_TOOLS_SRC_DIR}/testfiles/tdset-1.ddl - ${HDF5_TOOLS_SRC_DIR}/testfiles/tdset-2.ddl - ${HDF5_TOOLS_SRC_DIR}/testfiles/tdset-3s.ddl - ${HDF5_TOOLS_SRC_DIR}/testfiles/tempty.ddl - ${HDF5_TOOLS_SRC_DIR}/testfiles/texceedsubstart.ddl - ${HDF5_TOOLS_SRC_DIR}/testfiles/texceedsubcount.ddl - ${HDF5_TOOLS_SRC_DIR}/testfiles/texceedsubstride.ddl - ${HDF5_TOOLS_SRC_DIR}/testfiles/texceedsubblock.ddl - ${HDF5_TOOLS_SRC_DIR}/testfiles/texternal.ddl - ${HDF5_TOOLS_SRC_DIR}/testfiles/textlinksrc.ddl - ${HDF5_TOOLS_SRC_DIR}/testfiles/textlinkfar.ddl - ${HDF5_TOOLS_SRC_DIR}/testfiles/textlink.ddl - ${HDF5_TOOLS_SRC_DIR}/testfiles/tfamily.ddl - ${HDF5_TOOLS_SRC_DIR}/testfiles/tfill.ddl - ${HDF5_TOOLS_SRC_DIR}/testfiles/tfletcher32.ddl - ${HDF5_TOOLS_SRC_DIR}/testfiles/tfpformat.ddl - ${HDF5_TOOLS_SRC_DIR}/testfiles/tgroup-1.ddl - ${HDF5_TOOLS_SRC_DIR}/testfiles/tgroup-2.ddl - ${HDF5_TOOLS_SRC_DIR}/testfiles/tgrp_comments.ddl - ${HDF5_TOOLS_SRC_DIR}/testfiles/thlink-1.ddl - ${HDF5_TOOLS_SRC_DIR}/testfiles/thlink-2.ddl - ${HDF5_TOOLS_SRC_DIR}/testfiles/thlink-3.ddl - ${HDF5_TOOLS_SRC_DIR}/testfiles/thlink-4.ddl - ${HDF5_TOOLS_SRC_DIR}/testfiles/thlink-5.ddl - ${HDF5_TOOLS_SRC_DIR}/testfiles/thyperslab.ddl - ${HDF5_TOOLS_SRC_DIR}/testfiles/tindicesno.ddl - ${HDF5_TOOLS_SRC_DIR}/testfiles/tindicessub1.ddl - ${HDF5_TOOLS_SRC_DIR}/testfiles/tindicessub2.ddl - ${HDF5_TOOLS_SRC_DIR}/testfiles/tindicessub3.ddl - ${HDF5_TOOLS_SRC_DIR}/testfiles/tindicessub4.ddl - ${HDF5_TOOLS_SRC_DIR}/testfiles/tindicesyes.ddl - ${HDF5_TOOLS_SRC_DIR}/testfiles/tlarge_objname.ddl - #${HDF5_TOOLS_SRC_DIR}/testfiles/tldouble.ddl - ${HDF5_TOOLS_SRC_DIR}/testfiles/tlonglinks.ddl - ${HDF5_TOOLS_SRC_DIR}/testfiles/tloop-1.ddl - ${HDF5_TOOLS_SRC_DIR}/testfiles/tmulti.ddl - ${HDF5_TOOLS_SRC_DIR}/testfiles/tmultifile.ddl - #${HDF5_TOOLS_SRC_DIR}/testfiles/tqmarkfile.ddl - #${HDF5_TOOLS_SRC_DIR}/testfiles/tstarfile.ddl - ${HDF5_TOOLS_SRC_DIR}/testfiles/tnamed_dtype_attr.ddl - ${HDF5_TOOLS_SRC_DIR}/testfiles/tnestcomp-1.ddl - ${HDF5_TOOLS_SRC_DIR}/testfiles/tnestedcmpddt.ddl - ${HDF5_TOOLS_SRC_DIR}/testfiles/tnbit.ddl - ${HDF5_TOOLS_SRC_DIR}/testfiles/tnoattrdata.ddl - ${HDF5_TOOLS_SRC_DIR}/testfiles/tnoattrddl.ddl - ${HDF5_TOOLS_SRC_DIR}/testfiles/tnodata.ddl - ${HDF5_TOOLS_SRC_DIR}/testfiles/tnoddl.ddl - ${HDF5_TOOLS_SRC_DIR}/testfiles/tnoddlfile.ddl - ${HDF5_TOOLS_SRC_DIR}/testfiles/tno-subset.ddl - ${HDF5_TOOLS_SRC_DIR}/testfiles/tnullspace.ddl - ${HDF5_TOOLS_SRC_DIR}/testfiles/trawdatafile.ddl - ${HDF5_TOOLS_SRC_DIR}/testfiles/trawssetfile.ddl - ${HDF5_TOOLS_SRC_DIR}/testfiles/zerodim.ddl - ${HDF5_TOOLS_SRC_DIR}/testfiles/tordergr1.ddl - ${HDF5_TOOLS_SRC_DIR}/testfiles/tordergr2.ddl - ${HDF5_TOOLS_SRC_DIR}/testfiles/tordergr3.ddl - ${HDF5_TOOLS_SRC_DIR}/testfiles/tordergr4.ddl - ${HDF5_TOOLS_SRC_DIR}/testfiles/tordergr5.ddl - ${HDF5_TOOLS_SRC_DIR}/testfiles/torderattr1.ddl - ${HDF5_TOOLS_SRC_DIR}/testfiles/torderattr2.ddl - ${HDF5_TOOLS_SRC_DIR}/testfiles/torderattr3.ddl - ${HDF5_TOOLS_SRC_DIR}/testfiles/torderattr4.ddl - ${HDF5_TOOLS_SRC_DIR}/testfiles/tordercontents1.ddl - ${HDF5_TOOLS_SRC_DIR}/testfiles/tordercontents2.ddl - ${HDF5_TOOLS_SRC_DIR}/testfiles/torderlinks1.ddl - ${HDF5_TOOLS_SRC_DIR}/testfiles/torderlinks2.ddl - ${HDF5_TOOLS_SRC_DIR}/testfiles/tperror.ddl - ${HDF5_TOOLS_SRC_DIR}/testfiles/treference.ddl - ${HDF5_TOOLS_SRC_DIR}/testfiles/tsaf.ddl - ${HDF5_TOOLS_SRC_DIR}/testfiles/tscalarintsize.ddl - ${HDF5_TOOLS_SRC_DIR}/testfiles/tscalarattrintsize.ddl - ${HDF5_TOOLS_SRC_DIR}/testfiles/tscalarstring.ddl - ${HDF5_TOOLS_SRC_DIR}/testfiles/tscaleoffset.ddl - ${HDF5_TOOLS_SRC_DIR}/testfiles/tshuffle.ddl - ${HDF5_TOOLS_SRC_DIR}/testfiles/tslink-1.ddl - ${HDF5_TOOLS_SRC_DIR}/testfiles/tslink-2.ddl - ${HDF5_TOOLS_SRC_DIR}/testfiles/tslink-D.ddl - ${HDF5_TOOLS_SRC_DIR}/testfiles/tsplit_file.ddl - ${HDF5_TOOLS_SRC_DIR}/testfiles/tstr-1.ddl - ${HDF5_TOOLS_SRC_DIR}/testfiles/tstr-2.ddl - ${HDF5_TOOLS_SRC_DIR}/testfiles/tstring.ddl - ${HDF5_TOOLS_SRC_DIR}/testfiles/tstring2.ddl - ${HDF5_TOOLS_SRC_DIR}/testfiles/tstringe.ddl - ${HDF5_TOOLS_SRC_DIR}/testfiles/tszip.ddl - ${HDF5_TOOLS_SRC_DIR}/testfiles/tudlink-1.ddl - ${HDF5_TOOLS_SRC_DIR}/testfiles/tudlink-2.ddl - ${HDF5_TOOLS_SRC_DIR}/testfiles/tuserfilter.ddl - ${HDF5_TOOLS_SRC_DIR}/testfiles/tvldtypes1.ddl - ${HDF5_TOOLS_SRC_DIR}/testfiles/tvldtypes2.ddl - ${HDF5_TOOLS_SRC_DIR}/testfiles/tvldtypes3.ddl - ${HDF5_TOOLS_SRC_DIR}/testfiles/tvldtypes4.ddl - ${HDF5_TOOLS_SRC_DIR}/testfiles/tvldtypes5.ddl - ${HDF5_TOOLS_SRC_DIR}/testfiles/tvlstr.ddl - ${HDF5_TOOLS_SRC_DIR}/testfiles/tvms.ddl - ${HDF5_TOOLS_SRC_DIR}/testfiles/twidedisplay.ddl - ${HDF5_TOOLS_SRC_DIR}/testfiles/twithddlfile.ddl - ${HDF5_TOOLS_SRC_DIR}/testfiles/h5dump-help.txt - ${HDF5_TOOLS_SRC_DIR}/testfiles/out3.h5import - ) - SET (HDF5_REFERENCE_EXP_FILES - tall-6.exp - tnoddlfile.exp - trawdatafile.exp - trawssetfile.exp - tstr2bin2.exp - tstr2bin6.exp - twithddl.exp - twithddlfile.exp - ) - SET (HDF5_REFERENCE_TEST_FILES - ${HDF5_TOOLS_SRC_DIR}/testfiles/charsets.h5 - ${HDF5_TOOLS_SRC_DIR}/testfiles/file_space.h5 - ${HDF5_TOOLS_SRC_DIR}/testfiles/filter_fail.h5 - ${HDF5_TOOLS_SRC_DIR}/testfiles/packedbits.h5 - ${HDF5_TOOLS_SRC_DIR}/testfiles/taindices.h5 - ${HDF5_TOOLS_SRC_DIR}/testfiles/tall.h5 - ${HDF5_TOOLS_SRC_DIR}/testfiles/tarray1.h5 - ${HDF5_TOOLS_SRC_DIR}/testfiles/tarray1_big.h5 - ${HDF5_TOOLS_SRC_DIR}/testfiles/tarray2.h5 - ${HDF5_TOOLS_SRC_DIR}/testfiles/tarray3.h5 - ${HDF5_TOOLS_SRC_DIR}/testfiles/tarray4.h5 - ${HDF5_TOOLS_SRC_DIR}/testfiles/tarray5.h5 - ${HDF5_TOOLS_SRC_DIR}/testfiles/tarray6.h5 - ${HDF5_TOOLS_SRC_DIR}/testfiles/tarray7.h5 - ${HDF5_TOOLS_SRC_DIR}/testfiles/tarray8.h5 - ${HDF5_TOOLS_SRC_DIR}/testfiles/tattr.h5 - ${HDF5_TOOLS_SRC_DIR}/testfiles/tattr2.h5 - ${HDF5_TOOLS_SRC_DIR}/testfiles/tattr4_be.h5 - ${HDF5_TOOLS_SRC_DIR}/testfiles/tattrintsize.h5 - ${HDF5_TOOLS_SRC_DIR}/testfiles/tattrreg.h5 - ${HDF5_TOOLS_SRC_DIR}/testfiles/tbigdims.h5 - ${HDF5_TOOLS_SRC_DIR}/testfiles/tbinary.h5 - ${HDF5_TOOLS_SRC_DIR}/testfiles/tchar.h5 - ${HDF5_TOOLS_SRC_DIR}/testfiles/tcmpdattrintsize.h5 - ${HDF5_TOOLS_SRC_DIR}/testfiles/tcmpdintsize.h5 - ${HDF5_TOOLS_SRC_DIR}/testfiles/tcompound.h5 - ${HDF5_TOOLS_SRC_DIR}/testfiles/tcompound_complex.h5 - ${HDF5_TOOLS_SRC_DIR}/testfiles/tdatareg.h5 - ${HDF5_TOOLS_SRC_DIR}/testfiles/tdset.h5 - ${HDF5_TOOLS_SRC_DIR}/testfiles/tempty.h5 - ${HDF5_TOOLS_SRC_DIR}/testfiles/tsoftlinks.h5 - ${HDF5_TOOLS_SRC_DIR}/testfiles/textlinkfar.h5 - ${HDF5_TOOLS_SRC_DIR}/testfiles/textlinksrc.h5 - ${HDF5_TOOLS_SRC_DIR}/testfiles/textlinktar.h5 - ${HDF5_TOOLS_SRC_DIR}/testfiles/textlink.h5 - ${HDF5_TOOLS_SRC_DIR}/testfiles/tfamily00000.h5 - ${HDF5_TOOLS_SRC_DIR}/testfiles/tfamily00001.h5 - ${HDF5_TOOLS_SRC_DIR}/testfiles/tfamily00002.h5 - ${HDF5_TOOLS_SRC_DIR}/testfiles/tfamily00003.h5 - ${HDF5_TOOLS_SRC_DIR}/testfiles/tfamily00004.h5 - ${HDF5_TOOLS_SRC_DIR}/testfiles/tfamily00005.h5 - ${HDF5_TOOLS_SRC_DIR}/testfiles/tfamily00006.h5 - ${HDF5_TOOLS_SRC_DIR}/testfiles/tfamily00007.h5 - ${HDF5_TOOLS_SRC_DIR}/testfiles/tfamily00008.h5 - ${HDF5_TOOLS_SRC_DIR}/testfiles/tfamily00009.h5 - ${HDF5_TOOLS_SRC_DIR}/testfiles/tfamily00010.h5 - ${HDF5_TOOLS_SRC_DIR}/testfiles/tfcontents1.h5 - ${HDF5_TOOLS_SRC_DIR}/testfiles/tfcontents2.h5 - ${HDF5_TOOLS_SRC_DIR}/testfiles/tfilters.h5 - ${HDF5_TOOLS_SRC_DIR}/testfiles/tfpformat.h5 - ${HDF5_TOOLS_SRC_DIR}/testfiles/tfvalues.h5 - ${HDF5_TOOLS_SRC_DIR}/testfiles/tgroup.h5 - ${HDF5_TOOLS_SRC_DIR}/testfiles/tgrp_comments.h5 - ${HDF5_TOOLS_SRC_DIR}/testfiles/thlink.h5 - ${HDF5_TOOLS_SRC_DIR}/testfiles/thyperslab.h5 - ${HDF5_TOOLS_SRC_DIR}/testfiles/tlarge_objname.h5 - #${HDF5_TOOLS_SRC_DIR}/testfiles/tldouble.h5 - ${HDF5_TOOLS_SRC_DIR}/testfiles/tlonglinks.h5 - ${HDF5_TOOLS_SRC_DIR}/testfiles/tloop.h5 - ${HDF5_TOOLS_SRC_DIR}/testfiles/tmulti-b.h5 - ${HDF5_TOOLS_SRC_DIR}/testfiles/tmulti-g.h5 - ${HDF5_TOOLS_SRC_DIR}/testfiles/tmulti-l.h5 - ${HDF5_TOOLS_SRC_DIR}/testfiles/tmulti-o.h5 - ${HDF5_TOOLS_SRC_DIR}/testfiles/tmulti-r.h5 - ${HDF5_TOOLS_SRC_DIR}/testfiles/tmulti-s.h5 - ${HDF5_TOOLS_SRC_DIR}/testfiles/tnamed_dtype_attr.h5 - ${HDF5_TOOLS_SRC_DIR}/testfiles/tnestedcomp.h5 - ${HDF5_TOOLS_SRC_DIR}/testfiles/tnestedcmpddt.h5 - ${HDF5_TOOLS_SRC_DIR}/testfiles/tno-subset.h5 - ${HDF5_TOOLS_SRC_DIR}/testfiles/tnullspace.h5 - ${HDF5_TOOLS_SRC_DIR}/testfiles/zerodim.h5 - ${HDF5_TOOLS_SRC_DIR}/testfiles/torderattr.h5 - ${HDF5_TOOLS_SRC_DIR}/testfiles/tordergr.h5 - ${HDF5_TOOLS_SRC_DIR}/testfiles/tsaf.h5 - ${HDF5_TOOLS_SRC_DIR}/testfiles/tscalarintsize.h5 - ${HDF5_TOOLS_SRC_DIR}/testfiles/tscalarattrintsize.h5 - ${HDF5_TOOLS_SRC_DIR}/testfiles/tscalarstring.h5 - ${HDF5_TOOLS_SRC_DIR}/testfiles/tslink.h5 - ${HDF5_TOOLS_SRC_DIR}/testfiles/tsplit_file-m.h5 - ${HDF5_TOOLS_SRC_DIR}/testfiles/tsplit_file-r.h5 - ${HDF5_TOOLS_SRC_DIR}/testfiles/tstr.h5 - ${HDF5_TOOLS_SRC_DIR}/testfiles/tstr2.h5 - ${HDF5_TOOLS_SRC_DIR}/testfiles/tstr3.h5 - ${HDF5_TOOLS_SRC_DIR}/testfiles/tudlink.h5 - ${HDF5_TOOLS_SRC_DIR}/testfiles/tvldtypes1.h5 - ${HDF5_TOOLS_SRC_DIR}/testfiles/tvldtypes2.h5 - ${HDF5_TOOLS_SRC_DIR}/testfiles/tvldtypes3.h5 - ${HDF5_TOOLS_SRC_DIR}/testfiles/tvldtypes4.h5 - ${HDF5_TOOLS_SRC_DIR}/testfiles/tvldtypes5.h5 - ${HDF5_TOOLS_SRC_DIR}/testfiles/tvlstr.h5 - ${HDF5_TOOLS_SRC_DIR}/testfiles/tvms.h5 - ) - SET (HDF5_ERROR_REFERENCE_TEST_FILES - ${PROJECT_SOURCE_DIR}/errfiles/filter_fail.err - ${PROJECT_SOURCE_DIR}/errfiles/tall-1.err - ${PROJECT_SOURCE_DIR}/errfiles/tall-2A.err - ${PROJECT_SOURCE_DIR}/errfiles/tall-2A0.err - ${PROJECT_SOURCE_DIR}/errfiles/tall-2B.err - ${PROJECT_SOURCE_DIR}/errfiles/tarray1_big.err - ${PROJECT_SOURCE_DIR}/errfiles/tattrregR.err - ${PROJECT_SOURCE_DIR}/errfiles/tattr-3.err - ${PROJECT_SOURCE_DIR}/errfiles/tcomp-3.err - ${PROJECT_SOURCE_DIR}/errfiles/tdataregR.err - ${PROJECT_SOURCE_DIR}/errfiles/tdset-2.err - ${PROJECT_SOURCE_DIR}/errfiles/texceedsubblock.err - ${PROJECT_SOURCE_DIR}/errfiles/texceedsubcount.err - ${PROJECT_SOURCE_DIR}/errfiles/texceedsubstart.err - ${PROJECT_SOURCE_DIR}/errfiles/texceedsubstride.err - ${PROJECT_SOURCE_DIR}/errfiles/textlink.err - ${PROJECT_SOURCE_DIR}/errfiles/textlinkfar.err - ${PROJECT_SOURCE_DIR}/errfiles/textlinksrc.err - ${PROJECT_SOURCE_DIR}/errfiles/torderlinks1.err - ${PROJECT_SOURCE_DIR}/errfiles/torderlinks2.err - ${PROJECT_SOURCE_DIR}/errfiles/tgroup-2.err - ${PROJECT_SOURCE_DIR}/errfiles/tperror.err - ${PROJECT_SOURCE_DIR}/errfiles/tslink-D.err - ) - - # make test dir - FILE (MAKE_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles") - - # - # copy test files from source dir to test dir - # - FOREACH (tst_h5_file ${HDF5_REFERENCE_TEST_FILES}) - GET_FILENAME_COMPONENT(fname "${tst_h5_file}" NAME) - SET (dest "${PROJECT_BINARY_DIR}/testfiles/std/${fname}") - #MESSAGE (STATUS " Copying ${tst_h5_file}") - ADD_CUSTOM_COMMAND ( - TARGET h5dump - POST_BUILD - COMMAND ${CMAKE_COMMAND} - ARGS -E copy_if_different ${tst_h5_file} ${dest} - ) - ENDFOREACH (tst_h5_file ${HDF5_REFERENCE_TEST_FILES}) - - FOREACH (tst_exp_file ${HDF5_REFERENCE_EXP_FILES}) - IF (WIN32 AND NOT CYGWIN) - FILE (READ ${HDF5_TOOLS_SRC_DIR}/testfiles/${tst_exp_file} TEST_STREAM) - FILE (WRITE ${PROJECT_BINARY_DIR}/testfiles/std/${tst_exp_file} "${TEST_STREAM}") - ELSE (WIN32 AND NOT CYGWIN) - ADD_CUSTOM_COMMAND ( - TARGET h5dump - POST_BUILD - COMMAND ${CMAKE_COMMAND} - ARGS -E copy_if_different ${HDF5_TOOLS_SRC_DIR}/testfiles/${tst_exp_file} ${PROJECT_BINARY_DIR}/testfiles/std/${tst_exp_file} - ) - ENDIF (WIN32 AND NOT CYGWIN) - ENDFOREACH (tst_exp_file ${HDF5_REFERENCE_EXP_FILES}) - - FOREACH (tst_other_file ${HDF5_REFERENCE_FILES}) - GET_FILENAME_COMPONENT(fname "${tst_other_file}" NAME) - SET (dest "${PROJECT_BINARY_DIR}/testfiles/std/${fname}") - #MESSAGE (STATUS " Copying ${tst_other_file}") - ADD_CUSTOM_COMMAND ( - TARGET h5dump - POST_BUILD - COMMAND ${CMAKE_COMMAND} - ARGS -E copy_if_different ${tst_other_file} ${dest} - ) - ENDFOREACH (tst_other_file ${HDF5_REFERENCE_FILES}) - - FOREACH (tst_error_file ${HDF5_ERROR_REFERENCE_TEST_FILES}) - GET_FILENAME_COMPONENT(fname "${tst_error_file}" NAME) - SET (dest "${PROJECT_BINARY_DIR}/testfiles/std/${fname}") - #MESSAGE (STATUS " Copying ${tst_error_file}") - ADD_CUSTOM_COMMAND ( - TARGET h5dump - POST_BUILD - COMMAND ${CMAKE_COMMAND} - ARGS -E copy_if_different ${tst_error_file} ${dest} - ) - ENDFOREACH (tst_error_file ${HDF5_ERROR_REFERENCE_TEST_FILES}) - - # -------------------------------------------------------------------- - # Special file handling - # -------------------------------------------------------------------- - ADD_CUSTOM_COMMAND ( - TARGET h5dump - POST_BUILD - COMMAND ${CMAKE_COMMAND} - ARGS -E copy_if_different ${HDF5_TOOLS_SOURCE_DIR}/testfiles/tbin1.ddl ${PROJECT_BINARY_DIR}/testfiles/std/tbin1LE.ddl - ) - - IF (WIN32 AND NOT CYGWIN) - FILE (READ ${HDF5_TOOLS_SRC_DIR}/testfiles/tbinregR.exp TEST_STREAM) - FILE (WRITE ${PROJECT_BINARY_DIR}/testfiles/std/tbinregR.exp "${TEST_STREAM}") - ELSE (WIN32 AND NOT CYGWIN) - ADD_CUSTOM_COMMAND ( - TARGET h5dump - POST_BUILD - COMMAND ${CMAKE_COMMAND} - ARGS -E copy_if_different ${HDF5_TOOLS_SRC_DIR}/testfiles/tbinregR.exp ${PROJECT_BINARY_DIR}/testfiles/std/tbinregR.exp - ) - ENDIF (WIN32 AND NOT CYGWIN) - - # - # copy XML test files from source dir to test dir - # - SET (HDF5_XML_REFERENCE_TEST_FILES - ${HDF5_TOOLS_SRC_DIR}/testfiles/tall.h5 - ${HDF5_TOOLS_SRC_DIR}/testfiles/tarray1.h5 - ${HDF5_TOOLS_SRC_DIR}/testfiles/tarray2.h5 - ${HDF5_TOOLS_SRC_DIR}/testfiles/tarray3.h5 - ${HDF5_TOOLS_SRC_DIR}/testfiles/tarray6.h5 - ${HDF5_TOOLS_SRC_DIR}/testfiles/tarray7.h5 - ${HDF5_TOOLS_SRC_DIR}/testfiles/tattr.h5 - ${HDF5_TOOLS_SRC_DIR}/testfiles/tbitfields.h5 - ${HDF5_TOOLS_SRC_DIR}/testfiles/tcompound.h5 - ${HDF5_TOOLS_SRC_DIR}/testfiles/tcompound2.h5 - ${HDF5_TOOLS_SRC_DIR}/testfiles/tcompound_complex.h5 - ${HDF5_TOOLS_SRC_DIR}/testfiles/tdatareg.h5 - ${HDF5_TOOLS_SRC_DIR}/testfiles/tdset.h5 - ${HDF5_TOOLS_SRC_DIR}/testfiles/tdset2.h5 - ${HDF5_TOOLS_SRC_DIR}/testfiles/tempty.h5 - ${HDF5_TOOLS_SRC_DIR}/testfiles/tenum.h5 - ${HDF5_TOOLS_SRC_DIR}/testfiles/textlink.h5 - ${HDF5_TOOLS_SRC_DIR}/testfiles/tfpformat.h5 - ${HDF5_TOOLS_SRC_DIR}/testfiles/tgroup.h5 - ${HDF5_TOOLS_SRC_DIR}/testfiles/thlink.h5 - ${HDF5_TOOLS_SRC_DIR}/testfiles/tloop.h5 - ${HDF5_TOOLS_SRC_DIR}/testfiles/tloop2.h5 - ${HDF5_TOOLS_SRC_DIR}/testfiles/tmany.h5 - ${HDF5_TOOLS_SRC_DIR}/testfiles/tname-amp.h5 - ${HDF5_TOOLS_SRC_DIR}/testfiles/tname-apos.h5 - ${HDF5_TOOLS_SRC_DIR}/testfiles/tname-gt.h5 - ${HDF5_TOOLS_SRC_DIR}/testfiles/tname-lt.h5 - ${HDF5_TOOLS_SRC_DIR}/testfiles/tname-quot.h5 - ${HDF5_TOOLS_SRC_DIR}/testfiles/tname-sp.h5 - ${HDF5_TOOLS_SRC_DIR}/testfiles/tnamed_dtype_attr.h5 - ${HDF5_TOOLS_SRC_DIR}/testfiles/tnestedcomp.h5 - ${HDF5_TOOLS_SRC_DIR}/testfiles/tnodata.h5 - ${HDF5_TOOLS_SRC_DIR}/testfiles/tobjref.h5 - ${HDF5_TOOLS_SRC_DIR}/testfiles/topaque.h5 - ${HDF5_TOOLS_SRC_DIR}/testfiles/torderattr.h5 - ${HDF5_TOOLS_SRC_DIR}/testfiles/tref.h5 - ${HDF5_TOOLS_SRC_DIR}/testfiles/tref-escapes.h5 - ${HDF5_TOOLS_SRC_DIR}/testfiles/tref-escapes-at.h5 - ${HDF5_TOOLS_SRC_DIR}/testfiles/tsaf.h5 - ${HDF5_TOOLS_SRC_DIR}/testfiles/tslink.h5 - ${HDF5_TOOLS_SRC_DIR}/testfiles/tstring.h5 - ${HDF5_TOOLS_SRC_DIR}/testfiles/tstring-at.h5 - ${HDF5_TOOLS_SRC_DIR}/testfiles/tstr.h5 - ${HDF5_TOOLS_SRC_DIR}/testfiles/tstr2.h5 - ${HDF5_TOOLS_SRC_DIR}/testfiles/tudlink.h5 - ${HDF5_TOOLS_SRC_DIR}/testfiles/tvldtypes1.h5 - ${HDF5_TOOLS_SRC_DIR}/testfiles/tvldtypes2.h5 - ${HDF5_TOOLS_SRC_DIR}/testfiles/tvldtypes3.h5 - ${HDF5_TOOLS_SRC_DIR}/testfiles/tvldtypes4.h5 - ${HDF5_TOOLS_SRC_DIR}/testfiles/tvldtypes5.h5 - ${HDF5_TOOLS_SRC_DIR}/testfiles/tvlstr.h5 - ) - SET (HDF5_XML_REFERENCE_FILES - ${HDF5_TOOLS_SRC_DIR}/testfiles/tall.h5.xml - ${HDF5_TOOLS_SRC_DIR}/testfiles/tall-2A.h5.xml - ${HDF5_TOOLS_SRC_DIR}/testfiles/tarray1.h5.xml - ${HDF5_TOOLS_SRC_DIR}/testfiles/tarray2.h5.xml - ${HDF5_TOOLS_SRC_DIR}/testfiles/tarray3.h5.xml - ${HDF5_TOOLS_SRC_DIR}/testfiles/tarray6.h5.xml - ${HDF5_TOOLS_SRC_DIR}/testfiles/tarray7.h5.xml - ${HDF5_TOOLS_SRC_DIR}/testfiles/tattr.h5.xml - ${HDF5_TOOLS_SRC_DIR}/testfiles/tbitfields.h5.xml - ${HDF5_TOOLS_SRC_DIR}/testfiles/tcompound_complex.h5.xml - ${HDF5_TOOLS_SRC_DIR}/testfiles/tcompound.h5.xml - ${HDF5_TOOLS_SRC_DIR}/testfiles/tcompound2.h5.xml - ${HDF5_TOOLS_SRC_DIR}/testfiles/tdatareg.h5.xml - ${HDF5_TOOLS_SRC_DIR}/testfiles/tdset.h5.xml - ${HDF5_TOOLS_SRC_DIR}/testfiles/tdset2.h5.xml - ${HDF5_TOOLS_SRC_DIR}/testfiles/tempty.h5.xml - ${HDF5_TOOLS_SRC_DIR}/testfiles/tempty-dtd.h5.xml - ${HDF5_TOOLS_SRC_DIR}/testfiles/tempty-dtd-2.h5.xml - ${HDF5_TOOLS_SRC_DIR}/testfiles/tempty-dtd-uri.h5.xml - ${HDF5_TOOLS_SRC_DIR}/testfiles/tempty-nons.h5.xml - ${HDF5_TOOLS_SRC_DIR}/testfiles/tempty-nons-2.h5.xml - ${HDF5_TOOLS_SRC_DIR}/testfiles/tempty-nons-uri.h5.xml - ${HDF5_TOOLS_SRC_DIR}/testfiles/tempty-ns.h5.xml - ${HDF5_TOOLS_SRC_DIR}/testfiles/tempty-ns-2.h5.xml - ${HDF5_TOOLS_SRC_DIR}/testfiles/tenum.h5.xml - ${HDF5_TOOLS_SRC_DIR}/testfiles/textlink.h5.xml - ${HDF5_TOOLS_SRC_DIR}/testfiles/tfpformat.h5.xml - ${HDF5_TOOLS_SRC_DIR}/testfiles/tgroup.h5.xml - ${HDF5_TOOLS_SRC_DIR}/testfiles/thlink.h5.xml - ${HDF5_TOOLS_SRC_DIR}/testfiles/tloop.h5.xml - ${HDF5_TOOLS_SRC_DIR}/testfiles/tloop2.h5.xml - ${HDF5_TOOLS_SRC_DIR}/testfiles/tmany.h5.xml - ${HDF5_TOOLS_SRC_DIR}/testfiles/tname-amp.h5.xml - ${HDF5_TOOLS_SRC_DIR}/testfiles/tname-apos.h5.xml - ${HDF5_TOOLS_SRC_DIR}/testfiles/tnamed_dtype_attr.h5.xml - ${HDF5_TOOLS_SRC_DIR}/testfiles/tname-gt.h5.xml - ${HDF5_TOOLS_SRC_DIR}/testfiles/tname-lt.h5.xml - ${HDF5_TOOLS_SRC_DIR}/testfiles/tname-quot.h5.xml - ${HDF5_TOOLS_SRC_DIR}/testfiles/tname-sp.h5.xml - ${HDF5_TOOLS_SRC_DIR}/testfiles/tnestedcomp.h5.xml - ${HDF5_TOOLS_SRC_DIR}/testfiles/tnodata.h5.xml - ${HDF5_TOOLS_SRC_DIR}/testfiles/tobjref.h5.xml - ${HDF5_TOOLS_SRC_DIR}/testfiles/topaque.h5.xml - ${HDF5_TOOLS_SRC_DIR}/testfiles/torderattr1.h5.xml - ${HDF5_TOOLS_SRC_DIR}/testfiles/torderattr2.h5.xml - ${HDF5_TOOLS_SRC_DIR}/testfiles/torderattr3.h5.xml - ${HDF5_TOOLS_SRC_DIR}/testfiles/torderattr4.h5.xml - ${HDF5_TOOLS_SRC_DIR}/testfiles/tref.h5.xml - ${HDF5_TOOLS_SRC_DIR}/testfiles/tref-escapes.h5.xml - ${HDF5_TOOLS_SRC_DIR}/testfiles/tref-escapes-at.h5.xml - ${HDF5_TOOLS_SRC_DIR}/testfiles/tsaf.h5.xml - ${HDF5_TOOLS_SRC_DIR}/testfiles/tslink.h5.xml - ${HDF5_TOOLS_SRC_DIR}/testfiles/tstr.h5.xml - ${HDF5_TOOLS_SRC_DIR}/testfiles/tstr2.h5.xml - ${HDF5_TOOLS_SRC_DIR}/testfiles/tstring.h5.xml - ${HDF5_TOOLS_SRC_DIR}/testfiles/tstring-at.h5.xml - ${HDF5_TOOLS_SRC_DIR}/testfiles/tudlink.h5.xml - ${HDF5_TOOLS_SRC_DIR}/testfiles/tvldtypes1.h5.xml - ${HDF5_TOOLS_SRC_DIR}/testfiles/tvldtypes2.h5.xml - ${HDF5_TOOLS_SRC_DIR}/testfiles/tvldtypes3.h5.xml - ${HDF5_TOOLS_SRC_DIR}/testfiles/tvldtypes4.h5.xml - ${HDF5_TOOLS_SRC_DIR}/testfiles/tvldtypes5.h5.xml - ${HDF5_TOOLS_SRC_DIR}/testfiles/tvlstr.h5.xml - ) - - FOREACH (tst_xml_h5_file ${HDF5_XML_REFERENCE_TEST_FILES}) - GET_FILENAME_COMPONENT(fname "${tst_xml_h5_file}" NAME) - SET (dest "${PROJECT_BINARY_DIR}/testfiles/xml/${fname}") - #MESSAGE (STATUS " Copying ${tst_xml_h5_file}") - ADD_CUSTOM_COMMAND ( - TARGET h5dump - POST_BUILD - COMMAND ${CMAKE_COMMAND} - ARGS -E copy_if_different ${tst_xml_h5_file} ${dest} - ) - ENDFOREACH (tst_xml_h5_file ${HDF5_XML_REFERENCE_TEST_FILES}) - - FOREACH (tst_xml_other_file ${HDF5_XML_REFERENCE_FILES}) - GET_FILENAME_COMPONENT(fname "${tst_xml_other_file}" NAME) - SET (dest "${PROJECT_BINARY_DIR}/testfiles/xml/${fname}") - #MESSAGE (STATUS " Copying ${tst_xml_other_file}") - ADD_CUSTOM_COMMAND ( - TARGET h5dump - POST_BUILD - COMMAND ${CMAKE_COMMAND} - ARGS -E copy_if_different ${tst_xml_other_file} ${dest} - ) - ENDFOREACH (tst_xml_other_file ${HDF5_XML_REFERENCE_FILES}) - - # -------------------------------------------------------------------- - # Packed Bits - # -------------------------------------------------------------------- - #-- Copy all the HDF5 files from the test directory into the source directory - SET (HDF5_REFERENCE_PBITS - ${HDF5_TOOLS_SRC_DIR}/testfiles/tnofilename-with-packed-bits.ddl - ${HDF5_TOOLS_SRC_DIR}/testfiles/tpbitsArray.ddl - ${HDF5_TOOLS_SRC_DIR}/testfiles/tpbitsCompound.ddl - ${HDF5_TOOLS_SRC_DIR}/testfiles/tpbitsIncomplete.ddl - ${HDF5_TOOLS_SRC_DIR}/testfiles/tpbitsLengthExceeded.ddl - ${HDF5_TOOLS_SRC_DIR}/testfiles/tpbitsCharLengthExceeded.ddl - ${HDF5_TOOLS_SRC_DIR}/testfiles/tpbitsIntLengthExceeded.ddl - ${HDF5_TOOLS_SRC_DIR}/testfiles/tpbitsLongLengthExceeded.ddl - ${HDF5_TOOLS_SRC_DIR}/testfiles/tpbitsLengthPositive.ddl - ${HDF5_TOOLS_SRC_DIR}/testfiles/tpbitsMax.ddl - ${HDF5_TOOLS_SRC_DIR}/testfiles/tpbitsMaxExceeded.ddl - ${HDF5_TOOLS_SRC_DIR}/testfiles/tpbitsOffsetExceeded.ddl - ${HDF5_TOOLS_SRC_DIR}/testfiles/tpbitsCharOffsetExceeded.ddl - ${HDF5_TOOLS_SRC_DIR}/testfiles/tpbitsIntOffsetExceeded.ddl - ${HDF5_TOOLS_SRC_DIR}/testfiles/tpbitsLongOffsetExceeded.ddl - ${HDF5_TOOLS_SRC_DIR}/testfiles/tpbitsOffsetNegative.ddl - ${HDF5_TOOLS_SRC_DIR}/testfiles/tpbitsOverlapped.ddl - ${HDF5_TOOLS_SRC_DIR}/testfiles/tpbitsSigned.ddl - ${HDF5_TOOLS_SRC_DIR}/testfiles/tpbitsUnsigned.ddl - ${HDF5_TOOLS_SRC_DIR}/testfiles/tpbitsSignedInt.ddl - ${HDF5_TOOLS_SRC_DIR}/testfiles/tpbitsUnsignedInt.ddl - ${HDF5_TOOLS_SRC_DIR}/testfiles/tpbitsSignedLong.ddl - ${HDF5_TOOLS_SRC_DIR}/testfiles/tpbitsUnsignedLong.ddl - ${HDF5_TOOLS_SRC_DIR}/testfiles/tpbitsSignedLongLong.ddl - ${HDF5_TOOLS_SRC_DIR}/testfiles/tpbitsUnsignedLongLong.ddl - ${HDF5_TOOLS_SRC_DIR}/testfiles/tpbitsSignedWhole.ddl - ${HDF5_TOOLS_SRC_DIR}/testfiles/tpbitsUnsignedWhole.ddl - ${HDF5_TOOLS_SRC_DIR}/testfiles/tpbitsSignedIntWhole.ddl - ${HDF5_TOOLS_SRC_DIR}/testfiles/tpbitsUnsignedIntWhole.ddl - ${HDF5_TOOLS_SRC_DIR}/testfiles/tpbitsSignedLongWhole.ddl - ${HDF5_TOOLS_SRC_DIR}/testfiles/tpbitsUnsignedLongWhole.ddl - ${HDF5_TOOLS_SRC_DIR}/testfiles/tpbitsSignedLongLongWhole.ddl - ${HDF5_TOOLS_SRC_DIR}/testfiles/tpbitsUnsignedLongLongWhole.ddl - ${HDF5_TOOLS_SRC_DIR}/testfiles/tpbitsSignedLongLongWhole1.ddl - ${HDF5_TOOLS_SRC_DIR}/testfiles/tpbitsUnsignedLongLongWhole1.ddl - ${HDF5_TOOLS_SRC_DIR}/testfiles/tpbitsSignedLongLongWhole63.ddl - ${HDF5_TOOLS_SRC_DIR}/testfiles/tpbitsUnsignedLongLongWhole63.ddl - ${HDF5_TOOLS_SRC_DIR}/testfiles/tpbitsSigned4.ddl - ${HDF5_TOOLS_SRC_DIR}/testfiles/tpbitsUnsigned4.ddl - ${HDF5_TOOLS_SRC_DIR}/testfiles/tpbitsSignedInt8.ddl - ${HDF5_TOOLS_SRC_DIR}/testfiles/tpbitsUnsignedInt8.ddl - ${HDF5_TOOLS_SRC_DIR}/testfiles/tpbitsSignedLong16.ddl - ${HDF5_TOOLS_SRC_DIR}/testfiles/tpbitsUnsignedLong16.ddl - ${HDF5_TOOLS_SRC_DIR}/testfiles/tpbitsSignedLongLong32.ddl - ${HDF5_TOOLS_SRC_DIR}/testfiles/tpbitsUnsignedLongLong32.ddl - ${HDF5_TOOLS_SRC_DIR}/testfiles/tpbitsSigned2.ddl - ${HDF5_TOOLS_SRC_DIR}/testfiles/tpbitsUnsigned2.ddl - ${HDF5_TOOLS_SRC_DIR}/testfiles/tpbitsSignedInt4.ddl - ${HDF5_TOOLS_SRC_DIR}/testfiles/tpbitsUnsignedInt4.ddl - ${HDF5_TOOLS_SRC_DIR}/testfiles/tpbitsSignedLong8.ddl - ${HDF5_TOOLS_SRC_DIR}/testfiles/tpbitsUnsignedLong8.ddl - ${HDF5_TOOLS_SRC_DIR}/testfiles/tpbitsSignedLongLong16.ddl - ${HDF5_TOOLS_SRC_DIR}/testfiles/tpbitsUnsignedLongLong16.ddl - ) - SET (HDF5_REFERENCE_TEST_PBITS - ${HDF5_TOOLS_SRC_DIR}/testfiles/packedbits.h5 - ${HDF5_TOOLS_SRC_DIR}/testfiles/tarray1.h5 - ${HDF5_TOOLS_SRC_DIR}/testfiles/tcompound.h5 - ) - SET (HDF5_ERROR_REFERENCE_PBITS - ${PROJECT_SOURCE_DIR}/errfiles/tnofilename-with-packed-bits.err - ${PROJECT_SOURCE_DIR}/errfiles/tpbitsCharLengthExceeded.err - ${PROJECT_SOURCE_DIR}/errfiles/tpbitsCharOffsetExceeded.err - ${PROJECT_SOURCE_DIR}/errfiles/tpbitsIncomplete.err - ${PROJECT_SOURCE_DIR}/errfiles/tpbitsIntLengthExceeded.err - ${PROJECT_SOURCE_DIR}/errfiles/tpbitsIntOffsetExceeded.err - ${PROJECT_SOURCE_DIR}/errfiles/tpbitsLengthExceeded.err - ${PROJECT_SOURCE_DIR}/errfiles/tpbitsLengthPositive.err - ${PROJECT_SOURCE_DIR}/errfiles/tpbitsLongLengthExceeded.err - ${PROJECT_SOURCE_DIR}/errfiles/tpbitsLongOffsetExceeded.err - ${PROJECT_SOURCE_DIR}/errfiles/tpbitsMaxExceeded.err - ${PROJECT_SOURCE_DIR}/errfiles/tpbitsOffsetExceeded.err - ${PROJECT_SOURCE_DIR}/errfiles/tpbitsOffsetNegative.err - ) - - FOREACH (pbits_h5_file ${HDF5_REFERENCE_TEST_PBITS}) - GET_FILENAME_COMPONENT(fname "${pbits_h5_file}" NAME) - SET (dest "${PROJECT_BINARY_DIR}/testfiles/pbits/${fname}") - #MESSAGE (STATUS " Copying ${pbits_h5_file}") - ADD_CUSTOM_COMMAND ( - TARGET h5dump - POST_BUILD - COMMAND ${CMAKE_COMMAND} - ARGS -E copy_if_different ${pbits_h5_file} ${dest} - ) - ENDFOREACH (pbits_h5_file ${HDF5_REFERENCE_TEST_PBITS}) - - - FOREACH (ddl_pbits ${HDF5_REFERENCE_PBITS}) - GET_FILENAME_COMPONENT(fname "${ddl_pbits}" NAME) - SET (ddldest "${PROJECT_BINARY_DIR}/testfiles/pbits/${fname}") - #MESSAGE (STATUS " Copying ${ddl_pbits}") - ADD_CUSTOM_COMMAND ( - TARGET h5dump - POST_BUILD - COMMAND ${CMAKE_COMMAND} - ARGS -E copy_if_different ${ddl_pbits} ${ddldest} - ) - ENDFOREACH (ddl_pbits ${HDF5_REFERENCE_PBITS}) - - FOREACH (ddl_pbits ${HDF5_ERROR_REFERENCE_PBITS}) - GET_FILENAME_COMPONENT(fname "${ddl_pbits}" NAME) - SET (ddldest "${PROJECT_BINARY_DIR}/testfiles/pbits/${fname}") - #MESSAGE (STATUS " Copying ${ddl_pbits}") - ADD_CUSTOM_COMMAND ( - TARGET h5dump - POST_BUILD - COMMAND ${CMAKE_COMMAND} - ARGS -E copy_if_different ${ddl_pbits} ${ddldest} - ) - ENDFOREACH (ddl_pbits ${HDF5_ERROR_REFERENCE_PBITS}) - -############################################################################## -############################################################################## -### T H E T E S T S M A C R O S ### -############################################################################## -############################################################################## - - MACRO (ADD_HELP_TEST testname resultcode) - # If using memchecker add tests without using scripts - IF (HDF5_ENABLE_USING_MEMCHECKER) - ADD_TEST (NAME H5DUMP-${testname} COMMAND $ ${ARGN}) - SET_TESTS_PROPERTIES (H5DUMP-${testname} PROPERTIES WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles/std") - IF (NOT "${last_test}" STREQUAL "") - SET_TESTS_PROPERTIES (H5DUMP-${testname} PROPERTIES DEPENDS ${last_test}) - ENDIF (NOT "${last_test}" STREQUAL "") - SET (last_test "H5DUMP-${testname}") - ELSE (HDF5_ENABLE_USING_MEMCHECKER) - ADD_TEST ( - NAME H5DUMP-h5dump-${testname}-clear-objects - COMMAND ${CMAKE_COMMAND} - -E remove h5dump-${testname}.out h5dump-${testname}.out.err - ) - SET_TESTS_PROPERTIES (H5DUMP-h5dump-${testname}-clear-objects PROPERTIES WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles/std") - ADD_TEST ( - NAME H5DUMP-h5dump-${testname} - COMMAND "${CMAKE_COMMAND}" - -D "TEST_PROGRAM=$" - -D "TEST_ARGS:STRING=${ARGN}" - -D "TEST_FOLDER=${PROJECT_BINARY_DIR}/testfiles/std" - -D "TEST_OUTPUT=h5dump-${testname}.out" - -D "TEST_EXPECT=${resultcode}" - -D "TEST_REFERENCE=h5dump-${testname}.txt" - -P "${HDF5_RESOURCES_DIR}/runTest.cmake" - ) - SET_TESTS_PROPERTIES (H5DUMP-h5dump-${testname} PROPERTIES DEPENDS "H5DUMP-h5dump-${testname}-clear-objects") - ENDIF (HDF5_ENABLE_USING_MEMCHECKER) - ENDMACRO (ADD_HELP_TEST) - - MACRO (ADD_SKIP_H5_TEST skipresultfile skipresultcode testtype) - IF (${testtype} STREQUAL "SKIP") - IF (NOT HDF5_ENABLE_USING_MEMCHECKER) - ADD_TEST ( - NAME H5DUMP-${skipresultfile}-SKIPPED - COMMAND ${CMAKE_COMMAND} -E echo "SKIP ${skipresultfile} ${ARGN}" - ) - ENDIF (NOT HDF5_ENABLE_USING_MEMCHECKER) - ELSE (${testtype} STREQUAL "SKIP") - ADD_H5_TEST (${skipresultfile} ${skipresultcode} ${ARGN}) - ENDIF (${testtype} STREQUAL "SKIP") - ENDMACRO (ADD_SKIP_H5_TEST) - - MACRO (ADD_H5_TEST resultfile resultcode) - # If using memchecker add tests without using scripts - IF (HDF5_ENABLE_USING_MEMCHECKER) - ADD_TEST (NAME H5DUMP-${resultfile} COMMAND $ ${ARGN}) - SET_TESTS_PROPERTIES (H5DUMP-${resultfile} PROPERTIES WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles/std") - IF (NOT ${resultcode} STREQUAL "0") - SET_TESTS_PROPERTIES (H5DUMP-${resultfile} PROPERTIES WILL_FAIL "true") - ENDIF (NOT ${resultcode} STREQUAL "0") - IF (NOT "${last_test}" STREQUAL "") - SET_TESTS_PROPERTIES (H5DUMP-${resultfile} PROPERTIES DEPENDS ${last_test}) - ENDIF (NOT "${last_test}" STREQUAL "") - ELSE (HDF5_ENABLE_USING_MEMCHECKER) - ADD_TEST ( - NAME H5DUMP-${resultfile}-clear-objects - COMMAND ${CMAKE_COMMAND} - -E remove ${resultfile}.bin ${resultfile}.out ${resultfile}.out.err - ) - SET_TESTS_PROPERTIES (H5DUMP-${resultfile}-clear-objects PROPERTIES WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles/std") - ADD_TEST ( - NAME H5DUMP-${resultfile} - COMMAND "${CMAKE_COMMAND}" - -D "TEST_PROGRAM=$" - -D "TEST_ARGS:STRING=${ARGN}" - -D "TEST_FOLDER=${PROJECT_BINARY_DIR}/testfiles/std" - -D "TEST_OUTPUT=${resultfile}.out" - -D "TEST_EXPECT=${resultcode}" - -D "TEST_REFERENCE=${resultfile}.ddl" - -P "${HDF5_RESOURCES_DIR}/runTest.cmake" - ) - SET_TESTS_PROPERTIES (H5DUMP-${resultfile} PROPERTIES DEPENDS "H5DUMP-${resultfile}-clear-objects") - ENDIF (HDF5_ENABLE_USING_MEMCHECKER) - ENDMACRO (ADD_H5_TEST file) - - MACRO (ADD_H5_TEST_N resultfile resultcode) - # If using memchecker add tests without using scripts - IF (HDF5_ENABLE_USING_MEMCHECKER) - ADD_TEST (NAME H5DUMP-N-${resultfile} COMMAND $ ${ARGN}) - SET_TESTS_PROPERTIES (H5DUMP-N-${resultfile} PROPERTIES WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles/std") - IF (NOT ${resultcode} STREQUAL "0") - SET_TESTS_PROPERTIES (H5DUMP-N-${resultfile} PROPERTIES WILL_FAIL "true") - ENDIF (NOT ${resultcode} STREQUAL "0") - IF (NOT "${last_test}" STREQUAL "") - SET_TESTS_PROPERTIES (H5DUMP-N-${resultfile} PROPERTIES DEPENDS ${last_test}) - ENDIF (NOT "${last_test}" STREQUAL "") - ELSE (HDF5_ENABLE_USING_MEMCHECKER) - ADD_TEST ( - NAME H5DUMP-N-${resultfile}-clear-objects - COMMAND ${CMAKE_COMMAND} - -E remove ${resultfile}-N.bin ${resultfile}-N.out ${resultfile}-N.out.err - ) - SET_TESTS_PROPERTIES (H5DUMP-N-${resultfile}-clear-objects PROPERTIES WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles/std") - ADD_TEST ( - NAME H5DUMP-N-${resultfile} - COMMAND "${CMAKE_COMMAND}" - -D "TEST_PROGRAM=$" - -D "TEST_ARGS:STRING=${ARGN}" - -D "TEST_FOLDER=${PROJECT_BINARY_DIR}/testfiles/std" - -D "TEST_OUTPUT=${resultfile}-N.out" - -D "TEST_EXPECT=${resultcode}" - -D "TEST_REFERENCE=${resultfile}.ddl" - -P "${HDF5_RESOURCES_DIR}/runTest.cmake" - ) - SET_TESTS_PROPERTIES (H5DUMP-N-${resultfile} PROPERTIES DEPENDS "H5DUMP-N-${resultfile}-clear-objects") - ENDIF (HDF5_ENABLE_USING_MEMCHECKER) - ENDMACRO (ADD_H5_TEST_N file) - - MACRO (ADD_H5_TEST_EXPORT resultfile targetfile resultcode) - # If using memchecker add tests without using scripts - IF (HDF5_ENABLE_USING_MEMCHECKER) - ADD_TEST (NAME H5DUMP-${resultfile} COMMAND $ ${ARGN} ${resultfile}.txt ${targetfile}) - SET_TESTS_PROPERTIES (H5DUMP-${resultfile} PROPERTIES WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles/std") - IF (NOT ${resultcode} STREQUAL "0") - SET_TESTS_PROPERTIES (H5DUMP-${resultfile} PROPERTIES WILL_FAIL "true") - ENDIF (NOT ${resultcode} STREQUAL "0") - IF (NOT "${last_test}" STREQUAL "") - SET_TESTS_PROPERTIES (H5DUMP-${resultfile} PROPERTIES DEPENDS ${last_test}) - ENDIF (NOT "${last_test}" STREQUAL "") - ELSE (HDF5_ENABLE_USING_MEMCHECKER) - ADD_TEST ( - NAME H5DUMP-${resultfile}-clear-objects - COMMAND ${CMAKE_COMMAND} - -E remove ${resultfile}.txt ${resultfile}.out ${resultfile}.out.err - ) - SET_TESTS_PROPERTIES (H5DUMP-${resultfile}-clear-objects PROPERTIES WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles/std") - ADD_TEST ( - NAME H5DUMP-${resultfile} - COMMAND "${CMAKE_COMMAND}" - -D "TEST_PROGRAM=$" - -D "TEST_ARGS:STRING=${ARGN};${resultfile}.txt;${targetfile}" - -D "TEST_FOLDER=${PROJECT_BINARY_DIR}/testfiles/std" - -D "TEST_OUTPUT=${resultfile}.out" - -D "TEST_EXPECT=${resultcode}" - -D "TEST_REFERENCE=${resultfile}.ddl" - -P "${HDF5_RESOURCES_DIR}/runTest.cmake" - ) - SET_TESTS_PROPERTIES (H5DUMP-${resultfile} PROPERTIES DEPENDS "H5DUMP-${resultfile}-clear-objects") - ADD_TEST ( - NAME H5DUMP-${resultfile}-output-cmp - COMMAND ${CMAKE_COMMAND} - -E compare_files ${resultfile}.txt ${resultfile}.exp - ) - SET_TESTS_PROPERTIES (H5DUMP-${resultfile}-output-cmp PROPERTIES WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles/std") - SET_TESTS_PROPERTIES (H5DUMP-${resultfile}-output-cmp PROPERTIES DEPENDS H5DUMP-${resultfile}) - ENDIF (HDF5_ENABLE_USING_MEMCHECKER) - ENDMACRO (ADD_H5_TEST_EXPORT file) - - MACRO (ADD_H5_TEST_EXPORT_DDL resultfile targetfile resultcode ddlfile) - # If using memchecker add tests without using scripts - IF (HDF5_ENABLE_USING_MEMCHECKER) - ADD_TEST (NAME H5DUMP-${resultfile} COMMAND $ --ddl=${ddlfile}.txt ${ARGN} ${resultfile}.txt ${targetfile}) - SET_TESTS_PROPERTIES (H5DUMP-${resultfile} PROPERTIES WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles/std") - IF (NOT ${resultcode} STREQUAL "0") - SET_TESTS_PROPERTIES (H5DUMP-${resultfile} PROPERTIES WILL_FAIL "true") - ENDIF (NOT ${resultcode} STREQUAL "0") - IF (NOT "${last_test}" STREQUAL "") - SET_TESTS_PROPERTIES (H5DUMP-${resultfile} PROPERTIES DEPENDS ${last_test}) - ENDIF (NOT "${last_test}" STREQUAL "") - ELSE (HDF5_ENABLE_USING_MEMCHECKER) - ADD_TEST ( - NAME H5DUMP-${resultfile}-clear-objects - COMMAND ${CMAKE_COMMAND} - -E remove ${ddlfile}.txt ${resultfile}.txt ${resultfile}.out ${resultfile}.out.err - ) - SET_TESTS_PROPERTIES (H5DUMP-${resultfile}-clear-objects PROPERTIES WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles/std") - ADD_TEST ( - NAME H5DUMP-${resultfile} - COMMAND "${CMAKE_COMMAND}" - -D "TEST_PROGRAM=$" - -D "TEST_ARGS:STRING=--ddl=${ddlfile}.txt;${ARGN};${resultfile}.txt;${targetfile}" - -D "TEST_FOLDER=${PROJECT_BINARY_DIR}/testfiles/std" - -D "TEST_OUTPUT=${resultfile}.out" - -D "TEST_EXPECT=${resultcode}" - -D "TEST_REFERENCE=${resultfile}.ddl" - -P "${HDF5_RESOURCES_DIR}/runTest.cmake" - ) - SET_TESTS_PROPERTIES (H5DUMP-${resultfile} PROPERTIES DEPENDS "H5DUMP-${resultfile}-clear-objects") - ADD_TEST ( - NAME H5DUMP-${resultfile}-output-cmp - COMMAND ${CMAKE_COMMAND} - -E compare_files ${resultfile}.txt ${resultfile}.exp - ) - SET_TESTS_PROPERTIES (H5DUMP-${resultfile}-output-cmp PROPERTIES WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles/std") - SET_TESTS_PROPERTIES (H5DUMP-${resultfile}-output-cmp PROPERTIES DEPENDS H5DUMP-${resultfile}) - ADD_TEST ( - NAME H5DUMP-${resultfile}-output-cmp-ddl - COMMAND ${CMAKE_COMMAND} - -E compare_files ${ddlfile}.txt ${ddlfile}.exp - ) - SET_TESTS_PROPERTIES (H5DUMP-${resultfile}-output-cmp-ddl PROPERTIES WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles/std") - SET_TESTS_PROPERTIES (H5DUMP-${resultfile}-output-cmp-ddl PROPERTIES DEPENDS H5DUMP-${resultfile}-output-cmp) - ENDIF (HDF5_ENABLE_USING_MEMCHECKER) - ENDMACRO (ADD_H5_TEST_EXPORT_DDL file) - - MACRO (ADD_H5_EXPORT_TEST resultfile targetfile resultcode) - IF (NOT HDF5_ENABLE_USING_MEMCHECKER) - ADD_TEST ( - NAME H5DUMP-output-${resultfile}-clear-objects - COMMAND ${CMAKE_COMMAND} - -E remove ${resultfile}.txt - ) - SET_TESTS_PROPERTIES (H5DUMP-output-${resultfile}-clear-objects PROPERTIES WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles/std") - ADD_TEST ( - NAME H5DUMP-output-${resultfile} - COMMAND $ ${ARGN} ${resultfile}.txt ${targetfile} - ) - SET_TESTS_PROPERTIES (H5DUMP-output-${resultfile} PROPERTIES WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles/std") - SET_TESTS_PROPERTIES (H5DUMP-output-${resultfile} PROPERTIES DEPENDS H5DUMP-output-${resultfile}-clear-objects) - ADD_TEST ( - NAME H5DUMP-output-cmp-${resultfile} - COMMAND ${CMAKE_COMMAND} - -E compare_files ${resultfile}.txt ${resultfile}.exp - ) - SET_TESTS_PROPERTIES (H5DUMP-output-cmp-${resultfile} PROPERTIES WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles/std") - SET_TESTS_PROPERTIES (H5DUMP-output-cmp-${resultfile} PROPERTIES DEPENDS H5DUMP-output-${resultfile}) - ENDIF (NOT HDF5_ENABLE_USING_MEMCHECKER) - ENDMACRO (ADD_H5_EXPORT_TEST file) - - MACRO (ADD_H5_MASK_TEST resultfile resultcode) - IF (NOT HDF5_ENABLE_USING_MEMCHECKER) - ADD_TEST ( - NAME H5DUMP-${resultfile}-clear-objects - COMMAND ${CMAKE_COMMAND} - -E remove ${resultfile}.out ${resultfile}.out.err - ) - SET_TESTS_PROPERTIES (H5DUMP-${resultfile}-clear-objects PROPERTIES WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles/std") - ADD_TEST ( - NAME H5DUMP-${resultfile} - COMMAND "${CMAKE_COMMAND}" - -D "TEST_PROGRAM=$" - -D "TEST_ARGS:STRING=${ARGN}" - -D "TEST_FOLDER=${PROJECT_BINARY_DIR}/testfiles/std" - -D "TEST_OUTPUT=${resultfile}.out" - -D "TEST_EXPECT=${resultcode}" - -D "TEST_REFERENCE=${resultfile}.ddl" - -D "TEST_MASK_ERROR=true" - -P "${HDF5_RESOURCES_DIR}/runTest.cmake" - ) - SET_TESTS_PROPERTIES (H5DUMP-${resultfile} PROPERTIES DEPENDS "H5DUMP-${resultfile}-clear-objects") - ENDIF (NOT HDF5_ENABLE_USING_MEMCHECKER) - ENDMACRO (ADD_H5_MASK_TEST file) - - MACRO (ADD_H5ERR_MASK_TEST resultfile resultcode) - IF (NOT HDF5_ENABLE_USING_MEMCHECKER) - ADD_TEST ( - NAME H5DUMP-${resultfile}-clear-objects - COMMAND ${CMAKE_COMMAND} - -E remove ${resultfile}.out ${resultfile}.out.err - ) - SET_TESTS_PROPERTIES (H5DUMP-${resultfile}-clear-objects PROPERTIES WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles/std") - ADD_TEST ( - NAME H5DUMP-${resultfile} - COMMAND "${CMAKE_COMMAND}" - -D "TEST_PROGRAM=$" - -D "TEST_ARGS:STRING=${ARGN}" - -D "TEST_FOLDER=${PROJECT_BINARY_DIR}/testfiles/std" - -D "TEST_OUTPUT=${resultfile}.out" - -D "TEST_EXPECT=${resultcode}" - -D "TEST_REFERENCE=${resultfile}.ddl" - -D "TEST_ERRREF=${resultfile}.err" - -D "TEST_MASK_ERROR=true" - -P "${HDF5_RESOURCES_DIR}/runTest.cmake" - ) - SET_TESTS_PROPERTIES (H5DUMP-${resultfile} PROPERTIES DEPENDS "H5DUMP-${resultfile}-clear-objects") - ENDIF (NOT HDF5_ENABLE_USING_MEMCHECKER) - ENDMACRO (ADD_H5ERR_MASK_TEST file) - - MACRO (ADD_H5ERR_MASK_ENV_TEST resultfile resultcode envvar envval) - IF (NOT HDF5_ENABLE_USING_MEMCHECKER) - ADD_TEST ( - NAME H5DUMP-${resultfile}-clear-objects - COMMAND ${CMAKE_COMMAND} - -E remove ${resultfile}.out ${resultfile}.out.err - ) - SET_TESTS_PROPERTIES (H5DUMP-${resultfile}-clear-objects PROPERTIES WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles/std") - ADD_TEST ( - NAME H5DUMP-${resultfile} - COMMAND "${CMAKE_COMMAND}" - -D "TEST_PROGRAM=$" - -D "TEST_ARGS:STRING=${ARGN}" - -D "TEST_FOLDER=${PROJECT_BINARY_DIR}/testfiles/std" - -D "TEST_OUTPUT=${resultfile}.out" - -D "TEST_EXPECT=${resultcode}" - -D "TEST_REFERENCE=${resultfile}.ddl" - -D "TEST_ERRREF=${resultfile}.err" - -D "TEST_MASK_ERROR=true" - -D "TEST_ENV_VAR:STRING=${envvar}" - -D "TEST_ENV_VALUE:STRING=${envval}" - -P "${HDF5_RESOURCES_DIR}/runTest.cmake" - ) - SET_TESTS_PROPERTIES (H5DUMP-${resultfile} PROPERTIES DEPENDS "H5DUMP-${resultfile}-clear-objects") - ENDIF (NOT HDF5_ENABLE_USING_MEMCHECKER) - ENDMACRO (ADD_H5ERR_MASK_ENV_TEST) - - MACRO (ADD_H5_TEST_IMPORT conffile resultfile testfile resultcode) - # If using memchecker add tests without using scripts - IF (NOT HDF5_ENABLE_USING_MEMCHECKER) - ADD_TEST ( - NAME H5DUMP-IMPORT-${resultfile}-clear-objects - COMMAND ${CMAKE_COMMAND} - -E remove ${conffile}.out ${conffile}.out.err ${resultfile}.bin ${resultfile}.h5 - ) - SET_TESTS_PROPERTIES (H5DUMP-IMPORT-${resultfile}-clear-objects PROPERTIES WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles/std") - ADD_TEST ( - NAME H5DUMP-IMPORT-${resultfile} - COMMAND "${CMAKE_COMMAND}" - -D "TEST_PROGRAM=$" - -D "TEST_ARGS:STRING=${ARGN};-o;${resultfile}.bin;${testfile}" - -D "TEST_FOLDER=${PROJECT_BINARY_DIR}/testfiles/std" - -D "TEST_OUTPUT=${conffile}.out" - -D "TEST_EXPECT=${resultcode}" - -D "TEST_REFERENCE=${conffile}.ddl" - -P "${HDF5_RESOURCES_DIR}/runTest.cmake" - ) - SET_TESTS_PROPERTIES (H5DUMP-IMPORT-${resultfile} PROPERTIES DEPENDS "H5DUMP-IMPORT-${resultfile}-clear-objects") - ADD_TEST (NAME H5DUMP-IMPORT-h5import-${resultfile} COMMAND h5import ${resultfile}.bin -c ${conffile}.out -o ${resultfile}.h5) - SET_TESTS_PROPERTIES (H5DUMP-IMPORT-h5import-${resultfile} PROPERTIES WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles/std") - SET_TESTS_PROPERTIES (H5DUMP-IMPORT-h5import-${resultfile} PROPERTIES DEPENDS H5DUMP-IMPORT-${resultfile}) - ADD_TEST (NAME H5DUMP-IMPORT-h5diff-${resultfile} COMMAND h5diff ${testfile} ${resultfile}.h5 /integer /integer) - SET_TESTS_PROPERTIES (H5DUMP-IMPORT-h5diff-${resultfile} PROPERTIES WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles/std") - SET_TESTS_PROPERTIES (H5DUMP-IMPORT-h5diff-${resultfile} PROPERTIES DEPENDS H5DUMP-IMPORT-h5import-${resultfile}) - ENDIF (NOT HDF5_ENABLE_USING_MEMCHECKER) - ENDMACRO (ADD_H5_TEST_IMPORT file) - - MACRO (ADD_H5_PBITS_TEST resultfile resultcode) - # If using memchecker add tests without using scripts - IF (HDF5_ENABLE_USING_MEMCHECKER) - ADD_TEST (NAME H5DUMP-${resultfile} COMMAND $ ${ARGN}) - SET_TESTS_PROPERTIES (H5DUMP-${resultfile} PROPERTIES WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles/pbits") - IF (NOT ${resultcode} STREQUAL "0") - SET_TESTS_PROPERTIES (H5DUMP-${resultfile} PROPERTIES WILL_FAIL "true") - ENDIF (NOT ${resultcode} STREQUAL "0") - IF (NOT "${last_pbits_test}" STREQUAL "") - SET_TESTS_PROPERTIES (H5DUMP-${resultfile} PROPERTIES DEPENDS ${last_pbits_test}) - ENDIF (NOT "${last_pbits_test}" STREQUAL "") - ELSE (HDF5_ENABLE_USING_MEMCHECKER) - ADD_TEST ( - NAME H5DUMP-${resultfile}-clear-objects - COMMAND ${CMAKE_COMMAND} - -E remove ${resultfile}.out ${resultfile}.out.err - ) - SET_TESTS_PROPERTIES (H5DUMP-${resultfile}-clear-objects PROPERTIES WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles/pbits") - ADD_TEST ( - NAME H5DUMP-${resultfile} - COMMAND "${CMAKE_COMMAND}" - -D "TEST_PROGRAM=$" - -D "TEST_ARGS:STRING=${ARGN}" - -D "TEST_FOLDER=${PROJECT_BINARY_DIR}/testfiles/pbits" - -D "TEST_OUTPUT=${resultfile}.out" - -D "TEST_EXPECT=${resultcode}" - -D "TEST_REFERENCE=${resultfile}.ddl" - -P "${HDF5_RESOURCES_DIR}/runTest.cmake" - ) - SET_TESTS_PROPERTIES (H5DUMP-${resultfile} PROPERTIES DEPENDS "H5DUMP-${resultfile}-clear-objects") - ENDIF (HDF5_ENABLE_USING_MEMCHECKER) - ENDMACRO (ADD_H5_PBITS_TEST file) - - MACRO (ADD_XML_SKIP_H5_TEST skipresultfile skipresultcode testtype) - IF (${testtype} STREQUAL "SKIP") - IF (NOT HDF5_ENABLE_USING_MEMCHECKER) - ADD_TEST ( - NAME H5DUMP-XML-${skipresultfile}-SKIPPED - COMMAND ${CMAKE_COMMAND} -E echo "SKIP ${skipresultfile}.xml --xml ${ARGN}" - ) - ENDIF (NOT HDF5_ENABLE_USING_MEMCHECKER) - ELSE (${testtype} STREQUAL "SKIP") - ADD_XML_H5_TEST (${skipresultfile} ${skipresultcode} ${ARGN}) - ENDIF (${testtype} STREQUAL "SKIP") - ENDMACRO (ADD_XML_SKIP_H5_TEST) - - MACRO (ADD_XML_H5_TEST resultfile resultcode) - IF (HDF5_ENABLE_USING_MEMCHECKER) - ADD_TEST (NAME H5DUMP-XML-${resultfile} COMMAND $ --xml ${ARGN}) - SET_TESTS_PROPERTIES (H5DUMP-XML-${resultfile} PROPERTIES WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles/xml") - IF (NOT ${resultcode} STREQUAL "0") - SET_TESTS_PROPERTIES (H5DUMP-XML-${resultfile} PROPERTIES WILL_FAIL "true") - ENDIF (NOT ${resultcode} STREQUAL "0") - IF (NOT "${last_xml_test}" STREQUAL "") - SET_TESTS_PROPERTIES (H5DUMP-XML-${resultfile} PROPERTIES DEPENDS ${last_xml_test}) - ENDIF (NOT "${last_xml_test}" STREQUAL "") - ELSE (HDF5_ENABLE_USING_MEMCHECKER) - ADD_TEST ( - NAME H5DUMP-XML-${resultfile}-clear-objects - COMMAND ${CMAKE_COMMAND} - -E remove ${resultfile}.out ${resultfile}.out.err - ) - SET_TESTS_PROPERTIES (H5DUMP-XML-${resultfile}-clear-objects PROPERTIES WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles/xml") - ADD_TEST ( - NAME H5DUMP-XML-${resultfile} - COMMAND "${CMAKE_COMMAND}" - -D "TEST_PROGRAM=$" - -D "TEST_ARGS:STRING=--xml;${ARGN}" - -D "TEST_FOLDER=${PROJECT_BINARY_DIR}/testfiles/xml" - -D "TEST_OUTPUT=${resultfile}.out" - -D "TEST_EXPECT=${resultcode}" - -D "TEST_REFERENCE=${resultfile}.xml" - -P "${HDF5_RESOURCES_DIR}/runTest.cmake" - ) - SET_TESTS_PROPERTIES (H5DUMP-XML-${resultfile} PROPERTIES DEPENDS "H5DUMP-XML-${resultfile}-clear-objects") - ENDIF (HDF5_ENABLE_USING_MEMCHECKER) - ENDMACRO (ADD_XML_H5_TEST file) - -############################################################################## -############################################################################## -### T H E T E S T S HDF5_ENABLE_USING_MEMCHECKER ### -############################################################################## -############################################################################## - - IF (HDF5_ENABLE_USING_MEMCHECKER) - # Remove any output file left over from previous test run - ADD_TEST ( - NAME H5DUMP-clearall-objects - COMMAND ${CMAKE_COMMAND} - -E remove - h5dump-help.out - charsets.out - charsets.out.err - file_space.out - file_space.out.err - filter_fail.out - filter_fail.out.err - packedbits.out - packedbits.out.err - tall-1.out - tall-1.out.err - tall-2.out - tall-2.out.err - tall-2A.out - tall-2A.out.err - tall-2A0.out - tall-2A0.out.err - tall-2B.out - tall-2B.out.err - tall-3.out - tall-3.out.err - tall-4s.out - tall-4s.out.err - tall-5s.out - tall-5s.out.err - tall-6.txt - tall-6.out - tall-6.out.err - tall-7.out - tall-7.out.err - tall-7N.out - tall-7N.out.err - tallfilters.out - tallfilters.out.err - tarray1.out - tarray1.out.err - tarray1_big.out - tarray1_big.out.err - tarray2.out - tarray2.out.err - tarray3.out - tarray3.out.err - tarray4.out - tarray4.out.err - tarray5.out - tarray5.out.err - tarray6.out - tarray6.out.err - tarray7.out - tarray7.out.err - tarray8.out - tarray8.out.err - tattr-1.out - tattr-1.out.err - tattr-2.out - tattr-2.out.err - tattr-3.out - tattr-3.out.err - tattr-4_be.out - tattr-4_be.out.err - tattrcontents1.out - tattrcontents1.out.err - tattrcontents2.out - tattrcontents2.out.err - tattrintsize.out - tattrintsize.out.err - tattrreg.out - tattrreg.out.err - tattrregR.out - tattrregR.out.err - tbin1LE.bin - tbinregR.txt - tbinregR.out - tbinregR.out.err - tbigdims.out - tbigdims.out.err - tboot1.out - tboot1.out.err - tboot2.out - tboot2.out.err - tchar1.out - tchar1.out.err - tchunked.out - tchunked.out.err - tcmpdattrintsize.out - tcmpdattrintsize.out.err - tcmpdintsize.out - tcmpdintsize.out.err - tcomp-1.out - tcomp-1.out.err - tcomp-2.out - tcomp-2.out.err - tcomp-3.out - tcomp-3.out.err - tcomp-4.out - tcomp-4.out.err - tcompact.out - tcompact.out.err - tcontents.out - tcontents.out.err - tcontiguos.out - tcontiguos.out.err - tdatareg.out - tdatareg.out.err - tdataregR.out - tdataregR.out.err - tdeflate.out - tdeflate.out.err - tdset-1.out - tdset-1.out.err - tdset-2.out - tdset-2.out.err - tdset-3s.out - tdset-3s.out.err - tempty.out - tempty.out.err - texternal.out - texternal.out.err - textlinksrc.out - textlinksrc.out.err - textlinkfar.out - textlinkfar.out.err - textlink.out - textlink.out.err - tfamily.out - tfamily.out.err - tfill.out - tfill.out.err - tfletcher32.out - tfletcher32.out.err - tfpformat.out - tfpformat.out.err - tgroup-1.out - tgroup-1.out.err - tgroup-2.out - tgroup-2.out.err - tgrp_comments.out - tgrp_comments.out.err - thlink-1.out - thlink-1.out.err - thlink-2.out - thlink-2.out.err - thlink-3.out - thlink-3.out.err - thlink-4.out - thlink-4.out.err - thlink-5.out - thlink-5.out.err - thyperslab.out - thyperslab.out.err - tindicesno.out - tindicesno.out.err - tindicessub1.out - tindicessub1.out.err - tindicessub2.out - tindicessub2.out.err - tindicessub3.out - tindicessub3.out.err - tindicessub4.out - tindicessub4.out.err - texceedsubstart.out - texceedsubstart.out.err - texceedsubcount.out - texceedsubcount.out.err - texceedsubstride.out - texceedsubstride.out.err - texceedsubblock.out - texceedsubblock.out.err - tindicesyes.out - tindicesyes.out.err - tlarge_objname.out - tlarge_objname.out.err - tldouble.out - tldouble.out.err - tlonglinks.out - tlonglinks.out.err - tloop-1.out - tloop-1.out.err - tmulti.out - tmulti.out.err - tmultifile.out - tmultifile.out.err -# tqmarkfile.out -# tqmarkfile.out.err -# tstarfile.out -# tstarfile.out.err - tnamed_dtype_attr.out - tnamed_dtype_attr.out.err - tnestcomp-1.out - tnestcomp-1.out.err - tnestedcmpddt.out - tnestedcmpddt.out.err - tnbit.out - tnbit.out.err - tnoattrdata.out - tnoattrdata.out.err - tnoattrddl.out - tnoattrddl.out.err - tnodata.out - tnodata.out.err - tnoddl.out - tnoddl.out.err - tnoddlfile.out - tnoddlfile.out.err - trawdatafile.out - trawdatafile.out.err - trawdatafile.txt - trawssetfile.out - trawssetfile.out.err - trawssetfile.txt - tno-subset.out - tno-subset.out.err - tnullspace.out - tnullspace.out.err - zerodim.out - zerodim.out.err - tordergr1.out - tordergr1.out.err - tordergr2.out - tordergr2.out.err - tordergr3.out - tordergr3.out.err - tordergr4.out - tordergr4.out.err - tordergr5.out - tordergr5.out.err - torderattr1.out - torderattr1.out.err - torderattr2.out - torderattr2.out.err - torderattr3.out - torderattr3.out.err - torderattr4.out - torderattr4.out.err - tordercontents1.out - tordercontents1.out.err - tordercontents2.out - tordercontents2.out.err - torderlinks1.out - torderlinks1.out.err - torderlinks2.out - torderlinks2.out.err - tperror.out - tperror.out.err - treference.out - treference.out.err - tsaf.out - tsaf.out.err - tscalarintsize.out - tscalarintsize.out.err - tscalarattrintsize.out - tscalarattrintsize.out.err - tscalarstring.out - tscalarstring.out.err - tscaleoffset.out - tscaleoffset.out.err - tshuffle.out - tshuffle.out.err - tslink-1.out - tslink-1.out.err - tslink-2.out - tslink-2.out.err - tslink-D.out - tslink-D.out.err - tsplit_file.out - tsplit_file.out.err - tstr-1.out - tstr-1.out.err - tstr-2.out - tstr-2.out.err - tstr2bin2.txt - tstr2bin6.txt - tstring.out - tstring.out.err - tstring2.out - tstring2.out.err - tstringe.out - tstringe.out.err - tszip.out - tszip.out.err - tudlink-1.out - tudlink-1.out.err - tudlink-2.out - tudlink-2.out.err - tuserfilter.out - tuserfilter.out.err - tvldtypes1.out - tvldtypes1.out.err - tvldtypes2.out - tvldtypes2.out.err - tvldtypes3.out - tvldtypes3.out.err - tvldtypes4.out - tvldtypes4.out.err - tvldtypes5.out - tvldtypes5.out.err - tvlstr.out - tvlstr.out.err - tvms.out - tvms.out.err - twidedisplay.out - twidedisplay.out.err - twithddl.txt - twithddlfile.out - twithddlfile.out.err - twithddlfile.txt - ) - SET_TESTS_PROPERTIES (H5DUMP-clearall-objects PROPERTIES WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles/std") - IF (NOT "${last_test}" STREQUAL "") - SET_TESTS_PROPERTIES (H5DUMP-clearall-objects PROPERTIES DEPENDS ${last_test}) - ENDIF (NOT "${last_test}" STREQUAL "") - SET (last_test "H5DUMP-clearall-objects") - ENDIF (HDF5_ENABLE_USING_MEMCHECKER) - - ADD_HELP_TEST(help 0 -h) - - # test data output redirection - #ADD_H5_TEST (tnoddl 0 --enable-error-stack -O -y packedbits.h5) - ADD_H5_TEST (tnoddl 0 --enable-error-stack --ddl -y packedbits.h5) - #ADD_H5_TEST (tnodata 0 --enable-error-stack -o packedbits.h5) - ADD_H5_TEST (tnodata 0 --enable-error-stack --output packedbits.h5) - ADD_H5_TEST (tnoattrddl 0 --enable-error-stack -O -y tattr.h5) - ADD_H5_TEST (tnoattrdata 0 --enable-error-stack -A -o tattr.h5) - ADD_H5_TEST_EXPORT (trawdatafile packedbits.h5 0 --enable-error-stack -y -o) - ADD_H5_TEST_EXPORT (tnoddlfile packedbits.h5 0 --enable-error-stack -O -y -o) - ADD_H5_TEST_EXPORT (trawssetfile tdset.h5 0 --enable-error-stack -d "/dset1[1,1;;;]" -y -o) - - ADD_H5_TEST_EXPORT_DDL (twithddlfile packedbits.h5 0 twithddl --enable-error-stack --ddl=twithddl.txt -y -o) - - # test for maximum display datasets - ADD_H5_TEST (twidedisplay 0 --enable-error-stack -w0 packedbits.h5) - - # test for signed/unsigned datasets - ADD_H5_TEST (packedbits 0 --enable-error-stack packedbits.h5) - # test for compound signed/unsigned datasets - ADD_H5_TEST (tcmpdintsize 0 --enable-error-stack tcmpdintsize.h5) - # test for signed/unsigned scalar datasets - ADD_H5_TEST (tscalarintsize 0 --enable-error-stack tscalarintsize.h5) - # test for signed/unsigned attributes - ADD_H5_TEST (tattrintsize 0 --enable-error-stack tattrintsize.h5) - # test for compound signed/unsigned attributes - ADD_H5_TEST (tcmpdattrintsize 0 --enable-error-stack tcmpdattrintsize.h5) - # test for signed/unsigned scalar attributes - ADD_H5_TEST (tscalarattrintsize 0 --enable-error-stack tscalarattrintsize.h5) - # test for string scalar dataset and attribute - ADD_H5_TEST (tscalarstring 0 --enable-error-stack tscalarstring.h5) - # test for displaying groups - ADD_H5_TEST (tgroup-1 0 --enable-error-stack tgroup.h5) - # test for displaying the selected groups - ADD_H5ERR_MASK_TEST (tgroup-2 1 --enable-error-stack --group=/g2 --group / -g /y tgroup.h5) - - # test for displaying simple space datasets - ADD_H5_TEST (tdset-1 0 --enable-error-stack tdset.h5) - # test for displaying selected datasets - ADD_H5ERR_MASK_TEST (tdset-2 1 --enable-error-stack -H -d dset1 -d /dset2 --dataset=dset3 tdset.h5) - - # test for displaying attributes - ADD_H5_TEST (tattr-1 0 --enable-error-stack tattr.h5) - # test for displaying the selected attributes of string type and scalar space - ADD_H5_TEST (tattr-2 0 --enable-error-stack -a /\\\\/attr1 --attribute /attr4 --attribute=/attr5 tattr.h5) - ADD_H5_TEST_N (tattr-2 0 --enable-error-stack -N /\\\\/attr1 --any_path /attr4 --any_path=/attr5 tattr.h5) - # test for header and error messages - ADD_H5ERR_MASK_TEST (tattr-3 1 --enable-error-stack --header -a /attr2 --attribute=/attr tattr.h5) - # test for displaying attributes in shared datatype (also in group and dataset) - ADD_H5_TEST (tnamed_dtype_attr 0 --enable-error-stack tnamed_dtype_attr.h5) - # test for displaying at least 9 attributes on root from a be machine - ADD_H5_TEST (tattr-4_be 0 --enable-error-stack tattr4_be.h5) - - # test for displaying soft links and user-defined links - ADD_H5_TEST (tslink-1 0 --enable-error-stack tslink.h5) - ADD_H5_TEST (tudlink-1 0 --enable-error-stack tudlink.h5) - # test for displaying the selected link - ADD_H5_TEST (tslink-2 0 --enable-error-stack -l slink2 tslink.h5) - ADD_H5_TEST_N (tslink-2 0 --enable-error-stack -N slink2 tslink.h5) - ADD_H5_TEST (tudlink-2 0 --enable-error-stack -l udlink2 tudlink.h5) - # test for displaying dangling soft links - ADD_H5ERR_MASK_TEST (tslink-D 0 --enable-error-stack -d /slink1 tslink.h5) - - # tests for hard links - ADD_H5_TEST (thlink-1 0 --enable-error-stack thlink.h5) - ADD_H5_TEST (thlink-2 0 --enable-error-stack -d /g1/dset2 --dataset /dset1 --dataset=/g1/g1.1/dset3 thlink.h5) - ADD_H5_TEST (thlink-3 0 --enable-error-stack -d /g1/g1.1/dset3 --dataset /g1/dset2 --dataset=/dset1 thlink.h5) - ADD_H5_TEST (thlink-4 0 --enable-error-stack -g /g1 thlink.h5) - ADD_H5_TEST_N (thlink-4 0 --enable-error-stack -N /g1 thlink.h5) - ADD_H5_TEST (thlink-5 0 --enable-error-stack -d /dset1 -g /g2 -d /g1/dset2 thlink.h5) - ADD_H5_TEST_N (thlink-5 0 --enable-error-stack -N /dset1 -N /g2 -N /g1/dset2 thlink.h5) - - # tests for compound data types - ADD_H5_TEST (tcomp-1 0 --enable-error-stack tcompound.h5) - # test for named data types - ADD_H5_TEST (tcomp-2 0 --enable-error-stack -t /type1 --datatype /type2 --datatype=/group1/type3 tcompound.h5) - ADD_H5_TEST_N (tcomp-2 0 --enable-error-stack -N /type1 --any_path /type2 --any_path=/group1/type3 tcompound.h5) - # test for unamed type - ADD_H5ERR_MASK_TEST (tcomp-3 0 "--enable-error-stack;-t;/#6632;-g;/group2;tcompound.h5") - # test complicated compound datatype - ADD_H5_TEST (tcomp-4 0 --enable-error-stack tcompound_complex.h5) - - #test for the nested compound type - ADD_H5_TEST (tnestcomp-1 0 --enable-error-stack tnestedcomp.h5) - ADD_H5_TEST (tnestedcmpddt 0 --enable-error-stack tnestedcmpddt.h5) - - # test for options - ADD_H5ERR_MASK_TEST (tall-1 0 --enable-error-stack tall.h5) - ADD_H5_TEST (tall-2 0 --enable-error-stack --header -g /g1/g1.1 -a attr2 tall.h5) - ADD_H5_TEST (tall-3 0 --enable-error-stack -d /g2/dset2.1 -l /g1/g1.2/g1.2.1/slink tall.h5) - ADD_H5_TEST_N (tall-3 0 --enable-error-stack -N /g2/dset2.1 -N /g1/g1.2/g1.2.1/slink tall.h5) - ADD_H5_TEST (tall-7 0 --enable-error-stack -a attr1 tall.h5) - ADD_H5_TEST (tall-7N 0 --enable-error-stack -N attr1 tall.h5) - - # test for loop detection - ADD_H5_TEST (tloop-1 0 --enable-error-stack tloop.h5) - - # test for string - ADD_H5_TEST (tstr-1 0 --enable-error-stack tstr.h5) - ADD_H5_TEST (tstr-2 0 --enable-error-stack tstr2.h5) - - # test for file created by Lib SAF team - ADD_H5_TEST (tsaf 0 --enable-error-stack tsaf.h5) - - # test for file with variable length data - ADD_H5_TEST (tvldtypes1 0 --enable-error-stack tvldtypes1.h5) - ADD_H5_TEST (tvldtypes2 0 --enable-error-stack tvldtypes2.h5) - ADD_H5_TEST (tvldtypes3 0 --enable-error-stack tvldtypes3.h5) - ADD_H5_TEST (tvldtypes4 0 --enable-error-stack tvldtypes4.h5) - ADD_H5_TEST (tvldtypes5 0 --enable-error-stack tvldtypes5.h5) - - #test for file with variable length string data - ADD_H5_TEST (tvlstr 0 --enable-error-stack tvlstr.h5) - - # test for files with array data - ADD_H5_TEST (tarray1 0 --enable-error-stack tarray1.h5) - # # added for bug# 2092 - tarray1_big.h5 - ADD_H5ERR_MASK_TEST (tarray1_big 0 --enable-error-stack -R tarray1_big.h5) - ADD_H5_TEST (tarray2 0 --enable-error-stack tarray2.h5) - ADD_H5_TEST (tarray3 0 --enable-error-stack tarray3.h5) - ADD_H5_TEST (tarray4 0 --enable-error-stack tarray4.h5) - ADD_H5_TEST (tarray5 0 --enable-error-stack tarray5.h5) - ADD_H5_TEST (tarray6 0 --enable-error-stack tarray6.h5) - ADD_H5_TEST (tarray7 0 --enable-error-stack tarray7.h5) - ADD_H5_TEST (tarray8 0 --enable-error-stack tarray8.h5) - - # test for wildcards in filename (does not work with cmake) - #ADD_H5_MASK_TEST (tstarfile 0 --enable-error-stack -H -d Dataset1 tarr*.h5) - #ADD_H5_MASK_TEST (tqmarkfile 0 --enable-error-stack -H -d Dataset1 tarray?.h5) - ADD_H5_TEST (tmultifile 0 --enable-error-stack -H -d Dataset1 tarray2.h5 tarray3.h5 tarray4.h5 tarray5.h5 tarray6.h5 tarray7.h5) - - # test for files with empty data - ADD_H5_TEST (tempty 0 --enable-error-stack tempty.h5) - - # test for files with groups that have comments - ADD_H5_TEST (tgrp_comments 0 --enable-error-stack tgrp_comments.h5) - - # test the --filedriver flag - ADD_H5_TEST (tsplit_file 0 --enable-error-stack --filedriver=split tsplit_file) - ADD_H5_TEST (tfamily 0 --enable-error-stack --filedriver=family tfamily%05d.h5) - ADD_H5_TEST (tmulti 0 --enable-error-stack --filedriver=multi tmulti) - - # test for files with group names which reach > 1024 bytes in size - ADD_H5_TEST (tlarge_objname 0 --enable-error-stack -w157 tlarge_objname.h5) - - # test '-A' to suppress data but print attr's - ADD_H5ERR_MASK_TEST (tall-2A 0 --enable-error-stack -A tall.h5) - - # test '-A' to suppress attr's but print data - ADD_H5ERR_MASK_TEST (tall-2A0 0 --enable-error-stack -A 0 tall.h5) - - # test '-r' to print attributes in ASCII instead of decimal - ADD_H5ERR_MASK_TEST (tall-2B 0 --enable-error-stack -A -r tall.h5) - - # test Subsetting - ADD_H5_TEST (tall-4s 0 --enable-error-stack --dataset=/g1/g1.1/dset1.1.1 --start=1,1 --stride=2,3 --count=3,2 --block=1,1 tall.h5) - ADD_H5_TEST (tall-5s 0 --enable-error-stack -d "/g1/g1.1/dset1.1.2[0;2;10;]" tall.h5) - ADD_H5_TEST (tdset-3s 0 --enable-error-stack -d "/dset1[1,1;;;]" tdset.h5) - ADD_H5_TEST (tno-subset 0 --enable-error-stack --no-compact-subset -d "AHFINDERDIRECT::ah_centroid_t[0] it=0 tl=0" tno-subset.h5) - - # test printing characters in ASCII instead of decimal - ADD_H5_TEST (tchar1 0 --enable-error-stack -r tchar.h5) - - # test datatypes in ASCII and UTF8 - ADD_H5_TEST (charsets 0 --enable-error-stack charsets.h5) - - # rev. 2004 - # tests for super block - ADD_H5_TEST (tboot1 0 --enable-error-stack -H -B -d dset tfcontents1.h5) - ADD_H5_TEST (tboot2 0 --enable-error-stack -B tfcontents2.h5) - ADD_H5_TEST (file_space 0 --enable-error-stack -B file_space.h5) - - # test -p with a non existing dataset - ADD_H5ERR_MASK_TEST (tperror 1 --enable-error-stack -p -d bogus tfcontents1.h5) - - # test for file contents - ADD_H5_TEST (tcontents 0 --enable-error-stack -n tfcontents1.h5) - ADD_H5_TEST (tordercontents1 0 --enable-error-stack -n --sort_by=name --sort_order=ascending tfcontents1.h5) - ADD_H5_TEST (tordercontents2 0 --enable-error-stack -n --sort_by=name --sort_order=descending tfcontents1.h5) - ADD_H5_TEST (tattrcontents1 0 --enable-error-stack -n 1 --sort_order=ascending tall.h5) - ADD_H5_TEST (tattrcontents2 0 --enable-error-stack -n 1 --sort_order=descending tall.h5) - - # tests for storage layout - # compact - ADD_H5_TEST (tcompact 0 --enable-error-stack -H -p -d compact tfilters.h5) - # contiguous - ADD_H5_TEST (tcontiguos 0 --enable-error-stack -H -p -d contiguous tfilters.h5) - # chunked - ADD_H5_TEST (tchunked 0 --enable-error-stack -H -p -d chunked tfilters.h5) - # external - ADD_H5_TEST (texternal 0 --enable-error-stack -H -p -d external tfilters.h5) - - # fill values - ADD_H5_TEST (tfill 0 --enable-error-stack -p tfvalues.h5) - - # several datatype, with references , print path - ADD_H5_TEST (treference 0 --enable-error-stack tattr2.h5) - - # escape/not escape non printable characters - ADD_H5_TEST (tstringe 0 --enable-error-stack -e tstr3.h5) - ADD_H5_TEST (tstring 0 --enable-error-stack tstr3.h5) - # char data as ASCII with non escape - ADD_H5_TEST (tstring2 0 --enable-error-stack -r -d str4 tstr3.h5) - - # array indices print/not print - ADD_H5_TEST (tindicesyes 0 --enable-error-stack taindices.h5) - ADD_H5_TEST (tindicesno 0 --enable-error-stack -y taindices.h5) - - ########## array indices with subsetting - # 1D case - ADD_H5_TEST (tindicessub1 0 --enable-error-stack -d 1d -s 1 -S 10 -c 2 -k 3 taindices.h5) - - # 2D case - ADD_H5_TEST (tindicessub2 0 --enable-error-stack -d 2d -s 1,2 -S 3,3 -c 3,2 -k 2,2 taindices.h5) - - # 3D case - ADD_H5_TEST (tindicessub3 0 --enable-error-stack -d 3d -s 0,1,2 -S 1,3,3 -c 2,2,2 -k 1,2,2 taindices.h5) - - # 4D case - ADD_H5_TEST (tindicessub4 0 --enable-error-stack -d 4d -s 0,0,1,2 -c 2,2,3,2 -S 1,1,3,3 -k 1,1,2,2 taindices.h5) - - # Exceed the dimensions for subsetting - ADD_H5_TEST (texceedsubstart 1 --enable-error-stack -d 1d -s 1,3 taindices.h5) - ADD_H5_TEST (texceedsubcount 1 --enable-error-stack -d 1d -c 1,3 taindices.h5) - ADD_H5_TEST (texceedsubstride 1 --enable-error-stack -d 1d -S 1,3 taindices.h5) - ADD_H5_TEST (texceedsubblock 1 --enable-error-stack -d 1d -k 1,3 taindices.h5) - - # tests for filters - # SZIP - ADD_H5_TEST (tszip 0 --enable-error-stack -H -p -d szip tfilters.h5) - - # deflate - ADD_H5_TEST (tdeflate 0 --enable-error-stack -H -p -d deflate tfilters.h5) - - # shuffle - ADD_H5_TEST (tshuffle 0 --enable-error-stack -H -p -d shuffle tfilters.h5) - - # fletcher32 - ADD_H5_TEST (tfletcher32 0 --enable-error-stack -H -p -d fletcher32 tfilters.h5) - - # nbit - ADD_H5_TEST (tnbit 0 --enable-error-stack -H -p -d nbit tfilters.h5) - - # scaleoffset - ADD_H5_TEST (tscaleoffset 0 --enable-error-stack -H -p -d scaleoffset tfilters.h5) - - # all - ADD_H5_TEST (tallfilters 0 --enable-error-stack -H -p -d all tfilters.h5) - - # user defined - ADD_H5_TEST (tuserfilter 0 --enable-error-stack -H -p -d myfilter tfilters.h5) - - # test for displaying objects with very long names - ADD_H5_TEST (tlonglinks 0 --enable-error-stack tlonglinks.h5) - - # dimensions over 4GB, print boundary - ADD_H5_TEST (tbigdims 0 --enable-error-stack -d dset4gb -s 4294967284 -c 22 tbigdims.h5) - - # hyperslab read - ADD_H5_TEST (thyperslab 0 --enable-error-stack thyperslab.h5) - - # test for displaying dataset and attribute of null space - ADD_H5_TEST (tnullspace 0 --enable-error-stack tnullspace.h5) - - # test for displaying dataset and attribute of space with 0 dimension size - ADD_H5_TEST (zerodim 0 --enable-error-stack zerodim.h5) - - # test for long double (some systems do not have long double) - #ADD_H5_TEST (tldouble 0 --enable-error-stack tldouble.h5) - - # test for vms - ADD_H5_TEST (tvms 0 --enable-error-stack tvms.h5) - - # test for binary output - ADD_H5_TEST (tbin1LE 0 --enable-error-stack -d integer -o tbin1LE.bin -b LE tbinary.h5) - - # test for string binary output - ADD_H5_EXPORT_TEST (tstr2bin2 tstr2.h5 0 --enable-error-stack -d /g2/dset2 -b -o) - ADD_H5_EXPORT_TEST (tstr2bin6 tstr2.h5 0 --enable-error-stack -d /g6/dset6 -b -o) - - # NATIVE default. the NATIVE test can be validated with h5import/h5diff - ADD_H5_TEST_IMPORT (tbin1 out1D tbinary.h5 0 --enable-error-stack -d integer -b) - - IF (NOT HDF5_ENABLE_USING_MEMCHECKER) - ADD_H5_TEST (tbin2 0 --enable-error-stack -b BE -d float -o tbin2.bin tbinary.h5) - ENDIF (NOT HDF5_ENABLE_USING_MEMCHECKER) - - # the NATIVE test can be validated with h5import/h5diff - ADD_H5_TEST_IMPORT (tbin3 out3D tbinary.h5 0 --enable-error-stack -d integer -b NATIVE) - - IF (NOT HDF5_ENABLE_USING_MEMCHECKER) - ADD_H5_TEST (tbin4 0 --enable-error-stack -d double -b FILE -o tbin4.bin tbinary.h5) - ENDIF (NOT HDF5_ENABLE_USING_MEMCHECKER) - - # test for dataset region references - ADD_H5_TEST (tdatareg 0 --enable-error-stack tdatareg.h5) - ADD_H5ERR_MASK_TEST (tdataregR 0 --enable-error-stack -R tdatareg.h5) - ADD_H5ERR_MASK_TEST (tattrregR 0 -R --enable-error-stack tattrreg.h5) - ADD_H5_EXPORT_TEST (tbinregR tdatareg.h5 0 --enable-error-stack -d /Dataset1 -s 0 -R -y -o) - - # tests for group creation order - # "1" tracked, "2" name, root tracked - ADD_H5_TEST (tordergr1 0 --enable-error-stack --group=1 --sort_by=creation_order --sort_order=ascending tordergr.h5) - ADD_H5_TEST (tordergr2 0 --enable-error-stack --group=1 --sort_by=creation_order --sort_order=descending tordergr.h5) - ADD_H5_TEST (tordergr3 0 --enable-error-stack -g 2 -q name -z ascending tordergr.h5) - ADD_H5_TEST (tordergr4 0 --enable-error-stack -g 2 -q name -z descending tordergr.h5) - ADD_H5_TEST (tordergr5 0 --enable-error-stack -q creation_order tordergr.h5) - - # tests for attribute order - ADD_H5_TEST (torderattr1 0 --enable-error-stack -H --sort_by=name --sort_order=ascending torderattr.h5) - ADD_H5_TEST (torderattr2 0 --enable-error-stack -H --sort_by=name --sort_order=descending torderattr.h5) - ADD_H5_TEST (torderattr3 0 --enable-error-stack -H --sort_by=creation_order --sort_order=ascending torderattr.h5) - ADD_H5_TEST (torderattr4 0 --enable-error-stack -H --sort_by=creation_order --sort_order=descending torderattr.h5) - - # tests for link references and order - ADD_H5ERR_MASK_TEST (torderlinks1 0 --enable-error-stack --sort_by=name --sort_order=ascending tfcontents1.h5) - ADD_H5ERR_MASK_TEST (torderlinks2 0 --enable-error-stack --sort_by=name --sort_order=descending tfcontents1.h5) - - # tests for floating point user defined printf format - ADD_H5_TEST (tfpformat 0 --enable-error-stack -m %.7f tfpformat.h5) - - # tests for traversal of external links - ADD_H5ERR_MASK_TEST (textlinksrc 0 --enable-error-stack textlinksrc.h5) - ADD_H5ERR_MASK_TEST (textlinkfar 0 --enable-error-stack textlinkfar.h5) - - # test for dangling external links - ADD_H5ERR_MASK_TEST (textlink 0 --enable-error-stack textlink.h5) - - # test for error stack display (BZ2048) - ADD_H5ERR_MASK_ENV_TEST (filter_fail 1 "HDF5_PLUGIN_PRELOAD" "::" --enable-error-stack filter_fail.h5) - - # test for -o -y for dataset with attributes - ADD_H5_TEST_EXPORT (tall-6 tall.h5 0 --enable-error-stack -d /g1/g1.1/dset1.1.1 -y -o) - - ####### test for dataset packed bits ###### - IF (HDF5_ENABLE_USING_MEMCHECKER) - # Remove any output file left over from previous test run - ADD_TEST ( - NAME H5DUMP_PACKED_BITS-clearall-objects - COMMAND ${CMAKE_COMMAND} - -E remove - tnofilename-with-packed-bits.out - tnofilename-with-packed-bits.out.err - tpbitsArray.out - tpbitsArray.out.err - tpbitsCompound.out - tpbitsCompound.out.err - tpbitsIncomplete.out - tpbitsIncomplete.out.err - tpbitsLengthExceeded.out - tpbitsLengthExceeded.out.err - tpbitsCharLengthExceeded.out - tpbitsCharLengthExceeded.out.err - tpbitsIntLengthExceeded.out - tpbitsIntLengthExceeded.out.err - tpbitsLongLengthExceeded.out - tpbitsLongLengthExceeded.out.err - tpbitsLengthPositive.out - tpbitsLengthPositive.out.err - tpbitsMax.out - tpbitsMax.out.err - tpbitsMaxExceeded.out - tpbitsMaxExceeded.out.err - tpbitsOffsetExceeded.out - tpbitsOffsetExceeded.out.err - tpbitsCharOffsetExceeded.out - tpbitsCharOffsetExceeded.out.err - tpbitsIntOffsetExceeded.out - tpbitsIntOffsetExceeded.out.err - tpbitsLongOffsetExceeded.out - tpbitsLongOffsetExceeded.out.err - tpbitsOffsetNegative.out - tpbitsOffsetNegative.out.err - tpbitsOverlapped.out - tpbitsOverlapped.out.err - tpbitsSigned.out - tpbitsSigned.out.err - tpbitsUnsigned.out - tpbitsUnsigned.out.err - tpbitsSignedInt.out - tpbitsSignedInt.out.err - tpbitsUnsignedInt.out - tpbitsUnsignedInt.out.err - tpbitsSignedLong.out - tpbitsSignedLong.out.err - tpbitsUnsignedLong.out - tpbitsUnsignedLong.out.err - tpbitsSignedLongLong.out - tpbitsSignedLongLong.out.err - tpbitsUnsignedLongLong.out - tpbitsUnsignedLongLong.out.err - tpbitsSignedWhole.out - tpbitsSignedWhole.out.err - tpbitsUnsignedWhole.out - tpbitsUnsignedWhole.out.err - tpbitsSignedIntWhole.out - tpbitsSignedIntWhole.out.err - tpbitsUnsignedIntWhole.out - tpbitsUnsignedIntWhole.out.err - tpbitsSignedLongWhole.out - tpbitsSignedLongWhole.out.err - tpbitsUnsignedLongWhole.out - tpbitsUnsignedLongWhole.out.err - tpbitsSignedLongLongWhole.out - tpbitsSignedLongLongWhole.out.err - tpbitsUnsignedLongLongWhole.out - tpbitsUnsignedLongLongWhole.out.err - tpbitsSignedLongLongWhole1.out - tpbitsSignedLongLongWhole1.out.err - tpbitsUnsignedLongLongWhole1.out - tpbitsUnsignedLongLongWhole1.out.err - tpbitsSignedLongLongWhole63.out - tpbitsSignedLongLongWhole63.out.err - tpbitsUnsignedLongLongWhole63.out - tpbitsUnsignedLongLongWhole63.out.err - tpbitsSigned4.out - tpbitsSigned4.out.err - tpbitsUnsigned4.out - tpbitsUnsigned4.out.err - tpbitsSignedInt8.out - tpbitsSignedInt8.out.err - tpbitsUnsignedInt8.out - tpbitsUnsignedInt8.out.err - tpbitsSignedLong16.out - tpbitsSignedLong16.out.err - tpbitsUnsignedLong16.out - tpbitsUnsignedLong16.out.err - tpbitsSignedLongLong32.out - tpbitsSignedLongLong32.out.err - tpbitsUnsignedLongLong32.out - tpbitsUnsignedLongLong32.out.err - tpbitsSigned2.out - tpbitsSigned2.out.err - tpbitsUnsigned2.out - tpbitsUnsigned2.out.err - tpbitsSignedInt4.out - tpbitsSignedInt4.out.err - tpbitsUnsignedInt4.out - tpbitsUnsignedInt4.out.err - tpbitsSignedLong8.out - tpbitsSignedLong8.out.err - tpbitsUnsignedLong8.out - tpbitsUnsignedLong8.out.err - tpbitsSignedLongLong16.out - tpbitsSignedLongLong16.out.err - tpbitsUnsignedLongLong16.out - tpbitsUnsignedLongLong16.out.err - ) - SET_TESTS_PROPERTIES (H5DUMP_PACKED_BITS-clearall-objects PROPERTIES WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles/pbits") - IF (NOT "${last_pbits_test}" STREQUAL "") - SET_TESTS_PROPERTIES (H5DUMP_PACKED_BITS-clearall-objects PROPERTIES DEPENDS ${last_pbits_test}) - ENDIF (NOT "${last_pbits_test}" STREQUAL "") - SET (last_pbits_test "H5DUMP_PACKED_BITS-clearall-objects") - ENDIF (HDF5_ENABLE_USING_MEMCHECKER) - - # test failure handling - # Missing file name - ADD_H5_PBITS_TEST (tnofilename-with-packed-bits 1 --enable-error-stack) - # Limits: - # Maximum number of packed bits is 8 (for now). - # Maximum integer size is 8*sizeof(long long). - # Maximun Offset is Maximum size - 1. - # Maximum Offset+Length is Maximum size. - # Tests: - # Normal operation on both signed and unsigned int datasets. - # Sanity check - # Their rawdata output should be the same. - ADD_H5_PBITS_TEST (tpbitsSignedWhole 0 --enable-error-stack -d /DS08BITS -M 0,8 packedbits.h5) - ADD_H5_PBITS_TEST (tpbitsUnsignedWhole 0 --enable-error-stack -d /DU08BITS -M 0,8 packedbits.h5) - ADD_H5_PBITS_TEST (tpbitsSignedIntWhole 0 --enable-error-stack -d /DS16BITS -M 0,16 packedbits.h5) - ADD_H5_PBITS_TEST (tpbitsUnsignedIntWhole 0 --enable-error-stack -d /DU16BITS -M 0,16 packedbits.h5) - ADD_H5_PBITS_TEST (tpbitsSignedLongWhole 0 --enable-error-stack -d /DS32BITS -M 0,32 packedbits.h5) - ADD_H5_PBITS_TEST (tpbitsUnsignedLongWhole 0 --enable-error-stack -d /DU32BITS -M 0,32 packedbits.h5) - ADD_H5_PBITS_TEST (tpbitsSignedLongLongWhole 0 --enable-error-stack -d /DS64BITS -M 0,64 packedbits.h5) - ADD_H5_PBITS_TEST (tpbitsUnsignedLongLongWhole 0 --enable-error-stack -d /DU64BITS -M 0,64 packedbits.h5) - ADD_H5_PBITS_TEST (tpbitsSignedLongLongWhole63 0 --enable-error-stack -d /DS64BITS -M 0,63 packedbits.h5) - ADD_H5_PBITS_TEST (tpbitsUnsignedLongLongWhole63 0 --enable-error-stack -d /DU64BITS -M 0,63 packedbits.h5) - ADD_H5_PBITS_TEST (tpbitsSignedLongLongWhole1 0 --enable-error-stack -d /DS64BITS -M 1,63 packedbits.h5) - ADD_H5_PBITS_TEST (tpbitsUnsignedLongLongWhole1 0 --enable-error-stack -d /DU64BITS -M 1,63 packedbits.h5) - # Half sections - ADD_H5_PBITS_TEST (tpbitsSigned4 0 --enable-error-stack -d /DS08BITS -M 0,4,4,4 packedbits.h5) - ADD_H5_PBITS_TEST (tpbitsUnsigned4 0 --enable-error-stack -d /DU08BITS -M 0,4,4,4 packedbits.h5) - ADD_H5_PBITS_TEST (tpbitsSignedInt8 0 --enable-error-stack -d /DS16BITS -M 0,8,8,8 packedbits.h5) - ADD_H5_PBITS_TEST (tpbitsUnsignedInt8 0 --enable-error-stack -d /DU16BITS -M 0,8,8,8 packedbits.h5) - ADD_H5_PBITS_TEST (tpbitsSignedLong16 0 --enable-error-stack -d /DS32BITS -M 0,16,16,16 packedbits.h5) - ADD_H5_PBITS_TEST (tpbitsUnsignedLong16 0 --enable-error-stack -d /DU32BITS -M 0,16,16,16 packedbits.h5) - ADD_H5_PBITS_TEST (tpbitsSignedLongLong32 0 --enable-error-stack -d /DS64BITS -M 0,32,32,32 packedbits.h5) - ADD_H5_PBITS_TEST (tpbitsUnsignedLongLong32 0 --enable-error-stack -d /DU64BITS -M 0,32,32,32 packedbits.h5) - # Quarter sections - ADD_H5_PBITS_TEST (tpbitsSigned2 0 --enable-error-stack -d /DS08BITS -M 0,2,2,2,4,2,6,2 packedbits.h5) - ADD_H5_PBITS_TEST (tpbitsUnsigned2 0 --enable-error-stack -d /DU08BITS -M 0,2,2,2,4,2,6,2 packedbits.h5) - ADD_H5_PBITS_TEST (tpbitsSignedInt4 0 --enable-error-stack -d /DS16BITS -M 0,4,4,4,8,4,12,4 packedbits.h5) - ADD_H5_PBITS_TEST (tpbitsUnsignedInt4 0 --enable-error-stack -d /DU16BITS -M 0,4,4,4,8,4,12,4 packedbits.h5) - ADD_H5_PBITS_TEST (tpbitsSignedLong8 0 --enable-error-stack -d /DS32BITS -M 0,8,8,8,16,8,24,8 packedbits.h5) - ADD_H5_PBITS_TEST (tpbitsUnsignedLong8 0 --enable-error-stack -d /DU32BITS -M 0,8,8,8,16,8,24,8 packedbits.h5) - ADD_H5_PBITS_TEST (tpbitsSignedLongLong16 0 --enable-error-stack -d /DS64BITS -M 0,16,16,16,32,16,48,16 packedbits.h5) - ADD_H5_PBITS_TEST (tpbitsUnsignedLongLong16 0 --enable-error-stack -d /DU64BITS -M 0,16,16,16,32,16,48,16 packedbits.h5) - # Begin and End - ADD_H5_PBITS_TEST (tpbitsSigned 0 --enable-error-stack -d /DS08BITS -M 0,2,2,6 packedbits.h5) - ADD_H5_PBITS_TEST (tpbitsUnsigned 0 --enable-error-stack -d /DU08BITS -M 0,2,2,6 packedbits.h5) - ADD_H5_PBITS_TEST (tpbitsSignedInt 0 --enable-error-stack -d /DS16BITS -M 0,2,10,6 packedbits.h5) - ADD_H5_PBITS_TEST (tpbitsUnsignedInt 0 --enable-error-stack -d /DU16BITS -M 0,2,10,6 packedbits.h5) - ADD_H5_PBITS_TEST (tpbitsSignedLong 0 --enable-error-stack -d /DS32BITS -M 0,2,26,6 packedbits.h5) - ADD_H5_PBITS_TEST (tpbitsUnsignedLong 0 --enable-error-stack -d /DU32BITS -M 0,2,26,6 packedbits.h5) - ADD_H5_PBITS_TEST (tpbitsSignedLongLong 0 --enable-error-stack -d /DS64BITS -M 0,2,58,6 packedbits.h5) - ADD_H5_PBITS_TEST (tpbitsUnsignedLongLong 0 --enable-error-stack -d /DU64BITS -M 0,2,58,6 packedbits.h5) - # Overlapped packed bits. - ADD_H5_PBITS_TEST (tpbitsOverlapped 0 --enable-error-stack -d /DS08BITS -M 0,1,1,1,2,1,0,3 packedbits.h5) - # Maximum number of packed bits. - ADD_H5_PBITS_TEST (tpbitsMax 0 --enable-error-stack -d /DS08BITS -M 0,1,1,1,2,1,3,1,4,1,5,1,6,1,7,1 packedbits.h5) - # Compound type. - ADD_H5_PBITS_TEST (tpbitsCompound 0 --enable-error-stack -d /dset1 -M 0,1,1,1 tcompound.h5) - # Array type. - ADD_H5_PBITS_TEST (tpbitsArray 0 --enable-error-stack -d /Dataset1 -M 0,1,1,1 tarray1.h5) - # Test Error handling. - # Too many packed bits requested. Max is 8 for now. - ADD_H5_PBITS_TEST (tpbitsMaxExceeded 1 --enable-error-stack -d /DS08BITS -M 0,1,0,1,1,1,2,1,3,1,4,1,5,1,6,1,7,1 packedbits.h5) - # Offset too large. Max is 8*sizeof(long long. - ADD_H5_PBITS_TEST (tpbitsOffsetExceeded 1 --enable-error-stack -d /DS08BITS -M 64,1 packedbits.h5) - ADD_H5_PBITS_TEST (tpbitsCharOffsetExceeded 0 --enable-error-stack -d /DS08BITS -M 8,1 packedbits.h5) - ADD_H5_PBITS_TEST (tpbitsIntOffsetExceeded 0 --enable-error-stack -d /DS16BITS -M 16,1 packedbits.h5) - ADD_H5_PBITS_TEST (tpbitsLongOffsetExceeded 0 --enable-error-stack -d /DS32BITS -M 32,1 packedbits.h5) - # Bad offset, must not be negative. - ADD_H5_PBITS_TEST (tpbitsOffsetNegative 1 --enable-error-stack -d /DS08BITS -M -1,1 packedbits.h5) - # Bad length, must not be positive. - ADD_H5_PBITS_TEST (tpbitsLengthPositive 1 --enable-error-stack -d /DS08BITS -M 4,0 packedbits.h5) - # Offset+Length is too large. Max is 8*sizeof(long long). - ADD_H5_PBITS_TEST (tpbitsLengthExceeded 1 --enable-error-stack -d /DS08BITS -M 37,28 packedbits.h5) - ADD_H5_PBITS_TEST (tpbitsCharLengthExceeded 0 --enable-error-stack -d /DS08BITS -M 2,7 packedbits.h5) - ADD_H5_PBITS_TEST (tpbitsIntLengthExceeded 0 --enable-error-stack -d /DS16BITS -M 10,7 packedbits.h5) - ADD_H5_PBITS_TEST (tpbitsLongLengthExceeded 0 --enable-error-stack -d /DS32BITS -M 26,7 packedbits.h5) - # Incomplete pair of packed bits request. - ADD_H5_PBITS_TEST (tpbitsIncomplete 1 --enable-error-stack -d /DS08BITS -M 0,2,2,1,0,2,2, packedbits.h5) - - IF (HDF5_ENABLE_USING_MEMCHECKER) - # Remove any output file left over from previous test run - ADD_TEST ( - NAME H5DUMP-XML-clearall-objects - COMMAND ${CMAKE_COMMAND} - -E remove - tall.h5.out - tall.h5.out.err - tall-2A.h5.out - tall-2A.h5.out.err - tarray1.h5.out - tarray1.h5.out.err - tarray2.h5.out - tarray2.h5.out.err - tarray3.h5.out - tarray3.h5.out.err - tarray6.h5.out - tarray6.h5.out.err - tarray7.h5.out - tarray7.h5.out.err - tattr.h5.out - tattr.h5.out.err - tbitfields.h5.out - tbitfields.h5.out.err - tcompound.h5.out - tcompound.h5.out.err - tcompound2.h5.out - tcompound2.h5.out.err - tcompound_complex.h5.out - tcompound_complex.h5.out.err - tdatareg.h5.out - tdatareg.h5.out.err - tdset.h5.out - tdset.h5.out.err - tdset2.h5.out - tdset2.h5.out.err - tempty-dtd-2.h5.out - tempty-dtd-2.h5.out.err - tempty-dtd-uri.h5.out - tempty-dtd-uri.h5.out.err - tempty-dtd.h5.out - tempty-dtd.h5.out.err - tempty-nons-2.h5.out - tempty-nons-2.h5.out.err - tempty-nons-uri.h5.out - tempty-nons-uri.h5.out.err - tempty-nons.h5.out - tempty-nons.h5.out.err - tempty-ns-2.h5.out - tempty-ns-2.h5.out.err - tempty-ns.h5.out - tempty-ns.h5.out.err - tempty.h5.out - tempty.h5.out.err - tenum.h5.out - tenum.h5.out.err - textlink.h5.out - textlink.h5.out.err - tfpformat.h5.out - tfpformat.h5.out.err - tgroup.h5.out - tgroup.h5.out.err - thlink.h5.out - thlink.h5.out.err - tloop.h5.out - tloop.h5.out.err - tloop2.h5.out - tloop2.h5.out.err - tmany.h5.out - tmany.h5.out.err - tname-amp.h5.out - tname-amp.h5.out.err - tname-apos.h5.out - tname-apos.h5.out.err - tname-gt.h5.out - tname-gt.h5.out.err - tname-lt.h5.out - tname-lt.h5.out.err - tname-quot.h5.out - tname-quot.h5.out.err - tname-sp.h5.out - tname-sp.h5.out.err - tnamed_dtype_attr.h5.out - tnamed_dtype_attr.h5.out.err - tnestedcomp.h5.out - tnestedcomp.h5.out.err - tnodata.h5.out - tnodata.h5.out.err - tnoname.h5.out - tnoname.h5.out.err - tobjref.h5.out - tobjref.h5.out.err - topaque.h5.out - topaque.h5.out.err - torderattr1.h5.out - torderattr1.h5.out.err - torderattr2.h5.out - torderattr2.h5.out.err - torderattr3.h5.out - torderattr3.h5.out.err - torderattr4.h5.out - torderattr4.h5.out.err - tref-escapes-at.h5.out - tref-escapes-at.h5.out.err - tref-escapes.h5.out - tref-escapes.h5.out.err - tref.h5.out - tref.h5.out.err - tsaf.h5.out - tsaf.h5.out.err - tslink.h5.out - tslink.h5.out.err - tstr.h5.out - tstr.h5.out.err - tstr2.h5.out - tstr2.h5.out.err - tstring.h5.out - tstring.h5.out.err - tstring-at.h5.out - tstring-at.h5.out.err - tudlink.h5.out - tudlink.h5.out.err - tvldtypes1.h5.out - tvldtypes1.h5.out.err - tvldtypes2.h5.out - tvldtypes2.h5.out.err - tvldtypes3.h5.out - tvldtypes3.h5.out.err - tvldtypes4.h5.out - tvldtypes4.h5.out.err - tvldtypes5.h5.out - tvldtypes5.h5.out.err - tvlstr.h5.out - tvlstr.h5.out.err - ) - SET_TESTS_PROPERTIES (H5DUMP-XML-clearall-objects PROPERTIES WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles/xml") - IF (NOT "${last_xml_test}" STREQUAL "") - SET_TESTS_PROPERTIES (H5DUMP-XML-clearall-objects PROPERTIES DEPENDS ${last_xml_test}) - ENDIF (NOT "${last_xml_test}" STREQUAL "") - SET (last_test "H5DUMP-XML-clearall-objects") - ENDIF (HDF5_ENABLE_USING_MEMCHECKER) - - ########## test XML - ADD_XML_H5_TEST (tall.h5 0 tall.h5) - ADD_XML_H5_TEST (tattr.h5 0 tattr.h5) - ADD_XML_H5_TEST (tbitfields.h5 0 tbitfields.h5) - ADD_XML_H5_TEST (tcompound.h5 0 tcompound.h5) - ADD_XML_H5_TEST (tcompound2.h5 0 tcompound2.h5) - ADD_XML_H5_TEST (tdatareg.h5 0 tdatareg.h5) - ADD_XML_H5_TEST (tdset.h5 0 tdset.h5) - ADD_XML_H5_TEST (tdset2.h5 0 tdset2.h5) - ADD_XML_H5_TEST (tenum.h5 0 tenum.h5) - ADD_XML_H5_TEST (tgroup.h5 0 tgroup.h5) - ADD_XML_H5_TEST (thlink.h5 0 thlink.h5) - ADD_XML_H5_TEST (tloop.h5 0 tloop.h5) - ADD_XML_H5_TEST (tloop2.h5 0 tloop2.h5) - ADD_XML_H5_TEST (tmany.h5 0 tmany.h5) - ADD_XML_H5_TEST (tnestedcomp.h5 0 tnestedcomp.h5) - ADD_XML_H5_TEST (tcompound_complex.h5 0 tcompound_complex.h5) - ADD_XML_H5_TEST (tobjref.h5 0 tobjref.h5) - ADD_XML_H5_TEST (topaque.h5 0 topaque.h5) - ADD_XML_H5_TEST (tslink.h5 0 tslink.h5) - ADD_XML_H5_TEST (tudlink.h5 0 tudlink.h5) - ADD_XML_H5_TEST (textlink.h5 0 textlink.h5) - ADD_XML_H5_TEST (tstr.h5 0 tstr.h5) - ADD_XML_H5_TEST (tstr2.h5 0 tstr2.h5) - ADD_XML_H5_TEST (tref.h5 0 tref.h5) - ADD_XML_H5_TEST (tname-amp.h5 0 tname-amp.h5) - ADD_XML_H5_TEST (tname-apos.h5 0 tname-apos.h5) - ADD_XML_H5_TEST (tname-gt.h5 0 tname-gt.h5) - ADD_XML_H5_TEST (tname-lt.h5 0 tname-lt.h5) - ADD_XML_H5_TEST (tname-quot.h5 0 tname-quot.h5) - ADD_XML_H5_TEST (tname-sp.h5 0 tname-sp.h5) - ADD_XML_H5_TEST (tstring.h5 0 tstring.h5) - ADD_XML_H5_TEST (tstring-at.h5 0 tstring-at.h5) - ADD_XML_H5_TEST (tref-escapes.h5 0 tref-escapes.h5) - ADD_XML_H5_TEST (tref-escapes-at.h5 0 tref-escapes-at.h5) - ADD_XML_H5_TEST (tnodata.h5 0 tnodata.h5) - ADD_XML_H5_TEST (tarray1.h5 0 tarray1.h5) - ADD_XML_H5_TEST (tarray2.h5 0 tarray2.h5) - ADD_XML_H5_TEST (tarray3.h5 0 tarray3.h5) - ADD_XML_H5_TEST (tarray6.h5 0 tarray6.h5) - ADD_XML_H5_TEST (tarray7.h5 0 tarray7.h5) - ADD_XML_H5_TEST (tvldtypes1.h5 0 tvldtypes1.h5) - ADD_XML_H5_TEST (tvldtypes2.h5 0 tvldtypes2.h5) - ADD_XML_H5_TEST (tvldtypes3.h5 0 tvldtypes3.h5) - ADD_XML_H5_TEST (tvldtypes4.h5 0 tvldtypes4.h5) - ADD_XML_H5_TEST (tvldtypes5.h5 0 tvldtypes5.h5) - ADD_XML_H5_TEST (tvlstr.h5 0 tvlstr.h5) - ADD_XML_H5_TEST (tsaf.h5 0 tsaf.h5) - ADD_XML_H5_TEST (tempty.h5 0 tempty.h5) - ADD_XML_H5_TEST (tnamed_dtype_attr.h5 0 tnamed_dtype_attr.h5) - ##Test dataset and attribute of null space. Commented out: - ## wait until the XML schema is updated for null space. - ## ADD_XML_H5_TEST (tnullspace.h5 0 tnulspace.h5) - ## So is dataspace with 0 dimension size. - ## ADD_XML_H5_TEST (zerodim.h5 0 zerodim.h5) - - # other options for xml - - ADD_XML_H5_TEST (tempty-dtd.h5 0 --use-dtd tempty.h5) - ADD_XML_H5_TEST (tempty-dtd-2.h5 0 -u tempty.h5) - - # The lone colon here confuses some systems (Cray X1). Skip - # it if configure detects that this is a problem. - SET (TESTTYPE "TEST") - IF (NOT "H5_LONE_COLON") - SET (TESTTYPE "SKIP") - ENDIF (NOT "H5_LONE_COLON") - ADD_XML_SKIP_H5_TEST (tempty-nons.h5 0 ${TESTTYPE} -X : tempty.h5) - - ADD_XML_H5_TEST (tempty-nons-2.h5 0 --xml-ns=: tempty.h5) - - ## Some of these combinations are syntactically correct but - ## the URLs are dummies - ADD_XML_H5_TEST (tempty-ns.h5 0 -X thing: tempty.h5) - ADD_XML_H5_TEST (tempty-ns-2.h5 0 --xml-ns=thing: tempty.h5) - ADD_XML_H5_TEST (tempty-nons-uri.h5 0 --xml-ns=: --xml-dtd=http://somewhere.net tempty.h5) - ADD_XML_H5_TEST (tempty-dtd-uri.h5 0 --use-dtd --xml-dtd=http://somewhere.net tempty.h5) - - ADD_XML_H5_TEST (tall-2A.h5 0 -A tall.h5) + INCLUDE (CMakeTests.cmake) - # tests for attribute order - ADD_XML_H5_TEST (torderattr1.h5 0 -H --sort_by=name --sort_order=ascending torderattr.h5) - ADD_XML_H5_TEST (torderattr2.h5 0 -H --sort_by=name --sort_order=descending torderattr.h5) - ADD_XML_H5_TEST (torderattr3.h5 0 -H --sort_by=creation_order --sort_order=ascending torderattr.h5) - ADD_XML_H5_TEST (torderattr4.h5 0 -H --sort_by=creation_order --sort_order=descending torderattr.h5) + INCLUDE (CMakeTestsPBITS.cmake) - # tests for floating point user defined printf format - ADD_XML_H5_TEST (tfpformat.h5 0 -u -m %.7f tfpformat.h5) - + INCLUDE (CMakeTestsXML.cmake) ENDIF (BUILD_TESTING) ############################################################################## diff --git a/tools/h5dump/CMakeTests.cmake b/tools/h5dump/CMakeTests.cmake new file mode 100644 index 0000000..026b6b2 --- /dev/null +++ b/tools/h5dump/CMakeTests.cmake @@ -0,0 +1,1367 @@ + +############################################################################## +############################################################################## +### T E S T I N G ### +############################################################################## +############################################################################## + + # -------------------------------------------------------------------- + # Copy all the HDF5 files from the test directory into the source directory + # -------------------------------------------------------------------- + SET (HDF5_REFERENCE_FILES + ${HDF5_TOOLS_SRC_DIR}/testfiles/charsets.ddl + ${HDF5_TOOLS_SRC_DIR}/testfiles/file_space.ddl + ${HDF5_TOOLS_SRC_DIR}/testfiles/filter_fail.ddl + ${HDF5_TOOLS_SRC_DIR}/testfiles/packedbits.ddl + ${HDF5_TOOLS_SRC_DIR}/testfiles/tall-1.ddl + ${HDF5_TOOLS_SRC_DIR}/testfiles/tall-2.ddl + ${HDF5_TOOLS_SRC_DIR}/testfiles/tall-2A.ddl + ${HDF5_TOOLS_SRC_DIR}/testfiles/tall-2A0.ddl + ${HDF5_TOOLS_SRC_DIR}/testfiles/tall-2B.ddl + ${HDF5_TOOLS_SRC_DIR}/testfiles/tall-3.ddl + ${HDF5_TOOLS_SRC_DIR}/testfiles/tall-4s.ddl + ${HDF5_TOOLS_SRC_DIR}/testfiles/tall-5s.ddl + ${HDF5_TOOLS_SRC_DIR}/testfiles/tall-6.ddl + ${HDF5_TOOLS_SRC_DIR}/testfiles/tall-7.ddl + ${HDF5_TOOLS_SRC_DIR}/testfiles/tall-7N.ddl + ${HDF5_TOOLS_SRC_DIR}/testfiles/tallfilters.ddl + ${HDF5_TOOLS_SRC_DIR}/testfiles/tarray1.ddl + ${HDF5_TOOLS_SRC_DIR}/testfiles/tarray1_big.ddl + ${HDF5_TOOLS_SRC_DIR}/testfiles/tarray2.ddl + ${HDF5_TOOLS_SRC_DIR}/testfiles/tarray3.ddl + ${HDF5_TOOLS_SRC_DIR}/testfiles/tarray4.ddl + ${HDF5_TOOLS_SRC_DIR}/testfiles/tarray5.ddl + ${HDF5_TOOLS_SRC_DIR}/testfiles/tarray6.ddl + ${HDF5_TOOLS_SRC_DIR}/testfiles/tarray7.ddl + ${HDF5_TOOLS_SRC_DIR}/testfiles/tarray8.ddl + ${HDF5_TOOLS_SRC_DIR}/testfiles/tattr-1.ddl + ${HDF5_TOOLS_SRC_DIR}/testfiles/tattr-2.ddl + ${HDF5_TOOLS_SRC_DIR}/testfiles/tattr-3.ddl + ${HDF5_TOOLS_SRC_DIR}/testfiles/tattr-4_be.ddl + ${HDF5_TOOLS_SRC_DIR}/testfiles/tattrcontents1.ddl + ${HDF5_TOOLS_SRC_DIR}/testfiles/tattrcontents2.ddl + ${HDF5_TOOLS_SRC_DIR}/testfiles/tattrintsize.ddl + ${HDF5_TOOLS_SRC_DIR}/testfiles/tattrreg.ddl + ${HDF5_TOOLS_SRC_DIR}/testfiles/tattrregR.ddl + ${HDF5_TOOLS_SRC_DIR}/testfiles/tbin1.ddl + ${HDF5_TOOLS_SRC_DIR}/testfiles/tbin1.ddl + ${HDF5_TOOLS_SRC_DIR}/testfiles/tbin2.ddl + ${HDF5_TOOLS_SRC_DIR}/testfiles/tbin3.ddl + ${HDF5_TOOLS_SRC_DIR}/testfiles/tbin4.ddl + ${HDF5_TOOLS_SRC_DIR}/testfiles/tbinregR.ddl + ${HDF5_TOOLS_SRC_DIR}/testfiles/tbigdims.ddl + ${HDF5_TOOLS_SRC_DIR}/testfiles/tboot1.ddl + ${HDF5_TOOLS_SRC_DIR}/testfiles/tboot2.ddl + ${HDF5_TOOLS_SRC_DIR}/testfiles/tchar1.ddl + ${HDF5_TOOLS_SRC_DIR}/testfiles/tchunked.ddl + ${HDF5_TOOLS_SRC_DIR}/testfiles/tcmpdattrintsize.ddl + ${HDF5_TOOLS_SRC_DIR}/testfiles/tcmpdintsize.ddl + ${HDF5_TOOLS_SRC_DIR}/testfiles/tcomp-1.ddl + ${HDF5_TOOLS_SRC_DIR}/testfiles/tcomp-2.ddl + ${HDF5_TOOLS_SRC_DIR}/testfiles/tcomp-3.ddl + ${HDF5_TOOLS_SRC_DIR}/testfiles/tcomp-4.ddl + ${HDF5_TOOLS_SRC_DIR}/testfiles/tcompact.ddl + ${HDF5_TOOLS_SRC_DIR}/testfiles/tcontents.ddl + ${HDF5_TOOLS_SRC_DIR}/testfiles/tcontiguos.ddl + ${HDF5_TOOLS_SRC_DIR}/testfiles/tdatareg.ddl + ${HDF5_TOOLS_SRC_DIR}/testfiles/tdataregR.ddl + ${HDF5_TOOLS_SRC_DIR}/testfiles/tdeflate.ddl + ${HDF5_TOOLS_SRC_DIR}/testfiles/tdset-1.ddl + ${HDF5_TOOLS_SRC_DIR}/testfiles/tdset-2.ddl + ${HDF5_TOOLS_SRC_DIR}/testfiles/tdset-3s.ddl + ${HDF5_TOOLS_SRC_DIR}/testfiles/tempty.ddl + ${HDF5_TOOLS_SRC_DIR}/testfiles/texceedsubstart.ddl + ${HDF5_TOOLS_SRC_DIR}/testfiles/texceedsubcount.ddl + ${HDF5_TOOLS_SRC_DIR}/testfiles/texceedsubstride.ddl + ${HDF5_TOOLS_SRC_DIR}/testfiles/texceedsubblock.ddl + ${HDF5_TOOLS_SRC_DIR}/testfiles/texternal.ddl + ${HDF5_TOOLS_SRC_DIR}/testfiles/textlinksrc.ddl + ${HDF5_TOOLS_SRC_DIR}/testfiles/textlinkfar.ddl + ${HDF5_TOOLS_SRC_DIR}/testfiles/textlink.ddl + ${HDF5_TOOLS_SRC_DIR}/testfiles/tfamily.ddl + ${HDF5_TOOLS_SRC_DIR}/testfiles/tfill.ddl + ${HDF5_TOOLS_SRC_DIR}/testfiles/tfletcher32.ddl + ${HDF5_TOOLS_SRC_DIR}/testfiles/tfpformat.ddl + ${HDF5_TOOLS_SRC_DIR}/testfiles/tgroup-1.ddl + ${HDF5_TOOLS_SRC_DIR}/testfiles/tgroup-2.ddl + ${HDF5_TOOLS_SRC_DIR}/testfiles/tgrp_comments.ddl + ${HDF5_TOOLS_SRC_DIR}/testfiles/thlink-1.ddl + ${HDF5_TOOLS_SRC_DIR}/testfiles/thlink-2.ddl + ${HDF5_TOOLS_SRC_DIR}/testfiles/thlink-3.ddl + ${HDF5_TOOLS_SRC_DIR}/testfiles/thlink-4.ddl + ${HDF5_TOOLS_SRC_DIR}/testfiles/thlink-5.ddl + ${HDF5_TOOLS_SRC_DIR}/testfiles/thyperslab.ddl + ${HDF5_TOOLS_SRC_DIR}/testfiles/tindicesno.ddl + ${HDF5_TOOLS_SRC_DIR}/testfiles/tindicessub1.ddl + ${HDF5_TOOLS_SRC_DIR}/testfiles/tindicessub2.ddl + ${HDF5_TOOLS_SRC_DIR}/testfiles/tindicessub3.ddl + ${HDF5_TOOLS_SRC_DIR}/testfiles/tindicessub4.ddl + ${HDF5_TOOLS_SRC_DIR}/testfiles/tindicesyes.ddl + ${HDF5_TOOLS_SRC_DIR}/testfiles/tlarge_objname.ddl + #${HDF5_TOOLS_SRC_DIR}/testfiles/tldouble.ddl + ${HDF5_TOOLS_SRC_DIR}/testfiles/tlonglinks.ddl + ${HDF5_TOOLS_SRC_DIR}/testfiles/tloop-1.ddl + ${HDF5_TOOLS_SRC_DIR}/testfiles/tmulti.ddl + ${HDF5_TOOLS_SRC_DIR}/testfiles/tmultifile.ddl + #${HDF5_TOOLS_SRC_DIR}/testfiles/tqmarkfile.ddl + #${HDF5_TOOLS_SRC_DIR}/testfiles/tstarfile.ddl + ${HDF5_TOOLS_SRC_DIR}/testfiles/tnamed_dtype_attr.ddl + ${HDF5_TOOLS_SRC_DIR}/testfiles/tnestcomp-1.ddl + ${HDF5_TOOLS_SRC_DIR}/testfiles/tnestedcmpddt.ddl + ${HDF5_TOOLS_SRC_DIR}/testfiles/tnbit.ddl + ${HDF5_TOOLS_SRC_DIR}/testfiles/tnoattrdata.ddl + ${HDF5_TOOLS_SRC_DIR}/testfiles/tnoattrddl.ddl + ${HDF5_TOOLS_SRC_DIR}/testfiles/tnodata.ddl + ${HDF5_TOOLS_SRC_DIR}/testfiles/tnoddl.ddl + ${HDF5_TOOLS_SRC_DIR}/testfiles/tnoddlfile.ddl + ${HDF5_TOOLS_SRC_DIR}/testfiles/tno-subset.ddl + ${HDF5_TOOLS_SRC_DIR}/testfiles/tnullspace.ddl + ${HDF5_TOOLS_SRC_DIR}/testfiles/trawdatafile.ddl + ${HDF5_TOOLS_SRC_DIR}/testfiles/trawssetfile.ddl + ${HDF5_TOOLS_SRC_DIR}/testfiles/zerodim.ddl + ${HDF5_TOOLS_SRC_DIR}/testfiles/tordergr1.ddl + ${HDF5_TOOLS_SRC_DIR}/testfiles/tordergr2.ddl + ${HDF5_TOOLS_SRC_DIR}/testfiles/tordergr3.ddl + ${HDF5_TOOLS_SRC_DIR}/testfiles/tordergr4.ddl + ${HDF5_TOOLS_SRC_DIR}/testfiles/tordergr5.ddl + ${HDF5_TOOLS_SRC_DIR}/testfiles/torderattr1.ddl + ${HDF5_TOOLS_SRC_DIR}/testfiles/torderattr2.ddl + ${HDF5_TOOLS_SRC_DIR}/testfiles/torderattr3.ddl + ${HDF5_TOOLS_SRC_DIR}/testfiles/torderattr4.ddl + ${HDF5_TOOLS_SRC_DIR}/testfiles/tordercontents1.ddl + ${HDF5_TOOLS_SRC_DIR}/testfiles/tordercontents2.ddl + ${HDF5_TOOLS_SRC_DIR}/testfiles/torderlinks1.ddl + ${HDF5_TOOLS_SRC_DIR}/testfiles/torderlinks2.ddl + ${HDF5_TOOLS_SRC_DIR}/testfiles/tperror.ddl + ${HDF5_TOOLS_SRC_DIR}/testfiles/treference.ddl + ${HDF5_TOOLS_SRC_DIR}/testfiles/tsaf.ddl + ${HDF5_TOOLS_SRC_DIR}/testfiles/tscalarintsize.ddl + ${HDF5_TOOLS_SRC_DIR}/testfiles/tscalarattrintsize.ddl + ${HDF5_TOOLS_SRC_DIR}/testfiles/tscalarstring.ddl + ${HDF5_TOOLS_SRC_DIR}/testfiles/tscaleoffset.ddl + ${HDF5_TOOLS_SRC_DIR}/testfiles/tshuffle.ddl + ${HDF5_TOOLS_SRC_DIR}/testfiles/tslink-1.ddl + ${HDF5_TOOLS_SRC_DIR}/testfiles/tslink-2.ddl + ${HDF5_TOOLS_SRC_DIR}/testfiles/tslink-D.ddl + ${HDF5_TOOLS_SRC_DIR}/testfiles/tsplit_file.ddl + ${HDF5_TOOLS_SRC_DIR}/testfiles/tstr-1.ddl + ${HDF5_TOOLS_SRC_DIR}/testfiles/tstr-2.ddl + ${HDF5_TOOLS_SRC_DIR}/testfiles/tstring.ddl + ${HDF5_TOOLS_SRC_DIR}/testfiles/tstring2.ddl + ${HDF5_TOOLS_SRC_DIR}/testfiles/tstringe.ddl + ${HDF5_TOOLS_SRC_DIR}/testfiles/tszip.ddl + ${HDF5_TOOLS_SRC_DIR}/testfiles/tudlink-1.ddl + ${HDF5_TOOLS_SRC_DIR}/testfiles/tudlink-2.ddl + ${HDF5_TOOLS_SRC_DIR}/testfiles/tuserfilter.ddl + ${HDF5_TOOLS_SRC_DIR}/testfiles/tvldtypes1.ddl + ${HDF5_TOOLS_SRC_DIR}/testfiles/tvldtypes2.ddl + ${HDF5_TOOLS_SRC_DIR}/testfiles/tvldtypes3.ddl + ${HDF5_TOOLS_SRC_DIR}/testfiles/tvldtypes4.ddl + ${HDF5_TOOLS_SRC_DIR}/testfiles/tvldtypes5.ddl + ${HDF5_TOOLS_SRC_DIR}/testfiles/tvlstr.ddl + ${HDF5_TOOLS_SRC_DIR}/testfiles/tvms.ddl + ${HDF5_TOOLS_SRC_DIR}/testfiles/twidedisplay.ddl + ${HDF5_TOOLS_SRC_DIR}/testfiles/twithddlfile.ddl + ${HDF5_TOOLS_SRC_DIR}/testfiles/h5dump-help.txt + ${HDF5_TOOLS_SRC_DIR}/testfiles/out3.h5import + ) + SET (HDF5_REFERENCE_EXP_FILES + tall-6.exp + tnoddlfile.exp + trawdatafile.exp + trawssetfile.exp + tstr2bin2.exp + tstr2bin6.exp + twithddl.exp + twithddlfile.exp + ) + SET (HDF5_REFERENCE_TEST_FILES + ${HDF5_TOOLS_SRC_DIR}/testfiles/charsets.h5 + ${HDF5_TOOLS_SRC_DIR}/testfiles/file_space.h5 + ${HDF5_TOOLS_SRC_DIR}/testfiles/filter_fail.h5 + ${HDF5_TOOLS_SRC_DIR}/testfiles/packedbits.h5 + ${HDF5_TOOLS_SRC_DIR}/testfiles/taindices.h5 + ${HDF5_TOOLS_SRC_DIR}/testfiles/tall.h5 + ${HDF5_TOOLS_SRC_DIR}/testfiles/tarray1.h5 + ${HDF5_TOOLS_SRC_DIR}/testfiles/tarray1_big.h5 + ${HDF5_TOOLS_SRC_DIR}/testfiles/tarray2.h5 + ${HDF5_TOOLS_SRC_DIR}/testfiles/tarray3.h5 + ${HDF5_TOOLS_SRC_DIR}/testfiles/tarray4.h5 + ${HDF5_TOOLS_SRC_DIR}/testfiles/tarray5.h5 + ${HDF5_TOOLS_SRC_DIR}/testfiles/tarray6.h5 + ${HDF5_TOOLS_SRC_DIR}/testfiles/tarray7.h5 + ${HDF5_TOOLS_SRC_DIR}/testfiles/tarray8.h5 + ${HDF5_TOOLS_SRC_DIR}/testfiles/tattr.h5 + ${HDF5_TOOLS_SRC_DIR}/testfiles/tattr2.h5 + ${HDF5_TOOLS_SRC_DIR}/testfiles/tattr4_be.h5 + ${HDF5_TOOLS_SRC_DIR}/testfiles/tattrintsize.h5 + ${HDF5_TOOLS_SRC_DIR}/testfiles/tattrreg.h5 + ${HDF5_TOOLS_SRC_DIR}/testfiles/tbigdims.h5 + ${HDF5_TOOLS_SRC_DIR}/testfiles/tbinary.h5 + ${HDF5_TOOLS_SRC_DIR}/testfiles/tchar.h5 + ${HDF5_TOOLS_SRC_DIR}/testfiles/tcmpdattrintsize.h5 + ${HDF5_TOOLS_SRC_DIR}/testfiles/tcmpdintsize.h5 + ${HDF5_TOOLS_SRC_DIR}/testfiles/tcompound.h5 + ${HDF5_TOOLS_SRC_DIR}/testfiles/tcompound_complex.h5 + ${HDF5_TOOLS_SRC_DIR}/testfiles/tdatareg.h5 + ${HDF5_TOOLS_SRC_DIR}/testfiles/tdset.h5 + ${HDF5_TOOLS_SRC_DIR}/testfiles/tempty.h5 + ${HDF5_TOOLS_SRC_DIR}/testfiles/tsoftlinks.h5 + ${HDF5_TOOLS_SRC_DIR}/testfiles/textlinkfar.h5 + ${HDF5_TOOLS_SRC_DIR}/testfiles/textlinksrc.h5 + ${HDF5_TOOLS_SRC_DIR}/testfiles/textlinktar.h5 + ${HDF5_TOOLS_SRC_DIR}/testfiles/textlink.h5 + ${HDF5_TOOLS_SRC_DIR}/testfiles/tfamily00000.h5 + ${HDF5_TOOLS_SRC_DIR}/testfiles/tfamily00001.h5 + ${HDF5_TOOLS_SRC_DIR}/testfiles/tfamily00002.h5 + ${HDF5_TOOLS_SRC_DIR}/testfiles/tfamily00003.h5 + ${HDF5_TOOLS_SRC_DIR}/testfiles/tfamily00004.h5 + ${HDF5_TOOLS_SRC_DIR}/testfiles/tfamily00005.h5 + ${HDF5_TOOLS_SRC_DIR}/testfiles/tfamily00006.h5 + ${HDF5_TOOLS_SRC_DIR}/testfiles/tfamily00007.h5 + ${HDF5_TOOLS_SRC_DIR}/testfiles/tfamily00008.h5 + ${HDF5_TOOLS_SRC_DIR}/testfiles/tfamily00009.h5 + ${HDF5_TOOLS_SRC_DIR}/testfiles/tfamily00010.h5 + ${HDF5_TOOLS_SRC_DIR}/testfiles/tfcontents1.h5 + ${HDF5_TOOLS_SRC_DIR}/testfiles/tfcontents2.h5 + ${HDF5_TOOLS_SRC_DIR}/testfiles/tfilters.h5 + ${HDF5_TOOLS_SRC_DIR}/testfiles/tfpformat.h5 + ${HDF5_TOOLS_SRC_DIR}/testfiles/tfvalues.h5 + ${HDF5_TOOLS_SRC_DIR}/testfiles/tgroup.h5 + ${HDF5_TOOLS_SRC_DIR}/testfiles/tgrp_comments.h5 + ${HDF5_TOOLS_SRC_DIR}/testfiles/thlink.h5 + ${HDF5_TOOLS_SRC_DIR}/testfiles/thyperslab.h5 + ${HDF5_TOOLS_SRC_DIR}/testfiles/tlarge_objname.h5 + #${HDF5_TOOLS_SRC_DIR}/testfiles/tldouble.h5 + ${HDF5_TOOLS_SRC_DIR}/testfiles/tlonglinks.h5 + ${HDF5_TOOLS_SRC_DIR}/testfiles/tloop.h5 + ${HDF5_TOOLS_SRC_DIR}/testfiles/tmulti-b.h5 + ${HDF5_TOOLS_SRC_DIR}/testfiles/tmulti-g.h5 + ${HDF5_TOOLS_SRC_DIR}/testfiles/tmulti-l.h5 + ${HDF5_TOOLS_SRC_DIR}/testfiles/tmulti-o.h5 + ${HDF5_TOOLS_SRC_DIR}/testfiles/tmulti-r.h5 + ${HDF5_TOOLS_SRC_DIR}/testfiles/tmulti-s.h5 + ${HDF5_TOOLS_SRC_DIR}/testfiles/tnamed_dtype_attr.h5 + ${HDF5_TOOLS_SRC_DIR}/testfiles/tnestedcomp.h5 + ${HDF5_TOOLS_SRC_DIR}/testfiles/tnestedcmpddt.h5 + ${HDF5_TOOLS_SRC_DIR}/testfiles/tno-subset.h5 + ${HDF5_TOOLS_SRC_DIR}/testfiles/tnullspace.h5 + ${HDF5_TOOLS_SRC_DIR}/testfiles/zerodim.h5 + ${HDF5_TOOLS_SRC_DIR}/testfiles/torderattr.h5 + ${HDF5_TOOLS_SRC_DIR}/testfiles/tordergr.h5 + ${HDF5_TOOLS_SRC_DIR}/testfiles/tsaf.h5 + ${HDF5_TOOLS_SRC_DIR}/testfiles/tscalarintsize.h5 + ${HDF5_TOOLS_SRC_DIR}/testfiles/tscalarattrintsize.h5 + ${HDF5_TOOLS_SRC_DIR}/testfiles/tscalarstring.h5 + ${HDF5_TOOLS_SRC_DIR}/testfiles/tslink.h5 + ${HDF5_TOOLS_SRC_DIR}/testfiles/tsplit_file-m.h5 + ${HDF5_TOOLS_SRC_DIR}/testfiles/tsplit_file-r.h5 + ${HDF5_TOOLS_SRC_DIR}/testfiles/tstr.h5 + ${HDF5_TOOLS_SRC_DIR}/testfiles/tstr2.h5 + ${HDF5_TOOLS_SRC_DIR}/testfiles/tstr3.h5 + ${HDF5_TOOLS_SRC_DIR}/testfiles/tudlink.h5 + ${HDF5_TOOLS_SRC_DIR}/testfiles/tvldtypes1.h5 + ${HDF5_TOOLS_SRC_DIR}/testfiles/tvldtypes2.h5 + ${HDF5_TOOLS_SRC_DIR}/testfiles/tvldtypes3.h5 + ${HDF5_TOOLS_SRC_DIR}/testfiles/tvldtypes4.h5 + ${HDF5_TOOLS_SRC_DIR}/testfiles/tvldtypes5.h5 + ${HDF5_TOOLS_SRC_DIR}/testfiles/tvlstr.h5 + ${HDF5_TOOLS_SRC_DIR}/testfiles/tvms.h5 + ) + SET (HDF5_ERROR_REFERENCE_TEST_FILES + ${PROJECT_SOURCE_DIR}/errfiles/filter_fail.err + ${PROJECT_SOURCE_DIR}/errfiles/tall-1.err + ${PROJECT_SOURCE_DIR}/errfiles/tall-2A.err + ${PROJECT_SOURCE_DIR}/errfiles/tall-2A0.err + ${PROJECT_SOURCE_DIR}/errfiles/tall-2B.err + ${PROJECT_SOURCE_DIR}/errfiles/tarray1_big.err + ${PROJECT_SOURCE_DIR}/errfiles/tattrregR.err + ${PROJECT_SOURCE_DIR}/errfiles/tattr-3.err + ${PROJECT_SOURCE_DIR}/errfiles/tcomp-3.err + ${PROJECT_SOURCE_DIR}/errfiles/tdataregR.err + ${PROJECT_SOURCE_DIR}/errfiles/tdset-2.err + ${PROJECT_SOURCE_DIR}/errfiles/texceedsubblock.err + ${PROJECT_SOURCE_DIR}/errfiles/texceedsubcount.err + ${PROJECT_SOURCE_DIR}/errfiles/texceedsubstart.err + ${PROJECT_SOURCE_DIR}/errfiles/texceedsubstride.err + ${PROJECT_SOURCE_DIR}/errfiles/textlink.err + ${PROJECT_SOURCE_DIR}/errfiles/textlinkfar.err + ${PROJECT_SOURCE_DIR}/errfiles/textlinksrc.err + ${PROJECT_SOURCE_DIR}/errfiles/torderlinks1.err + ${PROJECT_SOURCE_DIR}/errfiles/torderlinks2.err + ${PROJECT_SOURCE_DIR}/errfiles/tgroup-2.err + ${PROJECT_SOURCE_DIR}/errfiles/tperror.err + ${PROJECT_SOURCE_DIR}/errfiles/tslink-D.err + ) + + # make test dir + FILE (MAKE_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles") + + # + # copy test files from source dir to test dir + # + FOREACH (tst_h5_file ${HDF5_REFERENCE_TEST_FILES}) + GET_FILENAME_COMPONENT(fname "${tst_h5_file}" NAME) + SET (dest "${PROJECT_BINARY_DIR}/testfiles/std/${fname}") + #MESSAGE (STATUS " Copying ${tst_h5_file}") + ADD_CUSTOM_COMMAND ( + TARGET h5dump + POST_BUILD + COMMAND ${CMAKE_COMMAND} + ARGS -E copy_if_different ${tst_h5_file} ${dest} + ) + ENDFOREACH (tst_h5_file ${HDF5_REFERENCE_TEST_FILES}) + + FOREACH (tst_exp_file ${HDF5_REFERENCE_EXP_FILES}) + IF (WIN32 AND NOT CYGWIN) + FILE (READ ${HDF5_TOOLS_SRC_DIR}/testfiles/${tst_exp_file} TEST_STREAM) + FILE (WRITE ${PROJECT_BINARY_DIR}/testfiles/std/${tst_exp_file} "${TEST_STREAM}") + ELSE (WIN32 AND NOT CYGWIN) + ADD_CUSTOM_COMMAND ( + TARGET h5dump + POST_BUILD + COMMAND ${CMAKE_COMMAND} + ARGS -E copy_if_different ${HDF5_TOOLS_SRC_DIR}/testfiles/${tst_exp_file} ${PROJECT_BINARY_DIR}/testfiles/std/${tst_exp_file} + ) + ENDIF (WIN32 AND NOT CYGWIN) + ENDFOREACH (tst_exp_file ${HDF5_REFERENCE_EXP_FILES}) + + FOREACH (tst_other_file ${HDF5_REFERENCE_FILES}) + GET_FILENAME_COMPONENT(fname "${tst_other_file}" NAME) + SET (dest "${PROJECT_BINARY_DIR}/testfiles/std/${fname}") + #MESSAGE (STATUS " Copying ${tst_other_file}") + ADD_CUSTOM_COMMAND ( + TARGET h5dump + POST_BUILD + COMMAND ${CMAKE_COMMAND} + ARGS -E copy_if_different ${tst_other_file} ${dest} + ) + ENDFOREACH (tst_other_file ${HDF5_REFERENCE_FILES}) + + FOREACH (tst_error_file ${HDF5_ERROR_REFERENCE_TEST_FILES}) + GET_FILENAME_COMPONENT(fname "${tst_error_file}" NAME) + SET (dest "${PROJECT_BINARY_DIR}/testfiles/std/${fname}") + #MESSAGE (STATUS " Copying ${tst_error_file}") + ADD_CUSTOM_COMMAND ( + TARGET h5dump + POST_BUILD + COMMAND ${CMAKE_COMMAND} + ARGS -E copy_if_different ${tst_error_file} ${dest} + ) + ENDFOREACH (tst_error_file ${HDF5_ERROR_REFERENCE_TEST_FILES}) + + # -------------------------------------------------------------------- + # Special file handling + # -------------------------------------------------------------------- + ADD_CUSTOM_COMMAND ( + TARGET h5dump + POST_BUILD + COMMAND ${CMAKE_COMMAND} + ARGS -E copy_if_different ${HDF5_TOOLS_SOURCE_DIR}/testfiles/tbin1.ddl ${PROJECT_BINARY_DIR}/testfiles/std/tbin1LE.ddl + ) + + IF (WIN32 AND NOT CYGWIN) + FILE (READ ${HDF5_TOOLS_SRC_DIR}/testfiles/tbinregR.exp TEST_STREAM) + FILE (WRITE ${PROJECT_BINARY_DIR}/testfiles/std/tbinregR.exp "${TEST_STREAM}") + ELSE (WIN32 AND NOT CYGWIN) + ADD_CUSTOM_COMMAND ( + TARGET h5dump + POST_BUILD + COMMAND ${CMAKE_COMMAND} + ARGS -E copy_if_different ${HDF5_TOOLS_SRC_DIR}/testfiles/tbinregR.exp ${PROJECT_BINARY_DIR}/testfiles/std/tbinregR.exp + ) + ENDIF (WIN32 AND NOT CYGWIN) + +############################################################################## +############################################################################## +### T H E T E S T S M A C R O S ### +############################################################################## +############################################################################## + + MACRO (ADD_HELP_TEST testname resultcode) + # If using memchecker add tests without using scripts + IF (HDF5_ENABLE_USING_MEMCHECKER) + ADD_TEST (NAME H5DUMP-${testname} COMMAND $ ${ARGN}) + SET_TESTS_PROPERTIES (H5DUMP-${testname} PROPERTIES WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles/std") + IF (NOT "${last_test}" STREQUAL "") + SET_TESTS_PROPERTIES (H5DUMP-${testname} PROPERTIES DEPENDS ${last_test}) + ENDIF (NOT "${last_test}" STREQUAL "") + SET (last_test "H5DUMP-${testname}") + ELSE (HDF5_ENABLE_USING_MEMCHECKER) + ADD_TEST ( + NAME H5DUMP-h5dump-${testname}-clear-objects + COMMAND ${CMAKE_COMMAND} + -E remove h5dump-${testname}.out h5dump-${testname}.out.err + ) + SET_TESTS_PROPERTIES (H5DUMP-h5dump-${testname}-clear-objects PROPERTIES WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles/std") + ADD_TEST ( + NAME H5DUMP-h5dump-${testname} + COMMAND "${CMAKE_COMMAND}" + -D "TEST_PROGRAM=$" + -D "TEST_ARGS:STRING=${ARGN}" + -D "TEST_FOLDER=${PROJECT_BINARY_DIR}/testfiles/std" + -D "TEST_OUTPUT=h5dump-${testname}.out" + -D "TEST_EXPECT=${resultcode}" + -D "TEST_REFERENCE=h5dump-${testname}.txt" + -P "${HDF5_RESOURCES_DIR}/runTest.cmake" + ) + SET_TESTS_PROPERTIES (H5DUMP-h5dump-${testname} PROPERTIES DEPENDS "H5DUMP-h5dump-${testname}-clear-objects") + ENDIF (HDF5_ENABLE_USING_MEMCHECKER) + ENDMACRO (ADD_HELP_TEST) + + MACRO (ADD_SKIP_H5_TEST skipresultfile skipresultcode testtype) + IF (${testtype} STREQUAL "SKIP") + IF (NOT HDF5_ENABLE_USING_MEMCHECKER) + ADD_TEST ( + NAME H5DUMP-${skipresultfile}-SKIPPED + COMMAND ${CMAKE_COMMAND} -E echo "SKIP ${skipresultfile} ${ARGN}" + ) + ENDIF (NOT HDF5_ENABLE_USING_MEMCHECKER) + ELSE (${testtype} STREQUAL "SKIP") + ADD_H5_TEST (${skipresultfile} ${skipresultcode} ${ARGN}) + ENDIF (${testtype} STREQUAL "SKIP") + ENDMACRO (ADD_SKIP_H5_TEST) + + MACRO (ADD_H5_TEST resultfile resultcode) + # If using memchecker add tests without using scripts + IF (HDF5_ENABLE_USING_MEMCHECKER) + ADD_TEST (NAME H5DUMP-${resultfile} COMMAND $ ${ARGN}) + SET_TESTS_PROPERTIES (H5DUMP-${resultfile} PROPERTIES WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles/std") + IF (NOT ${resultcode} STREQUAL "0") + SET_TESTS_PROPERTIES (H5DUMP-${resultfile} PROPERTIES WILL_FAIL "true") + ENDIF (NOT ${resultcode} STREQUAL "0") + IF (NOT "${last_test}" STREQUAL "") + SET_TESTS_PROPERTIES (H5DUMP-${resultfile} PROPERTIES DEPENDS ${last_test}) + ENDIF (NOT "${last_test}" STREQUAL "") + ELSE (HDF5_ENABLE_USING_MEMCHECKER) + ADD_TEST ( + NAME H5DUMP-${resultfile}-clear-objects + COMMAND ${CMAKE_COMMAND} + -E remove ${resultfile}.bin ${resultfile}.out ${resultfile}.out.err + ) + SET_TESTS_PROPERTIES (H5DUMP-${resultfile}-clear-objects PROPERTIES WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles/std") + ADD_TEST ( + NAME H5DUMP-${resultfile} + COMMAND "${CMAKE_COMMAND}" + -D "TEST_PROGRAM=$" + -D "TEST_ARGS:STRING=${ARGN}" + -D "TEST_FOLDER=${PROJECT_BINARY_DIR}/testfiles/std" + -D "TEST_OUTPUT=${resultfile}.out" + -D "TEST_EXPECT=${resultcode}" + -D "TEST_REFERENCE=${resultfile}.ddl" + -P "${HDF5_RESOURCES_DIR}/runTest.cmake" + ) + SET_TESTS_PROPERTIES (H5DUMP-${resultfile} PROPERTIES DEPENDS "H5DUMP-${resultfile}-clear-objects") + ENDIF (HDF5_ENABLE_USING_MEMCHECKER) + ENDMACRO (ADD_H5_TEST file) + + MACRO (ADD_H5_TEST_N resultfile resultcode) + # If using memchecker add tests without using scripts + IF (HDF5_ENABLE_USING_MEMCHECKER) + ADD_TEST (NAME H5DUMP-N-${resultfile} COMMAND $ ${ARGN}) + SET_TESTS_PROPERTIES (H5DUMP-N-${resultfile} PROPERTIES WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles/std") + IF (NOT ${resultcode} STREQUAL "0") + SET_TESTS_PROPERTIES (H5DUMP-N-${resultfile} PROPERTIES WILL_FAIL "true") + ENDIF (NOT ${resultcode} STREQUAL "0") + IF (NOT "${last_test}" STREQUAL "") + SET_TESTS_PROPERTIES (H5DUMP-N-${resultfile} PROPERTIES DEPENDS ${last_test}) + ENDIF (NOT "${last_test}" STREQUAL "") + ELSE (HDF5_ENABLE_USING_MEMCHECKER) + ADD_TEST ( + NAME H5DUMP-N-${resultfile}-clear-objects + COMMAND ${CMAKE_COMMAND} + -E remove ${resultfile}-N.bin ${resultfile}-N.out ${resultfile}-N.out.err + ) + SET_TESTS_PROPERTIES (H5DUMP-N-${resultfile}-clear-objects PROPERTIES WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles/std") + ADD_TEST ( + NAME H5DUMP-N-${resultfile} + COMMAND "${CMAKE_COMMAND}" + -D "TEST_PROGRAM=$" + -D "TEST_ARGS:STRING=${ARGN}" + -D "TEST_FOLDER=${PROJECT_BINARY_DIR}/testfiles/std" + -D "TEST_OUTPUT=${resultfile}-N.out" + -D "TEST_EXPECT=${resultcode}" + -D "TEST_REFERENCE=${resultfile}.ddl" + -P "${HDF5_RESOURCES_DIR}/runTest.cmake" + ) + SET_TESTS_PROPERTIES (H5DUMP-N-${resultfile} PROPERTIES DEPENDS "H5DUMP-N-${resultfile}-clear-objects") + ENDIF (HDF5_ENABLE_USING_MEMCHECKER) + ENDMACRO (ADD_H5_TEST_N file) + + MACRO (ADD_H5_TEST_EXPORT resultfile targetfile resultcode) + # If using memchecker add tests without using scripts + IF (HDF5_ENABLE_USING_MEMCHECKER) + ADD_TEST (NAME H5DUMP-${resultfile} COMMAND $ ${ARGN} ${resultfile}.txt ${targetfile}) + SET_TESTS_PROPERTIES (H5DUMP-${resultfile} PROPERTIES WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles/std") + IF (NOT ${resultcode} STREQUAL "0") + SET_TESTS_PROPERTIES (H5DUMP-${resultfile} PROPERTIES WILL_FAIL "true") + ENDIF (NOT ${resultcode} STREQUAL "0") + IF (NOT "${last_test}" STREQUAL "") + SET_TESTS_PROPERTIES (H5DUMP-${resultfile} PROPERTIES DEPENDS ${last_test}) + ENDIF (NOT "${last_test}" STREQUAL "") + ELSE (HDF5_ENABLE_USING_MEMCHECKER) + ADD_TEST ( + NAME H5DUMP-${resultfile}-clear-objects + COMMAND ${CMAKE_COMMAND} + -E remove ${resultfile}.txt ${resultfile}.out ${resultfile}.out.err + ) + SET_TESTS_PROPERTIES (H5DUMP-${resultfile}-clear-objects PROPERTIES WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles/std") + ADD_TEST ( + NAME H5DUMP-${resultfile} + COMMAND "${CMAKE_COMMAND}" + -D "TEST_PROGRAM=$" + -D "TEST_ARGS:STRING=${ARGN};${resultfile}.txt;${targetfile}" + -D "TEST_FOLDER=${PROJECT_BINARY_DIR}/testfiles/std" + -D "TEST_OUTPUT=${resultfile}.out" + -D "TEST_EXPECT=${resultcode}" + -D "TEST_REFERENCE=${resultfile}.ddl" + -P "${HDF5_RESOURCES_DIR}/runTest.cmake" + ) + SET_TESTS_PROPERTIES (H5DUMP-${resultfile} PROPERTIES DEPENDS "H5DUMP-${resultfile}-clear-objects") + ADD_TEST ( + NAME H5DUMP-${resultfile}-output-cmp + COMMAND ${CMAKE_COMMAND} + -E compare_files ${resultfile}.txt ${resultfile}.exp + ) + SET_TESTS_PROPERTIES (H5DUMP-${resultfile}-output-cmp PROPERTIES WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles/std") + SET_TESTS_PROPERTIES (H5DUMP-${resultfile}-output-cmp PROPERTIES DEPENDS H5DUMP-${resultfile}) + ENDIF (HDF5_ENABLE_USING_MEMCHECKER) + ENDMACRO (ADD_H5_TEST_EXPORT file) + + MACRO (ADD_H5_TEST_EXPORT_DDL resultfile targetfile resultcode ddlfile) + # If using memchecker add tests without using scripts + IF (HDF5_ENABLE_USING_MEMCHECKER) + ADD_TEST (NAME H5DUMP-${resultfile} COMMAND $ --ddl=${ddlfile}.txt ${ARGN} ${resultfile}.txt ${targetfile}) + SET_TESTS_PROPERTIES (H5DUMP-${resultfile} PROPERTIES WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles/std") + IF (NOT ${resultcode} STREQUAL "0") + SET_TESTS_PROPERTIES (H5DUMP-${resultfile} PROPERTIES WILL_FAIL "true") + ENDIF (NOT ${resultcode} STREQUAL "0") + IF (NOT "${last_test}" STREQUAL "") + SET_TESTS_PROPERTIES (H5DUMP-${resultfile} PROPERTIES DEPENDS ${last_test}) + ENDIF (NOT "${last_test}" STREQUAL "") + ELSE (HDF5_ENABLE_USING_MEMCHECKER) + ADD_TEST ( + NAME H5DUMP-${resultfile}-clear-objects + COMMAND ${CMAKE_COMMAND} + -E remove ${ddlfile}.txt ${resultfile}.txt ${resultfile}.out ${resultfile}.out.err + ) + SET_TESTS_PROPERTIES (H5DUMP-${resultfile}-clear-objects PROPERTIES WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles/std") + ADD_TEST ( + NAME H5DUMP-${resultfile} + COMMAND "${CMAKE_COMMAND}" + -D "TEST_PROGRAM=$" + -D "TEST_ARGS:STRING=--ddl=${ddlfile}.txt;${ARGN};${resultfile}.txt;${targetfile}" + -D "TEST_FOLDER=${PROJECT_BINARY_DIR}/testfiles/std" + -D "TEST_OUTPUT=${resultfile}.out" + -D "TEST_EXPECT=${resultcode}" + -D "TEST_REFERENCE=${resultfile}.ddl" + -P "${HDF5_RESOURCES_DIR}/runTest.cmake" + ) + SET_TESTS_PROPERTIES (H5DUMP-${resultfile} PROPERTIES DEPENDS "H5DUMP-${resultfile}-clear-objects") + ADD_TEST ( + NAME H5DUMP-${resultfile}-output-cmp + COMMAND ${CMAKE_COMMAND} + -E compare_files ${resultfile}.txt ${resultfile}.exp + ) + SET_TESTS_PROPERTIES (H5DUMP-${resultfile}-output-cmp PROPERTIES WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles/std") + SET_TESTS_PROPERTIES (H5DUMP-${resultfile}-output-cmp PROPERTIES DEPENDS H5DUMP-${resultfile}) + ADD_TEST ( + NAME H5DUMP-${resultfile}-output-cmp-ddl + COMMAND ${CMAKE_COMMAND} + -E compare_files ${ddlfile}.txt ${ddlfile}.exp + ) + SET_TESTS_PROPERTIES (H5DUMP-${resultfile}-output-cmp-ddl PROPERTIES WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles/std") + SET_TESTS_PROPERTIES (H5DUMP-${resultfile}-output-cmp-ddl PROPERTIES DEPENDS H5DUMP-${resultfile}-output-cmp) + ENDIF (HDF5_ENABLE_USING_MEMCHECKER) + ENDMACRO (ADD_H5_TEST_EXPORT_DDL file) + + MACRO (ADD_H5_EXPORT_TEST resultfile targetfile resultcode) + IF (NOT HDF5_ENABLE_USING_MEMCHECKER) + ADD_TEST ( + NAME H5DUMP-output-${resultfile}-clear-objects + COMMAND ${CMAKE_COMMAND} + -E remove ${resultfile}.txt + ) + SET_TESTS_PROPERTIES (H5DUMP-output-${resultfile}-clear-objects PROPERTIES WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles/std") + ADD_TEST ( + NAME H5DUMP-output-${resultfile} + COMMAND $ ${ARGN} ${resultfile}.txt ${targetfile} + ) + SET_TESTS_PROPERTIES (H5DUMP-output-${resultfile} PROPERTIES WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles/std") + SET_TESTS_PROPERTIES (H5DUMP-output-${resultfile} PROPERTIES DEPENDS H5DUMP-output-${resultfile}-clear-objects) + ADD_TEST ( + NAME H5DUMP-output-cmp-${resultfile} + COMMAND ${CMAKE_COMMAND} + -E compare_files ${resultfile}.txt ${resultfile}.exp + ) + SET_TESTS_PROPERTIES (H5DUMP-output-cmp-${resultfile} PROPERTIES WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles/std") + SET_TESTS_PROPERTIES (H5DUMP-output-cmp-${resultfile} PROPERTIES DEPENDS H5DUMP-output-${resultfile}) + ENDIF (NOT HDF5_ENABLE_USING_MEMCHECKER) + ENDMACRO (ADD_H5_EXPORT_TEST file) + + MACRO (ADD_H5_MASK_TEST resultfile resultcode) + IF (NOT HDF5_ENABLE_USING_MEMCHECKER) + ADD_TEST ( + NAME H5DUMP-${resultfile}-clear-objects + COMMAND ${CMAKE_COMMAND} + -E remove ${resultfile}.out ${resultfile}.out.err + ) + SET_TESTS_PROPERTIES (H5DUMP-${resultfile}-clear-objects PROPERTIES WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles/std") + ADD_TEST ( + NAME H5DUMP-${resultfile} + COMMAND "${CMAKE_COMMAND}" + -D "TEST_PROGRAM=$" + -D "TEST_ARGS:STRING=${ARGN}" + -D "TEST_FOLDER=${PROJECT_BINARY_DIR}/testfiles/std" + -D "TEST_OUTPUT=${resultfile}.out" + -D "TEST_EXPECT=${resultcode}" + -D "TEST_REFERENCE=${resultfile}.ddl" + -D "TEST_MASK_ERROR=true" + -P "${HDF5_RESOURCES_DIR}/runTest.cmake" + ) + SET_TESTS_PROPERTIES (H5DUMP-${resultfile} PROPERTIES DEPENDS "H5DUMP-${resultfile}-clear-objects") + ENDIF (NOT HDF5_ENABLE_USING_MEMCHECKER) + ENDMACRO (ADD_H5_MASK_TEST file) + + MACRO (ADD_H5ERR_MASK_TEST resultfile resultcode) + IF (NOT HDF5_ENABLE_USING_MEMCHECKER) + ADD_TEST ( + NAME H5DUMP-${resultfile}-clear-objects + COMMAND ${CMAKE_COMMAND} + -E remove ${resultfile}.out ${resultfile}.out.err + ) + SET_TESTS_PROPERTIES (H5DUMP-${resultfile}-clear-objects PROPERTIES WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles/std") + ADD_TEST ( + NAME H5DUMP-${resultfile} + COMMAND "${CMAKE_COMMAND}" + -D "TEST_PROGRAM=$" + -D "TEST_ARGS:STRING=${ARGN}" + -D "TEST_FOLDER=${PROJECT_BINARY_DIR}/testfiles/std" + -D "TEST_OUTPUT=${resultfile}.out" + -D "TEST_EXPECT=${resultcode}" + -D "TEST_REFERENCE=${resultfile}.ddl" + -D "TEST_ERRREF=${resultfile}.err" + -D "TEST_MASK_ERROR=true" + -P "${HDF5_RESOURCES_DIR}/runTest.cmake" + ) + SET_TESTS_PROPERTIES (H5DUMP-${resultfile} PROPERTIES DEPENDS "H5DUMP-${resultfile}-clear-objects") + ENDIF (NOT HDF5_ENABLE_USING_MEMCHECKER) + ENDMACRO (ADD_H5ERR_MASK_TEST file) + + MACRO (ADD_H5ERR_MASK_ENV_TEST resultfile resultcode envvar envval) + IF (NOT HDF5_ENABLE_USING_MEMCHECKER) + ADD_TEST ( + NAME H5DUMP-${resultfile}-clear-objects + COMMAND ${CMAKE_COMMAND} + -E remove ${resultfile}.out ${resultfile}.out.err + ) + SET_TESTS_PROPERTIES (H5DUMP-${resultfile}-clear-objects PROPERTIES WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles/std") + ADD_TEST ( + NAME H5DUMP-${resultfile} + COMMAND "${CMAKE_COMMAND}" + -D "TEST_PROGRAM=$" + -D "TEST_ARGS:STRING=${ARGN}" + -D "TEST_FOLDER=${PROJECT_BINARY_DIR}/testfiles/std" + -D "TEST_OUTPUT=${resultfile}.out" + -D "TEST_EXPECT=${resultcode}" + -D "TEST_REFERENCE=${resultfile}.ddl" + -D "TEST_ERRREF=${resultfile}.err" + -D "TEST_MASK_ERROR=true" + -D "TEST_ENV_VAR:STRING=${envvar}" + -D "TEST_ENV_VALUE:STRING=${envval}" + -P "${HDF5_RESOURCES_DIR}/runTest.cmake" + ) + SET_TESTS_PROPERTIES (H5DUMP-${resultfile} PROPERTIES DEPENDS "H5DUMP-${resultfile}-clear-objects") + ENDIF (NOT HDF5_ENABLE_USING_MEMCHECKER) + ENDMACRO (ADD_H5ERR_MASK_ENV_TEST) + + MACRO (ADD_H5_TEST_IMPORT conffile resultfile testfile resultcode) + # If using memchecker add tests without using scripts + IF (NOT HDF5_ENABLE_USING_MEMCHECKER) + ADD_TEST ( + NAME H5DUMP-IMPORT-${resultfile}-clear-objects + COMMAND ${CMAKE_COMMAND} + -E remove ${conffile}.out ${conffile}.out.err ${resultfile}.bin ${resultfile}.h5 + ) + SET_TESTS_PROPERTIES (H5DUMP-IMPORT-${resultfile}-clear-objects PROPERTIES WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles/std") + ADD_TEST ( + NAME H5DUMP-IMPORT-${resultfile} + COMMAND "${CMAKE_COMMAND}" + -D "TEST_PROGRAM=$" + -D "TEST_ARGS:STRING=${ARGN};-o;${resultfile}.bin;${testfile}" + -D "TEST_FOLDER=${PROJECT_BINARY_DIR}/testfiles/std" + -D "TEST_OUTPUT=${conffile}.out" + -D "TEST_EXPECT=${resultcode}" + -D "TEST_REFERENCE=${conffile}.ddl" + -P "${HDF5_RESOURCES_DIR}/runTest.cmake" + ) + SET_TESTS_PROPERTIES (H5DUMP-IMPORT-${resultfile} PROPERTIES DEPENDS "H5DUMP-IMPORT-${resultfile}-clear-objects") + ADD_TEST (NAME H5DUMP-IMPORT-h5import-${resultfile} COMMAND h5import ${resultfile}.bin -c ${conffile}.out -o ${resultfile}.h5) + SET_TESTS_PROPERTIES (H5DUMP-IMPORT-h5import-${resultfile} PROPERTIES WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles/std") + SET_TESTS_PROPERTIES (H5DUMP-IMPORT-h5import-${resultfile} PROPERTIES DEPENDS H5DUMP-IMPORT-${resultfile}) + ADD_TEST (NAME H5DUMP-IMPORT-h5diff-${resultfile} COMMAND h5diff ${testfile} ${resultfile}.h5 /integer /integer) + SET_TESTS_PROPERTIES (H5DUMP-IMPORT-h5diff-${resultfile} PROPERTIES WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles/std") + SET_TESTS_PROPERTIES (H5DUMP-IMPORT-h5diff-${resultfile} PROPERTIES DEPENDS H5DUMP-IMPORT-h5import-${resultfile}) + ENDIF (NOT HDF5_ENABLE_USING_MEMCHECKER) + ENDMACRO (ADD_H5_TEST_IMPORT file) + +############################################################################## +############################################################################## +### T H E T E S T S HDF5_ENABLE_USING_MEMCHECKER ### +############################################################################## +############################################################################## + + IF (HDF5_ENABLE_USING_MEMCHECKER) + # Remove any output file left over from previous test run + ADD_TEST ( + NAME H5DUMP-clearall-objects + COMMAND ${CMAKE_COMMAND} + -E remove + h5dump-help.out + charsets.out + charsets.out.err + file_space.out + file_space.out.err + filter_fail.out + filter_fail.out.err + packedbits.out + packedbits.out.err + tall-1.out + tall-1.out.err + tall-2.out + tall-2.out.err + tall-2A.out + tall-2A.out.err + tall-2A0.out + tall-2A0.out.err + tall-2B.out + tall-2B.out.err + tall-3.out + tall-3.out.err + tall-4s.out + tall-4s.out.err + tall-5s.out + tall-5s.out.err + tall-6.txt + tall-6.out + tall-6.out.err + tall-7.out + tall-7.out.err + tall-7N.out + tall-7N.out.err + tallfilters.out + tallfilters.out.err + tarray1.out + tarray1.out.err + tarray1_big.out + tarray1_big.out.err + tarray2.out + tarray2.out.err + tarray3.out + tarray3.out.err + tarray4.out + tarray4.out.err + tarray5.out + tarray5.out.err + tarray6.out + tarray6.out.err + tarray7.out + tarray7.out.err + tarray8.out + tarray8.out.err + tattr-1.out + tattr-1.out.err + tattr-2.out + tattr-2.out.err + tattr-3.out + tattr-3.out.err + tattr-4_be.out + tattr-4_be.out.err + tattrcontents1.out + tattrcontents1.out.err + tattrcontents2.out + tattrcontents2.out.err + tattrintsize.out + tattrintsize.out.err + tattrreg.out + tattrreg.out.err + tattrregR.out + tattrregR.out.err + tbin1LE.bin + tbinregR.txt + tbinregR.out + tbinregR.out.err + tbigdims.out + tbigdims.out.err + tboot1.out + tboot1.out.err + tboot2.out + tboot2.out.err + tchar1.out + tchar1.out.err + tchunked.out + tchunked.out.err + tcmpdattrintsize.out + tcmpdattrintsize.out.err + tcmpdintsize.out + tcmpdintsize.out.err + tcomp-1.out + tcomp-1.out.err + tcomp-2.out + tcomp-2.out.err + tcomp-3.out + tcomp-3.out.err + tcomp-4.out + tcomp-4.out.err + tcompact.out + tcompact.out.err + tcontents.out + tcontents.out.err + tcontiguos.out + tcontiguos.out.err + tdatareg.out + tdatareg.out.err + tdataregR.out + tdataregR.out.err + tdeflate.out + tdeflate.out.err + tdset-1.out + tdset-1.out.err + tdset-2.out + tdset-2.out.err + tdset-3s.out + tdset-3s.out.err + tempty.out + tempty.out.err + texternal.out + texternal.out.err + textlinksrc.out + textlinksrc.out.err + textlinkfar.out + textlinkfar.out.err + textlink.out + textlink.out.err + tfamily.out + tfamily.out.err + tfill.out + tfill.out.err + tfletcher32.out + tfletcher32.out.err + tfpformat.out + tfpformat.out.err + tgroup-1.out + tgroup-1.out.err + tgroup-2.out + tgroup-2.out.err + tgrp_comments.out + tgrp_comments.out.err + thlink-1.out + thlink-1.out.err + thlink-2.out + thlink-2.out.err + thlink-3.out + thlink-3.out.err + thlink-4.out + thlink-4.out.err + thlink-5.out + thlink-5.out.err + thyperslab.out + thyperslab.out.err + tindicesno.out + tindicesno.out.err + tindicessub1.out + tindicessub1.out.err + tindicessub2.out + tindicessub2.out.err + tindicessub3.out + tindicessub3.out.err + tindicessub4.out + tindicessub4.out.err + texceedsubstart.out + texceedsubstart.out.err + texceedsubcount.out + texceedsubcount.out.err + texceedsubstride.out + texceedsubstride.out.err + texceedsubblock.out + texceedsubblock.out.err + tindicesyes.out + tindicesyes.out.err + tlarge_objname.out + tlarge_objname.out.err + tldouble.out + tldouble.out.err + tlonglinks.out + tlonglinks.out.err + tloop-1.out + tloop-1.out.err + tmulti.out + tmulti.out.err + tmultifile.out + tmultifile.out.err +# tqmarkfile.out +# tqmarkfile.out.err +# tstarfile.out +# tstarfile.out.err + tnamed_dtype_attr.out + tnamed_dtype_attr.out.err + tnestcomp-1.out + tnestcomp-1.out.err + tnestedcmpddt.out + tnestedcmpddt.out.err + tnbit.out + tnbit.out.err + tnoattrdata.out + tnoattrdata.out.err + tnoattrddl.out + tnoattrddl.out.err + tnodata.out + tnodata.out.err + tnoddl.out + tnoddl.out.err + tnoddlfile.out + tnoddlfile.out.err + trawdatafile.out + trawdatafile.out.err + trawdatafile.txt + trawssetfile.out + trawssetfile.out.err + trawssetfile.txt + tno-subset.out + tno-subset.out.err + tnullspace.out + tnullspace.out.err + zerodim.out + zerodim.out.err + tordergr1.out + tordergr1.out.err + tordergr2.out + tordergr2.out.err + tordergr3.out + tordergr3.out.err + tordergr4.out + tordergr4.out.err + tordergr5.out + tordergr5.out.err + torderattr1.out + torderattr1.out.err + torderattr2.out + torderattr2.out.err + torderattr3.out + torderattr3.out.err + torderattr4.out + torderattr4.out.err + tordercontents1.out + tordercontents1.out.err + tordercontents2.out + tordercontents2.out.err + torderlinks1.out + torderlinks1.out.err + torderlinks2.out + torderlinks2.out.err + tperror.out + tperror.out.err + treference.out + treference.out.err + tsaf.out + tsaf.out.err + tscalarintsize.out + tscalarintsize.out.err + tscalarattrintsize.out + tscalarattrintsize.out.err + tscalarstring.out + tscalarstring.out.err + tscaleoffset.out + tscaleoffset.out.err + tshuffle.out + tshuffle.out.err + tslink-1.out + tslink-1.out.err + tslink-2.out + tslink-2.out.err + tslink-D.out + tslink-D.out.err + tsplit_file.out + tsplit_file.out.err + tstr-1.out + tstr-1.out.err + tstr-2.out + tstr-2.out.err + tstr2bin2.txt + tstr2bin6.txt + tstring.out + tstring.out.err + tstring2.out + tstring2.out.err + tstringe.out + tstringe.out.err + tszip.out + tszip.out.err + tudlink-1.out + tudlink-1.out.err + tudlink-2.out + tudlink-2.out.err + tuserfilter.out + tuserfilter.out.err + tvldtypes1.out + tvldtypes1.out.err + tvldtypes2.out + tvldtypes2.out.err + tvldtypes3.out + tvldtypes3.out.err + tvldtypes4.out + tvldtypes4.out.err + tvldtypes5.out + tvldtypes5.out.err + tvlstr.out + tvlstr.out.err + tvms.out + tvms.out.err + twidedisplay.out + twidedisplay.out.err + twithddl.txt + twithddlfile.out + twithddlfile.out.err + twithddlfile.txt + ) + SET_TESTS_PROPERTIES (H5DUMP-clearall-objects PROPERTIES WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles/std") + IF (NOT "${last_test}" STREQUAL "") + SET_TESTS_PROPERTIES (H5DUMP-clearall-objects PROPERTIES DEPENDS ${last_test}) + ENDIF (NOT "${last_test}" STREQUAL "") + SET (last_test "H5DUMP-clearall-objects") + ENDIF (HDF5_ENABLE_USING_MEMCHECKER) + + ADD_HELP_TEST(help 0 -h) + + # test data output redirection + #ADD_H5_TEST (tnoddl 0 --enable-error-stack -O -y packedbits.h5) + ADD_H5_TEST (tnoddl 0 --enable-error-stack --ddl -y packedbits.h5) + #ADD_H5_TEST (tnodata 0 --enable-error-stack -o packedbits.h5) + ADD_H5_TEST (tnodata 0 --enable-error-stack --output packedbits.h5) + ADD_H5_TEST (tnoattrddl 0 --enable-error-stack -O -y tattr.h5) + ADD_H5_TEST (tnoattrdata 0 --enable-error-stack -A -o tattr.h5) + ADD_H5_TEST_EXPORT (trawdatafile packedbits.h5 0 --enable-error-stack -y -o) + ADD_H5_TEST_EXPORT (tnoddlfile packedbits.h5 0 --enable-error-stack -O -y -o) + ADD_H5_TEST_EXPORT (trawssetfile tdset.h5 0 --enable-error-stack -d "/dset1[1,1;;;]" -y -o) + + ADD_H5_TEST_EXPORT_DDL (twithddlfile packedbits.h5 0 twithddl --enable-error-stack --ddl=twithddl.txt -y -o) + + # test for maximum display datasets + ADD_H5_TEST (twidedisplay 0 --enable-error-stack -w0 packedbits.h5) + + # test for signed/unsigned datasets + ADD_H5_TEST (packedbits 0 --enable-error-stack packedbits.h5) + # test for compound signed/unsigned datasets + ADD_H5_TEST (tcmpdintsize 0 --enable-error-stack tcmpdintsize.h5) + # test for signed/unsigned scalar datasets + ADD_H5_TEST (tscalarintsize 0 --enable-error-stack tscalarintsize.h5) + # test for signed/unsigned attributes + ADD_H5_TEST (tattrintsize 0 --enable-error-stack tattrintsize.h5) + # test for compound signed/unsigned attributes + ADD_H5_TEST (tcmpdattrintsize 0 --enable-error-stack tcmpdattrintsize.h5) + # test for signed/unsigned scalar attributes + ADD_H5_TEST (tscalarattrintsize 0 --enable-error-stack tscalarattrintsize.h5) + # test for string scalar dataset and attribute + ADD_H5_TEST (tscalarstring 0 --enable-error-stack tscalarstring.h5) + # test for displaying groups + ADD_H5_TEST (tgroup-1 0 --enable-error-stack tgroup.h5) + # test for displaying the selected groups + ADD_H5ERR_MASK_TEST (tgroup-2 1 --enable-error-stack --group=/g2 --group / -g /y tgroup.h5) + + # test for displaying simple space datasets + ADD_H5_TEST (tdset-1 0 --enable-error-stack tdset.h5) + # test for displaying selected datasets + ADD_H5ERR_MASK_TEST (tdset-2 1 --enable-error-stack -H -d dset1 -d /dset2 --dataset=dset3 tdset.h5) + + # test for displaying attributes + ADD_H5_TEST (tattr-1 0 --enable-error-stack tattr.h5) + # test for displaying the selected attributes of string type and scalar space + ADD_H5_TEST (tattr-2 0 --enable-error-stack -a /\\\\/attr1 --attribute /attr4 --attribute=/attr5 tattr.h5) + ADD_H5_TEST_N (tattr-2 0 --enable-error-stack -N /\\\\/attr1 --any_path /attr4 --any_path=/attr5 tattr.h5) + # test for header and error messages + ADD_H5ERR_MASK_TEST (tattr-3 1 --enable-error-stack --header -a /attr2 --attribute=/attr tattr.h5) + # test for displaying attributes in shared datatype (also in group and dataset) + ADD_H5_TEST (tnamed_dtype_attr 0 --enable-error-stack tnamed_dtype_attr.h5) + # test for displaying at least 9 attributes on root from a be machine + ADD_H5_TEST (tattr-4_be 0 --enable-error-stack tattr4_be.h5) + + # test for displaying soft links and user-defined links + ADD_H5_TEST (tslink-1 0 --enable-error-stack tslink.h5) + ADD_H5_TEST (tudlink-1 0 --enable-error-stack tudlink.h5) + # test for displaying the selected link + ADD_H5_TEST (tslink-2 0 --enable-error-stack -l slink2 tslink.h5) + ADD_H5_TEST_N (tslink-2 0 --enable-error-stack -N slink2 tslink.h5) + ADD_H5_TEST (tudlink-2 0 --enable-error-stack -l udlink2 tudlink.h5) + # test for displaying dangling soft links + ADD_H5ERR_MASK_TEST (tslink-D 0 --enable-error-stack -d /slink1 tslink.h5) + + # tests for hard links + ADD_H5_TEST (thlink-1 0 --enable-error-stack thlink.h5) + ADD_H5_TEST (thlink-2 0 --enable-error-stack -d /g1/dset2 --dataset /dset1 --dataset=/g1/g1.1/dset3 thlink.h5) + ADD_H5_TEST (thlink-3 0 --enable-error-stack -d /g1/g1.1/dset3 --dataset /g1/dset2 --dataset=/dset1 thlink.h5) + ADD_H5_TEST (thlink-4 0 --enable-error-stack -g /g1 thlink.h5) + ADD_H5_TEST_N (thlink-4 0 --enable-error-stack -N /g1 thlink.h5) + ADD_H5_TEST (thlink-5 0 --enable-error-stack -d /dset1 -g /g2 -d /g1/dset2 thlink.h5) + ADD_H5_TEST_N (thlink-5 0 --enable-error-stack -N /dset1 -N /g2 -N /g1/dset2 thlink.h5) + + # tests for compound data types + ADD_H5_TEST (tcomp-1 0 --enable-error-stack tcompound.h5) + # test for named data types + ADD_H5_TEST (tcomp-2 0 --enable-error-stack -t /type1 --datatype /type2 --datatype=/group1/type3 tcompound.h5) + ADD_H5_TEST_N (tcomp-2 0 --enable-error-stack -N /type1 --any_path /type2 --any_path=/group1/type3 tcompound.h5) + # test for unamed type + ADD_H5ERR_MASK_TEST (tcomp-3 0 "--enable-error-stack;-t;/#6632;-g;/group2;tcompound.h5") + # test complicated compound datatype + ADD_H5_TEST (tcomp-4 0 --enable-error-stack tcompound_complex.h5) + + #test for the nested compound type + ADD_H5_TEST (tnestcomp-1 0 --enable-error-stack tnestedcomp.h5) + ADD_H5_TEST (tnestedcmpddt 0 --enable-error-stack tnestedcmpddt.h5) + + # test for options + ADD_H5ERR_MASK_TEST (tall-1 0 --enable-error-stack tall.h5) + ADD_H5_TEST (tall-2 0 --enable-error-stack --header -g /g1/g1.1 -a attr2 tall.h5) + ADD_H5_TEST (tall-3 0 --enable-error-stack -d /g2/dset2.1 -l /g1/g1.2/g1.2.1/slink tall.h5) + ADD_H5_TEST_N (tall-3 0 --enable-error-stack -N /g2/dset2.1 -N /g1/g1.2/g1.2.1/slink tall.h5) + ADD_H5_TEST (tall-7 0 --enable-error-stack -a attr1 tall.h5) + ADD_H5_TEST (tall-7N 0 --enable-error-stack -N attr1 tall.h5) + + # test for loop detection + ADD_H5_TEST (tloop-1 0 --enable-error-stack tloop.h5) + + # test for string + ADD_H5_TEST (tstr-1 0 --enable-error-stack tstr.h5) + ADD_H5_TEST (tstr-2 0 --enable-error-stack tstr2.h5) + + # test for file created by Lib SAF team + ADD_H5_TEST (tsaf 0 --enable-error-stack tsaf.h5) + + # test for file with variable length data + ADD_H5_TEST (tvldtypes1 0 --enable-error-stack tvldtypes1.h5) + ADD_H5_TEST (tvldtypes2 0 --enable-error-stack tvldtypes2.h5) + ADD_H5_TEST (tvldtypes3 0 --enable-error-stack tvldtypes3.h5) + ADD_H5_TEST (tvldtypes4 0 --enable-error-stack tvldtypes4.h5) + ADD_H5_TEST (tvldtypes5 0 --enable-error-stack tvldtypes5.h5) + + #test for file with variable length string data + ADD_H5_TEST (tvlstr 0 --enable-error-stack tvlstr.h5) + + # test for files with array data + ADD_H5_TEST (tarray1 0 --enable-error-stack tarray1.h5) + # # added for bug# 2092 - tarray1_big.h5 + ADD_H5ERR_MASK_TEST (tarray1_big 0 --enable-error-stack -R tarray1_big.h5) + ADD_H5_TEST (tarray2 0 --enable-error-stack tarray2.h5) + ADD_H5_TEST (tarray3 0 --enable-error-stack tarray3.h5) + ADD_H5_TEST (tarray4 0 --enable-error-stack tarray4.h5) + ADD_H5_TEST (tarray5 0 --enable-error-stack tarray5.h5) + ADD_H5_TEST (tarray6 0 --enable-error-stack tarray6.h5) + ADD_H5_TEST (tarray7 0 --enable-error-stack tarray7.h5) + ADD_H5_TEST (tarray8 0 --enable-error-stack tarray8.h5) + + # test for wildcards in filename (does not work with cmake) + #ADD_H5_MASK_TEST (tstarfile 0 --enable-error-stack -H -d Dataset1 tarr*.h5) + #ADD_H5_MASK_TEST (tqmarkfile 0 --enable-error-stack -H -d Dataset1 tarray?.h5) + ADD_H5_TEST (tmultifile 0 --enable-error-stack -H -d Dataset1 tarray2.h5 tarray3.h5 tarray4.h5 tarray5.h5 tarray6.h5 tarray7.h5) + + # test for files with empty data + ADD_H5_TEST (tempty 0 --enable-error-stack tempty.h5) + + # test for files with groups that have comments + ADD_H5_TEST (tgrp_comments 0 --enable-error-stack tgrp_comments.h5) + + # test the --filedriver flag + ADD_H5_TEST (tsplit_file 0 --enable-error-stack --filedriver=split tsplit_file) + ADD_H5_TEST (tfamily 0 --enable-error-stack --filedriver=family tfamily%05d.h5) + ADD_H5_TEST (tmulti 0 --enable-error-stack --filedriver=multi tmulti) + + # test for files with group names which reach > 1024 bytes in size + ADD_H5_TEST (tlarge_objname 0 --enable-error-stack -w157 tlarge_objname.h5) + + # test '-A' to suppress data but print attr's + ADD_H5ERR_MASK_TEST (tall-2A 0 --enable-error-stack -A tall.h5) + + # test '-A' to suppress attr's but print data + ADD_H5ERR_MASK_TEST (tall-2A0 0 --enable-error-stack -A 0 tall.h5) + + # test '-r' to print attributes in ASCII instead of decimal + ADD_H5ERR_MASK_TEST (tall-2B 0 --enable-error-stack -A -r tall.h5) + + # test Subsetting + ADD_H5_TEST (tall-4s 0 --enable-error-stack --dataset=/g1/g1.1/dset1.1.1 --start=1,1 --stride=2,3 --count=3,2 --block=1,1 tall.h5) + ADD_H5_TEST (tall-5s 0 --enable-error-stack -d "/g1/g1.1/dset1.1.2[0;2;10;]" tall.h5) + ADD_H5_TEST (tdset-3s 0 --enable-error-stack -d "/dset1[1,1;;;]" tdset.h5) + ADD_H5_TEST (tno-subset 0 --enable-error-stack --no-compact-subset -d "AHFINDERDIRECT::ah_centroid_t[0] it=0 tl=0" tno-subset.h5) + + # test printing characters in ASCII instead of decimal + ADD_H5_TEST (tchar1 0 --enable-error-stack -r tchar.h5) + + # test datatypes in ASCII and UTF8 + ADD_H5_TEST (charsets 0 --enable-error-stack charsets.h5) + + # rev. 2004 + # tests for super block + ADD_H5_TEST (tboot1 0 --enable-error-stack -H -B -d dset tfcontents1.h5) + ADD_H5_TEST (tboot2 0 --enable-error-stack -B tfcontents2.h5) + ADD_H5_TEST (file_space 0 --enable-error-stack -B file_space.h5) + + # test -p with a non existing dataset + ADD_H5ERR_MASK_TEST (tperror 1 --enable-error-stack -p -d bogus tfcontents1.h5) + + # test for file contents + ADD_H5_TEST (tcontents 0 --enable-error-stack -n tfcontents1.h5) + ADD_H5_TEST (tordercontents1 0 --enable-error-stack -n --sort_by=name --sort_order=ascending tfcontents1.h5) + ADD_H5_TEST (tordercontents2 0 --enable-error-stack -n --sort_by=name --sort_order=descending tfcontents1.h5) + ADD_H5_TEST (tattrcontents1 0 --enable-error-stack -n 1 --sort_order=ascending tall.h5) + ADD_H5_TEST (tattrcontents2 0 --enable-error-stack -n 1 --sort_order=descending tall.h5) + + # tests for storage layout + # compact + ADD_H5_TEST (tcompact 0 --enable-error-stack -H -p -d compact tfilters.h5) + # contiguous + ADD_H5_TEST (tcontiguos 0 --enable-error-stack -H -p -d contiguous tfilters.h5) + # chunked + ADD_H5_TEST (tchunked 0 --enable-error-stack -H -p -d chunked tfilters.h5) + # external + ADD_H5_TEST (texternal 0 --enable-error-stack -H -p -d external tfilters.h5) + + # fill values + ADD_H5_TEST (tfill 0 --enable-error-stack -p tfvalues.h5) + + # several datatype, with references , print path + ADD_H5_TEST (treference 0 --enable-error-stack tattr2.h5) + + # escape/not escape non printable characters + ADD_H5_TEST (tstringe 0 --enable-error-stack -e tstr3.h5) + ADD_H5_TEST (tstring 0 --enable-error-stack tstr3.h5) + # char data as ASCII with non escape + ADD_H5_TEST (tstring2 0 --enable-error-stack -r -d str4 tstr3.h5) + + # array indices print/not print + ADD_H5_TEST (tindicesyes 0 --enable-error-stack taindices.h5) + ADD_H5_TEST (tindicesno 0 --enable-error-stack -y taindices.h5) + + ########## array indices with subsetting + # 1D case + ADD_H5_TEST (tindicessub1 0 --enable-error-stack -d 1d -s 1 -S 10 -c 2 -k 3 taindices.h5) + + # 2D case + ADD_H5_TEST (tindicessub2 0 --enable-error-stack -d 2d -s 1,2 -S 3,3 -c 3,2 -k 2,2 taindices.h5) + + # 3D case + ADD_H5_TEST (tindicessub3 0 --enable-error-stack -d 3d -s 0,1,2 -S 1,3,3 -c 2,2,2 -k 1,2,2 taindices.h5) + + # 4D case + ADD_H5_TEST (tindicessub4 0 --enable-error-stack -d 4d -s 0,0,1,2 -c 2,2,3,2 -S 1,1,3,3 -k 1,1,2,2 taindices.h5) + + # Exceed the dimensions for subsetting + ADD_H5_TEST (texceedsubstart 1 --enable-error-stack -d 1d -s 1,3 taindices.h5) + ADD_H5_TEST (texceedsubcount 1 --enable-error-stack -d 1d -c 1,3 taindices.h5) + ADD_H5_TEST (texceedsubstride 1 --enable-error-stack -d 1d -S 1,3 taindices.h5) + ADD_H5_TEST (texceedsubblock 1 --enable-error-stack -d 1d -k 1,3 taindices.h5) + + # tests for filters + # SZIP + ADD_H5_TEST (tszip 0 --enable-error-stack -H -p -d szip tfilters.h5) + + # deflate + ADD_H5_TEST (tdeflate 0 --enable-error-stack -H -p -d deflate tfilters.h5) + + # shuffle + ADD_H5_TEST (tshuffle 0 --enable-error-stack -H -p -d shuffle tfilters.h5) + + # fletcher32 + ADD_H5_TEST (tfletcher32 0 --enable-error-stack -H -p -d fletcher32 tfilters.h5) + + # nbit + ADD_H5_TEST (tnbit 0 --enable-error-stack -H -p -d nbit tfilters.h5) + + # scaleoffset + ADD_H5_TEST (tscaleoffset 0 --enable-error-stack -H -p -d scaleoffset tfilters.h5) + + # all + ADD_H5_TEST (tallfilters 0 --enable-error-stack -H -p -d all tfilters.h5) + + # user defined + ADD_H5_TEST (tuserfilter 0 --enable-error-stack -H -p -d myfilter tfilters.h5) + + # test for displaying objects with very long names + ADD_H5_TEST (tlonglinks 0 --enable-error-stack tlonglinks.h5) + + # dimensions over 4GB, print boundary + ADD_H5_TEST (tbigdims 0 --enable-error-stack -d dset4gb -s 4294967284 -c 22 tbigdims.h5) + + # hyperslab read + ADD_H5_TEST (thyperslab 0 --enable-error-stack thyperslab.h5) + + # test for displaying dataset and attribute of null space + ADD_H5_TEST (tnullspace 0 --enable-error-stack tnullspace.h5) + + # test for displaying dataset and attribute of space with 0 dimension size + ADD_H5_TEST (zerodim 0 --enable-error-stack zerodim.h5) + + # test for long double (some systems do not have long double) + #ADD_H5_TEST (tldouble 0 --enable-error-stack tldouble.h5) + + # test for vms + ADD_H5_TEST (tvms 0 --enable-error-stack tvms.h5) + + # test for binary output + ADD_H5_TEST (tbin1LE 0 --enable-error-stack -d integer -o tbin1LE.bin -b LE tbinary.h5) + + # test for string binary output + ADD_H5_EXPORT_TEST (tstr2bin2 tstr2.h5 0 --enable-error-stack -d /g2/dset2 -b -o) + ADD_H5_EXPORT_TEST (tstr2bin6 tstr2.h5 0 --enable-error-stack -d /g6/dset6 -b -o) + + # NATIVE default. the NATIVE test can be validated with h5import/h5diff + ADD_H5_TEST_IMPORT (tbin1 out1D tbinary.h5 0 --enable-error-stack -d integer -b) + + IF (NOT HDF5_ENABLE_USING_MEMCHECKER) + ADD_H5_TEST (tbin2 0 --enable-error-stack -b BE -d float -o tbin2.bin tbinary.h5) + ENDIF (NOT HDF5_ENABLE_USING_MEMCHECKER) + + # the NATIVE test can be validated with h5import/h5diff + ADD_H5_TEST_IMPORT (tbin3 out3D tbinary.h5 0 --enable-error-stack -d integer -b NATIVE) + + IF (NOT HDF5_ENABLE_USING_MEMCHECKER) + ADD_H5_TEST (tbin4 0 --enable-error-stack -d double -b FILE -o tbin4.bin tbinary.h5) + ENDIF (NOT HDF5_ENABLE_USING_MEMCHECKER) + + # test for dataset region references + ADD_H5_TEST (tdatareg 0 --enable-error-stack tdatareg.h5) + ADD_H5ERR_MASK_TEST (tdataregR 0 --enable-error-stack -R tdatareg.h5) + ADD_H5ERR_MASK_TEST (tattrregR 0 -R --enable-error-stack tattrreg.h5) + ADD_H5_EXPORT_TEST (tbinregR tdatareg.h5 0 --enable-error-stack -d /Dataset1 -s 0 -R -y -o) + + # tests for group creation order + # "1" tracked, "2" name, root tracked + ADD_H5_TEST (tordergr1 0 --enable-error-stack --group=1 --sort_by=creation_order --sort_order=ascending tordergr.h5) + ADD_H5_TEST (tordergr2 0 --enable-error-stack --group=1 --sort_by=creation_order --sort_order=descending tordergr.h5) + ADD_H5_TEST (tordergr3 0 --enable-error-stack -g 2 -q name -z ascending tordergr.h5) + ADD_H5_TEST (tordergr4 0 --enable-error-stack -g 2 -q name -z descending tordergr.h5) + ADD_H5_TEST (tordergr5 0 --enable-error-stack -q creation_order tordergr.h5) + + # tests for attribute order + ADD_H5_TEST (torderattr1 0 --enable-error-stack -H --sort_by=name --sort_order=ascending torderattr.h5) + ADD_H5_TEST (torderattr2 0 --enable-error-stack -H --sort_by=name --sort_order=descending torderattr.h5) + ADD_H5_TEST (torderattr3 0 --enable-error-stack -H --sort_by=creation_order --sort_order=ascending torderattr.h5) + ADD_H5_TEST (torderattr4 0 --enable-error-stack -H --sort_by=creation_order --sort_order=descending torderattr.h5) + + # tests for link references and order + ADD_H5ERR_MASK_TEST (torderlinks1 0 --enable-error-stack --sort_by=name --sort_order=ascending tfcontents1.h5) + ADD_H5ERR_MASK_TEST (torderlinks2 0 --enable-error-stack --sort_by=name --sort_order=descending tfcontents1.h5) + + # tests for floating point user defined printf format + ADD_H5_TEST (tfpformat 0 --enable-error-stack -m %.7f tfpformat.h5) + + # tests for traversal of external links + ADD_H5ERR_MASK_TEST (textlinksrc 0 --enable-error-stack textlinksrc.h5) + ADD_H5ERR_MASK_TEST (textlinkfar 0 --enable-error-stack textlinkfar.h5) + + # test for dangling external links + ADD_H5ERR_MASK_TEST (textlink 0 --enable-error-stack textlink.h5) + + # test for error stack display (BZ2048) + ADD_H5ERR_MASK_ENV_TEST (filter_fail 1 "HDF5_PLUGIN_PRELOAD" "::" --enable-error-stack filter_fail.h5) + + # test for -o -y for dataset with attributes + ADD_H5_TEST_EXPORT (tall-6 tall.h5 0 --enable-error-stack -d /g1/g1.1/dset1.1.1 -y -o) diff --git a/tools/h5dump/CMakeTestsPBITS.cmake b/tools/h5dump/CMakeTestsPBITS.cmake new file mode 100644 index 0000000..baa1705 --- /dev/null +++ b/tools/h5dump/CMakeTestsPBITS.cmake @@ -0,0 +1,367 @@ + +############################################################################## +############################################################################## +### T E S T I N G ### +############################################################################## +############################################################################## + + # -------------------------------------------------------------------- + # Packed Bits + # -------------------------------------------------------------------- + #-- Copy all the HDF5 files from the test directory into the source directory + SET (HDF5_REFERENCE_PBITS + ${HDF5_TOOLS_SRC_DIR}/testfiles/tnofilename-with-packed-bits.ddl + ${HDF5_TOOLS_SRC_DIR}/testfiles/tpbitsArray.ddl + ${HDF5_TOOLS_SRC_DIR}/testfiles/tpbitsCompound.ddl + ${HDF5_TOOLS_SRC_DIR}/testfiles/tpbitsIncomplete.ddl + ${HDF5_TOOLS_SRC_DIR}/testfiles/tpbitsLengthExceeded.ddl + ${HDF5_TOOLS_SRC_DIR}/testfiles/tpbitsCharLengthExceeded.ddl + ${HDF5_TOOLS_SRC_DIR}/testfiles/tpbitsIntLengthExceeded.ddl + ${HDF5_TOOLS_SRC_DIR}/testfiles/tpbitsLongLengthExceeded.ddl + ${HDF5_TOOLS_SRC_DIR}/testfiles/tpbitsLengthPositive.ddl + ${HDF5_TOOLS_SRC_DIR}/testfiles/tpbitsMax.ddl + ${HDF5_TOOLS_SRC_DIR}/testfiles/tpbitsMaxExceeded.ddl + ${HDF5_TOOLS_SRC_DIR}/testfiles/tpbitsOffsetExceeded.ddl + ${HDF5_TOOLS_SRC_DIR}/testfiles/tpbitsCharOffsetExceeded.ddl + ${HDF5_TOOLS_SRC_DIR}/testfiles/tpbitsIntOffsetExceeded.ddl + ${HDF5_TOOLS_SRC_DIR}/testfiles/tpbitsLongOffsetExceeded.ddl + ${HDF5_TOOLS_SRC_DIR}/testfiles/tpbitsOffsetNegative.ddl + ${HDF5_TOOLS_SRC_DIR}/testfiles/tpbitsOverlapped.ddl + ${HDF5_TOOLS_SRC_DIR}/testfiles/tpbitsSigned.ddl + ${HDF5_TOOLS_SRC_DIR}/testfiles/tpbitsUnsigned.ddl + ${HDF5_TOOLS_SRC_DIR}/testfiles/tpbitsSignedInt.ddl + ${HDF5_TOOLS_SRC_DIR}/testfiles/tpbitsUnsignedInt.ddl + ${HDF5_TOOLS_SRC_DIR}/testfiles/tpbitsSignedLong.ddl + ${HDF5_TOOLS_SRC_DIR}/testfiles/tpbitsUnsignedLong.ddl + ${HDF5_TOOLS_SRC_DIR}/testfiles/tpbitsSignedLongLong.ddl + ${HDF5_TOOLS_SRC_DIR}/testfiles/tpbitsUnsignedLongLong.ddl + ${HDF5_TOOLS_SRC_DIR}/testfiles/tpbitsSignedWhole.ddl + ${HDF5_TOOLS_SRC_DIR}/testfiles/tpbitsUnsignedWhole.ddl + ${HDF5_TOOLS_SRC_DIR}/testfiles/tpbitsSignedIntWhole.ddl + ${HDF5_TOOLS_SRC_DIR}/testfiles/tpbitsUnsignedIntWhole.ddl + ${HDF5_TOOLS_SRC_DIR}/testfiles/tpbitsSignedLongWhole.ddl + ${HDF5_TOOLS_SRC_DIR}/testfiles/tpbitsUnsignedLongWhole.ddl + ${HDF5_TOOLS_SRC_DIR}/testfiles/tpbitsSignedLongLongWhole.ddl + ${HDF5_TOOLS_SRC_DIR}/testfiles/tpbitsUnsignedLongLongWhole.ddl + ${HDF5_TOOLS_SRC_DIR}/testfiles/tpbitsSignedLongLongWhole1.ddl + ${HDF5_TOOLS_SRC_DIR}/testfiles/tpbitsUnsignedLongLongWhole1.ddl + ${HDF5_TOOLS_SRC_DIR}/testfiles/tpbitsSignedLongLongWhole63.ddl + ${HDF5_TOOLS_SRC_DIR}/testfiles/tpbitsUnsignedLongLongWhole63.ddl + ${HDF5_TOOLS_SRC_DIR}/testfiles/tpbitsSigned4.ddl + ${HDF5_TOOLS_SRC_DIR}/testfiles/tpbitsUnsigned4.ddl + ${HDF5_TOOLS_SRC_DIR}/testfiles/tpbitsSignedInt8.ddl + ${HDF5_TOOLS_SRC_DIR}/testfiles/tpbitsUnsignedInt8.ddl + ${HDF5_TOOLS_SRC_DIR}/testfiles/tpbitsSignedLong16.ddl + ${HDF5_TOOLS_SRC_DIR}/testfiles/tpbitsUnsignedLong16.ddl + ${HDF5_TOOLS_SRC_DIR}/testfiles/tpbitsSignedLongLong32.ddl + ${HDF5_TOOLS_SRC_DIR}/testfiles/tpbitsUnsignedLongLong32.ddl + ${HDF5_TOOLS_SRC_DIR}/testfiles/tpbitsSigned2.ddl + ${HDF5_TOOLS_SRC_DIR}/testfiles/tpbitsUnsigned2.ddl + ${HDF5_TOOLS_SRC_DIR}/testfiles/tpbitsSignedInt4.ddl + ${HDF5_TOOLS_SRC_DIR}/testfiles/tpbitsUnsignedInt4.ddl + ${HDF5_TOOLS_SRC_DIR}/testfiles/tpbitsSignedLong8.ddl + ${HDF5_TOOLS_SRC_DIR}/testfiles/tpbitsUnsignedLong8.ddl + ${HDF5_TOOLS_SRC_DIR}/testfiles/tpbitsSignedLongLong16.ddl + ${HDF5_TOOLS_SRC_DIR}/testfiles/tpbitsUnsignedLongLong16.ddl + ) + SET (HDF5_REFERENCE_TEST_PBITS + ${HDF5_TOOLS_SRC_DIR}/testfiles/packedbits.h5 + ${HDF5_TOOLS_SRC_DIR}/testfiles/tarray1.h5 + ${HDF5_TOOLS_SRC_DIR}/testfiles/tcompound.h5 + ) + SET (HDF5_ERROR_REFERENCE_PBITS + ${PROJECT_SOURCE_DIR}/errfiles/tnofilename-with-packed-bits.err + ${PROJECT_SOURCE_DIR}/errfiles/tpbitsCharLengthExceeded.err + ${PROJECT_SOURCE_DIR}/errfiles/tpbitsCharOffsetExceeded.err + ${PROJECT_SOURCE_DIR}/errfiles/tpbitsIncomplete.err + ${PROJECT_SOURCE_DIR}/errfiles/tpbitsIntLengthExceeded.err + ${PROJECT_SOURCE_DIR}/errfiles/tpbitsIntOffsetExceeded.err + ${PROJECT_SOURCE_DIR}/errfiles/tpbitsLengthExceeded.err + ${PROJECT_SOURCE_DIR}/errfiles/tpbitsLengthPositive.err + ${PROJECT_SOURCE_DIR}/errfiles/tpbitsLongLengthExceeded.err + ${PROJECT_SOURCE_DIR}/errfiles/tpbitsLongOffsetExceeded.err + ${PROJECT_SOURCE_DIR}/errfiles/tpbitsMaxExceeded.err + ${PROJECT_SOURCE_DIR}/errfiles/tpbitsOffsetExceeded.err + ${PROJECT_SOURCE_DIR}/errfiles/tpbitsOffsetNegative.err + ) + + FOREACH (pbits_h5_file ${HDF5_REFERENCE_TEST_PBITS}) + GET_FILENAME_COMPONENT(fname "${pbits_h5_file}" NAME) + SET (dest "${PROJECT_BINARY_DIR}/testfiles/pbits/${fname}") + #MESSAGE (STATUS " Copying ${pbits_h5_file}") + ADD_CUSTOM_COMMAND ( + TARGET h5dump + POST_BUILD + COMMAND ${CMAKE_COMMAND} + ARGS -E copy_if_different ${pbits_h5_file} ${dest} + ) + ENDFOREACH (pbits_h5_file ${HDF5_REFERENCE_TEST_PBITS}) + + + FOREACH (ddl_pbits ${HDF5_REFERENCE_PBITS}) + GET_FILENAME_COMPONENT(fname "${ddl_pbits}" NAME) + SET (ddldest "${PROJECT_BINARY_DIR}/testfiles/pbits/${fname}") + #MESSAGE (STATUS " Copying ${ddl_pbits}") + ADD_CUSTOM_COMMAND ( + TARGET h5dump + POST_BUILD + COMMAND ${CMAKE_COMMAND} + ARGS -E copy_if_different ${ddl_pbits} ${ddldest} + ) + ENDFOREACH (ddl_pbits ${HDF5_REFERENCE_PBITS}) + + FOREACH (ddl_pbits ${HDF5_ERROR_REFERENCE_PBITS}) + GET_FILENAME_COMPONENT(fname "${ddl_pbits}" NAME) + SET (ddldest "${PROJECT_BINARY_DIR}/testfiles/pbits/${fname}") + #MESSAGE (STATUS " Copying ${ddl_pbits}") + ADD_CUSTOM_COMMAND ( + TARGET h5dump + POST_BUILD + COMMAND ${CMAKE_COMMAND} + ARGS -E copy_if_different ${ddl_pbits} ${ddldest} + ) + ENDFOREACH (ddl_pbits ${HDF5_ERROR_REFERENCE_PBITS}) + +############################################################################## +############################################################################## +### T H E T E S T S M A C R O S ### +############################################################################## +############################################################################## + + MACRO (ADD_H5_PBITS_TEST resultfile resultcode) + # If using memchecker add tests without using scripts + IF (HDF5_ENABLE_USING_MEMCHECKER) + ADD_TEST (NAME H5DUMP-${resultfile} COMMAND $ ${ARGN}) + SET_TESTS_PROPERTIES (H5DUMP-${resultfile} PROPERTIES WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles/pbits") + IF (NOT ${resultcode} STREQUAL "0") + SET_TESTS_PROPERTIES (H5DUMP-${resultfile} PROPERTIES WILL_FAIL "true") + ENDIF (NOT ${resultcode} STREQUAL "0") + IF (NOT "${last_pbits_test}" STREQUAL "") + SET_TESTS_PROPERTIES (H5DUMP-${resultfile} PROPERTIES DEPENDS ${last_pbits_test}) + ENDIF (NOT "${last_pbits_test}" STREQUAL "") + ELSE (HDF5_ENABLE_USING_MEMCHECKER) + ADD_TEST ( + NAME H5DUMP-${resultfile}-clear-objects + COMMAND ${CMAKE_COMMAND} + -E remove ${resultfile}.out ${resultfile}.out.err + ) + SET_TESTS_PROPERTIES (H5DUMP-${resultfile}-clear-objects PROPERTIES WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles/pbits") + ADD_TEST ( + NAME H5DUMP-${resultfile} + COMMAND "${CMAKE_COMMAND}" + -D "TEST_PROGRAM=$" + -D "TEST_ARGS:STRING=${ARGN}" + -D "TEST_FOLDER=${PROJECT_BINARY_DIR}/testfiles/pbits" + -D "TEST_OUTPUT=${resultfile}.out" + -D "TEST_EXPECT=${resultcode}" + -D "TEST_REFERENCE=${resultfile}.ddl" + -P "${HDF5_RESOURCES_DIR}/runTest.cmake" + ) + SET_TESTS_PROPERTIES (H5DUMP-${resultfile} PROPERTIES DEPENDS "H5DUMP-${resultfile}-clear-objects") + ENDIF (HDF5_ENABLE_USING_MEMCHECKER) + ENDMACRO (ADD_H5_PBITS_TEST file) + +############################################################################## +############################################################################## +### T H E T E S T S HDF5_ENABLE_USING_MEMCHECKER ### +############################################################################## +############################################################################## + + IF (HDF5_ENABLE_USING_MEMCHECKER) + # Remove any output file left over from previous test run + ADD_TEST ( + NAME H5DUMP_PACKED_BITS-clearall-objects + COMMAND ${CMAKE_COMMAND} + -E remove + tnofilename-with-packed-bits.out + tnofilename-with-packed-bits.out.err + tpbitsArray.out + tpbitsArray.out.err + tpbitsCompound.out + tpbitsCompound.out.err + tpbitsIncomplete.out + tpbitsIncomplete.out.err + tpbitsLengthExceeded.out + tpbitsLengthExceeded.out.err + tpbitsCharLengthExceeded.out + tpbitsCharLengthExceeded.out.err + tpbitsIntLengthExceeded.out + tpbitsIntLengthExceeded.out.err + tpbitsLongLengthExceeded.out + tpbitsLongLengthExceeded.out.err + tpbitsLengthPositive.out + tpbitsLengthPositive.out.err + tpbitsMax.out + tpbitsMax.out.err + tpbitsMaxExceeded.out + tpbitsMaxExceeded.out.err + tpbitsOffsetExceeded.out + tpbitsOffsetExceeded.out.err + tpbitsCharOffsetExceeded.out + tpbitsCharOffsetExceeded.out.err + tpbitsIntOffsetExceeded.out + tpbitsIntOffsetExceeded.out.err + tpbitsLongOffsetExceeded.out + tpbitsLongOffsetExceeded.out.err + tpbitsOffsetNegative.out + tpbitsOffsetNegative.out.err + tpbitsOverlapped.out + tpbitsOverlapped.out.err + tpbitsSigned.out + tpbitsSigned.out.err + tpbitsUnsigned.out + tpbitsUnsigned.out.err + tpbitsSignedInt.out + tpbitsSignedInt.out.err + tpbitsUnsignedInt.out + tpbitsUnsignedInt.out.err + tpbitsSignedLong.out + tpbitsSignedLong.out.err + tpbitsUnsignedLong.out + tpbitsUnsignedLong.out.err + tpbitsSignedLongLong.out + tpbitsSignedLongLong.out.err + tpbitsUnsignedLongLong.out + tpbitsUnsignedLongLong.out.err + tpbitsSignedWhole.out + tpbitsSignedWhole.out.err + tpbitsUnsignedWhole.out + tpbitsUnsignedWhole.out.err + tpbitsSignedIntWhole.out + tpbitsSignedIntWhole.out.err + tpbitsUnsignedIntWhole.out + tpbitsUnsignedIntWhole.out.err + tpbitsSignedLongWhole.out + tpbitsSignedLongWhole.out.err + tpbitsUnsignedLongWhole.out + tpbitsUnsignedLongWhole.out.err + tpbitsSignedLongLongWhole.out + tpbitsSignedLongLongWhole.out.err + tpbitsUnsignedLongLongWhole.out + tpbitsUnsignedLongLongWhole.out.err + tpbitsSignedLongLongWhole1.out + tpbitsSignedLongLongWhole1.out.err + tpbitsUnsignedLongLongWhole1.out + tpbitsUnsignedLongLongWhole1.out.err + tpbitsSignedLongLongWhole63.out + tpbitsSignedLongLongWhole63.out.err + tpbitsUnsignedLongLongWhole63.out + tpbitsUnsignedLongLongWhole63.out.err + tpbitsSigned4.out + tpbitsSigned4.out.err + tpbitsUnsigned4.out + tpbitsUnsigned4.out.err + tpbitsSignedInt8.out + tpbitsSignedInt8.out.err + tpbitsUnsignedInt8.out + tpbitsUnsignedInt8.out.err + tpbitsSignedLong16.out + tpbitsSignedLong16.out.err + tpbitsUnsignedLong16.out + tpbitsUnsignedLong16.out.err + tpbitsSignedLongLong32.out + tpbitsSignedLongLong32.out.err + tpbitsUnsignedLongLong32.out + tpbitsUnsignedLongLong32.out.err + tpbitsSigned2.out + tpbitsSigned2.out.err + tpbitsUnsigned2.out + tpbitsUnsigned2.out.err + tpbitsSignedInt4.out + tpbitsSignedInt4.out.err + tpbitsUnsignedInt4.out + tpbitsUnsignedInt4.out.err + tpbitsSignedLong8.out + tpbitsSignedLong8.out.err + tpbitsUnsignedLong8.out + tpbitsUnsignedLong8.out.err + tpbitsSignedLongLong16.out + tpbitsSignedLongLong16.out.err + tpbitsUnsignedLongLong16.out + tpbitsUnsignedLongLong16.out.err + ) + SET_TESTS_PROPERTIES (H5DUMP_PACKED_BITS-clearall-objects PROPERTIES WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles/pbits") + IF (NOT "${last_pbits_test}" STREQUAL "") + SET_TESTS_PROPERTIES (H5DUMP_PACKED_BITS-clearall-objects PROPERTIES DEPENDS ${last_pbits_test}) + ENDIF (NOT "${last_pbits_test}" STREQUAL "") + SET (last_pbits_test "H5DUMP_PACKED_BITS-clearall-objects") + ENDIF (HDF5_ENABLE_USING_MEMCHECKER) + + # test failure handling + # Missing file name + ADD_H5_PBITS_TEST (tnofilename-with-packed-bits 1 --enable-error-stack) + # Limits: + # Maximum number of packed bits is 8 (for now). + # Maximum integer size is 8*sizeof(long long). + # Maximun Offset is Maximum size - 1. + # Maximum Offset+Length is Maximum size. + # Tests: + # Normal operation on both signed and unsigned int datasets. + # Sanity check + # Their rawdata output should be the same. + ADD_H5_PBITS_TEST (tpbitsSignedWhole 0 --enable-error-stack -d /DS08BITS -M 0,8 packedbits.h5) + ADD_H5_PBITS_TEST (tpbitsUnsignedWhole 0 --enable-error-stack -d /DU08BITS -M 0,8 packedbits.h5) + ADD_H5_PBITS_TEST (tpbitsSignedIntWhole 0 --enable-error-stack -d /DS16BITS -M 0,16 packedbits.h5) + ADD_H5_PBITS_TEST (tpbitsUnsignedIntWhole 0 --enable-error-stack -d /DU16BITS -M 0,16 packedbits.h5) + ADD_H5_PBITS_TEST (tpbitsSignedLongWhole 0 --enable-error-stack -d /DS32BITS -M 0,32 packedbits.h5) + ADD_H5_PBITS_TEST (tpbitsUnsignedLongWhole 0 --enable-error-stack -d /DU32BITS -M 0,32 packedbits.h5) + ADD_H5_PBITS_TEST (tpbitsSignedLongLongWhole 0 --enable-error-stack -d /DS64BITS -M 0,64 packedbits.h5) + ADD_H5_PBITS_TEST (tpbitsUnsignedLongLongWhole 0 --enable-error-stack -d /DU64BITS -M 0,64 packedbits.h5) + ADD_H5_PBITS_TEST (tpbitsSignedLongLongWhole63 0 --enable-error-stack -d /DS64BITS -M 0,63 packedbits.h5) + ADD_H5_PBITS_TEST (tpbitsUnsignedLongLongWhole63 0 --enable-error-stack -d /DU64BITS -M 0,63 packedbits.h5) + ADD_H5_PBITS_TEST (tpbitsSignedLongLongWhole1 0 --enable-error-stack -d /DS64BITS -M 1,63 packedbits.h5) + ADD_H5_PBITS_TEST (tpbitsUnsignedLongLongWhole1 0 --enable-error-stack -d /DU64BITS -M 1,63 packedbits.h5) + # Half sections + ADD_H5_PBITS_TEST (tpbitsSigned4 0 --enable-error-stack -d /DS08BITS -M 0,4,4,4 packedbits.h5) + ADD_H5_PBITS_TEST (tpbitsUnsigned4 0 --enable-error-stack -d /DU08BITS -M 0,4,4,4 packedbits.h5) + ADD_H5_PBITS_TEST (tpbitsSignedInt8 0 --enable-error-stack -d /DS16BITS -M 0,8,8,8 packedbits.h5) + ADD_H5_PBITS_TEST (tpbitsUnsignedInt8 0 --enable-error-stack -d /DU16BITS -M 0,8,8,8 packedbits.h5) + ADD_H5_PBITS_TEST (tpbitsSignedLong16 0 --enable-error-stack -d /DS32BITS -M 0,16,16,16 packedbits.h5) + ADD_H5_PBITS_TEST (tpbitsUnsignedLong16 0 --enable-error-stack -d /DU32BITS -M 0,16,16,16 packedbits.h5) + ADD_H5_PBITS_TEST (tpbitsSignedLongLong32 0 --enable-error-stack -d /DS64BITS -M 0,32,32,32 packedbits.h5) + ADD_H5_PBITS_TEST (tpbitsUnsignedLongLong32 0 --enable-error-stack -d /DU64BITS -M 0,32,32,32 packedbits.h5) + # Quarter sections + ADD_H5_PBITS_TEST (tpbitsSigned2 0 --enable-error-stack -d /DS08BITS -M 0,2,2,2,4,2,6,2 packedbits.h5) + ADD_H5_PBITS_TEST (tpbitsUnsigned2 0 --enable-error-stack -d /DU08BITS -M 0,2,2,2,4,2,6,2 packedbits.h5) + ADD_H5_PBITS_TEST (tpbitsSignedInt4 0 --enable-error-stack -d /DS16BITS -M 0,4,4,4,8,4,12,4 packedbits.h5) + ADD_H5_PBITS_TEST (tpbitsUnsignedInt4 0 --enable-error-stack -d /DU16BITS -M 0,4,4,4,8,4,12,4 packedbits.h5) + ADD_H5_PBITS_TEST (tpbitsSignedLong8 0 --enable-error-stack -d /DS32BITS -M 0,8,8,8,16,8,24,8 packedbits.h5) + ADD_H5_PBITS_TEST (tpbitsUnsignedLong8 0 --enable-error-stack -d /DU32BITS -M 0,8,8,8,16,8,24,8 packedbits.h5) + ADD_H5_PBITS_TEST (tpbitsSignedLongLong16 0 --enable-error-stack -d /DS64BITS -M 0,16,16,16,32,16,48,16 packedbits.h5) + ADD_H5_PBITS_TEST (tpbitsUnsignedLongLong16 0 --enable-error-stack -d /DU64BITS -M 0,16,16,16,32,16,48,16 packedbits.h5) + # Begin and End + ADD_H5_PBITS_TEST (tpbitsSigned 0 --enable-error-stack -d /DS08BITS -M 0,2,2,6 packedbits.h5) + ADD_H5_PBITS_TEST (tpbitsUnsigned 0 --enable-error-stack -d /DU08BITS -M 0,2,2,6 packedbits.h5) + ADD_H5_PBITS_TEST (tpbitsSignedInt 0 --enable-error-stack -d /DS16BITS -M 0,2,10,6 packedbits.h5) + ADD_H5_PBITS_TEST (tpbitsUnsignedInt 0 --enable-error-stack -d /DU16BITS -M 0,2,10,6 packedbits.h5) + ADD_H5_PBITS_TEST (tpbitsSignedLong 0 --enable-error-stack -d /DS32BITS -M 0,2,26,6 packedbits.h5) + ADD_H5_PBITS_TEST (tpbitsUnsignedLong 0 --enable-error-stack -d /DU32BITS -M 0,2,26,6 packedbits.h5) + ADD_H5_PBITS_TEST (tpbitsSignedLongLong 0 --enable-error-stack -d /DS64BITS -M 0,2,58,6 packedbits.h5) + ADD_H5_PBITS_TEST (tpbitsUnsignedLongLong 0 --enable-error-stack -d /DU64BITS -M 0,2,58,6 packedbits.h5) + # Overlapped packed bits. + ADD_H5_PBITS_TEST (tpbitsOverlapped 0 --enable-error-stack -d /DS08BITS -M 0,1,1,1,2,1,0,3 packedbits.h5) + # Maximum number of packed bits. + ADD_H5_PBITS_TEST (tpbitsMax 0 --enable-error-stack -d /DS08BITS -M 0,1,1,1,2,1,3,1,4,1,5,1,6,1,7,1 packedbits.h5) + # Compound type. + ADD_H5_PBITS_TEST (tpbitsCompound 0 --enable-error-stack -d /dset1 -M 0,1,1,1 tcompound.h5) + # Array type. + ADD_H5_PBITS_TEST (tpbitsArray 0 --enable-error-stack -d /Dataset1 -M 0,1,1,1 tarray1.h5) + # Test Error handling. + # Too many packed bits requested. Max is 8 for now. + ADD_H5_PBITS_TEST (tpbitsMaxExceeded 1 --enable-error-stack -d /DS08BITS -M 0,1,0,1,1,1,2,1,3,1,4,1,5,1,6,1,7,1 packedbits.h5) + # Offset too large. Max is 8*sizeof(long long. + ADD_H5_PBITS_TEST (tpbitsOffsetExceeded 1 --enable-error-stack -d /DS08BITS -M 64,1 packedbits.h5) + ADD_H5_PBITS_TEST (tpbitsCharOffsetExceeded 0 --enable-error-stack -d /DS08BITS -M 8,1 packedbits.h5) + ADD_H5_PBITS_TEST (tpbitsIntOffsetExceeded 0 --enable-error-stack -d /DS16BITS -M 16,1 packedbits.h5) + ADD_H5_PBITS_TEST (tpbitsLongOffsetExceeded 0 --enable-error-stack -d /DS32BITS -M 32,1 packedbits.h5) + # Bad offset, must not be negative. + ADD_H5_PBITS_TEST (tpbitsOffsetNegative 1 --enable-error-stack -d /DS08BITS -M -1,1 packedbits.h5) + # Bad length, must not be positive. + ADD_H5_PBITS_TEST (tpbitsLengthPositive 1 --enable-error-stack -d /DS08BITS -M 4,0 packedbits.h5) + # Offset+Length is too large. Max is 8*sizeof(long long). + ADD_H5_PBITS_TEST (tpbitsLengthExceeded 1 --enable-error-stack -d /DS08BITS -M 37,28 packedbits.h5) + ADD_H5_PBITS_TEST (tpbitsCharLengthExceeded 0 --enable-error-stack -d /DS08BITS -M 2,7 packedbits.h5) + ADD_H5_PBITS_TEST (tpbitsIntLengthExceeded 0 --enable-error-stack -d /DS16BITS -M 10,7 packedbits.h5) + ADD_H5_PBITS_TEST (tpbitsLongLengthExceeded 0 --enable-error-stack -d /DS32BITS -M 26,7 packedbits.h5) + # Incomplete pair of packed bits request. + ADD_H5_PBITS_TEST (tpbitsIncomplete 1 --enable-error-stack -d /DS08BITS -M 0,2,2,1,0,2,2, packedbits.h5) diff --git a/tools/h5dump/CMakeTestsXML.cmake b/tools/h5dump/CMakeTestsXML.cmake new file mode 100644 index 0000000..6c9cae1 --- /dev/null +++ b/tools/h5dump/CMakeTestsXML.cmake @@ -0,0 +1,442 @@ + +############################################################################## +############################################################################## +### T E S T I N G ### +############################################################################## +############################################################################## + + # + # copy XML test files from source dir to test dir + # + SET (HDF5_XML_REFERENCE_TEST_FILES + ${HDF5_TOOLS_SRC_DIR}/testfiles/tall.h5 + ${HDF5_TOOLS_SRC_DIR}/testfiles/tarray1.h5 + ${HDF5_TOOLS_SRC_DIR}/testfiles/tarray2.h5 + ${HDF5_TOOLS_SRC_DIR}/testfiles/tarray3.h5 + ${HDF5_TOOLS_SRC_DIR}/testfiles/tarray6.h5 + ${HDF5_TOOLS_SRC_DIR}/testfiles/tarray7.h5 + ${HDF5_TOOLS_SRC_DIR}/testfiles/tattr.h5 + ${HDF5_TOOLS_SRC_DIR}/testfiles/tbitfields.h5 + ${HDF5_TOOLS_SRC_DIR}/testfiles/tcompound.h5 + ${HDF5_TOOLS_SRC_DIR}/testfiles/tcompound2.h5 + ${HDF5_TOOLS_SRC_DIR}/testfiles/tcompound_complex.h5 + ${HDF5_TOOLS_SRC_DIR}/testfiles/tdatareg.h5 + ${HDF5_TOOLS_SRC_DIR}/testfiles/tdset.h5 + ${HDF5_TOOLS_SRC_DIR}/testfiles/tdset2.h5 + ${HDF5_TOOLS_SRC_DIR}/testfiles/tempty.h5 + ${HDF5_TOOLS_SRC_DIR}/testfiles/tenum.h5 + ${HDF5_TOOLS_SRC_DIR}/testfiles/textlink.h5 + ${HDF5_TOOLS_SRC_DIR}/testfiles/tfpformat.h5 + ${HDF5_TOOLS_SRC_DIR}/testfiles/tgroup.h5 + ${HDF5_TOOLS_SRC_DIR}/testfiles/thlink.h5 + ${HDF5_TOOLS_SRC_DIR}/testfiles/tloop.h5 + ${HDF5_TOOLS_SRC_DIR}/testfiles/tloop2.h5 + ${HDF5_TOOLS_SRC_DIR}/testfiles/tmany.h5 + ${HDF5_TOOLS_SRC_DIR}/testfiles/tname-amp.h5 + ${HDF5_TOOLS_SRC_DIR}/testfiles/tname-apos.h5 + ${HDF5_TOOLS_SRC_DIR}/testfiles/tname-gt.h5 + ${HDF5_TOOLS_SRC_DIR}/testfiles/tname-lt.h5 + ${HDF5_TOOLS_SRC_DIR}/testfiles/tname-quot.h5 + ${HDF5_TOOLS_SRC_DIR}/testfiles/tname-sp.h5 + ${HDF5_TOOLS_SRC_DIR}/testfiles/tnamed_dtype_attr.h5 + ${HDF5_TOOLS_SRC_DIR}/testfiles/tnestedcomp.h5 + ${HDF5_TOOLS_SRC_DIR}/testfiles/tnodata.h5 + ${HDF5_TOOLS_SRC_DIR}/testfiles/tobjref.h5 + ${HDF5_TOOLS_SRC_DIR}/testfiles/topaque.h5 + ${HDF5_TOOLS_SRC_DIR}/testfiles/torderattr.h5 + ${HDF5_TOOLS_SRC_DIR}/testfiles/tref.h5 + ${HDF5_TOOLS_SRC_DIR}/testfiles/tref-escapes.h5 + ${HDF5_TOOLS_SRC_DIR}/testfiles/tref-escapes-at.h5 + ${HDF5_TOOLS_SRC_DIR}/testfiles/tsaf.h5 + ${HDF5_TOOLS_SRC_DIR}/testfiles/tslink.h5 + ${HDF5_TOOLS_SRC_DIR}/testfiles/tstring.h5 + ${HDF5_TOOLS_SRC_DIR}/testfiles/tstring-at.h5 + ${HDF5_TOOLS_SRC_DIR}/testfiles/tstr.h5 + ${HDF5_TOOLS_SRC_DIR}/testfiles/tstr2.h5 + ${HDF5_TOOLS_SRC_DIR}/testfiles/tudlink.h5 + ${HDF5_TOOLS_SRC_DIR}/testfiles/tvldtypes1.h5 + ${HDF5_TOOLS_SRC_DIR}/testfiles/tvldtypes2.h5 + ${HDF5_TOOLS_SRC_DIR}/testfiles/tvldtypes3.h5 + ${HDF5_TOOLS_SRC_DIR}/testfiles/tvldtypes4.h5 + ${HDF5_TOOLS_SRC_DIR}/testfiles/tvldtypes5.h5 + ${HDF5_TOOLS_SRC_DIR}/testfiles/tvlstr.h5 + ) + SET (HDF5_XML_REFERENCE_FILES + ${HDF5_TOOLS_SRC_DIR}/testfiles/tall.h5.xml + ${HDF5_TOOLS_SRC_DIR}/testfiles/tall-2A.h5.xml + ${HDF5_TOOLS_SRC_DIR}/testfiles/tarray1.h5.xml + ${HDF5_TOOLS_SRC_DIR}/testfiles/tarray2.h5.xml + ${HDF5_TOOLS_SRC_DIR}/testfiles/tarray3.h5.xml + ${HDF5_TOOLS_SRC_DIR}/testfiles/tarray6.h5.xml + ${HDF5_TOOLS_SRC_DIR}/testfiles/tarray7.h5.xml + ${HDF5_TOOLS_SRC_DIR}/testfiles/tattr.h5.xml + ${HDF5_TOOLS_SRC_DIR}/testfiles/tbitfields.h5.xml + ${HDF5_TOOLS_SRC_DIR}/testfiles/tcompound_complex.h5.xml + ${HDF5_TOOLS_SRC_DIR}/testfiles/tcompound.h5.xml + ${HDF5_TOOLS_SRC_DIR}/testfiles/tcompound2.h5.xml + ${HDF5_TOOLS_SRC_DIR}/testfiles/tdatareg.h5.xml + ${HDF5_TOOLS_SRC_DIR}/testfiles/tdset.h5.xml + ${HDF5_TOOLS_SRC_DIR}/testfiles/tdset2.h5.xml + ${HDF5_TOOLS_SRC_DIR}/testfiles/tempty.h5.xml + ${HDF5_TOOLS_SRC_DIR}/testfiles/tempty-dtd.h5.xml + ${HDF5_TOOLS_SRC_DIR}/testfiles/tempty-dtd-2.h5.xml + ${HDF5_TOOLS_SRC_DIR}/testfiles/tempty-dtd-uri.h5.xml + ${HDF5_TOOLS_SRC_DIR}/testfiles/tempty-nons.h5.xml + ${HDF5_TOOLS_SRC_DIR}/testfiles/tempty-nons-2.h5.xml + ${HDF5_TOOLS_SRC_DIR}/testfiles/tempty-nons-uri.h5.xml + ${HDF5_TOOLS_SRC_DIR}/testfiles/tempty-ns.h5.xml + ${HDF5_TOOLS_SRC_DIR}/testfiles/tempty-ns-2.h5.xml + ${HDF5_TOOLS_SRC_DIR}/testfiles/tenum.h5.xml + ${HDF5_TOOLS_SRC_DIR}/testfiles/textlink.h5.xml + ${HDF5_TOOLS_SRC_DIR}/testfiles/tfpformat.h5.xml + ${HDF5_TOOLS_SRC_DIR}/testfiles/tgroup.h5.xml + ${HDF5_TOOLS_SRC_DIR}/testfiles/thlink.h5.xml + ${HDF5_TOOLS_SRC_DIR}/testfiles/tloop.h5.xml + ${HDF5_TOOLS_SRC_DIR}/testfiles/tloop2.h5.xml + ${HDF5_TOOLS_SRC_DIR}/testfiles/tmany.h5.xml + ${HDF5_TOOLS_SRC_DIR}/testfiles/tname-amp.h5.xml + ${HDF5_TOOLS_SRC_DIR}/testfiles/tname-apos.h5.xml + ${HDF5_TOOLS_SRC_DIR}/testfiles/tnamed_dtype_attr.h5.xml + ${HDF5_TOOLS_SRC_DIR}/testfiles/tname-gt.h5.xml + ${HDF5_TOOLS_SRC_DIR}/testfiles/tname-lt.h5.xml + ${HDF5_TOOLS_SRC_DIR}/testfiles/tname-quot.h5.xml + ${HDF5_TOOLS_SRC_DIR}/testfiles/tname-sp.h5.xml + ${HDF5_TOOLS_SRC_DIR}/testfiles/tnestedcomp.h5.xml + ${HDF5_TOOLS_SRC_DIR}/testfiles/tnodata.h5.xml + ${HDF5_TOOLS_SRC_DIR}/testfiles/tobjref.h5.xml + ${HDF5_TOOLS_SRC_DIR}/testfiles/topaque.h5.xml + ${HDF5_TOOLS_SRC_DIR}/testfiles/torderattr1.h5.xml + ${HDF5_TOOLS_SRC_DIR}/testfiles/torderattr2.h5.xml + ${HDF5_TOOLS_SRC_DIR}/testfiles/torderattr3.h5.xml + ${HDF5_TOOLS_SRC_DIR}/testfiles/torderattr4.h5.xml + ${HDF5_TOOLS_SRC_DIR}/testfiles/tref.h5.xml + ${HDF5_TOOLS_SRC_DIR}/testfiles/tref-escapes.h5.xml + ${HDF5_TOOLS_SRC_DIR}/testfiles/tref-escapes-at.h5.xml + ${HDF5_TOOLS_SRC_DIR}/testfiles/tsaf.h5.xml + ${HDF5_TOOLS_SRC_DIR}/testfiles/tslink.h5.xml + ${HDF5_TOOLS_SRC_DIR}/testfiles/tstr.h5.xml + ${HDF5_TOOLS_SRC_DIR}/testfiles/tstr2.h5.xml + ${HDF5_TOOLS_SRC_DIR}/testfiles/tstring.h5.xml + ${HDF5_TOOLS_SRC_DIR}/testfiles/tstring-at.h5.xml + ${HDF5_TOOLS_SRC_DIR}/testfiles/tudlink.h5.xml + ${HDF5_TOOLS_SRC_DIR}/testfiles/tvldtypes1.h5.xml + ${HDF5_TOOLS_SRC_DIR}/testfiles/tvldtypes2.h5.xml + ${HDF5_TOOLS_SRC_DIR}/testfiles/tvldtypes3.h5.xml + ${HDF5_TOOLS_SRC_DIR}/testfiles/tvldtypes4.h5.xml + ${HDF5_TOOLS_SRC_DIR}/testfiles/tvldtypes5.h5.xml + ${HDF5_TOOLS_SRC_DIR}/testfiles/tvlstr.h5.xml + ) + + FOREACH (tst_xml_h5_file ${HDF5_XML_REFERENCE_TEST_FILES}) + GET_FILENAME_COMPONENT(fname "${tst_xml_h5_file}" NAME) + SET (dest "${PROJECT_BINARY_DIR}/testfiles/xml/${fname}") + #MESSAGE (STATUS " Copying ${tst_xml_h5_file}") + ADD_CUSTOM_COMMAND ( + TARGET h5dump + POST_BUILD + COMMAND ${CMAKE_COMMAND} + ARGS -E copy_if_different ${tst_xml_h5_file} ${dest} + ) + ENDFOREACH (tst_xml_h5_file ${HDF5_XML_REFERENCE_TEST_FILES}) + + FOREACH (tst_xml_other_file ${HDF5_XML_REFERENCE_FILES}) + GET_FILENAME_COMPONENT(fname "${tst_xml_other_file}" NAME) + SET (dest "${PROJECT_BINARY_DIR}/testfiles/xml/${fname}") + #MESSAGE (STATUS " Copying ${tst_xml_other_file}") + ADD_CUSTOM_COMMAND ( + TARGET h5dump + POST_BUILD + COMMAND ${CMAKE_COMMAND} + ARGS -E copy_if_different ${tst_xml_other_file} ${dest} + ) + ENDFOREACH (tst_xml_other_file ${HDF5_XML_REFERENCE_FILES}) + +############################################################################## +############################################################################## +### T H E T E S T S M A C R O S ### +############################################################################## +############################################################################## + + MACRO (ADD_XML_SKIP_H5_TEST skipresultfile skipresultcode testtype) + IF (${testtype} STREQUAL "SKIP") + IF (NOT HDF5_ENABLE_USING_MEMCHECKER) + ADD_TEST ( + NAME H5DUMP-XML-${skipresultfile}-SKIPPED + COMMAND ${CMAKE_COMMAND} -E echo "SKIP ${skipresultfile}.xml --xml ${ARGN}" + ) + ENDIF (NOT HDF5_ENABLE_USING_MEMCHECKER) + ELSE (${testtype} STREQUAL "SKIP") + ADD_XML_H5_TEST (${skipresultfile} ${skipresultcode} ${ARGN}) + ENDIF (${testtype} STREQUAL "SKIP") + ENDMACRO (ADD_XML_SKIP_H5_TEST) + + MACRO (ADD_XML_H5_TEST resultfile resultcode) + IF (HDF5_ENABLE_USING_MEMCHECKER) + ADD_TEST (NAME H5DUMP-XML-${resultfile} COMMAND $ --xml ${ARGN}) + SET_TESTS_PROPERTIES (H5DUMP-XML-${resultfile} PROPERTIES WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles/xml") + IF (NOT ${resultcode} STREQUAL "0") + SET_TESTS_PROPERTIES (H5DUMP-XML-${resultfile} PROPERTIES WILL_FAIL "true") + ENDIF (NOT ${resultcode} STREQUAL "0") + IF (NOT "${last_xml_test}" STREQUAL "") + SET_TESTS_PROPERTIES (H5DUMP-XML-${resultfile} PROPERTIES DEPENDS ${last_xml_test}) + ENDIF (NOT "${last_xml_test}" STREQUAL "") + ELSE (HDF5_ENABLE_USING_MEMCHECKER) + ADD_TEST ( + NAME H5DUMP-XML-${resultfile}-clear-objects + COMMAND ${CMAKE_COMMAND} + -E remove ${resultfile}.out ${resultfile}.out.err + ) + SET_TESTS_PROPERTIES (H5DUMP-XML-${resultfile}-clear-objects PROPERTIES WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles/xml") + ADD_TEST ( + NAME H5DUMP-XML-${resultfile} + COMMAND "${CMAKE_COMMAND}" + -D "TEST_PROGRAM=$" + -D "TEST_ARGS:STRING=--xml;${ARGN}" + -D "TEST_FOLDER=${PROJECT_BINARY_DIR}/testfiles/xml" + -D "TEST_OUTPUT=${resultfile}.out" + -D "TEST_EXPECT=${resultcode}" + -D "TEST_REFERENCE=${resultfile}.xml" + -P "${HDF5_RESOURCES_DIR}/runTest.cmake" + ) + SET_TESTS_PROPERTIES (H5DUMP-XML-${resultfile} PROPERTIES DEPENDS "H5DUMP-XML-${resultfile}-clear-objects") + ENDIF (HDF5_ENABLE_USING_MEMCHECKER) + ENDMACRO (ADD_XML_H5_TEST file) + +############################################################################## +############################################################################## +### T H E T E S T S HDF5_ENABLE_USING_MEMCHECKER ### +############################################################################## +############################################################################## + + IF (HDF5_ENABLE_USING_MEMCHECKER) + # Remove any output file left over from previous test run + ADD_TEST ( + NAME H5DUMP-XML-clearall-objects + COMMAND ${CMAKE_COMMAND} + -E remove + tall.h5.out + tall.h5.out.err + tall-2A.h5.out + tall-2A.h5.out.err + tarray1.h5.out + tarray1.h5.out.err + tarray2.h5.out + tarray2.h5.out.err + tarray3.h5.out + tarray3.h5.out.err + tarray6.h5.out + tarray6.h5.out.err + tarray7.h5.out + tarray7.h5.out.err + tattr.h5.out + tattr.h5.out.err + tbitfields.h5.out + tbitfields.h5.out.err + tcompound.h5.out + tcompound.h5.out.err + tcompound2.h5.out + tcompound2.h5.out.err + tcompound_complex.h5.out + tcompound_complex.h5.out.err + tdatareg.h5.out + tdatareg.h5.out.err + tdset.h5.out + tdset.h5.out.err + tdset2.h5.out + tdset2.h5.out.err + tempty-dtd-2.h5.out + tempty-dtd-2.h5.out.err + tempty-dtd-uri.h5.out + tempty-dtd-uri.h5.out.err + tempty-dtd.h5.out + tempty-dtd.h5.out.err + tempty-nons-2.h5.out + tempty-nons-2.h5.out.err + tempty-nons-uri.h5.out + tempty-nons-uri.h5.out.err + tempty-nons.h5.out + tempty-nons.h5.out.err + tempty-ns-2.h5.out + tempty-ns-2.h5.out.err + tempty-ns.h5.out + tempty-ns.h5.out.err + tempty.h5.out + tempty.h5.out.err + tenum.h5.out + tenum.h5.out.err + textlink.h5.out + textlink.h5.out.err + tfpformat.h5.out + tfpformat.h5.out.err + tgroup.h5.out + tgroup.h5.out.err + thlink.h5.out + thlink.h5.out.err + tloop.h5.out + tloop.h5.out.err + tloop2.h5.out + tloop2.h5.out.err + tmany.h5.out + tmany.h5.out.err + tname-amp.h5.out + tname-amp.h5.out.err + tname-apos.h5.out + tname-apos.h5.out.err + tname-gt.h5.out + tname-gt.h5.out.err + tname-lt.h5.out + tname-lt.h5.out.err + tname-quot.h5.out + tname-quot.h5.out.err + tname-sp.h5.out + tname-sp.h5.out.err + tnamed_dtype_attr.h5.out + tnamed_dtype_attr.h5.out.err + tnestedcomp.h5.out + tnestedcomp.h5.out.err + tnodata.h5.out + tnodata.h5.out.err + tnoname.h5.out + tnoname.h5.out.err + tobjref.h5.out + tobjref.h5.out.err + topaque.h5.out + topaque.h5.out.err + torderattr1.h5.out + torderattr1.h5.out.err + torderattr2.h5.out + torderattr2.h5.out.err + torderattr3.h5.out + torderattr3.h5.out.err + torderattr4.h5.out + torderattr4.h5.out.err + tref-escapes-at.h5.out + tref-escapes-at.h5.out.err + tref-escapes.h5.out + tref-escapes.h5.out.err + tref.h5.out + tref.h5.out.err + tsaf.h5.out + tsaf.h5.out.err + tslink.h5.out + tslink.h5.out.err + tstr.h5.out + tstr.h5.out.err + tstr2.h5.out + tstr2.h5.out.err + tstring.h5.out + tstring.h5.out.err + tstring-at.h5.out + tstring-at.h5.out.err + tudlink.h5.out + tudlink.h5.out.err + tvldtypes1.h5.out + tvldtypes1.h5.out.err + tvldtypes2.h5.out + tvldtypes2.h5.out.err + tvldtypes3.h5.out + tvldtypes3.h5.out.err + tvldtypes4.h5.out + tvldtypes4.h5.out.err + tvldtypes5.h5.out + tvldtypes5.h5.out.err + tvlstr.h5.out + tvlstr.h5.out.err + ) + SET_TESTS_PROPERTIES (H5DUMP-XML-clearall-objects PROPERTIES WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles/xml") + IF (NOT "${last_xml_test}" STREQUAL "") + SET_TESTS_PROPERTIES (H5DUMP-XML-clearall-objects PROPERTIES DEPENDS ${last_xml_test}) + ENDIF (NOT "${last_xml_test}" STREQUAL "") + SET (last_test "H5DUMP-XML-clearall-objects") + ENDIF (HDF5_ENABLE_USING_MEMCHECKER) + + ########## test XML + ADD_XML_H5_TEST (tall.h5 0 tall.h5) + ADD_XML_H5_TEST (tattr.h5 0 tattr.h5) + ADD_XML_H5_TEST (tbitfields.h5 0 tbitfields.h5) + ADD_XML_H5_TEST (tcompound.h5 0 tcompound.h5) + ADD_XML_H5_TEST (tcompound2.h5 0 tcompound2.h5) + ADD_XML_H5_TEST (tdatareg.h5 0 tdatareg.h5) + ADD_XML_H5_TEST (tdset.h5 0 tdset.h5) + ADD_XML_H5_TEST (tdset2.h5 0 tdset2.h5) + ADD_XML_H5_TEST (tenum.h5 0 tenum.h5) + ADD_XML_H5_TEST (tgroup.h5 0 tgroup.h5) + ADD_XML_H5_TEST (thlink.h5 0 thlink.h5) + ADD_XML_H5_TEST (tloop.h5 0 tloop.h5) + ADD_XML_H5_TEST (tloop2.h5 0 tloop2.h5) + ADD_XML_H5_TEST (tmany.h5 0 tmany.h5) + ADD_XML_H5_TEST (tnestedcomp.h5 0 tnestedcomp.h5) + ADD_XML_H5_TEST (tcompound_complex.h5 0 tcompound_complex.h5) + ADD_XML_H5_TEST (tobjref.h5 0 tobjref.h5) + ADD_XML_H5_TEST (topaque.h5 0 topaque.h5) + ADD_XML_H5_TEST (tslink.h5 0 tslink.h5) + ADD_XML_H5_TEST (tudlink.h5 0 tudlink.h5) + ADD_XML_H5_TEST (textlink.h5 0 textlink.h5) + ADD_XML_H5_TEST (tstr.h5 0 tstr.h5) + ADD_XML_H5_TEST (tstr2.h5 0 tstr2.h5) + ADD_XML_H5_TEST (tref.h5 0 tref.h5) + ADD_XML_H5_TEST (tname-amp.h5 0 tname-amp.h5) + ADD_XML_H5_TEST (tname-apos.h5 0 tname-apos.h5) + ADD_XML_H5_TEST (tname-gt.h5 0 tname-gt.h5) + ADD_XML_H5_TEST (tname-lt.h5 0 tname-lt.h5) + ADD_XML_H5_TEST (tname-quot.h5 0 tname-quot.h5) + ADD_XML_H5_TEST (tname-sp.h5 0 tname-sp.h5) + ADD_XML_H5_TEST (tstring.h5 0 tstring.h5) + ADD_XML_H5_TEST (tstring-at.h5 0 tstring-at.h5) + ADD_XML_H5_TEST (tref-escapes.h5 0 tref-escapes.h5) + ADD_XML_H5_TEST (tref-escapes-at.h5 0 tref-escapes-at.h5) + ADD_XML_H5_TEST (tnodata.h5 0 tnodata.h5) + ADD_XML_H5_TEST (tarray1.h5 0 tarray1.h5) + ADD_XML_H5_TEST (tarray2.h5 0 tarray2.h5) + ADD_XML_H5_TEST (tarray3.h5 0 tarray3.h5) + ADD_XML_H5_TEST (tarray6.h5 0 tarray6.h5) + ADD_XML_H5_TEST (tarray7.h5 0 tarray7.h5) + ADD_XML_H5_TEST (tvldtypes1.h5 0 tvldtypes1.h5) + ADD_XML_H5_TEST (tvldtypes2.h5 0 tvldtypes2.h5) + ADD_XML_H5_TEST (tvldtypes3.h5 0 tvldtypes3.h5) + ADD_XML_H5_TEST (tvldtypes4.h5 0 tvldtypes4.h5) + ADD_XML_H5_TEST (tvldtypes5.h5 0 tvldtypes5.h5) + ADD_XML_H5_TEST (tvlstr.h5 0 tvlstr.h5) + ADD_XML_H5_TEST (tsaf.h5 0 tsaf.h5) + ADD_XML_H5_TEST (tempty.h5 0 tempty.h5) + ADD_XML_H5_TEST (tnamed_dtype_attr.h5 0 tnamed_dtype_attr.h5) + ##Test dataset and attribute of null space. Commented out: + ## wait until the XML schema is updated for null space. + ## ADD_XML_H5_TEST (tnullspace.h5 0 tnulspace.h5) + ## So is dataspace with 0 dimension size. + ## ADD_XML_H5_TEST (zerodim.h5 0 zerodim.h5) + + # other options for xml + + ADD_XML_H5_TEST (tempty-dtd.h5 0 --use-dtd tempty.h5) + ADD_XML_H5_TEST (tempty-dtd-2.h5 0 -u tempty.h5) + + # The lone colon here confuses some systems (Cray X1). Skip + # it if configure detects that this is a problem. + SET (TESTTYPE "TEST") + IF (NOT "H5_LONE_COLON") + SET (TESTTYPE "SKIP") + ENDIF (NOT "H5_LONE_COLON") + ADD_XML_SKIP_H5_TEST (tempty-nons.h5 0 ${TESTTYPE} -X : tempty.h5) + + ADD_XML_H5_TEST (tempty-nons-2.h5 0 --xml-ns=: tempty.h5) + + ## Some of these combinations are syntactically correct but + ## the URLs are dummies + ADD_XML_H5_TEST (tempty-ns.h5 0 -X thing: tempty.h5) + ADD_XML_H5_TEST (tempty-ns-2.h5 0 --xml-ns=thing: tempty.h5) + ADD_XML_H5_TEST (tempty-nons-uri.h5 0 --xml-ns=: --xml-dtd=http://somewhere.net tempty.h5) + ADD_XML_H5_TEST (tempty-dtd-uri.h5 0 --use-dtd --xml-dtd=http://somewhere.net tempty.h5) + + ADD_XML_H5_TEST (tall-2A.h5 0 -A tall.h5) + + + # tests for attribute order + ADD_XML_H5_TEST (torderattr1.h5 0 -H --sort_by=name --sort_order=ascending torderattr.h5) + ADD_XML_H5_TEST (torderattr2.h5 0 -H --sort_by=name --sort_order=descending torderattr.h5) + ADD_XML_H5_TEST (torderattr3.h5 0 -H --sort_by=creation_order --sort_order=ascending torderattr.h5) + ADD_XML_H5_TEST (torderattr4.h5 0 -H --sort_by=creation_order --sort_order=descending torderattr.h5) + + # tests for floating point user defined printf format + ADD_XML_H5_TEST (tfpformat.h5 0 -u -m %.7f tfpformat.h5) + diff --git a/tools/h5import/CMakeLists.txt b/tools/h5import/CMakeLists.txt index 94dd69c..7caf44a 100644 --- a/tools/h5import/CMakeLists.txt +++ b/tools/h5import/CMakeLists.txt @@ -18,12 +18,6 @@ SET_TARGET_PROPERTIES (h5import PROPERTIES FOLDER tools) SET (H5_DEP_EXECUTABLES h5import) -############################################################################## -############################################################################## -### T E S T I N G ### -############################################################################## -############################################################################## - IF (BUILD_TESTING) # -------------------------------------------------------------------- # Add the h5import executables @@ -34,476 +28,7 @@ IF (BUILD_TESTING) TARGET_LINK_LIBRARIES (h5importtest ${HDF5_LIB_TARGET} ${HDF5_TOOLS_LIB_TARGET}) SET_TARGET_PROPERTIES (h5importtest PROPERTIES FOLDER tools) - SET (HDF5_REFERENCE_CONF_FILES - binfp64.conf - binin8.conf - binin8w.conf - binin16.conf - binin32.conf - binuin16.conf - binuin32.conf - txtfp32.conf - txtfp64.conf - txtin8.conf - txtin16.conf - txtin32.conf - txtuin16.conf - txtuin32.conf - textpfe.conf - txtstr.conf - ) - SET (HDF5_REFERENCE_TXT_FILES - txtfp32.txt - txtfp64.txt - txtuin16.txt - txtuin32.txt - txtin8.txt - txtin16.txt - txtin32.txt - textpfe64.txt - txtstr.txt - dbinfp64.h5.txt - dbinin8.h5.txt - dbinin8w.h5.txt - dbinin16.h5.txt - dbinin32.h5.txt - dbinuin16.h5.txt - dbinuin32.h5.txt - dtxtstr.h5.txt - ) - SET (HDF5_REFERENCE_TEST_FILES - binfp64.h5 - binin8.h5 - binin8w.h5 - binin16.h5 - binin32.h5 - binuin16.h5 - binuin32.h5 - txtfp32.h5 - txtfp64.h5 - txtin8.h5 - txtin16.h5 - txtin32.h5 - txtuin16.h5 - txtuin32.h5 - txtstr.h5 - textpfe.h5 - ) - - FILE (MAKE_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles") - FOREACH (conf_file ${HDF5_REFERENCE_CONF_FILES}) - SET (dest "${PROJECT_BINARY_DIR}/testfiles/${conf_file}") - #MESSAGE (STATUS " Copying ${conf_file}") - ADD_CUSTOM_COMMAND ( - TARGET h5import - POST_BUILD - COMMAND ${CMAKE_COMMAND} - ARGS -E copy_if_different ${HDF5_TOOLS_H5IMPORT_SOURCE_DIR}/testfiles/${conf_file} ${dest} - ) - ENDFOREACH (conf_file ${HDF5_REFERENCE_CONF_FILES}) - - FOREACH (txt_file ${HDF5_REFERENCE_TXT_FILES}) - SET (dest "${PROJECT_BINARY_DIR}/testfiles/${txt_file}") - #MESSAGE (STATUS " Copying ${txt_file}") - ADD_CUSTOM_COMMAND ( - TARGET h5import - POST_BUILD - COMMAND ${CMAKE_COMMAND} - ARGS -E copy_if_different ${HDF5_TOOLS_H5IMPORT_SOURCE_DIR}/testfiles/${txt_file} ${dest} - ) - ENDFOREACH (txt_file ${HDF5_REFERENCE_TXT_FILES}) - - FOREACH (h5_file ${HDF5_REFERENCE_TEST_FILES}) - SET (dest "${PROJECT_BINARY_DIR}/testfiles/${h5_file}") - #MESSAGE (STATUS " Copying ${h5_file}") - ADD_CUSTOM_COMMAND ( - TARGET h5import - POST_BUILD - COMMAND ${CMAKE_COMMAND} - ARGS -E copy_if_different ${HDF5_TOOLS_H5IMPORT_SOURCE_DIR}/testfiles/${h5_file} ${dest} - ) - ENDFOREACH (h5_file ${HDF5_REFERENCE_TEST_FILES}) - -############################################################################## -############################################################################## -### T H E T E S T S M A C R O S ### -############################################################################## -############################################################################## - MACRO (ADD_H5_TEST testname importfile conffile testfile) - # If using memchecker skip macro based tests - IF (HDF5_ENABLE_USING_MEMCHECKER) - ADD_TEST (NAME H5IMPORT-${testname} COMMAND $ ${importfile} -c ${conffile} -o ${testfile}) - IF (NOT "${last_test}" STREQUAL "") - SET_TESTS_PROPERTIES (H5IMPORT-${testname} PROPERTIES DEPENDS ${last_test}) - ENDIF (NOT "${last_test}" STREQUAL "") - ELSE (HDF5_ENABLE_USING_MEMCHECKER) - ADD_TEST ( - NAME H5IMPORT-${testname}-clear-objects - COMMAND ${CMAKE_COMMAND} - -E remove - ${testfile} - ${testfile}.new - ${testfile}.new.err - ${testfile}.out - ${testfile}.out.err - ) - - ADD_TEST (NAME H5IMPORT-${testname} COMMAND $ ${importfile} -c ${conffile} -o ${testfile}) - SET_TESTS_PROPERTIES (H5IMPORT-${testname} PROPERTIES DEPENDS H5IMPORT-${testname}-clear-objects) - - ADD_TEST ( - NAME H5IMPORT-${testname}-H5DMP - COMMAND "${CMAKE_COMMAND}" - -D "TEST_PROGRAM=$" - -D "TEST_ARGS:STRING=${testfile}" - -D "TEST_FOLDER=${PROJECT_BINARY_DIR}" - -D "TEST_OUTPUT=${testfile}.new" - -D "TEST_EXPECT=0" - -D "TEST_FILTER=(^(HDF5)[^\n]*)" - -D "TEST_SKIP_COMPARE=TRUE" - -P "${HDF5_RESOURCES_DIR}/runTest.cmake" - ) - SET_TESTS_PROPERTIES (H5IMPORT-${testname}-H5DMP PROPERTIES DEPENDS H5IMPORT-${testname}) - ADD_TEST ( - NAME H5IMPORT-${testname}-H5DMP_CMP - COMMAND "${CMAKE_COMMAND}" - -D "TEST_PROGRAM=$" - -D "TEST_ARGS:STRING=testfiles/${testfile}" - -D "TEST_FOLDER=${PROJECT_BINARY_DIR}" - -D "TEST_OUTPUT=${testfile}.out" - -D "TEST_EXPECT=0" - -D "TEST_FILTER=(^(HDF5)[^\n]*)" - -D "TEST_REFERENCE=${testfile}.new" - -P "${HDF5_RESOURCES_DIR}/runTest.cmake" - ) - SET_TESTS_PROPERTIES (H5IMPORT-${testname}-H5DMP_CMP PROPERTIES DEPENDS H5IMPORT-${testname}-H5DMP) - ENDIF (HDF5_ENABLE_USING_MEMCHECKER) - ENDMACRO (ADD_H5_TEST testname importfile conffile testfile) - - MACRO (ADD_H5_DUMPTEST testname datasetname testfile) - # If using memchecker skip tests - IF (NOT HDF5_ENABLE_USING_MEMCHECKER) - ADD_TEST ( - NAME H5IMPORT-DUMP-${testname}-clear-objects - COMMAND ${CMAKE_COMMAND} - -E remove - d${testfile} - d${testfile}.bin - d${testfile}.imp - d${testfile}.imp.err - d${testfile}.dmp - d${testfile}.dmp.err - d${testfile}.dff - d${testfile}.dff.err - ) - - IF ("${ARGN}" STREQUAL "BINARY") - ADD_TEST ( - NAME H5IMPORT-DUMP-${testname}-H5DMP - COMMAND "${CMAKE_COMMAND}" - -D "TEST_PROGRAM=$" - -D "TEST_ARGS:STRING=-p;-d;${datasetname};-o;d${testfile}.bin;-b;testfiles/${testfile}" - -D "TEST_FOLDER=${PROJECT_BINARY_DIR}" - -D "TEST_OUTPUT=d${testfile}.dmp" - -D "TEST_EXPECT=0" - -D "TEST_SKIP_COMPARE=TRUE" - -P "${HDF5_RESOURCES_DIR}/runTest.cmake" - ) - ELSE ("${ARGN}" STREQUAL "BINARY") - ADD_TEST ( - NAME H5IMPORT-DUMP-${testname}-H5DMP - COMMAND "${CMAKE_COMMAND}" - -D "TEST_PROGRAM=$" - -D "TEST_ARGS:STRING=-p;-d;${datasetname};-o;d${testfile}.bin;-y;--width=1;testfiles/${testfile}" - -D "TEST_FOLDER=${PROJECT_BINARY_DIR}" - -D "TEST_OUTPUT=d${testfile}.dmp" - -D "TEST_EXPECT=0" - -D "TEST_SKIP_COMPARE=TRUE" - -P "${HDF5_RESOURCES_DIR}/runTest.cmake" - ) - ENDIF ("${ARGN}" STREQUAL "BINARY") - SET_TESTS_PROPERTIES (H5IMPORT-DUMP-${testname}-H5DMP PROPERTIES DEPENDS "H5IMPORT-DUMP-${testname}-clear-objects") - - ADD_TEST ( - NAME H5IMPORT-DUMP-${testname} - COMMAND "${CMAKE_COMMAND}" - -D "TEST_PROGRAM=$" - -D "TEST_ARGS:STRING=d${testfile}.bin;-c;d${testfile}.dmp;-o;d${testfile}" - -D "TEST_FOLDER=${PROJECT_BINARY_DIR}" - -D "TEST_OUTPUT=d${testfile}.imp" - -D "TEST_EXPECT=0" - -D "TEST_SKIP_COMPARE=TRUE" - -P "${HDF5_RESOURCES_DIR}/runTest.cmake" - ) - SET_TESTS_PROPERTIES (H5IMPORT-DUMP-${testname} PROPERTIES DEPENDS "H5IMPORT-DUMP-${testname}-H5DMP") - - ADD_TEST ( - NAME H5IMPORT-DUMP-${testname}-H5DFF - COMMAND "${CMAKE_COMMAND}" - -D "TEST_PROGRAM=$" - -D "TEST_ARGS:STRING=-v;d${testfile};testfiles/${testfile};${datasetname};${datasetname}" - -D "TEST_FOLDER=${PROJECT_BINARY_DIR}" - -D "TEST_OUTPUT=d${testfile}.dff" - -D "TEST_EXPECT=0" - -D "TEST_FILTER=(^(Warning)[^\n]*)" - -D "TEST_REFERENCE=testfiles/d${testfile}.txt" - -P "${HDF5_RESOURCES_DIR}/runTest.cmake" - ) - SET_TESTS_PROPERTIES (H5IMPORT-DUMP-${testname}-H5DFF PROPERTIES DEPENDS "H5IMPORT-DUMP-${testname}") - ENDIF (NOT HDF5_ENABLE_USING_MEMCHECKER) - ENDMACRO (ADD_H5_DUMPTEST testname datasetname testfile) - - MACRO (ADD_H5_SKIP_DUMPTEST testname datasetname testfile) - IF (NOT HDF5_ENABLE_USING_MEMCHECKER) - ADD_TEST ( - NAME H5IMPORT-DUMP-${testname}-SKIPPED - COMMAND ${CMAKE_COMMAND} -E echo "SKIP ${testname} ${datasetname} ${testfile} --- DEFLATE filter not available" - ) - ENDIF (NOT HDF5_ENABLE_USING_MEMCHECKER) - ENDMACRO (ADD_H5_SKIP_DUMPTEST testname datasetname testfile) - - # -------------------------------------------------------------------- - # Determine if filter is available for h5diff - # -------------------------------------------------------------------- - IF (H5_HAVE_FILTER_DEFLATE) - SET (USE_FILTER_DEFLATE "true") - ENDIF (H5_HAVE_FILTER_DEFLATE) - -############################################################################## -############################################################################## -### T H E T E S T S ### -############################################################################## -############################################################################## - - IF (HDF5_ENABLE_USING_MEMCHECKER) - # Remove any output file left over from previous test run - ADD_TEST ( - NAME H5IMPORT-clear-objects - COMMAND ${CMAKE_COMMAND} - -E remove - binfp64.bin - binin8.bin - binin8w.bin - binin16.bin - binin32.bin - binuin16.bin - binuin32.bin - txtin32.h5 - txtin32.h5.new - txtin32.h5.new.err - txtin32.h5.out - txtin32.h5.out.err - txtin16.h5 - txtin16.h5.new - txtin16.h5.new.err - txtin16.h5.out - txtin16.h5.out.err - txtin8.h5 - txtin8.h5.new - txtin8.h5.new.err - txtin8.h5.out - txtin8.h5.out.err - txtuin16.h5 - txtuin16.h5.new - txtuin16.h5.new.err - txtuin16.h5.out - txtuin16.h5.out.err - txtuin32.h5 - txtuin32.h5.new - txtuin32.h5.new.err - txtuin32.h5.out - txtuin32.h5.out.err - txtfp32.h5 - txtfp32.h5.new - txtfp32.h5.new.err - txtfp32.h5.out - txtfp32.h5.out.err - txtfp64.h5 - txtfp64.h5.new - txtfp64.h5.new.err - txtfp64.h5.out - txtfp64.h5.out.err - binfp64.h5 - binfp64.h5.new - binfp64.h5.new.err - binfp64.h5.out - binfp64.h5.out.err - binin8.h5 - binin8.h5.new - binin8.h5.new.err - binin8.h5.out - binin8.h5.out.err - binin8w.h5 - binin8w.h5.new - binin8w.h5.new.err - binin8w.h5.out - binin8w.h5.out.err - binin16.h5 - binin16.h5.new - binin16.h5.new.err - binin16.h5.out - binin16.h5.out.err - binin32.h5 - binin32.h5.new - binin32.h5.new.err - binin32.h5.out - binin32.h5.out.err - binuin16.h5 - binuin16.h5.new - binuin16.h5.new.err - binuin16.h5.out - binuin16.h5.out.err - binuin32.h5 - binuin32.h5.new - binuin32.h5.new.err - binuin32.h5.out - binuin32.h5.out.err - txtstr.h5 - txtstr.h5.new - txtstr.h5.new.err - txtstr.h5.out - txtstr.h5.out.err - textpfe.h5 - textpfe.h5.new - textpfe.h5.new.err - textpfe.h5.out - textpfe.h5.out.err - dbinfp64.h5 - dbinfp64.h5.bin - dbinfp64.h5.imp - dbinfp64.h5.imp.err - dbinfp64.h5.dmp - dbinfp64.h5.dmp.err - dbinfp64.h5.dff - dbinfp64.h5.dff.err - dbinin8.h5 - dbinin8.h5.bin - dbinin8.h5.imp - dbinin8.h5.imp.err - dbinin8.h5.dmp - dbinin8.h5.dmp.err - dbinin8.h5.dff - dbinin8.h5.dff.err - dbinin8w.h5 - dbinin8w.h5.bin - dbinin8w.h5.imp - dbinin8w.h5.imp.err - dbinin8w.h5.dmp - dbinin8w.h5.dmp.err - dbinin8w.h5.dff - dbinin8w.h5.dff.err - dbinin16.h5 - dbinin16.h5.bin - dbinin16.h5.imp - dbinin16.h5.imp.err - dbinin16.h5.dmp - dbinin16.h5.dmp.err - dbinin16.h5.dff - dbinin16.h5.dff.err - dbinin32.h5 - dbinin32.h5.bin - dbinin32.h5.imp - dbinin32.h5.imp.err - dbinin32.h5.dmp - dbinin32.h5.dmp.err - dbinin32.h5.dff - dbinin32.h5.dff.err - dbinuin16.h5 - dbinuin16.h5.bin - dbinuin16.h5.imp - dbinuin16.h5.imp.err - dbinuin16.h5.dmp - dbinuin16.h5.dmp.err - dbinuin16.h5.dff - dbinuin16.h5.dff.err - dbinuin32.h5 - dbinuin32.h5.bin - dbinuin32.h5.imp - dbinuin32.h5.imp.err - dbinuin32.h5.dmp - dbinuin32.h5.dmp.err - dbinuin32.h5.dff - dbinuin32.h5.dff.err - dtxtstr.h5 - dtxtstr.h5.bin - dtxtstr.h5.imp - dtxtstr.h5.imp.err - dtxtstr.h5.dmp - dtxtstr.h5.dmp.err - dtxtstr.h5.dff - dtxtstr.h5.dff.err - ) - SET (last_test "H5IMPORT-clear-objects") - ENDIF (HDF5_ENABLE_USING_MEMCHECKER) - - ADD_TEST (NAME H5IMPORT-h5importtest COMMAND $) - IF (NOT "${last_test}" STREQUAL "") - SET_TESTS_PROPERTIES (H5IMPORT-h5importtest PROPERTIES DEPENDS ${last_test}) - ENDIF (NOT "${last_test}" STREQUAL "") - - # ----- TESTING "ASCII I32 rank 3 - Output BE " ; - ADD_H5_TEST (ASCII_I32 testfiles/txtin32.txt testfiles/txtin32.conf txtin32.h5) - - # ----- TESTING "ASCII I16 rank 3 - Output LE - CHUNKED - extended" - ADD_H5_TEST (ASCII_I16 testfiles/txtin16.txt testfiles/txtin16.conf txtin16.h5) - - # ----- TESTING "ASCII I8 - rank 3 - Output I8 LE-Chunked+Extended+Compressed " - ADD_H5_TEST (ASCII_I8 testfiles/txtin8.txt testfiles/txtin8.conf txtin8.h5) - - # ----- TESTING "ASCII UI16 - rank 2 - Output LE+Chunked+Compressed " - ADD_H5_TEST (ASCII_UI16 testfiles/txtuin16.txt testfiles/txtuin16.conf txtuin16.h5) - - # ----- TESTING "ASCII UI32 - rank 3 - Output BE" - ADD_H5_TEST (ASCII_UI32 testfiles/txtuin32.txt testfiles/txtuin32.conf txtuin32.h5) - - # ----- TESTING "ASCII F32 - rank 3 - Output LE " - ADD_H5_TEST (ASCII_F32 testfiles/txtfp32.txt testfiles/txtfp32.conf txtfp32.h5) - - # ----- TESTING "ASCII F64 - rank 3 - Output BE + CHUNKED+Extended+Compressed " - ADD_H5_TEST (ASCII_F64 testfiles/txtfp64.txt testfiles/txtfp64.conf txtfp64.h5) - - # ----- TESTING "BINARY F64 - rank 3 - Output LE+CHUNKED+Extended+Compressed " - ADD_H5_TEST (BINARY_F64 binfp64.bin testfiles/binfp64.conf binfp64.h5) - IF (NOT USE_FILTER_DEFLATE) - ADD_H5_SKIP_DUMPTEST (BINARY_F64 "/fp/bin/64-bit" binfp64.h5 BINARY) - ELSE (NOT USE_FILTER_DEFLATE) - ADD_H5_DUMPTEST (BINARY_F64 "/fp/bin/64-bit" binfp64.h5 BINARY) - ENDIF (NOT USE_FILTER_DEFLATE) - - # ----- TESTING "BINARY I8 - rank 3 - Output I16LE + Chunked+Extended+Compressed " - ADD_H5_TEST (BINARY_I8 binin8.bin testfiles/binin8.conf binin8.h5) - IF (NOT USE_FILTER_DEFLATE) - ADD_H5_SKIP_DUMPTEST (BINARY_I8 "/int/bin/8-bit" binin8.h5 BINARY) - ELSE (NOT USE_FILTER_DEFLATE) - ADD_H5_DUMPTEST (BINARY_I8 "/int/bin/8-bit" binin8.h5 BINARY) - ENDIF (NOT USE_FILTER_DEFLATE) - - # ----- TESTING "BINARY I16 - rank 3 - Output order LE + CHUNKED + extended " - ADD_H5_TEST (BINARY_I16 binin16.bin testfiles/binin16.conf binin16.h5) - ADD_H5_DUMPTEST (BINARY_I16 "/int/bin/16-bit" binin16.h5 BINARY) - - # ----- TESTING "BINARY I32 - rank 3 - Output BE + CHUNKED " - ADD_H5_TEST (BINARY_I32 binin32.bin testfiles/binin32.conf binin32.h5) - ADD_H5_DUMPTEST (BINARY_I32 "/int/bin/32-bit" binin32.h5 BINARY) - - # ----- TESTING "BINARY UI16 - rank 3 - Output byte BE + CHUNKED " - ADD_H5_TEST (BINARY_UI16 binuin16.bin testfiles/binuin16.conf binuin16.h5) - ADD_H5_DUMPTEST (BINARY_UI16 "/int/buin/16-bit" binuin16.h5 BINARY) - - # ----- TESTING "BINARY UI32 - rank 3 - Output LE " - ADD_H5_TEST (BINARY_UI32 binuin32.bin testfiles/binuin32.conf binuin32.h5) - ADD_H5_DUMPTEST (BINARY_UI32 "/int/buin/32-bit" binuin32.h5 BINARY) - - # ----- TESTING "STR" - ADD_H5_TEST (STR testfiles/txtstr.txt testfiles/txtstr.conf txtstr.h5) - ADD_H5_DUMPTEST (STR "/mytext/data" txtstr.h5) - - # ----- TESTING "BINARY I8 CR LF EOF" - ADD_H5_TEST (BINARY_I8_EOF binin8w.bin testfiles/binin8w.conf binin8w.h5) - ADD_H5_DUMPTEST (BINARY_I8_EOF "/dataset0" binin8w.h5 BINARY) - - # ----- TESTING "ASCII F64 - rank 1 - INPUT-CLASS TEXTFPE " - ADD_H5_TEST (ASCII_F64_R1 testfiles/textpfe64.txt testfiles/textpfe.conf textpfe.h5) + INCLUDE (CMakeTests.cmake) ENDIF (BUILD_TESTING) diff --git a/tools/h5import/CMakeTests.cmake b/tools/h5import/CMakeTests.cmake new file mode 100644 index 0000000..cb76204 --- /dev/null +++ b/tools/h5import/CMakeTests.cmake @@ -0,0 +1,478 @@ + +############################################################################## +############################################################################## +### T E S T I N G ### +############################################################################## +############################################################################## + + SET (HDF5_REFERENCE_CONF_FILES + binfp64.conf + binin8.conf + binin8w.conf + binin16.conf + binin32.conf + binuin16.conf + binuin32.conf + txtfp32.conf + txtfp64.conf + txtin8.conf + txtin16.conf + txtin32.conf + txtuin16.conf + txtuin32.conf + textpfe.conf + txtstr.conf + ) + SET (HDF5_REFERENCE_TXT_FILES + txtfp32.txt + txtfp64.txt + txtuin16.txt + txtuin32.txt + txtin8.txt + txtin16.txt + txtin32.txt + textpfe64.txt + txtstr.txt + dbinfp64.h5.txt + dbinin8.h5.txt + dbinin8w.h5.txt + dbinin16.h5.txt + dbinin32.h5.txt + dbinuin16.h5.txt + dbinuin32.h5.txt + dtxtstr.h5.txt + ) + SET (HDF5_REFERENCE_TEST_FILES + binfp64.h5 + binin8.h5 + binin8w.h5 + binin16.h5 + binin32.h5 + binuin16.h5 + binuin32.h5 + txtfp32.h5 + txtfp64.h5 + txtin8.h5 + txtin16.h5 + txtin32.h5 + txtuin16.h5 + txtuin32.h5 + txtstr.h5 + textpfe.h5 + ) + + FILE (MAKE_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles") + FOREACH (conf_file ${HDF5_REFERENCE_CONF_FILES}) + SET (dest "${PROJECT_BINARY_DIR}/testfiles/${conf_file}") + #MESSAGE (STATUS " Copying ${conf_file}") + ADD_CUSTOM_COMMAND ( + TARGET h5import + POST_BUILD + COMMAND ${CMAKE_COMMAND} + ARGS -E copy_if_different ${HDF5_TOOLS_H5IMPORT_SOURCE_DIR}/testfiles/${conf_file} ${dest} + ) + ENDFOREACH (conf_file ${HDF5_REFERENCE_CONF_FILES}) + + FOREACH (txt_file ${HDF5_REFERENCE_TXT_FILES}) + SET (dest "${PROJECT_BINARY_DIR}/testfiles/${txt_file}") + #MESSAGE (STATUS " Copying ${txt_file}") + ADD_CUSTOM_COMMAND ( + TARGET h5import + POST_BUILD + COMMAND ${CMAKE_COMMAND} + ARGS -E copy_if_different ${HDF5_TOOLS_H5IMPORT_SOURCE_DIR}/testfiles/${txt_file} ${dest} + ) + ENDFOREACH (txt_file ${HDF5_REFERENCE_TXT_FILES}) + + FOREACH (h5_file ${HDF5_REFERENCE_TEST_FILES}) + SET (dest "${PROJECT_BINARY_DIR}/testfiles/${h5_file}") + #MESSAGE (STATUS " Copying ${h5_file}") + ADD_CUSTOM_COMMAND ( + TARGET h5import + POST_BUILD + COMMAND ${CMAKE_COMMAND} + ARGS -E copy_if_different ${HDF5_TOOLS_H5IMPORT_SOURCE_DIR}/testfiles/${h5_file} ${dest} + ) + ENDFOREACH (h5_file ${HDF5_REFERENCE_TEST_FILES}) + +############################################################################## +############################################################################## +### T H E T E S T S M A C R O S ### +############################################################################## +############################################################################## + MACRO (ADD_H5_TEST testname importfile conffile testfile) + # If using memchecker skip macro based tests + IF (HDF5_ENABLE_USING_MEMCHECKER) + ADD_TEST (NAME H5IMPORT-${testname} COMMAND $ ${importfile} -c ${conffile} -o ${testfile}) + IF (NOT "${last_test}" STREQUAL "") + SET_TESTS_PROPERTIES (H5IMPORT-${testname} PROPERTIES DEPENDS ${last_test}) + ENDIF (NOT "${last_test}" STREQUAL "") + ELSE (HDF5_ENABLE_USING_MEMCHECKER) + ADD_TEST ( + NAME H5IMPORT-${testname}-clear-objects + COMMAND ${CMAKE_COMMAND} + -E remove + ${testfile} + ${testfile}.new + ${testfile}.new.err + ${testfile}.out + ${testfile}.out.err + ) + + ADD_TEST (NAME H5IMPORT-${testname} COMMAND $ ${importfile} -c ${conffile} -o ${testfile}) + SET_TESTS_PROPERTIES (H5IMPORT-${testname} PROPERTIES DEPENDS H5IMPORT-${testname}-clear-objects) + + ADD_TEST ( + NAME H5IMPORT-${testname}-H5DMP + COMMAND "${CMAKE_COMMAND}" + -D "TEST_PROGRAM=$" + -D "TEST_ARGS:STRING=${testfile}" + -D "TEST_FOLDER=${PROJECT_BINARY_DIR}" + -D "TEST_OUTPUT=${testfile}.new" + -D "TEST_EXPECT=0" + -D "TEST_FILTER=(^(HDF5)[^\n]*)" + -D "TEST_SKIP_COMPARE=TRUE" + -P "${HDF5_RESOURCES_DIR}/runTest.cmake" + ) + SET_TESTS_PROPERTIES (H5IMPORT-${testname}-H5DMP PROPERTIES DEPENDS H5IMPORT-${testname}) + ADD_TEST ( + NAME H5IMPORT-${testname}-H5DMP_CMP + COMMAND "${CMAKE_COMMAND}" + -D "TEST_PROGRAM=$" + -D "TEST_ARGS:STRING=testfiles/${testfile}" + -D "TEST_FOLDER=${PROJECT_BINARY_DIR}" + -D "TEST_OUTPUT=${testfile}.out" + -D "TEST_EXPECT=0" + -D "TEST_FILTER=(^(HDF5)[^\n]*)" + -D "TEST_REFERENCE=${testfile}.new" + -P "${HDF5_RESOURCES_DIR}/runTest.cmake" + ) + SET_TESTS_PROPERTIES (H5IMPORT-${testname}-H5DMP_CMP PROPERTIES DEPENDS H5IMPORT-${testname}-H5DMP) + ENDIF (HDF5_ENABLE_USING_MEMCHECKER) + ENDMACRO (ADD_H5_TEST testname importfile conffile testfile) + + MACRO (ADD_H5_DUMPTEST testname datasetname testfile) + # If using memchecker skip tests + IF (NOT HDF5_ENABLE_USING_MEMCHECKER) + ADD_TEST ( + NAME H5IMPORT-DUMP-${testname}-clear-objects + COMMAND ${CMAKE_COMMAND} + -E remove + d${testfile} + d${testfile}.bin + d${testfile}.imp + d${testfile}.imp.err + d${testfile}.dmp + d${testfile}.dmp.err + d${testfile}.dff + d${testfile}.dff.err + ) + + IF ("${ARGN}" STREQUAL "BINARY") + ADD_TEST ( + NAME H5IMPORT-DUMP-${testname}-H5DMP + COMMAND "${CMAKE_COMMAND}" + -D "TEST_PROGRAM=$" + -D "TEST_ARGS:STRING=-p;-d;${datasetname};-o;d${testfile}.bin;-b;testfiles/${testfile}" + -D "TEST_FOLDER=${PROJECT_BINARY_DIR}" + -D "TEST_OUTPUT=d${testfile}.dmp" + -D "TEST_EXPECT=0" + -D "TEST_SKIP_COMPARE=TRUE" + -P "${HDF5_RESOURCES_DIR}/runTest.cmake" + ) + ELSE ("${ARGN}" STREQUAL "BINARY") + ADD_TEST ( + NAME H5IMPORT-DUMP-${testname}-H5DMP + COMMAND "${CMAKE_COMMAND}" + -D "TEST_PROGRAM=$" + -D "TEST_ARGS:STRING=-p;-d;${datasetname};-o;d${testfile}.bin;-y;--width=1;testfiles/${testfile}" + -D "TEST_FOLDER=${PROJECT_BINARY_DIR}" + -D "TEST_OUTPUT=d${testfile}.dmp" + -D "TEST_EXPECT=0" + -D "TEST_SKIP_COMPARE=TRUE" + -P "${HDF5_RESOURCES_DIR}/runTest.cmake" + ) + ENDIF ("${ARGN}" STREQUAL "BINARY") + SET_TESTS_PROPERTIES (H5IMPORT-DUMP-${testname}-H5DMP PROPERTIES DEPENDS "H5IMPORT-DUMP-${testname}-clear-objects") + + ADD_TEST ( + NAME H5IMPORT-DUMP-${testname} + COMMAND "${CMAKE_COMMAND}" + -D "TEST_PROGRAM=$" + -D "TEST_ARGS:STRING=d${testfile}.bin;-c;d${testfile}.dmp;-o;d${testfile}" + -D "TEST_FOLDER=${PROJECT_BINARY_DIR}" + -D "TEST_OUTPUT=d${testfile}.imp" + -D "TEST_EXPECT=0" + -D "TEST_SKIP_COMPARE=TRUE" + -P "${HDF5_RESOURCES_DIR}/runTest.cmake" + ) + SET_TESTS_PROPERTIES (H5IMPORT-DUMP-${testname} PROPERTIES DEPENDS "H5IMPORT-DUMP-${testname}-H5DMP") + + ADD_TEST ( + NAME H5IMPORT-DUMP-${testname}-H5DFF + COMMAND "${CMAKE_COMMAND}" + -D "TEST_PROGRAM=$" + -D "TEST_ARGS:STRING=-v;d${testfile};testfiles/${testfile};${datasetname};${datasetname}" + -D "TEST_FOLDER=${PROJECT_BINARY_DIR}" + -D "TEST_OUTPUT=d${testfile}.dff" + -D "TEST_EXPECT=0" + -D "TEST_FILTER=(^(Warning)[^\n]*)" + -D "TEST_REFERENCE=testfiles/d${testfile}.txt" + -P "${HDF5_RESOURCES_DIR}/runTest.cmake" + ) + SET_TESTS_PROPERTIES (H5IMPORT-DUMP-${testname}-H5DFF PROPERTIES DEPENDS "H5IMPORT-DUMP-${testname}") + ENDIF (NOT HDF5_ENABLE_USING_MEMCHECKER) + ENDMACRO (ADD_H5_DUMPTEST testname datasetname testfile) + + MACRO (ADD_H5_SKIP_DUMPTEST testname datasetname testfile) + IF (NOT HDF5_ENABLE_USING_MEMCHECKER) + ADD_TEST ( + NAME H5IMPORT-DUMP-${testname}-SKIPPED + COMMAND ${CMAKE_COMMAND} -E echo "SKIP ${testname} ${datasetname} ${testfile} --- DEFLATE filter not available" + ) + ENDIF (NOT HDF5_ENABLE_USING_MEMCHECKER) + ENDMACRO (ADD_H5_SKIP_DUMPTEST testname datasetname testfile) + + # -------------------------------------------------------------------- + # Determine if filter is available for h5diff + # -------------------------------------------------------------------- + IF (H5_HAVE_FILTER_DEFLATE) + SET (USE_FILTER_DEFLATE "true") + ENDIF (H5_HAVE_FILTER_DEFLATE) + +############################################################################## +############################################################################## +### T H E T E S T S ### +############################################################################## +############################################################################## + + IF (HDF5_ENABLE_USING_MEMCHECKER) + # Remove any output file left over from previous test run + ADD_TEST ( + NAME H5IMPORT-clear-objects + COMMAND ${CMAKE_COMMAND} + -E remove + binfp64.bin + binin8.bin + binin8w.bin + binin16.bin + binin32.bin + binuin16.bin + binuin32.bin + txtin32.h5 + txtin32.h5.new + txtin32.h5.new.err + txtin32.h5.out + txtin32.h5.out.err + txtin16.h5 + txtin16.h5.new + txtin16.h5.new.err + txtin16.h5.out + txtin16.h5.out.err + txtin8.h5 + txtin8.h5.new + txtin8.h5.new.err + txtin8.h5.out + txtin8.h5.out.err + txtuin16.h5 + txtuin16.h5.new + txtuin16.h5.new.err + txtuin16.h5.out + txtuin16.h5.out.err + txtuin32.h5 + txtuin32.h5.new + txtuin32.h5.new.err + txtuin32.h5.out + txtuin32.h5.out.err + txtfp32.h5 + txtfp32.h5.new + txtfp32.h5.new.err + txtfp32.h5.out + txtfp32.h5.out.err + txtfp64.h5 + txtfp64.h5.new + txtfp64.h5.new.err + txtfp64.h5.out + txtfp64.h5.out.err + binfp64.h5 + binfp64.h5.new + binfp64.h5.new.err + binfp64.h5.out + binfp64.h5.out.err + binin8.h5 + binin8.h5.new + binin8.h5.new.err + binin8.h5.out + binin8.h5.out.err + binin8w.h5 + binin8w.h5.new + binin8w.h5.new.err + binin8w.h5.out + binin8w.h5.out.err + binin16.h5 + binin16.h5.new + binin16.h5.new.err + binin16.h5.out + binin16.h5.out.err + binin32.h5 + binin32.h5.new + binin32.h5.new.err + binin32.h5.out + binin32.h5.out.err + binuin16.h5 + binuin16.h5.new + binuin16.h5.new.err + binuin16.h5.out + binuin16.h5.out.err + binuin32.h5 + binuin32.h5.new + binuin32.h5.new.err + binuin32.h5.out + binuin32.h5.out.err + txtstr.h5 + txtstr.h5.new + txtstr.h5.new.err + txtstr.h5.out + txtstr.h5.out.err + textpfe.h5 + textpfe.h5.new + textpfe.h5.new.err + textpfe.h5.out + textpfe.h5.out.err + dbinfp64.h5 + dbinfp64.h5.bin + dbinfp64.h5.imp + dbinfp64.h5.imp.err + dbinfp64.h5.dmp + dbinfp64.h5.dmp.err + dbinfp64.h5.dff + dbinfp64.h5.dff.err + dbinin8.h5 + dbinin8.h5.bin + dbinin8.h5.imp + dbinin8.h5.imp.err + dbinin8.h5.dmp + dbinin8.h5.dmp.err + dbinin8.h5.dff + dbinin8.h5.dff.err + dbinin8w.h5 + dbinin8w.h5.bin + dbinin8w.h5.imp + dbinin8w.h5.imp.err + dbinin8w.h5.dmp + dbinin8w.h5.dmp.err + dbinin8w.h5.dff + dbinin8w.h5.dff.err + dbinin16.h5 + dbinin16.h5.bin + dbinin16.h5.imp + dbinin16.h5.imp.err + dbinin16.h5.dmp + dbinin16.h5.dmp.err + dbinin16.h5.dff + dbinin16.h5.dff.err + dbinin32.h5 + dbinin32.h5.bin + dbinin32.h5.imp + dbinin32.h5.imp.err + dbinin32.h5.dmp + dbinin32.h5.dmp.err + dbinin32.h5.dff + dbinin32.h5.dff.err + dbinuin16.h5 + dbinuin16.h5.bin + dbinuin16.h5.imp + dbinuin16.h5.imp.err + dbinuin16.h5.dmp + dbinuin16.h5.dmp.err + dbinuin16.h5.dff + dbinuin16.h5.dff.err + dbinuin32.h5 + dbinuin32.h5.bin + dbinuin32.h5.imp + dbinuin32.h5.imp.err + dbinuin32.h5.dmp + dbinuin32.h5.dmp.err + dbinuin32.h5.dff + dbinuin32.h5.dff.err + dtxtstr.h5 + dtxtstr.h5.bin + dtxtstr.h5.imp + dtxtstr.h5.imp.err + dtxtstr.h5.dmp + dtxtstr.h5.dmp.err + dtxtstr.h5.dff + dtxtstr.h5.dff.err + ) + SET (last_test "H5IMPORT-clear-objects") + ENDIF (HDF5_ENABLE_USING_MEMCHECKER) + + ADD_TEST (NAME H5IMPORT-h5importtest COMMAND $) + IF (NOT "${last_test}" STREQUAL "") + SET_TESTS_PROPERTIES (H5IMPORT-h5importtest PROPERTIES DEPENDS ${last_test}) + ENDIF (NOT "${last_test}" STREQUAL "") + + # ----- TESTING "ASCII I32 rank 3 - Output BE " ; + ADD_H5_TEST (ASCII_I32 testfiles/txtin32.txt testfiles/txtin32.conf txtin32.h5) + + # ----- TESTING "ASCII I16 rank 3 - Output LE - CHUNKED - extended" + ADD_H5_TEST (ASCII_I16 testfiles/txtin16.txt testfiles/txtin16.conf txtin16.h5) + + # ----- TESTING "ASCII I8 - rank 3 - Output I8 LE-Chunked+Extended+Compressed " + ADD_H5_TEST (ASCII_I8 testfiles/txtin8.txt testfiles/txtin8.conf txtin8.h5) + + # ----- TESTING "ASCII UI16 - rank 2 - Output LE+Chunked+Compressed " + ADD_H5_TEST (ASCII_UI16 testfiles/txtuin16.txt testfiles/txtuin16.conf txtuin16.h5) + + # ----- TESTING "ASCII UI32 - rank 3 - Output BE" + ADD_H5_TEST (ASCII_UI32 testfiles/txtuin32.txt testfiles/txtuin32.conf txtuin32.h5) + + # ----- TESTING "ASCII F32 - rank 3 - Output LE " + ADD_H5_TEST (ASCII_F32 testfiles/txtfp32.txt testfiles/txtfp32.conf txtfp32.h5) + + # ----- TESTING "ASCII F64 - rank 3 - Output BE + CHUNKED+Extended+Compressed " + ADD_H5_TEST (ASCII_F64 testfiles/txtfp64.txt testfiles/txtfp64.conf txtfp64.h5) + + # ----- TESTING "BINARY F64 - rank 3 - Output LE+CHUNKED+Extended+Compressed " + ADD_H5_TEST (BINARY_F64 binfp64.bin testfiles/binfp64.conf binfp64.h5) + IF (NOT USE_FILTER_DEFLATE) + ADD_H5_SKIP_DUMPTEST (BINARY_F64 "/fp/bin/64-bit" binfp64.h5 BINARY) + ELSE (NOT USE_FILTER_DEFLATE) + ADD_H5_DUMPTEST (BINARY_F64 "/fp/bin/64-bit" binfp64.h5 BINARY) + ENDIF (NOT USE_FILTER_DEFLATE) + + # ----- TESTING "BINARY I8 - rank 3 - Output I16LE + Chunked+Extended+Compressed " + ADD_H5_TEST (BINARY_I8 binin8.bin testfiles/binin8.conf binin8.h5) + IF (NOT USE_FILTER_DEFLATE) + ADD_H5_SKIP_DUMPTEST (BINARY_I8 "/int/bin/8-bit" binin8.h5 BINARY) + ELSE (NOT USE_FILTER_DEFLATE) + ADD_H5_DUMPTEST (BINARY_I8 "/int/bin/8-bit" binin8.h5 BINARY) + ENDIF (NOT USE_FILTER_DEFLATE) + + # ----- TESTING "BINARY I16 - rank 3 - Output order LE + CHUNKED + extended " + ADD_H5_TEST (BINARY_I16 binin16.bin testfiles/binin16.conf binin16.h5) + ADD_H5_DUMPTEST (BINARY_I16 "/int/bin/16-bit" binin16.h5 BINARY) + + # ----- TESTING "BINARY I32 - rank 3 - Output BE + CHUNKED " + ADD_H5_TEST (BINARY_I32 binin32.bin testfiles/binin32.conf binin32.h5) + ADD_H5_DUMPTEST (BINARY_I32 "/int/bin/32-bit" binin32.h5 BINARY) + + # ----- TESTING "BINARY UI16 - rank 3 - Output byte BE + CHUNKED " + ADD_H5_TEST (BINARY_UI16 binuin16.bin testfiles/binuin16.conf binuin16.h5) + ADD_H5_DUMPTEST (BINARY_UI16 "/int/buin/16-bit" binuin16.h5 BINARY) + + # ----- TESTING "BINARY UI32 - rank 3 - Output LE " + ADD_H5_TEST (BINARY_UI32 binuin32.bin testfiles/binuin32.conf binuin32.h5) + ADD_H5_DUMPTEST (BINARY_UI32 "/int/buin/32-bit" binuin32.h5 BINARY) + + # ----- TESTING "STR" + ADD_H5_TEST (STR testfiles/txtstr.txt testfiles/txtstr.conf txtstr.h5) + ADD_H5_DUMPTEST (STR "/mytext/data" txtstr.h5) + + # ----- TESTING "BINARY I8 CR LF EOF" + ADD_H5_TEST (BINARY_I8_EOF binin8w.bin testfiles/binin8w.conf binin8w.h5) + ADD_H5_DUMPTEST (BINARY_I8_EOF "/dataset0" binin8w.h5 BINARY) + + # ----- TESTING "ASCII F64 - rank 1 - INPUT-CLASS TEXTFPE " + ADD_H5_TEST (ASCII_F64_R1 testfiles/textpfe64.txt testfiles/textpfe.conf textpfe.h5) + diff --git a/tools/h5jam/CMakeLists.txt b/tools/h5jam/CMakeLists.txt index af9639d..49d1b0c 100644 --- a/tools/h5jam/CMakeLists.txt +++ b/tools/h5jam/CMakeLists.txt @@ -40,12 +40,6 @@ SET (H5_DEP_EXECUTABLES h5unjam ) -############################################################################## -############################################################################## -### T E S T I N G ### -############################################################################## -############################################################################## - IF (BUILD_TESTING) # -------------------------------------------------------------------- # Add the h5jam test executables @@ -60,427 +54,7 @@ IF (BUILD_TESTING) #ADD_TEST (NAME h5jamgentest COMMAND $) ENDIF (HDF5_BUILD_GENERATORS AND NOT BUILD_SHARED_LIBS) - SET (HDF5_REFERENCE_TXT_FILES - u10.txt - u511.txt - u512.txt - u513.txt - h5jam-help.txt - h5unjam-help.txt - h5jam-ub-nohdf5.txt - ) - SET (HDF5_REFERENCE_TEST_FILES - tall.h5 - twithub.h5 - twithub513.h5 - ) - - FILE (MAKE_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles") - FOREACH (h5_file ${HDF5_REFERENCE_TEST_FILES}) - SET (dest "${PROJECT_BINARY_DIR}/testfiles/${h5_file}") - #MESSAGE (STATUS " Copying ${h5_file}") - ADD_CUSTOM_COMMAND ( - TARGET h5jam - POST_BUILD - COMMAND ${CMAKE_COMMAND} - ARGS -E copy_if_different ${HDF5_TOOLS_H5JAM_SOURCE_DIR}/testfiles/${h5_file} ${dest} - ) - ENDFOREACH (h5_file ${HDF5_REFERENCE_TEST_FILES}) - - FOREACH (txt_file ${HDF5_REFERENCE_TXT_FILES}) - SET (dest "${PROJECT_BINARY_DIR}/testfiles/${txt_file}") - #MESSAGE (STATUS " Copying ${txt_file}") - ADD_CUSTOM_COMMAND ( - TARGET h5jam - POST_BUILD - COMMAND ${CMAKE_COMMAND} - ARGS -E copy_if_different ${HDF5_TOOLS_H5JAM_SOURCE_DIR}/testfiles/${txt_file} ${dest} - ) - ENDFOREACH (txt_file ${HDF5_REFERENCE_TXT_FILES}) - -############################################################################## -############################################################################## -### T H E T E S T S M A C R O S ### -############################################################################## -############################################################################## - - # ============================================================ - # TEST_H5JAM_OUTPUT - # For the purpose to verify only output & exitcode from h5jam - # - MACRO (TEST_H5JAM_OUTPUT expectfile resultcode) - # If using memchecker add tests without using scripts - IF (HDF5_ENABLE_USING_MEMCHECKER) - ADD_TEST (NAME H5JAM-${expectfile} COMMAND $ ${ARGN}) - IF (NOT "${resultcode}" STREQUAL "0") - SET_TESTS_PROPERTIES (H5JAM-${expectfile} PROPERTIES WILL_FAIL "true") - ENDIF (NOT "${resultcode}" STREQUAL "0") - ELSE (HDF5_ENABLE_USING_MEMCHECKER) - ADD_TEST ( - NAME H5JAM-${expectfile}-clear-objects - COMMAND ${CMAKE_COMMAND} - -E remove - ${expectfile}.out - ${expectfile}.out.err - ) - ADD_TEST ( - NAME H5JAM-${expectfile} - COMMAND "${CMAKE_COMMAND}" - -D "TEST_PROGRAM=$" - -D "TEST_ARGS:STRING=${ARGN}" - -D "TEST_FOLDER=${PROJECT_BINARY_DIR}" - -D "TEST_OUTPUT=${expectfile}.out" - -D "TEST_EXPECT=${resultcode}" - -D "TEST_REFERENCE=testfiles/${expectfile}.txt" - -P "${HDF5_RESOURCES_DIR}/runTest.cmake" - ) - SET_TESTS_PROPERTIES (H5JAM-${expectfile} PROPERTIES DEPENDS H5JAM-${expectfile}-clear-objects) - ENDIF (HDF5_ENABLE_USING_MEMCHECKER) - ENDMACRO (TEST_H5JAM_OUTPUT) - - # ============================================================ - # TEST_H5UNJAM_OUTPUT - # For the purpose to verify only output & exitcode from h5unjam - # - MACRO (TEST_H5UNJAM_OUTPUT expectfile resultcode) - # If using memchecker add tests without using scripts - IF (HDF5_ENABLE_USING_MEMCHECKER) - ADD_TEST (NAME H5JAM-UNJAM-${expectfile} COMMAND $ ${ARGN}) - IF (NOT "${resultcode}" STREQUAL "0") - SET_TESTS_PROPERTIES (H5JAM-UNJAM-${expectfile} PROPERTIES WILL_FAIL "true") - ENDIF (NOT "${resultcode}" STREQUAL "0") - ELSE (HDF5_ENABLE_USING_MEMCHECKER) - ADD_TEST ( - NAME H5JAM-UNJAM-${expectfile}-clear-objects - COMMAND ${CMAKE_COMMAND} - -E remove - ${expectfile}.out - ${expectfile}.out.err - ) - ADD_TEST ( - NAME H5JAM-UNJAM-${expectfile} - COMMAND "${CMAKE_COMMAND}" - -D "TEST_PROGRAM=$" - -D "TEST_ARGS=${ARGN}" - -D "TEST_FOLDER=${PROJECT_BINARY_DIR}" - -D "TEST_OUTPUT=${expectfile}.out" - -D "TEST_EXPECT=${resultcode}" - -D "TEST_REFERENCE=testfiles/${expectfile}.txt" - -P "${HDF5_RESOURCES_DIR}/runTest.cmake" - ) - SET_TESTS_PROPERTIES (H5JAM-UNJAM-${expectfile} PROPERTIES DEPENDS H5JAM-UNJAM-${expectfile}-clear-objects) - ENDIF (HDF5_ENABLE_USING_MEMCHECKER) - ENDMACRO (TEST_H5UNJAM_OUTPUT) - - MACRO (CHECKFILE testname testdepends expected actual) - # If using memchecker add tests without using scripts - IF (NOT HDF5_ENABLE_USING_MEMCHECKER) - ADD_TEST ( - NAME H5JAM-${testname}-CHECKFILE-clear-objects - COMMAND ${CMAKE_COMMAND} - -E remove - ${actual}.new - ${actual}.new.err - ${actual}.out - ${actual}.out.err - ) - SET_TESTS_PROPERTIES (H5JAM-${testname}-CHECKFILE-clear-objects PROPERTIES DEPENDS ${testdepends}) - ADD_TEST ( - NAME H5JAM-${testname}-CHECKFILE-H5DMP - COMMAND "${CMAKE_COMMAND}" - -D "TEST_PROGRAM=$" - -D "TEST_ARGS:STRING=testfiles/${expected}" - -D "TEST_FOLDER=${PROJECT_BINARY_DIR}" - -D "TEST_OUTPUT=${actual}.new" - -D "TEST_EXPECT=0" - -D "TEST_FILTER=(^(HDF5)[^\n]*)" - -D "TEST_SKIP_COMPARE=TRUE" - -P "${HDF5_RESOURCES_DIR}/runTest.cmake" - ) - SET_TESTS_PROPERTIES (H5JAM-${testname}-CHECKFILE-H5DMP PROPERTIES DEPENDS H5JAM-${testname}-CHECKFILE-clear-objects) - ADD_TEST ( - NAME H5JAM-${testname}-CHECKFILE-H5DMP_CMP - COMMAND "${CMAKE_COMMAND}" - -D "TEST_PROGRAM=$" - -D "TEST_ARGS:STRING=${actual}" - -D "TEST_FOLDER=${PROJECT_BINARY_DIR}" - -D "TEST_OUTPUT=${actual}.out" - -D "TEST_EXPECT=0" - -D "TEST_FILTER=(^(HDF5)[^\n]*)" - -D "TEST_REFERENCE=${actual}.new" - -P "${HDF5_RESOURCES_DIR}/runTest.cmake" - ) - SET_TESTS_PROPERTIES (H5JAM-${testname}-CHECKFILE-H5DMP_CMP PROPERTIES DEPENDS H5JAM-${testname}-CHECKFILE-H5DMP) - ENDIF (NOT HDF5_ENABLE_USING_MEMCHECKER) - ENDMACRO(CHECKFILE testname testdepends expected actual) - - MACRO (UNJAMTEST testname setfile infile ufile chkfile outfile) - IF (NOT HDF5_ENABLE_USING_MEMCHECKER) - ADD_TEST ( - NAME H5JAM-${testname}-UNJAM-SETUP-clear-objects - COMMAND ${CMAKE_COMMAND} -E remove ${infile} - ) - ADD_TEST ( - NAME H5JAM-${testname}-UNJAM-SETUP - COMMAND ${CMAKE_COMMAND} -E copy_if_different ${HDF5_TOOLS_H5JAM_SOURCE_DIR}/testfiles/${setfile} ${PROJECT_BINARY_DIR}/${infile} - ) - SET_TESTS_PROPERTIES (H5JAM-${testname}-UNJAM-SETUP PROPERTIES DEPENDS H5JAM-${testname}-UNJAM-SETUP-clear-objects) - ADD_TEST ( - NAME H5JAM-${testname}-UNJAM-clear-objects - COMMAND ${CMAKE_COMMAND} -E remove ${outfile} - ) - SET_TESTS_PROPERTIES (H5JAM-${testname}-UNJAM-clear-objects PROPERTIES DEPENDS H5JAM-${testname}-UNJAM-SETUP) - IF (NOT "${ufile}" STREQUAL "NONE") - ADD_TEST ( - NAME H5JAM-${testname}-UNJAM_D-clear-objects - COMMAND ${CMAKE_COMMAND} -E remove ${ufile} - ) - SET_TESTS_PROPERTIES (H5JAM-${testname}-UNJAM_D-clear-objects PROPERTIES DEPENDS H5JAM-${testname}-UNJAM-clear-objects) - ADD_TEST (NAME H5JAM-${testname}-UNJAM COMMAND $ -i ${infile} -u ${ufile} -o ${outfile}) - SET_TESTS_PROPERTIES (H5JAM-${testname}-UNJAM PROPERTIES DEPENDS H5JAM-${testname}-UNJAM_D-clear-objects) - SET (compare_test ${ufile}) - ELSE (NOT "${ufile}" STREQUAL "NONE") - IF (NOT "${ARGN}" STREQUAL "--delete") - ADD_TEST ( - NAME H5JAM-${testname}-UNJAM_D-clear-objects - COMMAND ${CMAKE_COMMAND} -E remove ${outfile}.ufile.txt ${outfile}.ufile.txt.err - ) - SET_TESTS_PROPERTIES (H5JAM-${testname}-UNJAM_D-clear-objects PROPERTIES DEPENDS H5JAM-${testname}-UNJAM-clear-objects) - ADD_TEST ( - NAME H5JAM-${testname}-UNJAM - COMMAND "${CMAKE_COMMAND}" - -D "TEST_PROGRAM=$" - -D "TEST_ARGS:STRING=-i;${infile};-o;${outfile}" - -D "TEST_FOLDER=${PROJECT_BINARY_DIR}" - -D "TEST_OUTPUT=${outfile}.ufile.txt" - -D "TEST_EXPECT=0" - -D "TEST_SKIP_COMPARE=TRUE" - -P "${HDF5_RESOURCES_DIR}/runTest.cmake" - ) - SET_TESTS_PROPERTIES (H5JAM-${testname}-UNJAM PROPERTIES DEPENDS H5JAM-${testname}-UNJAM_D-clear-objects) - SET (compare_test "${outfile}.ufile.txt") - ELSE (NOT "${ARGN}" STREQUAL "--delete") - ADD_TEST (NAME H5JAM-${testname}-UNJAM COMMAND $ -i ${infile} -o ${outfile}) - SET_TESTS_PROPERTIES (H5JAM-${testname}-UNJAM PROPERTIES DEPENDS H5JAM-${testname}-UNJAM-clear-objects) - SET (compare_test "") - ENDIF (NOT "${ARGN}" STREQUAL "--delete") - ENDIF (NOT "${ufile}" STREQUAL "NONE") - IF (NOT "${compare_test}" STREQUAL "") - ADD_TEST ( - NAME H5JAM-${testname}-UNJAM-CHECK_UB_1-clear-objects - COMMAND ${CMAKE_COMMAND} - -E remove - ${infile}.len.txt - ${infile}.cmp - ${infile}-ub.cmp - ) - SET_TESTS_PROPERTIES (H5JAM-${testname}-UNJAM-CHECK_UB_1-clear-objects PROPERTIES DEPENDS "H5JAM-${testname}-UNJAM") - ADD_TEST ( - NAME H5JAM-${testname}-UNJAM-CHECK_UB_1 - COMMAND "${CMAKE_COMMAND}" - -D "TEST_PROGRAM=$" - -D "TEST_GET_PROGRAM=$" - -D "TEST_CHECKUB=YES" - -D "TEST_FOLDER=${PROJECT_BINARY_DIR}" - -D "TEST_HFILE=${infile}" - -D "TEST_UFILE=${compare_test}" - -D "TEST_EXPECT=0" - -D "TEST_OFILE=" - -P "${HDF5_RESOURCES_DIR}/userblockTest.cmake" - ) - SET_TESTS_PROPERTIES (H5JAM-${testname}-UNJAM-CHECK_UB_1 PROPERTIES DEPENDS H5JAM-${testname}-UNJAM-CHECK_UB_1-clear-objects) - ENDIF (NOT "${compare_test}" STREQUAL "") - - ADD_TEST ( - NAME H5JAM-${testname}-UNJAM-CHECK_NOUB - COMMAND "${CMAKE_COMMAND}" - -D "TEST_PROGRAM=$" - -D "TEST_GET_PROGRAM=$" - -D "TEST_CHECKUB=NO" - -D "TEST_FOLDER=${PROJECT_BINARY_DIR}" - -D "TEST_HFILE=${outfile}" - -D "TEST_EXPECT=0" - -D "TEST_UFILE=NULL" - -D "TEST_OFILE=NULL" - -P "${HDF5_RESOURCES_DIR}/userblockTest.cmake" - ) - IF (NOT "${compare_test}" STREQUAL "") - SET_TESTS_PROPERTIES (H5JAM-${testname}-UNJAM-CHECK_NOUB PROPERTIES DEPENDS H5JAM-${testname}-UNJAM-CHECK_UB_1) - ELSE (NOT "${compare_test}" STREQUAL "") - SET_TESTS_PROPERTIES (H5JAM-${testname}-UNJAM-CHECK_NOUB PROPERTIES DEPENDS H5JAM-${testname}-UNJAM) - ENDIF (NOT "${compare_test}" STREQUAL "") - - CHECKFILE (${testname} "H5JAM-${testname}-UNJAM-CHECK_NOUB" ${chkfile} ${outfile}) - ENDIF (NOT HDF5_ENABLE_USING_MEMCHECKER) - ENDMACRO(UNJAMTEST testname infile ufile outfile) - - MACRO (JAMTEST testname jamfile infile chkfile outfile) - IF (NOT HDF5_ENABLE_USING_MEMCHECKER) - ADD_TEST ( - NAME H5JAM-${testname}-clear-objects - COMMAND ${CMAKE_COMMAND} -E remove ${outfile} ${infile}.cpy.h5 - ) - ENDIF (NOT HDF5_ENABLE_USING_MEMCHECKER) - ADD_TEST (NAME H5JAM-${testname} COMMAND $ -u testfiles/${jamfile} -i testfiles/${infile} -o ${outfile} ${ARGN}) - IF (NOT HDF5_ENABLE_USING_MEMCHECKER) - SET_TESTS_PROPERTIES (H5JAM-${testname} PROPERTIES DEPENDS H5JAM-${testname}-clear-objects) - SET (compare_test ${outfile}) - SET (compare_orig testfiles/${infile}) - IF ("${ARGN}" STREQUAL "--clobber") - SET (compare_orig "") - ENDIF ("${ARGN}" STREQUAL "--clobber") - - ADD_TEST ( - NAME H5JAM-${testname}-CHECK_UB_1-clear-objects - COMMAND ${CMAKE_COMMAND} - -E remove - ${compare_test}.len.txt - ${compare_test}.cmp - ${compare_test}-ub.cmp - ) - SET_TESTS_PROPERTIES (H5JAM-${testname}-CHECK_UB_1-clear-objects PROPERTIES DEPENDS "H5JAM-${testname}") - ADD_TEST ( - NAME H5JAM-${testname}-CHECK_UB_1 - COMMAND "${CMAKE_COMMAND}" - -D "TEST_PROGRAM=$" - -D "TEST_GET_PROGRAM=$" - -D "TEST_CHECKUB=YES" - -D "TEST_FOLDER=${PROJECT_BINARY_DIR}" - -D "TEST_HFILE=${compare_test}" - -D "TEST_UFILE=testfiles/${jamfile}" - -D "TEST_EXPECT=0" - -D "TEST_OFILE=${compare_orig}" - -P "${HDF5_RESOURCES_DIR}/userblockTest.cmake" - ) - SET_TESTS_PROPERTIES (H5JAM-${testname}-CHECK_UB_1 PROPERTIES DEPENDS H5JAM-${testname}-CHECK_UB_1-clear-objects) - CHECKFILE (${testname} "H5JAM-${testname}-CHECK_UB_1" ${chkfile} ${outfile}) - ENDIF (NOT HDF5_ENABLE_USING_MEMCHECKER) - ENDMACRO (JAMTEST testname jamfile infile outfile) - - MACRO (JAMTEST_NONE testname jamfile infile setfile chkfile) - IF (NOT HDF5_ENABLE_USING_MEMCHECKER) - ADD_TEST ( - NAME H5JAM-${testname}_NONE-clear-objects - COMMAND ${CMAKE_COMMAND} -E remove - ${chkfile} ${chkfile}.cpy.h5 - ) - ADD_TEST ( - NAME H5JAM-${testname}_NONE-SETUP - COMMAND ${CMAKE_COMMAND} -E copy_if_different testfiles/${setfile} ${chkfile} - ) - SET_TESTS_PROPERTIES (H5JAM-${testname}_NONE-SETUP PROPERTIES DEPENDS H5JAM-${testname}_NONE-clear-objects) - - ADD_TEST ( - NAME H5JAM-${testname}_NONE_COPY - COMMAND ${CMAKE_COMMAND} -E copy_if_different ${chkfile} ${chkfile}.cpy.h5 - ) - SET_TESTS_PROPERTIES (H5JAM-${testname}_NONE_COPY PROPERTIES DEPENDS H5JAM-${testname}_NONE-SETUP) - - ADD_TEST (NAME H5JAM-${testname}_NONE COMMAND $ -u testfiles/${jamfile} -i ${chkfile} ${ARGN}) - SET_TESTS_PROPERTIES (H5JAM-${testname}_NONE PROPERTIES DEPENDS H5JAM-${testname}_NONE_COPY) - - SET (compare_test ${chkfile}) - SET (compare_orig ${chkfile}.cpy.h5) - IF ("${ARGN}" STREQUAL "--clobber") - SET (compare_orig "") - ENDIF ("${ARGN}" STREQUAL "--clobber") - - ADD_TEST ( - NAME H5JAM-${testname}_NONE-CHECK_UB_1-clear-objects - COMMAND ${CMAKE_COMMAND} - -E remove - ${compare_test}.len.txt - ${compare_test}.cmp - ${compare_test}-ub.cmp - ) - SET_TESTS_PROPERTIES (H5JAM-${testname}_NONE-CHECK_UB_1-clear-objects PROPERTIES DEPENDS "H5JAM-${testname}_NONE") - ADD_TEST ( - NAME H5JAM-${testname}_NONE-CHECK_UB_1 - COMMAND "${CMAKE_COMMAND}" - -D "TEST_PROGRAM=$" - -D "TEST_GET_PROGRAM=$" - -D "TEST_CHECKUB=YES" - -D "TEST_FOLDER=${PROJECT_BINARY_DIR}" - -D "TEST_HFILE=${compare_test}" - -D "TEST_UFILE=testfiles/${jamfile}" - -D "TEST_EXPECT=0" - -D "TEST_OFILE=${compare_orig}" - -P "${HDF5_RESOURCES_DIR}/userblockTest.cmake" - ) - SET_TESTS_PROPERTIES (H5JAM-${testname}_NONE-CHECK_UB_1 PROPERTIES DEPENDS H5JAM-${testname}_NONE-CHECK_UB_1-clear-objects) - CHECKFILE (${testname} "H5JAM-${testname}_NONE-CHECK_UB_1" ${infile} ${chkfile}) - ENDIF (NOT HDF5_ENABLE_USING_MEMCHECKER) - ENDMACRO (JAMTEST_NONE testname jamfile infile setfile chkfile) - -############################################################################## -############################################################################## -### T H E T E S T S ### -############################################################################## -############################################################################## - -#------------------------------- -# Testing h5jam -#------------------------------- - # help page - TEST_H5JAM_OUTPUT(h5jam-help 0 -h) - - # don't allow HDF5 format file as an user block file - TEST_H5JAM_OUTPUT(h5jam-ub-nohdf5 1 -i testfiles/tall.h5 -u testfiles/tall.h5 -o tall-tmp.h5) - - JAMTEST (tall_u10 u10.txt tall.h5 tall.h5 ta2.h5) - JAMTEST (tall_u511 u511.txt tall.h5 tall.h5 ta3.h5) - JAMTEST (tall_u512 u512.txt tall.h5 tall.h5 ta4.h5) - JAMTEST (tall_u513 u513.txt tall.h5 tall.h5 ta5.h5) - - JAMTEST_NONE (N_ta_u10 u10.txt tall.h5 tall.h5 ta6.h5) - JAMTEST_NONE (N_ta_u511 u511.txt tall.h5 tall.h5 ta7.h5) - JAMTEST_NONE (N_ta_u512 u512.txt tall.h5 tall.h5 ta8.h5) - JAMTEST_NONE (N_ta_u513 u513.txt tall.h5 tall.h5 ta9.h5) - - JAMTEST (twithub_u10 u10.txt twithub.h5 tall.h5 tax2.h5) - JAMTEST (twithub_u511 u511.txt twithub.h5 tall.h5 tax3.h5) - JAMTEST (twithub_u512 u512.txt twithub.h5 tall.h5 tax4.h5) - JAMTEST (twithub_u513 u513.txt twithub.h5 tall.h5 tax5.h5) - - JAMTEST (twithub513_u10 u10.txt twithub513.h5 tall.h5 tax6.h5) - JAMTEST (twithub513_u511 u511.txt twithub513.h5 tall.h5 tax7.h5) - JAMTEST (twithub513_u512 u512.txt twithub513.h5 tall.h5 tax8.h5) - JAMTEST (twithub513_u513 u513.txt twithub513.h5 tall.h5 tax9.h5) - - JAMTEST (twithub_u10_c u10.txt twithub.h5 tall.h5 taz2.h5 --clobber) - JAMTEST (twithub_u511_c u511.txt twithub.h5 tall.h5 taz3.h5 --clobber) - JAMTEST (twithub_u512_c u512.txt twithub.h5 tall.h5 taz4.h5 --clobber) - JAMTEST (twithub_u513_c u513.txt twithub.h5 tall.h5 taz5.h5 --clobber) - - JAMTEST (twithub513_u10_c u10.txt twithub513.h5 tall.h5 taz6.h5 --clobber) - JAMTEST (twithub513_u511_c u511.txt twithub513.h5 tall.h5 taz7.h5 --clobber) - JAMTEST (twithub513_u512_c u512.txt twithub513.h5 tall.h5 taz8.h5 --clobber) - JAMTEST (twithub513_u513_c u513.txt twithub513.h5 tall.h5 taz9.h5 --clobber) - - JAMTEST_NONE (N_twithub_u10_c u10.txt tall.h5 twithub.h5 tay2.h5 --clobber) - JAMTEST_NONE (N_twithub_u511_c u511.txt tall.h5 twithub.h5 tay3.h5 --clobber) - JAMTEST_NONE (N_twithub_u512_c u512.txt tall.h5 twithub.h5 tay4.h5 --clobber) - JAMTEST_NONE (N_twithub_u513_c u513.txt tall.h5 twithub.h5 tay5.h5 --clobber) - - JAMTEST_NONE (N_twithub513_u10_c u10.txt tall.h5 twithub513.h5 tay6.h5 --clobber) - JAMTEST_NONE (N_twithub513_u511_c u511.txt tall.h5 twithub513.h5 tay7.h5 --clobber) - JAMTEST_NONE (N_twithub513_u512_c u512.txt tall.h5 twithub513.h5 tay8.h5 --clobber) - JAMTEST_NONE (N_twithub513_u513_c u513.txt tall.h5 twithub513.h5 tay9.h5 --clobber) - -#------------------------------- -# Testing h5unjam -#------------------------------- - # help page - TEST_H5UNJAM_OUTPUT(h5unjam-help 0 -h) - - UNJAMTEST (twithub_tall twithub.h5 tai1.h5 o10.txt tall.h5 taa1.h5) - UNJAMTEST (twithub513_tall twithub513.h5 tai2.h5 o512.txt tall.h5 taa2.h5) - - UNJAMTEST (N_twithub_tall twithub.h5 tai3.h5 NONE tall.h5 taa3.h5) - UNJAMTEST (N_twithub513_tall twithub513.h5 tai4.h5 NONE tall.h5 taa4.h5) - - UNJAMTEST (D_twithub_tall twithub.h5 taj2.h5 NONE tall.h5 tac2.h5 --delete) - UNJAMTEST (D_twithub513_tall twithub513.h5 taj3.h5 NONE tall.h5 tac3.h5 --delete) + INCLUDE (CMakeTests.cmake) ENDIF (BUILD_TESTING) diff --git a/tools/h5jam/CMakeTests.cmake b/tools/h5jam/CMakeTests.cmake new file mode 100644 index 0000000..3816e85 --- /dev/null +++ b/tools/h5jam/CMakeTests.cmake @@ -0,0 +1,428 @@ + +############################################################################## +############################################################################## +### T E S T I N G ### +############################################################################## +############################################################################## + + SET (HDF5_REFERENCE_TXT_FILES + u10.txt + u511.txt + u512.txt + u513.txt + h5jam-help.txt + h5unjam-help.txt + h5jam-ub-nohdf5.txt + ) + SET (HDF5_REFERENCE_TEST_FILES + tall.h5 + twithub.h5 + twithub513.h5 + ) + + FILE (MAKE_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles") + FOREACH (h5_file ${HDF5_REFERENCE_TEST_FILES}) + SET (dest "${PROJECT_BINARY_DIR}/testfiles/${h5_file}") + #MESSAGE (STATUS " Copying ${h5_file}") + ADD_CUSTOM_COMMAND ( + TARGET h5jam + POST_BUILD + COMMAND ${CMAKE_COMMAND} + ARGS -E copy_if_different ${HDF5_TOOLS_H5JAM_SOURCE_DIR}/testfiles/${h5_file} ${dest} + ) + ENDFOREACH (h5_file ${HDF5_REFERENCE_TEST_FILES}) + + FOREACH (txt_file ${HDF5_REFERENCE_TXT_FILES}) + SET (dest "${PROJECT_BINARY_DIR}/testfiles/${txt_file}") + #MESSAGE (STATUS " Copying ${txt_file}") + ADD_CUSTOM_COMMAND ( + TARGET h5jam + POST_BUILD + COMMAND ${CMAKE_COMMAND} + ARGS -E copy_if_different ${HDF5_TOOLS_H5JAM_SOURCE_DIR}/testfiles/${txt_file} ${dest} + ) + ENDFOREACH (txt_file ${HDF5_REFERENCE_TXT_FILES}) + +############################################################################## +############################################################################## +### T H E T E S T S M A C R O S ### +############################################################################## +############################################################################## + + # ============================================================ + # TEST_H5JAM_OUTPUT + # For the purpose to verify only output & exitcode from h5jam + # + MACRO (TEST_H5JAM_OUTPUT expectfile resultcode) + # If using memchecker add tests without using scripts + IF (HDF5_ENABLE_USING_MEMCHECKER) + ADD_TEST (NAME H5JAM-${expectfile} COMMAND $ ${ARGN}) + IF (NOT "${resultcode}" STREQUAL "0") + SET_TESTS_PROPERTIES (H5JAM-${expectfile} PROPERTIES WILL_FAIL "true") + ENDIF (NOT "${resultcode}" STREQUAL "0") + ELSE (HDF5_ENABLE_USING_MEMCHECKER) + ADD_TEST ( + NAME H5JAM-${expectfile}-clear-objects + COMMAND ${CMAKE_COMMAND} + -E remove + ${expectfile}.out + ${expectfile}.out.err + ) + ADD_TEST ( + NAME H5JAM-${expectfile} + COMMAND "${CMAKE_COMMAND}" + -D "TEST_PROGRAM=$" + -D "TEST_ARGS:STRING=${ARGN}" + -D "TEST_FOLDER=${PROJECT_BINARY_DIR}" + -D "TEST_OUTPUT=${expectfile}.out" + -D "TEST_EXPECT=${resultcode}" + -D "TEST_REFERENCE=testfiles/${expectfile}.txt" + -P "${HDF5_RESOURCES_DIR}/runTest.cmake" + ) + SET_TESTS_PROPERTIES (H5JAM-${expectfile} PROPERTIES DEPENDS H5JAM-${expectfile}-clear-objects) + ENDIF (HDF5_ENABLE_USING_MEMCHECKER) + ENDMACRO (TEST_H5JAM_OUTPUT) + + # ============================================================ + # TEST_H5UNJAM_OUTPUT + # For the purpose to verify only output & exitcode from h5unjam + # + MACRO (TEST_H5UNJAM_OUTPUT expectfile resultcode) + # If using memchecker add tests without using scripts + IF (HDF5_ENABLE_USING_MEMCHECKER) + ADD_TEST (NAME H5JAM-UNJAM-${expectfile} COMMAND $ ${ARGN}) + IF (NOT "${resultcode}" STREQUAL "0") + SET_TESTS_PROPERTIES (H5JAM-UNJAM-${expectfile} PROPERTIES WILL_FAIL "true") + ENDIF (NOT "${resultcode}" STREQUAL "0") + ELSE (HDF5_ENABLE_USING_MEMCHECKER) + ADD_TEST ( + NAME H5JAM-UNJAM-${expectfile}-clear-objects + COMMAND ${CMAKE_COMMAND} + -E remove + ${expectfile}.out + ${expectfile}.out.err + ) + ADD_TEST ( + NAME H5JAM-UNJAM-${expectfile} + COMMAND "${CMAKE_COMMAND}" + -D "TEST_PROGRAM=$" + -D "TEST_ARGS=${ARGN}" + -D "TEST_FOLDER=${PROJECT_BINARY_DIR}" + -D "TEST_OUTPUT=${expectfile}.out" + -D "TEST_EXPECT=${resultcode}" + -D "TEST_REFERENCE=testfiles/${expectfile}.txt" + -P "${HDF5_RESOURCES_DIR}/runTest.cmake" + ) + SET_TESTS_PROPERTIES (H5JAM-UNJAM-${expectfile} PROPERTIES DEPENDS H5JAM-UNJAM-${expectfile}-clear-objects) + ENDIF (HDF5_ENABLE_USING_MEMCHECKER) + ENDMACRO (TEST_H5UNJAM_OUTPUT) + + MACRO (CHECKFILE testname testdepends expected actual) + # If using memchecker add tests without using scripts + IF (NOT HDF5_ENABLE_USING_MEMCHECKER) + ADD_TEST ( + NAME H5JAM-${testname}-CHECKFILE-clear-objects + COMMAND ${CMAKE_COMMAND} + -E remove + ${actual}.new + ${actual}.new.err + ${actual}.out + ${actual}.out.err + ) + SET_TESTS_PROPERTIES (H5JAM-${testname}-CHECKFILE-clear-objects PROPERTIES DEPENDS ${testdepends}) + ADD_TEST ( + NAME H5JAM-${testname}-CHECKFILE-H5DMP + COMMAND "${CMAKE_COMMAND}" + -D "TEST_PROGRAM=$" + -D "TEST_ARGS:STRING=testfiles/${expected}" + -D "TEST_FOLDER=${PROJECT_BINARY_DIR}" + -D "TEST_OUTPUT=${actual}.new" + -D "TEST_EXPECT=0" + -D "TEST_FILTER=(^(HDF5)[^\n]*)" + -D "TEST_SKIP_COMPARE=TRUE" + -P "${HDF5_RESOURCES_DIR}/runTest.cmake" + ) + SET_TESTS_PROPERTIES (H5JAM-${testname}-CHECKFILE-H5DMP PROPERTIES DEPENDS H5JAM-${testname}-CHECKFILE-clear-objects) + ADD_TEST ( + NAME H5JAM-${testname}-CHECKFILE-H5DMP_CMP + COMMAND "${CMAKE_COMMAND}" + -D "TEST_PROGRAM=$" + -D "TEST_ARGS:STRING=${actual}" + -D "TEST_FOLDER=${PROJECT_BINARY_DIR}" + -D "TEST_OUTPUT=${actual}.out" + -D "TEST_EXPECT=0" + -D "TEST_FILTER=(^(HDF5)[^\n]*)" + -D "TEST_REFERENCE=${actual}.new" + -P "${HDF5_RESOURCES_DIR}/runTest.cmake" + ) + SET_TESTS_PROPERTIES (H5JAM-${testname}-CHECKFILE-H5DMP_CMP PROPERTIES DEPENDS H5JAM-${testname}-CHECKFILE-H5DMP) + ENDIF (NOT HDF5_ENABLE_USING_MEMCHECKER) + ENDMACRO(CHECKFILE testname testdepends expected actual) + + MACRO (UNJAMTEST testname setfile infile ufile chkfile outfile) + IF (NOT HDF5_ENABLE_USING_MEMCHECKER) + ADD_TEST ( + NAME H5JAM-${testname}-UNJAM-SETUP-clear-objects + COMMAND ${CMAKE_COMMAND} -E remove ${infile} + ) + ADD_TEST ( + NAME H5JAM-${testname}-UNJAM-SETUP + COMMAND ${CMAKE_COMMAND} -E copy_if_different ${HDF5_TOOLS_H5JAM_SOURCE_DIR}/testfiles/${setfile} ${PROJECT_BINARY_DIR}/${infile} + ) + SET_TESTS_PROPERTIES (H5JAM-${testname}-UNJAM-SETUP PROPERTIES DEPENDS H5JAM-${testname}-UNJAM-SETUP-clear-objects) + ADD_TEST ( + NAME H5JAM-${testname}-UNJAM-clear-objects + COMMAND ${CMAKE_COMMAND} -E remove ${outfile} + ) + SET_TESTS_PROPERTIES (H5JAM-${testname}-UNJAM-clear-objects PROPERTIES DEPENDS H5JAM-${testname}-UNJAM-SETUP) + IF (NOT "${ufile}" STREQUAL "NONE") + ADD_TEST ( + NAME H5JAM-${testname}-UNJAM_D-clear-objects + COMMAND ${CMAKE_COMMAND} -E remove ${ufile} + ) + SET_TESTS_PROPERTIES (H5JAM-${testname}-UNJAM_D-clear-objects PROPERTIES DEPENDS H5JAM-${testname}-UNJAM-clear-objects) + ADD_TEST (NAME H5JAM-${testname}-UNJAM COMMAND $ -i ${infile} -u ${ufile} -o ${outfile}) + SET_TESTS_PROPERTIES (H5JAM-${testname}-UNJAM PROPERTIES DEPENDS H5JAM-${testname}-UNJAM_D-clear-objects) + SET (compare_test ${ufile}) + ELSE (NOT "${ufile}" STREQUAL "NONE") + IF (NOT "${ARGN}" STREQUAL "--delete") + ADD_TEST ( + NAME H5JAM-${testname}-UNJAM_D-clear-objects + COMMAND ${CMAKE_COMMAND} -E remove ${outfile}.ufile.txt ${outfile}.ufile.txt.err + ) + SET_TESTS_PROPERTIES (H5JAM-${testname}-UNJAM_D-clear-objects PROPERTIES DEPENDS H5JAM-${testname}-UNJAM-clear-objects) + ADD_TEST ( + NAME H5JAM-${testname}-UNJAM + COMMAND "${CMAKE_COMMAND}" + -D "TEST_PROGRAM=$" + -D "TEST_ARGS:STRING=-i;${infile};-o;${outfile}" + -D "TEST_FOLDER=${PROJECT_BINARY_DIR}" + -D "TEST_OUTPUT=${outfile}.ufile.txt" + -D "TEST_EXPECT=0" + -D "TEST_SKIP_COMPARE=TRUE" + -P "${HDF5_RESOURCES_DIR}/runTest.cmake" + ) + SET_TESTS_PROPERTIES (H5JAM-${testname}-UNJAM PROPERTIES DEPENDS H5JAM-${testname}-UNJAM_D-clear-objects) + SET (compare_test "${outfile}.ufile.txt") + ELSE (NOT "${ARGN}" STREQUAL "--delete") + ADD_TEST (NAME H5JAM-${testname}-UNJAM COMMAND $ -i ${infile} -o ${outfile}) + SET_TESTS_PROPERTIES (H5JAM-${testname}-UNJAM PROPERTIES DEPENDS H5JAM-${testname}-UNJAM-clear-objects) + SET (compare_test "") + ENDIF (NOT "${ARGN}" STREQUAL "--delete") + ENDIF (NOT "${ufile}" STREQUAL "NONE") + IF (NOT "${compare_test}" STREQUAL "") + ADD_TEST ( + NAME H5JAM-${testname}-UNJAM-CHECK_UB_1-clear-objects + COMMAND ${CMAKE_COMMAND} + -E remove + ${infile}.len.txt + ${infile}.cmp + ${infile}-ub.cmp + ) + SET_TESTS_PROPERTIES (H5JAM-${testname}-UNJAM-CHECK_UB_1-clear-objects PROPERTIES DEPENDS "H5JAM-${testname}-UNJAM") + ADD_TEST ( + NAME H5JAM-${testname}-UNJAM-CHECK_UB_1 + COMMAND "${CMAKE_COMMAND}" + -D "TEST_PROGRAM=$" + -D "TEST_GET_PROGRAM=$" + -D "TEST_CHECKUB=YES" + -D "TEST_FOLDER=${PROJECT_BINARY_DIR}" + -D "TEST_HFILE=${infile}" + -D "TEST_UFILE=${compare_test}" + -D "TEST_EXPECT=0" + -D "TEST_OFILE=" + -P "${HDF5_RESOURCES_DIR}/userblockTest.cmake" + ) + SET_TESTS_PROPERTIES (H5JAM-${testname}-UNJAM-CHECK_UB_1 PROPERTIES DEPENDS H5JAM-${testname}-UNJAM-CHECK_UB_1-clear-objects) + ENDIF (NOT "${compare_test}" STREQUAL "") + + ADD_TEST ( + NAME H5JAM-${testname}-UNJAM-CHECK_NOUB + COMMAND "${CMAKE_COMMAND}" + -D "TEST_PROGRAM=$" + -D "TEST_GET_PROGRAM=$" + -D "TEST_CHECKUB=NO" + -D "TEST_FOLDER=${PROJECT_BINARY_DIR}" + -D "TEST_HFILE=${outfile}" + -D "TEST_EXPECT=0" + -D "TEST_UFILE=NULL" + -D "TEST_OFILE=NULL" + -P "${HDF5_RESOURCES_DIR}/userblockTest.cmake" + ) + IF (NOT "${compare_test}" STREQUAL "") + SET_TESTS_PROPERTIES (H5JAM-${testname}-UNJAM-CHECK_NOUB PROPERTIES DEPENDS H5JAM-${testname}-UNJAM-CHECK_UB_1) + ELSE (NOT "${compare_test}" STREQUAL "") + SET_TESTS_PROPERTIES (H5JAM-${testname}-UNJAM-CHECK_NOUB PROPERTIES DEPENDS H5JAM-${testname}-UNJAM) + ENDIF (NOT "${compare_test}" STREQUAL "") + + CHECKFILE (${testname} "H5JAM-${testname}-UNJAM-CHECK_NOUB" ${chkfile} ${outfile}) + ENDIF (NOT HDF5_ENABLE_USING_MEMCHECKER) + ENDMACRO(UNJAMTEST testname infile ufile outfile) + + MACRO (JAMTEST testname jamfile infile chkfile outfile) + IF (NOT HDF5_ENABLE_USING_MEMCHECKER) + ADD_TEST ( + NAME H5JAM-${testname}-clear-objects + COMMAND ${CMAKE_COMMAND} -E remove ${outfile} ${infile}.cpy.h5 + ) + ENDIF (NOT HDF5_ENABLE_USING_MEMCHECKER) + ADD_TEST (NAME H5JAM-${testname} COMMAND $ -u testfiles/${jamfile} -i testfiles/${infile} -o ${outfile} ${ARGN}) + IF (NOT HDF5_ENABLE_USING_MEMCHECKER) + SET_TESTS_PROPERTIES (H5JAM-${testname} PROPERTIES DEPENDS H5JAM-${testname}-clear-objects) + SET (compare_test ${outfile}) + SET (compare_orig testfiles/${infile}) + IF ("${ARGN}" STREQUAL "--clobber") + SET (compare_orig "") + ENDIF ("${ARGN}" STREQUAL "--clobber") + + ADD_TEST ( + NAME H5JAM-${testname}-CHECK_UB_1-clear-objects + COMMAND ${CMAKE_COMMAND} + -E remove + ${compare_test}.len.txt + ${compare_test}.cmp + ${compare_test}-ub.cmp + ) + SET_TESTS_PROPERTIES (H5JAM-${testname}-CHECK_UB_1-clear-objects PROPERTIES DEPENDS "H5JAM-${testname}") + ADD_TEST ( + NAME H5JAM-${testname}-CHECK_UB_1 + COMMAND "${CMAKE_COMMAND}" + -D "TEST_PROGRAM=$" + -D "TEST_GET_PROGRAM=$" + -D "TEST_CHECKUB=YES" + -D "TEST_FOLDER=${PROJECT_BINARY_DIR}" + -D "TEST_HFILE=${compare_test}" + -D "TEST_UFILE=testfiles/${jamfile}" + -D "TEST_EXPECT=0" + -D "TEST_OFILE=${compare_orig}" + -P "${HDF5_RESOURCES_DIR}/userblockTest.cmake" + ) + SET_TESTS_PROPERTIES (H5JAM-${testname}-CHECK_UB_1 PROPERTIES DEPENDS H5JAM-${testname}-CHECK_UB_1-clear-objects) + CHECKFILE (${testname} "H5JAM-${testname}-CHECK_UB_1" ${chkfile} ${outfile}) + ENDIF (NOT HDF5_ENABLE_USING_MEMCHECKER) + ENDMACRO (JAMTEST testname jamfile infile outfile) + + MACRO (JAMTEST_NONE testname jamfile infile setfile chkfile) + IF (NOT HDF5_ENABLE_USING_MEMCHECKER) + ADD_TEST ( + NAME H5JAM-${testname}_NONE-clear-objects + COMMAND ${CMAKE_COMMAND} -E remove + ${chkfile} ${chkfile}.cpy.h5 + ) + ADD_TEST ( + NAME H5JAM-${testname}_NONE-SETUP + COMMAND ${CMAKE_COMMAND} -E copy_if_different testfiles/${setfile} ${chkfile} + ) + SET_TESTS_PROPERTIES (H5JAM-${testname}_NONE-SETUP PROPERTIES DEPENDS H5JAM-${testname}_NONE-clear-objects) + + ADD_TEST ( + NAME H5JAM-${testname}_NONE_COPY + COMMAND ${CMAKE_COMMAND} -E copy_if_different ${chkfile} ${chkfile}.cpy.h5 + ) + SET_TESTS_PROPERTIES (H5JAM-${testname}_NONE_COPY PROPERTIES DEPENDS H5JAM-${testname}_NONE-SETUP) + + ADD_TEST (NAME H5JAM-${testname}_NONE COMMAND $ -u testfiles/${jamfile} -i ${chkfile} ${ARGN}) + SET_TESTS_PROPERTIES (H5JAM-${testname}_NONE PROPERTIES DEPENDS H5JAM-${testname}_NONE_COPY) + + SET (compare_test ${chkfile}) + SET (compare_orig ${chkfile}.cpy.h5) + IF ("${ARGN}" STREQUAL "--clobber") + SET (compare_orig "") + ENDIF ("${ARGN}" STREQUAL "--clobber") + + ADD_TEST ( + NAME H5JAM-${testname}_NONE-CHECK_UB_1-clear-objects + COMMAND ${CMAKE_COMMAND} + -E remove + ${compare_test}.len.txt + ${compare_test}.cmp + ${compare_test}-ub.cmp + ) + SET_TESTS_PROPERTIES (H5JAM-${testname}_NONE-CHECK_UB_1-clear-objects PROPERTIES DEPENDS "H5JAM-${testname}_NONE") + ADD_TEST ( + NAME H5JAM-${testname}_NONE-CHECK_UB_1 + COMMAND "${CMAKE_COMMAND}" + -D "TEST_PROGRAM=$" + -D "TEST_GET_PROGRAM=$" + -D "TEST_CHECKUB=YES" + -D "TEST_FOLDER=${PROJECT_BINARY_DIR}" + -D "TEST_HFILE=${compare_test}" + -D "TEST_UFILE=testfiles/${jamfile}" + -D "TEST_EXPECT=0" + -D "TEST_OFILE=${compare_orig}" + -P "${HDF5_RESOURCES_DIR}/userblockTest.cmake" + ) + SET_TESTS_PROPERTIES (H5JAM-${testname}_NONE-CHECK_UB_1 PROPERTIES DEPENDS H5JAM-${testname}_NONE-CHECK_UB_1-clear-objects) + CHECKFILE (${testname} "H5JAM-${testname}_NONE-CHECK_UB_1" ${infile} ${chkfile}) + ENDIF (NOT HDF5_ENABLE_USING_MEMCHECKER) + ENDMACRO (JAMTEST_NONE testname jamfile infile setfile chkfile) + +############################################################################## +############################################################################## +### T H E T E S T S ### +############################################################################## +############################################################################## + +#------------------------------- +# Testing h5jam +#------------------------------- + # help page + TEST_H5JAM_OUTPUT(h5jam-help 0 -h) + + # don't allow HDF5 format file as an user block file + TEST_H5JAM_OUTPUT(h5jam-ub-nohdf5 1 -i testfiles/tall.h5 -u testfiles/tall.h5 -o tall-tmp.h5) + + JAMTEST (tall_u10 u10.txt tall.h5 tall.h5 ta2.h5) + JAMTEST (tall_u511 u511.txt tall.h5 tall.h5 ta3.h5) + JAMTEST (tall_u512 u512.txt tall.h5 tall.h5 ta4.h5) + JAMTEST (tall_u513 u513.txt tall.h5 tall.h5 ta5.h5) + + JAMTEST_NONE (N_ta_u10 u10.txt tall.h5 tall.h5 ta6.h5) + JAMTEST_NONE (N_ta_u511 u511.txt tall.h5 tall.h5 ta7.h5) + JAMTEST_NONE (N_ta_u512 u512.txt tall.h5 tall.h5 ta8.h5) + JAMTEST_NONE (N_ta_u513 u513.txt tall.h5 tall.h5 ta9.h5) + + JAMTEST (twithub_u10 u10.txt twithub.h5 tall.h5 tax2.h5) + JAMTEST (twithub_u511 u511.txt twithub.h5 tall.h5 tax3.h5) + JAMTEST (twithub_u512 u512.txt twithub.h5 tall.h5 tax4.h5) + JAMTEST (twithub_u513 u513.txt twithub.h5 tall.h5 tax5.h5) + + JAMTEST (twithub513_u10 u10.txt twithub513.h5 tall.h5 tax6.h5) + JAMTEST (twithub513_u511 u511.txt twithub513.h5 tall.h5 tax7.h5) + JAMTEST (twithub513_u512 u512.txt twithub513.h5 tall.h5 tax8.h5) + JAMTEST (twithub513_u513 u513.txt twithub513.h5 tall.h5 tax9.h5) + + JAMTEST (twithub_u10_c u10.txt twithub.h5 tall.h5 taz2.h5 --clobber) + JAMTEST (twithub_u511_c u511.txt twithub.h5 tall.h5 taz3.h5 --clobber) + JAMTEST (twithub_u512_c u512.txt twithub.h5 tall.h5 taz4.h5 --clobber) + JAMTEST (twithub_u513_c u513.txt twithub.h5 tall.h5 taz5.h5 --clobber) + + JAMTEST (twithub513_u10_c u10.txt twithub513.h5 tall.h5 taz6.h5 --clobber) + JAMTEST (twithub513_u511_c u511.txt twithub513.h5 tall.h5 taz7.h5 --clobber) + JAMTEST (twithub513_u512_c u512.txt twithub513.h5 tall.h5 taz8.h5 --clobber) + JAMTEST (twithub513_u513_c u513.txt twithub513.h5 tall.h5 taz9.h5 --clobber) + + JAMTEST_NONE (N_twithub_u10_c u10.txt tall.h5 twithub.h5 tay2.h5 --clobber) + JAMTEST_NONE (N_twithub_u511_c u511.txt tall.h5 twithub.h5 tay3.h5 --clobber) + JAMTEST_NONE (N_twithub_u512_c u512.txt tall.h5 twithub.h5 tay4.h5 --clobber) + JAMTEST_NONE (N_twithub_u513_c u513.txt tall.h5 twithub.h5 tay5.h5 --clobber) + + JAMTEST_NONE (N_twithub513_u10_c u10.txt tall.h5 twithub513.h5 tay6.h5 --clobber) + JAMTEST_NONE (N_twithub513_u511_c u511.txt tall.h5 twithub513.h5 tay7.h5 --clobber) + JAMTEST_NONE (N_twithub513_u512_c u512.txt tall.h5 twithub513.h5 tay8.h5 --clobber) + JAMTEST_NONE (N_twithub513_u513_c u513.txt tall.h5 twithub513.h5 tay9.h5 --clobber) + +#------------------------------- +# Testing h5unjam +#------------------------------- + # help page + TEST_H5UNJAM_OUTPUT(h5unjam-help 0 -h) + + UNJAMTEST (twithub_tall twithub.h5 tai1.h5 o10.txt tall.h5 taa1.h5) + UNJAMTEST (twithub513_tall twithub513.h5 tai2.h5 o512.txt tall.h5 taa2.h5) + + UNJAMTEST (N_twithub_tall twithub.h5 tai3.h5 NONE tall.h5 taa3.h5) + UNJAMTEST (N_twithub513_tall twithub513.h5 tai4.h5 NONE tall.h5 taa4.h5) + + UNJAMTEST (D_twithub_tall twithub.h5 taj2.h5 NONE tall.h5 tac2.h5 --delete) + UNJAMTEST (D_twithub513_tall twithub513.h5 taj3.h5 NONE tall.h5 tac3.h5 --delete) diff --git a/tools/h5ls/CMakeLists.txt b/tools/h5ls/CMakeLists.txt index 2d7bd97..eeaf1ea 100644 --- a/tools/h5ls/CMakeLists.txt +++ b/tools/h5ls/CMakeLists.txt @@ -19,408 +19,9 @@ SET (H5_DEP_EXECUTABLES h5ls ) -############################################################################## -############################################################################## -### T E S T I N G ### -############################################################################## -############################################################################## - IF (BUILD_TESTING) - # -------------------------------------------------------------------- - # Copy all the test files from source directory to test directory - # -------------------------------------------------------------------- - SET (LIST_HDF5_TEST_FILES - ${HDF5_TOOLS_SRC_DIR}/testfiles/tall.h5 - ${HDF5_TOOLS_SRC_DIR}/testfiles/tarray1.h5 - ${HDF5_TOOLS_SRC_DIR}/testfiles/tattr2.h5 - ${HDF5_TOOLS_SRC_DIR}/testfiles/tattrreg.h5 - ${HDF5_TOOLS_SRC_DIR}/testfiles/tcompound.h5 - ${HDF5_TOOLS_SRC_DIR}/testfiles/tdatareg.h5 - ${HDF5_TOOLS_SRC_DIR}/testfiles/tdset.h5 - ${HDF5_TOOLS_SRC_DIR}/testfiles/tempty.h5 - ${HDF5_TOOLS_SRC_DIR}/testfiles/textlink.h5 - ${HDF5_TOOLS_SRC_DIR}/testfiles/textlinksrc.h5 - ${HDF5_TOOLS_SRC_DIR}/testfiles/textlinktar.h5 - ${HDF5_TOOLS_SRC_DIR}/testfiles/tgroup.h5 - ${HDF5_TOOLS_SRC_DIR}/testfiles/tgrp_comments.h5 - ${HDF5_TOOLS_SRC_DIR}/testfiles/thlink.h5 - ${HDF5_TOOLS_SRC_DIR}/testfiles/tloop.h5 - ${HDF5_TOOLS_SRC_DIR}/testfiles/tnestedcomp.h5 - ${HDF5_TOOLS_SRC_DIR}/testfiles/tsaf.h5 - ${HDF5_TOOLS_SRC_DIR}/testfiles/tslink.h5 - ${HDF5_TOOLS_SRC_DIR}/testfiles/tsoftlinks.h5 - ${HDF5_TOOLS_SRC_DIR}/testfiles/tstr.h5 - ${HDF5_TOOLS_SRC_DIR}/testfiles/tudlink.h5 - ${HDF5_TOOLS_SRC_DIR}/testfiles/tvldtypes1.h5 - ) - - SET (LIST_OTHER_TEST_FILES - ${HDF5_TOOLS_SRC_DIR}/testfiles/help-1.ls - ${HDF5_TOOLS_SRC_DIR}/testfiles/help-2.ls - ${HDF5_TOOLS_SRC_DIR}/testfiles/help-3.ls - ${HDF5_TOOLS_SRC_DIR}/testfiles/nosuchfile.ls - ${HDF5_TOOLS_SRC_DIR}/testfiles/tall-1.ls - ${HDF5_TOOLS_SRC_DIR}/testfiles/tall-2.ls - ${HDF5_TOOLS_SRC_DIR}/testfiles/tarray1.ls - ${HDF5_TOOLS_SRC_DIR}/testfiles/tattr2.ls - ${HDF5_TOOLS_SRC_DIR}/testfiles/tattrreg_le.ls - ${HDF5_TOOLS_SRC_DIR}/testfiles/tattrreg_be.ls - ${HDF5_TOOLS_SRC_DIR}/testfiles/tcomp-1.ls - ${HDF5_TOOLS_SRC_DIR}/testfiles/tdataregbe.ls - ${HDF5_TOOLS_SRC_DIR}/testfiles/tdataregle.ls - ${HDF5_TOOLS_SRC_DIR}/testfiles/tdset-1.ls - ${HDF5_TOOLS_SRC_DIR}/testfiles/tempty.ls - ${HDF5_TOOLS_SRC_DIR}/testfiles/textlink-1.ls - ${HDF5_TOOLS_SRC_DIR}/testfiles/textlinksrc-1.ls - ${HDF5_TOOLS_SRC_DIR}/testfiles/textlinksrc-2.ls - ${HDF5_TOOLS_SRC_DIR}/testfiles/textlinksrc-3.ls - ${HDF5_TOOLS_SRC_DIR}/testfiles/textlinksrc-4.ls - ${HDF5_TOOLS_SRC_DIR}/testfiles/textlinksrc-5.ls - ${HDF5_TOOLS_SRC_DIR}/testfiles/textlinksrc-6.ls - ${HDF5_TOOLS_SRC_DIR}/testfiles/textlinksrc-7.ls - ${HDF5_TOOLS_SRC_DIR}/testfiles/textlinksrc-1-old.ls - ${HDF5_TOOLS_SRC_DIR}/testfiles/textlinksrc-2-old.ls - ${HDF5_TOOLS_SRC_DIR}/testfiles/textlinksrc-3-old.ls - ${HDF5_TOOLS_SRC_DIR}/testfiles/textlinksrc-6-old.ls - ${HDF5_TOOLS_SRC_DIR}/testfiles/textlinksrc-7-old.ls - ${HDF5_TOOLS_SRC_DIR}/testfiles/tsoftlinks-1.ls - ${HDF5_TOOLS_SRC_DIR}/testfiles/tsoftlinks-2.ls - ${HDF5_TOOLS_SRC_DIR}/testfiles/tsoftlinks-3.ls - ${HDF5_TOOLS_SRC_DIR}/testfiles/tsoftlinks-4.ls - ${HDF5_TOOLS_SRC_DIR}/testfiles/tsoftlinks-5.ls - ${HDF5_TOOLS_SRC_DIR}/testfiles/textlinksrc-nodangle-1.ls - ${HDF5_TOOLS_SRC_DIR}/testfiles/textlinksrc-nodangle-2.ls - ${HDF5_TOOLS_SRC_DIR}/testfiles/tgrp_comments.ls - ${HDF5_TOOLS_SRC_DIR}/testfiles/tsoftlinks-nodangle-1.ls - ${HDF5_TOOLS_SRC_DIR}/testfiles/thlinks-nodangle-1.ls - ${HDF5_TOOLS_SRC_DIR}/testfiles/tgroup.ls - ${HDF5_TOOLS_SRC_DIR}/testfiles/tgroup-1.ls - ${HDF5_TOOLS_SRC_DIR}/testfiles/tgroup-2.ls - ${HDF5_TOOLS_SRC_DIR}/testfiles/tgroup-3.ls - ${HDF5_TOOLS_SRC_DIR}/testfiles/thlink-1.ls - ${HDF5_TOOLS_SRC_DIR}/testfiles/tloop-1.ls - ${HDF5_TOOLS_SRC_DIR}/testfiles/tmultifile.ls - ${HDF5_TOOLS_SRC_DIR}/testfiles/tnestcomp-1.ls - ${HDF5_TOOLS_SRC_DIR}/testfiles/tnestcomp-2.ls - ${HDF5_TOOLS_SRC_DIR}/testfiles/tnestcomp-3.ls - ${HDF5_TOOLS_SRC_DIR}/testfiles/tnestcomp-4.ls - ${HDF5_TOOLS_SRC_DIR}/testfiles/tsaf.ls - ${HDF5_TOOLS_SRC_DIR}/testfiles/tslink-1.ls - ${HDF5_TOOLS_SRC_DIR}/testfiles/tstr-1.ls - ${HDF5_TOOLS_SRC_DIR}/testfiles/tudlink-1.ls - ${HDF5_TOOLS_SRC_DIR}/testfiles/tvldtypes1.ls - ${HDF5_TOOLS_SRC_DIR}/testfiles/tvldtypes2le.ls - ${HDF5_TOOLS_SRC_DIR}/testfiles/tvldtypes2be.ls - ) - - FILE (MAKE_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles") - - # copy the list of test files - FOREACH (listfiles ${LIST_HDF5_TEST_FILES} ${LIST_OTHER_TEST_FILES}) - GET_FILENAME_COMPONENT(fname "${listfiles}" NAME) - SET (dest "${PROJECT_BINARY_DIR}/testfiles/${fname}") - #MESSAGE (STATUS " Copying ${listfiles} to ${dest}") - ADD_CUSTOM_COMMAND ( - TARGET h5ls - POST_BUILD - COMMAND ${CMAKE_COMMAND} - ARGS -E copy_if_different ${listfiles} ${dest} - ) - ENDFOREACH (listfiles ${LIST_HDF5_TEST_FILES} ${LIST_OTHER_TEST_FILES}) - - -############################################################################## -############################################################################## -### T H E T E S T S M A C R O S ### -############################################################################## -############################################################################## - - MACRO (ADD_H5_TEST resultfile resultcode) - # If using memchecker add tests without using scripts - IF (HDF5_ENABLE_USING_MEMCHECKER) - ADD_TEST (NAME H5LS-${resultfile} COMMAND $ ${ARGN}) - SET_TESTS_PROPERTIES (H5LS-${resultfile} PROPERTIES WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles") - IF (${resultcode} STREQUAL "1") - SET_TESTS_PROPERTIES (H5LS-${resultfile} PROPERTIES WILL_FAIL "true") - ENDIF (${resultcode} STREQUAL "1") - IF (NOT "${last_test}" STREQUAL "") - SET_TESTS_PROPERTIES (H5LS-${resultfile} PROPERTIES DEPENDS ${last_test}) - ENDIF (NOT "${last_test}" STREQUAL "") - ELSE (HDF5_ENABLE_USING_MEMCHECKER) - ADD_TEST ( - NAME H5LS-${resultfile}-clear-objects - COMMAND ${CMAKE_COMMAND} - -E remove ./testfiles/${resultfile}.out ./testfiles/${resultfile}.out.err - ) - ADD_TEST ( - NAME H5LS-${resultfile} - COMMAND "${CMAKE_COMMAND}" - -D "TEST_PROGRAM=$" - -D "TEST_ARGS=${ARGN}" - -D "TEST_FOLDER=${PROJECT_BINARY_DIR}/testfiles" - -D "TEST_OUTPUT=${resultfile}.out" - -D "TEST_EXPECT=${resultcode}" - -D "TEST_REFERENCE=${resultfile}.ls" - -P "${HDF5_RESOURCES_DIR}/runTest.cmake" - ) - SET_TESTS_PROPERTIES (H5LS-${resultfile} PROPERTIES DEPENDS "H5LS-${resultfile}-clear-objects") - ENDIF (HDF5_ENABLE_USING_MEMCHECKER) - ENDMACRO (ADD_H5_TEST file) - -############################################################################## -############################################################################## -### T H E T E S T S ### -############################################################################## -############################################################################## - - IF (HDF5_ENABLE_USING_MEMCHECKER) - # Remove any output file left over from previous test run - ADD_TEST ( - NAME H5LS-clearall-objects - COMMAND ${CMAKE_COMMAND} - -E remove - help-1.out - help-1.out.err - help-2.out - help-2.out.err - help-3.out - help-3.out.err - nosuchfile.out - nosuchfile.out.err - tall-1.out - tall-1.out.err - tall-2.out - tall-2.out.err - tarray1.out - tarray1.out.err - tattr2.out - tattr2.out.err - tcomp-1.out - tcomp-1.out.err - tdataregbe.out - tdataregbe.out.err - tdataregle.out - tdataregle.out.err - tdset-1.out - tdset-1.out.err - tempty.out - tempty.out.err - textlink-1.out - textlink-1.out.err - textlinksrc-1.out - textlinksrc-1.out.err - textlinksrc-2.out - textlinksrc-2.out.err - textlinksrc-3.out - textlinksrc-3.out.err - textlinksrc-4.out - textlinksrc-4.out.err - textlinksrc-5.out - textlinksrc-5.out.err - textlinksrc-6.out - textlinksrc-6.out.err - textlinksrc-7.out - textlinksrc-7.out.err - textlinksrc-1-old.out - textlinksrc-1-old.out.err - textlinksrc-2-old.out - textlinksrc-2-old.out.err - textlinksrc-3-old.out - textlinksrc-3-old.out.err - textlinksrc-6-old.out - textlinksrc-6-old.out.err - textlinksrc-7-old.out - textlinksrc-7-old.out.err - tgrp_comments.out - tgrp_comments.out.err - tsoftlinks-1.out - tsoftlinks-1.out.err - tsoftlinks-2.out - tsoftlinks-2.out.err - tsoftlinks-3.out - tsoftlinks-3.out.err - tsoftlinks-4.out - tsoftlinks-4.out.err - tsoftlinks-5.out - tsoftlinks-5.out.err - textlinksrc-nodangle-1.out - textlinksrc-nodangle-1.out.err - textlinksrc-nodangle-2.out - textlinksrc-nodangle-2.out.err - tsoftlinks-nodangle-1.out - tsoftlinks-nodangle-1.out.err - thlinks-nodangle-1.out - thlinks-nodangle-1.out.err - tgroup.out - tgroup.out.err - tgroup-1.out - tgroup-1.out.err - tgroup-2.out - tgroup-2.out.err - tgroup-3.out - tgroup-3.out.err - thlink-1.out - thlink-1.out.err - tloop-1.out - tloop-1.out.err - tnestcomp-1.out - tnestcomp-1.out.err - tnestcomp-2.out - tnestcomp-2.out.err - tnestcomp-3.out - tnestcomp-3.out.err - tnestcomp-4.out - tnestcomp-4.out.err - tsaf.out - tsaf.out.err - tslink-1.out - tslink-1.out.err - tstr-1.out - tstr-1.out.err - tudlink-1.out - tudlink-1.out.err - tvldtypes1.out - tvldtypes1.out.err - tvldtypes2le.out - tvldtypes2le.out.err - tvldtypes2be.out - tvldtypes2be.out.err - ) - IF (NOT "${last_test}" STREQUAL "") - SET_TESTS_PROPERTIES (H5LS-clearall-objects PROPERTIES DEPENDS ${last_test}) - ENDIF (NOT "${last_test}" STREQUAL "") - SET (last_test "H5LS-clearall-objects") - ENDIF (HDF5_ENABLE_USING_MEMCHECKER) - - # test the help syntax - ADD_H5_TEST (help-1 0 -w80 -h) - ADD_H5_TEST (help-2 0 -w80 --help) - ADD_H5_TEST (help-3 0 -w80 -?) - - # test simple command - ADD_H5_TEST (tall-1 0 -w80 tall.h5) - ADD_H5_TEST (tall-2 0 -w80 -r -d tall.h5) - ADD_H5_TEST (tgroup 0 -w80 tgroup.h5) - ADD_H5_TEST (tgroup-3 0 -w80 tgroup.h5/g1) - - # test for displaying groups - # The following combination of arguments is expected to return an error message - # and return value 1 - ADD_H5_TEST (tgroup-1 1 -w80 -r -g tgroup.h5) - ADD_H5_TEST (tgroup-2 0 -w80 -g tgroup.h5/g1) - - # test for files with groups that have long comments - ADD_H5_TEST (tgrp_comments 0 -w80 -v -g tgrp_comments.h5/glongcomment) - - # test for displaying simple space datasets - ADD_H5_TEST (tdset-1 0 -w80 -r -d tdset.h5) - - # test for displaying soft links (dangle) - ADD_H5_TEST (tslink-1 0 -w80 -r tslink.h5) - - # test for displaying more soft links with --follow-symlinks - ADD_H5_TEST (tsoftlinks-1 0 --follow-symlinks tsoftlinks.h5) - ADD_H5_TEST (tsoftlinks-2 0 --follow-symlinks -r tsoftlinks.h5) - ADD_H5_TEST (tsoftlinks-3 0 --follow-symlinks tsoftlinks.h5/group1) - ADD_H5_TEST (tsoftlinks-4 0 --follow-symlinks -r tsoftlinks.h5/group1) - ADD_H5_TEST (tsoftlinks-5 0 --follow-symlinks tsoftlinks.h5/soft_dset1) - - # test for displaying external and user-defined links with --follow-symlinks - ADD_H5_TEST (textlink-1 0 -w80 -r textlink.h5) - ADD_H5_TEST (textlinksrc-1 0 -w80 --follow-symlinks -r textlinksrc.h5) - ADD_H5_TEST (textlinksrc-2 0 -w80 --follow-symlinks -rv textlinksrc.h5/ext_link5) - ADD_H5_TEST (textlinksrc-3 0 -w80 --follow-symlinks -r textlinksrc.h5/ext_link1) - ADD_H5_TEST (textlinksrc-4 0 -w80 -r textlinksrc.h5) - ADD_H5_TEST (textlinksrc-5 0 -w80 -r textlinksrc.h5/ext_link1) - ADD_H5_TEST (textlinksrc-6 0 -w80 --follow-symlinks textlinksrc.h5) - ADD_H5_TEST (textlinksrc-7 0 -w80 --follow-symlinks textlinksrc.h5/ext_link1) - ADD_H5_TEST (tudlink-1 0 -w80 -r tudlink.h5) - - # test for displaying external links with -E - # the option -E will be depriciated but keep it for backward compatibility - ADD_H5_TEST (textlinksrc-1-old 0 -w80 -Er textlinksrc.h5) - ADD_H5_TEST (textlinksrc-2-old 0 -w80 -Erv textlinksrc.h5/ext_link5) - ADD_H5_TEST (textlinksrc-3-old 0 -w80 -Er textlinksrc.h5/ext_link1) - ADD_H5_TEST (textlinksrc-6-old 0 -w80 -E textlinksrc.h5) - ADD_H5_TEST (textlinksrc-7-old 0 -w80 -E textlinksrc.h5/ext_link1) - - # tests for no-dangling-links - # if this option is given on dangling link, h5ls should return exit code 1 - # when used alone , expect to print out help and return exit code 1 - ADD_H5_TEST (textlinksrc-nodangle-1 1 -w80 --no-dangling-links textlinksrc.h5) - # external dangling link - expected exit code 1 - ADD_H5_TEST (textlinksrc-nodangle-2 1 -w80 --follow-symlinks --no-dangling-links textlinksrc.h5) - # soft dangling link - expected exit code 1 - ADD_H5_TEST (tsoftlinks-nodangle-1 1 -w80 --follow-symlinks --no-dangling-links tsoftlinks.h5) - # when used file with no dangling links - expected exit code 0 - ADD_H5_TEST (thlinks-nodangle-1 0 -w80 --follow-symlinks --no-dangling-links thlink.h5) - -# test for wildcards in filename (does not work with cmake) -# ADD_H5_TEST (tstarfile 0 -w80 t*link.h5) -# ADD_H5_TEST (tqmarkfile 0 -w80 t?link.h5) - ADD_H5_TEST (tmultifile 0 -w80 thlink.h5 tslink.h5) - - # tests for hard links - ADD_H5_TEST (thlink-1 0 -w80 thlink.h5) - - # tests for compound data types - ADD_H5_TEST (tcomp-1 0 -w80 -r -d tcompound.h5) - - #test for the nested compound type - ADD_H5_TEST (tnestcomp-1 0 -w80 -r -d tnestedcomp.h5) - - ADD_H5_TEST (tnestcomp-2 0 -w80 -r -d -S tnestedcomp.h5) - - ADD_H5_TEST (tnestcomp-3 0 -w80 -r -d -l tnestedcomp.h5) - - ADD_H5_TEST (tnestcomp-4 0 -w80 -r -d -l -S tnestedcomp.h5) - - # test for loop detection - ADD_H5_TEST (tloop-1 0 -w80 -r -d tloop.h5) - - # test for string - ADD_H5_TEST (tstr-1 0 -w80 -r -d tstr.h5) - - # test test file created from lib SAF team - ADD_H5_TEST (tsaf 0 -w80 -r -d tsaf.h5) - - # test for variable length data types - ADD_H5_TEST (tvldtypes1 0 -w80 -r -d tvldtypes1.h5) - - # test for array data types - ADD_H5_TEST (tarray1 0 -w80 -r -d tarray1.h5) - - # test for empty data - ADD_H5_TEST (tempty 0 -w80 -d tempty.h5) - - # test for all dataset types written to attributes - # enable -S for avoiding printing NATIVE types - ADD_H5_TEST (tattr2 0 -w80 -v -S tattr2.h5) - - # test for attribute with region references wo verbose mode - # ( HDFFV-7838, ) - IF (H5_WORDS_BIGENDIAN) - ADD_H5_TEST (tattrreg_be 0 -w80 -v -d tattrreg.h5) - ELSE (H5_WORDS_BIGENDIAN) - ADD_H5_TEST (tattrreg_le 0 -w80 -v -d tattrreg.h5) - ENDIF (H5_WORDS_BIGENDIAN) - - # test for non-existing file - ADD_H5_TEST (nosuchfile 1 nosuchfile.h5) - - # test for variable length data types in verbose mode - IF (H5_WORDS_BIGENDIAN) - ADD_H5_TEST (tvldtypes2be 0 -v tvldtypes1.h5) - ELSE (H5_WORDS_BIGENDIAN) - ADD_H5_TEST (tvldtypes2le 0 -v tvldtypes1.h5) - ENDIF (H5_WORDS_BIGENDIAN) - # test for dataset region references data types in verbose mode - IF (H5_WORDS_BIGENDIAN) - ADD_H5_TEST (tdataregbe 0 -v tdatareg.h5) - ELSE (H5_WORDS_BIGENDIAN) - ADD_H5_TEST (tdataregle 0 -v tdatareg.h5) - ENDIF (H5_WORDS_BIGENDIAN) + INCLUDE (CMakeTests.cmake) ENDIF (BUILD_TESTING) diff --git a/tools/h5ls/CMakeTests.cmake b/tools/h5ls/CMakeTests.cmake new file mode 100644 index 0000000..09f375d --- /dev/null +++ b/tools/h5ls/CMakeTests.cmake @@ -0,0 +1,402 @@ + +############################################################################## +############################################################################## +### T E S T I N G ### +############################################################################## +############################################################################## + + # -------------------------------------------------------------------- + # Copy all the test files from source directory to test directory + # -------------------------------------------------------------------- + SET (LIST_HDF5_TEST_FILES + ${HDF5_TOOLS_SRC_DIR}/testfiles/tall.h5 + ${HDF5_TOOLS_SRC_DIR}/testfiles/tarray1.h5 + ${HDF5_TOOLS_SRC_DIR}/testfiles/tattr2.h5 + ${HDF5_TOOLS_SRC_DIR}/testfiles/tattrreg.h5 + ${HDF5_TOOLS_SRC_DIR}/testfiles/tcompound.h5 + ${HDF5_TOOLS_SRC_DIR}/testfiles/tdatareg.h5 + ${HDF5_TOOLS_SRC_DIR}/testfiles/tdset.h5 + ${HDF5_TOOLS_SRC_DIR}/testfiles/tempty.h5 + ${HDF5_TOOLS_SRC_DIR}/testfiles/textlink.h5 + ${HDF5_TOOLS_SRC_DIR}/testfiles/textlinksrc.h5 + ${HDF5_TOOLS_SRC_DIR}/testfiles/textlinktar.h5 + ${HDF5_TOOLS_SRC_DIR}/testfiles/tgroup.h5 + ${HDF5_TOOLS_SRC_DIR}/testfiles/tgrp_comments.h5 + ${HDF5_TOOLS_SRC_DIR}/testfiles/thlink.h5 + ${HDF5_TOOLS_SRC_DIR}/testfiles/tloop.h5 + ${HDF5_TOOLS_SRC_DIR}/testfiles/tnestedcomp.h5 + ${HDF5_TOOLS_SRC_DIR}/testfiles/tsaf.h5 + ${HDF5_TOOLS_SRC_DIR}/testfiles/tslink.h5 + ${HDF5_TOOLS_SRC_DIR}/testfiles/tsoftlinks.h5 + ${HDF5_TOOLS_SRC_DIR}/testfiles/tstr.h5 + ${HDF5_TOOLS_SRC_DIR}/testfiles/tudlink.h5 + ${HDF5_TOOLS_SRC_DIR}/testfiles/tvldtypes1.h5 + ) + + SET (LIST_OTHER_TEST_FILES + ${HDF5_TOOLS_SRC_DIR}/testfiles/help-1.ls + ${HDF5_TOOLS_SRC_DIR}/testfiles/help-2.ls + ${HDF5_TOOLS_SRC_DIR}/testfiles/help-3.ls + ${HDF5_TOOLS_SRC_DIR}/testfiles/nosuchfile.ls + ${HDF5_TOOLS_SRC_DIR}/testfiles/tall-1.ls + ${HDF5_TOOLS_SRC_DIR}/testfiles/tall-2.ls + ${HDF5_TOOLS_SRC_DIR}/testfiles/tarray1.ls + ${HDF5_TOOLS_SRC_DIR}/testfiles/tattr2.ls + ${HDF5_TOOLS_SRC_DIR}/testfiles/tattrreg_le.ls + ${HDF5_TOOLS_SRC_DIR}/testfiles/tattrreg_be.ls + ${HDF5_TOOLS_SRC_DIR}/testfiles/tcomp-1.ls + ${HDF5_TOOLS_SRC_DIR}/testfiles/tdataregbe.ls + ${HDF5_TOOLS_SRC_DIR}/testfiles/tdataregle.ls + ${HDF5_TOOLS_SRC_DIR}/testfiles/tdset-1.ls + ${HDF5_TOOLS_SRC_DIR}/testfiles/tempty.ls + ${HDF5_TOOLS_SRC_DIR}/testfiles/textlink-1.ls + ${HDF5_TOOLS_SRC_DIR}/testfiles/textlinksrc-1.ls + ${HDF5_TOOLS_SRC_DIR}/testfiles/textlinksrc-2.ls + ${HDF5_TOOLS_SRC_DIR}/testfiles/textlinksrc-3.ls + ${HDF5_TOOLS_SRC_DIR}/testfiles/textlinksrc-4.ls + ${HDF5_TOOLS_SRC_DIR}/testfiles/textlinksrc-5.ls + ${HDF5_TOOLS_SRC_DIR}/testfiles/textlinksrc-6.ls + ${HDF5_TOOLS_SRC_DIR}/testfiles/textlinksrc-7.ls + ${HDF5_TOOLS_SRC_DIR}/testfiles/textlinksrc-1-old.ls + ${HDF5_TOOLS_SRC_DIR}/testfiles/textlinksrc-2-old.ls + ${HDF5_TOOLS_SRC_DIR}/testfiles/textlinksrc-3-old.ls + ${HDF5_TOOLS_SRC_DIR}/testfiles/textlinksrc-6-old.ls + ${HDF5_TOOLS_SRC_DIR}/testfiles/textlinksrc-7-old.ls + ${HDF5_TOOLS_SRC_DIR}/testfiles/tsoftlinks-1.ls + ${HDF5_TOOLS_SRC_DIR}/testfiles/tsoftlinks-2.ls + ${HDF5_TOOLS_SRC_DIR}/testfiles/tsoftlinks-3.ls + ${HDF5_TOOLS_SRC_DIR}/testfiles/tsoftlinks-4.ls + ${HDF5_TOOLS_SRC_DIR}/testfiles/tsoftlinks-5.ls + ${HDF5_TOOLS_SRC_DIR}/testfiles/textlinksrc-nodangle-1.ls + ${HDF5_TOOLS_SRC_DIR}/testfiles/textlinksrc-nodangle-2.ls + ${HDF5_TOOLS_SRC_DIR}/testfiles/tgrp_comments.ls + ${HDF5_TOOLS_SRC_DIR}/testfiles/tsoftlinks-nodangle-1.ls + ${HDF5_TOOLS_SRC_DIR}/testfiles/thlinks-nodangle-1.ls + ${HDF5_TOOLS_SRC_DIR}/testfiles/tgroup.ls + ${HDF5_TOOLS_SRC_DIR}/testfiles/tgroup-1.ls + ${HDF5_TOOLS_SRC_DIR}/testfiles/tgroup-2.ls + ${HDF5_TOOLS_SRC_DIR}/testfiles/tgroup-3.ls + ${HDF5_TOOLS_SRC_DIR}/testfiles/thlink-1.ls + ${HDF5_TOOLS_SRC_DIR}/testfiles/tloop-1.ls + ${HDF5_TOOLS_SRC_DIR}/testfiles/tmultifile.ls + ${HDF5_TOOLS_SRC_DIR}/testfiles/tnestcomp-1.ls + ${HDF5_TOOLS_SRC_DIR}/testfiles/tnestcomp-2.ls + ${HDF5_TOOLS_SRC_DIR}/testfiles/tnestcomp-3.ls + ${HDF5_TOOLS_SRC_DIR}/testfiles/tnestcomp-4.ls + ${HDF5_TOOLS_SRC_DIR}/testfiles/tsaf.ls + ${HDF5_TOOLS_SRC_DIR}/testfiles/tslink-1.ls + ${HDF5_TOOLS_SRC_DIR}/testfiles/tstr-1.ls + ${HDF5_TOOLS_SRC_DIR}/testfiles/tudlink-1.ls + ${HDF5_TOOLS_SRC_DIR}/testfiles/tvldtypes1.ls + ${HDF5_TOOLS_SRC_DIR}/testfiles/tvldtypes2le.ls + ${HDF5_TOOLS_SRC_DIR}/testfiles/tvldtypes2be.ls + ) + + FILE (MAKE_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles") + + # copy the list of test files + FOREACH (listfiles ${LIST_HDF5_TEST_FILES} ${LIST_OTHER_TEST_FILES}) + GET_FILENAME_COMPONENT(fname "${listfiles}" NAME) + SET (dest "${PROJECT_BINARY_DIR}/testfiles/${fname}") + #MESSAGE (STATUS " Copying ${listfiles} to ${dest}") + ADD_CUSTOM_COMMAND ( + TARGET h5ls + POST_BUILD + COMMAND ${CMAKE_COMMAND} + ARGS -E copy_if_different ${listfiles} ${dest} + ) + ENDFOREACH (listfiles ${LIST_HDF5_TEST_FILES} ${LIST_OTHER_TEST_FILES}) + + +############################################################################## +############################################################################## +### T H E T E S T S M A C R O S ### +############################################################################## +############################################################################## + + MACRO (ADD_H5_TEST resultfile resultcode) + # If using memchecker add tests without using scripts + IF (HDF5_ENABLE_USING_MEMCHECKER) + ADD_TEST (NAME H5LS-${resultfile} COMMAND $ ${ARGN}) + SET_TESTS_PROPERTIES (H5LS-${resultfile} PROPERTIES WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles") + IF (${resultcode} STREQUAL "1") + SET_TESTS_PROPERTIES (H5LS-${resultfile} PROPERTIES WILL_FAIL "true") + ENDIF (${resultcode} STREQUAL "1") + IF (NOT "${last_test}" STREQUAL "") + SET_TESTS_PROPERTIES (H5LS-${resultfile} PROPERTIES DEPENDS ${last_test}) + ENDIF (NOT "${last_test}" STREQUAL "") + ELSE (HDF5_ENABLE_USING_MEMCHECKER) + ADD_TEST ( + NAME H5LS-${resultfile}-clear-objects + COMMAND ${CMAKE_COMMAND} + -E remove ./testfiles/${resultfile}.out ./testfiles/${resultfile}.out.err + ) + ADD_TEST ( + NAME H5LS-${resultfile} + COMMAND "${CMAKE_COMMAND}" + -D "TEST_PROGRAM=$" + -D "TEST_ARGS=${ARGN}" + -D "TEST_FOLDER=${PROJECT_BINARY_DIR}/testfiles" + -D "TEST_OUTPUT=${resultfile}.out" + -D "TEST_EXPECT=${resultcode}" + -D "TEST_REFERENCE=${resultfile}.ls" + -P "${HDF5_RESOURCES_DIR}/runTest.cmake" + ) + SET_TESTS_PROPERTIES (H5LS-${resultfile} PROPERTIES DEPENDS "H5LS-${resultfile}-clear-objects") + ENDIF (HDF5_ENABLE_USING_MEMCHECKER) + ENDMACRO (ADD_H5_TEST file) + +############################################################################## +############################################################################## +### T H E T E S T S ### +############################################################################## +############################################################################## + + IF (HDF5_ENABLE_USING_MEMCHECKER) + # Remove any output file left over from previous test run + ADD_TEST ( + NAME H5LS-clearall-objects + COMMAND ${CMAKE_COMMAND} + -E remove + help-1.out + help-1.out.err + help-2.out + help-2.out.err + help-3.out + help-3.out.err + nosuchfile.out + nosuchfile.out.err + tall-1.out + tall-1.out.err + tall-2.out + tall-2.out.err + tarray1.out + tarray1.out.err + tattr2.out + tattr2.out.err + tcomp-1.out + tcomp-1.out.err + tdataregbe.out + tdataregbe.out.err + tdataregle.out + tdataregle.out.err + tdset-1.out + tdset-1.out.err + tempty.out + tempty.out.err + textlink-1.out + textlink-1.out.err + textlinksrc-1.out + textlinksrc-1.out.err + textlinksrc-2.out + textlinksrc-2.out.err + textlinksrc-3.out + textlinksrc-3.out.err + textlinksrc-4.out + textlinksrc-4.out.err + textlinksrc-5.out + textlinksrc-5.out.err + textlinksrc-6.out + textlinksrc-6.out.err + textlinksrc-7.out + textlinksrc-7.out.err + textlinksrc-1-old.out + textlinksrc-1-old.out.err + textlinksrc-2-old.out + textlinksrc-2-old.out.err + textlinksrc-3-old.out + textlinksrc-3-old.out.err + textlinksrc-6-old.out + textlinksrc-6-old.out.err + textlinksrc-7-old.out + textlinksrc-7-old.out.err + tgrp_comments.out + tgrp_comments.out.err + tsoftlinks-1.out + tsoftlinks-1.out.err + tsoftlinks-2.out + tsoftlinks-2.out.err + tsoftlinks-3.out + tsoftlinks-3.out.err + tsoftlinks-4.out + tsoftlinks-4.out.err + tsoftlinks-5.out + tsoftlinks-5.out.err + textlinksrc-nodangle-1.out + textlinksrc-nodangle-1.out.err + textlinksrc-nodangle-2.out + textlinksrc-nodangle-2.out.err + tsoftlinks-nodangle-1.out + tsoftlinks-nodangle-1.out.err + thlinks-nodangle-1.out + thlinks-nodangle-1.out.err + tgroup.out + tgroup.out.err + tgroup-1.out + tgroup-1.out.err + tgroup-2.out + tgroup-2.out.err + tgroup-3.out + tgroup-3.out.err + thlink-1.out + thlink-1.out.err + tloop-1.out + tloop-1.out.err + tnestcomp-1.out + tnestcomp-1.out.err + tnestcomp-2.out + tnestcomp-2.out.err + tnestcomp-3.out + tnestcomp-3.out.err + tnestcomp-4.out + tnestcomp-4.out.err + tsaf.out + tsaf.out.err + tslink-1.out + tslink-1.out.err + tstr-1.out + tstr-1.out.err + tudlink-1.out + tudlink-1.out.err + tvldtypes1.out + tvldtypes1.out.err + tvldtypes2le.out + tvldtypes2le.out.err + tvldtypes2be.out + tvldtypes2be.out.err + ) + IF (NOT "${last_test}" STREQUAL "") + SET_TESTS_PROPERTIES (H5LS-clearall-objects PROPERTIES DEPENDS ${last_test}) + ENDIF (NOT "${last_test}" STREQUAL "") + SET (last_test "H5LS-clearall-objects") + ENDIF (HDF5_ENABLE_USING_MEMCHECKER) + + # test the help syntax + ADD_H5_TEST (help-1 0 -w80 -h) + ADD_H5_TEST (help-2 0 -w80 --help) + ADD_H5_TEST (help-3 0 -w80 -?) + + # test simple command + ADD_H5_TEST (tall-1 0 -w80 tall.h5) + ADD_H5_TEST (tall-2 0 -w80 -r -d tall.h5) + ADD_H5_TEST (tgroup 0 -w80 tgroup.h5) + ADD_H5_TEST (tgroup-3 0 -w80 tgroup.h5/g1) + + # test for displaying groups + # The following combination of arguments is expected to return an error message + # and return value 1 + ADD_H5_TEST (tgroup-1 1 -w80 -r -g tgroup.h5) + ADD_H5_TEST (tgroup-2 0 -w80 -g tgroup.h5/g1) + + # test for files with groups that have long comments + ADD_H5_TEST (tgrp_comments 0 -w80 -v -g tgrp_comments.h5/glongcomment) + + # test for displaying simple space datasets + ADD_H5_TEST (tdset-1 0 -w80 -r -d tdset.h5) + + # test for displaying soft links (dangle) + ADD_H5_TEST (tslink-1 0 -w80 -r tslink.h5) + + # test for displaying more soft links with --follow-symlinks + ADD_H5_TEST (tsoftlinks-1 0 --follow-symlinks tsoftlinks.h5) + ADD_H5_TEST (tsoftlinks-2 0 --follow-symlinks -r tsoftlinks.h5) + ADD_H5_TEST (tsoftlinks-3 0 --follow-symlinks tsoftlinks.h5/group1) + ADD_H5_TEST (tsoftlinks-4 0 --follow-symlinks -r tsoftlinks.h5/group1) + ADD_H5_TEST (tsoftlinks-5 0 --follow-symlinks tsoftlinks.h5/soft_dset1) + + # test for displaying external and user-defined links with --follow-symlinks + ADD_H5_TEST (textlink-1 0 -w80 -r textlink.h5) + ADD_H5_TEST (textlinksrc-1 0 -w80 --follow-symlinks -r textlinksrc.h5) + ADD_H5_TEST (textlinksrc-2 0 -w80 --follow-symlinks -rv textlinksrc.h5/ext_link5) + ADD_H5_TEST (textlinksrc-3 0 -w80 --follow-symlinks -r textlinksrc.h5/ext_link1) + ADD_H5_TEST (textlinksrc-4 0 -w80 -r textlinksrc.h5) + ADD_H5_TEST (textlinksrc-5 0 -w80 -r textlinksrc.h5/ext_link1) + ADD_H5_TEST (textlinksrc-6 0 -w80 --follow-symlinks textlinksrc.h5) + ADD_H5_TEST (textlinksrc-7 0 -w80 --follow-symlinks textlinksrc.h5/ext_link1) + ADD_H5_TEST (tudlink-1 0 -w80 -r tudlink.h5) + + # test for displaying external links with -E + # the option -E will be depriciated but keep it for backward compatibility + ADD_H5_TEST (textlinksrc-1-old 0 -w80 -Er textlinksrc.h5) + ADD_H5_TEST (textlinksrc-2-old 0 -w80 -Erv textlinksrc.h5/ext_link5) + ADD_H5_TEST (textlinksrc-3-old 0 -w80 -Er textlinksrc.h5/ext_link1) + ADD_H5_TEST (textlinksrc-6-old 0 -w80 -E textlinksrc.h5) + ADD_H5_TEST (textlinksrc-7-old 0 -w80 -E textlinksrc.h5/ext_link1) + + # tests for no-dangling-links + # if this option is given on dangling link, h5ls should return exit code 1 + # when used alone , expect to print out help and return exit code 1 + ADD_H5_TEST (textlinksrc-nodangle-1 1 -w80 --no-dangling-links textlinksrc.h5) + # external dangling link - expected exit code 1 + ADD_H5_TEST (textlinksrc-nodangle-2 1 -w80 --follow-symlinks --no-dangling-links textlinksrc.h5) + # soft dangling link - expected exit code 1 + ADD_H5_TEST (tsoftlinks-nodangle-1 1 -w80 --follow-symlinks --no-dangling-links tsoftlinks.h5) + # when used file with no dangling links - expected exit code 0 + ADD_H5_TEST (thlinks-nodangle-1 0 -w80 --follow-symlinks --no-dangling-links thlink.h5) + +# test for wildcards in filename (does not work with cmake) +# ADD_H5_TEST (tstarfile 0 -w80 t*link.h5) +# ADD_H5_TEST (tqmarkfile 0 -w80 t?link.h5) + ADD_H5_TEST (tmultifile 0 -w80 thlink.h5 tslink.h5) + + # tests for hard links + ADD_H5_TEST (thlink-1 0 -w80 thlink.h5) + + # tests for compound data types + ADD_H5_TEST (tcomp-1 0 -w80 -r -d tcompound.h5) + + #test for the nested compound type + ADD_H5_TEST (tnestcomp-1 0 -w80 -r -d tnestedcomp.h5) + + ADD_H5_TEST (tnestcomp-2 0 -w80 -r -d -S tnestedcomp.h5) + + ADD_H5_TEST (tnestcomp-3 0 -w80 -r -d -l tnestedcomp.h5) + + ADD_H5_TEST (tnestcomp-4 0 -w80 -r -d -l -S tnestedcomp.h5) + + # test for loop detection + ADD_H5_TEST (tloop-1 0 -w80 -r -d tloop.h5) + + # test for string + ADD_H5_TEST (tstr-1 0 -w80 -r -d tstr.h5) + + # test test file created from lib SAF team + ADD_H5_TEST (tsaf 0 -w80 -r -d tsaf.h5) + + # test for variable length data types + ADD_H5_TEST (tvldtypes1 0 -w80 -r -d tvldtypes1.h5) + + # test for array data types + ADD_H5_TEST (tarray1 0 -w80 -r -d tarray1.h5) + + # test for empty data + ADD_H5_TEST (tempty 0 -w80 -d tempty.h5) + + # test for all dataset types written to attributes + # enable -S for avoiding printing NATIVE types + ADD_H5_TEST (tattr2 0 -w80 -v -S tattr2.h5) + + # test for attribute with region references wo verbose mode + # ( HDFFV-7838, ) + IF (H5_WORDS_BIGENDIAN) + ADD_H5_TEST (tattrreg_be 0 -w80 -v -d tattrreg.h5) + ELSE (H5_WORDS_BIGENDIAN) + ADD_H5_TEST (tattrreg_le 0 -w80 -v -d tattrreg.h5) + ENDIF (H5_WORDS_BIGENDIAN) + + # test for non-existing file + ADD_H5_TEST (nosuchfile 1 nosuchfile.h5) + + # test for variable length data types in verbose mode + IF (H5_WORDS_BIGENDIAN) + ADD_H5_TEST (tvldtypes2be 0 -v tvldtypes1.h5) + ELSE (H5_WORDS_BIGENDIAN) + ADD_H5_TEST (tvldtypes2le 0 -v tvldtypes1.h5) + ENDIF (H5_WORDS_BIGENDIAN) + + # test for dataset region references data types in verbose mode + IF (H5_WORDS_BIGENDIAN) + ADD_H5_TEST (tdataregbe 0 -v tdatareg.h5) + ELSE (H5_WORDS_BIGENDIAN) + ADD_H5_TEST (tdataregle 0 -v tdatareg.h5) + ENDIF (H5_WORDS_BIGENDIAN) diff --git a/tools/h5repack/CMakeLists.txt b/tools/h5repack/CMakeLists.txt index 7d251ac..f03ad69 100644 --- a/tools/h5repack/CMakeLists.txt +++ b/tools/h5repack/CMakeLists.txt @@ -28,12 +28,6 @@ SET_TARGET_PROPERTIES (h5repack PROPERTIES FOLDER tools) SET (H5_DEP_EXECUTABLES h5repack) -############################################################################## -############################################################################## -### T E S T I N G ### -############################################################################## -############################################################################## - IF (BUILD_TESTING) # -------------------------------------------------------------------- # Add h5Repack test executables @@ -50,936 +44,7 @@ IF (BUILD_TESTING) TARGET_LINK_LIBRARIES (h5repacktest ${HDF5_TOOLS_LIB_TARGET} ${HDF5_TEST_LIB_TARGET}) SET_TARGET_PROPERTIES (h5repacktest PROPERTIES FOLDER tools) - IF (HDF5_TEST_VFD) - SET (VFD_LIST - sec2 - stdio - core - split - multi - family - ) - - IF (DIRECT_VFD) - SET (VFD_LIST ${VFD_LIST} direct) - ENDIF (DIRECT_VFD) - - MACRO (ADD_VFD_TEST vfdname resultcode) - ADD_TEST ( - NAME H5REPACK-VFD-${vfdname}-h5repacktest - COMMAND "${CMAKE_COMMAND}" - -D "TEST_PROGRAM=$" - -D "TEST_ARGS:STRING=" - -D "TEST_VFD:STRING=${vfdname}" - -D "TEST_EXPECT=${resultcode}" - -D "TEST_OUTPUT=h5repacktest" - -D "TEST_FOLDER=${PROJECT_BINARY_DIR}" - -P "${HDF5_RESOURCES_DIR}/vfdTest.cmake" - ) - IF (NOT "${last_test}" STREQUAL "") - SET_TESTS_PROPERTIES (H5REPACK-VFD-${vfdname}-h5repacktest PROPERTIES DEPENDS ${last_test}) - ENDIF (NOT "${last_test}" STREQUAL "") - SET (last_test "H5REPACK-VFD-${vfdname}-h5repacktest") - ENDMACRO (ADD_VFD_TEST) - ENDIF (HDF5_TEST_VFD) - - # -------------------------------------------------------------------- - # Copy all the HDF5 files from the source directory into the test directory - # -------------------------------------------------------------------- - SET (LIST_HDF5_TEST_FILES - ${HDF5_TOOLS_H5REPACK_SOURCE_DIR}/testfiles/h5repack_attr.h5 - ${HDF5_TOOLS_H5REPACK_SOURCE_DIR}/testfiles/h5repack_attr_refs.h5 - ${HDF5_TOOLS_H5REPACK_SOURCE_DIR}/testfiles/h5repack_deflate.h5 - ${HDF5_TOOLS_H5REPACK_SOURCE_DIR}/testfiles/h5repack_early.h5 - ${HDF5_TOOLS_H5REPACK_SOURCE_DIR}/testfiles/h5repack_ext.h5 - ${HDF5_TOOLS_H5REPACK_SOURCE_DIR}/testfiles/h5repack_fill.h5 - ${HDF5_TOOLS_H5REPACK_SOURCE_DIR}/testfiles/h5repack_filters.h5 - ${HDF5_TOOLS_H5REPACK_SOURCE_DIR}/testfiles/h5repack_fletcher.h5 - ${HDF5_TOOLS_H5REPACK_SOURCE_DIR}/testfiles/h5repack_hlink.h5 - ${HDF5_TOOLS_H5REPACK_SOURCE_DIR}/testfiles/h5repack_layout.h5 - ${HDF5_TOOLS_H5REPACK_SOURCE_DIR}/testfiles/h5repack_layouto.h5 - ${HDF5_TOOLS_H5REPACK_SOURCE_DIR}/testfiles/h5repack_layout2.h5 - ${HDF5_TOOLS_H5REPACK_SOURCE_DIR}/testfiles/h5repack_layout3.h5 - ${HDF5_TOOLS_H5REPACK_SOURCE_DIR}/testfiles/h5repack_named_dtypes.h5 - ${HDF5_TOOLS_H5REPACK_SOURCE_DIR}/testfiles/h5repack_nbit.h5 - ${HDF5_TOOLS_H5REPACK_SOURCE_DIR}/testfiles/h5repack_objs.h5 - ${HDF5_TOOLS_H5REPACK_SOURCE_DIR}/testfiles/h5repack_refs.h5 - ${HDF5_TOOLS_H5REPACK_SOURCE_DIR}/testfiles/h5repack_shuffle.h5 - ${HDF5_TOOLS_H5REPACK_SOURCE_DIR}/testfiles/h5repack_soffset.h5 - ${HDF5_TOOLS_H5REPACK_SOURCE_DIR}/testfiles/h5repack_szip.h5 - # h5diff/testfile - ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_attr1.h5 - # tools/testfiles - ${HDF5_TOOLS_SRC_DIR}/testfiles/tfamily00000.h5 - ${HDF5_TOOLS_SRC_DIR}/testfiles/tfamily00001.h5 - ${HDF5_TOOLS_SRC_DIR}/testfiles/tfamily00002.h5 - ${HDF5_TOOLS_SRC_DIR}/testfiles/tfamily00003.h5 - ${HDF5_TOOLS_SRC_DIR}/testfiles/tfamily00004.h5 - ${HDF5_TOOLS_SRC_DIR}/testfiles/tfamily00005.h5 - ${HDF5_TOOLS_SRC_DIR}/testfiles/tfamily00006.h5 - ${HDF5_TOOLS_SRC_DIR}/testfiles/tfamily00007.h5 - ${HDF5_TOOLS_SRC_DIR}/testfiles/tfamily00008.h5 - ${HDF5_TOOLS_SRC_DIR}/testfiles/tfamily00009.h5 - ${HDF5_TOOLS_SRC_DIR}/testfiles/tfamily00010.h5 - ) - - SET (LIST_OTHER_TEST_FILES - ${HDF5_TOOLS_H5REPACK_SOURCE_DIR}/testfiles/h5repack_ext.bin - ${HDF5_TOOLS_H5REPACK_SOURCE_DIR}/testfiles/ublock.bin - ${HDF5_TOOLS_H5REPACK_SOURCE_DIR}/testfiles/h5repack.info - # tools/testfiles - ${HDF5_TOOLS_SRC_DIR}/testfiles/h5repack_filters.h5.ddl - ) - - FOREACH (h5_file ${LIST_HDF5_TEST_FILES} ${LIST_OTHER_TEST_FILES}) - GET_FILENAME_COMPONENT(fname "${h5_file}" NAME) - SET (dest "${PROJECT_BINARY_DIR}/testfiles/${fname}") - #MESSAGE (STATUS " Copying ${h5_file}") - ADD_CUSTOM_COMMAND ( - TARGET h5repack - POST_BUILD - COMMAND ${CMAKE_COMMAND} - ARGS -E copy_if_different ${h5_file} ${dest} - ) - ENDFOREACH (h5_file ${LIST_HDF5_TEST_FILES} ${LIST_OTHER_TEST_FILES}) - -############################################################################## -############################################################################## -### T H E T E S T S M A C R O S ### -############################################################################## -############################################################################## - - MACRO (ADD_H5_TEST_OLD testname testtype testfile) - IF (${testtype} STREQUAL "SKIP") - IF (NOT HDF5_ENABLE_USING_MEMCHECKER) - ADD_TEST ( - NAME H5REPACK_OLD-${testname}-SKIPPED - COMMAND ${CMAKE_COMMAND} -E echo "SKIP ${ARGN} -i ${PROJECT_BINARY_DIR}/testfiles/${testfile} -o ${PROJECT_BINARY_DIR}/testfiles/out-${testname}.${testfile}" - ) - ENDIF (NOT HDF5_ENABLE_USING_MEMCHECKER) - ELSE (${testtype} STREQUAL "SKIP") - ADD_TEST ( - NAME H5REPACK_OLD-${testname} - COMMAND $ ${ARGN} -i ${PROJECT_BINARY_DIR}/testfiles/${testfile} -o ${PROJECT_BINARY_DIR}/testfiles/out-${testname}.${testfile} - ) - IF (NOT "${last_test}" STREQUAL "") - SET_TESTS_PROPERTIES (H5REPACK_OLD-${testname} PROPERTIES DEPENDS ${last_test}) - ENDIF (NOT "${last_test}" STREQUAL "") - ADD_TEST ( - NAME H5REPACK_OLD-${testname}_DFF - COMMAND $ ${PROJECT_BINARY_DIR}/testfiles/${testfile} ${PROJECT_BINARY_DIR}/testfiles/out-${testname}.${testfile} - ) - SET_TESTS_PROPERTIES (H5REPACK_OLD-${testname}_DFF PROPERTIES DEPENDS H5REPACK_OLD-${testname}) - ENDIF (${testtype} STREQUAL "SKIP") - ENDMACRO (ADD_H5_TEST_OLD) - - MACRO (ADD_H5_TEST testname testtype testfile) - IF (${testtype} STREQUAL "SKIP") - IF (NOT HDF5_ENABLE_USING_MEMCHECKER) - ADD_TEST ( - NAME H5REPACK-${testname}-SKIPPED - COMMAND ${CMAKE_COMMAND} -E echo "SKIP ${ARGN} ${PROJECT_BINARY_DIR}/testfiles/${testfile} ${PROJECT_BINARY_DIR}/testfiles/out-${testname}.${testfile}" - ) - ENDIF (NOT HDF5_ENABLE_USING_MEMCHECKER) - ELSE (${testtype} STREQUAL "SKIP") - ADD_TEST ( - NAME H5REPACK-${testname} - COMMAND $ ${ARGN} ${PROJECT_BINARY_DIR}/testfiles/${testfile} ${PROJECT_BINARY_DIR}/testfiles/out-${testname}.${testfile} - ) - IF (NOT "${last_test}" STREQUAL "") - SET_TESTS_PROPERTIES (H5REPACK-${testname} PROPERTIES DEPENDS ${last_test}) - ENDIF (NOT "${last_test}" STREQUAL "") - ADD_TEST ( - NAME H5REPACK-${testname}_DFF - COMMAND $ ${PROJECT_BINARY_DIR}/testfiles/${testfile} ${PROJECT_BINARY_DIR}/testfiles/out-${testname}.${testfile} - ) - SET_TESTS_PROPERTIES (H5REPACK-${testname}_DFF PROPERTIES DEPENDS H5REPACK-${testname}) - ENDIF (${testtype} STREQUAL "SKIP") - ENDMACRO (ADD_H5_TEST) - - MACRO (ADD_H5_CMP_TEST testname testfilter testtype resultcode resultfile) - IF (${testtype} STREQUAL "SKIP") - IF (NOT HDF5_ENABLE_USING_MEMCHECKER) - ADD_TEST ( - NAME H5REPACK_CMP-${testname}-SKIPPED - COMMAND ${CMAKE_COMMAND} -E echo "SKIP ${ARGN} ${PROJECT_BINARY_DIR}/testfiles/${resultfile} ${PROJECT_BINARY_DIR}/testfiles/out-${testname}.${resultfile}" - ) - ENDIF (NOT HDF5_ENABLE_USING_MEMCHECKER) - ELSE (${testtype} STREQUAL "SKIP") - # If using memchecker add tests without using scripts - IF (HDF5_ENABLE_USING_MEMCHECKER) - ADD_TEST (NAME H5REPACK_CMP-${testname} COMMAND $ ${ARGN} testfiles/${resultfile} testfiles/out-${testname}.${resultfile}) - ELSE (HDF5_ENABLE_USING_MEMCHECKER) - ADD_TEST ( - NAME H5REPACK_CMP-${testname} - COMMAND "${CMAKE_COMMAND}" - -D "TEST_PROGRAM=$" - -D "TEST_ARGS:STRING=${ARGN};testfiles/${resultfile};testfiles/out-${testname}.${resultfile}" - -D "TEST_FOLDER=${PROJECT_BINARY_DIR}" - -D "TEST_OUTPUT=./testfiles/${resultfile}-${testname}.out" - -D "TEST_EXPECT=${resultcode}" - -D "TEST_FILTER:STRING=${testfilter}" - -D "TEST_REFERENCE=testfiles/${resultfile}.ddl" - -P "${HDF5_RESOURCES_DIR}/runTest.cmake" - ) - ENDIF (HDF5_ENABLE_USING_MEMCHECKER) - IF (NOT "${last_test}" STREQUAL "") - SET_TESTS_PROPERTIES (H5REPACK_CMP-${testname} PROPERTIES DEPENDS ${last_test}) - ENDIF (NOT "${last_test}" STREQUAL "") - ENDIF (${testtype} STREQUAL "SKIP") - ENDMACRO (ADD_H5_CMP_TEST) - - MACRO (ADD_H5_VERIFY_TEST testname testtype resultcode testfile testdset testfilter) - IF (${testtype} STREQUAL "SKIP") - IF (NOT HDF5_ENABLE_USING_MEMCHECKER) - ADD_TEST ( - NAME H5REPACK_VERIFY_LAYOUT-${testname}-SKIPPED - COMMAND ${CMAKE_COMMAND} -E echo "SKIP -d ${testdset} -pH ${PROJECT_BINARY_DIR}/testfiles/out-${testname}.${resultfile}" - ) - ENDIF (NOT HDF5_ENABLE_USING_MEMCHECKER) - ELSE (${testtype} STREQUAL "SKIP") - IF (NOT HDF5_ENABLE_USING_MEMCHECKER) - ADD_TEST ( - NAME H5REPACK_VERIFY_LAYOUT-${testname} - COMMAND $ ${ARGN} ${PROJECT_BINARY_DIR}/testfiles/${testfile} ${PROJECT_BINARY_DIR}/testfiles/out-${testname}.${testfile} - ) - IF (NOT "${last_test}" STREQUAL "") - SET_TESTS_PROPERTIES (H5REPACK_VERIFY_LAYOUT-${testname} PROPERTIES DEPENDS ${last_test}) - ENDIF (NOT "${last_test}" STREQUAL "") - ADD_TEST ( - NAME H5REPACK_VERIFY_LAYOUT-${testname}_DFF - COMMAND $ ${PROJECT_BINARY_DIR}/testfiles/${testfile} ${PROJECT_BINARY_DIR}/testfiles/out-${testname}.${testfile} - ) - SET_TESTS_PROPERTIES (H5REPACK_VERIFY_LAYOUT-${testname}_DFF PROPERTIES DEPENDS H5REPACK_VERIFY_LAYOUT-${testname}) - IF (${resultcode} STREQUAL "0") - ADD_TEST ( - NAME H5REPACK_VERIFY_LAYOUT-${testname}_DMP - COMMAND "${CMAKE_COMMAND}" - -D "TEST_PROGRAM=$" - -D "TEST_ARGS:STRING=-d;${testdset};-pH;testfiles/out-${testname}.${testfile}" - -D "TEST_FOLDER=${PROJECT_BINARY_DIR}" - -D "TEST_OUTPUT=./testfiles/${testfile}-${testname}-v.out" - -D "TEST_EXPECT=${resultcode}" - -D "TEST_FILTER:STRING=${testfilter}" - -D "TEST_REFERENCE=${testfilter}" - -P "${HDF5_RESOURCES_DIR}/grepTest.cmake" - ) - SET_TESTS_PROPERTIES (H5REPACK_VERIFY_LAYOUT-${testname}_DMP PROPERTIES DEPENDS H5REPACK_VERIFY_LAYOUT-${testname}_DFF) - ELSE (${resultcode} STREQUAL "0") - IF (${testfilter} STREQUAL "CHUNKED") - SET (nottestfilter "(CONTIGUOUS|COMPACT)") - ENDIF (${testfilter} STREQUAL "CHUNKED") - IF (${testfilter} STREQUAL "CONTIGUOUS") - SET (nottestfilter "(CHUNK|COMPACT)") - ENDIF (${testfilter} STREQUAL "CONTIGUOUS") - IF (${testfilter} STREQUAL "COMPACT") - SET (nottestfilter "(CONTIGUOUS|CHUNK)") - ENDIF (${testfilter} STREQUAL "COMPACT") - ADD_TEST ( - NAME H5REPACK_VERIFY_LAYOUT-${testname}_DMP - COMMAND "${CMAKE_COMMAND}" - -D "TEST_PROGRAM=$" - -D "TEST_ARGS:STRING=-pH;testfiles/out-${testname}.${testfile}" - -D "TEST_FOLDER=${PROJECT_BINARY_DIR}" - -D "TEST_OUTPUT=./testfiles/${testfile}-${testname}-v.out" - -D "TEST_EXPECT=${resultcode}" - -D "TEST_FILTER:STRING=${nottestfilter}" - -D "TEST_REFERENCE=${testfilter}" - -P "${HDF5_RESOURCES_DIR}/grepTest.cmake" - ) - SET_TESTS_PROPERTIES (H5REPACK_VERIFY_LAYOUT-${testname}_DMP PROPERTIES DEPENDS H5REPACK_VERIFY_LAYOUT-${testname}_DFF) - ENDIF (${resultcode} STREQUAL "0") - ENDIF (NOT HDF5_ENABLE_USING_MEMCHECKER) - ENDIF (${testtype} STREQUAL "SKIP") - ENDMACRO (ADD_H5_VERIFY_TEST) - - MACRO (ADD_H5_TEST_META testname testfile) - ADD_TEST ( - NAME H5REPACK_META-${testname}_N - COMMAND $ ${PROJECT_BINARY_DIR}/testfiles/${testfile} ${PROJECT_BINARY_DIR}/testfiles/out-${testname}_N.${testname}.h5 - ) - IF (NOT "${last_test}" STREQUAL "") - SET_TESTS_PROPERTIES (H5REPACK_META-${testname}_N PROPERTIES DEPENDS ${last_test}) - ENDIF (NOT "${last_test}" STREQUAL "") - ADD_TEST ( - NAME H5REPACK_META-${testname}_M - COMMAND $ ${ARGN} ${PROJECT_BINARY_DIR}/testfiles/${testfile} ${PROJECT_BINARY_DIR}/testfiles/out-${testname}_M.${testname}.h5 - ) - SET_TESTS_PROPERTIES (H5REPACK_META-${testname}_M PROPERTIES DEPENDS H5REPACK_META-${testname}_N) - - ADD_TEST (NAME H5REPACK_META-${testname} COMMAND ${CMAKE_COMMAND} -E compare_files ${PROJECT_BINARY_DIR}/testfiles/out-${testname}_N.${testname}.h5 ${PROJECT_BINARY_DIR}/testfiles/out-${testname}_M.${testname}.h5) - SET_TESTS_PROPERTIES (H5REPACK_META-${testname} PROPERTIES WILL_FAIL "true") - SET_TESTS_PROPERTIES (H5REPACK_META-${testname} PROPERTIES DEPENDS H5REPACK_META-${testname}_M) - ENDMACRO (ADD_H5_TEST_META) - -############################################################################## -############################################################################## -### T H E T E S T S ### -############################################################################## -############################################################################## - - # -------------------------------------------------------------------- - # test file names - # -------------------------------------------------------------------- - SET (INFO_FILE testfiles/h5repack.info) - - SET (FILE0 h5repack_fill.h5) - SET (FILE1 h5repack_objs.h5) - SET (FILE2 h5repack_attr.h5) - SET (FILE3 h5repack_hlink.h5) - SET (FILE4 h5repack_layout.h5) - SET (FILE5 h5repack_early.h5) - SET (FILE7 h5repack_szip.h5) - SET (FILE8 h5repack_deflate.h5) - SET (FILE9 h5repack_shuffle.h5) - SET (FILE10 h5repack_fletcher.h5) - SET (FILE11 h5repack_filters.h5) - SET (FILE12 h5repack_nbit.h5) - SET (FILE13 h5repack_soffset.h5) - SET (FILE14 h5repack_layouto.h5 ) # A file with an older version of the layout message (copy of test/tlayouto.h5) - SET (FILE15 h5repack_named_dtypes.h5) - SET (FILE16 tfamily%05d.h5) # located in common testfiles folder - SET (FILE18 h5repack_layout2.h5) - SET (FILE_REF h5repack_refs.h5) - SET (FILE_ATTR_REF h5repack_attr_refs.h5) - - # Remove any output file left over from previous test run - ADD_TEST ( - NAME H5REPACK-clearall-objects - COMMAND ${CMAKE_COMMAND} - -E remove - ./testfiles/h5repack_filters.h5-gzip_verbose_filters.out - ./testfiles/h5repack_filters.h5-gzip_verbose_filters.out.err - ./testfiles/h5repack_layout.h5-chunk_18x13-v.out - ./testfiles/h5repack_layout.h5-chunk_18x13-v.out.err - ./testfiles/h5repack_layout.h5-chunk_20x10-v.out - ./testfiles/h5repack_layout.h5-chunk_20x10-v.out.err - ./testfiles/h5repack_layout.h5-chunk_compa-v.out - ./testfiles/h5repack_layout.h5-chunk_compa-v.out.err - ./testfiles/h5repack_layout.h5-chunk_conti-v.out - ./testfiles/h5repack_layout.h5-chunk_conti-v.out.err - ./testfiles/h5repack_layout.h5-compa-v.out - ./testfiles/h5repack_layout.h5-compa-v.out.err - ./testfiles/h5repack_layout.h5-conti-v.out - ./testfiles/h5repack_layout.h5-conti-v.out.err - ./testfiles/h5repack_layout.h5-dset2_chunk_20x10-v.out - ./testfiles/h5repack_layout.h5-dset2_chunk_20x10-v.out.err - ./testfiles/h5repack_layout.h5-dset2_compa-v.out - ./testfiles/h5repack_layout.h5-dset2_compa-v.out.err - ./testfiles/h5repack_layout.h5-dset2_conti-v.out - ./testfiles/h5repack_layout.h5-dset2_conti-v.out.err - ./testfiles/h5repack_layout.h5-dset_compa_chunk-v.out - ./testfiles/h5repack_layout.h5-dset_compa_chunk-v.out.err - ./testfiles/h5repack_layout.h5-dset_compa_compa-v.out - ./testfiles/h5repack_layout.h5-dset_compa_compa-v.out.err - ./testfiles/h5repack_layout.h5-dset_compa_conti-v.out - ./testfiles/h5repack_layout.h5-dset_compa_conti-v.out.err - ./testfiles/h5repack_layout.h5-dset_conti_chunk-v.out - ./testfiles/h5repack_layout.h5-dset_conti_chunk-v.out.err - ./testfiles/h5repack_layout.h5-dset_conti_compa-v.out - ./testfiles/h5repack_layout.h5-dset_conti_compa-v.out.err - ./testfiles/h5repack_layout.h5-dset_conti_conti-v.out - ./testfiles/h5repack_layout.h5-dset_conti_conti-v.out.err - ./testfiles/h5repack_layout.h5-layout_long_switches-v.out - ./testfiles/h5repack_layout.h5-layout_long_switches-v.out.err - ./testfiles/h5repack_layout.h5-layout_short_switches-v.out - ./testfiles/h5repack_layout.h5-layout_short_switches-v.out.err - ./testfiles/h5repack_layout2.h5-contig_small_compa-v.out - ./testfiles/h5repack_layout2.h5-contig_small_compa-v.out.err - ./testfiles/h5repack_layout2.h5-contig_small_fixed_compa-v.out - ./testfiles/h5repack_layout2.h5-contig_small_fixed_compa-v.out.err - ./testfiles/h5repack_layout3.h5-chunk2chunk-v.out - ./testfiles/h5repack_layout3.h5-chunk2chunk-v.out.err - ./testfiles/h5repack_layout3.h5-chunk2compa-v.out - ./testfiles/h5repack_layout3.h5-chunk2compa-v.out.err - ./testfiles/h5repack_layout3.h5-chunk2conti-v.out - ./testfiles/h5repack_layout3.h5-chunk2conti-v.out.err - ./testfiles/h5repack_layout3.h5-error1-v.out - ./testfiles/h5repack_layout3.h5-error1-v.out.err - ./testfiles/h5repack_layout3.h5-error2-v.out - ./testfiles/h5repack_layout3.h5-error2-v.out.err - ./testfiles/h5repack_layout3.h5-error3-v.out - ./testfiles/h5repack_layout3.h5-error3-v.out.err - ./testfiles/out-family.tfamily%05d.h5 - ./testfiles/out-HDFFV-7840.h5diff_attr1.h5 - ./testfiles/out-attr.h5repack_attr.h5 - ./testfiles/out-native_attr.h5repack_attr.h5 - ./testfiles/out-HDFFV-5932.h5repack_attr_refs.h5 - ./testfiles/out-deflate_copy.h5repack_deflate.h5 - ./testfiles/out-deflate_remove.h5repack_deflate.h5 - ./testfiles/out-early.h5repack_early.h5 - ./testfiles/out-fill.h5repack_fill.h5 - ./testfiles/out-native_fill.h5repack_fill.h5 - ./testfiles/out-gzip_verbose_filters.h5repack_filters.h5 - ./testfiles/out-fletcher_copy.h5repack_fletcher.h5 - ./testfiles/out-fletcher_remove.h5repack_fletcher.h5 - ./testfiles/out-hlink.h5repack_hlink.h5 - ./testfiles/out-chunk_18x13.h5repack_layout.h5 - ./testfiles/out-chunk_20x10.h5repack_layout.h5 - ./testfiles/out-chunk_compa.h5repack_layout.h5 - ./testfiles/out-chunk_conti.h5repack_layout.h5 - ./testfiles/out-compa.h5repack_layout.h5 - ./testfiles/out-conti.h5repack_layout.h5 - ./testfiles/out-deflate_file.h5repack_layout.h5 - ./testfiles/out-deflate_limit.h5repack_layout.h5 - ./testfiles/out-dset2_chunk_20x10.h5repack_layout.h5 - ./testfiles/out-dset2_compa.h5repack_layout.h5 - ./testfiles/out-dset2_conti.h5repack_layout.h5 - ./testfiles/out-dset_compa_chunk.h5repack_layout.h5 - ./testfiles/out-dset_compa_compa.h5repack_layout.h5 - ./testfiles/out-dset_compa_conti.h5repack_layout.h5 - ./testfiles/out-dset_conti_chunk.h5repack_layout.h5 - ./testfiles/out-dset_conti_compa.h5repack_layout.h5 - ./testfiles/out-dset_conti_conti.h5repack_layout.h5 - ./testfiles/out-fletcher_all.h5repack_layout.h5 - ./testfiles/out-fletcher_individual.h5repack_layout.h5 - ./testfiles/out-global_filters.h5repack_layout.h5 - ./testfiles/out-gzip_all.h5repack_layout.h5 - ./testfiles/out-gzip_individual.h5repack_layout.h5 - ./testfiles/out-layout.h5repack_layout.h5 - ./testfiles/out-layout_long_switches.h5repack_layout.h5 - ./testfiles/out-layout_short_switches.h5repack_layout.h5 - ./testfiles/out-old_style_layout_short_switches.h5repack_layout.h5 - ./testfiles/out-shuffle_all.h5repack_layout.h5 - ./testfiles/out-shuffle_individual.h5repack_layout.h5 - ./testfiles/out-upgrade_layout.h5repack_layouto.h5 - ./testfiles/out-contig_small_compa.h5repack_layout2.h5 - ./testfiles/out-contig_small_fixed_compa.h5repack_layout2.h5 - ./testfiles/out-chunk2chunk.h5repack_layout3.h5 - ./testfiles/out-chunk2compa.h5repack_layout3.h5 - ./testfiles/out-chunk2conti.h5repack_layout3.h5 - ./testfiles/out-error1.h5repack_layout3.h5 - ./testfiles/out-error2.h5repack_layout3.h5 - ./testfiles/out-error3.h5repack_layout3.h5 - ./testfiles/out-error4.h5repack_layout3.h5 - ./testfiles/out-committed_dt.h5repack_named_dtypes.h5 - ./testfiles/out-nbit_add.h5repack_nbit.h5 - ./testfiles/out-nbit_copy.h5repack_nbit.h5 - ./testfiles/out-nbit_remove.h5repack_nbit.h5 - ./testfiles/out-add_alignment.h5repack_objs.h5 - ./testfiles/out-add_userblock.h5repack_objs.h5 - ./testfiles/out-objs.h5repack_objs.h5 - ./testfiles/out-gt_mallocsize.h5repack_objs.h5 - ./testfiles/out-bug1814.h5repack_refs.h5 - ./testfiles/out-shuffle_copy.h5repack_shuffle.h5 - ./testfiles/out-shuffle_remove.h5repack_shuffle.h5 - ./testfiles/out-scale_add.h5repack_soffset.h5 - ./testfiles/out-scale_copy.h5repack_soffset.h5 - ./testfiles/out-scale_remove.h5repack_soffset.h5 - ./testfiles/out-meta_short_M.meta_short.h5 - ./testfiles/out-meta_short_N.meta_short.h5 - ./testfiles/out-meta_long_M.meta_long.h5 - ./testfiles/out-meta_long_N.meta_long.h5 - # from the h5repacktst - h5repack_attr.h5 - h5repack_attr_out.h5 - h5repack_attr_refs.h5 - h5repack_big.h5 - h5repack_deflate.h5 - h5repack_deflate_out.h5 - h5repack_early2.h5 - h5repack_early.h5 - h5repack_early_out.h5 - h5repack_ext.h5 - h5repack_ext_out.h5 - h5repack_fill.h5 - h5repack_fill_out.h5 - h5repack_filters.h5 - h5repack_filters_out.h5 - h5repack_fletcher.h5 - h5repack_fletcher_out.h5 - h5repack_hlink.h5 - h5repack_hlink_out.h5 - h5repack_layout.h5 - h5repack_layout_out.h5 - h5repack_layout2.h5 - h5repack_layout3.h5 - h5repack_named_dtypes.h5 - h5repack_named_dtypes_out.h5 - h5repack_nbit.h5 - h5repack_nbit_out.h5 - h5repack_objs.h5 - h5repack_objs_out.h5 - h5repack_refs.h5 - h5repack_shuffle.h5 - h5repack_shuffle_out.h5 - h5repack_soffset.h5 - h5repack_soffset_out.h5 - h5repack_szip.h5 - h5repack_szip_out.h5 - h5repack_ub.h5 - h5repack_ub_out.h5 - h5repack_ext.bin - ublock.bin - ) - IF (NOT "${last_test}" STREQUAL "") - SET_TESTS_PROPERTIES (H5REPACK-clearall-objects PROPERTIES DEPENDS ${last_test}) - ENDIF (NOT "${last_test}" STREQUAL "") - - ADD_TEST (NAME H5REPACK-testh5repack_detect_szip COMMAND $) - IF (HDF5_ENABLE_SZIP_SUPPORT) - IF (HDF5_ENABLE_SZIP_ENCODING) - SET (passRegex "yes") - SET_TESTS_PROPERTIES (H5REPACK-testh5repack_detect_szip PROPERTIES PASS_REGULAR_EXPRESSION "yes") - ELSE (HDF5_ENABLE_SZIP_ENCODING) - SET (passRegex "no") - SET_TESTS_PROPERTIES (H5REPACK-testh5repack_detect_szip PROPERTIES PASS_REGULAR_EXPRESSION "no") - ENDIF (HDF5_ENABLE_SZIP_ENCODING) - ELSE (HDF5_ENABLE_SZIP_SUPPORT) - SET (passRegex "no") - SET_TESTS_PROPERTIES (H5REPACK-testh5repack_detect_szip PROPERTIES PASS_REGULAR_EXPRESSION "no") - ENDIF (HDF5_ENABLE_SZIP_SUPPORT) - SET_TESTS_PROPERTIES (H5REPACK-testh5repack_detect_szip PROPERTIES DEPENDS H5REPACK-clearall-objects) - - ADD_TEST (NAME H5REPACK-h5repacktest COMMAND $) - SET_TESTS_PROPERTIES (H5REPACK-h5repacktest PROPERTIES DEPENDS H5REPACK-testh5repack_detect_szip) - SET (last_test "H5REPACK-h5repacktest") - -# -# The tests -# We use the files generated by h5repacktst -# Each run generates ".out.h5" and the tool h5diff is used to -# compare the input and output files -# -# the tests are the same as the program h5repacktst, but run from the CLI -# - -# See which filters are usable (and skip tests for filters we -# don't have). Do this by searching H5pubconf.h to see which -# filters are defined. - -# detect whether the encoder is present. - SET (USE_FILTER_SZIP_ENCODER "no") - IF (HDF5_ENABLE_SZIP_ENCODING) - SET (USE_FILTER_SZIP_ENCODER ${testh5repack_detect_szip}) - ENDIF (HDF5_ENABLE_SZIP_ENCODING) - - IF (H5_HAVE_FILTER_DEFLATE) - SET (USE_FILTER_DEFLATE "true") - ENDIF (H5_HAVE_FILTER_DEFLATE) - - IF (H5_HAVE_FILTER_SZIP) - SET (USE_FILTER_SZIP "true") - ENDIF (H5_HAVE_FILTER_SZIP) - - IF (H5_HAVE_FILTER_SHUFFLE) - SET (USE_FILTER_SHUFFLE "true") - ENDIF (H5_HAVE_FILTER_SHUFFLE) - - IF (H5_HAVE_FILTER_FLETCHER32) - SET (USE_FILTER_FLETCHER32 "true") - ENDIF (H5_HAVE_FILTER_FLETCHER32) - - IF (H5_HAVE_FILTER_NBIT) - SET (USE_FILTER_NBIT "true") - ENDIF (H5_HAVE_FILTER_NBIT) - - IF (H5_HAVE_FILTER_SCALEOFFSET) - SET (USE_FILTER_SCALEOFFSET "true") - ENDIF (H5_HAVE_FILTER_SCALEOFFSET) - -# copy files (these files have no filters) - ADD_H5_TEST (fill "TEST" ${FILE0}) - ADD_H5_TEST (objs "TEST" ${FILE1}) - ADD_H5_TEST (attr "TEST" ${FILE2}) - ADD_H5_TEST (hlink "TEST" ${FILE3}) - ADD_H5_TEST (layout "TEST" ${FILE4}) - ADD_H5_TEST (early "TEST" ${FILE5}) - -# use $FILE4 to write some filters (this file has no filters) - -# gzip with individual object - SET (arg ${FILE4} -f dset1:GZIP=1 -l dset1:CHUNK=20x10) - SET (TESTTYPE "TEST") - IF (NOT USE_FILTER_DEFLATE) - SET (TESTTYPE "SKIP") - ENDIF (NOT USE_FILTER_DEFLATE) - ADD_H5_TEST (gzip_individual ${TESTTYPE} ${arg}) - -# gzip for all - SET (arg ${FILE4} -f GZIP=1) - SET (TESTTYPE "TEST") - IF (NOT USE_FILTER_DEFLATE) - SET (TESTTYPE "SKIP") - ENDIF (NOT USE_FILTER_DEFLATE) - ADD_H5_TEST (gzip_all ${TESTTYPE} ${arg}) - -# szip with individual object - SET (arg ${FILE4} -f dset2:SZIP=8,EC -l dset2:CHUNK=20x10) - SET (TESTTYPE "TEST") - IF (NOT USE_FILTER_SZIP_ENCODER OR NOT USE_FILTER_SZIP) - SET (TESTTYPE "SKIP") - ENDIF (NOT USE_FILTER_SZIP_ENCODER OR NOT USE_FILTER_SZIP) - ADD_H5_TEST (szip_individual ${TESTTYPE} ${arg}) - -# szip for all - SET (arg ${FILE4} -f SZIP=8,NN) - SET (TESTTYPE "TEST") - IF (NOT USE_FILTER_SZIP_ENCODER OR NOT USE_FILTER_SZIP) - SET (TESTTYPE "SKIP") - ENDIF (NOT USE_FILTER_SZIP_ENCODER OR NOT USE_FILTER_SZIP) - ADD_H5_TEST (szip_all ${TESTTYPE} ${arg}) - -# shuffle with individual object - SET (arg ${FILE4} -f dset2:SHUF -l dset2:CHUNK=20x10) - SET (TESTTYPE "TEST") - IF (NOT USE_FILTER_SHUFFLE) - SET (TESTTYPE "SKIP") - ENDIF (NOT USE_FILTER_SHUFFLE) - ADD_H5_TEST (shuffle_individual ${TESTTYPE} ${arg}) - -# shuffle for all - SET (arg ${FILE4} -f SHUF) - SET (TESTTYPE "TEST") - IF (NOT USE_FILTER_SHUFFLE) - SET (TESTTYPE "SKIP") - ENDIF (NOT USE_FILTER_SHUFFLE) - ADD_H5_TEST (shuffle_all ${TESTTYPE} ${arg}) - -# fletcher32 with individual object - SET (arg ${FILE4} -f dset2:FLET -l dset2:CHUNK=20x10) - SET (TESTTYPE "TEST") - IF (NOT USE_FILTER_FLETCHER32) - SET (TESTTYPE "SKIP") - ENDIF (NOT USE_FILTER_FLETCHER32) - ADD_H5_TEST (fletcher_individual ${TESTTYPE} ${arg}) - -# fletcher32 for all - SET (arg ${FILE4} -f FLET) - SET (TESTTYPE "TEST") - IF (NOT USE_FILTER_FLETCHER32) - SET (TESTTYPE "SKIP") - ENDIF (NOT USE_FILTER_FLETCHER32) - ADD_H5_TEST (fletcher_all ${TESTTYPE} ${arg}) - -# all filters - SET (arg ${FILE4} -f dset2:SHUF -f dset2:FLET -f dset2:SZIP=8,NN -f dset2:GZIP=1 -l dset2:CHUNK=20x10) - SET (TESTTYPE "TEST") - IF (NOT USE_FILTER_SZIP_ENCODER OR NOT USE_FILTER_SZIP OR NOT USE_FILTER_SHUFFLE OR NOT USE_FILTER_FLETCHER32 OR NOT USE_FILTER_DEFLATE) - SET (TESTTYPE "SKIP") - ENDIF (NOT USE_FILTER_SZIP_ENCODER OR NOT USE_FILTER_SZIP OR NOT USE_FILTER_SHUFFLE OR NOT USE_FILTER_FLETCHER32 OR NOT USE_FILTER_DEFLATE) - ADD_H5_TEST (all_filters ${TESTTYPE} ${arg}) - -# verbose gzip with individual object - SET (arg ${FILE11} -v -f /dset_deflate:GZIP=9) - SET (TESTTYPE "TEST") - IF (NOT USE_FILTER_DEFLATE) - SET (TESTTYPE "SKIP") - ENDIF (NOT USE_FILTER_DEFLATE) - ADD_H5_CMP_TEST (gzip_verbose_filters "O?...ing file[^\n]+\n" ${TESTTYPE} 0 ${arg}) - -########################################################### -# the following tests assume the input files have filters -########################################################### - -# szip copy - SET (arg ${FILE7}) - SET (TESTTYPE "TEST") - IF (NOT USE_FILTER_SZIP_ENCODER OR NOT USE_FILTER_SZIP) - SET (TESTTYPE "SKIP") - ENDIF (NOT USE_FILTER_SZIP_ENCODER OR NOT USE_FILTER_SZIP) - ADD_H5_TEST (szip_copy ${TESTTYPE} ${arg}) - -# szip remove - SET (arg ${FILE7} --filter=dset_szip:NONE) - SET (TESTTYPE "TEST") - IF (NOT USE_FILTER_SZIP_ENCODER OR NOT USE_FILTER_SZIP) - SET (TESTTYPE "SKIP") - ENDIF (NOT USE_FILTER_SZIP_ENCODER OR NOT USE_FILTER_SZIP) - ADD_H5_TEST (szip_remove ${TESTTYPE} ${arg}) - -# deflate copy - SET (arg ${FILE8}) - SET (TESTTYPE "TEST") - IF (NOT USE_FILTER_DEFLATE) - SET (TESTTYPE "SKIP") - ENDIF (NOT USE_FILTER_DEFLATE) - ADD_H5_TEST (deflate_copy ${TESTTYPE} ${arg}) - -# deflate remove - SET (arg ${FILE8} -f dset_deflate:NONE) - SET (TESTTYPE "TEST") - IF (NOT USE_FILTER_DEFLATE) - SET (TESTTYPE "SKIP") - ENDIF (NOT USE_FILTER_DEFLATE) - ADD_H5_TEST (deflate_remove ${TESTTYPE} ${arg}) - -# shuffle copy - SET (arg ${FILE9}) - SET (TESTTYPE "TEST") - IF (NOT USE_FILTER_SHUFFLE) - SET (TESTTYPE "SKIP") - ENDIF (NOT USE_FILTER_SHUFFLE) - ADD_H5_TEST (shuffle_copy ${TESTTYPE} ${arg}) - -# shuffle remove - SET (arg ${FILE9} -f dset_shuffle:NONE) - SET (TESTTYPE "TEST") - IF (NOT USE_FILTER_SHUFFLE) - SET (TESTTYPE "SKIP") - ENDIF (NOT USE_FILTER_SHUFFLE) - ADD_H5_TEST (shuffle_remove ${TESTTYPE} ${arg}) - -# fletcher32 copy - SET (arg ${FILE10}) - SET (TESTTYPE "TEST") - IF (NOT USE_FILTER_FLETCHER32) - SET (TESTTYPE "SKIP") - ENDIF (NOT USE_FILTER_FLETCHER32) - ADD_H5_TEST (fletcher_copy ${TESTTYPE} ${arg}) - -# fletcher32 remove - SET (arg ${FILE10} -f dset_fletcher32:NONE) - SET (TESTTYPE "TEST") - IF (NOT USE_FILTER_FLETCHER32) - SET (TESTTYPE "SKIP") - ENDIF (NOT USE_FILTER_FLETCHER32) - ADD_H5_TEST (fletcher_remove ${TESTTYPE} ${arg}) - -# nbit copy - SET (arg ${FILE12}) - SET (TESTTYPE "TEST") - IF (NOT USE_FILTER_NBIT) - SET (TESTTYPE "SKIP") - ENDIF (NOT USE_FILTER_NBIT) - ADD_H5_TEST (nbit_copy ${TESTTYPE} ${arg}) - -# nbit remove - SET (arg ${FILE12} -f dset_nbit:NONE) - SET (TESTTYPE "TEST") - IF (NOT USE_FILTER_NBIT) - SET (TESTTYPE "SKIP") - ENDIF (NOT USE_FILTER_NBIT) - ADD_H5_TEST (nbit_remove ${TESTTYPE} ${arg}) - -# nbit add - SET (arg ${FILE12} -f dset_int31:NBIT) - SET (TESTTYPE "TEST") - IF (NOT USE_FILTER_NBIT) - SET (TESTTYPE "SKIP") - ENDIF (NOT USE_FILTER_NBIT) - ADD_H5_TEST (nbit_add ${TESTTYPE} ${arg}) - -# scaleoffset copy - SET (arg ${FILE13}) - SET (TESTTYPE "TEST") - IF (NOT USE_FILTER_SCALEOFFSET) - SET (TESTTYPE "SKIP") - ENDIF (NOT USE_FILTER_SCALEOFFSET) - ADD_H5_TEST (scale_copy ${TESTTYPE} ${arg}) - -# scaleoffset add - SET (arg ${FILE13} -f dset_none:SOFF=31,IN) - SET (TESTTYPE "TEST") - IF (NOT USE_FILTER_SCALEOFFSET) - SET (TESTTYPE "SKIP") - ENDIF (NOT USE_FILTER_SCALEOFFSET) - ADD_H5_TEST (scale_add ${TESTTYPE} ${arg}) - -# scaleoffset remove - SET (arg ${FILE13} -f dset_scaleoffset:NONE) - SET (TESTTYPE "TEST") - IF (NOT USE_FILTER_SCALEOFFSET) - SET (TESTTYPE "SKIP") - ENDIF (NOT USE_FILTER_SCALEOFFSET) - ADD_H5_TEST (scale_remove ${TESTTYPE} ${arg}) - -# remove all filters - SET (arg ${FILE11} -f NONE) - SET (TESTTYPE "TEST") - IF (NOT USE_FILTER_FLETCHER32 OR NOT USE_FILTER_DEFLATE OR NOT USE_FILTER_SZIP OR NOT USE_FILTER_SZIP_ENCODER OR NOT USE_FILTER_SHUFFLE OR NOT USE_FILTER_NBIT OR NOT USE_FILTER_SCALEOFFSET) - SET (TESTTYPE "SKIP") - ENDIF (NOT USE_FILTER_FLETCHER32 OR NOT USE_FILTER_DEFLATE OR NOT USE_FILTER_SZIP OR NOT USE_FILTER_SZIP_ENCODER OR NOT USE_FILTER_SHUFFLE OR NOT USE_FILTER_NBIT OR NOT USE_FILTER_SCALEOFFSET) - ADD_H5_TEST (remove_all ${TESTTYPE} ${arg}) - -#filter conversions - SET (arg ${FILE8} -f dset_deflate:SZIP=8,NN) - SET (TESTTYPE "TEST") - IF (NOT USE_FILTER_SZIP_ENCODER OR NOT USE_FILTER_SZIP OR NOT USE_FILTER_DEFLATE) - SET (TESTTYPE "SKIP") - ENDIF (NOT USE_FILTER_SZIP_ENCODER OR NOT USE_FILTER_SZIP OR NOT USE_FILTER_DEFLATE) - ADD_H5_TEST (deflate_convert ${TESTTYPE} ${arg}) - - SET (arg ${FILE7} -f dset_szip:GZIP=1) - SET (TESTTYPE "TEST") - IF (NOT USE_FILTER_SZIP OR NOT USE_FILTER_SZIP_ENCODER OR NOT USE_FILTER_DEFLATE) - SET (TESTTYPE "SKIP") - ENDIF (NOT USE_FILTER_SZIP OR NOT USE_FILTER_SZIP_ENCODER OR NOT USE_FILTER_DEFLATE) - ADD_H5_TEST (szip_convert ${TESTTYPE} ${arg}) - -#limit - SET (arg ${FILE4} -f GZIP=1 -m 1024) - SET (TESTTYPE "TEST") - IF (NOT USE_FILTER_DEFLATE) - SET (TESTTYPE "SKIP") - ENDIF (NOT USE_FILTER_DEFLATE) - ADD_H5_TEST (deflate_limit ${TESTTYPE} ${arg}) - -#file - SET (arg ${FILE4} -e ${INFO_FILE}) - SET (TESTTYPE "TEST") - IF (NOT USE_FILTER_DEFLATE) - SET (TESTTYPE "SKIP") - ENDIF (NOT USE_FILTER_DEFLATE) - ADD_H5_TEST (deflate_file ${TESTTYPE} ${arg}) - -######################################################### -# layout options (these files have no filters) -######################################################### - ADD_H5_VERIFY_TEST (dset2_chunk_20x10 "TEST" 0 ${FILE4} dset2 CHUNKED --layout=dset2:CHUNK=20x10) - ADD_H5_VERIFY_TEST (chunk_20x10 "TEST" 1 ${FILE4} null CHUNKED -l CHUNK=20x10) - ADD_H5_VERIFY_TEST (dset2_conti "TEST" 0 ${FILE4} dset2 CONTIGUOUS -l dset2:CONTI) - ADD_H5_VERIFY_TEST (conti "TEST" 1 ${FILE4} null CONTIGUOUS -l CONTI) - ADD_H5_VERIFY_TEST (dset2_compa "TEST" 0 ${FILE4} dset2 COMPACT -l dset2:COMPA) - ADD_H5_VERIFY_TEST (compa "TEST" 1 ${FILE4} null COMPACT -l COMPA) - -################################################################ -# layout conversions (file has no filters) -############################################################### - ADD_H5_VERIFY_TEST (dset_compa_conti "TEST" 0 ${FILE4} dset_compact CONTIGUOUS -l dset_compact:CONTI) - ADD_H5_VERIFY_TEST (dset_compa_chunk "TEST" 0 ${FILE4} dset_compact CHUNKED -l dset_compact:CHUNK=2x5) - ADD_H5_VERIFY_TEST (dset_compa_compa "TEST" 0 ${FILE4} dset_compact COMPACT -l dset_compact:COMPA) - ADD_H5_VERIFY_TEST (dset_conti_compa "TEST" 0 ${FILE4} dset_contiguous COMPACT -l dset_contiguous:COMPA) - ADD_H5_VERIFY_TEST (dset_conti_chunk "TEST" 0 ${FILE4} dset_contiguous CHUNKED -l dset_contiguous:CHUNK=3x6) - ADD_H5_VERIFY_TEST (dset_conti_conti "TEST" 0 ${FILE4} dset_contiguous CONTIGUOUS -l dset_contiguous:CONTI) - ADD_H5_VERIFY_TEST (chunk_compa "TEST" 0 ${FILE4} dset_chunk COMPACT -l dset_chunk:COMPA) - ADD_H5_VERIFY_TEST (chunk_conti "TEST" 0 ${FILE4} dset_chunk CONTIGUOUS -l dset_chunk:CONTI) - ADD_H5_VERIFY_TEST (chunk_18x13 "TEST" 0 ${FILE4} dset_chunk CHUNKED -l dset_chunk:CHUNK=18x13) - -# test convert small size dataset ( < 1k) to compact layout without -m - ADD_H5_VERIFY_TEST (contig_small_compa "TEST" 0 ${FILE18} contig_small COMPACT -l contig_small:COMPA) - ADD_H5_VERIFY_TEST (contig_small_fixed_compa "TEST" 0 ${FILE18} chunked_small_fixed COMPACT -l chunked_small_fixed:COMPA) - -#--------------------------------------------------------------------------- -# Test file contains chunked datasets (need multiple dsets) with -# unlimited max dims. (HDFFV-7933) -# Use first dset to test. -#--------------------------------------------------------------------------- -# chunk to chunk - specify chunk dim bigger than any current dim -ADD_H5_VERIFY_TEST (chunk2chunk "TEST" 0 h5repack_layout3.h5 chunk_unlimit1 CHUNK -l chunk_unlimit1:CHUNK=100x300) - -# chunk to contiguous -ADD_H5_VERIFY_TEST (chunk2conti "TEST" 0 h5repack_layout3.h5 chunk_unlimit1 CONTI -l chunk_unlimit1:CONTI) - -# chunk to compact - convert big dataset (should be > 64k) for this purpose, -# should remain as original layout (chunk) -ADD_H5_VERIFY_TEST (chunk2compa "TEST" 0 h5repack_layout3.h5 chunk_unlimit1 CHUNK -l chunk_unlimit1:COMPA) - -#-------------------------------------------------------------------------- -# Test -f for some specific cases. Chunked dataset with unlimited max dims. -# (HDFFV-8012) -#-------------------------------------------------------------------------- -# - should not fail -# - should not change max dims from unlimit - -# chunk dim is bigger than dataset dim. ( dset size < 64k ) -ADD_H5_VERIFY_TEST (error1 "TEST" 0 h5repack_layout3.h5 chunk_unlimit1 H5S_UNLIMITED -f chunk_unlimit1:NONE) - -# chunk dim is bigger than dataset dim. ( dset size > 64k ) -ADD_H5_VERIFY_TEST (error2 "TEST" 0 h5repack_layout3.h5 chunk_unlimit2 H5S_UNLIMITED -f chunk_unlimit2:NONE) - -# chunk dims are smaller than dataset dims. ( dset size < 64k ) -ADD_H5_VERIFY_TEST (error3 "TEST" 0 h5repack_layout3.h5 chunk_unlimit3 H5S_UNLIMITED -f chunk_unlimit3:NONE) - -# file input - should not fail -ADD_H5_TEST (error4 "TEST" h5repack_layout3.h5 -f NONE) - -#-------------------------------------------------------------------------- -# Test base: Convert CHUNK to CONTI for a chunked dataset with small dataset -# (dset size < 64K) and with unlimited max dims on a condition as follow. -# (HDFFV-8214) -#-------------------------------------------------------------------------- -# chunk dim is bigger than dataset dim. should succeed. -ADD_H5_VERIFY_TEST (ckdim_biger "TEST" 0 h5repack_layout3.h5 chunk_unlimit2 CONTI -l chunk_unlimit2:CONTI) -# chunk dim is smaller than dataset dim. should succeed. -ADD_H5_VERIFY_TEST (ckdim_smaller "TEST" 0 h5repack_layout3.h5 chunk_unlimit3 CONTI -l chunk_unlimit3:CONTI) - - - -# Native option -# Do not use FILE1, as the named dtype will be converted to native, and h5diff will -# report a difference. - ADD_H5_TEST (native_fill "TEST" ${FILE0} -n) - ADD_H5_TEST (native_attr "TEST" ${FILE2} -n) - -# latest file format with long switches. use FILE4=h5repack_layout.h5 (no filters) - SET (arg --layout CHUNK=20x10 --filter GZIP=1 --minimum=10 --native --latest --compact=8 --indexed=6 --ssize=8[:dtype]) - SET (TESTTYPE "TEST") - IF (NOT USE_FILTER_DEFLATE) - SET (TESTTYPE "SKIP") - ENDIF (NOT USE_FILTER_DEFLATE) - ADD_H5_VERIFY_TEST (layout_long_switches ${TESTTYPE} 1 ${FILE4} null CHUNKED ${arg}) - -# latest file format with short switches. use FILE4=h5repack_layout.h5 (no filters) - SET (arg -l CHUNK=20x10 -f GZIP=1 -m 10 -n -L -c 8 -d 6 -s 8[:dtype]) - SET (TESTTYPE "TEST") - IF (NOT USE_FILTER_DEFLATE) - SET (TESTTYPE "SKIP") - ENDIF (NOT USE_FILTER_DEFLATE) - ADD_H5_VERIFY_TEST (layout_short_switches ${TESTTYPE} 1 ${FILE4} null CHUNKED ${arg}) - -# several global filters - SET (arg ${FILE4} --filter GZIP=1 --filter SHUF) - SET (TESTTYPE "TEST") - IF (NOT USE_FILTER_DEFLATE OR NOT USE_FILTER_SHUFFLE) - SET (TESTTYPE "SKIP") - ENDIF (NOT USE_FILTER_DEFLATE OR NOT USE_FILTER_SHUFFLE) - ADD_H5_TEST (global_filters ${TESTTYPE} ${arg}) - -# syntax of -i infile -o outfile -# latest file format with short switches. use FILE4=h5repack_layout.h5 (no filters) - SET (arg ${FILE4} -l CHUNK=20x10 -f GZIP=1 -m 10 -n -L -c 8 -d 6 -s 8[:dtype]) - SET (TESTTYPE "LEGACY") - IF (NOT USE_FILTER_DEFLATE) - SET (TESTTYPE "SKIP") - ENDIF (NOT USE_FILTER_DEFLATE) - ADD_H5_TEST_OLD (old_style_layout_short_switches ${TESTTYPE} ${arg}) - -# add a userblock to file - SET (arg ${FILE1} -u ${PROJECT_BINARY_DIR}/testfiles/ublock.bin -b 2048) - ADD_H5_TEST (add_userblock "TEST" ${arg}) - -# add alignment - SET (arg ${FILE1} -t 1 -a 1) - ADD_H5_TEST (add_alignment "TEST" ${arg}) - -# Check repacking file with old version of layout message (should get upgraded -# to new version and be readable, etc.) - ADD_H5_TEST (upgrade_layout "TEST" ${FILE14}) - -# test for datum size > H5TOOLS_MALLOCSIZE - ADD_H5_TEST (gt_mallocsize "TEST" ${FILE1} -f GZIP=1) - -# Check repacking file with committed datatypes in odd configurations - ADD_H5_TEST (committed_dt "TEST" ${FILE15}) - -# tests family driver (file is located in common testfiles folder, uses TOOLTEST1 - ADD_H5_TEST (family "TEST" ${FILE16}) - -# test various references (bug 1814 and 1726) - ADD_H5_TEST (bug1814 "TEST" ${FILE_REF}) - -# test attribute with various references (bug1797 / HDFFV-5932) -# the references in attribute of compund or vlen datatype - ADD_H5_TEST (HDFFV-5932 "TEST" ${FILE_ATTR_REF}) - -# Add test for memory leak in attirbute. This test is verified by CTEST. -# 1. leak from vlen string -# 2. leak from compound type without reference member -# (HDFFV-7840, ) -# Note: this test is experimental for sharing test file among tools - ADD_H5_TEST (HDFFV-7840 "TEST" h5diff_attr1.h5) - -# tests for metadata block size option ('-M') - ADD_H5_TEST_META (meta_short h5repack_layout.h5 -M 8192) - ADD_H5_TEST_META (meta_long h5repack_layout.h5 --metadata_block_size=8192) - - IF (HDF5_TEST_VFD) - # Run test with different Virtual File Driver - FOREACH (vfd ${VFD_LIST}) - ADD_VFD_TEST (${vfd} 0) - ENDFOREACH (vfd ${VFD_LIST}) - ENDIF (HDF5_TEST_VFD) + INCLUDE (CMakeTests.cmake) ENDIF (BUILD_TESTING) diff --git a/tools/h5repack/CMakeTests.cmake b/tools/h5repack/CMakeTests.cmake new file mode 100644 index 0000000..79d75a7 --- /dev/null +++ b/tools/h5repack/CMakeTests.cmake @@ -0,0 +1,937 @@ + +############################################################################## +############################################################################## +### T E S T I N G ### +############################################################################## +############################################################################## + + IF (HDF5_TEST_VFD) + SET (VFD_LIST + sec2 + stdio + core + split + multi + family + ) + + IF (DIRECT_VFD) + SET (VFD_LIST ${VFD_LIST} direct) + ENDIF (DIRECT_VFD) + + MACRO (ADD_VFD_TEST vfdname resultcode) + ADD_TEST ( + NAME H5REPACK-VFD-${vfdname}-h5repacktest + COMMAND "${CMAKE_COMMAND}" + -D "TEST_PROGRAM=$" + -D "TEST_ARGS:STRING=" + -D "TEST_VFD:STRING=${vfdname}" + -D "TEST_EXPECT=${resultcode}" + -D "TEST_OUTPUT=h5repacktest" + -D "TEST_FOLDER=${PROJECT_BINARY_DIR}" + -P "${HDF5_RESOURCES_DIR}/vfdTest.cmake" + ) + IF (NOT "${last_test}" STREQUAL "") + SET_TESTS_PROPERTIES (H5REPACK-VFD-${vfdname}-h5repacktest PROPERTIES DEPENDS ${last_test}) + ENDIF (NOT "${last_test}" STREQUAL "") + SET (last_test "H5REPACK-VFD-${vfdname}-h5repacktest") + ENDMACRO (ADD_VFD_TEST) + ENDIF (HDF5_TEST_VFD) + + # -------------------------------------------------------------------- + # Copy all the HDF5 files from the source directory into the test directory + # -------------------------------------------------------------------- + SET (LIST_HDF5_TEST_FILES + ${HDF5_TOOLS_H5REPACK_SOURCE_DIR}/testfiles/h5repack_attr.h5 + ${HDF5_TOOLS_H5REPACK_SOURCE_DIR}/testfiles/h5repack_attr_refs.h5 + ${HDF5_TOOLS_H5REPACK_SOURCE_DIR}/testfiles/h5repack_deflate.h5 + ${HDF5_TOOLS_H5REPACK_SOURCE_DIR}/testfiles/h5repack_early.h5 + ${HDF5_TOOLS_H5REPACK_SOURCE_DIR}/testfiles/h5repack_ext.h5 + ${HDF5_TOOLS_H5REPACK_SOURCE_DIR}/testfiles/h5repack_fill.h5 + ${HDF5_TOOLS_H5REPACK_SOURCE_DIR}/testfiles/h5repack_filters.h5 + ${HDF5_TOOLS_H5REPACK_SOURCE_DIR}/testfiles/h5repack_fletcher.h5 + ${HDF5_TOOLS_H5REPACK_SOURCE_DIR}/testfiles/h5repack_hlink.h5 + ${HDF5_TOOLS_H5REPACK_SOURCE_DIR}/testfiles/h5repack_layout.h5 + ${HDF5_TOOLS_H5REPACK_SOURCE_DIR}/testfiles/h5repack_layouto.h5 + ${HDF5_TOOLS_H5REPACK_SOURCE_DIR}/testfiles/h5repack_layout2.h5 + ${HDF5_TOOLS_H5REPACK_SOURCE_DIR}/testfiles/h5repack_layout3.h5 + ${HDF5_TOOLS_H5REPACK_SOURCE_DIR}/testfiles/h5repack_named_dtypes.h5 + ${HDF5_TOOLS_H5REPACK_SOURCE_DIR}/testfiles/h5repack_nbit.h5 + ${HDF5_TOOLS_H5REPACK_SOURCE_DIR}/testfiles/h5repack_objs.h5 + ${HDF5_TOOLS_H5REPACK_SOURCE_DIR}/testfiles/h5repack_refs.h5 + ${HDF5_TOOLS_H5REPACK_SOURCE_DIR}/testfiles/h5repack_shuffle.h5 + ${HDF5_TOOLS_H5REPACK_SOURCE_DIR}/testfiles/h5repack_soffset.h5 + ${HDF5_TOOLS_H5REPACK_SOURCE_DIR}/testfiles/h5repack_szip.h5 + # h5diff/testfile + ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_attr1.h5 + # tools/testfiles + ${HDF5_TOOLS_SRC_DIR}/testfiles/tfamily00000.h5 + ${HDF5_TOOLS_SRC_DIR}/testfiles/tfamily00001.h5 + ${HDF5_TOOLS_SRC_DIR}/testfiles/tfamily00002.h5 + ${HDF5_TOOLS_SRC_DIR}/testfiles/tfamily00003.h5 + ${HDF5_TOOLS_SRC_DIR}/testfiles/tfamily00004.h5 + ${HDF5_TOOLS_SRC_DIR}/testfiles/tfamily00005.h5 + ${HDF5_TOOLS_SRC_DIR}/testfiles/tfamily00006.h5 + ${HDF5_TOOLS_SRC_DIR}/testfiles/tfamily00007.h5 + ${HDF5_TOOLS_SRC_DIR}/testfiles/tfamily00008.h5 + ${HDF5_TOOLS_SRC_DIR}/testfiles/tfamily00009.h5 + ${HDF5_TOOLS_SRC_DIR}/testfiles/tfamily00010.h5 + ) + + SET (LIST_OTHER_TEST_FILES + ${HDF5_TOOLS_H5REPACK_SOURCE_DIR}/testfiles/h5repack_ext.bin + ${HDF5_TOOLS_H5REPACK_SOURCE_DIR}/testfiles/ublock.bin + ${HDF5_TOOLS_H5REPACK_SOURCE_DIR}/testfiles/h5repack.info + # tools/testfiles + ${HDF5_TOOLS_SRC_DIR}/testfiles/h5repack_filters.h5.ddl + ) + + FOREACH (h5_file ${LIST_HDF5_TEST_FILES} ${LIST_OTHER_TEST_FILES}) + GET_FILENAME_COMPONENT(fname "${h5_file}" NAME) + SET (dest "${PROJECT_BINARY_DIR}/testfiles/${fname}") + #MESSAGE (STATUS " Copying ${h5_file}") + ADD_CUSTOM_COMMAND ( + TARGET h5repack + POST_BUILD + COMMAND ${CMAKE_COMMAND} + ARGS -E copy_if_different ${h5_file} ${dest} + ) + ENDFOREACH (h5_file ${LIST_HDF5_TEST_FILES} ${LIST_OTHER_TEST_FILES}) + +############################################################################## +############################################################################## +### T H E T E S T S M A C R O S ### +############################################################################## +############################################################################## + + MACRO (ADD_H5_TEST_OLD testname testtype testfile) + IF (${testtype} STREQUAL "SKIP") + IF (NOT HDF5_ENABLE_USING_MEMCHECKER) + ADD_TEST ( + NAME H5REPACK_OLD-${testname}-SKIPPED + COMMAND ${CMAKE_COMMAND} -E echo "SKIP ${ARGN} -i ${PROJECT_BINARY_DIR}/testfiles/${testfile} -o ${PROJECT_BINARY_DIR}/testfiles/out-${testname}.${testfile}" + ) + ENDIF (NOT HDF5_ENABLE_USING_MEMCHECKER) + ELSE (${testtype} STREQUAL "SKIP") + ADD_TEST ( + NAME H5REPACK_OLD-${testname} + COMMAND $ ${ARGN} -i ${PROJECT_BINARY_DIR}/testfiles/${testfile} -o ${PROJECT_BINARY_DIR}/testfiles/out-${testname}.${testfile} + ) + IF (NOT "${last_test}" STREQUAL "") + SET_TESTS_PROPERTIES (H5REPACK_OLD-${testname} PROPERTIES DEPENDS ${last_test}) + ENDIF (NOT "${last_test}" STREQUAL "") + ADD_TEST ( + NAME H5REPACK_OLD-${testname}_DFF + COMMAND $ ${PROJECT_BINARY_DIR}/testfiles/${testfile} ${PROJECT_BINARY_DIR}/testfiles/out-${testname}.${testfile} + ) + SET_TESTS_PROPERTIES (H5REPACK_OLD-${testname}_DFF PROPERTIES DEPENDS H5REPACK_OLD-${testname}) + ENDIF (${testtype} STREQUAL "SKIP") + ENDMACRO (ADD_H5_TEST_OLD) + + MACRO (ADD_H5_TEST testname testtype testfile) + IF (${testtype} STREQUAL "SKIP") + IF (NOT HDF5_ENABLE_USING_MEMCHECKER) + ADD_TEST ( + NAME H5REPACK-${testname}-SKIPPED + COMMAND ${CMAKE_COMMAND} -E echo "SKIP ${ARGN} ${PROJECT_BINARY_DIR}/testfiles/${testfile} ${PROJECT_BINARY_DIR}/testfiles/out-${testname}.${testfile}" + ) + ENDIF (NOT HDF5_ENABLE_USING_MEMCHECKER) + ELSE (${testtype} STREQUAL "SKIP") + ADD_TEST ( + NAME H5REPACK-${testname} + COMMAND $ ${ARGN} ${PROJECT_BINARY_DIR}/testfiles/${testfile} ${PROJECT_BINARY_DIR}/testfiles/out-${testname}.${testfile} + ) + IF (NOT "${last_test}" STREQUAL "") + SET_TESTS_PROPERTIES (H5REPACK-${testname} PROPERTIES DEPENDS ${last_test}) + ENDIF (NOT "${last_test}" STREQUAL "") + ADD_TEST ( + NAME H5REPACK-${testname}_DFF + COMMAND $ ${PROJECT_BINARY_DIR}/testfiles/${testfile} ${PROJECT_BINARY_DIR}/testfiles/out-${testname}.${testfile} + ) + SET_TESTS_PROPERTIES (H5REPACK-${testname}_DFF PROPERTIES DEPENDS H5REPACK-${testname}) + ENDIF (${testtype} STREQUAL "SKIP") + ENDMACRO (ADD_H5_TEST) + + MACRO (ADD_H5_CMP_TEST testname testfilter testtype resultcode resultfile) + IF (${testtype} STREQUAL "SKIP") + IF (NOT HDF5_ENABLE_USING_MEMCHECKER) + ADD_TEST ( + NAME H5REPACK_CMP-${testname}-SKIPPED + COMMAND ${CMAKE_COMMAND} -E echo "SKIP ${ARGN} ${PROJECT_BINARY_DIR}/testfiles/${resultfile} ${PROJECT_BINARY_DIR}/testfiles/out-${testname}.${resultfile}" + ) + ENDIF (NOT HDF5_ENABLE_USING_MEMCHECKER) + ELSE (${testtype} STREQUAL "SKIP") + # If using memchecker add tests without using scripts + IF (HDF5_ENABLE_USING_MEMCHECKER) + ADD_TEST (NAME H5REPACK_CMP-${testname} COMMAND $ ${ARGN} testfiles/${resultfile} testfiles/out-${testname}.${resultfile}) + ELSE (HDF5_ENABLE_USING_MEMCHECKER) + ADD_TEST ( + NAME H5REPACK_CMP-${testname} + COMMAND "${CMAKE_COMMAND}" + -D "TEST_PROGRAM=$" + -D "TEST_ARGS:STRING=${ARGN};testfiles/${resultfile};testfiles/out-${testname}.${resultfile}" + -D "TEST_FOLDER=${PROJECT_BINARY_DIR}" + -D "TEST_OUTPUT=./testfiles/${resultfile}-${testname}.out" + -D "TEST_EXPECT=${resultcode}" + -D "TEST_FILTER:STRING=${testfilter}" + -D "TEST_REFERENCE=testfiles/${resultfile}.ddl" + -P "${HDF5_RESOURCES_DIR}/runTest.cmake" + ) + ENDIF (HDF5_ENABLE_USING_MEMCHECKER) + IF (NOT "${last_test}" STREQUAL "") + SET_TESTS_PROPERTIES (H5REPACK_CMP-${testname} PROPERTIES DEPENDS ${last_test}) + ENDIF (NOT "${last_test}" STREQUAL "") + ENDIF (${testtype} STREQUAL "SKIP") + ENDMACRO (ADD_H5_CMP_TEST) + + MACRO (ADD_H5_VERIFY_TEST testname testtype resultcode testfile testdset testfilter) + IF (${testtype} STREQUAL "SKIP") + IF (NOT HDF5_ENABLE_USING_MEMCHECKER) + ADD_TEST ( + NAME H5REPACK_VERIFY_LAYOUT-${testname}-SKIPPED + COMMAND ${CMAKE_COMMAND} -E echo "SKIP -d ${testdset} -pH ${PROJECT_BINARY_DIR}/testfiles/out-${testname}.${resultfile}" + ) + ENDIF (NOT HDF5_ENABLE_USING_MEMCHECKER) + ELSE (${testtype} STREQUAL "SKIP") + IF (NOT HDF5_ENABLE_USING_MEMCHECKER) + ADD_TEST ( + NAME H5REPACK_VERIFY_LAYOUT-${testname} + COMMAND $ ${ARGN} ${PROJECT_BINARY_DIR}/testfiles/${testfile} ${PROJECT_BINARY_DIR}/testfiles/out-${testname}.${testfile} + ) + IF (NOT "${last_test}" STREQUAL "") + SET_TESTS_PROPERTIES (H5REPACK_VERIFY_LAYOUT-${testname} PROPERTIES DEPENDS ${last_test}) + ENDIF (NOT "${last_test}" STREQUAL "") + ADD_TEST ( + NAME H5REPACK_VERIFY_LAYOUT-${testname}_DFF + COMMAND $ ${PROJECT_BINARY_DIR}/testfiles/${testfile} ${PROJECT_BINARY_DIR}/testfiles/out-${testname}.${testfile} + ) + SET_TESTS_PROPERTIES (H5REPACK_VERIFY_LAYOUT-${testname}_DFF PROPERTIES DEPENDS H5REPACK_VERIFY_LAYOUT-${testname}) + IF (${resultcode} STREQUAL "0") + ADD_TEST ( + NAME H5REPACK_VERIFY_LAYOUT-${testname}_DMP + COMMAND "${CMAKE_COMMAND}" + -D "TEST_PROGRAM=$" + -D "TEST_ARGS:STRING=-d;${testdset};-pH;testfiles/out-${testname}.${testfile}" + -D "TEST_FOLDER=${PROJECT_BINARY_DIR}" + -D "TEST_OUTPUT=./testfiles/${testfile}-${testname}-v.out" + -D "TEST_EXPECT=${resultcode}" + -D "TEST_FILTER:STRING=${testfilter}" + -D "TEST_REFERENCE=${testfilter}" + -P "${HDF5_RESOURCES_DIR}/grepTest.cmake" + ) + SET_TESTS_PROPERTIES (H5REPACK_VERIFY_LAYOUT-${testname}_DMP PROPERTIES DEPENDS H5REPACK_VERIFY_LAYOUT-${testname}_DFF) + ELSE (${resultcode} STREQUAL "0") + IF (${testfilter} STREQUAL "CHUNKED") + SET (nottestfilter "(CONTIGUOUS|COMPACT)") + ENDIF (${testfilter} STREQUAL "CHUNKED") + IF (${testfilter} STREQUAL "CONTIGUOUS") + SET (nottestfilter "(CHUNK|COMPACT)") + ENDIF (${testfilter} STREQUAL "CONTIGUOUS") + IF (${testfilter} STREQUAL "COMPACT") + SET (nottestfilter "(CONTIGUOUS|CHUNK)") + ENDIF (${testfilter} STREQUAL "COMPACT") + ADD_TEST ( + NAME H5REPACK_VERIFY_LAYOUT-${testname}_DMP + COMMAND "${CMAKE_COMMAND}" + -D "TEST_PROGRAM=$" + -D "TEST_ARGS:STRING=-pH;testfiles/out-${testname}.${testfile}" + -D "TEST_FOLDER=${PROJECT_BINARY_DIR}" + -D "TEST_OUTPUT=./testfiles/${testfile}-${testname}-v.out" + -D "TEST_EXPECT=${resultcode}" + -D "TEST_FILTER:STRING=${nottestfilter}" + -D "TEST_REFERENCE=${testfilter}" + -P "${HDF5_RESOURCES_DIR}/grepTest.cmake" + ) + SET_TESTS_PROPERTIES (H5REPACK_VERIFY_LAYOUT-${testname}_DMP PROPERTIES DEPENDS H5REPACK_VERIFY_LAYOUT-${testname}_DFF) + ENDIF (${resultcode} STREQUAL "0") + ENDIF (NOT HDF5_ENABLE_USING_MEMCHECKER) + ENDIF (${testtype} STREQUAL "SKIP") + ENDMACRO (ADD_H5_VERIFY_TEST) + + MACRO (ADD_H5_TEST_META testname testfile) + ADD_TEST ( + NAME H5REPACK_META-${testname}_N + COMMAND $ ${PROJECT_BINARY_DIR}/testfiles/${testfile} ${PROJECT_BINARY_DIR}/testfiles/out-${testname}_N.${testname}.h5 + ) + IF (NOT "${last_test}" STREQUAL "") + SET_TESTS_PROPERTIES (H5REPACK_META-${testname}_N PROPERTIES DEPENDS ${last_test}) + ENDIF (NOT "${last_test}" STREQUAL "") + ADD_TEST ( + NAME H5REPACK_META-${testname}_M + COMMAND $ ${ARGN} ${PROJECT_BINARY_DIR}/testfiles/${testfile} ${PROJECT_BINARY_DIR}/testfiles/out-${testname}_M.${testname}.h5 + ) + SET_TESTS_PROPERTIES (H5REPACK_META-${testname}_M PROPERTIES DEPENDS H5REPACK_META-${testname}_N) + + ADD_TEST (NAME H5REPACK_META-${testname} COMMAND ${CMAKE_COMMAND} -E compare_files ${PROJECT_BINARY_DIR}/testfiles/out-${testname}_N.${testname}.h5 ${PROJECT_BINARY_DIR}/testfiles/out-${testname}_M.${testname}.h5) + SET_TESTS_PROPERTIES (H5REPACK_META-${testname} PROPERTIES WILL_FAIL "true") + SET_TESTS_PROPERTIES (H5REPACK_META-${testname} PROPERTIES DEPENDS H5REPACK_META-${testname}_M) + ENDMACRO (ADD_H5_TEST_META) + +############################################################################## +############################################################################## +### T H E T E S T S ### +############################################################################## +############################################################################## + + # -------------------------------------------------------------------- + # test file names + # -------------------------------------------------------------------- + SET (INFO_FILE testfiles/h5repack.info) + + SET (FILE0 h5repack_fill.h5) + SET (FILE1 h5repack_objs.h5) + SET (FILE2 h5repack_attr.h5) + SET (FILE3 h5repack_hlink.h5) + SET (FILE4 h5repack_layout.h5) + SET (FILE5 h5repack_early.h5) + SET (FILE7 h5repack_szip.h5) + SET (FILE8 h5repack_deflate.h5) + SET (FILE9 h5repack_shuffle.h5) + SET (FILE10 h5repack_fletcher.h5) + SET (FILE11 h5repack_filters.h5) + SET (FILE12 h5repack_nbit.h5) + SET (FILE13 h5repack_soffset.h5) + SET (FILE14 h5repack_layouto.h5 ) # A file with an older version of the layout message (copy of test/tlayouto.h5) + SET (FILE15 h5repack_named_dtypes.h5) + SET (FILE16 tfamily%05d.h5) # located in common testfiles folder + SET (FILE18 h5repack_layout2.h5) + SET (FILE_REF h5repack_refs.h5) + SET (FILE_ATTR_REF h5repack_attr_refs.h5) + + # Remove any output file left over from previous test run + ADD_TEST ( + NAME H5REPACK-clearall-objects + COMMAND ${CMAKE_COMMAND} + -E remove + ./testfiles/h5repack_filters.h5-gzip_verbose_filters.out + ./testfiles/h5repack_filters.h5-gzip_verbose_filters.out.err + ./testfiles/h5repack_layout.h5-chunk_18x13-v.out + ./testfiles/h5repack_layout.h5-chunk_18x13-v.out.err + ./testfiles/h5repack_layout.h5-chunk_20x10-v.out + ./testfiles/h5repack_layout.h5-chunk_20x10-v.out.err + ./testfiles/h5repack_layout.h5-chunk_compa-v.out + ./testfiles/h5repack_layout.h5-chunk_compa-v.out.err + ./testfiles/h5repack_layout.h5-chunk_conti-v.out + ./testfiles/h5repack_layout.h5-chunk_conti-v.out.err + ./testfiles/h5repack_layout.h5-compa-v.out + ./testfiles/h5repack_layout.h5-compa-v.out.err + ./testfiles/h5repack_layout.h5-conti-v.out + ./testfiles/h5repack_layout.h5-conti-v.out.err + ./testfiles/h5repack_layout.h5-dset2_chunk_20x10-v.out + ./testfiles/h5repack_layout.h5-dset2_chunk_20x10-v.out.err + ./testfiles/h5repack_layout.h5-dset2_compa-v.out + ./testfiles/h5repack_layout.h5-dset2_compa-v.out.err + ./testfiles/h5repack_layout.h5-dset2_conti-v.out + ./testfiles/h5repack_layout.h5-dset2_conti-v.out.err + ./testfiles/h5repack_layout.h5-dset_compa_chunk-v.out + ./testfiles/h5repack_layout.h5-dset_compa_chunk-v.out.err + ./testfiles/h5repack_layout.h5-dset_compa_compa-v.out + ./testfiles/h5repack_layout.h5-dset_compa_compa-v.out.err + ./testfiles/h5repack_layout.h5-dset_compa_conti-v.out + ./testfiles/h5repack_layout.h5-dset_compa_conti-v.out.err + ./testfiles/h5repack_layout.h5-dset_conti_chunk-v.out + ./testfiles/h5repack_layout.h5-dset_conti_chunk-v.out.err + ./testfiles/h5repack_layout.h5-dset_conti_compa-v.out + ./testfiles/h5repack_layout.h5-dset_conti_compa-v.out.err + ./testfiles/h5repack_layout.h5-dset_conti_conti-v.out + ./testfiles/h5repack_layout.h5-dset_conti_conti-v.out.err + ./testfiles/h5repack_layout.h5-layout_long_switches-v.out + ./testfiles/h5repack_layout.h5-layout_long_switches-v.out.err + ./testfiles/h5repack_layout.h5-layout_short_switches-v.out + ./testfiles/h5repack_layout.h5-layout_short_switches-v.out.err + ./testfiles/h5repack_layout2.h5-contig_small_compa-v.out + ./testfiles/h5repack_layout2.h5-contig_small_compa-v.out.err + ./testfiles/h5repack_layout2.h5-contig_small_fixed_compa-v.out + ./testfiles/h5repack_layout2.h5-contig_small_fixed_compa-v.out.err + ./testfiles/h5repack_layout3.h5-chunk2chunk-v.out + ./testfiles/h5repack_layout3.h5-chunk2chunk-v.out.err + ./testfiles/h5repack_layout3.h5-chunk2compa-v.out + ./testfiles/h5repack_layout3.h5-chunk2compa-v.out.err + ./testfiles/h5repack_layout3.h5-chunk2conti-v.out + ./testfiles/h5repack_layout3.h5-chunk2conti-v.out.err + ./testfiles/h5repack_layout3.h5-error1-v.out + ./testfiles/h5repack_layout3.h5-error1-v.out.err + ./testfiles/h5repack_layout3.h5-error2-v.out + ./testfiles/h5repack_layout3.h5-error2-v.out.err + ./testfiles/h5repack_layout3.h5-error3-v.out + ./testfiles/h5repack_layout3.h5-error3-v.out.err + ./testfiles/out-family.tfamily%05d.h5 + ./testfiles/out-HDFFV-7840.h5diff_attr1.h5 + ./testfiles/out-attr.h5repack_attr.h5 + ./testfiles/out-native_attr.h5repack_attr.h5 + ./testfiles/out-HDFFV-5932.h5repack_attr_refs.h5 + ./testfiles/out-deflate_copy.h5repack_deflate.h5 + ./testfiles/out-deflate_remove.h5repack_deflate.h5 + ./testfiles/out-early.h5repack_early.h5 + ./testfiles/out-fill.h5repack_fill.h5 + ./testfiles/out-native_fill.h5repack_fill.h5 + ./testfiles/out-gzip_verbose_filters.h5repack_filters.h5 + ./testfiles/out-fletcher_copy.h5repack_fletcher.h5 + ./testfiles/out-fletcher_remove.h5repack_fletcher.h5 + ./testfiles/out-hlink.h5repack_hlink.h5 + ./testfiles/out-chunk_18x13.h5repack_layout.h5 + ./testfiles/out-chunk_20x10.h5repack_layout.h5 + ./testfiles/out-chunk_compa.h5repack_layout.h5 + ./testfiles/out-chunk_conti.h5repack_layout.h5 + ./testfiles/out-compa.h5repack_layout.h5 + ./testfiles/out-conti.h5repack_layout.h5 + ./testfiles/out-deflate_file.h5repack_layout.h5 + ./testfiles/out-deflate_limit.h5repack_layout.h5 + ./testfiles/out-dset2_chunk_20x10.h5repack_layout.h5 + ./testfiles/out-dset2_compa.h5repack_layout.h5 + ./testfiles/out-dset2_conti.h5repack_layout.h5 + ./testfiles/out-dset_compa_chunk.h5repack_layout.h5 + ./testfiles/out-dset_compa_compa.h5repack_layout.h5 + ./testfiles/out-dset_compa_conti.h5repack_layout.h5 + ./testfiles/out-dset_conti_chunk.h5repack_layout.h5 + ./testfiles/out-dset_conti_compa.h5repack_layout.h5 + ./testfiles/out-dset_conti_conti.h5repack_layout.h5 + ./testfiles/out-fletcher_all.h5repack_layout.h5 + ./testfiles/out-fletcher_individual.h5repack_layout.h5 + ./testfiles/out-global_filters.h5repack_layout.h5 + ./testfiles/out-gzip_all.h5repack_layout.h5 + ./testfiles/out-gzip_individual.h5repack_layout.h5 + ./testfiles/out-layout.h5repack_layout.h5 + ./testfiles/out-layout_long_switches.h5repack_layout.h5 + ./testfiles/out-layout_short_switches.h5repack_layout.h5 + ./testfiles/out-old_style_layout_short_switches.h5repack_layout.h5 + ./testfiles/out-shuffle_all.h5repack_layout.h5 + ./testfiles/out-shuffle_individual.h5repack_layout.h5 + ./testfiles/out-upgrade_layout.h5repack_layouto.h5 + ./testfiles/out-contig_small_compa.h5repack_layout2.h5 + ./testfiles/out-contig_small_fixed_compa.h5repack_layout2.h5 + ./testfiles/out-chunk2chunk.h5repack_layout3.h5 + ./testfiles/out-chunk2compa.h5repack_layout3.h5 + ./testfiles/out-chunk2conti.h5repack_layout3.h5 + ./testfiles/out-error1.h5repack_layout3.h5 + ./testfiles/out-error2.h5repack_layout3.h5 + ./testfiles/out-error3.h5repack_layout3.h5 + ./testfiles/out-error4.h5repack_layout3.h5 + ./testfiles/out-committed_dt.h5repack_named_dtypes.h5 + ./testfiles/out-nbit_add.h5repack_nbit.h5 + ./testfiles/out-nbit_copy.h5repack_nbit.h5 + ./testfiles/out-nbit_remove.h5repack_nbit.h5 + ./testfiles/out-add_alignment.h5repack_objs.h5 + ./testfiles/out-add_userblock.h5repack_objs.h5 + ./testfiles/out-objs.h5repack_objs.h5 + ./testfiles/out-gt_mallocsize.h5repack_objs.h5 + ./testfiles/out-bug1814.h5repack_refs.h5 + ./testfiles/out-shuffle_copy.h5repack_shuffle.h5 + ./testfiles/out-shuffle_remove.h5repack_shuffle.h5 + ./testfiles/out-scale_add.h5repack_soffset.h5 + ./testfiles/out-scale_copy.h5repack_soffset.h5 + ./testfiles/out-scale_remove.h5repack_soffset.h5 + ./testfiles/out-meta_short_M.meta_short.h5 + ./testfiles/out-meta_short_N.meta_short.h5 + ./testfiles/out-meta_long_M.meta_long.h5 + ./testfiles/out-meta_long_N.meta_long.h5 + # from the h5repacktst + h5repack_attr.h5 + h5repack_attr_out.h5 + h5repack_attr_refs.h5 + h5repack_big.h5 + h5repack_deflate.h5 + h5repack_deflate_out.h5 + h5repack_early2.h5 + h5repack_early.h5 + h5repack_early_out.h5 + h5repack_ext.h5 + h5repack_ext_out.h5 + h5repack_fill.h5 + h5repack_fill_out.h5 + h5repack_filters.h5 + h5repack_filters_out.h5 + h5repack_fletcher.h5 + h5repack_fletcher_out.h5 + h5repack_hlink.h5 + h5repack_hlink_out.h5 + h5repack_layout.h5 + h5repack_layout_out.h5 + h5repack_layout2.h5 + h5repack_layout3.h5 + h5repack_named_dtypes.h5 + h5repack_named_dtypes_out.h5 + h5repack_nbit.h5 + h5repack_nbit_out.h5 + h5repack_objs.h5 + h5repack_objs_out.h5 + h5repack_refs.h5 + h5repack_shuffle.h5 + h5repack_shuffle_out.h5 + h5repack_soffset.h5 + h5repack_soffset_out.h5 + h5repack_szip.h5 + h5repack_szip_out.h5 + h5repack_ub.h5 + h5repack_ub_out.h5 + h5repack_ext.bin + ublock.bin + ) + IF (NOT "${last_test}" STREQUAL "") + SET_TESTS_PROPERTIES (H5REPACK-clearall-objects PROPERTIES DEPENDS ${last_test}) + ENDIF (NOT "${last_test}" STREQUAL "") + + ADD_TEST (NAME H5REPACK-testh5repack_detect_szip COMMAND $) + IF (HDF5_ENABLE_SZIP_SUPPORT) + IF (HDF5_ENABLE_SZIP_ENCODING) + SET (passRegex "yes") + SET_TESTS_PROPERTIES (H5REPACK-testh5repack_detect_szip PROPERTIES PASS_REGULAR_EXPRESSION "yes") + ELSE (HDF5_ENABLE_SZIP_ENCODING) + SET (passRegex "no") + SET_TESTS_PROPERTIES (H5REPACK-testh5repack_detect_szip PROPERTIES PASS_REGULAR_EXPRESSION "no") + ENDIF (HDF5_ENABLE_SZIP_ENCODING) + ELSE (HDF5_ENABLE_SZIP_SUPPORT) + SET (passRegex "no") + SET_TESTS_PROPERTIES (H5REPACK-testh5repack_detect_szip PROPERTIES PASS_REGULAR_EXPRESSION "no") + ENDIF (HDF5_ENABLE_SZIP_SUPPORT) + SET_TESTS_PROPERTIES (H5REPACK-testh5repack_detect_szip PROPERTIES DEPENDS H5REPACK-clearall-objects) + + ADD_TEST (NAME H5REPACK-h5repacktest COMMAND $) + SET_TESTS_PROPERTIES (H5REPACK-h5repacktest PROPERTIES DEPENDS H5REPACK-testh5repack_detect_szip) + SET (last_test "H5REPACK-h5repacktest") + +# +# The tests +# We use the files generated by h5repacktst +# Each run generates ".out.h5" and the tool h5diff is used to +# compare the input and output files +# +# the tests are the same as the program h5repacktst, but run from the CLI +# + +# See which filters are usable (and skip tests for filters we +# don't have). Do this by searching H5pubconf.h to see which +# filters are defined. + +# detect whether the encoder is present. + SET (USE_FILTER_SZIP_ENCODER "no") + IF (HDF5_ENABLE_SZIP_ENCODING) + SET (USE_FILTER_SZIP_ENCODER ${testh5repack_detect_szip}) + ENDIF (HDF5_ENABLE_SZIP_ENCODING) + + IF (H5_HAVE_FILTER_DEFLATE) + SET (USE_FILTER_DEFLATE "true") + ENDIF (H5_HAVE_FILTER_DEFLATE) + + IF (H5_HAVE_FILTER_SZIP) + SET (USE_FILTER_SZIP "true") + ENDIF (H5_HAVE_FILTER_SZIP) + + IF (H5_HAVE_FILTER_SHUFFLE) + SET (USE_FILTER_SHUFFLE "true") + ENDIF (H5_HAVE_FILTER_SHUFFLE) + + IF (H5_HAVE_FILTER_FLETCHER32) + SET (USE_FILTER_FLETCHER32 "true") + ENDIF (H5_HAVE_FILTER_FLETCHER32) + + IF (H5_HAVE_FILTER_NBIT) + SET (USE_FILTER_NBIT "true") + ENDIF (H5_HAVE_FILTER_NBIT) + + IF (H5_HAVE_FILTER_SCALEOFFSET) + SET (USE_FILTER_SCALEOFFSET "true") + ENDIF (H5_HAVE_FILTER_SCALEOFFSET) + +# copy files (these files have no filters) + ADD_H5_TEST (fill "TEST" ${FILE0}) + ADD_H5_TEST (objs "TEST" ${FILE1}) + ADD_H5_TEST (attr "TEST" ${FILE2}) + ADD_H5_TEST (hlink "TEST" ${FILE3}) + ADD_H5_TEST (layout "TEST" ${FILE4}) + ADD_H5_TEST (early "TEST" ${FILE5}) + +# use $FILE4 to write some filters (this file has no filters) + +# gzip with individual object + SET (arg ${FILE4} -f dset1:GZIP=1 -l dset1:CHUNK=20x10) + SET (TESTTYPE "TEST") + IF (NOT USE_FILTER_DEFLATE) + SET (TESTTYPE "SKIP") + ENDIF (NOT USE_FILTER_DEFLATE) + ADD_H5_TEST (gzip_individual ${TESTTYPE} ${arg}) + +# gzip for all + SET (arg ${FILE4} -f GZIP=1) + SET (TESTTYPE "TEST") + IF (NOT USE_FILTER_DEFLATE) + SET (TESTTYPE "SKIP") + ENDIF (NOT USE_FILTER_DEFLATE) + ADD_H5_TEST (gzip_all ${TESTTYPE} ${arg}) + +# szip with individual object + SET (arg ${FILE4} -f dset2:SZIP=8,EC -l dset2:CHUNK=20x10) + SET (TESTTYPE "TEST") + IF (NOT USE_FILTER_SZIP_ENCODER OR NOT USE_FILTER_SZIP) + SET (TESTTYPE "SKIP") + ENDIF (NOT USE_FILTER_SZIP_ENCODER OR NOT USE_FILTER_SZIP) + ADD_H5_TEST (szip_individual ${TESTTYPE} ${arg}) + +# szip for all + SET (arg ${FILE4} -f SZIP=8,NN) + SET (TESTTYPE "TEST") + IF (NOT USE_FILTER_SZIP_ENCODER OR NOT USE_FILTER_SZIP) + SET (TESTTYPE "SKIP") + ENDIF (NOT USE_FILTER_SZIP_ENCODER OR NOT USE_FILTER_SZIP) + ADD_H5_TEST (szip_all ${TESTTYPE} ${arg}) + +# shuffle with individual object + SET (arg ${FILE4} -f dset2:SHUF -l dset2:CHUNK=20x10) + SET (TESTTYPE "TEST") + IF (NOT USE_FILTER_SHUFFLE) + SET (TESTTYPE "SKIP") + ENDIF (NOT USE_FILTER_SHUFFLE) + ADD_H5_TEST (shuffle_individual ${TESTTYPE} ${arg}) + +# shuffle for all + SET (arg ${FILE4} -f SHUF) + SET (TESTTYPE "TEST") + IF (NOT USE_FILTER_SHUFFLE) + SET (TESTTYPE "SKIP") + ENDIF (NOT USE_FILTER_SHUFFLE) + ADD_H5_TEST (shuffle_all ${TESTTYPE} ${arg}) + +# fletcher32 with individual object + SET (arg ${FILE4} -f dset2:FLET -l dset2:CHUNK=20x10) + SET (TESTTYPE "TEST") + IF (NOT USE_FILTER_FLETCHER32) + SET (TESTTYPE "SKIP") + ENDIF (NOT USE_FILTER_FLETCHER32) + ADD_H5_TEST (fletcher_individual ${TESTTYPE} ${arg}) + +# fletcher32 for all + SET (arg ${FILE4} -f FLET) + SET (TESTTYPE "TEST") + IF (NOT USE_FILTER_FLETCHER32) + SET (TESTTYPE "SKIP") + ENDIF (NOT USE_FILTER_FLETCHER32) + ADD_H5_TEST (fletcher_all ${TESTTYPE} ${arg}) + +# all filters + SET (arg ${FILE4} -f dset2:SHUF -f dset2:FLET -f dset2:SZIP=8,NN -f dset2:GZIP=1 -l dset2:CHUNK=20x10) + SET (TESTTYPE "TEST") + IF (NOT USE_FILTER_SZIP_ENCODER OR NOT USE_FILTER_SZIP OR NOT USE_FILTER_SHUFFLE OR NOT USE_FILTER_FLETCHER32 OR NOT USE_FILTER_DEFLATE) + SET (TESTTYPE "SKIP") + ENDIF (NOT USE_FILTER_SZIP_ENCODER OR NOT USE_FILTER_SZIP OR NOT USE_FILTER_SHUFFLE OR NOT USE_FILTER_FLETCHER32 OR NOT USE_FILTER_DEFLATE) + ADD_H5_TEST (all_filters ${TESTTYPE} ${arg}) + +# verbose gzip with individual object + SET (arg ${FILE11} -v -f /dset_deflate:GZIP=9) + SET (TESTTYPE "TEST") + IF (NOT USE_FILTER_DEFLATE) + SET (TESTTYPE "SKIP") + ENDIF (NOT USE_FILTER_DEFLATE) + ADD_H5_CMP_TEST (gzip_verbose_filters "O?...ing file[^\n]+\n" ${TESTTYPE} 0 ${arg}) + +########################################################### +# the following tests assume the input files have filters +########################################################### + +# szip copy + SET (arg ${FILE7}) + SET (TESTTYPE "TEST") + IF (NOT USE_FILTER_SZIP_ENCODER OR NOT USE_FILTER_SZIP) + SET (TESTTYPE "SKIP") + ENDIF (NOT USE_FILTER_SZIP_ENCODER OR NOT USE_FILTER_SZIP) + ADD_H5_TEST (szip_copy ${TESTTYPE} ${arg}) + +# szip remove + SET (arg ${FILE7} --filter=dset_szip:NONE) + SET (TESTTYPE "TEST") + IF (NOT USE_FILTER_SZIP_ENCODER OR NOT USE_FILTER_SZIP) + SET (TESTTYPE "SKIP") + ENDIF (NOT USE_FILTER_SZIP_ENCODER OR NOT USE_FILTER_SZIP) + ADD_H5_TEST (szip_remove ${TESTTYPE} ${arg}) + +# deflate copy + SET (arg ${FILE8}) + SET (TESTTYPE "TEST") + IF (NOT USE_FILTER_DEFLATE) + SET (TESTTYPE "SKIP") + ENDIF (NOT USE_FILTER_DEFLATE) + ADD_H5_TEST (deflate_copy ${TESTTYPE} ${arg}) + +# deflate remove + SET (arg ${FILE8} -f dset_deflate:NONE) + SET (TESTTYPE "TEST") + IF (NOT USE_FILTER_DEFLATE) + SET (TESTTYPE "SKIP") + ENDIF (NOT USE_FILTER_DEFLATE) + ADD_H5_TEST (deflate_remove ${TESTTYPE} ${arg}) + +# shuffle copy + SET (arg ${FILE9}) + SET (TESTTYPE "TEST") + IF (NOT USE_FILTER_SHUFFLE) + SET (TESTTYPE "SKIP") + ENDIF (NOT USE_FILTER_SHUFFLE) + ADD_H5_TEST (shuffle_copy ${TESTTYPE} ${arg}) + +# shuffle remove + SET (arg ${FILE9} -f dset_shuffle:NONE) + SET (TESTTYPE "TEST") + IF (NOT USE_FILTER_SHUFFLE) + SET (TESTTYPE "SKIP") + ENDIF (NOT USE_FILTER_SHUFFLE) + ADD_H5_TEST (shuffle_remove ${TESTTYPE} ${arg}) + +# fletcher32 copy + SET (arg ${FILE10}) + SET (TESTTYPE "TEST") + IF (NOT USE_FILTER_FLETCHER32) + SET (TESTTYPE "SKIP") + ENDIF (NOT USE_FILTER_FLETCHER32) + ADD_H5_TEST (fletcher_copy ${TESTTYPE} ${arg}) + +# fletcher32 remove + SET (arg ${FILE10} -f dset_fletcher32:NONE) + SET (TESTTYPE "TEST") + IF (NOT USE_FILTER_FLETCHER32) + SET (TESTTYPE "SKIP") + ENDIF (NOT USE_FILTER_FLETCHER32) + ADD_H5_TEST (fletcher_remove ${TESTTYPE} ${arg}) + +# nbit copy + SET (arg ${FILE12}) + SET (TESTTYPE "TEST") + IF (NOT USE_FILTER_NBIT) + SET (TESTTYPE "SKIP") + ENDIF (NOT USE_FILTER_NBIT) + ADD_H5_TEST (nbit_copy ${TESTTYPE} ${arg}) + +# nbit remove + SET (arg ${FILE12} -f dset_nbit:NONE) + SET (TESTTYPE "TEST") + IF (NOT USE_FILTER_NBIT) + SET (TESTTYPE "SKIP") + ENDIF (NOT USE_FILTER_NBIT) + ADD_H5_TEST (nbit_remove ${TESTTYPE} ${arg}) + +# nbit add + SET (arg ${FILE12} -f dset_int31:NBIT) + SET (TESTTYPE "TEST") + IF (NOT USE_FILTER_NBIT) + SET (TESTTYPE "SKIP") + ENDIF (NOT USE_FILTER_NBIT) + ADD_H5_TEST (nbit_add ${TESTTYPE} ${arg}) + +# scaleoffset copy + SET (arg ${FILE13}) + SET (TESTTYPE "TEST") + IF (NOT USE_FILTER_SCALEOFFSET) + SET (TESTTYPE "SKIP") + ENDIF (NOT USE_FILTER_SCALEOFFSET) + ADD_H5_TEST (scale_copy ${TESTTYPE} ${arg}) + +# scaleoffset add + SET (arg ${FILE13} -f dset_none:SOFF=31,IN) + SET (TESTTYPE "TEST") + IF (NOT USE_FILTER_SCALEOFFSET) + SET (TESTTYPE "SKIP") + ENDIF (NOT USE_FILTER_SCALEOFFSET) + ADD_H5_TEST (scale_add ${TESTTYPE} ${arg}) + +# scaleoffset remove + SET (arg ${FILE13} -f dset_scaleoffset:NONE) + SET (TESTTYPE "TEST") + IF (NOT USE_FILTER_SCALEOFFSET) + SET (TESTTYPE "SKIP") + ENDIF (NOT USE_FILTER_SCALEOFFSET) + ADD_H5_TEST (scale_remove ${TESTTYPE} ${arg}) + +# remove all filters + SET (arg ${FILE11} -f NONE) + SET (TESTTYPE "TEST") + IF (NOT USE_FILTER_FLETCHER32 OR NOT USE_FILTER_DEFLATE OR NOT USE_FILTER_SZIP OR NOT USE_FILTER_SZIP_ENCODER OR NOT USE_FILTER_SHUFFLE OR NOT USE_FILTER_NBIT OR NOT USE_FILTER_SCALEOFFSET) + SET (TESTTYPE "SKIP") + ENDIF (NOT USE_FILTER_FLETCHER32 OR NOT USE_FILTER_DEFLATE OR NOT USE_FILTER_SZIP OR NOT USE_FILTER_SZIP_ENCODER OR NOT USE_FILTER_SHUFFLE OR NOT USE_FILTER_NBIT OR NOT USE_FILTER_SCALEOFFSET) + ADD_H5_TEST (remove_all ${TESTTYPE} ${arg}) + +#filter conversions + SET (arg ${FILE8} -f dset_deflate:SZIP=8,NN) + SET (TESTTYPE "TEST") + IF (NOT USE_FILTER_SZIP_ENCODER OR NOT USE_FILTER_SZIP OR NOT USE_FILTER_DEFLATE) + SET (TESTTYPE "SKIP") + ENDIF (NOT USE_FILTER_SZIP_ENCODER OR NOT USE_FILTER_SZIP OR NOT USE_FILTER_DEFLATE) + ADD_H5_TEST (deflate_convert ${TESTTYPE} ${arg}) + + SET (arg ${FILE7} -f dset_szip:GZIP=1) + SET (TESTTYPE "TEST") + IF (NOT USE_FILTER_SZIP OR NOT USE_FILTER_SZIP_ENCODER OR NOT USE_FILTER_DEFLATE) + SET (TESTTYPE "SKIP") + ENDIF (NOT USE_FILTER_SZIP OR NOT USE_FILTER_SZIP_ENCODER OR NOT USE_FILTER_DEFLATE) + ADD_H5_TEST (szip_convert ${TESTTYPE} ${arg}) + +#limit + SET (arg ${FILE4} -f GZIP=1 -m 1024) + SET (TESTTYPE "TEST") + IF (NOT USE_FILTER_DEFLATE) + SET (TESTTYPE "SKIP") + ENDIF (NOT USE_FILTER_DEFLATE) + ADD_H5_TEST (deflate_limit ${TESTTYPE} ${arg}) + +#file + SET (arg ${FILE4} -e ${INFO_FILE}) + SET (TESTTYPE "TEST") + IF (NOT USE_FILTER_DEFLATE) + SET (TESTTYPE "SKIP") + ENDIF (NOT USE_FILTER_DEFLATE) + ADD_H5_TEST (deflate_file ${TESTTYPE} ${arg}) + +######################################################### +# layout options (these files have no filters) +######################################################### + ADD_H5_VERIFY_TEST (dset2_chunk_20x10 "TEST" 0 ${FILE4} dset2 CHUNKED --layout=dset2:CHUNK=20x10) + ADD_H5_VERIFY_TEST (chunk_20x10 "TEST" 1 ${FILE4} null CHUNKED -l CHUNK=20x10) + ADD_H5_VERIFY_TEST (dset2_conti "TEST" 0 ${FILE4} dset2 CONTIGUOUS -l dset2:CONTI) + ADD_H5_VERIFY_TEST (conti "TEST" 1 ${FILE4} null CONTIGUOUS -l CONTI) + ADD_H5_VERIFY_TEST (dset2_compa "TEST" 0 ${FILE4} dset2 COMPACT -l dset2:COMPA) + ADD_H5_VERIFY_TEST (compa "TEST" 1 ${FILE4} null COMPACT -l COMPA) + +################################################################ +# layout conversions (file has no filters) +############################################################### + ADD_H5_VERIFY_TEST (dset_compa_conti "TEST" 0 ${FILE4} dset_compact CONTIGUOUS -l dset_compact:CONTI) + ADD_H5_VERIFY_TEST (dset_compa_chunk "TEST" 0 ${FILE4} dset_compact CHUNKED -l dset_compact:CHUNK=2x5) + ADD_H5_VERIFY_TEST (dset_compa_compa "TEST" 0 ${FILE4} dset_compact COMPACT -l dset_compact:COMPA) + ADD_H5_VERIFY_TEST (dset_conti_compa "TEST" 0 ${FILE4} dset_contiguous COMPACT -l dset_contiguous:COMPA) + ADD_H5_VERIFY_TEST (dset_conti_chunk "TEST" 0 ${FILE4} dset_contiguous CHUNKED -l dset_contiguous:CHUNK=3x6) + ADD_H5_VERIFY_TEST (dset_conti_conti "TEST" 0 ${FILE4} dset_contiguous CONTIGUOUS -l dset_contiguous:CONTI) + ADD_H5_VERIFY_TEST (chunk_compa "TEST" 0 ${FILE4} dset_chunk COMPACT -l dset_chunk:COMPA) + ADD_H5_VERIFY_TEST (chunk_conti "TEST" 0 ${FILE4} dset_chunk CONTIGUOUS -l dset_chunk:CONTI) + ADD_H5_VERIFY_TEST (chunk_18x13 "TEST" 0 ${FILE4} dset_chunk CHUNKED -l dset_chunk:CHUNK=18x13) + +# test convert small size dataset ( < 1k) to compact layout without -m + ADD_H5_VERIFY_TEST (contig_small_compa "TEST" 0 ${FILE18} contig_small COMPACT -l contig_small:COMPA) + ADD_H5_VERIFY_TEST (contig_small_fixed_compa "TEST" 0 ${FILE18} chunked_small_fixed COMPACT -l chunked_small_fixed:COMPA) + +#--------------------------------------------------------------------------- +# Test file contains chunked datasets (need multiple dsets) with +# unlimited max dims. (HDFFV-7933) +# Use first dset to test. +#--------------------------------------------------------------------------- +# chunk to chunk - specify chunk dim bigger than any current dim +ADD_H5_VERIFY_TEST (chunk2chunk "TEST" 0 h5repack_layout3.h5 chunk_unlimit1 CHUNK -l chunk_unlimit1:CHUNK=100x300) + +# chunk to contiguous +ADD_H5_VERIFY_TEST (chunk2conti "TEST" 0 h5repack_layout3.h5 chunk_unlimit1 CONTI -l chunk_unlimit1:CONTI) + +# chunk to compact - convert big dataset (should be > 64k) for this purpose, +# should remain as original layout (chunk) +ADD_H5_VERIFY_TEST (chunk2compa "TEST" 0 h5repack_layout3.h5 chunk_unlimit1 CHUNK -l chunk_unlimit1:COMPA) + +#-------------------------------------------------------------------------- +# Test -f for some specific cases. Chunked dataset with unlimited max dims. +# (HDFFV-8012) +#-------------------------------------------------------------------------- +# - should not fail +# - should not change max dims from unlimit + +# chunk dim is bigger than dataset dim. ( dset size < 64k ) +ADD_H5_VERIFY_TEST (error1 "TEST" 0 h5repack_layout3.h5 chunk_unlimit1 H5S_UNLIMITED -f chunk_unlimit1:NONE) + +# chunk dim is bigger than dataset dim. ( dset size > 64k ) +ADD_H5_VERIFY_TEST (error2 "TEST" 0 h5repack_layout3.h5 chunk_unlimit2 H5S_UNLIMITED -f chunk_unlimit2:NONE) + +# chunk dims are smaller than dataset dims. ( dset size < 64k ) +ADD_H5_VERIFY_TEST (error3 "TEST" 0 h5repack_layout3.h5 chunk_unlimit3 H5S_UNLIMITED -f chunk_unlimit3:NONE) + +# file input - should not fail +ADD_H5_TEST (error4 "TEST" h5repack_layout3.h5 -f NONE) + +#-------------------------------------------------------------------------- +# Test base: Convert CHUNK to CONTI for a chunked dataset with small dataset +# (dset size < 64K) and with unlimited max dims on a condition as follow. +# (HDFFV-8214) +#-------------------------------------------------------------------------- +# chunk dim is bigger than dataset dim. should succeed. +ADD_H5_VERIFY_TEST (ckdim_biger "TEST" 0 h5repack_layout3.h5 chunk_unlimit2 CONTI -l chunk_unlimit2:CONTI) +# chunk dim is smaller than dataset dim. should succeed. +ADD_H5_VERIFY_TEST (ckdim_smaller "TEST" 0 h5repack_layout3.h5 chunk_unlimit3 CONTI -l chunk_unlimit3:CONTI) + + + +# Native option +# Do not use FILE1, as the named dtype will be converted to native, and h5diff will +# report a difference. + ADD_H5_TEST (native_fill "TEST" ${FILE0} -n) + ADD_H5_TEST (native_attr "TEST" ${FILE2} -n) + +# latest file format with long switches. use FILE4=h5repack_layout.h5 (no filters) + SET (arg --layout CHUNK=20x10 --filter GZIP=1 --minimum=10 --native --latest --compact=8 --indexed=6 --ssize=8[:dtype]) + SET (TESTTYPE "TEST") + IF (NOT USE_FILTER_DEFLATE) + SET (TESTTYPE "SKIP") + ENDIF (NOT USE_FILTER_DEFLATE) + ADD_H5_VERIFY_TEST (layout_long_switches ${TESTTYPE} 1 ${FILE4} null CHUNKED ${arg}) + +# latest file format with short switches. use FILE4=h5repack_layout.h5 (no filters) + SET (arg -l CHUNK=20x10 -f GZIP=1 -m 10 -n -L -c 8 -d 6 -s 8[:dtype]) + SET (TESTTYPE "TEST") + IF (NOT USE_FILTER_DEFLATE) + SET (TESTTYPE "SKIP") + ENDIF (NOT USE_FILTER_DEFLATE) + ADD_H5_VERIFY_TEST (layout_short_switches ${TESTTYPE} 1 ${FILE4} null CHUNKED ${arg}) + +# several global filters + SET (arg ${FILE4} --filter GZIP=1 --filter SHUF) + SET (TESTTYPE "TEST") + IF (NOT USE_FILTER_DEFLATE OR NOT USE_FILTER_SHUFFLE) + SET (TESTTYPE "SKIP") + ENDIF (NOT USE_FILTER_DEFLATE OR NOT USE_FILTER_SHUFFLE) + ADD_H5_TEST (global_filters ${TESTTYPE} ${arg}) + +# syntax of -i infile -o outfile +# latest file format with short switches. use FILE4=h5repack_layout.h5 (no filters) + SET (arg ${FILE4} -l CHUNK=20x10 -f GZIP=1 -m 10 -n -L -c 8 -d 6 -s 8[:dtype]) + SET (TESTTYPE "LEGACY") + IF (NOT USE_FILTER_DEFLATE) + SET (TESTTYPE "SKIP") + ENDIF (NOT USE_FILTER_DEFLATE) + ADD_H5_TEST_OLD (old_style_layout_short_switches ${TESTTYPE} ${arg}) + +# add a userblock to file + SET (arg ${FILE1} -u ${PROJECT_BINARY_DIR}/testfiles/ublock.bin -b 2048) + ADD_H5_TEST (add_userblock "TEST" ${arg}) + +# add alignment + SET (arg ${FILE1} -t 1 -a 1) + ADD_H5_TEST (add_alignment "TEST" ${arg}) + +# Check repacking file with old version of layout message (should get upgraded +# to new version and be readable, etc.) + ADD_H5_TEST (upgrade_layout "TEST" ${FILE14}) + +# test for datum size > H5TOOLS_MALLOCSIZE + ADD_H5_TEST (gt_mallocsize "TEST" ${FILE1} -f GZIP=1) + +# Check repacking file with committed datatypes in odd configurations + ADD_H5_TEST (committed_dt "TEST" ${FILE15}) + +# tests family driver (file is located in common testfiles folder, uses TOOLTEST1 + ADD_H5_TEST (family "TEST" ${FILE16}) + +# test various references (bug 1814 and 1726) + ADD_H5_TEST (bug1814 "TEST" ${FILE_REF}) + +# test attribute with various references (bug1797 / HDFFV-5932) +# the references in attribute of compund or vlen datatype + ADD_H5_TEST (HDFFV-5932 "TEST" ${FILE_ATTR_REF}) + +# Add test for memory leak in attirbute. This test is verified by CTEST. +# 1. leak from vlen string +# 2. leak from compound type without reference member +# (HDFFV-7840, ) +# Note: this test is experimental for sharing test file among tools + ADD_H5_TEST (HDFFV-7840 "TEST" h5diff_attr1.h5) + +# tests for metadata block size option ('-M') + ADD_H5_TEST_META (meta_short h5repack_layout.h5 -M 8192) + ADD_H5_TEST_META (meta_long h5repack_layout.h5 --metadata_block_size=8192) + + IF (HDF5_TEST_VFD) + # Run test with different Virtual File Driver + FOREACH (vfd ${VFD_LIST}) + ADD_VFD_TEST (${vfd} 0) + ENDFOREACH (vfd ${VFD_LIST}) + ENDIF (HDF5_TEST_VFD) diff --git a/tools/h5stat/CMakeLists.txt b/tools/h5stat/CMakeLists.txt index 4a775ee..6086fc2 100644 --- a/tools/h5stat/CMakeLists.txt +++ b/tools/h5stat/CMakeLists.txt @@ -17,12 +17,6 @@ SET_TARGET_PROPERTIES (h5stat PROPERTIES FOLDER tools) SET (H5_DEP_EXECUTABLES h5stat) -############################################################################## -############################################################################## -### T E S T I N G ### -############################################################################## -############################################################################## - IF (BUILD_TESTING) # -------------------------------------------------------------------- # Add the h5stat test executables @@ -36,256 +30,8 @@ IF (BUILD_TESTING) #ADD_TEST (NAME h5stat_gentest COMMAND $) ENDIF (HDF5_BUILD_GENERATORS AND NOT BUILD_SHARED_LIBS) - - # -------------------------------------------------------------------- - # Copy all the HDF5 files from the test directory into the source directory - # -------------------------------------------------------------------- - SET (HDF5_REFERENCE_FILES - h5stat_help1.ddl - h5stat_help2.ddl - h5stat_notexist.ddl - h5stat_nofile.ddl - h5stat_filters.ddl - h5stat_filters-file.ddl - h5stat_filters-F.ddl - h5stat_filters-d.ddl - h5stat_filters-g.ddl - h5stat_filters-dT.ddl - h5stat_filters-UD.ddl - h5stat_filters-UT.ddl - h5stat_tsohm.ddl - h5stat_newgrat.ddl - h5stat_newgrat-UG.ddl - h5stat_newgrat-UA.ddl - h5stat_err1_links.ddl - h5stat_links1.ddl - h5stat_links2.ddl - h5stat_links3.ddl - h5stat_links4.ddl - h5stat_links5.ddl - h5stat_err1_dims.ddl - h5stat_dims1.ddl - h5stat_dims2.ddl - h5stat_err1_numattrs.ddl - h5stat_err2_numattrs.ddl - h5stat_numattrs1.ddl - h5stat_numattrs2.ddl - h5stat_numattrs3.ddl - h5stat_numattrs4.ddl - ) - SET (HDF5_REFERENCE_TEST_FILES - h5stat_filters.h5 - h5stat_tsohm.h5 - h5stat_newgrat.h5 - h5stat_threshold.h5 - ) - - FOREACH (ddl_file ${HDF5_REFERENCE_FILES}) - SET (ddldest "${PROJECT_BINARY_DIR}/${ddl_file}") - #MESSAGE (STATUS " Translating ${ddl_file}") - ADD_CUSTOM_COMMAND ( - TARGET h5stat - POST_BUILD - COMMAND ${XLATE_UTILITY} - ARGS ${HDF5_TOOLS_H5STAT_SOURCE_DIR}/testfiles/${ddl_file} ${ddldest} -l3 - ) - ENDFOREACH (ddl_file ${HDF5_REFERENCE_FILES}) - - FOREACH (h5_file ${HDF5_REFERENCE_TEST_FILES}) - SET (dest "${PROJECT_BINARY_DIR}/${h5_file}") - #MESSAGE (STATUS " Copying ${h5_file}") - ADD_CUSTOM_COMMAND ( - TARGET h5stat - POST_BUILD - COMMAND ${CMAKE_COMMAND} - ARGS -E copy_if_different ${HDF5_TOOLS_H5STAT_SOURCE_DIR}/testfiles/${h5_file} ${dest} - ) - ENDFOREACH (h5_file ${HDF5_REFERENCE_TEST_FILES}) - -############################################################################## -############################################################################## -### T H E T E S T S M A C R O S ### -############################################################################## -############################################################################## - - MACRO (ADD_H5_TEST resultfile resultcode) - # If using memchecker add tests without using scripts - IF (HDF5_ENABLE_USING_MEMCHECKER) - ADD_TEST (NAME H5STAT-${resultfile} COMMAND $ ${ARGN}) - IF (NOT ${resultcode} STREQUAL "0") - SET_TESTS_PROPERTIES (H5STAT-${resultfile} PROPERTIES WILL_FAIL "true") - ENDIF (NOT ${resultcode} STREQUAL "0") - IF (NOT "${last_test}" STREQUAL "") - SET_TESTS_PROPERTIES (H5STAT-${resultfile} PROPERTIES DEPENDS ${last_test}) - ENDIF (NOT "${last_test}" STREQUAL "") - ELSE (HDF5_ENABLE_USING_MEMCHECKER) - ADD_TEST ( - NAME H5STAT-${resultfile}-clear-objects - COMMAND ${CMAKE_COMMAND} - -E remove ${resultfile}.out ${resultfile}.out.err - ) - ADD_TEST ( - NAME H5STAT-${resultfile} - COMMAND "${CMAKE_COMMAND}" - -D "TEST_PROGRAM=$" - -D "TEST_ARGS=${ARGN}" - -D "TEST_FOLDER=${PROJECT_BINARY_DIR}" - -D "TEST_OUTPUT=${resultfile}.out" - -D "TEST_EXPECT=${resultcode}" - -D "TEST_REFERENCE=${resultfile}.ddl" - -P "${HDF5_RESOURCES_DIR}/runTest.cmake" - ) - SET_TESTS_PROPERTIES (H5STAT-${resultfile} PROPERTIES DEPENDS "H5STAT-${resultfile}-clear-objects") - ENDIF (HDF5_ENABLE_USING_MEMCHECKER) - ENDMACRO (ADD_H5_TEST file) - -############################################################################## -############################################################################## -### T H E T E S T S ### -############################################################################## -############################################################################## - - IF (HDF5_ENABLE_USING_MEMCHECKER) - # Remove any output file left over from previous test run - ADD_TEST ( - NAME H5STAT-clearall-objects - COMMAND ${CMAKE_COMMAND} - -E remove - h5stat_help1.out - h5stat_help1.out.err - h5stat_help2.out - h5stat_help2.out.err - h5stat_notexist.out - h5stat_notexist.out.err - h5stat_nofile.out - h5stat_nofile.out.err - h5stat_filters.out - h5stat_filters.out.err - h5stat_filters-file.out - h5stat_filters-file.out.err - h5stat_filters-F.out - h5stat_filters-F.out.err - h5stat_filters-d.out - h5stat_filters-d.out.err - h5stat_filters-g.out - h5stat_filters-g.out.err - h5stat_filters-dT.out - h5stat_filters-dT.out.err - h5stat_filters-UD.out - h5stat_filters-UD.out.err - h5stat_filters-UT.out - h5stat_filters-UT.out.err - h5stat_tsohm.out - h5stat_tsohm.out.err - h5stat_newgrat.out - h5stat_newgrat.out.err - h5stat_newgrat-UG.out - h5stat_newgrat-UG.out.err - h5stat_newgrat-UA.out - h5stat_newgrat-UA.out.err - h5stat_err1_links.out - h5stat_err1_links.out.err - h5stat_links1.out - h5stat_links1.out.err - h5stat_links2.out - h5stat_links2.out.err - h5stat_links3.out - h5stat_links3.out.err - h5stat_links4.out - h5stat_links4.out.err - h5stat_links5.out - h5stat_links5.out.err - h5stat_err1_dims.out - h5stat_err1_dims.out.err - h5stat_dims1.out - h5stat_dims1.out.err - h5stat_dims2.out - h5stat_dims2.out.err - h5stat_err1_numattrs.out - h5stat_err1_numattrs.out.err - h5stat_err2_numattrs.out - h5stat_err2_numattrs.out.err - h5stat_numattrs1.out - h5stat_numattrs1.out.err - h5stat_numattrs2.out - h5stat_numattrs2.out.err - h5stat_numattrs3.out - h5stat_numattrs3.out.err - h5stat_numattrs4.out - h5stat_numattrs4.out.err - ) - IF (NOT "${last_test}" STREQUAL "") - SET_TESTS_PROPERTIES (H5STAT-clearall-objects PROPERTIES DEPENDS ${last_test}) - ENDIF (NOT "${last_test}" STREQUAL "") - SET (last_test "H5STAT-clearall-objects") - ENDIF (HDF5_ENABLE_USING_MEMCHECKER) - -# Test for help flag - ADD_H5_TEST (h5stat_help1 0 -h) - ADD_H5_TEST (h5stat_help2 0 --help) - -# Test when h5stat a file that does not exist - ADD_H5_TEST (h5stat_notexist 1 notexist.h5) - ADD_H5_TEST (h5stat_nofile 1 '') -# Test file with groups, compressed datasets, user-applied fileters, etc. -# h5stat_filters.h5 is a copy of ../../testfiles/tfilters.h5 as of release 1.8.0-alpha4 - ADD_H5_TEST (h5stat_filters 0 h5stat_filters.h5) - ADD_H5_TEST (h5stat_filters-file 0 -f h5stat_filters.h5) - ADD_H5_TEST (h5stat_filters-F 0 -F h5stat_filters.h5) - ADD_H5_TEST (h5stat_filters-d 0 -d h5stat_filters.h5) - ADD_H5_TEST (h5stat_filters-g 0 -g h5stat_filters.h5) - ADD_H5_TEST (h5stat_filters-dT 0 -dT h5stat_filters.h5) - ADD_H5_TEST (h5stat_filters-UD 0 -D h5stat_filters.h5) - ADD_H5_TEST (h5stat_filters-UT 0 -T h5stat_filters.h5) -# h5stat_tsohm.h5 is a copy of ../../../test/tsohm.h5 generated by tsohm.c -# as of release 1.8.0-alpha4 - ADD_H5_TEST (h5stat_tsohm 0 h5stat_tsohm.h5) -# h5stat_newgrat.h5 is generated by h5stat_gentest.c - ADD_H5_TEST (h5stat_newgrat 0 h5stat_newgrat.h5) - ADD_H5_TEST (h5stat_newgrat-UG 0 -G h5stat_newgrat.h5) - ADD_H5_TEST (h5stat_newgrat-UA 0 -A h5stat_newgrat.h5) -# -# Tests for -l (--links) option on h5stat_threshold.h5: -# -l 0 (incorrect threshold value) -# -g -l 8 -# --links=8 -# --links=20 -g - ADD_H5_TEST (h5stat_err1_links 1 -l 0 h5stat_threshold.h5) - ADD_H5_TEST (h5stat_links1 0 -g -l 8 h5stat_threshold.h5) - ADD_H5_TEST (h5stat_links2 0 --links=8 h5stat_threshold.h5) - ADD_H5_TEST (h5stat_links3 0 --links=20 -g h5stat_threshold.h5) -# -# Tests for -l (--links) option on h5stat_newgrat.h5: -# -g -# -g -l 40000 - ADD_H5_TEST (h5stat_links4 0 -g h5stat_newgrat.h5) - ADD_H5_TEST (h5stat_links5 0 -g -l 40000 h5stat_newgrat.h5) -# -# Tests for -m (--dims) option on h5stat_threshold.h5 -# -d --dims=-1 (incorrect threshold value) -# -gd -m 5 -# -d --di=15 - ADD_H5_TEST (h5stat_err1_dims 1 -d --dims=-1 h5stat_threshold.h5) - ADD_H5_TEST (h5stat_dims1 0 -gd -m 5 h5stat_threshold.h5) - ADD_H5_TEST (h5stat_dims2 0 -d --di=15 h5stat_threshold.h5) -# -# Tests for -a option on h5stat_threshold.h5 -# -a -2 (incorrect threshold value) -# --numattrs (without threshold value) -# -AS -a 10 -# -a 1 -# -A --numattrs=25 - ADD_H5_TEST (h5stat_err1_numattrs 1 -a -2 h5stat_threshold.h5) - ADD_H5_TEST (h5stat_err2_numattrs 1 --numattrs h5stat_threshold.h5) - ADD_H5_TEST (h5stat_numattrs1 0 -AS -a 10 h5stat_threshold.h5) - ADD_H5_TEST (h5stat_numattrs2 0 -a 1 h5stat_threshold.h5) - ADD_H5_TEST (h5stat_numattrs3 0 -A --numattrs=25 h5stat_threshold.h5) -# -# Tests for -a option on h5stat_newgrat.h5 -# -A -a 100 - ADD_H5_TEST (h5stat_numattrs4 0 -A -a 100 h5stat_newgrat.h5) -# + INCLUDE (CMakeTests.cmake) ENDIF (BUILD_TESTING) ############################################################################## diff --git a/tools/h5stat/CMakeTests.cmake b/tools/h5stat/CMakeTests.cmake new file mode 100644 index 0000000..0e4315f --- /dev/null +++ b/tools/h5stat/CMakeTests.cmake @@ -0,0 +1,257 @@ + +############################################################################## +############################################################################## +### T E S T I N G ### +############################################################################## +############################################################################## + + # -------------------------------------------------------------------- + # Copy all the HDF5 files from the test directory into the source directory + # -------------------------------------------------------------------- + SET (HDF5_REFERENCE_FILES + h5stat_help1.ddl + h5stat_help2.ddl + h5stat_notexist.ddl + h5stat_nofile.ddl + h5stat_filters.ddl + h5stat_filters-file.ddl + h5stat_filters-F.ddl + h5stat_filters-d.ddl + h5stat_filters-g.ddl + h5stat_filters-dT.ddl + h5stat_filters-UD.ddl + h5stat_filters-UT.ddl + h5stat_tsohm.ddl + h5stat_newgrat.ddl + h5stat_newgrat-UG.ddl + h5stat_newgrat-UA.ddl + h5stat_err1_links.ddl + h5stat_links1.ddl + h5stat_links2.ddl + h5stat_links3.ddl + h5stat_links4.ddl + h5stat_links5.ddl + h5stat_err1_dims.ddl + h5stat_dims1.ddl + h5stat_dims2.ddl + h5stat_err1_numattrs.ddl + h5stat_err2_numattrs.ddl + h5stat_numattrs1.ddl + h5stat_numattrs2.ddl + h5stat_numattrs3.ddl + h5stat_numattrs4.ddl + ) + SET (HDF5_REFERENCE_TEST_FILES + h5stat_filters.h5 + h5stat_tsohm.h5 + h5stat_newgrat.h5 + h5stat_threshold.h5 + ) + + FOREACH (ddl_file ${HDF5_REFERENCE_FILES}) + SET (ddldest "${PROJECT_BINARY_DIR}/${ddl_file}") + #MESSAGE (STATUS " Translating ${ddl_file}") + ADD_CUSTOM_COMMAND ( + TARGET h5stat + POST_BUILD + COMMAND ${XLATE_UTILITY} + ARGS ${HDF5_TOOLS_H5STAT_SOURCE_DIR}/testfiles/${ddl_file} ${ddldest} -l3 + ) + ENDFOREACH (ddl_file ${HDF5_REFERENCE_FILES}) + + FOREACH (h5_file ${HDF5_REFERENCE_TEST_FILES}) + SET (dest "${PROJECT_BINARY_DIR}/${h5_file}") + #MESSAGE (STATUS " Copying ${h5_file}") + ADD_CUSTOM_COMMAND ( + TARGET h5stat + POST_BUILD + COMMAND ${CMAKE_COMMAND} + ARGS -E copy_if_different ${HDF5_TOOLS_H5STAT_SOURCE_DIR}/testfiles/${h5_file} ${dest} + ) + ENDFOREACH (h5_file ${HDF5_REFERENCE_TEST_FILES}) + +############################################################################## +############################################################################## +### T H E T E S T S M A C R O S ### +############################################################################## +############################################################################## + + MACRO (ADD_H5_TEST resultfile resultcode) + # If using memchecker add tests without using scripts + IF (HDF5_ENABLE_USING_MEMCHECKER) + ADD_TEST (NAME H5STAT-${resultfile} COMMAND $ ${ARGN}) + IF (NOT ${resultcode} STREQUAL "0") + SET_TESTS_PROPERTIES (H5STAT-${resultfile} PROPERTIES WILL_FAIL "true") + ENDIF (NOT ${resultcode} STREQUAL "0") + IF (NOT "${last_test}" STREQUAL "") + SET_TESTS_PROPERTIES (H5STAT-${resultfile} PROPERTIES DEPENDS ${last_test}) + ENDIF (NOT "${last_test}" STREQUAL "") + ELSE (HDF5_ENABLE_USING_MEMCHECKER) + ADD_TEST ( + NAME H5STAT-${resultfile}-clear-objects + COMMAND ${CMAKE_COMMAND} + -E remove ${resultfile}.out ${resultfile}.out.err + ) + ADD_TEST ( + NAME H5STAT-${resultfile} + COMMAND "${CMAKE_COMMAND}" + -D "TEST_PROGRAM=$" + -D "TEST_ARGS=${ARGN}" + -D "TEST_FOLDER=${PROJECT_BINARY_DIR}" + -D "TEST_OUTPUT=${resultfile}.out" + -D "TEST_EXPECT=${resultcode}" + -D "TEST_REFERENCE=${resultfile}.ddl" + -P "${HDF5_RESOURCES_DIR}/runTest.cmake" + ) + SET_TESTS_PROPERTIES (H5STAT-${resultfile} PROPERTIES DEPENDS "H5STAT-${resultfile}-clear-objects") + ENDIF (HDF5_ENABLE_USING_MEMCHECKER) + ENDMACRO (ADD_H5_TEST file) + +############################################################################## +############################################################################## +### T H E T E S T S ### +############################################################################## +############################################################################## + + IF (HDF5_ENABLE_USING_MEMCHECKER) + # Remove any output file left over from previous test run + ADD_TEST ( + NAME H5STAT-clearall-objects + COMMAND ${CMAKE_COMMAND} + -E remove + h5stat_help1.out + h5stat_help1.out.err + h5stat_help2.out + h5stat_help2.out.err + h5stat_notexist.out + h5stat_notexist.out.err + h5stat_nofile.out + h5stat_nofile.out.err + h5stat_filters.out + h5stat_filters.out.err + h5stat_filters-file.out + h5stat_filters-file.out.err + h5stat_filters-F.out + h5stat_filters-F.out.err + h5stat_filters-d.out + h5stat_filters-d.out.err + h5stat_filters-g.out + h5stat_filters-g.out.err + h5stat_filters-dT.out + h5stat_filters-dT.out.err + h5stat_filters-UD.out + h5stat_filters-UD.out.err + h5stat_filters-UT.out + h5stat_filters-UT.out.err + h5stat_tsohm.out + h5stat_tsohm.out.err + h5stat_newgrat.out + h5stat_newgrat.out.err + h5stat_newgrat-UG.out + h5stat_newgrat-UG.out.err + h5stat_newgrat-UA.out + h5stat_newgrat-UA.out.err + h5stat_err1_links.out + h5stat_err1_links.out.err + h5stat_links1.out + h5stat_links1.out.err + h5stat_links2.out + h5stat_links2.out.err + h5stat_links3.out + h5stat_links3.out.err + h5stat_links4.out + h5stat_links4.out.err + h5stat_links5.out + h5stat_links5.out.err + h5stat_err1_dims.out + h5stat_err1_dims.out.err + h5stat_dims1.out + h5stat_dims1.out.err + h5stat_dims2.out + h5stat_dims2.out.err + h5stat_err1_numattrs.out + h5stat_err1_numattrs.out.err + h5stat_err2_numattrs.out + h5stat_err2_numattrs.out.err + h5stat_numattrs1.out + h5stat_numattrs1.out.err + h5stat_numattrs2.out + h5stat_numattrs2.out.err + h5stat_numattrs3.out + h5stat_numattrs3.out.err + h5stat_numattrs4.out + h5stat_numattrs4.out.err + ) + IF (NOT "${last_test}" STREQUAL "") + SET_TESTS_PROPERTIES (H5STAT-clearall-objects PROPERTIES DEPENDS ${last_test}) + ENDIF (NOT "${last_test}" STREQUAL "") + SET (last_test "H5STAT-clearall-objects") + ENDIF (HDF5_ENABLE_USING_MEMCHECKER) + +# Test for help flag + ADD_H5_TEST (h5stat_help1 0 -h) + ADD_H5_TEST (h5stat_help2 0 --help) + +# Test when h5stat a file that does not exist + ADD_H5_TEST (h5stat_notexist 1 notexist.h5) + ADD_H5_TEST (h5stat_nofile 1 '') + +# Test file with groups, compressed datasets, user-applied fileters, etc. +# h5stat_filters.h5 is a copy of ../../testfiles/tfilters.h5 as of release 1.8.0-alpha4 + ADD_H5_TEST (h5stat_filters 0 h5stat_filters.h5) + ADD_H5_TEST (h5stat_filters-file 0 -f h5stat_filters.h5) + ADD_H5_TEST (h5stat_filters-F 0 -F h5stat_filters.h5) + ADD_H5_TEST (h5stat_filters-d 0 -d h5stat_filters.h5) + ADD_H5_TEST (h5stat_filters-g 0 -g h5stat_filters.h5) + ADD_H5_TEST (h5stat_filters-dT 0 -dT h5stat_filters.h5) + ADD_H5_TEST (h5stat_filters-UD 0 -D h5stat_filters.h5) + ADD_H5_TEST (h5stat_filters-UT 0 -T h5stat_filters.h5) +# h5stat_tsohm.h5 is a copy of ../../../test/tsohm.h5 generated by tsohm.c +# as of release 1.8.0-alpha4 + ADD_H5_TEST (h5stat_tsohm 0 h5stat_tsohm.h5) +# h5stat_newgrat.h5 is generated by h5stat_gentest.c + ADD_H5_TEST (h5stat_newgrat 0 h5stat_newgrat.h5) + ADD_H5_TEST (h5stat_newgrat-UG 0 -G h5stat_newgrat.h5) + ADD_H5_TEST (h5stat_newgrat-UA 0 -A h5stat_newgrat.h5) +# +# Tests for -l (--links) option on h5stat_threshold.h5: +# -l 0 (incorrect threshold value) +# -g -l 8 +# --links=8 +# --links=20 -g + ADD_H5_TEST (h5stat_err1_links 1 -l 0 h5stat_threshold.h5) + ADD_H5_TEST (h5stat_links1 0 -g -l 8 h5stat_threshold.h5) + ADD_H5_TEST (h5stat_links2 0 --links=8 h5stat_threshold.h5) + ADD_H5_TEST (h5stat_links3 0 --links=20 -g h5stat_threshold.h5) +# +# Tests for -l (--links) option on h5stat_newgrat.h5: +# -g +# -g -l 40000 + ADD_H5_TEST (h5stat_links4 0 -g h5stat_newgrat.h5) + ADD_H5_TEST (h5stat_links5 0 -g -l 40000 h5stat_newgrat.h5) +# +# Tests for -m (--dims) option on h5stat_threshold.h5 +# -d --dims=-1 (incorrect threshold value) +# -gd -m 5 +# -d --di=15 + ADD_H5_TEST (h5stat_err1_dims 1 -d --dims=-1 h5stat_threshold.h5) + ADD_H5_TEST (h5stat_dims1 0 -gd -m 5 h5stat_threshold.h5) + ADD_H5_TEST (h5stat_dims2 0 -d --di=15 h5stat_threshold.h5) +# +# Tests for -a option on h5stat_threshold.h5 +# -a -2 (incorrect threshold value) +# --numattrs (without threshold value) +# -AS -a 10 +# -a 1 +# -A --numattrs=25 + ADD_H5_TEST (h5stat_err1_numattrs 1 -a -2 h5stat_threshold.h5) + ADD_H5_TEST (h5stat_err2_numattrs 1 --numattrs h5stat_threshold.h5) + ADD_H5_TEST (h5stat_numattrs1 0 -AS -a 10 h5stat_threshold.h5) + ADD_H5_TEST (h5stat_numattrs2 0 -a 1 h5stat_threshold.h5) + ADD_H5_TEST (h5stat_numattrs3 0 -A --numattrs=25 h5stat_threshold.h5) +# +# Tests for -a option on h5stat_newgrat.h5 +# -A -a 100 + ADD_H5_TEST (h5stat_numattrs4 0 -A -a 100 h5stat_newgrat.h5) +# + \ No newline at end of file diff --git a/tools/misc/CMakeLists.txt b/tools/misc/CMakeLists.txt index dc98967..8e1003e 100644 --- a/tools/misc/CMakeLists.txt +++ b/tools/misc/CMakeLists.txt @@ -41,12 +41,6 @@ SET (H5_DEP_EXECUTABLES # CONFIGURE_FILE (${HDF5_TOOLS_MISC_SOURCE_DIR}/h5cc.in ${HDF5_BINARY_DIR}/h5cc @ONLY) #ENDIF (NOT WIN32) -############################################################################## -############################################################################## -### T E S T I N G ### -############################################################################## -############################################################################## - IF (BUILD_TESTING) # -------------------------------------------------------------------- # Add the misc test executables @@ -65,272 +59,8 @@ IF (BUILD_TESTING) TARGET_C_PROPERTIES (h5repart_test " " " ") TARGET_LINK_LIBRARIES (h5repart_test ${HDF5_LIB_TARGET} ${HDF5_TOOLS_LIB_TARGET}) SET_TARGET_PROPERTIES (h5repart_test PROPERTIES FOLDER tools) - - # -------------------------------------------------------------------- - # Copy all the HDF5 files from the source directory into the test directory - # -------------------------------------------------------------------- - SET (HDF5_REFERENCE_TEST_FILES - family_file00000.h5 - family_file00001.h5 - family_file00002.h5 - family_file00003.h5 - family_file00004.h5 - family_file00005.h5 - family_file00006.h5 - family_file00007.h5 - family_file00008.h5 - family_file00009.h5 - family_file00010.h5 - family_file00011.h5 - family_file00012.h5 - family_file00013.h5 - family_file00014.h5 - family_file00015.h5 - family_file00016.h5 - family_file00017.h5 - ) - - FOREACH (h5_file ${HDF5_REFERENCE_TEST_FILES}) - SET (dest "${PROJECT_BINARY_DIR}/${h5_file}") - #MESSAGE (STATUS " Copying ${h5_file}") - ADD_CUSTOM_COMMAND ( - TARGET h5repart - POST_BUILD - COMMAND ${CMAKE_COMMAND} - ARGS -E copy_if_different ${HDF5_TOOLS_SRC_DIR}/testfiles/${h5_file} ${dest} - ) - ENDFOREACH (h5_file ${HDF5_REFERENCE_TEST_FILES}) - - SET (HDF5_MKGRP_TEST_FILES - #h5mkgrp_help.txt - #h5mkgrp_version - h5mkgrp_single.ls - h5mkgrp_single_v.ls - h5mkgrp_single_p.ls - h5mkgrp_single_l.ls - h5mkgrp_several.ls - h5mkgrp_several_v.ls - h5mkgrp_several_p.ls - h5mkgrp_several_l.ls - h5mkgrp_nested_p.ls - h5mkgrp_nested_lp.ls - h5mkgrp_nested_mult_p.ls - h5mkgrp_nested_mult_lp.ls - ) - - # make test dir - FILE (MAKE_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles") - - FOREACH (h5_mkgrp_file ${HDF5_MKGRP_TEST_FILES}) - SET (dest "${PROJECT_BINARY_DIR}/testfiles/${h5_mkgrp_file}") - #MESSAGE (STATUS " Copying ${h5_mkgrp_file}") - ADD_CUSTOM_COMMAND ( - TARGET h5mkgrp - POST_BUILD - COMMAND ${CMAKE_COMMAND} - ARGS -E copy_if_different ${HDF5_TOOLS_SRC_DIR}/testfiles/${h5_mkgrp_file} ${dest} - ) - ENDFOREACH (h5_mkgrp_file ${HDF5_MKGRP_TEST_FILES}) - - ADD_CUSTOM_COMMAND ( - TARGET h5mkgrp - POST_BUILD - COMMAND ${CMAKE_COMMAND} - ARGS -E copy_if_different ${PROJECT_SOURCE_DIR}/testfiles/h5mkgrp_help.txt ${PROJECT_BINARY_DIR}/testfiles/h5mkgrp_help.txt - ) - CONFIGURE_FILE (${PROJECT_SOURCE_DIR}/testfiles/h5mkgrp_version.txt.in ${PROJECT_BINARY_DIR}/testfiles/h5mkgrp_version.txt @ONLY) - -############################################################################## -############################################################################## -### T H E T E S T S M A C R O S ### -############################################################################## -############################################################################## - - MACRO (ADD_H5_TEST resultfile resultcode resultoption) - IF (NOT HDF5_ENABLE_USING_MEMCHECKER) - ADD_TEST ( - NAME H5MKGRP-${resultfile}-clear-objects - COMMAND ${CMAKE_COMMAND} - -E remove - ${resultfile}.h5 - ${resultfile}.out - ${resultfile}.out.err - ) - SET_TESTS_PROPERTIES (H5MKGRP-${resultfile}-clear-objects PROPERTIES WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles") - ENDIF (NOT HDF5_ENABLE_USING_MEMCHECKER) - - ADD_TEST ( - NAME H5MKGRP-${resultfile} - COMMAND $ ${resultoption} ${resultfile}.h5 ${ARGN} - ) - SET_TESTS_PROPERTIES (H5MKGRP-${resultfile} PROPERTIES WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles") - IF (HDF5_ENABLE_USING_MEMCHECKER) - IF (NOT "${last_test}" STREQUAL "") - SET_TESTS_PROPERTIES (H5MKGRP-${resultfile} PROPERTIES DEPENDS ${last_test}) - ENDIF (NOT "${last_test}" STREQUAL "") - ELSE (HDF5_ENABLE_USING_MEMCHECKER) - SET_TESTS_PROPERTIES (H5MKGRP-${resultfile} PROPERTIES DEPENDS H5MKGRP-${resultfile}-clear-objects) - ADD_TEST ( - NAME H5MKGRP-${resultfile}-h5ls - COMMAND "${CMAKE_COMMAND}" - -D "TEST_PROGRAM=$" - -D "TEST_ARGS:STRING=-v;-r;${resultfile}.h5" - -D "TEST_FOLDER=${PROJECT_BINARY_DIR}/testfiles" - -D "TEST_OUTPUT=${resultfile}.out" - -D "TEST_EXPECT=${resultcode}" - -D "TEST_MASK_MOD=true" - -D "TEST_REFERENCE=${resultfile}.ls" - -P "${HDF5_RESOURCES_DIR}/runTest.cmake" - ) - SET_TESTS_PROPERTIES (H5MKGRP-${resultfile}-h5ls PROPERTIES DEPENDS H5MKGRP-${resultfile}) - ENDIF (HDF5_ENABLE_USING_MEMCHECKER) - ENDMACRO (ADD_H5_TEST resultfile resultcode resultoption) - - MACRO (ADD_H5_CMP resultfile resultcode) - IF (HDF5_ENABLE_USING_MEMCHECKER) - ADD_TEST (NAME H5MKGRP_CMP-${resultfile} COMMAND $ ${ARGN}) - ELSE (HDF5_ENABLE_USING_MEMCHECKER) - ADD_TEST ( - NAME H5MKGRP_CMP-${resultfile}-clear-objects - COMMAND ${CMAKE_COMMAND} - -E remove - ${resultfile}.h5 - ${resultfile}.out - ${resultfile}.out.err - ) - SET_TESTS_PROPERTIES (H5MKGRP_CMP-${resultfile}-clear-objects PROPERTIES WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles") - ADD_TEST ( - NAME H5MKGRP_CMP-${resultfile} - COMMAND "${CMAKE_COMMAND}" - -D "TEST_PROGRAM=$" - -D "TEST_ARGS:STRING=${ARGN}" - -D "TEST_FOLDER=${PROJECT_BINARY_DIR}/testfiles" - -D "TEST_OUTPUT=${resultfile}.out" - -D "TEST_EXPECT=${resultcode}" - -D "TEST_REFERENCE=${resultfile}.txt" - -P "${HDF5_RESOURCES_DIR}/runTest.cmake" - ) - SET_TESTS_PROPERTIES (H5MKGRP_CMP-${resultfile} PROPERTIES DEPENDS H5MKGRP_CMP-${resultfile}-clear-objects) - ENDIF (HDF5_ENABLE_USING_MEMCHECKER) - ENDMACRO (ADD_H5_CMP resultfile resultcode) - -############################################################################## -############################################################################## -### T H E T E S T S ### -############################################################################## -############################################################################## - - # Remove any output file left over from previous test run - ADD_TEST ( - NAME H5REPART-clearall-objects - COMMAND ${CMAKE_COMMAND} - -E remove - fst_family00000.h5 - scd_family00000.h5 - scd_family00001.h5 - scd_family00002.h5 - scd_family00003.h5 - family_to_sec2.h5 - ) - IF (NOT "${last_test}" STREQUAL "") - SET_TESTS_PROPERTIES (H5REPART-clearall-objects PROPERTIES DEPENDS ${last_test}) - ENDIF (NOT "${last_test}" STREQUAL "") - SET (last_test "H5REPART-clearall-objects") - - # repartition family member size to 20,000 bytes. - ADD_TEST (NAME H5REPART-h5repart_20K COMMAND $ -m 20000 family_file%05d.h5 fst_family%05d.h5) - SET_TESTS_PROPERTIES (H5REPART-h5repart_20K PROPERTIES DEPENDS H5REPART-clearall-objects) - - # repartition family member size to 5 KB. - ADD_TEST (NAME H5REPART-h5repart_5K COMMAND $ -m 5k family_file%05d.h5 scd_family%05d.h5) - SET_TESTS_PROPERTIES (H5REPART-h5repart_5K PROPERTIES DEPENDS H5REPART-clearall-objects) - - # convert family file to sec2 file of 20,000 bytes - ADD_TEST (NAME H5REPART-h5repart_sec2 COMMAND $ -m 20000 -family_to_sec2 family_file%05d.h5 family_to_sec2.h5) - SET_TESTS_PROPERTIES (H5REPART-h5repart_sec2 PROPERTIES DEPENDS H5REPART-clearall-objects) - - # test the output files repartitioned above. - ADD_TEST (NAME H5REPART-h5repart_test COMMAND $) - SET_TESTS_PROPERTIES (H5REPART-h5repart_test PROPERTIES DEPENDS H5REPART-clearall-objects DEPENDS H5REPART-h5repart_20K DEPENDS H5REPART-h5repart_5K DEPENDS H5REPART-h5repart_sec2) - - SET (H5_DEP_EXECUTABLES ${H5_DEP_EXECUTABLES} - h5repart_test - ) - - IF (HDF5_ENABLE_USING_MEMCHECKER) - ADD_TEST ( - NAME H5MKGRP-clearall-objects - COMMAND ${CMAKE_COMMAND} - -E remove - h5mkgrp_help.out - h5mkgrp_help.out.err - h5mkgrp_version.out - h5mkgrp_version.out.err - h5mkgrp_single.h5 - h5mkgrp_single.out - h5mkgrp_single.out.err - h5mkgrp_single_v.h5 - h5mkgrp_single_v.out - h5mkgrp_single_v.out.err - h5mkgrp_single_p.h5 - h5mkgrp_single_p.out - h5mkgrp_single_p.out.err - h5mkgrp_single_l.h5 - h5mkgrp_single_l.out - h5mkgrp_single_l.out.err - h5mkgrp_several.h5 - h5mkgrp_several.out - h5mkgrp_several.out.err - h5mkgrp_several_v.h5 - h5mkgrp_several_v.out - h5mkgrp_several_v.out.err - h5mkgrp_several_p.h5 - h5mkgrp_several_p.out - h5mkgrp_several_p.out.err - h5mkgrp_several_l.h5 - h5mkgrp_several_l.out - h5mkgrp_several_l.out.err - h5mkgrp_nested_p.h5 - h5mkgrp_nested_p.out - h5mkgrp_nested_p.out.err - h5mkgrp_nested_lp.h5 - h5mkgrp_nested_lp.out - h5mkgrp_nested_lp.out.err - h5mkgrp_nested_mult_p.h5 - h5mkgrp_nested_mult_p.out - h5mkgrp_nested_mult_p.out.err - h5mkgrp_nested_mult_lp.h5 - h5mkgrp_nested_mult_lp.out - h5mkgrp_nested_mult_lp.out.err - ) - SET_TESTS_PROPERTIES (H5MKGRP-clearall-objects PROPERTIES WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles") - IF (NOT "${last_test}" STREQUAL "") - SET_TESTS_PROPERTIES (H5MKGRP-clearall-objects PROPERTIES DEPENDS ${last_test}) - ENDIF (NOT "${last_test}" STREQUAL "") - SET (last_test "H5MKGRP-clearall-objects") - ENDIF (HDF5_ENABLE_USING_MEMCHECKER) - - # Check that help & version is displayed properly - ADD_H5_CMP (h5mkgrp_help 0 "-h") - ADD_H5_CMP (h5mkgrp_version 0 "-V") - - # Create single group at root level - ADD_H5_TEST (h5mkgrp_single 0 "" single) - ADD_H5_TEST (h5mkgrp_single_v 0 "-v" single) - ADD_H5_TEST (h5mkgrp_single_p 0 "-p" single) - ADD_H5_TEST (h5mkgrp_single_l 0 "-l" latest) - - # Create several groups at root level - ADD_H5_TEST (h5mkgrp_several 0 "" one two) - ADD_H5_TEST (h5mkgrp_several_v 0 "-v" one two) - ADD_H5_TEST (h5mkgrp_several_p 0 "-p" one two) - ADD_H5_TEST (h5mkgrp_several_l 0 "-l" one two) - # Create various nested groups - ADD_H5_TEST (h5mkgrp_nested_p 0 "-p" /one/two) - ADD_H5_TEST (h5mkgrp_nested_lp 0 "-lp" /one/two) - ADD_H5_TEST (h5mkgrp_nested_mult_p 0 "-p" /one/two /three/four) - ADD_H5_TEST (h5mkgrp_nested_mult_lp 0 "-lp" /one/two /three/four) + INCLUDE (CMakeTests.cmake) ENDIF (BUILD_TESTING) ############################################################################## diff --git a/tools/misc/CMakeTests.cmake b/tools/misc/CMakeTests.cmake new file mode 100644 index 0000000..cc9c5e2 --- /dev/null +++ b/tools/misc/CMakeTests.cmake @@ -0,0 +1,272 @@ + +############################################################################## +############################################################################## +### T E S T I N G ### +############################################################################## +############################################################################## + + # -------------------------------------------------------------------- + # Copy all the HDF5 files from the source directory into the test directory + # -------------------------------------------------------------------- + SET (HDF5_REFERENCE_TEST_FILES + family_file00000.h5 + family_file00001.h5 + family_file00002.h5 + family_file00003.h5 + family_file00004.h5 + family_file00005.h5 + family_file00006.h5 + family_file00007.h5 + family_file00008.h5 + family_file00009.h5 + family_file00010.h5 + family_file00011.h5 + family_file00012.h5 + family_file00013.h5 + family_file00014.h5 + family_file00015.h5 + family_file00016.h5 + family_file00017.h5 + ) + + FOREACH (h5_file ${HDF5_REFERENCE_TEST_FILES}) + SET (dest "${PROJECT_BINARY_DIR}/${h5_file}") + #MESSAGE (STATUS " Copying ${h5_file}") + ADD_CUSTOM_COMMAND ( + TARGET h5repart + POST_BUILD + COMMAND ${CMAKE_COMMAND} + ARGS -E copy_if_different ${HDF5_TOOLS_SRC_DIR}/testfiles/${h5_file} ${dest} + ) + ENDFOREACH (h5_file ${HDF5_REFERENCE_TEST_FILES}) + + SET (HDF5_MKGRP_TEST_FILES + #h5mkgrp_help.txt + #h5mkgrp_version + h5mkgrp_single.ls + h5mkgrp_single_v.ls + h5mkgrp_single_p.ls + h5mkgrp_single_l.ls + h5mkgrp_several.ls + h5mkgrp_several_v.ls + h5mkgrp_several_p.ls + h5mkgrp_several_l.ls + h5mkgrp_nested_p.ls + h5mkgrp_nested_lp.ls + h5mkgrp_nested_mult_p.ls + h5mkgrp_nested_mult_lp.ls + ) + + # make test dir + FILE (MAKE_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles") + + FOREACH (h5_mkgrp_file ${HDF5_MKGRP_TEST_FILES}) + SET (dest "${PROJECT_BINARY_DIR}/testfiles/${h5_mkgrp_file}") + #MESSAGE (STATUS " Copying ${h5_mkgrp_file}") + ADD_CUSTOM_COMMAND ( + TARGET h5mkgrp + POST_BUILD + COMMAND ${CMAKE_COMMAND} + ARGS -E copy_if_different ${HDF5_TOOLS_SRC_DIR}/testfiles/${h5_mkgrp_file} ${dest} + ) + ENDFOREACH (h5_mkgrp_file ${HDF5_MKGRP_TEST_FILES}) + + ADD_CUSTOM_COMMAND ( + TARGET h5mkgrp + POST_BUILD + COMMAND ${CMAKE_COMMAND} + ARGS -E copy_if_different ${PROJECT_SOURCE_DIR}/testfiles/h5mkgrp_help.txt ${PROJECT_BINARY_DIR}/testfiles/h5mkgrp_help.txt + ) + CONFIGURE_FILE (${PROJECT_SOURCE_DIR}/testfiles/h5mkgrp_version.txt.in ${PROJECT_BINARY_DIR}/testfiles/h5mkgrp_version.txt @ONLY) + +############################################################################## +############################################################################## +### T H E T E S T S M A C R O S ### +############################################################################## +############################################################################## + + MACRO (ADD_H5_TEST resultfile resultcode resultoption) + IF (NOT HDF5_ENABLE_USING_MEMCHECKER) + ADD_TEST ( + NAME H5MKGRP-${resultfile}-clear-objects + COMMAND ${CMAKE_COMMAND} + -E remove + ${resultfile}.h5 + ${resultfile}.out + ${resultfile}.out.err + ) + SET_TESTS_PROPERTIES (H5MKGRP-${resultfile}-clear-objects PROPERTIES WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles") + ENDIF (NOT HDF5_ENABLE_USING_MEMCHECKER) + + ADD_TEST ( + NAME H5MKGRP-${resultfile} + COMMAND $ ${resultoption} ${resultfile}.h5 ${ARGN} + ) + SET_TESTS_PROPERTIES (H5MKGRP-${resultfile} PROPERTIES WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles") + IF (HDF5_ENABLE_USING_MEMCHECKER) + IF (NOT "${last_test}" STREQUAL "") + SET_TESTS_PROPERTIES (H5MKGRP-${resultfile} PROPERTIES DEPENDS ${last_test}) + ENDIF (NOT "${last_test}" STREQUAL "") + ELSE (HDF5_ENABLE_USING_MEMCHECKER) + SET_TESTS_PROPERTIES (H5MKGRP-${resultfile} PROPERTIES DEPENDS H5MKGRP-${resultfile}-clear-objects) + ADD_TEST ( + NAME H5MKGRP-${resultfile}-h5ls + COMMAND "${CMAKE_COMMAND}" + -D "TEST_PROGRAM=$" + -D "TEST_ARGS:STRING=-v;-r;${resultfile}.h5" + -D "TEST_FOLDER=${PROJECT_BINARY_DIR}/testfiles" + -D "TEST_OUTPUT=${resultfile}.out" + -D "TEST_EXPECT=${resultcode}" + -D "TEST_MASK_MOD=true" + -D "TEST_REFERENCE=${resultfile}.ls" + -P "${HDF5_RESOURCES_DIR}/runTest.cmake" + ) + SET_TESTS_PROPERTIES (H5MKGRP-${resultfile}-h5ls PROPERTIES DEPENDS H5MKGRP-${resultfile}) + ENDIF (HDF5_ENABLE_USING_MEMCHECKER) + ENDMACRO (ADD_H5_TEST resultfile resultcode resultoption) + + MACRO (ADD_H5_CMP resultfile resultcode) + IF (HDF5_ENABLE_USING_MEMCHECKER) + ADD_TEST (NAME H5MKGRP_CMP-${resultfile} COMMAND $ ${ARGN}) + ELSE (HDF5_ENABLE_USING_MEMCHECKER) + ADD_TEST ( + NAME H5MKGRP_CMP-${resultfile}-clear-objects + COMMAND ${CMAKE_COMMAND} + -E remove + ${resultfile}.h5 + ${resultfile}.out + ${resultfile}.out.err + ) + SET_TESTS_PROPERTIES (H5MKGRP_CMP-${resultfile}-clear-objects PROPERTIES WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles") + ADD_TEST ( + NAME H5MKGRP_CMP-${resultfile} + COMMAND "${CMAKE_COMMAND}" + -D "TEST_PROGRAM=$" + -D "TEST_ARGS:STRING=${ARGN}" + -D "TEST_FOLDER=${PROJECT_BINARY_DIR}/testfiles" + -D "TEST_OUTPUT=${resultfile}.out" + -D "TEST_EXPECT=${resultcode}" + -D "TEST_REFERENCE=${resultfile}.txt" + -P "${HDF5_RESOURCES_DIR}/runTest.cmake" + ) + SET_TESTS_PROPERTIES (H5MKGRP_CMP-${resultfile} PROPERTIES DEPENDS H5MKGRP_CMP-${resultfile}-clear-objects) + ENDIF (HDF5_ENABLE_USING_MEMCHECKER) + ENDMACRO (ADD_H5_CMP resultfile resultcode) + +############################################################################## +############################################################################## +### T H E T E S T S ### +############################################################################## +############################################################################## + + # Remove any output file left over from previous test run + ADD_TEST ( + NAME H5REPART-clearall-objects + COMMAND ${CMAKE_COMMAND} + -E remove + fst_family00000.h5 + scd_family00000.h5 + scd_family00001.h5 + scd_family00002.h5 + scd_family00003.h5 + family_to_sec2.h5 + ) + IF (NOT "${last_test}" STREQUAL "") + SET_TESTS_PROPERTIES (H5REPART-clearall-objects PROPERTIES DEPENDS ${last_test}) + ENDIF (NOT "${last_test}" STREQUAL "") + SET (last_test "H5REPART-clearall-objects") + + # repartition family member size to 20,000 bytes. + ADD_TEST (NAME H5REPART-h5repart_20K COMMAND $ -m 20000 family_file%05d.h5 fst_family%05d.h5) + SET_TESTS_PROPERTIES (H5REPART-h5repart_20K PROPERTIES DEPENDS H5REPART-clearall-objects) + + # repartition family member size to 5 KB. + ADD_TEST (NAME H5REPART-h5repart_5K COMMAND $ -m 5k family_file%05d.h5 scd_family%05d.h5) + SET_TESTS_PROPERTIES (H5REPART-h5repart_5K PROPERTIES DEPENDS H5REPART-clearall-objects) + + # convert family file to sec2 file of 20,000 bytes + ADD_TEST (NAME H5REPART-h5repart_sec2 COMMAND $ -m 20000 -family_to_sec2 family_file%05d.h5 family_to_sec2.h5) + SET_TESTS_PROPERTIES (H5REPART-h5repart_sec2 PROPERTIES DEPENDS H5REPART-clearall-objects) + + # test the output files repartitioned above. + ADD_TEST (NAME H5REPART-h5repart_test COMMAND $) + SET_TESTS_PROPERTIES (H5REPART-h5repart_test PROPERTIES DEPENDS H5REPART-clearall-objects DEPENDS H5REPART-h5repart_20K DEPENDS H5REPART-h5repart_5K DEPENDS H5REPART-h5repart_sec2) + + SET (H5_DEP_EXECUTABLES ${H5_DEP_EXECUTABLES} + h5repart_test + ) + + IF (HDF5_ENABLE_USING_MEMCHECKER) + ADD_TEST ( + NAME H5MKGRP-clearall-objects + COMMAND ${CMAKE_COMMAND} + -E remove + h5mkgrp_help.out + h5mkgrp_help.out.err + h5mkgrp_version.out + h5mkgrp_version.out.err + h5mkgrp_single.h5 + h5mkgrp_single.out + h5mkgrp_single.out.err + h5mkgrp_single_v.h5 + h5mkgrp_single_v.out + h5mkgrp_single_v.out.err + h5mkgrp_single_p.h5 + h5mkgrp_single_p.out + h5mkgrp_single_p.out.err + h5mkgrp_single_l.h5 + h5mkgrp_single_l.out + h5mkgrp_single_l.out.err + h5mkgrp_several.h5 + h5mkgrp_several.out + h5mkgrp_several.out.err + h5mkgrp_several_v.h5 + h5mkgrp_several_v.out + h5mkgrp_several_v.out.err + h5mkgrp_several_p.h5 + h5mkgrp_several_p.out + h5mkgrp_several_p.out.err + h5mkgrp_several_l.h5 + h5mkgrp_several_l.out + h5mkgrp_several_l.out.err + h5mkgrp_nested_p.h5 + h5mkgrp_nested_p.out + h5mkgrp_nested_p.out.err + h5mkgrp_nested_lp.h5 + h5mkgrp_nested_lp.out + h5mkgrp_nested_lp.out.err + h5mkgrp_nested_mult_p.h5 + h5mkgrp_nested_mult_p.out + h5mkgrp_nested_mult_p.out.err + h5mkgrp_nested_mult_lp.h5 + h5mkgrp_nested_mult_lp.out + h5mkgrp_nested_mult_lp.out.err + ) + SET_TESTS_PROPERTIES (H5MKGRP-clearall-objects PROPERTIES WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles") + IF (NOT "${last_test}" STREQUAL "") + SET_TESTS_PROPERTIES (H5MKGRP-clearall-objects PROPERTIES DEPENDS ${last_test}) + ENDIF (NOT "${last_test}" STREQUAL "") + SET (last_test "H5MKGRP-clearall-objects") + ENDIF (HDF5_ENABLE_USING_MEMCHECKER) + + # Check that help & version is displayed properly + ADD_H5_CMP (h5mkgrp_help 0 "-h") + ADD_H5_CMP (h5mkgrp_version 0 "-V") + + # Create single group at root level + ADD_H5_TEST (h5mkgrp_single 0 "" single) + ADD_H5_TEST (h5mkgrp_single_v 0 "-v" single) + ADD_H5_TEST (h5mkgrp_single_p 0 "-p" single) + ADD_H5_TEST (h5mkgrp_single_l 0 "-l" latest) + + # Create several groups at root level + ADD_H5_TEST (h5mkgrp_several 0 "" one two) + ADD_H5_TEST (h5mkgrp_several_v 0 "-v" one two) + ADD_H5_TEST (h5mkgrp_several_p 0 "-p" one two) + ADD_H5_TEST (h5mkgrp_several_l 0 "-l" one two) + + # Create various nested groups + ADD_H5_TEST (h5mkgrp_nested_p 0 "-p" /one/two) + ADD_H5_TEST (h5mkgrp_nested_lp 0 "-lp" /one/two) + ADD_H5_TEST (h5mkgrp_nested_mult_p 0 "-p" /one/two /three/four) + ADD_H5_TEST (h5mkgrp_nested_mult_lp 0 "-lp" /one/two /three/four) -- cgit v0.12 From 482a9c28e71b0c1b3767bcf30be3c534bbc65ed9 Mon Sep 17 00:00:00 2001 From: Quincey Koziol Date: Mon, 19 Aug 2013 17:13:15 -0500 Subject: [svn-r24030] Description: Clean up more compiler warnings. Tested on: Mac OSX/64 10.8.4 (amazon) w/gcc, C++ & FORTRAN (too minor to require h5committest) --- hl/test/gen_test_ds.c | 2 +- src/H5FDmulti.c | 120 ------- test/cache_api.c | 796 +++++++++++++++++++++---------------------- test/dtransform.c | 38 +-- test/gen_cross.c | 16 +- test/ttsafe_error.c | 2 +- tools/h5diff/h5diffgentest.c | 56 +-- tools/h5dump/h5dump_ddl.c | 8 +- tools/h5dump/h5dump_xml.c | 82 +++++ tools/h5dump/h5dump_xml.h | 81 ----- tools/lib/h5tools_dump.c | 2 +- tools/lib/h5tools_dump.h | 2 +- tools/lib/h5trav.c | 48 +-- 13 files changed, 571 insertions(+), 682 deletions(-) diff --git a/hl/test/gen_test_ds.c b/hl/test/gen_test_ds.c index 93bda2b..a60a560 100644 --- a/hl/test/gen_test_ds.c +++ b/hl/test/gen_test_ds.c @@ -102,7 +102,7 @@ int main(int argc , char **argv) nerrors += test_duplicatelong_attachscales(filename) < 0 ? 1 : 0; nerrors += test_samelong_scalenames(filename) < 0 ? 1 : 0; nerrors += test_foreign_scaleattached(filename) < 0 ? 1 : 0; - + nerrors += test_long_scalenames(filename) < 0 ? 1 : 0; if(nerrors) goto error; printf("Dimension scales file generation passed.\n"); diff --git a/src/H5FDmulti.c b/src/H5FDmulti.c index e5775ab..0a899a9 100644 --- a/src/H5FDmulti.c +++ b/src/H5FDmulti.c @@ -604,126 +604,6 @@ H5Pget_fapl_multi(hid_t fapl_id, H5FD_mem_t *memb_map/*out*/, /*------------------------------------------------------------------------- - * Function: H5FD_multi_dxpl_copy_cb - * - * Purpose: Multi VFD DXPL property 'copy' callback - * - * Return: Success: 0 - * Failure: -1 - * - * Programmer: Quincey Koziol - * Wednesday, August 15, 2012 - * - *------------------------------------------------------------------------- - */ -static herr_t -H5FD_multi_dxpl_copy_cb(const char *name, size_t size, void *_dx) -{ - H5FD_multi_dxpl_t *dx = (H5FD_multi_dxpl_t *)_dx; - static const char *func = "H5FD_multi_dxpl_copy_cb"; /* Function Name for error reporting */ - - /* Shut compiler up */ - name = name; - - /* Sanity check */ - assert(size == sizeof(H5FD_multi_dxpl_t)); - - ALL_MEMBERS(mt) { - if(dx->memb_dxpl[mt] >= 0) - if(H5Iinc_ref(dx->memb_dxpl[mt]) < 0) - H5Epush_ret(func, H5E_ERR_CLS, H5E_PLIST, H5E_CANTINC, "can't increment ref. count for multi VFD property", -1) - } END_MEMBERS; - - return 0; -} /* end H5FD_multi_dxpl_copy_cb() */ - - -/*------------------------------------------------------------------------- - * Function: H5FD_multi_dxpl_cmp_cb - * - * Purpose: Multi VFD DXPL property 'compare' callback - * - * Return: Success: same as memcmp() - * Failure: - * - * Programmer: Quincey Koziol - * Wednesday, August 15, 2012 - * - *------------------------------------------------------------------------- - */ -static int -H5FD_multi_dxpl_cmp_cb(const void *_dx1, const void *_dx2, size_t size) -{ - const H5FD_multi_dxpl_t *dx1 = (const H5FD_multi_dxpl_t *)_dx1; - const H5FD_multi_dxpl_t *dx2 = (const H5FD_multi_dxpl_t *)_dx2; - int cmp_status; - - /* Sanity check */ - assert(size == sizeof(H5FD_multi_dxpl_t)); - - ALL_MEMBERS(mt) { - if(dx1->memb_dxpl[mt] >= 0) { - if(dx2->memb_dxpl[mt] >= 0) { - cmp_status = H5Pequal(dx1->memb_dxpl[mt], dx2->memb_dxpl[mt]); - if(cmp_status != 0) - return(cmp_status); - } /* end if */ - else - return(-1); - } /* end if */ - else { - if(dx2->memb_dxpl[mt] >= 0) - return(1); - else - if(dx1->memb_dxpl[mt] > dx2->memb_dxpl[mt]) - return(-1); - else if(dx1->memb_dxpl[mt] < dx2->memb_dxpl[mt]) - return(1); - else - continue; - } /* end else */ - } END_MEMBERS; - - return 0; -} /* end H5FD_multi_dxpl_cmp_cb() */ - - -/*------------------------------------------------------------------------- - * Function: H5FD_multi_dxpl_cls_cb - * - * Purpose: Multi VFD DXPL property 'close' callback - * - * Return: Success: 0 - * Failure: -1 - * - * Programmer: Quincey Koziol - * Wednesday, August 15, 2012 - * - *------------------------------------------------------------------------- - */ -static herr_t -H5FD_multi_dxpl_cls_cb(const char *name, size_t size, void *_dx) -{ - H5FD_multi_dxpl_t *dx = (H5FD_multi_dxpl_t *)_dx; - static const char *func = "H5FD_multi_dxpl_cls_cb"; /* Function Name for error reporting */ - - /* Shut compiler up */ - name = name; - - /* Sanity check */ - assert(size == sizeof(H5FD_multi_dxpl_t)); - - ALL_MEMBERS(mt) { - if(dx->memb_dxpl[mt] >= 0) - if(H5Idec_ref(dx->memb_dxpl[mt]) < 0) - H5Epush_ret(func, H5E_ERR_CLS, H5E_PLIST, H5E_CANTDEC, "can't increment ref. count for multi VFD property", -1) - } END_MEMBERS; - - return 0; -} /* end H5FD_multi_dxpl_cls_cb() */ - - -/*------------------------------------------------------------------------- * Function: H5FD_multi_sb_size * * Purpose: Returns the size of the private information to be stored in diff --git a/test/cache_api.c b/test/cache_api.c index c6e27c6..85b2407 100644 --- a/test/cache_api.c +++ b/test/cache_api.c @@ -89,27 +89,27 @@ check_fapl_mdc_api_calls(void) /* hbool_t evictions_enabled = */ TRUE, /* hbool_t set_initial_size = */ TRUE, /* size_t initial_size = */ (1 * 1024 * 1024 + 1), - /* double min_clean_fraction = */ 0.2, + /* double min_clean_fraction = */ 0.2f, /* size_t max_size = */ (16 * 1024 * 1024 + 1), /* size_t min_size = */ ( 1 * 1024 * 1024 + 1), /* long int epoch_length = */ 50001, /* enum H5C_cache_incr_mode incr_mode = */ H5C_incr__threshold, - /* double lower_hr_threshold = */ 0.91, - /* double increment = */ 2.1, + /* double lower_hr_threshold = */ 0.91f, + /* double increment = */ 2.1f, /* hbool_t apply_max_increment = */ TRUE, /* size_t max_increment = */ (4 * 1024 * 1024 + 1), /* enum H5C_cache_flash_incr_mode */ /* flash_incr_mode = */ H5C_flash_incr__off, - /* double flash_multiple = */ 2.0, - /* double flash_threshold = */ 0.5, + /* double flash_multiple = */ 2.0f, + /* double flash_threshold = */ 0.5f, /* enum H5C_cache_decr_mode decr_mode = */ H5C_decr__age_out, - /* double upper_hr_threshold = */ 0.998, - /* double decrement = */ 0.91, + /* double upper_hr_threshold = */ 0.998f, + /* double decrement = */ 0.91f, /* hbool_t apply_max_decrement = */ TRUE, /* size_t max_decrement = */ (1 * 1024 * 1024 - 1), /* int epochs_before_eviction = */ 4, /* hbool_t apply_empty_reserve = */ TRUE, - /* double empty_reserve = */ 0.05, + /* double empty_reserve = */ 0.05f, /* int dirty_bytes_threshold = */ (256 * 1024), /* int metadata_write_strategy = */ H5AC__DEFAULT_METADATA_WRITE_STRATEGY @@ -538,27 +538,27 @@ check_file_mdc_api_calls(void) /* hbool_t evictions_enabled = */ TRUE, /* hbool_t set_initial_size = */ TRUE, /* size_t initial_size = */ (1 * 1024 * 1024 + 1), - /* double min_clean_fraction = */ 0.2, + /* double min_clean_fraction = */ 0.2f, /* size_t max_size = */ (16 * 1024 * 1024 + 1), /* size_t min_size = */ ( 1 * 1024 * 1024 + 1), /* long int epoch_length = */ 50001, /* enum H5C_cache_incr_mode incr_mode = */ H5C_incr__threshold, - /* double lower_hr_threshold = */ 0.91, - /* double increment = */ 2.1, + /* double lower_hr_threshold = */ 0.91f, + /* double increment = */ 2.1f, /* hbool_t apply_max_increment = */ TRUE, /* size_t max_increment = */ (4 * 1024 * 1024 + 1), /* enum H5C_cache_flash_incr_mode */ /* flash_incr_mode = */ H5C_flash_incr__off, - /* double flash_multiple = */ 2.0, - /* double flash_threshold = */ 0.5, + /* double flash_multiple = */ 2.0f, + /* double flash_threshold = */ 0.5f, /* enum H5C_cache_decr_mode decr_mode = */ H5C_decr__age_out, - /* double upper_hr_threshold = */ 0.998, - /* double decrement = */ 0.91, + /* double upper_hr_threshold = */ 0.998f, + /* double decrement = */ 0.91f, /* hbool_t apply_max_decrement = */ TRUE, /* size_t max_decrement = */ (1 * 1024 * 1024 - 1), /* int epochs_before_eviction = */ 4, /* hbool_t apply_empty_reserve = */ TRUE, - /* double empty_reserve = */ 0.05, + /* double empty_reserve = */ 0.05f, /* int dirty_bytes_threshold = */ (256 * 1024), /* int metadata_write_strategy = */ H5AC__DEFAULT_METADATA_WRITE_STRATEGY @@ -573,27 +573,27 @@ check_file_mdc_api_calls(void) /* hbool_t evictions_enabled = */ TRUE, /* hbool_t set_initial_size = */ TRUE, /* size_t initial_size = */ (512 * 1024), - /* double min_clean_fraction = */ 0.1, + /* double min_clean_fraction = */ 0.1f, /* size_t max_size = */ ( 8 * 1024 * 1024), /* size_t min_size = */ ( 512 * 1024), /* long int epoch_length = */ 25000, /* enum H5C_cache_incr_mode incr_mode = */ H5C_incr__threshold, - /* double lower_hr_threshold = */ 0.9, - /* double increment = */ 2.0, + /* double lower_hr_threshold = */ 0.9f, + /* double increment = */ 2.0f, /* hbool_t apply_max_increment = */ TRUE, /* size_t max_increment = */ (2 * 1024 * 1024), /* enum H5C_cache_flash_incr_mode */ /* flash_incr_mode = */ H5C_flash_incr__off, - /* double flash_multiple = */ 1.5, - /* double flash_threshold = */ 0.4, + /* double flash_multiple = */ 1.5f, + /* double flash_threshold = */ 0.4f, /* enum H5C_cache_decr_mode decr_mode = */ H5C_decr__threshold, - /* double upper_hr_threshold = */ 0.9995, - /* double decrement = */ 0.95, + /* double upper_hr_threshold = */ 0.9995f, + /* double decrement = */ 0.95f, /* hbool_t apply_max_decrement = */ TRUE, /* size_t max_decrement = */ (512 * 1024), /* int epochs_before_eviction = */ 4, /* hbool_t apply_empty_reserve = */ TRUE, - /* double empty_reserve = */ 0.05, + /* double empty_reserve = */ 0.05f, /* int dirty_bytes_threshold = */ (256 * 1024), /* int metadata_write_strategy = */ H5AC__DEFAULT_METADATA_WRITE_STRATEGY @@ -608,27 +608,27 @@ check_file_mdc_api_calls(void) /* hbool_t evictions_enabled = */ TRUE, /* hbool_t set_initial_size = */ TRUE, /* size_t initial_size = */ (1 * 1024 * 1024), - /* double min_clean_fraction = */ 0.2, + /* double min_clean_fraction = */ 0.2f, /* size_t max_size = */ (16 * 1024 * 1024), /* size_t min_size = */ ( 1 * 1024 * 1024), /* long int epoch_length = */ 50000, /* enum H5C_cache_incr_mode incr_mode = */ H5C_incr__off, - /* double lower_hr_threshold = */ 0.90, - /* double increment = */ 2.0, + /* double lower_hr_threshold = */ 0.90f, + /* double increment = */ 2.0f, /* 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__off, - /* double flash_multiple = */ 2.1, - /* double flash_threshold = */ 0.6, + /* double flash_multiple = */ 2.1f, + /* double flash_threshold = */ 0.6f, /* enum H5C_cache_decr_mode decr_mode = */ H5C_decr__off, - /* double upper_hr_threshold = */ 0.999, - /* double decrement = */ 0.9, + /* double upper_hr_threshold = */ 0.999f, + /* double decrement = */ 0.9f, /* hbool_t apply_max_decrement = */ FALSE, /* size_t max_decrement = */ (1 * 1024 * 1024 - 1), /* int epochs_before_eviction = */ 3, /* hbool_t apply_empty_reserve = */ FALSE, - /* double empty_reserve = */ 0.05, + /* double empty_reserve = */ 0.05f, /* int dirty_bytes_threshold = */ (256 * 1024), /* int metadata_write_strategy = */ H5AC__DEFAULT_METADATA_WRITE_STRATEGY @@ -643,28 +643,28 @@ check_file_mdc_api_calls(void) /* hbool_t evictions_enabled = */ TRUE, /* hbool_t set_initial_size = */ TRUE, /* size_t initial_size = */ (1 * 1024 * 1024), - /* double min_clean_fraction = */ 0.15, + /* double min_clean_fraction = */ 0.15f, /* size_t max_size = */ (20 * 1024 * 1024), /* size_t min_size = */ ( 1 * 1024 * 1024), /* long int epoch_length = */ 75000, /* enum H5C_cache_incr_mode incr_mode = */ H5C_incr__threshold, - /* double lower_hr_threshold = */ 0.9, - /* double increment = */ 2.0, + /* double lower_hr_threshold = */ 0.9f, + /* double increment = */ 2.0f, /* hbool_t apply_max_increment = */ TRUE, /* size_t max_increment = */ (2 * 1024 * 1024), /* enum H5C_cache_flash_incr_mode */ /* flash_incr_mode = */ H5C_flash_incr__off, - /* double flash_multiple = */ 1.1, - /* double flash_threshold = */ 0.3, + /* double flash_multiple = */ 1.1f, + /* double flash_threshold = */ 0.3f, /* enum H5C_cache_decr_mode decr_mode = */ H5C_decr__age_out_with_threshold, - /* double upper_hr_threshold = */ 0.999, - /* double decrement = */ 0.9, + /* double upper_hr_threshold = */ 0.999f, + /* double decrement = */ 0.9f, /* 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.1, + /* double empty_reserve = */ 0.1f, /* int dirty_bytes_threshold = */ (256 * 1024), /* int metadata_write_strategy = */ H5AC__DEFAULT_METADATA_WRITE_STRATEGY @@ -773,7 +773,7 @@ check_file_mdc_api_calls(void) pass = FALSE; failure_mssg = "H5Fget_mdc_hit_rate() failed 1.\n"; - } else if ( hit_rate != 0.0 ) { + } else if ( hit_rate != 0.0f ) { pass = FALSE; failure_mssg = @@ -873,7 +873,7 @@ mdc_api_call_smoke_check(int express_test) hbool_t valid_chunk; hbool_t dump_hit_rate = FALSE; int64_t min_accesses = 1000; - double min_hit_rate = 0.90; + double min_hit_rate = 0.90f; hbool_t dump_cache_size = FALSE; hid_t file_id = -1; hid_t dataspace_id = -1; @@ -901,27 +901,27 @@ mdc_api_call_smoke_check(int express_test) /* hbool_t evictions_enabled = */ TRUE, /* hbool_t set_initial_size = */ TRUE, /* size_t initial_size = */ 500000, - /* double min_clean_fraction = */ 0.1, + /* double min_clean_fraction = */ 0.1f, /* size_t max_size = */ 16000000, /* size_t min_size = */ 250000, /* long int epoch_length = */ 50000, /* enum H5C_cache_incr_mode incr_mode = */ H5C_incr__off, - /* double lower_hr_threshold = */ 0.95, - /* double increment = */ 2.0, + /* double lower_hr_threshold = */ 0.95f, + /* double increment = */ 2.0f, /* hbool_t apply_max_increment = */ FALSE, /* size_t max_increment = */ 4000000, /* enum H5C_cache_flash_incr_mode */ /* flash_incr_mode = */ H5C_flash_incr__off, - /* double flash_multiple = */ 2.0, - /* double flash_threshold = */ 0.5, + /* double flash_multiple = */ 2.0f, + /* double flash_threshold = */ 0.5f, /* enum H5C_cache_decr_mode decr_mode = */ H5C_decr__off, - /* double upper_hr_threshold = */ 0.999, - /* double decrement = */ 0.9, + /* double upper_hr_threshold = */ 0.999f, + /* double decrement = */ 0.9f, /* hbool_t apply_max_decrement = */ FALSE, /* size_t max_decrement = */ 1000000, /* int epochs_before_eviction = */ 2, /* hbool_t apply_empty_reserve = */ TRUE, - /* double empty_reserve = */ 0.05, + /* double empty_reserve = */ 0.05f, /* int dirty_bytes_threshold = */ (256 * 1024), /* int metadata_write_strategy = */ H5AC__DEFAULT_METADATA_WRITE_STRATEGY @@ -936,27 +936,27 @@ mdc_api_call_smoke_check(int express_test) /* hbool_t evictions_enabled = */ TRUE, /* hbool_t set_initial_size = */ TRUE, /* size_t initial_size = */ 12000000, - /* double min_clean_fraction = */ 0.1, + /* double min_clean_fraction = */ 0.1f, /* size_t max_size = */ 16000000, /* size_t min_size = */ 250000, /* long int epoch_length = */ 50000, /* enum H5C_cache_incr_mode incr_mode = */ H5C_incr__off, - /* double lower_hr_threshold = */ 0.95, - /* double increment = */ 2.0, + /* double lower_hr_threshold = */ 0.95f, + /* double increment = */ 2.0f, /* hbool_t apply_max_increment = */ FALSE, /* size_t max_increment = */ 4000000, /* enum H5C_cache_flash_incr_mode */ /* flash_incr_mode = */ H5C_flash_incr__off, - /* double flash_multiple = */ 2.0, - /* double flash_threshold = */ 0.5, + /* double flash_multiple = */ 2.0f, + /* double flash_threshold = */ 0.5f, /* enum H5C_cache_decr_mode decr_mode = */ H5C_decr__off, - /* double upper_hr_threshold = */ 0.999, - /* double decrement = */ 0.9, + /* double upper_hr_threshold = */ 0.999f, + /* double decrement = */ 0.9f, /* hbool_t apply_max_decrement = */ FALSE, /* size_t max_decrement = */ 1000000, /* int epochs_before_eviction = */ 2, /* hbool_t apply_empty_reserve = */ TRUE, - /* double empty_reserve = */ 0.05, + /* double empty_reserve = */ 0.05f, /* int dirty_bytes_threshold = */ (256 * 1024), /* int metadata_write_strategy = */ H5AC__DEFAULT_METADATA_WRITE_STRATEGY @@ -971,27 +971,27 @@ mdc_api_call_smoke_check(int express_test) /* hbool_t evictions_enabled = */ TRUE, /* hbool_t set_initial_size = */ TRUE, /* size_t initial_size = */ 2000000, - /* double min_clean_fraction = */ 0.1, + /* double min_clean_fraction = */ 0.1f, /* size_t max_size = */ 16000000, /* size_t min_size = */ 250000, /* long int epoch_length = */ 50000, /* enum H5C_cache_incr_mode incr_mode = */ H5C_incr__off, - /* double lower_hr_threshold = */ 0.95, - /* double increment = */ 2.0, + /* double lower_hr_threshold = */ 0.95f, + /* double increment = */ 2.0f, /* hbool_t apply_max_increment = */ FALSE, /* size_t max_increment = */ 4000000, /* enum H5C_cache_flash_incr_mode */ /* flash_incr_mode = */ H5C_flash_incr__off, - /* double flash_multiple = */ 2.0, - /* double flash_threshold = */ 0.5, + /* double flash_multiple = */ 2.0f, + /* double flash_threshold = */ 0.5f, /* enum H5C_cache_decr_mode decr_mode = */ H5C_decr__off, - /* double upper_hr_threshold = */ 0.999, - /* double decrement = */ 0.9, + /* double upper_hr_threshold = */ 0.999f, + /* double decrement = */ 0.9f, /* hbool_t apply_max_decrement = */ FALSE, /* size_t max_decrement = */ 1000000, /* int epochs_before_eviction = */ 2, /* hbool_t apply_empty_reserve = */ TRUE, - /* double empty_reserve = */ 0.05, + /* double empty_reserve = */ 0.05f, /* int dirty_bytes_threshold = */ (256 * 1024), /* int metadata_write_strategy = */ H5AC__DEFAULT_METADATA_WRITE_STRATEGY @@ -1541,27 +1541,27 @@ H5AC_cache_config_t invalid_configs[NUM_INVALID_CONFIGS] = /* hbool_t evictions_enabled = */ TRUE, /* hbool_t set_initial_size = */ TRUE, /* size_t initial_size = */ (1 * 1024 * 1024), - /* double min_clean_fraction = */ 0.25, + /* double min_clean_fraction = */ 0.25f, /* size_t max_size = */ (16 * 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.9, - /* double increment = */ 2.0, + /* double lower_hr_threshold = */ 0.9f, + /* double increment = */ 2.0f, /* 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__off, - /* double flash_multiple = */ 2.0, - /* double flash_threshold = */ 0.5, + /* double flash_multiple = */ 2.0f, + /* double flash_threshold = */ 0.5f, /* enum H5C_cache_decr_mode decr_mode = */ H5C_decr__age_out_with_threshold, - /* double upper_hr_threshold = */ 0.999, - /* double decrement = */ 0.9, + /* double upper_hr_threshold = */ 0.999f, + /* double decrement = */ 0.9f, /* 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.1, + /* double empty_reserve = */ 0.1f, /* int dirty_bytes_threshold = */ (256 * 1024), /* int metadata_write_strategy = */ H5AC__DEFAULT_METADATA_WRITE_STRATEGY @@ -1576,27 +1576,27 @@ H5AC_cache_config_t invalid_configs[NUM_INVALID_CONFIGS] = /* hbool_t evictions_enabled = */ TRUE, /* hbool_t set_initial_size = */ TRUE, /* size_t initial_size = */ (1 * 1024 * 1024), - /* double min_clean_fraction = */ 0.25, + /* double min_clean_fraction = */ 0.25f, /* size_t max_size = */ (16 * 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.9, - /* double increment = */ 2.0, + /* double lower_hr_threshold = */ 0.9f, + /* double increment = */ 2.0f, /* 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__off, - /* double flash_multiple = */ 2.0, - /* double flash_threshold = */ 0.5, + /* double flash_multiple = */ 2.0f, + /* double flash_threshold = */ 0.5f, /* enum H5C_cache_decr_mode decr_mode = */ H5C_decr__age_out_with_threshold, - /* double upper_hr_threshold = */ 0.999, - /* double decrement = */ 0.9, + /* double upper_hr_threshold = */ 0.999f, + /* double decrement = */ 0.9f, /* 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.1, + /* double empty_reserve = */ 0.1f, /* int dirty_bytes_threshold = */ (256 * 1024), /* int metadata_write_strategy = */ H5AC__DEFAULT_METADATA_WRITE_STRATEGY @@ -1611,27 +1611,27 @@ H5AC_cache_config_t invalid_configs[NUM_INVALID_CONFIGS] = /* hbool_t evictions_enabled = */ TRUE, /* hbool_t set_initial_size = */ TRUE, /* size_t initial_size = */ (1 * 1024 * 1024), - /* double min_clean_fraction = */ 0.25, + /* double min_clean_fraction = */ 0.25f, /* size_t max_size = */ (16 * 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.9, - /* double increment = */ 2.0, + /* double lower_hr_threshold = */ 0.9f, + /* double increment = */ 2.0f, /* 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__off, - /* double flash_multiple = */ 2.0, - /* double flash_threshold = */ 0.5, + /* double flash_multiple = */ 2.0f, + /* double flash_threshold = */ 0.5f, /* enum H5C_cache_decr_mode decr_mode = */ H5C_decr__age_out_with_threshold, - /* double upper_hr_threshold = */ 0.999, - /* double decrement = */ 0.9, + /* double upper_hr_threshold = */ 0.999f, + /* double decrement = */ 0.9f, /* 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.1, + /* double empty_reserve = */ 0.1f, /* int dirty_bytes_threshold = */ (256 * 1024), /* int metadata_write_strategy = */ H5AC__DEFAULT_METADATA_WRITE_STRATEGY @@ -1646,27 +1646,27 @@ H5AC_cache_config_t invalid_configs[NUM_INVALID_CONFIGS] = /* hbool_t evictions_enabled = */ TRUE, /* hbool_t set_initial_size = */ TRUE, /* size_t initial_size = */ (1 * 1024 * 1024), - /* double min_clean_fraction = */ 0.25, + /* double min_clean_fraction = */ 0.25f, /* size_t max_size = */ (16 * 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.9, - /* double increment = */ 2.0, + /* double lower_hr_threshold = */ 0.9f, + /* double increment = */ 2.0f, /* 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__off, - /* double flash_multiple = */ 2.0, - /* double flash_threshold = */ 0.5, + /* double flash_multiple = */ 2.0f, + /* double flash_threshold = */ 0.5f, /* enum H5C_cache_decr_mode decr_mode = */ H5C_decr__age_out_with_threshold, - /* double upper_hr_threshold = */ 0.999, - /* double decrement = */ 0.9, + /* double upper_hr_threshold = */ 0.999f, + /* double decrement = */ 0.9f, /* 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.1, + /* double empty_reserve = */ 0.1f, /* int dirty_bytes_threshold = */ (256 * 1024), /* int metadata_write_strategy = */ H5AC__DEFAULT_METADATA_WRITE_STRATEGY @@ -1681,27 +1681,27 @@ H5AC_cache_config_t invalid_configs[NUM_INVALID_CONFIGS] = /* hbool_t evictions_enabled = */ TRUE, /* hbool_t set_initial_size = */ TRUE, /* size_t initial_size = */ (1 * 1024 * 1024), - /* double min_clean_fraction = */ 0.25, + /* double min_clean_fraction = */ 0.25f, /* size_t max_size = */ (16 * 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.9, - /* double increment = */ 2.0, + /* double lower_hr_threshold = */ 0.9f, + /* double increment = */ 2.0f, /* 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__off, - /* double flash_multiple = */ 2.0, - /* double flash_threshold = */ 0.5, + /* double flash_multiple = */ 2.0f, + /* double flash_threshold = */ 0.5f, /* enum H5C_cache_decr_mode decr_mode = */ H5C_decr__age_out_with_threshold, - /* double upper_hr_threshold = */ 0.999, - /* double decrement = */ 0.9, + /* double upper_hr_threshold = */ 0.999f, + /* double decrement = */ 0.9f, /* 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.1, + /* double empty_reserve = */ 0.1f, /* int dirty_bytes_threshold = */ (256 * 1024), /* int metadata_write_strategy = */ H5AC__DEFAULT_METADATA_WRITE_STRATEGY @@ -1716,27 +1716,27 @@ H5AC_cache_config_t invalid_configs[NUM_INVALID_CONFIGS] = /* hbool_t evictions_enabled = */ TRUE, /* hbool_t set_initial_size = */ 2, /* size_t initial_size = */ (1 * 1024 * 1024), - /* double min_clean_fraction = */ 0.25, + /* double min_clean_fraction = */ 0.25f, /* size_t max_size = */ (16 * 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.9, - /* double increment = */ 2.0, + /* double lower_hr_threshold = */ 0.9f, + /* double increment = */ 2.0f, /* 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__off, - /* double flash_multiple = */ 2.0, - /* double flash_threshold = */ 0.5, + /* double flash_multiple = */ 2.0f, + /* double flash_threshold = */ 0.5f, /* enum H5C_cache_decr_mode decr_mode = */ H5C_decr__age_out_with_threshold, - /* double upper_hr_threshold = */ 0.999, - /* double decrement = */ 0.9, + /* double upper_hr_threshold = */ 0.999f, + /* double decrement = */ 0.9f, /* 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.1, + /* double empty_reserve = */ 0.1f, /* int dirty_bytes_threshold = */ (256 * 1024), /* int metadata_write_strategy = */ H5AC__DEFAULT_METADATA_WRITE_STRATEGY @@ -1751,27 +1751,27 @@ H5AC_cache_config_t invalid_configs[NUM_INVALID_CONFIGS] = /* hbool_t evictions_enabled = */ TRUE, /* hbool_t set_initial_size = */ TRUE, /* size_t initial_size = */ (1 * 1024 * 1024), - /* double min_clean_fraction = */ 0.25, + /* double min_clean_fraction = */ 0.25f, /* size_t max_size = */ H5C__MAX_MAX_CACHE_SIZE + 1, /* 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.9, - /* double increment = */ 2.0, + /* double lower_hr_threshold = */ 0.9f, + /* double increment = */ 2.0f, /* 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__off, - /* double flash_multiple = */ 2.0, - /* double flash_threshold = */ 0.5, + /* double flash_multiple = */ 2.0f, + /* double flash_threshold = */ 0.5f, /* enum H5C_cache_decr_mode decr_mode = */ H5C_decr__age_out_with_threshold, - /* double upper_hr_threshold = */ 0.999, - /* double decrement = */ 0.9, + /* double upper_hr_threshold = */ 0.999f, + /* double decrement = */ 0.9f, /* 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.1, + /* double empty_reserve = */ 0.1f, /* int dirty_bytes_threshold = */ (256 * 1024), /* int metadata_write_strategy = */ H5AC__DEFAULT_METADATA_WRITE_STRATEGY @@ -1786,27 +1786,27 @@ H5AC_cache_config_t invalid_configs[NUM_INVALID_CONFIGS] = /* hbool_t evictions_enabled = */ TRUE, /* hbool_t set_initial_size = */ TRUE, /* size_t initial_size = */ (1 * 1024 * 1024), - /* double min_clean_fraction = */ 0.25, + /* double min_clean_fraction = */ 0.25f, /* size_t max_size = */ (16 * 1024 * 1024), /* size_t min_size = */ H5C__MIN_MAX_CACHE_SIZE - 1, /* long int epoch_length = */ 50000, /* enum H5C_cache_incr_mode incr_mode = */ H5C_incr__threshold, - /* double lower_hr_threshold = */ 0.9, - /* double increment = */ 2.0, + /* double lower_hr_threshold = */ 0.9f, + /* double increment = */ 2.0f, /* 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__off, - /* double flash_multiple = */ 2.0, - /* double flash_threshold = */ 0.5, + /* double flash_multiple = */ 2.0f, + /* double flash_threshold = */ 0.5f, /* enum H5C_cache_decr_mode decr_mode = */ H5C_decr__age_out_with_threshold, - /* double upper_hr_threshold = */ 0.999, - /* double decrement = */ 0.9, + /* double upper_hr_threshold = */ 0.999f, + /* double decrement = */ 0.9f, /* 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.1, + /* double empty_reserve = */ 0.1f, /* int dirty_bytes_threshold = */ (256 * 1024), /* int metadata_write_strategy = */ H5AC__DEFAULT_METADATA_WRITE_STRATEGY @@ -1821,27 +1821,27 @@ H5AC_cache_config_t invalid_configs[NUM_INVALID_CONFIGS] = /* hbool_t evictions_enabled = */ TRUE, /* hbool_t set_initial_size = */ FALSE, /* size_t initial_size = */ (1 * 1024 * 1024), - /* double min_clean_fraction = */ 0.25, + /* double min_clean_fraction = */ 0.25f, /* size_t max_size = */ (16 * 1024 * 1024), /* size_t min_size = */ (16 * 1024 * 1024 + 1), /* long int epoch_length = */ 50000, /* enum H5C_cache_incr_mode incr_mode = */ H5C_incr__threshold, - /* double lower_hr_threshold = */ 0.9, - /* double increment = */ 2.0, + /* double lower_hr_threshold = */ 0.9f, + /* double increment = */ 2.0f, /* 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__off, - /* double flash_multiple = */ 2.0, - /* double flash_threshold = */ 0.5, + /* double flash_multiple = */ 2.0f, + /* double flash_threshold = */ 0.5f, /* enum H5C_cache_decr_mode decr_mode = */ H5C_decr__age_out_with_threshold, - /* double upper_hr_threshold = */ 0.999, - /* double decrement = */ 0.9, + /* double upper_hr_threshold = */ 0.999f, + /* double decrement = */ 0.9f, /* 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.1, + /* double empty_reserve = */ 0.1f, /* int dirty_bytes_threshold = */ (256 * 1024), /* int metadata_write_strategy = */ H5AC__DEFAULT_METADATA_WRITE_STRATEGY @@ -1856,27 +1856,27 @@ H5AC_cache_config_t invalid_configs[NUM_INVALID_CONFIGS] = /* hbool_t evictions_enabled = */ TRUE, /* hbool_t set_initial_size = */ TRUE, /* size_t initial_size = */ (16 * 1024 * 1024 + 1), - /* double min_clean_fraction = */ 0.25, + /* double min_clean_fraction = */ 0.25f, /* size_t max_size = */ (16 * 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.9, - /* double increment = */ 2.0, + /* double lower_hr_threshold = */ 0.9f, + /* double increment = */ 2.0f, /* 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__off, - /* double flash_multiple = */ 2.0, - /* double flash_threshold = */ 0.5, + /* double flash_multiple = */ 2.0f, + /* double flash_threshold = */ 0.5f, /* enum H5C_cache_decr_mode decr_mode = */ H5C_decr__age_out_with_threshold, - /* double upper_hr_threshold = */ 0.999, - /* double decrement = */ 0.9, + /* double upper_hr_threshold = */ 0.999f, + /* double decrement = */ 0.9f, /* 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.1, + /* double empty_reserve = */ 0.1f, /* int dirty_bytes_threshold = */ (256 * 1024), /* int metadata_write_strategy = */ H5AC__DEFAULT_METADATA_WRITE_STRATEGY @@ -1891,27 +1891,27 @@ H5AC_cache_config_t invalid_configs[NUM_INVALID_CONFIGS] = /* hbool_t evictions_enabled = */ TRUE, /* hbool_t set_initial_size = */ TRUE, /* size_t initial_size = */ (1 * 1024 * 1024 - 1), - /* double min_clean_fraction = */ 0.25, + /* double min_clean_fraction = */ 0.25f, /* size_t max_size = */ (16 * 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.9, - /* double increment = */ 2.0, + /* double lower_hr_threshold = */ 0.9f, + /* double increment = */ 2.0f, /* 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__off, - /* double flash_multiple = */ 2.0, - /* double flash_threshold = */ 0.5, + /* double flash_multiple = */ 2.0f, + /* double flash_threshold = */ 0.5f, /* enum H5C_cache_decr_mode decr_mode = */ H5C_decr__age_out_with_threshold, - /* double upper_hr_threshold = */ 0.999, - /* double decrement = */ 0.9, + /* double upper_hr_threshold = */ 0.999f, + /* double decrement = */ 0.9f, /* 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.1, + /* double empty_reserve = */ 0.1f, /* int dirty_bytes_threshold = */ (256 * 1024), /* int metadata_write_strategy = */ H5AC__DEFAULT_METADATA_WRITE_STRATEGY @@ -1926,27 +1926,27 @@ H5AC_cache_config_t invalid_configs[NUM_INVALID_CONFIGS] = /* hbool_t evictions_enabled = */ TRUE, /* hbool_t set_initial_size = */ TRUE, /* size_t initial_size = */ (1 * 1024 * 1024), - /* double min_clean_fraction = */ 1.000001, + /* double min_clean_fraction = */ 1.000001f, /* size_t max_size = */ (16 * 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.9, - /* double increment = */ 2.0, + /* double lower_hr_threshold = */ 0.9f, + /* double increment = */ 2.0f, /* 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__off, - /* double flash_multiple = */ 2.0, - /* double flash_threshold = */ 0.5, + /* double flash_multiple = */ 2.0f, + /* double flash_threshold = */ 0.5f, /* enum H5C_cache_decr_mode decr_mode = */ H5C_decr__age_out_with_threshold, - /* double upper_hr_threshold = */ 0.999, - /* double decrement = */ 0.9, + /* double upper_hr_threshold = */ 0.999f, + /* double decrement = */ 0.9f, /* 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.1, + /* double empty_reserve = */ 0.1f, /* int dirty_bytes_threshold = */ (256 * 1024), /* int metadata_write_strategy = */ H5AC__DEFAULT_METADATA_WRITE_STRATEGY @@ -1961,27 +1961,27 @@ H5AC_cache_config_t invalid_configs[NUM_INVALID_CONFIGS] = /* hbool_t evictions_enabled = */ TRUE, /* hbool_t set_initial_size = */ TRUE, /* size_t initial_size = */ (1 * 1024 * 1024), - /* double min_clean_fraction = */ -0.00000001, + /* double min_clean_fraction = */ -0.00000001f, /* size_t max_size = */ (16 * 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.9, - /* double increment = */ 2.0, + /* double lower_hr_threshold = */ 0.9f, + /* double increment = */ 2.0f, /* 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__off, - /* double flash_multiple = */ 2.0, - /* double flash_threshold = */ 0.5, + /* double flash_multiple = */ 2.0f, + /* double flash_threshold = */ 0.5f, /* enum H5C_cache_decr_mode decr_mode = */ H5C_decr__age_out_with_threshold, - /* double upper_hr_threshold = */ 0.999, - /* double decrement = */ 0.9, + /* double upper_hr_threshold = */ 0.999f, + /* double decrement = */ 0.9f, /* 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.1, + /* double empty_reserve = */ 0.1f, /* int dirty_bytes_threshold = */ (256 * 1024), /* int metadata_write_strategy = */ H5AC__DEFAULT_METADATA_WRITE_STRATEGY @@ -1996,27 +1996,27 @@ H5AC_cache_config_t invalid_configs[NUM_INVALID_CONFIGS] = /* hbool_t evictions_enabled = */ TRUE, /* hbool_t set_initial_size = */ TRUE, /* size_t initial_size = */ (1 * 1024 * 1024), - /* double min_clean_fraction = */ 0.25, + /* double min_clean_fraction = */ 0.25f, /* size_t max_size = */ (16 * 1024 * 1024), /* size_t min_size = */ ( 1 * 1024 * 1024), /* long int epoch_length = */ H5C__MIN_AR_EPOCH_LENGTH - 1, /* enum H5C_cache_incr_mode incr_mode = */ H5C_incr__threshold, - /* double lower_hr_threshold = */ 0.9, - /* double increment = */ 2.0, + /* double lower_hr_threshold = */ 0.9f, + /* double increment = */ 2.0f, /* 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__off, - /* double flash_multiple = */ 2.0, - /* double flash_threshold = */ 0.5, + /* double flash_multiple = */ 2.0f, + /* double flash_threshold = */ 0.5f, /* enum H5C_cache_decr_mode decr_mode = */ H5C_decr__age_out_with_threshold, - /* double upper_hr_threshold = */ 0.999, - /* double decrement = */ 0.9, + /* double upper_hr_threshold = */ 0.999f, + /* double decrement = */ 0.9f, /* 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.1, + /* double empty_reserve = */ 0.1f, /* int dirty_bytes_threshold = */ (256 * 1024), /* int metadata_write_strategy = */ H5AC__DEFAULT_METADATA_WRITE_STRATEGY @@ -2031,27 +2031,27 @@ H5AC_cache_config_t invalid_configs[NUM_INVALID_CONFIGS] = /* hbool_t evictions_enabled = */ TRUE, /* hbool_t set_initial_size = */ TRUE, /* size_t initial_size = */ (1 * 1024 * 1024), - /* double min_clean_fraction = */ 0.25, + /* double min_clean_fraction = */ 0.25f, /* size_t max_size = */ (16 * 1024 * 1024), /* size_t min_size = */ ( 1 * 1024 * 1024), /* long int epoch_length = */ H5C__MAX_AR_EPOCH_LENGTH + 1, /* enum H5C_cache_incr_mode incr_mode = */ H5C_incr__threshold, - /* double lower_hr_threshold = */ 0.9, - /* double increment = */ 2.0, + /* double lower_hr_threshold = */ 0.9f, + /* double increment = */ 2.0f, /* 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__off, - /* double flash_multiple = */ 2.0, - /* double flash_threshold = */ 0.5, + /* double flash_multiple = */ 2.0f, + /* double flash_threshold = */ 0.5f, /* enum H5C_cache_decr_mode decr_mode = */ H5C_decr__age_out_with_threshold, - /* double upper_hr_threshold = */ 0.999, - /* double decrement = */ 0.9, + /* double upper_hr_threshold = */ 0.999f, + /* double decrement = */ 0.9f, /* 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.1, + /* double empty_reserve = */ 0.1f, /* int dirty_bytes_threshold = */ (256 * 1024), /* int metadata_write_strategy = */ H5AC__DEFAULT_METADATA_WRITE_STRATEGY @@ -2066,27 +2066,27 @@ H5AC_cache_config_t invalid_configs[NUM_INVALID_CONFIGS] = /* hbool_t evictions_enabled = */ TRUE, /* hbool_t set_initial_size = */ TRUE, /* size_t initial_size = */ (1 * 1024 * 1024), - /* double min_clean_fraction = */ 0.25, + /* double min_clean_fraction = */ 0.25f, /* size_t max_size = */ (16 * 1024 * 1024), /* size_t min_size = */ ( 1 * 1024 * 1024), /* long int epoch_length = */ 50000, /* enum H5C_cache_incr_mode incr_mode = */ (enum H5C_cache_incr_mode)-1, - /* double lower_hr_threshold = */ 0.9, - /* double increment = */ 2.0, + /* double lower_hr_threshold = */ 0.9f, + /* double increment = */ 2.0f, /* 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__off, - /* double flash_multiple = */ 2.0, - /* double flash_threshold = */ 0.5, + /* double flash_multiple = */ 2.0f, + /* double flash_threshold = */ 0.5f, /* enum H5C_cache_decr_mode decr_mode = */ H5C_decr__age_out_with_threshold, - /* double upper_hr_threshold = */ 0.999, - /* double decrement = */ 0.9, + /* double upper_hr_threshold = */ 0.999f, + /* double decrement = */ 0.9f, /* 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.1, + /* double empty_reserve = */ 0.1f, /* int dirty_bytes_threshold = */ (256 * 1024), /* int metadata_write_strategy = */ H5AC__DEFAULT_METADATA_WRITE_STRATEGY @@ -2101,27 +2101,27 @@ H5AC_cache_config_t invalid_configs[NUM_INVALID_CONFIGS] = /* hbool_t evictions_enabled = */ TRUE, /* hbool_t set_initial_size = */ TRUE, /* size_t initial_size = */ (1 * 1024 * 1024), - /* double min_clean_fraction = */ 0.25, + /* double min_clean_fraction = */ 0.25f, /* size_t max_size = */ (16 * 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.000001, - /* double increment = */ 2.0, + /* double lower_hr_threshold = */ -0.000001f, + /* double increment = */ 2.0f, /* 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__off, - /* double flash_multiple = */ 2.0, - /* double flash_threshold = */ 0.5, + /* double flash_multiple = */ 2.0f, + /* double flash_threshold = */ 0.5f, /* enum H5C_cache_decr_mode decr_mode = */ H5C_decr__age_out_with_threshold, - /* double upper_hr_threshold = */ 0.999, - /* double decrement = */ 0.9, + /* double upper_hr_threshold = */ 0.999f, + /* double decrement = */ 0.9f, /* 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.1, + /* double empty_reserve = */ 0.1f, /* int dirty_bytes_threshold = */ (256 * 1024), /* int metadata_write_strategy = */ H5AC__DEFAULT_METADATA_WRITE_STRATEGY @@ -2136,27 +2136,27 @@ H5AC_cache_config_t invalid_configs[NUM_INVALID_CONFIGS] = /* hbool_t evictions_enabled = */ TRUE, /* hbool_t set_initial_size = */ TRUE, /* size_t initial_size = */ (1 * 1024 * 1024), - /* double min_clean_fraction = */ 0.25, + /* double min_clean_fraction = */ 0.25f, /* size_t max_size = */ (16 * 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 = */ 1.00000001, - /* double increment = */ 2.0, + /* double lower_hr_threshold = */ 1.00000001f, + /* double increment = */ 2.0f, /* 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__off, - /* double flash_multiple = */ 2.0, - /* double flash_threshold = */ 0.5, + /* double flash_multiple = */ 2.0f, + /* double flash_threshold = */ 0.5f, /* enum H5C_cache_decr_mode decr_mode = */ H5C_decr__age_out_with_threshold, - /* double upper_hr_threshold = */ 0.999, - /* double decrement = */ 0.9, + /* double upper_hr_threshold = */ 0.999f, + /* double decrement = */ 0.9f, /* 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.1, + /* double empty_reserve = */ 0.1f, /* int dirty_bytes_threshold = */ (256 * 1024), /* int metadata_write_strategy = */ H5AC__DEFAULT_METADATA_WRITE_STRATEGY @@ -2171,27 +2171,27 @@ H5AC_cache_config_t invalid_configs[NUM_INVALID_CONFIGS] = /* hbool_t evictions_enabled = */ TRUE, /* hbool_t set_initial_size = */ TRUE, /* size_t initial_size = */ (1 * 1024 * 1024), - /* double min_clean_fraction = */ 0.25, + /* double min_clean_fraction = */ 0.25f, /* size_t max_size = */ (16 * 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.9, + /* double lower_hr_threshold = */ 0.9f, /* double increment = */ 0.999999999999, /* 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__off, - /* double flash_multiple = */ 2.0, - /* double flash_threshold = */ 0.5, + /* double flash_multiple = */ 2.0f, + /* double flash_threshold = */ 0.5f, /* enum H5C_cache_decr_mode decr_mode = */ H5C_decr__age_out_with_threshold, - /* double upper_hr_threshold = */ 0.999, - /* double decrement = */ 0.9, + /* double upper_hr_threshold = */ 0.999f, + /* double decrement = */ 0.9f, /* 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.1, + /* double empty_reserve = */ 0.1f, /* int dirty_bytes_threshold = */ (256 * 1024), /* int metadata_write_strategy = */ H5AC__DEFAULT_METADATA_WRITE_STRATEGY @@ -2206,27 +2206,27 @@ H5AC_cache_config_t invalid_configs[NUM_INVALID_CONFIGS] = /* hbool_t evictions_enabled = */ TRUE, /* hbool_t set_initial_size = */ TRUE, /* size_t initial_size = */ (1 * 1024 * 1024), - /* double min_clean_fraction = */ 0.25, + /* double min_clean_fraction = */ 0.25f, /* size_t max_size = */ (16 * 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.9, - /* double increment = */ 2.0, + /* double lower_hr_threshold = */ 0.9f, + /* double increment = */ 2.0f, /* hbool_t apply_max_increment = */ (hbool_t)-1, /* size_t max_increment = */ (4 * 1024 * 1024), /* enum H5C_cache_flash_incr_mode */ /* flash_incr_mode = */ H5C_flash_incr__off, - /* double flash_multiple = */ 2.0, - /* double flash_threshold = */ 0.5, + /* double flash_multiple = */ 2.0f, + /* double flash_threshold = */ 0.5f, /* enum H5C_cache_decr_mode decr_mode = */ H5C_decr__age_out_with_threshold, - /* double upper_hr_threshold = */ 0.999, - /* double decrement = */ 0.9, + /* double upper_hr_threshold = */ 0.999f, + /* double decrement = */ 0.9f, /* 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.1, + /* double empty_reserve = */ 0.1f, /* int dirty_bytes_threshold = */ (256 * 1024), /* int metadata_write_strategy = */ H5AC__DEFAULT_METADATA_WRITE_STRATEGY @@ -2241,27 +2241,27 @@ H5AC_cache_config_t invalid_configs[NUM_INVALID_CONFIGS] = /* hbool_t evictions_enabled = */ TRUE, /* hbool_t set_initial_size = */ TRUE, /* size_t initial_size = */ (1 * 1024 * 1024), - /* double min_clean_fraction = */ 0.25, + /* double min_clean_fraction = */ 0.25f, /* size_t max_size = */ (16 * 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.9, - /* double increment = */ 2.0, + /* double lower_hr_threshold = */ 0.9f, + /* double increment = */ 2.0f, /* hbool_t apply_max_increment = */ TRUE, /* size_t max_increment = */ (4 * 1024 * 1024), /* enum H5C_cache_flash_incr_mode */ /* flash_incr_mode = */ (enum H5C_cache_flash_incr_mode)-1, - /* double flash_multiple = */ 2.0, - /* double flash_threshold = */ 0.5, + /* double flash_multiple = */ 2.0f, + /* double flash_threshold = */ 0.5f, /* enum H5C_cache_decr_mode decr_mode = */ H5C_decr__age_out_with_threshold, - /* double upper_hr_threshold = */ 0.999, - /* double decrement = */ 0.9, + /* double upper_hr_threshold = */ 0.999f, + /* double decrement = */ 0.9f, /* 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.1, + /* double empty_reserve = */ 0.1f, /* int dirty_bytes_threshold = */ (256 * 1024), /* int metadata_write_strategy = */ H5AC__DEFAULT_METADATA_WRITE_STRATEGY @@ -2276,27 +2276,27 @@ H5AC_cache_config_t invalid_configs[NUM_INVALID_CONFIGS] = /* hbool_t evictions_enabled = */ TRUE, /* hbool_t set_initial_size = */ TRUE, /* size_t initial_size = */ (1 * 1024 * 1024), - /* double min_clean_fraction = */ 0.25, + /* double min_clean_fraction = */ 0.25f, /* size_t max_size = */ (16 * 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.9, - /* double increment = */ 2.0, + /* double lower_hr_threshold = */ 0.9f, + /* double increment = */ 2.0f, /* 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 = */ 0.09, - /* double flash_threshold = */ 0.5, + /* double flash_multiple = */ 0.09f, + /* double flash_threshold = */ 0.5f, /* enum H5C_cache_decr_mode decr_mode = */ H5C_decr__age_out_with_threshold, - /* double upper_hr_threshold = */ 0.999, - /* double decrement = */ 0.9, + /* double upper_hr_threshold = */ 0.999f, + /* double decrement = */ 0.9f, /* 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.1, + /* double empty_reserve = */ 0.1f, /* int dirty_bytes_threshold = */ (256 * 1024), /* int metadata_write_strategy = */ H5AC__DEFAULT_METADATA_WRITE_STRATEGY @@ -2311,27 +2311,27 @@ H5AC_cache_config_t invalid_configs[NUM_INVALID_CONFIGS] = /* hbool_t evictions_enabled = */ TRUE, /* hbool_t set_initial_size = */ TRUE, /* size_t initial_size = */ (1 * 1024 * 1024), - /* double min_clean_fraction = */ 0.25, + /* double min_clean_fraction = */ 0.25f, /* size_t max_size = */ (16 * 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.9, - /* double increment = */ 2.0, + /* double lower_hr_threshold = */ 0.9f, + /* double increment = */ 2.0f, /* 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 = */ 10.001, - /* double flash_threshold = */ 0.5, + /* double flash_multiple = */ 10.001f, + /* double flash_threshold = */ 0.5f, /* enum H5C_cache_decr_mode decr_mode = */ H5C_decr__age_out_with_threshold, - /* double upper_hr_threshold = */ 0.999, - /* double decrement = */ 0.9, + /* double upper_hr_threshold = */ 0.999f, + /* double decrement = */ 0.9f, /* 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.1, + /* double empty_reserve = */ 0.1f, /* int dirty_bytes_threshold = */ (256 * 1024), /* int metadata_write_strategy = */ H5AC__DEFAULT_METADATA_WRITE_STRATEGY @@ -2346,27 +2346,27 @@ H5AC_cache_config_t invalid_configs[NUM_INVALID_CONFIGS] = /* hbool_t evictions_enabled = */ TRUE, /* hbool_t set_initial_size = */ TRUE, /* size_t initial_size = */ (1 * 1024 * 1024), - /* double min_clean_fraction = */ 0.25, + /* double min_clean_fraction = */ 0.25f, /* size_t max_size = */ (16 * 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.9, - /* double increment = */ 2.0, + /* double lower_hr_threshold = */ 0.9f, + /* double increment = */ 2.0f, /* 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.0, - /* double flash_threshold = */ 0.099, + /* double flash_multiple = */ 1.0f, + /* double flash_threshold = */ 0.099f, /* enum H5C_cache_decr_mode decr_mode = */ H5C_decr__age_out_with_threshold, - /* double upper_hr_threshold = */ 0.999, - /* double decrement = */ 0.9, + /* double upper_hr_threshold = */ 0.999f, + /* double decrement = */ 0.9f, /* 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.1, + /* double empty_reserve = */ 0.1f, /* int dirty_bytes_threshold = */ (256 * 1024), /* int metadata_write_strategy = */ H5AC__DEFAULT_METADATA_WRITE_STRATEGY @@ -2381,27 +2381,27 @@ H5AC_cache_config_t invalid_configs[NUM_INVALID_CONFIGS] = /* hbool_t evictions_enabled = */ TRUE, /* hbool_t set_initial_size = */ TRUE, /* size_t initial_size = */ (1 * 1024 * 1024), - /* double min_clean_fraction = */ 0.25, + /* double min_clean_fraction = */ 0.25f, /* size_t max_size = */ (16 * 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.9, - /* double increment = */ 2.0, + /* double lower_hr_threshold = */ 0.9f, + /* double increment = */ 2.0f, /* 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.0, - /* double flash_threshold = */ 1.001, + /* double flash_multiple = */ 1.0f, + /* double flash_threshold = */ 1.001f, /* enum H5C_cache_decr_mode decr_mode = */ H5C_decr__age_out_with_threshold, - /* double upper_hr_threshold = */ 0.999, - /* double decrement = */ 0.9, + /* double upper_hr_threshold = */ 0.999f, + /* double decrement = */ 0.9f, /* 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.1, + /* double empty_reserve = */ 0.1f, /* int dirty_bytes_threshold = */ (256 * 1024), /* int metadata_write_strategy = */ H5AC__DEFAULT_METADATA_WRITE_STRATEGY @@ -2416,27 +2416,27 @@ H5AC_cache_config_t invalid_configs[NUM_INVALID_CONFIGS] = /* hbool_t evictions_enabled = */ TRUE, /* hbool_t set_initial_size = */ TRUE, /* size_t initial_size = */ (1 * 1024 * 1024), - /* double min_clean_fraction = */ 0.25, + /* double min_clean_fraction = */ 0.25f, /* size_t max_size = */ (16 * 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.9, - /* double increment = */ 2.0, + /* double lower_hr_threshold = */ 0.9f, + /* double increment = */ 2.0f, /* 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__off, - /* double flash_multiple = */ 2.0, - /* double flash_threshold = */ 0.5, + /* double flash_multiple = */ 2.0f, + /* double flash_threshold = */ 0.5f, /* enum H5C_cache_decr_mode decr_mode = */ (enum H5C_cache_decr_mode)-1, - /* double upper_hr_threshold = */ 0.999, - /* double decrement = */ 0.9, + /* double upper_hr_threshold = */ 0.999f, + /* double decrement = */ 0.9f, /* 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.1, + /* double empty_reserve = */ 0.1f, /* int dirty_bytes_threshold = */ (256 * 1024), /* int metadata_write_strategy = */ H5AC__DEFAULT_METADATA_WRITE_STRATEGY @@ -2451,27 +2451,27 @@ H5AC_cache_config_t invalid_configs[NUM_INVALID_CONFIGS] = /* hbool_t evictions_enabled = */ TRUE, /* hbool_t set_initial_size = */ TRUE, /* size_t initial_size = */ (1 * 1024 * 1024), - /* double min_clean_fraction = */ 0.25, + /* double min_clean_fraction = */ 0.25f, /* size_t max_size = */ (16 * 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.9, - /* double increment = */ 2.0, + /* double lower_hr_threshold = */ 0.9f, + /* double increment = */ 2.0f, /* 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__off, - /* double flash_multiple = */ 2.0, - /* double flash_threshold = */ 0.5, + /* double flash_multiple = */ 2.0f, + /* double flash_threshold = */ 0.5f, /* enum H5C_cache_decr_mode decr_mode = */ H5C_decr__threshold, - /* double upper_hr_threshold = */ 1.00001, - /* double decrement = */ 0.9, + /* double upper_hr_threshold = */ 1.00001f, + /* double decrement = */ 0.9f, /* 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.1, + /* double empty_reserve = */ 0.1f, /* int dirty_bytes_threshold = */ (256 * 1024), /* int metadata_write_strategy = */ H5AC__DEFAULT_METADATA_WRITE_STRATEGY @@ -2486,27 +2486,27 @@ H5AC_cache_config_t invalid_configs[NUM_INVALID_CONFIGS] = /* hbool_t evictions_enabled = */ TRUE, /* hbool_t set_initial_size = */ TRUE, /* size_t initial_size = */ (1 * 1024 * 1024), - /* double min_clean_fraction = */ 0.25, + /* double min_clean_fraction = */ 0.25f, /* size_t max_size = */ (16 * 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.9, - /* double increment = */ 2.0, + /* double lower_hr_threshold = */ 0.9f, + /* double increment = */ 2.0f, /* 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__off, - /* double flash_multiple = */ 2.0, - /* double flash_threshold = */ 0.5, + /* double flash_multiple = */ 2.0f, + /* double flash_threshold = */ 0.5f, /* enum H5C_cache_decr_mode decr_mode = */ H5C_decr__threshold, - /* double upper_hr_threshold = */ 0.999, - /* double decrement = */ -0.0000000001, + /* double upper_hr_threshold = */ 0.999f, + /* double decrement = */ -0.0000000001f, /* 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.1, + /* double empty_reserve = */ 0.1f, /* int dirty_bytes_threshold = */ (256 * 1024), /* int metadata_write_strategy = */ H5AC__DEFAULT_METADATA_WRITE_STRATEGY @@ -2521,27 +2521,27 @@ H5AC_cache_config_t invalid_configs[NUM_INVALID_CONFIGS] = /* hbool_t evictions_enabled = */ TRUE, /* hbool_t set_initial_size = */ TRUE, /* size_t initial_size = */ (1 * 1024 * 1024), - /* double min_clean_fraction = */ 0.25, + /* double min_clean_fraction = */ 0.25f, /* size_t max_size = */ (16 * 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.9, - /* double increment = */ 2.0, + /* double lower_hr_threshold = */ 0.9f, + /* double increment = */ 2.0f, /* 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__off, - /* double flash_multiple = */ 2.0, - /* double flash_threshold = */ 0.5, + /* double flash_multiple = */ 2.0f, + /* double flash_threshold = */ 0.5f, /* enum H5C_cache_decr_mode decr_mode = */ H5C_decr__threshold, - /* double upper_hr_threshold = */ 0.999, + /* double upper_hr_threshold = */ 0.999f, /* double decrement = */ 1.0000000001, /* 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.1, + /* double empty_reserve = */ 0.1f, /* int dirty_bytes_threshold = */ (256 * 1024), /* int metadata_write_strategy = */ H5AC__DEFAULT_METADATA_WRITE_STRATEGY @@ -2556,27 +2556,27 @@ H5AC_cache_config_t invalid_configs[NUM_INVALID_CONFIGS] = /* hbool_t evictions_enabled = */ TRUE, /* hbool_t set_initial_size = */ TRUE, /* size_t initial_size = */ (1 * 1024 * 1024), - /* double min_clean_fraction = */ 0.25, + /* double min_clean_fraction = */ 0.25f, /* size_t max_size = */ (16 * 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.9, - /* double increment = */ 2.0, + /* double lower_hr_threshold = */ 0.9f, + /* double increment = */ 2.0f, /* 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__off, - /* double flash_multiple = */ 2.0, - /* double flash_threshold = */ 0.5, + /* double flash_multiple = */ 2.0f, + /* double flash_threshold = */ 0.5f, /* enum H5C_cache_decr_mode decr_mode = */ H5C_decr__age_out, - /* double upper_hr_threshold = */ 0.999, - /* double decrement = */ 0.9, + /* double upper_hr_threshold = */ 0.999f, + /* double decrement = */ 0.9f, /* hbool_t apply_max_decrement = */ TRUE, /* size_t max_decrement = */ (1 * 1024 * 1024), /* int epochs_before_eviction = */ 0, /* hbool_t apply_empty_reserve = */ TRUE, - /* double empty_reserve = */ 0.1, + /* double empty_reserve = */ 0.1f, /* int dirty_bytes_threshold = */ (256 * 1024), /* int metadata_write_strategy = */ H5AC__DEFAULT_METADATA_WRITE_STRATEGY @@ -2591,27 +2591,27 @@ H5AC_cache_config_t invalid_configs[NUM_INVALID_CONFIGS] = /* hbool_t evictions_enabled = */ TRUE, /* hbool_t set_initial_size = */ TRUE, /* size_t initial_size = */ (1 * 1024 * 1024), - /* double min_clean_fraction = */ 0.25, + /* double min_clean_fraction = */ 0.25f, /* size_t max_size = */ (16 * 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.9, - /* double increment = */ 2.0, + /* double lower_hr_threshold = */ 0.9f, + /* double increment = */ 2.0f, /* 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__off, - /* double flash_multiple = */ 2.0, - /* double flash_threshold = */ 0.5, + /* double flash_multiple = */ 2.0f, + /* double flash_threshold = */ 0.5f, /* enum H5C_cache_decr_mode decr_mode = */ H5C_decr__age_out, - /* double upper_hr_threshold = */ 0.999, - /* double decrement = */ 0.9, + /* double upper_hr_threshold = */ 0.999f, + /* double decrement = */ 0.9f, /* hbool_t apply_max_decrement = */ TRUE, /* size_t max_decrement = */ (1 * 1024 * 1024), /* int epochs_before_eviction = */ H5C__MAX_EPOCH_MARKERS + 1, /* hbool_t apply_empty_reserve = */ TRUE, - /* double empty_reserve = */ 0.1, + /* double empty_reserve = */ 0.1f, /* int dirty_bytes_threshold = */ (256 * 1024), /* int metadata_write_strategy = */ H5AC__DEFAULT_METADATA_WRITE_STRATEGY @@ -2626,27 +2626,27 @@ H5AC_cache_config_t invalid_configs[NUM_INVALID_CONFIGS] = /* hbool_t evictions_enabled = */ TRUE, /* hbool_t set_initial_size = */ TRUE, /* size_t initial_size = */ (1 * 1024 * 1024), - /* double min_clean_fraction = */ 0.25, + /* double min_clean_fraction = */ 0.25f, /* size_t max_size = */ (16 * 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.9, - /* double increment = */ 2.0, + /* double lower_hr_threshold = */ 0.9f, + /* double increment = */ 2.0f, /* 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__off, - /* double flash_multiple = */ 2.0, - /* double flash_threshold = */ 0.5, + /* double flash_multiple = */ 2.0f, + /* double flash_threshold = */ 0.5f, /* enum H5C_cache_decr_mode decr_mode = */ H5C_decr__age_out_with_threshold, - /* double upper_hr_threshold = */ 0.999, - /* double decrement = */ 0.9, + /* double upper_hr_threshold = */ 0.999f, + /* double decrement = */ 0.9f, /* hbool_t apply_max_decrement = */ TRUE, /* size_t max_decrement = */ (1 * 1024 * 1024), /* int epochs_before_eviction = */ 3, /* hbool_t apply_empty_reserve = */ 2, - /* double empty_reserve = */ 0.1, + /* double empty_reserve = */ 0.1f, /* int dirty_bytes_threshold = */ (256 * 1024), /* int metadata_write_strategy = */ H5AC__DEFAULT_METADATA_WRITE_STRATEGY @@ -2661,27 +2661,27 @@ H5AC_cache_config_t invalid_configs[NUM_INVALID_CONFIGS] = /* hbool_t evictions_enabled = */ TRUE, /* hbool_t set_initial_size = */ TRUE, /* size_t initial_size = */ (1 * 1024 * 1024), - /* double min_clean_fraction = */ 0.25, + /* double min_clean_fraction = */ 0.25f, /* size_t max_size = */ (16 * 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.9, - /* double increment = */ 2.0, + /* double lower_hr_threshold = */ 0.9f, + /* double increment = */ 2.0f, /* 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__off, - /* double flash_multiple = */ 2.0, - /* double flash_threshold = */ 0.5, + /* double flash_multiple = */ 2.0f, + /* double flash_threshold = */ 0.5f, /* enum H5C_cache_decr_mode decr_mode = */ H5C_decr__age_out_with_threshold, - /* double upper_hr_threshold = */ 0.999, - /* double decrement = */ 0.9, + /* double upper_hr_threshold = */ 0.999f, + /* double decrement = */ 0.9f, /* 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.0000000001, + /* double empty_reserve = */ -0.0000000001f, /* int dirty_bytes_threshold = */ (256 * 1024), /* int metadata_write_strategy = */ H5AC__DEFAULT_METADATA_WRITE_STRATEGY @@ -2696,22 +2696,22 @@ H5AC_cache_config_t invalid_configs[NUM_INVALID_CONFIGS] = /* hbool_t evictions_enabled = */ TRUE, /* hbool_t set_initial_size = */ TRUE, /* size_t initial_size = */ (1 * 1024 * 1024), - /* double min_clean_fraction = */ 0.25, + /* double min_clean_fraction = */ 0.25f, /* size_t max_size = */ (16 * 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.9, - /* double increment = */ 2.0, + /* double lower_hr_threshold = */ 0.9f, + /* double increment = */ 2.0f, /* 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__off, - /* double flash_multiple = */ 2.0, - /* double flash_threshold = */ 0.5, + /* double flash_multiple = */ 2.0f, + /* double flash_threshold = */ 0.5f, /* enum H5C_cache_decr_mode decr_mode = */ H5C_decr__age_out_with_threshold, - /* double upper_hr_threshold = */ 0.999, - /* double decrement = */ 0.9, + /* double upper_hr_threshold = */ 0.999f, + /* double decrement = */ 0.9f, /* hbool_t apply_max_decrement = */ TRUE, /* size_t max_decrement = */ (1 * 1024 * 1024), /* int epochs_before_eviction = */ 3, @@ -2731,27 +2731,27 @@ H5AC_cache_config_t invalid_configs[NUM_INVALID_CONFIGS] = /* hbool_t evictions_enabled = */ TRUE, /* hbool_t set_initial_size = */ TRUE, /* size_t initial_size = */ (1 * 1024 * 1024), - /* double min_clean_fraction = */ 0.25, + /* double min_clean_fraction = */ 0.25f, /* size_t max_size = */ (16 * 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.9, - /* double increment = */ 2.0, + /* double lower_hr_threshold = */ 0.9f, + /* double increment = */ 2.0f, /* 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__off, - /* double flash_multiple = */ 2.0, - /* double flash_threshold = */ 0.5, + /* double flash_multiple = */ 2.0f, + /* double flash_threshold = */ 0.5f, /* enum H5C_cache_decr_mode decr_mode = */ H5C_decr__age_out_with_threshold, - /* double upper_hr_threshold = */ -0.000000001, - /* double decrement = */ 0.9, + /* double upper_hr_threshold = */ -0.000000001f, + /* double decrement = */ 0.9f, /* 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.1, + /* double empty_reserve = */ 0.1f, /* int dirty_bytes_threshold = */ (256 * 1024), /* int metadata_write_strategy = */ H5AC__DEFAULT_METADATA_WRITE_STRATEGY @@ -2766,27 +2766,27 @@ H5AC_cache_config_t invalid_configs[NUM_INVALID_CONFIGS] = /* hbool_t evictions_enabled = */ TRUE, /* hbool_t set_initial_size = */ TRUE, /* size_t initial_size = */ (1 * 1024 * 1024), - /* double min_clean_fraction = */ 0.25, + /* double min_clean_fraction = */ 0.25f, /* size_t max_size = */ (16 * 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.9, - /* double increment = */ 2.0, + /* double lower_hr_threshold = */ 0.9f, + /* double increment = */ 2.0f, /* 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__off, - /* double flash_multiple = */ 2.0, - /* double flash_threshold = */ 0.5, + /* double flash_multiple = */ 2.0f, + /* double flash_threshold = */ 0.5f, /* enum H5C_cache_decr_mode decr_mode = */ H5C_decr__age_out_with_threshold, /* double upper_hr_threshold = */ 1.00000001, - /* double decrement = */ 0.9, + /* double decrement = */ 0.9f, /* 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.1, + /* double empty_reserve = */ 0.1f, /* int dirty_bytes_threshold = */ (256 * 1024), /* int metadata_write_strategy = */ H5AC__DEFAULT_METADATA_WRITE_STRATEGY @@ -2801,27 +2801,27 @@ H5AC_cache_config_t invalid_configs[NUM_INVALID_CONFIGS] = /* hbool_t evictions_enabled = */ TRUE, /* hbool_t set_initial_size = */ TRUE, /* size_t initial_size = */ (1 * 1024 * 1024), - /* double min_clean_fraction = */ 0.25, + /* double min_clean_fraction = */ 0.25f, /* size_t max_size = */ (16 * 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.9, - /* double increment = */ 2.0, + /* double lower_hr_threshold = */ 0.9f, + /* double increment = */ 2.0f, /* 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__off, - /* double flash_multiple = */ 2.0, - /* double flash_threshold = */ 0.5, + /* double flash_multiple = */ 2.0f, + /* double flash_threshold = */ 0.5f, /* enum H5C_cache_decr_mode decr_mode = */ H5C_decr__age_out_with_threshold, - /* double upper_hr_threshold = */ 0.9, - /* double decrement = */ 0.9, + /* double upper_hr_threshold = */ 0.9f, + /* double decrement = */ 0.9f, /* 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.1, + /* double empty_reserve = */ 0.1f, /* int dirty_bytes_threshold = */ (256 * 1024), /* int metadata_write_strategy = */ H5AC__DEFAULT_METADATA_WRITE_STRATEGY @@ -2836,27 +2836,27 @@ H5AC_cache_config_t invalid_configs[NUM_INVALID_CONFIGS] = /* hbool_t evictions_enabled = */ TRUE, /* hbool_t set_initial_size = */ TRUE, /* size_t initial_size = */ (1 * 1024 * 1024), - /* double min_clean_fraction = */ 0.25, + /* double min_clean_fraction = */ 0.25f, /* size_t max_size = */ (16 * 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.9, - /* double increment = */ 2.0, + /* double lower_hr_threshold = */ 0.9f, + /* double increment = */ 2.0f, /* 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__off, - /* double flash_multiple = */ 2.0, - /* double flash_threshold = */ 0.5, + /* double flash_multiple = */ 2.0f, + /* double flash_threshold = */ 0.5f, /* enum H5C_cache_decr_mode decr_mode = */ H5C_decr__age_out_with_threshold, - /* double upper_hr_threshold = */ 0.999, - /* double decrement = */ 0.9, + /* double upper_hr_threshold = */ 0.999f, + /* double decrement = */ 0.9f, /* 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.1, + /* double empty_reserve = */ 0.1f, /* int dirty_bytes_threshold = */ (H5C__MIN_MAX_CACHE_SIZE / 2) - 1, /* int metadata_write_strategy = */ H5AC__DEFAULT_METADATA_WRITE_STRATEGY @@ -2871,27 +2871,27 @@ H5AC_cache_config_t invalid_configs[NUM_INVALID_CONFIGS] = /* hbool_t evictions_enabled = */ TRUE, /* hbool_t set_initial_size = */ TRUE, /* size_t initial_size = */ (1 * 1024 * 1024), - /* double min_clean_fraction = */ 0.25, + /* double min_clean_fraction = */ 0.25f, /* size_t max_size = */ (16 * 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.9, - /* double increment = */ 2.0, + /* double lower_hr_threshold = */ 0.9f, + /* double increment = */ 2.0f, /* 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__off, - /* double flash_multiple = */ 2.0, - /* double flash_threshold = */ 0.5, + /* double flash_multiple = */ 2.0f, + /* double flash_threshold = */ 0.5f, /* enum H5C_cache_decr_mode decr_mode = */ H5C_decr__age_out_with_threshold, - /* double upper_hr_threshold = */ 0.9, - /* double decrement = */ 0.9, + /* double upper_hr_threshold = */ 0.9f, + /* double decrement = */ 0.9f, /* 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.1, + /* double empty_reserve = */ 0.1f, /* int dirty_bytes_threshold = */ (H5C__MAX_MAX_CACHE_SIZE / 4) + 1, /* int metadata_write_strategy = */ H5AC__DEFAULT_METADATA_WRITE_STRATEGY @@ -2906,27 +2906,27 @@ H5AC_cache_config_t invalid_configs[NUM_INVALID_CONFIGS] = /* hbool_t evictions_enabled = */ FALSE, /* hbool_t set_initial_size = */ TRUE, /* size_t initial_size = */ (1 * 1024 * 1024), - /* double min_clean_fraction = */ 0.25, + /* double min_clean_fraction = */ 0.25f, /* size_t max_size = */ (16 * 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.9, - /* double increment = */ 2.0, + /* double lower_hr_threshold = */ 0.9f, + /* double increment = */ 2.0f, /* 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__off, - /* double flash_multiple = */ 2.0, - /* double flash_threshold = */ 0.5, + /* double flash_multiple = */ 2.0f, + /* double flash_threshold = */ 0.5f, /* enum H5C_cache_decr_mode decr_mode = */ H5C_decr__off, - /* double upper_hr_threshold = */ 0.9, - /* double decrement = */ 0.9, + /* double upper_hr_threshold = */ 0.9f, + /* double decrement = */ 0.9f, /* 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.1, + /* double empty_reserve = */ 0.1f, /* int dirty_bytes_threshold = */ (256 * 1024), /* int metadata_write_strategy = */ H5AC__DEFAULT_METADATA_WRITE_STRATEGY @@ -2941,27 +2941,27 @@ H5AC_cache_config_t invalid_configs[NUM_INVALID_CONFIGS] = /* hbool_t evictions_enabled = */ FALSE, /* hbool_t set_initial_size = */ TRUE, /* size_t initial_size = */ (1 * 1024 * 1024), - /* double min_clean_fraction = */ 0.25, + /* double min_clean_fraction = */ 0.25f, /* size_t max_size = */ (16 * 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.9, - /* double increment = */ 2.0, + /* double lower_hr_threshold = */ 0.9f, + /* double increment = */ 2.0f, /* 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__off, - /* double flash_multiple = */ 2.0, - /* double flash_threshold = */ 0.5, + /* double flash_multiple = */ 2.0f, + /* double flash_threshold = */ 0.5f, /* enum H5C_cache_decr_mode decr_mode = */ H5C_decr__age_out, - /* double upper_hr_threshold = */ 0.9, - /* double decrement = */ 0.9, + /* double upper_hr_threshold = */ 0.9f, + /* double decrement = */ 0.9f, /* 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.1, + /* double empty_reserve = */ 0.1f, /* int dirty_bytes_threshold = */ (256 * 1024), /* int metadata_write_strategy = */ H5AC__DEFAULT_METADATA_WRITE_STRATEGY @@ -2976,27 +2976,27 @@ H5AC_cache_config_t invalid_configs[NUM_INVALID_CONFIGS] = /* hbool_t evictions_enabled = */ TRUE, /* hbool_t set_initial_size = */ TRUE, /* size_t initial_size = */ (1 * 1024 * 1024), - /* double min_clean_fraction = */ 0.25, + /* double min_clean_fraction = */ 0.25f, /* size_t max_size = */ (16 * 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.9, - /* double increment = */ 2.0, + /* double lower_hr_threshold = */ 0.9f, + /* double increment = */ 2.0f, /* 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__off, - /* double flash_multiple = */ 2.0, - /* double flash_threshold = */ 0.5, + /* double flash_multiple = */ 2.0f, + /* double flash_threshold = */ 0.5f, /* enum H5C_cache_decr_mode decr_mode = */ H5C_decr__age_out_with_threshold, - /* double upper_hr_threshold = */ 0.999, - /* double decrement = */ 0.9, + /* double upper_hr_threshold = */ 0.999f, + /* double decrement = */ 0.9f, /* 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.1, + /* double empty_reserve = */ 0.1f, /* int dirty_bytes_threshold = */ (256 * 1024), /* int metadata_write_strategy = */ -1 } diff --git a/test/dtransform.c b/test/dtransform.c index 2bcbe8c..9c78043 100644 --- a/test/dtransform.c +++ b/test/dtransform.c @@ -35,18 +35,18 @@ hid_t dset_id_float_chunk = -1; const float windchillFfloat[ROWS][COLS] = - { {36.0, 31.0, 25.0, 19.0, 13.0, 7.0, 1.0, -5.0, -11.0, -16.0, -22.0, -28.0, -34.0, -40.0, -46.0, -52.0, -57.0, -63.0 }, - {34.0, 27.0, 21.0, 15.0, 9.0, 3.0, -4.0, -10.0, -16.0, -22.0, -28.0, -35.0, -41.0, -47.0, -53.0, -59.0, -66.0, -72.0 } , - {32.0, 25.0, 19.0, 13.0, 6.0, 0.0, -7.0, -13.0, -19.0, -26.0, -32.0, -39.0, -45.0, -51.0, -58.0, -64.0, -71.0, -77.0 }, - {30.0, 24.0, 17.0, 11.0, 4.0, -2.0, -9.0, -15.0, -22.0, -29.0, -35.0, -42.0, -48.0, -55.0, -61.0, -68.0, -74.0, -81.0 }, - {29.0, 23.0, 16.0, 9.0, 3.0, -4.0, -11.0, -17.0, -24.0, -31.0, -37.0, -44.0, -51.0, -58.0, -64.0, -71.0, -78.0, -84.0 }, - {28.0, 22.0, 15.0, 8.0, 1.0, -5.0, -12.0, -19.0, -26.0, -33.0, -39.0, -46.0, -53.0, -60.0, -67.0, -73.0, -80.0, -87.0 }, - {28.0, 21.0, 14.0, 7.0, 0.0, -7.0, -14.0, -21.0, -27.0, -34.0, -41.0, -48.0, -55.0, -62.0, -69.0, -76.0, -82.0, -89.0 }, - {27.0, 20.0, 13.0, 6.0, -1.0, -8.0, -15.0, -22.0, -29.0, -36.0, -43.0, -50.0, -57.0, -64.0, -71.0, -78.0, -84.0, -91.0 }, - {26.0, 19.0, 12.0, 5.0, -2.0, -9.0, -16.0, -23.0, -30.0, -37.0, -44.0, -51.0, -58.0, -65.0, -72.0, -79.0, -86.0, -93.0 }, - {26.0, 19.0, 12.0, 4.0, -3.0, -10.0, -17.0, -24.0, -31.0, -38.0, -45.0, -52.0, -60.0, -67.0, -74.0, -81.0, -88.0, -95.0}, - {25.0, 18.0, 11.0, 4.0, -3.0, -11.0, -18.0, -25.0, -32.0, -39.0, -46.0, -54.0, -61.0, -68.0, -75.0, -82.0, -89.0, -97.0}, - {25.0, 17.0, 10.0, 3.0, -4.0, -11.0, -19.0, -26.0, -33.0, -40.0, -48.0, -55.0, -62.0, -69.0, -76.0, -84.0, -91.0, -98.0} + { {36.0f, 31.0f, 25.0f, 19.0f, 13.0f, 7.0f, 1.0f, -5.0f, -11.0f, -16.0f, -22.0f, -28.0f, -34.0f, -40.0f, -46.0f, -52.0f, -57.0f, -63.0f}, + {34.0f, 27.0f, 21.0f, 15.0f, 9.0f, 3.0f, -4.0f, -10.0f, -16.0f, -22.0f, -28.0f, -35.0f, -41.0f, -47.0f, -53.0f, -59.0f, -66.0f, -72.0f} , + {32.0f, 25.0f, 19.0f, 13.0f, 6.0f, 0.0f, -7.0f, -13.0f, -19.0f, -26.0f, -32.0f, -39.0f, -45.0f, -51.0f, -58.0f, -64.0f, -71.0f, -77.0f}, + {30.0f, 24.0f, 17.0f, 11.0f, 4.0f, -2.0f, -9.0f, -15.0f, -22.0f, -29.0f, -35.0f, -42.0f, -48.0f, -55.0f, -61.0f, -68.0f, -74.0f, -81.0f}, + {29.0f, 23.0f, 16.0f, 9.0f, 3.0f, -4.0f, -11.0f, -17.0f, -24.0f, -31.0f, -37.0f, -44.0f, -51.0f, -58.0f, -64.0f, -71.0f, -78.0f, -84.0f}, + {28.0f, 22.0f, 15.0f, 8.0f, 1.0f, -5.0f, -12.0f, -19.0f, -26.0f, -33.0f, -39.0f, -46.0f, -53.0f, -60.0f, -67.0f, -73.0f, -80.0f, -87.0f}, + {28.0f, 21.0f, 14.0f, 7.0f, 0.0f, -7.0f, -14.0f, -21.0f, -27.0f, -34.0f, -41.0f, -48.0f, -55.0f, -62.0f, -69.0f, -76.0f, -82.0f, -89.0f}, + {27.0f, 20.0f, 13.0f, 6.0f, -1.0f, -8.0f, -15.0f, -22.0f, -29.0f, -36.0f, -43.0f, -50.0f, -57.0f, -64.0f, -71.0f, -78.0f, -84.0f, -91.0f}, + {26.0f, 19.0f, 12.0f, 5.0f, -2.0f, -9.0f, -16.0f, -23.0f, -30.0f, -37.0f, -44.0f, -51.0f, -58.0f, -65.0f, -72.0f, -79.0f, -86.0f, -93.0f}, + {26.0f, 19.0f, 12.0f, 4.0f, -3.0f, -10.0f, -17.0f, -24.0f, -31.0f, -38.0f, -45.0f, -52.0f, -60.0f, -67.0f, -74.0f, -81.0f, -88.0f, -95.0f}, + {25.0f, 18.0f, 11.0f, 4.0f, -3.0f, -11.0f, -18.0f, -25.0f, -32.0f, -39.0f, -46.0f, -54.0f, -61.0f, -68.0f, -75.0f, -82.0f, -89.0f, -97.0f}, + {25.0f, 17.0f, 10.0f, 3.0f, -4.0f, -11.0f, -19.0f, -26.0f, -33.0f, -40.0f, -48.0f, -55.0f, -62.0f, -69.0f, -76.0f, -84.0f, -91.0f, -98.0f} }; const int transformData[ROWS][COLS] = @@ -489,8 +489,8 @@ test_poly(const hid_t dxpl_id_polynomial) for(row = 0; row < ROWS; row++) for(col = 0; col < COLS; col++) { - windchillC = (int) ((5.0 / 9.0) * (windchillFfloat[row][col] - 32)); - polyflres[row][col] = (float) ((2.0 + windchillC) * ((windchillC - 8.0) / 2.0)); + windchillC = (int) ((5.0f / 9.0f) * (windchillFfloat[row][col] - 32)); + polyflres[row][col] = (float) ((2.0f + windchillC) * ((windchillC - 8.0f) / 2.0f)); } TESTING("data transform, polynomial transform (int->float)") @@ -498,11 +498,11 @@ test_poly(const hid_t dxpl_id_polynomial) dxpl_id_polynomial, polyflread) < 0) TEST_ERROR - COMPARE(float, polyflread, polyflres, 2.0) + COMPARE(float, polyflread, polyflres, 2.0f) for(row = 0; row < ROWS; row++) for(col = 0; col < COLS; col++) { - windchillC = (int) ((5.0 / 9.0) * (windchillFfloat[row][col] - 32)); + windchillC = (int) ((5.0f / 9.0f) * (windchillFfloat[row][col] - 32)); polyflres[row][col] = (float) ((2 + windchillC) * ((windchillC - 8) / 2)); } @@ -684,7 +684,7 @@ test_copy(const hid_t dxpl_id_c_to_f_copy, const hid_t dxpl_id_polynomial_copy) for(row = 0; row < ROWS; row++) for(col = 0; col < COLS; col++) { - windchillC = (int) ((5.0 / 9.0) * (windchillFfloat[row][col] - 32)); + windchillC = (int) ((5.0f / 9.0f) * (windchillFfloat[row][col] - 32)); polyflres[row][col] = (float) ((2 + windchillC) * ((windchillC - 8) / 2)); } @@ -721,7 +721,7 @@ test_trivial(const hid_t dxpl_id_simple) TEST_ERROR for(row = 0; row < ROWS; row++) for(col = 0; col < COLS; col++) { - if((windchillFfloatread[row][col] - 4.8) > FLOAT_TOL) + if((windchillFfloatread[row][col] - 4.8f) > FLOAT_TOL) FAIL_PUTS_ERROR(" ERROR: Conversion failed to match computed data\n"); } @@ -780,7 +780,7 @@ test_getset(const hid_t dxpl_id_c_to_f) for(row = 0; row < ROWS; row++) for(col = 0; col < COLS; col++) { - if((windchillFfloatread[row][col] - 4.8) > FLOAT_TOL) + if((windchillFfloatread[row][col] - 4.8f) > FLOAT_TOL) FAIL_PUTS_ERROR(" ERROR: Conversion failed to match computed data\n") } diff --git a/test/gen_cross.c b/test/gen_cross.c index d960499..8cbb2f5 100644 --- a/test/gen_cross.c +++ b/test/gen_cross.c @@ -94,7 +94,7 @@ create_normal_dset(hid_t fid, hid_t fsid, hid_t msid) hid_t dataset; /* file and dataset handles */ hid_t dcpl; float data[NX][NY]; /* data to write */ - float fillvalue = -2.2; + float fillvalue = -2.2f; int i, j; /* @@ -204,7 +204,7 @@ create_scale_offset_dsets_float(hid_t fid, hid_t fsid, hid_t msid) hid_t dataset; /* dataset handles */ hid_t dcpl; float data[NX][NY]; /* data to write */ - float fillvalue = -2.2; + float fillvalue = -2.2f; hsize_t chunk[RANK] = {CHUNK0, CHUNK1}; int i, j; @@ -304,7 +304,7 @@ create_scale_offset_dsets_double(hid_t fid, hid_t fsid, hid_t msid) hid_t dataset; /* dataset handles */ hid_t dcpl; double data[NX][NY]; /* data to write */ - double fillvalue = -2.2; + double fillvalue = -2.2f; hsize_t chunk[RANK] = {CHUNK0, CHUNK1}; int i, j; @@ -837,7 +837,7 @@ create_fletcher_dsets_float(hid_t fid, hid_t fsid, hid_t msid) hid_t dataset; /* dataset handles */ hid_t dcpl; float data[NX][NY]; /* data to write */ - float fillvalue = -2.2; + float fillvalue = -2.2f; hsize_t chunk[RANK] = {CHUNK0, CHUNK1}; int i, j; @@ -937,7 +937,7 @@ create_deflate_dsets_float(hid_t fid, hid_t fsid, hid_t msid) hid_t dataset; /* dataset handles */ hid_t dcpl; float data[NX][NY]; /* data to write */ - float fillvalue = -2.2; + float fillvalue = -2.2f; hsize_t chunk[RANK] = {CHUNK0, CHUNK1}; int i, j; @@ -1037,7 +1037,7 @@ create_szip_dsets_float(hid_t fid, hid_t fsid, hid_t msid) hid_t dataset; /* dataset handles */ hid_t dcpl; float data[NX][NY]; /* data to write */ - float fillvalue = -2.2; + float fillvalue = -2.2f; hsize_t chunk[RANK] = {CHUNK0, CHUNK1}; int i, j; @@ -1137,7 +1137,7 @@ create_shuffle_dsets_float(hid_t fid, hid_t fsid, hid_t msid) hid_t dataset; /* dataset handles */ hid_t dcpl; float data[NX][NY]; /* data to write */ - float fillvalue = -2.2; + float fillvalue = -2.2f; hsize_t chunk[RANK] = {CHUNK0, CHUNK1}; int i, j; @@ -1239,7 +1239,7 @@ create_nbit_dsets_float(hid_t fid, hid_t fsid, hid_t msid) hid_t dcpl; size_t precision, offset; float data[NX][NY]; /* data to write */ - float fillvalue = -2.2; + float fillvalue = -2.2f; hsize_t chunk[RANK] = {CHUNK0, CHUNK1}; int i, j; diff --git a/test/ttsafe_error.c b/test/ttsafe_error.c index 20f4f90..b81a7ad 100644 --- a/test/ttsafe_error.c +++ b/test/ttsafe_error.c @@ -199,7 +199,7 @@ void *tts_error_thread(void UNUSED *arg) } static -herr_t error_callback(hid_t estack_id, void *client_data) +herr_t error_callback(hid_t UNUSED estack_id, void *client_data) { H5TS_mutex_lock_simple(&error_mutex); error_count++; diff --git a/tools/h5diff/h5diffgentest.c b/tools/h5diff/h5diffgentest.c index d8b3b34..2271703 100644 --- a/tools/h5diff/h5diffgentest.c +++ b/tools/h5diff/h5diffgentest.c @@ -560,10 +560,10 @@ int test_basic(const char *fname1, const char *fname2, const char *fname3) int data4[3][2] = {{0,0},{0,0},{0,0}}; int data5[2][2] = {{0,0},{0,0}}; unsigned int data6[3][2] = {{0,0},{0,0},{0,0}}; - cmp1_t data7[1] = {{1,2}}; - cmp2_t data8[1] = {{1,2}}; - hsize_t dims3[2] = { 2,2 }; - hsize_t dims4[1] = { 1 }; + cmp1_t data7[1] = {{1.0f, 2}}; + cmp2_t data8[1] = {{1, 2.0f}}; + hsize_t dims3[2] = {2, 2}; + hsize_t dims4[1] = {1}; size_t type_size; hid_t tid; @@ -4419,6 +4419,7 @@ static void test_comps_array (const char *fname, const char *dset, const char *a * Create an attribute in root group */ tid_attr = H5Acreate2(fid, attr, tid_cmpd1, sid_dset, H5P_DEFAULT, H5P_DEFAULT); + assert(tid_attr > 0); ret = H5Awrite(tid_attr, tid_cmpd1, wdata); assert(ret >= 0); @@ -4461,6 +4462,7 @@ static void test_comps_vlen (const char * fname, const char *dset, const char *a hid_t fid; /* HDF5 File ID */ hid_t did_dset; /* dataset ID */ hid_t sid_dset; /* dataset space ID */ + hid_t tid_attr; hid_t tid_cmpd2; /* compound2 type ID */ hid_t tid_cmpd1; /* compound1 type ID */ hid_t tid_cmpd1_vlen; @@ -4525,22 +4527,22 @@ static void test_comps_vlen (const char * fname, const char *dset, const char *a ret = H5Dwrite(did_dset, tid_cmpd1, H5S_ALL, H5S_ALL, H5P_DEFAULT, wdata); assert(ret >= 0); - /* Reclaim the write VL data */ - ret = H5Dvlen_reclaim(tid_cmpd1, sid_dset, H5P_DEFAULT, wdata); - assert(ret >= 0); - /*----------------------------------- * Create an attribute in root group */ - /* TODO: creating vlen with compound type doesn't work for attribute now. - * so add this later when it's fixed tid_attr = H5Acreate2(fid, attr, tid_cmpd1, sid_dset, H5P_DEFAULT, H5P_DEFAULT); + assert(tid_attr > 0); ret = H5Awrite(tid_attr, tid_cmpd1, wdata); assert(ret >= 0); - */ + + /* Reclaim the write VL data */ + ret = H5Dvlen_reclaim(tid_cmpd1, sid_dset, H5P_DEFAULT, wdata); + assert(ret >= 0); /* ---------------- * Close IDs */ + ret = H5Aclose(tid_attr); + assert(ret >= 0); ret = H5Dclose(did_dset); assert(ret >= 0); ret = H5Tclose(tid_cmpd2); @@ -4577,6 +4579,7 @@ static void test_comps_array_vlen (const char * fname, const char *dset,const ch hid_t fid; /* HDF5 File IDs */ hid_t did_dset; /* Dataset ID */ hid_t sid_dset; /* Dataspace ID */ + hid_t tid_attr; hid_t tid_cmpd1; /* Compound1 Datatype ID */ hid_t tid_arry1; /* Array Datatype ID */ hid_t tid_cmpd2; /* Compound2 Datatype ID */ @@ -4664,22 +4667,22 @@ static void test_comps_array_vlen (const char * fname, const char *dset,const ch ret = H5Dwrite(did_dset, tid_cmpd1, H5S_ALL, H5S_ALL, H5P_DEFAULT, wdata); assert(ret >= 0); - /* Reclaim the write VL data */ - ret = H5Dvlen_reclaim(tid_cmpd1, sid_dset, H5P_DEFAULT, wdata); - assert(ret >= 0); - /*----------------------------------- * Create an attribute in root group */ - /* TODO: creating vlen with compound type doesn't work for attribute now. - * so add this later when it's fixed tid_attr = H5Acreate2(fid, attr, tid_cmpd1, sid_dset, H5P_DEFAULT, H5P_DEFAULT); + assert(tid_attr > 0); ret = H5Awrite(tid_attr, tid_cmpd1, wdata); assert(ret >= 0); - */ + + /* Reclaim the write VL data */ + ret = H5Dvlen_reclaim(tid_cmpd1, sid_dset, H5P_DEFAULT, wdata); + assert(ret >= 0); /*------------------- * Close IDs */ + ret = H5Aclose(tid_attr); + assert(ret >= 0); ret = H5Tclose(tid_arry1); assert(ret >= 0); ret = H5Dclose(did_dset); @@ -4724,6 +4727,7 @@ static void test_comps_vlen_arry (const char * fname, const char *dset, const ch hid_t fid; /* HDF5 File ID */ hid_t did_dset; /* dataset ID */ hid_t sid_dset; /* dataset space ID */ + hid_t tid_attr; hid_t tid_cmpd3; /* compound3 type ID */ hid_t tid_cmpd2; /* compound2 type ID */ hid_t tid_cmpd2_arry; @@ -4809,22 +4813,22 @@ static void test_comps_vlen_arry (const char * fname, const char *dset, const ch ret = H5Dwrite(did_dset, tid_cmpd1, H5S_ALL, H5S_ALL, H5P_DEFAULT, wdata); assert(ret >= 0); - /* Reclaim the write VL data */ - ret = H5Dvlen_reclaim(tid_cmpd1, sid_dset, H5P_DEFAULT, wdata); - assert(ret >= 0); - /*----------------------------------- * Create an attribute in root group */ - /* TODO: creating vlen with compound type doesn't work for attribute now. - * so add this later when it's fixed tid_attr = H5Acreate2(fid, attr, tid_cmpd1, sid_dset, H5P_DEFAULT, H5P_DEFAULT); + assert(tid_attr > 0); ret = H5Awrite(tid_attr, tid_cmpd1, wdata); assert(ret >= 0); - */ + + /* Reclaim the write VL data */ + ret = H5Dvlen_reclaim(tid_cmpd1, sid_dset, H5P_DEFAULT, wdata); + assert(ret >= 0); /* ---------------- * Close IDs */ + ret = H5Aclose(tid_attr); + assert(ret >= 0); ret = H5Dclose(did_dset); assert(ret >= 0); ret = H5Sclose(sid_dset); @@ -4870,7 +4874,7 @@ static void test_data_nocomparables (const char * fname, int make_diffs) int data1[DIM_ARRY] = {0,0,0}; int data2[DIM_ARRY] = {1,1,1}; int data3[DIM_ARRY+1] = {1,1,1,1}; - int data1_dim2[DIM_ARRY][1] = {{0,0,0}}; + int data1_dim2[DIM_ARRY][1] = {0,0,0}; int rank_attr; char data1_str[DIM_ARRY][STR_SIZE]= {"ab","cd","ef"}; herr_t status = SUCCEED; diff --git a/tools/h5dump/h5dump_ddl.c b/tools/h5dump/h5dump_ddl.c index ec93778..380eb8e 100644 --- a/tools/h5dump/h5dump_ddl.c +++ b/tools/h5dump/h5dump_ddl.c @@ -148,7 +148,7 @@ dump_attr_cb(hid_t oid, const char *attr_name, const H5A_info_t UNUSED *info, vo outputformat = &string_dataformat; h5dump_type_table = type_table; - h5tools_dump_attribute(rawoutstream, outputformat, &ctx, oid, attr_name, attr_id, display_ai, display_char); + h5tools_dump_attribute(rawoutstream, outputformat, &ctx, attr_name, attr_id, display_ai, display_char); h5dump_type_table = NULL; if(attr_id < 0) { @@ -1360,7 +1360,7 @@ attr_search(hid_t oid, const char *attr_name, const H5A_info_t UNUSED *ainfo, vo } /* end attr_search() */ static herr_t -obj_search(const char *path, const H5O_info_t *oi, const char *already_visited, void *_op_data) +obj_search(const char *path, const H5O_info_t *oi, const char UNUSED *already_visited, void *_op_data) { trav_handle_udata_t *handle_data = (trav_handle_udata_t*)_op_data; char *op_name = (char*)handle_data->op_name; @@ -1452,7 +1452,7 @@ lnk_search(const char *path, const H5L_info_t *li, void *_op_data) *------------------------------------------------------------------------- */ void -handle_paths(hid_t fid, const char *path_name, void* data, int pe, const char *display_name) +handle_paths(hid_t fid, const char *path_name, void UNUSED * data, int UNUSED pe, const char UNUSED *display_name) { hid_t gid = -1; @@ -1613,7 +1613,7 @@ handle_attributes(hid_t fid, const char *attr, void UNUSED * data, int UNUSED pe attr_data_output = display_attr_data; h5dump_type_table = type_table; - h5tools_dump_attribute(rawoutstream, outputformat, &ctx, oid, attr_name, attr_id, display_ai, display_char); + h5tools_dump_attribute(rawoutstream, outputformat, &ctx, attr_name, attr_id, display_ai, display_char); h5dump_type_table = NULL; if(attr_id < 0) { diff --git a/tools/h5dump/h5dump_xml.c b/tools/h5dump/h5dump_xml.c index 53ad894..f3fefba 100644 --- a/tools/h5dump/h5dump_xml.c +++ b/tools/h5dump/h5dump_xml.c @@ -26,6 +26,88 @@ const char *xmlnsprefix="hdf5:"; +/* + * Alternative formating for data dumped to XML + * In general, the numbers are the same, but separators + * except spaces are not used. + * + * Some of these are not used, as some kinds of data are + * dumped in completely new subroutines. + * + * Some of this formatting may yet need to change. + * + * This table only affects XML output. + */ +static h5tool_format_t xml_dataformat = { + 0, /*raw */ + + "", /*fmt_raw */ + "%d", /*fmt_int */ + "%u", /*fmt_uint */ + "%hhd", /*fmt_schar */ + "%u", /*fmt_uchar */ + "%d", /*fmt_short */ + "%u", /*fmt_ushort */ + "%ld", /*fmt_long */ + "%lu", /*fmt_ulong */ + NULL, /*fmt_llong */ + NULL, /*fmt_ullong */ + "%g", /*fmt_double */ + "%g", /*fmt_float */ + + 0, /*ascii */ + 0, /*str_locale */ + 0, /*str_repeat */ + + "", /*arr_pre */ + "", /*arr_sep */ + "", /*arr_suf */ + 1, /*arr_linebreak */ + + "", /*cmpd_name */ + "", /*cmpd_sep */ + "", /*cmpd_pre */ + "", /*cmpd_suf */ + "", /*cmpd_end */ + + " ", /*vlen_sep */ + " ", /*vlen_pre */ + "", /*vlen_suf */ + "", /*vlen_end */ + + "%s", /*elmt_fmt */ + "", /*elmt_suf1 */ + " ", /*elmt_suf2 */ + + "", /*idx_n_fmt */ + "", /*idx_sep */ + "", /*idx_fmt */ + + 80, /*line_ncols *//*standard default columns */ + 0, /*line_per_line */ + "", /*line_pre */ + "%s", /*line_1st */ + "%s", /*line_cont */ + "", /*line_suf */ + "", /*line_sep */ + 1, /*line_multi_new */ + " ", /*line_indent */ + + 1, /*skip_first */ + + 1, /*obj_hidefileno */ + " "H5_PRINTF_HADDR_FMT, /*obj_format */ + + 1, /*dset_hidefileno */ + "DATASET %s ", /*dset_format */ + "%s", /*dset_blockformat_pre */ + "%s", /*dset_ptformat_pre */ + "%s", /*dset_ptformat */ + 0, /*array indices */ + 0 /*escape non printable characters */ +}; + + /* internal functions */ static int xml_name_to_XID(const char *, char *, int , int ); diff --git a/tools/h5dump/h5dump_xml.h b/tools/h5dump/h5dump_xml.h index 258fd38..c1d6c62 100644 --- a/tools/h5dump/h5dump_xml.h +++ b/tools/h5dump/h5dump_xml.h @@ -17,87 +17,6 @@ extern const char *xmlnsprefix; -/* - * Alternative formating for data dumped to XML - * In general, the numbers are the same, but separators - * except spaces are not used. - * - * Some of these are not used, as some kinds of data are - * dumped in completely new subroutines. - * - * Some of this formatting may yet need to change. - * - * This table only affects XML output. - */ -static h5tool_format_t xml_dataformat = { - 0, /*raw */ - - "", /*fmt_raw */ - "%d", /*fmt_int */ - "%u", /*fmt_uint */ - "%hhd", /*fmt_schar */ - "%u", /*fmt_uchar */ - "%d", /*fmt_short */ - "%u", /*fmt_ushort */ - "%ld", /*fmt_long */ - "%lu", /*fmt_ulong */ - NULL, /*fmt_llong */ - NULL, /*fmt_ullong */ - "%g", /*fmt_double */ - "%g", /*fmt_float */ - - 0, /*ascii */ - 0, /*str_locale */ - 0, /*str_repeat */ - - "", /*arr_pre */ - "", /*arr_sep */ - "", /*arr_suf */ - 1, /*arr_linebreak */ - - "", /*cmpd_name */ - "", /*cmpd_sep */ - "", /*cmpd_pre */ - "", /*cmpd_suf */ - "", /*cmpd_end */ - - " ", /*vlen_sep */ - " ", /*vlen_pre */ - "", /*vlen_suf */ - "", /*vlen_end */ - - "%s", /*elmt_fmt */ - "", /*elmt_suf1 */ - " ", /*elmt_suf2 */ - - "", /*idx_n_fmt */ - "", /*idx_sep */ - "", /*idx_fmt */ - - 80, /*line_ncols *//*standard default columns */ - 0, /*line_per_line */ - "", /*line_pre */ - "%s", /*line_1st */ - "%s", /*line_cont */ - "", /*line_suf */ - "", /*line_sep */ - 1, /*line_multi_new */ - " ", /*line_indent */ - - 1, /*skip_first */ - - 1, /*obj_hidefileno */ - " "H5_PRINTF_HADDR_FMT, /*obj_format */ - - 1, /*dset_hidefileno */ - "DATASET %s ", /*dset_format */ - "%s", /*dset_blockformat_pre */ - "%s", /*dset_ptformat_pre */ - "%s", /*dset_ptformat */ - 0, /*array indices */ - 0 /*escape non printable characters */ -}; - #ifdef __cplusplus extern "C" { #endif diff --git a/tools/lib/h5tools_dump.c b/tools/lib/h5tools_dump.c index cde249c..75d3c67 100644 --- a/tools/lib/h5tools_dump.c +++ b/tools/lib/h5tools_dump.c @@ -3497,7 +3497,7 @@ h5tools_dump_comment(FILE *stream, const h5tool_format_t *info, */ void h5tools_dump_attribute(FILE *stream, const h5tool_format_t *info, - h5tools_context_t *ctx, hid_t oid, const char *attr_name, hid_t attr_id, + h5tools_context_t *ctx, const char *attr_name, hid_t attr_id, int display_index, int display_char) { h5tools_str_t buffer; /* string into which to render */ diff --git a/tools/lib/h5tools_dump.h b/tools/lib/h5tools_dump.h index 86f9f99..061a3db 100644 --- a/tools/lib/h5tools_dump.h +++ b/tools/lib/h5tools_dump.h @@ -52,7 +52,7 @@ H5TOOLS_DLL void h5tools_dump_datatype(FILE *stream, const h5tool_format_t *i H5TOOLS_DLL void h5tools_dump_dataspace(FILE *stream, const h5tool_format_t *info, h5tools_context_t *ctx/*in,out*/, hid_t space); H5TOOLS_DLL void h5tools_dump_attribute(FILE *stream, const h5tool_format_t *info, - h5tools_context_t *ctx/*in,out*/, hid_t oid, const char *attr_name, + h5tools_context_t *ctx/*in,out*/, const char *attr_name, hid_t attr_id, int display_index, int display_char); H5TOOLS_DLL void h5tools_dump_oid(FILE *stream, const h5tool_format_t *info, h5tools_context_t *ctx/*in,out*/, hid_t oid); diff --git a/tools/lib/h5trav.c b/tools/lib/h5trav.c index 8455360..58d7959 100644 --- a/tools/lib/h5trav.c +++ b/tools/lib/h5trav.c @@ -724,22 +724,22 @@ trav_table_add(trav_table_t *table, const char *path, const H5O_info_t *oinfo) { - size_t new; + size_t new_obj; if(table->nobjs == table->size) { table->size = MAX(1, table->size * 2); table->objs = (trav_obj_t*)HDrealloc(table->objs, table->size * sizeof(trav_obj_t)); } /* end if */ - new = table->nobjs++; - table->objs[new].objno = oinfo ? oinfo->addr : HADDR_UNDEF; - table->objs[new].flags[0] = table->objs[new].flags[1] = 0; - table->objs[new].is_same_trgobj = 0; - table->objs[new].name = (char *)HDstrdup(path); - table->objs[new].type = oinfo ? (h5trav_type_t)oinfo->type : H5TRAV_TYPE_LINK; - table->objs[new].nlinks = 0; - table->objs[new].sizelinks = 0; - table->objs[new].links = NULL; + new_obj = table->nobjs++; + table->objs[new_obj].objno = oinfo ? oinfo->addr : HADDR_UNDEF; + table->objs[new_obj].flags[0] = table->objs[new_obj].flags[1] = 0; + table->objs[new_obj].is_same_trgobj = 0; + table->objs[new_obj].name = (char *)HDstrdup(path); + table->objs[new_obj].type = oinfo ? (h5trav_type_t)oinfo->type : H5TRAV_TYPE_LINK; + table->objs[new_obj].nlinks = 0; + table->objs[new_obj].sizelinks = 0; + table->objs[new_obj].links = NULL; } /*------------------------------------------------------------------------- @@ -807,23 +807,23 @@ void trav_table_addflags(unsigned *flags, h5trav_type_t type, trav_table_t *table) { - unsigned int new; + unsigned int new_obj; if(table->nobjs == table->size) { table->size = MAX(1, table->size * 2); table->objs = (trav_obj_t *)HDrealloc(table->objs, table->size * sizeof(trav_obj_t)); } /* end if */ - new = table->nobjs++; - table->objs[new].objno = 0; - table->objs[new].flags[0] = flags[0]; - table->objs[new].flags[1] = flags[1]; - table->objs[new].is_same_trgobj = 0; - table->objs[new].name = (char *)HDstrdup(name); - table->objs[new].type = type; - table->objs[new].nlinks = 0; - table->objs[new].sizelinks = 0; - table->objs[new].links = NULL; + new_obj = table->nobjs++; + table->objs[new_obj].objno = 0; + table->objs[new_obj].flags[0] = flags[0]; + table->objs[new_obj].flags[1] = flags[1]; + table->objs[new_obj].is_same_trgobj = 0; + table->objs[new_obj].name = (char *)HDstrdup(name); + table->objs[new_obj].type = type; + table->objs[new_obj].nlinks = 0; + table->objs[new_obj].sizelinks = 0; + table->objs[new_obj].links = NULL; } @@ -890,7 +890,11 @@ void trav_table_free( trav_table_t *table ) } static herr_t -trav_attr(hid_t obj, const char *attr_name, const H5A_info_t UNUSED *ainfo, void *op_data) +trav_attr(hid_t +#ifndef H5TRAV_PRINT_SPACE +UNUSED +#endif /* H5TRAV_PRINT_SPACE */ +obj, const char *attr_name, const H5A_info_t UNUSED *ainfo, void *op_data) { char *buf; -- cgit v0.12