summaryrefslogtreecommitdiffstats
path: root/tools/test/h5repack
diff options
context:
space:
mode:
Diffstat (limited to 'tools/test/h5repack')
-rw-r--r--tools/test/h5repack/CMakeLists.txt89
-rw-r--r--tools/test/h5repack/CMakeTests.cmake859
-rw-r--r--tools/test/h5repack/Makefile.am18
-rw-r--r--tools/test/h5repack/dynlib_rpk.c10
-rw-r--r--tools/test/h5repack/dynlib_vrpk.c10
-rw-r--r--tools/test/h5repack/h5repack.sh.in259
-rw-r--r--tools/test/h5repack/h5repack_plugin.sh.in24
-rw-r--r--tools/test/h5repack/h5repacktst.c1714
-rw-r--r--tools/test/h5repack/testfiles/GS.h5repack_paged_nopersist.h5.ddl15
-rw-r--r--tools/test/h5repack/testfiles/S.h5repack_fsm_aggr_persist.h5.ddl15
-rw-r--r--tools/test/h5repack/testfiles/SP.h5repack_fsm_aggr_nopersist.h5.ddl16
-rw-r--r--tools/test/h5repack/testfiles/SP.h5repack_paged_persist.h5.ddl15
-rw-r--r--tools/test/h5repack/testfiles/SPT.h5repack_aggr.h5.ddl16
-rw-r--r--tools/test/h5repack/testfiles/STG.h5repack_none.h5.ddl15
-rw-r--r--tools/test/h5repack/testfiles/bounds_latest_latest.h5bin0 -> 82048 bytes
-rw-r--r--tools/test/h5repack/testfiles/crtorder.tordergr.h5.ddl36
-rw-r--r--tools/test/h5repack/testfiles/h5repack-help.txt35
-rw-r--r--tools/test/h5repack/testfiles/h5repack_aggr.h5bin0 -> 2448 bytes
-rw-r--r--tools/test/h5repack/testfiles/h5repack_filters.h5-gzip_verbose_filters.tst5
-rw-r--r--tools/test/h5repack/testfiles/h5repack_fsm_aggr_nopersist.h5bin0 -> 2448 bytes
-rw-r--r--tools/test/h5repack/testfiles/h5repack_fsm_aggr_persist.h5bin0 -> 2565 bytes
-rw-r--r--tools/test/h5repack/testfiles/h5repack_layout.h5-dset2_chunk_20x10-errstk.tst10
-rw-r--r--tools/test/h5repack/testfiles/h5repack_layout.h5-plugin_version_test.ddl14
-rw-r--r--tools/test/h5repack/testfiles/h5repack_layout.h5-plugin_zero.ddl135
-rw-r--r--tools/test/h5repack/testfiles/h5repack_layout.h5-plugin_zero.tst9
-rw-r--r--tools/test/h5repack/testfiles/h5repack_none.h5bin0 -> 1808 bytes
-rw-r--r--tools/test/h5repack/testfiles/h5repack_paged_nopersist.h5bin0 -> 8192 bytes
-rw-r--r--tools/test/h5repack/testfiles/h5repack_paged_persist.h5bin0 -> 16384 bytes
-rw-r--r--tools/test/h5repack/testfiles/plugin_none.h5repack_layout.UD.h5.tst5
-rw-r--r--tools/test/h5repack/testfiles/plugin_test.h5repack_layout.h5.tst5
-rw-r--r--tools/test/h5repack/testfiles/plugin_version_test.h5repack_layout.h5.tst5
-rw-r--r--tools/test/h5repack/testfiles/plugin_zero.h5repack_layout.h5.tst22
-rw-r--r--tools/test/h5repack/testh5repack_detect_szip.c11
33 files changed, 2050 insertions, 1317 deletions
diff --git a/tools/test/h5repack/CMakeLists.txt b/tools/test/h5repack/CMakeLists.txt
index 9d67ec3..1381fd7 100644
--- a/tools/test/h5repack/CMakeLists.txt
+++ b/tools/test/h5repack/CMakeLists.txt
@@ -1,18 +1,11 @@
-cmake_minimum_required (VERSION 3.2.2)
-PROJECT (HDF5_TOOLS_TEST_H5REPACK)
-
-#-----------------------------------------------------------------------------
-# Setup include Directories
-#-----------------------------------------------------------------------------
-INCLUDE_DIRECTORIES (${HDF5_TOOLS_DIR}/lib)
-INCLUDE_DIRECTORIES (${HDF5_TOOLS_DIR}/src/h5repack)
-INCLUDE_DIRECTORIES (${HDF5_TEST_SRC_DIR})
+cmake_minimum_required (VERSION 3.10)
+project (HDF5_TOOLS_TEST_H5REPACK C)
# --------------------------------------------------------------------
# Add h5Repack test executables
# --------------------------------------------------------------------
add_executable (testh5repack_detect_szip ${HDF5_TOOLS_TEST_H5REPACK_SOURCE_DIR}/testh5repack_detect_szip.c)
-TARGET_NAMING (testh5repack_detect_szip STATIC)
+set_property(TARGET testh5repack_detect_szip APPEND PROPERTY INCLUDE_DIRECTORIES "${HDF5_TOOLS_SRC_H5REPACK_SOURCE_DIR};${HDF5_TOOLS_DIR}/lib;${HDF5_SRC_DIR};${HDF5_BINARY_DIR}")
TARGET_C_PROPERTIES (testh5repack_detect_szip STATIC " " " ")
target_link_libraries (testh5repack_detect_szip ${HDF5_LIB_TARGET} ${HDF5_TOOLS_LIB_TARGET} ${HDF5_TEST_LIB_TARGET})
set_target_properties (testh5repack_detect_szip PROPERTIES FOLDER tools)
@@ -27,53 +20,53 @@ set (REPACK_COMMON_SOURCES
${HDF5_TOOLS_SRC_H5REPACK_SOURCE_DIR}/h5repack.c
)
add_executable (h5repacktest ${REPACK_COMMON_SOURCES} ${HDF5_TOOLS_TEST_H5REPACK_SOURCE_DIR}/h5repacktst.c)
-TARGET_NAMING (h5repacktest STATIC)
+set_property(TARGET h5repacktest APPEND PROPERTY INCLUDE_DIRECTORIES "${HDF5_TOOLS_SRC_H5REPACK_SOURCE_DIR};${HDF5_TOOLS_DIR}/lib;${HDF5_SRC_DIR};${HDF5_BINARY_DIR}")
TARGET_C_PROPERTIES (h5repacktest STATIC " " " ")
target_link_libraries (h5repacktest ${HDF5_TOOLS_LIB_TARGET} ${HDF5_TEST_LIB_TARGET})
set_target_properties (h5repacktest PROPERTIES FOLDER tools)
- #-----------------------------------------------------------------------------
- # If plugin library tests can be tested
- #-----------------------------------------------------------------------------
- set (HDF5_TOOL_PLUGIN_LIB_CORENAME "dynlibadd")
- set (HDF5_TOOL_PLUGIN_LIB_NAME "${HDF5_EXTERNAL_LIB_PREFIX}${HDF5_TOOL_PLUGIN_LIB_CORENAME}")
- set (HDF5_TOOL_PLUGIN_LIB_TARGET ${HDF5_TOOL_PLUGIN_LIB_CORENAME})
- set (HDF5_TOOL_PLUGIN_LIB_VCORENAME "dynlibvers")
- set (HDF5_TOOL_PLUGIN_LIB_VNAME "${HDF5_EXTERNAL_LIB_PREFIX}${HDF5_TOOL_PLUGIN_LIB_VCORENAME}")
- set (HDF5_TOOL_PLUGIN_LIB_VTARGET ${HDF5_TOOL_PLUGIN_LIB_VCORENAME})
- add_definitions (${HDF_EXTRA_C_FLAGS})
- INCLUDE_DIRECTORIES (${HDF5_SRC_DIR})
+#-----------------------------------------------------------------------------
+# If plugin library tests can be tested
+#-----------------------------------------------------------------------------
+set (HDF5_TOOL_PLUGIN_LIB_CORENAME "dynlibadd")
+set (HDF5_TOOL_PLUGIN_LIB_NAME "${HDF5_EXTERNAL_LIB_PREFIX}${HDF5_TOOL_PLUGIN_LIB_CORENAME}")
+set (HDF5_TOOL_PLUGIN_LIB_TARGET ${HDF5_TOOL_PLUGIN_LIB_CORENAME})
+set (HDF5_TOOL_PLUGIN_LIB_VCORENAME "dynlibvers")
+set (HDF5_TOOL_PLUGIN_LIB_VNAME "${HDF5_EXTERNAL_LIB_PREFIX}${HDF5_TOOL_PLUGIN_LIB_VCORENAME}")
+set (HDF5_TOOL_PLUGIN_LIB_VTARGET ${HDF5_TOOL_PLUGIN_LIB_VCORENAME})
- add_library (${HDF5_TOOL_PLUGIN_LIB_TARGET} SHARED dynlib_rpk.c)
- TARGET_C_PROPERTIES (${HDF5_TOOL_PLUGIN_LIB_TARGET} SHARED " " " ")
- target_link_libraries (${HDF5_TOOL_PLUGIN_LIB_TARGET} ${HDF5_TEST_LIB_TARGET})
- H5_SET_LIB_OPTIONS (${HDF5_TOOL_PLUGIN_LIB_TARGET} ${HDF5_TOOL_PLUGIN_LIB_NAME} SHARED ${HDF5_PACKAGE_SOVERSION})
+add_library (${HDF5_TOOL_PLUGIN_LIB_TARGET} SHARED dynlib_rpk.c)
+set_property(TARGET ${HDF5_TOOL_PLUGIN_LIB_TARGET} APPEND PROPERTY INCLUDE_DIRECTORIES "${HDF5_SRC_DIR};${HDF5_BINARY_DIR}")
+TARGET_C_PROPERTIES (${HDF5_TOOL_PLUGIN_LIB_TARGET} SHARED " " " ")
+target_link_libraries (${HDF5_TOOL_PLUGIN_LIB_TARGET} ${HDF5_TEST_LIB_TARGET})
+H5_SET_LIB_OPTIONS (${HDF5_TOOL_PLUGIN_LIB_TARGET} ${HDF5_TOOL_PLUGIN_LIB_NAME} SHARED "LIB")
- add_library (${HDF5_TOOL_PLUGIN_LIB_VTARGET} SHARED dynlib_vrpk.c)
- TARGET_C_PROPERTIES (${HDF5_TOOL_PLUGIN_LIB_VTARGET} SHARED " " " ")
- target_link_libraries (${HDF5_TOOL_PLUGIN_LIB_VTARGET} ${HDF5_TEST_LIB_TARGET})
- H5_SET_LIB_OPTIONS (${HDF5_TOOL_PLUGIN_LIB_VTARGET} ${HDF5_TOOL_PLUGIN_LIB_VNAME} SHARED ${HDF5_PACKAGE_SOVERSION})
+add_library (${HDF5_TOOL_PLUGIN_LIB_VTARGET} SHARED dynlib_vrpk.c)
+set_property(TARGET ${HDF5_TOOL_PLUGIN_LIB_VTARGET} APPEND PROPERTY INCLUDE_DIRECTORIES "${HDF5_SRC_DIR};${HDF5_BINARY_DIR}")
+TARGET_C_PROPERTIES (${HDF5_TOOL_PLUGIN_LIB_VTARGET} SHARED " " " ")
+target_link_libraries (${HDF5_TOOL_PLUGIN_LIB_VTARGET} ${HDF5_TEST_LIB_TARGET})
+H5_SET_LIB_OPTIONS (${HDF5_TOOL_PLUGIN_LIB_VTARGET} ${HDF5_TOOL_PLUGIN_LIB_VNAME} SHARED "LIB")
- # make plugins dir
- file (MAKE_DIRECTORY "${CMAKE_BINARY_DIR}/plugins")
- #-----------------------------------------------------------------------------
- # Copy plugin library to a plugins folder
- #-----------------------------------------------------------------------------
- add_custom_command (
- TARGET ${HDF5_TOOL_PLUGIN_LIB_TARGET}
- POST_BUILD
- COMMAND ${CMAKE_COMMAND}
- ARGS -E copy_if_different
+# make plugins dir
+file (MAKE_DIRECTORY "${CMAKE_BINARY_DIR}/plugins")
+#-----------------------------------------------------------------------------
+# Copy plugin library to a plugins folder
+#-----------------------------------------------------------------------------
+add_custom_command (
+ TARGET ${HDF5_TOOL_PLUGIN_LIB_TARGET}
+ POST_BUILD
+ COMMAND ${CMAKE_COMMAND}
+ ARGS -E copy_if_different
"$<TARGET_FILE:${HDF5_TOOL_PLUGIN_LIB_TARGET}>"
"${CMAKE_BINARY_DIR}/plugins/$<TARGET_FILE_NAME:${HDF5_TOOL_PLUGIN_LIB_TARGET}>"
- )
- add_custom_command (
- TARGET ${HDF5_TOOL_PLUGIN_LIB_VTARGET}
- POST_BUILD
- COMMAND ${CMAKE_COMMAND}
- ARGS -E copy_if_different
+)
+add_custom_command (
+ TARGET ${HDF5_TOOL_PLUGIN_LIB_VTARGET}
+ POST_BUILD
+ COMMAND ${CMAKE_COMMAND}
+ ARGS -E copy_if_different
"$<TARGET_FILE:${HDF5_TOOL_PLUGIN_LIB_VTARGET}>"
"${CMAKE_BINARY_DIR}/plugins/$<TARGET_FILE_NAME:${HDF5_TOOL_PLUGIN_LIB_VTARGET}>"
- )
+)
- include (CMakeTests.cmake)
+include (CMakeTests.cmake)
diff --git a/tools/test/h5repack/CMakeTests.cmake b/tools/test/h5repack/CMakeTests.cmake
index 2bcad83..f40c0b1 100644
--- a/tools/test/h5repack/CMakeTests.cmake
+++ b/tools/test/h5repack/CMakeTests.cmake
@@ -1,3 +1,14 @@
+#
+# Copyright by The HDF Group.
+# All rights reserved.
+#
+# This file is part of HDF5. The full HDF5 copyright notice, including
+# terms governing use, modification, and redistribution, is contained in
+# the COPYING file, which can be found at the root of the source code
+# distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases.
+# If you do not have access to either file, you may request a copy from
+# help@hdfgroup.org.
+#
##############################################################################
##############################################################################
@@ -42,6 +53,7 @@
# Copy all the HDF5 files from the source directory into the test directory
# --------------------------------------------------------------------
set (LIST_HDF5_TEST_FILES
+ ${HDF5_TOOLS_TEST_H5REPACK_SOURCE_DIR}/testfiles/bounds_latest_latest.h5
${HDF5_TOOLS_TEST_H5REPACK_SOURCE_DIR}/testfiles/h5repack_attr.h5
${HDF5_TOOLS_TEST_H5REPACK_SOURCE_DIR}/testfiles/h5repack_attr_refs.h5
${HDF5_TOOLS_TEST_H5REPACK_SOURCE_DIR}/testfiles/h5repack_deflate.h5
@@ -65,6 +77,13 @@
${HDF5_TOOLS_TEST_H5REPACK_SOURCE_DIR}/testfiles/h5repack_shuffle.h5
${HDF5_TOOLS_TEST_H5REPACK_SOURCE_DIR}/testfiles/h5repack_soffset.h5
${HDF5_TOOLS_TEST_H5REPACK_SOURCE_DIR}/testfiles/h5repack_szip.h5
+ # fsm
+ ${HDF5_TOOLS_TEST_H5REPACK_SOURCE_DIR}/testfiles/h5repack_aggr.h5
+ ${HDF5_TOOLS_TEST_H5REPACK_SOURCE_DIR}/testfiles/h5repack_fsm_aggr_nopersist.h5
+ ${HDF5_TOOLS_TEST_H5REPACK_SOURCE_DIR}/testfiles/h5repack_fsm_aggr_persist.h5
+ ${HDF5_TOOLS_TEST_H5REPACK_SOURCE_DIR}/testfiles/h5repack_none.h5
+ ${HDF5_TOOLS_TEST_H5REPACK_SOURCE_DIR}/testfiles/h5repack_paged_nopersist.h5
+ ${HDF5_TOOLS_TEST_H5REPACK_SOURCE_DIR}/testfiles/h5repack_paged_persist.h5
# h5diff/testfile
${HDF5_TOOLS_TEST_H5DIFF_SOURCE_DIR}/testfiles/h5diff_attr1.h5
# tools/testfiles
@@ -79,6 +98,7 @@
${HDF5_TOOLS_DIR}/testfiles/tfamily00008.h5
${HDF5_TOOLS_DIR}/testfiles/tfamily00009.h5
${HDF5_TOOLS_DIR}/testfiles/tfamily00010.h5
+ ${HDF5_TOOLS_DIR}/testfiles/tordergr.h5
# tools/testfiles/vds
${HDF5_TOOLS_DIR}/testfiles/vds/1_a.h5
${HDF5_TOOLS_DIR}/testfiles/vds/1_b.h5
@@ -106,32 +126,62 @@
)
set (LIST_OTHER_TEST_FILES
- ${HDF5_TOOLS_TEST_H5REPACK_SOURCE_DIR}/testfiles/h5repack-help.txt
- ${HDF5_TOOLS_TEST_H5REPACK_SOURCE_DIR}/testfiles/h5repack_ext.bin
- ${HDF5_TOOLS_TEST_H5REPACK_SOURCE_DIR}/testfiles/ublock.bin
- ${HDF5_TOOLS_TEST_H5REPACK_SOURCE_DIR}/testfiles/h5repack.info
- ${HDF5_TOOLS_TEST_H5REPACK_SOURCE_DIR}/testfiles/deflate_limit.h5repack_layout.h5.ddl
- ${HDF5_TOOLS_TEST_H5REPACK_SOURCE_DIR}/testfiles/h5repack_layout.h5.ddl
- ${HDF5_TOOLS_TEST_H5REPACK_SOURCE_DIR}/testfiles/h5repack_filters.h5-gzip_verbose_filters.tst
- ${HDF5_TOOLS_TEST_H5REPACK_SOURCE_DIR}/testfiles/h5repack_layout.h5-dset2_chunk_20x10-errstk.tst
- ${HDF5_TOOLS_TEST_H5REPACK_SOURCE_DIR}/testfiles/h5repack_layout.h5-plugin_test.ddl
- ${HDF5_TOOLS_TEST_H5REPACK_SOURCE_DIR}/testfiles/plugin_test.h5repack_layout.h5.tst
- ${HDF5_TOOLS_TEST_H5REPACK_SOURCE_DIR}/testfiles/h5repack_layout.UD.h5-plugin_none.ddl
- ${HDF5_TOOLS_TEST_H5REPACK_SOURCE_DIR}/testfiles/plugin_none.h5repack_layout.UD.h5.tst
- ${HDF5_TOOLS_TEST_H5REPACK_SOURCE_DIR}/testfiles/h5repack_layout.h5-plugin_version_test.ddl
- ${HDF5_TOOLS_TEST_H5REPACK_SOURCE_DIR}/testfiles/plugin_version_test.h5repack_layout.h5.tst
- ${HDF5_TOOLS_TEST_H5REPACK_SOURCE_DIR}/testfiles/1_vds.h5-vds_dset_chunk20x10x5-v.ddl
- ${HDF5_TOOLS_TEST_H5REPACK_SOURCE_DIR}/testfiles/2_vds.h5-vds_chunk3x6x9-v.ddl
- ${HDF5_TOOLS_TEST_H5REPACK_SOURCE_DIR}/testfiles/3_1_vds.h5-vds_chunk2x5x8-v.ddl
- ${HDF5_TOOLS_TEST_H5REPACK_SOURCE_DIR}/testfiles/4_vds.h5-vds_compa-v.ddl
- ${HDF5_TOOLS_TEST_H5REPACK_SOURCE_DIR}/testfiles/4_vds.h5-vds_conti-v.ddl
- ${HDF5_TOOLS_TEST_H5REPACK_SOURCE_DIR}/testfiles/h5repack_layout.h5-plugin_zero.tst
+ h5repack-help.txt
+ h5repack_ext.bin
+ h5repack.info
+ ublock.bin
)
- foreach (h5_file ${LIST_HDF5_TEST_FILES} ${LIST_OTHER_TEST_FILES})
+ set (LIST_TST_TEST_FILES
+ ${HDF5_TOOLS_TEST_H5REPACK_SOURCE_DIR}/testfiles/h5repack_filters.h5-gzip_verbose_filters
+ ${HDF5_TOOLS_TEST_H5REPACK_SOURCE_DIR}/testfiles/h5repack_layout.h5-dset2_chunk_20x10-errstk
+ ${HDF5_TOOLS_TEST_H5REPACK_SOURCE_DIR}/testfiles/plugin_test.h5repack_layout.h5
+ ${HDF5_TOOLS_TEST_H5REPACK_SOURCE_DIR}/testfiles/plugin_version_test.h5repack_layout.h5
+ ${HDF5_TOOLS_TEST_H5REPACK_SOURCE_DIR}/testfiles/plugin_zero.h5repack_layout.h5
+ ${HDF5_TOOLS_TEST_H5REPACK_SOURCE_DIR}/testfiles/plugin_none.h5repack_layout.UD.h5
+ )
+
+ set (LIST_DDL_TEST_FILES
+ ${HDF5_TOOLS_TEST_H5REPACK_SOURCE_DIR}/testfiles/crtorder.tordergr.h5
+ ${HDF5_TOOLS_TEST_H5REPACK_SOURCE_DIR}/testfiles/deflate_limit.h5repack_layout.h5
+ ${HDF5_TOOLS_TEST_H5REPACK_SOURCE_DIR}/testfiles/h5repack_layout.h5
+ ${HDF5_TOOLS_TEST_H5REPACK_SOURCE_DIR}/testfiles/h5repack_layout.h5-plugin_test
+ ${HDF5_TOOLS_TEST_H5REPACK_SOURCE_DIR}/testfiles/h5repack_layout.h5-plugin_version_test
+ ${HDF5_TOOLS_TEST_H5REPACK_SOURCE_DIR}/testfiles/h5repack_layout.h5-plugin_zero
+ ${HDF5_TOOLS_TEST_H5REPACK_SOURCE_DIR}/testfiles/h5repack_layout.UD.h5-plugin_none
+ # fsm
+ ${HDF5_TOOLS_TEST_H5REPACK_SOURCE_DIR}/testfiles/STG.h5repack_none.h5
+ ${HDF5_TOOLS_TEST_H5REPACK_SOURCE_DIR}/testfiles/SPT.h5repack_aggr.h5
+ ${HDF5_TOOLS_TEST_H5REPACK_SOURCE_DIR}/testfiles/SP.h5repack_fsm_aggr_nopersist.h5
+ ${HDF5_TOOLS_TEST_H5REPACK_SOURCE_DIR}/testfiles/S.h5repack_fsm_aggr_persist.h5
+ ${HDF5_TOOLS_TEST_H5REPACK_SOURCE_DIR}/testfiles/GS.h5repack_paged_nopersist.h5
+ ${HDF5_TOOLS_TEST_H5REPACK_SOURCE_DIR}/testfiles/SP.h5repack_paged_persist.h5
+ # vds
+ ${HDF5_TOOLS_TEST_H5REPACK_SOURCE_DIR}/testfiles/1_vds.h5-vds_dset_chunk20x10x5-v
+ ${HDF5_TOOLS_TEST_H5REPACK_SOURCE_DIR}/testfiles/2_vds.h5-vds_chunk3x6x9-v
+ ${HDF5_TOOLS_TEST_H5REPACK_SOURCE_DIR}/testfiles/3_1_vds.h5-vds_chunk2x5x8-v
+ ${HDF5_TOOLS_TEST_H5REPACK_SOURCE_DIR}/testfiles/4_vds.h5-vds_compa-v
+ ${HDF5_TOOLS_TEST_H5REPACK_SOURCE_DIR}/testfiles/4_vds.h5-vds_conti-v
+ )
+
+ foreach (h5_file ${LIST_HDF5_TEST_FILES})
get_filename_component(fname "${h5_file}" NAME)
HDFTEST_COPY_FILE("${h5_file}" "${PROJECT_BINARY_DIR}/testfiles/${fname}" "h5repack_files")
endforeach ()
+
+ foreach (h5_file ${LIST_OTHER_TEST_FILES})
+ HDFTEST_COPY_FILE("${HDF5_TOOLS_TEST_H5REPACK_SOURCE_DIR}/testfiles/${h5_file}" "${PROJECT_BINARY_DIR}/testfiles/${h5_file}" "h5repack_files")
+ endforeach ()
+
+ foreach (h5_file ${LIST_TST_TEST_FILES})
+ get_filename_component(fname "${h5_file}" NAME)
+ HDFTEST_COPY_FILE("${h5_file}.tst" "${PROJECT_BINARY_DIR}/testfiles/${fname}.tst" "h5repack_files")
+ endforeach ()
+
+ foreach (h5_file ${LIST_DDL_TEST_FILES})
+ get_filename_component(fname "${h5_file}" NAME)
+ HDFTEST_COPY_FILE("${h5_file}.ddl" "${PROJECT_BINARY_DIR}/testfiles/${fname}.ddl" "h5repack_files")
+ endforeach ()
add_custom_target(h5repack_files ALL COMMENT "Copying files needed by h5repack tests" DEPENDS ${h5repack_files_list})
##############################################################################
@@ -143,14 +193,24 @@
macro (ADD_HELP_TEST testname resultcode)
# If using memchecker add tests without using scripts
if (HDF5_ENABLE_USING_MEMCHECKER)
- add_test (NAME H5REPACK-${testname} COMMAND $<TARGET_FILE:h5repack> ${ARGN})
- set_tests_properties (H5REPACK-${testname} PROPERTIES WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles")
+ add_test (NAME H5REPACK-h5repack-${testname} COMMAND $<TARGET_FILE:h5repack> ${ARGN})
+ set_tests_properties (H5REPACK-h5repack-${testname} PROPERTIES WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles")
if (NOT "${last_test}" STREQUAL "")
- set_tests_properties (H5REPACK-${testname} PROPERTIES DEPENDS ${last_test})
+ set_tests_properties (H5REPACK-h5repack-${testname} PROPERTIES DEPENDS ${last_test})
endif ()
- set (last_test "H5REPACK-${testname}")
+ set (last_test "H5REPACK-h5repack-${testname}")
else ()
add_test (
+ NAME H5REPACK-h5repack-${testname}-clear-objects
+ COMMAND ${CMAKE_COMMAND}
+ -E remove
+ testfiles/h5repack-${testname}.out
+ testfiles/h5repack-${testname}.out.err
+ )
+ if (NOT "${last_test}" STREQUAL "")
+ set_tests_properties (H5REPACK-h5repack-${testname}-clear-objects PROPERTIES DEPENDS ${last_test})
+ endif ()
+ add_test (
NAME H5REPACK-h5repack-${testname}
COMMAND "${CMAKE_COMMAND}"
-D "TEST_PROGRAM=$<TARGET_FILE:h5repack>"
@@ -161,6 +221,7 @@
-D "TEST_REFERENCE=h5repack-${testname}.txt"
-P "${HDF_RESOURCES_EXT_DIR}/runTest.cmake"
)
+ set_tests_properties (H5REPACK-h5repack-${testname} PROPERTIES DEPENDS H5REPACK-h5repack-${testname}-clear-objects)
endif ()
endmacro ()
@@ -174,13 +235,20 @@
endif ()
else ()
add_test (
- NAME H5REPACK_OLD-${testname}
- COMMAND $<TARGET_FILE:h5repack> ${ARGN} -i ${PROJECT_BINARY_DIR}/testfiles/${testfile} -o ${PROJECT_BINARY_DIR}/testfiles/out-${testname}.${testfile}
+ NAME H5REPACK_OLD-${testname}-clear-objects
+ COMMAND ${CMAKE_COMMAND}
+ -E remove
+ testfiles/out-${testname}.${testfile}
)
if (NOT "${last_test}" STREQUAL "")
- set_tests_properties (H5REPACK_OLD-${testname} PROPERTIES DEPENDS ${last_test})
+ set_tests_properties (H5REPACK_OLD-${testname}-clear-objects PROPERTIES DEPENDS ${last_test})
endif ()
add_test (
+ NAME H5REPACK_OLD-${testname}
+ COMMAND $<TARGET_FILE:h5repack> ${ARGN} -i ${PROJECT_BINARY_DIR}/testfiles/${testfile} -o ${PROJECT_BINARY_DIR}/testfiles/out-${testname}.${testfile}
+ )
+ set_tests_properties (H5REPACK_OLD-${testname} PROPERTIES DEPENDS H5REPACK_OLD-${testname}-clear-objects)
+ add_test (
NAME H5REPACK_OLD-${testname}_DFF
COMMAND $<TARGET_FILE:h5diff> ${PROJECT_BINARY_DIR}/testfiles/${testfile} ${PROJECT_BINARY_DIR}/testfiles/out-${testname}.${testfile}
)
@@ -198,15 +266,22 @@
endif ()
else ()
add_test (
- NAME H5REPACK-${testname}
- COMMAND $<TARGET_FILE:h5repack> ${ARGN} ${PROJECT_BINARY_DIR}/testfiles/${testfile} ${PROJECT_BINARY_DIR}/testfiles/out-${testname}.${testfile}
+ NAME H5REPACK-${testname}-clear-objects
+ COMMAND ${CMAKE_COMMAND}
+ -E remove
+ testfiles/out-${testname}.${testfile}
)
if (NOT "${last_test}" STREQUAL "")
- set_tests_properties (H5REPACK-${testname} PROPERTIES DEPENDS ${last_test})
+ set_tests_properties (H5REPACK-${testname}-clear-objects PROPERTIES DEPENDS ${last_test})
endif ()
add_test (
+ NAME H5REPACK-${testname}
+ COMMAND $<TARGET_FILE:h5repack> --enable-error-stack ${ARGN} ${PROJECT_BINARY_DIR}/testfiles/${testfile} ${PROJECT_BINARY_DIR}/testfiles/out-${testname}.${testfile}
+ )
+ set_tests_properties (H5REPACK-${testname} PROPERTIES DEPENDS H5REPACK-${testname}-clear-objects)
+ add_test (
NAME H5REPACK-${testname}_DFF
- COMMAND $<TARGET_FILE:h5diff> ${PROJECT_BINARY_DIR}/testfiles/${testfile} ${PROJECT_BINARY_DIR}/testfiles/out-${testname}.${testfile}
+ COMMAND $<TARGET_FILE:h5diff> --enable-error-stack ${PROJECT_BINARY_DIR}/testfiles/${testfile} ${PROJECT_BINARY_DIR}/testfiles/out-${testname}.${testfile}
)
set_tests_properties (H5REPACK-${testname}_DFF PROPERTIES DEPENDS H5REPACK-${testname})
endif ()
@@ -225,9 +300,24 @@
if (HDF5_ENABLE_USING_MEMCHECKER)
add_test (
NAME H5REPACK_CMP-${testname}
- COMMAND $<TARGET_FILE:h5repack> ${ARGN} ${PROJECT_BINARY_DIR}/testfiles/${resultfile} ${PROJECT_BINARY_DIR}/testfiles/out-${testname}.${resultfile})
+ COMMAND $<TARGET_FILE:h5repack> ${ARGN} ${PROJECT_BINARY_DIR}/testfiles/${resultfile} ${PROJECT_BINARY_DIR}/testfiles/out-${testname}.${resultfile}
+ )
+ if (NOT "${last_test}" STREQUAL "")
+ set_tests_properties (H5REPACK_CMP-${testname} PROPERTIES DEPENDS ${last_test})
+ endif ()
else ()
add_test (
+ NAME H5REPACK_CMP-${testname}-clear-objects
+ COMMAND ${CMAKE_COMMAND}
+ -E remove
+ testfiles/out-${testname}.${resultfile}
+ testfiles/${resultfile}-${testname}.out
+ testfiles/${resultfile}-${testname}.out.err
+ )
+ if (NOT "${last_test}" STREQUAL "")
+ set_tests_properties (H5REPACK_CMP-${testname}-clear-objects PROPERTIES DEPENDS ${last_test})
+ endif ()
+ add_test (
NAME H5REPACK_CMP-${testname}
COMMAND "${CMAKE_COMMAND}"
-D "TEST_PROGRAM=$<TARGET_FILE:h5repack>"
@@ -239,9 +329,7 @@
-D "TEST_REFERENCE=${resultfile}-${testname}.tst"
-P "${HDF_RESOURCES_EXT_DIR}/runTest.cmake"
)
- endif ()
- if (NOT "${last_test}" STREQUAL "")
- set_tests_properties (H5REPACK_CMP-${testname} PROPERTIES DEPENDS ${last_test})
+ set_tests_properties (H5REPACK_CMP-${testname} PROPERTIES DEPENDS H5REPACK_CMP-${testname}-clear-objects)
endif ()
endif ()
endmacro ()
@@ -259,9 +347,24 @@
if (HDF5_ENABLE_USING_MEMCHECKER)
add_test (
NAME H5REPACK_MASK-${testname}
- COMMAND $<TARGET_FILE:h5repack> ${ARGN} ${PROJECT_BINARY_DIR}/testfiles/${resultfile} ${PROJECT_BINARY_DIR}/testfiles/out-${testname}.${resultfile})
+ COMMAND $<TARGET_FILE:h5repack> ${ARGN} ${PROJECT_BINARY_DIR}/testfiles/${resultfile} ${PROJECT_BINARY_DIR}/testfiles/out-${testname}.${resultfile}
+ )
+ if (NOT "${last_test}" STREQUAL "")
+ set_tests_properties (H5REPACK_MASK-${testname} PROPERTIES DEPENDS ${last_test})
+ endif ()
else (HDF5_ENABLE_USING_MEMCHECKER)
add_test (
+ NAME H5REPACK_MASK-${testname}-clear-objects
+ COMMAND ${CMAKE_COMMAND}
+ -E remove
+ testfiles/out-${testname}.${resultfile}
+ testfiles/${resultfile}-${testname}.out
+ testfiles/${resultfile}-${testname}.out.err
+ )
+ if (NOT "${last_test}" STREQUAL "")
+ set_tests_properties (H5REPACK_MASK-${testname}-clear-objects PROPERTIES DEPENDS ${last_test})
+ endif ()
+ add_test (
NAME H5REPACK_MASK-${testname}
COMMAND "${CMAKE_COMMAND}"
-D "TEST_PROGRAM=$<TARGET_FILE:h5repack>"
@@ -273,9 +376,7 @@
-D "TEST_REFERENCE=${resultfile}-${testname}.tst"
-P "${HDF_RESOURCES_EXT_DIR}/runTest.cmake"
)
- endif ()
- if (NOT "${last_test}" STREQUAL "")
- set_tests_properties (H5REPACK_MASK-${testname} PROPERTIES DEPENDS ${last_test})
+ set_tests_properties (H5REPACK_MASK-${testname} PROPERTIES DEPENDS H5REPACK_MASK-${testname}-clear-objects)
endif ()
endif ()
endmacro ()
@@ -289,19 +390,28 @@
)
endif ()
else ()
- # If using memchecker add tests without using scripts
add_test (
- NAME H5REPACK_DMP-${testname}
- COMMAND $<TARGET_FILE:h5repack> ${ARGN} ${PROJECT_BINARY_DIR}/testfiles/${resultfile} ${PROJECT_BINARY_DIR}/testfiles/out-${testname}.${resultfile})
+ NAME H5REPACK_DMP-${testname}-clear-objects
+ COMMAND ${CMAKE_COMMAND}
+ -E remove
+ testfiles/out-${testname}.${resultfile}
+ testfiles/${resultfile}-${testname}.out
+ testfiles/${resultfile}-${testname}.out.err
+ )
if (NOT "${last_test}" STREQUAL "")
- set_tests_properties (H5REPACK_DMP-${testname} PROPERTIES DEPENDS ${last_test})
+ set_tests_properties (H5REPACK_DMP-${testname}-clear-objects PROPERTIES DEPENDS ${last_test})
endif ()
+ add_test (
+ NAME H5REPACK_DMP-${testname}
+ COMMAND $<TARGET_FILE:h5repack> ${ARGN} ${PROJECT_BINARY_DIR}/testfiles/${resultfile} ${PROJECT_BINARY_DIR}/testfiles/out-${testname}.${resultfile}
+ )
+ set_tests_properties (H5REPACK_DMP-${testname} PROPERTIES DEPENDS H5REPACK_DMP-${testname}-clear-objects)
if (NOT HDF5_ENABLE_USING_MEMCHECKER)
add_test (
NAME H5REPACK_DMP-h5dump-${testname}
COMMAND "${CMAKE_COMMAND}"
-D "TEST_PROGRAM=$<TARGET_FILE:h5dump>"
- -D "TEST_ARGS:STRING=-pH;out-${testname}.${resultfile}"
+ -D "TEST_ARGS:STRING=-q;creation_order;-pH;out-${testname}.${resultfile}"
-D "TEST_FOLDER=${PROJECT_BINARY_DIR}/testfiles"
-D "TEST_OUTPUT=${resultfile}-${testname}.out"
-D "TEST_EXPECT=${resultcode}"
@@ -313,6 +423,48 @@
endif ()
endmacro ()
+ macro (ADD_H5_STAT_TEST testname testtype resultcode statarg resultfile)
+ if ("${testtype}" STREQUAL "SKIP")
+ if (NOT HDF5_ENABLE_USING_MEMCHECKER)
+ add_test (
+ NAME H5REPACK_STAT-${testname}-SKIPPED
+ COMMAND ${CMAKE_COMMAND} -E echo "SKIP ${ARGN} ${PROJECT_BINARY_DIR}/testfiles/${resultfile} ${PROJECT_BINARY_DIR}/testfiles/out-${statarg}.${resultfile}"
+ )
+ endif ()
+ else ()
+ add_test (
+ NAME H5REPACK_STAT-${testname}-clear-objects
+ COMMAND ${CMAKE_COMMAND}
+ -E remove
+ testfiles/out-${statarg}.${resultfile}
+ testfiles/${resultfile}-${testname}.out
+ testfiles/${resultfile}-${testname}.out.err
+ )
+ if (NOT "${last_test}" STREQUAL "")
+ set_tests_properties (H5REPACK_STAT-${testname}-clear-objects PROPERTIES DEPENDS ${last_test})
+ endif ()
+ add_test (
+ NAME H5REPACK_STAT-${testname}
+ COMMAND $<TARGET_FILE:h5repack> ${ARGN} ${PROJECT_BINARY_DIR}/testfiles/${resultfile} ${PROJECT_BINARY_DIR}/testfiles/out-${statarg}.${resultfile}
+ )
+ set_tests_properties (H5REPACK_STAT-${testname} PROPERTIES DEPENDS H5REPACK_STAT-${testname}-clear-objects)
+ if (NOT HDF5_ENABLE_USING_MEMCHECKER)
+ add_test (
+ NAME H5REPACK_STAT-h5stat-${testname}
+ COMMAND "${CMAKE_COMMAND}"
+ -D "TEST_PROGRAM=$<TARGET_FILE:h5stat>"
+ -D "TEST_ARGS:STRING=-S;-s;out-${statarg}.${resultfile}"
+ -D "TEST_FOLDER=${PROJECT_BINARY_DIR}/testfiles"
+ -D "TEST_OUTPUT=${resultfile}-${testname}.out"
+ -D "TEST_EXPECT=${resultcode}"
+ -D "TEST_REFERENCE=${statarg}.${resultfile}.ddl"
+ -P "${HDF_RESOURCES_EXT_DIR}/runTest.cmake"
+ )
+ set_tests_properties (H5REPACK_STAT-h5stat-${testname} PROPERTIES DEPENDS "H5REPACK_STAT-${testname}")
+ endif ()
+ endif ()
+ endmacro ()
+
macro (ADD_H5_VERIFY_TEST testname testtype resultcode testfile testdset testfilter)
if ("${testtype}" STREQUAL "SKIP")
if (NOT HDF5_ENABLE_USING_MEMCHECKER)
@@ -324,13 +476,22 @@
else ()
if (NOT HDF5_ENABLE_USING_MEMCHECKER)
add_test (
- NAME H5REPACK_VERIFY_LAYOUT-${testname}
- COMMAND $<TARGET_FILE:h5repack> ${ARGN} ${PROJECT_BINARY_DIR}/testfiles/${testfile} ${PROJECT_BINARY_DIR}/testfiles/out-${testname}.${testfile}
+ NAME H5REPACK_VERIFY_LAYOUT-${testname}-clear-objects
+ COMMAND ${CMAKE_COMMAND}
+ -E remove
+ testfiles/out-${testname}.${testfile}
+ testfiles/${testfile}-${testname}-v.out
+ testfiles/${testfile}-${testname}-v.out.err
)
if (NOT "${last_test}" STREQUAL "")
- set_tests_properties (H5REPACK_VERIFY_LAYOUT-${testname} PROPERTIES DEPENDS ${last_test})
+ set_tests_properties (H5REPACK_VERIFY_LAYOUT-${testname}-clear-objects PROPERTIES DEPENDS ${last_test})
endif ()
add_test (
+ NAME H5REPACK_VERIFY_LAYOUT-${testname}
+ COMMAND $<TARGET_FILE:h5repack> ${ARGN} ${PROJECT_BINARY_DIR}/testfiles/${testfile} ${PROJECT_BINARY_DIR}/testfiles/out-${testname}.${testfile}
+ )
+ set_tests_properties (H5REPACK_VERIFY_LAYOUT-${testname} PROPERTIES DEPENDS H5REPACK_VERIFY_LAYOUT-${testname}-clear-objects)
+ add_test (
NAME H5REPACK_VERIFY_LAYOUT-${testname}_DFF
COMMAND $<TARGET_FILE:h5diff> ${PROJECT_BINARY_DIR}/testfiles/${testfile} ${PROJECT_BINARY_DIR}/testfiles/out-${testname}.${testfile}
)
@@ -387,14 +548,24 @@
endif ()
else ()
if (NOT HDF5_ENABLE_USING_MEMCHECKER)
+ # Remove any output file left over from previous test run
+ add_test (
+ NAME H5REPACK_VERIFY_LAYOUT_VDS-${testname}-clear-objects
+ COMMAND ${CMAKE_COMMAND}
+ -E remove
+ testfiles/out-${testname}.${testfile}
+ testfiles/${testfile}-${testname}-v.out
+ testfiles/${testfile}-${testname}-v.out.err
+ )
+ if (NOT "${last_test}" STREQUAL "")
+ set_tests_properties (H5REPACK_VERIFY_LAYOUT_VDS-${testname}-clear-objects PROPERTIES DEPENDS ${last_test})
+ endif ()
add_test (
NAME H5REPACK_VERIFY_LAYOUT_VDS-${testname}
COMMAND $<TARGET_FILE:h5repack> ${ARGN} ${PROJECT_BINARY_DIR}/testfiles/${testfile} ${PROJECT_BINARY_DIR}/testfiles/out-${testname}.${testfile}
)
set_tests_properties (H5REPACK_VERIFY_LAYOUT_VDS-${testname} PROPERTIES WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles")
- if (NOT "${last_test}" STREQUAL "")
- set_tests_properties (H5REPACK_VERIFY_LAYOUT_VDS-${testname} PROPERTIES DEPENDS ${last_test})
- endif ()
+ set_tests_properties (H5REPACK_VERIFY_LAYOUT_VDS-${testname} PROPERTIES DEPENDS H5REPACK_VERIFY_LAYOUT_VDS-${testname}-clear-objects)
add_test (
NAME H5REPACK_VERIFY_LAYOUT_VDS-${testname}_DMP
COMMAND "${CMAKE_COMMAND}"
@@ -412,15 +583,80 @@
endif ()
endmacro ()
+# VERIFY_SUPERBLOCK
+ macro (ADD_H5_VERIFY_SUPERBLOCK testname testfile lowbound highbound superblock)
+ if (NOT HDF5_ENABLE_USING_MEMCHECKER)
+ add_test (
+ NAME H5REPACK_VERIFY_SUPERBLOCK-${testname}-clear-objects
+ COMMAND ${CMAKE_COMMAND}
+ -E remove
+ testfiles/out-${testname}.${testfile}
+ testfiles/${testfile}-${testname}-v.out
+ testfiles/${testfile}-${testname}-v.out.err
+ )
+ if (NOT "${last_test}" STREQUAL "")
+ set_tests_properties (H5REPACK_VERIFY_SUPERBLOCK-${testname}-clear-objects PROPERTIES DEPENDS ${last_test})
+ endif ()
+ add_test (
+ NAME H5REPACK_VERIFY_SUPERBLOCK-${testname}
+ COMMAND $<TARGET_FILE:h5repack> -j;${lowbound};-k;${highbound} ${PROJECT_BINARY_DIR}/testfiles/${testfile} ${PROJECT_BINARY_DIR}/testfiles/out-${testname}.${testfile}
+ )
+ set_tests_properties (H5REPACK_VERIFY_SUPERBLOCK-${testname} PROPERTIES DEPENDS H5REPACK_VERIFY_SUPERBLOCK-${testname}-clear-objects)
+ add_test (
+ NAME H5REPACK_VERIFY_SUPERBLOCK-${testname}_DMP
+ COMMAND "${CMAKE_COMMAND}"
+ -D "TEST_PROGRAM=$<TARGET_FILE:h5dump>"
+ -D "TEST_ARGS:STRING=-H;-B;out-${testname}.${testfile}"
+ -D "TEST_FOLDER=${PROJECT_BINARY_DIR}/testfiles"
+ -D "TEST_OUTPUT=${testfile}-${testname}-v.out"
+ -D "TEST_EXPECT=${resultcode}"
+ -D "TEST_FILTER:STRING=SUPERBLOCK_VERSION ${superblock}"
+ -D "TEST_REFERENCE=SUPERBLOCK_VERSION ${superblock}"
+ -P "${HDF_RESOURCES_EXT_DIR}/grepTest.cmake"
+ )
+ set_tests_properties (H5REPACK_VERIFY_SUPERBLOCK-${testname}_DMP PROPERTIES DEPENDS H5REPACK_VERIFY_SUPERBLOCK-${testname})
+ endif ()
+ endmacro ()
+
+ macro (ADD_H5_VERIFY_INVALIDBOUNDS testname resultcode lowbound highbound)
+ add_test (
+ NAME ADD_H5_VERIFY_INVALIDBOUNDS-h5repack-${testname}-clear-objects
+ COMMAND ${CMAKE_COMMAND}
+ -E remove
+ testfiles/out-${testname}.${testfile}
+ )
+ if (NOT "${last_test}" STREQUAL "")
+ set_tests_properties (ADD_H5_VERIFY_INVALIDBOUNDS-h5repack-${testname}-clear-objects PROPERTIES DEPENDS ${last_test})
+ endif ()
+ add_test (
+ NAME ADD_H5_VERIFY_INVALIDBOUNDS-h5repack-${testname}
+ COMMAND $<TARGET_FILE:h5repack> -j;${lowbound};-k;${highbound} ${PROJECT_BINARY_DIR}/testfiles/${testfile} ${PROJECT_BINARY_DIR}/testfiles/out-${testname}.${testfile}
+ )
+ set_tests_properties (
+ ADD_H5_VERIFY_INVALIDBOUNDS-h5repack-${testname} PROPERTIES
+ DEPENDS ADD_H5_VERIFY_INVALIDBOUNDS-h5repack-${testname}-clear-objects
+ WILL_FAIL "true"
+ )
+ endmacro ()
+
macro (ADD_H5_TEST_META testname testfile)
+ # Remove any output file left over from previous test run
add_test (
- NAME H5REPACK_META-${testname}_N
- COMMAND $<TARGET_FILE:h5repack> ${PROJECT_BINARY_DIR}/testfiles/${testfile} ${PROJECT_BINARY_DIR}/testfiles/out-${testname}_N.${testname}.h5
+ NAME H5REPACK_META-${testname}_N-clear-objects
+ COMMAND ${CMAKE_COMMAND}
+ -E remove
+ testfiles/out-${testname}_N.${testname}.h5
+ testfiles/out-${testname}_M.${testname}.h5
)
if (NOT "${last_test}" STREQUAL "")
- set_tests_properties (H5REPACK_META-${testname}_N PROPERTIES DEPENDS ${last_test})
+ set_tests_properties (H5REPACK_META-${testname}_N-clear-objects PROPERTIES DEPENDS ${last_test})
endif ()
add_test (
+ NAME H5REPACK_META-${testname}_N
+ COMMAND $<TARGET_FILE:h5repack> ${PROJECT_BINARY_DIR}/testfiles/${testfile} ${PROJECT_BINARY_DIR}/testfiles/out-${testname}_N.${testname}.h5
+ )
+ set_tests_properties (H5REPACK_META-${testname}_N PROPERTIES DEPENDS H5REPACK_META-${testname}_N-clear-objects)
+ add_test (
NAME H5REPACK_META-${testname}_M
COMMAND $<TARGET_FILE:h5repack> ${ARGN} ${PROJECT_BINARY_DIR}/testfiles/${testfile} ${PROJECT_BINARY_DIR}/testfiles/out-${testname}_M.${testname}.h5
)
@@ -435,11 +671,18 @@
if (NOT HDF5_ENABLE_USING_MEMCHECKER)
# Remove any output file left over from previous test run
add_test (
- NAME H5REPACK_UD-${testname}-clearall-objects
+ NAME H5REPACK_UD-${testname}-clear-objects
COMMAND ${CMAKE_COMMAND}
-E remove
testfiles/out-${testname}.${resultfile}
+ testfiles/${testname}.${resultfile}.out
+ testfiles/${testname}.${resultfile}.out.err
+ testfiles/${resultfile}-${testname}.out
+ testfiles/${resultfile}-${testname}.out.err
)
+ if (NOT "${last_test}" STREQUAL "")
+ set_tests_properties (H5REPACK_UD-${testname}-clear-objects PROPERTIES DEPENDS ${last_test})
+ endif ()
add_test (
NAME H5REPACK_UD-${testname}
COMMAND "${CMAKE_COMMAND}"
@@ -454,21 +697,21 @@
-D "TEST_ENV_VALUE=${CMAKE_BINARY_DIR}/plugins"
-P "${HDF_RESOURCES_EXT_DIR}/runTest.cmake"
)
- set_tests_properties (H5REPACK_UD-${testname} PROPERTIES DEPENDS H5REPACK_UD-${testname}-clearall-objects)
+ set_tests_properties (H5REPACK_UD-${testname} PROPERTIES DEPENDS H5REPACK_UD-${testname}-clear-objects)
add_test (
- NAME H5REPACK_UD-h5dump-${testname}
+ NAME H5REPACK_UD-${testname}-h5dump
COMMAND "${CMAKE_COMMAND}"
-D "TEST_PROGRAM=$<TARGET_FILE:h5dump>"
-D "TEST_ARGS:STRING=-pH;out-${testname}.${resultfile}"
-D "TEST_FOLDER=${PROJECT_BINARY_DIR}/testfiles"
-D "TEST_OUTPUT=${resultfile}-${testname}.out"
- -D "TEST_EXPECT=${resultcode}"
+ -D "TEST_EXPECT=0"
-D "TEST_REFERENCE=${resultfile}-${testname}.ddl"
-D "TEST_ENV_VAR=HDF5_PLUGIN_PATH"
-D "TEST_ENV_VALUE=${CMAKE_BINARY_DIR}/plugins"
-P "${HDF_RESOURCES_EXT_DIR}/runTest.cmake"
)
- set_tests_properties (H5REPACK_UD-h5dump-${testname} PROPERTIES DEPENDS "H5REPACK_UD-${testname}")
+ set_tests_properties (H5REPACK_UD-${testname}-h5dump PROPERTIES DEPENDS "H5REPACK_UD-${testname}")
endif ()
endmacro ()
@@ -509,205 +752,182 @@
set (FILEV4 4_vds.h5)
set (FILEV5 5_vds.h5)
- # Remove any output file left over from previous test run
- add_test (
- NAME H5REPACK-clearall-objects
- COMMAND ${CMAKE_COMMAND}
- -E remove
- ./testfiles/h5dump-help.out
- ./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-deflate_limit.out
- ./testfiles/h5repack_layout.h5-deflate_limit.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_chunk_20x10-errstk.out
- ./testfiles/h5repack_layout.h5-dset2_chunk_20x10-errstk.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_layout.h5-plugin_test.out
- ./testfiles/h5repack_layout.h5-plugin_test.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-ckdim_biger-v.out
- ./testfiles/h5repack_layout3.h5-ckdim_biger-v.out.err
- ./testfiles/h5repack_layout3.h5-ckdim_smaller-v.out
- ./testfiles/h5repack_layout3.h5-ckdim_smaller-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-plugin_test.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-ckdim_biger.h5repack_layout3.h5
- ./testfiles/out-ckdim_smaller.h5repack_layout3.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
- ./testfiles/1_vds.h5-vds_dset_chunk20x10x5-v.out
- ./testfiles/1_vds.h5-vds_dset_chunk20x10x5-v.out.err
- ./testfiles/2_vds.h5-vds_chunk3x6x9-v.out
- ./testfiles/2_vds.h5-vds_chunk3x6x9-v.out.err
- ./testfiles/3_1_vds.h5-vds_chunk2x5x8-v.out
- ./testfiles/3_1_vds.h5-vds_chunk2x5x8-v.out.err
- ./testfiles/4_vds.h5-vds_compa-v.out
- ./testfiles/4_vds.h5-vds_compa-v.out.err
- ./testfiles/4_vds.h5-vds_conti-v.out
- ./testfiles/4_vds.h5-vds_conti-v.out.err
- ./testfiles/out-vds_compa.4_vds.h5
- ./testfiles/out-vds_conti.4_vds.h5
- ./testfiles/out-vds_chunk2x5x8.3_1_vds.h5
- ./testfiles/out-vds_chunk3x6x9.2_vds.h5
- ./testfiles/out-vds_dset_chunk20x10x5.1_vds.h5
- 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})
+ if (HDF5_ENABLE_USING_MEMCHECKER)
+ # Remove any output file left over from previous test run
+ set (LIST_TO_CLEAR
+ h5dump-help.out
+ h5repack_layout.h5-chunk_18x13-v.out
+ h5repack_layout.h5-chunk_18x13-v.out.err
+ h5repack_layout.h5-chunk_20x10-v.out
+ h5repack_layout.h5-chunk_20x10-v.out.err
+ h5repack_layout.h5-chunk_compa-v.out
+ h5repack_layout.h5-chunk_compa-v.out.err
+ h5repack_layout.h5-chunk_conti-v.out
+ h5repack_layout.h5-chunk_conti-v.out.err
+ h5repack_layout.h5-compa-v.out
+ h5repack_layout.h5-compa-v.out.err
+ h5repack_layout.h5-conti-v.out
+ h5repack_layout.h5-conti-v.out.err
+ h5repack_layout.h5-deflate_limit.out
+ h5repack_layout.h5-deflate_limit.out.err
+ h5repack_layout.h5-dset2_chunk_20x10-v.out
+ h5repack_layout.h5-dset2_chunk_20x10-v.out.err
+ h5repack_layout.h5-dset2_chunk_20x10-errstk.out
+ h5repack_layout.h5-dset2_chunk_20x10-errstk.out.err
+ h5repack_layout.h5-dset2_compa-v.out
+ h5repack_layout.h5-dset2_compa-v.out.err
+ h5repack_layout.h5-dset2_conti-v.out
+ h5repack_layout.h5-dset2_conti-v.out.err
+ h5repack_layout.h5-dset_compa_chunk-v.out
+ h5repack_layout.h5-dset_compa_chunk-v.out.err
+ h5repack_layout.h5-dset_compa_compa-v.out
+ h5repack_layout.h5-dset_compa_compa-v.out.err
+ h5repack_layout.h5-dset_compa_conti-v.out
+ h5repack_layout.h5-dset_compa_conti-v.out.err
+ h5repack_layout.h5-dset_conti_chunk-v.out
+ h5repack_layout.h5-dset_conti_chunk-v.out.err
+ h5repack_layout.h5-dset_conti_compa-v.out
+ h5repack_layout.h5-dset_conti_compa-v.out.err
+ h5repack_layout.h5-dset_conti_conti-v.out
+ h5repack_layout.h5-dset_conti_conti-v.out.err
+ h5repack_layout.h5-layout_long_switches-v.out
+ h5repack_layout.h5-layout_long_switches-v.out.err
+ h5repack_layout.h5-layout_short_switches-v.out
+ h5repack_layout.h5-layout_short_switches-v.out.err
+ h5repack_layout.h5-plugin_test.out
+ h5repack_layout.h5-plugin_test.out.err
+ h5repack_layout2.h5-contig_small_compa-v.out
+ h5repack_layout2.h5-contig_small_compa-v.out.err
+ h5repack_layout2.h5-contig_small_fixed_compa-v.out
+ h5repack_layout2.h5-contig_small_fixed_compa-v.out.err
+ h5repack_layout3.h5-ckdim_biger-v.out
+ h5repack_layout3.h5-ckdim_biger-v.out.err
+ h5repack_layout3.h5-ckdim_smaller-v.out
+ h5repack_layout3.h5-ckdim_smaller-v.out.err
+ h5repack_layout3.h5-chunk2chunk-v.out
+ h5repack_layout3.h5-chunk2chunk-v.out.err
+ h5repack_layout3.h5-chunk2compa-v.out
+ h5repack_layout3.h5-chunk2compa-v.out.err
+ h5repack_layout3.h5-chunk2conti-v.out
+ h5repack_layout3.h5-chunk2conti-v.out.err
+ h5repack_layout3.h5-error1-v.out
+ h5repack_layout3.h5-error1-v.out.err
+ h5repack_layout3.h5-error2-v.out
+ h5repack_layout3.h5-error2-v.out.err
+ h5repack_layout3.h5-error3-v.out
+ h5repack_layout3.h5-error3-v.out.err
+ out-family.tfamily%05d.h5
+ out-HDFFV-7840.h5diff_attr1.h5
+ out-attr.h5repack_attr.h5
+ out-native_attr.h5repack_attr.h5
+ out-HDFFV-5932.h5repack_attr_refs.h5
+ out-deflate_copy.h5repack_deflate.h5
+ out-deflate_remove.h5repack_deflate.h5
+ out-early.h5repack_early.h5
+ out-fill.h5repack_fill.h5
+ out-native_fill.h5repack_fill.h5
+ out-gzip_verbose_filters.h5repack_filters.h5
+ out-fletcher_copy.h5repack_fletcher.h5
+ out-fletcher_remove.h5repack_fletcher.h5
+ out-hlink.h5repack_hlink.h5
+ out-chunk_18x13.h5repack_layout.h5
+ out-chunk_20x10.h5repack_layout.h5
+ out-chunk_compa.h5repack_layout.h5
+ out-chunk_conti.h5repack_layout.h5
+ out-compa.h5repack_layout.h5
+ out-conti.h5repack_layout.h5
+ out-deflate_file.h5repack_layout.h5
+ out-deflate_limit.h5repack_layout.h5
+ out-dset2_chunk_20x10.h5repack_layout.h5
+ out-dset2_compa.h5repack_layout.h5
+ out-dset2_conti.h5repack_layout.h5
+ out-dset_compa_chunk.h5repack_layout.h5
+ out-dset_compa_compa.h5repack_layout.h5
+ out-dset_compa_conti.h5repack_layout.h5
+ out-dset_conti_chunk.h5repack_layout.h5
+ out-dset_conti_compa.h5repack_layout.h5
+ out-dset_conti_conti.h5repack_layout.h5
+ out-fletcher_all.h5repack_layout.h5
+ out-fletcher_individual.h5repack_layout.h5
+ out-global_filters.h5repack_layout.h5
+ out-gzip_all.h5repack_layout.h5
+ out-gzip_individual.h5repack_layout.h5
+ out-layout.h5repack_layout.h5
+ out-layout_long_switches.h5repack_layout.h5
+ out-layout_short_switches.h5repack_layout.h5
+ out-old_style_layout_short_switches.h5repack_layout.h5
+ out-plugin_test.h5repack_layout.h5
+ out-shuffle_all.h5repack_layout.h5
+ out-shuffle_individual.h5repack_layout.h5
+ out-upgrade_layout.h5repack_layouto.h5
+ out-contig_small_compa.h5repack_layout2.h5
+ out-contig_small_fixed_compa.h5repack_layout2.h5
+ out-ckdim_biger.h5repack_layout3.h5
+ out-ckdim_smaller.h5repack_layout3.h5
+ out-chunk2chunk.h5repack_layout3.h5
+ out-chunk2compa.h5repack_layout3.h5
+ out-chunk2conti.h5repack_layout3.h5
+ out-error1.h5repack_layout3.h5
+ out-error2.h5repack_layout3.h5
+ out-error3.h5repack_layout3.h5
+ out-error4.h5repack_layout3.h5
+ out-committed_dt.h5repack_named_dtypes.h5
+ out-nbit_add.h5repack_nbit.h5
+ out-nbit_copy.h5repack_nbit.h5
+ out-nbit_remove.h5repack_nbit.h5
+ out-add_alignment.h5repack_objs.h5
+ out-add_userblock.h5repack_objs.h5
+ out-objs.h5repack_objs.h5
+ out-gt_mallocsize.h5repack_objs.h5
+ out-bug1814.h5repack_refs.h5
+ out-shuffle_copy.h5repack_shuffle.h5
+ out-shuffle_remove.h5repack_shuffle.h5
+ out-scale_add.h5repack_soffset.h5
+ out-scale_copy.h5repack_soffset.h5
+ out-scale_remove.h5repack_soffset.h5
+ out-meta_short_M.meta_short.h5
+ out-meta_short_N.meta_short.h5
+ out-meta_long_M.meta_long.h5
+ out-meta_long_N.meta_long.h5
+ out-vds_compa.4_vds.h5
+ out-vds_conti.4_vds.h5
+ out-vds_chunk2x5x8.3_1_vds.h5
+ out-vds_chunk3x6x9.2_vds.h5
+ out-vds_dset_chunk20x10x5.1_vds.h5
+ )
+
+ set (LIST_TO_CLEAR ${LIST_TO_CLEAR} ${LIST_OTHER_TEST_FILES})
+
+ foreach (h5_file ${LIST_HDF5_TEST_FILES})
+ get_filename_component(fname "${h5_file}" NAME)
+ set (LIST_TO_CLEAR ${LIST_TO_CLEAR}
+ ${h5_file}.h5
+ )
+ endforeach ()
+
+ foreach (h5_file ${LIST_TST_TEST_FILES})
+ get_filename_component(fname "${h5_file}" NAME)
+ set (LIST_TO_CLEAR ${LIST_TO_CLEAR}
+ ${h5_file}.tst.out
+ ${h5_file}.tst.out.err
+ )
+ endforeach ()
+
+ foreach (h5_file ${LIST_DDL_TEST_FILES})
+ get_filename_component(fname "${h5_file}" NAME)
+ set (LIST_TO_CLEAR ${LIST_TO_CLEAR}
+ ${h5_file}.ddl.out
+ ${h5_file}.ddl.out.err
+ )
+ endforeach ()
+ add_test (
+ NAME H5REPACK-clearall-objects
+ COMMAND ${CMAKE_COMMAND} -E remove ${LIST_TO_CLEAR}
+ )
+ set_tests_properties (H5REPACK-clearall-objects PROPERTIES WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles")
+ if (NOT "${last_test}" STREQUAL "")
+ set_tests_properties (H5REPACK-clearall-objects PROPERTIES DEPENDS ${last_test})
+ endif ()
endif ()
ADD_HELP_TEST(help 0 -h)
@@ -745,17 +965,17 @@
# filters are defined.
# detect whether the encoder is present.
- set (USE_FILTER_SZIP_ENCODER "no")
+# set (USE_FILTER_SZIP_ENCODER 0)
if (HDF5_ENABLE_SZIP_ENCODING)
set (USE_FILTER_SZIP_ENCODER ${testh5repack_detect_szip})
endif ()
if (H5_HAVE_FILTER_DEFLATE)
- set (USE_FILTER_DEFLATE "true")
+ set (USE_FILTER_DEFLATE 1)
endif ()
if (H5_HAVE_FILTER_SZIP)
- set (USE_FILTER_SZIP "true")
+ set (USE_FILTER_SZIP 1)
endif ()
# copy files (these files have no filters)
@@ -794,16 +1014,20 @@
# 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")
+ if (NOT USE_FILTER_SZIP_ENCODER)
+ if (NOT USE_FILTER_SZIP)
+ set (TESTTYPE "SKIP")
+ endif ()
endif ()
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")
+ if (NOT USE_FILTER_SZIP_ENCODER)
+ if (NOT USE_FILTER_SZIP)
+ set (TESTTYPE "SKIP")
+ endif ()
endif ()
ADD_H5_TEST (szip_all ${TESTTYPE} ${arg})
@@ -826,8 +1050,10 @@
# 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_DEFLATE)
- set (TESTTYPE "SKIP")
+ if (NOT USE_FILTER_SZIP_ENCODER)
+ if (NOT USE_FILTER_SZIP OR NOT USE_FILTER_DEFLATE)
+ set (TESTTYPE "SKIP")
+ endif ()
endif ()
ADD_H5_TEST (all_filters ${TESTTYPE} ${arg})
@@ -846,16 +1072,20 @@
# szip copy
set (arg ${FILE7})
set (TESTTYPE "TEST")
- if (NOT USE_FILTER_SZIP_ENCODER OR NOT USE_FILTER_SZIP)
- set (TESTTYPE "SKIP")
+ if (NOT USE_FILTER_SZIP_ENCODER)
+ if (NOT USE_FILTER_SZIP)
+ set (TESTTYPE "SKIP")
+ endif ()
endif ()
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")
+ if (NOT USE_FILTER_SZIP_ENCODER)
+ if (NOT USE_FILTER_SZIP)
+ set (TESTTYPE "SKIP")
+ endif ()
endif ()
ADD_H5_TEST (szip_remove ${TESTTYPE} ${arg})
@@ -918,23 +1148,29 @@
# remove all filters
set (arg ${FILE11} -f NONE)
set (TESTTYPE "TEST")
- if (NOT USE_FILTER_DEFLATE OR NOT USE_FILTER_SZIP OR NOT USE_FILTER_SZIP_ENCODER)
- set (TESTTYPE "SKIP")
+ if (NOT USE_FILTER_SZIP_ENCODER)
+ if (NOT USE_FILTER_SZIP OR NOT USE_FILTER_DEFLATE)
+ set (TESTTYPE "SKIP")
+ endif ()
endif ()
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")
+ if (NOT USE_FILTER_SZIP_ENCODER)
+ if (NOT USE_FILTER_SZIP OR NOT USE_FILTER_DEFLATE)
+ set (TESTTYPE "SKIP")
+ endif ()
endif ()
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")
+ if (NOT USE_FILTER_SZIP_ENCODER)
+ if (NOT USE_FILTER_SZIP OR NOT USE_FILTER_DEFLATE)
+ set (TESTTYPE "SKIP")
+ endif ()
endif ()
ADD_H5_TEST (szip_convert ${TESTTYPE} ${arg})
@@ -954,6 +1190,53 @@
endif ()
ADD_H5_TEST (deflate_file ${TESTTYPE} ${arg})
+#crtorder
+ set (arg tordergr.h5 -L)
+ set (TESTTYPE "TEST")
+ ADD_H5_DMP_TEST (crtorder ${TESTTYPE} 0 ${arg})
+
+###################################################################################################
+# Testing paged aggregation related options:
+# -G pagesize
+# -P 1 or 0
+# -S strategy
+# -T threshold
+#
+# The testfiles used are generated by test/gen_filespace.c and the file names are prepended with "h5repack_":
+# (1) "fsm_aggr_nopersist.h5" /* H5F_FSPACE_STRATEGY_FSM_AGGR + not persisting free-space */
+# (2) "fsm_aggr_persist.h5" /* H5F_FSPACE_STRATEGY_FSM_AGGR + persisting free-space */
+# (3) "paged_nopersist.h5" /* H5F_FSPACE_STRATEGY_PAGE + not persisting free-space */
+# (4) "paged_persist.h5" /* H5F_FSPACE_STRATEGY_PAGE + persisting free-space */
+# (5) "aggr.h5" /* H5F_FSPACE_STRATEGY_AGGR */
+# (6) "none.h5" /* H5F_FSPACE_STRATEGY_NONE */
+#
+#####################################################################################################
+#
+ set (arg h5repack_fsm_aggr_nopersist.h5 -S PAGE -P 1)
+ set (TESTTYPE "TEST")
+ ADD_H5_STAT_TEST (SP_PAGE ${TESTTYPE} 0 SP ${arg})
+
+ set (arg h5repack_fsm_aggr_persist.h5 -S AGGR)
+ set (TESTTYPE "TEST")
+ ADD_H5_STAT_TEST (S_AGGR ${TESTTYPE} 0 S ${arg})
+
+ set (arg h5repack_none.h5 -S PAGE -T 10 -G 2048)
+ set (TESTTYPE "TEST")
+ ADD_H5_STAT_TEST (STG_PAGE ${TESTTYPE} 0 STG ${arg})
+
+ set (arg h5repack_paged_nopersist.h5 -G 512 -S AGGR)
+ set (TESTTYPE "TEST")
+ ADD_H5_STAT_TEST (GS_AGGR ${TESTTYPE} 0 GS ${arg})
+
+ set (arg h5repack_paged_persist.h5 -S NONE -P 1)
+ set (TESTTYPE "TEST")
+ ADD_H5_STAT_TEST (SP_NONE ${TESTTYPE} 0 SP ${arg})
+
+ set (arg h5repack_aggr.h5 -S FSM_AGGR -P 1 -T 5)
+ set (TESTTYPE "TEST")
+ ADD_H5_STAT_TEST (SPT_FSM_AGGR ${TESTTYPE} 0 SPT ${arg})
+
+
#########################################################
# layout options (these files have no filters)
#########################################################
@@ -1145,17 +1428,25 @@
ADD_H5_VERIFY_VDS (vds_conti ${TESTTYPE} 0 ${FILEV4} vds_dset CONTIGUOUS -l vds_dset:CONTI)
##############################################################################
+### V E R S I O N B O U N D S T E S T S
+##############################################################################
+# -j 0 -k 2, superblock will be 0
+ADD_H5_VERIFY_SUPERBLOCK (SB_IS_0 h5repack_layout.h5 0 2 0)
+# -j 1 -k 2, superblock will be 2
+ADD_H5_VERIFY_SUPERBLOCK (SB_IS_2 h5repack_layout.h5 1 2 2)
+# -j 2 -k 2, superblock will be 3
+ADD_H5_VERIFY_SUPERBLOCK (SB_IS_3 h5repack_layout.h5 2 2 3)
+# -j 0 -k 1, file cannot be opened
+ADD_H5_VERIFY_INVALIDBOUNDS (latest_latest_invalid bounds_latest_latest.h5 0 1)
+
+##############################################################################
### P L U G I N T E S T S
##############################################################################
- ADD_H5_UD_TEST (plugin_version_test 0 h5repack_layout.h5 -v -f UD=260,4,9,${H5_VERS_MAJOR},${H5_VERS_MINOR},${H5_VERS_RELEASE})
- ADD_H5_UD_TEST (plugin_test 0 h5repack_layout.h5 -v -f UD=257,1,9)
+ ADD_H5_UD_TEST (plugin_version_test 0 h5repack_layout.h5 -v -f UD=260,0,4,9,${H5_VERS_MAJOR},${H5_VERS_MINOR},${H5_VERS_RELEASE})
+ ADD_H5_UD_TEST (plugin_test 0 h5repack_layout.h5 -v -f UD=257,0,1,9)
ADD_H5_UD_TEST (plugin_none 0 h5repack_layout.UD.h5 -v -f NONE)
# check for no parameters
- set (TESTRETVAL 255)
- if (WIN32)
- set (TESTRETVAL -1)
- endif ()
- ADD_H5_CMP_TEST (plugin_zero "" "TEST" ${TESTRETVAL} h5repack_layout.h5 -v -f UD=250,0)
+ ADD_H5_UD_TEST (plugin_zero 0 h5repack_layout.h5 -v -f UD=250,0,0)
if (HDF5_TEST_VFD)
# Run test with different Virtual File Driver
diff --git a/tools/test/h5repack/Makefile.am b/tools/test/h5repack/Makefile.am
index 5c284b3..ce7cad4 100644
--- a/tools/test/h5repack/Makefile.am
+++ b/tools/test/h5repack/Makefile.am
@@ -5,12 +5,10 @@
#
# 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.
+# the COPYING file, which can be found at the root of the source code
+# distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases.
+# If you do not have access to either file, you may request a copy from
+# help@hdfgroup.org.
##
## Makefile.am
## Run automake to generate a Makefile.in from this file.
@@ -47,14 +45,14 @@ h5repacktst_SOURCES=h5repacktst.c
if HAVE_SHARED_CONDITIONAL
# Build it as shared library if configure is enabled for shared library.
- lib_LTLIBRARIES=libdynlibadd.la libdynlibvers.la
+ noinst_LTLIBRARIES=libdynlibadd.la libdynlibvers.la
libdynlibadd_la_SOURCES=dynlib_rpk.c
libdynlibvers_la_SOURCES=dynlib_vrpk.c
-
-install-exec-hook:
- $(RM) $(DESTDIR)$(libdir)/*dynlib*
+ libdynlibadd_la_LDFLAGS=$(AM_LDFLAGS) -avoid-version -module -shared -export-dynamic -rpath /nowhere
+ libdynlibvers_la_LDFLAGS=$(AM_LDFLAGS) -avoid-version -module -shared -export-dynamic -rpath /nowhere
endif
+
# Temporary files. *.h5 are generated by h5repack. They should
# copied to the testfiles/ directory if update is required.
CHECK_CLEANFILES+=*.h5 *.bin testfiles/h5diff_attr1.h5 testfiles/tfamily*.h5
diff --git a/tools/test/h5repack/dynlib_rpk.c b/tools/test/h5repack/dynlib_rpk.c
index 3469e58..29c3eae 100644
--- a/tools/test/h5repack/dynlib_rpk.c
+++ b/tools/test/h5repack/dynlib_rpk.c
@@ -4,12 +4,10 @@
* *
* 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 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. *
+ * the COPYING file, which can be found at the root of the source code *
+ * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
+ * If you do not have access to either file, you may request a copy from *
+ * help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/*
* Programmer: Raymond Lu
diff --git a/tools/test/h5repack/dynlib_vrpk.c b/tools/test/h5repack/dynlib_vrpk.c
index 8da0270..06d90ff 100644
--- a/tools/test/h5repack/dynlib_vrpk.c
+++ b/tools/test/h5repack/dynlib_vrpk.c
@@ -4,12 +4,10 @@
* *
* 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 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. *
+ * the COPYING file, which can be found at the root of the source code *
+ * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
+ * If you do not have access to either file, you may request a copy from *
+ * help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/*
* Purpose: Tests the plugin module (H5PL)
diff --git a/tools/test/h5repack/h5repack.sh.in b/tools/test/h5repack/h5repack.sh.in
index 23e0663..b0a2f99 100644
--- a/tools/test/h5repack/h5repack.sh.in
+++ b/tools/test/h5repack/h5repack.sh.in
@@ -6,12 +6,10 @@
#
# 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.
+# the COPYING file, which can be found at the root of the source code
+# distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases.
+# If you do not have access to either file, you may request a copy from
+# help@hdfgroup.org.
#
# Tests for the h5repack tool
#
@@ -38,6 +36,9 @@ H5DIFF_BIN=`pwd`/$H5DIFF # The path of the h5diff tool binary
H5DUMP=../../src/h5dump/h5dump # The h5dump tool name
H5DUMP_BIN=`pwd`/$H5DUMP # The path of the h5dump tool binary
+H5STAT=../../src/h5stat/h5stat # The h5stat tool name
+H5STAT_BIN=`pwd`/$H5STAT # The path of the h5stat tool binary
+
RM='rm -rf'
CMP='cmp'
DIFF='diff -c'
@@ -81,6 +82,7 @@ test -d $TESTDIR || mkdir $TESTDIR
# Comment '#' without space can be used.
# --------------------------------------------------------------------
LIST_HDF5_TEST_FILES="
+$SRC_H5REPACK_TESTFILES/bounds_latest_latest.h5
$SRC_H5REPACK_TESTFILES/h5repack_attr.h5
$SRC_H5REPACK_TESTFILES/h5repack_attr_refs.h5
$SRC_H5REPACK_TESTFILES/h5repack_deflate.h5
@@ -103,6 +105,12 @@ $SRC_H5REPACK_TESTFILES/h5repack_refs.h5
$SRC_H5REPACK_TESTFILES/h5repack_shuffle.h5
$SRC_H5REPACK_TESTFILES/h5repack_soffset.h5
$SRC_H5REPACK_TESTFILES/h5repack_szip.h5
+$SRC_H5REPACK_TESTFILES/h5repack_aggr.h5
+$SRC_H5REPACK_TESTFILES/h5repack_fsm_aggr_nopersist.h5
+$SRC_H5REPACK_TESTFILES/h5repack_fsm_aggr_persist.h5
+$SRC_H5REPACK_TESTFILES/h5repack_none.h5
+$SRC_H5REPACK_TESTFILES/h5repack_paged_nopersist.h5
+$SRC_H5REPACK_TESTFILES/h5repack_paged_persist.h5
$SRC_H5DIFF_TESTFILES/h5diff_attr1.h5
$SRC_TOOLS_TESTFILES/tfamily00000.h5
$SRC_TOOLS_TESTFILES/tfamily00001.h5
@@ -115,6 +123,7 @@ $SRC_TOOLS_TESTFILES/tfamily00007.h5
$SRC_TOOLS_TESTFILES/tfamily00008.h5
$SRC_TOOLS_TESTFILES/tfamily00009.h5
$SRC_TOOLS_TESTFILES/tfamily00010.h5
+$SRC_TOOLS_TESTFILES/tordergr.h5
$SRC_TOOLS_TESTFILES/vds/1_a.h5
$SRC_TOOLS_TESTFILES/vds/1_b.h5
$SRC_TOOLS_TESTFILES/vds/1_c.h5
@@ -145,6 +154,7 @@ $SRC_H5REPACK_TESTFILES/h5repack-help.txt
$SRC_H5REPACK_TESTFILES/h5repack_ext.bin
$SRC_H5REPACK_TESTFILES/ublock.bin
$SRC_H5REPACK_TESTFILES/h5repack.info
+$SRC_H5REPACK_TESTFILES/crtorder.tordergr.h5.ddl
$SRC_H5REPACK_TESTFILES/deflate_limit.h5repack_layout.h5.ddl
$SRC_H5REPACK_TESTFILES/h5repack_layout.h5.ddl
$SRC_H5REPACK_TESTFILES/h5repack_filters.h5-gzip_verbose_filters.tst
@@ -156,6 +166,12 @@ $SRC_H5REPACK_TESTFILES/2_vds.h5-vds_chunk3x6x9-v.ddl
$SRC_H5REPACK_TESTFILES/3_1_vds.h5-vds_chunk2x5x8-v.ddl
$SRC_H5REPACK_TESTFILES/4_vds.h5-vds_compa-v.ddl
$SRC_H5REPACK_TESTFILES/4_vds.h5-vds_conti-v.ddl
+$SRC_H5REPACK_TESTFILES/SP.h5repack_fsm_aggr_nopersist.h5.ddl
+$SRC_H5REPACK_TESTFILES/S.h5repack_fsm_aggr_persist.h5.ddl
+$SRC_H5REPACK_TESTFILES/STG.h5repack_none.h5.ddl
+$SRC_H5REPACK_TESTFILES/GS.h5repack_paged_nopersist.h5.ddl
+$SRC_H5REPACK_TESTFILES/SP.h5repack_paged_persist.h5.ddl
+$SRC_H5REPACK_TESTFILES/SPT.h5repack_aggr.h5.ddl
"
#
@@ -179,7 +195,7 @@ COPY_TESTFILES_TO_TESTDIR()
INODE_SDIR=`$LS -i -d $SDIR | $AWK -F' ' '{print $1}'`
INODE_DDIR=`$LS -i -d $TESTDIR | $AWK -F' ' '{print $1}'`
if [ "$INODE_SDIR" != "$INODE_DDIR" ]; then
- $CP -f $tstfile $TESTDIR
+ $CP -f $tstfile $TESTDIR
if [ $? -ne 0 ]; then
echo "Error: FAILED to copy $tstfile ."
@@ -325,8 +341,8 @@ VERIFY_LAYOUT_DSET()
fi
# clean up tmp files
- rm -f $outfile
- rm -f $layoutfile
+# rm -f $outfile
+# rm -f $layoutfile
}
#------------------------------------------
@@ -375,6 +391,8 @@ VERIFY_LAYOUT_VDS()
# Create the expect file if it doesn't yet exist.
echo " CREATED"
cp $actual $expect
+ echo " Expected result (*.ddl) missing"
+ nerrors="`expr $nerrors + 1`"
elif $CMP $expect $actual > /dev/null 2>&1 ; then
echo " PASSED"
else
@@ -386,7 +404,7 @@ VERIFY_LAYOUT_VDS()
# Clean up output file
if test -z "$HDF5_NOCLEANUP"; then
- rm -f $actual $actual_err
+ rm -f $actual $actual_err
fi
# clean up tmp files
@@ -496,6 +514,87 @@ VERIFY_LAYOUT_ALL()
rm -f $layoutfile
}
+#--------------------------------------------------------------
+# Verifying superblock of a file with different version bounds
+VERIFY_SUPERBLOCK()
+{
+ lowbound=$1
+ highbound=$2
+ superblock=$3
+ infile=$4
+ layoutfile=verbounds-low$lowbound-high$highbound.$4
+ outfile=out-verbounds-low$lowbound-high$highbound.$infile
+ expectedsuperblock="SUPERBLOCK_VERSION $superblock"
+
+ shift
+ shift
+ shift
+ shift
+
+ TESTING $H5REPACK $@
+ (
+ cd $TESTDIR
+ $RUNSERIAL $H5REPACK_BIN -j $lowbound -k $highbound $infile $outfile
+ )
+ RET=$?
+ if [ $RET != 0 ] ; then
+ echo "*FAILED*"
+ nerrors="`expr $nerrors + 1`"
+ else
+ echo " PASSED"
+ DIFFTEST $infile $outfile
+ fi
+
+ #---------------------------------
+ # check the layout from a dataset
+ VERIFY "superblock"
+ (
+ cd $TESTDIR
+ $RUNSERIAL $H5DUMP_BIN -H -B $outfile > $layoutfile
+ )
+ $GREP "$expectedsuperblock" $TESTDIR/$layoutfile > /dev/null
+ if [ $? -eq 0 ]; then
+ echo " PASSED"
+ else
+ echo " FAILED"
+ nerrors="`expr $nerrors + 1`"
+ fi
+
+ # clean up tmp files
+ rm -f $outfile
+ rm -f $layoutfile
+
+} # end of VERIFY_SUPERBLOCK
+
+#------------------------------------------------------------------
+# Verifying that a latest file cannot be opened with earlier bounds
+VERIFY_INVALIDBOUNDS()
+{
+ lowbound=$1
+ highbound=$2
+ infile=$3
+ outfile=out-verbounds-low$lowbound-high$highbound.$infile
+
+ #--------------------------------------
+ # check for failure with invalid bounds
+ TESTING $H5REPACK $@
+ (
+ cd $TESTDIR
+ $RUNSERIAL $H5REPACK_BIN -j $lowbound -k $highbound $infile $outfile
+ )
+ RET=$?
+ if [ $RET != 0 ] ; then
+ echo " PASSED"
+ else
+ echo "*FAILED*"
+ nerrors="`expr $nerrors + 1`"
+ fi
+
+ # clean up tmp files
+ rm -f $outfile
+
+} # end of VERIFY_INVALIDBOUNDS
+
# same as TOOLTEST, but it uses the old syntax -i input_file -o output_file
#
TOOLTEST0()
@@ -541,11 +640,11 @@ TOOLTEST1()
)
RET=$?
if [ $RET != 0 ] ; then
- echo "*FAILED*"
- nerrors="`expr $nerrors + 1`"
+ echo "*FAILED*"
+ nerrors="`expr $nerrors + 1`"
else
- echo " PASSED"
- DIFFTEST $infile $outfile
+ echo " PASSED"
+ DIFFTEST $infile $outfile
fi
rm -f $outfile
}
@@ -572,11 +671,11 @@ TOOLTESTV()
) >$actual 2>$actual_err
RET=$?
if [ $RET != 0 ] ; then
- echo "*FAILED*"
- nerrors="`expr $nerrors + 1`"
+ echo "*FAILED*"
+ nerrors="`expr $nerrors + 1`"
else
- echo " PASSED"
- DIFFTEST $infile $outfile
+ echo " PASSED"
+ DIFFTEST $infile $outfile
fi
# display output compare
@@ -637,6 +736,8 @@ TOOLTESTM() {
# Create the expect file if it doesn't yet exist.
echo " CREATED"
cp $actual $expect
+ echo " Expected result (*.tst) missing"
+ nerrors="`expr $nerrors + 1`"
elif $CMP $expect $actual; then
echo " PASSED"
else
@@ -648,7 +749,7 @@ TOOLTESTM() {
# Clean up output file
if test -z "$HDF5_NOCLEANUP"; then
- rm -f $actual $actual_err $actual_sav $actual_err_sav
+ rm -f $actual $actual_err $actual_sav $actual_err_sav
fi
}
@@ -682,7 +783,59 @@ TOOLTEST_DUMP()
VERIFY h5dump output $@
(
cd $TESTDIR
- $RUNSERIAL $H5DUMP_BIN -pH $outfile
+ $RUNSERIAL $H5DUMP_BIN -q creation_order -pH $outfile
+ ) >$actual 2>$actual_err
+ cat $actual_err >> $actual
+
+ RET=$?
+
+ fi
+
+ if cmp -s $expect $actual; then
+ echo " PASSED"
+ else
+ echo "*FAILED*"
+ echo " Expected result (*.ddl) differs from actual result (*.out)"
+ nerrors="`expr $nerrors + 1`"
+ test yes = "$verbose" && diff -c $expect $actual |sed 's/^/ /'
+ fi
+
+ rm -f $actual $actual_err
+ rm -f $outfile
+}
+
+# This is similar to TOOLTEST_DUMP().
+# Test h5repack with options added for paged aggregation.
+# h5stat is used on the repacked file and the expected output
+# is compared for correctness.
+#
+TOOLTEST_STAT()
+{
+ infile=$2
+ outfile=out-$1.$2
+ expect="$TESTDIR/$1.$2.ddl"
+ actual="$TESTDIR/out-$1.$2.out"
+ actual_err="$TESTDIR/out-$1.$2.err"
+
+ shift
+ shift
+
+ # Run test.
+ TESTING $H5REPACK $@
+ (
+ cd $TESTDIR
+ $RUNSERIAL $H5REPACK_BIN "$@" $infile $outfile
+ ) >$actual 2>$actual_err
+ RET=$?
+ if [ $RET != 0 ] ; then
+ echo "*FAILED*"
+ nerrors="`expr $nerrors + 1`"
+ else
+ echo " PASSED"
+ VERIFY h5stat output $@
+ (
+ cd $TESTDIR
+ $RUNSERIAL $H5STAT_BIN -S -s $outfile
) >$actual 2>$actual_err
cat $actual_err >> $actual
@@ -762,11 +915,11 @@ TOOLTEST_META()
# verify sizes.
MESSAGE "Verify the sizes of both output files ($size1 vs $size2)"
if [ $size1 -lt $size2 ]; then
- # pass
- echo " PASSED"
+ # pass
+ echo " PASSED"
else
- #fail
- echo "*FAILED*"
+ #fail
+ echo "*FAILED*"
nerrors="`expr $nerrors + 1`"
fi
@@ -793,6 +946,8 @@ TOOLTEST_HELP() {
# Create the expect data file if it doesn't yet exist.
echo " CREATED"
cp $actual $expect-CREATED
+ echo " Expected result (*.txt) missing"
+ nerrors="`expr $nerrors + 1`"
elif cmp -s $expect $actual; then
echo " PASSED"
else
@@ -840,7 +995,7 @@ USE_FILTER_SZIP_ENCODER=`$RUNSERIAL $H5DETECTSZIP_BIN`
fi
##############################################################################
-### T H E T E S T S
+### T H E T E S T S
##############################################################################
# prepare for test
COPY_TESTFILES_TO_TESTDIR
@@ -1047,6 +1202,46 @@ else
TOOLTEST deflate_file $arg
fi
+#crtorder
+arg="tordergr.h5 -L"
+TOOLTEST_DUMP crtorder $arg
+
+###################################################################################################
+# Testing paged aggregation related options:
+# -G pagesize
+# -P 1 or 0
+# -S strategy
+# -T threshold
+#
+# The testfiles used are generated by test/gen_filespace.c and the file names are prepended with "h5repack_":
+# (1) "fsm_aggr_nopersist.h5" /* H5F_FSPACE_STRATEGY_FSM_AGGR + not persisting free-space */
+# (2) "fsm_aggr_persist.h5" /* H5F_FSPACE_STRATEGY_FSM_AGGR + persisting free-space */
+# (3) "paged_nopersist.h5" /* H5F_FSPACE_STRATEGY_PAGE + not persisting free-space */
+# (4) "paged_persist.h5" /* H5F_FSPACE_STRATEGY_PAGE + persisting free-space */
+# (5) "aggr.h5" /* H5F_FSPACE_STRATEGY_AGGR */
+# (6) "none.h5" /* H5F_FSPACE_STRATEGY_NONE */
+#
+#####################################################################################################
+#
+arg="h5repack_fsm_aggr_nopersist.h5 -S PAGE -P 1"
+TOOLTEST_STAT SP $arg
+#
+arg="h5repack_fsm_aggr_persist.h5 -S AGGR"
+TOOLTEST_STAT S $arg
+#
+arg="h5repack_none.h5 -S PAGE -T 10 -G 2048"
+TOOLTEST_STAT STG $arg
+#
+arg="h5repack_paged_nopersist.h5 -G 512 -S AGGR"
+TOOLTEST_STAT GS $arg
+#
+arg="h5repack_paged_persist.h5 -S NONE -P 1"
+TOOLTEST_STAT SP $arg
+#
+arg="h5repack_aggr.h5 -S FSM_AGGR -P 1 -T 5"
+TOOLTEST_STAT SPT $arg
+
+
#########################################################
# layout options (these files have no filters)
#########################################################
@@ -1225,7 +1420,7 @@ TOOLTEST_META meta_long h5repack_layout.h5 --metadata_block_size=8192
if test $USE_FILTER_DEFLATE != "yes" ; then
SKIP vds_dset_chunk_20x10x5
else
- VERIFY_LAYOUT_VDS vds_dset_chunk_20x10x5 1_vds.h5 vds_dset CHUNKED --layout vds_dset:CHUNK=20x10x5
+ VERIFY_LAYOUT_VDS vds_dset_chunk20x10x5 1_vds.h5 vds_dset CHUNKED --layout vds_dset:CHUNK=20x10x5
fi
if test $USE_FILTER_DEFLATE != "yes" ; then
@@ -1252,6 +1447,18 @@ else
VERIFY_LAYOUT_VDS vds_conti 4_vds.h5 vds_dset CONTIGUOUS -l vds_dset:CONTI
fi
+#########################################################
+# Testing version bounds
+#########################################################
+# -j 0 -k 2, superblock will be 0
+VERIFY_SUPERBLOCK 0 2 0 h5repack_layout.h5 -j 0 -k 2 h5repack_layout.h5
+# -j 1 -k 2, superblock will be 2
+VERIFY_SUPERBLOCK 1 2 2 h5repack_layout.h5 -j 1 -k 2 h5repack_layout.h5
+# -j 2 -k 2, superblock will be 3
+VERIFY_SUPERBLOCK 2 2 3 h5repack_layout.h5 -j 2 -k 2 h5repack_layout.h5
+# -j 0 -k 1, file cannot be opened
+VERIFY_INVALIDBOUNDS 0 1 bounds_latest_latest.h5
+
# Clean up temporary files/directories
CLEAN_TESTFILES_AND_TESTDIR
diff --git a/tools/test/h5repack/h5repack_plugin.sh.in b/tools/test/h5repack/h5repack_plugin.sh.in
index 0b28f78..5efd9e8 100644
--- a/tools/test/h5repack/h5repack_plugin.sh.in
+++ b/tools/test/h5repack/h5repack_plugin.sh.in
@@ -1,16 +1,14 @@
#! /bin/sh
#
-# Copyright by The HDF Group.
-# All rights reserved.
-#
-# This file is part of HDF5. The full HDF5 copyright notice, including
-# terms governing use, modification, and redistribution, is contained in
-# the 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 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.
+# Copyright by The HDF Group.
+# All rights reserved.
+#
+# This file is part of HDF5. The full HDF5 copyright notice, including
+# terms governing use, modification, and redistribution, is contained in
+# the COPYING file, which can be found at the root of the source code
+# distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases.
+# If you do not have access to either file, you may request a copy from
+# help@hdfgroup.org.
#
srcdir=@srcdir@
TOP_BUILDDIR=@top_builddir@
@@ -249,10 +247,10 @@ COPY_TESTFILES_TO_TESTDIR
version_str=`echo @H5_VERSION@ | awk -F"-" '{print $1}' | sed 's/\./,/g'`
# Run the test
-arg="h5repack_layout.h5 -v -f UD=260,4,9,$version_str"
+arg="h5repack_layout.h5 -v -f UD=260,0,4,9,$version_str"
TOOLTEST_DUMP plugin_version_test $arg
-arg="h5repack_layout.h5 -v -f UD=257,1,9"
+arg="h5repack_layout.h5 -v -f UD=257,0,1,9"
TOOLTEST_DUMP plugin_test $arg
#arg="h5repack_layout.UD.h5 -v -f NONE"
diff --git a/tools/test/h5repack/h5repacktst.c b/tools/test/h5repack/h5repacktst.c
index 69e576d..f6166da 100644
--- a/tools/test/h5repack/h5repacktst.c
+++ b/tools/test/h5repack/h5repacktst.c
@@ -1,17 +1,15 @@
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
-* 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. *
-* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
+ * Copyright by The HDF Group. *
+ * Copyright by the Board of Trustees of the University of Illinois. *
+ * All rights reserved. *
+ * *
+ * This file is part of HDF5. The full HDF5 copyright notice, including *
+ * terms governing use, modification, and redistribution, is contained in *
+ * the COPYING file, which can be found at the root of the source code *
+ * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
+ * If you do not have access to either file, you may request a copy from *
+ * help@hdfgroup.org. *
+ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
#include "h5repack.h"
#include "h5test.h"
@@ -80,15 +78,15 @@
#define FNAME18 "h5repack_layout2.h5"
/* Files for testing file space paging */
-#define FSPACE_OUT "h5repack_fspace_OUT.h5" /* The output file */
+#define FSPACE_OUT "h5repack_fspace_OUT.h5" /* The output file */
#define NELMTS(X) (sizeof(X)/sizeof(X[0])) /* # of elements */
const char *H5REPACK_FSPACE_FNAMES[] = {
"h5repack_latest.h5", /* 0 */
"h5repack_default.h5", /* 1 */
- "h5repack_page_persist.h5", /* 2 */
- "h5repack_fsm_aggr_persist.h5", /* 3 */
+ "h5repack_page_persist.h5", /* 2 */
+ "h5repack_fsm_aggr_persist.h5", /* 3 */
"h5repack_page_threshold.h5", /* 4 */
- "h5repack_fsm_aggr_threshold.h5", /* 5 */
+ "h5repack_fsm_aggr_threshold.h5", /* 5 */
"h5repack_aggr.h5", /* 6 */
"h5repack_none.h5" /* 7 */
};
@@ -128,9 +126,9 @@ const char *H5REPACK_FILENAMES[] = {
#define REG_REF_DS1 "Dset_REGREF"
/*-------------------------------------------------------------------------
-* prototypes
-*-------------------------------------------------------------------------
-*/
+ * prototypes
+ *-------------------------------------------------------------------------
+ */
static int make_all_objects(hid_t loc_id);
static int make_attributes(hid_t loc_id);
static int make_hlinks(hid_t loc_id);
@@ -166,31 +164,27 @@ static int make_complex_attr_references(hid_t loc_id);
/*-------------------------------------------------------------------------
-* Function: main
-*
-* Purpose: Executes h5repack tests
-*
-* Return: Success: zero
-* Failure: 1
-*
-* Programmer: Pedro Vicente <pvn@ncsa.uiuc.edu>
-* January, 6, 2004
-*
-*-------------------------------------------------------------------------
-*/
+ * Function: main
+ *
+ * Purpose: Executes h5repack tests
+ *
+ * Return: Success: zero
+ * Failure: 1
+ *-------------------------------------------------------------------------
+ */
int main (void)
{
pack_opt_t pack_options;
diff_opt_t diff_options;
- unsigned j; /* Local index variable for testing file space */
- const char *fname; /* File name for testing file space */
+ unsigned j; /* Local index variable for testing file space */
+ const char *fname; /* File name for testing file space */
- h5_stat_t file_stat;
- h5_stat_size_t fsize1, fsize2; /* file sizes */
+ h5_stat_t file_stat;
+ h5_stat_size_t fsize1, fsize2; /* file sizes */
#if defined (H5_HAVE_FILTER_SZIP)
- int szip_can_encode = 0;
+ int szip_can_encode = 0;
#endif
h5tools_setprogname(PROGRAMNAME);
@@ -213,28 +207,28 @@ int main (void)
PASSED();
/*-------------------------------------------------------------------------
- * Format of the tests:
- *
- * 1) make a copy of the file with h5repack
- * 2) use the h5diff function to compare the input and output file
- *-------------------------------------------------------------------------
- */
+ * Format of the tests:
+ *
+ * 1) make a copy of the file with h5repack
+ * 2) use the h5diff function to compare the input and output file
+ *-------------------------------------------------------------------------
+ */
/*-------------------------------------------------------------------------
- * Testing file space info setting
- *-------------------------------------------------------------------------
- */
+ * Testing file space info setting
+ *-------------------------------------------------------------------------
+ */
TESTING(" files with file space info setting--no options (-S, -P, -T, -G) are set");
- j = 0; /* #0 */
+ j = 0; /* #0 */
HDassert(j < NELMTS(H5REPACK_FSPACE_FNAMES));
fname = H5REPACK_FSPACE_FNAMES[j];
if(h5repack_init(&pack_options, 0, FALSE) < 0)
GOERROR;
-
+
if(h5repack(fname, FSPACE_OUT, &pack_options) < 0)
GOERROR;
if(h5diff(fname, FSPACE_OUT, NULL, NULL, &diff_options) > 0)
GOERROR;
- if(h5repack_verify(fname, FSPACE_OUT, &pack_options)<=0)
+ if(h5repack_verify(fname, FSPACE_OUT, &pack_options) <= 0)
GOERROR;
if(h5repack_end(&pack_options) < 0)
GOERROR;
@@ -242,20 +236,20 @@ int main (void)
TESTING(" files with file space info setting--all options -S, -P, -T, -G are set");
- ++j; /* #1 */
+ ++j; /* #1 */
HDassert(j < NELMTS(H5REPACK_FSPACE_FNAMES));
- fname = H5REPACK_FSPACE_FNAMES[j];
+ fname = H5REPACK_FSPACE_FNAMES[j];
if(h5repack_init(&pack_options, 0, FALSE) < 0)
GOERROR;
pack_options.fs_strategy = H5F_FSPACE_STRATEGY_NONE;
pack_options.fs_persist = -1; /* "FALSE" is set via -P 0 */
- pack_options.fs_threshold = 1;
+ pack_options.fs_threshold = 1;
pack_options.fs_pagesize = 8192;
if(h5repack(fname, FSPACE_OUT, &pack_options) < 0)
GOERROR;
if(h5diff(fname, FSPACE_OUT, NULL, NULL, &diff_options) > 0)
GOERROR;
- if(h5repack_verify(fname, FSPACE_OUT, &pack_options)<=0)
+ if(h5repack_verify(fname, FSPACE_OUT, &pack_options) <= 0)
GOERROR;
if(h5repack_end(&pack_options) < 0)
GOERROR;
@@ -263,18 +257,18 @@ int main (void)
TESTING(" files with file space info setting--options -S and -T are set");
- ++j; /* #2 */
+ ++j; /* #2 */
HDassert(j < NELMTS(H5REPACK_FSPACE_FNAMES));
fname = H5REPACK_FSPACE_FNAMES[j];
if(h5repack_init(&pack_options, 0, FALSE) < 0)
GOERROR;
- pack_options.fs_strategy = -1; /* "FSM_AGGR" specified via -S FSM_AGGR */
- pack_options.fs_threshold = -1; /* "0" specified via -T 0 */
+ pack_options.fs_strategy = (H5F_fspace_strategy_t)-1; /* "FSM_AGGR" specified via -S FSM_AGGR */
+ pack_options.fs_threshold = -1; /* "0" specified via -T 0 */
if(h5repack(fname, FSPACE_OUT, &pack_options) < 0)
GOERROR;
if(h5diff(fname, FSPACE_OUT, NULL, NULL, &diff_options) > 0)
GOERROR;
- if(h5repack_verify(fname, FSPACE_OUT, &pack_options)<=0)
+ if(h5repack_verify(fname, FSPACE_OUT, &pack_options) <= 0)
GOERROR;
if(h5repack_end(&pack_options) < 0)
GOERROR;
@@ -282,7 +276,7 @@ int main (void)
TESTING(" files with file space info setting-- options -S and -P are set & -L");
- ++j; /* #3 */
+ ++j; /* #3 */
HDassert(j < NELMTS(H5REPACK_FSPACE_FNAMES));
fname = H5REPACK_FSPACE_FNAMES[j];
if(h5repack_init(&pack_options, 0, TRUE) < 0)
@@ -293,32 +287,32 @@ int main (void)
GOERROR;
if(h5diff(fname, FSPACE_OUT, NULL, NULL, &diff_options) > 0)
GOERROR;
- if(h5repack_verify(fname, FSPACE_OUT, &pack_options)<=0)
+ if(h5repack_verify(fname, FSPACE_OUT, &pack_options) <= 0)
GOERROR;
if(h5repack_end(&pack_options) < 0)
GOERROR;
PASSED();
TESTING(" files with file space info setting-- options -P and -T are set & -L");
- ++j; /* #4 */
+ ++j; /* #4 */
HDassert(j < NELMTS(H5REPACK_FSPACE_FNAMES));
fname = H5REPACK_FSPACE_FNAMES[j];
if(h5repack_init(&pack_options, 0, TRUE) < 0)
GOERROR;
- pack_options.fs_persist = -1; /* "FALSE" is set via -P 0 */
- pack_options.fs_threshold = 2;
+ pack_options.fs_persist = -1; /* "FALSE" is set via -P 0 */
+ pack_options.fs_threshold = 2;
if(h5repack(fname, FSPACE_OUT, &pack_options) < 0)
GOERROR;
if(h5diff(fname, FSPACE_OUT, NULL, NULL, &diff_options) > 0)
GOERROR;
- if(h5repack_verify(fname, FSPACE_OUT, &pack_options)<=0)
+ if(h5repack_verify(fname, FSPACE_OUT, &pack_options) <= 0)
GOERROR;
if(h5repack_end(&pack_options) < 0)
GOERROR;
PASSED();
TESTING(" files with file space info setting-- options -S and -G are set & -L");
- ++j; /* #5 */
+ ++j; /* #5 */
HDassert(j < NELMTS(H5REPACK_FSPACE_FNAMES));
fname = H5REPACK_FSPACE_FNAMES[j];
if(h5repack_init(&pack_options, 0, TRUE) < 0)
@@ -329,180 +323,179 @@ int main (void)
GOERROR;
if(h5diff(fname, FSPACE_OUT, NULL, NULL, &diff_options) > 0)
GOERROR;
- if(h5repack_verify(fname, FSPACE_OUT, &pack_options)<=0)
+ if(h5repack_verify(fname, FSPACE_OUT, &pack_options) <= 0)
GOERROR;
if(h5repack_end(&pack_options) < 0)
GOERROR;
PASSED();
TESTING(" files with file space info setting-- options -S, -P, -T, -G are set");
- ++j; /* #6 */
+ ++j; /* #6 */
HDassert(j < NELMTS(H5REPACK_FSPACE_FNAMES));
fname = H5REPACK_FSPACE_FNAMES[j];
if(h5repack_init(&pack_options, 0, FALSE) < 0)
GOERROR;
pack_options.fs_strategy = H5F_FSPACE_STRATEGY_NONE;
- pack_options.fs_persist = -1; /* "FALSE" is set via -P 0 */
- pack_options.fs_threshold = 1;
+ pack_options.fs_persist = -1; /* "FALSE" is set via -P 0 */
+ pack_options.fs_threshold = 1;
pack_options.fs_pagesize = 8192;
if(h5repack(fname, FSPACE_OUT, &pack_options) < 0)
GOERROR;
if(h5diff(fname, FSPACE_OUT, NULL, NULL, &diff_options) > 0)
GOERROR;
- if(h5repack_verify(fname, FSPACE_OUT, &pack_options)<=0)
+ if(h5repack_verify(fname, FSPACE_OUT, &pack_options) <= 0)
GOERROR;
if(h5repack_end(&pack_options) < 0)
GOERROR;
PASSED();
TESTING(" files with file space info setting-- options -S, -T, -G are set & -L");
- ++j; /* #7 */
+ ++j; /* #7 */
HDassert(j < NELMTS(H5REPACK_FSPACE_FNAMES));
fname = H5REPACK_FSPACE_FNAMES[j];
if(h5repack_init(&pack_options, 0, TRUE) < 0)
GOERROR;
pack_options.fs_strategy = H5F_FSPACE_STRATEGY_AGGR;
- pack_options.fs_threshold = 1;
+ pack_options.fs_threshold = 1;
pack_options.fs_pagesize = 4096;
if(h5repack(fname, FSPACE_OUT, &pack_options) < 0)
GOERROR;
if(h5diff(fname, FSPACE_OUT, NULL, NULL, &diff_options) > 0)
GOERROR;
- if(h5repack_verify(fname, FSPACE_OUT, &pack_options)<=0)
+ if(h5repack_verify(fname, FSPACE_OUT, &pack_options) <= 0)
GOERROR;
if(h5repack_end(&pack_options) < 0)
GOERROR;
PASSED();
/*-------------------------------------------------------------------------
- * file with fill values
- *-------------------------------------------------------------------------
- */
-
+ * file with fill values
+ *-------------------------------------------------------------------------
+ */
TESTING(" copy of datasets (fill values)");
- if (h5repack_init (&pack_options, 0, FALSE) < 0)
+ if (h5repack_init(&pack_options, 0, FALSE) < 0)
GOERROR;
- if (h5repack(FNAME0,FNAME0OUT,&pack_options) < 0)
+ if (h5repack(FNAME0, FNAME0OUT, &pack_options) < 0)
GOERROR;
- if (h5diff(FNAME0,FNAME0OUT,NULL,NULL,&diff_options) >0)
+ if (h5diff(FNAME0, FNAME0OUT, NULL, NULL, &diff_options) > 0)
GOERROR;
- if (h5repack_verify(FNAME0, FNAME0OUT,&pack_options)<=0)
+ if (h5repack_verify(FNAME0, FNAME0OUT, &pack_options) <= 0)
GOERROR;
- if (h5repack_cmp_pl(FNAME0,FNAME0OUT)<=0)
+ if (h5repack_cmp_pl(FNAME0, FNAME0OUT) <= 0)
GOERROR;
- if (h5repack_end (&pack_options) < 0)
+ if (h5repack_end(&pack_options) < 0)
GOERROR;
PASSED();
/*-------------------------------------------------------------------------
- * file with all kinds of dataset datatypes
- *-------------------------------------------------------------------------
- */
+ * file with all kinds of dataset datatypes
+ *-------------------------------------------------------------------------
+ */
TESTING(" copy of datasets (all datatypes)");
- if (h5repack_init (&pack_options, 0, FALSE) < 0)
+ if (h5repack_init(&pack_options, 0, FALSE) < 0)
GOERROR;
- if (h5repack(FNAME1,FNAME1OUT,&pack_options) < 0)
+ if (h5repack(FNAME1, FNAME1OUT, &pack_options) < 0)
GOERROR;
- if (h5diff(FNAME1,FNAME1OUT,NULL,NULL,&diff_options) >0)
+ if (h5diff(FNAME1, FNAME1OUT, NULL, NULL, &diff_options) > 0)
GOERROR;
- if (h5repack_verify(FNAME1, FNAME1OUT,&pack_options)<=0)
+ if (h5repack_verify(FNAME1, FNAME1OUT, &pack_options) <= 0)
GOERROR;
- if (h5repack_cmp_pl(FNAME1,FNAME1OUT)<=0)
+ if (h5repack_cmp_pl(FNAME1, FNAME1OUT) <= 0)
GOERROR;
- if (h5repack_end (&pack_options) < 0)
+ if (h5repack_end(&pack_options) < 0)
GOERROR;
PASSED();
/*-------------------------------------------------------------------------
- * file with attributes
- *-------------------------------------------------------------------------
- */
+ * file with attributes
+ *-------------------------------------------------------------------------
+ */
TESTING(" copy of datasets (attributes)");
- if (h5repack_init (&pack_options, 0, FALSE) < 0)
+ if (h5repack_init(&pack_options, 0, FALSE) < 0)
GOERROR;
- if (h5repack(FNAME2,FNAME2OUT,&pack_options) < 0)
+ if (h5repack(FNAME2, FNAME2OUT, &pack_options) < 0)
GOERROR;
- if (h5diff(FNAME2,FNAME2OUT,NULL,NULL,&diff_options) >0)
+ if (h5diff(FNAME2, FNAME2OUT, NULL, NULL, &diff_options) > 0)
GOERROR;
- if (h5repack_verify(FNAME2, FNAME2OUT,&pack_options)<=0)
+ if (h5repack_verify(FNAME2, FNAME2OUT, &pack_options) <= 0)
GOERROR;
- if (h5repack_cmp_pl(FNAME2,FNAME2OUT)<=0)
+ if (h5repack_cmp_pl(FNAME2, FNAME2OUT) <= 0)
GOERROR;
- if (h5repack_end (&pack_options) < 0)
+ if (h5repack_end(&pack_options) < 0)
GOERROR;
PASSED();
/*-------------------------------------------------------------------------
- * file with hardlinks
- *-------------------------------------------------------------------------
- */
+ * file with hardlinks
+ *-------------------------------------------------------------------------
+ */
TESTING(" copy of datasets (hardlinks)");
- if (h5repack_init (&pack_options, 0, FALSE) < 0)
+ if (h5repack_init(&pack_options, 0, FALSE) < 0)
GOERROR;
- if (h5repack(FNAME3,FNAME3OUT,&pack_options) < 0)
+ if (h5repack(FNAME3, FNAME3OUT, &pack_options) < 0)
GOERROR;
- if (h5diff(FNAME3,FNAME3OUT,NULL,NULL,&diff_options) >0)
+ if (h5diff(FNAME3, FNAME3OUT, NULL, NULL, &diff_options) > 0)
GOERROR;
- if (h5repack_verify(FNAME3, FNAME3OUT,&pack_options)<=0)
+ if (h5repack_verify(FNAME3, FNAME3OUT, &pack_options) <= 0)
GOERROR;
- if (h5repack_cmp_pl(FNAME3,FNAME3OUT)<=0)
+ if (h5repack_cmp_pl(FNAME3, FNAME3OUT) <= 0)
GOERROR;
- if (h5repack_end (&pack_options) < 0)
+ if (h5repack_end(&pack_options) < 0)
GOERROR;
PASSED();
/*-------------------------------------------------------------------------
- * alloc early test
- *-------------------------------------------------------------------------
- */
+ * alloc early test
+ *-------------------------------------------------------------------------
+ */
TESTING(" copy of allocation early file");
- if (h5repack_init (&pack_options, 0, FALSE) < 0)
+ if (h5repack_init(&pack_options, 0, FALSE) < 0)
GOERROR;
- if (h5repack(FNAME5,FNAME5OUT,&pack_options) < 0)
+ if (h5repack(FNAME5, FNAME5OUT, &pack_options) < 0)
GOERROR;
- if (h5diff(FNAME5,FNAME5OUT,NULL,NULL,&diff_options) >0)
+ if (h5diff(FNAME5, FNAME5OUT, NULL, NULL, &diff_options) > 0)
GOERROR;
- if (h5repack_verify(FNAME5, FNAME5OUT, &pack_options)<=0)
+ if (h5repack_verify(FNAME5, FNAME5OUT, &pack_options) <= 0)
GOERROR;
- if (h5repack_end (&pack_options) < 0)
+ if (h5repack_end(&pack_options) < 0)
GOERROR;
PASSED();
/*-------------------------------------------------------------------------
- * the remaining files differ in the dcpl's
- *-------------------------------------------------------------------------
- */
+ * the remaining files differ in the dcpl's
+ *-------------------------------------------------------------------------
+ */
/*-------------------------------------------------------------------------
- * deflate
- *-------------------------------------------------------------------------
- */
+ * deflate
+ *-------------------------------------------------------------------------
+ */
TESTING(" adding deflate filter (old_format)");
#ifdef H5_HAVE_FILTER_DEFLATE
/*-------------------------------------------------------------------------
- * test an individual object option
- *-------------------------------------------------------------------------
- */
+ * test an individual object option
+ *-------------------------------------------------------------------------
+ */
- if (h5repack_init (&pack_options, 0, FALSE) < 0)
+ if (h5repack_init(&pack_options, 0, FALSE) < 0)
GOERROR;
- if (h5repack_addfilter("dset1:GZIP=9",&pack_options) < 0)
+ if (h5repack_addfilter("dset1:GZIP=9", &pack_options) < 0)
GOERROR;
- if (h5repack_addlayout("dset1:CHUNK=20x10",&pack_options) < 0)
+ if (h5repack_addlayout("dset1:CHUNK=20x10", &pack_options) < 0)
GOERROR;
- if (h5repack(FNAME4,FNAME4OUT,&pack_options) < 0)
+ if (h5repack(FNAME4, FNAME4OUT, &pack_options) < 0)
GOERROR;
- if (h5diff(FNAME4,FNAME4OUT,NULL,NULL,&diff_options) >0)
+ if (h5diff(FNAME4, FNAME4OUT, NULL, NULL, &diff_options) > 0)
GOERROR;
if (h5repack_verify(FNAME4, FNAME4OUT, &pack_options) <= 0)
GOERROR;
- if (h5repack_end (&pack_options) < 0)
+ if (h5repack_end(&pack_options) < 0)
GOERROR;
PASSED();
#else
@@ -512,24 +505,24 @@ int main (void)
TESTING(" adding deflate filter (new format)");
#ifdef H5_HAVE_FILTER_DEFLATE
/*-------------------------------------------------------------------------
- * test an individual object option
- * For new format, "dset1" should be using Fixed Array indexing
- *-------------------------------------------------------------------------
- */
+ * test an individual object option
+ * For new format, "dset1" should be using Fixed Array indexing
+ *-------------------------------------------------------------------------
+ */
- if (h5repack_init (&pack_options, 0, TRUE) < 0)
+ if (h5repack_init(&pack_options, 0, TRUE) < 0)
GOERROR;
- if (h5repack_addfilter("dset1:GZIP=9",&pack_options) < 0)
+ if (h5repack_addfilter("dset1:GZIP=9", &pack_options) < 0)
GOERROR;
- if (h5repack_addlayout("dset1:CHUNK=20x10",&pack_options) < 0)
+ if (h5repack_addlayout("dset1:CHUNK=20x10", &pack_options) < 0)
GOERROR;
- if (h5repack(FNAME4,FNAME4OUT,&pack_options) < 0)
+ if (h5repack(FNAME4, FNAME4OUT, &pack_options) < 0)
GOERROR;
- if (h5diff(FNAME4,FNAME4OUT,NULL,NULL,&diff_options) >0)
+ if (h5diff(FNAME4, FNAME4OUT, NULL, NULL, &diff_options) > 0)
GOERROR;
if (h5repack_verify(FNAME4, FNAME4OUT, &pack_options) <= 0)
GOERROR;
- if (h5repack_end (&pack_options) < 0)
+ if (h5repack_end(&pack_options) < 0)
GOERROR;
PASSED();
#else
@@ -537,27 +530,27 @@ int main (void)
#endif
/*-------------------------------------------------------------------------
- * test all objects option
- *-------------------------------------------------------------------------
- */
+ * test all objects option
+ *-------------------------------------------------------------------------
+ */
TESTING(" adding deflate filter to all");
#ifdef H5_HAVE_FILTER_DEFLATE
- if (h5repack_init (&pack_options, 0, FALSE) < 0)
+ if (h5repack_init(&pack_options, 0, FALSE) < 0)
GOERROR;
- if (h5repack_addfilter("GZIP=1",&pack_options) < 0)
+ if (h5repack_addfilter("GZIP=1", &pack_options) < 0)
GOERROR;
- if (h5repack_addlayout("CHUNK=20x10",&pack_options) < 0)
+ if (h5repack_addlayout("CHUNK=20x10", &pack_options) < 0)
GOERROR;
- if (h5repack(FNAME4,FNAME4OUT,&pack_options) < 0)
+ if (h5repack(FNAME4, FNAME4OUT, &pack_options) < 0)
GOERROR;
- if (h5diff(FNAME4,FNAME4OUT,NULL,NULL,&diff_options) >0)
+ if (h5diff(FNAME4, FNAME4OUT, NULL, NULL, &diff_options) > 0)
GOERROR;
- if (h5repack_verify(FNAME4, FNAME4OUT,&pack_options)<=0)
+ if (h5repack_verify(FNAME4, FNAME4OUT, &pack_options) <= 0)
GOERROR;
- if (h5repack_end (&pack_options) < 0)
+ if (h5repack_end(&pack_options) < 0)
GOERROR;
PASSED();
@@ -566,40 +559,40 @@ int main (void)
#endif
/*-------------------------------------------------------------------------
- * SZIP
- *-------------------------------------------------------------------------
- */
+ * SZIP
+ *-------------------------------------------------------------------------
+ */
TESTING(" adding szip filter");
#if defined (H5_HAVE_FILTER_SZIP)
- if (h5tools_can_encode(H5Z_FILTER_SZIP) >0) {
+ if (h5tools_can_encode(H5Z_FILTER_SZIP) > 0)
szip_can_encode = 1;
- }
/*-------------------------------------------------------------------------
- * test an individual object option
- *-------------------------------------------------------------------------
- */
+ * test an individual object option
+ *-------------------------------------------------------------------------
+ */
if (szip_can_encode) {
if (h5repack_init (&pack_options, 0, FALSE) < 0)
GOERROR;
- if (h5repack_addfilter("dset2:SZIP=8,EC",&pack_options) < 0)
+ if (h5repack_addfilter("dset2:SZIP=8,EC", &pack_options) < 0)
GOERROR;
- if (h5repack_addlayout("dset2:CHUNK=20x10",&pack_options) < 0)
+ if (h5repack_addlayout("dset2:CHUNK=20x10", &pack_options) < 0)
GOERROR;
- if (h5repack(FNAME4,FNAME4OUT,&pack_options) < 0)
+ if (h5repack(FNAME4, FNAME4OUT, &pack_options) < 0)
GOERROR;
- if (h5diff(FNAME4,FNAME4OUT,NULL,NULL,&diff_options) >0)
+ if (h5diff(FNAME4, FNAME4OUT, NULL, NULL, &diff_options) > 0)
GOERROR;
- if (h5repack_verify(FNAME4, FNAME4OUT,&pack_options)<=0)
+ if (h5repack_verify(FNAME4, FNAME4OUT, &pack_options) <= 0)
GOERROR;
if (h5repack_end (&pack_options) < 0)
GOERROR;
PASSED();
- } else {
+ }
+ else {
SKIPPED();
}
#else
@@ -608,28 +601,29 @@ int main (void)
/*-------------------------------------------------------------------------
- * test all objects option
- *-------------------------------------------------------------------------
- */
+ * test all objects option
+ *-------------------------------------------------------------------------
+ */
TESTING(" adding szip filter to all");
#if defined (H5_HAVE_FILTER_SZIP)
if (szip_can_encode) {
- if (h5repack_init (&pack_options, 0, FALSE) < 0)
+ if (h5repack_init(&pack_options, 0, FALSE) < 0)
GOERROR;
- if (h5repack_addfilter("SZIP=8,NN",&pack_options) < 0)
+ if (h5repack_addfilter("SZIP=8,NN", &pack_options) < 0)
GOERROR;
- if (h5repack(FNAME4,FNAME4OUT,&pack_options) < 0)
+ if (h5repack(FNAME4, FNAME4OUT, &pack_options) < 0)
GOERROR;
- if (h5diff(FNAME4,FNAME4OUT,NULL,NULL,&diff_options) >0)
+ if (h5diff(FNAME4, FNAME4OUT, NULL, NULL, &diff_options) > 0)
GOERROR;
- if (h5repack_verify(FNAME4, FNAME4OUT,&pack_options)<=0)
+ if (h5repack_verify(FNAME4, FNAME4OUT, &pack_options) <= 0)
GOERROR;
- if (h5repack_end (&pack_options) < 0)
+ if (h5repack_end(&pack_options) < 0)
GOERROR;
PASSED();
- } else {
+ }
+ else {
SKIPPED();
}
#else
@@ -640,47 +634,47 @@ int main (void)
TESTING(" addding shuffle filter");
/*-------------------------------------------------------------------------
- * test an individual object option
- *-------------------------------------------------------------------------
- */
+ * test an individual object option
+ *-------------------------------------------------------------------------
+ */
- if (h5repack_init (&pack_options, 0, FALSE) < 0)
+ if (h5repack_init(&pack_options, 0, FALSE) < 0)
GOERROR;
- if (h5repack_addfilter("dset1:SHUF",&pack_options) < 0)
+ if (h5repack_addfilter("dset1:SHUF", &pack_options) < 0)
GOERROR;
- if (h5repack_addlayout("dset1:CHUNK=20x10",&pack_options) < 0)
+ if (h5repack_addlayout("dset1:CHUNK=20x10", &pack_options) < 0)
GOERROR;
- if (h5repack(FNAME4,FNAME4OUT,&pack_options) < 0)
+ if (h5repack(FNAME4, FNAME4OUT, &pack_options) < 0)
GOERROR;
- if (h5diff(FNAME4,FNAME4OUT,NULL,NULL,&diff_options) >0)
+ if (h5diff(FNAME4, FNAME4OUT, NULL, NULL, &diff_options) > 0)
GOERROR;
- if (h5repack_verify(FNAME4, FNAME4OUT,&pack_options)<=0)
+ if (h5repack_verify(FNAME4, FNAME4OUT, &pack_options) <= 0)
GOERROR;
- if (h5repack_end (&pack_options) < 0)
+ if (h5repack_end(&pack_options) < 0)
GOERROR;
PASSED();
/*-------------------------------------------------------------------------
- * test all objects option
- *-------------------------------------------------------------------------
- */
+ * test all objects option
+ *-------------------------------------------------------------------------
+ */
TESTING(" addding shuffle filter to all");
- if (h5repack_init (&pack_options, 0, FALSE) < 0)
+ if (h5repack_init(&pack_options, 0, FALSE) < 0)
GOERROR;
- if (h5repack_addfilter("SHUF",&pack_options) < 0)
+ if (h5repack_addfilter("SHUF", &pack_options) < 0)
GOERROR;
- if (h5repack_addlayout("CHUNK=20x10",&pack_options) < 0)
+ if (h5repack_addlayout("CHUNK=20x10", &pack_options) < 0)
GOERROR;
- if (h5repack(FNAME4,FNAME4OUT,&pack_options) < 0)
+ if (h5repack(FNAME4, FNAME4OUT, &pack_options) < 0)
GOERROR;
- if (h5diff(FNAME4,FNAME4OUT,NULL,NULL,&diff_options) >0)
+ if (h5diff(FNAME4, FNAME4OUT, NULL, NULL, &diff_options) > 0)
GOERROR;
- if (h5repack_verify(FNAME4, FNAME4OUT,&pack_options)<=0)
+ if (h5repack_verify(FNAME4, FNAME4OUT, &pack_options) <= 0)
GOERROR;
- if (h5repack_end (&pack_options) < 0)
+ if (h5repack_end(&pack_options) < 0)
GOERROR;
PASSED();
@@ -689,48 +683,45 @@ int main (void)
TESTING(" adding checksum filter");
/*-------------------------------------------------------------------------
- * test an individual object option
- *-------------------------------------------------------------------------
- */
-
- if (h5repack_init (&pack_options, 0, FALSE) < 0)
+ * test an individual object option
+ *-------------------------------------------------------------------------
+ */
+ if (h5repack_init(&pack_options, 0, FALSE) < 0)
GOERROR;
- if (h5repack_addfilter("dset1:FLET",&pack_options) < 0)
+ if (h5repack_addfilter("dset1:FLET", &pack_options) < 0)
GOERROR;
- if (h5repack_addlayout("dset1:CHUNK=20x10",&pack_options) < 0)
+ if (h5repack_addlayout("dset1:CHUNK=20x10", &pack_options) < 0)
GOERROR;
- if (h5repack(FNAME4,FNAME4OUT,&pack_options) < 0)
+ if (h5repack(FNAME4, FNAME4OUT, &pack_options) < 0)
GOERROR;
- if (h5diff(FNAME4,FNAME4OUT,NULL,NULL,&diff_options) >0)
+ if (h5diff(FNAME4, FNAME4OUT, NULL, NULL, &diff_options) > 0)
GOERROR;
- if (h5repack_verify(FNAME4, FNAME4OUT,&pack_options)<=0)
+ if (h5repack_verify(FNAME4, FNAME4OUT, &pack_options) <= 0)
GOERROR;
- if (h5repack_end (&pack_options) < 0)
+ if (h5repack_end(&pack_options) < 0)
GOERROR;
PASSED();
/*-------------------------------------------------------------------------
- * test all objects option
- *-------------------------------------------------------------------------
- */
-
-
+ * test all objects option
+ *-------------------------------------------------------------------------
+ */
TESTING(" adding checksum filter to all");
- if (h5repack_init (&pack_options, 0, FALSE) < 0)
+ if (h5repack_init(&pack_options, 0, FALSE) < 0)
GOERROR;
- if (h5repack_addfilter("FLET",&pack_options) < 0)
+ if (h5repack_addfilter("FLET", &pack_options) < 0)
GOERROR;
- if (h5repack_addlayout("CHUNK=20x10",&pack_options) < 0)
+ if (h5repack_addlayout("CHUNK=20x10", &pack_options) < 0)
GOERROR;
- if (h5repack(FNAME4,FNAME4OUT,&pack_options) < 0)
+ if (h5repack(FNAME4, FNAME4OUT, &pack_options) < 0)
GOERROR;
- if (h5diff(FNAME4,FNAME4OUT,NULL,NULL,&diff_options) >0)
+ if (h5diff(FNAME4, FNAME4OUT, NULL, NULL, &diff_options) > 0)
GOERROR;
- if (h5repack_verify(FNAME4, FNAME4OUT,&pack_options)<=0)
+ if (h5repack_verify(FNAME4, FNAME4OUT, &pack_options) <= 0)
GOERROR;
- if (h5repack_end (&pack_options) < 0)
+ if (h5repack_end(&pack_options) < 0)
GOERROR;
PASSED();
@@ -739,38 +730,38 @@ int main (void)
TESTING(" filter queue fletcher, shuffle, deflate, szip");
/*-------------------------------------------------------------------------
- * add some filters
- *-------------------------------------------------------------------------
- */
+ * add some filters
+ *-------------------------------------------------------------------------
+ */
- if (h5repack_init (&pack_options, 0, FALSE) < 0)
+ if (h5repack_init(&pack_options, 0, FALSE) < 0)
GOERROR;
- if (h5repack_addlayout("dset1:CHUNK 20x10",&pack_options) < 0)
+ if (h5repack_addlayout("dset1:CHUNK 20x10", &pack_options) < 0)
GOERROR;
- if (h5repack_addfilter("dset1:FLET",&pack_options) < 0)
+ if (h5repack_addfilter("dset1:FLET", &pack_options) < 0)
GOERROR;
- if (h5repack_addfilter("dset1:SHUF",&pack_options) < 0)
+ if (h5repack_addfilter("dset1:SHUF", &pack_options) < 0)
GOERROR;
#if defined (H5_HAVE_FILTER_SZIP)
if (szip_can_encode) {
- if (h5repack_addfilter("dset1:SZIP=8,NN",&pack_options) < 0)
+ if (h5repack_addfilter("dset1:SZIP=8,NN", &pack_options) < 0)
GOERROR;
}
#endif
#ifdef H5_HAVE_FILTER_DEFLATE
- if (h5repack_addfilter("dset1:GZIP=1",&pack_options) < 0)
+ if (h5repack_addfilter("dset1:GZIP=1", &pack_options) < 0)
GOERROR;
#endif
- if (h5repack(FNAME4,FNAME4OUT,&pack_options) < 0)
+ if (h5repack(FNAME4, FNAME4OUT, &pack_options) < 0)
GOERROR;
- if (h5diff(FNAME4,FNAME4OUT,NULL,NULL,&diff_options) >0)
+ if (h5diff(FNAME4, FNAME4OUT, NULL, NULL, &diff_options) > 0)
GOERROR;
- if (h5repack_verify(FNAME4, FNAME4OUT,&pack_options)<=0)
+ if (h5repack_verify(FNAME4, FNAME4OUT, &pack_options) <= 0)
GOERROR;
- if (h5repack_end (&pack_options) < 0)
+ if (h5repack_end(&pack_options) < 0)
GOERROR;
PASSED();
@@ -779,63 +770,63 @@ int main (void)
TESTING(" adding layout chunked (old format)");
/*-------------------------------------------------------------------------
- * test an individual object option
- *-------------------------------------------------------------------------
- */
+ * test an individual object option
+ *-------------------------------------------------------------------------
+ */
- if (h5repack_init (&pack_options, 0, FALSE) < 0)
+ if (h5repack_init(&pack_options, 0, FALSE) < 0)
GOERROR;
- if (h5repack_addlayout("dset1:CHUNK=20x10",&pack_options) < 0)
+ if (h5repack_addlayout("dset1:CHUNK=20x10", &pack_options) < 0)
GOERROR;
- if (h5repack(FNAME4,FNAME4OUT,&pack_options) < 0)
+ if (h5repack(FNAME4, FNAME4OUT, &pack_options) < 0)
GOERROR;
- if (h5diff(FNAME4,FNAME4OUT,NULL,NULL,&diff_options) >0)
+ if (h5diff(FNAME4, FNAME4OUT, NULL, NULL, &diff_options) > 0)
GOERROR;
- if (h5repack_verify(FNAME4, FNAME4OUT, &pack_options )<= 0)
+ if (h5repack_verify(FNAME4, FNAME4OUT, &pack_options ) <= 0)
GOERROR;
- if (h5repack_end (&pack_options) < 0)
+ if (h5repack_end(&pack_options) < 0)
GOERROR;
PASSED();
TESTING(" adding layout chunked (new format)");
/*-------------------------------------------------------------------------
- * test an individual object option
- * For new format, "dset1" should be using Fixed Array indexing
- *-------------------------------------------------------------------------
- */
+ * test an individual object option
+ * For new format, "dset1" should be using Fixed Array indexing
+ *-------------------------------------------------------------------------
+ */
- if (h5repack_init (&pack_options, 0, TRUE) < 0)
+ if (h5repack_init(&pack_options, 0, TRUE) < 0)
GOERROR;
- if (h5repack_addlayout("dset1:CHUNK=20x10",&pack_options) < 0)
+ if (h5repack_addlayout("dset1:CHUNK=20x10", &pack_options) < 0)
GOERROR;
- if (h5repack(FNAME4,FNAME4OUT,&pack_options) < 0)
+ if (h5repack(FNAME4, FNAME4OUT, &pack_options) < 0)
GOERROR;
- if (h5diff(FNAME4,FNAME4OUT,NULL,NULL,&diff_options) >0)
+ if (h5diff(FNAME4, FNAME4OUT, NULL, NULL, &diff_options) > 0)
GOERROR;
- if (h5repack_verify(FNAME4, FNAME4OUT, &pack_options )<= 0)
+ if (h5repack_verify(FNAME4, FNAME4OUT, &pack_options ) <= 0)
GOERROR;
- if (h5repack_end (&pack_options) < 0)
+ if (h5repack_end(&pack_options) < 0)
GOERROR;
PASSED();
/*-------------------------------------------------------------------------
- * test all objects option
- *-------------------------------------------------------------------------
- */
+ * test all objects option
+ *-------------------------------------------------------------------------
+ */
TESTING(" adding layout chunked to all");
- if (h5repack_init (&pack_options, 0, FALSE) < 0)
+ if (h5repack_init(&pack_options, 0, FALSE) < 0)
GOERROR;
- if (h5repack_addlayout("CHUNK=20x10",&pack_options) < 0)
+ if (h5repack_addlayout("CHUNK=20x10", &pack_options) < 0)
GOERROR;
- if (h5repack(FNAME4,FNAME4OUT,&pack_options) < 0)
+ if (h5repack(FNAME4, FNAME4OUT, &pack_options) < 0)
GOERROR;
- if (h5diff(FNAME4,FNAME4OUT,NULL,NULL,&diff_options) >0)
+ if (h5diff(FNAME4, FNAME4OUT, NULL, NULL, &diff_options) > 0)
GOERROR;
- if (h5repack_verify(FNAME4, FNAME4OUT,&pack_options)<=0)
+ if (h5repack_verify(FNAME4, FNAME4OUT, &pack_options) <= 0)
GOERROR;
- if (h5repack_end (&pack_options) < 0)
+ if (h5repack_end(&pack_options) < 0)
GOERROR;
PASSED();
@@ -843,20 +834,20 @@ int main (void)
TESTING(" adding layout contiguous");
/*-------------------------------------------------------------------------
- * test an individual object option
- *-------------------------------------------------------------------------
- */
- if (h5repack_init (&pack_options, 0, FALSE) < 0)
+ * test an individual object option
+ *-------------------------------------------------------------------------
+ */
+ if (h5repack_init(&pack_options, 0, FALSE) < 0)
GOERROR;
- if (h5repack_addlayout("dset1:CONTI",&pack_options) < 0)
+ if (h5repack_addlayout("dset1:CONTI", &pack_options) < 0)
GOERROR;
- if (h5repack(FNAME4,FNAME4OUT,&pack_options) < 0)
+ if (h5repack(FNAME4, FNAME4OUT, &pack_options) < 0)
GOERROR;
- if (h5diff(FNAME4,FNAME4OUT,NULL,NULL,&diff_options) >0)
+ if (h5diff(FNAME4, FNAME4OUT, NULL, NULL, &diff_options) > 0)
GOERROR;
- if (h5repack_verify(FNAME4, FNAME4OUT,&pack_options)<=0)
+ if (h5repack_verify(FNAME4, FNAME4OUT, &pack_options) <= 0)
GOERROR;
- if (h5repack_end (&pack_options) < 0)
+ if (h5repack_end(&pack_options) < 0)
GOERROR;
PASSED();
@@ -864,37 +855,37 @@ int main (void)
TESTING(" adding layout contiguous to all");
/*-------------------------------------------------------------------------
- * test all objects option
- *-------------------------------------------------------------------------
- */
- if (h5repack_init (&pack_options, 0, FALSE) < 0)
+ * test all objects option
+ *-------------------------------------------------------------------------
+ */
+ if (h5repack_init(&pack_options, 0, FALSE) < 0)
GOERROR;
- if (h5repack_addlayout("CONTI",&pack_options) < 0)
+ if (h5repack_addlayout("CONTI", &pack_options) < 0)
GOERROR;
- if (h5repack(FNAME4,FNAME4OUT,&pack_options) < 0)
+ if (h5repack(FNAME4, FNAME4OUT, &pack_options) < 0)
GOERROR;
- if (h5diff(FNAME4,FNAME4OUT,NULL,NULL,&diff_options) >0)
+ if (h5diff(FNAME4, FNAME4OUT, NULL, NULL, &diff_options) > 0)
GOERROR;
- if (h5repack_verify(FNAME4, FNAME4OUT,&pack_options)<=0)
+ if (h5repack_verify(FNAME4, FNAME4OUT, &pack_options) <= 0)
GOERROR;
- if (h5repack_end (&pack_options) < 0)
+ if (h5repack_end(&pack_options) < 0)
GOERROR;
/*-------------------------------------------------------------------------
- * do the same test for a file with filters (chunked)
- *-------------------------------------------------------------------------
- */
- if (h5repack_init (&pack_options, 0, FALSE) < 0)
+ * do the same test for a file with filters (chunked)
+ *-------------------------------------------------------------------------
+ */
+ if (h5repack_init(&pack_options, 0, FALSE) < 0)
GOERROR;
- if (h5repack_addlayout("CONTI",&pack_options) < 0)
+ if (h5repack_addlayout("CONTI", &pack_options) < 0)
GOERROR;
- if (h5repack(FNAME8,FNAME8OUT,&pack_options) < 0)
+ if (h5repack(FNAME8, FNAME8OUT, &pack_options) < 0)
GOERROR;
- if (h5diff(FNAME8,FNAME8OUT,NULL,NULL,&diff_options) >0)
+ if (h5diff(FNAME8, FNAME8OUT, NULL, NULL, &diff_options) > 0)
GOERROR;
- if (h5repack_verify(FNAME8, FNAME8OUT,&pack_options)<=0)
+ if (h5repack_verify(FNAME8, FNAME8OUT, &pack_options) <= 0)
GOERROR;
- if (h5repack_end (&pack_options) < 0)
+ if (h5repack_end(&pack_options) < 0)
GOERROR;
PASSED();
@@ -902,42 +893,42 @@ int main (void)
TESTING(" adding layout compact");
/*-------------------------------------------------------------------------
- * test an individual object option
- *-------------------------------------------------------------------------
- */
+ * test an individual object option
+ *-------------------------------------------------------------------------
+ */
- if (h5repack_init (&pack_options, 0, FALSE) < 0)
+ if (h5repack_init(&pack_options, 0, FALSE) < 0)
GOERROR;
- if (h5repack_addlayout("dset1:COMPA",&pack_options) < 0)
+ if (h5repack_addlayout("dset1:COMPA", &pack_options) < 0)
GOERROR;
- if (h5repack(FNAME4,FNAME4OUT,&pack_options) < 0)
+ if (h5repack(FNAME4, FNAME4OUT, &pack_options) < 0)
GOERROR;
- if (h5diff(FNAME4,FNAME4OUT,NULL,NULL,&diff_options) >0)
+ if (h5diff(FNAME4, FNAME4OUT, NULL, NULL, &diff_options) > 0)
GOERROR;
- if (h5repack_verify(FNAME4, FNAME4OUT,&pack_options)<=0)
+ if (h5repack_verify(FNAME4, FNAME4OUT, &pack_options) <= 0)
GOERROR;
- if (h5repack_end (&pack_options) < 0)
+ if (h5repack_end(&pack_options) < 0)
GOERROR;
PASSED();
TESTING(" adding layout compact to all");
/*-------------------------------------------------------------------------
- * test all objects option
- *-------------------------------------------------------------------------
- */
+ * test all objects option
+ *-------------------------------------------------------------------------
+ */
- if (h5repack_init (&pack_options, 0, FALSE) < 0)
+ if (h5repack_init(&pack_options, 0, FALSE) < 0)
GOERROR;
- if (h5repack_addlayout("COMPA",&pack_options) < 0)
+ if (h5repack_addlayout("COMPA", &pack_options) < 0)
GOERROR;
- if (h5repack(FNAME4,FNAME4OUT,&pack_options) < 0)
+ if (h5repack(FNAME4, FNAME4OUT, &pack_options) < 0)
GOERROR;
- if (h5diff(FNAME4,FNAME4OUT,NULL,NULL,&diff_options) >0)
+ if (h5diff(FNAME4, FNAME4OUT, NULL, NULL, &diff_options) > 0)
GOERROR;
- if (h5repack_verify(FNAME4, FNAME4OUT,&pack_options)<=0)
+ if (h5repack_verify(FNAME4, FNAME4OUT, &pack_options) <= 0)
GOERROR;
- if (h5repack_end (&pack_options) < 0)
+ if (h5repack_end(&pack_options) < 0)
GOERROR;
PASSED();
@@ -946,210 +937,209 @@ int main (void)
TESTING(" layout compact to contiguous conversion");
/*-------------------------------------------------------------------------
- * layout compact to contiguous conversion
- *-------------------------------------------------------------------------
- */
- if (h5repack_init (&pack_options, 0, FALSE) < 0)
+ * layout compact to contiguous conversion
+ *-------------------------------------------------------------------------
+ */
+ if (h5repack_init(&pack_options, 0, FALSE) < 0)
GOERROR;
- if (h5repack_addlayout("dset_compact:CONTI",&pack_options) < 0)
+ if (h5repack_addlayout("dset_compact:CONTI", &pack_options) < 0)
GOERROR;
- if (h5repack(FNAME4,FNAME4OUT,&pack_options) < 0)
+ if (h5repack(FNAME4, FNAME4OUT, &pack_options) < 0)
GOERROR;
- if (h5diff(FNAME4,FNAME4OUT,NULL,NULL,&diff_options) >0)
+ if (h5diff(FNAME4, FNAME4OUT, NULL, NULL, &diff_options) > 0)
GOERROR;
- if (h5repack_verify(FNAME4, FNAME4OUT,&pack_options)<=0)
+ if (h5repack_verify(FNAME4, FNAME4OUT, &pack_options) <= 0)
GOERROR;
- if (h5repack_end (&pack_options) < 0)
+ if (h5repack_end(&pack_options) < 0)
GOERROR;
PASSED();
TESTING(" layout compact to chunk conversion");
/*-------------------------------------------------------------------------
- * layout compact to chunk conversion
- *-------------------------------------------------------------------------
- */
- if (h5repack_init (&pack_options, 0, FALSE) < 0)
+ * layout compact to chunk conversion
+ *-------------------------------------------------------------------------
+ */
+ if (h5repack_init(&pack_options, 0, FALSE) < 0)
GOERROR;
- if (h5repack_addlayout("dset_compact:CHUNK=2x5",&pack_options) < 0)
+ if (h5repack_addlayout("dset_compact:CHUNK=2x5", &pack_options) < 0)
GOERROR;
- if (h5repack(FNAME4,FNAME4OUT,&pack_options) < 0)
+ if (h5repack(FNAME4, FNAME4OUT, &pack_options) < 0)
GOERROR;
- if (h5diff(FNAME4,FNAME4OUT,NULL,NULL,&diff_options) >0)
+ if (h5diff(FNAME4, FNAME4OUT, NULL, NULL, &diff_options) > 0)
GOERROR;
- if (h5repack_verify(FNAME4, FNAME4OUT,&pack_options)<=0)
+ if (h5repack_verify(FNAME4, FNAME4OUT, &pack_options) <= 0)
GOERROR;
- if (h5repack_end (&pack_options) < 0)
+ if (h5repack_end(&pack_options) < 0)
GOERROR;
PASSED();
TESTING(" layout compact to compact conversion");
/*-------------------------------------------------------------------------
- * layout compact to compact conversion
- *-------------------------------------------------------------------------
- */
- if (h5repack_init (&pack_options, 0, FALSE) < 0)
+ * layout compact to compact conversion
+ *-------------------------------------------------------------------------
+ */
+ if (h5repack_init(&pack_options, 0, FALSE) < 0)
GOERROR;
- if (h5repack_addlayout("dset_compact:COMPA",&pack_options) < 0)
+ if (h5repack_addlayout("dset_compact:COMPA", &pack_options) < 0)
GOERROR;
- if (h5repack(FNAME4,FNAME4OUT,&pack_options) < 0)
+ if (h5repack(FNAME4, FNAME4OUT, &pack_options) < 0)
GOERROR;
- if (h5diff(FNAME4,FNAME4OUT,NULL,NULL,&diff_options) >0)
+ if (h5diff(FNAME4, FNAME4OUT, NULL, NULL, &diff_options) >0)
GOERROR;
- if (h5repack_verify(FNAME4, FNAME4OUT,&pack_options)<=0)
+ if (h5repack_verify(FNAME4, FNAME4OUT, &pack_options)<= 0)
GOERROR;
- if (h5repack_end (&pack_options) < 0)
+ if (h5repack_end(&pack_options) < 0)
GOERROR;
PASSED();
TESTING(" layout contiguous to compact conversion");
/*-------------------------------------------------------------------------
- * layout contiguous to compact conversion
- *-------------------------------------------------------------------------
- */
- if (h5repack_init (&pack_options, 0, FALSE) < 0)
+ * layout contiguous to compact conversion
+ *-------------------------------------------------------------------------
+ */
+ if (h5repack_init(&pack_options, 0, FALSE) < 0)
GOERROR;
- if (h5repack_addlayout("dset_contiguous:COMPA",&pack_options) < 0)
+ if (h5repack_addlayout("dset_contiguous:COMPA", &pack_options) < 0)
GOERROR;
- if (h5repack(FNAME4,FNAME4OUT,&pack_options) < 0)
+ if (h5repack(FNAME4, FNAME4OUT, &pack_options) < 0)
GOERROR;
- if (h5diff(FNAME4,FNAME4OUT,NULL,NULL,&diff_options) >0)
+ if (h5diff(FNAME4, FNAME4OUT, NULL, NULL, &diff_options) > 0)
GOERROR;
- if (h5repack_verify(FNAME4, FNAME4OUT,&pack_options)<=0)
+ if (h5repack_verify(FNAME4, FNAME4OUT, &pack_options) <= 0)
GOERROR;
- if (h5repack_end (&pack_options) < 0)
+ if (h5repack_end(&pack_options) < 0)
GOERROR;
PASSED();
TESTING(" layout contiguous to chunk conversion");
/*-------------------------------------------------------------------------
- * layout contiguous to chunk conversion
- *-------------------------------------------------------------------------
- */
- if (h5repack_init (&pack_options, 0, FALSE) < 0)
+ * layout contiguous to chunk conversion
+ *-------------------------------------------------------------------------
+ */
+ if (h5repack_init(&pack_options, 0, FALSE) < 0)
GOERROR;
- if (h5repack_addlayout("dset_contiguous:CHUNK=3x6",&pack_options) < 0)
+ if (h5repack_addlayout("dset_contiguous:CHUNK=3x6", &pack_options) < 0)
GOERROR;
- if (h5repack(FNAME4,FNAME4OUT,&pack_options) < 0)
+ if (h5repack(FNAME4, FNAME4OUT, &pack_options) < 0)
GOERROR;
- if (h5diff(FNAME4,FNAME4OUT,NULL,NULL,&diff_options) >0)
+ if (h5diff(FNAME4, FNAME4OUT, NULL, NULL, &diff_options) > 0)
GOERROR;
- if (h5repack_verify(FNAME4, FNAME4OUT,&pack_options)<=0)
+ if (h5repack_verify(FNAME4, FNAME4OUT, &pack_options) <= 0)
GOERROR;
- if (h5repack_end (&pack_options) < 0)
+ if (h5repack_end(&pack_options) < 0)
GOERROR;
PASSED();
TESTING(" layout contiguous to contiguous conversion");
/*-------------------------------------------------------------------------
- * layout contiguous to contiguous conversion
- *-------------------------------------------------------------------------
- */
- if (h5repack_init (&pack_options, 0, FALSE) < 0)
+ * layout contiguous to contiguous conversion
+ *-------------------------------------------------------------------------
+ */
+ if (h5repack_init(&pack_options, 0, FALSE) < 0)
GOERROR;
- if (h5repack_addlayout("dset_contiguous:CONTI",&pack_options) < 0)
+ if (h5repack_addlayout("dset_contiguous:CONTI", &pack_options) < 0)
GOERROR;
- if (h5repack(FNAME4,FNAME4OUT,&pack_options) < 0)
+ if (h5repack(FNAME4, FNAME4OUT, &pack_options) < 0)
GOERROR;
- if (h5diff(FNAME4,FNAME4OUT,NULL,NULL,&diff_options) >0)
+ if (h5diff(FNAME4, FNAME4OUT, NULL, NULL, &diff_options) > 0)
GOERROR;
- if (h5repack_verify(FNAME4, FNAME4OUT,&pack_options)<=0)
+ if (h5repack_verify(FNAME4, FNAME4OUT, &pack_options) <= 0)
GOERROR;
- if (h5repack_end (&pack_options) < 0)
+ if (h5repack_end(&pack_options) < 0)
GOERROR;
PASSED();
TESTING(" layout chunked to compact conversion");
/*-------------------------------------------------------------------------
- * layout chunked to compact conversion
- *-------------------------------------------------------------------------
- */
- if (h5repack_init (&pack_options, 0, FALSE) < 0)
+ * layout chunked to compact conversion
+ *-------------------------------------------------------------------------
+ */
+ if (h5repack_init(&pack_options, 0, FALSE) < 0)
GOERROR;
- if (h5repack_addlayout("dset_chunk:COMPA",&pack_options) < 0)
+ if (h5repack_addlayout("dset_chunk:COMPA", &pack_options) < 0)
GOERROR;
- if (h5repack(FNAME4,FNAME4OUT,&pack_options) < 0)
+ if (h5repack(FNAME4, FNAME4OUT, &pack_options) < 0)
GOERROR;
- if (h5diff(FNAME4,FNAME4OUT,NULL,NULL,&diff_options) >0)
+ if (h5diff(FNAME4, FNAME4OUT, NULL, NULL, &diff_options) > 0)
GOERROR;
- if (h5repack_verify(FNAME4, FNAME4OUT,&pack_options)<=0)
+ if (h5repack_verify(FNAME4, FNAME4OUT, &pack_options) <= 0)
GOERROR;
- if (h5repack_end (&pack_options) < 0)
+ if (h5repack_end(&pack_options) < 0)
GOERROR;
PASSED();
TESTING(" layout chunked to contiguous conversion");
/*-------------------------------------------------------------------------
- * layout chunked to contiguous conversion
- *-------------------------------------------------------------------------
- */
- if (h5repack_init (&pack_options, 0, FALSE) < 0)
+ * layout chunked to contiguous conversion
+ *-------------------------------------------------------------------------
+ */
+ if (h5repack_init(&pack_options, 0, FALSE) < 0)
GOERROR;
- if (h5repack_addlayout("dset_chunk:CONTI",&pack_options) < 0)
+ if (h5repack_addlayout("dset_chunk:CONTI", &pack_options) < 0)
GOERROR;
- if (h5repack(FNAME4,FNAME4OUT,&pack_options) < 0)
+ if (h5repack(FNAME4, FNAME4OUT, &pack_options) < 0)
GOERROR;
- if (h5diff(FNAME4,FNAME4OUT,NULL,NULL,&diff_options) >0)
+ if (h5diff(FNAME4, FNAME4OUT, NULL, NULL, &diff_options) > 0)
GOERROR;
- if (h5repack_verify(FNAME4, FNAME4OUT,&pack_options)<=0)
+ if (h5repack_verify(FNAME4, FNAME4OUT, &pack_options) <= 0)
GOERROR;
- if (h5repack_end (&pack_options) < 0)
+ if (h5repack_end(&pack_options) < 0)
GOERROR;
PASSED();
TESTING(" layout chunked to chunk conversion");
/*-------------------------------------------------------------------------
- * layout chunked to chunked conversion
- *-------------------------------------------------------------------------
- */
- if (h5repack_init (&pack_options, 0, FALSE) < 0)
+ * layout chunked to chunked conversion
+ *-------------------------------------------------------------------------
+ */
+ if (h5repack_init(&pack_options, 0, FALSE) < 0)
GOERROR;
- if (h5repack_addlayout("dset_chunk:CHUNK=18x13",&pack_options) < 0)
+ if (h5repack_addlayout("dset_chunk:CHUNK=18x13", &pack_options) < 0)
GOERROR;
- if (h5repack(FNAME4,FNAME4OUT,&pack_options) < 0)
+ if (h5repack(FNAME4, FNAME4OUT, &pack_options) < 0)
GOERROR;
- if (h5diff(FNAME4,FNAME4OUT,NULL,NULL,&diff_options) >0)
+ if (h5diff(FNAME4, FNAME4OUT, NULL, NULL, &diff_options) > 0)
GOERROR;
- if (h5repack_verify(FNAME4, FNAME4OUT,&pack_options)<=0)
+ if (h5repack_verify(FNAME4, FNAME4OUT, &pack_options) <= 0)
GOERROR;
- if (h5repack_end (&pack_options) < 0)
+ if (h5repack_end(&pack_options) < 0)
GOERROR;
PASSED();
/*-------------------------------------------------------------------------
- * the following tests assume the input files have filters
- * FNAME7
- * FNAME8
- * FNAME9
- * FNAME10
- * FNAME11
- *-------------------------------------------------------------------------
- */
-
-
+ * the following tests assume the input files have filters
+ * FNAME7
+ * FNAME8
+ * FNAME9
+ * FNAME10
+ * FNAME11
+ *-------------------------------------------------------------------------
+ */
TESTING(" copy of szip filter");
#if defined (H5_HAVE_FILTER_SZIP)
if (szip_can_encode) {
- if (h5repack_init (&pack_options, 0, FALSE) < 0)
+ if (h5repack_init(&pack_options, 0, FALSE) < 0)
GOERROR;
- if (h5repack(FNAME7,FNAME7OUT,&pack_options) < 0)
+ if (h5repack(FNAME7, FNAME7OUT, &pack_options) < 0)
GOERROR;
- if (h5diff(FNAME7,FNAME7OUT,NULL,NULL,&diff_options) >0)
+ if (h5diff(FNAME7, FNAME7OUT, NULL, NULL, &diff_options) > 0)
GOERROR;
- if (h5repack_verify(FNAME7, FNAME7OUT,&pack_options)<=0)
+ if (h5repack_verify(FNAME7, FNAME7OUT, &pack_options) <= 0)
GOERROR;
- if (h5repack_cmp_pl(FNAME7,FNAME7OUT)<=0)
+ if (h5repack_cmp_pl(FNAME7, FNAME7OUT) <= 0)
GOERROR;
- if (h5repack_end (&pack_options) < 0)
+ if (h5repack_end(&pack_options) < 0)
GOERROR;
PASSED();
- } else {
+ }
+ else {
SKIPPED();
}
#else
@@ -1160,21 +1150,22 @@ int main (void)
#if defined (H5_HAVE_FILTER_SZIP)
if (szip_can_encode) {
- if (h5repack_init (&pack_options, 0, FALSE) < 0)
+ if (h5repack_init(&pack_options, 0, FALSE) < 0)
GOERROR;
- if (h5repack_addfilter("dset_szip:NONE",&pack_options) < 0)
+ if (h5repack_addfilter("dset_szip:NONE", &pack_options) < 0)
GOERROR;
- if (h5repack(FNAME7,FNAME7OUT,&pack_options) < 0)
+ if (h5repack(FNAME7, FNAME7OUT, &pack_options) < 0)
GOERROR;
- if (h5diff(FNAME7,FNAME7OUT,NULL,NULL,&diff_options) >0)
+ if (h5diff(FNAME7, FNAME7OUT, NULL, NULL, &diff_options) > 0)
GOERROR;
- if (h5repack_verify(FNAME7, FNAME7OUT,&pack_options)<=0)
+ if (h5repack_verify(FNAME7, FNAME7OUT, &pack_options) <= 0)
GOERROR;
- if (h5repack_end (&pack_options) < 0)
+ if (h5repack_end(&pack_options) < 0)
GOERROR;
PASSED();
- } else {
+ }
+ else {
SKIPPED();
}
#else
@@ -1185,15 +1176,15 @@ int main (void)
TESTING(" copy of deflate filter");
#ifdef H5_HAVE_FILTER_DEFLATE
- if (h5repack_init (&pack_options, 0, FALSE) < 0)
+ if (h5repack_init(&pack_options, 0, FALSE) < 0)
GOERROR;
- if (h5repack(FNAME8,FNAME8OUT,&pack_options) < 0)
+ if (h5repack(FNAME8, FNAME8OUT, &pack_options) < 0)
GOERROR;
- if (h5diff(FNAME8,FNAME8OUT,NULL,NULL,&diff_options) >0)
+ if (h5diff(FNAME8, FNAME8OUT, NULL, NULL, &diff_options) > 0)
GOERROR;
- if (h5repack_verify(FNAME8, FNAME8OUT,&pack_options)<=0)
+ if (h5repack_verify(FNAME8, FNAME8OUT, &pack_options) <= 0)
GOERROR;
- if (h5repack_end (&pack_options) < 0)
+ if (h5repack_end(&pack_options) < 0)
GOERROR;
PASSED();
@@ -1205,17 +1196,17 @@ int main (void)
TESTING(" removing deflate filter");
#ifdef H5_HAVE_FILTER_DEFLATE
- if (h5repack_init (&pack_options, 0, FALSE) < 0)
+ if (h5repack_init(&pack_options, 0, FALSE) < 0)
GOERROR;
- if (h5repack_addfilter("dset_deflate:NONE",&pack_options) < 0)
+ if (h5repack_addfilter("dset_deflate:NONE", &pack_options) < 0)
GOERROR;
- if (h5repack(FNAME8,FNAME8OUT,&pack_options) < 0)
+ if (h5repack(FNAME8, FNAME8OUT, &pack_options) < 0)
GOERROR;
- if (h5diff(FNAME8,FNAME8OUT,NULL,NULL,&diff_options) >0)
+ if (h5diff(FNAME8, FNAME8OUT, NULL, NULL, &diff_options) > 0)
GOERROR;
- if (h5repack_verify(FNAME8, FNAME8OUT,&pack_options)<=0)
+ if (h5repack_verify(FNAME8, FNAME8OUT, &pack_options) <= 0)
GOERROR;
- if (h5repack_end (&pack_options) < 0)
+ if (h5repack_end(&pack_options) < 0)
GOERROR;
PASSED();
@@ -1227,15 +1218,15 @@ int main (void)
TESTING(" copy of shuffle filter");
- if (h5repack_init (&pack_options, 0, FALSE) < 0)
+ if (h5repack_init(&pack_options, 0, FALSE) < 0)
GOERROR;
- if (h5repack(FNAME9,FNAME9OUT,&pack_options) < 0)
+ if (h5repack(FNAME9, FNAME9OUT, &pack_options) < 0)
GOERROR;
- if (h5diff(FNAME9,FNAME9OUT,NULL,NULL,&diff_options) >0)
+ if (h5diff(FNAME9, FNAME9OUT, NULL, NULL, &diff_options) > 0)
GOERROR;
- if (h5repack_verify(FNAME9, FNAME9OUT,&pack_options)<=0)
+ if (h5repack_verify(FNAME9, FNAME9OUT, &pack_options) <= 0)
GOERROR;
- if (h5repack_end (&pack_options) < 0)
+ if (h5repack_end(&pack_options) < 0)
GOERROR;
PASSED();
@@ -1243,17 +1234,17 @@ int main (void)
TESTING(" removing shuffle filter");
- if (h5repack_init (&pack_options, 0, FALSE) < 0)
+ if (h5repack_init(&pack_options, 0, FALSE) < 0)
GOERROR;
- if (h5repack_addfilter("dset_shuffle:NONE",&pack_options) < 0)
+ if (h5repack_addfilter("dset_shuffle:NONE", &pack_options) < 0)
GOERROR;
- if (h5repack(FNAME9,FNAME9OUT,&pack_options) < 0)
+ if (h5repack(FNAME9, FNAME9OUT, &pack_options) < 0)
GOERROR;
- if (h5diff(FNAME9,FNAME9OUT,NULL,NULL,&diff_options) >0)
+ if (h5diff(FNAME9, FNAME9OUT, NULL, NULL, &diff_options) > 0)
GOERROR;
- if (h5repack_verify(FNAME9, FNAME9OUT,&pack_options)<=0)
+ if (h5repack_verify(FNAME9, FNAME9OUT, &pack_options) <= 0)
GOERROR;
- if (h5repack_end (&pack_options) < 0)
+ if (h5repack_end(&pack_options) < 0)
GOERROR;
PASSED();
@@ -1261,15 +1252,15 @@ int main (void)
TESTING(" copy of fletcher filter");
- if (h5repack_init (&pack_options, 0, FALSE) < 0)
+ if (h5repack_init(&pack_options, 0, FALSE) < 0)
GOERROR;
- if (h5repack(FNAME10,FNAME10OUT,&pack_options) < 0)
+ if (h5repack(FNAME10, FNAME10OUT, &pack_options) < 0)
GOERROR;
- if (h5diff(FNAME10,FNAME10OUT,NULL,NULL,&diff_options) >0)
+ if (h5diff(FNAME10, FNAME10OUT, NULL, NULL, &diff_options) > 0)
GOERROR;
- if (h5repack_verify(FNAME10, FNAME10OUT,&pack_options)<=0)
+ if (h5repack_verify(FNAME10, FNAME10OUT, &pack_options) <= 0)
GOERROR;
- if (h5repack_end (&pack_options) < 0)
+ if (h5repack_end(&pack_options) < 0)
GOERROR;
PASSED();
@@ -1277,17 +1268,17 @@ int main (void)
TESTING(" removing fletcher filter");
- if (h5repack_init (&pack_options, 0, FALSE) < 0)
+ if (h5repack_init(&pack_options, 0, FALSE) < 0)
GOERROR;
- if (h5repack_addfilter("dset_fletcher32:NONE",&pack_options) < 0)
+ if (h5repack_addfilter("dset_fletcher32:NONE", &pack_options) < 0)
GOERROR;
- if (h5repack(FNAME10,FNAME10OUT,&pack_options) < 0)
+ if (h5repack(FNAME10, FNAME10OUT, &pack_options) < 0)
GOERROR;
- if (h5diff(FNAME10,FNAME10OUT,NULL,NULL,&diff_options) >0)
+ if (h5diff(FNAME10, FNAME10OUT, NULL, NULL, &diff_options) > 0)
GOERROR;
- if (h5repack_verify(FNAME10, FNAME10OUT,&pack_options)<=0)
+ if (h5repack_verify(FNAME10, FNAME10OUT, &pack_options) <= 0)
GOERROR;
- if (h5repack_end (&pack_options) < 0)
+ if (h5repack_end(&pack_options) < 0)
GOERROR;
PASSED();
@@ -1295,15 +1286,15 @@ int main (void)
TESTING(" copy of nbit filter");
- if (h5repack_init (&pack_options, 0, FALSE) < 0)
+ if (h5repack_init(&pack_options, 0, FALSE) < 0)
GOERROR;
- if (h5repack(FNAME12,FNAME12OUT,&pack_options) < 0)
+ if (h5repack(FNAME12, FNAME12OUT, &pack_options) < 0)
GOERROR;
- if (h5diff(FNAME12,FNAME12OUT,NULL,NULL,&diff_options) >0)
+ if (h5diff(FNAME12, FNAME12OUT, NULL, NULL, &diff_options) > 0)
GOERROR;
- if (h5repack_verify(FNAME12, FNAME12OUT,&pack_options)<=0)
+ if (h5repack_verify(FNAME12, FNAME12OUT, &pack_options) <= 0)
GOERROR;
- if (h5repack_end (&pack_options) < 0)
+ if (h5repack_end(&pack_options) < 0)
GOERROR;
PASSED();
@@ -1311,17 +1302,17 @@ int main (void)
TESTING(" removing nbit filter");
- if (h5repack_init (&pack_options, 0, FALSE) < 0)
+ if (h5repack_init(&pack_options, 0, FALSE) < 0)
GOERROR;
- if (h5repack_addfilter("dset_nbit:NONE",&pack_options) < 0)
+ if (h5repack_addfilter("dset_nbit:NONE", &pack_options) < 0)
GOERROR;
- if (h5repack(FNAME12,FNAME12OUT,&pack_options) < 0)
+ if (h5repack(FNAME12, FNAME12OUT, &pack_options) < 0)
GOERROR;
- if (h5diff(FNAME12,FNAME12OUT,NULL,NULL,&diff_options) >0)
+ if (h5diff(FNAME12, FNAME12OUT, NULL, NULL, &diff_options) > 0)
GOERROR;
- if (h5repack_verify(FNAME12, FNAME12OUT,&pack_options)<=0)
+ if (h5repack_verify(FNAME12, FNAME12OUT, &pack_options) <= 0)
GOERROR;
- if (h5repack_end (&pack_options) < 0)
+ if (h5repack_end(&pack_options) < 0)
GOERROR;
PASSED();
@@ -1329,17 +1320,17 @@ int main (void)
TESTING(" adding nbit filter");
- if (h5repack_init (&pack_options, 0, FALSE) < 0)
+ if (h5repack_init(&pack_options, 0, FALSE) < 0)
GOERROR;
- if (h5repack_addfilter("dset_int31:NBIT",&pack_options) < 0)
+ if (h5repack_addfilter("dset_int31:NBIT", &pack_options) < 0)
GOERROR;
- if (h5repack(FNAME12,FNAME12OUT,&pack_options) < 0)
+ if (h5repack(FNAME12, FNAME12OUT, &pack_options) < 0)
GOERROR;
- if (h5diff(FNAME12,FNAME12OUT,NULL,NULL,&diff_options) >0)
+ if (h5diff(FNAME12, FNAME12OUT, NULL, NULL, &diff_options) > 0)
GOERROR;
- if (h5repack_verify(FNAME12, FNAME12OUT,&pack_options)<=0)
+ if (h5repack_verify(FNAME12, FNAME12OUT, &pack_options)<= 0)
GOERROR;
- if (h5repack_end (&pack_options) < 0)
+ if (h5repack_end(&pack_options) < 0)
GOERROR;
PASSED();
@@ -1347,15 +1338,15 @@ int main (void)
TESTING(" copy of scaleoffset filter");
- if (h5repack_init (&pack_options, 0, FALSE) < 0)
+ if (h5repack_init(&pack_options, 0, FALSE) < 0)
GOERROR;
- if (h5repack(FNAME13,FNAME13OUT,&pack_options) < 0)
+ if (h5repack(FNAME13, FNAME13OUT, &pack_options) < 0)
GOERROR;
- if (h5diff(FNAME13,FNAME13OUT,NULL,NULL,&diff_options) >0)
+ if (h5diff(FNAME13, FNAME13OUT, NULL, NULL, &diff_options) > 0)
GOERROR;
- if (h5repack_verify(FNAME13, FNAME13OUT,&pack_options)<=0)
+ if (h5repack_verify(FNAME13, FNAME13OUT, &pack_options) <= 0)
GOERROR;
- if (h5repack_end (&pack_options) < 0)
+ if (h5repack_end(&pack_options) < 0)
GOERROR;
PASSED();
@@ -1363,17 +1354,17 @@ int main (void)
TESTING(" removing scaleoffset filter");
- if (h5repack_init (&pack_options, 0, FALSE) < 0)
+ if (h5repack_init(&pack_options, 0, FALSE) < 0)
GOERROR;
- if (h5repack_addfilter("dset_scaleoffset:NONE",&pack_options) < 0)
+ if (h5repack_addfilter("dset_scaleoffset:NONE", &pack_options) < 0)
GOERROR;
- if (h5repack(FNAME13,FNAME13OUT,&pack_options) < 0)
+ if (h5repack(FNAME13, FNAME13OUT, &pack_options) < 0)
GOERROR;
- if (h5diff(FNAME13,FNAME13OUT,NULL,NULL,&diff_options) >0)
+ if (h5diff(FNAME13, FNAME13OUT, NULL, NULL, &diff_options) > 0)
GOERROR;
- if (h5repack_verify(FNAME13, FNAME13OUT,&pack_options)<=0)
+ if (h5repack_verify(FNAME13, FNAME13OUT, &pack_options) <= 0)
GOERROR;
- if (h5repack_end (&pack_options) < 0)
+ if (h5repack_end(&pack_options) < 0)
GOERROR;
PASSED();
@@ -1381,53 +1372,52 @@ int main (void)
TESTING(" adding scaleoffset filter");
- if (h5repack_init (&pack_options, 0, FALSE) < 0)
+ if (h5repack_init(&pack_options, 0, FALSE) < 0)
GOERROR;
- if (h5repack_addfilter("dset_none:SOFF=31,IN",&pack_options) < 0)
+ if (h5repack_addfilter("dset_none:SOFF=31,IN", &pack_options) < 0)
GOERROR;
- if (h5repack(FNAME13,FNAME13OUT,&pack_options) < 0)
+ if (h5repack(FNAME13, FNAME13OUT, &pack_options) < 0)
GOERROR;
- if (h5diff(FNAME13,FNAME13OUT,NULL,NULL,&diff_options) >0)
+ if (h5diff(FNAME13, FNAME13OUT, NULL, NULL, &diff_options) > 0)
GOERROR;
- if (h5repack_verify(FNAME13, FNAME13OUT,&pack_options)<=0)
+ if (h5repack_verify(FNAME13, FNAME13OUT, &pack_options) <= 0)
GOERROR;
- if (h5repack_end (&pack_options) < 0)
+ if (h5repack_end(&pack_options) < 0)
GOERROR;
PASSED();
/*-------------------------------------------------------------------------
- * file with all filters
- * dset_all
- * dset_deflate
- * dset_szip
- * dset_shuffle
- * dset_fletcher32
- *-------------------------------------------------------------------------
- */
-
-
+ * file with all filters
+ * dset_all
+ * dset_deflate
+ * dset_szip
+ * dset_shuffle
+ * dset_fletcher32
+ *-------------------------------------------------------------------------
+ */
TESTING(" filter conversion from deflate to szip");
#if defined (H5_HAVE_FILTER_SZIP) && defined (H5_HAVE_FILTER_DEFLATE)
if (szip_can_encode) {
- if (h5repack_init (&pack_options, 0, FALSE) < 0)
+ if (h5repack_init(&pack_options, 0, FALSE) < 0)
GOERROR;
- if (h5repack_addfilter("dset_deflate:SZIP=8,NN",&pack_options) < 0)
+ if (h5repack_addfilter("dset_deflate:SZIP=8,NN", &pack_options) < 0)
GOERROR;
- if (h5repack(FNAME11,FNAME11OUT,&pack_options) < 0)
+ if (h5repack(FNAME11, FNAME11OUT, &pack_options) < 0)
GOERROR;
- if (h5diff(FNAME11,FNAME11OUT,NULL,NULL,&diff_options) >0)
+ if (h5diff(FNAME11, FNAME11OUT, NULL, NULL, &diff_options) > 0)
GOERROR;
- if (h5repack_verify(FNAME11, FNAME11OUT,&pack_options)<=0)
+ if (h5repack_verify(FNAME11, FNAME11OUT, &pack_options) <= 0)
GOERROR;
- if (h5repack_end (&pack_options) < 0)
+ if (h5repack_end(&pack_options) < 0)
GOERROR;
PASSED();
- } else {
+ }
+ else {
SKIPPED();
}
#else
@@ -1439,21 +1429,22 @@ int main (void)
#if defined (H5_HAVE_FILTER_SZIP) && defined (H5_HAVE_FILTER_DEFLATE)
if (szip_can_encode) {
- if (h5repack_init (&pack_options, 0, FALSE) < 0)
+ if (h5repack_init(&pack_options, 0, FALSE) < 0)
GOERROR;
- if (h5repack_addfilter("dset_szip:GZIP=1",&pack_options) < 0)
+ if (h5repack_addfilter("dset_szip:GZIP=1", &pack_options) < 0)
GOERROR;
- if (h5repack(FNAME11,FNAME11OUT,&pack_options) < 0)
+ if (h5repack(FNAME11, FNAME11OUT, &pack_options) < 0)
GOERROR;
- if (h5diff(FNAME11,FNAME11OUT,NULL,NULL,&diff_options) >0)
+ if (h5diff(FNAME11, FNAME11OUT, NULL, NULL, &diff_options) > 0)
GOERROR;
- if (h5repack_verify(FNAME11, FNAME11OUT,&pack_options)<=0)
+ if (h5repack_verify(FNAME11, FNAME11OUT, &pack_options) <= 0)
GOERROR;
- if (h5repack_end (&pack_options) < 0)
+ if (h5repack_end(&pack_options) < 0)
GOERROR;
PASSED();
- } else {
+ }
+ else {
SKIPPED();
}
#else
@@ -1462,25 +1453,25 @@ int main (void)
/*-------------------------------------------------------------------------
- * test the NONE global option
- *-------------------------------------------------------------------------
- */
+ * test the NONE global option
+ *-------------------------------------------------------------------------
+ */
TESTING(" removing all filters");
#if defined (H5_HAVE_FILTER_SZIP) && defined (H5_HAVE_FILTER_DEFLATE)
- if (h5repack_init (&pack_options, 0, FALSE) < 0)
+ if (h5repack_init(&pack_options, 0, FALSE) < 0)
GOERROR;
- if (h5repack_addfilter("NONE",&pack_options) < 0)
+ if (h5repack_addfilter("NONE", &pack_options) < 0)
GOERROR;
- if (h5repack(FNAME11,FNAME11OUT,&pack_options) < 0)
+ if (h5repack(FNAME11, FNAME11OUT, &pack_options) < 0)
GOERROR;
- if (h5diff(FNAME11,FNAME11OUT,NULL,NULL,&diff_options) >0)
+ if (h5diff(FNAME11, FNAME11OUT, NULL, NULL, &diff_options) > 0)
GOERROR;
- if (h5repack_verify(FNAME11, FNAME11OUT,&pack_options)<=0)
+ if (h5repack_verify(FNAME11, FNAME11OUT, &pack_options) <= 0)
GOERROR;
- if (h5repack_end (&pack_options) < 0)
+ if (h5repack_end(&pack_options) < 0)
GOERROR;
PASSED();
@@ -1489,44 +1480,44 @@ int main (void)
#endif
/*-------------------------------------------------------------------------
- * test a big file
- *-------------------------------------------------------------------------
- */
+ * test a big file
+ *-------------------------------------------------------------------------
+ */
TESTING(" big file");
- if (h5repack_init (&pack_options, 0, FALSE) < 0)
+ if (h5repack_init(&pack_options, 0, FALSE) < 0)
GOERROR;
- if (h5repack(FNAME14,FNAME14OUT,&pack_options) < 0)
+ if (h5repack(FNAME14, FNAME14OUT, &pack_options) < 0)
GOERROR;
- if (h5diff(FNAME14,FNAME14OUT,NULL,NULL,&diff_options) >0)
+ if (h5diff(FNAME14, FNAME14OUT, NULL, NULL, &diff_options) > 0)
GOERROR;
- if (h5repack_verify(FNAME14, FNAME14OUT,&pack_options)<=0)
+ if (h5repack_verify(FNAME14, FNAME14OUT, &pack_options) <= 0)
GOERROR;
- if (h5repack_end (&pack_options) < 0)
+ if (h5repack_end(&pack_options) < 0)
GOERROR;
PASSED();
/*-------------------------------------------------------------------------
- * test external dataset
- *-------------------------------------------------------------------------
- */
+ * test external dataset
+ *-------------------------------------------------------------------------
+ */
TESTING(" external datasets");
- if (h5repack_init (&pack_options, 0, FALSE) < 0)
+ if (h5repack_init(&pack_options, 0, FALSE) < 0)
GOERROR;
- if (h5repack(FNAME15,FNAME15OUT,&pack_options) < 0)
+ if (h5repack(FNAME15, FNAME15OUT, &pack_options) < 0)
GOERROR;
- if (h5diff(FNAME15,FNAME15OUT,NULL,NULL,&diff_options) > 0)
+ if (h5diff(FNAME15, FNAME15OUT, NULL, NULL, &diff_options) > 0)
GOERROR;
- if (h5repack_verify(FNAME15, FNAME15OUT,&pack_options)<=0)
+ if (h5repack_verify(FNAME15, FNAME15OUT, &pack_options) <= 0)
GOERROR;
- if (h5repack_end (&pack_options) < 0)
+ if (h5repack_end(&pack_options) < 0)
GOERROR;
PASSED();
/*-------------------------------------------------------------------------
- * test file with userblock
- *-------------------------------------------------------------------------
- */
+ * test file with userblock
+ *-------------------------------------------------------------------------
+ */
TESTING(" file with userblock");
if(h5repack_init(&pack_options, 0, FALSE) < 0)
GOERROR;
@@ -1543,53 +1534,53 @@ int main (void)
PASSED();
/*-------------------------------------------------------------------------
- * test --latest options
- *-------------------------------------------------------------------------
- */
+ * test --latest options
+ *-------------------------------------------------------------------------
+ */
TESTING(" latest file format options");
- if (h5repack_init (&pack_options, 0, FALSE) < 0)
+ if (h5repack_init(&pack_options, 0, FALSE) < 0)
GOERROR;
- pack_options.latest=1;
- pack_options.grp_compact=10;
- pack_options.grp_indexed=5;
+ pack_options.latest = 1;
+ pack_options.grp_compact = 10;
+ pack_options.grp_indexed = 5;
pack_options.msg_size[0] = 10;
pack_options.msg_size[1] = 20;
pack_options.msg_size[2] = 30;
pack_options.msg_size[3] = 40;
pack_options.msg_size[4] = 50;
- if (h5repack(FNAME1,FNAME1OUT,&pack_options) < 0)
+ if (h5repack(FNAME1, FNAME1OUT, &pack_options) < 0)
GOERROR;
- if (h5diff(FNAME1,FNAME1OUT,NULL,NULL,&diff_options) > 0)
+ if (h5diff(FNAME1, FNAME1OUT, NULL, NULL, &diff_options) > 0)
GOERROR;
- if (h5repack_verify(FNAME1, FNAME1OUT,&pack_options)<=0)
+ if (h5repack_verify(FNAME1, FNAME1OUT, &pack_options)<=0)
GOERROR;
- if (h5repack_end (&pack_options) < 0)
+ if (h5repack_end(&pack_options) < 0)
GOERROR;
PASSED();
/*-------------------------------------------------------------------------
- * test several global filters
- *-------------------------------------------------------------------------
- */
+ * test several global filters
+ *-------------------------------------------------------------------------
+ */
TESTING(" several global filters");
#if defined (H5_HAVE_FILTER_DEFLATE)
- if (h5repack_init (&pack_options, 0, FALSE) < 0)
+ if (h5repack_init(&pack_options, 0, FALSE) < 0)
GOERROR;
- if (h5repack_addfilter("GZIP=1",&pack_options) < 0)
+ if (h5repack_addfilter("GZIP=1", &pack_options) < 0)
GOERROR;
- if (h5repack_addfilter("SHUF",&pack_options) < 0)
+ if (h5repack_addfilter("SHUF", &pack_options) < 0)
GOERROR;
- if (h5repack(FNAME11,FNAME11OUT,&pack_options) < 0)
+ if (h5repack(FNAME11, FNAME11OUT, &pack_options) < 0)
GOERROR;
- if (h5diff(FNAME11,FNAME11OUT,NULL,NULL,&diff_options) >0)
+ if (h5diff(FNAME11, FNAME11OUT, NULL, NULL, &diff_options) > 0)
GOERROR;
- if (h5repack_verify(FNAME11, FNAME11OUT,&pack_options)<=0)
+ if (h5repack_verify(FNAME11, FNAME11OUT, &pack_options) <= 0)
GOERROR;
- if (h5repack_end (&pack_options) < 0)
+ if (h5repack_end(&pack_options) < 0)
GOERROR;
PASSED();
@@ -1599,9 +1590,9 @@ int main (void)
/*-------------------------------------------------------------------------
- * test file with userblock
- *-------------------------------------------------------------------------
- */
+ * test file with userblock
+ *-------------------------------------------------------------------------
+ */
TESTING(" file with added userblock");
#ifdef H5_HAVE_FILTER_DEFLATE
@@ -1632,9 +1623,9 @@ int main (void)
/*-------------------------------------------------------------------------
- * test file with aligment
- *-------------------------------------------------------------------------
- */
+ * test file with aligment
+ *-------------------------------------------------------------------------
+ */
TESTING(" file with aligment");
#ifdef H5_HAVE_FILTER_DEFLATE
@@ -1657,20 +1648,20 @@ int main (void)
{
hsize_t threshold;
hsize_t alignment;
- hid_t fapl;
- hid_t fid;
+ hid_t fapl;
+ hid_t fid;
- if (( fid = H5Fopen(FNAME8OUT, H5F_ACC_RDONLY, H5P_DEFAULT)) < 0 )
+ if ((fid = H5Fopen(FNAME8OUT, H5F_ACC_RDONLY, H5P_DEFAULT)) < 0)
GOERROR;
if ((fapl = H5Fget_access_plist(fid)) < 0)
GOERROR;
- if ( H5Pget_alignment(fapl, &threshold, &alignment ) < 0)
+ if (H5Pget_alignment(fapl, &threshold, &alignment) < 0)
GOERROR;
- if ( threshold != 1 )
+ if (threshold != 1)
GOERROR;
- if ( alignment != 1 )
+ if (alignment != 1)
GOERROR;
- if ( H5Pclose(fapl) < 0)
+ if (H5Pclose(fapl) < 0)
GOERROR;
if (H5Fclose(fid) < 0)
GOERROR;
@@ -1688,9 +1679,9 @@ int main (void)
#endif
/*-------------------------------------------------------------------------
- * test file with userblock
- *-------------------------------------------------------------------------
- */
+ * test file with userblock
+ *-------------------------------------------------------------------------
+ */
TESTING(" file with committed datatypes");
if(h5repack_init(&pack_options, 0, FALSE) < 0)
@@ -1709,13 +1700,13 @@ int main (void)
PASSED();
/*-------------------------------------------------------------------------
- * test --metadata_block_size option
- * Also verify that output file using the metadata_block_size option is
- * larger than the output file one not using it.
- * FNAME4 is used because it is the same as the test file used for the
- * shell script version of this test (h5repack.sh).
- *-------------------------------------------------------------------------
- */
+ * test --metadata_block_size option
+ * Also verify that output file using the metadata_block_size option is
+ * larger than the output file one not using it.
+ * FNAME4 is used because it is the same as the test file used for the
+ * shell script version of this test (h5repack.sh).
+ *-------------------------------------------------------------------------
+ */
TESTING(" metadata block size option");
/* First run without metadata option. No need to verify the correctness */
/* since this has been verified by earlier tests. Just record the file */
@@ -1753,9 +1744,9 @@ int main (void)
/*-------------------------------------------------------------------------
- * clean temporary test files
- *-------------------------------------------------------------------------
- */
+ * clean temporary test files
+ *-------------------------------------------------------------------------
+ */
{
hid_t fapl;
@@ -1780,24 +1771,24 @@ error:
/*-------------------------------------------------------------------------
* Function: make_testfiles
*
-* Purpose: make a test file with all types of HDF5 objects,
-* datatypes and filters
+* Purpose: make a test file with all types of HDF5 objects,
+* datatypes and filters
*
*-------------------------------------------------------------------------
*/
static
int make_testfiles(void)
{
- hid_t fid;
- hid_t fcpl; /* File creation property list */
- hid_t fapl; /* File access property list */
- unsigned j; /* Local index variable */
+ hid_t fid = -1;
+ hid_t fcpl = -1; /* File creation property list */
+ hid_t fapl = -1; /* File access property list */
+ unsigned j; /* Local index variable */
/*-------------------------------------------------------------------------
- * create a file for general copy test
- *-------------------------------------------------------------------------
- */
- if((fid = H5Fcreate(FNAME0,H5F_ACC_TRUNC,H5P_DEFAULT,H5P_DEFAULT)) < 0)
+ * create a file for general copy test
+ *-------------------------------------------------------------------------
+ */
+ if((fid = H5Fcreate(FNAME0, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT)) < 0)
return -1;
if (make_fill(fid) < 0)
goto out;
@@ -1805,10 +1796,10 @@ int make_testfiles(void)
return -1;
/*-------------------------------------------------------------------------
- * create another file for general copy test (all datatypes)
- *-------------------------------------------------------------------------
- */
- if((fid = H5Fcreate(FNAME1,H5F_ACC_TRUNC,H5P_DEFAULT,H5P_DEFAULT)) < 0)
+ * create another file for general copy test (all datatypes)
+ *-------------------------------------------------------------------------
+ */
+ if((fid = H5Fcreate(FNAME1, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT)) < 0)
return -1;
if (make_all_objects(fid) < 0)
goto out;
@@ -1816,10 +1807,10 @@ int make_testfiles(void)
return -1;
/*-------------------------------------------------------------------------
- * create a file for attributes copy test
- *-------------------------------------------------------------------------
- */
- if((fid = H5Fcreate(FNAME2,H5F_ACC_TRUNC,H5P_DEFAULT,H5P_DEFAULT)) < 0)
+ * create a file for attributes copy test
+ *-------------------------------------------------------------------------
+ */
+ if((fid = H5Fcreate(FNAME2, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT)) < 0)
return -1;
if (make_attributes(fid) < 0)
goto out;
@@ -1827,10 +1818,10 @@ int make_testfiles(void)
return -1;
/*-------------------------------------------------------------------------
- * create a file for hard links test
- *-------------------------------------------------------------------------
- */
- if((fid = H5Fcreate(FNAME3,H5F_ACC_TRUNC,H5P_DEFAULT,H5P_DEFAULT)) < 0)
+ * create a file for hard links test
+ *-------------------------------------------------------------------------
+ */
+ if((fid = H5Fcreate(FNAME3, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT)) < 0)
return -1;
if (make_hlinks(fid) < 0)
goto out;
@@ -1838,10 +1829,10 @@ int make_testfiles(void)
return -1;
/*-------------------------------------------------------------------------
- * create a file for layouts test
- *-------------------------------------------------------------------------
- */
- if((fid = H5Fcreate(FNAME4,H5F_ACC_TRUNC,H5P_DEFAULT,H5P_DEFAULT)) < 0)
+ * create a file for layouts test
+ *-------------------------------------------------------------------------
+ */
+ if((fid = H5Fcreate(FNAME4, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT)) < 0)
return -1;
if (make_layout(fid) < 0)
goto out;
@@ -1849,9 +1840,9 @@ int make_testfiles(void)
return -1;
/*-------------------------------------------------------------------------
- * create a file for layout conversion test
- *-------------------------------------------------------------------------
- */
+ * create a file for layout conversion test
+ *-------------------------------------------------------------------------
+ */
if((fid = H5Fcreate(FNAME18, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT)) < 0)
return -1;
@@ -1862,9 +1853,9 @@ int make_testfiles(void)
return -1;
/*-------------------------------------------------------------------------
- * for test layout conversions form chunk with unlimited max dims
- *-------------------------------------------------------------------------
- */
+ * for test layout conversions form chunk with unlimited max dims
+ *-------------------------------------------------------------------------
+ */
if((fid = H5Fcreate("h5repack_layout3.h5", H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT)) < 0)
return -1;
@@ -1875,18 +1866,18 @@ int make_testfiles(void)
return -1;
/*-------------------------------------------------------------------------
- * create a file for the H5D_ALLOC_TIME_EARLY test
- *-------------------------------------------------------------------------
- */
+ * create a file for the H5D_ALLOC_TIME_EARLY test
+ *-------------------------------------------------------------------------
+ */
if (make_early() < 0)
goto out;
/*-------------------------------------------------------------------------
- * create a file with the SZIP filter
- *-------------------------------------------------------------------------
- */
+ * create a file with the SZIP filter
+ *-------------------------------------------------------------------------
+ */
#ifdef H5_HAVE_FILTER_SZIP
- if((fid = H5Fcreate(FNAME7,H5F_ACC_TRUNC,H5P_DEFAULT,H5P_DEFAULT)) < 0)
+ if((fid = H5Fcreate(FNAME7, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT)) < 0)
return -1;
if (make_szip(fid) < 0)
goto out;
@@ -1896,10 +1887,10 @@ int make_testfiles(void)
/*-------------------------------------------------------------------------
- * create a file with the deflate filter
- *-------------------------------------------------------------------------
- */
- if((fid = H5Fcreate(FNAME8,H5F_ACC_TRUNC,H5P_DEFAULT,H5P_DEFAULT)) < 0)
+ * create a file with the deflate filter
+ *-------------------------------------------------------------------------
+ */
+ if((fid = H5Fcreate(FNAME8, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT)) < 0)
return -1;
if (make_deflate(fid) < 0)
goto out;
@@ -1907,10 +1898,10 @@ int make_testfiles(void)
return -1;
/*-------------------------------------------------------------------------
- * create a file with the shuffle filter
- *-------------------------------------------------------------------------
- */
- if((fid = H5Fcreate(FNAME9,H5F_ACC_TRUNC,H5P_DEFAULT,H5P_DEFAULT)) < 0)
+ * create a file with the shuffle filter
+ *-------------------------------------------------------------------------
+ */
+ if((fid = H5Fcreate(FNAME9, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT)) < 0)
return -1;
if (make_shuffle(fid) < 0)
goto out;
@@ -1918,10 +1909,10 @@ int make_testfiles(void)
return -1;
/*-------------------------------------------------------------------------
- * create a file with the fletcher32 filter
- *-------------------------------------------------------------------------
- */
- if((fid = H5Fcreate(FNAME10,H5F_ACC_TRUNC,H5P_DEFAULT,H5P_DEFAULT)) < 0)
+ * create a file with the fletcher32 filter
+ *-------------------------------------------------------------------------
+ */
+ if((fid = H5Fcreate(FNAME10, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT)) < 0)
return -1;
if (make_fletcher32(fid) < 0)
goto out;
@@ -1929,10 +1920,10 @@ int make_testfiles(void)
return -1;
/*-------------------------------------------------------------------------
- * create a file with all the filters
- *-------------------------------------------------------------------------
- */
- if((fid = H5Fcreate(FNAME11,H5F_ACC_TRUNC,H5P_DEFAULT,H5P_DEFAULT)) < 0)
+ * create a file with all the filters
+ *-------------------------------------------------------------------------
+ */
+ if((fid = H5Fcreate(FNAME11, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT)) < 0)
return -1;
if (make_all_filters(fid) < 0)
goto out;
@@ -1940,10 +1931,10 @@ int make_testfiles(void)
return -1;
/*-------------------------------------------------------------------------
- * create a file with the nbit filter
- *-------------------------------------------------------------------------
- */
- if((fid = H5Fcreate(FNAME12,H5F_ACC_TRUNC,H5P_DEFAULT,H5P_DEFAULT)) < 0)
+ * create a file with the nbit filter
+ *-------------------------------------------------------------------------
+ */
+ if((fid = H5Fcreate(FNAME12, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT)) < 0)
return -1;
if (make_nbit(fid) < 0)
goto out;
@@ -1951,10 +1942,10 @@ int make_testfiles(void)
return -1;
/*-------------------------------------------------------------------------
- * create a file with the scaleoffset filter
- *-------------------------------------------------------------------------
- */
- if((fid = H5Fcreate(FNAME13,H5F_ACC_TRUNC,H5P_DEFAULT,H5P_DEFAULT)) < 0)
+ * create a file with the scaleoffset filter
+ *-------------------------------------------------------------------------
+ */
+ if((fid = H5Fcreate(FNAME13, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT)) < 0)
return -1;
if (make_scaleoffset(fid) < 0)
goto out;
@@ -1962,10 +1953,10 @@ int make_testfiles(void)
return -1;
/*-------------------------------------------------------------------------
- * create a big dataset
- *-------------------------------------------------------------------------
- */
- if((fid = H5Fcreate(FNAME14,H5F_ACC_TRUNC,H5P_DEFAULT,H5P_DEFAULT)) < 0)
+ * create a big dataset
+ *-------------------------------------------------------------------------
+ */
+ if((fid = H5Fcreate(FNAME14, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT)) < 0)
return -1;
if (make_big(fid) < 0)
goto out;
@@ -1973,10 +1964,10 @@ int make_testfiles(void)
return -1;
/*-------------------------------------------------------------------------
- * create a file with external dataset
- *-------------------------------------------------------------------------
- */
- if((fid = H5Fcreate(FNAME15,H5F_ACC_TRUNC,H5P_DEFAULT,H5P_DEFAULT)) < 0)
+ * create a file with external dataset
+ *-------------------------------------------------------------------------
+ */
+ if((fid = H5Fcreate(FNAME15, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT)) < 0)
return -1;
if (make_external(fid) < 0)
goto out;
@@ -1984,24 +1975,24 @@ int make_testfiles(void)
return -1;
/*-------------------------------------------------------------------------
- * create a file with userblock
- *-------------------------------------------------------------------------
- */
+ * create a file with userblock
+ *-------------------------------------------------------------------------
+ */
if(make_userblock() < 0)
goto out;
/*-------------------------------------------------------------------------
- * create a userblock file
- *-------------------------------------------------------------------------
- */
+ * create a userblock file
+ *-------------------------------------------------------------------------
+ */
if(make_userblock_file() < 0)
goto out;
/*-------------------------------------------------------------------------
- * create a file with named datatypes
- *-------------------------------------------------------------------------
- */
- if((fid = H5Fcreate(FNAME17,H5F_ACC_TRUNC,H5P_DEFAULT,H5P_DEFAULT)) < 0)
+ * create a file with named datatypes
+ *-------------------------------------------------------------------------
+ */
+ if((fid = H5Fcreate(FNAME17, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT)) < 0)
return -1;
if (make_named_dtype(fid) < 0)
goto out;
@@ -2009,11 +2000,12 @@ int make_testfiles(void)
return -1;
/*-------------------------------------------------------------------------
- * create obj and region reference type datasets (bug1814)
- * add attribute with int type (bug1726)
- * add attribute with obj and region reference type (bug1726)
- *-------------------------------------------------------------------------*/
- if((fid = H5Fcreate(FNAME_REF,H5F_ACC_TRUNC,H5P_DEFAULT,H5P_DEFAULT)) < 0)
+ * create obj and region reference type datasets (bug1814)
+ * add attribute with int type (bug1726)
+ * add attribute with obj and region reference type (bug1726)
+ *-------------------------------------------------------------------------
+ */
+ if((fid = H5Fcreate(FNAME_REF, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT)) < 0)
return -1;
/* create reference type datasets */
if (make_references(fid) < 0)
@@ -2022,10 +2014,10 @@ int make_testfiles(void)
return -1;
/*-------------------------------------------------------------------------
- * create a file with obj and region references in attribute of compound and
- * vlen datatype
- *-------------------------------------------------------------------------*/
- if((fid = H5Fcreate(FNAME_ATTR_REF,H5F_ACC_TRUNC,H5P_DEFAULT,H5P_DEFAULT)) < 0)
+ * create a file with obj and region references in attribute of compound and
+ * vlen datatype
+ *-------------------------------------------------------------------------*/
+ if((fid = H5Fcreate(FNAME_ATTR_REF, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT)) < 0)
return -1;
if (make_complex_attr_references(fid) < 0)
goto out;
@@ -2044,9 +2036,9 @@ int make_testfiles(void)
if(H5Pset_libver_bounds(fapl, H5F_LIBVER_LATEST, H5F_LIBVER_LATEST) < 0)
return -1;
- /*
- * #0 -- h5repack_latest.h5
- * default: strategy=FSM_AGGR, persist=FALSE, threshold=1
+ /*
+ * #0 -- h5repack_latest.h5
+ * default: strategy=FSM_AGGR, persist=FALSE, threshold=1
* default: inpage=4096
*/
j = 0;
@@ -2055,9 +2047,9 @@ int make_testfiles(void)
if(H5Fclose(fid) < 0)
return -1;
- /*
- * #1 -- h5repack_default.h5
- * default: strategy=FSM_AGGR, persist=FALSE, threshold=1
+ /*
+ * #1 -- h5repack_default.h5
+ * default: strategy=FSM_AGGR, persist=FALSE, threshold=1
* default: inpage=4096
*/
HDassert(j < NELMTS(H5REPACK_FSPACE_FNAMES));
@@ -2066,11 +2058,11 @@ int make_testfiles(void)
if(H5Fclose(fid) < 0)
return -1;
- /*
+ /*
* #2 -- h5repack_page_persist.h5
- * Setting:
- * strategy=PAGE, persist=TRUE, threshold=1
- * inpage=512
+ * Setting:
+ * strategy=PAGE, persist=TRUE, threshold=1
+ * inpage=512
* latest format
*/
/* Create file creation property list */
@@ -2089,10 +2081,10 @@ int make_testfiles(void)
return -1;
- /*
+ /*
* #3 -- h5repack_fsm_aggr_persist.h5
* Setting:
- * strategy=FSM_AGGR, persist=TRUE, threshold=1
+ * strategy=FSM_AGGR, persist=TRUE, threshold=1
* default: inpage=4096
*/
/* Create file creation property list */
@@ -2109,10 +2101,10 @@ int make_testfiles(void)
return -1;
- /*
+ /*
* #4 -- h5repack_page_threshold.h5
* Setting:
- * strategy=PAGE, persist=FALSE, threshold=3
+ * strategy=PAGE, persist=FALSE, threshold=3
* inpage=8192
* latest format
*/
@@ -2135,8 +2127,8 @@ int make_testfiles(void)
/*
* #5 -- h5repack_fsm_aggr_threshold.h5
* Setting:
- * strategy=FSM_AGGR, persist=FALSE, threshold=3
- * inpage=4096
+ * strategy=FSM_AGGR, persist=FALSE, threshold=3
+ * inpage=4096
*/
/* Create file creation property list */
@@ -2154,10 +2146,10 @@ int make_testfiles(void)
if(H5Pclose(fcpl) < 0)
return -1;
- /*
- * #6 -- h5repack_aggr.h5
+ /*
+ * #6 -- h5repack_aggr.h5
* Setting:
- * strategy=AGGR, persist=FALSE, threshold=1
+ * strategy=AGGR, persist=FALSE, threshold=1
* latest format
*/
@@ -2174,11 +2166,11 @@ int make_testfiles(void)
if(H5Pclose(fcpl) < 0)
return -1;
- /*
+ /*
* #7 -- h5repack_none.h5
* Setting:
- * strategy=NONE, persist=FALSE, threshold=1
- * inpage=8192
+ * strategy=NONE, persist=FALSE, threshold=1
+ * inpage=8192
*/
/* Create file creation property list */
@@ -2211,20 +2203,20 @@ out:
/*-------------------------------------------------------------------------
* Function: make_all_objects
*
-* Purpose: make a test file with all types of HDF5 objects
+* Purpose: make a test file with all types of HDF5 objects
*
*-------------------------------------------------------------------------
*/
static
int make_all_objects(hid_t loc_id)
{
- hid_t did=-1;
- hid_t gid=-1;
- hid_t tid=-1;
- hid_t rid=-1;
- hid_t sid=-1;
- hid_t gcplid=-1;
- hsize_t dims[1]={2};
+ hid_t did = -1;
+ hid_t gid = -1;
+ hid_t tid = -1;
+ hid_t rid = -1;
+ hid_t sid = -1;
+ hid_t gcplid = -1;
+ hsize_t dims[1] = {2};
/* compound datatype */
typedef struct s_t
{
@@ -2299,7 +2291,7 @@ int make_all_objects(hid_t loc_id)
if ((rid = H5Gopen2(loc_id, "/", H5P_DEFAULT)) < 0)
goto out;
- if (write_dset_in(rid,"dset_referenced",loc_id,0) < 0)
+ if (write_dset_in(rid, "dset_referenced", loc_id, 0) < 0)
goto out;
if (H5Gclose(rid) < 0)
goto out;
@@ -2333,18 +2325,18 @@ out:
/*-------------------------------------------------------------------------
* Function: make_attributes
*
-* Purpose: make a test file with all types of attributes
+* Purpose: make a test file with all types of attributes
*
*-------------------------------------------------------------------------
*/
static
int make_attributes(hid_t loc_id)
{
- hid_t did=-1;
- hid_t gid=-1;
- hid_t rid=-1;
- hid_t sid=-1;
- hsize_t dims[1]={2};
+ hid_t did = -1;
+ hid_t gid = -1;
+ hid_t rid = -1;
+ hid_t sid = -1;
+ hsize_t dims[1] = {2};
/*-------------------------------------------------------------------------
* H5G_DATASET
@@ -2369,11 +2361,11 @@ int make_attributes(hid_t loc_id)
*-------------------------------------------------------------------------
*/
- if ( write_attr_in(did,"dset",loc_id,0) < 0)
+ if ( write_attr_in(did, "dset", loc_id, 0) < 0)
goto out;
- if (write_attr_in(gid,"dset",loc_id,0) < 0)
+ if (write_attr_in(gid, "dset", loc_id, 0) < 0)
goto out;
- if (write_attr_in(rid,"dset",loc_id,0) < 0)
+ if (write_attr_in(rid, "dset", loc_id, 0) < 0)
goto out;
/* close */
@@ -2403,18 +2395,18 @@ out:
/*-------------------------------------------------------------------------
* Function: make_hlinks
*
-* Purpose: make a test file with hard links
+* Purpose: make a test file with hard links
*
*-------------------------------------------------------------------------
*/
static
int make_hlinks(hid_t loc_id)
{
- hid_t g1id=-1;
- hid_t g2id=-1;
- hid_t g3id=-1;
- hsize_t dims[2]={3,2};
- int buf[3][2]= {{1,1},{1,2},{2,2}};
+ hid_t g1id =- 1;
+ hid_t g2id = -1;
+ hid_t g3id = -1;
+ hsize_t dims[2] = {3,2};
+ int buf[3][2] = {{1,1}, {1,2}, {2,2}};
/*-------------------------------------------------------------------------
* create a dataset and some hard links to it
@@ -2473,7 +2465,7 @@ out:
/*-------------------------------------------------------------------------
* Function: make_szip
*
-* Purpose: make a dataset with the SZIP filter
+* Purpose: make a dataset with the SZIP filter
*
*-------------------------------------------------------------------------
*/
@@ -2481,21 +2473,19 @@ out:
static
int make_szip(hid_t loc_id)
{
- hid_t dcpl; /* dataset creation property list */
- hid_t sid; /* dataspace ID */
- unsigned szip_options_mask=H5_SZIP_ALLOW_K13_OPTION_MASK|H5_SZIP_NN_OPTION_MASK;
- unsigned szip_pixels_per_block=8;
- hsize_t dims[RANK]={DIM1,DIM2};
- hsize_t chunk_dims[RANK]={CDIM1,CDIM2};
+ hid_t dcpl = -1; /* dataset creation property list */
+ hid_t sid = -1; /* dataspace ID */
+ unsigned szip_options_mask = H5_SZIP_ALLOW_K13_OPTION_MASK | H5_SZIP_NN_OPTION_MASK;
+ unsigned szip_pixels_per_block = 8;
+ hsize_t dims[RANK] = {DIM1, DIM2};
+ hsize_t chunk_dims[RANK] = {CDIM1, CDIM2};
int buf[DIM1][DIM2];
int i, j, n;
int szip_can_encode = 0;
- for (i=n=0; i<DIM1; i++)
- {
- for (j=0; j<DIM2; j++)
- {
- buf[i][j]=n++;
+ for (i = n = 0; i < DIM1; i++) {
+ for (j = 0; j < DIM2; j++) {
+ buf[i][j] = n++;
}
}
/* create a space */
@@ -2514,21 +2504,17 @@ int make_szip(hid_t loc_id)
*/
/* Make sure encoding is enabled */
if (h5tools_can_encode(H5Z_FILTER_SZIP) == 1)
- {
szip_can_encode = 1;
- }
- if (szip_can_encode)
- {
+
+ if (szip_can_encode) {
/* set szip data */
- if(H5Pset_szip (dcpl,szip_options_mask,szip_pixels_per_block) < 0)
+ if(H5Pset_szip (dcpl, szip_options_mask, szip_pixels_per_block) < 0)
goto out;
- if (make_dset(loc_id,"dset_szip",sid,dcpl,buf) < 0)
+ if (make_dset(loc_id, "dset_szip", sid, dcpl, buf) < 0)
goto out;
}
else
- {
/* WARNING? SZIP is decoder only, can't generate test files */
- }
if(H5Sclose(sid) < 0)
goto out;
@@ -2558,20 +2544,18 @@ out:
static
int make_deflate(hid_t loc_id)
{
- hid_t dcpl; /* dataset creation property list */
- hid_t sid; /* dataspace ID */
- hsize_t dims[RANK]={DIM1,DIM2};
- hsize_t chunk_dims[RANK]={CDIM1,CDIM2};
+ hid_t dcpl = -1; /* dataset creation property list */
+ hid_t sid = -1; /* dataspace ID */
+ hsize_t dims[RANK] = {DIM1,DIM2};
+ hsize_t chunk_dims[RANK] = {CDIM1,CDIM2};
int buf[DIM1][DIM2];
hobj_ref_t bufref[1]; /* reference */
- hsize_t dims1r[1]={1};
+ hsize_t dims1r[1] = {1};
int i, j, n;
- for (i=n=0; i<DIM1; i++)
- {
- for (j=0; j<DIM2; j++)
- {
- buf[i][j]=n++;
+ for (i = n = 0; i < DIM1; i++) {
+ for (j = 0; j < DIM2; j++) {
+ buf[i][j] = n++;
}
}
@@ -2593,14 +2577,14 @@ int make_deflate(hid_t loc_id)
/* set deflate data */
if(H5Pset_deflate(dcpl, 9) < 0)
goto out;
- if (make_dset(loc_id,"dset_deflate",sid,dcpl,buf) < 0)
+ if (make_dset(loc_id, "dset_deflate", sid, dcpl, buf) < 0)
goto out;
/* create a reference to the dataset, test second seeep of file for references */
- if (H5Rcreate(&bufref[0],loc_id,"dset_deflate",H5R_OBJECT,(hid_t)-1) < 0)
+ if (H5Rcreate(&bufref[0], loc_id, "dset_deflate", H5R_OBJECT, (hid_t)-1) < 0)
goto out;
- if (write_dset(loc_id,1,dims1r,"ref",H5T_STD_REF_OBJ,bufref) < 0)
+ if (write_dset(loc_id, 1, dims1r, "ref", H5T_STD_REF_OBJ, bufref) < 0)
goto out;
#endif
@@ -2700,18 +2684,16 @@ out:
static
int make_fletcher32(hid_t loc_id)
{
- hid_t dcpl; /* dataset creation property list */
- hid_t sid; /* dataspace ID */
+ hid_t dcpl = -1; /* dataset creation property list */
+ hid_t sid = -1; /* dataspace ID */
hsize_t dims[RANK]={DIM1,DIM2};
hsize_t chunk_dims[RANK]={CDIM1,CDIM2};
int buf[DIM1][DIM2];
int i, j, n;
- for (i=n=0; i<DIM1; i++)
- {
- for (j=0; j<DIM2; j++)
- {
- buf[i][j]=n++;
+ for (i = n = 0; i < DIM1; i++) {
+ for (j = 0; j < DIM2; j++) {
+ buf[i][j] = n++;
}
}
/* create a space */
@@ -2769,20 +2751,18 @@ out:
static
int make_nbit(hid_t loc_id)
{
- hid_t dcpl; /* dataset creation property list */
- hid_t sid; /* dataspace ID */
- hid_t dtid;
- hid_t dsid;
+ hid_t dcpl = -1; /* dataset creation property list */
+ hid_t sid = -1; /* dataspace ID */
+ hid_t dtid = -1;
+ hid_t dsid = -1;
hsize_t dims[RANK]={DIM1,DIM2};
hsize_t chunk_dims[RANK]={CDIM1,CDIM2};
int buf[DIM1][DIM2];
int i, j, n;
- for (i=n=0; i<DIM1; i++)
- {
- for (j=0; j<DIM2; j++)
- {
- buf[i][j]=n++;
+ for (i = n = 0; i < DIM1; i++) {
+ for (j = 0; j < DIM2; j++) {
+ buf[i][j] = n++;
}
}
/* create a space */
@@ -2797,43 +2777,25 @@ int make_nbit(hid_t loc_id)
dtid = H5Tcopy(H5T_NATIVE_INT);
if (H5Tset_precision(dtid,(H5Tget_precision(dtid) - 1)) < 0)
- {
- H5Tclose(dtid);
goto out;
- }
/* remove the filters from the dcpl */
if(H5Premove_filter(dcpl, H5Z_FILTER_ALL) < 0)
- {
- H5Tclose(dtid);
goto out;
- }
- if(H5Pset_nbit(dcpl) < 0) {
- H5Tclose(dtid);
+ if(H5Pset_nbit(dcpl) < 0)
goto out;
- }
- if((dsid = H5Dcreate2(loc_id, "dset_nbit", dtid, sid, H5P_DEFAULT, dcpl, H5P_DEFAULT)) < 0) {
- H5Tclose(dtid);
+ if((dsid = H5Dcreate2(loc_id, "dset_nbit", dtid, sid, H5P_DEFAULT, dcpl, H5P_DEFAULT)) < 0)
goto out;
- }
- if(H5Dwrite(dsid, dtid, H5S_ALL, H5S_ALL, H5P_DEFAULT, buf) < 0) {
- H5Tclose(dtid);
+ if(H5Dwrite(dsid, dtid, H5S_ALL, H5S_ALL, H5P_DEFAULT, buf) < 0)
goto out;
- }
H5Dclose(dsid);
- if(H5Premove_filter(dcpl, H5Z_FILTER_ALL) < 0) {
- H5Tclose(dtid);
+ if(H5Premove_filter(dcpl, H5Z_FILTER_ALL) < 0)
goto out;
- }
- if((dsid = H5Dcreate2(loc_id, "dset_int31", dtid, sid, H5P_DEFAULT, dcpl, H5P_DEFAULT)) < 0) {
- H5Tclose(dtid);
+ if((dsid = H5Dcreate2(loc_id, "dset_int31", dtid, sid, H5P_DEFAULT, dcpl, H5P_DEFAULT)) < 0)
goto out;
- }
- if(H5Dwrite(dsid, dtid, H5S_ALL, H5S_ALL, H5P_DEFAULT, buf) < 0) {
- H5Tclose(dtid);
+ if(H5Dwrite(dsid, dtid, H5S_ALL, H5S_ALL, H5P_DEFAULT, buf) < 0)
goto out;
- }
H5Dclose(dsid);
/*-------------------------------------------------------------------------
@@ -2851,8 +2813,10 @@ int make_nbit(hid_t loc_id)
out:
H5E_BEGIN_TRY {
+ H5Tclose(dtid);
H5Pclose(dcpl);
H5Sclose(sid);
+ H5Dclose(dsid);
} H5E_END_TRY;
return -1;
}
@@ -2868,20 +2832,18 @@ out:
static
int make_scaleoffset(hid_t loc_id)
{
- hid_t dcpl; /* dataset creation property list */
- hid_t sid; /* dataspace ID */
- hid_t dtid;
- hid_t dsid;
- hsize_t dims[RANK]={DIM1,DIM2};
- hsize_t chunk_dims[RANK]={CDIM1,CDIM2};
+ hid_t dcpl = -1; /* dataset creation property list */
+ hid_t sid = -1; /* dataspace ID */
+ hid_t dtid = -1;
+ hid_t dsid = -1;
+ hsize_t dims[RANK] = {DIM1,DIM2};
+ hsize_t chunk_dims[RANK] = {CDIM1,CDIM2};
int buf[DIM1][DIM2];
int i, j, n;
- for (i=n=0; i<DIM1; i++)
- {
- for (j=0; j<DIM2; j++)
- {
- buf[i][j]=n++;
+ for (i = n = 0; i < DIM1; i++) {
+ for (j = 0; j < DIM2; j++) {
+ buf[i][j] = n++;
}
}
/* create a space */
@@ -2897,31 +2859,19 @@ int make_scaleoffset(hid_t loc_id)
dtid = H5Tcopy(H5T_NATIVE_INT);
/* remove the filters from the dcpl */
- if(H5Premove_filter(dcpl, H5Z_FILTER_ALL) < 0) {
- H5Tclose(dtid);
+ if(H5Premove_filter(dcpl, H5Z_FILTER_ALL) < 0)
goto out;
- }
- if(H5Pset_scaleoffset(dcpl, H5Z_SO_INT, 31) < 0) {
- H5Tclose(dtid);
+ if(H5Pset_scaleoffset(dcpl, H5Z_SO_INT, 31) < 0)
goto out;
- }
- if((dsid = H5Dcreate2(loc_id, "dset_scaleoffset", dtid, sid, H5P_DEFAULT, dcpl, H5P_DEFAULT)) < 0) {
- H5Tclose(dtid);
+ if((dsid = H5Dcreate2(loc_id, "dset_scaleoffset", dtid, sid, H5P_DEFAULT, dcpl, H5P_DEFAULT)) < 0)
goto out;
- }
- if(H5Dwrite(dsid, dtid, H5S_ALL, H5S_ALL, H5P_DEFAULT, buf) < 0) {
- H5Tclose(dtid);
+ if(H5Dwrite(dsid, dtid, H5S_ALL, H5S_ALL, H5P_DEFAULT, buf) < 0)
goto out;
- }
H5Dclose(dsid);
- if((dsid = H5Dcreate2(loc_id, "dset_none", dtid, sid, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) {
- H5Tclose(dtid);
+ if((dsid = H5Dcreate2(loc_id, "dset_none", dtid, sid, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0)
goto out;
- }
- if(H5Dwrite(dsid, dtid, H5S_ALL, H5S_ALL, H5P_DEFAULT, buf) < 0) {
- H5Tclose(dtid);
+ if(H5Dwrite(dsid, dtid, H5S_ALL, H5S_ALL, H5P_DEFAULT, buf) < 0)
goto out;
- }
H5Tclose(dtid);
H5Dclose(dsid);
@@ -2938,6 +2888,8 @@ int make_scaleoffset(hid_t loc_id)
out:
H5E_BEGIN_TRY {
+ H5Dclose(dsid);
+ H5Tclose(dtid);
H5Pclose(dcpl);
H5Sclose(sid);
} H5E_END_TRY;
@@ -2948,7 +2900,7 @@ out:
/*-------------------------------------------------------------------------
* Function: make_all_filters
*
-* Purpose: make a file with all filters
+* Purpose: make a file with all filters
*
*-------------------------------------------------------------------------
*/
@@ -3089,9 +3041,9 @@ int make_all_filters(hid_t loc_id)
/* close */
if(H5Tclose(dtid) < 0)
- return -1;
+ goto out;
if(H5Dclose(dsid) < 0)
- return -1;
+ goto out;
if(H5Sclose(sid) < 0)
goto out;
@@ -3103,6 +3055,8 @@ int make_all_filters(hid_t loc_id)
out:
H5E_BEGIN_TRY
{
+ H5Tclose(dtid);
+ H5Dclose(dsid);
H5Pclose(dcpl);
H5Sclose(sid);
} H5E_END_TRY;
@@ -3376,7 +3330,7 @@ out:
H5E_BEGIN_TRY {
H5Pclose(contig_dcpl);
H5Pclose(chunked_dcpl);
-
+
H5Sclose(s_sid);
} H5E_END_TRY;
@@ -3391,9 +3345,9 @@ out:
* Purpose: make chunked datasets with unlimited max dim and chunk dim is
* bigger than current dim. (HDFFV-7933)
* Test for converting chunk to chunk , chunk to conti and chunk
-* to compact.
-* - The chunk to chunk changes layout bigger than any current dim
-* again.
+* to compact.
+* - The chunk to chunk changes layout bigger than any current dim
+* again.
* - The chunk to compact test dataset bigger than 64K, should
* remain original layout.*
*
@@ -3757,7 +3711,7 @@ make_userblock(void)
ub[u] = (char)('a' + (char)(u % 26));
/* Re-open HDF5 file, as "plain" file */
- if((fd = HDopen(FNAME16, O_WRONLY, 0644)) < 0)
+ if((fd = HDopen(FNAME16, O_WRONLY)) < 0)
goto out;
/* Write userblock data */
@@ -3821,7 +3775,7 @@ verify_userblock( const char* filename)
/* Re-open HDF5 file, as "plain" file */
- if((fd = HDopen(filename, O_RDONLY, 0)) < 0)
+ if((fd = HDopen(filename, O_RDONLY)) < 0)
goto out;
/* Read userblock data */
@@ -3870,7 +3824,7 @@ make_userblock_file(void)
ub[u] = (char)('a' + (char)(u % 26));
/* open file */
- if((fd = HDopen(FNAME_UB,O_WRONLY|O_CREAT|O_TRUNC, 0644 )) < 0)
+ if((fd = HDopen(FNAME_UB, O_WRONLY|O_CREAT|O_TRUNC, H5_POSIX_CREATE_MODE_RW)) < 0)
goto out;
/* write userblock data */
@@ -4451,7 +4405,7 @@ int write_dset_in(hid_t loc_id,
for(k = 0; k < 2; k++) {
if(make_diffs)
buf23[i][j][k] = 0;
- else
+ else
buf23[i][j][k] = (char)(n++);
}
}
@@ -6197,9 +6151,9 @@ out:
/*-------------------------------------------------------------------------
* Function: add_attr_with_objref
*
- * Purpose:
+ * Purpose:
* Create attributes with object reference to objects (dset,
- * group, datatype).
+ * group, datatype).
*
* Note:
* this function depends on locally created objects, however can be modified
@@ -6217,7 +6171,7 @@ static herr_t add_attr_with_objref(hid_t file_id, hid_t obj_id)
/* --------------------------------
* add attribute with obj ref type
- */
+ */
/* ref to dset */
status = H5Rcreate(&data_attr_objref[0],file_id,NAME_OBJ_DS1,H5R_OBJECT,(hid_t)-1);
if (status < 0)
@@ -6263,7 +6217,7 @@ out:
/*-------------------------------------------------------------------------
* Function: add_attr_with_regref
*
- * Purpose:
+ * Purpose:
* Create attributes with region reference to dset
*
* Note:
@@ -6334,11 +6288,11 @@ out:
/*-------------------------------------------------------------------------
* Function: gen_refered_objs
*
- * Purpose:
+ * Purpose:
* Create objects (dataset, group, datatype) to be referenced
*
* Note:
- * This function is to use along with gen_obj_ref() gen_region_ref()
+ * This function is to use along with gen_obj_ref() gen_region_ref()
*
* Programmer: Jonathan Kim (March 23, 2010)
*------------------------------------------------------------------------*/
@@ -6353,12 +6307,12 @@ static herr_t gen_refered_objs(hid_t loc_id)
int data[3] = {10,20,30};
/* Dset2 */
- hid_t sid2=0, did2=0;
+ hid_t sid2=0, did2=0;
hsize_t dims2[2] = {3,16};
char data2[3][16] = {"The quick brown", "fox jumps over ", "the 5 lazy dogs"};
/*-----------------------
- * add short dataset
+ * add short dataset
* (define NAME_OBJ_DS1)
*/
sid = H5Screate_simple(1, dims1, NULL);
@@ -6386,7 +6340,7 @@ static herr_t gen_refered_objs(hid_t loc_id)
}
/*--------------
- * add group
+ * add group
* (define NAME_OBJ_GRP)
*/
gid = H5Gcreate2 (loc_id, NAME_OBJ_GRP, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
@@ -6456,17 +6410,17 @@ out:
if(sid2 > 0)
H5Sclose(sid2);
return ret;
-
+
}
/*-------------------------------------------------------------------------
* Function: gen_obj_ref
*
- * Purpose:
+ * Purpose:
* Generate object references to objects (dataset,group and named datatype)
*
* Note:
- * copied from h5copygentest.c and upate to create named datatype
+ * copied from h5copygentest.c and upate to create named datatype
*
* Programmer: Jonathan Kim (March 18, 2010)
*------------------------------------------------------------------------*/
@@ -6480,7 +6434,7 @@ static herr_t gen_obj_ref(hid_t loc_id)
/* attr with int type */
hsize_t dim_attr_int[1]={2};
- int data_attr_int[2] = {10,20};
+ int data_attr_int[2] = {10,20};
/* write buffer for obj reference */
hobj_ref_t objref_buf[3];
@@ -6517,7 +6471,7 @@ static herr_t gen_obj_ref(hid_t loc_id)
}
/*---------------------------------------------------------
- * create dataset contain references
+ * create dataset contain references
*/
sid = H5Screate_simple (1, dims_dset_objref, NULL);
if (sid < 0)
@@ -6581,7 +6535,7 @@ out:
* Purpose: Generate dataset region references
*
* Note:
- * copied from h5copygentest.c
+ * copied from h5copygentest.c
*
* Programmer: Jonathan Kim (March 18, 2010)
*------------------------------------------------------------------------*/
@@ -6591,11 +6545,11 @@ static herr_t gen_region_ref(hid_t loc_id)
herr_t ret = SUCCEED;
/* target dataset */
- hid_t sid_trg=0;
+ hid_t sid_trg=0;
hsize_t dims_trg[2] = {3,16};
/* dset with region ref type */
- hid_t sid_ref=0, oid_ref=0;
+ hid_t sid_ref=0, oid_ref=0;
/* region ref to target dataset */
hsize_t coords[4][2] = { {0,1}, {2,11}, {1,0}, {2,4} };
@@ -6608,7 +6562,7 @@ static herr_t gen_region_ref(hid_t loc_id)
/* attr with int type */
hsize_t dim_attr_int[1]={2};
- int data_attr_int[2] = {10,20};
+ int data_attr_int[2] = {10,20};
sid_trg = H5Screate_simple (2, dims_trg, NULL);
if (sid_trg < 0)
@@ -6709,7 +6663,7 @@ out:
if (sid_ref > 0)
H5Sclose (sid_ref);
if (sid_trg > 0)
- H5Sclose (sid_trg);
+ H5Sclose (sid_trg);
return ret;
}
@@ -6717,7 +6671,7 @@ out:
/*-------------------------------------------------------------------------
* Function: make_references
*
-* Purpose: create a file with obj and region references
+* Purpose: create a file with obj and region references
*
* Programmer: Jonathan Kim (March 18, 2010)
*-------------------------------------------------------------------------
@@ -6733,7 +6687,7 @@ static herr_t make_references(hid_t loc_id)
{
fprintf(stderr, "Failed to generate referenced object.\n");
ret = FAIL;
- }
+ }
/* add object reference */
status = gen_obj_ref(loc_id);
@@ -6757,7 +6711,7 @@ static herr_t make_references(hid_t loc_id)
/*-------------------------------------------------------------------------
* Function: make_complex_attr_references
*
-* Purpose:
+* Purpose:
* create a file with :
* 1. obj ref in attribute of compound type
* 2. region ref in attribute of compound type
@@ -6789,14 +6743,14 @@ static herr_t make_references(hid_t loc_id)
/* 4. region references in vlen attr */
#define RANK_VLEN_REGREF 1
#define DIM_VLEN_REGREF 1 /* for element region */
-#define LEN0_VLEN_REGREF 1 /* element region */
+#define LEN0_VLEN_REGREF 1 /* element region */
static herr_t make_complex_attr_references(hid_t loc_id)
{
herr_t ret = SUCCEED;
- herr_t status;
- /*
- * for objects
+ herr_t status;
+ /*
+ * for objects
*/
hid_t objgid=0, objdid=0, objtid=0, objsid=0;
hsize_t obj_dims[RANK_OBJ] = {DIM0_OBJ, DIM1_OBJ};
@@ -6817,8 +6771,8 @@ static herr_t make_complex_attr_references(hid_t loc_id)
*/
hsize_t main_dset_dims[RANK_DSET] = {DIM_DSET};
hid_t main_sid=0, main_did=0;
- /*
- * 1. obj references in compound attr
+ /*
+ * 1. obj references in compound attr
*/
hid_t comp_objref_tid=0, comp_objref_aid=0;
typedef struct comp_objref_t {
@@ -6829,8 +6783,8 @@ static herr_t make_complex_attr_references(hid_t loc_id)
hid_t comp_objref_attr_sid=0;
hsize_t comp_objref_dim[RANK_COMP_OBJREF] = {DIM_COMP_OBJREF};
- /*
- * 2. region references in compound attr
+ /*
+ * 2. region references in compound attr
*/
hid_t comp_regref_tid=0, comp_regref_aid=0;
typedef struct comp_regref_t {
@@ -6841,16 +6795,16 @@ static herr_t make_complex_attr_references(hid_t loc_id)
hid_t comp_regref_attr_sid=0;
hsize_t comp_regref_dim[RANK_COMP_REGREF] = {DIM_COMP_REGREF};
hsize_t coords[4][2] = { {0,1}, {2,3}, {3,4}, {4,5} };
-
- /*
- * 3. obj references in vlen attr
+
+ /*
+ * 3. obj references in vlen attr
*/
hid_t vlen_objref_attr_tid=0, vlen_objref_attr_sid=0;
hid_t vlen_objref_attr_id=0;
hvl_t vlen_objref_data[DIM_VLEN_OBJREF];
hsize_t vlen_objref_dims[RANK_VLEN_OBJREF] = {DIM_VLEN_OBJREF};
- /*
+ /*
* 4. region references in vlen attr
*/
hid_t vlen_regref_attr_tid=0, vlen_regref_attr_sid=0;
@@ -6860,7 +6814,7 @@ static herr_t make_complex_attr_references(hid_t loc_id)
/* ---------------------------------------
- * create objects which to be referenced
+ * create objects which to be referenced
*/
/* object1 group */
objgid = H5Gcreate2(loc_id, NAME_OBJ_GRP, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
@@ -6888,7 +6842,7 @@ static herr_t make_complex_attr_references(hid_t loc_id)
/* ---------------------------------------------
- * Put testing objs in this group
+ * Put testing objs in this group
* create group contain dataset with attribute and the attribute has
* compound type which contain obj and region reference */
main_gid = H5Gcreate2(loc_id, "group_main", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
@@ -6905,7 +6859,7 @@ static herr_t make_complex_attr_references(hid_t loc_id)
main_sid = H5Screate_simple(RANK_DSET, main_dset_dims, NULL);
main_did = H5Dcreate2(main_gid, "dset_main", H5T_NATIVE_INT, main_sid, H5P_DEFAULT,H5P_DEFAULT, H5P_DEFAULT);
-
+
status = H5Dwrite(main_did, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, obj_data[0]);
if (status < 0)
{
@@ -6918,8 +6872,8 @@ static herr_t make_complex_attr_references(hid_t loc_id)
* 1. create obj references in a attribute of compound type
*/
- /*
- * create compound type for attribute
+ /*
+ * create compound type for attribute
*/
comp_objref_tid = H5Tcreate (H5T_COMPOUND, sizeof(comp_objref_t));
@@ -6958,8 +6912,8 @@ static herr_t make_complex_attr_references(hid_t loc_id)
goto out;
}
comp_objref_data[2].val_int = 20;
-
- /*
+
+ /*
* create attribute and write the object ref
*/
comp_objref_attr_sid = H5Screate_simple (RANK_COMP_OBJREF, comp_objref_dim, NULL);
@@ -6984,7 +6938,7 @@ static herr_t make_complex_attr_references(hid_t loc_id)
H5Tinsert(comp_regref_tid, "value_int", HOFFSET(comp_regref_t, val_int), H5T_NATIVE_INT);
/*
- * create the region reference
+ * create the region reference
*/
status = H5Sselect_elements (objsid, H5S_SELECT_SET, (size_t)4, coords[0]);
if (status < 0)
@@ -7029,8 +6983,8 @@ static herr_t make_complex_attr_references(hid_t loc_id)
vlen_objref_data[2].len = LEN2_VLEN_OBJREF;
vlen_objref_data[2].p = HDmalloc (vlen_objref_data[2].len * sizeof(hobj_ref_t));
- /*
- * create obj references
+ /*
+ * create obj references
*/
/* reference to dataset */
status = H5Rcreate (&((hobj_ref_t*)vlen_objref_data[0].p)[0], loc_id, NAME_OBJ_DS1, H5R_OBJECT, (hid_t)-1);
@@ -7041,7 +6995,7 @@ static herr_t make_complex_attr_references(hid_t loc_id)
goto out;
}
/* reference to group */
- status = H5Rcreate (&((hobj_ref_t*)vlen_objref_data[1].p)[0], loc_id, NAME_OBJ_GRP, H5R_OBJECT, (hid_t)-1);
+ status = H5Rcreate (&((hobj_ref_t*)vlen_objref_data[1].p)[0], loc_id, NAME_OBJ_GRP, H5R_OBJECT, (hid_t)-1);
if (status < 0)
{
fprintf(stderr, "Error: %s %d> H5Rcreate failed.\n", FUNC, __LINE__);
@@ -7056,15 +7010,15 @@ static herr_t make_complex_attr_references(hid_t loc_id)
ret = FAIL;
goto out;
}
-
- /*
+
+ /*
* create vlen type with obj reference
*/
vlen_objref_attr_tid = H5Tvlen_create (H5T_STD_REF_OBJ);
vlen_objref_attr_sid = H5Screate_simple (RANK_VLEN_OBJREF, vlen_objref_dims, NULL);
/*
- * create attribute and write the object reference
+ * create attribute and write the object reference
*/
vlen_objref_attr_id = H5Acreate2(main_did, "Vlen_OBJREF", vlen_objref_attr_tid, vlen_objref_attr_sid, H5P_DEFAULT, H5P_DEFAULT);
status = H5Awrite (vlen_objref_attr_id, vlen_objref_attr_tid, vlen_objref_data);
@@ -7087,7 +7041,7 @@ static herr_t make_complex_attr_references(hid_t loc_id)
/*-------------------------------------------------------------------
* 4. create region references in a attribute of vlen type
*/
-
+
/*
* prepare vlen data
*/
@@ -7095,7 +7049,7 @@ static herr_t make_complex_attr_references(hid_t loc_id)
vlen_regref_data[0].p = HDmalloc (vlen_regref_data[0].len * sizeof(hdset_reg_ref_t));
/*
- * create region reference
+ * create region reference
*/
status = H5Sselect_elements(objsid, H5S_SELECT_SET, (size_t)4, coords[0]);
if (status < 0)
@@ -7111,15 +7065,15 @@ static herr_t make_complex_attr_references(hid_t loc_id)
ret = FAIL;
goto out;
}
-
- /*
+
+ /*
* create vlen type with region reference
*/
vlen_regref_attr_tid = H5Tvlen_create(H5T_STD_REF_DSETREG);
vlen_regref_attr_sid = H5Screate_simple(RANK_VLEN_REGREF, vlen_regref_dim, NULL);
-
+
/*
- * create attribute and write the region reference
+ * create attribute and write the region reference
*/
vlen_regref_attr_id = H5Acreate2(main_did, "Vlen_REGREF", vlen_regref_attr_tid, vlen_regref_attr_sid, H5P_DEFAULT, H5P_DEFAULT);
status = H5Awrite(vlen_regref_attr_id, vlen_regref_attr_tid, vlen_regref_data);
@@ -7129,7 +7083,7 @@ static herr_t make_complex_attr_references(hid_t loc_id)
ret = FAIL;
goto out;
}
-
+
/* close resource for vlen data */
status = H5Dvlen_reclaim (vlen_regref_attr_tid, vlen_regref_attr_sid, H5P_DEFAULT, vlen_regref_data);
if (status < 0)
diff --git a/tools/test/h5repack/testfiles/GS.h5repack_paged_nopersist.h5.ddl b/tools/test/h5repack/testfiles/GS.h5repack_paged_nopersist.h5.ddl
new file mode 100644
index 0000000..d8ca992
--- /dev/null
+++ b/tools/test/h5repack/testfiles/GS.h5repack_paged_nopersist.h5.ddl
@@ -0,0 +1,15 @@
+Filename: out-GS.h5repack_paged_nopersist.h5
+Free-space persist: FALSE
+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_FSPACE_STRATEGY_AGGR
+File space page size: 512 bytes
+Summary of file space information:
+ File metadata: 1272 bytes
+ Raw data: 400 bytes
+ Amount/Percent of tracked free space: 0 bytes/0.0%
+ Unaccounted space: 776 bytes
+Total space: 2448 bytes
diff --git a/tools/test/h5repack/testfiles/S.h5repack_fsm_aggr_persist.h5.ddl b/tools/test/h5repack/testfiles/S.h5repack_fsm_aggr_persist.h5.ddl
new file mode 100644
index 0000000..87ccbc4
--- /dev/null
+++ b/tools/test/h5repack/testfiles/S.h5repack_fsm_aggr_persist.h5.ddl
@@ -0,0 +1,15 @@
+Filename: out-S.h5repack_fsm_aggr_persist.h5
+Free-space persist: FALSE
+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_FSPACE_STRATEGY_AGGR
+File space page size: 4096 bytes
+Summary of file space information:
+ File metadata: 1272 bytes
+ Raw data: 400 bytes
+ Amount/Percent of tracked free space: 0 bytes/0.0%
+ Unaccounted space: 776 bytes
+Total space: 2448 bytes
diff --git a/tools/test/h5repack/testfiles/SP.h5repack_fsm_aggr_nopersist.h5.ddl b/tools/test/h5repack/testfiles/SP.h5repack_fsm_aggr_nopersist.h5.ddl
new file mode 100644
index 0000000..affa93b
--- /dev/null
+++ b/tools/test/h5repack/testfiles/SP.h5repack_fsm_aggr_nopersist.h5.ddl
@@ -0,0 +1,16 @@
+Filename: out-SP.h5repack_fsm_aggr_nopersist.h5
+Free-space persist: TRUE
+Free-space section threshold: 1 bytes
+Small size free-space sections (< 10 bytes):
+ Total # of small size sections: 0
+Free-space section bins:
+ # of sections of size 1000 - 9999: 2
+ Total # of sections: 2
+File space management strategy: H5F_FSPACE_STRATEGY_PAGE
+File space page size: 4096 bytes
+Summary of file space information:
+ File metadata: 1602 bytes
+ Raw data: 400 bytes
+ Amount/Percent of tracked free space: 6307 bytes/38.5%
+ Unaccounted space: 8075 bytes
+Total space: 16384 bytes
diff --git a/tools/test/h5repack/testfiles/SP.h5repack_paged_persist.h5.ddl b/tools/test/h5repack/testfiles/SP.h5repack_paged_persist.h5.ddl
new file mode 100644
index 0000000..1084090
--- /dev/null
+++ b/tools/test/h5repack/testfiles/SP.h5repack_paged_persist.h5.ddl
@@ -0,0 +1,15 @@
+Filename: out-SP.h5repack_paged_persist.h5
+Free-space persist: FALSE
+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_FSPACE_STRATEGY_NONE
+File space page size: 4096 bytes
+Summary of file space information:
+ File metadata: 1272 bytes
+ Raw data: 400 bytes
+ Amount/Percent of tracked free space: 0 bytes/0.0%
+ Unaccounted space: 0 bytes
+Total space: 1672 bytes
diff --git a/tools/test/h5repack/testfiles/SPT.h5repack_aggr.h5.ddl b/tools/test/h5repack/testfiles/SPT.h5repack_aggr.h5.ddl
new file mode 100644
index 0000000..1ce06b2
--- /dev/null
+++ b/tools/test/h5repack/testfiles/SPT.h5repack_aggr.h5.ddl
@@ -0,0 +1,16 @@
+Filename: out-SPT.h5repack_aggr.h5
+Free-space persist: TRUE
+Free-space section threshold: 5 bytes
+Small size free-space sections (< 10 bytes):
+ Total # of small size sections: 0
+Free-space section bins:
+ # of sections of size 100 - 999: 1
+ Total # of sections: 1
+File space management strategy: H5F_FSPACE_STRATEGY_FSM_AGGR
+File space page size: 4096 bytes
+Summary of file space information:
+ File metadata: 1485 bytes
+ Raw data: 400 bytes
+ Amount/Percent of tracked free space: 680 bytes/26.5%
+ Unaccounted space: 0 bytes
+Total space: 2565 bytes
diff --git a/tools/test/h5repack/testfiles/STG.h5repack_none.h5.ddl b/tools/test/h5repack/testfiles/STG.h5repack_none.h5.ddl
new file mode 100644
index 0000000..51cd7e5
--- /dev/null
+++ b/tools/test/h5repack/testfiles/STG.h5repack_none.h5.ddl
@@ -0,0 +1,15 @@
+Filename: out-STG.h5repack_none.h5
+Free-space persist: FALSE
+Free-space section threshold: 10 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_FSPACE_STRATEGY_PAGE
+File space page size: 2048 bytes
+Summary of file space information:
+ File metadata: 1272 bytes
+ Raw data: 400 bytes
+ Amount/Percent of tracked free space: 0 bytes/0.0%
+ Unaccounted space: 2424 bytes
+Total space: 4096 bytes
diff --git a/tools/test/h5repack/testfiles/bounds_latest_latest.h5 b/tools/test/h5repack/testfiles/bounds_latest_latest.h5
new file mode 100644
index 0000000..6e8bcad
--- /dev/null
+++ b/tools/test/h5repack/testfiles/bounds_latest_latest.h5
Binary files differ
diff --git a/tools/test/h5repack/testfiles/crtorder.tordergr.h5.ddl b/tools/test/h5repack/testfiles/crtorder.tordergr.h5.ddl
new file mode 100644
index 0000000..870d154
--- /dev/null
+++ b/tools/test/h5repack/testfiles/crtorder.tordergr.h5.ddl
@@ -0,0 +1,36 @@
+HDF5 "out-crtorder.tordergr.h5" {
+GROUP "/" {
+ GROUP "2" {
+ GROUP "a" {
+ GROUP "a1" {
+ }
+ GROUP "a2" {
+ GROUP "a21" {
+ }
+ GROUP "a22" {
+ }
+ }
+ }
+ GROUP "b" {
+ }
+ GROUP "c" {
+ }
+ }
+ GROUP "1" {
+ GROUP "c" {
+ }
+ GROUP "b" {
+ }
+ GROUP "a" {
+ GROUP "a1" {
+ }
+ GROUP "a2" {
+ GROUP "a22" {
+ }
+ GROUP "a21" {
+ }
+ }
+ }
+ }
+}
+}
diff --git a/tools/test/h5repack/testfiles/h5repack-help.txt b/tools/test/h5repack/testfiles/h5repack-help.txt
index 69b1644..0eef0f5 100644
--- a/tools/test/h5repack/testfiles/h5repack-help.txt
+++ b/tools/test/h5repack/testfiles/h5repack-help.txt
@@ -6,7 +6,13 @@ usage: h5repack [OPTIONS] file1 file2
-v, --verbose Verbose mode, print object information
-V, --version Print version number and exit
-n, --native Use a native HDF5 type when repacking
+ --enable-error-stack Prints messages from the HDF5 error stack as they occur
-L, --latest Use latest version of file format
+ This option will take precedence over the -j and -k options
+ --low=BOUND The low bound for library release versions to use when creating
+ objects in the file (default is H5F_LIBVER_EARLIEST)
+ --high=BOUND The high bound for library release versions to use when creating
+ objects in the file (default is H5F_LIBVER_LATEST)
-c L1, --compact=L1 Maximum number of links in header messages
-d L2, --indexed=L2 Minimum number of links in the indexed format
-s S[:F], --ssize=S[:F] Shared object header message minimum size
@@ -17,6 +23,8 @@ usage: h5repack [OPTIONS] file1 file2
-M A, --metadata_block_size=A Metadata block size for H5Pset_meta_block_size
-t T, --threshold=T Threshold value for H5Pset_alignment
-a A, --alignment=A Alignment value for H5Pset_alignment
+ -q Q, --sort_by=Q Sort groups and attributes by index Q
+ -z Z, --sort_order=Z Sort groups and attributes by order Z
-f FILT, --filter=FILT Filter type
-l LAYT, --layout=LAYT Layout type
-S FS_STRATEGY, --fs_strategy=FS_STRATEGY File space management strategy for H5Pset_file_space_strategy
@@ -24,19 +32,25 @@ usage: h5repack [OPTIONS] file1 file2
-T FS_THRESHOLD, --fs_threshold=FS_THRESHOLD Free-space section threshold for H5Pset_file_space_strategy
-G FS_PAGESIZE, --fs_pagesize=FS_PAGESIZE File space page size for H5Pset_file_space_page_size
- M - is an integer greater than 1, size of dataset in bytes (default is 0)
+ M - is an integer greater than 1, size of dataset in bytes (default is 0)
E - is a filename.
S - is an integer
U - is a filename.
T - is an integer
A - is an integer greater than zero
+ Q - is the sort index type for the input file. It can be "name" or "creation_order" (default)
+ Z - is the sort order type for the input file. It can be "descending" or "ascending" (default)
B - is the user block size, any value that is 512 or greater and is
a power of 2 (1024 default)
F - is the shared object header message type, any of <dspace|dtype|fill|
pline|attr>. If F is not specified, S applies to all messages
- --enable-error-stack Prints messages from the HDF5 error stack as they
- occur.
+ BOUND is an integer indicating the library release versions to use when creating
+ objects in the file (see H5Pset_libver_bounds()):
+ 0: This is H5F_LIBVER_EARLIEST in H5F_libver_t struct
+ 1: This is H5F_LIBVER_V18 in H5F_libver_t struct
+ 2: This is H5F_LIBVER_V110 in H5F_libver_t struct
+ (H5F_LIBVER_LATEST is aliased to H5F_LIBVER_V110 for this release
FS_STRATEGY is a string indicating the file space strategy used:
FSM_AGGR:
@@ -85,8 +99,8 @@ usage: h5repack [OPTIONS] file1 file2
NBIT (no parameter)
SOFF=<scale_factor,scale_type> scale_factor is an integer and scale_type
is either IN or DS
- UD=<filter_number,cd_value_count,value_1[,value_2,...,value_N]>
- required values for filter_number,cd_value_count,value_1
+ UD=<filter_number,filter_flag,cd_value_count,value_1[,value_2,...,value_N]>
+ required values for filter_number,filter_flag,cd_value_count,value_1
optional values for value_2 to value_N
NONE (no parameter)
@@ -121,16 +135,21 @@ Examples of use:
Chunked layout, with a layout size of 20x10, to objects dset1 and dset2
and remove filters to objects dset3, dset4, dset5
-4) h5repack -L -c 10 -s 20:dtype file1 file2
+4) h5repack -L -c 10 -s 20:dtype file1 file2
Using latest file format with maximum compact group size of 10 and
and minimum shared datatype size of 20
-5) h5repack -f SHUF -f GZIP=1 file1 file2
+5) h5repack --low=0 --high=1 file1 file2
+
+ Set low=H5F_LIBVER_EARLIEST and high=H5F_LIBVER_V18 via H5Pset_libver_bounds() when
+ creating the repacked file: file2
+
+5) h5repack -f SHUF -f GZIP=1 file1 file2
Add both filters SHUF and GZIP in this order to all datasets
-6) h5repack -f UD=307,1,9 file1 file2
+6) h5repack -f UD=307,0,1,9 file1 file2
Add bzip2 filter to all datasets
diff --git a/tools/test/h5repack/testfiles/h5repack_aggr.h5 b/tools/test/h5repack/testfiles/h5repack_aggr.h5
new file mode 100644
index 0000000..8da0751
--- /dev/null
+++ b/tools/test/h5repack/testfiles/h5repack_aggr.h5
Binary files differ
diff --git a/tools/test/h5repack/testfiles/h5repack_filters.h5-gzip_verbose_filters.tst b/tools/test/h5repack/testfiles/h5repack_filters.h5-gzip_verbose_filters.tst
index 36e65b9..cb12172 100644
--- a/tools/test/h5repack/testfiles/h5repack_filters.h5-gzip_verbose_filters.tst
+++ b/tools/test/h5repack/testfiles/h5repack_filters.h5-gzip_verbose_filters.tst
@@ -1,7 +1,8 @@
-Objects to modify layout are...
-Objects to apply filter are...
+No all objects to modify layout
+No all objects to apply filter
</dset_deflate> with GZIP filter
</dset_deflate>...Found
+Making new file ...
-----------------------------------------
Type Filter (Compression) Name
-----------------------------------------
diff --git a/tools/test/h5repack/testfiles/h5repack_fsm_aggr_nopersist.h5 b/tools/test/h5repack/testfiles/h5repack_fsm_aggr_nopersist.h5
new file mode 100644
index 0000000..1cd5f3f
--- /dev/null
+++ b/tools/test/h5repack/testfiles/h5repack_fsm_aggr_nopersist.h5
Binary files differ
diff --git a/tools/test/h5repack/testfiles/h5repack_fsm_aggr_persist.h5 b/tools/test/h5repack/testfiles/h5repack_fsm_aggr_persist.h5
new file mode 100644
index 0000000..469dbce
--- /dev/null
+++ b/tools/test/h5repack/testfiles/h5repack_fsm_aggr_persist.h5
Binary files differ
diff --git a/tools/test/h5repack/testfiles/h5repack_layout.h5-dset2_chunk_20x10-errstk.tst b/tools/test/h5repack/testfiles/h5repack_layout.h5-dset2_chunk_20x10-errstk.tst
index 95cc4c6..069fb3b 100644
--- a/tools/test/h5repack/testfiles/h5repack_layout.h5-dset2_chunk_20x10-errstk.tst
+++ b/tools/test/h5repack/testfiles/h5repack_layout.h5-dset2_chunk_20x10-errstk.tst
@@ -8,17 +8,17 @@ HDF5-DIAG: Error detected in HDF5 (version (number)) thread (IDs):
#002: (file name) line (number) in H5L_link_object(): unable to create new link to object
major: Links
minor: Unable to initialize object
- #003: (file name) line (number) in H5L_create_real(): can't insert link
- major: Symbol table
+ #003: (file name) line (number) in H5L__create_real(): can't insert link
+ major: Links
minor: Unable to insert object
#004: (file name) line (number) in H5G_traverse(): internal path traversal failed
major: Symbol table
minor: Object not found
- #005: (file name) line (number) in H5G_traverse_real(): traversal operator failed
+ #005: (file name) line (number) in H5G__traverse_real(): traversal operator failed
major: Symbol table
minor: Callback failed
- #006: (file name) line (number) in H5L_link_cb(): unable to create object
- major: Object header
+ #006: (file name) line (number) in H5L__link_cb(): unable to create object
+ major: Links
minor: Unable to initialize object
#007: (file name) line (number) in H5O_obj_create(): unable to open object
major: Object header
diff --git a/tools/test/h5repack/testfiles/h5repack_layout.h5-plugin_version_test.ddl b/tools/test/h5repack/testfiles/h5repack_layout.h5-plugin_version_test.ddl
index a951638..a1fc0cb 100644
--- a/tools/test/h5repack/testfiles/h5repack_layout.h5-plugin_version_test.ddl
+++ b/tools/test/h5repack/testfiles/h5repack_layout.h5-plugin_version_test.ddl
@@ -11,7 +11,7 @@ GROUP "/" {
USER_DEFINED_FILTER {
FILTER_ID 260
COMMENT dynlib4
- PARAMS { 9 1 11 0 }
+ PARAMS { 9 1 11 2 }
}
}
FILLVALUE {
@@ -33,7 +33,7 @@ GROUP "/" {
USER_DEFINED_FILTER {
FILTER_ID 260
COMMENT dynlib4
- PARAMS { 9 1 11 0 }
+ PARAMS { 9 1 11 2 }
}
}
FILLVALUE {
@@ -55,7 +55,7 @@ GROUP "/" {
USER_DEFINED_FILTER {
FILTER_ID 260
COMMENT dynlib4
- PARAMS { 9 1 11 0 }
+ PARAMS { 9 1 11 2 }
}
}
FILLVALUE {
@@ -77,7 +77,7 @@ GROUP "/" {
USER_DEFINED_FILTER {
FILTER_ID 260
COMMENT dynlib4
- PARAMS { 9 1 11 0 }
+ PARAMS { 9 1 11 2 }
}
}
FILLVALUE {
@@ -99,7 +99,7 @@ GROUP "/" {
USER_DEFINED_FILTER {
FILTER_ID 260
COMMENT dynlib4
- PARAMS { 9 1 11 0 }
+ PARAMS { 9 1 11 2 }
}
}
FILLVALUE {
@@ -121,7 +121,7 @@ GROUP "/" {
USER_DEFINED_FILTER {
FILTER_ID 260
COMMENT dynlib4
- PARAMS { 9 1 11 0 }
+ PARAMS { 9 1 11 2 }
}
}
FILLVALUE {
@@ -143,7 +143,7 @@ GROUP "/" {
USER_DEFINED_FILTER {
FILTER_ID 260
COMMENT dynlib4
- PARAMS { 9 1 11 0 }
+ PARAMS { 9 1 11 2 }
}
}
FILLVALUE {
diff --git a/tools/test/h5repack/testfiles/h5repack_layout.h5-plugin_zero.ddl b/tools/test/h5repack/testfiles/h5repack_layout.h5-plugin_zero.ddl
new file mode 100644
index 0000000..e4ffaf1
--- /dev/null
+++ b/tools/test/h5repack/testfiles/h5repack_layout.h5-plugin_zero.ddl
@@ -0,0 +1,135 @@
+HDF5 "out-plugin_zero.h5repack_layout.h5" {
+GROUP "/" {
+ DATASET "dset1" {
+ DATATYPE H5T_STD_I32LE
+ DATASPACE SIMPLE { ( 40, 20 ) / ( 40, 20 ) }
+ STORAGE_LAYOUT {
+ CONTIGUOUS
+ SIZE 3200
+ OFFSET 2048
+ }
+ FILTERS {
+ NONE
+ }
+ FILLVALUE {
+ FILL_TIME H5D_FILL_TIME_IFSET
+ VALUE H5D_FILL_VALUE_DEFAULT
+ }
+ ALLOCATION_TIME {
+ H5D_ALLOC_TIME_LATE
+ }
+ }
+ DATASET "dset2" {
+ DATATYPE H5T_STD_I32LE
+ DATASPACE SIMPLE { ( 40, 20 ) / ( 40, 20 ) }
+ STORAGE_LAYOUT {
+ CONTIGUOUS
+ SIZE 3200
+ OFFSET 5248
+ }
+ FILTERS {
+ NONE
+ }
+ FILLVALUE {
+ FILL_TIME H5D_FILL_TIME_IFSET
+ VALUE H5D_FILL_VALUE_DEFAULT
+ }
+ ALLOCATION_TIME {
+ H5D_ALLOC_TIME_LATE
+ }
+ }
+ DATASET "dset3" {
+ DATATYPE H5T_STD_I32LE
+ DATASPACE SIMPLE { ( 40, 20 ) / ( 40, 20 ) }
+ STORAGE_LAYOUT {
+ CONTIGUOUS
+ SIZE 3200
+ OFFSET 8448
+ }
+ FILTERS {
+ NONE
+ }
+ FILLVALUE {
+ FILL_TIME H5D_FILL_TIME_IFSET
+ VALUE H5D_FILL_VALUE_DEFAULT
+ }
+ ALLOCATION_TIME {
+ H5D_ALLOC_TIME_LATE
+ }
+ }
+ DATASET "dset4" {
+ DATATYPE H5T_STD_I32LE
+ DATASPACE SIMPLE { ( 40, 20 ) / ( 40, 20 ) }
+ STORAGE_LAYOUT {
+ CONTIGUOUS
+ SIZE 3200
+ OFFSET 13696
+ }
+ FILTERS {
+ NONE
+ }
+ FILLVALUE {
+ FILL_TIME H5D_FILL_TIME_IFSET
+ VALUE H5D_FILL_VALUE_DEFAULT
+ }
+ ALLOCATION_TIME {
+ H5D_ALLOC_TIME_LATE
+ }
+ }
+ DATASET "dset_chunk" {
+ DATATYPE H5T_STD_I32LE
+ DATASPACE SIMPLE { ( 40, 20 ) / ( 40, 20 ) }
+ STORAGE_LAYOUT {
+ CHUNKED ( 20, 10 )
+ SIZE 3200
+ }
+ FILTERS {
+ NONE
+ }
+ FILLVALUE {
+ FILL_TIME H5D_FILL_TIME_IFSET
+ VALUE H5D_FILL_VALUE_DEFAULT
+ }
+ ALLOCATION_TIME {
+ H5D_ALLOC_TIME_INCR
+ }
+ }
+ DATASET "dset_compact" {
+ DATATYPE H5T_STD_I32LE
+ DATASPACE SIMPLE { ( 40, 20 ) / ( 40, 20 ) }
+ STORAGE_LAYOUT {
+ COMPACT
+ SIZE 3200
+ }
+ FILTERS {
+ NONE
+ }
+ FILLVALUE {
+ FILL_TIME H5D_FILL_TIME_IFSET
+ VALUE H5D_FILL_VALUE_DEFAULT
+ }
+ ALLOCATION_TIME {
+ H5D_ALLOC_TIME_EARLY
+ }
+ }
+ DATASET "dset_contiguous" {
+ DATATYPE H5T_STD_I32LE
+ DATASPACE SIMPLE { ( 40, 20 ) / ( 40, 20 ) }
+ STORAGE_LAYOUT {
+ CONTIGUOUS
+ SIZE 3200
+ OFFSET 26184
+ }
+ FILTERS {
+ NONE
+ }
+ FILLVALUE {
+ FILL_TIME H5D_FILL_TIME_IFSET
+ VALUE H5D_FILL_VALUE_DEFAULT
+ }
+ ALLOCATION_TIME {
+ H5D_ALLOC_TIME_LATE
+ }
+ }
+}
+}
diff --git a/tools/test/h5repack/testfiles/h5repack_layout.h5-plugin_zero.tst b/tools/test/h5repack/testfiles/h5repack_layout.h5-plugin_zero.tst
deleted file mode 100644
index 0993d5b..0000000
--- a/tools/test/h5repack/testfiles/h5repack_layout.h5-plugin_zero.tst
+++ /dev/null
@@ -1,9 +0,0 @@
-Objects to modify layout are...
-Objects to apply filter are...
- User Defined 250
-Making file <out-plugin_zero.h5repack_layout.h5>...
------------------------------------------
- Type Filter (Compression) Name
------------------------------------------
- group /
-h5repack error: <h5repack_layout.h5>: Could not copy data to: out-plugin_zero.h5repack_layout.h5
diff --git a/tools/test/h5repack/testfiles/h5repack_none.h5 b/tools/test/h5repack/testfiles/h5repack_none.h5
new file mode 100644
index 0000000..2e4d789
--- /dev/null
+++ b/tools/test/h5repack/testfiles/h5repack_none.h5
Binary files differ
diff --git a/tools/test/h5repack/testfiles/h5repack_paged_nopersist.h5 b/tools/test/h5repack/testfiles/h5repack_paged_nopersist.h5
new file mode 100644
index 0000000..352e586
--- /dev/null
+++ b/tools/test/h5repack/testfiles/h5repack_paged_nopersist.h5
Binary files differ
diff --git a/tools/test/h5repack/testfiles/h5repack_paged_persist.h5 b/tools/test/h5repack/testfiles/h5repack_paged_persist.h5
new file mode 100644
index 0000000..64c3b23
--- /dev/null
+++ b/tools/test/h5repack/testfiles/h5repack_paged_persist.h5
Binary files differ
diff --git a/tools/test/h5repack/testfiles/plugin_none.h5repack_layout.UD.h5.tst b/tools/test/h5repack/testfiles/plugin_none.h5repack_layout.UD.h5.tst
index 4fb6906..30aa8ad 100644
--- a/tools/test/h5repack/testfiles/plugin_none.h5repack_layout.UD.h5.tst
+++ b/tools/test/h5repack/testfiles/plugin_none.h5repack_layout.UD.h5.tst
@@ -1,6 +1,7 @@
-Objects to modify layout are...
-Objects to apply filter are...
+No all objects to modify layout
+All objects to apply filter are...
Uncompress all
+Making new file ...
-----------------------------------------
Type Filter (Compression) Name
-----------------------------------------
diff --git a/tools/test/h5repack/testfiles/plugin_test.h5repack_layout.h5.tst b/tools/test/h5repack/testfiles/plugin_test.h5repack_layout.h5.tst
index 7f9bd6e..62ea1cc 100644
--- a/tools/test/h5repack/testfiles/plugin_test.h5repack_layout.h5.tst
+++ b/tools/test/h5repack/testfiles/plugin_test.h5repack_layout.h5.tst
@@ -1,6 +1,7 @@
-Objects to modify layout are...
-Objects to apply filter are...
+No all objects to modify layout
+All objects to apply filter are...
User Defined 257
+Making new file ...
-----------------------------------------
Type Filter (Compression) Name
-----------------------------------------
diff --git a/tools/test/h5repack/testfiles/plugin_version_test.h5repack_layout.h5.tst b/tools/test/h5repack/testfiles/plugin_version_test.h5repack_layout.h5.tst
index 1a496c6..f5c4736 100644
--- a/tools/test/h5repack/testfiles/plugin_version_test.h5repack_layout.h5.tst
+++ b/tools/test/h5repack/testfiles/plugin_version_test.h5repack_layout.h5.tst
@@ -1,6 +1,7 @@
-Objects to modify layout are...
-Objects to apply filter are...
+No all objects to modify layout
+All objects to apply filter are...
User Defined 260
+Making new file ...
-----------------------------------------
Type Filter (Compression) Name
-----------------------------------------
diff --git a/tools/test/h5repack/testfiles/plugin_zero.h5repack_layout.h5.tst b/tools/test/h5repack/testfiles/plugin_zero.h5repack_layout.h5.tst
new file mode 100644
index 0000000..54c873c
--- /dev/null
+++ b/tools/test/h5repack/testfiles/plugin_zero.h5repack_layout.h5.tst
@@ -0,0 +1,22 @@
+No all objects to modify layout
+All objects to apply filter are...
+ User Defined 250
+Making new file ...
+-----------------------------------------
+ Type Filter (Compression) Name
+-----------------------------------------
+ group /
+ warning: could not create dataset </dset1>. Applying original settings
+ dset /dset1
+ warning: could not create dataset </dset2>. Applying original settings
+ dset /dset2
+ warning: could not create dataset </dset3>. Applying original settings
+ dset /dset3
+ warning: could not create dataset </dset4>. Applying original settings
+ dset /dset4
+ warning: could not create dataset </dset_chunk>. Applying original settings
+ dset /dset_chunk
+ warning: could not create dataset </dset_compact>. Applying original settings
+ dset /dset_compact
+ warning: could not create dataset </dset_contiguous>. Applying original settings
+ dset /dset_contiguous
diff --git a/tools/test/h5repack/testh5repack_detect_szip.c b/tools/test/h5repack/testh5repack_detect_szip.c
index e91b2f7..6e7a24e 100644
--- a/tools/test/h5repack/testh5repack_detect_szip.c
+++ b/tools/test/h5repack/testh5repack_detect_szip.c
@@ -5,15 +5,12 @@
* *
* 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. *
+ * the COPYING file, which can be found at the root of the source code *
+ * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
+ * If you do not have access to either file, you may request a copy from *
+ * help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
-#include <stdio.h>
#include "h5repack.h"
#include "h5tools.h"
#include "h5tools_utils.h"