summaryrefslogtreecommitdiffstats
path: root/tools/test
diff options
context:
space:
mode:
Diffstat (limited to 'tools/test')
-rw-r--r--tools/test/CMakeLists.txt2
-rw-r--r--tools/test/Makefile.in62
-rw-r--r--tools/test/h5copy/CMakeLists.txt6
-rw-r--r--tools/test/h5copy/CMakeTests.cmake30
-rw-r--r--tools/test/h5copy/Makefile.in62
-rw-r--r--tools/test/h5copy/h5copygentest.c26
-rw-r--r--tools/test/h5copy/testh5copy.sh.in12
-rw-r--r--tools/test/h5diff/CMakeLists.txt6
-rw-r--r--tools/test/h5diff/CMakeTests.cmake110
-rw-r--r--tools/test/h5diff/Makefile.in62
-rw-r--r--tools/test/h5diff/dynlib_diff.c4
-rw-r--r--tools/test/h5diff/h5diff_plugin.sh.in117
-rw-r--r--tools/test/h5diff/h5diffgentest.c526
-rw-r--r--tools/test/h5diff/testfiles/h5diff_10.txt15
-rw-r--r--tools/test/h5diff/testfiles/h5diff_58.txt4
-rw-r--r--tools/test/h5diff/testfiles/h5diff_58_ref.txt37
-rw-r--r--tools/test/h5diff/testfiles/h5diff_600.txt15
-rw-r--r--tools/test/h5diff/testfiles/h5diff_603.txt15
-rw-r--r--tools/test/h5diff/testfiles/h5diff_606.txt15
-rw-r--r--tools/test/h5diff/testfiles/h5diff_612.txt15
-rw-r--r--tools/test/h5diff/testfiles/h5diff_615.txt15
-rw-r--r--tools/test/h5diff/testfiles/h5diff_621.txt15
-rw-r--r--tools/test/h5diff/testfiles/h5diff_622.txt15
-rw-r--r--tools/test/h5diff/testfiles/h5diff_623.txt15
-rw-r--r--tools/test/h5diff/testfiles/h5diff_624.txt15
-rw-r--r--tools/test/h5diff/testfiles/h5diff_70.txt32
-rw-r--r--tools/test/h5diff/testfiles/h5diff_700.txt32
-rw-r--r--tools/test/h5diff/testfiles/h5diff_701.txt32
-rw-r--r--tools/test/h5diff/testfiles/h5diff_702.txt32
-rw-r--r--tools/test/h5diff/testfiles/h5diff_703.txt32
-rw-r--r--tools/test/h5diff/testfiles/h5diff_80.txt64
-rw-r--r--tools/test/h5diff/testfiles/h5diff_eps.txt17
-rw-r--r--tools/test/h5diff/testfiles/h5diff_eps1.h5bin0 -> 2272 bytes
-rw-r--r--tools/test/h5diff/testfiles/h5diff_eps2.h5bin0 -> 2272 bytes
-rw-r--r--tools/test/h5diff/testfiles/h5diff_strings1.h5 (renamed from tools/test/h5diff/testfiles/diff_strings1.h5)bin4640 -> 4640 bytes
-rw-r--r--tools/test/h5diff/testfiles/h5diff_strings2.h5 (renamed from tools/test/h5diff/testfiles/diff_strings2.h5)bin4640 -> 4640 bytes
-rw-r--r--tools/test/h5diff/testh5diff.sh.in74
-rw-r--r--tools/test/h5dump/CMakeLists.txt14
-rw-r--r--tools/test/h5dump/CMakeTests.cmake107
-rw-r--r--tools/test/h5dump/CMakeTestsPBITS.cmake10
-rw-r--r--tools/test/h5dump/CMakeTestsVDS.cmake18
-rw-r--r--tools/test/h5dump/CMakeTestsXML.cmake10
-rw-r--r--tools/test/h5dump/CMakeVFDTests.cmake8
-rw-r--r--tools/test/h5dump/Makefile.am2
-rw-r--r--tools/test/h5dump/Makefile.in64
-rw-r--r--tools/test/h5dump/dynlib_dump.c4
-rw-r--r--tools/test/h5dump/errfiles/tall-1.err2
-rw-r--r--tools/test/h5dump/errfiles/tall-2A.err2
-rw-r--r--tools/test/h5dump/errfiles/tall-2A0.err2
-rw-r--r--tools/test/h5dump/errfiles/tall-2B.err2
-rw-r--r--tools/test/h5dump/errfiles/tarray1_big.err31
-rw-r--r--tools/test/h5dump/errfiles/tattr-3.err2
-rw-r--r--tools/test/h5dump/errfiles/tattrregR.err21
-rw-r--r--tools/test/h5dump/errfiles/tdataregR.err21
-rw-r--r--tools/test/h5dump/errfiles/textlink.err4
-rw-r--r--tools/test/h5dump/errfiles/torderlinks1.err2
-rw-r--r--tools/test/h5dump/errfiles/torderlinks2.err2
-rw-r--r--tools/test/h5dump/h5dump_plugin.sh.in28
-rw-r--r--tools/test/h5dump/h5dumpgentest.c965
-rw-r--r--tools/test/h5dump/testh5dump.sh.in440
-rw-r--r--tools/test/h5dump/testh5dumppbits.sh.in158
-rw-r--r--tools/test/h5dump/testh5dumpvds.sh.in172
-rw-r--r--tools/test/h5dump/testh5dumpxml.sh.in31
-rw-r--r--tools/test/h5format_convert/CMakeLists.txt6
-rw-r--r--tools/test/h5format_convert/CMakeTests.cmake22
-rw-r--r--tools/test/h5format_convert/Makefile.in62
-rw-r--r--tools/test/h5format_convert/h5fc_chk_idx.c12
-rw-r--r--tools/test/h5format_convert/h5fc_gentest.c52
-rw-r--r--tools/test/h5format_convert/testfiles/h5fc_v_err.ddl.err7
-rw-r--r--tools/test/h5import/CMakeLists.txt6
-rw-r--r--tools/test/h5import/CMakeTests.cmake28
-rw-r--r--tools/test/h5import/Makefile.in62
-rw-r--r--tools/test/h5import/h5importtest.c9
-rw-r--r--tools/test/h5jam/CMakeLists.txt6
-rw-r--r--tools/test/h5jam/CMakeTests.cmake28
-rw-r--r--tools/test/h5jam/Makefile.in62
-rw-r--r--tools/test/h5jam/getub.c2
-rw-r--r--tools/test/h5jam/tellub.c46
-rw-r--r--tools/test/h5jam/testh5jam.sh.in4
-rw-r--r--tools/test/h5ls/CMakeLists.txt8
-rw-r--r--tools/test/h5ls/CMakeTests.cmake16
-rw-r--r--tools/test/h5ls/CMakeTestsVDS.cmake14
-rw-r--r--tools/test/h5ls/Makefile.in62
-rw-r--r--tools/test/h5ls/dynlib_ls.c4
-rw-r--r--tools/test/h5ls/h5ls_plugin.sh.in6
-rw-r--r--tools/test/h5repack/CMakeLists.txt8
-rw-r--r--tools/test/h5repack/CMakeTests.cmake410
-rw-r--r--tools/test/h5repack/Makefile.am2
-rw-r--r--tools/test/h5repack/Makefile.in64
-rw-r--r--tools/test/h5repack/h5repack.sh.in310
-rw-r--r--tools/test/h5repack/h5repackgentest.c23
-rw-r--r--tools/test/h5repack/h5repacktst.c777
-rw-r--r--tools/test/h5repack/testfiles/h5copy_extlinks_src-base.h5copy_extlinks_src.h5.ddl28
-rw-r--r--tools/test/h5repack/testfiles/h5copy_extlinks_src-merge.h5copy_extlinks_src.h5.tst26
-rw-r--r--tools/test/h5repack/testfiles/h5copy_extlinks_src-mergeprune.h5copy_extlinks_src.h5.ddl28
-rw-r--r--tools/test/h5repack/testfiles/h5copy_extlinks_src-prune.h5copy_extlinks_src.h5.ddl6
-rw-r--r--tools/test/h5repack/testfiles/h5copy_extlinks_src.h5bin0 -> 2184 bytes
-rw-r--r--tools/test/h5repack/testfiles/h5copy_extlinks_trg.h5bin0 -> 2168 bytes
-rw-r--r--tools/test/h5repack/testfiles/h5repack-help.txt3
-rw-r--r--tools/test/h5repack/testfiles/h5repack_layout.h5-dset2_chunk_20x10-errstk.tst2
-rw-r--r--tools/test/h5repack/testfiles/h5repack_layout.h5-plugin_version_test.ddl14
-rw-r--r--tools/test/h5repack/testfiles/textlink-base.textlink.h5.ddl12
-rw-r--r--tools/test/h5repack/testfiles/textlink-merge.textlink.h5.tst13
-rw-r--r--tools/test/h5repack/testfiles/textlink-mergeprune.textlink.h5.ddl4
-rw-r--r--tools/test/h5repack/testfiles/textlink-prune.textlink.h5.ddl4
-rw-r--r--tools/test/h5repack/testfiles/textlinkfar-base.textlinkfar.h5.ddl116
-rw-r--r--tools/test/h5repack/testfiles/textlinkfar-merge.textlinkfar.h5.tst20
-rw-r--r--tools/test/h5repack/testfiles/textlinkfar-mergeprune.textlinkfar.h5.ddl152
-rw-r--r--tools/test/h5repack/testfiles/textlinkfar-prune.textlinkfar.h5.ddl4
-rw-r--r--tools/test/h5repack/testfiles/textlinksrc-base.textlinksrc.h5.ddl150
-rw-r--r--tools/test/h5repack/testfiles/textlinksrc-merge.textlinksrc.h5.tst32
-rw-r--r--tools/test/h5repack/testfiles/textlinksrc-mergeprune.textlinksrc.h5.ddl187
-rw-r--r--tools/test/h5repack/testfiles/textlinksrc-prune.textlinksrc.h5.ddl4
-rw-r--r--tools/test/h5repack/testfiles/textlinktar-base.textlinktar.h5.ddl168
-rw-r--r--tools/test/h5repack/testfiles/textlinktar-merge.textlinktar.h5.tst44
-rw-r--r--tools/test/h5repack/testfiles/textlinktar-mergeprune.textlinktar.h5.ddl200
-rw-r--r--tools/test/h5repack/testfiles/textlinktar-prune.textlinktar.h5.ddl52
-rw-r--r--tools/test/h5repack/testfiles/tsoftlinks-base.tsoftlinks.h5.ddl77
-rw-r--r--tools/test/h5repack/testfiles/tsoftlinks-merge.tsoftlinks.h5.tst53
-rw-r--r--tools/test/h5repack/testfiles/tsoftlinks-mergeprune.tsoftlinks.h5.ddl127
-rw-r--r--tools/test/h5repack/testfiles/tsoftlinks-prune.tsoftlinks.h5.ddl47
-rw-r--r--tools/test/h5stat/CMakeLists.txt6
-rw-r--r--tools/test/h5stat/CMakeTests.cmake14
-rw-r--r--tools/test/h5stat/Makefile.in62
-rw-r--r--tools/test/h5stat/h5stat_gentest.c56
-rw-r--r--tools/test/misc/CMakeLists.txt12
-rw-r--r--tools/test/misc/CMakeTestsClear.cmake34
-rw-r--r--tools/test/misc/CMakeTestsMkgrp.cmake49
-rw-r--r--tools/test/misc/CMakeTestsRepart.cmake14
-rw-r--r--tools/test/misc/Makefile.am2
-rw-r--r--tools/test/misc/Makefile.in64
-rw-r--r--tools/test/misc/clear_open_chk.c2
-rw-r--r--tools/test/misc/h5clear_gentest.c53
-rw-r--r--tools/test/misc/h5perf_gentest.c4
-rw-r--r--tools/test/misc/h5repart_gentest.c73
-rw-r--r--tools/test/misc/repart_test.c6
-rw-r--r--tools/test/misc/talign.c10
-rw-r--r--tools/test/misc/testfiles/h5clear_missing_file.ddl10
-rw-r--r--tools/test/misc/testfiles/h5clear_usage.ddl10
-rw-r--r--tools/test/misc/testfiles/h5mkgrp_help.txt1
-rw-r--r--tools/test/misc/testfiles/h5mkgrp_version.txt.in2
-rw-r--r--tools/test/misc/testh5mkgrp.sh.in93
-rw-r--r--tools/test/misc/vds/CMakeLists.txt2
-rw-r--r--tools/test/misc/vds/Makefile.in62
-rw-r--r--tools/test/misc/vds/UC_1.h2
-rw-r--r--tools/test/misc/vds/UC_1_one_dim_gen.c20
-rw-r--r--tools/test/misc/vds/UC_2.h4
-rw-r--r--tools/test/misc/vds/UC_2_two_dims_gen.c18
-rw-r--r--tools/test/misc/vds/UC_3_gaps_gen.c20
-rw-r--r--tools/test/misc/vds/UC_4_printf_gen.c16
-rw-r--r--tools/test/misc/vds/UC_5_stride_gen.c16
-rw-r--r--tools/test/perform/CMakeLists.txt39
-rw-r--r--tools/test/perform/CMakeTests.cmake305
-rw-r--r--tools/test/perform/Makefile.am4
-rw-r--r--tools/test/perform/Makefile.in102
-rw-r--r--tools/test/perform/chunk.c4
-rw-r--r--tools/test/perform/chunk_cache.c394
-rw-r--r--tools/test/perform/direct_write_perf.c86
-rw-r--r--tools/test/perform/iopipe.c419
-rw-r--r--tools/test/perform/overhead.c8
-rw-r--r--tools/test/perform/perf.c34
-rw-r--r--tools/test/perform/perf_meta.c2
-rw-r--r--tools/test/perform/pio_engine.c432
-rw-r--r--tools/test/perform/pio_perf.c82
-rw-r--r--tools/test/perform/pio_perf.h3
-rw-r--r--tools/test/perform/pio_standalone.c132
-rw-r--r--tools/test/perform/pio_standalone.h6
-rw-r--r--tools/test/perform/sio_engine.c63
-rw-r--r--tools/test/perform/sio_perf.c24
-rw-r--r--tools/test/perform/sio_perf.h3
-rw-r--r--tools/test/perform/sio_standalone.h19
-rw-r--r--tools/test/perform/zip_perf.c4
172 files changed, 6737 insertions, 3509 deletions
diff --git a/tools/test/CMakeLists.txt b/tools/test/CMakeLists.txt
index f4106fc..a43a848 100644
--- a/tools/test/CMakeLists.txt
+++ b/tools/test/CMakeLists.txt
@@ -1,4 +1,4 @@
-cmake_minimum_required (VERSION 3.10)
+cmake_minimum_required (VERSION 3.12)
project (HDF5_TOOLS_TEST C)
#-- Add the h5diff tests
diff --git a/tools/test/Makefile.in b/tools/test/Makefile.in
index 16ddba4..9e180cb 100644
--- a/tools/test/Makefile.in
+++ b/tools/test/Makefile.in
@@ -420,12 +420,12 @@ AMTAR = @AMTAR@
# H5_CFLAGS holds flags that should be used when building hdf5,
# but which should not be exported to h5cc for building other programs.
-# AM_CFLAGS is an automake construct which should be used by Makefiles
+# AM_CFLAGS is an automake construct which should be used by Makefiles
# instead of CFLAGS, as CFLAGS is reserved solely for the user to define.
# This applies to FCFLAGS, CXXFLAGS, CPPFLAGS, and LDFLAGS as well.
-AM_CFLAGS = @AM_CFLAGS@ @H5_CFLAGS@
+AM_CFLAGS = @AM_CFLAGS@ @H5_CFLAGS@ @H5_ECFLAGS@
AM_CPPFLAGS = @AM_CPPFLAGS@ @H5_CPPFLAGS@
-AM_CXXFLAGS = @AM_CXXFLAGS@ @H5_CXXFLAGS@
+AM_CXXFLAGS = @AM_CXXFLAGS@ @H5_CXXFLAGS@ @H5_ECXXFLAGS@
AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
AM_FCFLAGS = @AM_FCFLAGS@ @H5_FCFLAGS@
AM_JAVACFLAGS = @AM_JAVACFLAGS@
@@ -445,6 +445,7 @@ CC = @CC@
CCDEPMODE = @CCDEPMODE@
CC_VERSION = @CC_VERSION@
CFLAGS = @CFLAGS@
+CLANG_SANITIZE_CHECKS = @CLANG_SANITIZE_CHECKS@
CODESTACK = @CODESTACK@
CONFIG_DATE = @CONFIG_DATE@
CONFIG_MODE = @CONFIG_MODE@
@@ -461,6 +462,7 @@ DEFAULT_API_VERSION = @DEFAULT_API_VERSION@
DEFS = @DEFS@
DEPDIR = @DEPDIR@
DEPRECATED_SYMBOLS = @DEPRECATED_SYMBOLS@
+DESIRED_FILE_LOCKING = @DESIRED_FILE_LOCKING@
DEV_WARNINGS = @DEV_WARNINGS@
DIRECT_VFD = @DIRECT_VFD@
DLLTOOL = @DLLTOOL@
@@ -497,8 +499,11 @@ H5_CFLAGS = @H5_CFLAGS@
H5_CLASSPATH = @H5_CLASSPATH@
H5_CPPFLAGS = @H5_CPPFLAGS@
H5_CXXFLAGS = @H5_CXXFLAGS@
+H5_ECFLAGS = @H5_ECFLAGS@
+H5_ECXXFLAGS = @H5_ECXXFLAGS@
H5_FCFLAGS = @H5_FCFLAGS@
H5_FORTRAN_SHARED = @H5_FORTRAN_SHARED@
+H5_IS_DARWIN = @H5_IS_DARWIN@
H5_JAVACFLAGS = @H5_JAVACFLAGS@
H5_JAVAFLAGS = @H5_JAVAFLAGS@
H5_JNIFLAGS = @H5_JNIFLAGS@
@@ -521,6 +526,7 @@ HL = @HL@
HL_FOR = @HL_FOR@
HSIZE_T = @HSIZE_T@
HSSIZE_T = @HSSIZE_T@
+IGNORE_DISABLED_FILE_LOCKS = @IGNORE_DISABLED_FILE_LOCKS@
INSTALL = @INSTALL@
INSTALL_DATA = @INSTALL_DATA@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
@@ -557,6 +563,7 @@ MAINT = @MAINT@
MAKEINFO = @MAKEINFO@
MANIFEST_TOOL = @MANIFEST_TOOL@
MEMORYALLOCSANITYCHECK = @MEMORYALLOCSANITYCHECK@
+MIRROR_VFD = @MIRROR_VFD@
MKDIR_P = @MKDIR_P@
MPE = @MPE@
NM = @NM@
@@ -616,6 +623,7 @@ TIME = @TIME@
TR = @TR@
TRACE_API = @TRACE_API@
UNAME_INFO = @UNAME_INFO@
+USE_FILE_LOCKING = @USE_FILE_LOCKING@
USE_FILTER_DEFLATE = @USE_FILTER_DEFLATE@
USE_FILTER_SZIP = @USE_FILTER_SZIP@
USINGMEMCHECKER = @USINGMEMCHECKER@
@@ -651,6 +659,7 @@ docdir = $(exec_prefix)/doc
dvidir = @dvidir@
enable_shared = @enable_shared@
enable_static = @enable_static@
+examplesdir = @examplesdir@
exec_prefix = @exec_prefix@
fortran_linux_linker_option = @fortran_linux_linker_option@
host = @host@
@@ -707,15 +716,15 @@ LIBH5_HL = $(top_builddir)/hl/src/libhdf5_hl.la
LIBH5F_HL = $(top_builddir)/hl/fortran/src/libhdf5hl_fortran.la
LIBH5CPP_HL = $(top_builddir)/hl/c++/src/libhdf5_hl_cpp.la
-# Note that in svn revision 19400 the '/' after DESTDIR in H5* variables below
-# has been removed. According to the official description of DESTDIR by Gnu at
-# http://www.gnu.org/prep/standards/html_node/DESTDIR.html, DESTDIR is
-# prepended to the normal and complete install path that it precedes for the
-# purpose of installing in a temporary directory which is useful for building
-# rpms and other packages. The '/' after ${DESTDIR} will be followed by another
-# '/' at the beginning of the normal install path. When DESTDIR is empty the
-# path then begins with '//', which is incorrect and causes problems at least for
-# Cygwin.
+# Note that in svn revision 19400 the '/' after DESTDIR in H5* variables below
+# has been removed. According to the official description of DESTDIR by Gnu at
+# http://www.gnu.org/prep/standards/html_node/DESTDIR.html, DESTDIR is
+# prepended to the normal and complete install path that it precedes for the
+# purpose of installing in a temporary directory which is useful for building
+# rpms and other packages. The '/' after ${DESTDIR} will be followed by another
+# '/' at the beginning of the normal install path. When DESTDIR is empty the
+# path then begins with '//', which is incorrect and causes problems at least for
+# Cygwin.
# Scripts used to build examples
# If only shared libraries have been installed, have h5cc build examples with
@@ -753,7 +762,7 @@ LIB = $(lib_LIBRARIES) $(lib_LTLIBRARIES) $(noinst_LIBRARIES) \
PROGS = $(bin_PROGRAMS) $(bin_SCRIPTS) $(noinst_PROGRAMS) $(noinst_SCRIPTS) \
$(EXTRA_PROG)
-chk_TESTS = $(check_PROGRAMS) $(check_SCRIPTS) $(EXTRA_TEST)
+chk_TESTS = $(check_PROGRAMS) $(check_SCRIPTS) $(EXTRA_TEST)
TEST_EXTENSIONS = .sh
SH_LOG_COMPILER = $(SHELL)
AM_SH_LOG_FLAGS =
@@ -1331,28 +1340,37 @@ $(TEST_PROG_CHKEXE) $(TEST_PROG_PARA_CHKEXE) dummy.chkexe_:
echo "============================" > $${log}; \
fi; \
if test "X$(FORTRAN_API)" = "Xyes"; then \
- echo "Fortran API: Testing $(HDF5_DRIVER) $${tname} $(TEST_FLAGS)"; \
+ echo "Fortran API: Testing $${tname} $(TEST_FLAGS)"; \
if test -n "$(REALTIMEOUTPUT)"; then \
- echo "Fortran API: $(HDF5_DRIVER) $${tname} $(TEST_FLAGS) Test Log" | tee -a $${log}; \
+ echo "Fortran API: Test log for $${tname} $(TEST_FLAGS)" | tee -a $${log}; \
else \
- echo "Fortran API: $(HDF5_DRIVER) $${tname} $(TEST_FLAGS) Test Log" >> $${log}; \
+ echo "Fortran API: Test log for $${tname} $(TEST_FLAGS)" >> $${log}; \
fi; \
elif test "X$(CXX_API)" = "Xyes"; then \
- echo "C++ API: Testing $(HDF5_DRIVER) $${tname} $(TEST_FLAGS)"; \
+ echo "C++ API: Testing $${tname} $(TEST_FLAGS)"; \
if test -n "$(REALTIMEOUTPUT)"; then \
- echo "C++ API: $(HDF5_DRIVER) $${tname} $(TEST_FLAGS) Test Log" | tee -a $${log};\
+ echo "C++ API: Test log for $${tname} $(TEST_FLAGS)" | tee -a $${log};\
else \
- echo "C++ API: $(HDF5_DRIVER) $${tname} $(TEST_FLAGS) Test Log" >> $${log};\
+ echo "C++ API: Test log for $${tname} $(TEST_FLAGS)" >> $${log};\
fi; \
else \
- echo "Testing $(HDF5_DRIVER) $${tname} $(TEST_FLAGS)"; \
+ echo "Testing: $${tname} $(TEST_FLAGS)"; \
if test -n "$(REALTIMEOUTPUT)"; then \
- echo "$(HDF5_DRIVER) $${tname} $(TEST_FLAGS) Test Log" | tee -a $${log}; \
+ echo "Test log for $${tname} $(TEST_FLAGS)" | tee -a $${log}; \
else \
- echo "$(HDF5_DRIVER) $${tname} $(TEST_FLAGS) Test Log" >> $${log}; \
+ echo "Test log for $${tname} $(TEST_FLAGS)" >> $${log}; \
fi; \
fi; \
if test -n "$(REALTIMEOUTPUT)"; then \
+ if test -n "$(HDF5_DRIVER)"; then \
+ echo "Virtual file driver (VFD): $(HDF5_DRIVER)" | tee -a $${log}; \
+ fi; \
+ else \
+ if test -n "$(HDF5_DRIVER)"; then \
+ echo "Virtual file driver (VFD): $(HDF5_DRIVER)" >> $${log}; \
+ fi; \
+ fi; \
+ if test -n "$(REALTIMEOUTPUT)"; then \
echo "============================" | tee -a $${log}; \
else \
echo "============================" >> $${log}; \
diff --git a/tools/test/h5copy/CMakeLists.txt b/tools/test/h5copy/CMakeLists.txt
index 1130ea7..034c8d3 100644
--- a/tools/test/h5copy/CMakeLists.txt
+++ b/tools/test/h5copy/CMakeLists.txt
@@ -1,4 +1,4 @@
-cmake_minimum_required (VERSION 3.10)
+cmake_minimum_required (VERSION 3.12)
project (HDF5_TOOLS_TEST_H5COPY C)
# --------------------------------------------------------------------
@@ -43,4 +43,6 @@ if (BUILD_SHARED_LIBS)
)
endif ()
-include (CMakeTests.cmake)
+if (HDF5_TEST_TOOLS AND HDF5_TEST_SERIAL)
+ include (CMakeTests.cmake)
+endif ()
diff --git a/tools/test/h5copy/CMakeTests.cmake b/tools/test/h5copy/CMakeTests.cmake
index b0d1615..4ce0318 100644
--- a/tools/test/h5copy/CMakeTests.cmake
+++ b/tools/test/h5copy/CMakeTests.cmake
@@ -45,12 +45,6 @@
endforeach ()
add_custom_target(h5copy_files ALL COMMENT "Copying files needed by h5copy tests" DEPENDS ${h5copy_files_list})
- if (NOT BUILD_SHARED_LIBS)
- set (tgt_ext "")
- else ()
- set (tgt_ext "-shared")
- endif ()
-
##############################################################################
##############################################################################
### T H E T E S T S M A C R O S ###
@@ -71,7 +65,7 @@
add_test (
NAME H5COPY_F-${testname}
- COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} $<TARGET_FILE:h5copy${tgt_ext}> -f ${fparam} -i ./testfiles/${infile} -o ./testfiles/${testname}.out.h5 ${vparam} ${sparam} ${srcname} ${dparam} ${dstname} ${ARGN}
+ COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} $<TARGET_FILE:h5copy${tgt_file_ext}> -f ${fparam} -i ./testfiles/${infile} -o ./testfiles/${testname}.out.h5 ${vparam} ${sparam} ${srcname} ${dparam} ${dstname} ${ARGN}
)
if (HDF5_ENABLE_USING_MEMCHECKER)
if (last_test)
@@ -85,7 +79,7 @@
if (NOT ${resultcode} EQUAL 2)
add_test (
NAME H5COPY_F-${testname}-DIFF
- COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} $<TARGET_FILE:h5diff${tgt_ext}> -v ./testfiles/${infile} ./testfiles/${testname}.out.h5 ${srcname} ${dstname}
+ COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} $<TARGET_FILE:h5diff${tgt_file_ext}> -v ./testfiles/${infile} ./testfiles/${testname}.out.h5 ${srcname} ${dstname}
)
set_tests_properties (H5COPY_F-${testname}-DIFF PROPERTIES DEPENDS H5COPY_F-${testname})
if (${resultcode} EQUAL 1)
@@ -105,7 +99,7 @@
add_test (
NAME H5COPY-${testname}
- COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} $<TARGET_FILE:h5copy${tgt_ext}> -i ./testfiles/${infile} -o ./testfiles/${testname}.out.h5 ${vparam} ${sparam} ${srcname} ${dparam} ${dstname} ${ARGN}
+ COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} $<TARGET_FILE:h5copy${tgt_file_ext}> -i ./testfiles/${infile} -o ./testfiles/${testname}.out.h5 ${vparam} ${sparam} ${srcname} ${dparam} ${dstname} ${ARGN}
)
if (HDF5_ENABLE_USING_MEMCHECKER)
if (last_test)
@@ -119,7 +113,7 @@
if (NOT ${resultcode} EQUAL 2)
add_test (
NAME H5COPY-${testname}-DIFF
- COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} $<TARGET_FILE:h5diff${tgt_ext}> -v ./testfiles/${infile} ./testfiles/${testname}.out.h5 ${srcname} ${dstname}
+ COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} $<TARGET_FILE:h5diff${tgt_file_ext}> -v ./testfiles/${infile} ./testfiles/${testname}.out.h5 ${srcname} ${dstname}
)
set_tests_properties (H5COPY-${testname}-DIFF PROPERTIES DEPENDS H5COPY-${testname})
if (${resultcode} EQUAL 1)
@@ -149,7 +143,7 @@
add_test (
NAME H5COPY-${testname}-prefill
- COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} $<TARGET_FILE:h5copy${tgt_ext}> -i ./testfiles/${infile} -o ./testfiles/${testname}.out.h5 -v -s ${psparam} -d ${pdparam}
+ COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} $<TARGET_FILE:h5copy${tgt_file_ext}> -i ./testfiles/${infile} -o ./testfiles/${testname}.out.h5 -v -s ${psparam} -d ${pdparam}
)
if (HDF5_ENABLE_USING_MEMCHECKER)
if (last_test)
@@ -161,14 +155,14 @@
add_test (
NAME H5COPY-${testname}
- COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} $<TARGET_FILE:h5copy${tgt_ext}> -i ./testfiles/${infile} -o ./testfiles/${testname}.out.h5 ${vparam} ${sparam} ${srcname} ${dparam} ${dstname} ${ARGN}
+ COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} $<TARGET_FILE:h5copy${tgt_file_ext}> -i ./testfiles/${infile} -o ./testfiles/${testname}.out.h5 ${vparam} ${sparam} ${srcname} ${dparam} ${dstname} ${ARGN}
)
set_tests_properties (H5COPY-${testname} PROPERTIES DEPENDS H5COPY-${testname}-prefill)
# resultcode=2 will cause the test to skip the diff test
if (NOT ${resultcode} EQUAL 2)
add_test (
NAME H5COPY-${testname}-DIFF
- COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} $<TARGET_FILE:h5diff${tgt_ext}> -v ./testfiles/${infile} ./testfiles/${testname}.out.h5 ${srcname} ${dstname}
+ COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} $<TARGET_FILE:h5diff${tgt_file_ext}> -v ./testfiles/${infile} ./testfiles/${testname}.out.h5 ${srcname} ${dstname}
)
set_tests_properties (H5COPY-${testname}-DIFF PROPERTIES DEPENDS H5COPY-${testname})
if (${resultcode} EQUAL 1)
@@ -188,7 +182,7 @@
add_test (
NAME H5COPY_SAME-${testname}-prefill
- COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} $<TARGET_FILE:h5copy${tgt_ext}> -i ./testfiles/${pfile} -o ./testfiles/${testname}.out.h5 -v -s ${psparam} -d ${pdparam}
+ COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} $<TARGET_FILE:h5copy${tgt_file_ext}> -i ./testfiles/${pfile} -o ./testfiles/${testname}.out.h5 -v -s ${psparam} -d ${pdparam}
)
if (HDF5_ENABLE_USING_MEMCHECKER)
if (last_test)
@@ -200,14 +194,14 @@
add_test (
NAME H5COPY_SAME-${testname}
- COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} $<TARGET_FILE:h5copy${tgt_ext}> -i ./testfiles/${testname}.out.h5 -o ./testfiles/${testname}.out.h5 ${vparam} ${sparam} ${srcname} ${dparam} ${dstname} ${ARGN}
+ COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} $<TARGET_FILE:h5copy${tgt_file_ext}> -i ./testfiles/${testname}.out.h5 -o ./testfiles/${testname}.out.h5 ${vparam} ${sparam} ${srcname} ${dparam} ${dstname} ${ARGN}
)
set_tests_properties (H5COPY_SAME-${testname} PROPERTIES DEPENDS H5COPY_SAME-${testname}-prefill)
# resultcode=2 will cause the test to skip the diff test
if (NOT ${resultcode} EQUAL 2)
add_test (
NAME H5COPY_SAME-${testname}-DIFF
- COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} $<TARGET_FILE:h5diff${tgt_ext}> -v ./testfiles/${testname}.out.h5 ./testfiles/${testname}.out.h5 ${srcname} ${dstname}
+ COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} $<TARGET_FILE:h5diff${tgt_file_ext}> -v ./testfiles/${testname}.out.h5 ./testfiles/${testname}.out.h5 ${srcname} ${dstname}
)
set_tests_properties (H5COPY_SAME-${testname}-DIFF PROPERTIES DEPENDS H5COPY_SAME-${testname})
if (${resultcode} EQUAL 1)
@@ -223,7 +217,7 @@
macro (ADD_H5_CMP_TEST testname resultcode infile vparam sparam srcname dparam dstname)
# If using memchecker add tests without using scripts
if (HDF5_ENABLE_USING_MEMCHECKER)
- add_test (NAME H5COPY-CMP-${testname} COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} $<TARGET_FILE:h5copy${tgt_ext}> -i ./testfiles/${infile} -o ./testfiles/${testname}.out.h5 ${vparam} ${sparam} ${srcname} ${dparam} ${dstname} ${ARGN})
+ add_test (NAME H5COPY-CMP-${testname} COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} $<TARGET_FILE:h5copy${tgt_file_ext}> -i ./testfiles/${infile} -o ./testfiles/${testname}.out.h5 ${vparam} ${sparam} ${srcname} ${dparam} ${dstname} ${ARGN})
if (${resultcode} EQUAL 1)
set_tests_properties (H5COPY-CMP-${testname} PROPERTIES WILL_FAIL "true")
endif ()
@@ -240,7 +234,7 @@
NAME H5COPY-CMP-${testname}
COMMAND "${CMAKE_COMMAND}"
-D "TEST_EMULATOR=${CMAKE_CROSSCOMPILING_EMULATOR}"
- -D "TEST_PROGRAM=$<TARGET_FILE:h5copy${tgt_ext}>"
+ -D "TEST_PROGRAM=$<TARGET_FILE:h5copy${tgt_file_ext}>"
-D "TEST_ARGS=-i;./testfiles/${infile};-o;./testfiles/${testname}.out.h5;${vparam};${sparam};${srcname};${dparam};${dstname}"
-D "TEST_FOLDER=${PROJECT_BINARY_DIR}"
-D "TEST_OUTPUT=./testfiles/${testname}.out.out"
diff --git a/tools/test/h5copy/Makefile.in b/tools/test/h5copy/Makefile.in
index 3cef610..c84f6b9 100644
--- a/tools/test/h5copy/Makefile.in
+++ b/tools/test/h5copy/Makefile.in
@@ -414,15 +414,15 @@ AMTAR = @AMTAR@
# H5_CFLAGS holds flags that should be used when building hdf5,
# but which should not be exported to h5cc for building other programs.
-# AM_CFLAGS is an automake construct which should be used by Makefiles
+# AM_CFLAGS is an automake construct which should be used by Makefiles
# instead of CFLAGS, as CFLAGS is reserved solely for the user to define.
# This applies to FCFLAGS, CXXFLAGS, CPPFLAGS, and LDFLAGS as well.
-AM_CFLAGS = @AM_CFLAGS@ @H5_CFLAGS@
+AM_CFLAGS = @AM_CFLAGS@ @H5_CFLAGS@ @H5_ECFLAGS@
# Include src and tools/lib directories
AM_CPPFLAGS = @AM_CPPFLAGS@ @H5_CPPFLAGS@ -I$(top_srcdir)/src \
-I$(top_srcdir)/tools/lib
-AM_CXXFLAGS = @AM_CXXFLAGS@ @H5_CXXFLAGS@
+AM_CXXFLAGS = @AM_CXXFLAGS@ @H5_CXXFLAGS@ @H5_ECXXFLAGS@
AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
AM_FCFLAGS = @AM_FCFLAGS@ @H5_FCFLAGS@
AM_JAVACFLAGS = @AM_JAVACFLAGS@
@@ -442,6 +442,7 @@ CC = @CC@
CCDEPMODE = @CCDEPMODE@
CC_VERSION = @CC_VERSION@
CFLAGS = @CFLAGS@
+CLANG_SANITIZE_CHECKS = @CLANG_SANITIZE_CHECKS@
CODESTACK = @CODESTACK@
CONFIG_DATE = @CONFIG_DATE@
CONFIG_MODE = @CONFIG_MODE@
@@ -458,6 +459,7 @@ DEFAULT_API_VERSION = @DEFAULT_API_VERSION@
DEFS = @DEFS@
DEPDIR = @DEPDIR@
DEPRECATED_SYMBOLS = @DEPRECATED_SYMBOLS@
+DESIRED_FILE_LOCKING = @DESIRED_FILE_LOCKING@
DEV_WARNINGS = @DEV_WARNINGS@
DIRECT_VFD = @DIRECT_VFD@
DLLTOOL = @DLLTOOL@
@@ -494,8 +496,11 @@ H5_CFLAGS = @H5_CFLAGS@
H5_CLASSPATH = @H5_CLASSPATH@
H5_CPPFLAGS = @H5_CPPFLAGS@
H5_CXXFLAGS = @H5_CXXFLAGS@
+H5_ECFLAGS = @H5_ECFLAGS@
+H5_ECXXFLAGS = @H5_ECXXFLAGS@
H5_FCFLAGS = @H5_FCFLAGS@
H5_FORTRAN_SHARED = @H5_FORTRAN_SHARED@
+H5_IS_DARWIN = @H5_IS_DARWIN@
H5_JAVACFLAGS = @H5_JAVACFLAGS@
H5_JAVAFLAGS = @H5_JAVAFLAGS@
H5_JNIFLAGS = @H5_JNIFLAGS@
@@ -518,6 +523,7 @@ HL = @HL@
HL_FOR = @HL_FOR@
HSIZE_T = @HSIZE_T@
HSSIZE_T = @HSSIZE_T@
+IGNORE_DISABLED_FILE_LOCKS = @IGNORE_DISABLED_FILE_LOCKS@
INSTALL = @INSTALL@
INSTALL_DATA = @INSTALL_DATA@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
@@ -554,6 +560,7 @@ MAINT = @MAINT@
MAKEINFO = @MAKEINFO@
MANIFEST_TOOL = @MANIFEST_TOOL@
MEMORYALLOCSANITYCHECK = @MEMORYALLOCSANITYCHECK@
+MIRROR_VFD = @MIRROR_VFD@
MKDIR_P = @MKDIR_P@
MPE = @MPE@
NM = @NM@
@@ -613,6 +620,7 @@ TIME = @TIME@
TR = @TR@
TRACE_API = @TRACE_API@
UNAME_INFO = @UNAME_INFO@
+USE_FILE_LOCKING = @USE_FILE_LOCKING@
USE_FILTER_DEFLATE = @USE_FILTER_DEFLATE@
USE_FILTER_SZIP = @USE_FILTER_SZIP@
USINGMEMCHECKER = @USINGMEMCHECKER@
@@ -648,6 +656,7 @@ docdir = $(exec_prefix)/doc
dvidir = @dvidir@
enable_shared = @enable_shared@
enable_static = @enable_static@
+examplesdir = @examplesdir@
exec_prefix = @exec_prefix@
fortran_linux_linker_option = @fortran_linux_linker_option@
host = @host@
@@ -704,15 +713,15 @@ LIBH5_HL = $(top_builddir)/hl/src/libhdf5_hl.la
LIBH5F_HL = $(top_builddir)/hl/fortran/src/libhdf5hl_fortran.la
LIBH5CPP_HL = $(top_builddir)/hl/c++/src/libhdf5_hl_cpp.la
-# Note that in svn revision 19400 the '/' after DESTDIR in H5* variables below
-# has been removed. According to the official description of DESTDIR by Gnu at
-# http://www.gnu.org/prep/standards/html_node/DESTDIR.html, DESTDIR is
-# prepended to the normal and complete install path that it precedes for the
-# purpose of installing in a temporary directory which is useful for building
-# rpms and other packages. The '/' after ${DESTDIR} will be followed by another
-# '/' at the beginning of the normal install path. When DESTDIR is empty the
-# path then begins with '//', which is incorrect and causes problems at least for
-# Cygwin.
+# Note that in svn revision 19400 the '/' after DESTDIR in H5* variables below
+# has been removed. According to the official description of DESTDIR by Gnu at
+# http://www.gnu.org/prep/standards/html_node/DESTDIR.html, DESTDIR is
+# prepended to the normal and complete install path that it precedes for the
+# purpose of installing in a temporary directory which is useful for building
+# rpms and other packages. The '/' after ${DESTDIR} will be followed by another
+# '/' at the beginning of the normal install path. When DESTDIR is empty the
+# path then begins with '//', which is incorrect and causes problems at least for
+# Cygwin.
# Scripts used to build examples
# If only shared libraries have been installed, have h5cc build examples with
@@ -759,7 +768,7 @@ LIB = $(lib_LIBRARIES) $(lib_LTLIBRARIES) $(noinst_LIBRARIES) \
PROGS = $(bin_PROGRAMS) $(bin_SCRIPTS) $(noinst_PROGRAMS) $(noinst_SCRIPTS) \
$(EXTRA_PROG)
-chk_TESTS = $(check_PROGRAMS) $(check_SCRIPTS) $(EXTRA_TEST)
+chk_TESTS = $(check_PROGRAMS) $(check_SCRIPTS) $(EXTRA_TEST)
TEST_EXTENSIONS = .sh
SH_LOG_COMPILER = $(SHELL)
AM_SH_LOG_FLAGS =
@@ -1323,28 +1332,37 @@ $(TEST_PROG_CHKEXE) $(TEST_PROG_PARA_CHKEXE) dummy.chkexe_:
echo "============================" > $${log}; \
fi; \
if test "X$(FORTRAN_API)" = "Xyes"; then \
- echo "Fortran API: Testing $(HDF5_DRIVER) $${tname} $(TEST_FLAGS)"; \
+ echo "Fortran API: Testing $${tname} $(TEST_FLAGS)"; \
if test -n "$(REALTIMEOUTPUT)"; then \
- echo "Fortran API: $(HDF5_DRIVER) $${tname} $(TEST_FLAGS) Test Log" | tee -a $${log}; \
+ echo "Fortran API: Test log for $${tname} $(TEST_FLAGS)" | tee -a $${log}; \
else \
- echo "Fortran API: $(HDF5_DRIVER) $${tname} $(TEST_FLAGS) Test Log" >> $${log}; \
+ echo "Fortran API: Test log for $${tname} $(TEST_FLAGS)" >> $${log}; \
fi; \
elif test "X$(CXX_API)" = "Xyes"; then \
- echo "C++ API: Testing $(HDF5_DRIVER) $${tname} $(TEST_FLAGS)"; \
+ echo "C++ API: Testing $${tname} $(TEST_FLAGS)"; \
if test -n "$(REALTIMEOUTPUT)"; then \
- echo "C++ API: $(HDF5_DRIVER) $${tname} $(TEST_FLAGS) Test Log" | tee -a $${log};\
+ echo "C++ API: Test log for $${tname} $(TEST_FLAGS)" | tee -a $${log};\
else \
- echo "C++ API: $(HDF5_DRIVER) $${tname} $(TEST_FLAGS) Test Log" >> $${log};\
+ echo "C++ API: Test log for $${tname} $(TEST_FLAGS)" >> $${log};\
fi; \
else \
- echo "Testing $(HDF5_DRIVER) $${tname} $(TEST_FLAGS)"; \
+ echo "Testing: $${tname} $(TEST_FLAGS)"; \
if test -n "$(REALTIMEOUTPUT)"; then \
- echo "$(HDF5_DRIVER) $${tname} $(TEST_FLAGS) Test Log" | tee -a $${log}; \
+ echo "Test log for $${tname} $(TEST_FLAGS)" | tee -a $${log}; \
else \
- echo "$(HDF5_DRIVER) $${tname} $(TEST_FLAGS) Test Log" >> $${log}; \
+ echo "Test log for $${tname} $(TEST_FLAGS)" >> $${log}; \
fi; \
fi; \
if test -n "$(REALTIMEOUTPUT)"; then \
+ if test -n "$(HDF5_DRIVER)"; then \
+ echo "Virtual file driver (VFD): $(HDF5_DRIVER)" | tee -a $${log}; \
+ fi; \
+ else \
+ if test -n "$(HDF5_DRIVER)"; then \
+ echo "Virtual file driver (VFD): $(HDF5_DRIVER)" >> $${log}; \
+ fi; \
+ fi; \
+ if test -n "$(REALTIMEOUTPUT)"; then \
echo "============================" | tee -a $${log}; \
else \
echo "============================" >> $${log}; \
diff --git a/tools/test/h5copy/h5copygentest.c b/tools/test/h5copy/h5copygentest.c
index f6aa72f..8c8a890 100644
--- a/tools/test/h5copy/h5copygentest.c
+++ b/tools/test/h5copy/h5copygentest.c
@@ -338,14 +338,14 @@ static void gent_att_compound_vlstr(hid_t loc_id)
const char *v;
} s1;
hsize_t dim[1] = {1}; /* Dimension size */
- hid_t sid = -1; /* Dataspace ID */
- hid_t tid = -1; /* Datatype ID */
- hid_t aid = -1; /* Attribute ID */
- hid_t did = -1; /* Dataset ID */
- hid_t gid = -1; /* Group ID */
- hid_t vl_str_tid = -1; /* Variable length datatype ID */
- hid_t cmpd_tid = -1; /* Compound datatype ID */
- hid_t null_sid = -1; /* Null dataspace ID */
+ hid_t sid = H5I_INVALID_HID; /* Dataspace ID */
+ hid_t tid = H5I_INVALID_HID; /* Datatype ID */
+ hid_t aid = H5I_INVALID_HID; /* Attribute ID */
+ hid_t did = H5I_INVALID_HID; /* Dataset ID */
+ hid_t gid = H5I_INVALID_HID; /* Group ID */
+ hid_t vl_str_tid = H5I_INVALID_HID; /* Variable length datatype ID */
+ hid_t cmpd_tid = H5I_INVALID_HID; /* Compound datatype ID */
+ hid_t null_sid = H5I_INVALID_HID; /* Null dataspace ID */
s1 buf; /* Buffer */
buf.i = 9;
@@ -725,7 +725,7 @@ out:
*------------------------------------------------------------------------*/
static void Test_Obj_Copy(void)
{
- hid_t fid = -1; /* File id */
+ hid_t fid = H5I_INVALID_HID; /* File id */
hid_t fapl_new = (-1); /* File access property id */
unsigned new_format; /* New format or old format */
@@ -744,9 +744,9 @@ static void Test_Obj_Copy(void)
/* Set the FAPL for the type of format */
/* Create source file */
if(new_format)
- fid = H5Fcreate(HDF_FILE1, H5F_ACC_TRUNC, H5P_DEFAULT, fapl_new);
- else
- fid = H5Fcreate(HDF_FILE1_NEW, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT);
+ fid = H5Fcreate(HDF_FILE1, H5F_ACC_TRUNC, H5P_DEFAULT, fapl_new);
+ else
+ fid = H5Fcreate(HDF_FILE1_NEW, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT);
if(fid < 0) {
HDfprintf(stderr, "Error: H5Fcreate failed.\n");
goto out;
@@ -756,7 +756,7 @@ static void Test_Obj_Copy(void)
gent_empty_group(fid);
gent_nested_datasets(fid);
gent_nested_group(fid);
- gent_att_compound_vlstr(fid);
+ gent_att_compound_vlstr(fid);
H5Fclose(fid);
fid = (-1);
diff --git a/tools/test/h5copy/testh5copy.sh.in b/tools/test/h5copy/testh5copy.sh.in
index 2440ca4..ebbcb6c 100644
--- a/tools/test/h5copy/testh5copy.sh.in
+++ b/tools/test/h5copy/testh5copy.sh.in
@@ -13,7 +13,7 @@
#
# Tests for the h5copy tool
#
-# Pedro Vicente Nunes (pvn@hdfgroup.org), Albert Cheng (acheng@hdfgroup.org)
+# Pedro Vicente Nunes, Albert Cheng
# Thursday, July 20, 2006
#
@@ -200,6 +200,7 @@ TOOLTEST()
fi
runh5diff=no
fi
+
if [ "$3" = -o ]; then
outputfile=$4
else
@@ -219,6 +220,7 @@ TOOLTEST()
$RUNSERIAL $H5COPY_BIN $@
) > $actualout 2> $actualerr
RET=$?
+
if [ $RET != 0 ]; then
echo "*FAILED*"
echo "failed result is:"
@@ -268,6 +270,7 @@ TOOLTEST_PREFILL()
$RUNSERIAL $H5COPY_BIN -i $inputfile -o $outputfile -v -s $grp_name -d $grp_name2
) > $actualout 2> $actualerr
RET=$?
+
if [ $RET != 0 ]; then
echo "*FAILED*"
echo "failed result is:"
@@ -282,6 +285,7 @@ TOOLTEST_PREFILL()
$RUNSERIAL $H5COPY_BIN -i $inputfile -o $outputfile -v -s $obj_name -d $obj_name2
) > $actualout 2> $actualerr
RET=$?
+
if [ $RET != 0 ]; then
echo "*FAILED*"
echo "failed result is:"
@@ -313,6 +317,7 @@ TOOLTEST_SAME()
else
runh5diff=no
fi
+
if [ "$3" = -o ]; then
outputfile=$4
else
@@ -330,6 +335,7 @@ TOOLTEST_SAME()
$RUNSERIAL $H5COPY_BIN -i $inputfile -o $outputfile -v -s $grp_name -d $grp_name
) > $actualout 2> $actualerr
RET=$?
+
if [ $RET != 0 ]; then
echo "*FAILED*"
echo "failed result is:"
@@ -344,6 +350,7 @@ TOOLTEST_SAME()
$RUNSERIAL $H5COPY_BIN -i $outputfile -o $outputfile -v -s $grp_name -d $grp_name2
) > $actualout 2> $actualerr
RET=$?
+
if [ $RET != 0 ]; then
echo "*FAILED*"
echo "failed result is:"
@@ -406,6 +413,7 @@ TOOLTEST_FAIL()
if [ "$1" = -i ]; then
inputfile=$2
fi
+
if [ "$3" = -o ]; then
outputfile=$4
fi
@@ -417,8 +425,8 @@ TOOLTEST_FAIL()
#echo "#############################"
$RUNSERIAL $H5COPY_BIN $@
) > $actualout 2> $actualerr
-
RET=$?
+
# save actualout and actualerr in case they are needed later.
cp $actualout $actualout_sav
STDOUT_FILTER $actualout
diff --git a/tools/test/h5diff/CMakeLists.txt b/tools/test/h5diff/CMakeLists.txt
index cb4397f..e4bfc99 100644
--- a/tools/test/h5diff/CMakeLists.txt
+++ b/tools/test/h5diff/CMakeLists.txt
@@ -1,4 +1,4 @@
-cmake_minimum_required (VERSION 3.10)
+cmake_minimum_required (VERSION 3.12)
project (HDF5_TOOLS_TEST_H5DIFF C)
# --------------------------------------------------------------------
@@ -43,4 +43,6 @@ if (BUILD_SHARED_LIBS)
)
endif ()
-include (CMakeTests.cmake)
+if (HDF5_TEST_TOOLS)
+ include (CMakeTests.cmake)
+endif ()
diff --git a/tools/test/h5diff/CMakeTests.cmake b/tools/test/h5diff/CMakeTests.cmake
index 57bcd12..ab15b02 100644
--- a/tools/test/h5diff/CMakeTests.cmake
+++ b/tools/test/h5diff/CMakeTests.cmake
@@ -66,8 +66,10 @@
${HDF5_TOOLS_TEST_H5DIFF_SOURCE_DIR}/testfiles/non_comparables2.h5
${HDF5_TOOLS_TEST_H5DIFF_SOURCE_DIR}/testfiles/tudfilter.h5
${HDF5_TOOLS_TEST_H5DIFF_SOURCE_DIR}/testfiles/tudfilter2.h5
- ${HDF5_TOOLS_TEST_H5DIFF_SOURCE_DIR}/testfiles/diff_strings1.h5
- ${HDF5_TOOLS_TEST_H5DIFF_SOURCE_DIR}/testfiles/diff_strings2.h5
+ ${HDF5_TOOLS_TEST_H5DIFF_SOURCE_DIR}/testfiles/h5diff_strings1.h5
+ ${HDF5_TOOLS_TEST_H5DIFF_SOURCE_DIR}/testfiles/h5diff_strings2.h5
+ ${HDF5_TOOLS_TEST_H5DIFF_SOURCE_DIR}/testfiles/h5diff_eps1.h5
+ ${HDF5_TOOLS_TEST_H5DIFF_SOURCE_DIR}/testfiles/h5diff_eps2.h5
# tools/testfiles/vds
${HDF5_TOOLS_DIR}/testfiles/vds/1_a.h5
${HDF5_TOOLS_DIR}/testfiles/vds/1_b.h5
@@ -201,6 +203,7 @@
${HDF5_TOOLS_TEST_H5DIFF_SOURCE_DIR}/testfiles/h5diff_56.txt
${HDF5_TOOLS_TEST_H5DIFF_SOURCE_DIR}/testfiles/h5diff_57.txt
${HDF5_TOOLS_TEST_H5DIFF_SOURCE_DIR}/testfiles/h5diff_58.txt
+ ${HDF5_TOOLS_TEST_H5DIFF_SOURCE_DIR}/testfiles/h5diff_58_ref.txt
${HDF5_TOOLS_TEST_H5DIFF_SOURCE_DIR}/testfiles/h5diff_59.txt
${HDF5_TOOLS_TEST_H5DIFF_SOURCE_DIR}/testfiles/h5diff_500.txt
${HDF5_TOOLS_TEST_H5DIFF_SOURCE_DIR}/testfiles/h5diff_501.txt
@@ -289,6 +292,7 @@
${HDF5_TOOLS_TEST_H5DIFF_SOURCE_DIR}/testfiles/h5diff_v2.txt
${HDF5_TOOLS_TEST_H5DIFF_SOURCE_DIR}/testfiles/h5diff_v3.txt
${HDF5_TOOLS_TEST_H5DIFF_SOURCE_DIR}/testfiles/h5diff_vlstr.txt
+ ${HDF5_TOOLS_TEST_H5DIFF_SOURCE_DIR}/testfiles/h5diff_eps.txt
)
set (LIST_WIN_TEST_FILES
@@ -325,9 +329,10 @@
# Overwrite system dependent files (Windows) and not VS2015
#
set (COPY_WINDOWS_FILES false)
- if (MINGW)
- set (COPY_WINDOWS_FILES true)
- endif ()
+ # MinGW tests may depend on host system
+ #if (MINGW)
+ # set (COPY_WINDOWS_FILES true)
+ #endif ()
if (WIN32 AND MSVC_VERSION LESS 1900)
set (COPY_WINDOWS_FILES true)
endif ()
@@ -350,12 +355,6 @@
endif ()
add_custom_target(h5diff_files ALL COMMENT "Copying files needed by h5diff tests" DEPENDS ${h5diff_files_list})
- if (NOT BUILD_SHARED_LIBS)
- set (tgt_ext "")
- else ()
- set (tgt_ext "-shared")
- endif ()
-
##############################################################################
##############################################################################
### T H E T E S T S M A C R O S ###
@@ -363,35 +362,37 @@
##############################################################################
macro (ADD_H5_TEST resultfile resultcode)
- # If using memchecker add tests without using scripts
- if (HDF5_ENABLE_USING_MEMCHECKER)
- add_test (NAME H5DIFF-${resultfile} COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} $<TARGET_FILE:h5diff${tgt_ext}> ${ARGN})
- set_tests_properties (H5DIFF-${resultfile} PROPERTIES WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles")
- if (${resultcode})
- set_tests_properties (H5DIFF-${resultfile} PROPERTIES WILL_FAIL "true")
- endif ()
- if (last_test)
- set_tests_properties (H5DIFF-${resultfile} PROPERTIES DEPENDS ${last_test})
- endif ()
- else ()
- add_test (
- NAME H5DIFF-${resultfile}
- COMMAND "${CMAKE_COMMAND}"
- -D "TEST_EMULATOR=${CMAKE_CROSSCOMPILING_EMULATOR}"
- -D "TEST_PROGRAM=$<TARGET_FILE:h5diff${tgt_ext}>"
- -D "TEST_ARGS:STRING=${ARGN}"
- -D "TEST_FOLDER=${PROJECT_BINARY_DIR}/testfiles"
- -D "TEST_OUTPUT=${resultfile}.out"
- -D "TEST_EXPECT=${resultcode}"
- -D "TEST_REFERENCE=${resultfile}.txt"
- -D "TEST_APPEND=EXIT CODE:"
- -P "${HDF_RESOURCES_EXT_DIR}/runTest.cmake"
- )
- if (last_test)
- set_tests_properties (H5DIFF-${resultfile} PROPERTIES DEPENDS ${last_test})
+ if (HDF5_TEST_SERIAL)
+ # If using memchecker add tests without using scripts
+ if (HDF5_ENABLE_USING_MEMCHECKER)
+ add_test (NAME H5DIFF-${resultfile} COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} $<TARGET_FILE:h5diff${tgt_file_ext}> ${ARGN})
+ set_tests_properties (H5DIFF-${resultfile} PROPERTIES WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles")
+ if (${resultcode})
+ set_tests_properties (H5DIFF-${resultfile} PROPERTIES WILL_FAIL "true")
+ endif ()
+ if (last_test)
+ set_tests_properties (H5DIFF-${resultfile} PROPERTIES DEPENDS ${last_test})
+ endif ()
+ else ()
+ add_test (
+ NAME H5DIFF-${resultfile}
+ COMMAND "${CMAKE_COMMAND}"
+ -D "TEST_EMULATOR=${CMAKE_CROSSCOMPILING_EMULATOR}"
+ -D "TEST_PROGRAM=$<TARGET_FILE:h5diff${tgt_file_ext}>"
+ -D "TEST_ARGS:STRING=${ARGN}"
+ -D "TEST_FOLDER=${PROJECT_BINARY_DIR}/testfiles"
+ -D "TEST_OUTPUT=${resultfile}.out"
+ -D "TEST_EXPECT=${resultcode}"
+ -D "TEST_REFERENCE=${resultfile}.txt"
+ -D "TEST_APPEND=EXIT CODE:"
+ -P "${HDF_RESOURCES_EXT_DIR}/runTest.cmake"
+ )
+ if (last_test)
+ set_tests_properties (H5DIFF-${resultfile} PROPERTIES DEPENDS ${last_test})
+ endif ()
endif ()
endif ()
- if (H5_HAVE_PARALLEL)
+ if (H5_HAVE_PARALLEL AND HDF5_TEST_PARALLEL)
ADD_PH5_TEST (${resultfile} ${resultcode} ${ARGN})
endif ()
endmacro ()
@@ -399,7 +400,7 @@
macro (ADD_PH5_TEST resultfile resultcode)
# If using memchecker add tests without using scripts
if (HDF5_ENABLE_USING_MEMCHECKER)
- add_test (NAME MPI_TEST_H5DIFF-${resultfile} COMMAND ${MPIEXEC_EXECUTABLE} ${MPIEXEC_NUMPROC_FLAG} ${MPIEXEC_MAX_NUMPROCS} ${MPIEXEC_PREFLAGS} $<TARGET_FILE:ph5diff> ${MPIEXEC_POSTFLAGS} ${ARGN})
+ add_test (NAME MPI_TEST_H5DIFF-${resultfile} COMMAND ${MPIEXEC_EXECUTABLE} ${MPIEXEC_NUMPROC_FLAG} ${MPIEXEC_MAX_NUMPROCS} ${MPIEXEC_PREFLAGS} $<TARGET_FILE:ph5diff${tgt_file_ext}> ${MPIEXEC_POSTFLAGS} ${ARGN})
set_tests_properties (MPI_TEST_H5DIFF-${resultfile} PROPERTIES WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/PAR/testfiles")
if (${resultcode})
set_tests_properties (MPI_TEST_H5DIFF-${resultfile} PROPERTIES WILL_FAIL "true")
@@ -411,7 +412,7 @@
add_test (
NAME MPI_TEST_H5DIFF-${resultfile}
COMMAND "${CMAKE_COMMAND}"
- -D "TEST_PROGRAM=${MPIEXEC_EXECUTABLE};${MPIEXEC_NUMPROC_FLAG};${MPIEXEC_MAX_NUMPROCS};${MPIEXEC_PREFLAGS};$<TARGET_FILE:ph5diff>;${MPIEXEC_POSTFLAGS}"
+ -D "TEST_PROGRAM=${MPIEXEC_EXECUTABLE};${MPIEXEC_NUMPROC_FLAG};${MPIEXEC_MAX_NUMPROCS};${MPIEXEC_PREFLAGS};$<TARGET_FILE:ph5diff${tgt_file_ext}>;${MPIEXEC_POSTFLAGS}"
-D "TEST_ARGS:STRING=${ARGN}"
-D "TEST_FOLDER=${PROJECT_BINARY_DIR}/PAR/testfiles"
-D "TEST_OUTPUT=${resultfile}.out"
@@ -530,8 +531,11 @@
set (ATTR_VERBOSE_LEVEL_FILE1 h5diff_attr_v_level1.h5)
set (ATTR_VERBOSE_LEVEL_FILE2 h5diff_attr_v_level2.h5)
# strings
- set (STRINGS1 diff_strings1.h5)
- set (STRINGS2 diff_strings2.h5)
+ set (STRINGS1 h5diff_strings1.h5)
+ set (STRINGS2 h5diff_strings2.h5)
+ # epsilon
+ set (EPS1 h5diff_eps1.h5)
+ set (EPS2 h5diff_eps2.h5)
# VDS tests
set (FILEV1 1_vds.h5)
@@ -917,6 +921,8 @@
h5diff_v3.out.err
h5diff_vlstr.out
h5diff_vlstr.out.err
+ h5diff_eps.out
+ h5diff_eps.out.err
)
set_tests_properties (H5DIFF-clearall-objects PROPERTIES WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles")
if (last_test)
@@ -1044,7 +1050,8 @@ ADD_H5_TEST (h5diff_56 1 -v ${FILE4} ${FILE4} dset6a dset6b)
ADD_H5_TEST (h5diff_57 0 -v ${FILE4} ${FILE4} dset7a dset7b)
# 5.8 (region reference)
-ADD_H5_TEST (h5diff_58 1 -v ${FILE7} ${FILE8} refreg)
+ADD_H5_TEST (h5diff_58 1 -v2 ${FILE7} ${FILE8} refreg)
+ADD_H5_TEST (h5diff_58_ref 1 -v2 ${FILE7} ${FILE8} /g1/reference2D)
# test for both dset and attr with same type but with different size
# ( HDDFV-7942 )
@@ -1095,6 +1102,9 @@ ADD_H5_TEST (h5diff_609 0 -d 200 ${FILE1} ${FILE2} g1/dset3 g1/dset4)
# 6.10: number smaller than smallest difference
ADD_H5_TEST (h5diff_610 1 -d 1 ${FILE1} ${FILE2} g1/dset3 g1/dset4)
+# eps: number smaller than epsilon
+ADD_H5_TEST (h5diff_eps 0 -v3 -d 1e-16 ${EPS1} ${EPS2})
+
# ##############################################################################
# # -p
# ##############################################################################
@@ -1480,11 +1490,9 @@ ADD_H5_TEST (h5diff_484 0 -v --exclude-path "/dset3" ${EXCLUDE_FILE1_1} ${EXCLUD
# Only one file contains unique objs. Common objs are same.
# (HDFFV-7837)
#
-ADD_H5_TEST (h5diff_485 0 -v --exclude-path "/group1" h5diff_exclude3-1.h5 h5diff_exclude3-2.h5)
-ADD_H5_TEST (h5diff_486 0 -v --exclude-path "/group1" h5diff_exclude3-2.h5 h5diff_exclude3-1.h5)
-ADD_H5_TEST (h5diff_487 1 -v --exclude-path "/group1/dset" h5diff_exclude3-1.h5 h5diff_exclude3-2.h5)
-
-
+ADD_H5_TEST (h5diff_485 0 -v --exclude-path "/group1" ${EXCLUDE_FILE3_1} ${EXCLUDE_FILE3_2})
+ADD_H5_TEST (h5diff_486 0 -v --exclude-path "/group1" ${EXCLUDE_FILE3_2} ${EXCLUDE_FILE3_1})
+ADD_H5_TEST (h5diff_487 1 -v --exclude-path "/group1/dset" ${EXCLUDE_FILE3_1} ${EXCLUDE_FILE3_2})
# ##############################################################################
# # diff various multiple vlen and fixed strings in a compound type dataset
@@ -1518,13 +1526,11 @@ ADD_H5_TEST (h5diff_646 1 -v --use-system-epsilon -p 0.05 ${FILE1} ${FILE2} /g1/
# ##############################################################################
# # Test array variances
# ##############################################################################
-#
-# Test with -d , -p and --use-system-epsilon.
ADD_H5_TEST (h5diff_800 1 -v ${FILE7} ${FILE8} /g1/array /g1/array)
ADD_H5_TEST (h5diff_801 1 -v ${FILE7} ${FILE8A} /g1/array /g1/array)
# ##############################################################################
-# VDS tests
+# # VDS tests
# ##############################################################################
ADD_H5_TEST (h5diff_v1 0 -v ${FILEV1} ${FILEV2})
ADD_H5_TEST (h5diff_v2 0 -r ${FILEV1} ${FILEV2})
@@ -1533,7 +1539,7 @@ ADD_H5_TEST (h5diff_v3 0 -c ${FILEV1} ${FILEV2})
##############################################################################
### P L U G I N T E S T S
##############################################################################
-if (BUILD_SHARED_LIBS)
+if (BUILD_SHARED_LIBS AND HDF5_TEST_SERIAL)
ADD_H5_UD_TEST (h5diff_plugin_test 0 h5diff_ud -v tudfilter.h5 tudfilter2.h5)
ADD_H5_UD_TEST (h5diff_plugin_fail 2 h5diff_udfail -v tudfilter.h5 tudfilter2.h5)
endif ()
diff --git a/tools/test/h5diff/Makefile.in b/tools/test/h5diff/Makefile.in
index 664abdc..a6f75ef 100644
--- a/tools/test/h5diff/Makefile.in
+++ b/tools/test/h5diff/Makefile.in
@@ -429,15 +429,15 @@ AMTAR = @AMTAR@
# H5_CFLAGS holds flags that should be used when building hdf5,
# but which should not be exported to h5cc for building other programs.
-# AM_CFLAGS is an automake construct which should be used by Makefiles
+# AM_CFLAGS is an automake construct which should be used by Makefiles
# instead of CFLAGS, as CFLAGS is reserved solely for the user to define.
# This applies to FCFLAGS, CXXFLAGS, CPPFLAGS, and LDFLAGS as well.
-AM_CFLAGS = @AM_CFLAGS@ @H5_CFLAGS@
+AM_CFLAGS = @AM_CFLAGS@ @H5_CFLAGS@ @H5_ECFLAGS@
# Include src and tools/lib directories
AM_CPPFLAGS = @AM_CPPFLAGS@ @H5_CPPFLAGS@ -I$(top_srcdir)/src \
-I$(top_srcdir)/tools/lib
-AM_CXXFLAGS = @AM_CXXFLAGS@ @H5_CXXFLAGS@
+AM_CXXFLAGS = @AM_CXXFLAGS@ @H5_CXXFLAGS@ @H5_ECXXFLAGS@
AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
AM_FCFLAGS = @AM_FCFLAGS@ @H5_FCFLAGS@
AM_JAVACFLAGS = @AM_JAVACFLAGS@
@@ -457,6 +457,7 @@ CC = @CC@
CCDEPMODE = @CCDEPMODE@
CC_VERSION = @CC_VERSION@
CFLAGS = @CFLAGS@
+CLANG_SANITIZE_CHECKS = @CLANG_SANITIZE_CHECKS@
CODESTACK = @CODESTACK@
CONFIG_DATE = @CONFIG_DATE@
CONFIG_MODE = @CONFIG_MODE@
@@ -473,6 +474,7 @@ DEFAULT_API_VERSION = @DEFAULT_API_VERSION@
DEFS = @DEFS@
DEPDIR = @DEPDIR@
DEPRECATED_SYMBOLS = @DEPRECATED_SYMBOLS@
+DESIRED_FILE_LOCKING = @DESIRED_FILE_LOCKING@
DEV_WARNINGS = @DEV_WARNINGS@
DIRECT_VFD = @DIRECT_VFD@
DLLTOOL = @DLLTOOL@
@@ -509,8 +511,11 @@ H5_CFLAGS = @H5_CFLAGS@
H5_CLASSPATH = @H5_CLASSPATH@
H5_CPPFLAGS = @H5_CPPFLAGS@
H5_CXXFLAGS = @H5_CXXFLAGS@
+H5_ECFLAGS = @H5_ECFLAGS@
+H5_ECXXFLAGS = @H5_ECXXFLAGS@
H5_FCFLAGS = @H5_FCFLAGS@
H5_FORTRAN_SHARED = @H5_FORTRAN_SHARED@
+H5_IS_DARWIN = @H5_IS_DARWIN@
H5_JAVACFLAGS = @H5_JAVACFLAGS@
H5_JAVAFLAGS = @H5_JAVAFLAGS@
H5_JNIFLAGS = @H5_JNIFLAGS@
@@ -533,6 +538,7 @@ HL = @HL@
HL_FOR = @HL_FOR@
HSIZE_T = @HSIZE_T@
HSSIZE_T = @HSSIZE_T@
+IGNORE_DISABLED_FILE_LOCKS = @IGNORE_DISABLED_FILE_LOCKS@
INSTALL = @INSTALL@
INSTALL_DATA = @INSTALL_DATA@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
@@ -569,6 +575,7 @@ MAINT = @MAINT@
MAKEINFO = @MAKEINFO@
MANIFEST_TOOL = @MANIFEST_TOOL@
MEMORYALLOCSANITYCHECK = @MEMORYALLOCSANITYCHECK@
+MIRROR_VFD = @MIRROR_VFD@
MKDIR_P = @MKDIR_P@
MPE = @MPE@
NM = @NM@
@@ -628,6 +635,7 @@ TIME = @TIME@
TR = @TR@
TRACE_API = @TRACE_API@
UNAME_INFO = @UNAME_INFO@
+USE_FILE_LOCKING = @USE_FILE_LOCKING@
USE_FILTER_DEFLATE = @USE_FILTER_DEFLATE@
USE_FILTER_SZIP = @USE_FILTER_SZIP@
USINGMEMCHECKER = @USINGMEMCHECKER@
@@ -663,6 +671,7 @@ docdir = $(exec_prefix)/doc
dvidir = @dvidir@
enable_shared = @enable_shared@
enable_static = @enable_static@
+examplesdir = @examplesdir@
exec_prefix = @exec_prefix@
fortran_linux_linker_option = @fortran_linux_linker_option@
host = @host@
@@ -719,15 +728,15 @@ LIBH5_HL = $(top_builddir)/hl/src/libhdf5_hl.la
LIBH5F_HL = $(top_builddir)/hl/fortran/src/libhdf5hl_fortran.la
LIBH5CPP_HL = $(top_builddir)/hl/c++/src/libhdf5_hl_cpp.la
-# Note that in svn revision 19400 the '/' after DESTDIR in H5* variables below
-# has been removed. According to the official description of DESTDIR by Gnu at
-# http://www.gnu.org/prep/standards/html_node/DESTDIR.html, DESTDIR is
-# prepended to the normal and complete install path that it precedes for the
-# purpose of installing in a temporary directory which is useful for building
-# rpms and other packages. The '/' after ${DESTDIR} will be followed by another
-# '/' at the beginning of the normal install path. When DESTDIR is empty the
-# path then begins with '//', which is incorrect and causes problems at least for
-# Cygwin.
+# Note that in svn revision 19400 the '/' after DESTDIR in H5* variables below
+# has been removed. According to the official description of DESTDIR by Gnu at
+# http://www.gnu.org/prep/standards/html_node/DESTDIR.html, DESTDIR is
+# prepended to the normal and complete install path that it precedes for the
+# purpose of installing in a temporary directory which is useful for building
+# rpms and other packages. The '/' after ${DESTDIR} will be followed by another
+# '/' at the beginning of the normal install path. When DESTDIR is empty the
+# path then begins with '//', which is incorrect and causes problems at least for
+# Cygwin.
# Scripts used to build examples
# If only shared libraries have been installed, have h5cc build examples with
@@ -786,7 +795,7 @@ LIB = $(lib_LIBRARIES) $(lib_LTLIBRARIES) $(noinst_LIBRARIES) \
PROGS = $(bin_PROGRAMS) $(bin_SCRIPTS) $(noinst_PROGRAMS) $(noinst_SCRIPTS) \
$(EXTRA_PROG)
-chk_TESTS = $(check_PROGRAMS) $(check_SCRIPTS) $(EXTRA_TEST)
+chk_TESTS = $(check_PROGRAMS) $(check_SCRIPTS) $(EXTRA_TEST)
TEST_EXTENSIONS = .sh
SH_LOG_COMPILER = $(SHELL)
AM_SH_LOG_FLAGS =
@@ -1373,28 +1382,37 @@ $(TEST_PROG_CHKEXE) $(TEST_PROG_PARA_CHKEXE) dummy.chkexe_:
echo "============================" > $${log}; \
fi; \
if test "X$(FORTRAN_API)" = "Xyes"; then \
- echo "Fortran API: Testing $(HDF5_DRIVER) $${tname} $(TEST_FLAGS)"; \
+ echo "Fortran API: Testing $${tname} $(TEST_FLAGS)"; \
if test -n "$(REALTIMEOUTPUT)"; then \
- echo "Fortran API: $(HDF5_DRIVER) $${tname} $(TEST_FLAGS) Test Log" | tee -a $${log}; \
+ echo "Fortran API: Test log for $${tname} $(TEST_FLAGS)" | tee -a $${log}; \
else \
- echo "Fortran API: $(HDF5_DRIVER) $${tname} $(TEST_FLAGS) Test Log" >> $${log}; \
+ echo "Fortran API: Test log for $${tname} $(TEST_FLAGS)" >> $${log}; \
fi; \
elif test "X$(CXX_API)" = "Xyes"; then \
- echo "C++ API: Testing $(HDF5_DRIVER) $${tname} $(TEST_FLAGS)"; \
+ echo "C++ API: Testing $${tname} $(TEST_FLAGS)"; \
if test -n "$(REALTIMEOUTPUT)"; then \
- echo "C++ API: $(HDF5_DRIVER) $${tname} $(TEST_FLAGS) Test Log" | tee -a $${log};\
+ echo "C++ API: Test log for $${tname} $(TEST_FLAGS)" | tee -a $${log};\
else \
- echo "C++ API: $(HDF5_DRIVER) $${tname} $(TEST_FLAGS) Test Log" >> $${log};\
+ echo "C++ API: Test log for $${tname} $(TEST_FLAGS)" >> $${log};\
fi; \
else \
- echo "Testing $(HDF5_DRIVER) $${tname} $(TEST_FLAGS)"; \
+ echo "Testing: $${tname} $(TEST_FLAGS)"; \
if test -n "$(REALTIMEOUTPUT)"; then \
- echo "$(HDF5_DRIVER) $${tname} $(TEST_FLAGS) Test Log" | tee -a $${log}; \
+ echo "Test log for $${tname} $(TEST_FLAGS)" | tee -a $${log}; \
else \
- echo "$(HDF5_DRIVER) $${tname} $(TEST_FLAGS) Test Log" >> $${log}; \
+ echo "Test log for $${tname} $(TEST_FLAGS)" >> $${log}; \
fi; \
fi; \
if test -n "$(REALTIMEOUTPUT)"; then \
+ if test -n "$(HDF5_DRIVER)"; then \
+ echo "Virtual file driver (VFD): $(HDF5_DRIVER)" | tee -a $${log}; \
+ fi; \
+ else \
+ if test -n "$(HDF5_DRIVER)"; then \
+ echo "Virtual file driver (VFD): $(HDF5_DRIVER)" >> $${log}; \
+ fi; \
+ fi; \
+ if test -n "$(REALTIMEOUTPUT)"; then \
echo "============================" | tee -a $${log}; \
else \
echo "============================" >> $${log}; \
diff --git a/tools/test/h5diff/dynlib_diff.c b/tools/test/h5diff/dynlib_diff.c
index 571452e..661a6dc 100644
--- a/tools/test/h5diff/dynlib_diff.c
+++ b/tools/test/h5diff/dynlib_diff.c
@@ -69,7 +69,7 @@ H5Z_filter_dynlibud(unsigned int flags, size_t cd_nelmts,
/* Subtract the original value with MULTIPLIER */
while(buf_left > 0) {
char temp = *int_ptr;
- *int_ptr = temp - MULTIPLIER;
+ *int_ptr = (int8_t)(temp - MULTIPLIER);
int_ptr++;
buf_left -= sizeof(*int_ptr);
} /* end while */
@@ -78,7 +78,7 @@ H5Z_filter_dynlibud(unsigned int flags, size_t cd_nelmts,
/* Add the original value with MULTIPLIER */
while(buf_left > 0) {
char temp = *int_ptr;
- *int_ptr = temp + MULTIPLIER;
+ *int_ptr = (int8_t)(temp + MULTIPLIER);
int_ptr++;
buf_left -= sizeof(*int_ptr);
} /* end while */
diff --git a/tools/test/h5diff/h5diff_plugin.sh.in b/tools/test/h5diff/h5diff_plugin.sh.in
index 341cba5..ffc43da 100644
--- a/tools/test/h5diff/h5diff_plugin.sh.in
+++ b/tools/test/h5diff/h5diff_plugin.sh.in
@@ -135,24 +135,24 @@ CLEAN_TESTFILES_AND_TESTDIR()
# -h print help page
while [ $# -gt 0 ]; do
case "$1" in
- -p) # reset the tool name and bin to run ph5diff tests
- TESTNAME=ph5diff
- H5DIFF=../../src/h5diff/ph5diff # The tool name
- H5DIFF_BIN=`pwd`/$H5DIFF # The path of the tool binary
- pmode=yes
- shift
- ;;
+ -p) # reset the tool name and bin to run ph5diff tests
+ TESTNAME=ph5diff
+ H5DIFF=../../src/h5diff/ph5diff # The tool name
+ H5DIFF_BIN=`pwd`/$H5DIFF # The path of the tool binary
+ pmode=yes
+ shift
+ ;;
-h) # print help page
- echo "$0 [-p] [-h]"
- echo " -p run ph5diff tests"
- echo " -h print help page"
- shift
- exit 0
- ;;
+ echo "$0 [-p] [-h]"
+ echo " -p run ph5diff tests"
+ echo " -h print help page"
+ shift
+ exit 0
+ ;;
*) # unknown option
echo "$0: Unknown option ($1)"
- exit 1
- ;;
+ exit 1
+ ;;
esac
done
@@ -218,19 +218,21 @@ TOOLTEST() {
# Run test.
TESTING $H5DIFF $@
(
- #echo "#############################"
- #echo "Expected output for '$H5DIFF $@'"
- #echo "#############################"
- cd $TESTDIR
- eval $ENVCMD $RUNCMD $H5DIFF_BIN "$@"
+ #echo "#############################"
+ #echo "Expected output for '$H5DIFF $@'"
+ #echo "#############################"
+ cd $TESTDIR
+ eval $ENVCMD $RUNCMD $H5DIFF_BIN "$@"
) >$actual 2>$actual_err
EXIT_CODE=$?
+
# save actual and actual_err in case they are needed later.
cp $actual $actual_sav
STDOUT_FILTER $actual
cp $actual_err $actual_err_sav
STDERR_FILTER $actual_err
cat $actual_err >> $actual
+
# don't add exit code check in pmode, as it causes failure. (exit code
# is from mpirun not tool)
# if any problem occurs relate to an exit code, it will be caught in
@@ -260,27 +262,29 @@ TOOLTEST() {
actual_sorted=actual_sorted
sort $expect -o $expect_sorted
sort $actual -o $actual_sorted
+
# remove "EXIT CODE:" line from expect file. test for exit code
# is done by serial mode.
grep -v "EXIT CODE:" $expect_sorted > $expect_sorted.noexit
mv $expect_sorted.noexit $expect_sorted
- if $CMP $expect_sorted $actual_sorted; then
- echo " PASSED"
- else
- echo "*FAILED*"
- nerrors="`expr $nerrors + 1`"
- if test yes = "$verbose"; then
- echo "====Expected result ($expect_sorted) differs from actual result ($actual_sorted)"
- $DIFF $expect_sorted $actual_sorted |sed 's/^/ /'
- echo "====The actual output ($actual_sav)"
- sed 's/^/ /' < $actual_sav
- echo "====The actual stderr ($actual_err_sav)"
- sed 's/^/ /' < $actual_err_sav
- echo "====End of actual stderr ($actual_err_sav)"
- echo ""
+
+ if $CMP $expect_sorted $actual_sorted; then
+ echo " PASSED"
+ else
+ echo "*FAILED*"
+ nerrors="`expr $nerrors + 1`"
+ if test yes = "$verbose"; then
+ echo "====Expected result ($expect_sorted) differs from actual result ($actual_sorted)"
+ $DIFF $expect_sorted $actual_sorted |sed 's/^/ /'
+ echo "====The actual output ($actual_sav)"
+ sed 's/^/ /' < $actual_sav
+ echo "====The actual stderr ($actual_err_sav)"
+ sed 's/^/ /' < $actual_err_sav
+ echo "====End of actual stderr ($actual_err_sav)"
+ echo ""
+ fi
fi
fi
- fi
# Clean up output file
if test -z "$HDF5_NOCLEANUP"; then
@@ -306,18 +310,20 @@ TOOLTEST_ERR() {
# Run test.
TESTING $H5DIFF $@
(
- #echo "#############################"
- #echo "Expected output for '$H5DIFF $@'"
- #echo "#############################"
- cd $TESTDIR
- eval $ENVCMD $RUNCMD $H5DIFF_BIN "$@"
+ #echo "#############################"
+ #echo "Expected output for '$H5DIFF $@'"
+ #echo "#############################"
+ cd $TESTDIR
+ eval $ENVCMD $RUNCMD $H5DIFF_BIN "$@"
) >$actual 2>$actual_err
EXIT_CODE=$?
+
# save actual and actual_err in case they are needed later.
cp $actual $actual_sav
STDOUT_FILTER $actual
cp $actual_err $actual_err_sav
STDERR_FILTER $actual_err
+
# don't add exit code check in pmode, as it causes failure. (exit code
# is from mpirun not tool)
# if any problem occurs relate to an exit code, it will be caught in
@@ -348,23 +354,24 @@ TOOLTEST_ERR() {
sort $expect_err -o $expect_sorted
sort $actual_err -o $actual_sorted
mv $expect_sorted.noexit $expect_sorted
- if $CMP $expect_sorted $actual_sorted; then
- echo " PASSED"
- else
- echo "*FAILED*"
- nerrors="`expr $nerrors + 1`"
- if test yes = "$verbose"; then
- echo "====Expected result ($expect_sorted) differs from actual result ($actual_sorted)"
- $DIFF $expect_sorted $actual_sorted |sed 's/^/ /'
- echo "====The actual output ($actual_sav)"
- sed 's/^/ /' < $actual_sav
- echo "====The actual stderr ($actual_err_sav)"
- sed 's/^/ /' < $actual_err_sav
- echo "====End of actual stderr ($actual_err_sav)"
- echo ""
+
+ if $CMP $expect_sorted $actual_sorted; then
+ echo " PASSED"
+ else
+ echo "*FAILED*"
+ nerrors="`expr $nerrors + 1`"
+ if test yes = "$verbose"; then
+ echo "====Expected result ($expect_sorted) differs from actual result ($actual_sorted)"
+ $DIFF $expect_sorted $actual_sorted |sed 's/^/ /'
+ echo "====The actual output ($actual_sav)"
+ sed 's/^/ /' < $actual_sav
+ echo "====The actual stderr ($actual_err_sav)"
+ sed 's/^/ /' < $actual_err_sav
+ echo "====End of actual stderr ($actual_err_sav)"
+ echo ""
+ fi
fi
fi
- fi
# Clean up output file
if test -z "$HDF5_NOCLEANUP"; then
diff --git a/tools/test/h5diff/h5diffgentest.c b/tools/test/h5diff/h5diffgentest.c
index d60e393..6bf68ac 100644
--- a/tools/test/h5diff/h5diffgentest.c
+++ b/tools/test/h5diff/h5diffgentest.c
@@ -31,7 +31,7 @@ size_t H5TOOLS_MALLOCSIZE = (128 * 1024 * 1024);
*
* Purpose: generate files for h5diff testing
*
- * Programmer: Pedro Vicente, pvn@ncsa.uiuc.edu
+ * Programmer: Pedro Vicente
*
* Date: November 12, 2003
*
@@ -94,8 +94,11 @@ size_t H5TOOLS_MALLOCSIZE = (128 * 1024 * 1024);
#define NON_COMPARBLES1 "non_comparables1.h5"
#define NON_COMPARBLES2 "non_comparables2.h5"
/* string dataset and attribute */
-#define DIFF_STRINGS1 "diff_strings1.h5"
-#define DIFF_STRINGS2 "diff_strings2.h5"
+#define DIFF_STRINGS1 "h5diff_strings1.h5"
+#define DIFF_STRINGS2 "h5diff_strings2.h5"
+/* double dataset and epsilon */
+#define DIFF_EPS1 "h5diff_eps1.h5"
+#define DIFF_EPS2 "h5diff_eps2.h5"
#define UIMAX 4294967295u /*Maximum value for a variable of type unsigned int */
#define STR_SIZE 3
@@ -110,7 +113,7 @@ size_t H5TOOLS_MALLOCSIZE = (128 * 1024 * 1024);
/* Error macros */
#define AT() HDprintf("ERROR at %s:%d in %s()...\n", __FILE__, __LINE__, FUNC);
-#define PROGRAM_ERROR {AT(); goto error;}
+#define PROGRAM_ERROR do {AT(); goto error;} while(0)
/* A UD link traversal function. Shouldn't actually be called. */
static hid_t
@@ -172,6 +175,7 @@ static void test_comps_vlen_arry(const char *fname, const char *dset,
static void test_data_nocomparables(const char *fname, int diff);
static void test_objs_nocomparables(const char *fname1, const char *fname2);
static void test_objs_strings(const char *fname, const char *fname2);
+static void test_double_epsilon(const char *fname1, const char *fname2);
/* called by test_attributes() and test_datasets() */
static void write_attr_strings(hid_t loc_id, const char* dset_name, hid_t fid, int make_diffs);
@@ -288,6 +292,9 @@ int main(void)
/* string dataset and attribute. HDFFV-10028 */
test_objs_strings(DIFF_STRINGS1, DIFF_STRINGS2);
+ /* double dataset and epsilion. HDFFV-10897 */
+ test_double_epsilon(DIFF_EPS1, DIFF_EPS2);
+
return EXIT_SUCCESS;
}
@@ -303,8 +310,8 @@ int main(void)
static
int test_basic(const char *fname1, const char *fname2, const char *fname3)
{
- hid_t fid1 = -1, fid2 = -1;
- hid_t gid1 = -1, gid2 = -1, gid3 = -1;
+ hid_t fid1 = H5I_INVALID_HID, fid2 = H5I_INVALID_HID;
+ hid_t gid1 = H5I_INVALID_HID, gid2 = H5I_INVALID_HID, gid3 = H5I_INVALID_HID;
hsize_t dims1[1] = { 6 };
hsize_t dims2[2] = { 3, 2 };
@@ -432,14 +439,12 @@ int test_basic(const char *fname1, const char *fname2, const char *fname3)
/* epsilon = 0.0000000000000001 = 1e-16
* system epsilon for double : DBL_EPSILON = 2.22045E-16
*/
- double data13[3][2] = { { H5_DOUBLE(0.0000000000000000), H5_DOUBLE(
- 0.0000000000000001) }, { H5_DOUBLE(0.0000000000000001),
- H5_DOUBLE(0.0000000000000000) }, { H5_DOUBLE(
- 0.00000000000000033), H5_DOUBLE(0.0000000000000001) } };
- double data14[3][2] = { { H5_DOUBLE(0.0000000000000000), H5_DOUBLE(
- 0.0000000000000004) }, { H5_DOUBLE(0.0000000000000002),
- H5_DOUBLE(0.0000000000000001) }, { H5_DOUBLE(
- 0.0000000000000001), H5_DOUBLE(0.00000000000000000) } };
+ double data13[3][2] = { { 0.0000000000000000, 0.0000000000000001 },
+ { 0.0000000000000001, 0.0000000000000000 },
+ { 0.00000000000000033, 0.0000000000000001 } };
+ double data14[3][2] = { { 0.0000000000000000, 0.0000000000000004 },
+ { 0.0000000000000002, 0.0000000000000001 },
+ { 0.0000000000000001, 0.00000000000000000 } };
write_dset(gid1, 2, dims2, "fp1", H5T_NATIVE_FLOAT, data11);
write_dset(gid1, 2, dims2, "fp2", H5T_NATIVE_FLOAT, data12);
@@ -662,11 +667,11 @@ out:
static
int test_types(const char *fname)
{
- hid_t fid1 = -1;
- hid_t gid1 = -1;
- hid_t gid2 = -1;
- hid_t tid1 = -1;
- hid_t tid2 = -1;
+ hid_t fid1 = H5I_INVALID_HID;
+ hid_t gid1 = H5I_INVALID_HID;
+ hid_t gid2 = H5I_INVALID_HID;
+ hid_t tid1 = H5I_INVALID_HID;
+ hid_t tid2 = H5I_INVALID_HID;
herr_t status;
hsize_t dims[1] = { 1 };
typedef struct s1_t {
@@ -787,8 +792,8 @@ int test_types(const char *fname)
static
int test_datatypes(const char *fname)
{
- hid_t fid1 = -1;
- hid_t dset = -1;
+ hid_t fid1 = H5I_INVALID_HID;
+ hid_t dset = H5I_INVALID_HID;
hsize_t dims[2] = { 3, 2 };
herr_t status;
char buf1a[3][2] = { { 1, 1 }, { 1, 1 }, { 1, 1 } };
@@ -977,11 +982,11 @@ int test_datatypes(const char *fname)
static
int test_attributes(const char *file, int make_diffs /* flag to modify data buffers */)
{
- hid_t fid = -1;
- hid_t did = -1;
- hid_t gid = -1;
- hid_t root_id = -1;
- hid_t sid = -1;
+ hid_t fid = H5I_INVALID_HID;
+ hid_t did = H5I_INVALID_HID;
+ hid_t gid = H5I_INVALID_HID;
+ hid_t root_id = H5I_INVALID_HID;
+ hid_t sid = H5I_INVALID_HID;
hsize_t dims[1] = { 2 };
herr_t status;
@@ -1039,14 +1044,14 @@ int test_attributes(const char *file, int make_diffs /* flag to modify data buff
static int test_attributes_verbose_level(const char *fname1, const char *fname2)
{
herr_t status = SUCCEED;
- hid_t fid1 = -1, fid2 = -1;
- hid_t f1_gid = -1, f2_gid = -1;
- hid_t f1_gid2 = -1, f2_gid2 = -1;
- hid_t f1_gid3 = -1, f2_gid3 = -1;
- hid_t f1_gid4 = -1, f2_gid4 = -1;
- hid_t f1_did = -1, f2_did = -1;
- hid_t f1_sid = -1, f2_sid = -1;
- hid_t f1_tid = -1, f2_tid = -1;
+ hid_t fid1 = H5I_INVALID_HID, fid2 = H5I_INVALID_HID;
+ hid_t f1_gid = H5I_INVALID_HID, f2_gid = H5I_INVALID_HID;
+ hid_t f1_gid2 = H5I_INVALID_HID, f2_gid2 = H5I_INVALID_HID;
+ hid_t f1_gid3 = H5I_INVALID_HID, f2_gid3 = H5I_INVALID_HID;
+ hid_t f1_gid4 = H5I_INVALID_HID, f2_gid4 = H5I_INVALID_HID;
+ hid_t f1_did = H5I_INVALID_HID, f2_did = H5I_INVALID_HID;
+ hid_t f1_sid = H5I_INVALID_HID, f2_sid = H5I_INVALID_HID;
+ hid_t f1_tid = H5I_INVALID_HID, f2_tid = H5I_INVALID_HID;
/* dset */
hsize_t dset_dims[1] = { 3 };
int dset_data[3] = { 0, 1, 2 };
@@ -1304,10 +1309,10 @@ out:
static
int test_datasets(const char *file, int make_diffs /* flag to modify data buffers */)
{
- hid_t fid = -1;
- hid_t did = -1;
- hid_t gid = -1;
- hid_t sid = -1;
+ hid_t fid = H5I_INVALID_HID;
+ hid_t did = H5I_INVALID_HID;
+ hid_t gid = H5I_INVALID_HID;
+ hid_t sid = H5I_INVALID_HID;
hsize_t dims[1] = { 2 };
herr_t status;
int buf[2] = { 1, 2 };
@@ -1357,10 +1362,10 @@ int test_datasets(const char *file, int make_diffs /* flag to modify data buffer
static
int test_special_datasets(const char *file, int make_diffs /* flag to modify data buffers */)
{
- hid_t fid = -1;
- hid_t did = -1;
- hid_t sid0 = -1;
- hid_t sid = -1;
+ hid_t fid = H5I_INVALID_HID;
+ hid_t did = H5I_INVALID_HID;
+ hid_t sid0 = H5I_INVALID_HID;
+ hid_t sid = H5I_INVALID_HID;
hsize_t dims0[SPACE1_RANK] = { SPACE1_DIM1, SPACE1_DIM2 };
hsize_t dims[SPACE1_RANK] = { SPACE1_DIM1, SPACE1_DIM2 };
herr_t status;
@@ -1413,9 +1418,9 @@ int test_special_datasets(const char *file, int make_diffs /* flag to modify dat
*-------------------------------------------------------------------------*/
static int test_link_name(const char *fname1)
{
- hid_t fid1 = -1;
- hid_t gid1 = -1;
- hid_t gid2 = -1;
+ hid_t fid1 = H5I_INVALID_HID;
+ hid_t gid1 = H5I_INVALID_HID;
+ hid_t gid2 = H5I_INVALID_HID;
herr_t status = SUCCEED;
/*-----------------------------------------------------------------------
@@ -1486,8 +1491,8 @@ out:
*-------------------------------------------------------------------------*/
static int test_soft_links(const char *fname1)
{
- hid_t fid1 = -1;
- hid_t gid1 = -1;
+ hid_t fid1 = H5I_INVALID_HID;
+ hid_t gid1 = H5I_INVALID_HID;
hsize_t dims2[2] = { 2, 4 };
int data1[4][2] = { { 0, 1 }, { 2, 3 }, { 1, 2 }, { 3, 4 } };
int data2[4][2] = { { 0, 0 }, { 0, 0 }, { 0, 0 }, { 0, 0 } };
@@ -1605,10 +1610,10 @@ out:
*-------------------------------------------------------------------------*/
static int test_linked_softlinks(const char *fname1)
{
- hid_t fid1 = -1;
- hid_t gid1 = -1;
- hid_t gid2 = -1;
- hid_t gid3 = -1;
+ hid_t fid1 = H5I_INVALID_HID;
+ hid_t gid1 = H5I_INVALID_HID;
+ hid_t gid2 = H5I_INVALID_HID;
+ hid_t gid3 = H5I_INVALID_HID;
hsize_t dims2[2] = { 2, 4 };
int data1[4][2] = { { 0, 1 }, { 2, 3 }, { 1, 2 }, { 3, 4 } };
int data2[4][2] = { { 0, 0 }, { 0, 0 }, { 0, 0 }, { 0, 0 } };
@@ -1786,10 +1791,10 @@ out:
*-------------------------------------------------------------------------*/
static int test_external_links(const char *fname1, const char *fname2)
{
- hid_t fid1 = -1;
- hid_t fid2 = -1;
- hid_t gid1 = -1;
- hid_t gid2 = -1;
+ hid_t fid1 = H5I_INVALID_HID;
+ hid_t fid2 = H5I_INVALID_HID;
+ hid_t gid1 = H5I_INVALID_HID;
+ hid_t gid2 = H5I_INVALID_HID;
hsize_t dims2[2] = { 2, 4 };
int data1[4][2] = { { 0, 1 }, { 2, 3 }, { 1, 2 }, { 3, 4 } };
int data2[4][2] = { { 0, 0 }, { 0, 0 }, { 0, 0 }, { 0, 0 } };
@@ -1931,9 +1936,9 @@ out:
*-------------------------------------------------------------------------*/
static int test_ext2soft_links(const char *fname1, const char *fname2)
{
- hid_t fid1 = -1;
- hid_t fid2 = -1;
- hid_t gid2 = -1;
+ hid_t fid1 = H5I_INVALID_HID;
+ hid_t fid2 = H5I_INVALID_HID;
+ hid_t gid2 = H5I_INVALID_HID;
hsize_t dims2[2] = { 2, 4 };
int data1[4][2] = { { 0, 1 }, { 2, 3 }, { 1, 2 }, { 3, 4 } };
int data2[4][2] = { { 0, 0 }, { 0, 0 }, { 0, 0 }, { 0, 0 } };
@@ -2060,12 +2065,12 @@ out:
static
int gen_dataset_idx(const char *file, int format)
{
- hid_t fid = -1; /* file id */
- hid_t did = -1;
- hid_t did2 = -1; /* dataset id */
- hid_t sid = -1; /* space id */
- hid_t fapl = -1; /* file access property id */
- hid_t dcpl = -1; /* dataset creation property id */
+ hid_t fid = H5I_INVALID_HID; /* file id */
+ hid_t did = H5I_INVALID_HID;
+ hid_t did2 = H5I_INVALID_HID; /* dataset id */
+ hid_t sid = H5I_INVALID_HID; /* space id */
+ hid_t fapl = H5I_INVALID_HID; /* file access property id */
+ hid_t dcpl = H5I_INVALID_HID; /* dataset creation property id */
hsize_t dims[1] = { 10 }; /* dataset dimension */
hsize_t c_dims[1] = { 2 }; /* chunk dimension */
herr_t status; /* return status */
@@ -2146,8 +2151,8 @@ int gen_dataset_idx(const char *file, int format)
*-------------------------------------------------------------------------*/
static int test_dangle_links(const char *fname1, const char *fname2)
{
- hid_t fid1 = -1;
- hid_t fid2 = -1;
+ hid_t fid1 = H5I_INVALID_HID;
+ hid_t fid2 = H5I_INVALID_HID;
hsize_t dims2[2] = { 2, 4 };
int data1[4][2] = { { 0, 1 }, { 2, 3 }, { 1, 2 }, { 3, 4 } };
int data2[4][2] = { { 0, 0 }, { 0, 0 }, { 0, 0 }, { 0, 0 } };
@@ -2346,10 +2351,10 @@ out:
*-------------------------------------------------------------------------*/
static int test_group_recurse(const char *fname1, const char *fname2)
{
- hid_t fid1 = -1;
- hid_t fid2 = -1;
- hid_t gid1_f1 = -1, gid2_f1 = -1, gid3_f1 = -1, gid10_f1 = -1;
- hid_t gid1_f2 = -1, gid2_f2 = -1, gid3_f2 = -1, gid11_f2 = -1;
+ hid_t fid1 = H5I_INVALID_HID;
+ hid_t fid2 = H5I_INVALID_HID;
+ hid_t gid1_f1 = H5I_INVALID_HID, gid2_f1 = H5I_INVALID_HID, gid3_f1 = H5I_INVALID_HID, gid10_f1 = H5I_INVALID_HID;
+ hid_t gid1_f2 = H5I_INVALID_HID, gid2_f2 = H5I_INVALID_HID, gid3_f2 = H5I_INVALID_HID, gid11_f2 = H5I_INVALID_HID;
hsize_t dims2[2] = { 2, 4 };
int data1[4][2] = { { 0, 1 }, { 0, 1 }, { 1, 0 }, { 1, 0 } };
int data2[4][2] = { { 0, 2 }, { 0, 2 }, { 2, 0 }, { 2, 0 } };
@@ -2758,18 +2763,18 @@ out:
#define GRP_R_DSETNAME2 "dset2"
static int test_group_recurse2(void)
{
- hid_t fileid1 = -1;
- hid_t grp1 = -1;
- hid_t grp2 = -1;
- hid_t grp3 = -1;
- hid_t grp4 = -1;
- hid_t dset1 = -1;
- hid_t dset2 = -1;
- hid_t datatype = -1;
- hid_t dataspace = -1;
- hid_t fileid2 = -1;
- hid_t fileid3 = -1;
- hid_t fileid4 = -1;
+ hid_t fileid1 = H5I_INVALID_HID;
+ hid_t grp1 = H5I_INVALID_HID;
+ hid_t grp2 = H5I_INVALID_HID;
+ hid_t grp3 = H5I_INVALID_HID;
+ hid_t grp4 = H5I_INVALID_HID;
+ hid_t dset1 = H5I_INVALID_HID;
+ hid_t dset2 = H5I_INVALID_HID;
+ hid_t datatype = H5I_INVALID_HID;
+ hid_t dataspace = H5I_INVALID_HID;
+ hid_t fileid2 = H5I_INVALID_HID;
+ hid_t fileid3 = H5I_INVALID_HID;
+ hid_t fileid4 = H5I_INVALID_HID;
hsize_t dimsf[2]; /* dataset dimensions */
herr_t status = 0;
int data1[4][2] = { { 0, 0 }, { 1, 1 }, { 2, 2 }, { 3, 3 } };
@@ -3069,10 +3074,10 @@ out:
*-------------------------------------------------------------------------*/
static int test_exclude_obj1(const char *fname1, const char *fname2)
{
- hid_t fid1 = -1;
- hid_t fid2 = -1;
- hid_t gid1 = -1;
- hid_t gid2 = -1;
+ hid_t fid1 = H5I_INVALID_HID;
+ hid_t fid2 = H5I_INVALID_HID;
+ hid_t gid1 = H5I_INVALID_HID;
+ hid_t gid2 = H5I_INVALID_HID;
hsize_t dims2[2] = { 2, 4 };
int data1[4][2] = { { 0, 0 }, { 0, 0 }, { 0, 0 }, { 0, 0 } };
int data2[4][2] = { { 0, 1 }, { 2, 3 }, { 1, 2 }, { 3, 4 } };
@@ -3189,11 +3194,11 @@ out:
*-------------------------------------------------------------------------*/
static int test_exclude_obj2(const char *fname1, const char *fname2)
{
- hid_t fid1 = -1;
- hid_t fid2 = -1;
- hid_t gid1 = -1;
- hid_t gid2 = -1;
- hid_t gid3 = -1;
+ hid_t fid1 = H5I_INVALID_HID;
+ hid_t fid2 = H5I_INVALID_HID;
+ hid_t gid1 = H5I_INVALID_HID;
+ hid_t gid2 = H5I_INVALID_HID;
+ hid_t gid3 = H5I_INVALID_HID;
hsize_t dims2[2] = { 2, 4 };
int data1[4][2] = { { 0, 0 }, { 0, 0 }, { 0, 0 }, { 0, 0 } };
int data2[4][2] = { { 0, 1 }, { 2, 3 }, { 1, 2 }, { 3, 4 } };
@@ -3320,9 +3325,9 @@ out:
*-------------------------------------------------------------------------*/
static int test_exclude_obj3(const char *fname1, const char *fname2)
{
- hid_t fid1 = -1;
- hid_t fid2 = -1;
- hid_t gid1 = -1;
+ hid_t fid1 = H5I_INVALID_HID;
+ hid_t fid2 = H5I_INVALID_HID;
+ hid_t gid1 = H5I_INVALID_HID;
hsize_t dims2[2] = { 2, 4 };
int data1[4][2] = { { 0, 0 }, { 0, 0 }, { 0, 0 }, { 0, 0 } };
herr_t status = SUCCEED;
@@ -3416,8 +3421,8 @@ out:
static int test_comp_vlen_strings(const char *fname1, const char *grp_name, int is_file_new)
{
int i;
- hid_t fid1 = -1; /* file id */
- hid_t gid = -1;
+ hid_t fid1 = H5I_INVALID_HID; /* file id */
+ hid_t gid = H5I_INVALID_HID;
/* compound1 datatype */
typedef struct comp1_t {
@@ -3534,21 +3539,21 @@ static int test_comp_vlen_strings(const char *fname1, const char *grp_name, int
} comp9_t;
/* vlen string */
- hid_t sid_vlen_str = -1; /* dataspace ID */
- hid_t tid_vlen_str = -1; /* datatype ID */
+ hid_t sid_vlen_str = H5I_INVALID_HID; /* dataspace ID */
+ hid_t tid_vlen_str = H5I_INVALID_HID; /* datatype ID */
char vlen_str_buf[] = { "Variable length string" };
hsize_t dims_vlen_str[] = { VLEN_STR_DIM };
/* fixlen string */
- hid_t sid_fixlen_str = -1; /* dataspace ID */
- hid_t tid_fixlen_str = -1; /* datatype ID */
+ hid_t sid_fixlen_str = H5I_INVALID_HID; /* dataspace ID */
+ hid_t tid_fixlen_str = H5I_INVALID_HID; /* datatype ID */
const char fixlen_str_buf[FIXLEN_STR_SIZE] = { "Fixed length string" };
hsize_t dims_fixlen_str[] = { FIXLEN_STR_DIM };
/* vlen string array */
- hid_t sid_vlen_str_array = -1; /* dataspace ID */
- hid_t tid_vlen_str_array_pre = -1; /* datatype ID */
- hid_t tid_vlen_str_array = -1; /* datatype ID */
+ hid_t sid_vlen_str_array = H5I_INVALID_HID; /* dataspace ID */
+ hid_t tid_vlen_str_array_pre = H5I_INVALID_HID; /* datatype ID */
+ hid_t tid_vlen_str_array = H5I_INVALID_HID; /* datatype ID */
const char *vlen_str_array_buf[VLEN_STR_ARRY_DIM] =
{ "1 - Variable length string Array",
"2 - Testing variable length string array in compound type",
@@ -3556,9 +3561,9 @@ static int test_comp_vlen_strings(const char *fname1, const char *grp_name, int
hsize_t dims_vlen_str_array[] = { VLEN_STR_ARRY_DIM };
/* fixlen string array */
- hid_t sid_fixlen_str_array = -1; /* dataspace ID */
- hid_t tid_fixlen_str_array_pre = -1; /* datatype ID */
- hid_t tid_fixlen_str_array = -1; /* datatype ID */
+ hid_t sid_fixlen_str_array = H5I_INVALID_HID; /* dataspace ID */
+ hid_t tid_fixlen_str_array_pre = H5I_INVALID_HID; /* datatype ID */
+ hid_t tid_fixlen_str_array = H5I_INVALID_HID; /* datatype ID */
const char *fixlen_str_array_buf[FIXLEN_STR_ARRY_DIM] = {
"1 - Fixed length string Array", "2 - Fixed length string Array",
"3 - Fixed length string Array" };
@@ -3567,17 +3572,17 @@ static int test_comp_vlen_strings(const char *fname1, const char *grp_name, int
/*------------------------------------------
* compound dataset
*------------------------------------------*/
- hid_t sid_comp = -1; /* dataspace ID */
- hid_t tid1_comp = -1; /* datatype ID */
- hid_t tid2_comp = -1; /* datatype ID */
- hid_t tid3_comp = -1; /* datatype ID */
- hid_t tid4_comp = -1; /* datatype ID */
- hid_t tid5_comp = -1; /* datatype ID */
- hid_t tid6_comp = -1; /* datatype ID */
- hid_t tid7_comp = -1; /* datatype ID */
- hid_t tid8_comp = -1; /* datatype ID */
- hid_t tid9_comp = -1; /* datatype ID */
- hid_t did_comp = -1; /* dataset ID */
+ hid_t sid_comp = H5I_INVALID_HID; /* dataspace ID */
+ hid_t tid1_comp = H5I_INVALID_HID; /* datatype ID */
+ hid_t tid2_comp = H5I_INVALID_HID; /* datatype ID */
+ hid_t tid3_comp = H5I_INVALID_HID; /* datatype ID */
+ hid_t tid4_comp = H5I_INVALID_HID; /* datatype ID */
+ hid_t tid5_comp = H5I_INVALID_HID; /* datatype ID */
+ hid_t tid6_comp = H5I_INVALID_HID; /* datatype ID */
+ hid_t tid7_comp = H5I_INVALID_HID; /* datatype ID */
+ hid_t tid8_comp = H5I_INVALID_HID; /* datatype ID */
+ hid_t tid9_comp = H5I_INVALID_HID; /* datatype ID */
+ hid_t did_comp = H5I_INVALID_HID; /* dataset ID */
hsize_t dims_comp[] = { COMP_DIM };
herr_t status = SUCCEED;
@@ -4020,7 +4025,7 @@ static int test_comp_vlen_strings(const char *fname1, const char *grp_name, int
}
H5Dclose(did_comp);
- did_comp = -1;
+ did_comp = H5I_INVALID_HID;
out:
/*-----------------------------------------------------------------------
@@ -4091,9 +4096,9 @@ out:
static int test_enums(const char *fname)
{
- hid_t fid = -1;
+ hid_t fid = H5I_INVALID_HID;
- hid_t tid = -1;
+ hid_t tid = H5I_INVALID_HID;
int enum_val = -1;
/* The data in the two arrays cover the following cases:
@@ -4217,17 +4222,17 @@ static void test_comps_array(const char *fname, const char *dset, const char *at
cmpd1_t wdata[SDIM_DSET]; /* dataset with compound1 */
- hid_t fid = -1; /* HDF5 File IDs */
- hid_t did_dset = -1; /* Dataset ID */
- hid_t sid_dset = -1; /* Dataset space ID */
- hid_t tid_cmpd1 = -1; /* Compound1 type ID */
- hid_t tid_arry1 = -1; /* Array type ID in compound1 */
- hid_t tid_cmpd2 = -1; /* Compound2 type ID */
- hid_t tid_attr = -1;
+ hid_t fid = H5I_INVALID_HID; /* HDF5 File IDs */
+ hid_t did_dset = H5I_INVALID_HID; /* Dataset ID */
+ hid_t sid_dset = H5I_INVALID_HID; /* Dataset space ID */
+ hid_t tid_cmpd1 = H5I_INVALID_HID; /* Compound1 type ID */
+ hid_t tid_arry1 = H5I_INVALID_HID; /* Array type ID in compound1 */
+ hid_t tid_cmpd2 = H5I_INVALID_HID; /* Compound2 type ID */
+ hid_t tid_attr = H5I_INVALID_HID;
hsize_t sdims_dset[] = { SDIM_DSET };
hsize_t sdims_cmpd_arry[] = { SDIM_CMPD_ARRAY };
int i, j;
- herr_t ret; /* Generic return value */
+ herr_t H5_ATTR_NDEBUG_UNUSED ret; /* Generic return value */
/* Initialize array data to write */
for (i = 0; i < SDIM_DSET; i++) {
@@ -4326,17 +4331,17 @@ static void test_comps_vlen(const char * fname, const char *dset, const char *at
cmpd1_t wdata[SDIM_DSET]; /* Dataset for compound1 */
- hid_t fid = -1; /* HDF5 File ID */
- hid_t did_dset = -1; /* dataset ID */
- hid_t sid_dset = -1; /* dataset space ID */
- hid_t tid_attr = -1;
- hid_t tid_cmpd2 = -1; /* compound2 type ID */
- hid_t tid_cmpd1 = -1; /* compound1 type ID */
- hid_t tid_cmpd1_vlen = -1;
+ hid_t fid = H5I_INVALID_HID; /* HDF5 File ID */
+ hid_t did_dset = H5I_INVALID_HID; /* dataset ID */
+ hid_t sid_dset = H5I_INVALID_HID; /* dataset space ID */
+ hid_t tid_attr = H5I_INVALID_HID;
+ hid_t tid_cmpd2 = H5I_INVALID_HID; /* compound2 type ID */
+ hid_t tid_cmpd1 = H5I_INVALID_HID; /* compound1 type ID */
+ hid_t tid_cmpd1_vlen = H5I_INVALID_HID;
hsize_t sdims_dset[] = { SDIM_DSET };
unsigned i, j; /* counting variables */
- herr_t ret; /* Generic return value */
+ herr_t H5_ATTR_NDEBUG_UNUSED ret; /* Generic return value */
/* Allocate and initialize VL data to write */
for (i = 0; i < SDIM_DSET; i++) {
@@ -4442,19 +4447,19 @@ static void test_comps_array_vlen(const char * fname, const char *dset, const ch
} cmpd1_t;
cmpd1_t wdata[SDIM_DSET]; /* Information to write */
- hid_t fid = -1; /* HDF5 File IDs */
- hid_t did_dset = -1; /* Dataset ID */
- hid_t sid_dset = -1; /* Dataspace ID */
- hid_t tid_attr = -1;
- hid_t tid_cmpd1 = -1; /* Compound1 Datatype ID */
- hid_t tid_arry1 = -1; /* Array Datatype ID */
- hid_t tid_cmpd2 = -1; /* Compound2 Datatype ID */
- hid_t tid_cmpd2_vlen = -1;
- hid_t tid_cmpd3 = -1; /* Compound3 Datatype ID */
+ hid_t fid = H5I_INVALID_HID; /* HDF5 File IDs */
+ hid_t did_dset = H5I_INVALID_HID; /* Dataset ID */
+ hid_t sid_dset = H5I_INVALID_HID; /* Dataspace ID */
+ hid_t tid_attr = H5I_INVALID_HID;
+ hid_t tid_cmpd1 = H5I_INVALID_HID; /* Compound1 Datatype ID */
+ hid_t tid_arry1 = H5I_INVALID_HID; /* Array Datatype ID */
+ hid_t tid_cmpd2 = H5I_INVALID_HID; /* Compound2 Datatype ID */
+ hid_t tid_cmpd2_vlen = H5I_INVALID_HID;
+ hid_t tid_cmpd3 = H5I_INVALID_HID; /* Compound3 Datatype ID */
hsize_t sdims_dset[] = { SDIM_DSET };
hsize_t sdims_arry[] = { SDIM_CMPD_ARRAY };
unsigned i, j, k; /* counting variables */
- herr_t ret; /* Generic return value */
+ herr_t H5_ATTR_NDEBUG_UNUSED ret; /* Generic return value */
/* Initialize array data to write in compound1 */
for (i = 0; i < SDIM_DSET; i++) {
@@ -4584,20 +4589,20 @@ static void test_comps_vlen_arry(const char * fname, const char *dset, const cha
cmpd1_t wdata[SDIM_DSET]; /* Dataset for compound1 */
- hid_t fid = -1; /* HDF5 File ID */
- hid_t did_dset = -1; /* dataset ID */
- hid_t sid_dset = -1; /* dataset space ID */
- hid_t tid_attr = -1;
- hid_t tid_cmpd3 = -1; /* compound3 type ID */
- hid_t tid_cmpd2 = -1; /* compound2 type ID */
- hid_t tid_cmpd2_arry = -1;
- hid_t tid_cmpd1 = -1; /* compound1 type ID */
- hid_t tid_cmpd1_vlen = -1;
+ hid_t fid = H5I_INVALID_HID; /* HDF5 File ID */
+ hid_t did_dset = H5I_INVALID_HID; /* dataset ID */
+ hid_t sid_dset = H5I_INVALID_HID; /* dataset space ID */
+ hid_t tid_attr = H5I_INVALID_HID;
+ hid_t tid_cmpd3 = H5I_INVALID_HID; /* compound3 type ID */
+ hid_t tid_cmpd2 = H5I_INVALID_HID; /* compound2 type ID */
+ hid_t tid_cmpd2_arry = H5I_INVALID_HID;
+ hid_t tid_cmpd1 = H5I_INVALID_HID; /* compound1 type ID */
+ hid_t tid_cmpd1_vlen = H5I_INVALID_HID;
hsize_t sdims_dset[] = { SDIM_DSET };
hsize_t sdims_cmpd_arry[] = { SDIM_CMPD_ARRAY };
unsigned i, j, k; /* counting variables */
- herr_t ret; /* Generic return value */
+ herr_t H5_ATTR_NDEBUG_UNUSED ret; /* Generic return value */
/* Allocate and initialize VL data to write */
for (i = 0; i < SDIM_DSET; i++) {
@@ -4717,14 +4722,14 @@ static void test_comps_vlen_arry(const char * fname, const char *dset, const cha
#define DIM_ARRY 3
static void test_data_nocomparables(const char * fname, int make_diffs)
{
- hid_t fid = -1;
- hid_t gid1 = -1;
- hid_t gid2 = -1;
- hid_t did1 = -1;
- hid_t did2 = -1;
- hid_t sid1 = -1;
- hid_t tid_dset1 = -1;
- hid_t tid_attr1 = -1;
+ hid_t fid = H5I_INVALID_HID;
+ hid_t gid1 = H5I_INVALID_HID;
+ hid_t gid2 = H5I_INVALID_HID;
+ hid_t did1 = H5I_INVALID_HID;
+ hid_t did2 = H5I_INVALID_HID;
+ hid_t sid1 = H5I_INVALID_HID;
+ hid_t tid_dset1 = H5I_INVALID_HID;
+ hid_t tid_attr1 = H5I_INVALID_HID;
hsize_t dims1_1[1] = { DIM_ARRY };
hsize_t dims1_2[1] = { DIM_ARRY + 1 };
hsize_t dims2[2] = { DIM_ARRY, 1 };
@@ -4913,14 +4918,14 @@ out:
static void
test_objs_nocomparables(const char *fname1, const char *fname2)
{
- hid_t fid1 = -1;
- hid_t fid2 = -1;
- hid_t topgid1 = -1;
- hid_t topgid2 = -1;
- hid_t gid1 = -1;
- hid_t tid1 = -1;
- hid_t gid2 = -1;
- hid_t tid2 = -1;
+ hid_t fid1 = H5I_INVALID_HID;
+ hid_t fid2 = H5I_INVALID_HID;
+ hid_t topgid1 = H5I_INVALID_HID;
+ hid_t topgid2 = H5I_INVALID_HID;
+ hid_t gid1 = H5I_INVALID_HID;
+ hid_t tid1 = H5I_INVALID_HID;
+ hid_t gid2 = H5I_INVALID_HID;
+ hid_t tid2 = H5I_INVALID_HID;
hsize_t dims[1] = { DIM_ARRY };
int data1[DIM_ARRY] = { 1, 1, 1 };
int data2[DIM_ARRY] = { 2, 2, 2 };
@@ -4930,73 +4935,73 @@ test_objs_nocomparables(const char *fname1, const char *fname2)
*------------------------------------------------------------------------*/
/* file1 */
if((fid1 = H5Fopen(fname1, H5F_ACC_RDWR, H5P_DEFAULT)) < 0)
- PROGRAM_ERROR
+ PROGRAM_ERROR;
/* file2 */
if((fid2 = H5Fopen(fname2, H5F_ACC_RDWR, H5P_DEFAULT)) < 0)
- PROGRAM_ERROR
+ PROGRAM_ERROR;
/*-----------------------------------------------------------------------
* in file1 : add member objects
*------------------------------------------------------------------------*/
/* parent group */
if((topgid1 = H5Gcreate2(fid1, "diffobjtypes", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0)
- PROGRAM_ERROR
+ PROGRAM_ERROR;
/* dataset */
if(write_dset(topgid1, 1, dims, "obj1", H5T_NATIVE_INT, data1) < 0)
- PROGRAM_ERROR
+ PROGRAM_ERROR;
/* group */
if((gid1 = H5Gcreate2(topgid1, "obj2", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0)
- PROGRAM_ERROR
+ PROGRAM_ERROR;
/* committed type */
if((tid1 = H5Tcopy(H5T_NATIVE_INT)) < 0)
- PROGRAM_ERROR
+ PROGRAM_ERROR;
if(H5Tcommit2(topgid1, "obj3", tid1, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT) < 0)
- PROGRAM_ERROR
+ PROGRAM_ERROR;
/*-----------------------------------------------------------------------
* in file2 : add member objects
*------------------------------------------------------------------------*/
/* parent group */
if((topgid2 = H5Gcreate2(fid2, "diffobjtypes", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0)
- PROGRAM_ERROR
+ PROGRAM_ERROR;
/* group */
if((gid2 = H5Gcreate2(topgid2, "obj1", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0)
- PROGRAM_ERROR
+ PROGRAM_ERROR;
/* committed type */
if((tid2 = H5Tcopy(H5T_NATIVE_INT)) < 0)
- PROGRAM_ERROR
+ PROGRAM_ERROR;
if(H5Tcommit2(topgid2, "obj2", tid2, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT) < 0)
- PROGRAM_ERROR
+ PROGRAM_ERROR;
/* dataset */
if(write_dset(topgid2, 1, dims, "obj3", H5T_NATIVE_INT, data2) < 0)
- PROGRAM_ERROR
+ PROGRAM_ERROR;
/*-----------------------------------------------------------------------
* Close IDs
*-----------------------------------------------------------------------*/
if(H5Fclose(fid1) < 0)
- PROGRAM_ERROR
+ PROGRAM_ERROR;
if(H5Fclose(fid2) < 0)
- PROGRAM_ERROR
+ PROGRAM_ERROR;
if(H5Gclose(topgid1) < 0)
- PROGRAM_ERROR
+ PROGRAM_ERROR;
if(H5Gclose(topgid2) < 0)
- PROGRAM_ERROR
+ PROGRAM_ERROR;
if(H5Gclose(gid1) < 0)
- PROGRAM_ERROR
+ PROGRAM_ERROR;
if(H5Gclose(gid2) < 0)
- PROGRAM_ERROR
+ PROGRAM_ERROR;
if(H5Tclose(tid1) < 0)
- PROGRAM_ERROR
+ PROGRAM_ERROR;
if(H5Tclose(tid2) < 0)
- PROGRAM_ERROR
+ PROGRAM_ERROR;
return;
@@ -5039,12 +5044,12 @@ static hid_t mkstr(int size, H5T_str_t pad)
*-------------------------------------------------------------------------*/
static void test_objs_strings(const char *fname1, const char *fname2)
{
- hid_t fid1 = -1;
- hid_t fid2 = -1;
- hid_t dataset = -1;
- hid_t space = -1;
- hid_t f_type = -1;
- hid_t m_type = -1;
+ hid_t fid1 = H5I_INVALID_HID;
+ hid_t fid2 = H5I_INVALID_HID;
+ hid_t dataset = H5I_INVALID_HID;
+ hid_t space = H5I_INVALID_HID;
+ hid_t f_type = H5I_INVALID_HID;
+ hid_t m_type = H5I_INVALID_HID;
hsize_t dims1[] = { 3, 4 };
char string1A[12][3] = { "s1", "s2", "s3", "s4", "s5", "s6", "s", "s", "s9",
"s0", "s1", "s2" };
@@ -5211,10 +5216,10 @@ void write_attr_strings(hid_t loc_id, const char* dset_name, hid_t fid, int make
RED, GREEN
} e_t;
- hid_t aid = -1;
- hid_t sid = -1;
- hid_t tid = -1;
- herr_t status;
+ hid_t aid = H5I_INVALID_HID;
+ hid_t sid = H5I_INVALID_HID;
+ hid_t tid = H5I_INVALID_HID;
+ herr_t H5_ATTR_NDEBUG_UNUSED status;
int val, i, j, k, l, n;
float f;
@@ -6202,10 +6207,10 @@ void write_attr_in(hid_t loc_id, const char* dset_name, hid_t fid, int make_diff
RED, GREEN
} e_t;
- hid_t aid = -1;
- hid_t sid = -1;
- hid_t tid = -1;
- herr_t status;
+ hid_t aid = H5I_INVALID_HID;
+ hid_t sid = H5I_INVALID_HID;
+ hid_t tid = H5I_INVALID_HID;
+ herr_t H5_ATTR_NDEBUG_UNUSED status;
int val, i, j, k, l, n;
float f;
@@ -7193,11 +7198,11 @@ void write_dset_in(hid_t loc_id, const char* dset_name, hid_t fid, int make_diff
RED, GREEN
} e_t;
- hid_t did = -1;
- hid_t sid = -1;
- hid_t tid = -1;
- hid_t dcpl = -1;
- herr_t status;
+ hid_t did = H5I_INVALID_HID;
+ hid_t sid = H5I_INVALID_HID;
+ hid_t tid = H5I_INVALID_HID;
+ hid_t dcpl = H5I_INVALID_HID;
+ herr_t H5_ATTR_NDEBUG_UNUSED status;
int val, i, j, k, l, n;
float f;
int fillvalue = 2;
@@ -7417,9 +7422,9 @@ void write_dset_in(hid_t loc_id, const char* dset_name, hid_t fid, int make_diff
{
double *dbuf; /* information to write */
- hid_t ldid = -1; /* dataset ID */
- hid_t lsid = -1; /* dataspace ID */
- hid_t ltid = -1; /* datatype ID */
+ hid_t ldid = H5I_INVALID_HID; /* dataset ID */
+ hid_t lsid = H5I_INVALID_HID; /* dataspace ID */
+ hid_t ltid = H5I_INVALID_HID; /* datatype ID */
size_t size;
hsize_t sdims[] = { 1 };
hsize_t tdims[] = { H5TOOLS_MALLOCSIZE / sizeof(double) + 1 };
@@ -7820,19 +7825,19 @@ static
void gen_datareg(hid_t fid, int make_diffs /* flag to modify data buffers */)
{
/* data dataset */
- hid_t did1 = -1; /* dataset ID */
- hid_t sid1 = -1; /* dataspace ID */
+ hid_t did1 = H5I_INVALID_HID; /* dataset ID */
+ hid_t sid1 = H5I_INVALID_HID; /* dataspace ID */
hsize_t dims1[2] = { 10, 10 };/* dimensions */
int *buf; /* dataset buffer */
/* reference dataset */
- hid_t did2 = -1; /* dataset ID */
- hid_t sid2 = -1; /* dataspace ID */
+ hid_t did2 = H5I_INVALID_HID; /* dataset ID */
+ hid_t sid2 = H5I_INVALID_HID; /* dataspace ID */
hsize_t dims2[] = { 2 }; /* 2 references */
hdset_reg_ref_t *rbuf; /* buffer for write the references */
hsize_t start[10]; /* starting location of hyperslab */
hsize_t count[10]; /* element count of hyperslab */
hsize_t coord[5][2]; /* coordinates for point selection */
- herr_t status;
+ herr_t H5_ATTR_NDEBUG_UNUSED status;
int i;
/* allocate the buffer for write the references */
@@ -7931,12 +7936,12 @@ void gen_datareg(hid_t fid, int make_diffs /* flag to modify data buffers */)
static
int test_hyperslab(const char *fname, int make_diffs /* flag to modify data buffers */)
{
- hid_t did = -1;
- hid_t fid = -1;
- hid_t f_sid = -1;
- hid_t m_sid = -1;
- hid_t tid = -1;
- hid_t dcpl = -1;
+ hid_t did = H5I_INVALID_HID;
+ hid_t fid = H5I_INVALID_HID;
+ hid_t f_sid = H5I_INVALID_HID;
+ hid_t m_sid = H5I_INVALID_HID;
+ hid_t tid = H5I_INVALID_HID;
+ hid_t dcpl = H5I_INVALID_HID;
hsize_t dims[1] = { GBLL }; /* dataset dimensions */
hsize_t hs_size[1] = { GBLL / (1024 * 1024) }; /* hyperslab dimensions */
hsize_t chunk_dims[1] = { GBLL / 1024 }; /* chunk dimensions */
@@ -8020,6 +8025,59 @@ out:
return -1;
}
+/*
+ * Function: test_double_epsilion
+ *
+ * Purpose: Create test files to compare data with epsilion
+ */
+static
+void test_double_epsilon(const char *fname1, const char *fname2)
+{
+ hid_t fid1 = H5I_INVALID_HID, fid2 = H5I_INVALID_HID;
+ hsize_t dims1[2] = { 4, 7 };
+ double wdata[4][7];
+ int i, j;
+
+ /*-------------------------------------------------------------------------
+ * create two files
+ *-------------------------------------------------------------------------
+ */
+ if ((fid1 = H5Fcreate(fname1, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT)) < 0)
+ PROGRAM_ERROR;
+ if ((fid2 = H5Fcreate(fname2, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT)) < 0)
+ PROGRAM_ERROR;
+
+ /*
+ * Initialize data.
+ */
+ for (i=0; i<4; i++)
+ for (j=0; j<7; j++)
+ wdata[i][j] = 0.0;
+
+ /* dataset */
+ if(write_dset(fid1, 2, dims1, "dataset", H5T_IEEE_F64LE, wdata) < 0)
+ PROGRAM_ERROR;
+
+ /*
+ * Initialize data.
+ */
+ for (i=0; i<4; i++)
+ for (j=0; j<7; j++)
+ wdata[i][j] = (double)1.e-19;
+
+ /* dataset */
+ if(write_dset(fid2, 2, dims1, "dataset", H5T_IEEE_F64LE, wdata) < 0)
+ PROGRAM_ERROR;
+
+error:
+ H5E_BEGIN_TRY {
+ H5Fclose(fid1);
+ H5Fclose(fid2);
+ } H5E_END_TRY;
+
+ return;
+}
+
/*-------------------------------------------------------------------------
* Function: write_attr
*
@@ -8030,8 +8088,8 @@ out:
static
int write_attr(hid_t loc_id, int rank, hsize_t *dims, const char *name, hid_t tid, void *buf)
{
- hid_t aid = -1;
- hid_t sid = -1;
+ hid_t aid = H5I_INVALID_HID;
+ hid_t sid = H5I_INVALID_HID;
/* create a space */
if ((sid = H5Screate_simple(rank, dims, NULL)) < 0)
@@ -8070,27 +8128,27 @@ out:
static herr_t
write_dset(hid_t loc_id, int rank, hsize_t *dims, const char *name, hid_t tid, void *buf)
{
- hid_t did = -1;
- hid_t sid = -1;
+ hid_t did = H5I_INVALID_HID;
+ hid_t sid = H5I_INVALID_HID;
/* create a space */
if((sid = H5Screate_simple(rank, dims, NULL)) < 0)
- PROGRAM_ERROR
+ PROGRAM_ERROR;
/* create the dataset */
if((did = H5Dcreate2(loc_id, name, tid, sid, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0)
- PROGRAM_ERROR
+ PROGRAM_ERROR;
/* write */
if(buf)
if(H5Dwrite(did, tid, H5S_ALL, H5S_ALL, H5P_DEFAULT, buf) < 0)
- PROGRAM_ERROR
+ PROGRAM_ERROR;
/* close */
if(H5Dclose(did) < 0)
- PROGRAM_ERROR
+ PROGRAM_ERROR;
if(H5Sclose(sid) < 0)
- PROGRAM_ERROR
+ PROGRAM_ERROR;
return SUCCEED;
diff --git a/tools/test/h5diff/testfiles/h5diff_10.txt b/tools/test/h5diff/testfiles/h5diff_10.txt
index 11ad800..0618705 100644
--- a/tools/test/h5diff/testfiles/h5diff_10.txt
+++ b/tools/test/h5diff/testfiles/h5diff_10.txt
@@ -17,10 +17,9 @@ usage: h5diff [OPTIONS] file1 file2 [obj1[ obj2]]
Verbose mode with level. Print differences and list of objects.
Level of detail depends on value of N:
0 : Identical to '-v' or '--verbose'.
- 1 : All level 0 information plus one-line attribute
- status summary.
- 2 : All level 1 information plus extended attribute
- status report.
+ 1 : All level 0 information plus one-line attribute status summary.
+ 2 : All level 1 information plus extended attribute status report.
+ 3 : All level 2 information plus file names.
-q, --quiet
Quiet mode. Do not produce output.
--enable-error-stack
@@ -97,6 +96,14 @@ usage: h5diff [OPTIONS] file1 file2 [obj1[ obj2]]
excluded.
This option can be used repeatedly to exclude multiple paths.
+ --exclude-attribute "path/to/object/with/attribute"
+ Exclude attributes on the specified path to an object when comparing files or groups.
+
+ If there are multiple paths to an object, only the specified path(s)
+ will be excluded; the comparison will include any path not explicitly
+ excluded.
+ This option can be used repeatedly to exclude multiple paths.
+
Modes of output:
Default mode: print the number of differences found and where they occured
-r Report mode: print the above plus the differences
diff --git a/tools/test/h5diff/testfiles/h5diff_58.txt b/tools/test/h5diff/testfiles/h5diff_58.txt
index d27a0c9..da147bc 100644
--- a/tools/test/h5diff/testfiles/h5diff_58.txt
+++ b/tools/test/h5diff/testfiles/h5diff_58.txt
@@ -1,3 +1,4 @@
+
dataset: </refreg> and </refreg>
Referenced dataset 10784 10784
------------------------------------------------------------
@@ -8,4 +9,7 @@ point #1 (2,2) (3,3)
point #3 (1,6) (2,5)
point #4 (2,8) (1,7)
4 differences found
+ obj1 obj2
+ --------------------------------------
+Attributes status: 0 common, 0 only in obj1, 0 only in obj2
EXIT CODE: 1
diff --git a/tools/test/h5diff/testfiles/h5diff_58_ref.txt b/tools/test/h5diff/testfiles/h5diff_58_ref.txt
new file mode 100644
index 0000000..48a4b33
--- /dev/null
+++ b/tools/test/h5diff/testfiles/h5diff_58_ref.txt
@@ -0,0 +1,37 @@
+
+dataset: </g1/reference2D> and </g1/reference2D>
+size: [2] [2]
+position reference2D reference2D difference
+------------------------------------------------------------
+[ 0 ] 1 0 1
+[ 1 ] 2 0 2
+size: [2] [2]
+position reference2D reference2D difference
+------------------------------------------------------------
+[ 0 ] 1 0 1
+[ 1 ] 2 0 2
+size: [2] [2]
+position reference2D reference2D difference
+------------------------------------------------------------
+[ 0 ] 1 0 1
+[ 1 ] 2 0 2
+size: [2] [2]
+position reference2D reference2D difference
+------------------------------------------------------------
+[ 0 ] 1 0 1
+[ 1 ] 2 0 2
+size: [2] [2]
+position reference2D reference2D difference
+------------------------------------------------------------
+[ 0 ] 1 0 1
+[ 1 ] 2 0 2
+size: [2] [2]
+position reference2D reference2D difference
+------------------------------------------------------------
+[ 0 ] 1 0 1
+[ 1 ] 2 0 2
+12 differences found
+ obj1 obj2
+ --------------------------------------
+Attributes status: 0 common, 0 only in obj1, 0 only in obj2
+EXIT CODE: 1
diff --git a/tools/test/h5diff/testfiles/h5diff_600.txt b/tools/test/h5diff/testfiles/h5diff_600.txt
index 13d627c..98c80be 100644
--- a/tools/test/h5diff/testfiles/h5diff_600.txt
+++ b/tools/test/h5diff/testfiles/h5diff_600.txt
@@ -17,10 +17,9 @@ usage: h5diff [OPTIONS] file1 file2 [obj1[ obj2]]
Verbose mode with level. Print differences and list of objects.
Level of detail depends on value of N:
0 : Identical to '-v' or '--verbose'.
- 1 : All level 0 information plus one-line attribute
- status summary.
- 2 : All level 1 information plus extended attribute
- status report.
+ 1 : All level 0 information plus one-line attribute status summary.
+ 2 : All level 1 information plus extended attribute status report.
+ 3 : All level 2 information plus file names.
-q, --quiet
Quiet mode. Do not produce output.
--enable-error-stack
@@ -97,6 +96,14 @@ usage: h5diff [OPTIONS] file1 file2 [obj1[ obj2]]
excluded.
This option can be used repeatedly to exclude multiple paths.
+ --exclude-attribute "path/to/object/with/attribute"
+ Exclude attributes on the specified path to an object when comparing files or groups.
+
+ If there are multiple paths to an object, only the specified path(s)
+ will be excluded; the comparison will include any path not explicitly
+ excluded.
+ This option can be used repeatedly to exclude multiple paths.
+
Modes of output:
Default mode: print the number of differences found and where they occured
-r Report mode: print the above plus the differences
diff --git a/tools/test/h5diff/testfiles/h5diff_603.txt b/tools/test/h5diff/testfiles/h5diff_603.txt
index 0d6b474..a5bb805 100644
--- a/tools/test/h5diff/testfiles/h5diff_603.txt
+++ b/tools/test/h5diff/testfiles/h5diff_603.txt
@@ -18,10 +18,9 @@ usage: h5diff [OPTIONS] file1 file2 [obj1[ obj2]]
Verbose mode with level. Print differences and list of objects.
Level of detail depends on value of N:
0 : Identical to '-v' or '--verbose'.
- 1 : All level 0 information plus one-line attribute
- status summary.
- 2 : All level 1 information plus extended attribute
- status report.
+ 1 : All level 0 information plus one-line attribute status summary.
+ 2 : All level 1 information plus extended attribute status report.
+ 3 : All level 2 information plus file names.
-q, --quiet
Quiet mode. Do not produce output.
--enable-error-stack
@@ -98,6 +97,14 @@ usage: h5diff [OPTIONS] file1 file2 [obj1[ obj2]]
excluded.
This option can be used repeatedly to exclude multiple paths.
+ --exclude-attribute "path/to/object/with/attribute"
+ Exclude attributes on the specified path to an object when comparing files or groups.
+
+ If there are multiple paths to an object, only the specified path(s)
+ will be excluded; the comparison will include any path not explicitly
+ excluded.
+ This option can be used repeatedly to exclude multiple paths.
+
Modes of output:
Default mode: print the number of differences found and where they occured
-r Report mode: print the above plus the differences
diff --git a/tools/test/h5diff/testfiles/h5diff_606.txt b/tools/test/h5diff/testfiles/h5diff_606.txt
index 94f44e8..4782e17 100644
--- a/tools/test/h5diff/testfiles/h5diff_606.txt
+++ b/tools/test/h5diff/testfiles/h5diff_606.txt
@@ -18,10 +18,9 @@ usage: h5diff [OPTIONS] file1 file2 [obj1[ obj2]]
Verbose mode with level. Print differences and list of objects.
Level of detail depends on value of N:
0 : Identical to '-v' or '--verbose'.
- 1 : All level 0 information plus one-line attribute
- status summary.
- 2 : All level 1 information plus extended attribute
- status report.
+ 1 : All level 0 information plus one-line attribute status summary.
+ 2 : All level 1 information plus extended attribute status report.
+ 3 : All level 2 information plus file names.
-q, --quiet
Quiet mode. Do not produce output.
--enable-error-stack
@@ -98,6 +97,14 @@ usage: h5diff [OPTIONS] file1 file2 [obj1[ obj2]]
excluded.
This option can be used repeatedly to exclude multiple paths.
+ --exclude-attribute "path/to/object/with/attribute"
+ Exclude attributes on the specified path to an object when comparing files or groups.
+
+ If there are multiple paths to an object, only the specified path(s)
+ will be excluded; the comparison will include any path not explicitly
+ excluded.
+ This option can be used repeatedly to exclude multiple paths.
+
Modes of output:
Default mode: print the number of differences found and where they occured
-r Report mode: print the above plus the differences
diff --git a/tools/test/h5diff/testfiles/h5diff_612.txt b/tools/test/h5diff/testfiles/h5diff_612.txt
index 7f83c64..ee40713 100644
--- a/tools/test/h5diff/testfiles/h5diff_612.txt
+++ b/tools/test/h5diff/testfiles/h5diff_612.txt
@@ -18,10 +18,9 @@ usage: h5diff [OPTIONS] file1 file2 [obj1[ obj2]]
Verbose mode with level. Print differences and list of objects.
Level of detail depends on value of N:
0 : Identical to '-v' or '--verbose'.
- 1 : All level 0 information plus one-line attribute
- status summary.
- 2 : All level 1 information plus extended attribute
- status report.
+ 1 : All level 0 information plus one-line attribute status summary.
+ 2 : All level 1 information plus extended attribute status report.
+ 3 : All level 2 information plus file names.
-q, --quiet
Quiet mode. Do not produce output.
--enable-error-stack
@@ -98,6 +97,14 @@ usage: h5diff [OPTIONS] file1 file2 [obj1[ obj2]]
excluded.
This option can be used repeatedly to exclude multiple paths.
+ --exclude-attribute "path/to/object/with/attribute"
+ Exclude attributes on the specified path to an object when comparing files or groups.
+
+ If there are multiple paths to an object, only the specified path(s)
+ will be excluded; the comparison will include any path not explicitly
+ excluded.
+ This option can be used repeatedly to exclude multiple paths.
+
Modes of output:
Default mode: print the number of differences found and where they occured
-r Report mode: print the above plus the differences
diff --git a/tools/test/h5diff/testfiles/h5diff_615.txt b/tools/test/h5diff/testfiles/h5diff_615.txt
index 3cfe6b9..5504812 100644
--- a/tools/test/h5diff/testfiles/h5diff_615.txt
+++ b/tools/test/h5diff/testfiles/h5diff_615.txt
@@ -18,10 +18,9 @@ usage: h5diff [OPTIONS] file1 file2 [obj1[ obj2]]
Verbose mode with level. Print differences and list of objects.
Level of detail depends on value of N:
0 : Identical to '-v' or '--verbose'.
- 1 : All level 0 information plus one-line attribute
- status summary.
- 2 : All level 1 information plus extended attribute
- status report.
+ 1 : All level 0 information plus one-line attribute status summary.
+ 2 : All level 1 information plus extended attribute status report.
+ 3 : All level 2 information plus file names.
-q, --quiet
Quiet mode. Do not produce output.
--enable-error-stack
@@ -98,6 +97,14 @@ usage: h5diff [OPTIONS] file1 file2 [obj1[ obj2]]
excluded.
This option can be used repeatedly to exclude multiple paths.
+ --exclude-attribute "path/to/object/with/attribute"
+ Exclude attributes on the specified path to an object when comparing files or groups.
+
+ If there are multiple paths to an object, only the specified path(s)
+ will be excluded; the comparison will include any path not explicitly
+ excluded.
+ This option can be used repeatedly to exclude multiple paths.
+
Modes of output:
Default mode: print the number of differences found and where they occured
-r Report mode: print the above plus the differences
diff --git a/tools/test/h5diff/testfiles/h5diff_621.txt b/tools/test/h5diff/testfiles/h5diff_621.txt
index 9c34945..e4dba56 100644
--- a/tools/test/h5diff/testfiles/h5diff_621.txt
+++ b/tools/test/h5diff/testfiles/h5diff_621.txt
@@ -18,10 +18,9 @@ usage: h5diff [OPTIONS] file1 file2 [obj1[ obj2]]
Verbose mode with level. Print differences and list of objects.
Level of detail depends on value of N:
0 : Identical to '-v' or '--verbose'.
- 1 : All level 0 information plus one-line attribute
- status summary.
- 2 : All level 1 information plus extended attribute
- status report.
+ 1 : All level 0 information plus one-line attribute status summary.
+ 2 : All level 1 information plus extended attribute status report.
+ 3 : All level 2 information plus file names.
-q, --quiet
Quiet mode. Do not produce output.
--enable-error-stack
@@ -98,6 +97,14 @@ usage: h5diff [OPTIONS] file1 file2 [obj1[ obj2]]
excluded.
This option can be used repeatedly to exclude multiple paths.
+ --exclude-attribute "path/to/object/with/attribute"
+ Exclude attributes on the specified path to an object when comparing files or groups.
+
+ If there are multiple paths to an object, only the specified path(s)
+ will be excluded; the comparison will include any path not explicitly
+ excluded.
+ This option can be used repeatedly to exclude multiple paths.
+
Modes of output:
Default mode: print the number of differences found and where they occured
-r Report mode: print the above plus the differences
diff --git a/tools/test/h5diff/testfiles/h5diff_622.txt b/tools/test/h5diff/testfiles/h5diff_622.txt
index 2b2df2f..0e7ffa3 100644
--- a/tools/test/h5diff/testfiles/h5diff_622.txt
+++ b/tools/test/h5diff/testfiles/h5diff_622.txt
@@ -18,10 +18,9 @@ usage: h5diff [OPTIONS] file1 file2 [obj1[ obj2]]
Verbose mode with level. Print differences and list of objects.
Level of detail depends on value of N:
0 : Identical to '-v' or '--verbose'.
- 1 : All level 0 information plus one-line attribute
- status summary.
- 2 : All level 1 information plus extended attribute
- status report.
+ 1 : All level 0 information plus one-line attribute status summary.
+ 2 : All level 1 information plus extended attribute status report.
+ 3 : All level 2 information plus file names.
-q, --quiet
Quiet mode. Do not produce output.
--enable-error-stack
@@ -98,6 +97,14 @@ usage: h5diff [OPTIONS] file1 file2 [obj1[ obj2]]
excluded.
This option can be used repeatedly to exclude multiple paths.
+ --exclude-attribute "path/to/object/with/attribute"
+ Exclude attributes on the specified path to an object when comparing files or groups.
+
+ If there are multiple paths to an object, only the specified path(s)
+ will be excluded; the comparison will include any path not explicitly
+ excluded.
+ This option can be used repeatedly to exclude multiple paths.
+
Modes of output:
Default mode: print the number of differences found and where they occured
-r Report mode: print the above plus the differences
diff --git a/tools/test/h5diff/testfiles/h5diff_623.txt b/tools/test/h5diff/testfiles/h5diff_623.txt
index 3e80438..bb70458 100644
--- a/tools/test/h5diff/testfiles/h5diff_623.txt
+++ b/tools/test/h5diff/testfiles/h5diff_623.txt
@@ -18,10 +18,9 @@ usage: h5diff [OPTIONS] file1 file2 [obj1[ obj2]]
Verbose mode with level. Print differences and list of objects.
Level of detail depends on value of N:
0 : Identical to '-v' or '--verbose'.
- 1 : All level 0 information plus one-line attribute
- status summary.
- 2 : All level 1 information plus extended attribute
- status report.
+ 1 : All level 0 information plus one-line attribute status summary.
+ 2 : All level 1 information plus extended attribute status report.
+ 3 : All level 2 information plus file names.
-q, --quiet
Quiet mode. Do not produce output.
--enable-error-stack
@@ -98,6 +97,14 @@ usage: h5diff [OPTIONS] file1 file2 [obj1[ obj2]]
excluded.
This option can be used repeatedly to exclude multiple paths.
+ --exclude-attribute "path/to/object/with/attribute"
+ Exclude attributes on the specified path to an object when comparing files or groups.
+
+ If there are multiple paths to an object, only the specified path(s)
+ will be excluded; the comparison will include any path not explicitly
+ excluded.
+ This option can be used repeatedly to exclude multiple paths.
+
Modes of output:
Default mode: print the number of differences found and where they occured
-r Report mode: print the above plus the differences
diff --git a/tools/test/h5diff/testfiles/h5diff_624.txt b/tools/test/h5diff/testfiles/h5diff_624.txt
index 7a2f585..cb30023 100644
--- a/tools/test/h5diff/testfiles/h5diff_624.txt
+++ b/tools/test/h5diff/testfiles/h5diff_624.txt
@@ -18,10 +18,9 @@ usage: h5diff [OPTIONS] file1 file2 [obj1[ obj2]]
Verbose mode with level. Print differences and list of objects.
Level of detail depends on value of N:
0 : Identical to '-v' or '--verbose'.
- 1 : All level 0 information plus one-line attribute
- status summary.
- 2 : All level 1 information plus extended attribute
- status report.
+ 1 : All level 0 information plus one-line attribute status summary.
+ 2 : All level 1 information plus extended attribute status report.
+ 3 : All level 2 information plus file names.
-q, --quiet
Quiet mode. Do not produce output.
--enable-error-stack
@@ -98,6 +97,14 @@ usage: h5diff [OPTIONS] file1 file2 [obj1[ obj2]]
excluded.
This option can be used repeatedly to exclude multiple paths.
+ --exclude-attribute "path/to/object/with/attribute"
+ Exclude attributes on the specified path to an object when comparing files or groups.
+
+ If there are multiple paths to an object, only the specified path(s)
+ will be excluded; the comparison will include any path not explicitly
+ excluded.
+ This option can be used repeatedly to exclude multiple paths.
+
Modes of output:
Default mode: print the number of differences found and where they occured
-r Report mode: print the above plus the differences
diff --git a/tools/test/h5diff/testfiles/h5diff_70.txt b/tools/test/h5diff/testfiles/h5diff_70.txt
index efa34ea..b0b8bf6 100644
--- a/tools/test/h5diff/testfiles/h5diff_70.txt
+++ b/tools/test/h5diff/testfiles/h5diff_70.txt
@@ -1183,10 +1183,42 @@ position opaque3D of </dset> opaque3D of </dset> difference
[ 3 2 1 ] 24 0 24
24 differences found
attribute: <reference of </dset>> and <reference of </dset>>
+Not comparable: <reference of </dset>> or <reference of </dset>> is an empty dataset
+Not comparable: <reference of </dset>> or <reference of </dset>> is an empty dataset
0 differences found
attribute: <reference2D of </dset>> and <reference2D of </dset>>
+Not comparable: <reference2D of </dset>> or <reference2D of </dset>> is an empty dataset
+Not comparable: <reference2D of </dset>> or <reference2D of </dset>> is an empty dataset
+Not comparable: <reference2D of </dset>> or <reference2D of </dset>> is an empty dataset
+Not comparable: <reference2D of </dset>> or <reference2D of </dset>> is an empty dataset
+Not comparable: <reference2D of </dset>> or <reference2D of </dset>> is an empty dataset
+Not comparable: <reference2D of </dset>> or <reference2D of </dset>> is an empty dataset
0 differences found
attribute: <reference3D of </dset>> and <reference3D of </dset>>
+Not comparable: <reference3D of </dset>> or <reference3D of </dset>> is an empty dataset
+Not comparable: <reference3D of </dset>> or <reference3D of </dset>> is an empty dataset
+Not comparable: <reference3D of </dset>> or <reference3D of </dset>> is an empty dataset
+Not comparable: <reference3D of </dset>> or <reference3D of </dset>> is an empty dataset
+Not comparable: <reference3D of </dset>> or <reference3D of </dset>> is an empty dataset
+Not comparable: <reference3D of </dset>> or <reference3D of </dset>> is an empty dataset
+Not comparable: <reference3D of </dset>> or <reference3D of </dset>> is an empty dataset
+Not comparable: <reference3D of </dset>> or <reference3D of </dset>> is an empty dataset
+Not comparable: <reference3D of </dset>> or <reference3D of </dset>> is an empty dataset
+Not comparable: <reference3D of </dset>> or <reference3D of </dset>> is an empty dataset
+Not comparable: <reference3D of </dset>> or <reference3D of </dset>> is an empty dataset
+Not comparable: <reference3D of </dset>> or <reference3D of </dset>> is an empty dataset
+Not comparable: <reference3D of </dset>> or <reference3D of </dset>> is an empty dataset
+Not comparable: <reference3D of </dset>> or <reference3D of </dset>> is an empty dataset
+Not comparable: <reference3D of </dset>> or <reference3D of </dset>> is an empty dataset
+Not comparable: <reference3D of </dset>> or <reference3D of </dset>> is an empty dataset
+Not comparable: <reference3D of </dset>> or <reference3D of </dset>> is an empty dataset
+Not comparable: <reference3D of </dset>> or <reference3D of </dset>> is an empty dataset
+Not comparable: <reference3D of </dset>> or <reference3D of </dset>> is an empty dataset
+Not comparable: <reference3D of </dset>> or <reference3D of </dset>> is an empty dataset
+Not comparable: <reference3D of </dset>> or <reference3D of </dset>> is an empty dataset
+Not comparable: <reference3D of </dset>> or <reference3D of </dset>> is an empty dataset
+Not comparable: <reference3D of </dset>> or <reference3D of </dset>> is an empty dataset
+Not comparable: <reference3D of </dset>> or <reference3D of </dset>> is an empty dataset
0 differences found
attribute: <string of </dset>> and <string of </dset>>
size: [2] [2]
diff --git a/tools/test/h5diff/testfiles/h5diff_700.txt b/tools/test/h5diff/testfiles/h5diff_700.txt
index 851a407..6cf9893 100644
--- a/tools/test/h5diff/testfiles/h5diff_700.txt
+++ b/tools/test/h5diff/testfiles/h5diff_700.txt
@@ -1187,10 +1187,42 @@ position opaque3D of </dset> opaque3D of </dset> difference
[ 3 2 1 ] 24 0 24
24 differences found
attribute: <reference of </dset>> and <reference of </dset>>
+Not comparable: <reference of </dset>> or <reference of </dset>> is an empty dataset
+Not comparable: <reference of </dset>> or <reference of </dset>> is an empty dataset
0 differences found
attribute: <reference2D of </dset>> and <reference2D of </dset>>
+Not comparable: <reference2D of </dset>> or <reference2D of </dset>> is an empty dataset
+Not comparable: <reference2D of </dset>> or <reference2D of </dset>> is an empty dataset
+Not comparable: <reference2D of </dset>> or <reference2D of </dset>> is an empty dataset
+Not comparable: <reference2D of </dset>> or <reference2D of </dset>> is an empty dataset
+Not comparable: <reference2D of </dset>> or <reference2D of </dset>> is an empty dataset
+Not comparable: <reference2D of </dset>> or <reference2D of </dset>> is an empty dataset
0 differences found
attribute: <reference3D of </dset>> and <reference3D of </dset>>
+Not comparable: <reference3D of </dset>> or <reference3D of </dset>> is an empty dataset
+Not comparable: <reference3D of </dset>> or <reference3D of </dset>> is an empty dataset
+Not comparable: <reference3D of </dset>> or <reference3D of </dset>> is an empty dataset
+Not comparable: <reference3D of </dset>> or <reference3D of </dset>> is an empty dataset
+Not comparable: <reference3D of </dset>> or <reference3D of </dset>> is an empty dataset
+Not comparable: <reference3D of </dset>> or <reference3D of </dset>> is an empty dataset
+Not comparable: <reference3D of </dset>> or <reference3D of </dset>> is an empty dataset
+Not comparable: <reference3D of </dset>> or <reference3D of </dset>> is an empty dataset
+Not comparable: <reference3D of </dset>> or <reference3D of </dset>> is an empty dataset
+Not comparable: <reference3D of </dset>> or <reference3D of </dset>> is an empty dataset
+Not comparable: <reference3D of </dset>> or <reference3D of </dset>> is an empty dataset
+Not comparable: <reference3D of </dset>> or <reference3D of </dset>> is an empty dataset
+Not comparable: <reference3D of </dset>> or <reference3D of </dset>> is an empty dataset
+Not comparable: <reference3D of </dset>> or <reference3D of </dset>> is an empty dataset
+Not comparable: <reference3D of </dset>> or <reference3D of </dset>> is an empty dataset
+Not comparable: <reference3D of </dset>> or <reference3D of </dset>> is an empty dataset
+Not comparable: <reference3D of </dset>> or <reference3D of </dset>> is an empty dataset
+Not comparable: <reference3D of </dset>> or <reference3D of </dset>> is an empty dataset
+Not comparable: <reference3D of </dset>> or <reference3D of </dset>> is an empty dataset
+Not comparable: <reference3D of </dset>> or <reference3D of </dset>> is an empty dataset
+Not comparable: <reference3D of </dset>> or <reference3D of </dset>> is an empty dataset
+Not comparable: <reference3D of </dset>> or <reference3D of </dset>> is an empty dataset
+Not comparable: <reference3D of </dset>> or <reference3D of </dset>> is an empty dataset
+Not comparable: <reference3D of </dset>> or <reference3D of </dset>> is an empty dataset
0 differences found
attribute: <string of </dset>> and <string of </dset>>
size: [2] [2]
diff --git a/tools/test/h5diff/testfiles/h5diff_701.txt b/tools/test/h5diff/testfiles/h5diff_701.txt
index 33f1a0f..4187754 100644
--- a/tools/test/h5diff/testfiles/h5diff_701.txt
+++ b/tools/test/h5diff/testfiles/h5diff_701.txt
@@ -1254,10 +1254,42 @@ position opaque3D of </dset> opaque3D of </dset> difference
[ 3 2 1 ] 24 0 24
24 differences found
attribute: <reference of </dset>> and <reference of </dset>>
+Not comparable: <reference of </dset>> or <reference of </dset>> is an empty dataset
+Not comparable: <reference of </dset>> or <reference of </dset>> is an empty dataset
0 differences found
attribute: <reference2D of </dset>> and <reference2D of </dset>>
+Not comparable: <reference2D of </dset>> or <reference2D of </dset>> is an empty dataset
+Not comparable: <reference2D of </dset>> or <reference2D of </dset>> is an empty dataset
+Not comparable: <reference2D of </dset>> or <reference2D of </dset>> is an empty dataset
+Not comparable: <reference2D of </dset>> or <reference2D of </dset>> is an empty dataset
+Not comparable: <reference2D of </dset>> or <reference2D of </dset>> is an empty dataset
+Not comparable: <reference2D of </dset>> or <reference2D of </dset>> is an empty dataset
0 differences found
attribute: <reference3D of </dset>> and <reference3D of </dset>>
+Not comparable: <reference3D of </dset>> or <reference3D of </dset>> is an empty dataset
+Not comparable: <reference3D of </dset>> or <reference3D of </dset>> is an empty dataset
+Not comparable: <reference3D of </dset>> or <reference3D of </dset>> is an empty dataset
+Not comparable: <reference3D of </dset>> or <reference3D of </dset>> is an empty dataset
+Not comparable: <reference3D of </dset>> or <reference3D of </dset>> is an empty dataset
+Not comparable: <reference3D of </dset>> or <reference3D of </dset>> is an empty dataset
+Not comparable: <reference3D of </dset>> or <reference3D of </dset>> is an empty dataset
+Not comparable: <reference3D of </dset>> or <reference3D of </dset>> is an empty dataset
+Not comparable: <reference3D of </dset>> or <reference3D of </dset>> is an empty dataset
+Not comparable: <reference3D of </dset>> or <reference3D of </dset>> is an empty dataset
+Not comparable: <reference3D of </dset>> or <reference3D of </dset>> is an empty dataset
+Not comparable: <reference3D of </dset>> or <reference3D of </dset>> is an empty dataset
+Not comparable: <reference3D of </dset>> or <reference3D of </dset>> is an empty dataset
+Not comparable: <reference3D of </dset>> or <reference3D of </dset>> is an empty dataset
+Not comparable: <reference3D of </dset>> or <reference3D of </dset>> is an empty dataset
+Not comparable: <reference3D of </dset>> or <reference3D of </dset>> is an empty dataset
+Not comparable: <reference3D of </dset>> or <reference3D of </dset>> is an empty dataset
+Not comparable: <reference3D of </dset>> or <reference3D of </dset>> is an empty dataset
+Not comparable: <reference3D of </dset>> or <reference3D of </dset>> is an empty dataset
+Not comparable: <reference3D of </dset>> or <reference3D of </dset>> is an empty dataset
+Not comparable: <reference3D of </dset>> or <reference3D of </dset>> is an empty dataset
+Not comparable: <reference3D of </dset>> or <reference3D of </dset>> is an empty dataset
+Not comparable: <reference3D of </dset>> or <reference3D of </dset>> is an empty dataset
+Not comparable: <reference3D of </dset>> or <reference3D of </dset>> is an empty dataset
0 differences found
attribute: <string of </dset>> and <string of </dset>>
size: [2] [2]
diff --git a/tools/test/h5diff/testfiles/h5diff_702.txt b/tools/test/h5diff/testfiles/h5diff_702.txt
index 851a407..6cf9893 100644
--- a/tools/test/h5diff/testfiles/h5diff_702.txt
+++ b/tools/test/h5diff/testfiles/h5diff_702.txt
@@ -1187,10 +1187,42 @@ position opaque3D of </dset> opaque3D of </dset> difference
[ 3 2 1 ] 24 0 24
24 differences found
attribute: <reference of </dset>> and <reference of </dset>>
+Not comparable: <reference of </dset>> or <reference of </dset>> is an empty dataset
+Not comparable: <reference of </dset>> or <reference of </dset>> is an empty dataset
0 differences found
attribute: <reference2D of </dset>> and <reference2D of </dset>>
+Not comparable: <reference2D of </dset>> or <reference2D of </dset>> is an empty dataset
+Not comparable: <reference2D of </dset>> or <reference2D of </dset>> is an empty dataset
+Not comparable: <reference2D of </dset>> or <reference2D of </dset>> is an empty dataset
+Not comparable: <reference2D of </dset>> or <reference2D of </dset>> is an empty dataset
+Not comparable: <reference2D of </dset>> or <reference2D of </dset>> is an empty dataset
+Not comparable: <reference2D of </dset>> or <reference2D of </dset>> is an empty dataset
0 differences found
attribute: <reference3D of </dset>> and <reference3D of </dset>>
+Not comparable: <reference3D of </dset>> or <reference3D of </dset>> is an empty dataset
+Not comparable: <reference3D of </dset>> or <reference3D of </dset>> is an empty dataset
+Not comparable: <reference3D of </dset>> or <reference3D of </dset>> is an empty dataset
+Not comparable: <reference3D of </dset>> or <reference3D of </dset>> is an empty dataset
+Not comparable: <reference3D of </dset>> or <reference3D of </dset>> is an empty dataset
+Not comparable: <reference3D of </dset>> or <reference3D of </dset>> is an empty dataset
+Not comparable: <reference3D of </dset>> or <reference3D of </dset>> is an empty dataset
+Not comparable: <reference3D of </dset>> or <reference3D of </dset>> is an empty dataset
+Not comparable: <reference3D of </dset>> or <reference3D of </dset>> is an empty dataset
+Not comparable: <reference3D of </dset>> or <reference3D of </dset>> is an empty dataset
+Not comparable: <reference3D of </dset>> or <reference3D of </dset>> is an empty dataset
+Not comparable: <reference3D of </dset>> or <reference3D of </dset>> is an empty dataset
+Not comparable: <reference3D of </dset>> or <reference3D of </dset>> is an empty dataset
+Not comparable: <reference3D of </dset>> or <reference3D of </dset>> is an empty dataset
+Not comparable: <reference3D of </dset>> or <reference3D of </dset>> is an empty dataset
+Not comparable: <reference3D of </dset>> or <reference3D of </dset>> is an empty dataset
+Not comparable: <reference3D of </dset>> or <reference3D of </dset>> is an empty dataset
+Not comparable: <reference3D of </dset>> or <reference3D of </dset>> is an empty dataset
+Not comparable: <reference3D of </dset>> or <reference3D of </dset>> is an empty dataset
+Not comparable: <reference3D of </dset>> or <reference3D of </dset>> is an empty dataset
+Not comparable: <reference3D of </dset>> or <reference3D of </dset>> is an empty dataset
+Not comparable: <reference3D of </dset>> or <reference3D of </dset>> is an empty dataset
+Not comparable: <reference3D of </dset>> or <reference3D of </dset>> is an empty dataset
+Not comparable: <reference3D of </dset>> or <reference3D of </dset>> is an empty dataset
0 differences found
attribute: <string of </dset>> and <string of </dset>>
size: [2] [2]
diff --git a/tools/test/h5diff/testfiles/h5diff_703.txt b/tools/test/h5diff/testfiles/h5diff_703.txt
index 33f1a0f..4187754 100644
--- a/tools/test/h5diff/testfiles/h5diff_703.txt
+++ b/tools/test/h5diff/testfiles/h5diff_703.txt
@@ -1254,10 +1254,42 @@ position opaque3D of </dset> opaque3D of </dset> difference
[ 3 2 1 ] 24 0 24
24 differences found
attribute: <reference of </dset>> and <reference of </dset>>
+Not comparable: <reference of </dset>> or <reference of </dset>> is an empty dataset
+Not comparable: <reference of </dset>> or <reference of </dset>> is an empty dataset
0 differences found
attribute: <reference2D of </dset>> and <reference2D of </dset>>
+Not comparable: <reference2D of </dset>> or <reference2D of </dset>> is an empty dataset
+Not comparable: <reference2D of </dset>> or <reference2D of </dset>> is an empty dataset
+Not comparable: <reference2D of </dset>> or <reference2D of </dset>> is an empty dataset
+Not comparable: <reference2D of </dset>> or <reference2D of </dset>> is an empty dataset
+Not comparable: <reference2D of </dset>> or <reference2D of </dset>> is an empty dataset
+Not comparable: <reference2D of </dset>> or <reference2D of </dset>> is an empty dataset
0 differences found
attribute: <reference3D of </dset>> and <reference3D of </dset>>
+Not comparable: <reference3D of </dset>> or <reference3D of </dset>> is an empty dataset
+Not comparable: <reference3D of </dset>> or <reference3D of </dset>> is an empty dataset
+Not comparable: <reference3D of </dset>> or <reference3D of </dset>> is an empty dataset
+Not comparable: <reference3D of </dset>> or <reference3D of </dset>> is an empty dataset
+Not comparable: <reference3D of </dset>> or <reference3D of </dset>> is an empty dataset
+Not comparable: <reference3D of </dset>> or <reference3D of </dset>> is an empty dataset
+Not comparable: <reference3D of </dset>> or <reference3D of </dset>> is an empty dataset
+Not comparable: <reference3D of </dset>> or <reference3D of </dset>> is an empty dataset
+Not comparable: <reference3D of </dset>> or <reference3D of </dset>> is an empty dataset
+Not comparable: <reference3D of </dset>> or <reference3D of </dset>> is an empty dataset
+Not comparable: <reference3D of </dset>> or <reference3D of </dset>> is an empty dataset
+Not comparable: <reference3D of </dset>> or <reference3D of </dset>> is an empty dataset
+Not comparable: <reference3D of </dset>> or <reference3D of </dset>> is an empty dataset
+Not comparable: <reference3D of </dset>> or <reference3D of </dset>> is an empty dataset
+Not comparable: <reference3D of </dset>> or <reference3D of </dset>> is an empty dataset
+Not comparable: <reference3D of </dset>> or <reference3D of </dset>> is an empty dataset
+Not comparable: <reference3D of </dset>> or <reference3D of </dset>> is an empty dataset
+Not comparable: <reference3D of </dset>> or <reference3D of </dset>> is an empty dataset
+Not comparable: <reference3D of </dset>> or <reference3D of </dset>> is an empty dataset
+Not comparable: <reference3D of </dset>> or <reference3D of </dset>> is an empty dataset
+Not comparable: <reference3D of </dset>> or <reference3D of </dset>> is an empty dataset
+Not comparable: <reference3D of </dset>> or <reference3D of </dset>> is an empty dataset
+Not comparable: <reference3D of </dset>> or <reference3D of </dset>> is an empty dataset
+Not comparable: <reference3D of </dset>> or <reference3D of </dset>> is an empty dataset
0 differences found
attribute: <string of </dset>> and <string of </dset>>
size: [2] [2]
diff --git a/tools/test/h5diff/testfiles/h5diff_80.txt b/tools/test/h5diff/testfiles/h5diff_80.txt
index b223eed..11dccd8 100644
--- a/tools/test/h5diff/testfiles/h5diff_80.txt
+++ b/tools/test/h5diff/testfiles/h5diff_80.txt
@@ -528,166 +528,166 @@ position opaque3D opaque3D difference
24 differences found
dataset: </g1/reference> and </g1/reference>
size: [2] [2]
-position difference
+position reference reference difference
------------------------------------------------------------
[ 0 ] 1 0 1
[ 1 ] 2 0 2
size: [2] [2]
-position difference
+position reference reference difference
------------------------------------------------------------
[ 0 ] 1 0 1
[ 1 ] 2 0 2
4 differences found
dataset: </g1/reference2D> and </g1/reference2D>
size: [2] [2]
-position difference
+position reference2D reference2D difference
------------------------------------------------------------
[ 0 ] 1 0 1
[ 1 ] 2 0 2
size: [2] [2]
-position difference
+position reference2D reference2D difference
------------------------------------------------------------
[ 0 ] 1 0 1
[ 1 ] 2 0 2
size: [2] [2]
-position difference
+position reference2D reference2D difference
------------------------------------------------------------
[ 0 ] 1 0 1
[ 1 ] 2 0 2
size: [2] [2]
-position difference
+position reference2D reference2D difference
------------------------------------------------------------
[ 0 ] 1 0 1
[ 1 ] 2 0 2
size: [2] [2]
-position difference
+position reference2D reference2D difference
------------------------------------------------------------
[ 0 ] 1 0 1
[ 1 ] 2 0 2
size: [2] [2]
-position difference
+position reference2D reference2D difference
------------------------------------------------------------
[ 0 ] 1 0 1
[ 1 ] 2 0 2
12 differences found
dataset: </g1/reference3D> and </g1/reference3D>
size: [2] [2]
-position difference
+position reference3D reference3D difference
------------------------------------------------------------
[ 0 ] 1 0 1
[ 1 ] 2 0 2
size: [2] [2]
-position difference
+position reference3D reference3D difference
------------------------------------------------------------
[ 0 ] 1 0 1
[ 1 ] 2 0 2
size: [2] [2]
-position difference
+position reference3D reference3D difference
------------------------------------------------------------
[ 0 ] 1 0 1
[ 1 ] 2 0 2
size: [2] [2]
-position difference
+position reference3D reference3D difference
------------------------------------------------------------
[ 0 ] 1 0 1
[ 1 ] 2 0 2
size: [2] [2]
-position difference
+position reference3D reference3D difference
------------------------------------------------------------
[ 0 ] 1 0 1
[ 1 ] 2 0 2
size: [2] [2]
-position difference
+position reference3D reference3D difference
------------------------------------------------------------
[ 0 ] 1 0 1
[ 1 ] 2 0 2
size: [2] [2]
-position difference
+position reference3D reference3D difference
------------------------------------------------------------
[ 0 ] 1 0 1
[ 1 ] 2 0 2
size: [2] [2]
-position difference
+position reference3D reference3D difference
------------------------------------------------------------
[ 0 ] 1 0 1
[ 1 ] 2 0 2
size: [2] [2]
-position difference
+position reference3D reference3D difference
------------------------------------------------------------
[ 0 ] 1 0 1
[ 1 ] 2 0 2
size: [2] [2]
-position difference
+position reference3D reference3D difference
------------------------------------------------------------
[ 0 ] 1 0 1
[ 1 ] 2 0 2
size: [2] [2]
-position difference
+position reference3D reference3D difference
------------------------------------------------------------
[ 0 ] 1 0 1
[ 1 ] 2 0 2
size: [2] [2]
-position difference
+position reference3D reference3D difference
------------------------------------------------------------
[ 0 ] 1 0 1
[ 1 ] 2 0 2
size: [2] [2]
-position difference
+position reference3D reference3D difference
------------------------------------------------------------
[ 0 ] 1 0 1
[ 1 ] 2 0 2
size: [2] [2]
-position difference
+position reference3D reference3D difference
------------------------------------------------------------
[ 0 ] 1 0 1
[ 1 ] 2 0 2
size: [2] [2]
-position difference
+position reference3D reference3D difference
------------------------------------------------------------
[ 0 ] 1 0 1
[ 1 ] 2 0 2
size: [2] [2]
-position difference
+position reference3D reference3D difference
------------------------------------------------------------
[ 0 ] 1 0 1
[ 1 ] 2 0 2
size: [2] [2]
-position difference
+position reference3D reference3D difference
------------------------------------------------------------
[ 0 ] 1 0 1
[ 1 ] 2 0 2
size: [2] [2]
-position difference
+position reference3D reference3D difference
------------------------------------------------------------
[ 0 ] 1 0 1
[ 1 ] 2 0 2
size: [2] [2]
-position difference
+position reference3D reference3D difference
------------------------------------------------------------
[ 0 ] 1 0 1
[ 1 ] 2 0 2
size: [2] [2]
-position difference
+position reference3D reference3D difference
------------------------------------------------------------
[ 0 ] 1 0 1
[ 1 ] 2 0 2
size: [2] [2]
-position difference
+position reference3D reference3D difference
------------------------------------------------------------
[ 0 ] 1 0 1
[ 1 ] 2 0 2
size: [2] [2]
-position difference
+position reference3D reference3D difference
------------------------------------------------------------
[ 0 ] 1 0 1
[ 1 ] 2 0 2
size: [2] [2]
-position difference
+position reference3D reference3D difference
------------------------------------------------------------
[ 0 ] 1 0 1
[ 1 ] 2 0 2
size: [2] [2]
-position difference
+position reference3D reference3D difference
------------------------------------------------------------
[ 0 ] 1 0 1
[ 1 ] 2 0 2
diff --git a/tools/test/h5diff/testfiles/h5diff_eps.txt b/tools/test/h5diff/testfiles/h5diff_eps.txt
new file mode 100644
index 0000000..3a71366
--- /dev/null
+++ b/tools/test/h5diff/testfiles/h5diff_eps.txt
@@ -0,0 +1,17 @@
+file1: h5diff_eps1.h5
+file2: h5diff_eps2.h5
+
+file1 file2
+---------------------------------------
+ x x /
+ x x /DS1
+
+
+group : </> and </>
+0 differences found
+Attributes status: 0 common, 0 only in obj1, 0 only in obj2
+
+dataset: </DS1> and </DS1>
+0 differences found
+Attributes status: 0 common, 0 only in obj1, 0 only in obj2
+EXIT CODE: 0
diff --git a/tools/test/h5diff/testfiles/h5diff_eps1.h5 b/tools/test/h5diff/testfiles/h5diff_eps1.h5
new file mode 100644
index 0000000..2803a1d
--- /dev/null
+++ b/tools/test/h5diff/testfiles/h5diff_eps1.h5
Binary files differ
diff --git a/tools/test/h5diff/testfiles/h5diff_eps2.h5 b/tools/test/h5diff/testfiles/h5diff_eps2.h5
new file mode 100644
index 0000000..4acf27a
--- /dev/null
+++ b/tools/test/h5diff/testfiles/h5diff_eps2.h5
Binary files differ
diff --git a/tools/test/h5diff/testfiles/diff_strings1.h5 b/tools/test/h5diff/testfiles/h5diff_strings1.h5
index 0f8b380..0f8b380 100644
--- a/tools/test/h5diff/testfiles/diff_strings1.h5
+++ b/tools/test/h5diff/testfiles/h5diff_strings1.h5
Binary files differ
diff --git a/tools/test/h5diff/testfiles/diff_strings2.h5 b/tools/test/h5diff/testfiles/h5diff_strings2.h5
index e8520ae..e8520ae 100644
--- a/tools/test/h5diff/testfiles/diff_strings2.h5
+++ b/tools/test/h5diff/testfiles/h5diff_strings2.h5
Binary files differ
diff --git a/tools/test/h5diff/testh5diff.sh.in b/tools/test/h5diff/testh5diff.sh.in
index 557d2ff..efc2722 100644
--- a/tools/test/h5diff/testh5diff.sh.in
+++ b/tools/test/h5diff/testh5diff.sh.in
@@ -85,6 +85,7 @@ $SRC_H5DIFF_TESTFILES/h5diff_attr2.h5
$SRC_H5DIFF_TESTFILES/h5diff_attr3.h5
$SRC_H5DIFF_TESTFILES/h5diff_dset1.h5
$SRC_H5DIFF_TESTFILES/h5diff_dset2.h5
+$SRC_H5DIFF_TESTFILES/h5diff_dset3.h5
$SRC_H5DIFF_TESTFILES/h5diff_hyper1.h5
$SRC_H5DIFF_TESTFILES/h5diff_hyper2.h5
$SRC_H5DIFF_TESTFILES/h5diff_empty.h5
@@ -119,8 +120,10 @@ $SRC_H5DIFF_TESTFILES/h5diff_attr_v_level2.h5
$SRC_H5DIFF_TESTFILES/h5diff_enum_invalid_values.h5
$SRC_H5DIFF_TESTFILES/non_comparables1.h5
$SRC_H5DIFF_TESTFILES/non_comparables2.h5
-$SRC_H5DIFF_TESTFILES/diff_strings1.h5
-$SRC_H5DIFF_TESTFILES/diff_strings2.h5
+$SRC_H5DIFF_TESTFILES/h5diff_strings1.h5
+$SRC_H5DIFF_TESTFILES/h5diff_strings2.h5
+$SRC_H5DIFF_TESTFILES/h5diff_eps1.h5
+$SRC_H5DIFF_TESTFILES/h5diff_eps2.h5
$SRC_TOOLS_TESTFILES/tvlstr.h5
"
@@ -259,6 +262,7 @@ $SRC_H5DIFF_TESTFILES/h5diff_55.txt
$SRC_H5DIFF_TESTFILES/h5diff_56.txt
$SRC_H5DIFF_TESTFILES/h5diff_57.txt
$SRC_H5DIFF_TESTFILES/h5diff_58.txt
+$SRC_H5DIFF_TESTFILES/h5diff_58_ref.txt
$SRC_H5DIFF_TESTFILES/h5diff_59.txt
$SRC_H5DIFF_TESTFILES/h5diff_500.txt
$SRC_H5DIFF_TESTFILES/h5diff_501.txt
@@ -335,6 +339,8 @@ $SRC_H5DIFF_TESTFILES/h5diff_708.txt
$SRC_H5DIFF_TESTFILES/h5diff_709.txt
$SRC_H5DIFF_TESTFILES/h5diff_710.txt
$SRC_H5DIFF_TESTFILES/h5diff_80.txt
+$SRC_H5DIFF_TESTFILES/h5diff_800.txt
+$SRC_H5DIFF_TESTFILES/h5diff_801.txt
$SRC_H5DIFF_TESTFILES/h5diff_90.txt
$SRC_H5DIFF_TESTFILES/h5diff_8625.txt
$SRC_H5DIFF_TESTFILES/h5diff_8639.txt
@@ -342,6 +348,7 @@ $SRC_H5DIFF_TESTFILES/h5diff_v1.txt
$SRC_H5DIFF_TESTFILES/h5diff_v2.txt
$SRC_H5DIFF_TESTFILES/h5diff_v3.txt
$SRC_H5DIFF_TESTFILES/h5diff_vlstr.txt
+$SRC_H5DIFF_TESTFILES/h5diff_eps.txt
"
#
@@ -479,18 +486,20 @@ TOOLTEST() {
# Run test.
TESTING $H5DIFF $@
(
- #echo "#############################"
- #echo "Expected output for '$H5DIFF $@'"
- #echo "#############################"
- cd $TESTDIR
- eval $RUNCMD $H5DIFF_BIN "$@"
+ #echo "#############################"
+ #echo "Expected output for '$H5DIFF $@'"
+ #echo "#############################"
+ cd $TESTDIR
+ eval $RUNCMD $H5DIFF_BIN "$@"
) >$actual 2>$actual_err
EXIT_CODE=$?
+
# save actual and actual_err in case they are needed later.
cp $actual $actual_sav
STDOUT_FILTER $actual
cp $actual_err $actual_err_sav
STDERR_FILTER $actual_err
+
# don't add exit code check in pmode, as it causes failure. (exit code
# is from mpirun not tool)
# if any problem occurs relate to an exit code, it will be caught in
@@ -524,23 +533,24 @@ TOOLTEST() {
# is done by serial mode.
grep -v "EXIT CODE:" $expect_sorted > $expect_sorted.noexit
mv $expect_sorted.noexit $expect_sorted
- if $CMP $expect_sorted $actual_sorted; then
- echo " PASSED"
- else
- echo "*FAILED*"
- nerrors="`expr $nerrors + 1`"
- if test yes = "$verbose"; then
- echo "====Expected result ($expect_sorted) differs from actual result ($actual_sorted)"
- $DIFF $expect_sorted $actual_sorted |sed 's/^/ /'
- echo "====The actual output ($actual_sav)"
- sed 's/^/ /' < $actual_sav
- echo "====The actual stderr ($actual_err_sav)"
- sed 's/^/ /' < $actual_err_sav
- echo "====End of actual stderr ($actual_err_sav)"
- echo ""
+
+ if $CMP $expect_sorted $actual_sorted; then
+ echo " PASSED"
+ else
+ echo "*FAILED*"
+ nerrors="`expr $nerrors + 1`"
+ if test yes = "$verbose"; then
+ echo "====Expected result ($expect_sorted) differs from actual result ($actual_sorted)"
+ $DIFF $expect_sorted $actual_sorted |sed 's/^/ /'
+ echo "====The actual output ($actual_sav)"
+ sed 's/^/ /' < $actual_sav
+ echo "====The actual stderr ($actual_err_sav)"
+ sed 's/^/ /' < $actual_err_sav
+ echo "====End of actual stderr ($actual_err_sav)"
+ echo ""
+ fi
fi
fi
- fi
# Clean up output file
if test -z "$HDF5_NOCLEANUP"; then
@@ -691,7 +701,8 @@ TOOLTEST h5diff_56.txt -v h5diff_dtypes.h5 h5diff_dtypes.h5 dset6a dset6b
TOOLTEST h5diff_57.txt -v h5diff_dtypes.h5 h5diff_dtypes.h5 dset7a dset7b
# 5.8 (region reference)
-TOOLTEST h5diff_58.txt -v h5diff_dset1.h5 h5diff_dset2.h5 refreg
+TOOLTEST h5diff_58.txt -v2 h5diff_dset1.h5 h5diff_dset2.h5 refreg
+TOOLTEST h5diff_58_ref.txt -v2 h5diff_dset1.h5 h5diff_dset2.h5 /g1/reference2D
# test for both dset and attr with same type but with different size
# ( HDDFV-7942 )
@@ -699,10 +710,10 @@ TOOLTEST h5diff_59.txt -v h5diff_dtypes.h5 h5diff_dtypes.h5 dset11a dset11b
# Strings
# ( HDFFV-10128 )
-TOOLTEST h5diff_60.txt -v diff_strings1.h5 diff_strings2.h5 string1 string1
-TOOLTEST h5diff_61.txt -v diff_strings1.h5 diff_strings2.h5 string2 string2
-TOOLTEST h5diff_62.txt -v diff_strings1.h5 diff_strings2.h5 string3 string3
-TOOLTEST h5diff_63.txt -v diff_strings1.h5 diff_strings2.h5 string4 string4
+TOOLTEST h5diff_60.txt -v h5diff_strings1.h5 h5diff_strings2.h5 string1 string1
+TOOLTEST h5diff_61.txt -v h5diff_strings1.h5 h5diff_strings2.h5 string2 string2
+TOOLTEST h5diff_62.txt -v h5diff_strings1.h5 h5diff_strings2.h5 string3 string3
+TOOLTEST h5diff_63.txt -v h5diff_strings1.h5 h5diff_strings2.h5 string4 string4
# ##############################################################################
# # Error messages
@@ -745,6 +756,9 @@ TOOLTEST h5diff_609.txt -d 200 h5diff_basic1.h5 h5diff_basic2.h5 g1/dset3 g1/dse
# 6.10: number smaller than smallest difference
TOOLTEST h5diff_610.txt -d 1 h5diff_basic1.h5 h5diff_basic2.h5 g1/dset3 g1/dset4
+# eps: number smaller than epsilon
+TOOLTEST h5diff_eps.txt -v3 -d 1e-16 h5diff_eps1.h5 h5diff_eps2.h5
+
# ##############################################################################
# # -p
@@ -1166,6 +1180,12 @@ TOOLTEST h5diff_645.txt -v -p 0.05 --use-system-epsilon h5diff_basic1.h5 h5diff_
TOOLTEST h5diff_646.txt -v --use-system-epsilon -p 0.05 h5diff_basic1.h5 h5diff_basic2.h5 /g1/dset3 /g1/dset4
# ##############################################################################
+# # Test array variances
+# ##############################################################################
+TOOLTEST h5diff_800.txt -v h5diff_dset1.h5 h5diff_dset2.h5 /g1/array /g1/array
+TOOLTEST h5diff_801.txt -v h5diff_dset1.h5 h5diff_dset3.h5 /g1/array /g1/array
+
+# ##############################################################################
# VDS tests
# ##############################################################################
TOOLTEST h5diff_v1.txt -v 1_vds.h5 2_vds.h5
diff --git a/tools/test/h5dump/CMakeLists.txt b/tools/test/h5dump/CMakeLists.txt
index 38f4118..8a83699 100644
--- a/tools/test/h5dump/CMakeLists.txt
+++ b/tools/test/h5dump/CMakeLists.txt
@@ -1,4 +1,4 @@
-cmake_minimum_required (VERSION 3.10)
+cmake_minimum_required (VERSION 3.12)
project (HDF5_TOOLS_TEST_H5DUMP C)
#-----------------------------------------------------------------------------
@@ -35,7 +35,7 @@ endif ()
# --------------------------------------------------------------------
if (HDF5_BUILD_GENERATORS AND NOT ONLY_SHARED_LIBS)
add_executable (h5dumpgentest ${HDF5_TOOLS_TEST_H5DUMP_SOURCE_DIR}/h5dumpgentest.c)
- target_include_directories (h5dumpgentest PRIVATE "${HDF5_SRC_DIR};${HDF5_BINARY_DIR};$<$<BOOL:${HDF5_ENABLE_PARALLEL}>:${MPI_C_INCLUDE_DIRS}>")
+ target_include_directories (h5dumpgentest PRIVATE "${HDF5_SRC_DIR};${HDF5_TEST_SRC_DIR};${HDF5_BINARY_DIR};$<$<BOOL:${HDF5_ENABLE_PARALLEL}>:${MPI_C_INCLUDE_DIRS}>")
TARGET_C_PROPERTIES (h5dumpgentest STATIC)
target_link_libraries (h5dumpgentest PRIVATE ${HDF5_TOOLS_LIB_TARGET} ${HDF5_LIB_TARGET})
set_target_properties (h5dumpgentest PROPERTIES FOLDER generator/tools)
@@ -43,10 +43,12 @@ if (HDF5_BUILD_GENERATORS AND NOT ONLY_SHARED_LIBS)
#add_test (NAME h5dumpgentest COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} $<TARGET_FILE:h5dumpgentest>)
endif ()
-include (CMakeTests.cmake)
+if (HDF5_TEST_TOOLS AND HDF5_TEST_SERIAL)
+ include (CMakeTests.cmake)
-include (CMakeTestsPBITS.cmake)
+ include (CMakeTestsPBITS.cmake)
-include (CMakeTestsVDS.cmake)
+ include (CMakeTestsVDS.cmake)
-include (CMakeTestsXML.cmake)
+ include (CMakeTestsXML.cmake)
+endif ()
diff --git a/tools/test/h5dump/CMakeTests.cmake b/tools/test/h5dump/CMakeTests.cmake
index 8f6fe45..a1219bb 100644
--- a/tools/test/h5dump/CMakeTests.cmake
+++ b/tools/test/h5dump/CMakeTests.cmake
@@ -328,11 +328,8 @@
${PROJECT_SOURCE_DIR}/errfiles/tall-2A.err
${PROJECT_SOURCE_DIR}/errfiles/tall-2A0.err
${PROJECT_SOURCE_DIR}/errfiles/tall-2B.err
- ${PROJECT_SOURCE_DIR}/errfiles/tarray1_big.err
- ${PROJECT_SOURCE_DIR}/errfiles/tattrregR.err
${PROJECT_SOURCE_DIR}/errfiles/tattr-3.err
${PROJECT_SOURCE_DIR}/errfiles/tcomp-3.err
- ${PROJECT_SOURCE_DIR}/errfiles/tdataregR.err
${PROJECT_SOURCE_DIR}/errfiles/tdset-2.err
${PROJECT_SOURCE_DIR}/errfiles/texceedsubblock.err
${PROJECT_SOURCE_DIR}/errfiles/texceedsubcount.err
@@ -396,16 +393,10 @@
##############################################################################
##############################################################################
- if (NOT BUILD_SHARED_LIBS)
- set (tgt_ext "")
- else ()
- set (tgt_ext "-shared")
- endif ()
-
macro (ADD_HELP_TEST testname resultcode)
# If using memchecker add tests without using scripts
if (HDF5_ENABLE_USING_MEMCHECKER)
- add_test (NAME H5DUMP-${testname} COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} $<TARGET_FILE:h5dump${tgt_ext}> ${ARGN})
+ add_test (NAME H5DUMP-${testname} COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} $<TARGET_FILE:h5dump${tgt_file_ext}> ${ARGN})
set_tests_properties (H5DUMP-${testname} PROPERTIES WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles/std")
if (last_test)
set_tests_properties (H5DUMP-${testname} PROPERTIES DEPENDS ${last_test})
@@ -416,7 +407,7 @@
NAME H5DUMP-${testname}
COMMAND "${CMAKE_COMMAND}"
-D "TEST_EMULATOR=${CMAKE_CROSSCOMPILING_EMULATOR}"
- -D "TEST_PROGRAM=$<TARGET_FILE:h5dump${tgt_ext}>"
+ -D "TEST_PROGRAM=$<TARGET_FILE:h5dump${tgt_file_ext}>"
-D "TEST_ARGS:STRING=${ARGN}"
-D "TEST_FOLDER=${PROJECT_BINARY_DIR}/testfiles/std"
-D "TEST_OUTPUT=h5dump-${testname}.out"
@@ -447,7 +438,7 @@
macro (ADD_H5_TEST resultfile resultcode)
# If using memchecker add tests without using scripts
if (HDF5_ENABLE_USING_MEMCHECKER)
- add_test (NAME H5DUMP-${resultfile} COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} $<TARGET_FILE:h5dump${tgt_ext}> ${ARGN})
+ add_test (NAME H5DUMP-${resultfile} COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} $<TARGET_FILE:h5dump${tgt_file_ext}> ${ARGN})
set_tests_properties (H5DUMP-${resultfile} PROPERTIES WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles/std")
if (${resultcode})
set_tests_properties (H5DUMP-${resultfile} PROPERTIES WILL_FAIL "true")
@@ -465,7 +456,7 @@
NAME H5DUMP-${resultfile}
COMMAND "${CMAKE_COMMAND}"
-D "TEST_EMULATOR=${CMAKE_CROSSCOMPILING_EMULATOR}"
- -D "TEST_PROGRAM=$<TARGET_FILE:h5dump${tgt_ext}>"
+ -D "TEST_PROGRAM=$<TARGET_FILE:h5dump${tgt_file_ext}>"
-D "TEST_ARGS:STRING=${ARGN}"
-D "TEST_FOLDER=${PROJECT_BINARY_DIR}/testfiles/std"
-D "TEST_OUTPUT=${resultfile}.out"
@@ -480,7 +471,7 @@
macro (ADD_H5_TEST_N resultfile resultcode)
# If using memchecker add tests without using scripts
if (HDF5_ENABLE_USING_MEMCHECKER)
- add_test (NAME H5DUMP-N-${resultfile} COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} $<TARGET_FILE:h5dump${tgt_ext}> ${ARGN})
+ add_test (NAME H5DUMP-N-${resultfile} COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} $<TARGET_FILE:h5dump${tgt_file_ext}> ${ARGN})
set_tests_properties (H5DUMP-N-${resultfile} PROPERTIES WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles/std")
if (${resultcode})
set_tests_properties (H5DUMP-N-${resultfile} PROPERTIES WILL_FAIL "true")
@@ -498,7 +489,7 @@
NAME H5DUMP-N-${resultfile}
COMMAND "${CMAKE_COMMAND}"
-D "TEST_EMULATOR=${CMAKE_CROSSCOMPILING_EMULATOR}"
- -D "TEST_PROGRAM=$<TARGET_FILE:h5dump${tgt_ext}>"
+ -D "TEST_PROGRAM=$<TARGET_FILE:h5dump${tgt_file_ext}>"
-D "TEST_ARGS:STRING=${ARGN}"
-D "TEST_FOLDER=${PROJECT_BINARY_DIR}/testfiles/std"
-D "TEST_OUTPUT=${resultfile}-N.out"
@@ -513,7 +504,7 @@
macro (ADD_H5_TEST_EXPORT resultfile targetfile resultcode)
# If using memchecker add tests without using scripts
if (HDF5_ENABLE_USING_MEMCHECKER)
- add_test (NAME H5DUMP-${resultfile} COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} $<TARGET_FILE:h5dump${tgt_ext}> ${ARGN} ${resultfile}.txt ${targetfile})
+ add_test (NAME H5DUMP-${resultfile} COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} $<TARGET_FILE:h5dump${tgt_file_ext}> ${ARGN} ${resultfile}.txt ${targetfile})
set_tests_properties (H5DUMP-${resultfile} PROPERTIES WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles/std")
if (${resultcode})
set_tests_properties (H5DUMP-${resultfile} PROPERTIES WILL_FAIL "true")
@@ -531,7 +522,7 @@
NAME H5DUMP-${resultfile}
COMMAND "${CMAKE_COMMAND}"
-D "TEST_EMULATOR=${CMAKE_CROSSCOMPILING_EMULATOR}"
- -D "TEST_PROGRAM=$<TARGET_FILE:h5dump${tgt_ext}>"
+ -D "TEST_PROGRAM=$<TARGET_FILE:h5dump${tgt_file_ext}>"
-D "TEST_ARGS:STRING=${ARGN};${resultfile}.txt;${targetfile}"
-D "TEST_FOLDER=${PROJECT_BINARY_DIR}/testfiles/std"
-D "TEST_OUTPUT=${resultfile}.out"
@@ -540,21 +531,19 @@
-P "${HDF_RESOURCES_EXT_DIR}/runTest.cmake"
)
set_tests_properties (H5DUMP-${resultfile} PROPERTIES DEPENDS "H5DUMP-${resultfile}-clear-objects")
- if(NOT CMAKE_VERSION VERSION_LESS "3.14.0")
- add_test (
- NAME H5DUMP-${resultfile}-output-cmp
- COMMAND ${CMAKE_COMMAND} -E compare_files --ignore-eol ${resultfile}.txt ${resultfile}.exp
- )
- set_tests_properties (H5DUMP-${resultfile}-output-cmp PROPERTIES WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles/std")
- set_tests_properties (H5DUMP-${resultfile}-output-cmp PROPERTIES DEPENDS H5DUMP-${resultfile})
- endif ()
+ add_test (
+ NAME H5DUMP-${resultfile}-output-cmp
+ COMMAND ${CMAKE_COMMAND} -E compare_files ${CMAKE_IGNORE_EOL} ${resultfile}.txt ${resultfile}.exp
+ )
+ set_tests_properties (H5DUMP-${resultfile}-output-cmp PROPERTIES WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles/std")
+ set_tests_properties (H5DUMP-${resultfile}-output-cmp PROPERTIES DEPENDS H5DUMP-${resultfile})
endif ()
endmacro ()
macro (ADD_H5_TEST_EXPORT_DDL resultfile targetfile resultcode ddlfile)
# If using memchecker add tests without using scripts
if (HDF5_ENABLE_USING_MEMCHECKER)
- add_test (NAME H5DUMP-${resultfile} COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} $<TARGET_FILE:h5dump${tgt_ext}> --ddl=${ddlfile}.txt ${ARGN} ${resultfile}.txt ${targetfile})
+ add_test (NAME H5DUMP-${resultfile} COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} $<TARGET_FILE:h5dump${tgt_file_ext}> --ddl=${ddlfile}.txt ${ARGN} ${resultfile}.txt ${targetfile})
set_tests_properties (H5DUMP-${resultfile} PROPERTIES WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles/std")
if (${resultcode})
set_tests_properties (H5DUMP-${resultfile} PROPERTIES WILL_FAIL "true")
@@ -574,7 +563,7 @@
NAME H5DUMP-${resultfile}
COMMAND "${CMAKE_COMMAND}"
-D "TEST_EMULATOR=${CMAKE_CROSSCOMPILING_EMULATOR}"
- -D "TEST_PROGRAM=$<TARGET_FILE:h5dump${tgt_ext}>"
+ -D "TEST_PROGRAM=$<TARGET_FILE:h5dump${tgt_file_ext}>"
-D "TEST_ARGS:STRING=--ddl=${ddlfile}.txt;${ARGN};${resultfile}.txt;${targetfile}"
-D "TEST_FOLDER=${PROJECT_BINARY_DIR}/testfiles/std"
-D "TEST_OUTPUT=${resultfile}.out"
@@ -583,20 +572,18 @@
-P "${HDF_RESOURCES_EXT_DIR}/runTest.cmake"
)
set_tests_properties (H5DUMP-${resultfile} PROPERTIES DEPENDS "H5DUMP-${resultfile}-clear-objects")
- if(NOT CMAKE_VERSION VERSION_LESS "3.14.0")
- add_test (
- NAME H5DUMP-${resultfile}-output-cmp
- COMMAND ${CMAKE_COMMAND} -E compare_files --ignore-eol ${resultfile}.txt ${resultfile}.exp
- )
- set_tests_properties (H5DUMP-${resultfile}-output-cmp PROPERTIES WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles/std")
- set_tests_properties (H5DUMP-${resultfile}-output-cmp PROPERTIES DEPENDS H5DUMP-${resultfile})
- add_test (
- NAME H5DUMP-${resultfile}-output-cmp-ddl
- COMMAND ${CMAKE_COMMAND} -E compare_files --ignore-eol ${ddlfile}.txt ${ddlfile}.exp
- )
- set_tests_properties (H5DUMP-${resultfile}-output-cmp-ddl PROPERTIES WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles/std")
- set_tests_properties (H5DUMP-${resultfile}-output-cmp-ddl PROPERTIES DEPENDS H5DUMP-${resultfile}-output-cmp)
- endif ()
+ add_test (
+ NAME H5DUMP-${resultfile}-output-cmp
+ COMMAND ${CMAKE_COMMAND} -E compare_files ${CMAKE_IGNORE_EOL} ${resultfile}.txt ${resultfile}.exp
+ )
+ set_tests_properties (H5DUMP-${resultfile}-output-cmp PROPERTIES WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles/std")
+ set_tests_properties (H5DUMP-${resultfile}-output-cmp PROPERTIES DEPENDS H5DUMP-${resultfile})
+ add_test (
+ NAME H5DUMP-${resultfile}-output-cmp-ddl
+ COMMAND ${CMAKE_COMMAND} -E compare_files ${CMAKE_IGNORE_EOL} ${ddlfile}.txt ${ddlfile}.exp
+ )
+ set_tests_properties (H5DUMP-${resultfile}-output-cmp-ddl PROPERTIES WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles/std")
+ set_tests_properties (H5DUMP-${resultfile}-output-cmp-ddl PROPERTIES DEPENDS H5DUMP-${resultfile}-output-cmp)
endif ()
endmacro ()
@@ -609,18 +596,16 @@
set_tests_properties (H5DUMP-output-${resultfile}-clear-objects PROPERTIES WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles/std")
add_test (
NAME H5DUMP-output-${resultfile}
- COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} $<TARGET_FILE:h5dump${tgt_ext}> ${ARGN} ${resultfile}.txt ${targetfile}
+ COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} $<TARGET_FILE:h5dump${tgt_file_ext}> ${ARGN} ${resultfile}.txt ${targetfile}
)
set_tests_properties (H5DUMP-output-${resultfile} PROPERTIES WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles/std")
set_tests_properties (H5DUMP-output-${resultfile} PROPERTIES DEPENDS H5DUMP-output-${resultfile}-clear-objects)
- if(NOT CMAKE_VERSION VERSION_LESS "3.14.0")
- add_test (
- NAME H5DUMP-output-cmp-${resultfile}
- COMMAND ${CMAKE_COMMAND} -E compare_files --ignore-eol ${resultfile}.txt ${resultfile}.exp
- )
- set_tests_properties (H5DUMP-output-cmp-${resultfile} PROPERTIES WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles/std")
- set_tests_properties (H5DUMP-output-cmp-${resultfile} PROPERTIES DEPENDS H5DUMP-output-${resultfile})
- endif ()
+ add_test (
+ NAME H5DUMP-output-cmp-${resultfile}
+ COMMAND ${CMAKE_COMMAND} -E compare_files ${CMAKE_IGNORE_EOL} ${resultfile}.txt ${resultfile}.exp
+ )
+ set_tests_properties (H5DUMP-output-cmp-${resultfile} PROPERTIES WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles/std")
+ set_tests_properties (H5DUMP-output-cmp-${resultfile} PROPERTIES DEPENDS H5DUMP-output-${resultfile})
endif ()
endmacro ()
@@ -630,7 +615,7 @@
NAME H5DUMP-${resultfile}
COMMAND "${CMAKE_COMMAND}"
-D "TEST_EMULATOR=${CMAKE_CROSSCOMPILING_EMULATOR}"
- -D "TEST_PROGRAM=$<TARGET_FILE:h5dump${tgt_ext}>"
+ -D "TEST_PROGRAM=$<TARGET_FILE:h5dump${tgt_file_ext}>"
-D "TEST_ARGS:STRING=${ARGN}"
-D "TEST_FOLDER=${PROJECT_BINARY_DIR}/testfiles/std"
-D "TEST_OUTPUT=${resultfile}.out"
@@ -648,7 +633,7 @@
NAME H5DUMP-${resultfile}
COMMAND "${CMAKE_COMMAND}"
-D "TEST_EMULATOR=${CMAKE_CROSSCOMPILING_EMULATOR}"
- -D "TEST_PROGRAM=$<TARGET_FILE:h5dump${tgt_ext}>"
+ -D "TEST_PROGRAM=$<TARGET_FILE:h5dump${tgt_file_ext}>"
-D "TEST_ARGS:STRING=${ARGN}"
-D "TEST_FOLDER=${PROJECT_BINARY_DIR}/testfiles/std"
-D "TEST_OUTPUT=${resultfile}.out"
@@ -665,7 +650,7 @@
NAME H5DUMP-${resultfile}
COMMAND "${CMAKE_COMMAND}"
-D "TEST_EMULATOR=${CMAKE_CROSSCOMPILING_EMULATOR}"
- -D "TEST_PROGRAM=$<TARGET_FILE:h5dump${tgt_ext}>"
+ -D "TEST_PROGRAM=$<TARGET_FILE:h5dump${tgt_file_ext}>"
-D "TEST_ARGS:STRING=${ARGN}"
-D "TEST_FOLDER=${PROJECT_BINARY_DIR}/testfiles/std"
-D "TEST_OUTPUT=${resultfile}.out"
@@ -683,7 +668,7 @@
NAME H5DUMP-${resultfile}
COMMAND "${CMAKE_COMMAND}"
-D "TEST_EMULATOR=${CMAKE_CROSSCOMPILING_EMULATOR}"
- -D "TEST_PROGRAM=$<TARGET_FILE:h5dump${tgt_ext}>"
+ -D "TEST_PROGRAM=$<TARGET_FILE:h5dump${tgt_file_ext}>"
-D "TEST_ARGS:STRING=${ARGN}"
-D "TEST_FOLDER=${PROJECT_BINARY_DIR}/testfiles/std"
-D "TEST_OUTPUT=${resultfile}.out"
@@ -711,7 +696,7 @@
NAME H5DUMP-IMPORT-${resultfile}
COMMAND "${CMAKE_COMMAND}"
-D "TEST_EMULATOR=${CMAKE_CROSSCOMPILING_EMULATOR}"
- -D "TEST_PROGRAM=$<TARGET_FILE:h5dump${tgt_ext}>"
+ -D "TEST_PROGRAM=$<TARGET_FILE:h5dump${tgt_file_ext}>"
-D "TEST_ARGS:STRING=${ARGN};-o;${resultfile}.bin;${testfile}"
-D "TEST_FOLDER=${PROJECT_BINARY_DIR}/testfiles/std"
-D "TEST_OUTPUT=${conffile}.out"
@@ -720,10 +705,10 @@
-P "${HDF_RESOURCES_EXT_DIR}/runTest.cmake"
)
set_tests_properties (H5DUMP-IMPORT-${resultfile} PROPERTIES DEPENDS "H5DUMP-IMPORT-${resultfile}-clear-objects")
- add_test (NAME H5DUMP-IMPORT-h5import-${resultfile} COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} $<TARGET_FILE:h5import> ${resultfile}.bin -c ${conffile}.out -o ${resultfile}.h5)
+ add_test (NAME H5DUMP-IMPORT-h5import-${resultfile} COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} $<TARGET_FILE:h5import${tgt_file_ext}> ${resultfile}.bin -c ${conffile}.out -o ${resultfile}.h5)
set_tests_properties (H5DUMP-IMPORT-h5import-${resultfile} PROPERTIES WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles/std")
set_tests_properties (H5DUMP-IMPORT-h5import-${resultfile} PROPERTIES DEPENDS H5DUMP-IMPORT-${resultfile})
- add_test (NAME H5DUMP-IMPORT-h5diff-${resultfile} COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} $<TARGET_FILE:h5diff> ${testfile} ${resultfile}.h5 /integer /integer)
+ add_test (NAME H5DUMP-IMPORT-h5diff-${resultfile} COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} $<TARGET_FILE:h5diff${tgt_file_ext}> ${testfile} ${resultfile}.h5 /integer /integer)
set_tests_properties (H5DUMP-IMPORT-h5diff-${resultfile} PROPERTIES WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles/std")
set_tests_properties (H5DUMP-IMPORT-h5diff-${resultfile} PROPERTIES DEPENDS H5DUMP-IMPORT-h5import-${resultfile})
endif ()
@@ -735,7 +720,7 @@
NAME H5DUMP_UD-${testname}
COMMAND "${CMAKE_COMMAND}"
-D "TEST_EMULATOR=${CMAKE_CROSSCOMPILING_EMULATOR}"
- -D "TEST_PROGRAM=$<TARGET_FILE:h5dump${tgt_ext}>"
+ -D "TEST_PROGRAM=$<TARGET_FILE:h5dump${tgt_file_ext}>"
-D "TEST_ARGS:STRING=${ARGN}"
-D "TEST_FOLDER=${PROJECT_BINARY_DIR}/testfiles/std"
-D "TEST_OUTPUT=${resultfile}.out"
@@ -890,7 +875,7 @@
# test for files with array data
ADD_H5_TEST (tarray1 0 --enable-error-stack tarray1.h5)
# # added for bug# 2092 - tarray1_big.h5
- ADD_H5ERR_MASK_TEST (tarray1_big 0 "Undefined reference pointer" --enable-error-stack -R tarray1_big.h5)
+ ADD_H5_TEST (tarray1_big 0 --enable-error-stack -R tarray1_big.h5)
ADD_H5_TEST (tarray2 0 --enable-error-stack tarray2.h5)
ADD_H5_TEST (tarray3 0 --enable-error-stack tarray3.h5)
ADD_H5_TEST (tarray4 0 --enable-error-stack tarray4.h5)
@@ -1101,9 +1086,9 @@
# test for dataset region references
ADD_H5_TEST (tdatareg 0 --enable-error-stack tdatareg.h5)
- ADD_H5ERR_MASK_TEST (tdataregR 0 "Undefined reference pointer" --enable-error-stack -R tdatareg.h5)
+ ADD_H5_TEST (tdataregR 0 --enable-error-stack -R tdatareg.h5)
ADD_H5_TEST (tattrreg 0 --enable-error-stack tattrreg.h5)
- ADD_H5ERR_MASK_TEST (tattrregR 0 "Undefined reference pointer" -R --enable-error-stack tattrreg.h5)
+ ADD_H5_TEST (tattrregR 0 -R --enable-error-stack tattrreg.h5)
ADD_H5_EXPORT_TEST (tbinregR tdatareg.h5 0 --enable-error-stack -d /Dataset1 -s 0 -R -y -o)
# tests for group creation order
diff --git a/tools/test/h5dump/CMakeTestsPBITS.cmake b/tools/test/h5dump/CMakeTestsPBITS.cmake
index a6be9ae..1e16875 100644
--- a/tools/test/h5dump/CMakeTestsPBITS.cmake
+++ b/tools/test/h5dump/CMakeTestsPBITS.cmake
@@ -119,16 +119,10 @@
##############################################################################
##############################################################################
- if (NOT BUILD_SHARED_LIBS)
- set (tgt_ext "")
- else ()
- set (tgt_ext "-shared")
- endif ()
-
macro (ADD_H5_PBITS_TEST resultfile resultcode)
# If using memchecker add tests without using scripts
if (HDF5_ENABLE_USING_MEMCHECKER)
- add_test (NAME H5DUMP-${resultfile} COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} $<TARGET_FILE:h5dump${tgt_ext}> ${ARGN})
+ add_test (NAME H5DUMP-${resultfile} COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} $<TARGET_FILE:h5dump${tgt_file_ext}> ${ARGN})
set_tests_properties (H5DUMP-${resultfile} PROPERTIES WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles/pbits")
if (${resultcode})
set_tests_properties (H5DUMP-${resultfile} PROPERTIES WILL_FAIL "true")
@@ -141,7 +135,7 @@
NAME H5DUMP-${resultfile}
COMMAND "${CMAKE_COMMAND}"
-D "TEST_EMULATOR=${CMAKE_CROSSCOMPILING_EMULATOR}"
- -D "TEST_PROGRAM=$<TARGET_FILE:h5dump${tgt_ext}>"
+ -D "TEST_PROGRAM=$<TARGET_FILE:h5dump${tgt_file_ext}>"
-D "TEST_ARGS:STRING=${ARGN}"
-D "TEST_FOLDER=${PROJECT_BINARY_DIR}/testfiles/pbits"
-D "TEST_OUTPUT=${resultfile}.out"
diff --git a/tools/test/h5dump/CMakeTestsVDS.cmake b/tools/test/h5dump/CMakeTestsVDS.cmake
index 036609c..ae7193c 100644
--- a/tools/test/h5dump/CMakeTestsVDS.cmake
+++ b/tools/test/h5dump/CMakeTestsVDS.cmake
@@ -115,16 +115,10 @@
##############################################################################
##############################################################################
- if (NOT BUILD_SHARED_LIBS)
- set (tgt_ext "")
- else ()
- set (tgt_ext "-shared")
- endif ()
-
macro (ADD_H5_VDS_TEST resultfile resultcode)
# If using memchecker add tests without using scripts
if (HDF5_ENABLE_USING_MEMCHECKER)
- add_test (NAME H5DUMP-${resultfile} COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} $<TARGET_FILE:h5dump${tgt_ext}> ${ARGN})
+ add_test (NAME H5DUMP-${resultfile} COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} $<TARGET_FILE:h5dump${tgt_file_ext}> ${ARGN})
set_tests_properties (H5DUMP-${resultfile} PROPERTIES WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles/vds")
if (${resultcode})
set_tests_properties (H5DUMP-${resultfile} PROPERTIES WILL_FAIL "true")
@@ -137,7 +131,7 @@
NAME H5DUMP-${resultfile}
COMMAND "${CMAKE_COMMAND}"
-D "TEST_EMULATOR=${CMAKE_CROSSCOMPILING_EMULATOR}"
- -D "TEST_PROGRAM=$<TARGET_FILE:h5dump${tgt_ext}>"
+ -D "TEST_PROGRAM=$<TARGET_FILE:h5dump${tgt_file_ext}>"
-D "TEST_ARGS:STRING=${ARGN}"
-D "TEST_FOLDER=${PROJECT_BINARY_DIR}/testfiles/vds"
-D "TEST_OUTPUT=${resultfile}.out"
@@ -151,7 +145,7 @@
macro (ADD_H5_VDS_PREFIX_TEST resultfile resultcode)
# If using memchecker add tests without using scripts
if (HDF5_ENABLE_USING_MEMCHECKER)
- add_test (NAME H5DUMP_PREFIX-${resultfile} COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} $<TARGET_FILE:h5dump${tgt_ext}> ${ARGN})
+ add_test (NAME H5DUMP_PREFIX-${resultfile} COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} $<TARGET_FILE:h5dump${tgt_file_ext}> ${ARGN})
set_tests_properties (H5DUMP_PREFIX-${resultfile} PROPERTIES
ENVIRONMENT "HDF5_VDS_PREFIX=${PROJECT_BINARY_DIR}/testfiles/vds/"
WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles/vds/prefix"
@@ -167,7 +161,7 @@
NAME H5DUMP_PREFIX-${resultfile}
COMMAND "${CMAKE_COMMAND}"
-D "TEST_EMULATOR=${CMAKE_CROSSCOMPILING_EMULATOR}"
- -D "TEST_PROGRAM=$<TARGET_FILE:h5dump${tgt_ext}>"
+ -D "TEST_PROGRAM=$<TARGET_FILE:h5dump${tgt_file_ext}>"
-D "TEST_ARGS:STRING=${ARGN}"
-D "TEST_FOLDER=${PROJECT_BINARY_DIR}/testfiles/vds/prefix"
-D "TEST_OUTPUT=${resultfile}.out"
@@ -183,7 +177,7 @@
macro (ADD_H5_VDS_LAYOUT resultfile resultcode)
# If using memchecker add tests without using scripts
if (HDF5_ENABLE_USING_MEMCHECKER)
- add_test (NAME H5DUMP-${resultfile} COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} $<TARGET_FILE:h5dump${tgt_ext}> -p ${ARGN})
+ add_test (NAME H5DUMP-${resultfile} COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} $<TARGET_FILE:h5dump${tgt_file_ext}> -p ${ARGN})
set_tests_properties (H5DUMP-${resultfile} PROPERTIES WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles/vds")
if (${resultcode})
set_tests_properties (H5DUMP-${resultfile} PROPERTIES WILL_FAIL "true")
@@ -196,7 +190,7 @@
NAME H5DUMP-${resultfile}
COMMAND "${CMAKE_COMMAND}"
-D "TEST_EMULATOR=${CMAKE_CROSSCOMPILING_EMULATOR}"
- -D "TEST_PROGRAM=$<TARGET_FILE:h5dump${tgt_ext}>"
+ -D "TEST_PROGRAM=$<TARGET_FILE:h5dump${tgt_file_ext}>"
-D "TEST_ARGS:STRING=-p;${ARGN}"
-D "TEST_FOLDER=${PROJECT_BINARY_DIR}/testfiles/vds"
-D "TEST_OUTPUT=${resultfile}.out"
diff --git a/tools/test/h5dump/CMakeTestsXML.cmake b/tools/test/h5dump/CMakeTestsXML.cmake
index 6d73cb1..985d940 100644
--- a/tools/test/h5dump/CMakeTestsXML.cmake
+++ b/tools/test/h5dump/CMakeTestsXML.cmake
@@ -160,12 +160,6 @@
##############################################################################
##############################################################################
- if (NOT BUILD_SHARED_LIBS)
- set (tgt_ext "")
- else ()
- set (tgt_ext "-shared")
- endif ()
-
macro (ADD_XML_SKIP_H5_TEST skipresultfile skipresultcode testtype)
if ("${testtype}" STREQUAL "SKIP")
if (NOT HDF5_ENABLE_USING_MEMCHECKER)
@@ -182,7 +176,7 @@
macro (ADD_XML_H5_TEST resultfile resultcode)
if (HDF5_ENABLE_USING_MEMCHECKER)
- add_test (NAME H5DUMP_XML-${resultfile} COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} $<TARGET_FILE:h5dump${tgt_ext}> --xml ${ARGN})
+ add_test (NAME H5DUMP_XML-${resultfile} COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} $<TARGET_FILE:h5dump${tgt_file_ext}> --xml ${ARGN})
set_tests_properties (H5DUMP_XML-${resultfile} PROPERTIES WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles/xml")
if (${resultcode})
set_tests_properties (H5DUMP_XML-${resultfile} PROPERTIES WILL_FAIL "true")
@@ -195,7 +189,7 @@
NAME H5DUMP_XML-${resultfile}
COMMAND "${CMAKE_COMMAND}"
-D "TEST_EMULATOR=${CMAKE_CROSSCOMPILING_EMULATOR}"
- -D "TEST_PROGRAM=$<TARGET_FILE:h5dump${tgt_ext}>"
+ -D "TEST_PROGRAM=$<TARGET_FILE:h5dump${tgt_file_ext}>"
-D "TEST_ARGS:STRING=--xml;${ARGN}"
-D "TEST_FOLDER=${PROJECT_BINARY_DIR}/testfiles/xml"
-D "TEST_OUTPUT=${resultfile}.out"
diff --git a/tools/test/h5dump/CMakeVFDTests.cmake b/tools/test/h5dump/CMakeVFDTests.cmake
index 0a345ef..337cfe2 100644
--- a/tools/test/h5dump/CMakeVFDTests.cmake
+++ b/tools/test/h5dump/CMakeVFDTests.cmake
@@ -53,19 +53,13 @@ add_custom_target(HDF5_VFD_H5DUMP_files ALL COMMENT "Copying files needed by HDF
##############################################################################
##############################################################################
-if (NOT BUILD_SHARED_LIBS)
- set (tgt_ext "")
-else ()
- set (tgt_ext "-shared")
-endif ()
-
macro (ADD_VFD_H5DUMP_TEST vfdname resultfile resultcode)
if (NOT HDF5_ENABLE_USING_MEMCHECKER)
add_test (
NAME H5DUMP_VFD-${vfdname}-${resultfile}-h5dump
COMMAND "${CMAKE_COMMAND}"
-D "TEST_EMULATOR=${CMAKE_CROSSCOMPILING_EMULATOR}"
- -D "TEST_PROGRAM=$<TARGET_FILE:h5dump${tgt_ext}>"
+ -D "TEST_PROGRAM=$<TARGET_FILE:h5dump${tgt_file_ext}>"
-D "TEST_ARGS:STRING=${ARGN}"
-D "TEST_VFD:STRING=${vfdname}"
-D "TEST_EXPECT=${resultcode}"
diff --git a/tools/test/h5dump/Makefile.am b/tools/test/h5dump/Makefile.am
index a7a2bcb..21560fb 100644
--- a/tools/test/h5dump/Makefile.am
+++ b/tools/test/h5dump/Makefile.am
@@ -19,7 +19,7 @@
include $(top_srcdir)/config/commence.am
# Include files in /src directory and /tools/lib directory
-AM_CPPFLAGS+=-I$(top_srcdir)/src -I$(top_srcdir)/tools/lib
+AM_CPPFLAGS+=-I$(top_srcdir)/src -I$(top_srcdir)/test -I$(top_srcdir)/tools/lib
# Test programs and scripts
TEST_PROG=h5dumpgentest
diff --git a/tools/test/h5dump/Makefile.in b/tools/test/h5dump/Makefile.in
index cf523b0..0f4868d 100644
--- a/tools/test/h5dump/Makefile.in
+++ b/tools/test/h5dump/Makefile.in
@@ -435,15 +435,15 @@ AMTAR = @AMTAR@
# H5_CFLAGS holds flags that should be used when building hdf5,
# but which should not be exported to h5cc for building other programs.
-# AM_CFLAGS is an automake construct which should be used by Makefiles
+# AM_CFLAGS is an automake construct which should be used by Makefiles
# instead of CFLAGS, as CFLAGS is reserved solely for the user to define.
# This applies to FCFLAGS, CXXFLAGS, CPPFLAGS, and LDFLAGS as well.
-AM_CFLAGS = @AM_CFLAGS@ @H5_CFLAGS@
+AM_CFLAGS = @AM_CFLAGS@ @H5_CFLAGS@ @H5_ECFLAGS@
# Include files in /src directory and /tools/lib directory
AM_CPPFLAGS = @AM_CPPFLAGS@ @H5_CPPFLAGS@ -I$(top_srcdir)/src \
- -I$(top_srcdir)/tools/lib
-AM_CXXFLAGS = @AM_CXXFLAGS@ @H5_CXXFLAGS@
+ -I$(top_srcdir)/test -I$(top_srcdir)/tools/lib
+AM_CXXFLAGS = @AM_CXXFLAGS@ @H5_CXXFLAGS@ @H5_ECXXFLAGS@
AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
AM_FCFLAGS = @AM_FCFLAGS@ @H5_FCFLAGS@
AM_JAVACFLAGS = @AM_JAVACFLAGS@
@@ -463,6 +463,7 @@ CC = @CC@
CCDEPMODE = @CCDEPMODE@
CC_VERSION = @CC_VERSION@
CFLAGS = @CFLAGS@
+CLANG_SANITIZE_CHECKS = @CLANG_SANITIZE_CHECKS@
CODESTACK = @CODESTACK@
CONFIG_DATE = @CONFIG_DATE@
CONFIG_MODE = @CONFIG_MODE@
@@ -479,6 +480,7 @@ DEFAULT_API_VERSION = @DEFAULT_API_VERSION@
DEFS = @DEFS@
DEPDIR = @DEPDIR@
DEPRECATED_SYMBOLS = @DEPRECATED_SYMBOLS@
+DESIRED_FILE_LOCKING = @DESIRED_FILE_LOCKING@
DEV_WARNINGS = @DEV_WARNINGS@
DIRECT_VFD = @DIRECT_VFD@
DLLTOOL = @DLLTOOL@
@@ -515,8 +517,11 @@ H5_CFLAGS = @H5_CFLAGS@
H5_CLASSPATH = @H5_CLASSPATH@
H5_CPPFLAGS = @H5_CPPFLAGS@
H5_CXXFLAGS = @H5_CXXFLAGS@
+H5_ECFLAGS = @H5_ECFLAGS@
+H5_ECXXFLAGS = @H5_ECXXFLAGS@
H5_FCFLAGS = @H5_FCFLAGS@
H5_FORTRAN_SHARED = @H5_FORTRAN_SHARED@
+H5_IS_DARWIN = @H5_IS_DARWIN@
H5_JAVACFLAGS = @H5_JAVACFLAGS@
H5_JAVAFLAGS = @H5_JAVAFLAGS@
H5_JNIFLAGS = @H5_JNIFLAGS@
@@ -539,6 +544,7 @@ HL = @HL@
HL_FOR = @HL_FOR@
HSIZE_T = @HSIZE_T@
HSSIZE_T = @HSSIZE_T@
+IGNORE_DISABLED_FILE_LOCKS = @IGNORE_DISABLED_FILE_LOCKS@
INSTALL = @INSTALL@
INSTALL_DATA = @INSTALL_DATA@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
@@ -575,6 +581,7 @@ MAINT = @MAINT@
MAKEINFO = @MAKEINFO@
MANIFEST_TOOL = @MANIFEST_TOOL@
MEMORYALLOCSANITYCHECK = @MEMORYALLOCSANITYCHECK@
+MIRROR_VFD = @MIRROR_VFD@
MKDIR_P = @MKDIR_P@
MPE = @MPE@
NM = @NM@
@@ -634,6 +641,7 @@ TIME = @TIME@
TR = @TR@
TRACE_API = @TRACE_API@
UNAME_INFO = @UNAME_INFO@
+USE_FILE_LOCKING = @USE_FILE_LOCKING@
USE_FILTER_DEFLATE = @USE_FILTER_DEFLATE@
USE_FILTER_SZIP = @USE_FILTER_SZIP@
USINGMEMCHECKER = @USINGMEMCHECKER@
@@ -669,6 +677,7 @@ docdir = $(exec_prefix)/doc
dvidir = @dvidir@
enable_shared = @enable_shared@
enable_static = @enable_static@
+examplesdir = @examplesdir@
exec_prefix = @exec_prefix@
fortran_linux_linker_option = @fortran_linux_linker_option@
host = @host@
@@ -725,15 +734,15 @@ LIBH5_HL = $(top_builddir)/hl/src/libhdf5_hl.la
LIBH5F_HL = $(top_builddir)/hl/fortran/src/libhdf5hl_fortran.la
LIBH5CPP_HL = $(top_builddir)/hl/c++/src/libhdf5_hl_cpp.la
-# Note that in svn revision 19400 the '/' after DESTDIR in H5* variables below
-# has been removed. According to the official description of DESTDIR by Gnu at
-# http://www.gnu.org/prep/standards/html_node/DESTDIR.html, DESTDIR is
-# prepended to the normal and complete install path that it precedes for the
-# purpose of installing in a temporary directory which is useful for building
-# rpms and other packages. The '/' after ${DESTDIR} will be followed by another
-# '/' at the beginning of the normal install path. When DESTDIR is empty the
-# path then begins with '//', which is incorrect and causes problems at least for
-# Cygwin.
+# Note that in svn revision 19400 the '/' after DESTDIR in H5* variables below
+# has been removed. According to the official description of DESTDIR by Gnu at
+# http://www.gnu.org/prep/standards/html_node/DESTDIR.html, DESTDIR is
+# prepended to the normal and complete install path that it precedes for the
+# purpose of installing in a temporary directory which is useful for building
+# rpms and other packages. The '/' after ${DESTDIR} will be followed by another
+# '/' at the beginning of the normal install path. When DESTDIR is empty the
+# path then begins with '//', which is incorrect and causes problems at least for
+# Cygwin.
# Scripts used to build examples
# If only shared libraries have been installed, have h5cc build examples with
@@ -782,7 +791,7 @@ LIB = $(lib_LIBRARIES) $(lib_LTLIBRARIES) $(noinst_LIBRARIES) \
PROGS = $(bin_PROGRAMS) $(bin_SCRIPTS) $(noinst_PROGRAMS) $(noinst_SCRIPTS) \
$(EXTRA_PROG)
-chk_TESTS = $(check_PROGRAMS) $(check_SCRIPTS) $(EXTRA_TEST)
+chk_TESTS = $(check_PROGRAMS) $(check_SCRIPTS) $(EXTRA_TEST)
TEST_EXTENSIONS = .sh
SH_LOG_COMPILER = $(SHELL)
AM_SH_LOG_FLAGS =
@@ -1378,28 +1387,37 @@ $(TEST_PROG_CHKEXE) $(TEST_PROG_PARA_CHKEXE) dummy.chkexe_:
echo "============================" > $${log}; \
fi; \
if test "X$(FORTRAN_API)" = "Xyes"; then \
- echo "Fortran API: Testing $(HDF5_DRIVER) $${tname} $(TEST_FLAGS)"; \
+ echo "Fortran API: Testing $${tname} $(TEST_FLAGS)"; \
if test -n "$(REALTIMEOUTPUT)"; then \
- echo "Fortran API: $(HDF5_DRIVER) $${tname} $(TEST_FLAGS) Test Log" | tee -a $${log}; \
+ echo "Fortran API: Test log for $${tname} $(TEST_FLAGS)" | tee -a $${log}; \
else \
- echo "Fortran API: $(HDF5_DRIVER) $${tname} $(TEST_FLAGS) Test Log" >> $${log}; \
+ echo "Fortran API: Test log for $${tname} $(TEST_FLAGS)" >> $${log}; \
fi; \
elif test "X$(CXX_API)" = "Xyes"; then \
- echo "C++ API: Testing $(HDF5_DRIVER) $${tname} $(TEST_FLAGS)"; \
+ echo "C++ API: Testing $${tname} $(TEST_FLAGS)"; \
if test -n "$(REALTIMEOUTPUT)"; then \
- echo "C++ API: $(HDF5_DRIVER) $${tname} $(TEST_FLAGS) Test Log" | tee -a $${log};\
+ echo "C++ API: Test log for $${tname} $(TEST_FLAGS)" | tee -a $${log};\
else \
- echo "C++ API: $(HDF5_DRIVER) $${tname} $(TEST_FLAGS) Test Log" >> $${log};\
+ echo "C++ API: Test log for $${tname} $(TEST_FLAGS)" >> $${log};\
fi; \
else \
- echo "Testing $(HDF5_DRIVER) $${tname} $(TEST_FLAGS)"; \
+ echo "Testing: $${tname} $(TEST_FLAGS)"; \
if test -n "$(REALTIMEOUTPUT)"; then \
- echo "$(HDF5_DRIVER) $${tname} $(TEST_FLAGS) Test Log" | tee -a $${log}; \
+ echo "Test log for $${tname} $(TEST_FLAGS)" | tee -a $${log}; \
else \
- echo "$(HDF5_DRIVER) $${tname} $(TEST_FLAGS) Test Log" >> $${log}; \
+ echo "Test log for $${tname} $(TEST_FLAGS)" >> $${log}; \
fi; \
fi; \
if test -n "$(REALTIMEOUTPUT)"; then \
+ if test -n "$(HDF5_DRIVER)"; then \
+ echo "Virtual file driver (VFD): $(HDF5_DRIVER)" | tee -a $${log}; \
+ fi; \
+ else \
+ if test -n "$(HDF5_DRIVER)"; then \
+ echo "Virtual file driver (VFD): $(HDF5_DRIVER)" >> $${log}; \
+ fi; \
+ fi; \
+ if test -n "$(REALTIMEOUTPUT)"; then \
echo "============================" | tee -a $${log}; \
else \
echo "============================" >> $${log}; \
diff --git a/tools/test/h5dump/dynlib_dump.c b/tools/test/h5dump/dynlib_dump.c
index 571452e..661a6dc 100644
--- a/tools/test/h5dump/dynlib_dump.c
+++ b/tools/test/h5dump/dynlib_dump.c
@@ -69,7 +69,7 @@ H5Z_filter_dynlibud(unsigned int flags, size_t cd_nelmts,
/* Subtract the original value with MULTIPLIER */
while(buf_left > 0) {
char temp = *int_ptr;
- *int_ptr = temp - MULTIPLIER;
+ *int_ptr = (int8_t)(temp - MULTIPLIER);
int_ptr++;
buf_left -= sizeof(*int_ptr);
} /* end while */
@@ -78,7 +78,7 @@ H5Z_filter_dynlibud(unsigned int flags, size_t cd_nelmts,
/* Add the original value with MULTIPLIER */
while(buf_left > 0) {
char temp = *int_ptr;
- *int_ptr = temp + MULTIPLIER;
+ *int_ptr = (int8_t)(temp + MULTIPLIER);
int_ptr++;
buf_left -= sizeof(*int_ptr);
} /* end while */
diff --git a/tools/test/h5dump/errfiles/tall-1.err b/tools/test/h5dump/errfiles/tall-1.err
index f4c2d91..8503b9e 100644
--- a/tools/test/h5dump/errfiles/tall-1.err
+++ b/tools/test/h5dump/errfiles/tall-1.err
@@ -24,5 +24,5 @@ HDF5-DIAG: Error detected in HDF5 (version (number)) thread (IDs):
major: Links
minor: Unable to open file
#008: (file name) line (number) in H5F_prefix_open_file(): unable to open file, file name = 'somefile', temp_file_name = 'somefile'
- major: File accessibilty
+ major: File accessibility
minor: Unable to open file
diff --git a/tools/test/h5dump/errfiles/tall-2A.err b/tools/test/h5dump/errfiles/tall-2A.err
index f4c2d91..8503b9e 100644
--- a/tools/test/h5dump/errfiles/tall-2A.err
+++ b/tools/test/h5dump/errfiles/tall-2A.err
@@ -24,5 +24,5 @@ HDF5-DIAG: Error detected in HDF5 (version (number)) thread (IDs):
major: Links
minor: Unable to open file
#008: (file name) line (number) in H5F_prefix_open_file(): unable to open file, file name = 'somefile', temp_file_name = 'somefile'
- major: File accessibilty
+ major: File accessibility
minor: Unable to open file
diff --git a/tools/test/h5dump/errfiles/tall-2A0.err b/tools/test/h5dump/errfiles/tall-2A0.err
index f4c2d91..8503b9e 100644
--- a/tools/test/h5dump/errfiles/tall-2A0.err
+++ b/tools/test/h5dump/errfiles/tall-2A0.err
@@ -24,5 +24,5 @@ HDF5-DIAG: Error detected in HDF5 (version (number)) thread (IDs):
major: Links
minor: Unable to open file
#008: (file name) line (number) in H5F_prefix_open_file(): unable to open file, file name = 'somefile', temp_file_name = 'somefile'
- major: File accessibilty
+ major: File accessibility
minor: Unable to open file
diff --git a/tools/test/h5dump/errfiles/tall-2B.err b/tools/test/h5dump/errfiles/tall-2B.err
index f4c2d91..8503b9e 100644
--- a/tools/test/h5dump/errfiles/tall-2B.err
+++ b/tools/test/h5dump/errfiles/tall-2B.err
@@ -24,5 +24,5 @@ HDF5-DIAG: Error detected in HDF5 (version (number)) thread (IDs):
major: Links
minor: Unable to open file
#008: (file name) line (number) in H5F_prefix_open_file(): unable to open file, file name = 'somefile', temp_file_name = 'somefile'
- major: File accessibilty
+ major: File accessibility
minor: Unable to open file
diff --git a/tools/test/h5dump/errfiles/tarray1_big.err b/tools/test/h5dump/errfiles/tarray1_big.err
deleted file mode 100644
index be77711..0000000
--- a/tools/test/h5dump/errfiles/tarray1_big.err
+++ /dev/null
@@ -1,31 +0,0 @@
-HDF5-DIAG: Error detected in HDF5 (version (number)) thread (IDs):
- #000: (file name) line (number) in H5Rdereference2(): unable to dereference object
- major: References
- minor: Can't open object
- #001: (file name) line (number) in H5R__dereference(): Undefined reference pointer
- major: Invalid arguments to routine
- minor: Bad value
-HDF5-DIAG: Error detected in HDF5 (version (number)) thread (IDs):
- #000: (file name) line (number) in H5Rdereference2(): unable to dereference object
- major: References
- minor: Can't open object
- #001: (file name) line (number) in H5R__dereference(): Undefined reference pointer
- major: Invalid arguments to routine
- minor: Bad value
-HDF5-DIAG: Error detected in HDF5 (version (number)) thread (IDs):
- #000: (file name) line (number) in H5Rdereference2(): unable to dereference object
- major: References
- minor: Can't open object
- #001: (file name) line (number) in H5R__dereference(): Undefined reference pointer
- major: Invalid arguments to routine
- minor: Bad value
-H5tools-DIAG: Error detected in HDF5:tools (version (number)) thread (IDs):
- #000: (file name) line (number) in h5tools_dump_simple_data(): H5Rdereference failed
- major: Failure in tools library
- minor: error in function
- #001: (file name) line (number) in h5tools_dump_simple_data(): H5Rdereference failed
- major: Failure in tools library
- minor: error in function
- #002: (file name) line (number) in h5tools_dump_simple_data(): H5Rdereference failed
- major: Failure in tools library
- minor: error in function
diff --git a/tools/test/h5dump/errfiles/tattr-3.err b/tools/test/h5dump/errfiles/tattr-3.err
index 3a34314..a6aae76 100644
--- a/tools/test/h5dump/errfiles/tattr-3.err
+++ b/tools/test/h5dump/errfiles/tattr-3.err
@@ -1,5 +1,5 @@
HDF5-DIAG: Error detected in HDF5 (version (number)) thread (IDs):
- #000: (file name) line (number) in H5Aopen(): unable to load attribute info from object header for attribute: 'attr'
+ #000: (file name) line (number) in H5Aopen(): unable to open attribute: 'attr'
major: Attribute
minor: Can't open object
#001: (file name) line (number) in H5A__open(): unable to load attribute info from object header for attribute: 'attr'
diff --git a/tools/test/h5dump/errfiles/tattrregR.err b/tools/test/h5dump/errfiles/tattrregR.err
deleted file mode 100644
index d84d5ec..0000000
--- a/tools/test/h5dump/errfiles/tattrregR.err
+++ /dev/null
@@ -1,21 +0,0 @@
-HDF5-DIAG: Error detected in HDF5 (version (number)) thread (IDs):
- #000: (file name) line (number) in H5Rdereference2(): unable to dereference object
- major: References
- minor: Can't open object
- #001: (file name) line (number) in H5R__dereference(): Undefined reference pointer
- major: Invalid arguments to routine
- minor: Bad value
-HDF5-DIAG: Error detected in HDF5 (version (number)) thread (IDs):
- #000: (file name) line (number) in H5Rdereference2(): unable to dereference object
- major: References
- minor: Can't open object
- #001: (file name) line (number) in H5R__dereference(): Undefined reference pointer
- major: Invalid arguments to routine
- minor: Bad value
-H5tools-DIAG: Error detected in HDF5:tools (version (number)) thread (IDs):
- #000: (file name) line (number) in h5tools_dump_simple_data(): H5Rdereference failed
- major: Failure in tools library
- minor: error in function
- #001: (file name) line (number) in h5tools_dump_simple_data(): H5Rdereference failed
- major: Failure in tools library
- minor: error in function
diff --git a/tools/test/h5dump/errfiles/tdataregR.err b/tools/test/h5dump/errfiles/tdataregR.err
deleted file mode 100644
index d84d5ec..0000000
--- a/tools/test/h5dump/errfiles/tdataregR.err
+++ /dev/null
@@ -1,21 +0,0 @@
-HDF5-DIAG: Error detected in HDF5 (version (number)) thread (IDs):
- #000: (file name) line (number) in H5Rdereference2(): unable to dereference object
- major: References
- minor: Can't open object
- #001: (file name) line (number) in H5R__dereference(): Undefined reference pointer
- major: Invalid arguments to routine
- minor: Bad value
-HDF5-DIAG: Error detected in HDF5 (version (number)) thread (IDs):
- #000: (file name) line (number) in H5Rdereference2(): unable to dereference object
- major: References
- minor: Can't open object
- #001: (file name) line (number) in H5R__dereference(): Undefined reference pointer
- major: Invalid arguments to routine
- minor: Bad value
-H5tools-DIAG: Error detected in HDF5:tools (version (number)) thread (IDs):
- #000: (file name) line (number) in h5tools_dump_simple_data(): H5Rdereference failed
- major: Failure in tools library
- minor: error in function
- #001: (file name) line (number) in h5tools_dump_simple_data(): H5Rdereference failed
- major: Failure in tools library
- minor: error in function
diff --git a/tools/test/h5dump/errfiles/textlink.err b/tools/test/h5dump/errfiles/textlink.err
index 4a5f545..96a7475 100644
--- a/tools/test/h5dump/errfiles/textlink.err
+++ b/tools/test/h5dump/errfiles/textlink.err
@@ -24,7 +24,7 @@ HDF5-DIAG: Error detected in HDF5 (version (number)) thread (IDs):
major: Links
minor: Unable to open file
#008: (file name) line (number) in H5F_prefix_open_file(): unable to open file, file name = 'filename', temp_file_name = 'filename'
- major: File accessibilty
+ major: File accessibility
minor: Unable to open file
HDF5-DIAG: Error detected in HDF5 (version (number)) thread (IDs):
#000: (file name) line (number) in H5Oopen(): unable to open object
@@ -52,5 +52,5 @@ HDF5-DIAG: Error detected in HDF5 (version (number)) thread (IDs):
major: Links
minor: Unable to open file
#008: (file name) line (number) in H5F_prefix_open_file(): unable to open file, file name = 'anotherfile', temp_file_name = 'anotherfile'
- major: File accessibilty
+ major: File accessibility
minor: Unable to open file
diff --git a/tools/test/h5dump/errfiles/torderlinks1.err b/tools/test/h5dump/errfiles/torderlinks1.err
index 648906b..e151d78 100644
--- a/tools/test/h5dump/errfiles/torderlinks1.err
+++ b/tools/test/h5dump/errfiles/torderlinks1.err
@@ -24,5 +24,5 @@ HDF5-DIAG: Error detected in HDF5 (version (number)) thread (IDs):
major: Links
minor: Unable to open file
#008: (file name) line (number) in H5F_prefix_open_file(): unable to open file, file name = 'fname', temp_file_name = 'fname'
- major: File accessibilty
+ major: File accessibility
minor: Unable to open file
diff --git a/tools/test/h5dump/errfiles/torderlinks2.err b/tools/test/h5dump/errfiles/torderlinks2.err
index 648906b..e151d78 100644
--- a/tools/test/h5dump/errfiles/torderlinks2.err
+++ b/tools/test/h5dump/errfiles/torderlinks2.err
@@ -24,5 +24,5 @@ HDF5-DIAG: Error detected in HDF5 (version (number)) thread (IDs):
major: Links
minor: Unable to open file
#008: (file name) line (number) in H5F_prefix_open_file(): unable to open file, file name = 'fname', temp_file_name = 'fname'
- major: File accessibilty
+ major: File accessibility
minor: Unable to open file
diff --git a/tools/test/h5dump/h5dump_plugin.sh.in b/tools/test/h5dump/h5dump_plugin.sh.in
index 6a00a16..d940ab3 100644
--- a/tools/test/h5dump/h5dump_plugin.sh.in
+++ b/tools/test/h5dump/h5dump_plugin.sh.in
@@ -181,8 +181,8 @@ TOOLTEST() {
# Run test.
TESTING $H5DUMP $@
(
- cd $TESTDIR
- $ENVCMD $RUNSERIAL $H5DUMP_BIN "$@"
+ cd $TESTDIR
+ $ENVCMD $RUNSERIAL $H5DUMP_BIN "$@"
) >$actual 2>$actual_err
# save actual and actual_err in case they are needed later.
@@ -192,24 +192,24 @@ TOOLTEST() {
STDERR_FILTER $actual_err
cat $actual_err >> $actual
- if [ ! -f $expect ]; then
- # Create the expect file if it doesn't yet exist.
- echo " CREATED"
- cp $actual $expect
- echo " Expected result (*.ddl) missing"
- nerrors="`expr $nerrors + 1`"
+ if [ ! -f $expect ]; then
+ # 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"
+ echo " PASSED"
else
- echo "*FAILED*"
- echo " Expected result (*.ddl) differs from actual result (*.out)"
- nerrors="`expr $nerrors + 1`"
- test yes = "$verbose" && $DIFF $caseless $expect $actual |sed 's/^/ /'
+ echo "*FAILED*"
+ echo " Expected result (*.ddl) differs from actual result (*.out)"
+ nerrors="`expr $nerrors + 1`"
+ test yes = "$verbose" && $DIFF $caseless $expect $actual |sed 's/^/ /'
fi
# Clean up output file
if test -z "$HDF5_NOCLEANUP"; then
- rm -f $actual $actual_err $actual_sav $actual_err_sav $actual_ext
+ rm -f $actual $actual_err $actual_sav $actual_err_sav $actual_ext
fi
}
diff --git a/tools/test/h5dump/h5dumpgentest.c b/tools/test/h5dump/h5dumpgentest.c
index fb3ba65..78aa668 100644
--- a/tools/test/h5dump/h5dumpgentest.c
+++ b/tools/test/h5dump/h5dumpgentest.c
@@ -22,7 +22,7 @@
*/
#include "hdf5.h"
-#include "H5private.h"
+#include "h5test.h"
#include "h5tools.h"
#define FILE1 "tgroup.h5"
@@ -462,10 +462,23 @@ gent_dataset(void)
{
hid_t fid, dataset, space;
hsize_t dims[2];
- int dset1[10][20];
- double dset2[30][20];
+ int **dset1 = NULL;
+ int *dset1_data = NULL;
+ double **dset2 = NULL;
+ double *dset2_data = NULL;
int i, j;
+ /* Set up data arrays */
+ dset1_data = (int *)HDcalloc(10 * 20, sizeof(int));
+ dset1 = (int **)HDcalloc(10, sizeof(dset1_data));
+ for (i = 0; i < 10; i++)
+ dset1[i] = dset1_data + (i * 20);
+
+ dset2_data = (double *)HDcalloc(30 * 20, sizeof(double));
+ dset2 = (double **)HDcalloc(30, sizeof(dset2_data));
+ for (i = 0; i < 30; i++)
+ dset2[i] = dset2_data + (i * 20);
+
fid = H5Fcreate(FILE2, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT);
/* dset1 */
@@ -477,7 +490,7 @@ gent_dataset(void)
for(j = 0; j < 20; j++)
dset1[i][j] = j + i;
- H5Dwrite(dataset, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, dset1);
+ H5Dwrite(dataset, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, dset1_data);
H5Sclose(space);
H5Dclose(dataset);
@@ -490,11 +503,16 @@ gent_dataset(void)
for(j = 0; j < 20; j++)
dset2[i][j] = 0.0001F * (float)j + (float)i;
- H5Dwrite(dataset, H5T_NATIVE_DOUBLE, H5S_ALL, H5S_ALL, H5P_DEFAULT, dset2);
+ H5Dwrite(dataset, H5T_NATIVE_DOUBLE, H5S_ALL, H5S_ALL, H5P_DEFAULT, dset2_data);
H5Sclose(space);
H5Dclose(dataset);
H5Fclose(fid);
+
+ HDfree(dset1);
+ HDfree(dset1_data);
+ HDfree(dset2);
+ HDfree(dset2_data);
}
static void
@@ -637,11 +655,11 @@ static void gent_softlink(void)
#define NY 2
static int gent_softlink2(void)
{
- hid_t fileid1 = -1;
- hid_t gid1 = -1, gid2 = -1;
- hid_t datatype = -1;
- hid_t dset1 = -1, dset2 = -1;
- hid_t dataspace = -1;
+ hid_t fileid1 = H5I_INVALID_HID;
+ hid_t gid1 = H5I_INVALID_HID, gid2 = H5I_INVALID_HID;
+ hid_t datatype = H5I_INVALID_HID;
+ hid_t dset1 = H5I_INVALID_HID, dset2 = H5I_INVALID_HID;
+ hid_t dataspace = H5I_INVALID_HID;
hsize_t dimsf[2]; /* dataset dimensions */
int data1[NX][NY] = {{0,0},{1,1},{2,2},{3,3}};
int data2[NX][NY] = {{0,0},{0,1},{0,2},{3,3}};
@@ -1553,7 +1571,7 @@ gent_many(void)
dset1_t dset1[6];
hsize_t dim[4];
- herr_t ret;
+ herr_t H5_ATTR_NDEBUG_UNUSED ret;
fid = H5Fcreate(FILE12, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT);
@@ -1772,9 +1790,17 @@ static void gent_str(void) {
int a[8][10];
char s[12][33];
} compound_t;
- compound_t comp1[3][6];
+
+ compound_t **comp1 = NULL;
+ compound_t *comp1_data = NULL;
hsize_t mdims[2];
+ /* Set up data array */
+ comp1_data = (compound_t *)HDcalloc(3 * 6, sizeof(compound_t));
+ comp1 = (compound_t **)HDcalloc(3, sizeof(comp1_data));
+ for (i = 0; i < 3; i++)
+ comp1[i] = comp1_data + (i * 6);
+
fid = H5Fcreate(FILE13, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT);
/* string 1 : nullterm string */
@@ -1860,7 +1886,7 @@ static void gent_str(void) {
}
dataset = H5Dcreate2(fid, "/comp1", f_type, space, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
- H5Dwrite(dataset, f_type2, H5S_ALL, H5S_ALL, H5P_DEFAULT, comp1);
+ H5Dwrite(dataset, f_type2, H5S_ALL, H5S_ALL, H5P_DEFAULT, comp1_data);
H5Tclose(f_type);
H5Tclose(f_type2);
@@ -1868,6 +1894,9 @@ static void gent_str(void) {
H5Dclose(dataset);
H5Fclose(fid);
+
+ HDfree(comp1);
+ HDfree(comp1_data);
}
/*
@@ -2547,7 +2576,7 @@ static void gent_opaque(void)
static void gent_bitfields(void)
{
- hid_t file, grp=-1, type=-1, space=-1, dset=-1;
+ hid_t file, grp=H5I_INVALID_HID, type=H5I_INVALID_HID, space=H5I_INVALID_HID, dset=H5I_INVALID_HID;
size_t i;
hsize_t nelmts;
unsigned char buf[32];
@@ -2564,7 +2593,7 @@ static void gent_bitfields(void)
goto error;
for(i = 0; i < sizeof buf; i++)
- buf[i] = (unsigned char)0xff ^ (unsigned char)i;
+ buf[i] = (uint8_t)(0xff ^ i);
if(H5Dwrite(dset, type, H5S_ALL, H5S_ALL, H5P_DEFAULT, buf) < 0)
goto error;
if(H5Sclose(space) < 0) goto error;
@@ -2578,7 +2607,7 @@ static void gent_bitfields(void)
(dset = H5Dcreate2(grp, "bitfield_2", type, space, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0)
goto error;
for(i = 0; i < sizeof buf; i++)
- buf[i] = (unsigned char)0xff ^ (unsigned char)i;
+ buf[i] = (uint8_t)(0xff ^ i);
if(H5Dwrite(dset, type, H5S_ALL, H5S_ALL, H5P_DEFAULT, buf) < 0)
goto error;
if(H5Sclose(space) < 0) goto error;
@@ -2602,7 +2631,7 @@ static void gent_vldatatypes(void)
hid_t file, dset, space, type;
hsize_t dims[] = { SPACE1_DIM1 };
int i;
- herr_t ret=0;
+ herr_t H5_ATTR_NDEBUG_UNUSED ret=0;
file = H5Fcreate(FILE21, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT);
@@ -2697,7 +2726,7 @@ gent_vldatatypes2(void)
hid_t tid1, tid2; /* Datatype IDs */
hsize_t dims1[] = {SPACE1_DIM1};
unsigned i,j,k; /* counting variables */
- herr_t ret; /* Generic return value */
+ herr_t H5_ATTR_NDEBUG_UNUSED ret; /* Generic return value */
/* Allocate and initialize VL data to write */
for(i = 0; i < SPACE1_DIM1; i++) {
@@ -2770,7 +2799,7 @@ static void gent_vldatatypes3(void)
hid_t tid1, tid2; /* Datatype IDs */
hsize_t dims1[] = {SPACE1_DIM1};
unsigned i,j; /* counting variables */
- herr_t ret; /* Generic return value */
+ herr_t H5_ATTR_NDEBUG_UNUSED ret; /* Generic return value */
/* Allocate and initialize VL data to write */
for(i=0; i<SPACE1_DIM1; i++) {
@@ -2839,7 +2868,7 @@ static void gent_vldatatypes4(void)
hid_t tid1, tid2; /* Datatype IDs */
hsize_t dims1[] = {SPACE1_DIM1};
unsigned i,j; /* counting variables */
- herr_t ret; /* Generic return value */
+ herr_t H5_ATTR_NDEBUG_UNUSED ret; /* Generic return value */
/* Allocate and initialize VL data to write */
for(i=0; i<SPACE1_DIM1; i++) {
@@ -2896,14 +2925,14 @@ static void gent_vldatatypes4(void)
/* Generate a variable-length dataset with NULL values in it */
static void gent_vldatatypes5(void)
{
- hvl_t wdata [SPACE1_DIM1];
- hid_t fid1;
- hid_t dataset;
- hid_t sid1;
- hid_t tid1;
- hsize_t dims1[] = {SPACE1_DIM1};
- int i,j; /* counting variable */
- herr_t ret; /* Generic return value */
+ hvl_t wdata [SPACE1_DIM1];
+ hid_t fid1;
+ hid_t dataset;
+ hid_t sid1;
+ hid_t tid1;
+ hsize_t dims1[] = {SPACE1_DIM1};
+ int i,j; /* counting variable */
+ herr_t H5_ATTR_NDEBUG_UNUSED ret; /* Generic return value */
/* initialize data for dataset */
for(i=0; i<SPACE1_DIM1; i++) {
@@ -2965,16 +2994,15 @@ static void gent_vldatatypes5(void)
static void gent_array1_big(void)
{
- int *wdata; /* Information to write */
- hid_t fid1; /* HDF5 File IDs */
- hid_t dataset; /* Dataset ID */
- hid_t sid1; /* Dataspace ID */
- hid_t tid1; /* Datatype ID */
- hsize_t sdims1[] = {SPACE_ARRAY1BIG_DIM};
- hsize_t tdims1[] = {ARRAY1BIG_DIM};
- int i,j; /* counting variables */
- herr_t ret; /* Generic return value */
-
+ int *wdata; /* Information to write */
+ hid_t fid1; /* HDF5 File IDs */
+ hid_t dataset; /* Dataset ID */
+ hid_t sid1; /* Dataspace ID */
+ hid_t tid1; /* Datatype ID */
+ hsize_t sdims1[] = {SPACE_ARRAY1BIG_DIM};
+ hsize_t tdims1[] = {ARRAY1BIG_DIM};
+ int i,j; /* counting variables */
+ herr_t H5_ATTR_NDEBUG_UNUSED ret; /* Generic return value */
/* for region reference dataset */
hid_t dset2;
@@ -3064,7 +3092,7 @@ static void gent_array1(void)
hsize_t sdims1[] = {SPACE1_DIM1};
hsize_t tdims1[] = {ARRAY1_DIM1};
int i,j; /* counting variables */
- herr_t ret; /* Generic return value */
+ herr_t ret H5_ATTR_NDEBUG_UNUSED; /* Generic return value */
/* Allocate and initialize array data to write */
for(i=0; i<SPACE1_DIM1; i++)
@@ -3100,15 +3128,15 @@ static void gent_array1(void)
static void gent_array2(void)
{
- int wdata[SPACE1_DIM1][ARRAY2_DIM1][ARRAY2_DIM2][ARRAY2_DIM3]; /* Information to write */
- hid_t fid; /* HDF5 File IDs */
- hid_t dataset; /* Dataset ID */
- hid_t sid; /* Dataspace ID */
- hid_t tid; /* Datatype ID */
- hsize_t sdims1[] = {SPACE1_DIM1};
- hsize_t tdims2[] = {ARRAY2_DIM1,ARRAY2_DIM2,ARRAY2_DIM3};
- int i,j,k,l; /* counting variables */
- herr_t ret; /* Generic return value */
+ int wdata[SPACE1_DIM1][ARRAY2_DIM1][ARRAY2_DIM2][ARRAY2_DIM3]; /* Information to write */
+ hid_t fid; /* HDF5 File IDs */
+ hid_t dataset; /* Dataset ID */
+ hid_t sid; /* Dataspace ID */
+ hid_t tid; /* Datatype ID */
+ hsize_t sdims1[] = {SPACE1_DIM1};
+ hsize_t tdims2[] = {ARRAY2_DIM1,ARRAY2_DIM2,ARRAY2_DIM3};
+ int i,j,k,l; /* counting variables */
+ herr_t H5_ATTR_NDEBUG_UNUSED ret; /* Generic return value */
/* Allocate and initialize array data to write */
for(i=0; i<SPACE1_DIM1; i++)
@@ -3146,17 +3174,17 @@ static void gent_array2(void)
static void gent_array3(void)
{
- int wdata[SPACE1_DIM1][ARRAY1_DIM1][ARRAY3_DIM1][ARRAY3_DIM2]; /* Information to write */
- hid_t fid; /* HDF5 File IDs */
- hid_t dataset; /* Dataset ID */
- hid_t sid; /* Dataspace ID */
- hid_t tid1; /* 1-D array Datatype ID */
- hid_t tid2; /* 2-D array Datatype ID */
- hsize_t sdims1[] = {SPACE1_DIM1};
- hsize_t tdims1[] = {ARRAY1_DIM1};
- hsize_t tdims2[] = {ARRAY3_DIM1,ARRAY3_DIM2};
- int i,j,k,l; /* counting variables */
- herr_t ret; /* Generic return value */
+ int wdata[SPACE1_DIM1][ARRAY1_DIM1][ARRAY3_DIM1][ARRAY3_DIM2]; /* Information to write */
+ hid_t fid; /* HDF5 File IDs */
+ hid_t dataset; /* Dataset ID */
+ hid_t sid; /* Dataspace ID */
+ hid_t tid1; /* 1-D array Datatype ID */
+ hid_t tid2; /* 2-D array Datatype ID */
+ hsize_t sdims1[] = {SPACE1_DIM1};
+ hsize_t tdims1[] = {ARRAY1_DIM1};
+ hsize_t tdims2[] = {ARRAY3_DIM1,ARRAY3_DIM2};
+ int i,j,k,l; /* counting variables */
+ herr_t H5_ATTR_NDEBUG_UNUSED ret; /* Generic return value */
/* Allocate and initialize array data to write */
for(i=0; i<SPACE1_DIM1; i++)
@@ -3203,16 +3231,16 @@ static void gent_array4(void)
int i;
float f;
} s2_t;
- s2_t wdata[SPACE1_DIM1][ARRAY1_DIM1]; /* Information to write */
- hid_t fid1; /* HDF5 File IDs */
- hid_t dataset; /* Dataset ID */
- hid_t sid1; /* Dataspace ID */
- hid_t tid1; /* Array Datatype ID */
- hid_t tid2; /* Compound Datatype ID */
- hsize_t sdims1[] = {SPACE1_DIM1};
- hsize_t tdims1[] = {ARRAY1_DIM1};
- int i,j; /* counting variables */
- herr_t ret; /* Generic return value */
+ s2_t wdata[SPACE1_DIM1][ARRAY1_DIM1]; /* Information to write */
+ hid_t fid1; /* HDF5 File IDs */
+ hid_t dataset; /* Dataset ID */
+ hid_t sid1; /* Dataspace ID */
+ hid_t tid1; /* Array Datatype ID */
+ hid_t tid2; /* Compound Datatype ID */
+ hsize_t sdims1[] = {SPACE1_DIM1};
+ hsize_t tdims1[] = {ARRAY1_DIM1};
+ int i,j; /* counting variables */
+ herr_t H5_ATTR_NDEBUG_UNUSED ret; /* Generic return value */
/* Initialize array data to write */
for(i=0; i<SPACE1_DIM1; i++)
@@ -3269,17 +3297,17 @@ static void gent_array5(void)
int i;
float f[ARRAY1_DIM1];
} s2_t;
- s2_t wdata[SPACE1_DIM1][ARRAY1_DIM1]; /* Information to write */
- hid_t fid1; /* HDF5 File IDs */
- hid_t dataset; /* Dataset ID */
- hid_t sid1; /* Dataspace ID */
- hid_t tid1; /* Array Datatype ID */
- hid_t tid2; /* Compound Datatype ID */
- hid_t tid3; /* Nested Array Datatype ID */
- hsize_t sdims1[] = {SPACE1_DIM1};
- hsize_t tdims1[] = {ARRAY1_DIM1};
- int i,j,k; /* counting variables */
- herr_t ret; /* Generic return value */
+ s2_t wdata[SPACE1_DIM1][ARRAY1_DIM1]; /* Information to write */
+ hid_t fid1; /* HDF5 File IDs */
+ hid_t dataset; /* Dataset ID */
+ hid_t sid1; /* Dataspace ID */
+ hid_t tid1; /* Array Datatype ID */
+ hid_t tid2; /* Compound Datatype ID */
+ hid_t tid3; /* Nested Array Datatype ID */
+ hsize_t sdims1[] = {SPACE1_DIM1};
+ hsize_t tdims1[] = {ARRAY1_DIM1};
+ int i,j,k; /* counting variables */
+ herr_t H5_ATTR_NDEBUG_UNUSED ret; /* Generic return value */
/* Initialize array data to write */
for(i=0; i<SPACE1_DIM1; i++)
@@ -3340,16 +3368,16 @@ static void gent_array5(void)
static void gent_array6(void)
{
- hvl_t wdata[SPACE1_DIM1][ARRAY1_DIM1]; /* Information to write */
- hid_t fid1; /* HDF5 File IDs */
- hid_t dataset; /* Dataset ID */
- hid_t sid1; /* Dataspace ID */
- hid_t tid1; /* Array Datatype ID */
- hid_t tid2; /* VL Datatype ID */
- hsize_t sdims1[] = {SPACE1_DIM1};
- hsize_t tdims1[] = {ARRAY1_DIM1};
- int i,j,k; /* counting variables */
- herr_t ret; /* Generic return value */
+ hvl_t wdata[SPACE1_DIM1][ARRAY1_DIM1]; /* Information to write */
+ hid_t fid1; /* HDF5 File IDs */
+ hid_t dataset; /* Dataset ID */
+ hid_t sid1; /* Dataspace ID */
+ hid_t tid1; /* Array Datatype ID */
+ hid_t tid2; /* VL Datatype ID */
+ hsize_t sdims1[] = {SPACE1_DIM1};
+ hsize_t tdims1[] = {ARRAY1_DIM1};
+ int i,j,k; /* counting variables */
+ herr_t H5_ATTR_NDEBUG_UNUSED ret; /* Generic return value */
/* Initialize array data to write */
for(i=0; i<SPACE1_DIM1; i++)
@@ -3400,17 +3428,17 @@ static void gent_array6(void)
static void gent_array7(void)
{
- hvl_t wdata[SPACE1_DIM1][ARRAY1_DIM1]; /* Information to write */
- hid_t fid1; /* HDF5 File IDs */
- hid_t dataset; /* Dataset ID */
- hid_t sid1; /* Dataspace ID */
- hid_t tid1; /* Array Datatype ID */
- hid_t tid2; /* VL Datatype ID */
- hid_t tid3; /* Nested Array Datatype ID */
- hsize_t sdims1[] = {SPACE1_DIM1};
- hsize_t tdims1[] = {ARRAY1_DIM1};
- int i,j,k,l; /* Index variables */
- herr_t ret; /* Generic return value */
+ hvl_t wdata[SPACE1_DIM1][ARRAY1_DIM1]; /* Information to write */
+ hid_t fid1; /* HDF5 File IDs */
+ hid_t dataset; /* Dataset ID */
+ hid_t sid1; /* Dataspace ID */
+ hid_t tid1; /* Array Datatype ID */
+ hid_t tid2; /* VL Datatype ID */
+ hid_t tid3; /* Nested Array Datatype ID */
+ hsize_t sdims1[] = {SPACE1_DIM1};
+ hsize_t tdims1[] = {ARRAY1_DIM1};
+ int i,j,k,l; /* Index variables */
+ herr_t H5_ATTR_NDEBUG_UNUSED ret; /* Generic return value */
/* Initialize array data to write */
for(i=0; i<SPACE1_DIM1; i++)
@@ -3470,11 +3498,11 @@ static void gent_array7(void)
/* Test the boundary of the display output buffer at the reallocation event */
static void gent_array8(void)
{
- hid_t file = -1; /* Handles */
- hid_t filetype = -1; /* Handles */
- hid_t space = -1; /* Handles */
- hid_t dset = -1; /* Handles */
- herr_t status = -1;
+ hid_t file = H5I_INVALID_HID; /* Handles */
+ hid_t filetype = H5I_INVALID_HID; /* Handles */
+ hid_t space = H5I_INVALID_HID; /* Handles */
+ hid_t dset = H5I_INVALID_HID; /* Handles */
+ herr_t H5_ATTR_NDEBUG_UNUSED status = -1;
hsize_t sdims[] = {F64_DIM0};
hsize_t tdims[] = {F64_DIM1};
int *wdata; /* Write buffer */
@@ -3541,7 +3569,7 @@ static void gent_empty(void)
} empty_struct;
hid_t file, dset, space, type;
hsize_t dims[] = { SPACE1_DIM1 };
- herr_t ret=0;
+ herr_t H5_ATTR_NDEBUG_UNUSED ret=0;
file = H5Fcreate(FILE32, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT);
@@ -3599,7 +3627,8 @@ static void gent_empty(void)
static void
gent_group_comments(void)
{
- hid_t fid, group;
+ hid_t fid = H5I_INVALID_HID;
+ hid_t group = H5I_INVALID_HID;
fid = H5Fcreate(FILE33, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT);
@@ -3747,9 +3776,15 @@ void gent_multi(void)
H5FD_mem_t mt, memb_map[H5FD_MEM_NTYPES];
hid_t memb_fapl[H5FD_MEM_NTYPES];
const char *memb_name[H5FD_MEM_NTYPES];
- char sv[H5FD_MEM_NTYPES][1024];
+ char **sv = NULL;
+ char *sv_data = NULL;
haddr_t memb_addr[H5FD_MEM_NTYPES];
+ sv_data = (char *)HDcalloc(H5FD_MEM_NTYPES * 1024, sizeof(char));
+ sv = (char **)HDcalloc(H5FD_MEM_NTYPES, sizeof(sv_data));
+ for (i = 0; i < H5FD_MEM_NTYPES; i++)
+ sv[i] = sv_data + (i * 1024);
+
fapl = H5Pcreate(H5P_FILE_ACCESS);
HDmemset(memb_map, 0, sizeof memb_map);
@@ -3759,7 +3794,7 @@ void gent_multi(void)
HDassert(HDstrlen(multi_letters) == H5FD_MEM_NTYPES);
- for(mt = H5FD_MEM_DEFAULT; mt < H5FD_MEM_NTYPES; H5_INC_ENUM(H5FD_mem_t,mt)) {
+ for(mt = H5FD_MEM_DEFAULT; mt < H5FD_MEM_NTYPES; mt++) {
memb_fapl[mt] = H5P_DEFAULT;
memb_map[mt] = mt;
HDsprintf(sv[mt], "%%s-%c.h5", multi_letters[mt]);
@@ -3790,6 +3825,9 @@ void gent_multi(void)
H5Dclose(dataset);
H5Fclose(fid);
H5Pclose(fapl);
+
+ HDfree(sv);
+ HDfree(sv_data);
}
static void gent_large_objname(void)
@@ -3902,7 +3940,7 @@ static void gent_char(void)
*
* Return: void
*
- * Programmer: pvn@ncsa.uiuc.edu
+ * Programmer: Pedro Vicente
*
* Date: May 28, 2003
*
@@ -3929,7 +3967,7 @@ static void write_attr_in(hid_t loc_id,
hid_t aid;
hid_t sid;
hid_t tid;
- herr_t status;
+ herr_t H5_ATTR_NDEBUG_UNUSED status;
int val, i, j, k, n;
float f;
@@ -4342,7 +4380,7 @@ static void write_attr_in(hid_t loc_id,
*
* Return: void
*
- * Programmer: pvn@ncsa.uiuc.edu
+ * Programmer: Pedro Vicente
*
* Date: May 28, 2003
*
@@ -4370,7 +4408,7 @@ static void write_dset_in(hid_t loc_id,
hid_t sid;
hid_t tid;
hid_t plist_id;
- herr_t status;
+ herr_t H5_ATTR_NDEBUG_UNUSED status;
int val, i, j, k, n;
float f;
int fillvalue=2;
@@ -4792,7 +4830,7 @@ static void write_dset_in(hid_t loc_id,
*
* Return: void
*
- * Programmer: pvn@ncsa.uiuc.edu
+ * Programmer: Pedro Vicente
*
* Date: May 19, 2003
*
@@ -4808,7 +4846,7 @@ static void gent_attr_all(void)
hid_t root_id;
hid_t sid;
hsize_t dims[1] = {2};
- herr_t status;
+ herr_t H5_ATTR_NDEBUG_UNUSED status;
/* Create a file and a dataset */
fid = H5Fcreate(FILE40, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT);
@@ -4861,7 +4899,7 @@ static void gent_attr_all(void)
*
* Purpose: utility function to write an attribute
*
- * Programmer: pvn@ncsa.uiuc.edu
+ * Programmer: Pedro Vicente
*
* Date: May 19, 2003
*
@@ -4900,7 +4938,7 @@ int write_attr(hid_t loc_id, int rank, hsize_t *dims, const char *attr_name,
*
* Return:
*
- * Programmer: pvn@ncsa.uiuc.edu
+ * Programmer: Pedro Vicente
*
* Date: May 27, 2003
*
@@ -4966,7 +5004,7 @@ static void gent_compound_complex(void)
hid_t array4_tid; /* Array datatype handle */
hid_t datafile, dataset; /* Datafile/dataset handles */
hid_t dataspace; /* Dataspace handle */
- herr_t status; /* Error checking variable */
+ herr_t H5_ATTR_NDEBUG_UNUSED status; /* Error checking variable */
hsize_t dim[] = {F41_LENGTH}; /* Dataspace dimensions */
hsize_t array_dimb[] = {F41_DIMb}; /* Array dimensions */
hsize_t array_dimd[]={F41_ARRAY_DIMd1,F41_ARRAY_DIMd2}; /* Array dimensions */
@@ -5115,7 +5153,7 @@ static void gent_named_dtype_attr(void)
hid_t aid;
hid_t gid;
int data=8;
- herr_t ret;
+ herr_t H5_ATTR_NDEBUG_UNUSED ret;
/* Create a file */
fid=H5Fcreate(FILE42, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT);
@@ -5337,7 +5375,7 @@ make_external(hid_t fid)
hsize_t cur_size[1]; /*data space current size */
hsize_t max_size[1]; /*data space maximum size */
hsize_t size; /*bytes reserved for data in the external file*/
- int ret;
+ int H5_ATTR_NDEBUG_UNUSED ret;
cur_size[0] = max_size[0] = 100;
size = (max_size[0]*sizeof(int)/2);
@@ -5385,7 +5423,8 @@ static void gent_filters(void)
hsize_t dims1[RANK] = {DIM1,DIM2};
hsize_t chunk_dims[RANK] = {CDIM1,CDIM2};
int buf1[DIM1][DIM2];
- int i, j, n, ret;
+ int i, j, n;
+ int H5_ATTR_NDEBUG_UNUSED ret;
for(i=n=0; i<DIM1; i++){
for(j=0; j<DIM2; j++){
@@ -5731,8 +5770,7 @@ static void gent_fcontents(void)
hid_t tid; /* datatype ID */
hsize_t dims[1]={4};
int buf[4]={1,2,3,4};
- int ret;
-
+ int H5_ATTR_NDEBUG_UNUSED ret;
/* create a file */
fid = H5Fcreate(FILE46, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT);
@@ -5865,7 +5903,7 @@ static void gent_fvalues(void)
hvl_t fillval3; /* vlen fill value */
hsize_t dimarray[1]={3}; /* array dimension */
int buf4[2][3]= {{1,2,3},{4,5,6}}; /* array */
- int ret;
+ int H5_ATTR_NDEBUG_UNUSED ret;
/* create a file */
fid = H5Fcreate(FILE48, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT);
@@ -6023,9 +6061,9 @@ static void gent_string(void)
c_t buf3 = {24, "Four score and seven\n years ago our forefathers brought forth on this continent a new nation"};
char buf4[] = {"Four score and seven\n years ago our forefathers brought forth on this continent a new nation"};
hsize_t dims1[] = {1};
- hsize_t dims2[] = {SPACE1_DIM1};
- hsize_t dims4[1];
- int ret;
+ hsize_t dims2[] = {SPACE1_DIM1};
+ hsize_t dims4[1];
+ int H5_ATTR_NDEBUG_UNUSED ret;
dims4[0] = sizeof(buf4);
@@ -6120,7 +6158,8 @@ static void gent_aindices(void)
int buf2[10][10];
int buf3[2][10][10];
int buf4[2][2][10][10];
- int i, j, k, l, n, ret;
+ int i, j, k, l, n;
+ int H5_ATTR_NDEBUG_UNUSED ret;
for(i = n = 0; i < 100; i++)
buf1[i] = n++;
@@ -6187,11 +6226,11 @@ static void gent_aindices(void)
*/
static void gent_longlinks(void)
{
- hid_t fid = (-1); /* File ID */
- hid_t gid = (-1); /* Group ID */
- hid_t gid2 = (-1); /* Datatype ID */
- char *objname = NULL; /* Name of object [Long] */
- size_t u; /* Local index variable */
+ hid_t fid = (-1); /* File ID */
+ hid_t gid = (-1); /* Group ID */
+ hid_t H5_ATTR_NDEBUG_UNUSED gid2 = (-1); /* Datatype ID */
+ char *objname = NULL; /* Name of object [Long] */
+ size_t u; /* Local index variable */
/* Create files */
fid = H5Fcreate(FILE51, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT);
@@ -6352,12 +6391,12 @@ gent_binary(void)
static void
gent_bigdims(void)
{
- hid_t fid = -1;
- hid_t did = -1;
- hid_t f_sid = -1;
- hid_t m_sid = -1;
- hid_t tid = -1;
- hid_t dcpl = -1;
+ hid_t fid = H5I_INVALID_HID;
+ hid_t did = H5I_INVALID_HID;
+ hid_t f_sid = H5I_INVALID_HID;
+ hid_t m_sid = H5I_INVALID_HID;
+ hid_t tid = H5I_INVALID_HID;
+ hid_t dcpl = H5I_INVALID_HID;
hsize_t dims[1]={DIM_4GB}; /* dataset dimensions */
hsize_t chunk_dims[1]={1024}; /* chunk dimensions */
hsize_t hs_start[1];
@@ -6368,7 +6407,7 @@ gent_bigdims(void)
hsize_t i;
char c;
size_t nelmts;
- int ret;
+ int H5_ATTR_NDEBUG_UNUSED ret;
/* create a file */
fid = H5Fcreate(FILE56, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT);
@@ -6417,19 +6456,19 @@ gent_bigdims(void)
/* close */
if(H5Tclose(tid) < 0)
goto out;
- tid = -1;
+ tid = H5I_INVALID_HID;
if(H5Sclose(f_sid) < 0)
goto out;
- f_sid = -1;
+ f_sid = H5I_INVALID_HID;
if(H5Sclose(m_sid) < 0)
goto out;
- m_sid = -1;
+ m_sid = H5I_INVALID_HID;
if(H5Pclose(dcpl) < 0)
goto out;
- dcpl = -1;
+ dcpl = H5I_INVALID_HID;
if(H5Dclose(did) < 0)
goto out;
- did = -1;
+ did = H5I_INVALID_HID;
ret = H5Fclose(fid);
HDassert(ret >= 0);
@@ -6464,7 +6503,8 @@ gent_hyperslab(void)
hid_t fid; /* file id */
hsize_t dims[2] = {32,4097}; /* big enough data size to force a second stripmine read */
double *buf;
- int i, ret;
+ int i;
+ int H5_ATTR_NDEBUG_UNUSED ret;
buf = (double*) HDmalloc(32 * 4097 * sizeof(double) );
for(i = 0; i < 32 * 4097; i++)
@@ -6493,10 +6533,10 @@ gent_hyperslab(void)
static void
gent_group_creation_order(void)
{
- hid_t fid = -1; /* file ID */
- hid_t gid = -1; /* group ID */
- hid_t gcpl_id = -1; /* group creation property list ID */
- hid_t fcpl_id = -1; /* file creation property list ID (to set root group order) */
+ hid_t fid = H5I_INVALID_HID; /* file ID */
+ hid_t gid = H5I_INVALID_HID; /* group ID */
+ hid_t gcpl_id = H5I_INVALID_HID; /* group creation property list ID */
+ hid_t fcpl_id = H5I_INVALID_HID; /* file creation property list ID (to set root group order) */
if((fcpl_id = H5Pcreate(H5P_FILE_CREATE)) < 0)
goto out;
@@ -6522,45 +6562,45 @@ gent_group_creation_order(void)
goto out;
if(H5Gclose(gid) < 0)
goto out;
- gid = -1;
+ gid = H5I_INVALID_HID;
if((gid = H5Gcreate2(fid, "2/c", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0)
goto out;
if(H5Gclose(gid) < 0)
goto out;
- gid = -1;
+ gid = H5I_INVALID_HID;
if((gid = H5Gcreate2(fid, "2/b", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0)
goto out;
if(H5Gclose(gid) < 0)
goto out;
- gid = -1;
+ gid = H5I_INVALID_HID;
if((gid = H5Gcreate2(fid, "2/a", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0)
goto out;
if(H5Gclose(gid) < 0)
goto out;
- gid = -1;
+ gid = H5I_INVALID_HID;
if((gid = H5Gcreate2(fid, "2/a/a2", H5P_DEFAULT, gcpl_id, H5P_DEFAULT)) < 0)
goto out;
if(H5Gclose(gid) < 0)
goto out;
- gid = -1;
+ gid = H5I_INVALID_HID;
if((gid = H5Gcreate2(fid, "2/a/a1", H5P_DEFAULT, gcpl_id, H5P_DEFAULT)) < 0)
goto out;
if(H5Gclose(gid) < 0)
goto out;
- gid = -1;
+ gid = H5I_INVALID_HID;
if((gid = H5Gcreate2(fid, "2/a/a2/a22", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0)
goto out;
if(H5Gclose(gid) < 0)
goto out;
- gid = -1;
+ gid = H5I_INVALID_HID;
if((gid = H5Gcreate2(fid, "2/a/a2/a21", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0)
goto out;
if(H5Gclose(gid) < 0)
goto out;
- gid = -1;
+ gid = H5I_INVALID_HID;
/*-------------------------------------------------------------------------
@@ -6575,56 +6615,56 @@ gent_group_creation_order(void)
goto out;
if(H5Gclose(gid) < 0)
goto out;
- gid = -1;
+ gid = H5I_INVALID_HID;
if((gid = H5Gcreate2(fid, "1/c", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0)
goto out;
if(H5Gclose(gid) < 0)
goto out;
- gid = -1;
+ gid = H5I_INVALID_HID;
if((gid = H5Gcreate2(fid, "1/b", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0)
goto out;
if(H5Gclose(gid) < 0)
goto out;
- gid = -1;
+ gid = H5I_INVALID_HID;
if((gid = H5Gcreate2(fid, "1/a", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0)
goto out;
if(H5Gclose(gid) < 0)
goto out;
- gid = -1;
+ gid = H5I_INVALID_HID;
if((gid = H5Gcreate2(fid, "1/a/a2", H5P_DEFAULT, gcpl_id, H5P_DEFAULT)) < 0)
goto out;
if(H5Gclose(gid) < 0)
goto out;
- gid = -1;
+ gid = H5I_INVALID_HID;
if((gid = H5Gcreate2(fid, "1/a/a1", H5P_DEFAULT, gcpl_id, H5P_DEFAULT)) < 0)
goto out;
if(H5Gclose(gid) < 0)
goto out;
- gid = -1;
+ gid = H5I_INVALID_HID;
if((gid = H5Gcreate2(fid, "1/a/a2/a22", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0)
goto out;
if(H5Gclose(gid) < 0)
goto out;
- gid = -1;
+ gid = H5I_INVALID_HID;
if((gid = H5Gcreate2(fid, "1/a/a2/a21", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0)
goto out;
if(H5Gclose(gid) < 0)
goto out;
- gid = -1;
+ gid = H5I_INVALID_HID;
if(H5Pclose(gcpl_id) < 0)
goto out;
- gcpl_id = -1;
+ gcpl_id = H5I_INVALID_HID;
if(H5Pclose(fcpl_id) < 0)
goto out;
- fcpl_id = -1;
+ fcpl_id = H5I_INVALID_HID;
if(H5Fclose(fid) < 0)
goto out;
- fid = -1;
+ fid = H5I_INVALID_HID;
return;
@@ -6652,15 +6692,15 @@ gent_group_creation_order(void)
static void
gent_attr_creation_order(void)
{
- hid_t fid = -1; /* file id */
- hid_t gid = -1; /* group id */
- hid_t did = -1; /* dataset id */
- hid_t sid = -1; /* space id */
- hid_t aid = -1; /* attribute id */
- hid_t tid = -1; /* datatype id */
- hid_t gcpl_id = -1; /* group creation property list ID */
- hid_t dcpl_id = -1; /* dataset creation property list ID */
- hid_t tcpl_id = -1; /* datatype creation property list ID */
+ hid_t fid = H5I_INVALID_HID; /* file id */
+ hid_t gid = H5I_INVALID_HID; /* group id */
+ hid_t did = H5I_INVALID_HID; /* dataset id */
+ hid_t sid = H5I_INVALID_HID; /* space id */
+ hid_t aid = H5I_INVALID_HID; /* attribute id */
+ hid_t tid = H5I_INVALID_HID; /* datatype id */
+ hid_t gcpl_id = H5I_INVALID_HID; /* group creation property list ID */
+ hid_t dcpl_id = H5I_INVALID_HID; /* dataset creation property list ID */
+ hid_t tcpl_id = H5I_INVALID_HID; /* datatype creation property list ID */
int i;
const char *attr_name[3] = {"c", "b", "a" };
@@ -6713,12 +6753,12 @@ gent_attr_creation_order(void)
/* close attribute */
if(H5Aclose(aid) < 0)
goto out;
- aid = -1;
+ aid = H5I_INVALID_HID;
} /* end for */
if(H5Dclose(did) < 0)
goto out;
- did = -1;
+ did = H5I_INVALID_HID;
/*-------------------------------------------------------------------------
@@ -6739,12 +6779,12 @@ gent_attr_creation_order(void)
/* close attribute */
if(H5Aclose(aid) < 0)
goto out;
- aid = -1;
+ aid = H5I_INVALID_HID;
} /* end for */
if(H5Dclose(did) < 0)
goto out;
- did = -1;
+ did = H5I_INVALID_HID;
@@ -6765,12 +6805,12 @@ gent_attr_creation_order(void)
/* close attribute */
if(H5Aclose(aid) < 0)
goto out;
- aid = -1;
+ aid = H5I_INVALID_HID;
} /* end for */
if(H5Gclose(gid) < 0)
goto out;
- gid = -1;
+ gid = H5I_INVALID_HID;
/*-------------------------------------------------------------------------
* create a group without creation order tracked for attributes and atributes in it
@@ -6789,12 +6829,12 @@ gent_attr_creation_order(void)
/* close attribute */
if(H5Aclose(aid) < 0)
goto out;
- aid = -1;
+ aid = H5I_INVALID_HID;
} /* end for */
if(H5Gclose(gid) < 0)
goto out;
- gid = -1;
+ gid = H5I_INVALID_HID;
/*-------------------------------------------------------------------------
* create a named datatype with creation order tracked for attributes and atributes in it
@@ -6816,12 +6856,12 @@ gent_attr_creation_order(void)
/* close attribute */
if(H5Aclose(aid) < 0)
goto out;
- aid = -1;
+ aid = H5I_INVALID_HID;
} /* end for */
if(H5Tclose(tid) < 0)
goto out;
- tid = -1;
+ tid = H5I_INVALID_HID;
/*-------------------------------------------------------------------------
* create a named datatype without creation order tracked for attributes and atributes in it
@@ -6843,12 +6883,12 @@ gent_attr_creation_order(void)
/* close attribute */
if(H5Aclose(aid) < 0)
goto out;
- aid = -1;
+ aid = H5I_INVALID_HID;
} /* end for */
if(H5Tclose(tid) < 0)
goto out;
- tid = -1;
+ tid = H5I_INVALID_HID;
/*-------------------------------------------------------------------------
* add some attributes to the root group
@@ -6866,12 +6906,12 @@ gent_attr_creation_order(void)
/* close attribute */
if(H5Aclose(aid) < 0)
goto out;
- aid = -1;
+ aid = H5I_INVALID_HID;
} /* end for */
if(H5Gclose(gid) < 0)
goto out;
- gid = -1;
+ gid = H5I_INVALID_HID;
/*-------------------------------------------------------------------------
* close
@@ -6879,19 +6919,19 @@ gent_attr_creation_order(void)
*/
if(H5Sclose(sid) < 0)
goto out;
- sid = -1;
+ sid = H5I_INVALID_HID;
if(H5Pclose(dcpl_id) < 0)
goto out;
- dcpl_id = -1;
+ dcpl_id = H5I_INVALID_HID;
if(H5Pclose(gcpl_id) < 0)
goto out;
- gcpl_id = -1;
+ gcpl_id = H5I_INVALID_HID;
if(H5Pclose(tcpl_id) < 0)
goto out;
- tcpl_id = -1;
+ tcpl_id = H5I_INVALID_HID;
if(H5Fclose(fid) < 0)
goto out;
- fid = -1;
+ fid = H5I_INVALID_HID;
@@ -7090,7 +7130,8 @@ gent_dataset_idx(void)
hsize_t dims[2];
hsize_t maxdims[2];
int buf[20][10];
- int i, j, ret;
+ int i, j;
+ int H5_ATTR_NDEBUG_UNUSED ret;
/* Get a copy of the file aaccess property */
fapl = H5Pcreate(H5P_FILE_ACCESS);
@@ -7168,19 +7209,43 @@ gent_dataset_idx(void)
static void
gent_packedbits(void)
{
- hid_t fid, dataset, space;
+ hid_t fid = H5I_INVALID_HID;
+ hid_t dataset = H5I_INVALID_HID;
+ hid_t space = H5I_INVALID_HID;
hsize_t dims[2];
- uint8_t dsetu8[F66_XDIM][F66_YDIM8], valu8bits;
- uint16_t dsetu16[F66_XDIM][F66_YDIM16], valu16bits;
- uint32_t dsetu32[F66_XDIM][F66_YDIM32], valu32bits;
- uint64_t dsetu64[F66_XDIM][F66_YDIM64], valu64bits;
- int8_t dset8[F66_XDIM][F66_YDIM8], val8bits;
- int16_t dset16[F66_XDIM][F66_YDIM16], val16bits;
- int32_t dset32[F66_XDIM][F66_YDIM32], val32bits;
- int64_t dset64[F66_XDIM][F66_YDIM64], val64bits;
- double dsetdbl[F66_XDIM][F66_YDIM8];
+
+ uint8_t **dsetu8 = NULL;
+ uint16_t **dsetu16 = NULL;
+ uint32_t **dsetu32 = NULL;
+ uint64_t **dsetu64 = NULL;
+ int8_t **dset8 = NULL;
+ int16_t **dset16 = NULL;
+ int32_t **dset32 = NULL;
+ int64_t **dset64 = NULL;
+ double **dsetdbl = NULL;
+
+ uint8_t valu8bits;
+ uint16_t valu16bits;
+ uint32_t valu32bits;
+ uint64_t valu64bits;
+ int8_t val8bits;
+ int16_t val16bits;
+ int32_t val32bits;
+ int64_t val64bits;
+
unsigned int i, j;
+ /* Create arrays */
+ H5TEST_ALLOCATE_2D_ARRAY(dsetu8, uint8_t, F66_XDIM, F66_YDIM8);
+ H5TEST_ALLOCATE_2D_ARRAY(dsetu16, uint16_t, F66_XDIM, F66_YDIM16);
+ H5TEST_ALLOCATE_2D_ARRAY(dsetu32, uint32_t, F66_XDIM, F66_YDIM32);
+ H5TEST_ALLOCATE_2D_ARRAY(dsetu64, uint64_t, F66_XDIM, F66_YDIM64);
+ H5TEST_ALLOCATE_2D_ARRAY(dset8, int8_t, F66_XDIM, F66_YDIM8);
+ H5TEST_ALLOCATE_2D_ARRAY(dset16, int16_t, F66_XDIM, F66_YDIM16);
+ H5TEST_ALLOCATE_2D_ARRAY(dset32, int32_t, F66_XDIM, F66_YDIM32);
+ H5TEST_ALLOCATE_2D_ARRAY(dset64, int64_t, F66_XDIM, F66_YDIM64);
+ H5TEST_ALLOCATE_2D_ARRAY(dsetdbl, double, F66_XDIM, F66_YDIM8);
+
fid = H5Fcreate(FILE66, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT);
/* Dataset of 8 bits unsigned int */
@@ -7196,7 +7261,7 @@ gent_packedbits(void)
valu8bits = (uint8_t)(valu8bits << 1);
}
- H5Dwrite(dataset, H5T_NATIVE_UINT8, H5S_ALL, H5S_ALL, H5P_DEFAULT, dsetu8);
+ H5Dwrite(dataset, H5T_NATIVE_UINT8, H5S_ALL, H5S_ALL, H5P_DEFAULT, dsetu8[0]);
H5Sclose(space);
H5Dclose(dataset);
@@ -7213,7 +7278,7 @@ gent_packedbits(void)
valu16bits = (uint16_t)(valu16bits << 1);
}
- H5Dwrite(dataset, H5T_NATIVE_UINT16, H5S_ALL, H5S_ALL, H5P_DEFAULT, dsetu16);
+ H5Dwrite(dataset, H5T_NATIVE_UINT16, H5S_ALL, H5S_ALL, H5P_DEFAULT, dsetu16[0]);
H5Sclose(space);
H5Dclose(dataset);
@@ -7230,7 +7295,7 @@ gent_packedbits(void)
valu32bits <<= 1;
}
- H5Dwrite(dataset, H5T_NATIVE_UINT32, H5S_ALL, H5S_ALL, H5P_DEFAULT, dsetu32);
+ H5Dwrite(dataset, H5T_NATIVE_UINT32, H5S_ALL, H5S_ALL, H5P_DEFAULT, dsetu32[0]);
H5Sclose(space);
H5Dclose(dataset);
@@ -7247,7 +7312,7 @@ gent_packedbits(void)
valu64bits <<= 1;
}
- H5Dwrite(dataset, H5T_NATIVE_UINT64, H5S_ALL, H5S_ALL, H5P_DEFAULT, dsetu64);
+ H5Dwrite(dataset, H5T_NATIVE_UINT64, H5S_ALL, H5S_ALL, H5P_DEFAULT, dsetu64[0]);
H5Sclose(space);
H5Dclose(dataset);
@@ -7264,7 +7329,7 @@ gent_packedbits(void)
val8bits = (int8_t)(val8bits << 1);
}
- H5Dwrite(dataset, H5T_NATIVE_INT8, H5S_ALL, H5S_ALL, H5P_DEFAULT, dset8);
+ H5Dwrite(dataset, H5T_NATIVE_INT8, H5S_ALL, H5S_ALL, H5P_DEFAULT, dset8[0]);
H5Sclose(space);
H5Dclose(dataset);
@@ -7281,7 +7346,7 @@ gent_packedbits(void)
val16bits = (int16_t)(val16bits << 1);
}
- H5Dwrite(dataset, H5T_NATIVE_INT16, H5S_ALL, H5S_ALL, H5P_DEFAULT, dset16);
+ H5Dwrite(dataset, H5T_NATIVE_INT16, H5S_ALL, H5S_ALL, H5P_DEFAULT, dset16[0]);
H5Sclose(space);
H5Dclose(dataset);
@@ -7298,7 +7363,7 @@ gent_packedbits(void)
val32bits <<= 1;
}
- H5Dwrite(dataset, H5T_NATIVE_INT32, H5S_ALL, H5S_ALL, H5P_DEFAULT, dset32);
+ H5Dwrite(dataset, H5T_NATIVE_INT32, H5S_ALL, H5S_ALL, H5P_DEFAULT, dset32[0]);
H5Sclose(space);
H5Dclose(dataset);
@@ -7315,7 +7380,7 @@ gent_packedbits(void)
val64bits <<= 1;
}
- H5Dwrite(dataset, H5T_NATIVE_INT64, H5S_ALL, H5S_ALL, H5P_DEFAULT, dset64);
+ H5Dwrite(dataset, H5T_NATIVE_INT64, H5S_ALL, H5S_ALL, H5P_DEFAULT, dset64[0]);
H5Sclose(space);
H5Dclose(dataset);
@@ -7328,11 +7393,21 @@ gent_packedbits(void)
for(j = 0; j < dims[1]; j++)
dsetdbl[i][j] = 0.0001F * (float)j + (float)i;
- H5Dwrite(dataset, H5T_NATIVE_DOUBLE, H5S_ALL, H5S_ALL, H5P_DEFAULT, dsetdbl);
+ H5Dwrite(dataset, H5T_NATIVE_DOUBLE, H5S_ALL, H5S_ALL, H5P_DEFAULT, dsetdbl[0]);
H5Sclose(space);
H5Dclose(dataset);
H5Fclose(fid);
+
+ HDfree(dsetu8);
+ HDfree(dsetu16);
+ HDfree(dsetu32);
+ HDfree(dsetu64);
+ HDfree(dset8);
+ HDfree(dset16);
+ HDfree(dset32);
+ HDfree(dset64);
+ HDfree(dsetdbl);
}
/*-------------------------------------------------------------------------
@@ -7349,19 +7424,44 @@ gent_packedbits(void)
static void
gent_attr_intsize(void)
{
- hid_t fid, attr, space, root;
+ hid_t fid = H5I_INVALID_HID;
+ hid_t attr = H5I_INVALID_HID;
+ hid_t space = H5I_INVALID_HID;
+ hid_t root = H5I_INVALID_HID;
hsize_t dims[2];
- uint8_t dsetu8[F66_XDIM][F66_YDIM8], valu8bits;
- uint16_t dsetu16[F66_XDIM][F66_YDIM16], valu16bits;
- uint32_t dsetu32[F66_XDIM][F66_YDIM32], valu32bits;
- uint64_t dsetu64[F66_XDIM][F66_YDIM64], valu64bits;
- int8_t dset8[F66_XDIM][F66_YDIM8], val8bits;
- int16_t dset16[F66_XDIM][F66_YDIM16], val16bits;
- int32_t dset32[F66_XDIM][F66_YDIM32], val32bits;
- int64_t dset64[F66_XDIM][F66_YDIM64], val64bits;
- double dsetdbl[F66_XDIM][F66_YDIM8];
+
+ uint8_t **dsetu8 = NULL;
+ uint16_t **dsetu16 = NULL;
+ uint32_t **dsetu32 = NULL;
+ uint64_t **dsetu64 = NULL;
+ int8_t **dset8 = NULL;
+ int16_t **dset16 = NULL;
+ int32_t **dset32 = NULL;
+ int64_t **dset64 = NULL;
+ double **dsetdbl = NULL;
+
+ uint8_t valu8bits;
+ uint16_t valu16bits;
+ uint32_t valu32bits;
+ uint64_t valu64bits;
+ int8_t val8bits;
+ int16_t val16bits;
+ int32_t val32bits;
+ int64_t val64bits;
+
unsigned int i, j;
+ /* Create arrays */
+ H5TEST_ALLOCATE_2D_ARRAY(dsetu8, uint8_t, F66_XDIM, F66_YDIM8);
+ H5TEST_ALLOCATE_2D_ARRAY(dsetu16, uint16_t, F66_XDIM, F66_YDIM16);
+ H5TEST_ALLOCATE_2D_ARRAY(dsetu32, uint32_t, F66_XDIM, F66_YDIM32);
+ H5TEST_ALLOCATE_2D_ARRAY(dsetu64, uint64_t, F66_XDIM, F66_YDIM64);
+ H5TEST_ALLOCATE_2D_ARRAY(dset8, int8_t, F66_XDIM, F66_YDIM8);
+ H5TEST_ALLOCATE_2D_ARRAY(dset16, int16_t, F66_XDIM, F66_YDIM16);
+ H5TEST_ALLOCATE_2D_ARRAY(dset32, int32_t, F66_XDIM, F66_YDIM32);
+ H5TEST_ALLOCATE_2D_ARRAY(dset64, int64_t, F66_XDIM, F66_YDIM64);
+ H5TEST_ALLOCATE_2D_ARRAY(dsetdbl, double, F66_XDIM, F66_YDIM8);
+
fid = H5Fcreate(FILE69, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT);
root = H5Gopen2(fid, "/", H5P_DEFAULT);
@@ -7379,7 +7479,7 @@ gent_attr_intsize(void)
valu8bits = (uint8_t)(valu8bits << 1);
}
- H5Awrite(attr, H5T_NATIVE_UINT8, dsetu8);
+ H5Awrite(attr, H5T_NATIVE_UINT8, dsetu8[0]);
H5Sclose(space);
H5Aclose(attr);
@@ -7397,7 +7497,7 @@ gent_attr_intsize(void)
valu16bits = (uint16_t)(valu16bits << 1);
}
- H5Awrite(attr, H5T_NATIVE_UINT16, dsetu16);
+ H5Awrite(attr, H5T_NATIVE_UINT16, dsetu16[0]);
H5Sclose(space);
H5Aclose(attr);
@@ -7415,7 +7515,7 @@ gent_attr_intsize(void)
valu32bits <<= 1;
}
- H5Awrite(attr, H5T_NATIVE_UINT32, dsetu32);
+ H5Awrite(attr, H5T_NATIVE_UINT32, dsetu32[0]);
H5Sclose(space);
H5Aclose(attr);
@@ -7433,7 +7533,7 @@ gent_attr_intsize(void)
valu64bits <<= 1;
}
- H5Awrite(attr, H5T_NATIVE_UINT64, dsetu64);
+ H5Awrite(attr, H5T_NATIVE_UINT64, dsetu64[0]);
H5Sclose(space);
H5Aclose(attr);
@@ -7451,7 +7551,7 @@ gent_attr_intsize(void)
val8bits = (int8_t)(val8bits << 1);
}
- H5Awrite(attr, H5T_NATIVE_INT8, dset8);
+ H5Awrite(attr, H5T_NATIVE_INT8, dset8[0]);
H5Sclose(space);
H5Aclose(attr);
@@ -7469,7 +7569,7 @@ gent_attr_intsize(void)
val16bits = (int16_t)(val16bits << 1);
}
- H5Awrite(attr, H5T_NATIVE_INT16, dset16);
+ H5Awrite(attr, H5T_NATIVE_INT16, dset16[0]);
H5Sclose(space);
H5Aclose(attr);
@@ -7487,7 +7587,7 @@ gent_attr_intsize(void)
val32bits <<= 1;
}
- H5Awrite(attr, H5T_NATIVE_INT32, dset32);
+ H5Awrite(attr, H5T_NATIVE_INT32, dset32[0]);
H5Sclose(space);
H5Aclose(attr);
@@ -7505,7 +7605,7 @@ gent_attr_intsize(void)
val64bits <<= 1;
}
- H5Awrite(attr, H5T_NATIVE_INT64, dset64);
+ H5Awrite(attr, H5T_NATIVE_INT64, dset64[0]);
H5Sclose(space);
H5Aclose(attr);
@@ -7518,13 +7618,23 @@ gent_attr_intsize(void)
for(j = 0; j < dims[1]; j++)
dsetdbl[i][j] = 0.0001F * (float)j + (float)i;
- H5Awrite(attr, H5T_NATIVE_DOUBLE, dsetdbl);
+ H5Awrite(attr, H5T_NATIVE_DOUBLE, dsetdbl[0]);
H5Sclose(space);
H5Aclose(attr);
H5Gclose(root);
H5Fclose(fid);
+
+ HDfree(dsetu8);
+ HDfree(dsetu16);
+ HDfree(dsetu32);
+ HDfree(dsetu64);
+ HDfree(dset8);
+ HDfree(dset16);
+ HDfree(dset32);
+ HDfree(dset64);
+ HDfree(dsetdbl);
}
static void
@@ -7615,7 +7725,7 @@ static void
gent_charsets(void)
{
hid_t fid, did, sid;
- herr_t status;
+ herr_t H5_ATTR_NDEBUG_UNUSED status;
hsize_t dim[] = {1}; /* Dataspace dimensions */
typedef struct CharSetInfo {
const char *ascii_p_;
@@ -7689,7 +7799,7 @@ static void gent_compound_intsizes(void) {
Array1Struct *Array1;
hid_t Array1Structid; /* File datatype identifier */
- herr_t status; /* Error checking variable */
+ herr_t H5_ATTR_NDEBUG_UNUSED status; /* Error checking variable */
hsize_t dim[] = { F70_LENGTH }; /* Dataspace dimensions */
int m, n, o; /* Array init loop vars */
@@ -7959,14 +8069,16 @@ static void gent_compound_attr_intsizes(void) {
int64_t dset64[F70_XDIM][F70_YDIM64];
double dsetdbl[F70_XDIM][F70_YDIM8];
} Array1Struct;
- Array1Struct Array1[F70_LENGTH];
+ Array1Struct *Array1 = NULL;
hid_t Array1Structid; /* File datatype identifier */
- herr_t status; /* Error checking variable */
+ herr_t H5_ATTR_NDEBUG_UNUSED status; /* Error checking variable */
hsize_t dim[] = { F70_LENGTH }; /* Dataspace dimensions */
int m, n, o; /* Array init loop vars */
+ Array1 = (Array1Struct *)HDcalloc(F70_LENGTH, sizeof(Array1Struct));
+
/* Initialize the data in the arrays/datastructure */
for (m = 0; m < F70_LENGTH; m++) {
@@ -8198,6 +8310,8 @@ static void gent_compound_attr_intsizes(void) {
status = H5Fclose(fid);
HDassert(status >= 0);
+
+ HDfree(Array1);
}
static void gent_nested_compound_dt(void) { /* test nested data type */
@@ -8362,19 +8476,44 @@ static void gent_nested_compound_dt(void) { /* test nested data type */
static void
gent_intscalars(void)
{
- hid_t fid, dataset, space, tid;
+ hid_t fid = H5I_INVALID_HID;
+ hid_t dataset = H5I_INVALID_HID;
+ hid_t space = H5I_INVALID_HID;
+ hid_t tid = H5I_INVALID_HID;
hsize_t dims[2];
- uint8_t dsetu8[F73_XDIM][F73_YDIM8], valu8bits;
- uint16_t dsetu16[F73_XDIM][F73_YDIM16], valu16bits;
- uint32_t dsetu32[F73_XDIM][F73_YDIM32], valu32bits;
- uint64_t dsetu64[F73_XDIM][F73_YDIM64], valu64bits;
- int8_t dset8[F73_XDIM][F73_YDIM8], val8bits;
- int16_t dset16[F73_XDIM][F73_YDIM16], val16bits;
- int32_t dset32[F73_XDIM][F73_YDIM32], val32bits;
- int64_t dset64[F73_XDIM][F73_YDIM64], val64bits;
- double dsetdbl[F73_XDIM][F73_YDIM8];
+
+ uint8_t **dsetu8 = NULL;
+ uint16_t **dsetu16 = NULL;
+ uint32_t **dsetu32 = NULL;
+ uint64_t **dsetu64 = NULL;
+ int8_t **dset8 = NULL;
+ int16_t **dset16 = NULL;
+ int32_t **dset32 = NULL;
+ int64_t **dset64 = NULL;
+ double **dsetdbl = NULL;
+
+ uint8_t valu8bits;
+ uint16_t valu16bits;
+ uint32_t valu32bits;
+ uint64_t valu64bits;
+ int8_t val8bits;
+ int16_t val16bits;
+ int32_t val32bits;
+ int64_t val64bits;
+
unsigned int i, j;
+ /* Create arrays */
+ H5TEST_ALLOCATE_2D_ARRAY(dsetu8, uint8_t, F73_XDIM, F73_YDIM8);
+ H5TEST_ALLOCATE_2D_ARRAY(dsetu16, uint16_t, F73_XDIM, F73_YDIM16);
+ H5TEST_ALLOCATE_2D_ARRAY(dsetu32, uint32_t, F73_XDIM, F73_YDIM32);
+ H5TEST_ALLOCATE_2D_ARRAY(dsetu64, uint64_t, F73_XDIM, F73_YDIM64);
+ H5TEST_ALLOCATE_2D_ARRAY(dset8, int8_t, F73_XDIM, F73_YDIM8);
+ H5TEST_ALLOCATE_2D_ARRAY(dset16, int16_t, F73_XDIM, F73_YDIM16);
+ H5TEST_ALLOCATE_2D_ARRAY(dset32, int32_t, F73_XDIM, F73_YDIM32);
+ H5TEST_ALLOCATE_2D_ARRAY(dset64, int64_t, F73_XDIM, F73_YDIM64);
+ H5TEST_ALLOCATE_2D_ARRAY(dsetdbl, double, F73_XDIM, F73_YDIM8);
+
fid = H5Fcreate(FILE73, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT);
/* Dataset of 8 bits unsigned int */
@@ -8392,7 +8531,7 @@ gent_intscalars(void)
valu8bits = (uint8_t)(valu8bits << 1);
}
- H5Dwrite(dataset, tid, H5S_ALL, H5S_ALL, H5P_DEFAULT, dsetu8);
+ H5Dwrite(dataset, tid, H5S_ALL, H5S_ALL, H5P_DEFAULT, dsetu8[0]);
H5Sclose(space);
H5Dclose(dataset);
@@ -8411,7 +8550,7 @@ gent_intscalars(void)
valu16bits = (uint16_t)(valu16bits << 1);
}
- H5Dwrite(dataset, tid, H5S_ALL, H5S_ALL, H5P_DEFAULT, dsetu16);
+ H5Dwrite(dataset, tid, H5S_ALL, H5S_ALL, H5P_DEFAULT, dsetu16[0]);
H5Sclose(space);
H5Dclose(dataset);
@@ -8430,7 +8569,7 @@ gent_intscalars(void)
valu32bits <<= 1;
}
- H5Dwrite(dataset, tid, H5S_ALL, H5S_ALL, H5P_DEFAULT, dsetu32);
+ H5Dwrite(dataset, tid, H5S_ALL, H5S_ALL, H5P_DEFAULT, dsetu32[0]);
H5Sclose(space);
H5Dclose(dataset);
@@ -8449,7 +8588,7 @@ gent_intscalars(void)
valu64bits <<= 1;
}
- H5Dwrite(dataset, tid, H5S_ALL, H5S_ALL, H5P_DEFAULT, dsetu64);
+ H5Dwrite(dataset, tid, H5S_ALL, H5S_ALL, H5P_DEFAULT, dsetu64[0]);
H5Sclose(space);
H5Dclose(dataset);
@@ -8468,7 +8607,7 @@ gent_intscalars(void)
val8bits = (int8_t)(val8bits << 1);
}
- H5Dwrite(dataset, tid, H5S_ALL, H5S_ALL, H5P_DEFAULT, dset8);
+ H5Dwrite(dataset, tid, H5S_ALL, H5S_ALL, H5P_DEFAULT, dset8[0]);
H5Sclose(space);
H5Dclose(dataset);
@@ -8487,7 +8626,7 @@ gent_intscalars(void)
val16bits = (int16_t)(val16bits << 1);
}
- H5Dwrite(dataset, tid, H5S_ALL, H5S_ALL, H5P_DEFAULT, dset16);
+ H5Dwrite(dataset, tid, H5S_ALL, H5S_ALL, H5P_DEFAULT, dset16[0]);
H5Sclose(space);
H5Dclose(dataset);
@@ -8506,7 +8645,7 @@ gent_intscalars(void)
val32bits <<= 1;
}
- H5Dwrite(dataset, tid, H5S_ALL, H5S_ALL, H5P_DEFAULT, dset32);
+ H5Dwrite(dataset, tid, H5S_ALL, H5S_ALL, H5P_DEFAULT, dset32[0]);
H5Sclose(space);
H5Dclose(dataset);
@@ -8525,7 +8664,7 @@ gent_intscalars(void)
val64bits <<= 1;
}
- H5Dwrite(dataset, tid, H5S_ALL, H5S_ALL, H5P_DEFAULT, dset64);
+ H5Dwrite(dataset, tid, H5S_ALL, H5S_ALL, H5P_DEFAULT, dset64[0]);
H5Sclose(space);
H5Dclose(dataset);
@@ -8539,11 +8678,21 @@ gent_intscalars(void)
for(j = 0; j < dims[1]; j++)
dsetdbl[i][j] = 0.0001F * (float)j + (float)i;
- H5Dwrite(dataset, tid, H5S_ALL, H5S_ALL, H5P_DEFAULT, dsetdbl);
+ H5Dwrite(dataset, tid, H5S_ALL, H5S_ALL, H5P_DEFAULT, dsetdbl[0]);
H5Sclose(space);
H5Dclose(dataset);
H5Fclose(fid);
+
+ HDfree(dsetu8);
+ HDfree(dsetu16);
+ HDfree(dsetu32);
+ HDfree(dsetu64);
+ HDfree(dset8);
+ HDfree(dset16);
+ HDfree(dset32);
+ HDfree(dset64);
+ HDfree(dsetdbl);
}
/*-------------------------------------------------------------------------
@@ -8560,19 +8709,46 @@ gent_intscalars(void)
static void
gent_attr_intscalars(void)
{
- hid_t fid, attr, space, root, tid;
+ hid_t fid = H5I_INVALID_HID;
+ hid_t attr = H5I_INVALID_HID;
+ hid_t space = H5I_INVALID_HID;
+ hid_t root = H5I_INVALID_HID;
+ hid_t tid = H5I_INVALID_HID;
hsize_t dims[2];
- uint8_t dsetu8[F73_XDIM][F73_YDIM8], valu8bits;
- uint16_t dsetu16[F73_XDIM][F73_YDIM16], valu16bits;
- uint32_t dsetu32[F73_XDIM][F73_YDIM32], valu32bits;
- uint64_t dsetu64[F73_XDIM][F73_YDIM64], valu64bits;
- int8_t dset8[F73_XDIM][F73_YDIM8], val8bits;
- int16_t dset16[F73_XDIM][F73_YDIM16], val16bits;
- int32_t dset32[F73_XDIM][F73_YDIM32], val32bits;
- int64_t dset64[F73_XDIM][F73_YDIM64], val64bits;
- double dsetdbl[F73_XDIM][F73_YDIM8];
+
+
+ uint8_t **dsetu8 = NULL;
+ uint16_t **dsetu16 = NULL;
+ uint32_t **dsetu32 = NULL;
+ uint64_t **dsetu64 = NULL;
+ int8_t **dset8 = NULL;
+ int16_t **dset16 = NULL;
+ int32_t **dset32 = NULL;
+ int64_t **dset64 = NULL;
+ double **dsetdbl = NULL;
+
+ uint8_t valu8bits;
+ uint16_t valu16bits;
+ uint32_t valu32bits;
+ uint64_t valu64bits;
+ int8_t val8bits;
+ int16_t val16bits;
+ int32_t val32bits;
+ int64_t val64bits;
+
unsigned int i, j;
+ /* Create arrays */
+ H5TEST_ALLOCATE_2D_ARRAY(dsetu8, uint8_t, F73_XDIM, F73_YDIM8);
+ H5TEST_ALLOCATE_2D_ARRAY(dsetu16, uint16_t, F73_XDIM, F73_YDIM16);
+ H5TEST_ALLOCATE_2D_ARRAY(dsetu32, uint32_t, F73_XDIM, F73_YDIM32);
+ H5TEST_ALLOCATE_2D_ARRAY(dsetu64, uint64_t, F73_XDIM, F73_YDIM64);
+ H5TEST_ALLOCATE_2D_ARRAY(dset8, int8_t, F73_XDIM, F73_YDIM8);
+ H5TEST_ALLOCATE_2D_ARRAY(dset16, int16_t, F73_XDIM, F73_YDIM16);
+ H5TEST_ALLOCATE_2D_ARRAY(dset32, int32_t, F73_XDIM, F73_YDIM32);
+ H5TEST_ALLOCATE_2D_ARRAY(dset64, int64_t, F73_XDIM, F73_YDIM64);
+ H5TEST_ALLOCATE_2D_ARRAY(dsetdbl, double, F73_XDIM, F73_YDIM8);
+
fid = H5Fcreate(FILE74, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT);
root = H5Gopen2(fid, "/", H5P_DEFAULT);
@@ -8591,7 +8767,7 @@ gent_attr_intscalars(void)
valu8bits = (uint8_t)(valu8bits << 1);
}
- H5Awrite(attr, tid, dsetu8);
+ H5Awrite(attr, tid, dsetu8[0]);
H5Sclose(space);
H5Aclose(attr);
@@ -8610,7 +8786,7 @@ gent_attr_intscalars(void)
valu16bits = (uint16_t)(valu16bits << 1);
}
- H5Awrite(attr, tid, dsetu16);
+ H5Awrite(attr, tid, dsetu16[0]);
H5Sclose(space);
H5Aclose(attr);
@@ -8629,7 +8805,7 @@ gent_attr_intscalars(void)
valu32bits <<= 1;
}
- H5Awrite(attr, tid, dsetu32);
+ H5Awrite(attr, tid, dsetu32[0]);
H5Sclose(space);
H5Aclose(attr);
@@ -8648,7 +8824,7 @@ gent_attr_intscalars(void)
valu64bits <<= 1;
}
- H5Awrite(attr, tid, dsetu64);
+ H5Awrite(attr, tid, dsetu64[0]);
H5Sclose(space);
H5Aclose(attr);
@@ -8667,7 +8843,7 @@ gent_attr_intscalars(void)
val8bits = (int8_t)(val8bits << 1);
}
- H5Awrite(attr, tid, dset8);
+ H5Awrite(attr, tid, dset8[0]);
H5Sclose(space);
H5Aclose(attr);
@@ -8686,7 +8862,7 @@ gent_attr_intscalars(void)
val16bits = (int16_t)(val16bits << 1);
}
- H5Awrite(attr, tid, dset16);
+ H5Awrite(attr, tid, dset16[0]);
H5Sclose(space);
H5Aclose(attr);
@@ -8705,7 +8881,7 @@ gent_attr_intscalars(void)
val32bits <<= 1;
}
- H5Awrite(attr, tid, dset32);
+ H5Awrite(attr, tid, dset32[0]);
H5Sclose(space);
H5Aclose(attr);
@@ -8724,7 +8900,7 @@ gent_attr_intscalars(void)
val64bits <<= 1;
}
- H5Awrite(attr, tid, dset64);
+ H5Awrite(attr, tid, dset64[0]);
H5Sclose(space);
H5Aclose(attr);
@@ -8738,13 +8914,23 @@ gent_attr_intscalars(void)
for(j = 0; j < dims[1]; j++)
dsetdbl[i][j] = 0.0001F * (float)j + (float)i;
- H5Awrite(attr, tid, dsetdbl);
+ H5Awrite(attr, tid, dsetdbl[0]);
H5Sclose(space);
H5Aclose(attr);
H5Gclose(root);
H5Fclose(fid);
+
+ HDfree(dsetu8);
+ HDfree(dsetu16);
+ HDfree(dsetu32);
+ HDfree(dsetu64);
+ HDfree(dset8);
+ HDfree(dset16);
+ HDfree(dset32);
+ HDfree(dset64);
+ HDfree(dsetdbl);
}
/*-------------------------------------------------------------------------
@@ -8838,7 +9024,7 @@ static void gent_compound_int_array(void) {
Cmpd1Struct *Cmpd1;
hid_t Cmpd1Structid; /* File datatype identifier */
- herr_t status; /* Error checking variable */
+ herr_t H5_ATTR_NDEBUG_UNUSED status; /* Error checking variable */
hsize_t dim[] = { F76_LENGTH }; /* Dataspace dimensions */
int m, n; /* Array init loop vars */
@@ -9094,7 +9280,7 @@ static void gent_compound_ints(void) {
hid_t Cmpd1Structid; /* File datatype identifier */
hid_t Cmpd2Structid; /* File datatype identifier */
- herr_t status; /* Error checking variable */
+ herr_t H5_ATTR_NDEBUG_UNUSED status; /* Error checking variable */
hsize_t dim[] = { F77_LENGTH }; /* Dataspace dimensions */
int m; /* Array init loop vars */
@@ -9299,19 +9485,45 @@ static void gent_compound_ints(void) {
static void
gent_intattrscalars(void)
{
- hid_t fid, attr, dataset, space, tid;
+ hid_t fid = H5I_INVALID_HID;
+ hid_t attr = H5I_INVALID_HID;
+ hid_t dataset = H5I_INVALID_HID;
+ hid_t space = H5I_INVALID_HID;
+ hid_t tid = H5I_INVALID_HID;
hsize_t dims[2];
- uint8_t dsetu8[F73_XDIM][F73_YDIM8], valu8bits;
- uint16_t dsetu16[F73_XDIM][F73_YDIM16], valu16bits;
- uint32_t dsetu32[F73_XDIM][F73_YDIM32], valu32bits;
- uint64_t dsetu64[F73_XDIM][F73_YDIM64], valu64bits;
- int8_t dset8[F73_XDIM][F73_YDIM8], val8bits;
- int16_t dset16[F73_XDIM][F73_YDIM16], val16bits;
- int32_t dset32[F73_XDIM][F73_YDIM32], val32bits;
- int64_t dset64[F73_XDIM][F73_YDIM64], val64bits;
- double dsetdbl[F73_XDIM][F73_YDIM8];
+
+ uint8_t **dsetu8 = NULL;
+ uint16_t **dsetu16 = NULL;
+ uint32_t **dsetu32 = NULL;
+ uint64_t **dsetu64 = NULL;
+ int8_t **dset8 = NULL;
+ int16_t **dset16 = NULL;
+ int32_t **dset32 = NULL;
+ int64_t **dset64 = NULL;
+ double **dsetdbl = NULL;
+
+ uint8_t valu8bits;
+ uint16_t valu16bits;
+ uint32_t valu32bits;
+ uint64_t valu64bits;
+ int8_t val8bits;
+ int16_t val16bits;
+ int32_t val32bits;
+ int64_t val64bits;
+
unsigned int i, j;
+ /* Create arrays */
+ H5TEST_ALLOCATE_2D_ARRAY(dsetu8, uint8_t, F73_XDIM, F73_YDIM8);
+ H5TEST_ALLOCATE_2D_ARRAY(dsetu16, uint16_t, F73_XDIM, F73_YDIM16);
+ H5TEST_ALLOCATE_2D_ARRAY(dsetu32, uint32_t, F73_XDIM, F73_YDIM32);
+ H5TEST_ALLOCATE_2D_ARRAY(dsetu64, uint64_t, F73_XDIM, F73_YDIM64);
+ H5TEST_ALLOCATE_2D_ARRAY(dset8, int8_t, F73_XDIM, F73_YDIM8);
+ H5TEST_ALLOCATE_2D_ARRAY(dset16, int16_t, F73_XDIM, F73_YDIM16);
+ H5TEST_ALLOCATE_2D_ARRAY(dset32, int32_t, F73_XDIM, F73_YDIM32);
+ H5TEST_ALLOCATE_2D_ARRAY(dset64, int64_t, F73_XDIM, F73_YDIM64);
+ H5TEST_ALLOCATE_2D_ARRAY(dsetdbl, double, F73_XDIM, F73_YDIM8);
+
fid = H5Fcreate(FILE78, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT);
/* Dataset of 8 bits unsigned int */
@@ -9332,7 +9544,7 @@ gent_intattrscalars(void)
H5Dwrite(dataset, tid, H5S_ALL, H5S_ALL, H5P_DEFAULT, dsetu8);
/* Attribute of 8 bits unsigned int */
attr = H5Acreate2(dataset, F73_DATASETU08, tid, space, H5P_DEFAULT, H5P_DEFAULT);
- H5Awrite(attr, tid, dsetu8);
+ H5Awrite(attr, tid, dsetu8[0]);
H5Aclose(attr);
H5Sclose(space);
H5Dclose(dataset);
@@ -9355,7 +9567,7 @@ gent_intattrscalars(void)
H5Dwrite(dataset, tid, H5S_ALL, H5S_ALL, H5P_DEFAULT, dsetu16);
/* Attribute of 16 bits unsigned int */
attr = H5Acreate2(dataset, F73_DATASETU16, tid, space, H5P_DEFAULT, H5P_DEFAULT);
- H5Awrite(attr, tid, dsetu16);
+ H5Awrite(attr, tid, dsetu16[0]);
H5Aclose(attr);
H5Sclose(space);
H5Dclose(dataset);
@@ -9378,7 +9590,7 @@ gent_intattrscalars(void)
H5Dwrite(dataset, tid, H5S_ALL, H5S_ALL, H5P_DEFAULT, dsetu32);
/* Attribute of 32 bits unsigned int */
attr = H5Acreate2(dataset, F73_DATASETU32, tid, space, H5P_DEFAULT, H5P_DEFAULT);
- H5Awrite(attr, tid, dsetu32);
+ H5Awrite(attr, tid, dsetu32[0]);
H5Aclose(attr);
H5Sclose(space);
H5Dclose(dataset);
@@ -9401,7 +9613,7 @@ gent_intattrscalars(void)
H5Dwrite(dataset, tid, H5S_ALL, H5S_ALL, H5P_DEFAULT, dsetu64);
/* Attribute of 64 bits unsigned int */
attr = H5Acreate2(dataset, F73_DATASETU64, tid, space, H5P_DEFAULT, H5P_DEFAULT);
- H5Awrite(attr, tid, dsetu64);
+ H5Awrite(attr, tid, dsetu64[0]);
H5Aclose(attr);
H5Sclose(space);
H5Dclose(dataset);
@@ -9424,7 +9636,7 @@ gent_intattrscalars(void)
H5Dwrite(dataset, tid, H5S_ALL, H5S_ALL, H5P_DEFAULT, dset8);
/* Attribute of 8 bits signed int */
attr = H5Acreate2(dataset, F73_DATASETS08, tid, space, H5P_DEFAULT, H5P_DEFAULT);
- H5Awrite(attr, tid, dset8);
+ H5Awrite(attr, tid, dset8[0]);
H5Aclose(attr);
H5Sclose(space);
H5Dclose(dataset);
@@ -9447,7 +9659,7 @@ gent_intattrscalars(void)
H5Dwrite(dataset, tid, H5S_ALL, H5S_ALL, H5P_DEFAULT, dset16);
/* Attribute of 16 bits signed int */
attr = H5Acreate2(dataset, F73_DATASETS16, tid, space, H5P_DEFAULT, H5P_DEFAULT);
- H5Awrite(attr, tid, dset16);
+ H5Awrite(attr, tid, dset16[0]);
H5Aclose(attr);
H5Sclose(space);
H5Dclose(dataset);
@@ -9470,7 +9682,7 @@ gent_intattrscalars(void)
H5Dwrite(dataset, tid, H5S_ALL, H5S_ALL, H5P_DEFAULT, dset32);
/* Attribute of 32 bits signed int */
attr = H5Acreate2(dataset, F73_DATASETS32, tid, space, H5P_DEFAULT, H5P_DEFAULT);
- H5Awrite(attr, tid, dset32);
+ H5Awrite(attr, tid, dset32[0]);
H5Aclose(attr);
H5Sclose(space);
H5Dclose(dataset);
@@ -9493,7 +9705,7 @@ gent_intattrscalars(void)
H5Dwrite(dataset, tid, H5S_ALL, H5S_ALL, H5P_DEFAULT, dset64);
/* Attribute of 64 bits signed int */
attr = H5Acreate2(dataset, F73_DATASETS64, tid, space, H5P_DEFAULT, H5P_DEFAULT);
- H5Awrite(attr, tid, dset64);
+ H5Awrite(attr, tid, dset64[0]);
H5Aclose(attr);
H5Sclose(space);
H5Dclose(dataset);
@@ -9511,11 +9723,22 @@ gent_intattrscalars(void)
H5Dwrite(dataset, tid, H5S_ALL, H5S_ALL, H5P_DEFAULT, dsetdbl);
/* Attribute of double */
attr = H5Acreate2(dataset, F73_DUMMYDBL, tid, space, H5P_DEFAULT, H5P_DEFAULT);
- H5Awrite(attr, tid, dsetdbl);
+ H5Awrite(attr, tid, dsetdbl[0]);
+
H5Aclose(attr);
H5Sclose(space);
H5Dclose(dataset);
H5Fclose(fid);
+
+ HDfree(dsetu8);
+ HDfree(dsetu16);
+ HDfree(dsetu32);
+ HDfree(dsetu64);
+ HDfree(dset8);
+ HDfree(dset16);
+ HDfree(dset32);
+ HDfree(dset64);
+ HDfree(dsetdbl);
}
/*-------------------------------------------------------------------------
@@ -9531,19 +9754,66 @@ gent_intattrscalars(void)
static void
gent_intsattrs(void)
{
- hid_t fid, attr, dataset, space, aspace;
+ hid_t fid = H5I_INVALID_HID;
+ hid_t attr = H5I_INVALID_HID;
+ hid_t dataset = H5I_INVALID_HID;
+ hid_t space = H5I_INVALID_HID;
+ hid_t aspace = H5I_INVALID_HID;
hsize_t dims[2], adims[1];
- uint8_t dsetu8[F66_XDIM][F66_YDIM8], asetu8[F66_XDIM*F66_YDIM8], valu8bits;
- uint16_t dsetu16[F66_XDIM][F66_YDIM16], asetu16[F66_XDIM*F66_YDIM16], valu16bits;
- uint32_t dsetu32[F66_XDIM][F66_YDIM32], asetu32[F66_XDIM*F66_YDIM32], valu32bits;
- uint64_t dsetu64[F66_XDIM][F66_YDIM64], asetu64[F66_XDIM*F66_YDIM64], valu64bits;
- int8_t dset8[F66_XDIM][F66_YDIM8], aset8[F66_XDIM*F66_YDIM8], val8bits;
- int16_t dset16[F66_XDIM][F66_YDIM16], aset16[F66_XDIM*F66_YDIM16], val16bits;
- int32_t dset32[F66_XDIM][F66_YDIM32], aset32[F66_XDIM*F66_YDIM32], val32bits;
- int64_t dset64[F66_XDIM][F66_YDIM64], aset64[F66_XDIM*F66_YDIM64], val64bits;
- double dsetdbl[F66_XDIM][F66_YDIM8], asetdbl[F66_XDIM*F66_YDIM8];
+
+
+ uint8_t **dsetu8 = NULL;
+ uint16_t **dsetu16 = NULL;
+ uint32_t **dsetu32 = NULL;
+ uint64_t **dsetu64 = NULL;
+ int8_t **dset8 = NULL;
+ int16_t **dset16 = NULL;
+ int32_t **dset32 = NULL;
+ int64_t **dset64 = NULL;
+ double **dsetdbl = NULL;
+
+ uint8_t *asetu8 = NULL;
+ uint16_t *asetu16 = NULL;
+ uint32_t *asetu32 = NULL;
+ uint64_t *asetu64 = NULL;
+ int8_t *aset8 = NULL;
+ int16_t *aset16 = NULL;
+ int32_t *aset32 = NULL;
+ int64_t *aset64 = NULL;
+ double *asetdbl = NULL;
+
+ uint8_t valu8bits;
+ uint16_t valu16bits;
+ uint32_t valu32bits;
+ uint64_t valu64bits;
+ int8_t val8bits;
+ int16_t val16bits;
+ int32_t val32bits;
+ int64_t val64bits;
+
unsigned int i, j;
+ /* Create arrays */
+ H5TEST_ALLOCATE_2D_ARRAY(dsetu8, uint8_t, F66_XDIM, F66_YDIM8);
+ H5TEST_ALLOCATE_2D_ARRAY(dsetu16, uint16_t, F66_XDIM, F66_YDIM16);
+ H5TEST_ALLOCATE_2D_ARRAY(dsetu32, uint32_t, F66_XDIM, F66_YDIM32);
+ H5TEST_ALLOCATE_2D_ARRAY(dsetu64, uint64_t, F66_XDIM, F66_YDIM64);
+ H5TEST_ALLOCATE_2D_ARRAY(dset8, int8_t, F66_XDIM, F66_YDIM8);
+ H5TEST_ALLOCATE_2D_ARRAY(dset16, int16_t, F66_XDIM, F66_YDIM16);
+ H5TEST_ALLOCATE_2D_ARRAY(dset32, int32_t, F66_XDIM, F66_YDIM32);
+ H5TEST_ALLOCATE_2D_ARRAY(dset64, int64_t, F66_XDIM, F66_YDIM64);
+ H5TEST_ALLOCATE_2D_ARRAY(dsetdbl, double, F66_XDIM, F66_YDIM8);
+
+ asetu8 = HDcalloc(F66_XDIM * F66_YDIM8, sizeof(uint8_t));
+ asetu16 = HDcalloc(F66_XDIM * F66_YDIM16, sizeof(uint16_t));
+ asetu32 = HDcalloc(F66_XDIM * F66_YDIM32, sizeof(uint32_t));
+ asetu64 = HDcalloc(F66_XDIM * F66_YDIM64, sizeof(uint64_t));
+ aset8 = HDcalloc(F66_XDIM * F66_YDIM8, sizeof(int8_t));
+ aset16 = HDcalloc(F66_XDIM * F66_YDIM16, sizeof(int16_t));
+ aset32 = HDcalloc(F66_XDIM * F66_YDIM32, sizeof(int32_t));
+ aset64 = HDcalloc(F66_XDIM * F66_YDIM64, sizeof(int64_t));
+ asetdbl = HDcalloc(F66_XDIM * F66_YDIM8, sizeof(double));
+
fid = H5Fcreate(FILE79, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT);
/* Dataset of 8 bits unsigned int */
@@ -9562,7 +9832,7 @@ gent_intsattrs(void)
valu8bits = (uint8_t)(valu8bits << 1);
}
- H5Dwrite(dataset, H5T_NATIVE_UINT8, H5S_ALL, H5S_ALL, H5P_DEFAULT, dsetu8);
+ H5Dwrite(dataset, H5T_NATIVE_UINT8, H5S_ALL, H5S_ALL, H5P_DEFAULT, dsetu8[0]);
/* Attribute of 8 bits unsigned int */
adims[0] = F66_XDIM * F66_YDIM8;
aspace = H5Screate_simple(1, adims, NULL);
@@ -9589,7 +9859,7 @@ gent_intsattrs(void)
valu16bits = (uint16_t)(valu16bits << 1);
}
- H5Dwrite(dataset, H5T_NATIVE_UINT16, H5S_ALL, H5S_ALL, H5P_DEFAULT, dsetu16);
+ H5Dwrite(dataset, H5T_NATIVE_UINT16, H5S_ALL, H5S_ALL, H5P_DEFAULT, dsetu16[0]);
/* Attribute of 16 bits unsigned int */
adims[0] = F66_XDIM * F66_YDIM16;
aspace = H5Screate_simple(1, adims, NULL);
@@ -9616,7 +9886,7 @@ gent_intsattrs(void)
valu32bits <<= 1;
}
- H5Dwrite(dataset, H5T_NATIVE_UINT32, H5S_ALL, H5S_ALL, H5P_DEFAULT, dsetu32);
+ H5Dwrite(dataset, H5T_NATIVE_UINT32, H5S_ALL, H5S_ALL, H5P_DEFAULT, dsetu32[0]);
/* Attribute of 32 bits unsigned int */
adims[0] = F66_XDIM * F66_YDIM32;
aspace = H5Screate_simple(1, adims, NULL);
@@ -9643,7 +9913,7 @@ gent_intsattrs(void)
valu64bits <<= 1;
}
- H5Dwrite(dataset, H5T_NATIVE_UINT64, H5S_ALL, H5S_ALL, H5P_DEFAULT, dsetu64);
+ H5Dwrite(dataset, H5T_NATIVE_UINT64, H5S_ALL, H5S_ALL, H5P_DEFAULT, dsetu64[0]);
/* Attribute of 64 bits unsigned int */
adims[0] = F66_XDIM * F66_YDIM64;
aspace = H5Screate_simple(1, adims, NULL);
@@ -9670,7 +9940,7 @@ gent_intsattrs(void)
val8bits = (int8_t)(val8bits << 1);
}
- H5Dwrite(dataset, H5T_NATIVE_INT8, H5S_ALL, H5S_ALL, H5P_DEFAULT, dset8);
+ H5Dwrite(dataset, H5T_NATIVE_INT8, H5S_ALL, H5S_ALL, H5P_DEFAULT, dset8[0]);
/* Attribute of 8 bits signed int */
adims[0] = F66_XDIM * F66_YDIM8;
aspace = H5Screate_simple(1, adims, NULL);
@@ -9697,7 +9967,7 @@ gent_intsattrs(void)
val16bits = (int16_t)(val16bits << 1);
}
- H5Dwrite(dataset, H5T_NATIVE_INT16, H5S_ALL, H5S_ALL, H5P_DEFAULT, dset16);
+ H5Dwrite(dataset, H5T_NATIVE_INT16, H5S_ALL, H5S_ALL, H5P_DEFAULT, dset16[0]);
/* Attribute of 16 bits signed int */
adims[0] = F66_XDIM * F66_YDIM16;
aspace = H5Screate_simple(1, adims, NULL);
@@ -9724,7 +9994,7 @@ gent_intsattrs(void)
val32bits <<= 1;
}
- H5Dwrite(dataset, H5T_NATIVE_INT32, H5S_ALL, H5S_ALL, H5P_DEFAULT, dset32);
+ H5Dwrite(dataset, H5T_NATIVE_INT32, H5S_ALL, H5S_ALL, H5P_DEFAULT, dset32[0]);
/* Attribute of 32 bits signed int */
adims[0] = F66_XDIM * F66_YDIM32;
aspace = H5Screate_simple(1, adims, NULL);
@@ -9751,7 +10021,7 @@ gent_intsattrs(void)
val64bits <<= 1;
}
- H5Dwrite(dataset, H5T_NATIVE_INT64, H5S_ALL, H5S_ALL, H5P_DEFAULT, dset64);
+ H5Dwrite(dataset, H5T_NATIVE_INT64, H5S_ALL, H5S_ALL, H5P_DEFAULT, dset64[0]);
/* Attribute of 64 bits signed int */
adims[0] = F66_XDIM * F66_YDIM64;
aspace = H5Screate_simple(1, adims, NULL);
@@ -9773,7 +10043,7 @@ gent_intsattrs(void)
asetdbl[i*dims[1]+j] = dsetdbl[i][j];
}
- H5Dwrite(dataset, H5T_NATIVE_DOUBLE, H5S_ALL, H5S_ALL, H5P_DEFAULT, dsetdbl);
+ H5Dwrite(dataset, H5T_NATIVE_DOUBLE, H5S_ALL, H5S_ALL, H5P_DEFAULT, dsetdbl[0]);
/* Attribute of double */
adims[0] = F66_XDIM * F66_YDIM8;
aspace = H5Screate_simple(1, adims, NULL);
@@ -9784,6 +10054,26 @@ gent_intsattrs(void)
H5Sclose(space);
H5Dclose(dataset);
H5Fclose(fid);
+
+ HDfree(dsetu8);
+ HDfree(dsetu16);
+ HDfree(dsetu32);
+ HDfree(dsetu64);
+ HDfree(dset8);
+ HDfree(dset16);
+ HDfree(dset32);
+ HDfree(dset64);
+ HDfree(dsetdbl);
+
+ HDfree(asetu8);
+ HDfree(asetu16);
+ HDfree(asetu32);
+ HDfree(asetu64);
+ HDfree(aset8);
+ HDfree(aset16);
+ HDfree(aset32);
+ HDfree(aset64);
+ HDfree(asetdbl);
}
static void gent_bitnopaquefields(void)
@@ -9797,7 +10087,7 @@ static void gent_bitnopaquefields(void)
uint64_t d;
} s_t;
- hid_t file, grp=-1, type=-1, space=-1, dset=-1;
+ hid_t file_id=H5I_INVALID_HID, grp=H5I_INVALID_HID, type=H5I_INVALID_HID, space=H5I_INVALID_HID, dset=H5I_INVALID_HID;
size_t i;
hsize_t nelmts = F80_DIM32;
uint8_t buf[F80_DIM32]; /* bitfield, opaque */
@@ -9806,15 +10096,15 @@ static void gent_bitnopaquefields(void)
uint64_t buf4[F80_DIM32]; /* bitfield, opaque */
s_t buf5[F80_DIM32]; /* compound */
- file = H5Fcreate(FILE80, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT);
+ file_id = H5Fcreate(FILE80, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT);
- if ((grp = H5Gcreate2(file, "bittypetests", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) >= 0) {
+ if ((grp = H5Gcreate2(file_id, "bittypetests", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) >= 0) {
/* bitfield_1 */
if ((type = H5Tcopy(H5T_STD_B8LE)) >= 0) {
if ((space = H5Screate_simple(1, &nelmts, NULL)) >= 0) {
if ((dset = H5Dcreate2(grp, "bitfield_1", type, space, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) >= 0) {
for (i = 0; i < nelmts; i++) {
- buf[i] = (uint8_t)0xff ^ (uint8_t)i;
+ buf[i] = (uint8_t)(0xff ^ i);
}
H5Dwrite(dset, type, H5S_ALL, H5S_ALL, H5P_DEFAULT, buf);
H5Dclose(dset);
@@ -9829,7 +10119,7 @@ static void gent_bitnopaquefields(void)
if ((space = H5Screate_simple(1, &nelmts, NULL)) >= 0) {
if ((dset = H5Dcreate2(grp, "bitfield_2", type, space, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) >= 0) {
for (i = 0; i < nelmts; i++) {
- buf2[i] = (uint16_t)0xffff ^ (uint16_t)(i * 16);
+ buf2[i] = (uint16_t)(0xffff ^ (i * 16));
}
H5Dwrite(dset, type, H5S_ALL, H5S_ALL, H5P_DEFAULT, buf2);
H5Dclose(dset);
@@ -9872,14 +10162,14 @@ static void gent_bitnopaquefields(void)
H5Gclose(grp);
}
- if ((grp = H5Gcreate2(file, "opaquetypetests", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) >= 0) {
+ if ((grp = H5Gcreate2(file_id, "opaquetypetests", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) >= 0) {
/* opaque_1 */
if ((type = H5Tcreate(H5T_OPAQUE, 1)) >= 0) {
if ((H5Tset_tag(type, "1-byte opaque type")) >= 0) {
if ((space = H5Screate_simple(1, &nelmts, NULL)) >= 0) {
if ((dset = H5Dcreate2(grp, "opaque_1", type, space, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) >= 0) {
for(i = 0; i < nelmts; i++)
- buf[i] = (uint8_t)0xff ^ (uint8_t)i;
+ H5_CHECKED_ASSIGN(buf[i], uint8_t, 0xff ^ i, size_t);
H5Dwrite(dset, type, H5S_ALL, H5S_ALL, H5P_DEFAULT, buf);
H5Dclose(dset);
}
@@ -9895,7 +10185,7 @@ static void gent_bitnopaquefields(void)
if ((space = H5Screate_simple(1, &nelmts, NULL)) >= 0) {
if ((dset = H5Dcreate2(grp, "opaque_2", type, space, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) >= 0) {
for(i = 0; i < nelmts; i++)
- buf2[i] = (uint16_t)0xffff ^ (uint16_t)(i * 16);
+ H5_CHECKED_ASSIGN(buf2[i], uint16_t, 0xffff ^ (i * 16), size_t);
H5Dwrite(dset, type, H5S_ALL, H5S_ALL, H5P_DEFAULT, buf2);
H5Dclose(dset);
@@ -9908,7 +10198,7 @@ static void gent_bitnopaquefields(void)
H5Gclose(grp);
}
- if ((grp = H5Gcreate2(file, "cmpdtypetests", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) >= 0) {
+ if ((grp = H5Gcreate2(file_id, "cmpdtypetests", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) >= 0) {
/* compound_1 */
if ((type = H5Tcreate(H5T_COMPOUND, sizeof(s_t))) >= 0) {
H5Tinsert(type, "a", HOFFSET(s_t, a), H5T_STD_B8LE);
@@ -9918,8 +10208,8 @@ static void gent_bitnopaquefields(void)
if ((space = H5Screate_simple(1, &nelmts, NULL)) >= 0) {
if ((dset = H5Dcreate2(grp, "compound_1", type, space, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) >= 0) {
for(i = 0; i < nelmts; i++) {
- buf5[i].a = (uint8_t)0xff ^ (uint8_t)i;
- buf5[i].b = (uint16_t)0xffff ^ (uint16_t)(i * 16);
+ H5_CHECKED_ASSIGN(buf5[i].a, uint8_t, 0xff ^ i, size_t);
+ H5_CHECKED_ASSIGN(buf5[i].b, uint16_t, 0xffff ^ (i * 16), size_t);
buf5[i].c = (uint32_t)0xffffffff ^ (uint32_t)(i * 32);
buf5[i].d = (uint64_t)0xffffffffffffffff ^ (uint64_t)(i * 64);
}
@@ -9934,7 +10224,7 @@ static void gent_bitnopaquefields(void)
H5Gclose(grp);
}
- H5Fclose(file);
+ H5Fclose(file_id);
}
/*-------------------------------------------------------------------------
@@ -10033,9 +10323,9 @@ static void gent_compound_complex2(void)
compound *buf; /* compound */
- hid_t file, type=-1, space=-1, dset=-1;
+ hid_t file, type=H5I_INVALID_HID, space=H5I_INVALID_HID, dset=H5I_INVALID_HID;
hid_t dset_array_a, dset_array_b, dset_array_c;
- hid_t cmpd_tid1 = -1, cmpd_tid2 = -1, cmpd_tid3 = -1;
+ hid_t cmpd_tid1 = H5I_INVALID_HID, cmpd_tid2 = H5I_INVALID_HID, cmpd_tid3 = H5I_INVALID_HID;
size_t i;
size_t j, k;
unsigned dset_array_ndims;
@@ -10321,7 +10611,7 @@ static void gent_vlenstr_array(void)
};
const char *buffer[F83_DIM*F83_ARRAYDIM];
- hid_t file, type=-1, space=-1, dset=-1;
+ hid_t file, type=H5I_INVALID_HID, space=H5I_INVALID_HID, dset=H5I_INVALID_HID;
hid_t cmpd_tid1, array_tid;
int i, j;
@@ -10396,7 +10686,8 @@ static void gent_udfilter(void)
hsize_t dims1[RANK] = {DIM1,DIM2};
hsize_t chunk_dims[RANK] = {CDIM1,CDIM2};
int buf1[DIM1][DIM2];
- int i, j, n, ret;
+ int i, j, n;
+ int H5_ATTR_NDEBUG_UNUSED ret;
for(i=n=0; i<DIM1; i++){
for(j=0; j<DIM2; j++){
@@ -10488,7 +10779,7 @@ H5Z_filter_dynlibud(unsigned int flags, size_t cd_nelmts,
/* Subtract the original value with MULTIPLIER */
while(buf_left > 0) {
char temp = *int_ptr;
- *int_ptr = temp - MULTIPLIER;
+ *int_ptr = (int8_t)(temp - MULTIPLIER);
int_ptr++;
buf_left -= sizeof(*int_ptr);
} /* end while */
@@ -10497,7 +10788,7 @@ H5Z_filter_dynlibud(unsigned int flags, size_t cd_nelmts,
/* Add the original value with MULTIPLIER */
while(buf_left > 0) {
char temp = *int_ptr;
- *int_ptr = temp + MULTIPLIER;
+ *int_ptr = (int8_t)(temp + MULTIPLIER);
int_ptr++;
buf_left -= sizeof(*int_ptr);
} /* end while */
diff --git a/tools/test/h5dump/testh5dump.sh.in b/tools/test/h5dump/testh5dump.sh.in
index 507556f..1704e1e 100644
--- a/tools/test/h5dump/testh5dump.sh.in
+++ b/tools/test/h5dump/testh5dump.sh.in
@@ -371,11 +371,8 @@ ${SRC_H5DUMP_ERRORFILES}/tall-1.err
${SRC_H5DUMP_ERRORFILES}/tall-2A.err
${SRC_H5DUMP_ERRORFILES}/tall-2A0.err
${SRC_H5DUMP_ERRORFILES}/tall-2B.err
-${SRC_H5DUMP_ERRORFILES}/tarray1_big.err
${SRC_H5DUMP_ERRORFILES}/tattr-3.err
-${SRC_H5DUMP_ERRORFILES}/tattrregR.err
${SRC_H5DUMP_ERRORFILES}/tcomp-3.err
-${SRC_H5DUMP_ERRORFILES}/tdataregR.err
${SRC_H5DUMP_ERRORFILES}/tdset-2.err
${SRC_H5DUMP_ERRORFILES}/texceedsubblock.err
${SRC_H5DUMP_ERRORFILES}/texceedsubcount.err
@@ -461,14 +458,14 @@ TESTING() {
TOOLTEST() {
# check if caseless compare and diff requested
if [ "$1" = ignorecase ]; then
- caseless="-i"
- # replace cmp with diff which runs much longer.
- xCMP="$DIFF -i"
- shift
+ caseless="-i"
+ # replace cmp with diff which runs much longer.
+ xCMP="$DIFF -i"
+ shift
else
- caseless=""
- # stick with faster cmp if ignorecase is not requested.
- xCMP="$CMP"
+ caseless=""
+ # stick with faster cmp if ignorecase is not requested.
+ xCMP="$CMP"
fi
expect="$TESTDIR/$1"
@@ -481,8 +478,8 @@ TOOLTEST() {
# Run test.
TESTING $DUMPER $@
(
- cd $TESTDIR
- $RUNSERIAL $DUMPER_BIN "$@"
+ cd $TESTDIR
+ $RUNSERIAL $DUMPER_BIN "$@"
) >$actual 2>$actual_err
# save actual and actual_err in case they are needed later.
@@ -491,24 +488,24 @@ TOOLTEST() {
cp $actual_err $actual_err_sav
STDERR_FILTER $actual_err
- if [ ! -f $expect ]; then
- # Create the expect file if it doesn't yet exist.
- echo " CREATED"
- cp $actual $expect
- echo " Expected result (*.ddl) missing"
- nerrors="`expr $nerrors + 1`"
+ if [ ! -f $expect ]; then
+ # 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 $xCMP $expect $actual > /dev/null 2>&1 ; then
- echo " PASSED"
+ echo " PASSED"
else
- echo "*FAILED*"
- echo " Expected result (*.ddl) differs from actual result (*.out)"
- nerrors="`expr $nerrors + 1`"
- test yes = "$verbose" && $DIFF $caseless $expect $actual |sed 's/^/ /'
+ echo "*FAILED*"
+ echo " Expected result (*.ddl) differs from actual result (*.out)"
+ nerrors="`expr $nerrors + 1`"
+ test yes = "$verbose" && $DIFF $caseless $expect $actual |sed 's/^/ /'
fi
# Clean up output file
if test -z "$HDF5_NOCLEANUP"; then
- rm -f $actual $actual_err $actual_sav $actual_err_sav $actual_ext
+ rm -f $actual $actual_err $actual_sav $actual_err_sav $actual_ext
fi
}
@@ -530,41 +527,41 @@ TOOLTEST2() {
# Run test.
TESTING $DUMPER $@
(
- cd $TESTDIR
- $RUNSERIAL $DUMPER_BIN "$@"
+ cd $TESTDIR
+ $RUNSERIAL $DUMPER_BIN "$@"
) >$actual 2>$actual_err
if [ ! -f $expect ]; then
- # 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; then
- if [ ! -f $expectdata ]; then
- # Create the expect data file if it doesn't yet exist.
+ # Create the expect file if it doesn't yet exist.
echo " CREATED"
- cp $actualdata $expectdata
- echo " Expected data (*.exp) missing"
+ cp $actual $expect
+ echo " Expected result (*.ddl) missing"
nerrors="`expr $nerrors + 1`"
- elif $CMP $expectdata $actualdata; then
- echo " PASSED"
- else
+ elif $CMP $expect $actual; then
+ if [ ! -f $expectdata ]; then
+ # Create the expect data file if it doesn't yet exist.
+ echo " CREATED"
+ cp $actualdata $expectdata
+ echo " Expected data (*.exp) missing"
+ nerrors="`expr $nerrors + 1`"
+ elif $CMP $expectdata $actualdata; then
+ echo " PASSED"
+ else
+ echo "*FAILED*"
+ echo " Expected datafile (*.exp) differs from actual datafile (*.txt)"
+ nerrors="`expr $nerrors + 1`"
+ test yes = "$verbose" && $DIFF $expectdata $actualdata |sed 's/^/ /'
+ fi
+ else
echo "*FAILED*"
- echo " Expected datafile (*.exp) differs from actual datafile (*.txt)"
+ echo " Expected result (*.ddl) differs from actual result (*.out)"
nerrors="`expr $nerrors + 1`"
- test yes = "$verbose" && $DIFF $expectdata $actualdata |sed 's/^/ /'
- fi
- else
- echo "*FAILED*"
- echo " Expected result (*.ddl) differs from actual result (*.out)"
- nerrors="`expr $nerrors + 1`"
- test yes = "$verbose" && $DIFF $expect $actual |sed 's/^/ /'
+ test yes = "$verbose" && $DIFF $expect $actual |sed 's/^/ /'
fi
# Clean up output file
if test -z "$HDF5_NOCLEANUP"; then
- rm -f $actual $actualdata $actual_err
+ rm -f $actual $actualdata $actual_err
fi
}
@@ -588,56 +585,55 @@ TOOLTEST2A() {
# Run test.
TESTING $DUMPER $@
(
- cd $TESTDIR
- $RUNSERIAL $DUMPER_BIN "$@"
+ cd $TESTDIR
+ $RUNSERIAL $DUMPER_BIN "$@"
) >$actual 2>$actual_err
if [ ! -f $expect ]; then
- # 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; then
- if [ ! -f $expectdata ]; then
- # Create the expect data file if it doesn't yet exist.
+ # Create the expect file if it doesn't yet exist.
echo " CREATED"
- cp $actualdata $expectdata
- echo " Expected data (*.exp) missing"
+ cp $actual $expect
+ echo " Expected result (*.ddl) missing"
nerrors="`expr $nerrors + 1`"
- elif $DIFF $expectdata $actualdata; then
- if [ ! -f $expectmeta ]; then
- # Create the expect meta file if it doesn't yet exist.
- echo " CREATED"
- cp $actualmeta $expectmeta
- echo " Expected metafile (*.ddl) missing"
- nerrors="`expr $nerrors + 1`"
- elif $CMP $expectmeta $actualmeta; then
- echo " PASSED"
+ elif $CMP $expect $actual; then
+ if [ ! -f $expectdata ]; then
+ # Create the expect data file if it doesn't yet exist.
+ echo " CREATED"
+ cp $actualdata $expectdata
+ echo " Expected data (*.exp) missing"
+ nerrors="`expr $nerrors + 1`"
+ elif $DIFF $expectdata $actualdata; then
+ if [ ! -f $expectmeta ]; then
+ # Create the expect meta file if it doesn't yet exist.
+ echo " CREATED"
+ cp $actualmeta $expectmeta
+ echo " Expected metafile (*.ddl) missing"
+ nerrors="`expr $nerrors + 1`"
+ elif $CMP $expectmeta $actualmeta; then
+ echo " PASSED"
+ else
+ echo "*FAILED*"
+ echo " Expected metafile (*.ddl) differs from actual metafile (*.txt)"
+ nerrors="`expr $nerrors + 1`"
+ test yes = "$verbose" && $DIFF $expectmeta $actualmeta |sed 's/^/ /'
+ fi
else
- echo "*FAILED*"
- echo " Expected metafile (*.ddl) differs from actual metafile (*.txt)"
- nerrors="`expr $nerrors + 1`"
- test yes = "$verbose" && $DIFF $expectmeta $actualmeta |sed 's/^/ /'
+ echo "*FAILED*"
+ echo " Expected datafile (*.exp) differs from actual datafile (*.txt)"
+ nerrors="`expr $nerrors + 1`"
+ test yes = "$verbose" && $DIFF $expectdata $actualdata |sed 's/^/ /'
fi
- else
+ else
echo "*FAILED*"
- echo " Expected datafile (*.exp) differs from actual datafile (*.txt)"
+ echo " Expected result (*.ddl) differs from actual result (*.out)"
nerrors="`expr $nerrors + 1`"
- test yes = "$verbose" && $DIFF $expectdata $actualdata |sed 's/^/ /'
- fi
- else
- echo "*FAILED*"
- echo " Expected result (*.ddl) differs from actual result (*.out)"
- nerrors="`expr $nerrors + 1`"
- test yes = "$verbose" && $DIFF $expect $actual |sed 's/^/ /'
+ test yes = "$verbose" && $DIFF $expect $actual |sed 's/^/ /'
fi
# Clean up output file
if test -z "$HDF5_NOCLEANUP"; then
- rm -f $actual $actualdata $actual_err $actualmeta
+ rm -f $actual $actualdata $actual_err $actualmeta
fi
-
}
# same as TOOLTEST2 but only compares the generated data file to the expected data file
@@ -654,28 +650,28 @@ TOOLTEST2B() {
# Run test.
TESTING $DUMPER $@
(
- cd $TESTDIR
- $RUNSERIAL $DUMPER_BIN "$@"
+ cd $TESTDIR
+ $RUNSERIAL $DUMPER_BIN "$@"
) >$actual 2>$actual_err
if [ ! -f $expectdata ]; then
- # Create the expect data file if it doesn't yet exist.
- echo " CREATED"
- cp $actualdata $expectdata
- echo " Expected data (*.exp) missing"
- nerrors="`expr $nerrors + 1`"
+ # Create the expect data file if it doesn't yet exist.
+ echo " CREATED"
+ cp $actualdata $expectdata
+ echo " Expected data (*.exp) missing"
+ nerrors="`expr $nerrors + 1`"
elif $CMP $expectdata $actualdata; then
- echo " PASSED"
+ echo " PASSED"
else
- echo "*FAILED*"
- echo " Expected datafile (*.exp) differs from actual datafile (*.txt)"
- nerrors="`expr $nerrors + 1`"
- test yes = "$verbose" && $DIFF $expectdata $actualdata |sed 's/^/ /'
+ echo "*FAILED*"
+ echo " Expected datafile (*.exp) differs from actual datafile (*.txt)"
+ nerrors="`expr $nerrors + 1`"
+ test yes = "$verbose" && $DIFF $expectdata $actualdata |sed 's/^/ /'
fi
# Clean up output file
if test -z "$HDF5_NOCLEANUP"; then
- rm -f $actual $actualdata $actual_err
+ rm -f $actual $actualdata $actual_err
fi
}
@@ -695,8 +691,8 @@ TOOLTEST3() {
# Run test.
TESTING $DUMPER $@
(
- cd $TESTDIR
- $RUNSERIAL $DUMPER_BIN "$@"
+ cd $TESTDIR
+ $RUNSERIAL $DUMPER_BIN "$@"
) >$actual 2>$actual_err
# save actual and actual_err in case they are needed later.
@@ -715,23 +711,23 @@ TOOLTEST3() {
$actual_err > $actual_ext
if [ ! -f $expect ]; then
- # Create the expect file if it doesn't yet exist.
- echo " CREATED"
- cp $actual $expect
- echo " Expected result (*.ddl) missing"
- nerrors="`expr $nerrors + 1`"
+ # 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; then
- echo " PASSED"
+ echo " PASSED"
else
- echo "*FAILED*"
- echo " Expected result (*.ddl) differs from actual result (*.out)"
- nerrors="`expr $nerrors + 1`"
- test yes = "$verbose" && $DIFF $expect $actual |sed 's/^/ /'
+ echo "*FAILED*"
+ echo " Expected result (*.ddl) differs from actual result (*.out)"
+ nerrors="`expr $nerrors + 1`"
+ test yes = "$verbose" && $DIFF $expect $actual |sed 's/^/ /'
fi
# 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
}
@@ -753,8 +749,8 @@ TOOLTEST4() {
# Run test.
TESTING $DUMPER $@
(
- cd $TESTDIR
- $ENVCMD $RUNSERIAL $DUMPER_BIN "$@"
+ cd $TESTDIR
+ $ENVCMD $RUNSERIAL $DUMPER_BIN "$@"
) >$actual 2>$actual_err
# save actual and actual_err in case they are needed later.
@@ -773,30 +769,30 @@ TOOLTEST4() {
$actual_err > $actual_ext
if [ ! -f $expect ]; then
- # Create the expect file if it doesn't yet exist.
- echo " CREATED"
- cp $actual $expect
- echo " Expected result (*.ddl) missing"
- nerrors="`expr $nerrors + 1`"
+ # 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; then
- if $CMP $expect_err $actual_ext; then
- echo " PASSED"
- else
- echo "*FAILED*"
- echo " Expected result (*.err) differs from actual result (*.oerr)"
- nerrors="`expr $nerrors + 1`"
- test yes = "$verbose" && $DIFF $expect_err $actual_ext |sed 's/^/ /'
- fi
+ if $CMP $expect_err $actual_ext; then
+ echo " PASSED"
+ else
+ echo "*FAILED*"
+ echo " Expected result (*.err) differs from actual result (*.oerr)"
+ nerrors="`expr $nerrors + 1`"
+ test yes = "$verbose" && $DIFF $expect_err $actual_ext |sed 's/^/ /'
+ fi
else
- echo "*FAILED*"
- echo " Expected result (*.ddl) differs from actual result (*.out)"
- nerrors="`expr $nerrors + 1`"
- test yes = "$verbose" && $DIFF $expect $actual |sed 's/^/ /'
+ echo "*FAILED*"
+ echo " Expected result (*.ddl) differs from actual result (*.out)"
+ nerrors="`expr $nerrors + 1`"
+ test yes = "$verbose" && $DIFF $expect $actual |sed 's/^/ /'
fi
# 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
}
@@ -818,8 +814,8 @@ TOOLTEST5() {
# Run test.
TESTING $DUMPER $@
(
- cd $TESTDIR
- $ENVCMD $RUNSERIAL $DUMPER_BIN "$@"
+ cd $TESTDIR
+ $ENVCMD $RUNSERIAL $DUMPER_BIN "$@"
) >$actual 2>$actual_err
# save actual and actual_err in case they are needed later.
@@ -838,33 +834,33 @@ TOOLTEST5() {
$actual_err > $actual_ext
if [ ! -f $expect ]; then
- # Create the expect file if it doesn't yet exist.
- echo " CREATED"
- cp $actual $expect
- echo " Expected result (*.ddl) missing"
- nerrors="`expr $nerrors + 1`"
+ # 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; then
- if $CMP $expect_err $actual_ext; then
- echo " PASSED"
- else
- echo "*FAILED*"
- echo " Expected result (*.err) differs from actual result (*.oerr)"
- nerrors="`expr $nerrors + 1`"
- test yes = "$verbose" && $DIFF $expect_err $actual_ext |sed 's/^/ /'
- fi
+ if $CMP $expect_err $actual_ext; then
+ echo " PASSED"
+ else
+ echo "*FAILED*"
+ echo " Expected result (*.err) differs from actual result (*.oerr)"
+ nerrors="`expr $nerrors + 1`"
+ test yes = "$verbose" && $DIFF $expect_err $actual_ext |sed 's/^/ /'
+ fi
else
- echo "*FAILED*"
- echo " Expected result (*.ddl) differs from actual result (*.out)"
- nerrors="`expr $nerrors + 1`"
- test yes = "$verbose" && $DIFF $expect $actual |sed 's/^/ /'
+ echo "*FAILED*"
+ echo " Expected result (*.ddl) differs from actual result (*.out)"
+ nerrors="`expr $nerrors + 1`"
+ test yes = "$verbose" && $DIFF $expect $actual |sed 's/^/ /'
fi
# 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
-
}
+
# ADD_HELP_TEST
TOOLTEST_HELP() {
@@ -876,48 +872,94 @@ TOOLTEST_HELP() {
# Run test.
TESTING $DUMPER $@
(
- cd $TESTDIR
- $RUNSERIAL $DUMPER_BIN "$@"
+ cd $TESTDIR
+ $RUNSERIAL $DUMPER_BIN "$@"
) >$actual 2>$actual_err
if [ ! -f $expectdata ]; then
- # Create the expect data file if it doesn't yet exist.
- echo " CREATED"
- cp $actual $expect-CREATED
- echo " Expected output (*.txt) missing"
- nerrors="`expr $nerrors + 1`"
+ # Create the expect data file if it doesn't yet exist.
+ echo " CREATED"
+ cp $actual $expect-CREATED
+ echo " Expected output (*.txt) missing"
+ nerrors="`expr $nerrors + 1`"
elif $CMP $expect $actual; then
- echo " PASSED"
+ echo " PASSED"
else
- echo "*FAILED*"
- echo " Expected output (*.txt) differs from actual output (*.out)"
- nerrors="`expr $nerrors + 1`"
+ echo "*FAILED*"
+ echo " Expected output (*.txt) differs from actual output (*.out)"
+ nerrors="`expr $nerrors + 1`"
fi
# Clean up output file
if test -z "$HDF5_NOCLEANUP"; then
- rm -f $actual $actual_err
+ rm -f $actual $actual_err
fi
}
# Call the h5dump tool and grep for a value
-#
+# txttype ERRTXT greps test error output, otherwise greps test output
GREPTEST()
{
- expectdata=$1
- actual=$TESTDIR/$2
- actual_err="$TESTDIR/`basename $2 .ddl`.oerr"
+ txttype=$1
+ expectdata=$2
+ actual=$TESTDIR/$3
+ actual_err="$TESTDIR/`basename $3 .ddl`.oerr"
+ shift
+ shift
+ shift
+
+ # Run test.
+ TESTING $DUMPER -p $@
+ (
+ cd $TESTDIR
+ $ENVCMD $RUNSERIAL $DUMPER_BIN -p "$@"
+ ) >$actual 2>$actual_err
+
+ if [ "$txttype" = "ERRTXT" ]; then
+ $GREP "$expectdata" $actual_err > /dev/null
+ else
+ $GREP "$expectdata" $actual > /dev/null
+ fi
+
+ if [ $? -eq 0 ]; then
+ echo " PASSED"
+ else
+ echo " FAILED"
+ nerrors="`expr $nerrors + 1`"
+ fi
+
+ # Clean up output file
+ if test -z "$HDF5_NOCLEANUP"; then
+ rm -f $actual $actual_err
+ fi
+}
+
+# Call the h5dump tool and grep for a value but disables plugin filter loading
+# txttype ERRTXT greps test error output, otherwise greps test output
+GREPTEST2()
+{
+ txttype=$1
+ expectdata=$2
+ actual=$TESTDIR/$3
+ actual_err="$TESTDIR/`basename $3 .ddl`.oerr"
+ shift
shift
shift
# Run test.
TESTING $DUMPER -p $@
(
- cd $TESTDIR
- $ENVCMD $RUNSERIAL $DUMPER_BIN -p "$@"
+ cd $TESTDIR
+ $ENVCMD $RUNSERIAL $DUMPER_BIN -p "$@"
) >$actual 2>$actual_err
- $GREP $expectdata $actual > /dev/null
+
+ if [ "$txttype" = "ERRTXT" ]; then
+ $GREP "$expectdata" $actual_err > /dev/null
+ else
+ $GREP "$expectdata" $actual > /dev/null
+ fi
+
if [ $? -eq 0 ]; then
echo " PASSED"
else
@@ -927,21 +969,21 @@ GREPTEST()
# Clean up output file
if test -z "$HDF5_NOCLEANUP"; then
- rm -f $actual $actual_err
+ rm -f $actual $actual_err
fi
}
# Print a "SKIP" message
SKIP() {
- TESTING $DUMPER $@
+ TESTING $DUMPER $@
echo " -SKIP-"
}
# Print a line-line message left justified in a field of 70 characters
#
PRINT_H5DIFF() {
- SPACES=" "
- echo " Running h5diff $* $SPACES" | cut -c1-70 | tr -d '\012'
+ SPACES=" "
+ echo " Running h5diff $* $SPACES" | cut -c1-70 | tr -d '\012'
}
@@ -951,10 +993,11 @@ DIFFTEST()
{
PRINT_H5DIFF $@
(
- cd $TESTDIR
- $RUNSERIAL $H5DIFF_BIN "$@" -q
+ cd $TESTDIR
+ $RUNSERIAL $H5DIFF_BIN "$@" -q
)
RET=$?
+
if [ $RET != 0 ] ; then
echo "*FAILED*"
nerrors="`expr $nerrors + 1`"
@@ -968,8 +1011,8 @@ DIFFTEST()
# beginning with the word "Verifying".
#
PRINT_H5IMPORT() {
- SPACES=" "
- echo " Running h5import $* $SPACES" | cut -c1-70 | tr -d '\012'
+ SPACES=" "
+ echo " Running h5import $* $SPACES" | cut -c1-70 | tr -d '\012'
}
# Call the h5import tool
@@ -979,15 +1022,16 @@ IMPORTTEST()
# remove the output hdf5 file if it exists
hdf5_file="$TESTDIR/$5"
if [ -f $hdf5_file ]; then
- rm -f $hdf5_file
+ rm -f $hdf5_file
fi
PRINT_H5IMPORT $@
(
- cd $TESTDIR
- $RUNSERIAL $H5IMPORT_BIN "$@"
+ cd $TESTDIR
+ $RUNSERIAL $H5IMPORT_BIN "$@"
)
RET=$?
+
if [ $RET != 0 ] ; then
echo "*FAILED*"
nerrors="`expr $nerrors + 1`"
@@ -1092,9 +1136,9 @@ TOOLTEST tcomp-4.ddl --enable-error-stack tcompound_complex.h5
TOOLTEST tcompound_complex2.ddl --enable-error-stack tcompound_complex2.h5
# tests for bitfields and opaque data types
if test $WORDS_BIGENDIAN != "yes"; then
-TOOLTEST tbitnopaque_le.ddl --enable-error-stack tbitnopaque.h5
+ TOOLTEST tbitnopaque_le.ddl --enable-error-stack tbitnopaque.h5
else
-TOOLTEST tbitnopaque_be.ddl --enable-error-stack tbitnopaque.h5
+ TOOLTEST tbitnopaque_be.ddl --enable-error-stack tbitnopaque.h5
fi
#test for the nested compound type
@@ -1133,7 +1177,7 @@ TOOLTEST tvlenstr_array.ddl --enable-error-stack tvlenstr_array.h5
# test for files with array data
TOOLTEST tarray1.ddl --enable-error-stack tarray1.h5
# # added for bug# 2092 - tarray1_big.h
-TOOLTEST4 tarray1_big.ddl --enable-error-stack -R tarray1_big.h5
+TOOLTEST tarray1_big.ddl --enable-error-stack -R tarray1_big.h5
TOOLTEST tarray2.ddl --enable-error-stack tarray2.h5
TOOLTEST tarray3.ddl --enable-error-stack tarray3.h5
TOOLTEST tarray4.ddl --enable-error-stack tarray4.h5
@@ -1272,12 +1316,12 @@ TOOLTEST tallfilters.ddl --enable-error-stack -H -p -d all tfilters.h5
TOOLTEST tuserfilter.ddl --enable-error-stack -H -p -d myfilter tfilters.h5
if test $USE_FILTER_DEFLATE = "yes" ; then
- # data read internal filters
- TOOLTEST treadintfilter.ddl --enable-error-stack -d deflate -d shuffle -d fletcher32 -d nbit -d scaleoffset tfilters.h5
- if test $USE_FILTER_SZIP = "yes"; then
- # data read
- TOOLTEST treadfilter.ddl --enable-error-stack -d all -d szip tfilters.h5
- fi
+ # data read internal filters
+ TOOLTEST treadintfilter.ddl --enable-error-stack -d deflate -d shuffle -d fletcher32 -d nbit -d scaleoffset tfilters.h5
+ if test $USE_FILTER_SZIP = "yes"; then
+ # data read
+ TOOLTEST treadfilter.ddl --enable-error-stack -d all -d szip tfilters.h5
+ fi
fi
# test for displaying objects with very long names
@@ -1334,21 +1378,21 @@ TOOLTEST tbin4.ddl --enable-error-stack -d double -b FILE -o out4.bin tbin
# Clean up binary output files
if test -z "$HDF5_NOCLEANUP"; then
- rm -f out[1-4].bin
- rm -f out1.h5
- rm -f out3.h5
+ rm -f out[1-4].bin
+ rm -f out1.h5
+ rm -f out3.h5
fi
# test for dataset region references
TOOLTEST tdatareg.ddl --enable-error-stack tdatareg.h5
-TOOLTEST4 tdataregR.ddl --enable-error-stack -R tdatareg.h5
+TOOLTEST tdataregR.ddl --enable-error-stack -R tdatareg.h5
TOOLTEST tattrreg.ddl --enable-error-stack tattrreg.h5
-TOOLTEST4 tattrregR.ddl --enable-error-stack -R tattrreg.h5
+TOOLTEST tattrregR.ddl --enable-error-stack -R tattrreg.h5
TOOLTEST2 tbinregR.exp --enable-error-stack -d /Dataset1 -s 0 -R -y -o tbinregR.txt tdatareg.h5
# Clean up text output files
if test -z "$HDF5_NOCLEANUP"; then
- rm -f tbinregR.txt
+ rm -f tbinregR.txt
fi
# tests for group creation order
@@ -1380,7 +1424,7 @@ TOOLTEST4 textlinkfar.ddl --enable-error-stack textlinkfar.h5
TOOLTEST4 textlink.ddl --enable-error-stack textlink.h5
# test for error stack display (BZ2048)
-TOOLTEST5 filter_fail.ddl --enable-error-stack filter_fail.h5
+GREPTEST2 ERRTXT "filter plugins disabled" filter_fail.ddl --enable-error-stack filter_fail.h5
# test for -o -y for dataset with attributes
TOOLTEST2 tall-6.exp --enable-error-stack -y -o tall-6.txt -d /g1/g1.1/dset1.1.1 tall.h5
@@ -1389,7 +1433,7 @@ TOOLTEST2 tall-6.exp --enable-error-stack -y -o tall-6.txt -d /g1/g1.1/dset1.1.1
TOOLTEST3 non_existing.ddl --enable-error-stack tgroup.h5 non_existing.h5
# test to verify HDFFV-9407: long double full precision
-GREPTEST "1.123456789012345" t128bit_float.ddl -m %.35Lf t128bit_float.h5
+GREPTEST OUTTXT "1.123456789012345" t128bit_float.ddl -m %.35Lf t128bit_float.h5
# Clean up temporary files/directories
CLEAN_TESTFILES_AND_TESTDIR
diff --git a/tools/test/h5dump/testh5dumppbits.sh.in b/tools/test/h5dump/testh5dumppbits.sh.in
index febce2c..ff0659a 100644
--- a/tools/test/h5dump/testh5dumppbits.sh.in
+++ b/tools/test/h5dump/testh5dumppbits.sh.in
@@ -236,26 +236,25 @@ TOOLTEST() {
cp $actual_err $actual_err_sav
STDERR_FILTER $actual_err
- if [ ! -f $expect ]; then
- # Create the expect file if it doesn't yet exist.
- echo " CREATED"
- cp $actual $expect
- echo " Expected result (*.ddl) missing"
- nerrors="`expr $nerrors + 1`"
+ if [ ! -f $expect ]; then
+ # 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; then
- echo " PASSED"
+ echo " PASSED"
else
- echo "*FAILED*"
- echo " Expected result (*.ddl) differs from actual result (*.out)"
- nerrors="`expr $nerrors + 1`"
- test yes = "$verbose" && $DIFF $expect $actual |sed 's/^/ /'
+ echo "*FAILED*"
+ echo " Expected result (*.ddl) differs from actual result (*.out)"
+ nerrors="`expr $nerrors + 1`"
+ test yes = "$verbose" && $DIFF $expect $actual |sed 's/^/ /'
fi
# Clean up output file
if test -z "$HDF5_NOCLEANUP"; then
- rm -f $actual $actual_err $actual_sav $actual_err_sav $actual_ext
+ rm -f $actual $actual_err $actual_sav $actual_err_sav $actual_ext
fi
-
}
@@ -274,36 +273,36 @@ TOOLTEST2() {
# Run test.
TESTING $DUMPER $@
(
- cd $TESTDIR
- $RUNSERIAL $DUMPER_BIN "$@"
+ cd $TESTDIR
+ $RUNSERIAL $DUMPER_BIN "$@"
) >$actual 2>$actual_err
if [ ! -f $expect ]; then
- # 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; then
- if [ ! -f $expectdata ]; then
- # Create the expect data file if it doesn't yet exist.
+ # Create the expect file if it doesn't yet exist.
echo " CREATED"
- cp $actualdata $expectdata
- echo " Expected data (*.exp) missing"
+ cp $actual $expect
+ echo " Expected result (*.ddl) missing"
nerrors="`expr $nerrors + 1`"
- elif $CMP $expectdata $actualdata; then
- echo " PASSED"
- else
+ elif $CMP $expect $actual; then
+ if [ ! -f $expectdata ]; then
+ # Create the expect data file if it doesn't yet exist.
+ echo " CREATED"
+ cp $actualdata $expectdata
+ echo " Expected data (*.exp) missing"
+ nerrors="`expr $nerrors + 1`"
+ elif $CMP $expectdata $actualdata; then
+ echo " PASSED"
+ else
+ echo "*FAILED*"
+ echo " Expected datafile (*.exp) differs from actual datafile (*.txt)"
+ nerrors="`expr $nerrors + 1`"
+ test yes = "$verbose" && $DIFF $expectdata $actualdata |sed 's/^/ /'
+ fi
+ else
echo "*FAILED*"
- echo " Expected datafile (*.exp) differs from actual datafile (*.txt)"
+ echo " Expected result (*.ddl) differs from actual result (*.out)"
nerrors="`expr $nerrors + 1`"
- test yes = "$verbose" && $DIFF $expectdata $actualdata |sed 's/^/ /'
- fi
- else
- echo "*FAILED*"
- echo " Expected result (*.ddl) differs from actual result (*.out)"
- nerrors="`expr $nerrors + 1`"
- test yes = "$verbose" && $DIFF $expect $actual |sed 's/^/ /'
+ test yes = "$verbose" && $DIFF $expect $actual |sed 's/^/ /'
fi
# Clean up output file
@@ -328,8 +327,8 @@ TOOLTEST3() {
# Run test.
TESTING $DUMPER $@
(
- cd $TESTDIR
- $RUNSERIAL $DUMPER_BIN "$@"
+ cd $TESTDIR
+ $RUNSERIAL $DUMPER_BIN "$@"
) >$actual 2>$actual_err
# save actual and actual_err in case they are needed later.
@@ -348,23 +347,23 @@ TOOLTEST3() {
$actual_err > $actual_ext
if [ ! -f $expect ]; then
- # Create the expect file if it doesn't yet exist.
- echo " CREATED"
- cp $actual $expect
- echo " Expected result (*.ddl) missing"
- nerrors="`expr $nerrors + 1`"
+ # 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; then
- echo " PASSED"
+ echo " PASSED"
else
- echo "*FAILED*"
- echo " Expected result (*.ddl) differs from actual result (*.out)"
- nerrors="`expr $nerrors + 1`"
- test yes = "$verbose" && $DIFF $expect $actual |sed 's/^/ /'
+ echo "*FAILED*"
+ echo " Expected result (*.ddl) differs from actual result (*.out)"
+ nerrors="`expr $nerrors + 1`"
+ test yes = "$verbose" && $DIFF $expect $actual |sed 's/^/ /'
fi
# 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
}
@@ -385,8 +384,8 @@ TOOLTEST4() {
# Run test.
TESTING $DUMPER $@
(
- cd $TESTDIR
- $RUNSERIAL $DUMPER_BIN "$@"
+ cd $TESTDIR
+ $RUNSERIAL $DUMPER_BIN "$@"
) >$actual 2>$actual_err
# save actual and actual_err in case they are needed later.
@@ -405,30 +404,30 @@ TOOLTEST4() {
$actual_err > $actual_ext
if [ ! -f $expect ]; then
- # Create the expect file if it doesn't yet exist.
- echo " CREATED"
- cp $actual $expect
- echo " Expected result (*.ddl) missing"
- nerrors="`expr $nerrors + 1`"
+ # 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; then
- if $CMP $expect_err $actual_ext; then
- echo " PASSED"
- else
- echo "*FAILED*"
- echo " Expected result (*.err) differs from actual result (*.oerr)"
- nerrors="`expr $nerrors + 1`"
- test yes = "$verbose" && $DIFF $expect_err $actual_ext |sed 's/^/ /'
- fi
+ if $CMP $expect_err $actual_ext; then
+ echo " PASSED"
+ else
+ echo "*FAILED*"
+ echo " Expected result (*.err) differs from actual result (*.oerr)"
+ nerrors="`expr $nerrors + 1`"
+ test yes = "$verbose" && $DIFF $expect_err $actual_ext |sed 's/^/ /'
+ fi
else
- echo "*FAILED*"
- echo " Expected result (*.ddl) differs from actual result (*.out)"
- nerrors="`expr $nerrors + 1`"
- test yes = "$verbose" && $DIFF $expect $actual |sed 's/^/ /'
+ echo "*FAILED*"
+ echo " Expected result (*.ddl) differs from actual result (*.out)"
+ nerrors="`expr $nerrors + 1`"
+ test yes = "$verbose" && $DIFF $expect $actual |sed 's/^/ /'
fi
# 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
}
@@ -442,8 +441,8 @@ SKIP() {
# Print a line-line message left justified in a field of 70 characters
#
PRINT_H5DIFF() {
- SPACES=" "
- echo " Running h5diff $* $SPACES" | cut -c1-70 | tr -d '\012'
+ SPACES=" "
+ echo " Running h5diff $* $SPACES" | cut -c1-70 | tr -d '\012'
}
@@ -453,10 +452,11 @@ DIFFTEST()
{
PRINT_H5DIFF $@
(
- cd $TESTDIR
- $RUNSERIAL $H5DIFF_BIN "$@" -q
+ cd $TESTDIR
+ $RUNSERIAL $H5DIFF_BIN "$@" -q
)
RET=$?
+
if [ $RET != 0 ] ; then
echo "*FAILED*"
nerrors="`expr $nerrors + 1`"
@@ -470,8 +470,8 @@ DIFFTEST()
# beginning with the word "Verifying".
#
PRINT_H5IMPORT() {
- SPACES=" "
- echo " Running h5import $* $SPACES" | cut -c1-70 | tr -d '\012'
+ SPACES=" "
+ echo " Running h5import $* $SPACES" | cut -c1-70 | tr -d '\012'
}
# Call the h5import tool
@@ -481,22 +481,22 @@ IMPORTTEST()
# remove the output hdf5 file if it exists
hdf5_file="$TESTDIR/$5"
if [ -f $hdf5_file ]; then
- rm -f $hdf5_file
+ rm -f $hdf5_file
fi
PRINT_H5IMPORT $@
(
- cd $TESTDIR
- $RUNSERIAL $H5IMPORT_BIN "$@"
+ cd $TESTDIR
+ $RUNSERIAL $H5IMPORT_BIN "$@"
)
RET=$?
+
if [ $RET != 0 ] ; then
echo "*FAILED*"
nerrors="`expr $nerrors + 1`"
else
echo " PASSED"
fi
-
}
diff --git a/tools/test/h5dump/testh5dumpvds.sh.in b/tools/test/h5dump/testh5dumpvds.sh.in
index f89234e..29ff238 100644
--- a/tools/test/h5dump/testh5dumpvds.sh.in
+++ b/tools/test/h5dump/testh5dumpvds.sh.in
@@ -205,8 +205,8 @@ TOOLTEST() {
# Run test.
TESTING $DUMPER $@
(
- cd $TESTDIR
- $RUNSERIAL $DUMPER_BIN "$@"
+ cd $TESTDIR
+ $RUNSERIAL $DUMPER_BIN "$@"
) >$actual 2>$actual_err
# save actual and actual_err in case they are needed later.
@@ -216,26 +216,25 @@ TOOLTEST() {
STDERR_FILTER $actual_err
cat $actual_err >> $actual
- if [ ! -f $expect ]; then
- # Create the expect file if it doesn't yet exist.
- echo " CREATED"
- cp $actual $expect
- echo " Expected result (*.ddl) missing"
- nerrors="`expr $nerrors + 1`"
+ if [ ! -f $expect ]; then
+ # 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; then
- echo " PASSED"
+ echo " PASSED"
else
- echo "*FAILED*"
- echo " Expected result (*.ddl) differs from actual result (*.out)"
- nerrors="`expr $nerrors + 1`"
- test yes = "$verbose" && $DIFF $expect $actual |sed 's/^/ /'
+ echo "*FAILED*"
+ echo " Expected result (*.ddl) differs from actual result (*.out)"
+ nerrors="`expr $nerrors + 1`"
+ test yes = "$verbose" && $DIFF $expect $actual |sed 's/^/ /'
fi
# Clean up output file
if test -z "$HDF5_NOCLEANUP"; then
- rm -f $actual $actual_err $actual_sav $actual_err_sav $actual_ext
+ rm -f $actual $actual_err $actual_sav $actual_err_sav $actual_ext
fi
-
}
@@ -254,42 +253,42 @@ TOOLTEST2() {
# Run test.
TESTING $DUMPER $@
(
- cd $TESTDIR
- $RUNSERIAL $DUMPER_BIN "$@"
+ cd $TESTDIR
+ $RUNSERIAL $DUMPER_BIN "$@"
) >$actual 2>$actual_err
cat $actual_err >> $actual
if [ ! -f $expect ]; then
- # 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; then
- if [ ! -f $expectdata ]; then
- # Create the expect data file if it doesn't yet exist.
+ # Create the expect file if it doesn't yet exist.
echo " CREATED"
- cp $actualdata $expectdata
- echo " Expected data (*.exp) missing"
+ cp $actual $expect
+ echo " Expected result (*.ddl) missing"
nerrors="`expr $nerrors + 1`"
- elif $CMP $expectdata $actualdata; then
- echo " PASSED"
- else
+ elif $CMP $expect $actual; then
+ if [ ! -f $expectdata ]; then
+ # Create the expect data file if it doesn't yet exist.
+ echo " CREATED"
+ cp $actualdata $expectdata
+ echo " Expected data (*.exp) missing"
+ nerrors="`expr $nerrors + 1`"
+ elif $CMP $expectdata $actualdata; then
+ echo " PASSED"
+ else
+ echo "*FAILED*"
+ echo " Expected datafile (*.exp) differs from actual datafile (*.txt)"
+ nerrors="`expr $nerrors + 1`"
+ test yes = "$verbose" && $DIFF $expectdata $actualdata |sed 's/^/ /'
+ fi
+ else
echo "*FAILED*"
- echo " Expected datafile (*.exp) differs from actual datafile (*.txt)"
+ echo " Expected result (*.ddl) differs from actual result (*.out)"
nerrors="`expr $nerrors + 1`"
- test yes = "$verbose" && $DIFF $expectdata $actualdata |sed 's/^/ /'
- fi
- else
- echo "*FAILED*"
- echo " Expected result (*.ddl) differs from actual result (*.out)"
- nerrors="`expr $nerrors + 1`"
- test yes = "$verbose" && $DIFF $expect $actual |sed 's/^/ /'
+ test yes = "$verbose" && $DIFF $expect $actual |sed 's/^/ /'
fi
# Clean up output file
if test -z "$HDF5_NOCLEANUP"; then
- rm -f $actual $actualdata $actual_err
+ rm -f $actual $actualdata $actual_err
fi
}
@@ -309,8 +308,8 @@ TOOLTEST3() {
# Run test.
TESTING $DUMPER $@
(
- cd $TESTDIR
- $RUNSERIAL $DUMPER_BIN "$@"
+ cd $TESTDIR
+ $RUNSERIAL $DUMPER_BIN "$@"
) >$actual 2>$actual_err
# save actual and actual_err in case they are needed later.
@@ -326,27 +325,27 @@ TOOLTEST3() {
-e 's/[1-9]*\.[0-9]*\.[0-9]*[^)]*/version (number)/' \
-e 's/H5Eget_auto[1-2]*/H5Eget_auto(1 or 2)/' \
-e 's/H5Eset_auto[1-2]*/H5Eset_auto(1 or 2)/' \
- $actual_err > $actual_ext
+ $actual_err > $actual_ext
cat $actual_ext >> $actual
if [ ! -f $expect ]; then
- # Create the expect file if it doesn't yet exist.
- echo " CREATED"
- cp $actual $expect
- echo " Expected result (*.ddl) missing"
- nerrors="`expr $nerrors + 1`"
+ # 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; then
- echo " PASSED"
+ echo " PASSED"
else
- echo "*FAILED*"
- echo " Expected result (*.ddl) differs from actual result (*.out)"
- nerrors="`expr $nerrors + 1`"
- test yes = "$verbose" && $DIFF $expect $actual |sed 's/^/ /'
+ echo "*FAILED*"
+ echo " Expected result (*.ddl) differs from actual result (*.out)"
+ nerrors="`expr $nerrors + 1`"
+ test yes = "$verbose" && $DIFF $expect $actual |sed 's/^/ /'
fi
# 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
}
@@ -367,8 +366,8 @@ TOOLTEST4() {
# Run test.
TESTING $DUMPER $@
(
- cd $TESTDIR
- $RUNSERIAL $DUMPER_BIN "$@"
+ cd $TESTDIR
+ $RUNSERIAL $DUMPER_BIN "$@"
) >$actual 2>$actual_err
# save actual and actual_err in case they are needed later.
@@ -384,47 +383,46 @@ TOOLTEST4() {
-e 's/[1-9]*\.[0-9]*\.[0-9]*[^)]*/version (number)/' \
-e 's/H5Eget_auto[1-2]*/H5Eget_auto(1 or 2)/' \
-e 's/H5Eset_auto[1-2]*/H5Eset_auto(1 or 2)/' \
- $actual_err > $actual_ext
+ $actual_err > $actual_ext
#cat $actual_ext >> $actual
if [ ! -f $expect ]; then
- # Create the expect file if it doesn't yet exist.
- echo " CREATED"
- cp $actual $expect
+ # Create the expect file if it doesn't yet exist.
+ echo " CREATED"
+ cp $actual $expect
elif $CMP $expect $actual; then
- if $CMP $expect_err $actual_ext; then
- echo " PASSED"
- else
- echo "*FAILED*"
- echo " Expected result (*.err) differs from actual result (*.oerr)"
- nerrors="`expr $nerrors + 1`"
- test yes = "$verbose" && $DIFF $expect_err $actual_ext |sed 's/^/ /'
- fi
+ if $CMP $expect_err $actual_ext; then
+ echo " PASSED"
+ else
+ echo "*FAILED*"
+ echo " Expected result (*.err) differs from actual result (*.oerr)"
+ nerrors="`expr $nerrors + 1`"
+ test yes = "$verbose" && $DIFF $expect_err $actual_ext |sed 's/^/ /'
+ fi
else
- echo "*FAILED*"
- echo " Expected result (*.ddl) differs from actual result (*.out)"
- nerrors="`expr $nerrors + 1`"
- test yes = "$verbose" && $DIFF $expect $actual |sed 's/^/ /'
+ echo "*FAILED*"
+ echo " Expected result (*.ddl) differs from actual result (*.out)"
+ nerrors="`expr $nerrors + 1`"
+ test yes = "$verbose" && $DIFF $expect $actual |sed 's/^/ /'
fi
# 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
-
}
# Print a "SKIP" message
SKIP() {
- TESTING $DUMPER $@
+ TESTING $DUMPER $@
echo " -SKIP-"
}
# Print a line-line message left justified in a field of 70 characters
#
PRINT_H5DIFF() {
- SPACES=" "
- echo " Running h5diff $* $SPACES" | cut -c1-70 | tr -d '\012'
+ SPACES=" "
+ echo " Running h5diff $* $SPACES" | cut -c1-70 | tr -d '\012'
}
@@ -434,25 +432,25 @@ DIFFTEST()
{
PRINT_H5DIFF $@
(
- cd $TESTDIR
- $RUNSERIAL $H5DIFF_BIN "$@" -q
+ cd $TESTDIR
+ $RUNSERIAL $H5DIFF_BIN "$@" -q
)
RET=$?
+
if [ $RET != 0 ] ; then
echo "*FAILED*"
nerrors="`expr $nerrors + 1`"
else
echo " PASSED"
fi
-
}
# Print a line-line message left justified in a field of 70 characters
# beginning with the word "Verifying".
#
PRINT_H5IMPORT() {
- SPACES=" "
- echo " Running h5import $* $SPACES" | cut -c1-70 | tr -d '\012'
+ SPACES=" "
+ echo " Running h5import $* $SPACES" | cut -c1-70 | tr -d '\012'
}
# Call the h5import tool
@@ -462,22 +460,22 @@ IMPORTTEST()
# remove the output hdf5 file if it exists
hdf5_file="$TESTDIR/$5"
if [ -f $hdf5_file ]; then
- rm -f $hdf5_file
+ rm -f $hdf5_file
fi
PRINT_H5IMPORT $@
(
- cd $TESTDIR
- $RUNSERIAL $H5IMPORT_BIN "$@"
+ cd $TESTDIR
+ $RUNSERIAL $H5IMPORT_BIN "$@"
)
RET=$?
+
if [ $RET != 0 ] ; then
echo "*FAILED*"
nerrors="`expr $nerrors + 1`"
else
echo " PASSED"
fi
-
}
@@ -491,7 +489,7 @@ COPY_TESTFILES_TO_TESTDIR
####### test for dataset vds ######
- # Data read
+# Data read
if test $USE_FILTER_DEFLATE = "yes" ; then
TOOLTEST tvds-1.ddl --enable-error-stack 1_vds.h5
TOOLTEST tvds-2.ddl --enable-error-stack 2_vds.h5
@@ -504,7 +502,7 @@ if test $USE_FILTER_DEFLATE = "yes" ; then
TOOLTEST vds-gap2.ddl --vds-gap-size=2 --enable-error-stack vds-eiger.h5
fi
- # Layout read
+# Layout read
if test $USE_FILTER_DEFLATE = "yes" ; then
TOOLTEST tvds_layout-1.ddl -p --enable-error-stack 1_vds.h5
TOOLTEST tvds_layout-2.ddl -p --enable-error-stack 2_vds.h5
diff --git a/tools/test/h5dump/testh5dumpxml.sh.in b/tools/test/h5dump/testh5dumpxml.sh.in
index f7af300..52a13c2 100644
--- a/tools/test/h5dump/testh5dumpxml.sh.in
+++ b/tools/test/h5dump/testh5dumpxml.sh.in
@@ -262,36 +262,35 @@ TOOLTEST() {
# Run test.
TESTING $DUMPER $@
(
- cd $TESTDIR
- $RUNSERIAL $DUMPER_BIN "$@"
+ cd $TESTDIR
+ $RUNSERIAL $DUMPER_BIN "$@"
) >$actual 2>$actual_err
-
if [ ! -f $expect ]; then
- # Create the expect file if it doesn't yet exist.
- echo " CREATED"
- cp $actual $expect
- echo " Expected result (*.xml) missing"
- nerrors="`expr $nerrors + 1`"
+ # Create the expect file if it doesn't yet exist.
+ echo " CREATED"
+ cp $actual $expect
+ echo " Expected result (*.xml) missing"
+ nerrors="`expr $nerrors + 1`"
elif $CMP $expect $actual; then
- echo " PASSED"
+ echo " PASSED"
else
- echo "*FAILED*"
- echo " Expected result (*.xml) differs from actual result (*.out)"
- nerrors="`expr $nerrors + 1`"
- test yes = "$verbose" && $DIFF $expect $actual |sed 's/^/ /'
+ echo "*FAILED*"
+ echo " Expected result (*.xml) differs from actual result (*.out)"
+ nerrors="`expr $nerrors + 1`"
+ test yes = "$verbose" && $DIFF $expect $actual |sed 's/^/ /'
fi
# Clean up output file
if test -z "$HDF5_NOCLEANUP"; then
- rm -f $actual $actual_err
+ rm -f $actual $actual_err
fi
}
# Print a "SKIP" message
SKIP() {
- TESTING $DUMPER $@
- echo " -SKIP-"
+ TESTING $DUMPER $@
+ echo " -SKIP-"
}
diff --git a/tools/test/h5format_convert/CMakeLists.txt b/tools/test/h5format_convert/CMakeLists.txt
index 55d5623..99420d8 100644
--- a/tools/test/h5format_convert/CMakeLists.txt
+++ b/tools/test/h5format_convert/CMakeLists.txt
@@ -1,4 +1,4 @@
-cmake_minimum_required (VERSION 3.10)
+cmake_minimum_required (VERSION 3.12)
project (HDF5_TOOLS_TEST_H5FC C)
# --------------------------------------------------------------------
@@ -25,4 +25,6 @@ if (HDF5_BUILD_GENERATORS AND NOT ONLY_SHARED_LIBS)
#add_test (NAME h5fc_gentest COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} $<TARGET_FILE:h5fc_gentest>)
endif ()
-include (CMakeTests.cmake)
+if (HDF5_TEST_TOOLS AND HDF5_TEST_SERIAL)
+ include (CMakeTests.cmake)
+endif ()
diff --git a/tools/test/h5format_convert/CMakeTests.cmake b/tools/test/h5format_convert/CMakeTests.cmake
index 398866c..7bc33ce 100644
--- a/tools/test/h5format_convert/CMakeTests.cmake
+++ b/tools/test/h5format_convert/CMakeTests.cmake
@@ -97,12 +97,6 @@
##############################################################################
##############################################################################
- if (NOT BUILD_SHARED_LIBS)
- set (tgt_ext "")
- else ()
- set (tgt_ext "-shared")
- endif ()
-
macro (ADD_H5_OUTPUT testname resultfile resultcode testfile)
# If using memchecker add tests without using scripts
if (NOT HDF5_ENABLE_USING_MEMCHECKER)
@@ -123,7 +117,7 @@
NAME H5FC-${testname}-${testfile}
COMMAND "${CMAKE_COMMAND}"
-D "TEST_EMULATOR=${CMAKE_CROSSCOMPILING_EMULATOR}"
- -D "TEST_PROGRAM=$<TARGET_FILE:h5format_convert${tgt_ext}>"
+ -D "TEST_PROGRAM=$<TARGET_FILE:h5format_convert${tgt_file_ext}>"
-D "TEST_ARGS=${ARGN};outtmp.h5"
-D "TEST_FOLDER=${PROJECT_BINARY_DIR}/testfiles"
-D "TEST_OUTPUT=${testname}.out"
@@ -139,7 +133,7 @@
NAME H5FC-${testname}-NA
COMMAND "${CMAKE_COMMAND}"
-D "TEST_EMULATOR=${CMAKE_CROSSCOMPILING_EMULATOR}"
- -D "TEST_PROGRAM=$<TARGET_FILE:h5format_convert${tgt_ext}>"
+ -D "TEST_PROGRAM=$<TARGET_FILE:h5format_convert${tgt_file_ext}>"
-D "TEST_ARGS=${ARGN}"
-D "TEST_FOLDER=${PROJECT_BINARY_DIR}/testfiles"
-D "TEST_OUTPUT=${testname}.out"
@@ -172,7 +166,7 @@
NAME H5FC-${testname}-${testfile}
COMMAND "${CMAKE_COMMAND}"
-D "TEST_EMULATOR=${CMAKE_CROSSCOMPILING_EMULATOR}"
- -D "TEST_PROGRAM=$<TARGET_FILE:h5format_convert${tgt_ext}>"
+ -D "TEST_PROGRAM=$<TARGET_FILE:h5format_convert${tgt_file_ext}>"
-D "TEST_ARGS=${ARGN};outtmp.h5"
-D "TEST_FOLDER=${PROJECT_BINARY_DIR}/testfiles"
-D "TEST_OUTPUT=${testname}.out"
@@ -204,7 +198,7 @@
NAME H5FC-${testname}-${testfile}
COMMAND "${CMAKE_COMMAND}"
-D "TEST_EMULATOR=${CMAKE_CROSSCOMPILING_EMULATOR}"
- -D "TEST_PROGRAM=$<TARGET_FILE:h5format_convert${tgt_ext}>"
+ -D "TEST_PROGRAM=$<TARGET_FILE:h5format_convert${tgt_file_ext}>"
-D "TEST_ARGS=${ARGN};outtmp.h5"
-D "TEST_FOLDER=${PROJECT_BINARY_DIR}/testfiles"
-D "TEST_OUTPUT=${testname}.out"
@@ -237,7 +231,7 @@
NAME H5FC-${testname}
COMMAND "${CMAKE_COMMAND}"
-D "TEST_EMULATOR=${CMAKE_CROSSCOMPILING_EMULATOR}"
- -D "TEST_PROGRAM=$<TARGET_FILE:h5format_convert${tgt_ext}>"
+ -D "TEST_PROGRAM=$<TARGET_FILE:h5format_convert${tgt_file_ext}>"
-D "TEST_ARGS=${ARGN};./testfiles/tmp.h5"
-D "TEST_FOLDER=${PROJECT_BINARY_DIR}"
-D "TEST_OUTPUT=testfiles/${testname}.out"
@@ -280,7 +274,7 @@
NAME H5FC-${testname}
COMMAND "${CMAKE_COMMAND}"
-D "TEST_EMULATOR=${CMAKE_CROSSCOMPILING_EMULATOR}"
- -D "TEST_PROGRAM=$<TARGET_FILE:h5format_convert${tgt_ext}>"
+ -D "TEST_PROGRAM=$<TARGET_FILE:h5format_convert${tgt_file_ext}>"
-D "TEST_ARGS=-d;${ARGN};./testfiles/chktmp.h5"
-D "TEST_FOLDER=${PROJECT_BINARY_DIR}"
-D "TEST_OUTPUT=testfiles/${testname}.out"
@@ -317,7 +311,7 @@
NAME H5FC-${testname}
COMMAND "${CMAKE_COMMAND}"
-D "TEST_EMULATOR=${CMAKE_CROSSCOMPILING_EMULATOR}"
- -D "TEST_PROGRAM=$<TARGET_FILE:h5format_convert${tgt_ext}>"
+ -D "TEST_PROGRAM=$<TARGET_FILE:h5format_convert${tgt_file_ext}>"
-D "TEST_ARGS=${ARGN};./testfiles/dmptmp.h5"
-D "TEST_FOLDER=${PROJECT_BINARY_DIR}"
-D "TEST_OUTPUT=testfiles/${testname}.out"
@@ -330,7 +324,7 @@
NAME H5FC_CHECK_DUMP-${testname}
COMMAND "${CMAKE_COMMAND}"
-D "TEST_EMULATOR=${CMAKE_CROSSCOMPILING_EMULATOR}"
- -D "TEST_PROGRAM=$<TARGET_FILE:h5dump${tgt_ext}>"
+ -D "TEST_PROGRAM=$<TARGET_FILE:h5dump${tgt_file_ext}>"
-D "TEST_ARGS:STRING=-BH;./testfiles/dmptmp.h5"
-D "TEST_FOLDER=${PROJECT_BINARY_DIR}"
-D "TEST_OUTPUT=testfiles/${testname}_chk.out"
diff --git a/tools/test/h5format_convert/Makefile.in b/tools/test/h5format_convert/Makefile.in
index 5e8e85c..d93cf39 100644
--- a/tools/test/h5format_convert/Makefile.in
+++ b/tools/test/h5format_convert/Makefile.in
@@ -418,15 +418,15 @@ AMTAR = @AMTAR@
# H5_CFLAGS holds flags that should be used when building hdf5,
# but which should not be exported to h5cc for building other programs.
-# AM_CFLAGS is an automake construct which should be used by Makefiles
+# AM_CFLAGS is an automake construct which should be used by Makefiles
# instead of CFLAGS, as CFLAGS is reserved solely for the user to define.
# This applies to FCFLAGS, CXXFLAGS, CPPFLAGS, and LDFLAGS as well.
-AM_CFLAGS = @AM_CFLAGS@ @H5_CFLAGS@
+AM_CFLAGS = @AM_CFLAGS@ @H5_CFLAGS@ @H5_ECFLAGS@
# Include src directory
AM_CPPFLAGS = @AM_CPPFLAGS@ @H5_CPPFLAGS@ -I$(top_srcdir)/src \
-I$(top_srcdir)/tools/lib
-AM_CXXFLAGS = @AM_CXXFLAGS@ @H5_CXXFLAGS@
+AM_CXXFLAGS = @AM_CXXFLAGS@ @H5_CXXFLAGS@ @H5_ECXXFLAGS@
AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
AM_FCFLAGS = @AM_FCFLAGS@ @H5_FCFLAGS@
AM_JAVACFLAGS = @AM_JAVACFLAGS@
@@ -446,6 +446,7 @@ CC = @CC@
CCDEPMODE = @CCDEPMODE@
CC_VERSION = @CC_VERSION@
CFLAGS = @CFLAGS@
+CLANG_SANITIZE_CHECKS = @CLANG_SANITIZE_CHECKS@
CODESTACK = @CODESTACK@
CONFIG_DATE = @CONFIG_DATE@
CONFIG_MODE = @CONFIG_MODE@
@@ -462,6 +463,7 @@ DEFAULT_API_VERSION = @DEFAULT_API_VERSION@
DEFS = @DEFS@
DEPDIR = @DEPDIR@
DEPRECATED_SYMBOLS = @DEPRECATED_SYMBOLS@
+DESIRED_FILE_LOCKING = @DESIRED_FILE_LOCKING@
DEV_WARNINGS = @DEV_WARNINGS@
DIRECT_VFD = @DIRECT_VFD@
DLLTOOL = @DLLTOOL@
@@ -498,8 +500,11 @@ H5_CFLAGS = @H5_CFLAGS@
H5_CLASSPATH = @H5_CLASSPATH@
H5_CPPFLAGS = @H5_CPPFLAGS@
H5_CXXFLAGS = @H5_CXXFLAGS@
+H5_ECFLAGS = @H5_ECFLAGS@
+H5_ECXXFLAGS = @H5_ECXXFLAGS@
H5_FCFLAGS = @H5_FCFLAGS@
H5_FORTRAN_SHARED = @H5_FORTRAN_SHARED@
+H5_IS_DARWIN = @H5_IS_DARWIN@
H5_JAVACFLAGS = @H5_JAVACFLAGS@
H5_JAVAFLAGS = @H5_JAVAFLAGS@
H5_JNIFLAGS = @H5_JNIFLAGS@
@@ -522,6 +527,7 @@ HL = @HL@
HL_FOR = @HL_FOR@
HSIZE_T = @HSIZE_T@
HSSIZE_T = @HSSIZE_T@
+IGNORE_DISABLED_FILE_LOCKS = @IGNORE_DISABLED_FILE_LOCKS@
INSTALL = @INSTALL@
INSTALL_DATA = @INSTALL_DATA@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
@@ -558,6 +564,7 @@ MAINT = @MAINT@
MAKEINFO = @MAKEINFO@
MANIFEST_TOOL = @MANIFEST_TOOL@
MEMORYALLOCSANITYCHECK = @MEMORYALLOCSANITYCHECK@
+MIRROR_VFD = @MIRROR_VFD@
MKDIR_P = @MKDIR_P@
MPE = @MPE@
NM = @NM@
@@ -617,6 +624,7 @@ TIME = @TIME@
TR = @TR@
TRACE_API = @TRACE_API@
UNAME_INFO = @UNAME_INFO@
+USE_FILE_LOCKING = @USE_FILE_LOCKING@
USE_FILTER_DEFLATE = @USE_FILTER_DEFLATE@
USE_FILTER_SZIP = @USE_FILTER_SZIP@
USINGMEMCHECKER = @USINGMEMCHECKER@
@@ -652,6 +660,7 @@ docdir = $(exec_prefix)/doc
dvidir = @dvidir@
enable_shared = @enable_shared@
enable_static = @enable_static@
+examplesdir = @examplesdir@
exec_prefix = @exec_prefix@
fortran_linux_linker_option = @fortran_linux_linker_option@
host = @host@
@@ -708,15 +717,15 @@ LIBH5_HL = $(top_builddir)/hl/src/libhdf5_hl.la
LIBH5F_HL = $(top_builddir)/hl/fortran/src/libhdf5hl_fortran.la
LIBH5CPP_HL = $(top_builddir)/hl/c++/src/libhdf5_hl_cpp.la
-# Note that in svn revision 19400 the '/' after DESTDIR in H5* variables below
-# has been removed. According to the official description of DESTDIR by Gnu at
-# http://www.gnu.org/prep/standards/html_node/DESTDIR.html, DESTDIR is
-# prepended to the normal and complete install path that it precedes for the
-# purpose of installing in a temporary directory which is useful for building
-# rpms and other packages. The '/' after ${DESTDIR} will be followed by another
-# '/' at the beginning of the normal install path. When DESTDIR is empty the
-# path then begins with '//', which is incorrect and causes problems at least for
-# Cygwin.
+# Note that in svn revision 19400 the '/' after DESTDIR in H5* variables below
+# has been removed. According to the official description of DESTDIR by Gnu at
+# http://www.gnu.org/prep/standards/html_node/DESTDIR.html, DESTDIR is
+# prepended to the normal and complete install path that it precedes for the
+# purpose of installing in a temporary directory which is useful for building
+# rpms and other packages. The '/' after ${DESTDIR} will be followed by another
+# '/' at the beginning of the normal install path. When DESTDIR is empty the
+# path then begins with '//', which is incorrect and causes problems at least for
+# Cygwin.
# Scripts used to build examples
# If only shared libraries have been installed, have h5cc build examples with
@@ -763,7 +772,7 @@ LIB = $(lib_LIBRARIES) $(lib_LTLIBRARIES) $(noinst_LIBRARIES) \
PROGS = $(bin_PROGRAMS) $(bin_SCRIPTS) $(noinst_PROGRAMS) $(noinst_SCRIPTS) \
$(EXTRA_PROG)
-chk_TESTS = $(check_PROGRAMS) $(check_SCRIPTS) $(EXTRA_TEST)
+chk_TESTS = $(check_PROGRAMS) $(check_SCRIPTS) $(EXTRA_TEST)
TEST_EXTENSIONS = .sh
SH_LOG_COMPILER = $(SHELL)
AM_SH_LOG_FLAGS =
@@ -1334,28 +1343,37 @@ $(TEST_PROG_CHKEXE) $(TEST_PROG_PARA_CHKEXE) dummy.chkexe_:
echo "============================" > $${log}; \
fi; \
if test "X$(FORTRAN_API)" = "Xyes"; then \
- echo "Fortran API: Testing $(HDF5_DRIVER) $${tname} $(TEST_FLAGS)"; \
+ echo "Fortran API: Testing $${tname} $(TEST_FLAGS)"; \
if test -n "$(REALTIMEOUTPUT)"; then \
- echo "Fortran API: $(HDF5_DRIVER) $${tname} $(TEST_FLAGS) Test Log" | tee -a $${log}; \
+ echo "Fortran API: Test log for $${tname} $(TEST_FLAGS)" | tee -a $${log}; \
else \
- echo "Fortran API: $(HDF5_DRIVER) $${tname} $(TEST_FLAGS) Test Log" >> $${log}; \
+ echo "Fortran API: Test log for $${tname} $(TEST_FLAGS)" >> $${log}; \
fi; \
elif test "X$(CXX_API)" = "Xyes"; then \
- echo "C++ API: Testing $(HDF5_DRIVER) $${tname} $(TEST_FLAGS)"; \
+ echo "C++ API: Testing $${tname} $(TEST_FLAGS)"; \
if test -n "$(REALTIMEOUTPUT)"; then \
- echo "C++ API: $(HDF5_DRIVER) $${tname} $(TEST_FLAGS) Test Log" | tee -a $${log};\
+ echo "C++ API: Test log for $${tname} $(TEST_FLAGS)" | tee -a $${log};\
else \
- echo "C++ API: $(HDF5_DRIVER) $${tname} $(TEST_FLAGS) Test Log" >> $${log};\
+ echo "C++ API: Test log for $${tname} $(TEST_FLAGS)" >> $${log};\
fi; \
else \
- echo "Testing $(HDF5_DRIVER) $${tname} $(TEST_FLAGS)"; \
+ echo "Testing: $${tname} $(TEST_FLAGS)"; \
if test -n "$(REALTIMEOUTPUT)"; then \
- echo "$(HDF5_DRIVER) $${tname} $(TEST_FLAGS) Test Log" | tee -a $${log}; \
+ echo "Test log for $${tname} $(TEST_FLAGS)" | tee -a $${log}; \
else \
- echo "$(HDF5_DRIVER) $${tname} $(TEST_FLAGS) Test Log" >> $${log}; \
+ echo "Test log for $${tname} $(TEST_FLAGS)" >> $${log}; \
fi; \
fi; \
if test -n "$(REALTIMEOUTPUT)"; then \
+ if test -n "$(HDF5_DRIVER)"; then \
+ echo "Virtual file driver (VFD): $(HDF5_DRIVER)" | tee -a $${log}; \
+ fi; \
+ else \
+ if test -n "$(HDF5_DRIVER)"; then \
+ echo "Virtual file driver (VFD): $(HDF5_DRIVER)" >> $${log}; \
+ fi; \
+ fi; \
+ if test -n "$(REALTIMEOUTPUT)"; then \
echo "============================" | tee -a $${log}; \
else \
echo "============================" >> $${log}; \
diff --git a/tools/test/h5format_convert/h5fc_chk_idx.c b/tools/test/h5format_convert/h5fc_chk_idx.c
index 8369668..2fbbec4 100644
--- a/tools/test/h5format_convert/h5fc_chk_idx.c
+++ b/tools/test/h5format_convert/h5fc_chk_idx.c
@@ -13,7 +13,7 @@
/*
* A program to verify that the chunk indexing type of a dataset in a file
- * is version 1 B-tree.
+ * is version 1 B-tree.
* This is to support the testing of the tool "h5format_convert".
*/
@@ -32,7 +32,7 @@ usage(void)
/*-------------------------------------------------------------------------
* Function: main
*
- * Purpose: To check that the chunk indexing type for the dataset in
+ * Purpose: To check that the chunk indexing type for the dataset in
* the file is version 1 B-tree.
*
* Return: 0 -- the indexing type is version 1 B-tree
@@ -45,8 +45,8 @@ main(int argc, char *argv[])
{
char *fname = NULL;
char *dname = NULL;
- hid_t fid = -1;
- hid_t did = -1;
+ hid_t fid = H5I_INVALID_HID;
+ hid_t did = H5I_INVALID_HID;
H5D_chunk_index_t idx_type;
/* h5fc_chk_idx fname dname */
@@ -60,7 +60,7 @@ main(int argc, char *argv[])
dname = HDstrdup(argv[2]);
/* Try opening the file */
- if((fid = h5tools_fopen(fname, H5F_ACC_RDONLY, H5P_DEFAULT, NULL, NULL, (size_t)0)) < 0) {
+ if((fid = h5tools_fopen(fname, H5F_ACC_RDONLY, H5P_DEFAULT, FALSE, NULL, (size_t)0)) < 0) {
HDfprintf(stderr, "h5fc_chk_idx: unable to open the file\n");
HDexit(EXIT_FAILURE);
} /* end if */
@@ -90,7 +90,7 @@ main(int argc, char *argv[])
} /* end if */
/* Return success when the chunk indexing type is version 1 B-tree */
- if(idx_type == H5D_CHUNK_IDX_BTREE)
+ if(idx_type == H5D_CHUNK_IDX_BTREE)
HDexit(EXIT_SUCCESS);
else {
HDfprintf(stderr, "Error: chunk indexing type is %d\n", idx_type);
diff --git a/tools/test/h5format_convert/h5fc_gentest.c b/tools/test/h5format_convert/h5fc_gentest.c
index b482dee..1e9e2cf 100644
--- a/tools/test/h5format_convert/h5fc_gentest.c
+++ b/tools/test/h5format_convert/h5fc_gentest.c
@@ -77,12 +77,12 @@ const char *FILENAME[] = {
static void
gen_non(const char *fname)
{
- hid_t fid = -1; /* file id */
- hid_t fcpl = -1; /* file creation property list */
- hid_t gid = -1; /* group id */
- hid_t sid = -1; /* space id */
- hid_t dcpl = -1; /* dataset creation property id */
- hid_t did1 = -1, did2 = -1; /* dataset id */
+ hid_t fid = H5I_INVALID_HID; /* file id */
+ hid_t fcpl = H5I_INVALID_HID; /* file creation property list */
+ hid_t gid = H5I_INVALID_HID; /* group id */
+ hid_t sid = H5I_INVALID_HID; /* space id */
+ hid_t dcpl = H5I_INVALID_HID; /* dataset creation property id */
+ hid_t did1 = -1, did2 = H5I_INVALID_HID; /* dataset id */
hsize_t dims1[1] = {10}; /* dataset dimension */
hsize_t dims2[2] = {4, 6}; /* dataset dimension */
hsize_t max_dims[2]; /* maximum dataset dimension */
@@ -307,11 +307,11 @@ error:
static void
gen_edge(const char *fname)
{
- hid_t fid = -1; /* file id */
- hid_t fapl = -1; /* file access property list */
- hid_t sid = -1; /* dataspace id */
- hid_t dcpl = -1; /* dataset creation property id */
- hid_t did = -1; /* dataset id */
+ hid_t fid = H5I_INVALID_HID; /* file id */
+ hid_t fapl = H5I_INVALID_HID; /* file access property list */
+ hid_t sid = H5I_INVALID_HID; /* dataspace id */
+ hid_t dcpl = H5I_INVALID_HID; /* dataset creation property id */
+ hid_t did = H5I_INVALID_HID; /* dataset id */
hsize_t dims2[2] = {12, 6}; /* Dataset dimensions */
hsize_t c_dims[2] = {5, 5}; /* Chunk dimensions */
float buf[12][6]; /* Buffer for writing data */
@@ -395,14 +395,14 @@ error:
static void
gen_err_level(const char *fname)
{
- hid_t fid = -1; /* file ID */
- hid_t fapl = -1; /* file access property list */
- hid_t fcpl = -1; /* file creation property list */
- hid_t sid = -1; /* dataspace id */
- hid_t dcpl = -1; /* dataset creation property list */
- hid_t did = -1; /* dataset ID */
- hid_t fsid = -1; /* file dataspace ID */
- hid_t msid = -1; /* memory dataspace ID */
+ hid_t fid = H5I_INVALID_HID; /* file ID */
+ hid_t fapl = H5I_INVALID_HID; /* file access property list */
+ hid_t fcpl = H5I_INVALID_HID; /* file creation property list */
+ hid_t sid = H5I_INVALID_HID; /* dataspace id */
+ hid_t dcpl = H5I_INVALID_HID; /* dataset creation property list */
+ hid_t did = H5I_INVALID_HID; /* dataset ID */
+ hid_t fsid = H5I_INVALID_HID; /* file dataspace ID */
+ hid_t msid = H5I_INVALID_HID; /* memory dataspace ID */
unsigned char *buf = NULL; /* buffer for data */
hsize_t dims[2] = {0, 1}; /* dataset dimension sizes */
hsize_t max_dims[2] = {1, H5S_UNLIMITED}; /* dataset maximum dimension sizes */
@@ -534,13 +534,13 @@ error:
static void
gen_ext(const char *fname, unsigned new_format, unsigned what)
{
- hid_t fid = -1; /* file id */
- hid_t fapl = -1; /* file access property list */
- hid_t fcpl = -1; /* file creation property list */
- hid_t gid = -1; /* group id */
- hid_t sid = -1; /* space id */
- hid_t dcpl = -1; /* dataset creation property id */
- hid_t did1 = -1, did2 = -1; /* dataset id */
+ hid_t fid = H5I_INVALID_HID; /* file id */
+ hid_t fapl = H5I_INVALID_HID; /* file access property list */
+ hid_t fcpl = H5I_INVALID_HID; /* file creation property list */
+ hid_t gid = H5I_INVALID_HID; /* group id */
+ hid_t sid = H5I_INVALID_HID; /* space id */
+ hid_t dcpl = H5I_INVALID_HID; /* dataset creation property id */
+ hid_t did1 = H5I_INVALID_HID, did2 = H5I_INVALID_HID; /* dataset id */
hsize_t dims1[1] = {10}; /* dataset dimension */
hsize_t dims2[2] = {4, 6}; /* dataset dimension */
hsize_t max_dims[2]; /* maximum dataset dimension */
diff --git a/tools/test/h5format_convert/testfiles/h5fc_v_err.ddl.err b/tools/test/h5format_convert/testfiles/h5fc_v_err.ddl.err
index d85a999..e72892d 100644
--- a/tools/test/h5format_convert/testfiles/h5fc_v_err.ddl.err
+++ b/tools/test/h5format_convert/testfiles/h5fc_v_err.ddl.err
@@ -1,8 +1 @@
h5format_convert error: unable to downgrade dataset "/DSET_ERR"
-H5tools-DIAG: Error detected in HDF5:tools (version (number)) thread (IDs):
- #000: (file name) line (number) in h5trav_visit(): traverse failed
- major: Failure in tools library
- minor: error in function
- #001: (file name) line (number) in traverse(): H5Lvisit_by_name failed
- major: Failure in tools library
- minor: error in function
diff --git a/tools/test/h5import/CMakeLists.txt b/tools/test/h5import/CMakeLists.txt
index 9364683..f3991c5 100644
--- a/tools/test/h5import/CMakeLists.txt
+++ b/tools/test/h5import/CMakeLists.txt
@@ -1,4 +1,4 @@
-cmake_minimum_required (VERSION 3.10)
+cmake_minimum_required (VERSION 3.12)
project (HDF5_TOOLS_TEST_H5IMPORT C)
# --------------------------------------------------------------------
@@ -15,4 +15,6 @@ else ()
endif ()
set_target_properties (h5importtest PROPERTIES FOLDER tools)
-include (CMakeTests.cmake)
+if (HDF5_TEST_TOOLS AND HDF5_TEST_SERIAL)
+ include (CMakeTests.cmake)
+endif ()
diff --git a/tools/test/h5import/CMakeTests.cmake b/tools/test/h5import/CMakeTests.cmake
index 22ab848..00d5009 100644
--- a/tools/test/h5import/CMakeTests.cmake
+++ b/tools/test/h5import/CMakeTests.cmake
@@ -96,16 +96,10 @@
##############################################################################
##############################################################################
- if (NOT BUILD_SHARED_LIBS)
- set (tgt_ext "")
- else ()
- set (tgt_ext "-shared")
- endif ()
-
macro (ADD_H5_TEST testname importfile conffile testfile)
# If using memchecker skip macro based tests
if (HDF5_ENABLE_USING_MEMCHECKER)
- add_test (NAME H5IMPORT-${testname} COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} $<TARGET_FILE:h5import${tgt_ext}> ${importfile} -c ${conffile} -o ${testfile})
+ add_test (NAME H5IMPORT-${testname} COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} $<TARGET_FILE:h5import${tgt_file_ext}> ${importfile} -c ${conffile} -o ${testfile})
set_tests_properties (H5IMPORT-${testname} PROPERTIES
FIXTURES_REQUIRED set_h5importtest
)
@@ -118,7 +112,7 @@
FIXTURES_REQUIRED set_h5importtest
)
- add_test (NAME H5IMPORT-${testname} COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} $<TARGET_FILE:h5import${tgt_ext}> ${importfile} -c ${conffile} -o ${testfile})
+ add_test (NAME H5IMPORT-${testname} COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} $<TARGET_FILE:h5import${tgt_file_ext}> ${importfile} -c ${conffile} -o ${testfile})
set_tests_properties (H5IMPORT-${testname} PROPERTIES
DEPENDS H5IMPORT-${testname}-clear-objects
)
@@ -127,7 +121,7 @@
NAME H5IMPORT-${testname}-H5DMP
COMMAND "${CMAKE_COMMAND}"
-D "TEST_EMULATOR=${CMAKE_CROSSCOMPILING_EMULATOR}"
- -D "TEST_PROGRAM=$<TARGET_FILE:h5dump${tgt_ext}>"
+ -D "TEST_PROGRAM=$<TARGET_FILE:h5dump${tgt_file_ext}>"
-D "TEST_ARGS:STRING=${testfile}"
-D "TEST_FOLDER=${PROJECT_BINARY_DIR}"
-D "TEST_OUTPUT=${testfile}.new"
@@ -143,7 +137,7 @@
NAME H5IMPORT-${testname}-H5DMP_CMP
COMMAND "${CMAKE_COMMAND}"
-D "TEST_EMULATOR=${CMAKE_CROSSCOMPILING_EMULATOR}"
- -D "TEST_PROGRAM=$<TARGET_FILE:h5dump${tgt_ext}>"
+ -D "TEST_PROGRAM=$<TARGET_FILE:h5dump${tgt_file_ext}>"
-D "TEST_ARGS:STRING=testfiles/${testfile}"
-D "TEST_FOLDER=${PROJECT_BINARY_DIR}"
-D "TEST_OUTPUT=${testfile}.out"
@@ -176,7 +170,7 @@
NAME H5IMPORT-DUMP-${testname}-H5DMP
COMMAND "${CMAKE_COMMAND}"
-D "TEST_EMULATOR=${CMAKE_CROSSCOMPILING_EMULATOR}"
- -D "TEST_PROGRAM=$<TARGET_FILE:h5dump${tgt_ext}>"
+ -D "TEST_PROGRAM=$<TARGET_FILE:h5dump${tgt_file_ext}>"
-D "TEST_ARGS:STRING=-p;-d;${datasetname};-o;d${testfile}.bin;-b;NATIVE;testfiles/${testfile}"
-D "TEST_FOLDER=${PROJECT_BINARY_DIR}"
-D "TEST_OUTPUT=d${testfile}.dmp"
@@ -189,7 +183,7 @@
NAME H5IMPORT-DUMP-${testname}-H5DMP
COMMAND "${CMAKE_COMMAND}"
-D "TEST_EMULATOR=${CMAKE_CROSSCOMPILING_EMULATOR}"
- -D "TEST_PROGRAM=$<TARGET_FILE:h5dump${tgt_ext}>"
+ -D "TEST_PROGRAM=$<TARGET_FILE:h5dump${tgt_file_ext}>"
-D "TEST_ARGS:STRING=-p;-d;${datasetname};-o;d${testfile}.bin;-y;--width=1;testfiles/${testfile}"
-D "TEST_FOLDER=${PROJECT_BINARY_DIR}"
-D "TEST_OUTPUT=d${testfile}.dmp"
@@ -206,7 +200,7 @@
NAME H5IMPORT-DUMP-${testname}
COMMAND "${CMAKE_COMMAND}"
-D "TEST_EMULATOR=${CMAKE_CROSSCOMPILING_EMULATOR}"
- -D "TEST_PROGRAM=$<TARGET_FILE:h5import${tgt_ext}>"
+ -D "TEST_PROGRAM=$<TARGET_FILE:h5import${tgt_file_ext}>"
-D "TEST_ARGS:STRING=d${testfile}.bin;-c;d${testfile}.dmp;-o;d${testfile}"
-D "TEST_FOLDER=${PROJECT_BINARY_DIR}"
-D "TEST_OUTPUT=d${testfile}.imp"
@@ -222,7 +216,7 @@
NAME H5IMPORT-DUMP-${testname}-H5DFF
COMMAND "${CMAKE_COMMAND}"
-D "TEST_EMULATOR=${CMAKE_CROSSCOMPILING_EMULATOR}"
- -D "TEST_PROGRAM=$<TARGET_FILE:h5diff${tgt_ext}>"
+ -D "TEST_PROGRAM=$<TARGET_FILE:h5diff${tgt_file_ext}>"
-D "TEST_ARGS:STRING=-r;d${testfile};testfiles/${testfile};${datasetname};${datasetname}"
-D "TEST_FOLDER=${PROJECT_BINARY_DIR}"
-D "TEST_OUTPUT=d${testfile}.dff"
@@ -254,7 +248,7 @@
NAME H5IMPORT_SUB-DUMP-${testname}-H5DMP
COMMAND "${CMAKE_COMMAND}"
-D "TEST_EMULATOR=${CMAKE_CROSSCOMPILING_EMULATOR}"
- -D "TEST_PROGRAM=$<TARGET_FILE:h5dump${tgt_ext}>"
+ -D "TEST_PROGRAM=$<TARGET_FILE:h5dump${tgt_file_ext}>"
-D "TEST_ARGS:STRING=-p;-d;${datasetname};${ARGN};-o;${testname}.bin;-b;NATIVE;testfiles/${testfile}"
-D "TEST_FOLDER=${PROJECT_BINARY_DIR}"
-D "TEST_OUTPUT=${testname}.dmp"
@@ -270,7 +264,7 @@
NAME H5IMPORT_SUB-DUMP-${testname}-H5IMP
COMMAND "${CMAKE_COMMAND}"
-D "TEST_EMULATOR=${CMAKE_CROSSCOMPILING_EMULATOR}"
- -D "TEST_PROGRAM=$<TARGET_FILE:h5import${tgt_ext}>"
+ -D "TEST_PROGRAM=$<TARGET_FILE:h5import${tgt_file_ext}>"
-D "TEST_ARGS:STRING=${testname}.bin;-c;${testname}.dmp;-o;d-${testname}.h5"
-D "TEST_FOLDER=${PROJECT_BINARY_DIR}"
-D "TEST_OUTPUT=${testname}.imp"
@@ -285,7 +279,7 @@
NAME H5IMPORT_SUB-DUMP-${testname}-CMP
COMMAND "${CMAKE_COMMAND}"
-D "TEST_EMULATOR=${CMAKE_CROSSCOMPILING_EMULATOR}"
- -D "TEST_PROGRAM=$<TARGET_FILE:h5dump${tgt_ext}>"
+ -D "TEST_PROGRAM=$<TARGET_FILE:h5dump${tgt_file_ext}>"
-D "TEST_ARGS:STRING=-p;d-${testname}.h5"
-D "TEST_FOLDER=${PROJECT_BINARY_DIR}"
-D "TEST_OUTPUT=d-${testname}.dmp"
diff --git a/tools/test/h5import/Makefile.in b/tools/test/h5import/Makefile.in
index d4870e2..2b6a0e2 100644
--- a/tools/test/h5import/Makefile.in
+++ b/tools/test/h5import/Makefile.in
@@ -414,15 +414,15 @@ AMTAR = @AMTAR@
# H5_CFLAGS holds flags that should be used when building hdf5,
# but which should not be exported to h5cc for building other programs.
-# AM_CFLAGS is an automake construct which should be used by Makefiles
+# AM_CFLAGS is an automake construct which should be used by Makefiles
# instead of CFLAGS, as CFLAGS is reserved solely for the user to define.
# This applies to FCFLAGS, CXXFLAGS, CPPFLAGS, and LDFLAGS as well.
-AM_CFLAGS = @AM_CFLAGS@ @H5_CFLAGS@
+AM_CFLAGS = @AM_CFLAGS@ @H5_CFLAGS@ @H5_ECFLAGS@
# Include src and tools/lib directories
AM_CPPFLAGS = @AM_CPPFLAGS@ @H5_CPPFLAGS@ -I$(top_srcdir)/src \
-I$(top_srcdir)/tools/lib
-AM_CXXFLAGS = @AM_CXXFLAGS@ @H5_CXXFLAGS@
+AM_CXXFLAGS = @AM_CXXFLAGS@ @H5_CXXFLAGS@ @H5_ECXXFLAGS@
AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
AM_FCFLAGS = @AM_FCFLAGS@ @H5_FCFLAGS@
AM_JAVACFLAGS = @AM_JAVACFLAGS@
@@ -442,6 +442,7 @@ CC = @CC@
CCDEPMODE = @CCDEPMODE@
CC_VERSION = @CC_VERSION@
CFLAGS = @CFLAGS@
+CLANG_SANITIZE_CHECKS = @CLANG_SANITIZE_CHECKS@
CODESTACK = @CODESTACK@
CONFIG_DATE = @CONFIG_DATE@
CONFIG_MODE = @CONFIG_MODE@
@@ -458,6 +459,7 @@ DEFAULT_API_VERSION = @DEFAULT_API_VERSION@
DEFS = @DEFS@
DEPDIR = @DEPDIR@
DEPRECATED_SYMBOLS = @DEPRECATED_SYMBOLS@
+DESIRED_FILE_LOCKING = @DESIRED_FILE_LOCKING@
DEV_WARNINGS = @DEV_WARNINGS@
DIRECT_VFD = @DIRECT_VFD@
DLLTOOL = @DLLTOOL@
@@ -494,8 +496,11 @@ H5_CFLAGS = @H5_CFLAGS@
H5_CLASSPATH = @H5_CLASSPATH@
H5_CPPFLAGS = @H5_CPPFLAGS@
H5_CXXFLAGS = @H5_CXXFLAGS@
+H5_ECFLAGS = @H5_ECFLAGS@
+H5_ECXXFLAGS = @H5_ECXXFLAGS@
H5_FCFLAGS = @H5_FCFLAGS@
H5_FORTRAN_SHARED = @H5_FORTRAN_SHARED@
+H5_IS_DARWIN = @H5_IS_DARWIN@
H5_JAVACFLAGS = @H5_JAVACFLAGS@
H5_JAVAFLAGS = @H5_JAVAFLAGS@
H5_JNIFLAGS = @H5_JNIFLAGS@
@@ -518,6 +523,7 @@ HL = @HL@
HL_FOR = @HL_FOR@
HSIZE_T = @HSIZE_T@
HSSIZE_T = @HSSIZE_T@
+IGNORE_DISABLED_FILE_LOCKS = @IGNORE_DISABLED_FILE_LOCKS@
INSTALL = @INSTALL@
INSTALL_DATA = @INSTALL_DATA@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
@@ -554,6 +560,7 @@ MAINT = @MAINT@
MAKEINFO = @MAKEINFO@
MANIFEST_TOOL = @MANIFEST_TOOL@
MEMORYALLOCSANITYCHECK = @MEMORYALLOCSANITYCHECK@
+MIRROR_VFD = @MIRROR_VFD@
MKDIR_P = @MKDIR_P@
MPE = @MPE@
NM = @NM@
@@ -613,6 +620,7 @@ TIME = @TIME@
TR = @TR@
TRACE_API = @TRACE_API@
UNAME_INFO = @UNAME_INFO@
+USE_FILE_LOCKING = @USE_FILE_LOCKING@
USE_FILTER_DEFLATE = @USE_FILTER_DEFLATE@
USE_FILTER_SZIP = @USE_FILTER_SZIP@
USINGMEMCHECKER = @USINGMEMCHECKER@
@@ -648,6 +656,7 @@ docdir = $(exec_prefix)/doc
dvidir = @dvidir@
enable_shared = @enable_shared@
enable_static = @enable_static@
+examplesdir = @examplesdir@
exec_prefix = @exec_prefix@
fortran_linux_linker_option = @fortran_linux_linker_option@
host = @host@
@@ -704,15 +713,15 @@ LIBH5_HL = $(top_builddir)/hl/src/libhdf5_hl.la
LIBH5F_HL = $(top_builddir)/hl/fortran/src/libhdf5hl_fortran.la
LIBH5CPP_HL = $(top_builddir)/hl/c++/src/libhdf5_hl_cpp.la
-# Note that in svn revision 19400 the '/' after DESTDIR in H5* variables below
-# has been removed. According to the official description of DESTDIR by Gnu at
-# http://www.gnu.org/prep/standards/html_node/DESTDIR.html, DESTDIR is
-# prepended to the normal and complete install path that it precedes for the
-# purpose of installing in a temporary directory which is useful for building
-# rpms and other packages. The '/' after ${DESTDIR} will be followed by another
-# '/' at the beginning of the normal install path. When DESTDIR is empty the
-# path then begins with '//', which is incorrect and causes problems at least for
-# Cygwin.
+# Note that in svn revision 19400 the '/' after DESTDIR in H5* variables below
+# has been removed. According to the official description of DESTDIR by Gnu at
+# http://www.gnu.org/prep/standards/html_node/DESTDIR.html, DESTDIR is
+# prepended to the normal and complete install path that it precedes for the
+# purpose of installing in a temporary directory which is useful for building
+# rpms and other packages. The '/' after ${DESTDIR} will be followed by another
+# '/' at the beginning of the normal install path. When DESTDIR is empty the
+# path then begins with '//', which is incorrect and causes problems at least for
+# Cygwin.
# Scripts used to build examples
# If only shared libraries have been installed, have h5cc build examples with
@@ -755,7 +764,7 @@ LIB = $(lib_LIBRARIES) $(lib_LTLIBRARIES) $(noinst_LIBRARIES) \
PROGS = $(bin_PROGRAMS) $(bin_SCRIPTS) $(noinst_PROGRAMS) $(noinst_SCRIPTS) \
$(EXTRA_PROG)
-chk_TESTS = $(check_PROGRAMS) $(check_SCRIPTS) $(EXTRA_TEST)
+chk_TESTS = $(check_PROGRAMS) $(check_SCRIPTS) $(EXTRA_TEST)
TEST_EXTENSIONS = .sh
SH_LOG_COMPILER = $(SHELL)
AM_SH_LOG_FLAGS =
@@ -1319,28 +1328,37 @@ $(TEST_PROG_CHKEXE) $(TEST_PROG_PARA_CHKEXE) dummy.chkexe_:
echo "============================" > $${log}; \
fi; \
if test "X$(FORTRAN_API)" = "Xyes"; then \
- echo "Fortran API: Testing $(HDF5_DRIVER) $${tname} $(TEST_FLAGS)"; \
+ echo "Fortran API: Testing $${tname} $(TEST_FLAGS)"; \
if test -n "$(REALTIMEOUTPUT)"; then \
- echo "Fortran API: $(HDF5_DRIVER) $${tname} $(TEST_FLAGS) Test Log" | tee -a $${log}; \
+ echo "Fortran API: Test log for $${tname} $(TEST_FLAGS)" | tee -a $${log}; \
else \
- echo "Fortran API: $(HDF5_DRIVER) $${tname} $(TEST_FLAGS) Test Log" >> $${log}; \
+ echo "Fortran API: Test log for $${tname} $(TEST_FLAGS)" >> $${log}; \
fi; \
elif test "X$(CXX_API)" = "Xyes"; then \
- echo "C++ API: Testing $(HDF5_DRIVER) $${tname} $(TEST_FLAGS)"; \
+ echo "C++ API: Testing $${tname} $(TEST_FLAGS)"; \
if test -n "$(REALTIMEOUTPUT)"; then \
- echo "C++ API: $(HDF5_DRIVER) $${tname} $(TEST_FLAGS) Test Log" | tee -a $${log};\
+ echo "C++ API: Test log for $${tname} $(TEST_FLAGS)" | tee -a $${log};\
else \
- echo "C++ API: $(HDF5_DRIVER) $${tname} $(TEST_FLAGS) Test Log" >> $${log};\
+ echo "C++ API: Test log for $${tname} $(TEST_FLAGS)" >> $${log};\
fi; \
else \
- echo "Testing $(HDF5_DRIVER) $${tname} $(TEST_FLAGS)"; \
+ echo "Testing: $${tname} $(TEST_FLAGS)"; \
if test -n "$(REALTIMEOUTPUT)"; then \
- echo "$(HDF5_DRIVER) $${tname} $(TEST_FLAGS) Test Log" | tee -a $${log}; \
+ echo "Test log for $${tname} $(TEST_FLAGS)" | tee -a $${log}; \
else \
- echo "$(HDF5_DRIVER) $${tname} $(TEST_FLAGS) Test Log" >> $${log}; \
+ echo "Test log for $${tname} $(TEST_FLAGS)" >> $${log}; \
fi; \
fi; \
if test -n "$(REALTIMEOUTPUT)"; then \
+ if test -n "$(HDF5_DRIVER)"; then \
+ echo "Virtual file driver (VFD): $(HDF5_DRIVER)" | tee -a $${log}; \
+ fi; \
+ else \
+ if test -n "$(HDF5_DRIVER)"; then \
+ echo "Virtual file driver (VFD): $(HDF5_DRIVER)" >> $${log}; \
+ fi; \
+ fi; \
+ if test -n "$(REALTIMEOUTPUT)"; then \
echo "============================" | tee -a $${log}; \
else \
echo "============================" >> $${log}; \
diff --git a/tools/test/h5import/h5importtest.c b/tools/test/h5import/h5importtest.c
index 560f1b3..580530a 100644
--- a/tools/test/h5import/h5importtest.c
+++ b/tools/test/h5import/h5importtest.c
@@ -68,13 +68,12 @@ main(void)
double rowi8 = 1.0F, coli8 = 2.0F, plni8 = 5.0F;
/* Initialize machine endian */
- volatile uint32_t ibyte=0x01234567;
+ volatile uint32_t ibyte = 0x01234567;
/* 0 for big endian, 1 for little endian. */
- if ((*((uint8_t*)(&ibyte))) == 0x67)
- HDstrncpy(machine_order, "LE", 2);
+ if ((*((volatile uint8_t *)(&ibyte))) == 0x67)
+ HDstrcpy(machine_order, "LE");
else
- HDstrncpy(machine_order, "BE", 2);
-
+ HDstrcpy(machine_order, "BE");
/*
* initialize the row, column, and plane vectors
diff --git a/tools/test/h5jam/CMakeLists.txt b/tools/test/h5jam/CMakeLists.txt
index 6fdf7b0..78160d3 100644
--- a/tools/test/h5jam/CMakeLists.txt
+++ b/tools/test/h5jam/CMakeLists.txt
@@ -1,4 +1,4 @@
-cmake_minimum_required (VERSION 3.10)
+cmake_minimum_required (VERSION 3.12)
project (HDF5_TOOLS_TEST_H5JAM C)
# --------------------------------------------------------------------
@@ -36,4 +36,6 @@ else ()
endif ()
set_target_properties (tellub PROPERTIES FOLDER tools)
-include (CMakeTests.cmake)
+if (HDF5_TEST_TOOLS AND HDF5_TEST_SERIAL)
+ include (CMakeTests.cmake)
+endif ()
diff --git a/tools/test/h5jam/CMakeTests.cmake b/tools/test/h5jam/CMakeTests.cmake
index f108afc..aaa9a5c 100644
--- a/tools/test/h5jam/CMakeTests.cmake
+++ b/tools/test/h5jam/CMakeTests.cmake
@@ -47,12 +47,6 @@
##############################################################################
##############################################################################
- if (NOT BUILD_SHARED_LIBS)
- set (tgt_ext "")
- else ()
- set (tgt_ext "-shared")
- endif ()
-
# ============================================================
# TEST_H5JAM_OUTPUT
# For the purpose to verify only output & exitcode from h5jam
@@ -60,7 +54,7 @@
macro (TEST_H5JAM_OUTPUT expectfile resultcode)
# If using memchecker add tests without using scripts
if (HDF5_ENABLE_USING_MEMCHECKER)
- add_test (NAME H5JAM-${expectfile} COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} $<TARGET_FILE:h5jam${tgt_ext}> ${ARGN})
+ add_test (NAME H5JAM-${expectfile} COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} $<TARGET_FILE:h5jam${tgt_file_ext}> ${ARGN})
if (${resultcode})
set_tests_properties (H5JAM-${expectfile} PROPERTIES WILL_FAIL "true")
endif ()
@@ -69,7 +63,7 @@
NAME H5JAM-${expectfile}
COMMAND "${CMAKE_COMMAND}"
-D "TEST_EMULATOR=${CMAKE_CROSSCOMPILING_EMULATOR}"
- -D "TEST_PROGRAM=$<TARGET_FILE:h5jam${tgt_ext}>"
+ -D "TEST_PROGRAM=$<TARGET_FILE:h5jam${tgt_file_ext}>"
-D "TEST_ARGS:STRING=${ARGN}"
-D "TEST_FOLDER=${PROJECT_BINARY_DIR}"
-D "TEST_OUTPUT=${expectfile}.out"
@@ -89,7 +83,7 @@
macro (TEST_H5UNJAM_OUTPUT expectfile resultcode)
# If using memchecker add tests without using scripts
if (HDF5_ENABLE_USING_MEMCHECKER)
- add_test (NAME H5JAM-UNJAM-${expectfile} COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} $<TARGET_FILE:h5unjam${tgt_ext}> ${ARGN})
+ add_test (NAME H5JAM-UNJAM-${expectfile} COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} $<TARGET_FILE:h5unjam${tgt_file_ext}> ${ARGN})
if (${resultcode})
set_tests_properties (H5JAM-UNJAM-${expectfile} PROPERTIES WILL_FAIL "true")
endif ()
@@ -98,7 +92,7 @@
NAME H5JAM-UNJAM-${expectfile}
COMMAND "${CMAKE_COMMAND}"
-D "TEST_EMULATOR=${CMAKE_CROSSCOMPILING_EMULATOR}"
- -D "TEST_PROGRAM=$<TARGET_FILE:h5unjam${tgt_ext}>"
+ -D "TEST_PROGRAM=$<TARGET_FILE:h5unjam${tgt_file_ext}>"
-D "TEST_ARGS=${ARGN}"
-D "TEST_FOLDER=${PROJECT_BINARY_DIR}"
-D "TEST_OUTPUT=${expectfile}.out"
@@ -116,7 +110,7 @@
NAME H5JAM-${testname}-CHECKFILE-H5DMP
COMMAND "${CMAKE_COMMAND}"
-D "TEST_EMULATOR=${CMAKE_CROSSCOMPILING_EMULATOR}"
- -D "TEST_PROGRAM=$<TARGET_FILE:h5dump${tgt_ext}>"
+ -D "TEST_PROGRAM=$<TARGET_FILE:h5dump${tgt_file_ext}>"
-D "TEST_ARGS:STRING=testfiles/${expected}"
-D "TEST_FOLDER=${PROJECT_BINARY_DIR}"
-D "TEST_OUTPUT=${actual}.new"
@@ -130,7 +124,7 @@
NAME H5JAM-${testname}-CHECKFILE-H5DMP_CMP
COMMAND "${CMAKE_COMMAND}"
-D "TEST_EMULATOR=${CMAKE_CROSSCOMPILING_EMULATOR}"
- -D "TEST_PROGRAM=$<TARGET_FILE:h5dump${tgt_ext}>"
+ -D "TEST_PROGRAM=$<TARGET_FILE:h5dump${tgt_file_ext}>"
-D "TEST_ARGS:STRING=${actual}"
-D "TEST_FOLDER=${PROJECT_BINARY_DIR}"
-D "TEST_OUTPUT=${actual}.out"
@@ -165,7 +159,7 @@
COMMAND ${CMAKE_COMMAND} -E remove ${ufile}
)
set_tests_properties (H5JAM-${testname}-UNJAM_D-clear-objects PROPERTIES DEPENDS H5JAM-${testname}-UNJAM-clear-objects)
- add_test (NAME H5JAM-${testname}-UNJAM COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} $<TARGET_FILE:h5unjam${tgt_ext}> -i ${infile} -u ${ufile} -o ${outfile})
+ add_test (NAME H5JAM-${testname}-UNJAM COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} $<TARGET_FILE:h5unjam${tgt_file_ext}> -i ${infile} -u ${ufile} -o ${outfile})
set_tests_properties (H5JAM-${testname}-UNJAM PROPERTIES DEPENDS H5JAM-${testname}-UNJAM_D-clear-objects)
set (compare_test ${ufile})
else ()
@@ -174,7 +168,7 @@
NAME H5JAM-${testname}-UNJAM
COMMAND "${CMAKE_COMMAND}"
-D "TEST_EMULATOR=${CMAKE_CROSSCOMPILING_EMULATOR}"
- -D "TEST_PROGRAM=$<TARGET_FILE:h5unjam${tgt_ext}>"
+ -D "TEST_PROGRAM=$<TARGET_FILE:h5unjam${tgt_file_ext}>"
-D "TEST_ARGS:STRING=-i;${infile};-o;${outfile}"
-D "TEST_FOLDER=${PROJECT_BINARY_DIR}"
-D "TEST_OUTPUT=${outfile}.ufile.txt"
@@ -185,7 +179,7 @@
set_tests_properties (H5JAM-${testname}-UNJAM PROPERTIES DEPENDS H5JAM-${testname}-UNJAM-clear-objects)
set (compare_test "${outfile}.ufile.txt")
else ()
- add_test (NAME H5JAM-${testname}-UNJAM COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} $<TARGET_FILE:h5unjam${tgt_ext}> -i ${infile} -o ${outfile})
+ add_test (NAME H5JAM-${testname}-UNJAM COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} $<TARGET_FILE:h5unjam${tgt_file_ext}> -i ${infile} -o ${outfile})
set_tests_properties (H5JAM-${testname}-UNJAM PROPERTIES DEPENDS H5JAM-${testname}-UNJAM-clear-objects)
set (compare_test "")
endif ()
@@ -247,7 +241,7 @@
COMMAND ${CMAKE_COMMAND} -E remove ${outfile} ${infile}.cpy.h5
)
endif ()
- add_test (NAME H5JAM-${testname} COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} $<TARGET_FILE:h5jam${tgt_ext}> -u testfiles/${jamfile} -i testfiles/${infile} -o ${outfile} ${ARGN})
+ add_test (NAME H5JAM-${testname} COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} $<TARGET_FILE:h5jam${tgt_file_ext}> -u testfiles/${jamfile} -i testfiles/${infile} -o ${outfile} ${ARGN})
if (NOT HDF5_ENABLE_USING_MEMCHECKER)
set_tests_properties (H5JAM-${testname} PROPERTIES DEPENDS H5JAM-${testname}-clear-objects)
set (compare_test ${outfile})
@@ -302,7 +296,7 @@
)
set_tests_properties (H5JAM-${testname}_NONE_COPY PROPERTIES DEPENDS H5JAM-${testname}_NONE-SETUP)
- add_test (NAME H5JAM-${testname}_NONE COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} $<TARGET_FILE:h5jam${tgt_ext}> -u testfiles/${jamfile} -i ${chkfile} ${ARGN})
+ add_test (NAME H5JAM-${testname}_NONE COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} $<TARGET_FILE:h5jam${tgt_file_ext}> -u testfiles/${jamfile} -i ${chkfile} ${ARGN})
set_tests_properties (H5JAM-${testname}_NONE PROPERTIES DEPENDS H5JAM-${testname}_NONE_COPY)
set (compare_test ${chkfile})
diff --git a/tools/test/h5jam/Makefile.in b/tools/test/h5jam/Makefile.in
index 5ac0d40..cb4b59e 100644
--- a/tools/test/h5jam/Makefile.in
+++ b/tools/test/h5jam/Makefile.in
@@ -419,15 +419,15 @@ AMTAR = @AMTAR@
# H5_CFLAGS holds flags that should be used when building hdf5,
# but which should not be exported to h5cc for building other programs.
-# AM_CFLAGS is an automake construct which should be used by Makefiles
+# AM_CFLAGS is an automake construct which should be used by Makefiles
# instead of CFLAGS, as CFLAGS is reserved solely for the user to define.
# This applies to FCFLAGS, CXXFLAGS, CPPFLAGS, and LDFLAGS as well.
-AM_CFLAGS = @AM_CFLAGS@ @H5_CFLAGS@
+AM_CFLAGS = @AM_CFLAGS@ @H5_CFLAGS@ @H5_ECFLAGS@
# Include src and tools/lib directories
AM_CPPFLAGS = @AM_CPPFLAGS@ @H5_CPPFLAGS@ -I$(top_srcdir)/src \
-I$(top_srcdir)/tools/lib
-AM_CXXFLAGS = @AM_CXXFLAGS@ @H5_CXXFLAGS@
+AM_CXXFLAGS = @AM_CXXFLAGS@ @H5_CXXFLAGS@ @H5_ECXXFLAGS@
AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
AM_FCFLAGS = @AM_FCFLAGS@ @H5_FCFLAGS@
AM_JAVACFLAGS = @AM_JAVACFLAGS@
@@ -447,6 +447,7 @@ CC = @CC@
CCDEPMODE = @CCDEPMODE@
CC_VERSION = @CC_VERSION@
CFLAGS = @CFLAGS@
+CLANG_SANITIZE_CHECKS = @CLANG_SANITIZE_CHECKS@
CODESTACK = @CODESTACK@
CONFIG_DATE = @CONFIG_DATE@
CONFIG_MODE = @CONFIG_MODE@
@@ -463,6 +464,7 @@ DEFAULT_API_VERSION = @DEFAULT_API_VERSION@
DEFS = @DEFS@
DEPDIR = @DEPDIR@
DEPRECATED_SYMBOLS = @DEPRECATED_SYMBOLS@
+DESIRED_FILE_LOCKING = @DESIRED_FILE_LOCKING@
DEV_WARNINGS = @DEV_WARNINGS@
DIRECT_VFD = @DIRECT_VFD@
DLLTOOL = @DLLTOOL@
@@ -499,8 +501,11 @@ H5_CFLAGS = @H5_CFLAGS@
H5_CLASSPATH = @H5_CLASSPATH@
H5_CPPFLAGS = @H5_CPPFLAGS@
H5_CXXFLAGS = @H5_CXXFLAGS@
+H5_ECFLAGS = @H5_ECFLAGS@
+H5_ECXXFLAGS = @H5_ECXXFLAGS@
H5_FCFLAGS = @H5_FCFLAGS@
H5_FORTRAN_SHARED = @H5_FORTRAN_SHARED@
+H5_IS_DARWIN = @H5_IS_DARWIN@
H5_JAVACFLAGS = @H5_JAVACFLAGS@
H5_JAVAFLAGS = @H5_JAVAFLAGS@
H5_JNIFLAGS = @H5_JNIFLAGS@
@@ -523,6 +528,7 @@ HL = @HL@
HL_FOR = @HL_FOR@
HSIZE_T = @HSIZE_T@
HSSIZE_T = @HSSIZE_T@
+IGNORE_DISABLED_FILE_LOCKS = @IGNORE_DISABLED_FILE_LOCKS@
INSTALL = @INSTALL@
INSTALL_DATA = @INSTALL_DATA@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
@@ -559,6 +565,7 @@ MAINT = @MAINT@
MAKEINFO = @MAKEINFO@
MANIFEST_TOOL = @MANIFEST_TOOL@
MEMORYALLOCSANITYCHECK = @MEMORYALLOCSANITYCHECK@
+MIRROR_VFD = @MIRROR_VFD@
MKDIR_P = @MKDIR_P@
MPE = @MPE@
NM = @NM@
@@ -618,6 +625,7 @@ TIME = @TIME@
TR = @TR@
TRACE_API = @TRACE_API@
UNAME_INFO = @UNAME_INFO@
+USE_FILE_LOCKING = @USE_FILE_LOCKING@
USE_FILTER_DEFLATE = @USE_FILTER_DEFLATE@
USE_FILTER_SZIP = @USE_FILTER_SZIP@
USINGMEMCHECKER = @USINGMEMCHECKER@
@@ -653,6 +661,7 @@ docdir = $(exec_prefix)/doc
dvidir = @dvidir@
enable_shared = @enable_shared@
enable_static = @enable_static@
+examplesdir = @examplesdir@
exec_prefix = @exec_prefix@
fortran_linux_linker_option = @fortran_linux_linker_option@
host = @host@
@@ -709,15 +718,15 @@ LIBH5_HL = $(top_builddir)/hl/src/libhdf5_hl.la
LIBH5F_HL = $(top_builddir)/hl/fortran/src/libhdf5hl_fortran.la
LIBH5CPP_HL = $(top_builddir)/hl/c++/src/libhdf5_hl_cpp.la
-# Note that in svn revision 19400 the '/' after DESTDIR in H5* variables below
-# has been removed. According to the official description of DESTDIR by Gnu at
-# http://www.gnu.org/prep/standards/html_node/DESTDIR.html, DESTDIR is
-# prepended to the normal and complete install path that it precedes for the
-# purpose of installing in a temporary directory which is useful for building
-# rpms and other packages. The '/' after ${DESTDIR} will be followed by another
-# '/' at the beginning of the normal install path. When DESTDIR is empty the
-# path then begins with '//', which is incorrect and causes problems at least for
-# Cygwin.
+# Note that in svn revision 19400 the '/' after DESTDIR in H5* variables below
+# has been removed. According to the official description of DESTDIR by Gnu at
+# http://www.gnu.org/prep/standards/html_node/DESTDIR.html, DESTDIR is
+# prepended to the normal and complete install path that it precedes for the
+# purpose of installing in a temporary directory which is useful for building
+# rpms and other packages. The '/' after ${DESTDIR} will be followed by another
+# '/' at the beginning of the normal install path. When DESTDIR is empty the
+# path then begins with '//', which is incorrect and causes problems at least for
+# Cygwin.
# Scripts used to build examples
# If only shared libraries have been installed, have h5cc build examples with
@@ -760,7 +769,7 @@ LIB = $(lib_LIBRARIES) $(lib_LTLIBRARIES) $(noinst_LIBRARIES) \
PROGS = $(bin_PROGRAMS) $(bin_SCRIPTS) $(noinst_PROGRAMS) $(noinst_SCRIPTS) \
$(EXTRA_PROG)
-chk_TESTS = $(check_PROGRAMS) $(check_SCRIPTS) $(EXTRA_TEST)
+chk_TESTS = $(check_PROGRAMS) $(check_SCRIPTS) $(EXTRA_TEST)
TEST_EXTENSIONS = .sh
SH_LOG_COMPILER = $(SHELL)
AM_SH_LOG_FLAGS =
@@ -1328,28 +1337,37 @@ $(TEST_PROG_CHKEXE) $(TEST_PROG_PARA_CHKEXE) dummy.chkexe_:
echo "============================" > $${log}; \
fi; \
if test "X$(FORTRAN_API)" = "Xyes"; then \
- echo "Fortran API: Testing $(HDF5_DRIVER) $${tname} $(TEST_FLAGS)"; \
+ echo "Fortran API: Testing $${tname} $(TEST_FLAGS)"; \
if test -n "$(REALTIMEOUTPUT)"; then \
- echo "Fortran API: $(HDF5_DRIVER) $${tname} $(TEST_FLAGS) Test Log" | tee -a $${log}; \
+ echo "Fortran API: Test log for $${tname} $(TEST_FLAGS)" | tee -a $${log}; \
else \
- echo "Fortran API: $(HDF5_DRIVER) $${tname} $(TEST_FLAGS) Test Log" >> $${log}; \
+ echo "Fortran API: Test log for $${tname} $(TEST_FLAGS)" >> $${log}; \
fi; \
elif test "X$(CXX_API)" = "Xyes"; then \
- echo "C++ API: Testing $(HDF5_DRIVER) $${tname} $(TEST_FLAGS)"; \
+ echo "C++ API: Testing $${tname} $(TEST_FLAGS)"; \
if test -n "$(REALTIMEOUTPUT)"; then \
- echo "C++ API: $(HDF5_DRIVER) $${tname} $(TEST_FLAGS) Test Log" | tee -a $${log};\
+ echo "C++ API: Test log for $${tname} $(TEST_FLAGS)" | tee -a $${log};\
else \
- echo "C++ API: $(HDF5_DRIVER) $${tname} $(TEST_FLAGS) Test Log" >> $${log};\
+ echo "C++ API: Test log for $${tname} $(TEST_FLAGS)" >> $${log};\
fi; \
else \
- echo "Testing $(HDF5_DRIVER) $${tname} $(TEST_FLAGS)"; \
+ echo "Testing: $${tname} $(TEST_FLAGS)"; \
if test -n "$(REALTIMEOUTPUT)"; then \
- echo "$(HDF5_DRIVER) $${tname} $(TEST_FLAGS) Test Log" | tee -a $${log}; \
+ echo "Test log for $${tname} $(TEST_FLAGS)" | tee -a $${log}; \
else \
- echo "$(HDF5_DRIVER) $${tname} $(TEST_FLAGS) Test Log" >> $${log}; \
+ echo "Test log for $${tname} $(TEST_FLAGS)" >> $${log}; \
fi; \
fi; \
if test -n "$(REALTIMEOUTPUT)"; then \
+ if test -n "$(HDF5_DRIVER)"; then \
+ echo "Virtual file driver (VFD): $(HDF5_DRIVER)" | tee -a $${log}; \
+ fi; \
+ else \
+ if test -n "$(HDF5_DRIVER)"; then \
+ echo "Virtual file driver (VFD): $(HDF5_DRIVER)" >> $${log}; \
+ fi; \
+ fi; \
+ if test -n "$(REALTIMEOUTPUT)"; then \
echo "============================" | tee -a $${log}; \
else \
echo "============================" >> $${log}; \
diff --git a/tools/test/h5jam/getub.c b/tools/test/h5jam/getub.c
index 26a427d..f496a7a 100644
--- a/tools/test/h5jam/getub.c
+++ b/tools/test/h5jam/getub.c
@@ -81,7 +81,7 @@ parse_command_line(int argc, const char *argv[])
int
main(int argc, const char *argv[])
{
- int fd = -1;
+ int fd = H5I_INVALID_HID;
unsigned size;
char *filename = NULL;
long res;
diff --git a/tools/test/h5jam/tellub.c b/tools/test/h5jam/tellub.c
index 2fce729..dbd2e69 100644
--- a/tools/test/h5jam/tellub.c
+++ b/tools/test/h5jam/tellub.c
@@ -70,11 +70,12 @@ parse_command_line (int argc, const char *argv[])
switch ((char) opt) {
case 'h':
usage (h5tools_getprogname());
- HDexit(EXIT_SUCCESS);
+ h5tools_setstatus(EXIT_SUCCESS);
+ break;
case '?':
default:
usage (h5tools_getprogname());
- HDexit(EXIT_FAILURE);
+ h5tools_setstatus(EXIT_FAILURE);
}
}
@@ -82,10 +83,17 @@ parse_command_line (int argc, const char *argv[])
if (argc <= opt_ind) {
error_msg("missing file name\n");
usage (h5tools_getprogname());
- HDexit(EXIT_FAILURE);
+ h5tools_setstatus(EXIT_FAILURE);
}
} /* end parse_command_line() */
+static void
+leave(int ret)
+{
+ h5tools_close();
+ HDexit(ret);
+}
+
/*-------------------------------------------------------------------------
* Function: main
*
@@ -98,9 +106,7 @@ int
main (int argc, const char *argv[])
{
char *ifname;
- void *edata;
- H5E_auto2_t func;
- hid_t ifile;
+ hid_t ifile = H5I_INVALID_HID;
hsize_t usize;
htri_t testval;
herr_t status;
@@ -112,16 +118,16 @@ main (int argc, const char *argv[])
/* Initialize h5tools lib */
h5tools_init();
- /* Disable error reporting */
- H5Eget_auto2(H5E_DEFAULT, &func, &edata);
- H5Eset_auto2(H5E_DEFAULT, NULL, NULL);
-
parse_command_line(argc, argv);
+ /* enable error reporting if command line option */
+ h5tools_error_report();
+
if(argc <= (opt_ind)) {
error_msg("missing file name\n");
usage (h5tools_getprogname());
- return EXIT_FAILURE;
+ h5tools_setstatus(EXIT_FAILURE);
+ goto done;
}
ifname = HDstrdup(argv[opt_ind]);
@@ -130,33 +136,39 @@ main (int argc, const char *argv[])
if(testval <= 0) {
error_msg("Input HDF5 file is not HDF \"%s\"\n", ifname);
- return EXIT_FAILURE;
+ h5tools_setstatus(EXIT_FAILURE);
+ goto done;
}
ifile = H5Fopen(ifname, H5F_ACC_RDONLY, H5P_DEFAULT);
if(ifile < 0) {
error_msg("Can't open input HDF5 file \"%s\"\n", ifname);
- return EXIT_FAILURE;
+ h5tools_setstatus(EXIT_FAILURE);
+ goto done;
}
plist = H5Fget_create_plist(ifile);
if(plist < 0) {
error_msg("Can't get file creation plist for file \"%s\"\n", ifname);
- return EXIT_FAILURE;
+ h5tools_setstatus(EXIT_FAILURE);
+ goto done;
}
status = H5Pget_userblock(plist, &usize);
if(status < 0) {
error_msg("Can't get user block for file \"%s\"\n", ifname);
- return EXIT_FAILURE;
+ h5tools_setstatus(EXIT_FAILURE);
+ goto done;
}
HDprintf("%ld\n", (long) usize);
+done:
H5Pclose (plist);
- H5Fclose (ifile);
+ if(ifile >= 0)
+ H5Fclose (ifile);
- return EXIT_SUCCESS;
+ leave(h5tools_getstatus());
} /* end main() */
diff --git a/tools/test/h5jam/testh5jam.sh.in b/tools/test/h5jam/testh5jam.sh.in
index 3ae180b..bf705b4 100644
--- a/tools/test/h5jam/testh5jam.sh.in
+++ b/tools/test/h5jam/testh5jam.sh.in
@@ -474,9 +474,9 @@ UNJAMTEST () {
#
TOOLTEST_OUTPUT() {
- if [ "$1" == "JAM" ]; then
+ if [ "$1" = "JAM" ]; then
TOOLCMD=$JAM_BIN/$JAM
- elif [ "$1" == "UNJAM" ]; then
+ elif [ "$1" = "UNJAM" ]; then
TOOLCMD=$JAM_BIN/$UNJAM
fi
shift
diff --git a/tools/test/h5ls/CMakeLists.txt b/tools/test/h5ls/CMakeLists.txt
index 0da03c5..3993277 100644
--- a/tools/test/h5ls/CMakeLists.txt
+++ b/tools/test/h5ls/CMakeLists.txt
@@ -1,4 +1,4 @@
-cmake_minimum_required (VERSION 3.10)
+cmake_minimum_required (VERSION 3.12)
project (HDF5_TOOLS_TEST_H5LS C)
#-----------------------------------------------------------------------------
@@ -30,6 +30,8 @@ if (BUILD_SHARED_LIBS)
)
endif ()
-include (CMakeTests.cmake)
+if (HDF5_TEST_TOOLS AND HDF5_TEST_SERIAL)
+ include (CMakeTests.cmake)
-include (CMakeTestsVDS.cmake)
+ include (CMakeTestsVDS.cmake)
+endif ()
diff --git a/tools/test/h5ls/CMakeTests.cmake b/tools/test/h5ls/CMakeTests.cmake
index 2f3f3ab..2b7aa96 100644
--- a/tools/test/h5ls/CMakeTests.cmake
+++ b/tools/test/h5ls/CMakeTests.cmake
@@ -134,16 +134,10 @@
##############################################################################
##############################################################################
- if (NOT BUILD_SHARED_LIBS)
- set (tgt_ext "")
- else ()
- set (tgt_ext "-shared")
- endif ()
-
macro (ADD_H5_TEST resultfile resultcode)
# If using memchecker add tests without using scripts
if (HDF5_ENABLE_USING_MEMCHECKER)
- add_test (NAME H5LS-${resultfile} COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} $<TARGET_FILE:h5ls${tgt_ext}> ${ARGN})
+ add_test (NAME H5LS-${resultfile} COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} $<TARGET_FILE:h5ls${tgt_file_ext}> ${ARGN})
set_tests_properties (H5LS-${resultfile} PROPERTIES WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles")
if (${resultcode} EQUAL 1)
set_tests_properties (H5LS-${resultfile} PROPERTIES WILL_FAIL "true")
@@ -154,7 +148,7 @@
NAME H5LS-${resultfile}
COMMAND "${CMAKE_COMMAND}"
-D "TEST_EMULATOR=${CMAKE_CROSSCOMPILING_EMULATOR}"
- -D "TEST_PROGRAM=$<TARGET_FILE:h5ls${tgt_ext}>"
+ -D "TEST_PROGRAM=$<TARGET_FILE:h5ls${tgt_file_ext}>"
-D "TEST_ARGS=${ARGN}"
-D "TEST_FOLDER=${PROJECT_BINARY_DIR}/testfiles"
-D "TEST_OUTPUT=${resultfile}.out"
@@ -168,7 +162,7 @@
macro (ADD_H5_ERR_TEST resultfile resultcode)
# If using memchecker add tests without using scripts
if (HDF5_ENABLE_USING_MEMCHECKER)
- add_test (NAME H5LS-${resultfile} COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} $<TARGET_FILE:h5ls> ${ARGN})
+ add_test (NAME H5LS-${resultfile} COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} $<TARGET_FILE:h5ls${tgt_file_ext}> ${ARGN})
set_tests_properties (H5LS-${resultfile} PROPERTIES WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles")
if (${resultcode} EQUAL 1)
set_tests_properties (H5LS-${resultfile} PROPERTIES WILL_FAIL "true")
@@ -178,7 +172,7 @@
NAME H5LS-${resultfile}
COMMAND "${CMAKE_COMMAND}"
-D "TEST_EMULATOR=${CMAKE_CROSSCOMPILING_EMULATOR}"
- -D "TEST_PROGRAM=$<TARGET_FILE:h5ls${tgt_ext}>"
+ -D "TEST_PROGRAM=$<TARGET_FILE:h5ls${tgt_file_ext}>"
-D "TEST_ARGS=${ARGN}"
-D "TEST_FOLDER=${PROJECT_BINARY_DIR}/testfiles"
-D "TEST_OUTPUT=${resultfile}.out"
@@ -196,7 +190,7 @@
NAME H5LS_UD-${testname}
COMMAND "${CMAKE_COMMAND}"
-D "TEST_EMULATOR=${CMAKE_CROSSCOMPILING_EMULATOR}"
- -D "TEST_PROGRAM=$<TARGET_FILE:h5ls${tgt_ext}>"
+ -D "TEST_PROGRAM=$<TARGET_FILE:h5ls${tgt_file_ext}>"
-D "TEST_ARGS=${ARGN}"
-D "TEST_FOLDER=${PROJECT_BINARY_DIR}/testfiles"
-D "TEST_OUTPUT=${resultfile}.out"
diff --git a/tools/test/h5ls/CMakeTestsVDS.cmake b/tools/test/h5ls/CMakeTestsVDS.cmake
index cf5b6d7..3fc8aab 100644
--- a/tools/test/h5ls/CMakeTestsVDS.cmake
+++ b/tools/test/h5ls/CMakeTestsVDS.cmake
@@ -80,16 +80,10 @@
##############################################################################
##############################################################################
- if (NOT BUILD_SHARED_LIBS)
- set (tgt_ext "")
- else ()
- set (tgt_ext "-shared")
- endif ()
-
macro (ADD_H5_VDS_TEST resultfile resultcode)
# If using memchecker add tests without using scripts
if (HDF5_ENABLE_USING_MEMCHECKER)
- add_test (NAME H5LS-${resultfile} COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} $<TARGET_FILE:h5ls${tgt_ext}> ${ARGN})
+ add_test (NAME H5LS-${resultfile} COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} $<TARGET_FILE:h5ls${tgt_file_ext}> ${ARGN})
set_tests_properties (H5LS-${resultfile} PROPERTIES WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles/vds")
if (${resultcode} EQUAL 1)
set_tests_properties (H5LS-${resultfile} PROPERTIES WILL_FAIL "true")
@@ -99,7 +93,7 @@
NAME H5LS-${resultfile}
COMMAND "${CMAKE_COMMAND}"
-D "TEST_EMULATOR=${CMAKE_CROSSCOMPILING_EMULATOR}"
- -D "TEST_PROGRAM=$<TARGET_FILE:h5ls${tgt_ext}>"
+ -D "TEST_PROGRAM=$<TARGET_FILE:h5ls${tgt_file_ext}>"
-D "TEST_ARGS=${ARGN}"
-D "TEST_FOLDER=${PROJECT_BINARY_DIR}/testfiles/vds"
-D "TEST_OUTPUT=${resultfile}.out"
@@ -113,7 +107,7 @@
macro (ADD_H5_VDS_PREFIX_TEST resultfile resultcode)
# If using memchecker add tests without using scripts
if (HDF5_ENABLE_USING_MEMCHECKER)
- add_test (NAME H5LS_PREFIX-${resultfile} COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} $<TARGET_FILE:h5ls${tgt_ext}> ${ARGN})
+ add_test (NAME H5LS_PREFIX-${resultfile} COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} $<TARGET_FILE:h5ls${tgt_file_ext}> ${ARGN})
set_tests_properties (H5LS_PREFIX-${resultfile} PROPERTIES
ENVIRONMENT "HDF5_VDS_PREFIX=\${ORIGIN}"
WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles"
@@ -126,7 +120,7 @@
NAME H5LS_PREFIX-${resultfile}
COMMAND "${CMAKE_COMMAND}"
-D "TEST_EMULATOR=${CMAKE_CROSSCOMPILING_EMULATOR}"
- -D "TEST_PROGRAM=$<TARGET_FILE:h5ls${tgt_ext}>"
+ -D "TEST_PROGRAM=$<TARGET_FILE:h5ls${tgt_file_ext}>"
-D "TEST_ARGS=${ARGN}"
-D "TEST_FOLDER=${PROJECT_BINARY_DIR}/testfiles"
-D "TEST_OUTPUT=vds/prefix/${resultfile}.out"
diff --git a/tools/test/h5ls/Makefile.in b/tools/test/h5ls/Makefile.in
index 0ebfcff..85082e8 100644
--- a/tools/test/h5ls/Makefile.in
+++ b/tools/test/h5ls/Makefile.in
@@ -420,15 +420,15 @@ AMTAR = @AMTAR@
# H5_CFLAGS holds flags that should be used when building hdf5,
# but which should not be exported to h5cc for building other programs.
-# AM_CFLAGS is an automake construct which should be used by Makefiles
+# AM_CFLAGS is an automake construct which should be used by Makefiles
# instead of CFLAGS, as CFLAGS is reserved solely for the user to define.
# This applies to FCFLAGS, CXXFLAGS, CPPFLAGS, and LDFLAGS as well.
-AM_CFLAGS = @AM_CFLAGS@ @H5_CFLAGS@
+AM_CFLAGS = @AM_CFLAGS@ @H5_CFLAGS@ @H5_ECFLAGS@
# Include src and tools/lib directories
AM_CPPFLAGS = @AM_CPPFLAGS@ @H5_CPPFLAGS@ -I$(top_srcdir)/src \
-I$(top_srcdir)/tools/lib
-AM_CXXFLAGS = @AM_CXXFLAGS@ @H5_CXXFLAGS@
+AM_CXXFLAGS = @AM_CXXFLAGS@ @H5_CXXFLAGS@ @H5_ECXXFLAGS@
AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
AM_FCFLAGS = @AM_FCFLAGS@ @H5_FCFLAGS@
AM_JAVACFLAGS = @AM_JAVACFLAGS@
@@ -448,6 +448,7 @@ CC = @CC@
CCDEPMODE = @CCDEPMODE@
CC_VERSION = @CC_VERSION@
CFLAGS = @CFLAGS@
+CLANG_SANITIZE_CHECKS = @CLANG_SANITIZE_CHECKS@
CODESTACK = @CODESTACK@
CONFIG_DATE = @CONFIG_DATE@
CONFIG_MODE = @CONFIG_MODE@
@@ -464,6 +465,7 @@ DEFAULT_API_VERSION = @DEFAULT_API_VERSION@
DEFS = @DEFS@
DEPDIR = @DEPDIR@
DEPRECATED_SYMBOLS = @DEPRECATED_SYMBOLS@
+DESIRED_FILE_LOCKING = @DESIRED_FILE_LOCKING@
DEV_WARNINGS = @DEV_WARNINGS@
DIRECT_VFD = @DIRECT_VFD@
DLLTOOL = @DLLTOOL@
@@ -500,8 +502,11 @@ H5_CFLAGS = @H5_CFLAGS@
H5_CLASSPATH = @H5_CLASSPATH@
H5_CPPFLAGS = @H5_CPPFLAGS@
H5_CXXFLAGS = @H5_CXXFLAGS@
+H5_ECFLAGS = @H5_ECFLAGS@
+H5_ECXXFLAGS = @H5_ECXXFLAGS@
H5_FCFLAGS = @H5_FCFLAGS@
H5_FORTRAN_SHARED = @H5_FORTRAN_SHARED@
+H5_IS_DARWIN = @H5_IS_DARWIN@
H5_JAVACFLAGS = @H5_JAVACFLAGS@
H5_JAVAFLAGS = @H5_JAVAFLAGS@
H5_JNIFLAGS = @H5_JNIFLAGS@
@@ -524,6 +529,7 @@ HL = @HL@
HL_FOR = @HL_FOR@
HSIZE_T = @HSIZE_T@
HSSIZE_T = @HSSIZE_T@
+IGNORE_DISABLED_FILE_LOCKS = @IGNORE_DISABLED_FILE_LOCKS@
INSTALL = @INSTALL@
INSTALL_DATA = @INSTALL_DATA@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
@@ -560,6 +566,7 @@ MAINT = @MAINT@
MAKEINFO = @MAKEINFO@
MANIFEST_TOOL = @MANIFEST_TOOL@
MEMORYALLOCSANITYCHECK = @MEMORYALLOCSANITYCHECK@
+MIRROR_VFD = @MIRROR_VFD@
MKDIR_P = @MKDIR_P@
MPE = @MPE@
NM = @NM@
@@ -619,6 +626,7 @@ TIME = @TIME@
TR = @TR@
TRACE_API = @TRACE_API@
UNAME_INFO = @UNAME_INFO@
+USE_FILE_LOCKING = @USE_FILE_LOCKING@
USE_FILTER_DEFLATE = @USE_FILTER_DEFLATE@
USE_FILTER_SZIP = @USE_FILTER_SZIP@
USINGMEMCHECKER = @USINGMEMCHECKER@
@@ -654,6 +662,7 @@ docdir = $(exec_prefix)/doc
dvidir = @dvidir@
enable_shared = @enable_shared@
enable_static = @enable_static@
+examplesdir = @examplesdir@
exec_prefix = @exec_prefix@
fortran_linux_linker_option = @fortran_linux_linker_option@
host = @host@
@@ -710,15 +719,15 @@ LIBH5_HL = $(top_builddir)/hl/src/libhdf5_hl.la
LIBH5F_HL = $(top_builddir)/hl/fortran/src/libhdf5hl_fortran.la
LIBH5CPP_HL = $(top_builddir)/hl/c++/src/libhdf5_hl_cpp.la
-# Note that in svn revision 19400 the '/' after DESTDIR in H5* variables below
-# has been removed. According to the official description of DESTDIR by Gnu at
-# http://www.gnu.org/prep/standards/html_node/DESTDIR.html, DESTDIR is
-# prepended to the normal and complete install path that it precedes for the
-# purpose of installing in a temporary directory which is useful for building
-# rpms and other packages. The '/' after ${DESTDIR} will be followed by another
-# '/' at the beginning of the normal install path. When DESTDIR is empty the
-# path then begins with '//', which is incorrect and causes problems at least for
-# Cygwin.
+# Note that in svn revision 19400 the '/' after DESTDIR in H5* variables below
+# has been removed. According to the official description of DESTDIR by Gnu at
+# http://www.gnu.org/prep/standards/html_node/DESTDIR.html, DESTDIR is
+# prepended to the normal and complete install path that it precedes for the
+# purpose of installing in a temporary directory which is useful for building
+# rpms and other packages. The '/' after ${DESTDIR} will be followed by another
+# '/' at the beginning of the normal install path. When DESTDIR is empty the
+# path then begins with '//', which is incorrect and causes problems at least for
+# Cygwin.
# Scripts used to build examples
# If only shared libraries have been installed, have h5cc build examples with
@@ -762,7 +771,7 @@ LIB = $(lib_LIBRARIES) $(lib_LTLIBRARIES) $(noinst_LIBRARIES) \
PROGS = $(bin_PROGRAMS) $(bin_SCRIPTS) $(noinst_PROGRAMS) $(noinst_SCRIPTS) \
$(EXTRA_PROG)
-chk_TESTS = $(check_PROGRAMS) $(check_SCRIPTS) $(EXTRA_TEST)
+chk_TESTS = $(check_PROGRAMS) $(check_SCRIPTS) $(EXTRA_TEST)
TEST_EXTENSIONS = .sh
SH_LOG_COMPILER = $(SHELL)
AM_SH_LOG_FLAGS =
@@ -1328,28 +1337,37 @@ $(TEST_PROG_CHKEXE) $(TEST_PROG_PARA_CHKEXE) dummy.chkexe_:
echo "============================" > $${log}; \
fi; \
if test "X$(FORTRAN_API)" = "Xyes"; then \
- echo "Fortran API: Testing $(HDF5_DRIVER) $${tname} $(TEST_FLAGS)"; \
+ echo "Fortran API: Testing $${tname} $(TEST_FLAGS)"; \
if test -n "$(REALTIMEOUTPUT)"; then \
- echo "Fortran API: $(HDF5_DRIVER) $${tname} $(TEST_FLAGS) Test Log" | tee -a $${log}; \
+ echo "Fortran API: Test log for $${tname} $(TEST_FLAGS)" | tee -a $${log}; \
else \
- echo "Fortran API: $(HDF5_DRIVER) $${tname} $(TEST_FLAGS) Test Log" >> $${log}; \
+ echo "Fortran API: Test log for $${tname} $(TEST_FLAGS)" >> $${log}; \
fi; \
elif test "X$(CXX_API)" = "Xyes"; then \
- echo "C++ API: Testing $(HDF5_DRIVER) $${tname} $(TEST_FLAGS)"; \
+ echo "C++ API: Testing $${tname} $(TEST_FLAGS)"; \
if test -n "$(REALTIMEOUTPUT)"; then \
- echo "C++ API: $(HDF5_DRIVER) $${tname} $(TEST_FLAGS) Test Log" | tee -a $${log};\
+ echo "C++ API: Test log for $${tname} $(TEST_FLAGS)" | tee -a $${log};\
else \
- echo "C++ API: $(HDF5_DRIVER) $${tname} $(TEST_FLAGS) Test Log" >> $${log};\
+ echo "C++ API: Test log for $${tname} $(TEST_FLAGS)" >> $${log};\
fi; \
else \
- echo "Testing $(HDF5_DRIVER) $${tname} $(TEST_FLAGS)"; \
+ echo "Testing: $${tname} $(TEST_FLAGS)"; \
if test -n "$(REALTIMEOUTPUT)"; then \
- echo "$(HDF5_DRIVER) $${tname} $(TEST_FLAGS) Test Log" | tee -a $${log}; \
+ echo "Test log for $${tname} $(TEST_FLAGS)" | tee -a $${log}; \
else \
- echo "$(HDF5_DRIVER) $${tname} $(TEST_FLAGS) Test Log" >> $${log}; \
+ echo "Test log for $${tname} $(TEST_FLAGS)" >> $${log}; \
fi; \
fi; \
if test -n "$(REALTIMEOUTPUT)"; then \
+ if test -n "$(HDF5_DRIVER)"; then \
+ echo "Virtual file driver (VFD): $(HDF5_DRIVER)" | tee -a $${log}; \
+ fi; \
+ else \
+ if test -n "$(HDF5_DRIVER)"; then \
+ echo "Virtual file driver (VFD): $(HDF5_DRIVER)" >> $${log}; \
+ fi; \
+ fi; \
+ if test -n "$(REALTIMEOUTPUT)"; then \
echo "============================" | tee -a $${log}; \
else \
echo "============================" >> $${log}; \
diff --git a/tools/test/h5ls/dynlib_ls.c b/tools/test/h5ls/dynlib_ls.c
index 571452e..661a6dc 100644
--- a/tools/test/h5ls/dynlib_ls.c
+++ b/tools/test/h5ls/dynlib_ls.c
@@ -69,7 +69,7 @@ H5Z_filter_dynlibud(unsigned int flags, size_t cd_nelmts,
/* Subtract the original value with MULTIPLIER */
while(buf_left > 0) {
char temp = *int_ptr;
- *int_ptr = temp - MULTIPLIER;
+ *int_ptr = (int8_t)(temp - MULTIPLIER);
int_ptr++;
buf_left -= sizeof(*int_ptr);
} /* end while */
@@ -78,7 +78,7 @@ H5Z_filter_dynlibud(unsigned int flags, size_t cd_nelmts,
/* Add the original value with MULTIPLIER */
while(buf_left > 0) {
char temp = *int_ptr;
- *int_ptr = temp + MULTIPLIER;
+ *int_ptr = (int8_t)(temp + MULTIPLIER);
int_ptr++;
buf_left -= sizeof(*int_ptr);
} /* end while */
diff --git a/tools/test/h5ls/h5ls_plugin.sh.in b/tools/test/h5ls/h5ls_plugin.sh.in
index c89269d..28370e6 100644
--- a/tools/test/h5ls/h5ls_plugin.sh.in
+++ b/tools/test/h5ls/h5ls_plugin.sh.in
@@ -139,8 +139,8 @@ CLEAN_TESTFILES_AND_TESTDIR()
# Print a $* message left justified in a field of 70 characters
#
MESSAGE() {
- SPACES=" "
- echo "$* $SPACES" | cut -c1-70 | tr -d '\012'
+ SPACES=" "
+ echo "$* $SPACES" | cut -c1-70 | tr -d '\012'
}
# Print a line-line message left justified in a field of 70 characters
@@ -206,7 +206,7 @@ TOOLTEST() {
echo ""
fi
elif [ ! -f $expect ]; then
- # Create the expect file if it doesn't yet exist.
+ # Create the expect file if it doesn't yet exist.
echo " CREATED"
cp $actual $expect
echo " Expected result (*.ls) missing"
diff --git a/tools/test/h5repack/CMakeLists.txt b/tools/test/h5repack/CMakeLists.txt
index f81ce4f..54cff64 100644
--- a/tools/test/h5repack/CMakeLists.txt
+++ b/tools/test/h5repack/CMakeLists.txt
@@ -1,4 +1,4 @@
-cmake_minimum_required (VERSION 3.10)
+cmake_minimum_required (VERSION 3.12)
project (HDF5_TOOLS_TEST_H5REPACK C)
# --------------------------------------------------------------------
@@ -28,7 +28,7 @@ set (REPACK_COMMON_SOURCES
)
add_executable (h5repacktest ${REPACK_COMMON_SOURCES} ${HDF5_TOOLS_TEST_H5REPACK_SOURCE_DIR}/h5repacktst.c)
target_include_directories (h5repacktest
- PRIVATE "${HDF5_TOOLS_SRC_H5REPACK_SOURCE_DIR};${HDF5_TOOLS_DIR}/lib;${HDF5_SRC_DIR};${HDF5_BINARY_DIR};$<$<BOOL:${HDF5_ENABLE_PARALLEL}>:${MPI_C_INCLUDE_DIRS}>"
+ PRIVATE "${HDF5_TOOLS_SRC_H5REPACK_SOURCE_DIR};${HDF5_TOOLS_DIR}/lib;${HDF5_SRC_DIR};${HDF5_TEST_SRC_DIR};${HDF5_BINARY_DIR};$<$<BOOL:${HDF5_ENABLE_PARALLEL}>:${MPI_C_INCLUDE_DIRS}>"
)
if (NOT ONLY_SHARED_LIBS)
TARGET_C_PROPERTIES (h5repacktest STATIC)
@@ -98,4 +98,6 @@ if (HDF5_BUILD_GENERATORS AND NOT ONLY_SHARED_LIBS)
#add_test (NAME h5repackgentest COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} $<TARGET_FILE:h5repackgentest>)
endif ()
-include (CMakeTests.cmake)
+if (HDF5_TEST_TOOLS AND HDF5_TEST_SERIAL)
+ include (CMakeTests.cmake)
+endif ()
diff --git a/tools/test/h5repack/CMakeTests.cmake b/tools/test/h5repack/CMakeTests.cmake
index c8db1c3..33c12d1 100644
--- a/tools/test/h5repack/CMakeTests.cmake
+++ b/tools/test/h5repack/CMakeTests.cmake
@@ -72,6 +72,14 @@
${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 for external links
+ ${HDF5_TOOLS_DIR}/testfiles/tsoftlinks.h5
+ ${HDF5_TOOLS_DIR}/testfiles/textlinkfar.h5
+ ${HDF5_TOOLS_DIR}/testfiles/textlinksrc.h5
+ ${HDF5_TOOLS_DIR}/testfiles/textlinktar.h5
+ ${HDF5_TOOLS_DIR}/testfiles/textlink.h5
+ ${HDF5_TOOLS_TEST_H5REPACK_SOURCE_DIR}/testfiles/h5copy_extlinks_src.h5
+ ${HDF5_TOOLS_TEST_H5REPACK_SOURCE_DIR}/testfiles/h5copy_extlinks_trg.h5
# tools/testfiles
${HDF5_TOOLS_DIR}/testfiles/tfamily00000.h5
${HDF5_TOOLS_DIR}/testfiles/tfamily00001.h5
@@ -125,6 +133,13 @@
${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
+ # tools/testfiles for external links
+ ${HDF5_TOOLS_TEST_H5REPACK_SOURCE_DIR}/testfiles/tsoftlinks-merge.tsoftlinks.h5
+ ${HDF5_TOOLS_TEST_H5REPACK_SOURCE_DIR}/testfiles/textlinkfar-merge.textlinkfar.h5
+ ${HDF5_TOOLS_TEST_H5REPACK_SOURCE_DIR}/testfiles/textlinksrc-merge.textlinksrc.h5
+ ${HDF5_TOOLS_TEST_H5REPACK_SOURCE_DIR}/testfiles/textlinktar-merge.textlinktar.h5
+ ${HDF5_TOOLS_TEST_H5REPACK_SOURCE_DIR}/testfiles/textlink-merge.textlink.h5
+ ${HDF5_TOOLS_TEST_H5REPACK_SOURCE_DIR}/testfiles/h5copy_extlinks_src-merge.h5copy_extlinks_src.h5
)
set (LIST_DDL_TEST_FILES
@@ -148,6 +163,25 @@
${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
+ # tools/testfiles for external links
+ ${HDF5_TOOLS_TEST_H5REPACK_SOURCE_DIR}/testfiles/textlinkfar-base.textlinkfar.h5
+ ${HDF5_TOOLS_TEST_H5REPACK_SOURCE_DIR}/testfiles/textlinksrc-base.textlinksrc.h5
+ ${HDF5_TOOLS_TEST_H5REPACK_SOURCE_DIR}/testfiles/textlinktar-base.textlinktar.h5
+ ${HDF5_TOOLS_TEST_H5REPACK_SOURCE_DIR}/testfiles/textlink-base.textlink.h5
+ ${HDF5_TOOLS_TEST_H5REPACK_SOURCE_DIR}/testfiles/tsoftlinks-base.tsoftlinks.h5
+ ${HDF5_TOOLS_TEST_H5REPACK_SOURCE_DIR}/testfiles/h5copy_extlinks_src-base.h5copy_extlinks_src.h5
+ ${HDF5_TOOLS_TEST_H5REPACK_SOURCE_DIR}/testfiles/textlinkfar-prune.textlinkfar.h5
+ ${HDF5_TOOLS_TEST_H5REPACK_SOURCE_DIR}/testfiles/textlinksrc-prune.textlinksrc.h5
+ ${HDF5_TOOLS_TEST_H5REPACK_SOURCE_DIR}/testfiles/textlinktar-prune.textlinktar.h5
+ ${HDF5_TOOLS_TEST_H5REPACK_SOURCE_DIR}/testfiles/textlink-prune.textlink.h5
+ ${HDF5_TOOLS_TEST_H5REPACK_SOURCE_DIR}/testfiles/tsoftlinks-prune.tsoftlinks.h5
+ ${HDF5_TOOLS_TEST_H5REPACK_SOURCE_DIR}/testfiles/h5copy_extlinks_src-prune.h5copy_extlinks_src.h5
+ ${HDF5_TOOLS_TEST_H5REPACK_SOURCE_DIR}/testfiles/textlinkfar-mergeprune.textlinkfar.h5
+ ${HDF5_TOOLS_TEST_H5REPACK_SOURCE_DIR}/testfiles/textlinksrc-mergeprune.textlinksrc.h5
+ ${HDF5_TOOLS_TEST_H5REPACK_SOURCE_DIR}/testfiles/textlinktar-mergeprune.textlinktar.h5
+ ${HDF5_TOOLS_TEST_H5REPACK_SOURCE_DIR}/testfiles/textlink-mergeprune.textlink.h5
+ ${HDF5_TOOLS_TEST_H5REPACK_SOURCE_DIR}/testfiles/tsoftlinks-mergeprune.tsoftlinks.h5
+ ${HDF5_TOOLS_TEST_H5REPACK_SOURCE_DIR}/testfiles/h5copy_extlinks_src-mergeprune.h5copy_extlinks_src.h5
)
foreach (h5_file ${LIST_HDF5_TEST_FILES})
@@ -176,16 +210,10 @@
##############################################################################
##############################################################################
- if (NOT BUILD_SHARED_LIBS)
- set (tgt_ext "")
- else ()
- set (tgt_ext "-shared")
- endif ()
-
macro (ADD_HELP_TEST testname resultcode)
# If using memchecker add tests without using scripts
if (HDF5_ENABLE_USING_MEMCHECKER)
- add_test (NAME H5REPACK-h5repack-${testname} COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} $<TARGET_FILE:h5repack${tgt_ext}> ${ARGN})
+ add_test (NAME H5REPACK-h5repack-${testname} COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} $<TARGET_FILE:h5repack${tgt_file_ext}> ${ARGN})
set_tests_properties (H5REPACK-h5repack-${testname} PROPERTIES
WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles"
)
@@ -194,7 +222,7 @@
NAME H5REPACK-h5repack-${testname}
COMMAND "${CMAKE_COMMAND}"
-D "TEST_EMULATOR=${CMAKE_CROSSCOMPILING_EMULATOR}"
- -D "TEST_PROGRAM=$<TARGET_FILE:h5repack${tgt_ext}>"
+ -D "TEST_PROGRAM=$<TARGET_FILE:h5repack${tgt_file_ext}>"
-D "TEST_ARGS:STRING=${ARGN}"
-D "TEST_FOLDER=${PROJECT_BINARY_DIR}/testfiles"
-D "TEST_OUTPUT=h5repack-${testname}.out"
@@ -226,14 +254,14 @@
)
add_test (
NAME H5REPACK_OLD-${testname}
- COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} $<TARGET_FILE:h5repack${tgt_ext}> ${ARGN} -i ${PROJECT_BINARY_DIR}/testfiles/${testfile} -o ${PROJECT_BINARY_DIR}/testfiles/out-${testname}.${testfile}
+ COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} $<TARGET_FILE:h5repack${tgt_file_ext}> ${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 ${CMAKE_CROSSCOMPILING_EMULATOR} $<TARGET_FILE:h5diff${tgt_ext}> ${PROJECT_BINARY_DIR}/testfiles/${testfile} ${PROJECT_BINARY_DIR}/testfiles/out-${testname}.${testfile}
+ COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} $<TARGET_FILE:h5diff${tgt_file_ext}> ${PROJECT_BINARY_DIR}/testfiles/${testfile} ${PROJECT_BINARY_DIR}/testfiles/out-${testname}.${testfile}
)
set_tests_properties (H5REPACK_OLD-${testname}_DFF PROPERTIES
DEPENDS H5REPACK_OLD-${testname}
@@ -261,14 +289,14 @@
)
add_test (
NAME H5REPACK-${testname}
- COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} $<TARGET_FILE:h5repack${tgt_ext}> --enable-error-stack ${ARGN} ${PROJECT_BINARY_DIR}/testfiles/${testfile} ${PROJECT_BINARY_DIR}/testfiles/out-${testname}.${testfile}
+ COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} $<TARGET_FILE:h5repack${tgt_file_ext}> --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 ${CMAKE_CROSSCOMPILING_EMULATOR} $<TARGET_FILE:h5diff${tgt_ext}> --enable-error-stack ${PROJECT_BINARY_DIR}/testfiles/${testfile} ${PROJECT_BINARY_DIR}/testfiles/out-${testname}.${testfile}
+ COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} $<TARGET_FILE:h5diff${tgt_file_ext}> --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}
@@ -276,7 +304,7 @@
endif ()
endmacro ()
- macro (ADD_H5_CMP_TEST testname testfilter testtype resultcode resultfile)
+ macro (ADD_H5_FILTER_TEST testname testfilter testtype resultcode resultfile)
if ("${testtype}" STREQUAL "SKIP")
if (NOT HDF5_ENABLE_USING_MEMCHECKER)
add_test (
@@ -290,7 +318,7 @@
if (HDF5_ENABLE_USING_MEMCHECKER)
add_test (
NAME H5REPACK_CMP-${testname}
- COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} $<TARGET_FILE:h5repack${tgt_ext}> ${ARGN} ${PROJECT_BINARY_DIR}/testfiles/${resultfile} ${PROJECT_BINARY_DIR}/testfiles/out-${testname}.${resultfile}
+ COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} $<TARGET_FILE:h5repack${tgt_file_ext}> ${ARGN} ${PROJECT_BINARY_DIR}/testfiles/${resultfile} ${PROJECT_BINARY_DIR}/testfiles/out-${testname}.${resultfile}
)
else ()
add_test (
@@ -304,7 +332,7 @@
NAME H5REPACK_CMP-${testname}
COMMAND "${CMAKE_COMMAND}"
-D "TEST_EMULATOR=${CMAKE_CROSSCOMPILING_EMULATOR}"
- -D "TEST_PROGRAM=$<TARGET_FILE:h5repack${tgt_ext}>"
+ -D "TEST_PROGRAM=$<TARGET_FILE:h5repack${tgt_file_ext}>"
-D "TEST_ARGS:STRING=${ARGN};${resultfile};out-${testname}.${resultfile}"
-D "TEST_FOLDER=${PROJECT_BINARY_DIR}/testfiles"
-D "TEST_OUTPUT=${resultfile}-${testname}.out"
@@ -334,7 +362,7 @@
if (HDF5_ENABLE_USING_MEMCHECKER)
add_test (
NAME H5REPACK_MASK-${testname}
- COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} $<TARGET_FILE:h5repack${tgt_ext}> ${ARGN} ${PROJECT_BINARY_DIR}/testfiles/${resultfile} ${PROJECT_BINARY_DIR}/testfiles/out-${testname}.${resultfile}
+ COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} $<TARGET_FILE:h5repack${tgt_file_ext}> ${ARGN} ${PROJECT_BINARY_DIR}/testfiles/${resultfile} ${PROJECT_BINARY_DIR}/testfiles/out-${testname}.${resultfile}
)
set_tests_properties (H5REPACK_MASK-${testname} PROPERTIES
FIXTURES_REQUIRED clear_h5repack
@@ -351,7 +379,7 @@
NAME H5REPACK_MASK-${testname}
COMMAND "${CMAKE_COMMAND}"
-D "TEST_EMULATOR=${CMAKE_CROSSCOMPILING_EMULATOR}"
- -D "TEST_PROGRAM=$<TARGET_FILE:h5repack${tgt_ext}>"
+ -D "TEST_PROGRAM=$<TARGET_FILE:h5repack${tgt_file_ext}>"
-D "TEST_ARGS:STRING=${ARGN};${resultfile};out-${testname}.${resultfile}"
-D "TEST_FOLDER=${PROJECT_BINARY_DIR}/testfiles"
-D "TEST_OUTPUT=${resultfile}-${testname}.out"
@@ -385,7 +413,7 @@
)
add_test (
NAME H5REPACK_DMP-${testname}
- COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} $<TARGET_FILE:h5repack${tgt_ext}> ${ARGN} ${PROJECT_BINARY_DIR}/testfiles/${resultfile} ${PROJECT_BINARY_DIR}/testfiles/out-${testname}.${resultfile}
+ COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} $<TARGET_FILE:h5repack${tgt_file_ext}> ${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
@@ -395,7 +423,7 @@
NAME H5REPACK_DMP-h5dump-${testname}
COMMAND "${CMAKE_COMMAND}"
-D "TEST_EMULATOR=${CMAKE_CROSSCOMPILING_EMULATOR}"
- -D "TEST_PROGRAM=$<TARGET_FILE:h5dump${tgt_ext}>"
+ -D "TEST_PROGRAM=$<TARGET_FILE:h5dump${tgt_file_ext}>"
-D "TEST_ARGS:STRING=-q;creation_order;-pH;out-${testname}.${resultfile}"
-D "TEST_FOLDER=${PROJECT_BINARY_DIR}/testfiles"
-D "TEST_OUTPUT=${resultfile}-${testname}.out"
@@ -410,6 +438,48 @@
endif ()
endmacro ()
+ macro (ADD_H5_DIFF_TEST testname testtype resultcode testfile)
+ if ("${testtype}" STREQUAL "SKIP")
+ if (NOT HDF5_ENABLE_USING_MEMCHECKER)
+ add_test (
+ NAME H5REPACK_DIFF-${testname}
+ COMMAND ${CMAKE_COMMAND} -E echo "SKIP ${ARGN} ${PROJECT_BINARY_DIR}/testfiles/${testfile} ${PROJECT_BINARY_DIR}/testfiles/out-${testname}.${testfile}"
+ )
+ set_property(TEST H5REPACK_DIFF-${testname} PROPERTY DISABLED)
+ endif ()
+ else ()
+ add_test (
+ NAME H5REPACK_DIFF-${testname}-clear-objects
+ COMMAND ${CMAKE_COMMAND} -E remove testfiles/out-${testname}.${testfile}
+ )
+ set_tests_properties (H5REPACK_DIFF-${testname}-clear-objects PROPERTIES
+ FIXTURES_REQUIRED clear_h5repack
+ )
+ add_test (
+ NAME H5REPACK_DIFF-${testname}
+ COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} $<TARGET_FILE:h5repack${tgt_file_ext}> --enable-error-stack ${ARGN} ${PROJECT_BINARY_DIR}/testfiles/${testfile} ${PROJECT_BINARY_DIR}/testfiles/out-${testname}.${testfile}
+ )
+ set_tests_properties (H5REPACK_DIFF-${testname} PROPERTIES
+ DEPENDS H5REPACK_DIFF-${testname}-clear-objects
+ )
+ add_test (
+ NAME H5REPACK_DIFF-${testname}_DFF
+ COMMAND "${CMAKE_COMMAND}"
+ -D "TEST_EMULATOR=${CMAKE_CROSSCOMPILING_EMULATOR}"
+ -D "TEST_PROGRAM=$<TARGET_FILE:h5diff${tgt_file_ext}>"
+ -D "TEST_ARGS:STRING=-v;--enable-error-stack;${testfile};out-${testname}.${testfile}"
+ -D "TEST_FOLDER=${PROJECT_BINARY_DIR}/testfiles"
+ -D "TEST_OUTPUT=out-${testname}.${testfile}.out"
+ -D "TEST_EXPECT=${resultcode}"
+ -D "TEST_REFERENCE=${testname}.${testfile}.tst"
+ -P "${HDF_RESOURCES_EXT_DIR}/runTest.cmake"
+ )
+ set_tests_properties (H5REPACK_DIFF-${testname}_DFF PROPERTIES
+ DEPENDS H5REPACK_DIFF-${testname}
+ )
+ endif ()
+ endmacro ()
+
macro (ADD_H5_STAT_TEST testname testtype resultcode statarg resultfile)
if ("${testtype}" STREQUAL "SKIP")
if (NOT HDF5_ENABLE_USING_MEMCHECKER)
@@ -429,7 +499,7 @@
)
add_test (
NAME H5REPACK_STAT-${testname}
- COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} $<TARGET_FILE:h5repack${tgt_ext}> ${ARGN} ${PROJECT_BINARY_DIR}/testfiles/${resultfile} ${PROJECT_BINARY_DIR}/testfiles/out-${statarg}.${resultfile}
+ COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} $<TARGET_FILE:h5repack${tgt_file_ext}> ${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
@@ -439,7 +509,7 @@
NAME H5REPACK_STAT-h5stat-${testname}
COMMAND "${CMAKE_COMMAND}"
-D "TEST_EMULATOR=${CMAKE_CROSSCOMPILING_EMULATOR}"
- -D "TEST_PROGRAM=$<TARGET_FILE:h5stat${tgt_ext}>"
+ -D "TEST_PROGRAM=$<TARGET_FILE:h5stat${tgt_file_ext}>"
-D "TEST_ARGS:STRING=-S;-s;out-${statarg}.${resultfile}"
-D "TEST_FOLDER=${PROJECT_BINARY_DIR}/testfiles"
-D "TEST_OUTPUT=${resultfile}-${testname}.out"
@@ -474,14 +544,14 @@
)
add_test (
NAME H5REPACK_VERIFY_LAYOUT-${testname}
- COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} $<TARGET_FILE:h5repack${tgt_ext}> ${ARGN} ${PROJECT_BINARY_DIR}/testfiles/${testfile} ${PROJECT_BINARY_DIR}/testfiles/out-${testname}.${testfile}
+ COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} $<TARGET_FILE:h5repack${tgt_file_ext}> ${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 ${CMAKE_CROSSCOMPILING_EMULATOR} $<TARGET_FILE:h5diff${tgt_ext}> ${PROJECT_BINARY_DIR}/testfiles/${testfile} ${PROJECT_BINARY_DIR}/testfiles/out-${testname}.${testfile}
+ COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} $<TARGET_FILE:h5diff${tgt_file_ext}> ${PROJECT_BINARY_DIR}/testfiles/${testfile} ${PROJECT_BINARY_DIR}/testfiles/out-${testname}.${testfile}
)
set_tests_properties (H5REPACK_VERIFY_LAYOUT-${testname}_DFF PROPERTIES
DEPENDS H5REPACK_VERIFY_LAYOUT-${testname}
@@ -491,7 +561,7 @@
NAME H5REPACK_VERIFY_LAYOUT-${testname}_DMP
COMMAND "${CMAKE_COMMAND}"
-D "TEST_EMULATOR=${CMAKE_CROSSCOMPILING_EMULATOR}"
- -D "TEST_PROGRAM=$<TARGET_FILE:h5dump${tgt_ext}>"
+ -D "TEST_PROGRAM=$<TARGET_FILE:h5dump${tgt_file_ext}>"
-D "TEST_ARGS:STRING=-d;${testdset};-pH;out-${testname}.${testfile}"
-D "TEST_FOLDER=${PROJECT_BINARY_DIR}/testfiles"
-D "TEST_OUTPUT=${testfile}-${testname}-v.out"
@@ -517,7 +587,7 @@
NAME H5REPACK_VERIFY_LAYOUT-${testname}_DMP
COMMAND "${CMAKE_COMMAND}"
-D "TEST_EMULATOR=${CMAKE_CROSSCOMPILING_EMULATOR}"
- -D "TEST_PROGRAM=$<TARGET_FILE:h5dump${tgt_ext}>"
+ -D "TEST_PROGRAM=$<TARGET_FILE:h5dump${tgt_file_ext}>"
-D "TEST_ARGS:STRING=-pH;out-${testname}.${testfile}"
-D "TEST_FOLDER=${PROJECT_BINARY_DIR}/testfiles"
-D "TEST_OUTPUT=${testfile}-${testname}-v.out"
@@ -555,7 +625,7 @@
)
add_test (
NAME H5REPACK_VERIFY_LAYOUT_VDS-${testname}
- COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} $<TARGET_FILE:h5repack${tgt_ext}> ${ARGN} ${PROJECT_BINARY_DIR}/testfiles/${testfile} ${PROJECT_BINARY_DIR}/testfiles/out-${testname}.${testfile}
+ COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} $<TARGET_FILE:h5repack${tgt_file_ext}> ${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"
@@ -565,7 +635,7 @@
NAME H5REPACK_VERIFY_LAYOUT_VDS-${testname}_DMP
COMMAND "${CMAKE_COMMAND}"
-D "TEST_EMULATOR=${CMAKE_CROSSCOMPILING_EMULATOR}"
- -D "TEST_PROGRAM=$<TARGET_FILE:h5dump${tgt_ext}>"
+ -D "TEST_PROGRAM=$<TARGET_FILE:h5dump${tgt_file_ext}>"
-D "TEST_ARGS:STRING=-d;${testdset};-p;out-${testname}.${testfile}"
-D "TEST_FOLDER=${PROJECT_BINARY_DIR}/testfiles"
-D "TEST_OUTPUT=${testfile}-${testname}-v.out"
@@ -593,7 +663,7 @@
)
add_test (
NAME H5REPACK_VERIFY_SUPERBLOCK-${testname}
- COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} $<TARGET_FILE:h5repack${tgt_ext}> -j;${lowbound};-k;${highbound} ${PROJECT_BINARY_DIR}/testfiles/${testfile} ${PROJECT_BINARY_DIR}/testfiles/out-${testname}.${testfile}
+ COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} $<TARGET_FILE:h5repack${tgt_file_ext}> -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
@@ -602,7 +672,7 @@
NAME H5REPACK_VERIFY_SUPERBLOCK-${testname}_DMP
COMMAND "${CMAKE_COMMAND}"
-D "TEST_EMULATOR=${CMAKE_CROSSCOMPILING_EMULATOR}"
- -D "TEST_PROGRAM=$<TARGET_FILE:h5dump${tgt_ext}>"
+ -D "TEST_PROGRAM=$<TARGET_FILE:h5dump${tgt_file_ext}>"
-D "TEST_ARGS:STRING=-H;-B;out-${testname}.${testfile}"
-D "TEST_FOLDER=${PROJECT_BINARY_DIR}/testfiles"
-D "TEST_OUTPUT=${testfile}-${testname}-v.out"
@@ -627,7 +697,7 @@
)
add_test (
NAME ADD_H5_VERIFY_INVALIDBOUNDS-h5repack-${testname}
- COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} $<TARGET_FILE:h5repack${tgt_ext}> -j;${lowbound};-k;${highbound} ${PROJECT_BINARY_DIR}/testfiles/${testfile} ${PROJECT_BINARY_DIR}/testfiles/out-${testname}.${testfile}
+ COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} $<TARGET_FILE:h5repack${tgt_file_ext}> -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
@@ -638,34 +708,78 @@
macro (ADD_H5_TEST_META testname testfile)
# Remove any output file left over from previous test run
add_test (
- NAME H5REPACK_META-${testname}_N-clear-objects
+ NAME H5REPACK_META-${testname}-clear-objects
COMMAND ${CMAKE_COMMAND} -E remove
testfiles/out-${testname}_N.${testname}.h5
+ testfiles/out-${testname}_N.${testname}.out
+ testfiles/out-${testname}_N.${testname}.out.err
testfiles/out-${testname}_M.${testname}.h5
+ testfiles/out-${testname}_M.${testname}.out
+ testfiles/out-${testname}_M.${testname}.out.err
)
- set_tests_properties (H5REPACK_META-${testname}_N-clear-objects PROPERTIES
+ set_tests_properties (H5REPACK_META-${testname}-clear-objects PROPERTIES
FIXTURES_REQUIRED clear_h5repack
)
add_test (
NAME H5REPACK_META-${testname}_N
- COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} $<TARGET_FILE:h5repack${tgt_ext}> ${PROJECT_BINARY_DIR}/testfiles/${testfile} ${PROJECT_BINARY_DIR}/testfiles/out-${testname}_N.${testname}.h5
+ COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} $<TARGET_FILE:h5repack${tgt_file_ext}> ${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
+ DEPENDS H5REPACK_META-${testname}-clear-objects
+ )
+ add_test (
+ NAME H5REPACK_META-${testname}_N_DFF
+ COMMAND "${CMAKE_COMMAND}"
+ -D "TEST_EMULATOR=${CMAKE_CROSSCOMPILING_EMULATOR}"
+ -D "TEST_PROGRAM=$<TARGET_FILE:h5diff${tgt_file_ext}>"
+ -D "TEST_ARGS:STRING=-v;${testfile};out-${testname}_N.${testname}.h5"
+ -D "TEST_FOLDER=${PROJECT_BINARY_DIR}/testfiles"
+ -D "TEST_OUTPUT=out-${testname}_N.${testname}.out"
+ -D "TEST_EXPECT=0"
+ -D "TEST_REFERENCE=out-${testname}_N.${testname}.txt"
+ -P "${HDF_RESOURCES_EXT_DIR}/runTest.cmake"
+ )
+ set_tests_properties (H5REPACK_META-${testname}_N_DFF PROPERTIES
+ DEPENDS H5REPACK_META-${testname}_N
)
add_test (
NAME H5REPACK_META-${testname}_M
- COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} $<TARGET_FILE:h5repack${tgt_ext}> ${ARGN} ${PROJECT_BINARY_DIR}/testfiles/${testfile} ${PROJECT_BINARY_DIR}/testfiles/out-${testname}_M.${testname}.h5
+ COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} $<TARGET_FILE:h5repack${tgt_file_ext}> ${ARGN} ${PROJECT_BINARY_DIR}/testfiles/${testfile} ${PROJECT_BINARY_DIR}/testfiles/out-${testname}_M.${testname}.h5
)
set_tests_properties (H5REPACK_META-${testname}_M PROPERTIES
- DEPENDS H5REPACK_META-${testname}_N
+ DEPENDS H5REPACK_META-${testname}_N_DFF
)
-
- add_test (NAME H5REPACK_META-${testname} COMMAND ${CMAKE_COMMAND} -E compare_files ${PROJECT_BINARY_DIR}/testfiles/out-${testname}_N.${testname}.h5 ${PROJECT_BINARY_DIR}/testfiles/out-${testname}_M.${testname}.h5)
- set_tests_properties (H5REPACK_META-${testname} PROPERTIES
- WILL_FAIL "true"
+ add_test (
+ NAME H5REPACK_META-${testname}_M_DFF
+ COMMAND "${CMAKE_COMMAND}"
+ -D "TEST_EMULATOR=${CMAKE_CROSSCOMPILING_EMULATOR}"
+ -D "TEST_PROGRAM=$<TARGET_FILE:h5diff${tgt_file_ext}>"
+ -D "TEST_ARGS:STRING=-v;${testfile};out-${testname}_M.${testname}.h5"
+ -D "TEST_FOLDER=${PROJECT_BINARY_DIR}/testfiles"
+ -D "TEST_OUTPUT=out-${testname}_M.${testname}.out"
+ -D "TEST_EXPECT=0"
+ -D "TEST_REFERENCE=out-${testname}_M.${testname}.txt"
+ -P "${HDF_RESOURCES_EXT_DIR}/runTest.cmake"
+ )
+ set_tests_properties (H5REPACK_META-${testname}_M_DFF PROPERTIES
DEPENDS H5REPACK_META-${testname}_M
)
+ add_test (NAME H5REPACK_META-${testname}
+ COMMAND "${CMAKE_COMMAND}"
+ -D "TEST_FOLDER=${PROJECT_BINARY_DIR}/testfiles"
+ -D "TEST_ONEFILE=out-${testname}_N.${testname}.out"
+ -D "TEST_TWOFILE=out-${testname}_M.${testname}.h5"
+ -D "TEST_FUNCTION=LTEQ"
+ -P "${HDF_RESOURCES_DIR}/fileCompareTest.cmake"
+ )
+ if (CMAKE_VERSION VERSION_LESS "3.14.0")
+ set_tests_properties (H5REPACK_META-${testname} PROPERTIES
+ DISABLED "true"
+ )
+ endif ()
+ set_tests_properties (H5REPACK_META-${testname} PROPERTIES
+ DEPENDS H5REPACK_META-${testname}_M_DFF
+ )
endmacro ()
macro (ADD_H5_UD_TEST testname resultcode resultfile)
@@ -719,100 +833,100 @@
endmacro ()
macro (ADD_H5_EXTERNAL_TEST testname testtype testfile)
- # canonical file = h5repack_${testfile}.h5 - preexist
- # external file = h5repack_${testfile}_ex.h5 - preexist
- # repacked file = h5repack_${testfile}_rp.h5 - created
- # external data file = h5repack_${testfile}_ex-0.dat
- if ("${testtype}" STREQUAL "SKIP")
- if (NOT HDF5_ENABLE_USING_MEMCHECKER)
+ if (NOT HDF5_ENABLE_USING_MEMCHECKER)
+ # canonical file = h5repack_${testfile}.h5 - preexist
+ # external file = h5repack_${testfile}_ex.h5 - preexist
+ # repacked file = h5repack_${testfile}_rp.h5 - created
+ # external data file = h5repack_${testfile}_ex-0.dat
+ if ("${testtype}" STREQUAL "SKIP")
add_test (
NAME H5REPACK_EXTERNAL-${testname}
COMMAND ${CMAKE_COMMAND} -E echo "SKIP ${ARGN} ${PROJECT_BINARY_DIR}/testfiles/${testfile} ${PROJECT_BINARY_DIR}/testfiles/out-${testname}.${testfile}"
)
set_property(TEST H5REPACK_EXTERNAL-${testname} PROPERTY DISABLED)
+ else ()
+ add_test (
+ NAME H5REPACK_EXTERNAL-${testname}-clear-objects
+ COMMAND ${CMAKE_COMMAND} -E remove h5repack_${testfile}_rp.h5
+ )
+ set_tests_properties (H5REPACK_EXTERNAL-${testname}-clear-objects PROPERTIES
+ WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles"
+ FIXTURES_REQUIRED clear_h5repack
+ )
+ # make sure external data file 0 is available
+ add_test (
+ NAME H5REPACK_EXTERNAL-${testname}_CPY
+ COMMAND ${CMAKE_COMMAND} -E copy_if_different
+ "${PROJECT_SOURCE_DIR}/testfiles/h5repack_${testfile}_ex-0.dat" "${PROJECT_BINARY_DIR}/testfiles/h5repack_${testfile}_ex-0.dat"
+ )
+ set_tests_properties (H5REPACK_EXTERNAL-${testname}_CPY PROPERTIES
+ WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles"
+ DEPENDS H5REPACK_EXTERNAL-${testname}-clear-objects
+ )
+ # comparison of known files
+ add_test (
+ NAME H5REPACK_EXTERNAL-${testname}_DFF1
+ COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} $<TARGET_FILE:h5diff${tgt_file_ext}> --enable-error-stack ${PROJECT_BINARY_DIR}/testfiles/h5repack_${testfile}.h5 ${PROJECT_BINARY_DIR}/testfiles/h5repack_${testfile}_ex.h5
+ )
+ set_tests_properties (H5REPACK_EXTERNAL-${testname}_DFF1 PROPERTIES
+ WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles"
+ DEPENDS H5REPACK_EXTERNAL-${testname}_CPY
+ )
+ # repack the external file to the repacked file
+ add_test (
+ NAME H5REPACK_EXTERNAL-${testname}
+ COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} $<TARGET_FILE:h5repack${tgt_file_ext}> --enable-error-stack ${ARGN} ${PROJECT_BINARY_DIR}/testfiles/h5repack_${testfile}_ex.h5 ${PROJECT_BINARY_DIR}/testfiles/h5repack_${testfile}_rp.h5
+ )
+ set_tests_properties (H5REPACK_EXTERNAL-${testname} PROPERTIES
+ WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles"
+ DEPENDS H5REPACK_EXTERNAL-${testname}_DFF1
+ )
+ # comparison of repacked file to known files
+ add_test (
+ NAME H5REPACK_EXTERNAL-${testname}_DFF2
+ COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} $<TARGET_FILE:h5diff${tgt_file_ext}> --enable-error-stack ${PROJECT_BINARY_DIR}/testfiles/h5repack_${testfile}_rp.h5 ${PROJECT_BINARY_DIR}/testfiles/h5repack_${testfile}.h5
+ )
+ set_tests_properties (H5REPACK_EXTERNAL-${testname}_DFF2 PROPERTIES
+ WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles"
+ DEPENDS H5REPACK_EXTERNAL-${testname}
+ )
+ add_test (
+ NAME H5REPACK_EXTERNAL-${testname}_DFF3
+ COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} $<TARGET_FILE:h5diff${tgt_file_ext}> --enable-error-stack ${PROJECT_BINARY_DIR}/testfiles/h5repack_${testfile}_rp.h5 ${PROJECT_BINARY_DIR}/testfiles/h5repack_${testfile}_ex.h5
+ )
+ set_tests_properties (H5REPACK_EXTERNAL-${testname}_DFF3 PROPERTIES
+ WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles"
+ DEPENDS H5REPACK_EXTERNAL-${testname}_DFF2
+ )
+ # invalidate external file by removing its first data file
+ add_test (
+ NAME H5REPACK_EXTERNAL-${testname}_DATA_RMV
+ COMMAND ${CMAKE_COMMAND} -E remove h5repack_${testfile}_ex-0.dat
+ )
+ set_tests_properties (H5REPACK_EXTERNAL-${testname}_DATA_RMV PROPERTIES
+ WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles"
+ DEPENDS H5REPACK_EXTERNAL-${testname}_DFF3
+ )
+ # verify comparison of repacked file to known file
+ add_test (
+ NAME H5REPACK_EXTERNAL-${testname}_DFF4
+ COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} $<TARGET_FILE:h5diff${tgt_file_ext}> --enable-error-stack ${PROJECT_BINARY_DIR}/testfiles/h5repack_${testfile}_rp.h5 ${PROJECT_BINARY_DIR}/testfiles/h5repack_${testfile}.h5
+ )
+ set_tests_properties (H5REPACK_EXTERNAL-${testname}_DFF4 PROPERTIES
+ WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles"
+ DEPENDS H5REPACK_EXTERNAL-${testname}_DATA_RMV
+ )
+ # verify comparison of repacked file to known external file fails
+ add_test (
+ NAME H5REPACK_EXTERNAL-${testname}_DFF_FAIL
+ COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} $<TARGET_FILE:h5diff${tgt_file_ext}> --enable-error-stack ${PROJECT_BINARY_DIR}/testfiles/h5repack_${testfile}_rp.h5 ${PROJECT_BINARY_DIR}/testfiles/h5repack_${testfile}_ex.h5
+ )
+ set_tests_properties (H5REPACK_EXTERNAL-${testname}_DFF_FAIL PROPERTIES
+ WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles"
+ DEPENDS H5REPACK_EXTERNAL-${testname}_DFF4
+ WILL_FAIL "true"
+ )
endif ()
- else ()
- add_test (
- NAME H5REPACK_EXTERNAL-${testname}-clear-objects
- COMMAND ${CMAKE_COMMAND} -E remove h5repack_${testfile}_rp.h5
- )
- set_tests_properties (H5REPACK_EXTERNAL-${testname}-clear-objects PROPERTIES
- WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles"
- FIXTURES_REQUIRED clear_h5repack
- )
- # make sure external data file 0 is available
- add_test (
- NAME H5REPACK_EXTERNAL-${testname}_CPY
- COMMAND ${CMAKE_COMMAND} -E copy_if_different
- "${PROJECT_SOURCE_DIR}/testfiles/h5repack_${testfile}_ex-0.dat" "${PROJECT_BINARY_DIR}/testfiles/h5repack_${testfile}_ex-0.dat"
- )
- set_tests_properties (H5REPACK_EXTERNAL-${testname}_CPY PROPERTIES
- WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles"
- DEPENDS H5REPACK_EXTERNAL-${testname}-clear-objects
- )
- # comparison of known files
- add_test (
- NAME H5REPACK_EXTERNAL-${testname}_DFF1
- COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} $<TARGET_FILE:h5diff${tgt_ext}> --enable-error-stack ${PROJECT_BINARY_DIR}/testfiles/h5repack_${testfile}.h5 ${PROJECT_BINARY_DIR}/testfiles/h5repack_${testfile}_ex.h5
- )
- set_tests_properties (H5REPACK_EXTERNAL-${testname}_DFF1 PROPERTIES
- WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles"
- DEPENDS H5REPACK_EXTERNAL-${testname}_CPY
- )
- # repack the external file to the repacked file
- add_test (
- NAME H5REPACK_EXTERNAL-${testname}
- COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} $<TARGET_FILE:h5repack${tgt_ext}> --enable-error-stack ${ARGN} ${PROJECT_BINARY_DIR}/testfiles/h5repack_${testfile}_ex.h5 ${PROJECT_BINARY_DIR}/testfiles/h5repack_${testfile}_rp.h5
- )
- set_tests_properties (H5REPACK_EXTERNAL-${testname} PROPERTIES
- WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles"
- DEPENDS H5REPACK_EXTERNAL-${testname}_DFF1
- )
- # comparison of repacked file to known files
- add_test (
- NAME H5REPACK_EXTERNAL-${testname}_DFF2
- COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} $<TARGET_FILE:h5diff${tgt_ext}> --enable-error-stack ${PROJECT_BINARY_DIR}/testfiles/h5repack_${testfile}_rp.h5 ${PROJECT_BINARY_DIR}/testfiles/h5repack_${testfile}.h5
- )
- set_tests_properties (H5REPACK_EXTERNAL-${testname}_DFF2 PROPERTIES
- WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles"
- DEPENDS H5REPACK_EXTERNAL-${testname}
- )
- add_test (
- NAME H5REPACK_EXTERNAL-${testname}_DFF3
- COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} $<TARGET_FILE:h5diff${tgt_ext}> --enable-error-stack ${PROJECT_BINARY_DIR}/testfiles/h5repack_${testfile}_rp.h5 ${PROJECT_BINARY_DIR}/testfiles/h5repack_${testfile}_ex.h5
- )
- set_tests_properties (H5REPACK_EXTERNAL-${testname}_DFF3 PROPERTIES
- WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles"
- DEPENDS H5REPACK_EXTERNAL-${testname}_DFF2
- )
- # invalidate external file by removing its first data file
- add_test (
- NAME H5REPACK_EXTERNAL-${testname}_DATA_RMV
- COMMAND ${CMAKE_COMMAND} -E remove h5repack_${testfile}_ex-0.dat
- )
- set_tests_properties (H5REPACK_EXTERNAL-${testname}_DATA_RMV PROPERTIES
- WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles"
- DEPENDS H5REPACK_EXTERNAL-${testname}_DFF3
- )
- # verify comparison of repacked file to known file
- add_test (
- NAME H5REPACK_EXTERNAL-${testname}_DFF4
- COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} $<TARGET_FILE:h5diff${tgt_ext}> --enable-error-stack ${PROJECT_BINARY_DIR}/testfiles/h5repack_${testfile}_rp.h5 ${PROJECT_BINARY_DIR}/testfiles/h5repack_${testfile}.h5
- )
- set_tests_properties (H5REPACK_EXTERNAL-${testname}_DFF4 PROPERTIES
- WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles"
- DEPENDS H5REPACK_EXTERNAL-${testname}_DATA_RMV
- )
- # verify comparison of repacked file to known external file fails
- add_test (
- NAME H5REPACK_EXTERNAL-${testname}_DFF_FAIL
- COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} $<TARGET_FILE:h5diff${tgt_ext}> --enable-error-stack ${PROJECT_BINARY_DIR}/testfiles/h5repack_${testfile}_rp.h5 ${PROJECT_BINARY_DIR}/testfiles/h5repack_${testfile}_ex.h5
- )
- set_tests_properties (H5REPACK_EXTERNAL-${testname}_DFF_FAIL PROPERTIES
- WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles"
- DEPENDS H5REPACK_EXTERNAL-${testname}_DFF4
- WILL_FAIL "true"
- )
endif ()
endmacro ()
@@ -1104,7 +1218,7 @@
if (NOT USE_FILTER_DEFLATE)
set (TESTTYPE "SKIP")
endif ()
- ADD_H5_CMP_TEST (gzip_verbose_filters "O?...ing file[^\n]+\n" ${TESTTYPE} 0 ${arg})
+ ADD_H5_FILTER_TEST (gzip_verbose_filters "O?...ing file[^\n]+\n" ${TESTTYPE} 0 ${arg})
###########################################################
# the following tests assume the input files have filters
@@ -1490,6 +1604,44 @@ ADD_H5_EXTERNAL_TEST (ext_int32le_3d "TEST" int32le_3d -l CONTI)
ADD_H5_EXTERNAL_TEST (ext_uint8be "TEST" uint8be -l CONTI)
##############################################################################
+### E X T E R N A L L I N K T E S T S
+##############################################################################
+### HDFFV-11128 needs fixed to enable the following test
+#ADD_H5_DMP_TEST (h5copy_extlinks_src-base "TEST" 0 h5copy_extlinks_src.h5 --enable-error-stack)
+ADD_H5_DMP_TEST (tsoftlinks-base "TEST" 0 tsoftlinks.h5 --enable-error-stack)
+ADD_H5_DMP_TEST (textlink-base "TEST" 0 textlink.h5 --enable-error-stack)
+ADD_H5_DMP_TEST (textlinkfar-base "TEST" 0 textlinkfar.h5 --enable-error-stack)
+ADD_H5_DMP_TEST (textlinksrc-base "TEST" 0 textlinksrc.h5 --enable-error-stack)
+ADD_H5_DMP_TEST (textlinktar-base "TEST" 0 textlinktar.h5 --enable-error-stack)
+
+ADD_H5_DIFF_TEST (h5copy_extlinks_src-merge "TEST" 0 h5copy_extlinks_src.h5 --merge)
+ADD_H5_DIFF_TEST (tsoftlinks-merge "TEST" 1 tsoftlinks.h5 --merge)
+ADD_H5_DIFF_TEST (textlink-merge "TEST" 0 textlink.h5 --merge)
+### HDFFV-11128 needs fixed to enable the following test
+#ADD_H5_DIFF_TEST (textlinkfar-merge "TEST" 1 textlinkfar.h5 --merge)
+### HDFFV-11128 needs fixed to enable the following test
+#ADD_H5_DIFF_TEST (textlinksrc-merge "TEST" 1 textlinksrc.h5 --merge)
+### HDFFV-11128 needs fixed to enable the following test
+#ADD_H5_DIFF_TEST (textlinktar-merge "TEST" 1 textlinktar.h5 --merge)
+
+ADD_H5_DMP_TEST (h5copy_extlinks_src-prune "TEST" 0 h5copy_extlinks_src.h5 --prune --enable-error-stack)
+ADD_H5_DMP_TEST (tsoftlinks-prune "TEST" 0 tsoftlinks.h5 --prune --enable-error-stack)
+ADD_H5_DMP_TEST (textlink-prune "TEST" 0 textlink.h5 --prune --enable-error-stack)
+ADD_H5_DMP_TEST (textlinkfar-prune "TEST" 0 textlinkfar.h5 --prune --enable-error-stack)
+ADD_H5_DMP_TEST (textlinksrc-prune "TEST" 0 textlinksrc.h5 --prune --enable-error-stack)
+ADD_H5_DMP_TEST (textlinktar-prune "TEST" 0 textlinktar.h5 --prune --enable-error-stack)
+
+ADD_H5_DMP_TEST (h5copy_extlinks_src-mergeprune "TEST" 0 h5copy_extlinks_src.h5 --merge --prune --enable-error-stack)
+ADD_H5_DMP_TEST (tsoftlinks-mergeprune "TEST" 0 tsoftlinks.h5 --merge --prune --enable-error-stack)
+ADD_H5_DMP_TEST (textlink-mergeprune "TEST" 0 textlink.h5 --merge --prune --enable-error-stack)
+### HDFFV-11128 needs fixed to enable the following test
+#ADD_H5_DMP_TEST (textlinkfar-mergeprune "TEST" 0 textlinkfar.h5 --merge --prune --enable-error-stack)
+### HDFFV-11128 needs fixed to enable the following test
+#ADD_H5_DMP_TEST (textlinksrc-mergeprune "TEST" 0 textlinksrc.h5 --merge --prune --enable-error-stack)
+### HDFFV-11128 needs fixed to enable the following test
+#ADD_H5_DMP_TEST (textlinktar-mergeprune "TEST" 0 textlinktar.h5 --merge --prune --enable-error-stack)
+
+##############################################################################
### P L U G I N T E S T S
##############################################################################
if (BUILD_SHARED_LIBS)
diff --git a/tools/test/h5repack/Makefile.am b/tools/test/h5repack/Makefile.am
index 38f7b2f..29906a1 100644
--- a/tools/test/h5repack/Makefile.am
+++ b/tools/test/h5repack/Makefile.am
@@ -42,7 +42,7 @@ LDADD=../../src/h5repack/libh5repack.la $(LIBH5TOOLS) $(LIBH5TEST) $(LIBHDF5)
testh5repack_detect_szip_SOURCES=testh5repack_detect_szip.c
-h5repacktst_SOURCES=h5repacktst.c
+h5repacktst_SOURCES=h5repacktst.c
if HAVE_SHARED_CONDITIONAL
diff --git a/tools/test/h5repack/Makefile.in b/tools/test/h5repack/Makefile.in
index 89134bc..108271e 100644
--- a/tools/test/h5repack/Makefile.in
+++ b/tools/test/h5repack/Makefile.in
@@ -463,16 +463,16 @@ AMTAR = @AMTAR@
# H5_CFLAGS holds flags that should be used when building hdf5,
# but which should not be exported to h5cc for building other programs.
-# AM_CFLAGS is an automake construct which should be used by Makefiles
+# AM_CFLAGS is an automake construct which should be used by Makefiles
# instead of CFLAGS, as CFLAGS is reserved solely for the user to define.
# This applies to FCFLAGS, CXXFLAGS, CPPFLAGS, and LDFLAGS as well.
-AM_CFLAGS = @AM_CFLAGS@ @H5_CFLAGS@
+AM_CFLAGS = @AM_CFLAGS@ @H5_CFLAGS@ @H5_ECFLAGS@
# Include src, test, and tools/lib directories
AM_CPPFLAGS = @AM_CPPFLAGS@ @H5_CPPFLAGS@ -I$(top_srcdir)/src \
-I$(top_srcdir)/test -I$(top_srcdir)/tools/lib \
-I$(top_srcdir)/tools/src/h5repack
-AM_CXXFLAGS = @AM_CXXFLAGS@ @H5_CXXFLAGS@
+AM_CXXFLAGS = @AM_CXXFLAGS@ @H5_CXXFLAGS@ @H5_ECXXFLAGS@
AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
AM_FCFLAGS = @AM_FCFLAGS@ @H5_FCFLAGS@
AM_JAVACFLAGS = @AM_JAVACFLAGS@
@@ -492,6 +492,7 @@ CC = @CC@
CCDEPMODE = @CCDEPMODE@
CC_VERSION = @CC_VERSION@
CFLAGS = @CFLAGS@
+CLANG_SANITIZE_CHECKS = @CLANG_SANITIZE_CHECKS@
CODESTACK = @CODESTACK@
CONFIG_DATE = @CONFIG_DATE@
CONFIG_MODE = @CONFIG_MODE@
@@ -508,6 +509,7 @@ DEFAULT_API_VERSION = @DEFAULT_API_VERSION@
DEFS = @DEFS@
DEPDIR = @DEPDIR@
DEPRECATED_SYMBOLS = @DEPRECATED_SYMBOLS@
+DESIRED_FILE_LOCKING = @DESIRED_FILE_LOCKING@
DEV_WARNINGS = @DEV_WARNINGS@
DIRECT_VFD = @DIRECT_VFD@
DLLTOOL = @DLLTOOL@
@@ -544,8 +546,11 @@ H5_CFLAGS = @H5_CFLAGS@
H5_CLASSPATH = @H5_CLASSPATH@
H5_CPPFLAGS = @H5_CPPFLAGS@
H5_CXXFLAGS = @H5_CXXFLAGS@
+H5_ECFLAGS = @H5_ECFLAGS@
+H5_ECXXFLAGS = @H5_ECXXFLAGS@
H5_FCFLAGS = @H5_FCFLAGS@
H5_FORTRAN_SHARED = @H5_FORTRAN_SHARED@
+H5_IS_DARWIN = @H5_IS_DARWIN@
H5_JAVACFLAGS = @H5_JAVACFLAGS@
H5_JAVAFLAGS = @H5_JAVAFLAGS@
H5_JNIFLAGS = @H5_JNIFLAGS@
@@ -568,6 +573,7 @@ HL = @HL@
HL_FOR = @HL_FOR@
HSIZE_T = @HSIZE_T@
HSSIZE_T = @HSSIZE_T@
+IGNORE_DISABLED_FILE_LOCKS = @IGNORE_DISABLED_FILE_LOCKS@
INSTALL = @INSTALL@
INSTALL_DATA = @INSTALL_DATA@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
@@ -604,6 +610,7 @@ MAINT = @MAINT@
MAKEINFO = @MAKEINFO@
MANIFEST_TOOL = @MANIFEST_TOOL@
MEMORYALLOCSANITYCHECK = @MEMORYALLOCSANITYCHECK@
+MIRROR_VFD = @MIRROR_VFD@
MKDIR_P = @MKDIR_P@
MPE = @MPE@
NM = @NM@
@@ -663,6 +670,7 @@ TIME = @TIME@
TR = @TR@
TRACE_API = @TRACE_API@
UNAME_INFO = @UNAME_INFO@
+USE_FILE_LOCKING = @USE_FILE_LOCKING@
USE_FILTER_DEFLATE = @USE_FILTER_DEFLATE@
USE_FILTER_SZIP = @USE_FILTER_SZIP@
USINGMEMCHECKER = @USINGMEMCHECKER@
@@ -698,6 +706,7 @@ docdir = $(exec_prefix)/doc
dvidir = @dvidir@
enable_shared = @enable_shared@
enable_static = @enable_static@
+examplesdir = @examplesdir@
exec_prefix = @exec_prefix@
fortran_linux_linker_option = @fortran_linux_linker_option@
host = @host@
@@ -754,15 +763,15 @@ LIBH5_HL = $(top_builddir)/hl/src/libhdf5_hl.la
LIBH5F_HL = $(top_builddir)/hl/fortran/src/libhdf5hl_fortran.la
LIBH5CPP_HL = $(top_builddir)/hl/c++/src/libhdf5_hl_cpp.la
-# Note that in svn revision 19400 the '/' after DESTDIR in H5* variables below
-# has been removed. According to the official description of DESTDIR by Gnu at
-# http://www.gnu.org/prep/standards/html_node/DESTDIR.html, DESTDIR is
-# prepended to the normal and complete install path that it precedes for the
-# purpose of installing in a temporary directory which is useful for building
-# rpms and other packages. The '/' after ${DESTDIR} will be followed by another
-# '/' at the beginning of the normal install path. When DESTDIR is empty the
-# path then begins with '//', which is incorrect and causes problems at least for
-# Cygwin.
+# Note that in svn revision 19400 the '/' after DESTDIR in H5* variables below
+# has been removed. According to the official description of DESTDIR by Gnu at
+# http://www.gnu.org/prep/standards/html_node/DESTDIR.html, DESTDIR is
+# prepended to the normal and complete install path that it precedes for the
+# purpose of installing in a temporary directory which is useful for building
+# rpms and other packages. The '/' after ${DESTDIR} will be followed by another
+# '/' at the beginning of the normal install path. When DESTDIR is empty the
+# path then begins with '//', which is incorrect and causes problems at least for
+# Cygwin.
# Scripts used to build examples
# If only shared libraries have been installed, have h5cc build examples with
@@ -797,7 +806,7 @@ check_SCRIPTS = $(TEST_SCRIPT)
# Depend on the h5repack library, the hdf5 library, the tools library, the test library
LDADD = ../../src/h5repack/libh5repack.la $(LIBH5TOOLS) $(LIBH5TEST) $(LIBHDF5)
testh5repack_detect_szip_SOURCES = testh5repack_detect_szip.c
-h5repacktst_SOURCES = h5repacktst.c
+h5repacktst_SOURCES = h5repacktst.c
@HAVE_SHARED_CONDITIONAL_TRUE@noinst_LTLIBRARIES = libdynlibadd.la libdynlibvers.la
@HAVE_SHARED_CONDITIONAL_TRUE@libdynlibadd_la_SOURCES = dynlib_rpk.c
@HAVE_SHARED_CONDITIONAL_TRUE@libdynlibvers_la_SOURCES = dynlib_vrpk.c
@@ -818,7 +827,7 @@ LIB = $(lib_LIBRARIES) $(lib_LTLIBRARIES) $(noinst_LIBRARIES) \
PROGS = $(bin_PROGRAMS) $(bin_SCRIPTS) $(noinst_PROGRAMS) $(noinst_SCRIPTS) \
$(EXTRA_PROG)
-chk_TESTS = $(check_PROGRAMS) $(check_SCRIPTS) $(EXTRA_TEST)
+chk_TESTS = $(check_PROGRAMS) $(check_SCRIPTS) $(EXTRA_TEST)
TEST_EXTENSIONS = .sh
SH_LOG_COMPILER = $(SHELL)
AM_SH_LOG_FLAGS =
@@ -1426,28 +1435,37 @@ $(TEST_PROG_CHKEXE) $(TEST_PROG_PARA_CHKEXE) dummy.chkexe_:
echo "============================" > $${log}; \
fi; \
if test "X$(FORTRAN_API)" = "Xyes"; then \
- echo "Fortran API: Testing $(HDF5_DRIVER) $${tname} $(TEST_FLAGS)"; \
+ echo "Fortran API: Testing $${tname} $(TEST_FLAGS)"; \
if test -n "$(REALTIMEOUTPUT)"; then \
- echo "Fortran API: $(HDF5_DRIVER) $${tname} $(TEST_FLAGS) Test Log" | tee -a $${log}; \
+ echo "Fortran API: Test log for $${tname} $(TEST_FLAGS)" | tee -a $${log}; \
else \
- echo "Fortran API: $(HDF5_DRIVER) $${tname} $(TEST_FLAGS) Test Log" >> $${log}; \
+ echo "Fortran API: Test log for $${tname} $(TEST_FLAGS)" >> $${log}; \
fi; \
elif test "X$(CXX_API)" = "Xyes"; then \
- echo "C++ API: Testing $(HDF5_DRIVER) $${tname} $(TEST_FLAGS)"; \
+ echo "C++ API: Testing $${tname} $(TEST_FLAGS)"; \
if test -n "$(REALTIMEOUTPUT)"; then \
- echo "C++ API: $(HDF5_DRIVER) $${tname} $(TEST_FLAGS) Test Log" | tee -a $${log};\
+ echo "C++ API: Test log for $${tname} $(TEST_FLAGS)" | tee -a $${log};\
else \
- echo "C++ API: $(HDF5_DRIVER) $${tname} $(TEST_FLAGS) Test Log" >> $${log};\
+ echo "C++ API: Test log for $${tname} $(TEST_FLAGS)" >> $${log};\
fi; \
else \
- echo "Testing $(HDF5_DRIVER) $${tname} $(TEST_FLAGS)"; \
+ echo "Testing: $${tname} $(TEST_FLAGS)"; \
if test -n "$(REALTIMEOUTPUT)"; then \
- echo "$(HDF5_DRIVER) $${tname} $(TEST_FLAGS) Test Log" | tee -a $${log}; \
+ echo "Test log for $${tname} $(TEST_FLAGS)" | tee -a $${log}; \
else \
- echo "$(HDF5_DRIVER) $${tname} $(TEST_FLAGS) Test Log" >> $${log}; \
+ echo "Test log for $${tname} $(TEST_FLAGS)" >> $${log}; \
fi; \
fi; \
if test -n "$(REALTIMEOUTPUT)"; then \
+ if test -n "$(HDF5_DRIVER)"; then \
+ echo "Virtual file driver (VFD): $(HDF5_DRIVER)" | tee -a $${log}; \
+ fi; \
+ else \
+ if test -n "$(HDF5_DRIVER)"; then \
+ echo "Virtual file driver (VFD): $(HDF5_DRIVER)" >> $${log}; \
+ fi; \
+ fi; \
+ if test -n "$(REALTIMEOUTPUT)"; then \
echo "============================" | tee -a $${log}; \
else \
echo "============================" >> $${log}; \
diff --git a/tools/test/h5repack/h5repack.sh.in b/tools/test/h5repack/h5repack.sh.in
index 67056fb..0b0c489 100644
--- a/tools/test/h5repack/h5repack.sh.in
+++ b/tools/test/h5repack/h5repack.sh.in
@@ -88,10 +88,18 @@ $SRC_H5REPACK_TESTFILES/h5repack_attr_refs.h5
$SRC_H5REPACK_TESTFILES/h5repack_deflate.h5
$SRC_H5REPACK_TESTFILES/h5repack_early.h5
$SRC_H5REPACK_TESTFILES/h5repack_ext.h5
+$SRC_H5REPACK_TESTFILES/h5repack_f32le.h5
+$SRC_H5REPACK_TESTFILES/h5repack_f32le_ex.h5
$SRC_H5REPACK_TESTFILES/h5repack_fill.h5
$SRC_H5REPACK_TESTFILES/h5repack_filters.h5
$SRC_H5REPACK_TESTFILES/h5repack_fletcher.h5
$SRC_H5REPACK_TESTFILES/h5repack_hlink.h5
+$SRC_H5REPACK_TESTFILES/h5repack_int32le_1d.h5
+$SRC_H5REPACK_TESTFILES/h5repack_int32le_1d_ex.h5
+$SRC_H5REPACK_TESTFILES/h5repack_int32le_2d.h5
+$SRC_H5REPACK_TESTFILES/h5repack_int32le_2d_ex.h5
+$SRC_H5REPACK_TESTFILES/h5repack_int32le_3d.h5
+$SRC_H5REPACK_TESTFILES/h5repack_int32le_3d_ex.h5
$SRC_H5REPACK_TESTFILES/h5repack_layout.h5
$SRC_H5REPACK_TESTFILES/h5repack_layouto.h5
$SRC_H5REPACK_TESTFILES/h5repack_layout2.h5
@@ -105,23 +113,26 @@ $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_uint8be.h5
+$SRC_H5REPACK_TESTFILES/h5repack_uint8be_ex.h5
+########fsm#files########
$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_H5REPACK_TESTFILES/h5repack_f32le.h5
-$SRC_H5REPACK_TESTFILES/h5repack_f32le_ex.h5
-$SRC_H5REPACK_TESTFILES/h5repack_int32le_1d.h5
-$SRC_H5REPACK_TESTFILES/h5repack_int32le_1d_ex.h5
-$SRC_H5REPACK_TESTFILES/h5repack_int32le_2d.h5
-$SRC_H5REPACK_TESTFILES/h5repack_int32le_2d_ex.h5
-$SRC_H5REPACK_TESTFILES/h5repack_int32le_3d.h5
-$SRC_H5REPACK_TESTFILES/h5repack_int32le_3d_ex.h5
-$SRC_H5REPACK_TESTFILES/h5repack_uint8be.h5
-$SRC_H5REPACK_TESTFILES/h5repack_uint8be_ex.h5
+########h5diff/testfile########
$SRC_H5DIFF_TESTFILES/h5diff_attr1.h5
+########tools/testfiles#for#external#links########
+$SRC_TOOLS_TESTFILES/tsoftlinks.h5
+$SRC_TOOLS_TESTFILES/textlinkfar.h5
+$SRC_TOOLS_TESTFILES/textlinksrc.h5
+$SRC_TOOLS_TESTFILES/textlinktar.h5
+$SRC_TOOLS_TESTFILES/textlink.h5
+$SRC_H5REPACK_TESTFILES/h5copy_extlinks_src.h5
+$SRC_H5REPACK_TESTFILES/h5copy_extlinks_trg.h5
+########tools/testfiles########
$SRC_TOOLS_TESTFILES/tfamily00000.h5
$SRC_TOOLS_TESTFILES/tfamily00001.h5
$SRC_TOOLS_TESTFILES/tfamily00002.h5
@@ -134,6 +145,8 @@ $SRC_TOOLS_TESTFILES/tfamily00008.h5
$SRC_TOOLS_TESTFILES/tfamily00009.h5
$SRC_TOOLS_TESTFILES/tfamily00010.h5
$SRC_TOOLS_TESTFILES/tordergr.h5
+########reference#conversion#files########
+########tools/testfiles/vds########
$SRC_TOOLS_TESTFILES/vds/1_a.h5
$SRC_TOOLS_TESTFILES/vds/1_b.h5
$SRC_TOOLS_TESTFILES/vds/1_c.h5
@@ -164,33 +177,71 @@ $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
+########dat#files########
$SRC_H5REPACK_TESTFILES/h5repack_f32le_ex-0.dat
$SRC_H5REPACK_TESTFILES/h5repack_int32le_1d_ex-0.dat
$SRC_H5REPACK_TESTFILES/h5repack_int32le_1d_ex-1.dat
$SRC_H5REPACK_TESTFILES/h5repack_int32le_2d_ex-0.dat
$SRC_H5REPACK_TESTFILES/h5repack_int32le_3d_ex-0.dat
-$SRC_H5REPACK_TESTFILES/h5repack_layout.h5.ddl
-$SRC_H5REPACK_TESTFILES/h5repack_filters.h5-gzip_verbose_filters.tst
-$SRC_H5REPACK_TESTFILES/h5repack_layout.h5-dset2_chunk_20x10-errstk.tst
-$SRC_H5REPACK_TESTFILES/h5repack_layout.h5-plugin_test.ddl
$SRC_H5REPACK_TESTFILES/h5repack_uint8be_ex-0.dat
$SRC_H5REPACK_TESTFILES/h5repack_uint8be_ex-1.dat
$SRC_H5REPACK_TESTFILES/h5repack_uint8be_ex-2.dat
$SRC_H5REPACK_TESTFILES/h5repack_uint8be_ex-3.dat
-$SRC_H5REPACK_TESTFILES/plugin_test.h5repack_layout.h5.tst
-$SRC_H5REPACK_TESTFILES/1_vds.h5-vds_dset_chunk20x10x5-v.ddl
-$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/crtorder.tordergr.h5.ddl
+$SRC_H5REPACK_TESTFILES/deflate_limit.h5repack_layout.h5.ddl
+$SRC_H5REPACK_TESTFILES/h5repack_layout.h5.ddl
+$SRC_H5REPACK_TESTFILES/h5repack_layout.h5-plugin_test.ddl
+########fsm#files########
$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
+########vds#files########
+$SRC_H5REPACK_TESTFILES/1_vds.h5-vds_dset_chunk20x10x5-v.ddl
+$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
+########refs#files########
+########external#links#files########
+$SRC_H5REPACK_TESTFILES/textlinkfar-base.textlinkfar.h5.ddl
+$SRC_H5REPACK_TESTFILES/textlinksrc-base.textlinksrc.h5.ddl
+$SRC_H5REPACK_TESTFILES/textlinktar-base.textlinktar.h5.ddl
+$SRC_H5REPACK_TESTFILES/textlink-base.textlink.h5.ddl
+$SRC_H5REPACK_TESTFILES/tsoftlinks-base.tsoftlinks.h5.ddl
+$SRC_H5REPACK_TESTFILES/h5copy_extlinks_src-base.h5copy_extlinks_src.h5.ddl
+$SRC_H5REPACK_TESTFILES/textlinkfar-merge.textlinkfar.h5.tst
+$SRC_H5REPACK_TESTFILES/textlinksrc-merge.textlinksrc.h5.tst
+$SRC_H5REPACK_TESTFILES/textlinktar-merge.textlinktar.h5.tst
+$SRC_H5REPACK_TESTFILES/textlink-merge.textlink.h5.tst
+$SRC_H5REPACK_TESTFILES/tsoftlinks-merge.tsoftlinks.h5.tst
+$SRC_H5REPACK_TESTFILES/h5copy_extlinks_src-merge.h5copy_extlinks_src.h5.tst
+$SRC_H5REPACK_TESTFILES/textlinkfar-prune.textlinkfar.h5.ddl
+$SRC_H5REPACK_TESTFILES/textlinksrc-prune.textlinksrc.h5.ddl
+$SRC_H5REPACK_TESTFILES/textlinktar-prune.textlinktar.h5.ddl
+$SRC_H5REPACK_TESTFILES/textlink-prune.textlink.h5.ddl
+$SRC_H5REPACK_TESTFILES/tsoftlinks-prune.tsoftlinks.h5.ddl
+$SRC_H5REPACK_TESTFILES/h5copy_extlinks_src-prune.h5copy_extlinks_src.h5.ddl
+$SRC_H5REPACK_TESTFILES/textlinkfar-mergeprune.textlinkfar.h5.ddl
+$SRC_H5REPACK_TESTFILES/textlinksrc-mergeprune.textlinksrc.h5.ddl
+$SRC_H5REPACK_TESTFILES/textlinktar-mergeprune.textlinktar.h5.ddl
+$SRC_H5REPACK_TESTFILES/textlink-mergeprune.textlink.h5.ddl
+$SRC_H5REPACK_TESTFILES/tsoftlinks-mergeprune.tsoftlinks.h5.ddl
+$SRC_H5REPACK_TESTFILES/h5copy_extlinks_src-mergeprune.h5copy_extlinks_src.h5.ddl
+########tst#files########
+$SRC_H5REPACK_TESTFILES/h5repack_filters.h5-gzip_verbose_filters.tst
+$SRC_H5REPACK_TESTFILES/h5repack_layout.h5-dset2_chunk_20x10-errstk.tst
+$SRC_H5REPACK_TESTFILES/plugin_test.h5repack_layout.h5.tst
+########external#links#tst#files########
+$SRC_H5REPACK_TESTFILES/tsoftlinks-merge.tsoftlinks.h5.tst
+$SRC_H5REPACK_TESTFILES/textlinkfar-merge.textlinkfar.h5.tst
+$SRC_H5REPACK_TESTFILES/textlinksrc-merge.textlinksrc.h5.tst
+$SRC_H5REPACK_TESTFILES/textlinktar-merge.textlinktar.h5.tst
+$SRC_H5REPACK_TESTFILES/textlink-merge.textlink.h5.tst
+$SRC_H5REPACK_TESTFILES/h5copy_extlinks_src-merge.h5copy_extlinks_src.h5.tst
"
#
@@ -267,6 +318,12 @@ SKIP() {
echo " -SKIP-"
}
+##############################################################################
+##############################################################################
+### T H E T E S T S M A C R O S ###
+##############################################################################
+##############################################################################
+
# Call the h5diff tool
#
DIFFTEST()
@@ -303,7 +360,7 @@ TOOLTEST()
TESTING $H5REPACK $@
(
cd $TESTDIR
- $RUNSERIAL $H5REPACK_BIN "$@" $infile $outfile
+ $ENVCMD $RUNSERIAL $H5REPACK_BIN "$@" $infile $outfile
)
RET=$?
if [ $RET != 0 ] ; then
@@ -615,25 +672,6 @@ VERIFY_INVALIDBOUNDS()
} # end of VERIFY_INVALIDBOUNDS
# -----------------------------------------------------------------------------
-# Expect h5diff to fail
-# -----------------------------------------------------------------------------
-DIFFFAIL()
-{
- VERIFY h5diff unequal $@
- (
- cd $TESTDIR
- $RUNSERIAL $H5DIFF_BIN -q "$@"
- )
- RET=$?
- if [ $RET == 0 ] ; then
- echo "*FAILED*"
- nerrors="`expr $nerrors + 1`"
- else
- echo " PASSED"
- fi
-}
-
-# -----------------------------------------------------------------------------
# Catchall test for repacking with external files
# Loops over all (internally-listed) cases and applies the given arguments
# to h5repack.
@@ -741,7 +779,7 @@ TOOLTEST1()
TESTING $H5REPACK $@
(
cd $TESTDIR
- $RUNSERIAL $H5REPACK_BIN "$@" $infile $outfile
+ $ENVCMD $RUNSERIAL $H5REPACK_BIN "$@" $infile $outfile
)
RET=$?
if [ $RET != 0 ] ; then
@@ -801,6 +839,121 @@ TOOLTESTV()
rm -f $outfile
}
+# This is same as TOOLTESTV() with comparing display output
+# with actual filename swapped
+#
+TOOLTESTSV()
+{
+ expect="$TESTDIR/$1.$2.tst"
+ actual="$TESTDIR/`basename $2 .ddl`.out"
+ actual_err="$TESTDIR/`basename $2 .ddl`.err"
+
+ infile=$2
+ outfile=out-$1.$2
+ 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 h5diff equal $@
+ (
+ cd $TESTDIR
+ $RUNSERIAL $H5DIFF_BIN -v $infile $outfile
+ ) >$actual 2>$actual_err
+ RET=$?
+ if [ $RET != 0 ] ; then
+ echo "*FAILED*"
+ nerrors="`expr $nerrors + 1`"
+ else
+ echo " PASSED"
+ fi
+ fi
+
+ # display output compare
+ STDOUT_FILTER $actual
+ cat $actual_err >> $actual
+
+ VERIFY output from $H5REPACK $@
+ if cmp -s $expect $actual; then
+ echo " PASSED"
+ else
+ echo "*FAILED*"
+ echo " Expected result (*.tst) 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 same as TOOLTESTSV() but expects a diff fail
+#
+TOOLFAILSV()
+{
+ expect="$TESTDIR/$1.$2.tst"
+ actual="$TESTDIR/`basename $2 .ddl`.out"
+ actual_err="$TESTDIR/`basename $2 .ddl`.err"
+
+ infile=$2
+ outfile=out-$1.$2
+ 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 h5diff unequal $@
+ (
+ cd $TESTDIR
+ $RUNSERIAL $H5DIFF_BIN -v $infile $outfile
+ ) >$actual 2>$actual_err
+ RET=$?
+ if [ $RET == 0 ] ; then
+ echo "*FAILED*"
+ nerrors="`expr $nerrors + 1`"
+ else
+ echo " PASSED"
+ fi
+ fi
+
+ # display output compare
+ STDOUT_FILTER $actual
+ cat $actual_err >> $actual
+
+ VERIFY output from $H5REPACK $@
+ if cmp -s $expect $actual; then
+ echo " PASSED"
+ else
+ echo "*FAILED*"
+ echo " Expected result (*.tst) 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
+}
+
# same as TOOLTESTV but filters error stack output and compares to an error file
# Extract file name, line number, version and thread IDs because they may be different
# ADD_H5ERR_MASK_TEST
@@ -821,7 +974,7 @@ TOOLTESTM() {
TESTING $H5REPACK $@
(
cd $TESTDIR
- $RUNSERIAL $H5REPACK_BIN "$@" $infile $outfile
+ $ENVCMD $RUNSERIAL $H5REPACK_BIN "$@" $infile $outfile
) >$actual 2>$actual_err
# save actual and actual_err in case they are needed later.
@@ -1352,44 +1505,28 @@ TOOLTEST_STAT SPT $arg
# layout options (these files have no filters)
#########################################################
VERIFY_LAYOUT_DSET dset2_chunk_20x10 h5repack_layout.h5 dset2 CHUNKED --layout dset2:CHUNK=20x10
-
VERIFY_LAYOUT_ALL chunk_20x10 h5repack_layout.h5 CHUNKED -l CHUNK=20x10
-
VERIFY_LAYOUT_DSET dset2_conti h5repack_layout.h5 dset2 CONTIGUOUS -l dset2:CONTI
-
VERIFY_LAYOUT_ALL conti h5repack_layout.h5 CONTIGUOUS -l CONTI
-
VERIFY_LAYOUT_DSET dset2_compa h5repack_layout.h5 dset2 COMPACT -l dset2:COMPA
-
VERIFY_LAYOUT_ALL compa h5repack_layout.h5 COMPACT -l COMPA
-
TOOLTESTM dset2_chunk_20x10-errstk h5repack_layout.h5 --layout=dset2:CHUNK=20x10x5 --enable-error-stack
################################################################
# layout conversions (file has no filters)
###############################################################
-
VERIFY_LAYOUT_DSET dset_compa_conti h5repack_layout.h5 dset_compact CONTIGUOUS -l dset_compact:CONTI
-
VERIFY_LAYOUT_DSET dset_compa_chunk h5repack_layout.h5 dset_compact CHUNKED -l dset_compact:CHUNK=2x5
-
VERIFY_LAYOUT_DSET dset_compa_compa h5repack_layout.h5 dset_compact COMPACT -l dset_compact:COMPA
-
VERIFY_LAYOUT_DSET dset_conti_compa h5repack_layout.h5 dset_contiguous COMPACT -l dset_contiguous:COMPA
-
VERIFY_LAYOUT_DSET dset_conti_chunk h5repack_layout.h5 dset_contiguous CHUNKED -l dset_contiguous:CHUNK=3x6
-
VERIFY_LAYOUT_DSET dset_conti_conti h5repack_layout.h5 dset_contiguous CONTIGUOUS -l dset_contiguous:CONTI
-
VERIFY_LAYOUT_DSET chunk_compa h5repack_layout.h5 dset_chunk COMPACT -l dset_chunk:COMPA
-
VERIFY_LAYOUT_DSET chunk_conti h5repack_layout.h5 dset_chunk CONTIGUOUS -l dset_chunk:CONTI
-
VERIFY_LAYOUT_DSET chunk_18x13 h5repack_layout.h5 dset_chunk CHUNKED -l dset_chunk:CHUNK=18x13
# test convert small size dataset ( < 1k) to compact layout without -m
VERIFY_LAYOUT_DSET contig_small_compa h5repack_layout2.h5 contig_small COMPACT -l contig_small:COMPA
-
VERIFY_LAYOUT_DSET contig_small_fixed_compa h5repack_layout2.h5 chunked_small_fixed COMPACT -l chunked_small_fixed:COMPA
#---------------------------------------------------------------------------
@@ -1417,6 +1554,7 @@ VERIFY_LAYOUT_DSET chunk2compa h5repack_layout3.h5 chunk_unlimit1 CHUNK -l chunk
# chunk dim is bigger than dataset dim. ( dset size < 64k )
VERIFY_LAYOUT_DSET error1 h5repack_layout3.h5 chunk_unlimit1 H5S_UNLIMITED -f chunk_unlimit1:NONE
# chunk dim is bigger than dataset dim. ( dset size > 64k )
+
VERIFY_LAYOUT_DSET error2 h5repack_layout3.h5 chunk_unlimit2 H5S_UNLIMITED -f chunk_unlimit2:NONE
# chunk dims are smaller than dataset dims. ( dset size < 64k )
@@ -1431,7 +1569,6 @@ TOOLTEST error4 h5repack_layout3.h5 -f NONE
# (dset size < 64K) and with unlimited max dims on a condition as follow.
# (HDFFV-8214)
#--------------------------------------------------------------------------
-
# chunk dim is bigger than dataset dim. should succeed.
VERIFY_LAYOUT_DSET ckdim_biger h5repack_layout3.h5 chunk_unlimit2 CONTI -l chunk_unlimit2:CONTI
# chunk dim is smaller than dataset dim. should succeed.
@@ -1462,7 +1599,6 @@ else
fi
# several global filters
-
arg="h5repack_layout.h5 --filter GZIP=1 --filter SHUF"
if test $USE_FILTER_DEFLATE != "yes" ; then
SKIP $arg
@@ -1558,9 +1694,9 @@ else
VERIFY_LAYOUT_VDS vds_conti 4_vds.h5 vds_dset CONTIGUOUS -l vds_dset:CONTI
fi
-#########################################################
-# Testing version bounds
-#########################################################
+##############################################################################
+### 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
VERIFY_SUPERBLOCK 0 2 0 h5repack_layout.h5 -j 0 -k 2 h5repack_layout.h5
# -j 1 -k 2, superblock will be 2
@@ -1570,11 +1706,49 @@ 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
-########################################
-# Testing external storage
-########################################
+##############################################################################
+### E X T E R N A L S T O R A G E T E S T S
+##############################################################################
VERIFY_EXTERNAL_CONSOLIDATION -l CONTI
+##############################################################################
+### E X T E R N A L L I N K T E S T S
+##############################################################################
+### HDFFV-11128 needs fixed to enable the following test
+#TOOLTEST_DUMP h5copy_extlinks_src-base h5copy_extlinks_src.h5 --enable-error-stack
+TOOLTEST_DUMP tsoftlinks-base tsoftlinks.h5 --enable-error-stack
+TOOLTEST_DUMP textlink-base textlink.h5 --enable-error-stack
+TOOLTEST_DUMP textlinkfar-base textlinkfar.h5 --enable-error-stack
+TOOLTEST_DUMP textlinksrc-base textlinksrc.h5 --enable-error-stack
+TOOLTEST_DUMP textlinktar-base textlinktar.h5 --enable-error-stack
+
+TOOLTESTSV h5copy_extlinks_src-merge h5copy_extlinks_src.h5 --merge
+TOOLFAILSV tsoftlinks-merge tsoftlinks.h5 --merge
+TOOLTESTSV textlink-merge textlink.h5 --merge
+### HDFFV-11128 needs fixed to enable the following test
+#TOOLFAILSV textlinkfar-merge textlinkfar.h5 --merge
+### HDFFV-11128 needs fixed to enable the following test
+#TOOLFAILSV textlinksrc-merge textlinksrc.h5 --merge
+### HDFFV-11128 needs fixed to enable the following test
+#TOOLFAILSV textlinktar-merge textlinktar.h5 --merge
+
+TOOLTEST_DUMP h5copy_extlinks_src-prune h5copy_extlinks_src.h5 --prune --enable-error-stack
+TOOLTEST_DUMP tsoftlinks-prune tsoftlinks.h5 --prune --enable-error-stack
+TOOLTEST_DUMP textlink-prune textlink.h5 --prune --enable-error-stack
+TOOLTEST_DUMP textlinkfar-prune textlinkfar.h5 --prune --enable-error-stack
+TOOLTEST_DUMP textlinksrc-prune textlinksrc.h5 --prune --enable-error-stack
+TOOLTEST_DUMP textlinktar-prune textlinktar.h5 --prune --enable-error-stack
+
+TOOLTEST_DUMP h5copy_extlinks_src-mergeprune h5copy_extlinks_src.h5 --merge --prune --enable-error-stack
+TOOLTEST_DUMP tsoftlinks-mergeprune tsoftlinks.h5 --merge --prune --enable-error-stack
+TOOLTEST_DUMP textlink-mergeprune textlink.h5 --merge --prune --enable-error-stack
+### HDFFV-11128 needs fixed to enable the following test
+#TOOLTEST_DUMP textlinkfar-mergeprune textlinkfar.h5 --merge --prune --enable-error-stack
+### HDFFV-11128 needs fixed to enable the following test
+#TOOLTEST_DUMP textlinksrc-mergeprune textlinksrc.h5 --merge --prune --enable-error-stack
+### HDFFV-11128 needs fixed to enable the following test
+#TOOLTEST_DUMP textlinktar-mergeprune textlinktar.h5 --merge --prune --enable-error-stack
+
# Clean up temporary files/directories
CLEAN_TESTFILES_AND_TESTDIR
diff --git a/tools/test/h5repack/h5repackgentest.c b/tools/test/h5repack/h5repackgentest.c
index aaac285..7604964 100644
--- a/tools/test/h5repack/h5repackgentest.c
+++ b/tools/test/h5repack/h5repackgentest.c
@@ -147,7 +147,7 @@ __make_file(const char *basename, struct external_def *ext,
H5REPACKGENTEST_OOPS;
}
- space_id = H5Screate_simple(rank, dims, NULL);
+ space_id = H5Screate_simple((int)rank, dims, NULL);
if (space_id == H5I_INVALID_HID)
H5REPACKGENTEST_OOPS;
@@ -231,9 +231,9 @@ generate_int32le_3d(hbool_t external) {
/* generate values, alternating positive and negative
*/
- for (i = 0, n = 0; i < dims[0]; i++) {
- for (j = 0; j < dims[1]; j++) {
- for (k = 0; k < dims[2]; k++, n++) {
+ for (i = 0, n = 0; (hsize_t)i < dims[0]; i++) {
+ for (j = 0; (hsize_t)j < dims[1]; j++) {
+ for (k = 0; (hsize_t)k < dims[2]; k++, n++) {
wdata[n] = (k + j * 512 + i * 4096) * ((n & 1) ? (-1) : (1));
}
}
@@ -263,10 +263,10 @@ generate_uint8be(hbool_t external) {
/* Generate values, ping-pong from ends of range
*/
- for (i = 0, n = 0; i < dims[0]; i++) {
- for (j = 0; j < dims[1]; j++) {
- for (k = 0; k < dims[2]; k++, n++) {
- wdata[n] = n * ((n & 1) ? (-1) : (1));
+ for (i = 0, n = 0; (hsize_t)i < dims[0]; i++) {
+ for (j = 0; (hsize_t)j < dims[1]; j++) {
+ for (k = 0; (hsize_t)k < dims[2]; k++, n++) {
+ wdata[n] = (uint8_t)((n & 1) ? -n : n);
}
}
}
@@ -294,9 +294,9 @@ generate_f32le(hbool_t external) {
int ret_value = 0;
/* Generate values */
- for (i = 0, k = 0, n = 0; i < dims[0]; i++) {
- for (j = 0; j < dims[1]; j++, k++, n++) {
- wdata[k] = n * 801.1 * ((k % 5 == 1) ? (-1) : (1));
+ for (i = 0, k = 0, n = 0; (hsize_t)i < dims[0]; i++) {
+ for (j = 0; (hsize_t)j < dims[1]; j++, k++, n++) {
+ wdata[k] = n * 801.1f * ((k % 5 == 1) ? (-1) : (1));
}
}
@@ -314,7 +314,6 @@ generate_f32le(hbool_t external) {
int
main(void) {
int i = 0;
- int ret_value = 0;
for (i = 0; i < 2; i++) {
hbool_t external = (i & 1) ? TRUE : FALSE;
diff --git a/tools/test/h5repack/h5repacktst.c b/tools/test/h5repack/h5repacktst.c
index ec8df3c..5cd76ef 100644
--- a/tools/test/h5repack/h5repacktst.c
+++ b/tools/test/h5repack/h5repacktst.c
@@ -382,7 +382,7 @@ int main (void)
GOERROR;
if (h5repack_verify(FNAME0, FNAME0OUT, &pack_options) <= 0)
GOERROR;
- if (h5repack_cmp_pl(FNAME0, FNAME0OUT) <= 0)
+ if (h5repack_cmp_pl(FNAME0, pack_options.fin_fapl, FNAME0OUT, pack_options.fout_fapl) <= 0)
GOERROR;
if (h5repack_end(&pack_options) < 0)
GOERROR;
@@ -402,7 +402,7 @@ int main (void)
GOERROR;
if (h5repack_verify(FNAME1, FNAME1OUT, &pack_options) <= 0)
GOERROR;
- if (h5repack_cmp_pl(FNAME1, FNAME1OUT) <= 0)
+ if (h5repack_cmp_pl(FNAME1, pack_options.fin_fapl, FNAME1OUT, pack_options.fout_fapl) <= 0)
GOERROR;
if (h5repack_end(&pack_options) < 0)
GOERROR;
@@ -422,7 +422,7 @@ int main (void)
GOERROR;
if (h5repack_verify(FNAME2, FNAME2OUT, &pack_options) <= 0)
GOERROR;
- if (h5repack_cmp_pl(FNAME2, FNAME2OUT) <= 0)
+ if (h5repack_cmp_pl(FNAME2, pack_options.fin_fapl, FNAME2OUT, pack_options.fout_fapl) <= 0)
GOERROR;
if (h5repack_end(&pack_options) < 0)
GOERROR;
@@ -441,7 +441,7 @@ int main (void)
GOERROR;
if (h5repack_verify(FNAME3, FNAME3OUT, &pack_options) <= 0)
GOERROR;
- if (h5repack_cmp_pl(FNAME3, FNAME3OUT) <= 0)
+ if (h5repack_cmp_pl(FNAME3, pack_options.fin_fapl, FNAME3OUT, pack_options.fout_fapl) <= 0)
GOERROR;
if (h5repack_end(&pack_options) < 0)
GOERROR;
@@ -1132,7 +1132,7 @@ int main (void)
GOERROR;
if (h5repack_verify(FNAME7, FNAME7OUT, &pack_options) <= 0)
GOERROR;
- if (h5repack_cmp_pl(FNAME7, FNAME7OUT) <= 0)
+ if (h5repack_cmp_pl(FNAME7, pack_options.fin_fapl, FNAME7OUT, pack_options.fout_fapl) <= 0)
GOERROR;
if (h5repack_end(&pack_options) < 0)
GOERROR;
@@ -1779,9 +1779,9 @@ error:
static
int make_testfiles(void)
{
- hid_t fid = -1;
- hid_t fcpl = -1; /* File creation property list */
- hid_t fapl = -1; /* File access property list */
+ hid_t fid = H5I_INVALID_HID;
+ hid_t fcpl = H5I_INVALID_HID; /* File creation property list */
+ hid_t fapl = H5I_INVALID_HID; /* File access property list */
unsigned j; /* Local index variable */
/*-------------------------------------------------------------------------
@@ -2210,12 +2210,12 @@ out:
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;
+ hid_t did = H5I_INVALID_HID;
+ hid_t gid = H5I_INVALID_HID;
+ hid_t tid = H5I_INVALID_HID;
+ hid_t rid = H5I_INVALID_HID;
+ hid_t sid = H5I_INVALID_HID;
+ hid_t gcplid = H5I_INVALID_HID;
hsize_t dims[1] = {2};
/* compound datatype */
typedef struct s_t
@@ -2332,10 +2332,10 @@ out:
static
int make_attributes(hid_t loc_id)
{
- hid_t did = -1;
- hid_t gid = -1;
- hid_t rid = -1;
- hid_t sid = -1;
+ hid_t did = H5I_INVALID_HID;
+ hid_t gid = H5I_INVALID_HID;
+ hid_t rid = H5I_INVALID_HID;
+ hid_t sid = H5I_INVALID_HID;
hsize_t dims[1] = {2};
/*-------------------------------------------------------------------------
@@ -2403,8 +2403,8 @@ static
int make_hlinks(hid_t loc_id)
{
hid_t g1id =- 1;
- hid_t g2id = -1;
- hid_t g3id = -1;
+ hid_t g2id = H5I_INVALID_HID;
+ hid_t g3id = H5I_INVALID_HID;
hsize_t dims[2] = {3,2};
int buf[3][2] = {{1,1}, {1,2}, {2,2}};
@@ -2473,30 +2473,30 @@ out:
static
int make_szip(hid_t loc_id)
{
- hid_t dcpl = -1; /* dataset creation property list */
- hid_t sid = -1; /* dataspace ID */
+ hid_t dcpl = H5I_INVALID_HID; /* dataset creation property list */
+ hid_t sid = H5I_INVALID_HID; /* 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 **buf = NULL;
int szip_can_encode = 0;
- for (i = n = 0; i < DIM1; i++) {
- for (j = 0; j < DIM2; j++) {
- buf[i][j] = n++;
- }
- }
+ /* Create and fill array */
+ H5TEST_ALLOCATE_2D_ARRAY(buf, int, DIM1, DIM2);
+ if (NULL == buf)
+ goto error;
+ H5TEST_FILL_2D_ARRAY(buf, int, DIM1, DIM2);
+
/* create a space */
if((sid = H5Screate_simple(RANK, dims, NULL)) < 0)
- return -1;
+ goto error;
/* create a dcpl */
if ((dcpl = H5Pcreate(H5P_DATASET_CREATE)) < 0)
- goto out;
+ goto error;
/* set up chunk */
if(H5Pset_chunk(dcpl, RANK, chunk_dims) < 0)
- goto out;
+ goto error;
/*-------------------------------------------------------------------------
* SZIP
@@ -2509,25 +2509,30 @@ int make_szip(hid_t loc_id)
if (szip_can_encode) {
/* set szip data */
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)
- goto out;
+ goto error;
+ if (make_dset(loc_id, "dset_szip", sid, dcpl, buf[0]) < 0)
+ goto error;
}
else
/* WARNING? SZIP is decoder only, can't generate test files */
if(H5Sclose(sid) < 0)
- goto out;
+ goto error;
if(H5Pclose(dcpl) < 0)
- goto out;
+ goto error;
+
+ HDfree(buf);
return 0;
-out:
+error:
H5E_BEGIN_TRY {
H5Pclose(dcpl);
H5Sclose(sid);
} H5E_END_TRY;
+
+ HDfree(buf);
+
return -1;
}
#endif /* H5_HAVE_FILTER_SZIP */
@@ -2544,30 +2549,29 @@ out:
static
int make_deflate(hid_t loc_id)
{
- hid_t dcpl = -1; /* dataset creation property list */
- hid_t sid = -1; /* dataspace ID */
+ hid_t dcpl = H5I_INVALID_HID; /* dataset creation property list */
+ hid_t sid = H5I_INVALID_HID; /* dataspace ID */
hsize_t dims[RANK] = {DIM1,DIM2};
hsize_t chunk_dims[RANK] = {CDIM1,CDIM2};
- int buf[DIM1][DIM2];
+ int **buf = NULL;
hobj_ref_t bufref[1]; /* reference */
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++;
- }
- }
+ /* Create and fill array */
+ H5TEST_ALLOCATE_2D_ARRAY(buf, int, DIM1, DIM2);
+ if (NULL == buf)
+ goto error;
+ H5TEST_FILL_2D_ARRAY(buf, int, DIM1, DIM2);
/* create a space */
if((sid = H5Screate_simple(RANK, dims, NULL)) < 0)
- return -1;
+ goto error;
/* create a dcpl */
if ((dcpl = H5Pcreate(H5P_DATASET_CREATE)) < 0)
- goto out;
+ goto error;
/* set up chunk */
if(H5Pset_chunk(dcpl, RANK, chunk_dims) < 0)
- goto out;
+ goto error;
/*-------------------------------------------------------------------------
* GZIP
@@ -2576,16 +2580,16 @@ int make_deflate(hid_t loc_id)
#if defined (H5_HAVE_FILTER_DEFLATE)
/* set deflate data */
if(H5Pset_deflate(dcpl, 9) < 0)
- goto out;
- if (make_dset(loc_id, "dset_deflate", sid, dcpl, buf) < 0)
- goto out;
+ goto error;
+ if (make_dset(loc_id, "dset_deflate", sid, dcpl, buf[0]) < 0)
+ goto error;
/* 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)
- goto out;
+ goto error;
if (write_dset(loc_id, 1, dims1r, "ref", H5T_STD_REF_OBJ, bufref) < 0)
- goto out;
+ goto error;
#endif
@@ -2594,17 +2598,22 @@ int make_deflate(hid_t loc_id)
*-------------------------------------------------------------------------
*/
if(H5Sclose(sid) < 0)
- goto out;
+ goto error;
if(H5Pclose(dcpl) < 0)
- goto out;
+ goto error;
+
+ HDfree(buf);
return 0;
-out:
+error:
H5E_BEGIN_TRY {
H5Pclose(dcpl);
H5Sclose(sid);
} H5E_END_TRY;
+
+ HDfree(buf);
+
return -1;
}
@@ -2619,29 +2628,27 @@ out:
static
int make_shuffle(hid_t loc_id)
{
- hid_t dcpl; /* dataset creation property list */
- hid_t sid; /* dataspace ID */
+ hid_t dcpl = H5I_INVALID_HID; /* dataset creation property list */
+ hid_t sid = H5I_INVALID_HID; /* dataspace ID */
hsize_t dims[RANK]={DIM1,DIM2};
hsize_t chunk_dims[RANK]={CDIM1,CDIM2};
- int buf[DIM1][DIM2];
- int i, j, n;
+ int **buf = NULL;
+
+ /* Create and fill array */
+ H5TEST_ALLOCATE_2D_ARRAY(buf, int, DIM1, DIM2);
+ if (NULL == buf)
+ goto error;
+ H5TEST_FILL_2D_ARRAY(buf, int, DIM1, DIM2);
- for (i=n=0; i<DIM1; i++)
- {
- for (j=0; j<DIM2; j++)
- {
- buf[i][j]=n++;
- }
- }
/* create a space */
if((sid = H5Screate_simple(RANK, dims, NULL)) < 0)
- return -1;
+ goto error;
/* create a dcpl */
if ((dcpl = H5Pcreate(H5P_DATASET_CREATE)) < 0)
- goto out;
+ goto error;
/* set up chunk */
if(H5Pset_chunk(dcpl, RANK, chunk_dims) < 0)
- goto out;
+ goto error;
/*-------------------------------------------------------------------------
* shuffle
@@ -2650,9 +2657,9 @@ int make_shuffle(hid_t loc_id)
/* set the shuffle filter */
if (H5Pset_shuffle(dcpl) < 0)
- goto out;
- if (make_dset(loc_id,"dset_shuffle",sid,dcpl,buf) < 0)
- goto out;
+ goto error;
+ if (make_dset(loc_id, "dset_shuffle", sid, dcpl, buf[0]) < 0)
+ goto error;
/*-------------------------------------------------------------------------
@@ -2660,17 +2667,22 @@ int make_shuffle(hid_t loc_id)
*-------------------------------------------------------------------------
*/
if(H5Sclose(sid) < 0)
- goto out;
+ goto error;
if(H5Pclose(dcpl) < 0)
- goto out;
+ goto error;
+
+ HDfree(buf);
return 0;
-out:
+error:
H5E_BEGIN_TRY {
H5Pclose(dcpl);
H5Sclose(sid);
} H5E_END_TRY;
+
+ HDfree(buf);
+
return -1;
}
@@ -2684,27 +2696,27 @@ out:
static
int make_fletcher32(hid_t loc_id)
{
- hid_t dcpl = -1; /* dataset creation property list */
- hid_t sid = -1; /* dataspace ID */
+ hid_t dcpl = H5I_INVALID_HID; /* dataset creation property list */
+ hid_t sid = H5I_INVALID_HID; /* dataspace ID */
hsize_t dims[RANK]={DIM1,DIM2};
hsize_t chunk_dims[RANK]={CDIM1,CDIM2};
- int buf[DIM1][DIM2];
- int i, j, n;
+ int **buf = NULL;
+
+ /* Create and fill array */
+ H5TEST_ALLOCATE_2D_ARRAY(buf, int, DIM1, DIM2);
+ if (NULL == buf)
+ goto error;
+ H5TEST_FILL_2D_ARRAY(buf, int, DIM1, DIM2);
- for (i = n = 0; i < DIM1; i++) {
- for (j = 0; j < DIM2; j++) {
- buf[i][j] = n++;
- }
- }
/* create a space */
if((sid = H5Screate_simple(RANK, dims, NULL)) < 0)
- return -1;
+ goto error;
/* create a dataset creation property list; the same DCPL is used for all dsets */
if ((dcpl = H5Pcreate(H5P_DATASET_CREATE)) < 0)
- goto out;
+ goto error;
/* set up chunk */
if(H5Pset_chunk(dcpl, RANK, chunk_dims) < 0)
- goto out;
+ goto error;
/*-------------------------------------------------------------------------
@@ -2714,29 +2726,34 @@ int make_fletcher32(hid_t loc_id)
/* remove the filters from the dcpl */
if (H5Premove_filter(dcpl,H5Z_FILTER_ALL) < 0)
- goto out;
+ goto error;
/* set the checksum filter */
if (H5Pset_fletcher32(dcpl) < 0)
- goto out;
- if (make_dset(loc_id,"dset_fletcher32",sid,dcpl,buf) < 0)
- goto out;
+ goto error;
+ if (make_dset(loc_id, "dset_fletcher32", sid, dcpl, buf[0]) < 0)
+ goto error;
/*-------------------------------------------------------------------------
* close space and dcpl
*-------------------------------------------------------------------------
*/
if(H5Sclose(sid) < 0)
- goto out;
+ goto error;
if(H5Pclose(dcpl) < 0)
- goto out;
+ goto error;
+
+ HDfree(buf);
return 0;
-out:
+error:
H5E_BEGIN_TRY {
H5Pclose(dcpl);
H5Sclose(sid);
} H5E_END_TRY;
+
+ HDfree(buf);
+
return -1;
}
@@ -2751,51 +2768,51 @@ out:
static
int make_nbit(hid_t loc_id)
{
- hid_t dcpl = -1; /* dataset creation property list */
- hid_t sid = -1; /* dataspace ID */
- hid_t dtid = -1;
- hid_t dsid = -1;
+ hid_t dcpl = H5I_INVALID_HID; /* dataset creation property list */
+ hid_t sid = H5I_INVALID_HID; /* dataspace ID */
+ hid_t dtid = H5I_INVALID_HID;
+ hid_t dsid = H5I_INVALID_HID;
hsize_t dims[RANK]={DIM1,DIM2};
hsize_t chunk_dims[RANK]={CDIM1,CDIM2};
- int buf[DIM1][DIM2];
- int i, j, n;
+ int **buf = NULL;
+
+ /* Create and fill array */
+ H5TEST_ALLOCATE_2D_ARRAY(buf, int, DIM1, DIM2);
+ if (NULL == buf)
+ goto error;
+ H5TEST_FILL_2D_ARRAY(buf, int, DIM1, DIM2);
- for (i = n = 0; i < DIM1; i++) {
- for (j = 0; j < DIM2; j++) {
- buf[i][j] = n++;
- }
- }
/* create a space */
if((sid = H5Screate_simple(RANK, dims, NULL)) < 0)
- return -1;
+ goto error;
/* create a dataset creation property list; the same DCPL is used for all dsets */
if ((dcpl = H5Pcreate(H5P_DATASET_CREATE)) < 0)
- goto out;
+ goto error;
/* set up chunk */
if(H5Pset_chunk(dcpl, RANK, chunk_dims) < 0)
- goto out;
+ goto error;
dtid = H5Tcopy(H5T_NATIVE_INT);
if (H5Tset_precision(dtid,(H5Tget_precision(dtid) - 1)) < 0)
- goto out;
+ goto error;
/* remove the filters from the dcpl */
if(H5Premove_filter(dcpl, H5Z_FILTER_ALL) < 0)
- goto out;
+ goto error;
if(H5Pset_nbit(dcpl) < 0)
- goto out;
+ goto error;
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)
- goto out;
+ goto error;
+ if(H5Dwrite(dsid, dtid, H5S_ALL, H5S_ALL, H5P_DEFAULT, buf[0]) < 0)
+ goto error;
H5Dclose(dsid);
if(H5Premove_filter(dcpl, H5Z_FILTER_ALL) < 0)
- goto out;
+ goto error;
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)
- goto out;
+ goto error;
+ if(H5Dwrite(dsid, dtid, H5S_ALL, H5S_ALL, H5P_DEFAULT, buf[0]) < 0)
+ goto error;
H5Dclose(dsid);
/*-------------------------------------------------------------------------
@@ -2803,21 +2820,26 @@ int make_nbit(hid_t loc_id)
*-------------------------------------------------------------------------
*/
if(H5Sclose(sid) < 0)
- goto out;
+ goto error;
if(H5Pclose(dcpl) < 0)
- goto out;
+ goto error;
if (H5Tclose(dtid) < 0)
- goto out;
+ goto error;
+
+ HDfree(buf);
return 0;
-out:
+error:
H5E_BEGIN_TRY {
H5Tclose(dtid);
H5Pclose(dcpl);
H5Sclose(sid);
H5Dclose(dsid);
} H5E_END_TRY;
+
+ HDfree(buf);
+
return -1;
}
@@ -2832,46 +2854,46 @@ out:
static
int make_scaleoffset(hid_t loc_id)
{
- hid_t dcpl = -1; /* dataset creation property list */
- hid_t sid = -1; /* dataspace ID */
- hid_t dtid = -1;
- hid_t dsid = -1;
+ hid_t dcpl = H5I_INVALID_HID; /* dataset creation property list */
+ hid_t sid = H5I_INVALID_HID; /* dataspace ID */
+ hid_t dtid = H5I_INVALID_HID;
+ hid_t dsid = H5I_INVALID_HID;
hsize_t dims[RANK] = {DIM1,DIM2};
hsize_t chunk_dims[RANK] = {CDIM1,CDIM2};
- int buf[DIM1][DIM2];
- int i, j, n;
+ int **buf = NULL;
+
+ /* Create and fill array */
+ H5TEST_ALLOCATE_2D_ARRAY(buf, int, DIM1, DIM2);
+ if (NULL == buf)
+ goto error;
+ H5TEST_FILL_2D_ARRAY(buf, int, DIM1, DIM2);
- for (i = n = 0; i < DIM1; i++) {
- for (j = 0; j < DIM2; j++) {
- buf[i][j] = n++;
- }
- }
/* create a space */
if((sid = H5Screate_simple(RANK, dims, NULL)) < 0)
- return -1;
+ goto error;
/* create a dataset creation property list; the same DCPL is used for all dsets */
if ((dcpl = H5Pcreate(H5P_DATASET_CREATE)) < 0)
- goto out;
+ goto error;
/* set up chunk */
if(H5Pset_chunk(dcpl, RANK, chunk_dims) < 0)
- goto out;
+ goto error;
dtid = H5Tcopy(H5T_NATIVE_INT);
/* remove the filters from the dcpl */
if(H5Premove_filter(dcpl, H5Z_FILTER_ALL) < 0)
- goto out;
+ goto error;
if(H5Pset_scaleoffset(dcpl, H5Z_SO_INT, 31) < 0)
- goto out;
+ goto error;
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)
- goto out;
+ goto error;
+ if(H5Dwrite(dsid, dtid, H5S_ALL, H5S_ALL, H5P_DEFAULT, buf[0]) < 0)
+ goto error;
H5Dclose(dsid);
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)
- goto out;
+ goto error;
+ if(H5Dwrite(dsid, dtid, H5S_ALL, H5S_ALL, H5P_DEFAULT, buf[0]) < 0)
+ goto error;
H5Tclose(dtid);
H5Dclose(dsid);
@@ -2880,19 +2902,24 @@ int make_scaleoffset(hid_t loc_id)
*-------------------------------------------------------------------------
*/
if(H5Sclose(sid) < 0)
- goto out;
+ goto error;
if(H5Pclose(dcpl) < 0)
- goto out;
+ goto error;
+
+ HDfree(buf);
return 0;
-out:
+error:
H5E_BEGIN_TRY {
H5Dclose(dsid);
H5Tclose(dtid);
H5Pclose(dcpl);
H5Sclose(sid);
} H5E_END_TRY;
+
+ HDfree(buf);
+
return -1;
}
@@ -2912,41 +2939,39 @@ int make_all_filters(hid_t loc_id)
hid_t dtid = H5I_INVALID_HID;
hid_t dsid = H5I_INVALID_HID;
#if defined (H5_HAVE_FILTER_SZIP)
- unsigned szip_options_mask=H5_SZIP_ALLOW_K13_OPTION_MASK|H5_SZIP_NN_OPTION_MASK;
- unsigned szip_pixels_per_block=8;
+ unsigned szip_options_mask = H5_SZIP_ALLOW_K13_OPTION_MASK | H5_SZIP_NN_OPTION_MASK;
+ unsigned szip_pixels_per_block = 8;
#endif /* H5_HAVE_FILTER_SZIP */
hsize_t dims[RANK]={DIM1,DIM2};
hsize_t chunk_dims[RANK]={CDIM1,CDIM2};
- int buf[DIM1][DIM2];
- int i, j, n;
+ int **buf = NULL;
#if defined (H5_HAVE_FILTER_SZIP)
int szip_can_encode = 0;
#endif
- for (i=n=0; i<DIM1; i++)
- {
- for (j=0; j<DIM2; j++)
- {
- buf[i][j]=n++;
- }
- }
+ /* Create and fill array */
+ H5TEST_ALLOCATE_2D_ARRAY(buf, int, DIM1, DIM2);
+ if (NULL == buf)
+ goto error;
+ H5TEST_FILL_2D_ARRAY(buf, int, DIM1, DIM2);
+
/* create a space */
if((sid = H5Screate_simple(RANK, dims, NULL)) < 0)
- return -1;
+ goto error;
/* create a dataset creation property list; the same DCPL is used for all dsets */
if ((dcpl = H5Pcreate(H5P_DATASET_CREATE)) < 0)
- goto out;
+ goto error;
/* set up chunk */
if (H5Pset_chunk(dcpl, RANK, chunk_dims) < 0)
- goto out;
+ goto error;
/* set the shuffle filter */
if (H5Pset_shuffle(dcpl) < 0)
- goto out;
+ goto error;
/* set the checksum filter */
if (H5Pset_fletcher32(dcpl) < 0)
- goto out;
+ goto error;
#if defined (H5_HAVE_FILTER_SZIP)
if (h5tools_can_encode(H5Z_FILTER_SZIP) == 1)
@@ -2956,8 +2981,8 @@ int make_all_filters(hid_t loc_id)
if (szip_can_encode)
{
/* set szip data */
- if(H5Pset_szip (dcpl,szip_options_mask,szip_pixels_per_block) < 0)
- goto out;
+ if(H5Pset_szip (dcpl,szip_options_mask, szip_pixels_per_block) < 0)
+ goto error;
} else {
/* WARNING? SZIP is decoder only, can't generate test data using szip */
}
@@ -2966,20 +2991,20 @@ int make_all_filters(hid_t loc_id)
#if defined (H5_HAVE_FILTER_DEFLATE)
/* set deflate data */
if(H5Pset_deflate(dcpl, 9) < 0)
- goto out;
+ goto error;
#endif
- if (make_dset(loc_id,"dset_all",sid,dcpl,buf) < 0)
- goto out;
+ if (make_dset(loc_id, "dset_all", sid, dcpl, buf[0]) < 0)
+ goto error;
/* remove the filters from the dcpl */
if (H5Premove_filter(dcpl,H5Z_FILTER_ALL) < 0)
- goto out;
+ goto error;
/* set the checksum filter */
if (H5Pset_fletcher32(dcpl) < 0)
- goto out;
- if (make_dset(loc_id,"dset_fletcher32",sid,dcpl,buf) < 0)
- goto out;
+ goto error;
+ if (make_dset(loc_id, "dset_fletcher32", sid, dcpl, buf[0]) < 0)
+ goto error;
/* Make sure encoding is enabled */
@@ -2988,12 +3013,12 @@ int make_all_filters(hid_t loc_id)
{
/* remove the filters from the dcpl */
if (H5Premove_filter(dcpl,H5Z_FILTER_ALL) < 0)
- goto out;
+ goto error;
/* set szip data */
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)
- goto out;
+ goto error;
+ if (make_dset(loc_id, "dset_szip", sid, dcpl, buf[0]) < 0)
+ goto error;
} else
{
/* WARNING? SZIP is decoder only, can't generate test dataset */
@@ -3003,56 +3028,58 @@ int make_all_filters(hid_t loc_id)
/* remove the filters from the dcpl */
if (H5Premove_filter(dcpl,H5Z_FILTER_ALL) < 0)
- goto out;
+ goto error;
/* set the shuffle filter */
if (H5Pset_shuffle(dcpl) < 0)
- goto out;
- if (make_dset(loc_id,"dset_shuffle",sid,dcpl,buf) < 0)
- goto out;
+ goto error;
+ if (make_dset(loc_id, "dset_shuffle", sid, dcpl, buf[0]) < 0)
+ goto error;
#if defined (H5_HAVE_FILTER_DEFLATE)
/* remove the filters from the dcpl */
if (H5Premove_filter(dcpl,H5Z_FILTER_ALL) < 0)
- goto out;
+ goto error;
/* set deflate data */
if(H5Pset_deflate(dcpl, 1) < 0)
- goto out;
- if (make_dset(loc_id,"dset_deflate",sid,dcpl,buf) < 0)
- goto out;
+ goto error;
+ if (make_dset(loc_id, "dset_deflate", sid, dcpl, buf[0]) < 0)
+ goto error;
#endif
/* remove the filters from the dcpl */
if (H5Premove_filter(dcpl, H5Z_FILTER_ALL) < 0)
- goto out;
+ goto error;
/* set the shuffle filter */
if (H5Pset_nbit(dcpl) < 0)
- goto out;
+ goto error;
if ((dtid = H5Tcopy(H5T_NATIVE_INT)) < 0)
- goto out;
+ goto error;
if (H5Tset_precision(dtid, (H5Tget_precision(dtid) - 1)) < 0)
- goto out;
+ goto error;
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)
- goto out;
+ goto error;
+ if(H5Dwrite(dsid, dtid, H5S_ALL, H5S_ALL, H5P_DEFAULT, buf[0]) < 0)
+ goto error;
/* close */
if(H5Tclose(dtid) < 0)
- goto out;
+ goto error;
if(H5Dclose(dsid) < 0)
- goto out;
+ goto error;
if(H5Sclose(sid) < 0)
- goto out;
+ goto error;
if(H5Pclose(dcpl) < 0)
- goto out;
+ goto error;
+
+ HDfree(buf);
return 0;
-out:
+error:
H5E_BEGIN_TRY
{
H5Tclose(dtid);
@@ -3060,6 +3087,9 @@ out:
H5Pclose(dcpl);
H5Sclose(sid);
} H5E_END_TRY;
+
+ HDfree(buf);
+
return -1;
}
@@ -3077,11 +3107,11 @@ int make_early(void)
{
hsize_t dims[1] ={3000};
hsize_t cdims[1]={30};
- hid_t fid=-1;
- hid_t did=-1;
- hid_t sid=-1;
- hid_t tid=-1;
- hid_t dcpl=-1;
+ hid_t fid=H5I_INVALID_HID;
+ hid_t did=H5I_INVALID_HID;
+ hid_t sid=H5I_INVALID_HID;
+ hid_t tid=H5I_INVALID_HID;
+ hid_t dcpl=H5I_INVALID_HID;
int i;
char name[16];
int iter=100;
@@ -3172,32 +3202,29 @@ out:
static
int make_layout(hid_t loc_id)
{
- hid_t dcpl=-1; /* dataset creation property list */
- hid_t sid=-1; /* dataspace ID */
+ hid_t dcpl=H5I_INVALID_HID; /* dataset creation property list */
+ hid_t sid=H5I_INVALID_HID; /* dataspace ID */
hsize_t dims[RANK]={DIM1,DIM2};
hsize_t chunk_dims[RANK]={CDIM1,CDIM2};
- int buf[DIM1][DIM2];
- int i, j, n;
+ int **buf = NULL;
+ int i;
char name[16];
+ /* Create and fill array */
+ H5TEST_ALLOCATE_2D_ARRAY(buf, int, DIM1, DIM2);
+ if (NULL == buf)
+ goto error;
+ H5TEST_FILL_2D_ARRAY(buf, int, DIM1, DIM2);
- for (i=n=0; i<DIM1; i++)
- {
- for (j=0; j<DIM2; j++)
- {
- buf[i][j]=n++;
- }
- }
/*-------------------------------------------------------------------------
* make several dataset with no filters
*-------------------------------------------------------------------------
*/
- for (i=0; i<4; i++)
- {
+ for (i=0; i<4; i++) {
HDsprintf(name,"dset%d",i+1);
- if (write_dset(loc_id,RANK,dims,name,H5T_NATIVE_INT,buf) < 0)
- return -1;
+ if (write_dset(loc_id, RANK, dims, name, H5T_NATIVE_INT, buf[0]) < 0)
+ goto error;
}
@@ -3207,63 +3234,60 @@ int make_layout(hid_t loc_id)
*/
/* create a space */
if((sid = H5Screate_simple(RANK, dims, NULL)) < 0)
- return -1;
+ goto error;
/* create a dataset creation property list; the same DCPL is used for all dsets */
if ((dcpl = H5Pcreate(H5P_DATASET_CREATE)) < 0)
- {
- goto out;
- }
+ goto error;
/*-------------------------------------------------------------------------
* H5D_COMPACT
*-------------------------------------------------------------------------
*/
if(H5Pset_layout (dcpl,H5D_COMPACT) < 0)
- goto out;
- if (make_dset(loc_id,"dset_compact",sid,dcpl,buf) < 0)
- {
- goto out;
- }
+ goto error;
+ if (make_dset(loc_id, "dset_compact", sid, dcpl, buf[0]) < 0)
+ goto error;
/*-------------------------------------------------------------------------
* H5D_CONTIGUOUS
*-------------------------------------------------------------------------
*/
if(H5Pset_layout (dcpl,H5D_CONTIGUOUS) < 0)
- goto out;
- if (make_dset(loc_id,"dset_contiguous",sid,dcpl,buf) < 0)
- {
- goto out;
- }
+ goto error;
+ if (make_dset(loc_id, "dset_contiguous", sid, dcpl, buf[0]) < 0)
+ goto error;
/*-------------------------------------------------------------------------
* H5D_CHUNKED
*-------------------------------------------------------------------------
*/
if(H5Pset_chunk(dcpl, RANK, chunk_dims) < 0)
- goto out;
- if (make_dset(loc_id,"dset_chunk",sid,dcpl,buf) < 0)
- {
- goto out;
- }
+ goto error;
+ if (make_dset(loc_id, "dset_chunk", sid, dcpl, buf[0]) < 0)
+ goto error;
/*-------------------------------------------------------------------------
* close space and dcpl
*-------------------------------------------------------------------------
*/
if(H5Sclose(sid) < 0)
- goto out;
+ goto error;
if(H5Pclose(dcpl) < 0)
- goto out;
+ goto error;
+
+ HDfree(buf);
return 0;
-out:
+error:
H5E_BEGIN_TRY
{
H5Pclose(dcpl);
H5Sclose(sid);
} H5E_END_TRY;
+
+ HDfree(buf);
+
return -1;
}
@@ -3286,47 +3310,48 @@ static
int make_layout2(hid_t loc_id)
{
- hid_t contig_dcpl = -1; /* dataset creation property list */
- hid_t chunked_dcpl = -1; /* dataset creation property list */
+ hid_t contig_dcpl = H5I_INVALID_HID; /* dataset creation property list */
+ hid_t chunked_dcpl = H5I_INVALID_HID; /* dataset creation property list */
- int i, j, n; /* Local index variables */
int ret_value = -1; /* Return value */
- hid_t s_sid = -1; /* dataspace ID */
+ hid_t s_sid = H5I_INVALID_HID; /* dataspace ID */
hsize_t s_dims[RANK] = {S_DIM1,S_DIM2}; /* Dataspace (< 1 k) */
hsize_t chunk_dims[RANK] = {S_DIM1/2, S_DIM2/2}; /* Dimension sizes for chunks */
- int s_buf[S_DIM1][S_DIM2]; /* Temporary buffer */
+ int **s_buf = NULL; /* Temporary buffer */
- for(i = n = 0; i < S_DIM1; i++) {
- for (j = 0; j < S_DIM2; j++) {
- s_buf[i][j] = n++;
- }
- }
+ /* Create and fill array */
+ H5TEST_ALLOCATE_2D_ARRAY(s_buf, int, S_DIM1, S_DIM2);
+ if (NULL == s_buf)
+ goto error;
+ H5TEST_FILL_2D_ARRAY(s_buf, int, S_DIM1, S_DIM2);
/* Create dataspaces */
if((s_sid = H5Screate_simple(RANK, s_dims, NULL)) < 0)
- goto out;
+ goto error;
/* Create contiguous datasets */
if((contig_dcpl = H5Pcreate(H5P_DATASET_CREATE)) < 0)
- goto out;
+ goto error;
if(H5Pset_layout(contig_dcpl, H5D_CONTIGUOUS) < 0)
- goto out;
- if(make_dset(loc_id, CONTIG_S, s_sid, contig_dcpl, s_buf) < 0)
- goto out;
+ goto error;
+ if(make_dset(loc_id, CONTIG_S, s_sid, contig_dcpl, s_buf[0]) < 0)
+ goto error;
/* Create chunked datasets */
if((chunked_dcpl = H5Pcreate(H5P_DATASET_CREATE)) < 0)
- goto out;
+ goto error;
if(H5Pset_chunk(chunked_dcpl, RANK, chunk_dims) < 0)
- goto out;
- if(make_dset(loc_id, CHUNKED_S_FIX, s_sid, chunked_dcpl, s_buf) < 0)
- goto out;
+ goto error;
+ if(make_dset(loc_id, CHUNKED_S_FIX, s_sid, chunked_dcpl, s_buf[0]) < 0)
+ goto error;
+
+ HDfree(s_buf);
ret_value = 0;
-out:
+error:
H5E_BEGIN_TRY {
H5Pclose(contig_dcpl);
H5Pclose(chunked_dcpl);
@@ -3335,6 +3360,8 @@ out:
} H5E_END_TRY;
+ HDfree(s_buf);
+
return(ret_value);
} /* make_layout2() */
@@ -3361,38 +3388,31 @@ out:
static
int make_layout3(hid_t loc_id)
{
- hid_t dcpl1=-1; /* dataset creation property list */
- hid_t dcpl2=-1; /* dataset creation property list */
- hid_t dcpl3=-1; /* dataset creation property list */
- hid_t sid1=-1; /* dataspace ID */
- hid_t sid2=-1; /* dataspace ID */
+ hid_t dcpl1=H5I_INVALID_HID; /* dataset creation property list */
+ hid_t dcpl2=H5I_INVALID_HID; /* dataset creation property list */
+ hid_t dcpl3=H5I_INVALID_HID; /* dataset creation property list */
+ hid_t sid1=H5I_INVALID_HID; /* dataspace ID */
+ hid_t sid2=H5I_INVALID_HID; /* dataspace ID */
hsize_t dims1[RANK]={DIM1_L3,DIM2_L3};
hsize_t dims2[RANK]={SDIM1_L3,SDIM2_L3};
hsize_t maxdims[RANK]={H5S_UNLIMITED, H5S_UNLIMITED};
hsize_t chunk_dims1[RANK]={DIM1_L3*2,5};
hsize_t chunk_dims2[RANK]={SDIM1_L3 + 2, SDIM2_L3/2};
hsize_t chunk_dims3[RANK]={SDIM1_L3 - 2, SDIM2_L3/2};
- int buf1[DIM1_L3][DIM2_L3];
- int buf2[SDIM1_L3][SDIM2_L3];
- int i, j, n;
+ int **buf1 = NULL;
+ int **buf2 = NULL;
- /* init buf1 */
- for (i=n=0; i<DIM1_L3; i++)
- {
- for (j=0; j<DIM2_L3; j++)
- {
- buf1[i][j]=n++;
- }
- }
+ /* Create and fill arrays */
+ H5TEST_ALLOCATE_2D_ARRAY(buf1, int, DIM1_L3, DIM2_L3);
+ if (NULL == buf1)
+ goto error;
+ H5TEST_FILL_2D_ARRAY(buf1, int, DIM1_L3, DIM2_L3);
+
+ H5TEST_ALLOCATE_2D_ARRAY(buf2, int, SDIM1_L3, SDIM2_L3);
+ if (NULL == buf2)
+ goto error;
+ H5TEST_FILL_2D_ARRAY(buf2, int, SDIM1_L3, SDIM2_L3);
- /* init buf2 */
- for (i=n=0; i<SDIM1_L3; i++)
- {
- for (j=0; j<SDIM2_L3; j++)
- {
- buf2[i][j]=n++;
- }
- }
/*-------------------------------------------------------------------------
* make chunked dataset with
@@ -3403,19 +3423,15 @@ int make_layout3(hid_t loc_id)
*/
/* create a space */
if((sid1 = H5Screate_simple(RANK, dims1, maxdims)) < 0)
- return -1;
+ goto error;
/* create a dataset creation property list; the same DCPL is used for all dsets */
if ((dcpl1 = H5Pcreate(H5P_DATASET_CREATE)) < 0)
- {
- goto out;
- }
+ goto error;
if(H5Pset_chunk(dcpl1, RANK, chunk_dims1) < 0)
- goto out;
- if (make_dset(loc_id,"chunk_unlimit1",sid1,dcpl1,buf1) < 0)
- {
- goto out;
- }
+ goto error;
+ if (make_dset(loc_id, "chunk_unlimit1", sid1, dcpl1, buf1[0]) < 0)
+ goto error;
/*-------------------------------------------------------------------------
* make chunked dataset with
@@ -3427,16 +3443,16 @@ int make_layout3(hid_t loc_id)
/* create a space */
if((sid2 = H5Screate_simple(RANK, dims2, maxdims)) < 0)
- return -1;
+ goto error;
/* create a dataset creation property list; the same DCPL is used for all dsets */
if ((dcpl2 = H5Pcreate(H5P_DATASET_CREATE)) < 0)
- goto out;
+ goto error;
if(H5Pset_chunk(dcpl2, RANK, chunk_dims2) < 0)
- goto out;
+ goto error;
- if (make_dset(loc_id,"chunk_unlimit2",sid2,dcpl2,buf2) < 0)
- goto out;
+ if (make_dset(loc_id, "chunk_unlimit2", sid2, dcpl2, buf2[0]) < 0)
+ goto error;
/*-------------------------------------------------------------------------
* make chunked dataset with
@@ -3447,32 +3463,35 @@ int make_layout3(hid_t loc_id)
*/
/* create a dataset creation property list; the same DCPL is used for all dsets */
if ((dcpl3 = H5Pcreate(H5P_DATASET_CREATE)) < 0)
- goto out;
+ goto error;
if(H5Pset_chunk(dcpl3, RANK, chunk_dims3) < 0)
- goto out;
+ goto error;
- if (make_dset(loc_id,"chunk_unlimit3",sid2,dcpl3,buf2) < 0)
- goto out;
+ if (make_dset(loc_id, "chunk_unlimit3", sid2, dcpl3, buf2[0]) < 0)
+ goto error;
/*-------------------------------------------------------------------------
* close space and dcpl
*-------------------------------------------------------------------------
*/
if(H5Sclose(sid1) < 0)
- goto out;
+ goto error;
if(H5Sclose(sid2) < 0)
- goto out;
+ goto error;
if(H5Pclose(dcpl1) < 0)
- goto out;
+ goto error;
if(H5Pclose(dcpl2) < 0)
- goto out;
+ goto error;
if(H5Pclose(dcpl3) < 0)
- goto out;
+ goto error;
+
+ HDfree(buf1);
+ HDfree(buf2);
return 0;
-out:
+error:
H5E_BEGIN_TRY
{
H5Sclose(sid1);
@@ -3481,6 +3500,10 @@ out:
H5Pclose(dcpl2);
H5Pclose(dcpl3);
} H5E_END_TRY;
+
+ HDfree(buf1);
+ HDfree(buf2);
+
return -1;
}
@@ -3494,8 +3517,8 @@ out:
static
int make_fill(hid_t loc_id)
{
- hid_t did=-1;
- hid_t sid=-1;
+ hid_t did=H5I_INVALID_HID;
+ hid_t sid=H5I_INVALID_HID;
hid_t dcpl;
hsize_t dims[2]={3,2};
int buf[3][2]= {{1,1},{1,2},{2,2}};
@@ -3547,9 +3570,9 @@ out:
static
int make_big(hid_t loc_id)
{
- hid_t did=-1;
- hid_t f_sid=-1;
- hid_t m_sid=-1;
+ hid_t did=H5I_INVALID_HID;
+ hid_t f_sid=H5I_INVALID_HID;
+ hid_t m_sid=H5I_INVALID_HID;
hid_t tid;
hid_t dcpl;
hsize_t dims[1]={ H5TOOLS_MALLOCSIZE + 1}; /* dataset dimensions */
@@ -3628,8 +3651,8 @@ out:
static
int make_external(hid_t loc_id)
{
- hid_t did=-1;
- hid_t sid=-1;
+ hid_t did=H5I_INVALID_HID;
+ hid_t sid=H5I_INVALID_HID;
hid_t dcpl;
int buf[2]={1,2};
hsize_t cur_size[1]; /* data space current size */
@@ -3682,12 +3705,12 @@ out:
static int
make_userblock(void)
{
- hid_t fid = -1;
- hid_t fcpl = -1;
- int fd = -1; /* File descriptor for writing userblock */
- char ub[USERBLOCK_SIZE]; /* User block data */
- ssize_t nwritten; /* # of bytes written */
- size_t u; /* Local index variable */
+ hid_t fid = H5I_INVALID_HID;
+ hid_t fcpl = H5I_INVALID_HID;
+ int fd = -1; /* File descriptor for writing userblock */
+ char ub[USERBLOCK_SIZE]; /* User block data */
+ ssize_t H5_ATTR_NDEBUG_UNUSED nwritten; /* # of bytes written */
+ size_t u; /* Local index variable */
/* Create file creation property list with userblock set */
if((fcpl = H5Pcreate(H5P_FILE_CREATE)) < 0)
@@ -3744,12 +3767,12 @@ out:
static int
verify_userblock( const char* filename)
{
- hid_t fid = -1;
- hid_t fcpl = -1;
+ hid_t fid = H5I_INVALID_HID;
+ hid_t fcpl = H5I_INVALID_HID;
int fd = -1; /* File descriptor for writing userblock */
char ub[USERBLOCK_SIZE]; /* User block data */
hsize_t ub_size = 0; /* User block size */
- ssize_t nread; /* # of bytes read */
+ ssize_t H5_ATTR_NDEBUG_UNUSED nread; /* # of bytes read */
size_t u; /* Local index variable */
/* Open file with userblock */
@@ -3816,7 +3839,7 @@ make_userblock_file(void)
{
int fd = -1; /* File descriptor for writing userblock */
char ub[USERBLOCK_SIZE]; /* User block data */
- ssize_t nwritten; /* # of bytes written */
+ ssize_t H5_ATTR_NDEBUG_UNUSED nwritten; /* # of bytes written */
size_t u; /* Local index variable */
/* initialize userblock data */
@@ -3849,7 +3872,7 @@ out:
*
* Purpose: write datasets in LOC_ID
*
-* Programmer: Pedro Vicente, pvn@ncsa.uiuc.edu
+* Programmer: Pedro Vicente
*
* Date: November 12, 2003
*
@@ -3874,10 +3897,10 @@ int write_dset_in(hid_t loc_id,
GREEN
} e_t;
- hid_t did=-1;
- hid_t sid=-1;
- hid_t tid=-1;
- hid_t pid=-1;
+ hid_t did=H5I_INVALID_HID;
+ hid_t sid=H5I_INVALID_HID;
+ hid_t tid=H5I_INVALID_HID;
+ hid_t pid=H5I_INVALID_HID;
unsigned i, j;
int val, k, n;
float f;
@@ -4620,10 +4643,10 @@ out:
static
int make_dset_reg_ref(hid_t loc_id)
{
- hid_t did1=-1; /* Dataset ID */
- hid_t did2=-1; /* Dereferenced dataset ID */
- hid_t sid1=-1; /* Dataspace ID #1 */
- hid_t sid2=-1; /* Dataspace ID #2 */
+ hid_t did1=H5I_INVALID_HID; /* Dataset ID */
+ hid_t did2=H5I_INVALID_HID; /* Dereferenced dataset ID */
+ hid_t sid1=H5I_INVALID_HID; /* Dataspace ID #1 */
+ hid_t sid2=H5I_INVALID_HID; /* Dataspace ID #2 */
hsize_t dims1[] = {SPACE1_DIM1};
hsize_t dims2[] = {SPACE2_DIM1, SPACE2_DIM2};
hsize_t start[SPACE2_RANK]; /* Starting location of hyperslab */
@@ -4713,7 +4736,7 @@ out:
*
* Purpose: write attributes in LOC_ID (dataset, group, named datatype)
*
-* Programmer: Pedro Vicente, pvn@ncsa.uiuc.edu
+* Programmer: Pedro Vicente
*
* Date: November 12, 2003
*
@@ -4739,9 +4762,9 @@ int write_attr_in(hid_t loc_id,
GREEN
} e_t;
- hid_t aid = -1;
- hid_t sid = -1;
- hid_t tid = -1;
+ hid_t aid = H5I_INVALID_HID;
+ hid_t sid = H5I_INVALID_HID;
+ hid_t tid = H5I_INVALID_HID;
int val, j, k, n;
unsigned i;
float f;
@@ -4824,7 +4847,7 @@ int write_attr_in(hid_t loc_id,
goto out;
if (H5Tclose(tid) < 0)
goto out;
- tid = -1;
+ tid = H5I_INVALID_HID;
/*-------------------------------------------------------------------------
* H5T_BITFIELD
@@ -4854,7 +4877,7 @@ int write_attr_in(hid_t loc_id,
goto out;
if (H5Tclose(tid) < 0)
goto out;
- tid = -1;
+ tid = H5I_INVALID_HID;
/*-------------------------------------------------------------------------
* H5T_OPAQUE
@@ -4881,7 +4904,7 @@ int write_attr_in(hid_t loc_id,
goto out;
if (H5Tclose(tid) < 0)
goto out;
- tid = -1;
+ tid = H5I_INVALID_HID;
/*-------------------------------------------------------------------------
* H5T_COMPOUND
@@ -4919,7 +4942,7 @@ int write_attr_in(hid_t loc_id,
goto out;
if (H5Tclose(tid) < 0)
goto out;
- tid = -1;
+ tid = H5I_INVALID_HID;
/*-------------------------------------------------------------------------
* H5T_REFERENCE
@@ -4968,7 +4991,7 @@ int write_attr_in(hid_t loc_id,
goto out;
if (H5Tclose(tid) < 0)
goto out;
- tid = -1;
+ tid = H5I_INVALID_HID;
/*-------------------------------------------------------------------------
* H5T_VLEN
@@ -5013,13 +5036,13 @@ int write_attr_in(hid_t loc_id,
goto out;
if (H5Aclose(aid) < 0)
goto out;
- aid = -1;
+ aid = H5I_INVALID_HID;
if (H5Tclose(tid) < 0)
goto out;
- tid = -1;
+ tid = H5I_INVALID_HID;
if (H5Sclose(sid) < 0)
goto out;
- sid = -1;
+ sid = H5I_INVALID_HID;
/*-------------------------------------------------------------------------
* H5T_ARRAY
@@ -5054,7 +5077,7 @@ int write_attr_in(hid_t loc_id,
goto out;
if (H5Tclose(tid) < 0)
goto out;
- tid = -1;
+ tid = H5I_INVALID_HID;
/*-------------------------------------------------------------------------
* H5T_INTEGER and H5T_FLOAT
@@ -5132,7 +5155,7 @@ int write_attr_in(hid_t loc_id,
goto out;
if (H5Tclose(tid) < 0)
goto out;
- tid = -1;
+ tid = H5I_INVALID_HID;
/*-------------------------------------------------------------------------
* H5T_BITFIELD
@@ -5165,7 +5188,7 @@ int write_attr_in(hid_t loc_id,
goto out;
if (H5Tclose(tid) < 0)
goto out;
- tid = -1;
+ tid = H5I_INVALID_HID;
/*-------------------------------------------------------------------------
* H5T_OPAQUE
@@ -5193,7 +5216,7 @@ int write_attr_in(hid_t loc_id,
goto out;
if (H5Tclose(tid) < 0)
goto out;
- tid = -1;
+ tid = H5I_INVALID_HID;
/*-------------------------------------------------------------------------
* H5T_COMPOUND
@@ -5229,7 +5252,7 @@ int write_attr_in(hid_t loc_id,
goto out;
if (H5Tclose(tid) < 0)
goto out;
- tid = -1;
+ tid = H5I_INVALID_HID;
/*-------------------------------------------------------------------------
* H5T_REFERENCE
@@ -5284,7 +5307,7 @@ int write_attr_in(hid_t loc_id,
goto out;
if (H5Tclose(tid) < 0)
goto out;
- tid = -1;
+ tid = H5I_INVALID_HID;
/*-------------------------------------------------------------------------
* H5T_VLEN
@@ -5335,13 +5358,13 @@ int write_attr_in(hid_t loc_id,
goto out;
if (H5Aclose(aid) < 0)
goto out;
- aid = -1;
+ aid = H5I_INVALID_HID;
if (H5Tclose(tid) < 0)
goto out;
- tid = -1;
+ tid = H5I_INVALID_HID;
if (H5Sclose(sid) < 0)
goto out;
- sid = -1;
+ sid = H5I_INVALID_HID;
/*-------------------------------------------------------------------------
* H5T_ARRAY
@@ -5384,7 +5407,7 @@ int write_attr_in(hid_t loc_id,
goto out;
if (H5Tclose(tid) < 0)
goto out;
- tid = -1;
+ tid = H5I_INVALID_HID;
/*-------------------------------------------------------------------------
* H5T_INTEGER and H5T_FLOAT
@@ -5504,7 +5527,7 @@ int write_attr_in(hid_t loc_id,
goto out;
if (H5Tclose(tid) < 0)
goto out;
- tid = -1;
+ tid = H5I_INVALID_HID;
/*-------------------------------------------------------------------------
* H5T_BITFIELD
@@ -5558,7 +5581,7 @@ int write_attr_in(hid_t loc_id,
goto out;
if (H5Tclose(tid) < 0)
goto out;
- tid = -1;
+ tid = H5I_INVALID_HID;
/*-------------------------------------------------------------------------
* H5T_OPAQUE
@@ -5572,7 +5595,7 @@ int write_attr_in(hid_t loc_id,
goto out;
if (H5Tclose(tid) < 0)
goto out;
- tid = -1;
+ tid = H5I_INVALID_HID;
/*-------------------------------------------------------------------------
* H5T_COMPOUND
@@ -5658,7 +5681,7 @@ int write_attr_in(hid_t loc_id,
goto out;
if (H5Tclose(tid) < 0)
goto out;
- tid = -1;
+ tid = H5I_INVALID_HID;
/*-------------------------------------------------------------------------
* H5T_REFERENCE
@@ -5743,7 +5766,7 @@ int write_attr_in(hid_t loc_id,
goto out;
if (H5Tclose(tid) < 0)
goto out;
- tid = -1;
+ tid = H5I_INVALID_HID;
/*-------------------------------------------------------------------------
* H5T_VLEN
@@ -5797,13 +5820,13 @@ int write_attr_in(hid_t loc_id,
goto out;
if (H5Aclose(aid) < 0)
goto out;
- aid = -1;
+ aid = H5I_INVALID_HID;
if (H5Tclose(tid) < 0)
goto out;
- tid = -1;
+ tid = H5I_INVALID_HID;
if (H5Sclose(sid) < 0)
goto out;
- sid = -1;
+ sid = H5I_INVALID_HID;
/*-------------------------------------------------------------------------
* H5T_ARRAY
@@ -5837,7 +5860,7 @@ int write_attr_in(hid_t loc_id,
goto out;
if (H5Tclose(tid) < 0)
goto out;
- tid = -1;
+ tid = H5I_INVALID_HID;
/*-------------------------------------------------------------------------
* H5T_INTEGER and H5T_FLOAT
@@ -5904,7 +5927,7 @@ out:
*
* Purpose: utility function to create and write a dataset in LOC_ID
*
-* Programmer: Pedro Vicente, pvn@ncsa.uiuc.edu
+* Programmer: Pedro Vicente
*
* Date: November 12, 2003
*
@@ -5917,7 +5940,7 @@ int make_dset(hid_t loc_id,
hid_t dcpl,
void *buf)
{
- hid_t did=-1;
+ hid_t did=H5I_INVALID_HID;
if ((did = H5Dcreate2(loc_id, name, H5T_NATIVE_INT, sid, H5P_DEFAULT, dcpl, H5P_DEFAULT)) < 0)
return -1;
@@ -5940,7 +5963,7 @@ out:
*
* Purpose: utility function to create and write a dataset in LOC_ID
*
-* Programmer: Pedro Vicente, pvn@ncsa.uiuc.edu
+* Programmer: Pedro Vicente
*
* Date: November 12, 2003
*
@@ -5954,8 +5977,8 @@ int write_dset( hid_t loc_id,
hid_t tid,
void *buf )
{
- hid_t did=-1;
- hid_t sid=-1;
+ hid_t did=H5I_INVALID_HID;
+ hid_t sid=H5I_INVALID_HID;
if ((sid = H5Screate_simple(rank, dims, NULL)) < 0)
return -1;
@@ -5988,7 +6011,7 @@ out:
*
* Purpose: utility function to write an attribute in LOC_ID
*
-* Programmer: Pedro Vicente, pvn@ncsa.uiuc.edu
+* Programmer: Pedro Vicente
*
* Date: November 12, 2003
*
@@ -6040,11 +6063,11 @@ static
int make_named_dtype(hid_t loc_id)
{
hsize_t dims[1] ={3};
- hid_t did=-1;
- hid_t aid=-1;
- hid_t sid=-1;
- hid_t tid=-1;
- hid_t gid=-1;
+ hid_t did=H5I_INVALID_HID;
+ hid_t aid=H5I_INVALID_HID;
+ hid_t sid=H5I_INVALID_HID;
+ hid_t tid=H5I_INVALID_HID;
+ hid_t gid=H5I_INVALID_HID;
if ((sid = H5Screate_simple(1, dims, NULL)) < 0)
goto out;
diff --git a/tools/test/h5repack/testfiles/h5copy_extlinks_src-base.h5copy_extlinks_src.h5.ddl b/tools/test/h5repack/testfiles/h5copy_extlinks_src-base.h5copy_extlinks_src.h5.ddl
new file mode 100644
index 0000000..ad8a320
--- /dev/null
+++ b/tools/test/h5repack/testfiles/h5copy_extlinks_src-base.h5copy_extlinks_src.h5.ddl
@@ -0,0 +1,28 @@
+HDF5 "out-h5copy_extlinks_src-mergeprune.h5copy_extlinks_src.h5" {
+GROUP "/" {
+ GROUP "group_ext" {
+ DATATYPE "extlink_datatype" H5T_STD_I32LE;
+ DATASET "extlink_dset" {
+ DATATYPE H5T_STD_I32LE
+ DATASPACE SIMPLE { ( 6 ) / ( 6 ) }
+ STORAGE_LAYOUT {
+ CONTIGUOUS
+ SIZE 24
+ OFFSET 2200
+ }
+ FILTERS {
+ NONE
+ }
+ FILLVALUE {
+ FILL_TIME H5D_FILL_TIME_IFSET
+ VALUE H5D_FILL_VALUE_DEFAULT
+ }
+ ALLOCATION_TIME {
+ H5D_ALLOC_TIME_LATE
+ }
+ }
+ GROUP "extlink_grp" {
+ }
+ }
+}
+}
diff --git a/tools/test/h5repack/testfiles/h5copy_extlinks_src-merge.h5copy_extlinks_src.h5.tst b/tools/test/h5repack/testfiles/h5copy_extlinks_src-merge.h5copy_extlinks_src.h5.tst
new file mode 100644
index 0000000..52f215d
--- /dev/null
+++ b/tools/test/h5repack/testfiles/h5copy_extlinks_src-merge.h5copy_extlinks_src.h5.tst
@@ -0,0 +1,26 @@
+
+file1 file2
+---------------------------------------
+ x x /
+ x x /group_ext
+ x x /group_ext/extlink_datatype
+ x x /group_ext/extlink_dset
+ x x /group_ext/extlink_grp
+ x x /group_ext/extlink_notyet1
+ x x /group_ext/extlink_notyet2
+
+group : </> and </>
+0 differences found
+group : </group_ext> and </group_ext>
+0 differences found
+Not comparable: </group_ext/extlink_datatype> is of type H5G_UDLINK and </group_ext/extlink_datatype> is of type H5G_TYPE
+Not comparable: </group_ext/extlink_dset> is of type H5G_UDLINK and </group_ext/extlink_dset> is of type H5G_DATASET
+Not comparable: </group_ext/extlink_grp> is of type H5G_UDLINK and </group_ext/extlink_grp> is of type H5G_GROUP
+external link: </group_ext/extlink_notyet1> and </group_ext/extlink_notyet1>
+0 differences found
+external link: </group_ext/extlink_notyet2> and </group_ext/extlink_notyet2>
+0 differences found
+--------------------------------
+Some objects are not comparable
+--------------------------------
+Use -c for a list of objects without details of differences.
diff --git a/tools/test/h5repack/testfiles/h5copy_extlinks_src-mergeprune.h5copy_extlinks_src.h5.ddl b/tools/test/h5repack/testfiles/h5copy_extlinks_src-mergeprune.h5copy_extlinks_src.h5.ddl
new file mode 100644
index 0000000..ad8a320
--- /dev/null
+++ b/tools/test/h5repack/testfiles/h5copy_extlinks_src-mergeprune.h5copy_extlinks_src.h5.ddl
@@ -0,0 +1,28 @@
+HDF5 "out-h5copy_extlinks_src-mergeprune.h5copy_extlinks_src.h5" {
+GROUP "/" {
+ GROUP "group_ext" {
+ DATATYPE "extlink_datatype" H5T_STD_I32LE;
+ DATASET "extlink_dset" {
+ DATATYPE H5T_STD_I32LE
+ DATASPACE SIMPLE { ( 6 ) / ( 6 ) }
+ STORAGE_LAYOUT {
+ CONTIGUOUS
+ SIZE 24
+ OFFSET 2200
+ }
+ FILTERS {
+ NONE
+ }
+ FILLVALUE {
+ FILL_TIME H5D_FILL_TIME_IFSET
+ VALUE H5D_FILL_VALUE_DEFAULT
+ }
+ ALLOCATION_TIME {
+ H5D_ALLOC_TIME_LATE
+ }
+ }
+ GROUP "extlink_grp" {
+ }
+ }
+}
+}
diff --git a/tools/test/h5repack/testfiles/h5copy_extlinks_src-prune.h5copy_extlinks_src.h5.ddl b/tools/test/h5repack/testfiles/h5copy_extlinks_src-prune.h5copy_extlinks_src.h5.ddl
new file mode 100644
index 0000000..b7d7bca
--- /dev/null
+++ b/tools/test/h5repack/testfiles/h5copy_extlinks_src-prune.h5copy_extlinks_src.h5.ddl
@@ -0,0 +1,6 @@
+HDF5 "out-h5copy_extlinks_src-prune.h5copy_extlinks_src.h5" {
+GROUP "/" {
+ GROUP "group_ext" {
+ }
+}
+}
diff --git a/tools/test/h5repack/testfiles/h5copy_extlinks_src.h5 b/tools/test/h5repack/testfiles/h5copy_extlinks_src.h5
new file mode 100644
index 0000000..7b8621e
--- /dev/null
+++ b/tools/test/h5repack/testfiles/h5copy_extlinks_src.h5
Binary files differ
diff --git a/tools/test/h5repack/testfiles/h5copy_extlinks_trg.h5 b/tools/test/h5repack/testfiles/h5copy_extlinks_trg.h5
new file mode 100644
index 0000000..3a0242d
--- /dev/null
+++ b/tools/test/h5repack/testfiles/h5copy_extlinks_trg.h5
Binary files differ
diff --git a/tools/test/h5repack/testfiles/h5repack-help.txt b/tools/test/h5repack/testfiles/h5repack-help.txt
index 9231e01..a184ae8 100644
--- a/tools/test/h5repack/testfiles/h5repack-help.txt
+++ b/tools/test/h5repack/testfiles/h5repack-help.txt
@@ -17,6 +17,9 @@ usage: h5repack [OPTIONS] file1 file2
--high=BOUND The high bound for library release versions to use
when creating objects in the file
(default is H5F_LIBVER_LATEST)
+ --merge Follow external soft link recursively and merge data
+ --prune Do not follow external soft links and remove link
+ --merge --prune Follow external link, merge data and remove dangling link
-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
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 069fb3b..96f308d 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
@@ -35,4 +35,4 @@ HDF5-DIAG: Error detected in HDF5 (version (number)) thread (IDs):
H5tools-DIAG: Error detected in HDF5:tools (version (number)) thread (IDs):
#000: (file name) line (number) in do_copy_objects(): H5Dcreate2 failed
major: Failure in tools library
- minor: error in function
+ minor: function info
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 15d326a..eec64d8 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 10 6 }
+ PARAMS { 9 1 10 7 }
}
}
FILLVALUE {
@@ -33,7 +33,7 @@ GROUP "/" {
USER_DEFINED_FILTER {
FILTER_ID 260
COMMENT dynlib4
- PARAMS { 9 1 10 6 }
+ PARAMS { 9 1 10 7 }
}
}
FILLVALUE {
@@ -55,7 +55,7 @@ GROUP "/" {
USER_DEFINED_FILTER {
FILTER_ID 260
COMMENT dynlib4
- PARAMS { 9 1 10 6 }
+ PARAMS { 9 1 10 7 }
}
}
FILLVALUE {
@@ -77,7 +77,7 @@ GROUP "/" {
USER_DEFINED_FILTER {
FILTER_ID 260
COMMENT dynlib4
- PARAMS { 9 1 10 6 }
+ PARAMS { 9 1 10 7 }
}
}
FILLVALUE {
@@ -99,7 +99,7 @@ GROUP "/" {
USER_DEFINED_FILTER {
FILTER_ID 260
COMMENT dynlib4
- PARAMS { 9 1 10 6 }
+ PARAMS { 9 1 10 7 }
}
}
FILLVALUE {
@@ -121,7 +121,7 @@ GROUP "/" {
USER_DEFINED_FILTER {
FILTER_ID 260
COMMENT dynlib4
- PARAMS { 9 1 10 6 }
+ PARAMS { 9 1 10 7 }
}
}
FILLVALUE {
@@ -143,7 +143,7 @@ GROUP "/" {
USER_DEFINED_FILTER {
FILTER_ID 260
COMMENT dynlib4
- PARAMS { 9 1 10 6 }
+ PARAMS { 9 1 10 7 }
}
}
FILLVALUE {
diff --git a/tools/test/h5repack/testfiles/textlink-base.textlink.h5.ddl b/tools/test/h5repack/testfiles/textlink-base.textlink.h5.ddl
new file mode 100644
index 0000000..b87a17d
--- /dev/null
+++ b/tools/test/h5repack/testfiles/textlink-base.textlink.h5.ddl
@@ -0,0 +1,12 @@
+HDF5 "out-textlink-base.textlink.h5" {
+GROUP "/" {
+ EXTERNAL_LINK "extlink1" {
+ TARGETFILE "filename"
+ TARGETPATH "objname"
+ }
+ EXTERNAL_LINK "extlink2" {
+ TARGETFILE "anotherfile"
+ TARGETPATH "anotherobj"
+ }
+}
+}
diff --git a/tools/test/h5repack/testfiles/textlink-merge.textlink.h5.tst b/tools/test/h5repack/testfiles/textlink-merge.textlink.h5.tst
new file mode 100644
index 0000000..a7ff71d
--- /dev/null
+++ b/tools/test/h5repack/testfiles/textlink-merge.textlink.h5.tst
@@ -0,0 +1,13 @@
+
+file1 file2
+---------------------------------------
+ x x /
+ x x /extlink1
+ x x /extlink2
+
+group : </> and </>
+0 differences found
+external link: </extlink1> and </extlink1>
+0 differences found
+external link: </extlink2> and </extlink2>
+0 differences found
diff --git a/tools/test/h5repack/testfiles/textlink-mergeprune.textlink.h5.ddl b/tools/test/h5repack/testfiles/textlink-mergeprune.textlink.h5.ddl
new file mode 100644
index 0000000..7206ae9
--- /dev/null
+++ b/tools/test/h5repack/testfiles/textlink-mergeprune.textlink.h5.ddl
@@ -0,0 +1,4 @@
+HDF5 "out-textlink-mergeprune.textlink.h5" {
+GROUP "/" {
+}
+}
diff --git a/tools/test/h5repack/testfiles/textlink-prune.textlink.h5.ddl b/tools/test/h5repack/testfiles/textlink-prune.textlink.h5.ddl
new file mode 100644
index 0000000..83db344
--- /dev/null
+++ b/tools/test/h5repack/testfiles/textlink-prune.textlink.h5.ddl
@@ -0,0 +1,4 @@
+HDF5 "out-textlink-prune.textlink.h5" {
+GROUP "/" {
+}
+}
diff --git a/tools/test/h5repack/testfiles/textlinkfar-base.textlinkfar.h5.ddl b/tools/test/h5repack/testfiles/textlinkfar-base.textlinkfar.h5.ddl
new file mode 100644
index 0000000..a5eb497
--- /dev/null
+++ b/tools/test/h5repack/testfiles/textlinkfar-base.textlinkfar.h5.ddl
@@ -0,0 +1,116 @@
+HDF5 "out-textlinkfar-base.textlinkfar.h5" {
+GROUP "/" {
+ EXTERNAL_LINK "src_file" {
+ TARGETFILE "textlinksrc.h5"
+ TARGETPATH "/"
+ GROUP "/" {
+ EXTERNAL_LINK "ext2soft_link1" {
+ TARGETFILE "tsoftlinks.h5"
+ TARGETPATH "/soft_dset1"
+ DATASET "/soft_dset1" {
+ DATATYPE H5T_STD_I32BE
+ DATASPACE SIMPLE { ( 4, 2 ) / ( 4, 2 ) }
+ STORAGE_LAYOUT {
+ CONTIGUOUS
+ SIZE 32
+ OFFSET 2848
+ }
+ FILTERS {
+ NONE
+ }
+ FILLVALUE {
+ FILL_TIME H5D_FILL_TIME_IFSET
+ VALUE H5D_FILL_VALUE_DEFAULT
+ }
+ ALLOCATION_TIME {
+ H5D_ALLOC_TIME_LATE
+ }
+ }
+ }
+ EXTERNAL_LINK "ext2softdangle_link1" {
+ TARGETFILE "tsoftlinks.h5"
+ TARGETPATH "/soft_dangle"
+ }
+ EXTERNAL_LINK "ext_link1" {
+ TARGETFILE "textlinktar.h5"
+ TARGETPATH "group"
+ GROUP "group" {
+ DATASET "dset" {
+ DATATYPE H5T_STD_I32LE
+ DATASPACE SIMPLE { ( 6 ) / ( 6 ) }
+ STORAGE_LAYOUT {
+ CONTIGUOUS
+ SIZE 24
+ OFFSET 3136
+ }
+ FILTERS {
+ NONE
+ }
+ FILLVALUE {
+ FILL_TIME H5D_FILL_TIME_IFSET
+ VALUE H5D_FILL_VALUE_DEFAULT
+ }
+ ALLOCATION_TIME {
+ H5D_ALLOC_TIME_LATE
+ }
+ }
+ EXTERNAL_LINK "elink_t1" {
+ TARGETFILE "textlinksrc.h5"
+ TARGETPATH "/"
+ GROUP "/" {
+ HARDLINK "/"
+ }
+ }
+ EXTERNAL_LINK "elink_t2" {
+ TARGETFILE "textlinksrc.h5"
+ TARGETPATH "/ext_link4"
+ }
+ GROUP "subgroup" {
+ GROUP "link_to_group" {
+ HARDLINK "/group"
+ }
+ }
+ }
+ }
+ EXTERNAL_LINK "ext_link2" {
+ TARGETFILE "textlinktar.h5"
+ TARGETPATH "dset"
+ DATASET "dset" {
+ DATATYPE H5T_STD_I32LE
+ DATASPACE SIMPLE { ( 6 ) / ( 6 ) }
+ STORAGE_LAYOUT {
+ CONTIGUOUS
+ SIZE 24
+ OFFSET 3160
+ }
+ FILTERS {
+ NONE
+ }
+ FILLVALUE {
+ FILL_TIME H5D_FILL_TIME_IFSET
+ VALUE H5D_FILL_VALUE_DEFAULT
+ }
+ ALLOCATION_TIME {
+ H5D_ALLOC_TIME_LATE
+ }
+ }
+ }
+ EXTERNAL_LINK "ext_link3" {
+ TARGETFILE "textlinktar.h5"
+ TARGETPATH "type"
+ DATATYPE "type" H5T_STD_I32LE;
+ }
+ EXTERNAL_LINK "ext_link4" {
+ TARGETFILE "textlinktar.h5"
+ TARGETPATH "group/elink_t2"
+ }
+ EXTERNAL_LINK "ext_link5" {
+ TARGETFILE "textlinktar.h5"
+ TARGETPATH "empty_group"
+ GROUP "empty_group" {
+ }
+ }
+ }
+ }
+}
+}
diff --git a/tools/test/h5repack/testfiles/textlinkfar-merge.textlinkfar.h5.tst b/tools/test/h5repack/testfiles/textlinkfar-merge.textlinkfar.h5.tst
new file mode 100644
index 0000000..6673d39
--- /dev/null
+++ b/tools/test/h5repack/testfiles/textlinkfar-merge.textlinkfar.h5.tst
@@ -0,0 +1,20 @@
+
+file1 file2
+---------------------------------------
+ x x /
+ x x /src_file
+ x /src_file/ext2soft_link1
+ x /src_file/ext2softdangle_link1
+ x /src_file/ext_link1
+ x /src_file/ext_link2
+ x /src_file/ext_link3
+ x /src_file/ext_link4
+ x /src_file/ext_link5
+
+group : </> and </>
+0 differences found
+Not comparable: </src_file> is of type H5G_UDLINK and </src_file> is of type H5G_GROUP
+--------------------------------
+Some objects are not comparable
+--------------------------------
+Use -c for a list of objects without details of differences.
diff --git a/tools/test/h5repack/testfiles/textlinkfar-mergeprune.textlinkfar.h5.ddl b/tools/test/h5repack/testfiles/textlinkfar-mergeprune.textlinkfar.h5.ddl
new file mode 100644
index 0000000..7ba3308
--- /dev/null
+++ b/tools/test/h5repack/testfiles/textlinkfar-mergeprune.textlinkfar.h5.ddl
@@ -0,0 +1,152 @@
+HDF5 "out-textlinkfar-mergeprune.textlinkfar.h5" {
+GROUP "/" {
+ GROUP "src_file" {
+ EXTERNAL_LINK "ext2soft_link1" {
+ TARGETFILE "tsoftlinks.h5"
+ TARGETPATH "/soft_dset1"
+ DATASET "/soft_dset1" {
+ DATATYPE H5T_STD_I32BE
+ DATASPACE SIMPLE { ( 4, 2 ) / ( 4, 2 ) }
+ STORAGE_LAYOUT {
+ CONTIGUOUS
+ SIZE 32
+ OFFSET 2848
+ }
+ FILTERS {
+ NONE
+ }
+ FILLVALUE {
+ FILL_TIME H5D_FILL_TIME_IFSET
+ VALUE H5D_FILL_VALUE_DEFAULT
+ }
+ ALLOCATION_TIME {
+ H5D_ALLOC_TIME_LATE
+ }
+ }
+ }
+ EXTERNAL_LINK "ext2softdangle_link1" {
+ TARGETFILE "tsoftlinks.h5"
+ TARGETPATH "/soft_dangle"
+ }
+ EXTERNAL_LINK "ext_link1" {
+ TARGETFILE "textlinktar.h5"
+ TARGETPATH "group"
+ GROUP "group" {
+ DATASET "dset" {
+ DATATYPE H5T_STD_I32LE
+ DATASPACE SIMPLE { ( 6 ) / ( 6 ) }
+ STORAGE_LAYOUT {
+ CONTIGUOUS
+ SIZE 24
+ OFFSET 3136
+ }
+ FILTERS {
+ NONE
+ }
+ FILLVALUE {
+ FILL_TIME H5D_FILL_TIME_IFSET
+ VALUE H5D_FILL_VALUE_DEFAULT
+ }
+ ALLOCATION_TIME {
+ H5D_ALLOC_TIME_LATE
+ }
+ }
+ EXTERNAL_LINK "elink_t1" {
+ TARGETFILE "textlinksrc.h5"
+ TARGETPATH "/"
+ GROUP "/" {
+ EXTERNAL_LINK "ext2soft_link1" {
+ TARGETFILE "tsoftlinks.h5"
+ TARGETPATH "/soft_dset1"
+ DATASET "/soft_dset1" {
+ HARDLINK "/dset1"
+ }
+ }
+ EXTERNAL_LINK "ext2softdangle_link1" {
+ TARGETFILE "tsoftlinks.h5"
+ TARGETPATH "/soft_dangle"
+ }
+ EXTERNAL_LINK "ext_link1" {
+ TARGETFILE "textlinktar.h5"
+ TARGETPATH "group"
+ GROUP "group" {
+ HARDLINK "/group"
+ }
+ }
+ EXTERNAL_LINK "ext_link2" {
+ TARGETFILE "textlinktar.h5"
+ TARGETPATH "dset"
+ DATASET "dset" {
+ DATATYPE H5T_STD_I32LE
+ DATASPACE SIMPLE { ( 6 ) / ( 6 ) }
+ STORAGE_LAYOUT {
+ CONTIGUOUS
+ SIZE 24
+ OFFSET 3160
+ }
+ FILTERS {
+ NONE
+ }
+ FILLVALUE {
+ FILL_TIME H5D_FILL_TIME_IFSET
+ VALUE H5D_FILL_VALUE_DEFAULT
+ }
+ ALLOCATION_TIME {
+ H5D_ALLOC_TIME_LATE
+ }
+ }
+ }
+ EXTERNAL_LINK "ext_link3" {
+ TARGETFILE "textlinktar.h5"
+ TARGETPATH "type"
+ DATATYPE "type" H5T_STD_I32LE;
+ }
+ EXTERNAL_LINK "ext_link4" {
+ TARGETFILE "textlinktar.h5"
+ TARGETPATH "group/elink_t2"
+ }
+ EXTERNAL_LINK "ext_link5" {
+ TARGETFILE "textlinktar.h5"
+ TARGETPATH "empty_group"
+ GROUP "empty_group" {
+ }
+ }
+ }
+ }
+ EXTERNAL_LINK "elink_t2" {
+ TARGETFILE "textlinksrc.h5"
+ TARGETPATH "/ext_link4"
+ }
+ GROUP "subgroup" {
+ GROUP "link_to_group" {
+ HARDLINK "/group"
+ }
+ }
+ }
+ }
+ EXTERNAL_LINK "ext_link2" {
+ TARGETFILE "textlinktar.h5"
+ TARGETPATH "dset"
+ DATASET "dset" {
+ HARDLINK "/dset"
+ }
+ }
+ EXTERNAL_LINK "ext_link3" {
+ TARGETFILE "textlinktar.h5"
+ TARGETPATH "type"
+ DATATYPE "type" HARDLINK "/type"
+ }
+ EXTERNAL_LINK "ext_link4" {
+ TARGETFILE "textlinktar.h5"
+ TARGETPATH "group/elink_t2"
+ }
+ EXTERNAL_LINK "ext_link5" {
+ TARGETFILE "textlinktar.h5"
+ TARGETPATH "empty_group"
+ GROUP "empty_group" {
+ HARDLINK "/empty_group"
+ }
+ }
+ }
+}
+}
diff --git a/tools/test/h5repack/testfiles/textlinkfar-prune.textlinkfar.h5.ddl b/tools/test/h5repack/testfiles/textlinkfar-prune.textlinkfar.h5.ddl
new file mode 100644
index 0000000..30f8f1b
--- /dev/null
+++ b/tools/test/h5repack/testfiles/textlinkfar-prune.textlinkfar.h5.ddl
@@ -0,0 +1,4 @@
+HDF5 "out-textlinkfar-prune.textlinkfar.h5" {
+GROUP "/" {
+}
+}
diff --git a/tools/test/h5repack/testfiles/textlinksrc-base.textlinksrc.h5.ddl b/tools/test/h5repack/testfiles/textlinksrc-base.textlinksrc.h5.ddl
new file mode 100644
index 0000000..9a9a9aa
--- /dev/null
+++ b/tools/test/h5repack/testfiles/textlinksrc-base.textlinksrc.h5.ddl
@@ -0,0 +1,150 @@
+HDF5 "out-textlinksrc-base.textlinksrc.h5" {
+GROUP "/" {
+ EXTERNAL_LINK "ext2soft_link1" {
+ TARGETFILE "tsoftlinks.h5"
+ TARGETPATH "/soft_dset1"
+ DATASET "/soft_dset1" {
+ DATATYPE H5T_STD_I32BE
+ DATASPACE SIMPLE { ( 4, 2 ) / ( 4, 2 ) }
+ STORAGE_LAYOUT {
+ CONTIGUOUS
+ SIZE 32
+ OFFSET 2848
+ }
+ FILTERS {
+ NONE
+ }
+ FILLVALUE {
+ FILL_TIME H5D_FILL_TIME_IFSET
+ VALUE H5D_FILL_VALUE_DEFAULT
+ }
+ ALLOCATION_TIME {
+ H5D_ALLOC_TIME_LATE
+ }
+ }
+ }
+ EXTERNAL_LINK "ext2softdangle_link1" {
+ TARGETFILE "tsoftlinks.h5"
+ TARGETPATH "/soft_dangle"
+ }
+ EXTERNAL_LINK "ext_link1" {
+ TARGETFILE "textlinktar.h5"
+ TARGETPATH "group"
+ GROUP "group" {
+ DATASET "dset" {
+ DATATYPE H5T_STD_I32LE
+ DATASPACE SIMPLE { ( 6 ) / ( 6 ) }
+ STORAGE_LAYOUT {
+ CONTIGUOUS
+ SIZE 24
+ OFFSET 3136
+ }
+ FILTERS {
+ NONE
+ }
+ FILLVALUE {
+ FILL_TIME H5D_FILL_TIME_IFSET
+ VALUE H5D_FILL_VALUE_DEFAULT
+ }
+ ALLOCATION_TIME {
+ H5D_ALLOC_TIME_LATE
+ }
+ }
+ EXTERNAL_LINK "elink_t1" {
+ TARGETFILE "textlinksrc.h5"
+ TARGETPATH "/"
+ GROUP "/" {
+ EXTERNAL_LINK "ext2soft_link1" {
+ TARGETFILE "tsoftlinks.h5"
+ TARGETPATH "/soft_dset1"
+ DATASET "/soft_dset1" {
+ HARDLINK "/dset1"
+ }
+ }
+ EXTERNAL_LINK "ext2softdangle_link1" {
+ TARGETFILE "tsoftlinks.h5"
+ TARGETPATH "/soft_dangle"
+ }
+ EXTERNAL_LINK "ext_link1" {
+ TARGETFILE "textlinktar.h5"
+ TARGETPATH "group"
+ GROUP "group" {
+ HARDLINK "/group"
+ }
+ }
+ EXTERNAL_LINK "ext_link2" {
+ TARGETFILE "textlinktar.h5"
+ TARGETPATH "dset"
+ DATASET "dset" {
+ DATATYPE H5T_STD_I32LE
+ DATASPACE SIMPLE { ( 6 ) / ( 6 ) }
+ STORAGE_LAYOUT {
+ CONTIGUOUS
+ SIZE 24
+ OFFSET 3160
+ }
+ FILTERS {
+ NONE
+ }
+ FILLVALUE {
+ FILL_TIME H5D_FILL_TIME_IFSET
+ VALUE H5D_FILL_VALUE_DEFAULT
+ }
+ ALLOCATION_TIME {
+ H5D_ALLOC_TIME_LATE
+ }
+ }
+ }
+ EXTERNAL_LINK "ext_link3" {
+ TARGETFILE "textlinktar.h5"
+ TARGETPATH "type"
+ DATATYPE "type" H5T_STD_I32LE;
+ }
+ EXTERNAL_LINK "ext_link4" {
+ TARGETFILE "textlinktar.h5"
+ TARGETPATH "group/elink_t2"
+ }
+ EXTERNAL_LINK "ext_link5" {
+ TARGETFILE "textlinktar.h5"
+ TARGETPATH "empty_group"
+ GROUP "empty_group" {
+ }
+ }
+ }
+ }
+ EXTERNAL_LINK "elink_t2" {
+ TARGETFILE "textlinksrc.h5"
+ TARGETPATH "/ext_link4"
+ }
+ GROUP "subgroup" {
+ GROUP "link_to_group" {
+ HARDLINK "/group"
+ }
+ }
+ }
+ }
+ EXTERNAL_LINK "ext_link2" {
+ TARGETFILE "textlinktar.h5"
+ TARGETPATH "dset"
+ DATASET "dset" {
+ HARDLINK "/dset"
+ }
+ }
+ EXTERNAL_LINK "ext_link3" {
+ TARGETFILE "textlinktar.h5"
+ TARGETPATH "type"
+ DATATYPE "type" HARDLINK "/type"
+ }
+ EXTERNAL_LINK "ext_link4" {
+ TARGETFILE "textlinktar.h5"
+ TARGETPATH "group/elink_t2"
+ }
+ EXTERNAL_LINK "ext_link5" {
+ TARGETFILE "textlinktar.h5"
+ TARGETPATH "empty_group"
+ GROUP "empty_group" {
+ HARDLINK "/empty_group"
+ }
+ }
+}
+}
diff --git a/tools/test/h5repack/testfiles/textlinksrc-merge.textlinksrc.h5.tst b/tools/test/h5repack/testfiles/textlinksrc-merge.textlinksrc.h5.tst
new file mode 100644
index 0000000..d5a5902
--- /dev/null
+++ b/tools/test/h5repack/testfiles/textlinksrc-merge.textlinksrc.h5.tst
@@ -0,0 +1,32 @@
+
+file1 file2
+---------------------------------------
+ x x /
+ x x /ext2soft_link1
+ x x /ext2softdangle_link1
+ x x /ext_link1
+ x /ext_link1/dset
+ x /ext_link1/elink_t1
+ x /ext_link1/elink_t2
+ x /ext_link1/subgroup
+ x /ext_link1/subgroup/link_to_group
+ x x /ext_link2
+ x x /ext_link3
+ x x /ext_link4
+ x x /ext_link5
+
+group : </> and </>
+0 differences found
+Not comparable: </ext2soft_link1> is of type H5G_UDLINK and </ext2soft_link1> is of type H5G_DATASET
+external link: </ext2softdangle_link1> and </ext2softdangle_link1>
+0 differences found
+Not comparable: </ext_link1> is of type H5G_UDLINK and </ext_link1> is of type H5G_GROUP
+Not comparable: </ext_link2> is of type H5G_UDLINK and </ext_link2> is of type H5G_DATASET
+Not comparable: </ext_link3> is of type H5G_UDLINK and </ext_link3> is of type H5G_TYPE
+external link: </ext_link4> and </ext_link4>
+0 differences found
+Not comparable: </ext_link5> is of type H5G_UDLINK and </ext_link5> is of type H5G_GROUP
+--------------------------------
+Some objects are not comparable
+--------------------------------
+Use -c for a list of objects without details of differences.
diff --git a/tools/test/h5repack/testfiles/textlinksrc-mergeprune.textlinksrc.h5.ddl b/tools/test/h5repack/testfiles/textlinksrc-mergeprune.textlinksrc.h5.ddl
new file mode 100644
index 0000000..5b3c740
--- /dev/null
+++ b/tools/test/h5repack/testfiles/textlinksrc-mergeprune.textlinksrc.h5.ddl
@@ -0,0 +1,187 @@
+HDF5 "out-textlinksrc-mergeprune.textlinksrc.h5" {
+GROUP "/" {
+ DATASET "ext2soft_link1" {
+ DATATYPE H5T_STD_I32BE
+ DATASPACE SIMPLE { ( 4, 2 ) / ( 4, 2 ) }
+ STORAGE_LAYOUT {
+ CONTIGUOUS
+ SIZE 32
+ OFFSET 2048
+ }
+ FILTERS {
+ NONE
+ }
+ FILLVALUE {
+ FILL_TIME H5D_FILL_TIME_IFSET
+ VALUE H5D_FILL_VALUE_DEFAULT
+ }
+ ALLOCATION_TIME {
+ H5D_ALLOC_TIME_LATE
+ }
+ }
+ GROUP "ext_link1" {
+ DATASET "dset" {
+ DATATYPE H5T_STD_I32LE
+ DATASPACE SIMPLE { ( 6 ) / ( 6 ) }
+ STORAGE_LAYOUT {
+ CONTIGUOUS
+ SIZE 24
+ OFFSET 2080
+ }
+ FILTERS {
+ NONE
+ }
+ FILLVALUE {
+ FILL_TIME H5D_FILL_TIME_IFSET
+ VALUE H5D_FILL_VALUE_DEFAULT
+ }
+ ALLOCATION_TIME {
+ H5D_ALLOC_TIME_LATE
+ }
+ }
+ EXTERNAL_LINK "elink_t1" {
+ TARGETFILE "textlinksrc.h5"
+ TARGETPATH "/"
+ GROUP "/" {
+ EXTERNAL_LINK "ext2soft_link1" {
+ TARGETFILE "tsoftlinks.h5"
+ TARGETPATH "/soft_dset1"
+ DATASET "/soft_dset1" {
+ DATATYPE H5T_STD_I32BE
+ DATASPACE SIMPLE { ( 4, 2 ) / ( 4, 2 ) }
+ STORAGE_LAYOUT {
+ CONTIGUOUS
+ SIZE 32
+ OFFSET 2848
+ }
+ FILTERS {
+ NONE
+ }
+ FILLVALUE {
+ FILL_TIME H5D_FILL_TIME_IFSET
+ VALUE H5D_FILL_VALUE_DEFAULT
+ }
+ ALLOCATION_TIME {
+ H5D_ALLOC_TIME_LATE
+ }
+ }
+ }
+ EXTERNAL_LINK "ext2softdangle_link1" {
+ TARGETFILE "tsoftlinks.h5"
+ TARGETPATH "/soft_dangle"
+ }
+ EXTERNAL_LINK "ext_link1" {
+ TARGETFILE "textlinktar.h5"
+ TARGETPATH "group"
+ GROUP "group" {
+ DATASET "dset" {
+ DATATYPE H5T_STD_I32LE
+ DATASPACE SIMPLE { ( 6 ) / ( 6 ) }
+ STORAGE_LAYOUT {
+ CONTIGUOUS
+ SIZE 24
+ OFFSET 3136
+ }
+ FILTERS {
+ NONE
+ }
+ FILLVALUE {
+ FILL_TIME H5D_FILL_TIME_IFSET
+ VALUE H5D_FILL_VALUE_DEFAULT
+ }
+ ALLOCATION_TIME {
+ H5D_ALLOC_TIME_LATE
+ }
+ }
+ EXTERNAL_LINK "elink_t1" {
+ TARGETFILE "textlinksrc.h5"
+ TARGETPATH "/"
+ GROUP "/" {
+ HARDLINK "/"
+ }
+ }
+ EXTERNAL_LINK "elink_t2" {
+ TARGETFILE "textlinksrc.h5"
+ TARGETPATH "/ext_link4"
+ }
+ GROUP "subgroup" {
+ GROUP "link_to_group" {
+ HARDLINK "/group"
+ }
+ }
+ }
+ }
+ EXTERNAL_LINK "ext_link2" {
+ TARGETFILE "textlinktar.h5"
+ TARGETPATH "dset"
+ DATASET "dset" {
+ DATATYPE H5T_STD_I32LE
+ DATASPACE SIMPLE { ( 6 ) / ( 6 ) }
+ STORAGE_LAYOUT {
+ CONTIGUOUS
+ SIZE 24
+ OFFSET 3160
+ }
+ FILTERS {
+ NONE
+ }
+ FILLVALUE {
+ FILL_TIME H5D_FILL_TIME_IFSET
+ VALUE H5D_FILL_VALUE_DEFAULT
+ }
+ ALLOCATION_TIME {
+ H5D_ALLOC_TIME_LATE
+ }
+ }
+ }
+ EXTERNAL_LINK "ext_link3" {
+ TARGETFILE "textlinktar.h5"
+ TARGETPATH "type"
+ DATATYPE "type" H5T_STD_I32LE;
+ }
+ EXTERNAL_LINK "ext_link4" {
+ TARGETFILE "textlinktar.h5"
+ TARGETPATH "group/elink_t2"
+ }
+ EXTERNAL_LINK "ext_link5" {
+ TARGETFILE "textlinktar.h5"
+ TARGETPATH "empty_group"
+ GROUP "empty_group" {
+ }
+ }
+ }
+ }
+ EXTERNAL_LINK "elink_t2" {
+ TARGETFILE "textlinksrc.h5"
+ TARGETPATH "/ext_link4"
+ }
+ GROUP "subgroup" {
+ GROUP "link_to_group" {
+ HARDLINK "/ext_link1"
+ }
+ }
+ }
+ DATASET "ext_link2" {
+ DATATYPE H5T_STD_I32LE
+ DATASPACE SIMPLE { ( 6 ) / ( 6 ) }
+ STORAGE_LAYOUT {
+ CONTIGUOUS
+ SIZE 24
+ OFFSET 2104
+ }
+ FILTERS {
+ NONE
+ }
+ FILLVALUE {
+ FILL_TIME H5D_FILL_TIME_IFSET
+ VALUE H5D_FILL_VALUE_DEFAULT
+ }
+ ALLOCATION_TIME {
+ H5D_ALLOC_TIME_LATE
+ }
+ }
+ DATATYPE "ext_link3" H5T_STD_I32LE;
+ GROUP "ext_link5" {
+ }
+}
+}
diff --git a/tools/test/h5repack/testfiles/textlinksrc-prune.textlinksrc.h5.ddl b/tools/test/h5repack/testfiles/textlinksrc-prune.textlinksrc.h5.ddl
new file mode 100644
index 0000000..65d35ef
--- /dev/null
+++ b/tools/test/h5repack/testfiles/textlinksrc-prune.textlinksrc.h5.ddl
@@ -0,0 +1,4 @@
+HDF5 "out-textlinksrc-prune.textlinksrc.h5" {
+GROUP "/" {
+}
+}
diff --git a/tools/test/h5repack/testfiles/textlinktar-base.textlinktar.h5.ddl b/tools/test/h5repack/testfiles/textlinktar-base.textlinktar.h5.ddl
new file mode 100644
index 0000000..3f02ff2
--- /dev/null
+++ b/tools/test/h5repack/testfiles/textlinktar-base.textlinktar.h5.ddl
@@ -0,0 +1,168 @@
+HDF5 "out-textlinktar-base.textlinktar.h5" {
+GROUP "/" {
+ DATASET "dset" {
+ DATATYPE H5T_STD_I32LE
+ DATASPACE SIMPLE { ( 6 ) / ( 6 ) }
+ STORAGE_LAYOUT {
+ CONTIGUOUS
+ SIZE 24
+ OFFSET 2048
+ }
+ FILTERS {
+ NONE
+ }
+ FILLVALUE {
+ FILL_TIME H5D_FILL_TIME_IFSET
+ VALUE H5D_FILL_VALUE_DEFAULT
+ }
+ ALLOCATION_TIME {
+ H5D_ALLOC_TIME_LATE
+ }
+ }
+ GROUP "empty_group" {
+ }
+ GROUP "group" {
+ DATASET "dset" {
+ DATATYPE H5T_STD_I32LE
+ DATASPACE SIMPLE { ( 6 ) / ( 6 ) }
+ STORAGE_LAYOUT {
+ CONTIGUOUS
+ SIZE 24
+ OFFSET 2072
+ }
+ FILTERS {
+ NONE
+ }
+ FILLVALUE {
+ FILL_TIME H5D_FILL_TIME_IFSET
+ VALUE H5D_FILL_VALUE_DEFAULT
+ }
+ ALLOCATION_TIME {
+ H5D_ALLOC_TIME_LATE
+ }
+ }
+ EXTERNAL_LINK "elink_t1" {
+ TARGETFILE "textlinksrc.h5"
+ TARGETPATH "/"
+ GROUP "/" {
+ EXTERNAL_LINK "ext2soft_link1" {
+ TARGETFILE "tsoftlinks.h5"
+ TARGETPATH "/soft_dset1"
+ DATASET "/soft_dset1" {
+ DATATYPE H5T_STD_I32BE
+ DATASPACE SIMPLE { ( 4, 2 ) / ( 4, 2 ) }
+ STORAGE_LAYOUT {
+ CONTIGUOUS
+ SIZE 32
+ OFFSET 2848
+ }
+ FILTERS {
+ NONE
+ }
+ FILLVALUE {
+ FILL_TIME H5D_FILL_TIME_IFSET
+ VALUE H5D_FILL_VALUE_DEFAULT
+ }
+ ALLOCATION_TIME {
+ H5D_ALLOC_TIME_LATE
+ }
+ }
+ }
+ EXTERNAL_LINK "ext2softdangle_link1" {
+ TARGETFILE "tsoftlinks.h5"
+ TARGETPATH "/soft_dangle"
+ }
+ EXTERNAL_LINK "ext_link1" {
+ TARGETFILE "textlinktar.h5"
+ TARGETPATH "group"
+ GROUP "group" {
+ DATASET "dset" {
+ DATATYPE H5T_STD_I32LE
+ DATASPACE SIMPLE { ( 6 ) / ( 6 ) }
+ STORAGE_LAYOUT {
+ CONTIGUOUS
+ SIZE 24
+ OFFSET 3136
+ }
+ FILTERS {
+ NONE
+ }
+ FILLVALUE {
+ FILL_TIME H5D_FILL_TIME_IFSET
+ VALUE H5D_FILL_VALUE_DEFAULT
+ }
+ ALLOCATION_TIME {
+ H5D_ALLOC_TIME_LATE
+ }
+ }
+ EXTERNAL_LINK "elink_t1" {
+ TARGETFILE "textlinksrc.h5"
+ TARGETPATH "/"
+ GROUP "/" {
+ HARDLINK "/"
+ }
+ }
+ EXTERNAL_LINK "elink_t2" {
+ TARGETFILE "textlinksrc.h5"
+ TARGETPATH "/ext_link4"
+ }
+ GROUP "subgroup" {
+ GROUP "link_to_group" {
+ HARDLINK "/group"
+ }
+ }
+ }
+ }
+ EXTERNAL_LINK "ext_link2" {
+ TARGETFILE "textlinktar.h5"
+ TARGETPATH "dset"
+ DATASET "dset" {
+ DATATYPE H5T_STD_I32LE
+ DATASPACE SIMPLE { ( 6 ) / ( 6 ) }
+ STORAGE_LAYOUT {
+ CONTIGUOUS
+ SIZE 24
+ OFFSET 3160
+ }
+ FILTERS {
+ NONE
+ }
+ FILLVALUE {
+ FILL_TIME H5D_FILL_TIME_IFSET
+ VALUE H5D_FILL_VALUE_DEFAULT
+ }
+ ALLOCATION_TIME {
+ H5D_ALLOC_TIME_LATE
+ }
+ }
+ }
+ EXTERNAL_LINK "ext_link3" {
+ TARGETFILE "textlinktar.h5"
+ TARGETPATH "type"
+ DATATYPE "type" H5T_STD_I32LE;
+ }
+ EXTERNAL_LINK "ext_link4" {
+ TARGETFILE "textlinktar.h5"
+ TARGETPATH "group/elink_t2"
+ }
+ EXTERNAL_LINK "ext_link5" {
+ TARGETFILE "textlinktar.h5"
+ TARGETPATH "empty_group"
+ GROUP "empty_group" {
+ }
+ }
+ }
+ }
+ EXTERNAL_LINK "elink_t2" {
+ TARGETFILE "textlinksrc.h5"
+ TARGETPATH "/ext_link4"
+ }
+ GROUP "subgroup" {
+ GROUP "link_to_group" {
+ HARDLINK "/group"
+ }
+ }
+ }
+ DATATYPE "type" H5T_STD_I32LE;
+}
+}
diff --git a/tools/test/h5repack/testfiles/textlinktar-merge.textlinktar.h5.tst b/tools/test/h5repack/testfiles/textlinktar-merge.textlinktar.h5.tst
new file mode 100644
index 0000000..ccf4f7b
--- /dev/null
+++ b/tools/test/h5repack/testfiles/textlinktar-merge.textlinktar.h5.tst
@@ -0,0 +1,44 @@
+
+file1 file2
+---------------------------------------
+ x x /
+ x x /dset
+ x x /empty_group
+ x x /group
+ x x /group/dset
+ x x /group/elink_t1
+ x /group/elink_t1/ext2soft_link1
+ x /group/elink_t1/ext2softdangle_link1
+ x /group/elink_t1/ext_link1
+ x /group/elink_t1/ext_link2
+ x /group/elink_t1/ext_link3
+ x /group/elink_t1/ext_link4
+ x /group/elink_t1/ext_link5
+ x x /group/elink_t2
+ x x /group/subgroup
+ x x /group/subgroup/link_to_group
+ x x /type
+
+group : </> and </>
+0 differences found
+dataset: </dset> and </dset>
+0 differences found
+group : </empty_group> and </empty_group>
+0 differences found
+group : </group> and </group>
+0 differences found
+dataset: </group/dset> and </group/dset>
+0 differences found
+Not comparable: </group/elink_t1> is of type H5G_UDLINK and </group/elink_t1> is of type H5G_GROUP
+external link: </group/elink_t2> and </group/elink_t2>
+0 differences found
+group : </group/subgroup> and </group/subgroup>
+0 differences found
+group : </group/subgroup/link_to_group> and </group/subgroup/link_to_group>
+0 differences found
+datatype: </type> and </type>
+0 differences found
+--------------------------------
+Some objects are not comparable
+--------------------------------
+Use -c for a list of objects without details of differences.
diff --git a/tools/test/h5repack/testfiles/textlinktar-mergeprune.textlinktar.h5.ddl b/tools/test/h5repack/testfiles/textlinktar-mergeprune.textlinktar.h5.ddl
new file mode 100644
index 0000000..c52e34d
--- /dev/null
+++ b/tools/test/h5repack/testfiles/textlinktar-mergeprune.textlinktar.h5.ddl
@@ -0,0 +1,200 @@
+HDF5 "out-textlinktar-mergeprune.textlinktar.h5" {
+GROUP "/" {
+ DATASET "dset" {
+ DATATYPE H5T_STD_I32LE
+ DATASPACE SIMPLE { ( 6 ) / ( 6 ) }
+ STORAGE_LAYOUT {
+ CONTIGUOUS
+ SIZE 24
+ OFFSET 2048
+ }
+ FILTERS {
+ NONE
+ }
+ FILLVALUE {
+ FILL_TIME H5D_FILL_TIME_IFSET
+ VALUE H5D_FILL_VALUE_DEFAULT
+ }
+ ALLOCATION_TIME {
+ H5D_ALLOC_TIME_LATE
+ }
+ }
+ GROUP "empty_group" {
+ }
+ GROUP "group" {
+ DATASET "dset" {
+ DATATYPE H5T_STD_I32LE
+ DATASPACE SIMPLE { ( 6 ) / ( 6 ) }
+ STORAGE_LAYOUT {
+ CONTIGUOUS
+ SIZE 24
+ OFFSET 2072
+ }
+ FILTERS {
+ NONE
+ }
+ FILLVALUE {
+ FILL_TIME H5D_FILL_TIME_IFSET
+ VALUE H5D_FILL_VALUE_DEFAULT
+ }
+ ALLOCATION_TIME {
+ H5D_ALLOC_TIME_LATE
+ }
+ }
+ GROUP "elink_t1" {
+ EXTERNAL_LINK "ext2soft_link1" {
+ TARGETFILE "tsoftlinks.h5"
+ TARGETPATH "/soft_dset1"
+ DATASET "/soft_dset1" {
+ DATATYPE H5T_STD_I32BE
+ DATASPACE SIMPLE { ( 4, 2 ) / ( 4, 2 ) }
+ STORAGE_LAYOUT {
+ CONTIGUOUS
+ SIZE 32
+ OFFSET 2848
+ }
+ FILTERS {
+ NONE
+ }
+ FILLVALUE {
+ FILL_TIME H5D_FILL_TIME_IFSET
+ VALUE H5D_FILL_VALUE_DEFAULT
+ }
+ ALLOCATION_TIME {
+ H5D_ALLOC_TIME_LATE
+ }
+ }
+ }
+ EXTERNAL_LINK "ext2softdangle_link1" {
+ TARGETFILE "tsoftlinks.h5"
+ TARGETPATH "/soft_dangle"
+ }
+ EXTERNAL_LINK "ext_link1" {
+ TARGETFILE "textlinktar.h5"
+ TARGETPATH "group"
+ GROUP "group" {
+ DATASET "dset" {
+ DATATYPE H5T_STD_I32LE
+ DATASPACE SIMPLE { ( 6 ) / ( 6 ) }
+ STORAGE_LAYOUT {
+ CONTIGUOUS
+ SIZE 24
+ OFFSET 3136
+ }
+ FILTERS {
+ NONE
+ }
+ FILLVALUE {
+ FILL_TIME H5D_FILL_TIME_IFSET
+ VALUE H5D_FILL_VALUE_DEFAULT
+ }
+ ALLOCATION_TIME {
+ H5D_ALLOC_TIME_LATE
+ }
+ }
+ EXTERNAL_LINK "elink_t1" {
+ TARGETFILE "textlinksrc.h5"
+ TARGETPATH "/"
+ GROUP "/" {
+ EXTERNAL_LINK "ext2soft_link1" {
+ TARGETFILE "tsoftlinks.h5"
+ TARGETPATH "/soft_dset1"
+ DATASET "/soft_dset1" {
+ HARDLINK "/dset1"
+ }
+ }
+ EXTERNAL_LINK "ext2softdangle_link1" {
+ TARGETFILE "tsoftlinks.h5"
+ TARGETPATH "/soft_dangle"
+ }
+ EXTERNAL_LINK "ext_link1" {
+ TARGETFILE "textlinktar.h5"
+ TARGETPATH "group"
+ GROUP "group" {
+ HARDLINK "/group"
+ }
+ }
+ EXTERNAL_LINK "ext_link2" {
+ TARGETFILE "textlinktar.h5"
+ TARGETPATH "dset"
+ DATASET "dset" {
+ DATATYPE H5T_STD_I32LE
+ DATASPACE SIMPLE { ( 6 ) / ( 6 ) }
+ STORAGE_LAYOUT {
+ CONTIGUOUS
+ SIZE 24
+ OFFSET 3160
+ }
+ FILTERS {
+ NONE
+ }
+ FILLVALUE {
+ FILL_TIME H5D_FILL_TIME_IFSET
+ VALUE H5D_FILL_VALUE_DEFAULT
+ }
+ ALLOCATION_TIME {
+ H5D_ALLOC_TIME_LATE
+ }
+ }
+ }
+ EXTERNAL_LINK "ext_link3" {
+ TARGETFILE "textlinktar.h5"
+ TARGETPATH "type"
+ DATATYPE "type" H5T_STD_I32LE;
+ }
+ EXTERNAL_LINK "ext_link4" {
+ TARGETFILE "textlinktar.h5"
+ TARGETPATH "group/elink_t2"
+ }
+ EXTERNAL_LINK "ext_link5" {
+ TARGETFILE "textlinktar.h5"
+ TARGETPATH "empty_group"
+ GROUP "empty_group" {
+ }
+ }
+ }
+ }
+ EXTERNAL_LINK "elink_t2" {
+ TARGETFILE "textlinksrc.h5"
+ TARGETPATH "/ext_link4"
+ }
+ GROUP "subgroup" {
+ GROUP "link_to_group" {
+ HARDLINK "/group"
+ }
+ }
+ }
+ }
+ EXTERNAL_LINK "ext_link2" {
+ TARGETFILE "textlinktar.h5"
+ TARGETPATH "dset"
+ DATASET "dset" {
+ HARDLINK "/dset"
+ }
+ }
+ EXTERNAL_LINK "ext_link3" {
+ TARGETFILE "textlinktar.h5"
+ TARGETPATH "type"
+ DATATYPE "type" HARDLINK "/type"
+ }
+ EXTERNAL_LINK "ext_link4" {
+ TARGETFILE "textlinktar.h5"
+ TARGETPATH "group/elink_t2"
+ }
+ EXTERNAL_LINK "ext_link5" {
+ TARGETFILE "textlinktar.h5"
+ TARGETPATH "empty_group"
+ GROUP "empty_group" {
+ HARDLINK "/empty_group"
+ }
+ }
+ }
+ GROUP "subgroup" {
+ GROUP "link_to_group" {
+ HARDLINK "/group"
+ }
+ }
+ }
+ DATATYPE "type" H5T_STD_I32LE;
+}
+}
diff --git a/tools/test/h5repack/testfiles/textlinktar-prune.textlinktar.h5.ddl b/tools/test/h5repack/testfiles/textlinktar-prune.textlinktar.h5.ddl
new file mode 100644
index 0000000..6787784
--- /dev/null
+++ b/tools/test/h5repack/testfiles/textlinktar-prune.textlinktar.h5.ddl
@@ -0,0 +1,52 @@
+HDF5 "out-textlinktar-prune.textlinktar.h5" {
+GROUP "/" {
+ DATASET "dset" {
+ DATATYPE H5T_STD_I32LE
+ DATASPACE SIMPLE { ( 6 ) / ( 6 ) }
+ STORAGE_LAYOUT {
+ CONTIGUOUS
+ SIZE 24
+ OFFSET 2048
+ }
+ FILTERS {
+ NONE
+ }
+ FILLVALUE {
+ FILL_TIME H5D_FILL_TIME_IFSET
+ VALUE H5D_FILL_VALUE_DEFAULT
+ }
+ ALLOCATION_TIME {
+ H5D_ALLOC_TIME_LATE
+ }
+ }
+ GROUP "empty_group" {
+ }
+ GROUP "group" {
+ DATASET "dset" {
+ DATATYPE H5T_STD_I32LE
+ DATASPACE SIMPLE { ( 6 ) / ( 6 ) }
+ STORAGE_LAYOUT {
+ CONTIGUOUS
+ SIZE 24
+ OFFSET 2072
+ }
+ FILTERS {
+ NONE
+ }
+ FILLVALUE {
+ FILL_TIME H5D_FILL_TIME_IFSET
+ VALUE H5D_FILL_VALUE_DEFAULT
+ }
+ ALLOCATION_TIME {
+ H5D_ALLOC_TIME_LATE
+ }
+ }
+ GROUP "subgroup" {
+ GROUP "link_to_group" {
+ HARDLINK "/group"
+ }
+ }
+ }
+ DATATYPE "type" H5T_STD_I32LE;
+}
+}
diff --git a/tools/test/h5repack/testfiles/tsoftlinks-base.tsoftlinks.h5.ddl b/tools/test/h5repack/testfiles/tsoftlinks-base.tsoftlinks.h5.ddl
new file mode 100644
index 0000000..b0cd32d
--- /dev/null
+++ b/tools/test/h5repack/testfiles/tsoftlinks-base.tsoftlinks.h5.ddl
@@ -0,0 +1,77 @@
+HDF5 "out-tsoftlinks-base.tsoftlinks.h5" {
+GROUP "/" {
+ DATASET "dset1" {
+ DATATYPE H5T_STD_I32BE
+ DATASPACE SIMPLE { ( 4, 2 ) / ( 4, 2 ) }
+ STORAGE_LAYOUT {
+ CONTIGUOUS
+ SIZE 32
+ 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_I32BE
+ DATASPACE SIMPLE { ( 4, 2 ) / ( 4, 2 ) }
+ STORAGE_LAYOUT {
+ CONTIGUOUS
+ SIZE 32
+ OFFSET 2080
+ }
+ FILTERS {
+ NONE
+ }
+ FILLVALUE {
+ FILL_TIME H5D_FILL_TIME_IFSET
+ VALUE H5D_FILL_VALUE_DEFAULT
+ }
+ ALLOCATION_TIME {
+ H5D_ALLOC_TIME_LATE
+ }
+ }
+ DATATYPE "dtype" H5T_STD_I32BE;
+ GROUP "group1" {
+ SOFTLINK "soft_dangle" {
+ LINKTARGET "not_yet"
+ }
+ SOFTLINK "soft_dset1" {
+ LINKTARGET "/dset1"
+ }
+ SOFTLINK "soft_dset2" {
+ LINKTARGET "/dset2"
+ }
+ SOFTLINK "soft_dtype" {
+ LINKTARGET "/dtype"
+ }
+ SOFTLINK "soft_empty_grp" {
+ LINKTARGET "/group_empty"
+ }
+ }
+ GROUP "group_empty" {
+ }
+ SOFTLINK "soft_dangle" {
+ LINKTARGET "not_yet"
+ }
+ SOFTLINK "soft_dset1" {
+ LINKTARGET "/dset1"
+ }
+ SOFTLINK "soft_dtype" {
+ LINKTARGET "/dtype"
+ }
+ SOFTLINK "soft_empty_grp" {
+ LINKTARGET "/group_empty"
+ }
+ SOFTLINK "soft_group1" {
+ LINKTARGET "/group1"
+ }
+}
+}
diff --git a/tools/test/h5repack/testfiles/tsoftlinks-merge.tsoftlinks.h5.tst b/tools/test/h5repack/testfiles/tsoftlinks-merge.tsoftlinks.h5.tst
new file mode 100644
index 0000000..27c33d7
--- /dev/null
+++ b/tools/test/h5repack/testfiles/tsoftlinks-merge.tsoftlinks.h5.tst
@@ -0,0 +1,53 @@
+
+file1 file2
+---------------------------------------
+ x x /
+ x x /dset1
+ x x /dset2
+ x x /dtype
+ x x /group1
+ x x /group1/soft_dangle
+ x x /group1/soft_dset1
+ x x /group1/soft_dset2
+ x x /group1/soft_dtype
+ x x /group1/soft_empty_grp
+ x x /group_empty
+ x x /soft_dangle
+ x x /soft_dset1
+ x x /soft_dtype
+ x x /soft_empty_grp
+ x x /soft_group1
+ x /soft_group1/soft_dangle
+ x /soft_group1/soft_dset1
+ x /soft_group1/soft_dset2
+ x /soft_group1/soft_dtype
+ x /soft_group1/soft_empty_grp
+
+group : </> and </>
+0 differences found
+dataset: </dset1> and </dset1>
+0 differences found
+dataset: </dset2> and </dset2>
+0 differences found
+datatype: </dtype> and </dtype>
+0 differences found
+group : </group1> and </group1>
+0 differences found
+link : </group1/soft_dangle> and </group1/soft_dangle>
+0 differences found
+Not comparable: </group1/soft_dset1> is of type H5G_LINK and </group1/soft_dset1> is of type H5G_DATASET
+Not comparable: </group1/soft_dset2> is of type H5G_LINK and </group1/soft_dset2> is of type H5G_DATASET
+Not comparable: </group1/soft_dtype> is of type H5G_LINK and </group1/soft_dtype> is of type H5G_TYPE
+Not comparable: </group1/soft_empty_grp> is of type H5G_LINK and </group1/soft_empty_grp> is of type H5G_GROUP
+group : </group_empty> and </group_empty>
+0 differences found
+link : </soft_dangle> and </soft_dangle>
+0 differences found
+Not comparable: </soft_dset1> is of type H5G_LINK and </soft_dset1> is of type H5G_DATASET
+Not comparable: </soft_dtype> is of type H5G_LINK and </soft_dtype> is of type H5G_TYPE
+Not comparable: </soft_empty_grp> is of type H5G_LINK and </soft_empty_grp> is of type H5G_GROUP
+Not comparable: </soft_group1> is of type H5G_LINK and </soft_group1> is of type H5G_GROUP
+--------------------------------
+Some objects are not comparable
+--------------------------------
+Use -c for a list of objects without details of differences.
diff --git a/tools/test/h5repack/testfiles/tsoftlinks-mergeprune.tsoftlinks.h5.ddl b/tools/test/h5repack/testfiles/tsoftlinks-mergeprune.tsoftlinks.h5.ddl
new file mode 100644
index 0000000..fa4e12d
--- /dev/null
+++ b/tools/test/h5repack/testfiles/tsoftlinks-mergeprune.tsoftlinks.h5.ddl
@@ -0,0 +1,127 @@
+HDF5 "out-tsoftlinks-mergeprune.tsoftlinks.h5" {
+GROUP "/" {
+ DATASET "dset1" {
+ DATATYPE H5T_STD_I32BE
+ DATASPACE SIMPLE { ( 4, 2 ) / ( 4, 2 ) }
+ STORAGE_LAYOUT {
+ CONTIGUOUS
+ SIZE 32
+ 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_I32BE
+ DATASPACE SIMPLE { ( 4, 2 ) / ( 4, 2 ) }
+ STORAGE_LAYOUT {
+ CONTIGUOUS
+ SIZE 32
+ OFFSET 2080
+ }
+ FILTERS {
+ NONE
+ }
+ FILLVALUE {
+ FILL_TIME H5D_FILL_TIME_IFSET
+ VALUE H5D_FILL_VALUE_DEFAULT
+ }
+ ALLOCATION_TIME {
+ H5D_ALLOC_TIME_LATE
+ }
+ }
+ DATATYPE "dtype" H5T_STD_I32BE;
+ GROUP "group1" {
+ DATASET "soft_dset1" {
+ DATATYPE H5T_STD_I32BE
+ DATASPACE SIMPLE { ( 4, 2 ) / ( 4, 2 ) }
+ STORAGE_LAYOUT {
+ CONTIGUOUS
+ SIZE 32
+ OFFSET 2112
+ }
+ FILTERS {
+ NONE
+ }
+ FILLVALUE {
+ FILL_TIME H5D_FILL_TIME_IFSET
+ VALUE H5D_FILL_VALUE_DEFAULT
+ }
+ ALLOCATION_TIME {
+ H5D_ALLOC_TIME_LATE
+ }
+ }
+ DATASET "soft_dset2" {
+ DATATYPE H5T_STD_I32BE
+ DATASPACE SIMPLE { ( 4, 2 ) / ( 4, 2 ) }
+ STORAGE_LAYOUT {
+ CONTIGUOUS
+ SIZE 32
+ OFFSET 2144
+ }
+ FILTERS {
+ NONE
+ }
+ FILLVALUE {
+ FILL_TIME H5D_FILL_TIME_IFSET
+ VALUE H5D_FILL_VALUE_DEFAULT
+ }
+ ALLOCATION_TIME {
+ H5D_ALLOC_TIME_LATE
+ }
+ }
+ DATATYPE "soft_dtype" H5T_STD_I32BE;
+ GROUP "soft_empty_grp" {
+ }
+ }
+ GROUP "group_empty" {
+ }
+ DATASET "soft_dset1" {
+ DATATYPE H5T_STD_I32BE
+ DATASPACE SIMPLE { ( 4, 2 ) / ( 4, 2 ) }
+ STORAGE_LAYOUT {
+ CONTIGUOUS
+ SIZE 32
+ OFFSET 2176
+ }
+ FILTERS {
+ NONE
+ }
+ FILLVALUE {
+ FILL_TIME H5D_FILL_TIME_IFSET
+ VALUE H5D_FILL_VALUE_DEFAULT
+ }
+ ALLOCATION_TIME {
+ H5D_ALLOC_TIME_LATE
+ }
+ }
+ DATATYPE "soft_dtype" H5T_STD_I32BE;
+ GROUP "soft_empty_grp" {
+ }
+ GROUP "soft_group1" {
+ SOFTLINK "soft_dangle" {
+ LINKTARGET "not_yet"
+ }
+ SOFTLINK "soft_dset1" {
+ LINKTARGET "/dset1"
+ }
+ SOFTLINK "soft_dset2" {
+ LINKTARGET "/dset2"
+ }
+ SOFTLINK "soft_dtype" {
+ LINKTARGET "/dtype"
+ }
+ SOFTLINK "soft_empty_grp" {
+ LINKTARGET "/group_empty"
+ }
+ }
+}
+}
diff --git a/tools/test/h5repack/testfiles/tsoftlinks-prune.tsoftlinks.h5.ddl b/tools/test/h5repack/testfiles/tsoftlinks-prune.tsoftlinks.h5.ddl
new file mode 100644
index 0000000..de58ef2
--- /dev/null
+++ b/tools/test/h5repack/testfiles/tsoftlinks-prune.tsoftlinks.h5.ddl
@@ -0,0 +1,47 @@
+HDF5 "out-tsoftlinks-prune.tsoftlinks.h5" {
+GROUP "/" {
+ DATASET "dset1" {
+ DATATYPE H5T_STD_I32BE
+ DATASPACE SIMPLE { ( 4, 2 ) / ( 4, 2 ) }
+ STORAGE_LAYOUT {
+ CONTIGUOUS
+ SIZE 32
+ 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_I32BE
+ DATASPACE SIMPLE { ( 4, 2 ) / ( 4, 2 ) }
+ STORAGE_LAYOUT {
+ CONTIGUOUS
+ SIZE 32
+ OFFSET 2080
+ }
+ FILTERS {
+ NONE
+ }
+ FILLVALUE {
+ FILL_TIME H5D_FILL_TIME_IFSET
+ VALUE H5D_FILL_VALUE_DEFAULT
+ }
+ ALLOCATION_TIME {
+ H5D_ALLOC_TIME_LATE
+ }
+ }
+ DATATYPE "dtype" H5T_STD_I32BE;
+ GROUP "group1" {
+ }
+ GROUP "group_empty" {
+ }
+}
+}
diff --git a/tools/test/h5stat/CMakeLists.txt b/tools/test/h5stat/CMakeLists.txt
index 5c17fd5..f50a747 100644
--- a/tools/test/h5stat/CMakeLists.txt
+++ b/tools/test/h5stat/CMakeLists.txt
@@ -1,4 +1,4 @@
-cmake_minimum_required (VERSION 3.10)
+cmake_minimum_required (VERSION 3.12)
project (HDF5_TOOLS_TEST_H5STAT C)
# --------------------------------------------------------------------
@@ -14,4 +14,6 @@ if (HDF5_BUILD_GENERATORS AND NOT ONLY_SHARED_LIBS)
#add_test (NAME h5stat_gentest COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} $<TARGET_FILE:h5stat_gentest>)
endif ()
-include (CMakeTests.cmake)
+if (HDF5_TEST_TOOLS AND HDF5_TEST_SERIAL)
+ include (CMakeTests.cmake)
+endif ()
diff --git a/tools/test/h5stat/CMakeTests.cmake b/tools/test/h5stat/CMakeTests.cmake
index 9674a77..0c07418 100644
--- a/tools/test/h5stat/CMakeTests.cmake
+++ b/tools/test/h5stat/CMakeTests.cmake
@@ -93,16 +93,10 @@
##############################################################################
##############################################################################
- if (NOT BUILD_SHARED_LIBS)
- set (tgt_ext "")
- else ()
- set (tgt_ext "-shared")
- endif ()
-
macro (ADD_H5_TEST resultfile resultcode)
# If using memchecker add tests without using scripts
if (HDF5_ENABLE_USING_MEMCHECKER)
- add_test (NAME H5STAT-${resultfile} COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} $<TARGET_FILE:h5stat${tgt_ext}> ${ARGN})
+ add_test (NAME H5STAT-${resultfile} COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} $<TARGET_FILE:h5stat${tgt_file_ext}> ${ARGN})
if (${resultcode})
set_tests_properties (H5STAT-${resultfile} PROPERTIES WILL_FAIL "true")
endif ()
@@ -111,7 +105,7 @@
NAME H5STAT-${resultfile}
COMMAND "${CMAKE_COMMAND}"
-D "TEST_EMULATOR=${CMAKE_CROSSCOMPILING_EMULATOR}"
- -D "TEST_PROGRAM=$<TARGET_FILE:h5stat${tgt_ext}>"
+ -D "TEST_PROGRAM=$<TARGET_FILE:h5stat${tgt_file_ext}>"
-D "TEST_ARGS=${ARGN}"
-D "TEST_FOLDER=${PROJECT_BINARY_DIR}"
-D "TEST_OUTPUT=${resultfile}.out"
@@ -125,7 +119,7 @@
macro (ADD_H5_ERR_TEST resultfile resultcode)
# If using memchecker add tests without using scripts
if (HDF5_ENABLE_USING_MEMCHECKER)
- add_test (NAME H5STAT-${resultfile} COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} $<TARGET_FILE:h5stat${tgt_ext}> ${ARGN})
+ add_test (NAME H5STAT-${resultfile} COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} $<TARGET_FILE:h5stat${tgt_file_ext}> ${ARGN})
if (${resultcode})
set_tests_properties (H5STAT-${resultfile} PROPERTIES WILL_FAIL "true")
endif ()
@@ -134,7 +128,7 @@
NAME H5STAT-${resultfile}
COMMAND "${CMAKE_COMMAND}"
-D "TEST_EMULATOR=${CMAKE_CROSSCOMPILING_EMULATOR}"
- -D "TEST_PROGRAM=$<TARGET_FILE:h5stat${tgt_ext}>"
+ -D "TEST_PROGRAM=$<TARGET_FILE:h5stat${tgt_file_ext}>"
-D "TEST_ARGS=${ARGN}"
-D "TEST_FOLDER=${PROJECT_BINARY_DIR}"
-D "TEST_OUTPUT=${resultfile}.out"
diff --git a/tools/test/h5stat/Makefile.in b/tools/test/h5stat/Makefile.in
index 76e99f9..a3bd057 100644
--- a/tools/test/h5stat/Makefile.in
+++ b/tools/test/h5stat/Makefile.in
@@ -414,15 +414,15 @@ AMTAR = @AMTAR@
# H5_CFLAGS holds flags that should be used when building hdf5,
# but which should not be exported to h5cc for building other programs.
-# AM_CFLAGS is an automake construct which should be used by Makefiles
+# AM_CFLAGS is an automake construct which should be used by Makefiles
# instead of CFLAGS, as CFLAGS is reserved solely for the user to define.
# This applies to FCFLAGS, CXXFLAGS, CPPFLAGS, and LDFLAGS as well.
-AM_CFLAGS = @AM_CFLAGS@ @H5_CFLAGS@
+AM_CFLAGS = @AM_CFLAGS@ @H5_CFLAGS@ @H5_ECFLAGS@
# Include src directory
AM_CPPFLAGS = @AM_CPPFLAGS@ @H5_CPPFLAGS@ -I$(top_srcdir)/src \
-I$(top_srcdir)/tools/lib
-AM_CXXFLAGS = @AM_CXXFLAGS@ @H5_CXXFLAGS@
+AM_CXXFLAGS = @AM_CXXFLAGS@ @H5_CXXFLAGS@ @H5_ECXXFLAGS@
AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
AM_FCFLAGS = @AM_FCFLAGS@ @H5_FCFLAGS@
AM_JAVACFLAGS = @AM_JAVACFLAGS@
@@ -442,6 +442,7 @@ CC = @CC@
CCDEPMODE = @CCDEPMODE@
CC_VERSION = @CC_VERSION@
CFLAGS = @CFLAGS@
+CLANG_SANITIZE_CHECKS = @CLANG_SANITIZE_CHECKS@
CODESTACK = @CODESTACK@
CONFIG_DATE = @CONFIG_DATE@
CONFIG_MODE = @CONFIG_MODE@
@@ -458,6 +459,7 @@ DEFAULT_API_VERSION = @DEFAULT_API_VERSION@
DEFS = @DEFS@
DEPDIR = @DEPDIR@
DEPRECATED_SYMBOLS = @DEPRECATED_SYMBOLS@
+DESIRED_FILE_LOCKING = @DESIRED_FILE_LOCKING@
DEV_WARNINGS = @DEV_WARNINGS@
DIRECT_VFD = @DIRECT_VFD@
DLLTOOL = @DLLTOOL@
@@ -494,8 +496,11 @@ H5_CFLAGS = @H5_CFLAGS@
H5_CLASSPATH = @H5_CLASSPATH@
H5_CPPFLAGS = @H5_CPPFLAGS@
H5_CXXFLAGS = @H5_CXXFLAGS@
+H5_ECFLAGS = @H5_ECFLAGS@
+H5_ECXXFLAGS = @H5_ECXXFLAGS@
H5_FCFLAGS = @H5_FCFLAGS@
H5_FORTRAN_SHARED = @H5_FORTRAN_SHARED@
+H5_IS_DARWIN = @H5_IS_DARWIN@
H5_JAVACFLAGS = @H5_JAVACFLAGS@
H5_JAVAFLAGS = @H5_JAVAFLAGS@
H5_JNIFLAGS = @H5_JNIFLAGS@
@@ -518,6 +523,7 @@ HL = @HL@
HL_FOR = @HL_FOR@
HSIZE_T = @HSIZE_T@
HSSIZE_T = @HSSIZE_T@
+IGNORE_DISABLED_FILE_LOCKS = @IGNORE_DISABLED_FILE_LOCKS@
INSTALL = @INSTALL@
INSTALL_DATA = @INSTALL_DATA@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
@@ -554,6 +560,7 @@ MAINT = @MAINT@
MAKEINFO = @MAKEINFO@
MANIFEST_TOOL = @MANIFEST_TOOL@
MEMORYALLOCSANITYCHECK = @MEMORYALLOCSANITYCHECK@
+MIRROR_VFD = @MIRROR_VFD@
MKDIR_P = @MKDIR_P@
MPE = @MPE@
NM = @NM@
@@ -613,6 +620,7 @@ TIME = @TIME@
TR = @TR@
TRACE_API = @TRACE_API@
UNAME_INFO = @UNAME_INFO@
+USE_FILE_LOCKING = @USE_FILE_LOCKING@
USE_FILTER_DEFLATE = @USE_FILTER_DEFLATE@
USE_FILTER_SZIP = @USE_FILTER_SZIP@
USINGMEMCHECKER = @USINGMEMCHECKER@
@@ -648,6 +656,7 @@ docdir = $(exec_prefix)/doc
dvidir = @dvidir@
enable_shared = @enable_shared@
enable_static = @enable_static@
+examplesdir = @examplesdir@
exec_prefix = @exec_prefix@
fortran_linux_linker_option = @fortran_linux_linker_option@
host = @host@
@@ -704,15 +713,15 @@ LIBH5_HL = $(top_builddir)/hl/src/libhdf5_hl.la
LIBH5F_HL = $(top_builddir)/hl/fortran/src/libhdf5hl_fortran.la
LIBH5CPP_HL = $(top_builddir)/hl/c++/src/libhdf5_hl_cpp.la
-# Note that in svn revision 19400 the '/' after DESTDIR in H5* variables below
-# has been removed. According to the official description of DESTDIR by Gnu at
-# http://www.gnu.org/prep/standards/html_node/DESTDIR.html, DESTDIR is
-# prepended to the normal and complete install path that it precedes for the
-# purpose of installing in a temporary directory which is useful for building
-# rpms and other packages. The '/' after ${DESTDIR} will be followed by another
-# '/' at the beginning of the normal install path. When DESTDIR is empty the
-# path then begins with '//', which is incorrect and causes problems at least for
-# Cygwin.
+# Note that in svn revision 19400 the '/' after DESTDIR in H5* variables below
+# has been removed. According to the official description of DESTDIR by Gnu at
+# http://www.gnu.org/prep/standards/html_node/DESTDIR.html, DESTDIR is
+# prepended to the normal and complete install path that it precedes for the
+# purpose of installing in a temporary directory which is useful for building
+# rpms and other packages. The '/' after ${DESTDIR} will be followed by another
+# '/' at the beginning of the normal install path. When DESTDIR is empty the
+# path then begins with '//', which is incorrect and causes problems at least for
+# Cygwin.
# Scripts used to build examples
# If only shared libraries have been installed, have h5cc build examples with
@@ -764,7 +773,7 @@ LIB = $(lib_LIBRARIES) $(lib_LTLIBRARIES) $(noinst_LIBRARIES) \
PROGS = $(bin_PROGRAMS) $(bin_SCRIPTS) $(noinst_PROGRAMS) $(noinst_SCRIPTS) \
$(EXTRA_PROG)
-chk_TESTS = $(check_PROGRAMS) $(check_SCRIPTS) $(EXTRA_TEST)
+chk_TESTS = $(check_PROGRAMS) $(check_SCRIPTS) $(EXTRA_TEST)
TEST_EXTENSIONS = .sh
SH_LOG_COMPILER = $(SHELL)
AM_SH_LOG_FLAGS =
@@ -1330,28 +1339,37 @@ $(TEST_PROG_CHKEXE) $(TEST_PROG_PARA_CHKEXE) dummy.chkexe_:
echo "============================" > $${log}; \
fi; \
if test "X$(FORTRAN_API)" = "Xyes"; then \
- echo "Fortran API: Testing $(HDF5_DRIVER) $${tname} $(TEST_FLAGS)"; \
+ echo "Fortran API: Testing $${tname} $(TEST_FLAGS)"; \
if test -n "$(REALTIMEOUTPUT)"; then \
- echo "Fortran API: $(HDF5_DRIVER) $${tname} $(TEST_FLAGS) Test Log" | tee -a $${log}; \
+ echo "Fortran API: Test log for $${tname} $(TEST_FLAGS)" | tee -a $${log}; \
else \
- echo "Fortran API: $(HDF5_DRIVER) $${tname} $(TEST_FLAGS) Test Log" >> $${log}; \
+ echo "Fortran API: Test log for $${tname} $(TEST_FLAGS)" >> $${log}; \
fi; \
elif test "X$(CXX_API)" = "Xyes"; then \
- echo "C++ API: Testing $(HDF5_DRIVER) $${tname} $(TEST_FLAGS)"; \
+ echo "C++ API: Testing $${tname} $(TEST_FLAGS)"; \
if test -n "$(REALTIMEOUTPUT)"; then \
- echo "C++ API: $(HDF5_DRIVER) $${tname} $(TEST_FLAGS) Test Log" | tee -a $${log};\
+ echo "C++ API: Test log for $${tname} $(TEST_FLAGS)" | tee -a $${log};\
else \
- echo "C++ API: $(HDF5_DRIVER) $${tname} $(TEST_FLAGS) Test Log" >> $${log};\
+ echo "C++ API: Test log for $${tname} $(TEST_FLAGS)" >> $${log};\
fi; \
else \
- echo "Testing $(HDF5_DRIVER) $${tname} $(TEST_FLAGS)"; \
+ echo "Testing: $${tname} $(TEST_FLAGS)"; \
if test -n "$(REALTIMEOUTPUT)"; then \
- echo "$(HDF5_DRIVER) $${tname} $(TEST_FLAGS) Test Log" | tee -a $${log}; \
+ echo "Test log for $${tname} $(TEST_FLAGS)" | tee -a $${log}; \
else \
- echo "$(HDF5_DRIVER) $${tname} $(TEST_FLAGS) Test Log" >> $${log}; \
+ echo "Test log for $${tname} $(TEST_FLAGS)" >> $${log}; \
fi; \
fi; \
if test -n "$(REALTIMEOUTPUT)"; then \
+ if test -n "$(HDF5_DRIVER)"; then \
+ echo "Virtual file driver (VFD): $(HDF5_DRIVER)" | tee -a $${log}; \
+ fi; \
+ else \
+ if test -n "$(HDF5_DRIVER)"; then \
+ echo "Virtual file driver (VFD): $(HDF5_DRIVER)" >> $${log}; \
+ fi; \
+ fi; \
+ if test -n "$(REALTIMEOUTPUT)"; then \
echo "============================" | tee -a $${log}; \
else \
echo "============================" >> $${log}; \
diff --git a/tools/test/h5stat/h5stat_gentest.c b/tools/test/h5stat/h5stat_gentest.c
index 2edfcf6..0bf1001 100644
--- a/tools/test/h5stat/h5stat_gentest.c
+++ b/tools/test/h5stat/h5stat_gentest.c
@@ -54,14 +54,14 @@
static void
gen_newgrat_file(const char *fname)
{
- hid_t fcpl = -1; /* File creation property */
- hid_t fapl = -1; /* File access property */
- hid_t fid = -1; /* File id */
- hid_t gid = -1; /* Group id */
- hid_t tid = -1; /* Datatype id */
- hid_t sid = -1; /* Dataspace id */
- hid_t attr_id = -1; /* Attribute id */
- hid_t did = -1; /* Dataset id */
+ hid_t fcpl = H5I_INVALID_HID; /* File creation property */
+ hid_t fapl = H5I_INVALID_HID; /* File access property */
+ hid_t fid = H5I_INVALID_HID; /* File id */
+ hid_t gid = H5I_INVALID_HID; /* Group id */
+ hid_t tid = H5I_INVALID_HID; /* Datatype id */
+ hid_t sid = H5I_INVALID_HID; /* Dataspace id */
+ hid_t attr_id = H5I_INVALID_HID; /* Attribute id */
+ hid_t did = H5I_INVALID_HID; /* Dataset id */
char name[30]; /* Group name */
char attrname[30]; /* Attribute name */
int i; /* Local index variable */
@@ -139,15 +139,15 @@ error:
static void
gen_threshold_file(const char *fname)
{
- hid_t fid = -1; /* File ID */
- hid_t sid0 = -1; /* Dataspace IDs */
- hid_t sid1 = -1; /* Dataspace IDs */
- hid_t sid2 = -1; /* Dataspace IDs */
- hid_t sid3 = -1; /* Dataspace IDs */
- hid_t sid4 = -1; /* Dataspace IDs */
- hid_t did = -1; /* Dataset ID */
- hid_t attr_id = -1; /* Attribute ID */
- hid_t gid = -1; /* Group ID */
+ hid_t fid = H5I_INVALID_HID; /* File ID */
+ hid_t sid0 = H5I_INVALID_HID; /* Dataspace IDs */
+ hid_t sid1 = H5I_INVALID_HID; /* Dataspace IDs */
+ hid_t sid2 = H5I_INVALID_HID; /* Dataspace IDs */
+ hid_t sid3 = H5I_INVALID_HID; /* Dataspace IDs */
+ hid_t sid4 = H5I_INVALID_HID; /* Dataspace IDs */
+ hid_t did = H5I_INVALID_HID; /* Dataset ID */
+ hid_t attr_id = H5I_INVALID_HID; /* Attribute ID */
+ hid_t gid = H5I_INVALID_HID; /* Group ID */
hsize_t two_dims[] = {2, 5}; /* Dimension array */
hsize_t one_dims[] = {6}; /* Dimension array */
hsize_t zero_dims[] = {0}; /* Dimension array */
@@ -323,11 +323,11 @@ error:
static void
gen_idx_file(const char *fname)
{
- hid_t fapl = -1; /* file access property id */
- hid_t fid = -1; /* file id */
- hid_t sid = -1; /* space id */
- hid_t dcpl = -1; /* dataset creation property id */
- hid_t did = -1, did2 = -1; /* dataset id */
+ hid_t fapl = H5I_INVALID_HID; /* file access property id */
+ hid_t fid = H5I_INVALID_HID; /* file id */
+ hid_t sid = H5I_INVALID_HID; /* space id */
+ hid_t dcpl = H5I_INVALID_HID; /* dataset creation property id */
+ hid_t did = -1, did2 = H5I_INVALID_HID; /* dataset id */
hsize_t dims[1] = {10}; /* dataset dimension */
hsize_t c_dims[1] = {2}; /* chunk dimension */
int i; /* local index variable */
@@ -413,12 +413,12 @@ error:
static void
gen_err_refcount(const char *fname)
{
- hid_t fid = -1; /* File identifier */
- hid_t sid = -1; /* Dataspace message */
- hid_t did = -1; /* Dataset identifier */
- hid_t gid = -1; /* Group identifier */
- hid_t aid1 = -1, aid2 = -1; /* Attribute identifier */
- hid_t tid = -1; /* Datatype identifier */
+ hid_t fid = H5I_INVALID_HID; /* File identifier */
+ hid_t sid = H5I_INVALID_HID; /* Dataspace message */
+ hid_t did = H5I_INVALID_HID; /* Dataset identifier */
+ hid_t gid = H5I_INVALID_HID; /* Group identifier */
+ hid_t aid1 = -1, aid2 = H5I_INVALID_HID; /* Attribute identifier */
+ hid_t tid = H5I_INVALID_HID; /* Datatype identifier */
int i, n; /* Local index variables */
int buf[10]; /* Data buffer */
hsize_t dims[1]; /* Dimension size */
diff --git a/tools/test/misc/CMakeLists.txt b/tools/test/misc/CMakeLists.txt
index a250222..8f13d84 100644
--- a/tools/test/misc/CMakeLists.txt
+++ b/tools/test/misc/CMakeLists.txt
@@ -1,4 +1,4 @@
-cmake_minimum_required (VERSION 3.10)
+cmake_minimum_required (VERSION 3.12)
project (HDF5_TOOLS_TEST_MISC C)
# --------------------------------------------------------------------
@@ -18,7 +18,7 @@ if (HDF5_BUILD_GENERATORS AND NOT ONLY_SHARED_LIBS)
#add_test (NAME h5repart_gentest COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} $<TARGET_FILE:h5repart_gentest>)
add_executable (h5clear_gentest ${HDF5_TOOLS_TEST_MISC_SOURCE_DIR}/h5clear_gentest.c)
- target_include_directories (h5clear_gentest PRIVATE "${HDF5_SRC_DIR};${HDF5_BINARY_DIR};$<$<BOOL:${HDF5_ENABLE_PARALLEL}>:${MPI_C_INCLUDE_DIRS}>")
+ target_include_directories (h5clear_gentest PRIVATE "${HDF5_SRC_DIR};${HDF5_TEST_SRC_DIR};${HDF5_BINARY_DIR};$<$<BOOL:${HDF5_ENABLE_PARALLEL}>:${MPI_C_INCLUDE_DIRS}>")
if (NOT ONLY_SHARED_LIBS)
TARGET_C_PROPERTIES (h5clear_gentest STATIC)
target_link_libraries (h5clear_gentest PRIVATE ${HDF5_TOOLS_LIB_TARGET} ${HDF5_TEST_LIB_TARGET})
@@ -55,6 +55,8 @@ else ()
endif ()
set_target_properties (clear_open_chk PROPERTIES FOLDER tools)
-include (CMakeTestsRepart.cmake)
-include (CMakeTestsClear.cmake)
-include (CMakeTestsMkgrp.cmake)
+if (HDF5_TEST_SERIAL)
+ include (CMakeTestsRepart.cmake)
+ include (CMakeTestsClear.cmake)
+ include (CMakeTestsMkgrp.cmake)
+endif ()
diff --git a/tools/test/misc/CMakeTestsClear.cmake b/tools/test/misc/CMakeTestsClear.cmake
index a2c494d..cb285e4 100644
--- a/tools/test/misc/CMakeTestsClear.cmake
+++ b/tools/test/misc/CMakeTestsClear.cmake
@@ -83,12 +83,6 @@
##############################################################################
##############################################################################
- if (NOT BUILD_SHARED_LIBS)
- set (tgt_ext "")
- else ()
- set (tgt_ext "-shared")
- endif ()
-
# Need special dependencies for tests that use the same reference file
# This is an issue on Windows
macro (ADD_H5_CMP testname resultfile resultcode)
@@ -97,7 +91,7 @@
NAME H5CLEAR_CMP-${testname}
COMMAND "${CMAKE_COMMAND}"
-D "TEST_EMULATOR=${CMAKE_CROSSCOMPILING_EMULATOR}"
- -D "TEST_PROGRAM=$<TARGET_FILE:h5clear${tgt_ext}>"
+ -D "TEST_PROGRAM=$<TARGET_FILE:h5clear${tgt_file_ext}>"
-D "TEST_ARGS:STRING=${ARGN}"
-D "TEST_FOLDER=${PROJECT_BINARY_DIR}/testfiles"
-D "TEST_OUTPUT=${testname}.out"
@@ -114,7 +108,7 @@
NAME H5CLEAR_CMP-${testname}
COMMAND "${CMAKE_COMMAND}"
-D "TEST_EMULATOR=${CMAKE_CROSSCOMPILING_EMULATOR}"
- -D "TEST_PROGRAM=$<TARGET_FILE:h5clear${tgt_ext}>"
+ -D "TEST_PROGRAM=$<TARGET_FILE:h5clear${tgt_file_ext}>"
-D "TEST_ARGS:STRING=${ARGN}"
-D "TEST_FOLDER=${PROJECT_BINARY_DIR}/testfiles"
-D "TEST_OUTPUT=${testname}.out"
@@ -144,7 +138,7 @@
NAME H5CLEAR_CMP-${testname}
COMMAND "${CMAKE_COMMAND}"
-D "TEST_EMULATOR=${CMAKE_CROSSCOMPILING_EMULATOR}"
- -D "TEST_PROGRAM=$<TARGET_FILE:h5clear${tgt_ext}>"
+ -D "TEST_PROGRAM=$<TARGET_FILE:h5clear${tgt_file_ext}>"
-D "TEST_ARGS:STRING=${ARGN};${testfile}"
-D "TEST_FOLDER=${PROJECT_BINARY_DIR}/testfiles"
-D "TEST_OUTPUT=${testname}.out"
@@ -176,7 +170,7 @@
NAME H5CLEAR_CMP-${testname}
COMMAND "${CMAKE_COMMAND}"
-D "TEST_EMULATOR=${CMAKE_CROSSCOMPILING_EMULATOR}"
- -D "TEST_PROGRAM=$<TARGET_FILE:h5clear${tgt_ext}>"
+ -D "TEST_PROGRAM=$<TARGET_FILE:h5clear${tgt_file_ext}>"
-D "TEST_ARGS:STRING=${ARGN};${testfile}"
-D "TEST_FOLDER=${PROJECT_BINARY_DIR}/testfiles"
-D "TEST_OUTPUT=${testname}.out"
@@ -195,7 +189,7 @@
if (NOT HDF5_ENABLE_USING_MEMCHECKER)
add_test (
NAME H5CLEAR_RET-${testname}
- COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} $<TARGET_FILE:h5clear${tgt_ext}> ${ARGN}
+ COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} $<TARGET_FILE:h5clear${tgt_file_ext}> ${ARGN}
)
set_tests_properties (H5CLEAR_RET-${testname} PROPERTIES
WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles"
@@ -222,7 +216,7 @@
NAME H5CLEAR_FILESIZE_CMP-${testname}_before_size
COMMAND "${CMAKE_COMMAND}"
-D "TEST_EMULATOR=${CMAKE_CROSSCOMPILING_EMULATOR}"
- -D "TEST_PROGRAM=$<TARGET_FILE:h5clear${tgt_ext}>"
+ -D "TEST_PROGRAM=$<TARGET_FILE:h5clear${tgt_file_ext}>"
-D "TEST_ARGS:STRING=--filesize;${testname}.h5"
-D "TEST_FOLDER=${PROJECT_BINARY_DIR}/testfiles"
-D "TEST_OUTPUT=${testname}_before_size.out"
@@ -236,12 +230,12 @@
if (NOT ${incr_size} MATCHES "NONE")
add_test (
NAME H5CLEAR_FILESIZE_INCR-${testname}
- COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} $<TARGET_FILE:h5clear${tgt_ext}> --increment=${incr_size} ${testname}.h5
+ COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} $<TARGET_FILE:h5clear${tgt_file_ext}> --increment=${incr_size} ${testname}.h5
)
else ()
add_test (
NAME H5CLEAR_FILESIZE_INCR-${testname}
- COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} $<TARGET_FILE:h5clear${tgt_ext}> --increment ${testname}.h5
+ COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} $<TARGET_FILE:h5clear${tgt_file_ext}> --increment ${testname}.h5
)
endif ()
set_tests_properties (H5CLEAR_FILESIZE_INCR-${testname} PROPERTIES
@@ -253,7 +247,7 @@
NAME H5CLEAR_FILESIZE_CMP-${testname}_after_size
COMMAND "${CMAKE_COMMAND}"
-D "TEST_EMULATOR=${CMAKE_CROSSCOMPILING_EMULATOR}"
- -D "TEST_PROGRAM=$<TARGET_FILE:h5clear${tgt_ext}>"
+ -D "TEST_PROGRAM=$<TARGET_FILE:h5clear${tgt_file_ext}>"
-D "TEST_ARGS:STRING=--filesize;${testname}.h5"
-D "TEST_FOLDER=${PROJECT_BINARY_DIR}/testfiles"
-D "TEST_OUTPUT=${testname}_after_size.out"
@@ -285,7 +279,7 @@
NAME H5CLEAR_FILESIZE_FAIL_CMP-${testname}_before_size
COMMAND "${CMAKE_COMMAND}"
-D "TEST_EMULATOR=${CMAKE_CROSSCOMPILING_EMULATOR}"
- -D "TEST_PROGRAM=$<TARGET_FILE:h5clear${tgt_ext}>"
+ -D "TEST_PROGRAM=$<TARGET_FILE:h5clear${tgt_file_ext}>"
-D "TEST_ARGS:STRING=--filesize;${testname}.h5"
-D "TEST_FOLDER=${PROJECT_BINARY_DIR}/testfiles"
-D "TEST_OUTPUT=${testname}_before_size.out"
@@ -299,12 +293,12 @@
if (NOT ${incr_size} MATCHES "NONE")
add_test (
NAME H5CLEAR_FILESIZE_FAIL_INCR-${testname}
- COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} $<TARGET_FILE:h5clear${tgt_ext}> -s --increment=${incr_size} ${testname}.h5
+ COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} $<TARGET_FILE:h5clear${tgt_file_ext}> -s --increment=${incr_size} ${testname}.h5
)
else ()
add_test (
NAME H5CLEAR_FILESIZE_FAIL_INCR-${testname}
- COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} $<TARGET_FILE:h5clear${tgt_ext}> -s --increment ${testname}.h5
+ COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} $<TARGET_FILE:h5clear${tgt_file_ext}> -s --increment ${testname}.h5
)
endif ()
set_tests_properties (H5CLEAR_FILESIZE_FAIL_INCR-${testname} PROPERTIES
@@ -315,7 +309,7 @@
NAME H5CLEAR_FILESIZE_FAIL_CMP-${testname}_after_size
COMMAND "${CMAKE_COMMAND}"
-D "TEST_EMULATOR=${CMAKE_CROSSCOMPILING_EMULATOR}"
- -D "TEST_PROGRAM=$<TARGET_FILE:h5clear${tgt_ext}>"
+ -D "TEST_PROGRAM=$<TARGET_FILE:h5clear${tgt_file_ext}>"
-D "TEST_ARGS:STRING=--filesize;${testname}.h5"
-D "TEST_FOLDER=${PROJECT_BINARY_DIR}/testfiles"
-D "TEST_OUTPUT=${testname}_after_size.out"
@@ -352,7 +346,7 @@
# After "h5clear" the file, the subsequent file open succeeds
add_test (
NAME H5CLEAR-h5clr-${testname}
- COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} $<TARGET_FILE:h5clear${tgt_ext}> -s ${testfile}.h5
+ COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} $<TARGET_FILE:h5clear${tgt_file_ext}> -s ${testfile}.h5
)
set_tests_properties (H5CLEAR-h5clr-${testname} PROPERTIES
DEPENDS H5CLEAR-clr_open_chk-${testname}_${resultcode}
diff --git a/tools/test/misc/CMakeTestsMkgrp.cmake b/tools/test/misc/CMakeTestsMkgrp.cmake
index 11fa3f2..fb9e5ba 100644
--- a/tools/test/misc/CMakeTestsMkgrp.cmake
+++ b/tools/test/misc/CMakeTestsMkgrp.cmake
@@ -54,34 +54,33 @@
##############################################################################
##############################################################################
- if (NOT BUILD_SHARED_LIBS)
- set (tgt_ext "")
- else ()
- set (tgt_ext "-shared")
- endif ()
-
macro (ADD_H5_TEST resultfile resultcode resultoption)
- add_test (
- NAME H5MKGRP-${resultfile}-clear-objects
- COMMAND ${CMAKE_COMMAND} -E remove ${resultfile}.h5
- )
- set_tests_properties (H5MKGRP-${resultfile}-clear-objects PROPERTIES
- WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles"
- )
- add_test (
- NAME H5MKGRP-${resultfile}
- COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} $<TARGET_FILE:h5mkgrp${tgt_ext}> ${resultoption} ${resultfile}.h5 ${ARGN}
- )
- set_tests_properties (H5MKGRP-${resultfile} PROPERTIES
- DEPENDS H5MKGRP-${resultfile}-clear-objects
- WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles"
- )
- if (NOT HDF5_ENABLE_USING_MEMCHECKER)
+ if (HDF5_ENABLE_USING_MEMCHECKER)
+ add_test (
+ NAME H5MKGRP-${resultfile}
+ COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} $<TARGET_FILE:h5mkgrp${tgt_file_ext}> ${resultoption} ${resultfile}.h5 ${ARGN}
+ )
+ else ()
+ add_test (
+ NAME H5MKGRP-${resultfile}-clear-objects
+ COMMAND ${CMAKE_COMMAND} -E remove ${resultfile}.h5
+ )
+ set_tests_properties (H5MKGRP-${resultfile}-clear-objects PROPERTIES
+ WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles"
+ )
+ add_test (
+ NAME H5MKGRP-${resultfile}
+ COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} $<TARGET_FILE:h5mkgrp${tgt_file_ext}> ${resultoption} ${resultfile}.h5 ${ARGN}
+ )
+ set_tests_properties (H5MKGRP-${resultfile} PROPERTIES
+ DEPENDS H5MKGRP-${resultfile}-clear-objects
+ WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles"
+ )
add_test (
NAME H5MKGRP-${resultfile}-h5ls
COMMAND "${CMAKE_COMMAND}"
-D "TEST_EMULATOR=${CMAKE_CROSSCOMPILING_EMULATOR}"
- -D "TEST_PROGRAM=$<TARGET_FILE:h5ls${tgt_ext}>"
+ -D "TEST_PROGRAM=$<TARGET_FILE:h5ls${tgt_file_ext}>"
-D "TEST_ARGS:STRING=-v;-r;${resultfile}.h5"
-D "TEST_FOLDER=${PROJECT_BINARY_DIR}/testfiles"
-D "TEST_OUTPUT=${resultfile}.out"
@@ -96,7 +95,7 @@
macro (ADD_H5_CMP resultfile resultcode)
if (HDF5_ENABLE_USING_MEMCHECKER)
- add_test (NAME H5MKGRP_CMP-${resultfile} COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} $<TARGET_FILE:h5mkgrp> ${ARGN})
+ add_test (NAME H5MKGRP_CMP-${resultfile} COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} $<TARGET_FILE:h5mkgrp${tgt_file_ext}> ${ARGN})
else ()
add_test (
NAME H5MKGRP_CMP-${resultfile}-clear-objects
@@ -109,7 +108,7 @@
NAME H5MKGRP_CMP-${resultfile}
COMMAND "${CMAKE_COMMAND}"
-D "TEST_EMULATOR=${CMAKE_CROSSCOMPILING_EMULATOR}"
- -D "TEST_PROGRAM=$<TARGET_FILE:h5mkgrp${tgt_ext}>"
+ -D "TEST_PROGRAM=$<TARGET_FILE:h5mkgrp${tgt_file_ext}>"
-D "TEST_ARGS:STRING=${ARGN}"
-D "TEST_FOLDER=${PROJECT_BINARY_DIR}/testfiles"
-D "TEST_OUTPUT=${resultfile}.out"
diff --git a/tools/test/misc/CMakeTestsRepart.cmake b/tools/test/misc/CMakeTestsRepart.cmake
index fa49c53..14b349c 100644
--- a/tools/test/misc/CMakeTestsRepart.cmake
+++ b/tools/test/misc/CMakeTestsRepart.cmake
@@ -58,12 +58,6 @@
##############################################################################
##############################################################################
- if (NOT BUILD_SHARED_LIBS)
- set (tgt_ext "")
- else ()
- set (tgt_ext "-shared")
- endif ()
-
# Remove any output file left over from previous test run
add_test (
NAME H5REPART-clearall-objects
@@ -82,7 +76,7 @@
# repartition family member size to 20,000 bytes.
add_test (
NAME H5REPART-h5repart_20K
- COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} $<TARGET_FILE:h5repart${tgt_ext}> -m 20000 family_file%05d.h5 fst_family%05d.h5
+ COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} $<TARGET_FILE:h5repart${tgt_file_ext}> -m 20000 family_file%05d.h5 fst_family%05d.h5
)
set_tests_properties (H5REPART-h5repart_20K PROPERTIES
FIXTURES_REQUIRED clear_testrepart
@@ -91,7 +85,7 @@
# repartition family member size to 5 KB.
add_test (
NAME H5REPART-h5repart_5K
- COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} $<TARGET_FILE:h5repart${tgt_ext}> -m 5k family_file%05d.h5 scd_family%05d.h5
+ COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} $<TARGET_FILE:h5repart${tgt_file_ext}> -m 5k family_file%05d.h5 scd_family%05d.h5
)
set_tests_properties (H5REPART-h5repart_5K PROPERTIES
FIXTURES_REQUIRED clear_testrepart
@@ -100,7 +94,7 @@
# convert family file to sec2 file of 20,000 bytes
add_test (
NAME H5REPART-h5repart_single
- COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} $<TARGET_FILE:h5repart${tgt_ext}> -m 20000 -family_to_single family_file%05d.h5 family_to_single.h5
+ COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} $<TARGET_FILE:h5repart${tgt_file_ext}> -m 20000 -family_to_single family_file%05d.h5 family_to_single.h5
)
set_tests_properties (H5REPART-h5repart_single PROPERTIES
FIXTURES_REQUIRED clear_testrepart
@@ -109,7 +103,7 @@
# convert family file to sec2 file of 20,000 bytes (old argument)
add_test (
NAME H5REPART-h5repart_sec2
- COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} $<TARGET_FILE:h5repart${tgt_ext}> -m 20000 -family_to_sec2 family_file%05d.h5 family_to_sec2.h5
+ COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} $<TARGET_FILE:h5repart${tgt_file_ext}> -m 20000 -family_to_sec2 family_file%05d.h5 family_to_sec2.h5
)
set_tests_properties (H5REPART-h5repart_sec2 PROPERTIES
FIXTURES_REQUIRED clear_testrepart
diff --git a/tools/test/misc/Makefile.am b/tools/test/misc/Makefile.am
index f2d2489..c58ba38 100644
--- a/tools/test/misc/Makefile.am
+++ b/tools/test/misc/Makefile.am
@@ -21,7 +21,7 @@ include $(top_srcdir)/config/commence.am
SUBDIRS=vds
# Include src directory
-AM_CPPFLAGS+=-I$(top_srcdir)/src -I$(top_srcdir)/tools/lib
+AM_CPPFLAGS+=-I$(top_srcdir)/src -I$(top_srcdir)/test -I$(top_srcdir)/tools/lib
#test scripts and programs
TEST_PROG=h5repart_gentest h5clear_gentest talign
diff --git a/tools/test/misc/Makefile.in b/tools/test/misc/Makefile.in
index d7b226a..f2ba3db 100644
--- a/tools/test/misc/Makefile.in
+++ b/tools/test/misc/Makefile.in
@@ -476,15 +476,15 @@ AMTAR = @AMTAR@
# H5_CFLAGS holds flags that should be used when building hdf5,
# but which should not be exported to h5cc for building other programs.
-# AM_CFLAGS is an automake construct which should be used by Makefiles
+# AM_CFLAGS is an automake construct which should be used by Makefiles
# instead of CFLAGS, as CFLAGS is reserved solely for the user to define.
# This applies to FCFLAGS, CXXFLAGS, CPPFLAGS, and LDFLAGS as well.
-AM_CFLAGS = @AM_CFLAGS@ @H5_CFLAGS@
+AM_CFLAGS = @AM_CFLAGS@ @H5_CFLAGS@ @H5_ECFLAGS@
# Include src directory
AM_CPPFLAGS = @AM_CPPFLAGS@ @H5_CPPFLAGS@ -I$(top_srcdir)/src \
- -I$(top_srcdir)/tools/lib
-AM_CXXFLAGS = @AM_CXXFLAGS@ @H5_CXXFLAGS@
+ -I$(top_srcdir)/test -I$(top_srcdir)/tools/lib
+AM_CXXFLAGS = @AM_CXXFLAGS@ @H5_CXXFLAGS@ @H5_ECXXFLAGS@
AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
AM_FCFLAGS = @AM_FCFLAGS@ @H5_FCFLAGS@
AM_JAVACFLAGS = @AM_JAVACFLAGS@
@@ -504,6 +504,7 @@ CC = @CC@
CCDEPMODE = @CCDEPMODE@
CC_VERSION = @CC_VERSION@
CFLAGS = @CFLAGS@
+CLANG_SANITIZE_CHECKS = @CLANG_SANITIZE_CHECKS@
CODESTACK = @CODESTACK@
CONFIG_DATE = @CONFIG_DATE@
CONFIG_MODE = @CONFIG_MODE@
@@ -520,6 +521,7 @@ DEFAULT_API_VERSION = @DEFAULT_API_VERSION@
DEFS = @DEFS@
DEPDIR = @DEPDIR@
DEPRECATED_SYMBOLS = @DEPRECATED_SYMBOLS@
+DESIRED_FILE_LOCKING = @DESIRED_FILE_LOCKING@
DEV_WARNINGS = @DEV_WARNINGS@
DIRECT_VFD = @DIRECT_VFD@
DLLTOOL = @DLLTOOL@
@@ -556,8 +558,11 @@ H5_CFLAGS = @H5_CFLAGS@
H5_CLASSPATH = @H5_CLASSPATH@
H5_CPPFLAGS = @H5_CPPFLAGS@
H5_CXXFLAGS = @H5_CXXFLAGS@
+H5_ECFLAGS = @H5_ECFLAGS@
+H5_ECXXFLAGS = @H5_ECXXFLAGS@
H5_FCFLAGS = @H5_FCFLAGS@
H5_FORTRAN_SHARED = @H5_FORTRAN_SHARED@
+H5_IS_DARWIN = @H5_IS_DARWIN@
H5_JAVACFLAGS = @H5_JAVACFLAGS@
H5_JAVAFLAGS = @H5_JAVAFLAGS@
H5_JNIFLAGS = @H5_JNIFLAGS@
@@ -580,6 +585,7 @@ HL = @HL@
HL_FOR = @HL_FOR@
HSIZE_T = @HSIZE_T@
HSSIZE_T = @HSSIZE_T@
+IGNORE_DISABLED_FILE_LOCKS = @IGNORE_DISABLED_FILE_LOCKS@
INSTALL = @INSTALL@
INSTALL_DATA = @INSTALL_DATA@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
@@ -616,6 +622,7 @@ MAINT = @MAINT@
MAKEINFO = @MAKEINFO@
MANIFEST_TOOL = @MANIFEST_TOOL@
MEMORYALLOCSANITYCHECK = @MEMORYALLOCSANITYCHECK@
+MIRROR_VFD = @MIRROR_VFD@
MKDIR_P = @MKDIR_P@
MPE = @MPE@
NM = @NM@
@@ -675,6 +682,7 @@ TIME = @TIME@
TR = @TR@
TRACE_API = @TRACE_API@
UNAME_INFO = @UNAME_INFO@
+USE_FILE_LOCKING = @USE_FILE_LOCKING@
USE_FILTER_DEFLATE = @USE_FILTER_DEFLATE@
USE_FILTER_SZIP = @USE_FILTER_SZIP@
USINGMEMCHECKER = @USINGMEMCHECKER@
@@ -710,6 +718,7 @@ docdir = $(exec_prefix)/doc
dvidir = @dvidir@
enable_shared = @enable_shared@
enable_static = @enable_static@
+examplesdir = @examplesdir@
exec_prefix = @exec_prefix@
fortran_linux_linker_option = @fortran_linux_linker_option@
host = @host@
@@ -766,15 +775,15 @@ LIBH5_HL = $(top_builddir)/hl/src/libhdf5_hl.la
LIBH5F_HL = $(top_builddir)/hl/fortran/src/libhdf5hl_fortran.la
LIBH5CPP_HL = $(top_builddir)/hl/c++/src/libhdf5_hl_cpp.la
-# Note that in svn revision 19400 the '/' after DESTDIR in H5* variables below
-# has been removed. According to the official description of DESTDIR by Gnu at
-# http://www.gnu.org/prep/standards/html_node/DESTDIR.html, DESTDIR is
-# prepended to the normal and complete install path that it precedes for the
-# purpose of installing in a temporary directory which is useful for building
-# rpms and other packages. The '/' after ${DESTDIR} will be followed by another
-# '/' at the beginning of the normal install path. When DESTDIR is empty the
-# path then begins with '//', which is incorrect and causes problems at least for
-# Cygwin.
+# Note that in svn revision 19400 the '/' after DESTDIR in H5* variables below
+# has been removed. According to the official description of DESTDIR by Gnu at
+# http://www.gnu.org/prep/standards/html_node/DESTDIR.html, DESTDIR is
+# prepended to the normal and complete install path that it precedes for the
+# purpose of installing in a temporary directory which is useful for building
+# rpms and other packages. The '/' after ${DESTDIR} will be followed by another
+# '/' at the beginning of the normal install path. When DESTDIR is empty the
+# path then begins with '//', which is incorrect and causes problems at least for
+# Cygwin.
# Scripts used to build examples
# If only shared libraries have been installed, have h5cc build examples with
@@ -825,7 +834,7 @@ LIB = $(lib_LIBRARIES) $(lib_LTLIBRARIES) $(noinst_LIBRARIES) \
PROGS = $(bin_PROGRAMS) $(bin_SCRIPTS) $(noinst_PROGRAMS) $(noinst_SCRIPTS) \
$(EXTRA_PROG)
-chk_TESTS = $(check_PROGRAMS) $(check_SCRIPTS) $(EXTRA_TEST)
+chk_TESTS = $(check_PROGRAMS) $(check_SCRIPTS) $(EXTRA_TEST)
TEST_EXTENSIONS = .sh
SH_LOG_COMPILER = $(SHELL)
AM_SH_LOG_FLAGS =
@@ -1502,28 +1511,37 @@ $(TEST_PROG_CHKEXE) $(TEST_PROG_PARA_CHKEXE) dummy.chkexe_:
echo "============================" > $${log}; \
fi; \
if test "X$(FORTRAN_API)" = "Xyes"; then \
- echo "Fortran API: Testing $(HDF5_DRIVER) $${tname} $(TEST_FLAGS)"; \
+ echo "Fortran API: Testing $${tname} $(TEST_FLAGS)"; \
if test -n "$(REALTIMEOUTPUT)"; then \
- echo "Fortran API: $(HDF5_DRIVER) $${tname} $(TEST_FLAGS) Test Log" | tee -a $${log}; \
+ echo "Fortran API: Test log for $${tname} $(TEST_FLAGS)" | tee -a $${log}; \
else \
- echo "Fortran API: $(HDF5_DRIVER) $${tname} $(TEST_FLAGS) Test Log" >> $${log}; \
+ echo "Fortran API: Test log for $${tname} $(TEST_FLAGS)" >> $${log}; \
fi; \
elif test "X$(CXX_API)" = "Xyes"; then \
- echo "C++ API: Testing $(HDF5_DRIVER) $${tname} $(TEST_FLAGS)"; \
+ echo "C++ API: Testing $${tname} $(TEST_FLAGS)"; \
if test -n "$(REALTIMEOUTPUT)"; then \
- echo "C++ API: $(HDF5_DRIVER) $${tname} $(TEST_FLAGS) Test Log" | tee -a $${log};\
+ echo "C++ API: Test log for $${tname} $(TEST_FLAGS)" | tee -a $${log};\
else \
- echo "C++ API: $(HDF5_DRIVER) $${tname} $(TEST_FLAGS) Test Log" >> $${log};\
+ echo "C++ API: Test log for $${tname} $(TEST_FLAGS)" >> $${log};\
fi; \
else \
- echo "Testing $(HDF5_DRIVER) $${tname} $(TEST_FLAGS)"; \
+ echo "Testing: $${tname} $(TEST_FLAGS)"; \
if test -n "$(REALTIMEOUTPUT)"; then \
- echo "$(HDF5_DRIVER) $${tname} $(TEST_FLAGS) Test Log" | tee -a $${log}; \
+ echo "Test log for $${tname} $(TEST_FLAGS)" | tee -a $${log}; \
else \
- echo "$(HDF5_DRIVER) $${tname} $(TEST_FLAGS) Test Log" >> $${log}; \
+ echo "Test log for $${tname} $(TEST_FLAGS)" >> $${log}; \
fi; \
fi; \
if test -n "$(REALTIMEOUTPUT)"; then \
+ if test -n "$(HDF5_DRIVER)"; then \
+ echo "Virtual file driver (VFD): $(HDF5_DRIVER)" | tee -a $${log}; \
+ fi; \
+ else \
+ if test -n "$(HDF5_DRIVER)"; then \
+ echo "Virtual file driver (VFD): $(HDF5_DRIVER)" >> $${log}; \
+ fi; \
+ fi; \
+ if test -n "$(REALTIMEOUTPUT)"; then \
echo "============================" | tee -a $${log}; \
else \
echo "============================" >> $${log}; \
diff --git a/tools/test/misc/clear_open_chk.c b/tools/test/misc/clear_open_chk.c
index 3a61385..7d22ca6 100644
--- a/tools/test/misc/clear_open_chk.c
+++ b/tools/test/misc/clear_open_chk.c
@@ -53,7 +53,7 @@ main(int argc, char *argv[])
fname = HDstrdup(argv[1]);
/* Try opening the file */
- if((fid = h5tools_fopen(fname, H5F_ACC_RDONLY, H5P_DEFAULT, NULL, NULL, (size_t)0)) < 0) {
+ if((fid = h5tools_fopen(fname, H5F_ACC_RDONLY, H5P_DEFAULT, FALSE, NULL, (size_t)0)) < 0) {
HDfprintf(stderr, "clear_open_chk: unable to open the file\n");
HDfree(fname);
HDexit(EXIT_FAILURE);
diff --git a/tools/test/misc/h5clear_gentest.c b/tools/test/misc/h5clear_gentest.c
index 96d7e75e7..8d6883c 100644
--- a/tools/test/misc/h5clear_gentest.c
+++ b/tools/test/misc/h5clear_gentest.c
@@ -11,7 +11,7 @@
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
#include "hdf5.h"
-#include "H5private.h"
+#include "h5test.h"
/* The HDF5 test files */
const char *FILENAME[] = {
@@ -56,19 +56,27 @@ const char *FILENAME_ENHANCE[] = {
static int
gen_cache_image_file(const char *fname)
{
- hid_t fid = -1; /* File ID */
- hid_t did = -1, sid = -1; /* Dataset ID, dataspace ID */
- hid_t fapl = -1; /* File access property list */
- hid_t dcpl = -1; /* Dataset creation property list */
+ hid_t fid = H5I_INVALID_HID; /* File ID */
+ hid_t did = -1, sid = H5I_INVALID_HID; /* Dataset ID, dataspace ID */
+ hid_t fapl = H5I_INVALID_HID; /* File access property list */
+ hid_t dcpl = H5I_INVALID_HID; /* Dataset creation property list */
hsize_t dims[2]; /* Dimension sizes */
hsize_t chunks[2]; /* Chunked dimension sizes */
- int buf[50][100]; /* Buffer for data to write */
int i, j; /* Local index variables */
+ int **buf = NULL; /* Buffer for data to write */
H5AC_cache_image_config_t cache_image_config = /* Cache image input configuration */
{ H5AC__CURR_CACHE_IMAGE_CONFIG_VERSION,
TRUE, FALSE,
H5AC__CACHE_IMAGE__ENTRY_AGEOUT__NONE};
+ /* Create and fill array */
+ H5TEST_ALLOCATE_2D_ARRAY(buf, int, 50, 100);
+ if (NULL == buf)
+ goto error;
+ for(i = 0; i < 50; i++)
+ for(j = 0; j < 100; j++)
+ buf[i][j] = i * j;
+
/* Create a copy of file access property list */
if((fapl = H5Pcreate(H5P_FILE_ACCESS)) < 0)
goto error;
@@ -91,11 +99,6 @@ gen_cache_image_file(const char *fname)
if((sid = H5Screate_simple(2, dims, NULL)) < 0)
goto error;
- /* Initialize buffer for writing to dataset */
- for(i = 0; i < 50; i++)
- for(j = 0; j < 100; j++)
- buf[i][j] = i * j;
-
/* Set up to create a chunked dataset */
if((dcpl = H5Pcreate(H5P_DATASET_CREATE)) < 0)
goto error;
@@ -107,7 +110,7 @@ gen_cache_image_file(const char *fname)
goto error;
/* Write to the dataset */
- if(H5Dwrite(did, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, buf) < 0)
+ if(H5Dwrite(did, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, buf[0]) < 0)
goto error;
/* Closing */
@@ -121,6 +124,9 @@ gen_cache_image_file(const char *fname)
goto error;
if(H5Fclose(fid) < 0)
goto error;
+
+ HDfree(buf);
+
return 0;
error:
@@ -132,6 +138,9 @@ error:
H5Pclose(fapl);
H5Pclose(dcpl);
} H5E_END_TRY;
+
+ HDfree(buf);
+
return 1;
} /* gen_cache_image_file() */
@@ -164,13 +173,13 @@ error:
static int
gen_enhance_files(hbool_t user)
{
- hid_t fid = -1; /* File ID */
- hid_t fcpl = -1; /* File creation property list */
- hid_t sid = -1; /* Dataspace ID */
- hid_t did = -1; /* Dataset ID */
+ hid_t fid = H5I_INVALID_HID; /* File ID */
+ hid_t fcpl = H5I_INVALID_HID; /* File creation property list */
+ hid_t sid = H5I_INVALID_HID; /* Dataspace ID */
+ hid_t did = H5I_INVALID_HID; /* Dataset ID */
hsize_t dim[1]; /* Dimension sizes */
int data[NUM_ELMTS]; /* Buffer for data */
- int fd = -1; /* The file descriptor ID */
+ int fd = H5I_INVALID_HID; /* The file descriptor ID */
int64_t eoa; /* The EOA value */
uint32_t chksum; /* The chksum value */
int i = 0 , j = 0, u = 0; /* Local index variable */
@@ -361,13 +370,13 @@ error:
int
main(void)
{
- hid_t fid = -1; /* File ID */
- hid_t fcpl = -1; /* File creation property list */
- hid_t fapl = -1, new_fapl = -1; /* File access property lists */
+ hid_t fid = H5I_INVALID_HID; /* File ID */
+ hid_t fcpl = H5I_INVALID_HID; /* File creation property list */
+ hid_t fapl = -1, new_fapl = H5I_INVALID_HID; /* File access property lists */
char fname[512]; /* File name */
unsigned new_format; /* To use latest library format or not */
- hid_t sid = -1; /* Dataspace ID */
- hid_t did = -1; /* Dataset ID */
+ hid_t sid = H5I_INVALID_HID; /* Dataspace ID */
+ hid_t did = H5I_INVALID_HID; /* Dataset ID */
hsize_t dim[1]; /* Dimension sizes */
int data[NUM_ELMTS]; /* Buffer for data */
int i; /* Local index variables */
diff --git a/tools/test/misc/h5perf_gentest.c b/tools/test/misc/h5perf_gentest.c
index f50e5fb..511a9e2 100644
--- a/tools/test/misc/h5perf_gentest.c
+++ b/tools/test/misc/h5perf_gentest.c
@@ -14,7 +14,7 @@
creates a large number of attributes, groups, and datasets by specifying
-a, -g, -d options respectively. Using "-h" option to see details.
- Programmer: Peter Cao <xcao@hdfgroup.org>, Jan. 2013
+ Programmer: Peter Cao, Jan. 2013
****************************************************************************/
#include "hdf5.h"
@@ -128,7 +128,7 @@ int main (int argc, char *argv[])
Return: Non-negative on success/Negative on failure
- Programmer: Peter Cao <xcao@hdfgroup.org>, Jan. 2013
+ Programmer: Peter Cao, Jan. 2013
****************************************************************************/
herr_t create_perf_test_file(const char *fname, int ngrps, int ndsets,
int nattrs, hsize_t nrows, hsize_t dim0, hsize_t chunk, int vlen,
diff --git a/tools/test/misc/h5repart_gentest.c b/tools/test/misc/h5repart_gentest.c
index 5c1ff87..520069f 100644
--- a/tools/test/misc/h5repart_gentest.c
+++ b/tools/test/misc/h5repart_gentest.c
@@ -12,7 +12,7 @@
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/*
- * Programmer: Raymond Lu<slu@ncsa.uiuc.edu>
+ * Programmer: Raymond Lu
* June 1, 2005
*
* Purpose: Generate a family file of 1024 bytes for each member
@@ -25,7 +25,8 @@
#define FAMILY_SIZE 1024
#define FILENAME "family_file%05d.h5"
-static int buf[FAMILY_NUMBER][FAMILY_SIZE];
+int **buf = NULL;
+int *buf_data = NULL;
int main(void)
{
@@ -34,66 +35,82 @@ int main(void)
int i, j;
hsize_t dims[2]={FAMILY_NUMBER, FAMILY_SIZE};
+ /* Set up data array */
+ if(NULL == (buf_data = (int *)HDcalloc(FAMILY_NUMBER * FAMILY_SIZE, sizeof(int)))) {
+ HDperror("HDcalloc");
+ HDexit(EXIT_FAILURE);
+ }
+ if(NULL == (buf = (int **)HDcalloc(FAMILY_NUMBER, sizeof(buf_data)))) {
+ HDperror("HDcalloc");
+ HDexit(EXIT_FAILURE);
+ }
+ for (i = 0; i < FAMILY_NUMBER; i++)
+ buf[i] = buf_data + (i * FAMILY_SIZE);
+
/* Set property list and file name for FAMILY driver */
- if ((fapl=H5Pcreate(H5P_FILE_ACCESS)) < 0) {
- perror ("H5Pcreate");
- exit (EXIT_FAILURE);
+ if ((fapl = H5Pcreate(H5P_FILE_ACCESS)) < 0) {
+ HDperror("H5Pcreate");
+ HDexit(EXIT_FAILURE);
}
if(H5Pset_fapl_family(fapl, (hsize_t)FAMILY_SIZE, H5P_DEFAULT) < 0) {
- perror ("H5Pset_fapl_family");
- exit (EXIT_FAILURE);
+ HDperror("H5Pset_fapl_family");
+ HDexit(EXIT_FAILURE);
}
if((file = H5Fcreate(FILENAME, H5F_ACC_TRUNC, H5P_DEFAULT, fapl)) < 0) {
- perror("H5Fcreate");
- exit(EXIT_FAILURE);
+ HDperror("H5Fcreate");
+ HDexit(EXIT_FAILURE);
}
/* Create and write dataset */
if((space = H5Screate_simple(2, dims, NULL)) < 0) {
- perror("H5Screate_simple");
- exit(EXIT_FAILURE);
+ HDperror("H5Screate_simple");
+ HDexit(EXIT_FAILURE);
}
if((dset = H5Dcreate2(file, dname, H5T_NATIVE_INT, space, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) {
- perror("H5Dcreate2");
- exit(EXIT_FAILURE);
+ HDperror("H5Dcreate2");
+ HDexit(EXIT_FAILURE);
}
- for(i = 0; i<FAMILY_NUMBER; i++)
- for(j = 0; j<FAMILY_SIZE; j++)
+ for(i = 0; i < FAMILY_NUMBER; i++)
+ for(j = 0; j < FAMILY_SIZE; j++)
buf[i][j] = i * 10000 + j;
- if(H5Dwrite(dset, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, buf) < 0) {
- perror("H5Dwrite");
- exit(EXIT_FAILURE);
+ if(H5Dwrite(dset, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, buf_data) < 0) {
+ HDperror("H5Dwrite");
+ HDexit(EXIT_FAILURE);
}
if(H5Sclose(space) < 0) {
- perror ("H5Sclose");
- exit (EXIT_FAILURE);
+ HDperror("H5Sclose");
+ HDexit(EXIT_FAILURE);
}
if(H5Dclose(dset) < 0) {
- perror ("H5Dclose");
- exit (EXIT_FAILURE);
+ HDperror("H5Dclose");
+ HDexit(EXIT_FAILURE);
}
if(H5Pclose(fapl) < 0) {
- perror ("H5Pclose");
- exit (EXIT_FAILURE);
+ HDperror("H5Pclose");
+ HDexit(EXIT_FAILURE);
}
if(H5Fclose(file) < 0) {
- perror ("H5Fclose");
- exit (EXIT_FAILURE);
+ HDperror("H5Fclose");
+ HDexit(EXIT_FAILURE);
}
- puts(" PASSED"); fflush(stdout);
+ HDfree(buf);
+ HDfree(buf_data);
+
+ HDputs(" PASSED");
+ HDfflush(stdout);
- return 0;
+ return EXIT_SUCCESS;
}
diff --git a/tools/test/misc/repart_test.c b/tools/test/misc/repart_test.c
index b8e0292..7227de0 100644
--- a/tools/test/misc/repart_test.c
+++ b/tools/test/misc/repart_test.c
@@ -47,8 +47,8 @@ herr_t test_single_h5repart_opens(void);
herr_t
test_family_h5repart_opens(void)
{
- hid_t fid = -1;
- hid_t fapl_id = -1;
+ hid_t fid = H5I_INVALID_HID;
+ hid_t fapl_id = H5I_INVALID_HID;
/* open 1st file(single member file) with correct family size(20000 byte) */
if ((fapl_id = H5Pcreate(H5P_FILE_ACCESS)) < 0)
@@ -102,7 +102,7 @@ error:
herr_t
test_single_h5repart_opens(void)
{
- hid_t fid = -1;
+ hid_t fid = H5I_INVALID_HID;
/* open the single file */
if ((fid = H5Fopen(FILENAME[2], H5F_ACC_RDWR, H5P_DEFAULT)) < 0)
diff --git a/tools/test/misc/talign.c b/tools/test/misc/talign.c
index 7f1f038..c69d1f7 100644
--- a/tools/test/misc/talign.c
+++ b/tools/test/misc/talign.c
@@ -32,11 +32,11 @@ const char *setname = "align";
int main(void)
{
- hid_t fil=-1, spc=-1, set=-1;
- hid_t cs6=-1, cmp=-1, fix=-1;
- hid_t cmp1=-1, cmp2=-1, cmp3=-1;
- hid_t plist=-1;
- hid_t array_dt=-1;
+ hid_t fil=H5I_INVALID_HID, spc=H5I_INVALID_HID, set=H5I_INVALID_HID;
+ hid_t cs6=H5I_INVALID_HID, cmp=H5I_INVALID_HID, fix=H5I_INVALID_HID;
+ hid_t cmp1=H5I_INVALID_HID, cmp2=H5I_INVALID_HID, cmp3=H5I_INVALID_HID;
+ hid_t plist=H5I_INVALID_HID;
+ hid_t array_dt=H5I_INVALID_HID;
hsize_t dim[2];
hsize_t cdim[4];
diff --git a/tools/test/misc/testfiles/h5clear_missing_file.ddl b/tools/test/misc/testfiles/h5clear_missing_file.ddl
index 32dd549..c4d21c9 100644
--- a/tools/test/misc/testfiles/h5clear_missing_file.ddl
+++ b/tools/test/misc/testfiles/h5clear_missing_file.ddl
@@ -5,8 +5,14 @@ usage: h5clear [OPTIONS] file_name
-s, --status Clear the status_flags field in the file's superblock
-m, --image Remove the metadata cache image from the file
--filesize Print the file's EOA and EOF
- --increment=C Set the file's EOA to the maximum of (EOA, EOF) + C for the file <file_name>
- C is >= 0; C is optional and will default to 1M when not set
+ --increment=C Set the file's EOA to the maximum of (EOA, EOF) + C for
+ the file <file_name>.
+ C is >= 0; C is optional and will default to 1M when not set.
+ This option helps to repair a crashed file where the stored EOA
+ in the superblock is different from the actual EOF.
+ The file’s EOA and EOF will be the same after applying
+ this option to the file.
+
Examples of use:
h5clear -s file_name
diff --git a/tools/test/misc/testfiles/h5clear_usage.ddl b/tools/test/misc/testfiles/h5clear_usage.ddl
index 32dd549..c4d21c9 100644
--- a/tools/test/misc/testfiles/h5clear_usage.ddl
+++ b/tools/test/misc/testfiles/h5clear_usage.ddl
@@ -5,8 +5,14 @@ usage: h5clear [OPTIONS] file_name
-s, --status Clear the status_flags field in the file's superblock
-m, --image Remove the metadata cache image from the file
--filesize Print the file's EOA and EOF
- --increment=C Set the file's EOA to the maximum of (EOA, EOF) + C for the file <file_name>
- C is >= 0; C is optional and will default to 1M when not set
+ --increment=C Set the file's EOA to the maximum of (EOA, EOF) + C for
+ the file <file_name>.
+ C is >= 0; C is optional and will default to 1M when not set.
+ This option helps to repair a crashed file where the stored EOA
+ in the superblock is different from the actual EOF.
+ The file’s EOA and EOF will be the same after applying
+ this option to the file.
+
Examples of use:
h5clear -s file_name
diff --git a/tools/test/misc/testfiles/h5mkgrp_help.txt b/tools/test/misc/testfiles/h5mkgrp_help.txt
index ba130f6..2f67c4b 100644
--- a/tools/test/misc/testfiles/h5mkgrp_help.txt
+++ b/tools/test/misc/testfiles/h5mkgrp_help.txt
@@ -5,3 +5,4 @@ usage: h5mkgrp [OPTIONS] FILE GROUP...
-p, --parents No error if existing, make parent groups as needed
-v, --verbose Print information about OBJECTS and OPTIONS
-V, --version Print version number and exit
+
diff --git a/tools/test/misc/testfiles/h5mkgrp_version.txt.in b/tools/test/misc/testfiles/h5mkgrp_version.txt.in
index 75c13a5..37dbabd 100644
--- a/tools/test/misc/testfiles/h5mkgrp_version.txt.in
+++ b/tools/test/misc/testfiles/h5mkgrp_version.txt.in
@@ -1 +1 @@
-h5mkgrp: Version @HDF5_PACKAGE_VERSION_STRING@
+h5mkgrp: Version @HDF5_RELEASE_VERSION_STRING@
diff --git a/tools/test/misc/testh5mkgrp.sh.in b/tools/test/misc/testh5mkgrp.sh.in
index 3ad1f71..7dc8155 100644
--- a/tools/test/misc/testh5mkgrp.sh.in
+++ b/tools/test/misc/testh5mkgrp.sh.in
@@ -13,7 +13,7 @@
#
# Tests for the h5mkgrp tool
#
-# Quincey Koziol (koziol@hdfgroup.org)
+# Quincey Koziol
# Tuesday, February 13, 2007
#
@@ -150,10 +150,11 @@ TOOLTEST()
{
TESTING $H5MKGRP $@
(
- cd $TESTDIR
- $RUNSERIAL $H5MKGRP_BIN $@
+ cd $TESTDIR
+ $RUNSERIAL $H5MKGRP_BIN $@
) > output.out
RET=$?
+
if [ $RET != 0 ]; then
echo "*FAILED*"
echo "failed result is:"
@@ -164,7 +165,7 @@ TOOLTEST()
# Clean up output file
if test -z "$HDF5_NOCLEANUP"; then
- rm -f output.out
+ rm -f output.out
fi
fi
}
@@ -181,8 +182,8 @@ H5LSTEST()
# any unexpected output from that stream too.
VERIFY_H5LS $@
(
- cd $TESTDIR
- $RUNSERIAL $H5LS_BIN $H5LS_ARGS $@
+ cd $TESTDIR
+ $RUNSERIAL $H5LS_BIN $H5LS_ARGS $@
) 2>&1 |sed 's/Modified:.*/Modified: XXXX-XX-XX XX:XX:XX XXX/' >$actual
# save actual in case it is needed later.
@@ -190,25 +191,25 @@ H5LSTEST()
STDOUT_FILTER $actual
STDERR_FILTER $actual
- if [ ! -f $expect ]; then
- # Create the expect file if it doesn't yet exist.
- echo " CREATED"
- cp $actual $expect
- echo " Expected result (*.ls) missing"
- nerrors="`expr $nerrors + 1`"
- elif $CMP $expect $actual; then
- echo " PASSED"
- else
- echo "*FAILED*"
- echo " Expected result (*.ls) differs from actual result (*.out)"
- nerrors="`expr $nerrors + 1`"
- test yes = "$verbose" && $DIFF $expect $actual |sed 's/^/ /'
- fi
-
- # Clean up output file
- if test -z "$HDF5_NOCLEANUP"; then
- rm -f $actual $actual_sav
- fi
+ if [ ! -f $expect ]; then
+ # Create the expect file if it doesn't yet exist.
+ echo " CREATED"
+ cp $actual $expect
+ echo " Expected result (*.ls) missing"
+ nerrors="`expr $nerrors + 1`"
+ elif $CMP $expect $actual; then
+ echo " PASSED"
+ else
+ echo "*FAILED*"
+ echo " Expected result (*.ls) differs from actual result (*.out)"
+ nerrors="`expr $nerrors + 1`"
+ test yes = "$verbose" && $DIFF $expect $actual |sed 's/^/ /'
+ fi
+
+ # Clean up output file
+ if test -z "$HDF5_NOCLEANUP"; then
+ rm -f $actual $actual_sav
+ fi
}
# Single run of tool
@@ -258,30 +259,30 @@ CMPTEST()
# any unexpected output from that stream too.
TESTING $H5MKGRP $@
(
- cd $TESTDIR
- $RUNSERIAL $H5MKGRP_BIN $@
+ cd $TESTDIR
+ $RUNSERIAL $H5MKGRP_BIN $@
) >$actual 2>$actual_err
cat $actual_err >> $actual
- if [ ! -f $expect ]; then
- # Create the expect file if it doesn't yet exist.
- echo " CREATED"
- cp $actual $expect
- echo " Expected result (*.txt) missing"
- nerrors="`expr $nerrors + 1`"
- elif $CMP $expect $actual; then
- echo " PASSED"
- else
- echo "*FAILED*"
- echo " Expected result (*.txt) differs from actual result (*.out)"
- nerrors="`expr $nerrors + 1`"
- test yes = "$verbose" && $DIFF $expect $actual |sed 's/^/ /'
- fi
-
- # Clean up output file
- if test -z "$HDF5_NOCLEANUP"; then
- rm -f $actual $actual_err
- fi
+ if [ ! -f $expect ]; then
+ # Create the expect file if it doesn't yet exist.
+ echo " CREATED"
+ cp $actual $expect
+ echo " Expected result (*.txt) missing"
+ nerrors="`expr $nerrors + 1`"
+ elif $CMP $expect $actual; then
+ echo " PASSED"
+ else
+ echo "*FAILED*"
+ echo " Expected result (*.txt) differs from actual result (*.out)"
+ nerrors="`expr $nerrors + 1`"
+ test yes = "$verbose" && $DIFF $expect $actual |sed 's/^/ /'
+ fi
+
+ # Clean up output file
+ if test -z "$HDF5_NOCLEANUP"; then
+ rm -f $actual $actual_err
+ fi
}
##############################################################################
diff --git a/tools/test/misc/vds/CMakeLists.txt b/tools/test/misc/vds/CMakeLists.txt
index 092cabc..71261c4 100644
--- a/tools/test/misc/vds/CMakeLists.txt
+++ b/tools/test/misc/vds/CMakeLists.txt
@@ -1,4 +1,4 @@
-cmake_minimum_required (VERSION 3.10)
+cmake_minimum_required (VERSION 3.12)
project (HDF5_TOOLS_TEST_MISC_VDS C)
MACRO (ADD_H5_GENERATOR genfile)
diff --git a/tools/test/misc/vds/Makefile.in b/tools/test/misc/vds/Makefile.in
index e539a2f..657f615 100644
--- a/tools/test/misc/vds/Makefile.in
+++ b/tools/test/misc/vds/Makefile.in
@@ -433,15 +433,15 @@ AMTAR = @AMTAR@
# H5_CFLAGS holds flags that should be used when building hdf5,
# but which should not be exported to h5cc for building other programs.
-# AM_CFLAGS is an automake construct which should be used by Makefiles
+# AM_CFLAGS is an automake construct which should be used by Makefiles
# instead of CFLAGS, as CFLAGS is reserved solely for the user to define.
# This applies to FCFLAGS, CXXFLAGS, CPPFLAGS, and LDFLAGS as well.
-AM_CFLAGS = @AM_CFLAGS@ @H5_CFLAGS@
+AM_CFLAGS = @AM_CFLAGS@ @H5_CFLAGS@ @H5_ECFLAGS@
# Include src directory
AM_CPPFLAGS = @AM_CPPFLAGS@ @H5_CPPFLAGS@ -I$(top_srcdir)/src \
-I$(top_srcdir)/tools/lib -I$(top_srcdir)/tools/test/misc/vds
-AM_CXXFLAGS = @AM_CXXFLAGS@ @H5_CXXFLAGS@
+AM_CXXFLAGS = @AM_CXXFLAGS@ @H5_CXXFLAGS@ @H5_ECXXFLAGS@
AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
AM_FCFLAGS = @AM_FCFLAGS@ @H5_FCFLAGS@
AM_JAVACFLAGS = @AM_JAVACFLAGS@
@@ -461,6 +461,7 @@ CC = @CC@
CCDEPMODE = @CCDEPMODE@
CC_VERSION = @CC_VERSION@
CFLAGS = @CFLAGS@
+CLANG_SANITIZE_CHECKS = @CLANG_SANITIZE_CHECKS@
CODESTACK = @CODESTACK@
CONFIG_DATE = @CONFIG_DATE@
CONFIG_MODE = @CONFIG_MODE@
@@ -477,6 +478,7 @@ DEFAULT_API_VERSION = @DEFAULT_API_VERSION@
DEFS = @DEFS@
DEPDIR = @DEPDIR@
DEPRECATED_SYMBOLS = @DEPRECATED_SYMBOLS@
+DESIRED_FILE_LOCKING = @DESIRED_FILE_LOCKING@
DEV_WARNINGS = @DEV_WARNINGS@
DIRECT_VFD = @DIRECT_VFD@
DLLTOOL = @DLLTOOL@
@@ -513,8 +515,11 @@ H5_CFLAGS = @H5_CFLAGS@
H5_CLASSPATH = @H5_CLASSPATH@
H5_CPPFLAGS = @H5_CPPFLAGS@
H5_CXXFLAGS = @H5_CXXFLAGS@
+H5_ECFLAGS = @H5_ECFLAGS@
+H5_ECXXFLAGS = @H5_ECXXFLAGS@
H5_FCFLAGS = @H5_FCFLAGS@
H5_FORTRAN_SHARED = @H5_FORTRAN_SHARED@
+H5_IS_DARWIN = @H5_IS_DARWIN@
H5_JAVACFLAGS = @H5_JAVACFLAGS@
H5_JAVAFLAGS = @H5_JAVAFLAGS@
H5_JNIFLAGS = @H5_JNIFLAGS@
@@ -537,6 +542,7 @@ HL = @HL@
HL_FOR = @HL_FOR@
HSIZE_T = @HSIZE_T@
HSSIZE_T = @HSSIZE_T@
+IGNORE_DISABLED_FILE_LOCKS = @IGNORE_DISABLED_FILE_LOCKS@
INSTALL = @INSTALL@
INSTALL_DATA = @INSTALL_DATA@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
@@ -573,6 +579,7 @@ MAINT = @MAINT@
MAKEINFO = @MAKEINFO@
MANIFEST_TOOL = @MANIFEST_TOOL@
MEMORYALLOCSANITYCHECK = @MEMORYALLOCSANITYCHECK@
+MIRROR_VFD = @MIRROR_VFD@
MKDIR_P = @MKDIR_P@
MPE = @MPE@
NM = @NM@
@@ -632,6 +639,7 @@ TIME = @TIME@
TR = @TR@
TRACE_API = @TRACE_API@
UNAME_INFO = @UNAME_INFO@
+USE_FILE_LOCKING = @USE_FILE_LOCKING@
USE_FILTER_DEFLATE = @USE_FILTER_DEFLATE@
USE_FILTER_SZIP = @USE_FILTER_SZIP@
USINGMEMCHECKER = @USINGMEMCHECKER@
@@ -667,6 +675,7 @@ docdir = $(exec_prefix)/doc
dvidir = @dvidir@
enable_shared = @enable_shared@
enable_static = @enable_static@
+examplesdir = @examplesdir@
exec_prefix = @exec_prefix@
fortran_linux_linker_option = @fortran_linux_linker_option@
host = @host@
@@ -723,15 +732,15 @@ LIBH5_HL = $(top_builddir)/hl/src/libhdf5_hl.la
LIBH5F_HL = $(top_builddir)/hl/fortran/src/libhdf5hl_fortran.la
LIBH5CPP_HL = $(top_builddir)/hl/c++/src/libhdf5_hl_cpp.la
-# Note that in svn revision 19400 the '/' after DESTDIR in H5* variables below
-# has been removed. According to the official description of DESTDIR by Gnu at
-# http://www.gnu.org/prep/standards/html_node/DESTDIR.html, DESTDIR is
-# prepended to the normal and complete install path that it precedes for the
-# purpose of installing in a temporary directory which is useful for building
-# rpms and other packages. The '/' after ${DESTDIR} will be followed by another
-# '/' at the beginning of the normal install path. When DESTDIR is empty the
-# path then begins with '//', which is incorrect and causes problems at least for
-# Cygwin.
+# Note that in svn revision 19400 the '/' after DESTDIR in H5* variables below
+# has been removed. According to the official description of DESTDIR by Gnu at
+# http://www.gnu.org/prep/standards/html_node/DESTDIR.html, DESTDIR is
+# prepended to the normal and complete install path that it precedes for the
+# purpose of installing in a temporary directory which is useful for building
+# rpms and other packages. The '/' after ${DESTDIR} will be followed by another
+# '/' at the beginning of the normal install path. When DESTDIR is empty the
+# path then begins with '//', which is incorrect and causes problems at least for
+# Cygwin.
# Scripts used to build examples
# If only shared libraries have been installed, have h5cc build examples with
@@ -773,7 +782,7 @@ LIB = $(lib_LIBRARIES) $(lib_LTLIBRARIES) $(noinst_LIBRARIES) \
PROGS = $(bin_PROGRAMS) $(bin_SCRIPTS) $(noinst_PROGRAMS) $(noinst_SCRIPTS) \
$(EXTRA_PROG)
-chk_TESTS = $(check_PROGRAMS) $(check_SCRIPTS) $(EXTRA_TEST)
+chk_TESTS = $(check_PROGRAMS) $(check_SCRIPTS) $(EXTRA_TEST)
TEST_EXTENSIONS = .sh
SH_LOG_COMPILER = $(SHELL)
AM_SH_LOG_FLAGS =
@@ -1383,28 +1392,37 @@ $(TEST_PROG_CHKEXE) $(TEST_PROG_PARA_CHKEXE) dummy.chkexe_:
echo "============================" > $${log}; \
fi; \
if test "X$(FORTRAN_API)" = "Xyes"; then \
- echo "Fortran API: Testing $(HDF5_DRIVER) $${tname} $(TEST_FLAGS)"; \
+ echo "Fortran API: Testing $${tname} $(TEST_FLAGS)"; \
if test -n "$(REALTIMEOUTPUT)"; then \
- echo "Fortran API: $(HDF5_DRIVER) $${tname} $(TEST_FLAGS) Test Log" | tee -a $${log}; \
+ echo "Fortran API: Test log for $${tname} $(TEST_FLAGS)" | tee -a $${log}; \
else \
- echo "Fortran API: $(HDF5_DRIVER) $${tname} $(TEST_FLAGS) Test Log" >> $${log}; \
+ echo "Fortran API: Test log for $${tname} $(TEST_FLAGS)" >> $${log}; \
fi; \
elif test "X$(CXX_API)" = "Xyes"; then \
- echo "C++ API: Testing $(HDF5_DRIVER) $${tname} $(TEST_FLAGS)"; \
+ echo "C++ API: Testing $${tname} $(TEST_FLAGS)"; \
if test -n "$(REALTIMEOUTPUT)"; then \
- echo "C++ API: $(HDF5_DRIVER) $${tname} $(TEST_FLAGS) Test Log" | tee -a $${log};\
+ echo "C++ API: Test log for $${tname} $(TEST_FLAGS)" | tee -a $${log};\
else \
- echo "C++ API: $(HDF5_DRIVER) $${tname} $(TEST_FLAGS) Test Log" >> $${log};\
+ echo "C++ API: Test log for $${tname} $(TEST_FLAGS)" >> $${log};\
fi; \
else \
- echo "Testing $(HDF5_DRIVER) $${tname} $(TEST_FLAGS)"; \
+ echo "Testing: $${tname} $(TEST_FLAGS)"; \
if test -n "$(REALTIMEOUTPUT)"; then \
- echo "$(HDF5_DRIVER) $${tname} $(TEST_FLAGS) Test Log" | tee -a $${log}; \
+ echo "Test log for $${tname} $(TEST_FLAGS)" | tee -a $${log}; \
else \
- echo "$(HDF5_DRIVER) $${tname} $(TEST_FLAGS) Test Log" >> $${log}; \
+ echo "Test log for $${tname} $(TEST_FLAGS)" >> $${log}; \
fi; \
fi; \
if test -n "$(REALTIMEOUTPUT)"; then \
+ if test -n "$(HDF5_DRIVER)"; then \
+ echo "Virtual file driver (VFD): $(HDF5_DRIVER)" | tee -a $${log}; \
+ fi; \
+ else \
+ if test -n "$(HDF5_DRIVER)"; then \
+ echo "Virtual file driver (VFD): $(HDF5_DRIVER)" >> $${log}; \
+ fi; \
+ fi; \
+ if test -n "$(REALTIMEOUTPUT)"; then \
echo "============================" | tee -a $${log}; \
else \
echo "============================" >> $${log}; \
diff --git a/tools/test/misc/vds/UC_1.h b/tools/test/misc/vds/UC_1.h
index 9d1f758..d922d22 100644
--- a/tools/test/misc/vds/UC_1.h
+++ b/tools/test/misc/vds/UC_1.h
@@ -49,7 +49,7 @@
| |
+-------M-------+
-
+
dim[0]
/
diff --git a/tools/test/misc/vds/UC_1_one_dim_gen.c b/tools/test/misc/vds/UC_1_one_dim_gen.c
index b997280..7c4201e 100644
--- a/tools/test/misc/vds/UC_1_one_dim_gen.c
+++ b/tools/test/misc/vds/UC_1_one_dim_gen.c
@@ -44,7 +44,7 @@ static char UC_1_VDS_FILE_NAME[NAME_LEN] = "1_vds.h5";
/* Dataset names */
static char UC_1_SOURCE_DSET_NAME[NAME_LEN] = "source_dset";
static char UC_1_VDS_DSET_NAME[NAME_LEN] = "vds_dset";
-
+
/* Fill values */
static int UC_1_FILL_VALUES[UC_1_N_SOURCES] = {
-1,
@@ -59,16 +59,16 @@ static int UC_1_VDS_FILL_VALUE = -9;
int
main(void)
{
- hid_t src_sid = -1; /* source dataset's dataspace ID */
- hid_t src_dcplid = -1; /* source dataset property list ID */
+ hid_t src_sid = H5I_INVALID_HID; /* source dataset's dataspace ID */
+ hid_t src_dcplid = H5I_INVALID_HID; /* source dataset property list ID */
- hid_t vds_sid = -1; /* VDS dataspace ID */
- hid_t vds_dcplid = -1; /* VDS dataset property list ID */
+ hid_t vds_sid = H5I_INVALID_HID; /* VDS dataspace ID */
+ hid_t vds_dcplid = H5I_INVALID_HID; /* VDS dataset property list ID */
- hid_t fid = -1; /* HDF5 file ID */
- hid_t did = -1; /* dataset ID */
- hid_t msid = -1; /* memory dataspace ID */
- hid_t fsid = -1; /* file dataspace ID */
+ hid_t fid = H5I_INVALID_HID; /* HDF5 file ID */
+ hid_t did = H5I_INVALID_HID; /* dataset ID */
+ hid_t msid = H5I_INVALID_HID; /* memory dataspace ID */
+ hid_t fsid = H5I_INVALID_HID; /* file dataspace ID */
hsize_t extent[RANK]; /* dataset extents */
hsize_t start[RANK]; /* starting point for hyperslab */
@@ -162,7 +162,7 @@ main(void)
value = ((i + 1) * 10) + j;
for(k = 0; k < count; k++)
- buffer[k] = value;
+ buffer[k] = value;
start[0] = (hsize_t)j;
start[1] = 0;
diff --git a/tools/test/misc/vds/UC_2.h b/tools/test/misc/vds/UC_2.h
index a3ee0f7..07f9b9a 100644
--- a/tools/test/misc/vds/UC_2.h
+++ b/tools/test/misc/vds/UC_2.h
@@ -45,7 +45,7 @@
|
|
dim[1]
-
+
*/
#define UC_2_N_SOURCES 5
@@ -98,7 +98,7 @@ static char UC_2_FILE_NAMES[UC_2_N_SOURCES][NAME_LEN] = {
/* VDS file name */
#define UC_2_VDS_FILE_NAME "2_vds.h5"
-
+
/* Dataset names */
#define UC_2_SOURCE_DSET_NAME "source_dset"
#define UC_2_SOURCE_DSET_PATH "/source_dset"
diff --git a/tools/test/misc/vds/UC_2_two_dims_gen.c b/tools/test/misc/vds/UC_2_two_dims_gen.c
index bd70fda..b9799d6 100644
--- a/tools/test/misc/vds/UC_2_two_dims_gen.c
+++ b/tools/test/misc/vds/UC_2_two_dims_gen.c
@@ -68,16 +68,16 @@ static int UC_2_VDS_FILL_VALUE = -9;
int
main(void)
{
- hid_t src_sid = -1; /* source dataset's dataspace ID */
- hid_t src_dcplid = -1; /* source dataset property list ID */
+ hid_t src_sid = H5I_INVALID_HID; /* source dataset's dataspace ID */
+ hid_t src_dcplid = H5I_INVALID_HID; /* source dataset property list ID */
- hid_t vds_sid = -1; /* VDS dataspace ID */
- hid_t vds_dcplid = -1; /* VDS dataset property list ID */
+ hid_t vds_sid = H5I_INVALID_HID; /* VDS dataspace ID */
+ hid_t vds_dcplid = H5I_INVALID_HID; /* VDS dataset property list ID */
- hid_t fid = -1; /* HDF5 file ID */
- hid_t did = -1; /* dataset ID */
- hid_t msid = -1; /* memory dataspace ID */
- hid_t fsid = -1; /* file dataspace ID */
+ hid_t fid = H5I_INVALID_HID; /* HDF5 file ID */
+ hid_t did = H5I_INVALID_HID; /* dataset ID */
+ hid_t msid = H5I_INVALID_HID; /* memory dataspace ID */
+ hid_t fsid = H5I_INVALID_HID; /* file dataspace ID */
hsize_t start[RANK]; /* starting point for hyperslab */
hsize_t extent[RANK]; /* dataset extents */
@@ -168,7 +168,7 @@ main(void)
value = ((i + 1) * 10) + j;
for(k = 0; k < count; k++)
- buffer[k] = value;
+ buffer[k] = value;
start[0] = (hsize_t)j;
start[1] = 0;
diff --git a/tools/test/misc/vds/UC_3_gaps_gen.c b/tools/test/misc/vds/UC_3_gaps_gen.c
index e6e7226..74a23dc 100644
--- a/tools/test/misc/vds/UC_3_gaps_gen.c
+++ b/tools/test/misc/vds/UC_3_gaps_gen.c
@@ -29,12 +29,12 @@
static herr_t
create_3_1_vds(void)
{
- hid_t src_sid = -1; /* source dataset's dataspace ID */
- hid_t vds_sid = -1; /* VDS dataspace ID */
- hid_t vds_dcplid = -1; /* VDS dataset property list ID */
+ hid_t src_sid = H5I_INVALID_HID; /* source dataset's dataspace ID */
+ hid_t vds_sid = H5I_INVALID_HID; /* VDS dataspace ID */
+ hid_t vds_dcplid = H5I_INVALID_HID; /* VDS dataset property list ID */
- hid_t fid = -1; /* HDF5 file ID */
- hid_t did = -1; /* dataset ID */
+ hid_t fid = H5I_INVALID_HID; /* HDF5 file ID */
+ hid_t did = H5I_INVALID_HID; /* dataset ID */
hsize_t start[RANK]; /* source starting point for hyperslab */
hsize_t position[RANK]; /* vds mapping positions */
@@ -136,12 +136,12 @@ error:
static herr_t
create_3_2_vds(void)
{
- hid_t src_sid = -1; /* source dataset's dataspace ID */
- hid_t vds_sid = -1; /* VDS dataspace ID */
- hid_t vds_dcplid = -1; /* VDS dataset property list ID */
+ hid_t src_sid = H5I_INVALID_HID; /* source dataset's dataspace ID */
+ hid_t vds_sid = H5I_INVALID_HID; /* VDS dataspace ID */
+ hid_t vds_dcplid = H5I_INVALID_HID; /* VDS dataset property list ID */
- hid_t fid = -1; /* HDF5 file ID */
- hid_t did = -1; /* dataset ID */
+ hid_t fid = H5I_INVALID_HID; /* HDF5 file ID */
+ hid_t did = H5I_INVALID_HID; /* dataset ID */
hsize_t start[RANK]; /* source starting point for hyperslab */
diff --git a/tools/test/misc/vds/UC_4_printf_gen.c b/tools/test/misc/vds/UC_4_printf_gen.c
index b328046..24451e9 100644
--- a/tools/test/misc/vds/UC_4_printf_gen.c
+++ b/tools/test/misc/vds/UC_4_printf_gen.c
@@ -27,16 +27,16 @@
int
main(void)
{
- hid_t src_sid = -1; /* source dataset's dataspace ID */
- hid_t src_dcplid = -1; /* source dataset property list ID */
+ hid_t src_sid = H5I_INVALID_HID; /* source dataset's dataspace ID */
+ hid_t src_dcplid = H5I_INVALID_HID; /* source dataset property list ID */
- hid_t vds_sid = -1; /* VDS dataspace ID */
- hid_t vds_dcplid = -1; /* VDS dataset property list ID */
+ hid_t vds_sid = H5I_INVALID_HID; /* VDS dataspace ID */
+ hid_t vds_dcplid = H5I_INVALID_HID; /* VDS dataset property list ID */
- hid_t fid = -1; /* HDF5 file ID */
- hid_t did = -1; /* dataset ID */
- hid_t msid = -1; /* memory dataspace ID */
- hid_t fsid = -1; /* file dataspace ID */
+ hid_t fid = H5I_INVALID_HID; /* HDF5 file ID */
+ hid_t did = H5I_INVALID_HID; /* dataset ID */
+ hid_t msid = H5I_INVALID_HID; /* memory dataspace ID */
+ hid_t fsid = H5I_INVALID_HID; /* file dataspace ID */
/* Hyperslab arrays */
hsize_t start[RANK] = {0, 0, 0};
diff --git a/tools/test/misc/vds/UC_5_stride_gen.c b/tools/test/misc/vds/UC_5_stride_gen.c
index a105bbd..726ce6e 100644
--- a/tools/test/misc/vds/UC_5_stride_gen.c
+++ b/tools/test/misc/vds/UC_5_stride_gen.c
@@ -27,16 +27,16 @@
int
main(void)
{
- hid_t src_sid = -1; /* source dataset's dataspace ID */
- hid_t src_dcplid = -1; /* source dataset property list ID */
+ hid_t src_sid = H5I_INVALID_HID; /* source dataset's dataspace ID */
+ hid_t src_dcplid = H5I_INVALID_HID; /* source dataset property list ID */
- hid_t vds_sid = -1; /* VDS dataspace ID */
- hid_t vds_dcplid = -1; /* VDS dataset property list ID */
+ hid_t vds_sid = H5I_INVALID_HID; /* VDS dataspace ID */
+ hid_t vds_dcplid = H5I_INVALID_HID; /* VDS dataset property list ID */
- hid_t fid = -1; /* HDF5 file ID */
- hid_t did = -1; /* dataset ID */
- hid_t msid = -1; /* memory dataspace ID */
- hid_t fsid = -1; /* file dataspace ID */
+ hid_t fid = H5I_INVALID_HID; /* HDF5 file ID */
+ hid_t did = H5I_INVALID_HID; /* dataset ID */
+ hid_t msid = H5I_INVALID_HID; /* memory dataspace ID */
+ hid_t fsid = H5I_INVALID_HID; /* file dataspace ID */
hsize_t extent[RANK]; /* source dataset extents */
hsize_t start[RANK]; /* starting point for hyperslab */
diff --git a/tools/test/perform/CMakeLists.txt b/tools/test/perform/CMakeLists.txt
index d6a25d5..3c45e85 100644
--- a/tools/test/perform/CMakeLists.txt
+++ b/tools/test/perform/CMakeLists.txt
@@ -1,4 +1,4 @@
-cmake_minimum_required (VERSION 3.10)
+cmake_minimum_required (VERSION 3.12)
project (HDF5_TOOLS_TEST_PERFORM C)
# --------------------------------------------------------------------
@@ -21,20 +21,21 @@ endif ()
set_target_properties (h5perf_serial PROPERTIES FOLDER perform)
if (HDF5_BUILD_PERFORM_STANDALONE)
- #-- Adding test for h5perf_serial_alone
+ #-- Adding test for h5perf_serial_alone - io_timer.c includes
set (h5perf_serial_alone_SOURCES
+ ${HDF5_TOOLS_DIR}/lib/io_timer.c
${HDF5_TOOLS_TEST_PERFORM_SOURCE_DIR}/sio_perf.c
${HDF5_TOOLS_TEST_PERFORM_SOURCE_DIR}/sio_engine.c
${HDF5_TOOLS_TEST_PERFORM_SOURCE_DIR}/sio_standalone.c
)
add_executable (h5perf_serial_alone ${h5perf_serial_alone_SOURCES})
- target_include_directories (h5perf_serial_alone PRIVATE "${HDF5_SRC_DIR};${HDF5_BINARY_DIR};$<$<BOOL:${HDF5_ENABLE_PARALLEL}>:${MPI_C_INCLUDE_DIRS}>")
+ target_include_directories (h5perf_serial_alone PRIVATE "${HDF5_SRC_DIR};${HDF5_BINARY_DIR};${HDF5_TOOLS_DIR}/lib;$<$<BOOL:${HDF5_ENABLE_PARALLEL}>:${MPI_C_INCLUDE_DIRS}>")
if (NOT BUILD_SHARED_LIBS)
TARGET_C_PROPERTIES (h5perf_serial_alone STATIC)
- target_link_libraries (h5perf_serial_alone PRIVATE ${HDF5_TOOLS_LIB_TARGET} ${HDF5_TEST_LIB_TARGET} ${HDF5_LIB_TARGET})
+ target_link_libraries (h5perf_serial_alone PRIVATE ${HDF5_LIB_TARGET} "$<$<BOOL:${HDF5_ENABLE_PARALLEL}>:${MPI_C_LIBRARIES}>")
else ()
TARGET_C_PROPERTIES (h5perf_serial_alone SHARED)
- target_link_libraries (h5perf_serial_alone PRIVATE ${HDF5_TOOLS_LIBSH_TARGET} ${HDF5_TEST_LIBSH_TARGET} ${HDF5_LIBSH_TARGET})
+ target_link_libraries (h5perf_serial_alone PRIVATE ${HDF5_LIBSH_TARGET} "$<$<BOOL:${HDF5_ENABLE_PARALLEL}>:${MPI_C_LIBRARIES}>")
endif ()
set_target_properties (h5perf_serial_alone PROPERTIES FOLDER perform)
set_property (TARGET h5perf_serial_alone
@@ -72,6 +73,21 @@ else ()
endif ()
set_target_properties (iopipe PROPERTIES FOLDER perform)
+#-- Adding test for chunk_cache
+set (chunk_cache_SOURCES
+ ${HDF5_TOOLS_TEST_PERFORM_SOURCE_DIR}/chunk_cache.c
+)
+add_executable (chunk_cache ${chunk_cache_SOURCES})
+target_include_directories (chunk_cache PRIVATE "${HDF5_TEST_SRC_DIR};${HDF5_SRC_DIR};${HDF5_BINARY_DIR};$<$<BOOL:${HDF5_ENABLE_PARALLEL}>:${MPI_C_INCLUDE_DIRS}>")
+if (NOT BUILD_SHARED_LIBS)
+ TARGET_C_PROPERTIES (chunk_cache STATIC)
+ target_link_libraries (chunk_cache PRIVATE ${HDF5_TOOLS_LIB_TARGET} ${HDF5_LIB_TARGET})
+else ()
+ TARGET_C_PROPERTIES (chunk_cache SHARED)
+ target_link_libraries (chunk_cache PRIVATE ${HDF5_TOOLS_LIBSH_TARGET} ${HDF5_LIBSH_TARGET})
+endif ()
+set_target_properties (chunk_cache PROPERTIES FOLDER perform)
+
#-- Adding test for overhead
set (overhead_SOURCES
${HDF5_TOOLS_TEST_PERFORM_SOURCE_DIR}/overhead.c
@@ -117,7 +133,7 @@ else ()
endif ()
set_target_properties (zip_perf PROPERTIES FOLDER perform)
-if (H5_HAVE_PARALLEL AND BUILD_TESTING)
+if (H5_HAVE_PARALLEL AND HDF5_TEST_PARALLEL)
if (UNIX)
#-- Adding test for perf - only on unix systems
set (perf_SOURCES
@@ -154,18 +170,19 @@ if (H5_HAVE_PARALLEL AND BUILD_TESTING)
if (HDF5_BUILD_PERFORM_STANDALONE)
#-- Adding test for h5perf
set (h5perf_alone_SOURCES
+ ${HDF5_TOOLS_DIR}/lib/io_timer.c
${HDF5_TOOLS_TEST_PERFORM_SOURCE_DIR}/pio_perf.c
${HDF5_TOOLS_TEST_PERFORM_SOURCE_DIR}/pio_engine.c
${HDF5_TOOLS_TEST_PERFORM_SOURCE_DIR}/pio_standalone.c
)
add_executable (h5perf_alone ${h5perf_alone_SOURCES})
- target_include_directories (h5perf_alone PRIVATE "${HDF5_SRC_DIR};${HDF5_BINARY_DIR};$<$<BOOL:${HDF5_ENABLE_PARALLEL}>:${MPI_C_INCLUDE_DIRS}>")
+ target_include_directories (h5perf_alone PRIVATE "${HDF5_SRC_DIR};${HDF5_BINARY_DIR};${HDF5_TOOLS_DIR}/lib;$<$<BOOL:${HDF5_ENABLE_PARALLEL}>:${MPI_C_INCLUDE_DIRS}>")
if (NOT BUILD_SHARED_LIBS)
TARGET_C_PROPERTIES (h5perf_alone STATIC)
- target_link_libraries (h5perf_alone PRIVATE ${HDF5_TOOLS_LIB_TARGET} ${HDF5_TEST_LIB_TARGET} ${HDF5_LIB_TARGET})
+ target_link_libraries (h5perf_alone PRIVATE ${HDF5_LIB_TARGET} ${LINK_LIBS} "$<$<BOOL:${HDF5_ENABLE_PARALLEL}>:${MPI_C_LIBRARIES}>")
else ()
TARGET_C_PROPERTIES (h5perf_alone SHARED)
- target_link_libraries (h5perf_alone PRIVATE ${HDF5_TOOLS_LIBSH_TARGET} ${HDF5_TEST_LIBSH_TARGET} ${HDF5_LIBSH_TARGET})
+ target_link_libraries (h5perf_alone PRIVATE ${HDF5_LIBSH_TARGET} ${LINK_LIBS} "$<$<BOOL:${HDF5_ENABLE_PARALLEL}>:${MPI_C_LIBRARIES}>")
endif ()
set_target_properties (h5perf_alone PROPERTIES FOLDER perform)
set_property (TARGET h5perf_alone
@@ -174,4 +191,6 @@ if (H5_HAVE_PARALLEL AND BUILD_TESTING)
endif ()
endif ()
-include (CMakeTests.cmake)
+if (HDF5_TEST_TOOLS)
+ include (CMakeTests.cmake)
+endif ()
diff --git a/tools/test/perform/CMakeTests.cmake b/tools/test/perform/CMakeTests.cmake
index f0ae416..5d61f7b 100644
--- a/tools/test/perform/CMakeTests.cmake
+++ b/tools/test/perform/CMakeTests.cmake
@@ -22,175 +22,176 @@ add_custom_target(zip_perf_files ALL COMMENT "Copying files needed by zip_perf t
#-----------------------------------------------------------------------------
# Add Tests
#-----------------------------------------------------------------------------
+if (HDF5_TEST_SERIAL)
+ # Remove any output file left over from previous test run
+ add_test (
+ NAME PERFORM_h5perform-clearall-objects
+ COMMAND ${CMAKE_COMMAND}
+ -E remove
+ chunk.h5
+ iopipe.h5
+ iopipe.raw
+ x-diag-rd.dat
+ x-diag-wr.dat
+ x-rowmaj-rd.dat
+ x-rowmaj-wr.dat
+ x-gnuplot
+ h5perf_serial.txt
+ h5perf_serial.txt.err
+ chunk.txt
+ chunk.txt.err
+ iopipe.txt
+ iopipe.txt.err
+ overhead.txt
+ overhead.txt.err
+ perf_meta.txt
+ perf_meta.txt.err
+ zip_perf-h.txt
+ zip_perf-h.txt.err
+ zip_perf.txt
+ zip_perf.txt.err
+ )
-# Remove any output file left over from previous test run
-add_test (
- NAME PERFORM_h5perform-clearall-objects
- COMMAND ${CMAKE_COMMAND}
- -E remove
- chunk.h5
- iopipe.h5
- iopipe.raw
- x-diag-rd.dat
- x-diag-wr.dat
- x-rowmaj-rd.dat
- x-rowmaj-wr.dat
- x-gnuplot
- h5perf_serial.txt
- h5perf_serial.txt.err
- chunk.txt
- chunk.txt.err
- iopipe.txt
- iopipe.txt.err
- overhead.txt
- overhead.txt.err
- perf_meta.txt
- perf_meta.txt.err
- zip_perf-h.txt
- zip_perf-h.txt.err
- zip_perf.txt
- zip_perf.txt.err
-)
-
-if (HDF5_ENABLE_USING_MEMCHECKER)
- add_test (NAME PERFORM_h5perf_serial COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} $<TARGET_FILE:h5perf_serial>)
-else ()
- add_test (NAME PERFORM_h5perf_serial COMMAND "${CMAKE_COMMAND}"
- -D "TEST_EMULATOR=${CMAKE_CROSSCOMPILING_EMULATOR}"
- -D "TEST_PROGRAM=$<TARGET_FILE:h5perf_serial>"
- -D "TEST_ARGS:STRING="
- -D "TEST_EXPECT=0"
- -D "TEST_SKIP_COMPARE=TRUE"
- -D "TEST_OUTPUT=h5perf_serial.txt"
- #-D "TEST_REFERENCE=h5perf_serial.out"
- -D "TEST_FOLDER=${PROJECT_BINARY_DIR}"
- -P "${HDF_RESOURCES_EXT_DIR}/runTest.cmake"
+ if (HDF5_ENABLE_USING_MEMCHECKER)
+ add_test (NAME PERFORM_h5perf_serial COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} $<TARGET_FILE:h5perf_serial>)
+ else ()
+ add_test (NAME PERFORM_h5perf_serial COMMAND "${CMAKE_COMMAND}"
+ -D "TEST_EMULATOR=${CMAKE_CROSSCOMPILING_EMULATOR}"
+ -D "TEST_PROGRAM=$<TARGET_FILE:h5perf_serial>"
+ -D "TEST_ARGS:STRING="
+ -D "TEST_EXPECT=0"
+ -D "TEST_SKIP_COMPARE=TRUE"
+ -D "TEST_OUTPUT=h5perf_serial.txt"
+ #-D "TEST_REFERENCE=h5perf_serial.out"
+ -D "TEST_FOLDER=${PROJECT_BINARY_DIR}"
+ -P "${HDF_RESOURCES_EXT_DIR}/runTest.cmake"
+ )
+ endif ()
+ set_tests_properties (PERFORM_h5perf_serial PROPERTIES
+ TIMEOUT ${CTEST_VERY_LONG_TIMEOUT}
+ DEPENDS "PERFORM_h5perform-clearall-objects"
)
-endif ()
-set_tests_properties (PERFORM_h5perf_serial PROPERTIES
- TIMEOUT ${CTEST_VERY_LONG_TIMEOUT}
- DEPENDS "PERFORM_h5perform-clearall-objects"
-)
-if (HDF5_BUILD_PERFORM_STANDALONE)
- add_test (NAME PERFORM_h5perf_serial_alone COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} $<TARGET_FILE:h5perf_serial_alone>)
-endif ()
+ if (HDF5_BUILD_PERFORM_STANDALONE)
+ add_test (NAME PERFORM_h5perf_serial_alone COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} $<TARGET_FILE:h5perf_serial_alone>)
+ endif ()
-if (HDF5_ENABLE_USING_MEMCHECKER)
- add_test (NAME PERFORM_chunk COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} $<TARGET_FILE:chunk>)
-else ()
- add_test (NAME PERFORM_chunk COMMAND "${CMAKE_COMMAND}"
- -D "TEST_EMULATOR=${CMAKE_CROSSCOMPILING_EMULATOR}"
- -D "TEST_PROGRAM=$<TARGET_FILE:chunk>"
- -D "TEST_ARGS:STRING="
- -D "TEST_EXPECT=0"
- -D "TEST_SKIP_COMPARE=TRUE"
- -D "TEST_OUTPUT=chunk.txt"
- #-D "TEST_REFERENCE=chunk.out"
- -D "TEST_FOLDER=${PROJECT_BINARY_DIR}"
- -P "${HDF_RESOURCES_EXT_DIR}/runTest.cmake"
+ if (HDF5_ENABLE_USING_MEMCHECKER)
+ add_test (NAME PERFORM_chunk COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} $<TARGET_FILE:chunk>)
+ else ()
+ add_test (NAME PERFORM_chunk COMMAND "${CMAKE_COMMAND}"
+ -D "TEST_EMULATOR=${CMAKE_CROSSCOMPILING_EMULATOR}"
+ -D "TEST_PROGRAM=$<TARGET_FILE:chunk>"
+ -D "TEST_ARGS:STRING="
+ -D "TEST_EXPECT=0"
+ -D "TEST_SKIP_COMPARE=TRUE"
+ -D "TEST_OUTPUT=chunk.txt"
+ #-D "TEST_REFERENCE=chunk.out"
+ -D "TEST_FOLDER=${PROJECT_BINARY_DIR}"
+ -P "${HDF_RESOURCES_EXT_DIR}/runTest.cmake"
+ )
+ endif ()
+ set_tests_properties (PERFORM_chunk PROPERTIES
+ DEPENDS "PERFORM_h5perform-clearall-objects"
)
-endif ()
-set_tests_properties (PERFORM_chunk PROPERTIES
- DEPENDS "PERFORM_h5perform-clearall-objects"
-)
-if (HDF5_ENABLE_USING_MEMCHECKER)
- add_test (NAME PERFORM_iopipe COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} $<TARGET_FILE:iopipe>)
-else ()
- add_test (NAME PERFORM_iopipe COMMAND "${CMAKE_COMMAND}"
- -D "TEST_EMULATOR=${CMAKE_CROSSCOMPILING_EMULATOR}"
- -D "TEST_PROGRAM=$<TARGET_FILE:iopipe>"
- -D "TEST_ARGS:STRING="
- -D "TEST_EXPECT=0"
- -D "TEST_SKIP_COMPARE=TRUE"
- -D "TEST_OUTPUT=iopipe.txt"
- #-D "TEST_REFERENCE=iopipe.out"
- -D "TEST_FOLDER=${PROJECT_BINARY_DIR}"
- -P "${HDF_RESOURCES_EXT_DIR}/runTest.cmake"
+ if (HDF5_ENABLE_USING_MEMCHECKER)
+ add_test (NAME PERFORM_iopipe COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} $<TARGET_FILE:iopipe>)
+ else ()
+ add_test (NAME PERFORM_iopipe COMMAND "${CMAKE_COMMAND}"
+ -D "TEST_EMULATOR=${CMAKE_CROSSCOMPILING_EMULATOR}"
+ -D "TEST_PROGRAM=$<TARGET_FILE:iopipe>"
+ -D "TEST_ARGS:STRING="
+ -D "TEST_EXPECT=0"
+ -D "TEST_SKIP_COMPARE=TRUE"
+ -D "TEST_OUTPUT=iopipe.txt"
+ #-D "TEST_REFERENCE=iopipe.out"
+ -D "TEST_FOLDER=${PROJECT_BINARY_DIR}"
+ -P "${HDF_RESOURCES_EXT_DIR}/runTest.cmake"
+ )
+ endif ()
+ set_tests_properties (PERFORM_iopipe PROPERTIES
+ DEPENDS "PERFORM_h5perform-clearall-objects"
)
-endif ()
-set_tests_properties (PERFORM_iopipe PROPERTIES
- DEPENDS "PERFORM_h5perform-clearall-objects"
-)
-if (HDF5_ENABLE_USING_MEMCHECKER)
- add_test (NAME PERFORM_overhead COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} $<TARGET_FILE:overhead>)
-else ()
- add_test (NAME PERFORM_overhead COMMAND "${CMAKE_COMMAND}"
- -D "TEST_EMULATOR=${CMAKE_CROSSCOMPILING_EMULATOR}"
- -D "TEST_PROGRAM=$<TARGET_FILE:overhead>"
- -D "TEST_ARGS:STRING="
- -D "TEST_EXPECT=0"
- -D "TEST_SKIP_COMPARE=TRUE"
- -D "TEST_OUTPUT=overhead.txt"
- #-D "TEST_REFERENCE=overhead.out"
- -D "TEST_FOLDER=${PROJECT_BINARY_DIR}"
- -P "${HDF_RESOURCES_EXT_DIR}/runTest.cmake"
+ if (HDF5_ENABLE_USING_MEMCHECKER)
+ add_test (NAME PERFORM_overhead COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} $<TARGET_FILE:overhead>)
+ else ()
+ add_test (NAME PERFORM_overhead COMMAND "${CMAKE_COMMAND}"
+ -D "TEST_EMULATOR=${CMAKE_CROSSCOMPILING_EMULATOR}"
+ -D "TEST_PROGRAM=$<TARGET_FILE:overhead>"
+ -D "TEST_ARGS:STRING="
+ -D "TEST_EXPECT=0"
+ -D "TEST_SKIP_COMPARE=TRUE"
+ -D "TEST_OUTPUT=overhead.txt"
+ #-D "TEST_REFERENCE=overhead.out"
+ -D "TEST_FOLDER=${PROJECT_BINARY_DIR}"
+ -P "${HDF_RESOURCES_EXT_DIR}/runTest.cmake"
+ )
+ endif ()
+ set_tests_properties (PERFORM_overhead PROPERTIES
+ DEPENDS "PERFORM_h5perform-clearall-objects"
)
-endif ()
-set_tests_properties (PERFORM_overhead PROPERTIES
- DEPENDS "PERFORM_h5perform-clearall-objects"
-)
-if (HDF5_ENABLE_USING_MEMCHECKER)
- add_test (NAME PERFORM_perf_meta COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} $<TARGET_FILE:perf_meta>)
-else ()
- add_test (NAME PERFORM_perf_meta COMMAND "${CMAKE_COMMAND}"
- -D "TEST_EMULATOR=${CMAKE_CROSSCOMPILING_EMULATOR}"
- -D "TEST_PROGRAM=$<TARGET_FILE:perf_meta>"
- -D "TEST_ARGS:STRING="
- -D "TEST_EXPECT=0"
- -D "TEST_SKIP_COMPARE=TRUE"
- -D "TEST_OUTPUT=perf_meta.txt"
- #-D "TEST_REFERENCE=perf_meta.out"
- -D "TEST_FOLDER=${PROJECT_BINARY_DIR}"
- -P "${HDF_RESOURCES_EXT_DIR}/runTest.cmake"
+ if (HDF5_ENABLE_USING_MEMCHECKER)
+ add_test (NAME PERFORM_perf_meta COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} $<TARGET_FILE:perf_meta>)
+ else ()
+ add_test (NAME PERFORM_perf_meta COMMAND "${CMAKE_COMMAND}"
+ -D "TEST_EMULATOR=${CMAKE_CROSSCOMPILING_EMULATOR}"
+ -D "TEST_PROGRAM=$<TARGET_FILE:perf_meta>"
+ -D "TEST_ARGS:STRING="
+ -D "TEST_EXPECT=0"
+ -D "TEST_SKIP_COMPARE=TRUE"
+ -D "TEST_OUTPUT=perf_meta.txt"
+ #-D "TEST_REFERENCE=perf_meta.out"
+ -D "TEST_FOLDER=${PROJECT_BINARY_DIR}"
+ -P "${HDF_RESOURCES_EXT_DIR}/runTest.cmake"
+ )
+ endif ()
+ set_tests_properties (PERFORM_perf_meta PROPERTIES
+ DEPENDS "PERFORM_h5perform-clearall-objects"
)
-endif ()
-set_tests_properties (PERFORM_perf_meta PROPERTIES
- DEPENDS "PERFORM_h5perform-clearall-objects"
-)
-if (HDF5_ENABLE_USING_MEMCHECKER)
- add_test (NAME PERFORM_zip_perf_help COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} $<TARGET_FILE:zip_perf> "-h")
-else ()
- add_test (NAME PERFORM_zip_perf_help COMMAND "${CMAKE_COMMAND}"
- -D "TEST_EMULATOR=${CMAKE_CROSSCOMPILING_EMULATOR}"
- -D "TEST_PROGRAM=$<TARGET_FILE:zip_perf>"
- -D "TEST_ARGS:STRING="
- -D "TEST_EXPECT=0"
- -D "TEST_SKIP_COMPARE=TRUE"
- -D "TEST_OUTPUT=zip_perf-h.txt"
- #-D "TEST_REFERENCE=zip_perf-h.out"
- -D "TEST_FOLDER=${PROJECT_BINARY_DIR}"
- -P "${HDF_RESOURCES_EXT_DIR}/runTest.cmake"
+ if (HDF5_ENABLE_USING_MEMCHECKER)
+ add_test (NAME PERFORM_zip_perf_help COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} $<TARGET_FILE:zip_perf> "-h")
+ else ()
+ add_test (NAME PERFORM_zip_perf_help COMMAND "${CMAKE_COMMAND}"
+ -D "TEST_EMULATOR=${CMAKE_CROSSCOMPILING_EMULATOR}"
+ -D "TEST_PROGRAM=$<TARGET_FILE:zip_perf>"
+ -D "TEST_ARGS:STRING="
+ -D "TEST_EXPECT=0"
+ -D "TEST_SKIP_COMPARE=TRUE"
+ -D "TEST_OUTPUT=zip_perf-h.txt"
+ #-D "TEST_REFERENCE=zip_perf-h.out"
+ -D "TEST_FOLDER=${PROJECT_BINARY_DIR}"
+ -P "${HDF_RESOURCES_EXT_DIR}/runTest.cmake"
+ )
+ endif ()
+ set_tests_properties (PERFORM_zip_perf_help PROPERTIES
+ DEPENDS "PERFORM_h5perform-clearall-objects"
)
-endif ()
-set_tests_properties (PERFORM_zip_perf_help PROPERTIES
- DEPENDS "PERFORM_h5perform-clearall-objects"
-)
-if (HDF5_ENABLE_USING_MEMCHECKER)
- add_test (NAME PERFORM_zip_perf COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} $<TARGET_FILE:zip_perf> tfilters.h5)
-else ()
- add_test (NAME PERFORM_zip_perf COMMAND "${CMAKE_COMMAND}"
- -D "TEST_EMULATOR=${CMAKE_CROSSCOMPILING_EMULATOR}"
- -D "TEST_PROGRAM=$<TARGET_FILE:zip_perf>"
- -D "TEST_ARGS:STRING="
- -D "TEST_EXPECT=0"
- -D "TEST_SKIP_COMPARE=TRUE"
- -D "TEST_OUTPUT=zip_perf.txt"
- #-D "TEST_REFERENCE=zip_perf.out"
- -D "TEST_FOLDER=${PROJECT_BINARY_DIR}"
- -P "${HDF_RESOURCES_EXT_DIR}/runTest.cmake"
+ if (HDF5_ENABLE_USING_MEMCHECKER)
+ add_test (NAME PERFORM_zip_perf COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} $<TARGET_FILE:zip_perf> tfilters.h5)
+ else ()
+ add_test (NAME PERFORM_zip_perf COMMAND "${CMAKE_COMMAND}"
+ -D "TEST_EMULATOR=${CMAKE_CROSSCOMPILING_EMULATOR}"
+ -D "TEST_PROGRAM=$<TARGET_FILE:zip_perf>"
+ -D "TEST_ARGS:STRING="
+ -D "TEST_EXPECT=0"
+ -D "TEST_SKIP_COMPARE=TRUE"
+ -D "TEST_OUTPUT=zip_perf.txt"
+ #-D "TEST_REFERENCE=zip_perf.out"
+ -D "TEST_FOLDER=${PROJECT_BINARY_DIR}"
+ -P "${HDF_RESOURCES_EXT_DIR}/runTest.cmake"
+ )
+ endif ()
+ set_tests_properties (PERFORM_zip_perf PROPERTIES
+ DEPENDS "PERFORM_zip_perf_help;PERFORM_h5perform-clearall-objects"
)
endif ()
-set_tests_properties (PERFORM_zip_perf PROPERTIES
- DEPENDS "PERFORM_zip_perf_help;PERFORM_h5perform-clearall-objects"
-)
-if (H5_HAVE_PARALLEL)
+if (H5_HAVE_PARALLEL AND HDF5_TEST_PARALLEL)
if (UNIX)
add_test (NAME MPI_TEST_PERFORM_perf COMMAND ${MPIEXEC_EXECUTABLE} ${MPIEXEC_NUMPROC_FLAG} ${MPIEXEC_MAX_NUMPROCS} ${MPIEXEC_PREFLAGS} $<TARGET_FILE:perf> ${MPIEXEC_POSTFLAGS})
endif ()
diff --git a/tools/test/perform/Makefile.am b/tools/test/perform/Makefile.am
index 5a89a66..39800d7 100644
--- a/tools/test/perform/Makefile.am
+++ b/tools/test/perform/Makefile.am
@@ -50,12 +50,12 @@ if BUILD_PARALLEL_CONDITIONAL
TEST_PROG_PARA=h5perf perf
endif
# Serial test programs.
-TEST_PROG = iopipe chunk overhead zip_perf perf_meta h5perf_serial $(BUILD_ALL_PROGS)
+TEST_PROG = iopipe chunk chunk_cache overhead zip_perf perf_meta h5perf_serial $(BUILD_ALL_PROGS)
# check_PROGRAMS will be built but not installed. Do not any executable
# that is in bin_PROGRAMS already. Otherwise, it will be removed twice in
# "make clean" and some systems, e.g., AIX, do not like it.
-check_PROGRAMS= iopipe chunk overhead zip_perf perf_meta $(BUILD_ALL_PROGS) perf
+check_PROGRAMS= iopipe chunk chunk_cache overhead zip_perf perf_meta $(BUILD_ALL_PROGS) perf
h5perf_SOURCES=pio_perf.c pio_engine.c
h5perf_serial_SOURCES=sio_perf.c sio_engine.c
diff --git a/tools/test/perform/Makefile.in b/tools/test/perform/Makefile.in
index 6f1619a..efd772d 100644
--- a/tools/test/perform/Makefile.in
+++ b/tools/test/perform/Makefile.in
@@ -108,9 +108,9 @@ host_triplet = @host@
@BUILD_PARALLEL_CONDITIONAL_TRUE@bin_PROGRAMS = \
@BUILD_PARALLEL_CONDITIONAL_TRUE@ h5perf_serial$(EXEEXT) \
@BUILD_PARALLEL_CONDITIONAL_TRUE@ h5perf$(EXEEXT)
-check_PROGRAMS = iopipe$(EXEEXT) chunk$(EXEEXT) overhead$(EXEEXT) \
- zip_perf$(EXEEXT) perf_meta$(EXEEXT) $(am__EXEEXT_2) \
- perf$(EXEEXT)
+check_PROGRAMS = iopipe$(EXEEXT) chunk$(EXEEXT) chunk_cache$(EXEEXT) \
+ overhead$(EXEEXT) zip_perf$(EXEEXT) perf_meta$(EXEEXT) \
+ $(am__EXEEXT_2) perf$(EXEEXT)
TESTS = $(am__EXEEXT_3)
subdir = tools/test/perform
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
@@ -152,6 +152,10 @@ AM_V_lt = $(am__v_lt_@AM_V@)
am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@)
am__v_lt_0 = --silent
am__v_lt_1 =
+chunk_cache_SOURCES = chunk_cache.c
+chunk_cache_OBJECTS = chunk_cache.$(OBJEXT)
+chunk_cache_LDADD = $(LDADD)
+chunk_cache_DEPENDENCIES = $(LIBHDF5)
am_h5perf_OBJECTS = pio_perf.$(OBJEXT) pio_engine.$(OBJEXT)
h5perf_OBJECTS = $(am_h5perf_OBJECTS)
h5perf_DEPENDENCIES = $(LIBH5TOOLS) $(LIBH5TEST) $(LIBHDF5)
@@ -214,10 +218,12 @@ AM_V_CCLD = $(am__v_CCLD_@AM_V@)
am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@)
am__v_CCLD_0 = @echo " CCLD " $@;
am__v_CCLD_1 =
-SOURCES = chunk.c $(h5perf_SOURCES) $(h5perf_serial_SOURCES) iopipe.c \
- overhead.c perf.c perf_meta.c zip_perf.c
-DIST_SOURCES = chunk.c $(h5perf_SOURCES) $(h5perf_serial_SOURCES) \
- iopipe.c overhead.c perf.c perf_meta.c zip_perf.c
+SOURCES = chunk.c chunk_cache.c $(h5perf_SOURCES) \
+ $(h5perf_serial_SOURCES) iopipe.c overhead.c perf.c \
+ perf_meta.c zip_perf.c
+DIST_SOURCES = chunk.c chunk_cache.c $(h5perf_SOURCES) \
+ $(h5perf_serial_SOURCES) iopipe.c overhead.c perf.c \
+ perf_meta.c zip_perf.c
am__can_run_installinfo = \
case $$AM_UPDATE_INFO_DIR in \
n|no|NO) false;; \
@@ -426,9 +432,9 @@ am__set_TESTS_bases = \
bases=`echo $$bases`
RECHECK_LOGS = $(TEST_LOGS)
AM_RECURSIVE_TARGETS = check recheck
-am__EXEEXT_3 = iopipe$(EXEEXT) chunk$(EXEEXT) overhead$(EXEEXT) \
- zip_perf$(EXEEXT) perf_meta$(EXEEXT) h5perf_serial$(EXEEXT) \
- $(am__EXEEXT_2)
+am__EXEEXT_3 = iopipe$(EXEEXT) chunk$(EXEEXT) chunk_cache$(EXEEXT) \
+ overhead$(EXEEXT) zip_perf$(EXEEXT) perf_meta$(EXEEXT) \
+ h5perf_serial$(EXEEXT) $(am__EXEEXT_2)
TEST_SUITE_LOG = test-suite.log
LOG_DRIVER = $(SHELL) $(top_srcdir)/bin/test-driver
LOG_COMPILE = $(LOG_COMPILER) $(AM_LOG_FLAGS) $(LOG_FLAGS)
@@ -457,13 +463,13 @@ AMTAR = @AMTAR@
# H5_CFLAGS holds flags that should be used when building hdf5,
# but which should not be exported to h5cc for building other programs.
-# AM_CFLAGS is an automake construct which should be used by Makefiles
+# AM_CFLAGS is an automake construct which should be used by Makefiles
# instead of CFLAGS, as CFLAGS is reserved solely for the user to define.
# This applies to FCFLAGS, CXXFLAGS, CPPFLAGS, and LDFLAGS as well.
-AM_CFLAGS = @AM_CFLAGS@ @H5_CFLAGS@
+AM_CFLAGS = @AM_CFLAGS@ @H5_CFLAGS@ @H5_ECFLAGS@
AM_CPPFLAGS = @AM_CPPFLAGS@ @H5_CPPFLAGS@ -I$(top_srcdir)/src \
-I$(top_srcdir)/test -I$(top_srcdir)/tools/lib
-AM_CXXFLAGS = @AM_CXXFLAGS@ @H5_CXXFLAGS@
+AM_CXXFLAGS = @AM_CXXFLAGS@ @H5_CXXFLAGS@ @H5_ECXXFLAGS@
AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
AM_FCFLAGS = @AM_FCFLAGS@ @H5_FCFLAGS@
AM_JAVACFLAGS = @AM_JAVACFLAGS@
@@ -483,6 +489,7 @@ CC = @CC@
CCDEPMODE = @CCDEPMODE@
CC_VERSION = @CC_VERSION@
CFLAGS = @CFLAGS@
+CLANG_SANITIZE_CHECKS = @CLANG_SANITIZE_CHECKS@
CODESTACK = @CODESTACK@
CONFIG_DATE = @CONFIG_DATE@
CONFIG_MODE = @CONFIG_MODE@
@@ -499,6 +506,7 @@ DEFAULT_API_VERSION = @DEFAULT_API_VERSION@
DEFS = @DEFS@
DEPDIR = @DEPDIR@
DEPRECATED_SYMBOLS = @DEPRECATED_SYMBOLS@
+DESIRED_FILE_LOCKING = @DESIRED_FILE_LOCKING@
DEV_WARNINGS = @DEV_WARNINGS@
DIRECT_VFD = @DIRECT_VFD@
DLLTOOL = @DLLTOOL@
@@ -535,8 +543,11 @@ H5_CFLAGS = @H5_CFLAGS@
H5_CLASSPATH = @H5_CLASSPATH@
H5_CPPFLAGS = @H5_CPPFLAGS@
H5_CXXFLAGS = @H5_CXXFLAGS@
+H5_ECFLAGS = @H5_ECFLAGS@
+H5_ECXXFLAGS = @H5_ECXXFLAGS@
H5_FCFLAGS = @H5_FCFLAGS@
H5_FORTRAN_SHARED = @H5_FORTRAN_SHARED@
+H5_IS_DARWIN = @H5_IS_DARWIN@
H5_JAVACFLAGS = @H5_JAVACFLAGS@
H5_JAVAFLAGS = @H5_JAVAFLAGS@
H5_JNIFLAGS = @H5_JNIFLAGS@
@@ -559,6 +570,7 @@ HL = @HL@
HL_FOR = @HL_FOR@
HSIZE_T = @HSIZE_T@
HSSIZE_T = @HSSIZE_T@
+IGNORE_DISABLED_FILE_LOCKS = @IGNORE_DISABLED_FILE_LOCKS@
INSTALL = @INSTALL@
INSTALL_DATA = @INSTALL_DATA@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
@@ -595,6 +607,7 @@ MAINT = @MAINT@
MAKEINFO = @MAKEINFO@
MANIFEST_TOOL = @MANIFEST_TOOL@
MEMORYALLOCSANITYCHECK = @MEMORYALLOCSANITYCHECK@
+MIRROR_VFD = @MIRROR_VFD@
MKDIR_P = @MKDIR_P@
MPE = @MPE@
NM = @NM@
@@ -654,6 +667,7 @@ TIME = @TIME@
TR = @TR@
TRACE_API = @TRACE_API@
UNAME_INFO = @UNAME_INFO@
+USE_FILE_LOCKING = @USE_FILE_LOCKING@
USE_FILTER_DEFLATE = @USE_FILTER_DEFLATE@
USE_FILTER_SZIP = @USE_FILTER_SZIP@
USINGMEMCHECKER = @USINGMEMCHECKER@
@@ -689,6 +703,7 @@ docdir = $(exec_prefix)/doc
dvidir = @dvidir@
enable_shared = @enable_shared@
enable_static = @enable_static@
+examplesdir = @examplesdir@
exec_prefix = @exec_prefix@
fortran_linux_linker_option = @fortran_linux_linker_option@
host = @host@
@@ -745,15 +760,15 @@ LIBH5_HL = $(top_builddir)/hl/src/libhdf5_hl.la
LIBH5F_HL = $(top_builddir)/hl/fortran/src/libhdf5hl_fortran.la
LIBH5CPP_HL = $(top_builddir)/hl/c++/src/libhdf5_hl_cpp.la
-# Note that in svn revision 19400 the '/' after DESTDIR in H5* variables below
-# has been removed. According to the official description of DESTDIR by Gnu at
-# http://www.gnu.org/prep/standards/html_node/DESTDIR.html, DESTDIR is
-# prepended to the normal and complete install path that it precedes for the
-# purpose of installing in a temporary directory which is useful for building
-# rpms and other packages. The '/' after ${DESTDIR} will be followed by another
-# '/' at the beginning of the normal install path. When DESTDIR is empty the
-# path then begins with '//', which is incorrect and causes problems at least for
-# Cygwin.
+# Note that in svn revision 19400 the '/' after DESTDIR in H5* variables below
+# has been removed. According to the official description of DESTDIR by Gnu at
+# http://www.gnu.org/prep/standards/html_node/DESTDIR.html, DESTDIR is
+# prepended to the normal and complete install path that it precedes for the
+# purpose of installing in a temporary directory which is useful for building
+# rpms and other packages. The '/' after ${DESTDIR} will be followed by another
+# '/' at the beginning of the normal install path. When DESTDIR is empty the
+# path then begins with '//', which is incorrect and causes problems at least for
+# Cygwin.
# Scripts used to build examples
# If only shared libraries have been installed, have h5cc build examples with
@@ -790,7 +805,7 @@ h5perf_serial_LDFLAGS = $(LT_STATIC_EXEC) $(AM_LDFLAGS)
# Parallel test programs.
@BUILD_PARALLEL_CONDITIONAL_TRUE@TEST_PROG_PARA = h5perf perf
# Serial test programs.
-TEST_PROG = iopipe chunk overhead zip_perf perf_meta h5perf_serial $(BUILD_ALL_PROGS)
+TEST_PROG = iopipe chunk chunk_cache overhead zip_perf perf_meta h5perf_serial $(BUILD_ALL_PROGS)
h5perf_SOURCES = pio_perf.c pio_engine.c
h5perf_serial_SOURCES = sio_perf.c sio_engine.c
@@ -819,7 +834,7 @@ LIB = $(lib_LIBRARIES) $(lib_LTLIBRARIES) $(noinst_LIBRARIES) \
PROGS = $(bin_PROGRAMS) $(bin_SCRIPTS) $(noinst_PROGRAMS) $(noinst_SCRIPTS) \
$(EXTRA_PROG)
-chk_TESTS = $(check_PROGRAMS) $(check_SCRIPTS) $(EXTRA_TEST)
+chk_TESTS = $(check_PROGRAMS) $(check_SCRIPTS) $(EXTRA_TEST)
TEST_EXTENSIONS = .sh
SH_LOG_COMPILER = $(SHELL)
AM_SH_LOG_FLAGS =
@@ -925,6 +940,10 @@ chunk$(EXEEXT): $(chunk_OBJECTS) $(chunk_DEPENDENCIES) $(EXTRA_chunk_DEPENDENCIE
@rm -f chunk$(EXEEXT)
$(AM_V_CCLD)$(LINK) $(chunk_OBJECTS) $(chunk_LDADD) $(LIBS)
+chunk_cache$(EXEEXT): $(chunk_cache_OBJECTS) $(chunk_cache_DEPENDENCIES) $(EXTRA_chunk_cache_DEPENDENCIES)
+ @rm -f chunk_cache$(EXEEXT)
+ $(AM_V_CCLD)$(LINK) $(chunk_cache_OBJECTS) $(chunk_cache_LDADD) $(LIBS)
+
h5perf$(EXEEXT): $(h5perf_OBJECTS) $(h5perf_DEPENDENCIES) $(EXTRA_h5perf_DEPENDENCIES)
@rm -f h5perf$(EXEEXT)
$(AM_V_CCLD)$(h5perf_LINK) $(h5perf_OBJECTS) $(h5perf_LDADD) $(LIBS)
@@ -960,6 +979,7 @@ distclean-compile:
-rm -f *.tab.c
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/chunk.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/chunk_cache.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/iopipe.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/overhead.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/perf.Po@am__quote@
@@ -1196,6 +1216,13 @@ chunk.log: chunk$(EXEEXT)
--log-file $$b.log --trs-file $$b.trs \
$(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
"$$tst" $(AM_TESTS_FD_REDIRECT)
+chunk_cache.log: chunk_cache$(EXEEXT)
+ @p='chunk_cache$(EXEEXT)'; \
+ b='chunk_cache'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
overhead.log: overhead$(EXEEXT)
@p='overhead$(EXEEXT)'; \
b='overhead'; \
@@ -1508,28 +1535,37 @@ $(TEST_PROG_CHKEXE) $(TEST_PROG_PARA_CHKEXE) dummy.chkexe_:
echo "============================" > $${log}; \
fi; \
if test "X$(FORTRAN_API)" = "Xyes"; then \
- echo "Fortran API: Testing $(HDF5_DRIVER) $${tname} $(TEST_FLAGS)"; \
+ echo "Fortran API: Testing $${tname} $(TEST_FLAGS)"; \
if test -n "$(REALTIMEOUTPUT)"; then \
- echo "Fortran API: $(HDF5_DRIVER) $${tname} $(TEST_FLAGS) Test Log" | tee -a $${log}; \
+ echo "Fortran API: Test log for $${tname} $(TEST_FLAGS)" | tee -a $${log}; \
else \
- echo "Fortran API: $(HDF5_DRIVER) $${tname} $(TEST_FLAGS) Test Log" >> $${log}; \
+ echo "Fortran API: Test log for $${tname} $(TEST_FLAGS)" >> $${log}; \
fi; \
elif test "X$(CXX_API)" = "Xyes"; then \
- echo "C++ API: Testing $(HDF5_DRIVER) $${tname} $(TEST_FLAGS)"; \
+ echo "C++ API: Testing $${tname} $(TEST_FLAGS)"; \
if test -n "$(REALTIMEOUTPUT)"; then \
- echo "C++ API: $(HDF5_DRIVER) $${tname} $(TEST_FLAGS) Test Log" | tee -a $${log};\
+ echo "C++ API: Test log for $${tname} $(TEST_FLAGS)" | tee -a $${log};\
else \
- echo "C++ API: $(HDF5_DRIVER) $${tname} $(TEST_FLAGS) Test Log" >> $${log};\
+ echo "C++ API: Test log for $${tname} $(TEST_FLAGS)" >> $${log};\
fi; \
else \
- echo "Testing $(HDF5_DRIVER) $${tname} $(TEST_FLAGS)"; \
+ echo "Testing: $${tname} $(TEST_FLAGS)"; \
if test -n "$(REALTIMEOUTPUT)"; then \
- echo "$(HDF5_DRIVER) $${tname} $(TEST_FLAGS) Test Log" | tee -a $${log}; \
+ echo "Test log for $${tname} $(TEST_FLAGS)" | tee -a $${log}; \
else \
- echo "$(HDF5_DRIVER) $${tname} $(TEST_FLAGS) Test Log" >> $${log}; \
+ echo "Test log for $${tname} $(TEST_FLAGS)" >> $${log}; \
fi; \
fi; \
if test -n "$(REALTIMEOUTPUT)"; then \
+ if test -n "$(HDF5_DRIVER)"; then \
+ echo "Virtual file driver (VFD): $(HDF5_DRIVER)" | tee -a $${log}; \
+ fi; \
+ else \
+ if test -n "$(HDF5_DRIVER)"; then \
+ echo "Virtual file driver (VFD): $(HDF5_DRIVER)" >> $${log}; \
+ fi; \
+ fi; \
+ if test -n "$(REALTIMEOUTPUT)"; then \
echo "============================" | tee -a $${log}; \
else \
echo "============================" >> $${log}; \
diff --git a/tools/test/perform/chunk.c b/tools/test/perform/chunk.c
index 804f88e..bd16e1d 100644
--- a/tools/test/perform/chunk.c
+++ b/tools/test/perform/chunk.c
@@ -12,7 +12,7 @@
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/*
- * Programmer: Robb Matzke <robb@arborea.spizella.com>
+ * Programmer: Robb Matzke
* Thursday, May 14, 1998
*
* Purpose: Checks the effect of various I/O request sizes and raw data
@@ -72,7 +72,7 @@
/* #define DIAG_NRDCC 521 */
static size_t nio_g;
-static hid_t fapl_g = -1;
+static hid_t fapl_g = H5I_INVALID_HID;
/* Local function prototypes */
static size_t
diff --git a/tools/test/perform/chunk_cache.c b/tools/test/perform/chunk_cache.c
new file mode 100644
index 0000000..d7c56af
--- /dev/null
+++ b/tools/test/perform/chunk_cache.c
@@ -0,0 +1,394 @@
+/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+ * 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. *
+ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
+
+/*
+ * Purpose: check the performance of chunk cache in these two cases (HDFFV-10601):
+ * 1. partial chunks exist along any dimension.
+ * 2. number of slots in chunk cache is smaller than the number of chunks
+ * in the fastest-growing dimension.
+ */
+#include "hdf5.h"
+#include "H5private.h"
+#include "h5test.h"
+
+#define FILENAME "chunk_cache_perf.h5"
+
+#define RANK 2
+
+#define DSET1_NAME "partial_chunks"
+#define DSET1_DIM1 9 * 1000
+#define DSET1_DIM2 9
+#define CHUNK1_DIM1 2 * 1000
+#define CHUNK1_DIM2 2
+
+#define DSET2_NAME "hash_value"
+#define DSET2_DIM1 300
+#define DSET2_DIM2 600
+#define CHUNK2_DIM1 100
+#define CHUNK2_DIM2 100
+
+#define RDCC_NSLOTS 5
+#define RDCC_NBYTES 1024 * 1024 * 10
+#define RDCC_W0 0.75F
+
+#define FILTER_COUNTER 306
+static size_t nbytes_global;
+
+typedef struct test_time_t {
+ long tv_sec;
+ long tv_usec;
+} test_time_t;
+
+/* Local function prototypes for the dummy filter */
+static size_t
+counter (unsigned flags, size_t cd_nelmts,
+ const unsigned *cd_values, size_t nbytes,
+ size_t *buf_size, void **buf);
+
+/* This message derives from H5Z */
+const H5Z_class2_t H5Z_COUNTER[1] = {{
+ H5Z_CLASS_T_VERS, /* H5Z_class_t version */
+ FILTER_COUNTER, /* Filter id number */
+ 1, 1, /* Encoding and decoding enabled */
+ "counter", /* Filter name for debugging */
+ NULL, /* The "can apply" callback */
+ NULL, /* The "set local" callback */
+ counter, /* The actual filter function */
+}};
+
+/*-------------------------------------------------------------------------
+ * Count number of bytes but don't do anything else. Keep
+ * track of the data of chunks being read from file into memory.
+ */
+static size_t
+counter (unsigned H5_ATTR_UNUSED flags, size_t H5_ATTR_UNUSED cd_nelmts,
+ const unsigned H5_ATTR_UNUSED *cd_values, size_t nbytes,
+ size_t H5_ATTR_UNUSED *buf_size, void H5_ATTR_UNUSED **buf)
+{
+ nbytes_global += nbytes;
+ return nbytes;
+}
+
+/*---------------------------------------------------------------------------*/
+static void
+cleanup (void)
+{
+ if (!getenv ("HDF5_NOCLEANUP")) {
+ remove (FILENAME);
+ }
+}
+
+/*-------------------------------------------------------------------------------
+ * Create a chunked dataset with partial chunks along either dimensions:
+ * dataset dimension: 9000 x 9
+ * chunk dimension: 2000 x 2
+ */
+static int create_dset1(hid_t file)
+{
+ hid_t dataspace = H5I_INVALID_HID, dataset = H5I_INVALID_HID;
+ hid_t dcpl = H5I_INVALID_HID;
+ hsize_t dims[RANK] = {DSET1_DIM1, DSET1_DIM2};
+ hsize_t chunk_dims[RANK] = {CHUNK1_DIM1, CHUNK1_DIM2};
+ int **data; /* data for writing */
+
+ /* Create the data space. */
+ if((dataspace = H5Screate_simple (RANK, dims, NULL)) < 0)
+ goto error;
+
+ /* Modify dataset creation properties, i.e. enable chunking */
+ if((dcpl = H5Pcreate (H5P_DATASET_CREATE)) < 0)
+ goto error;
+ if(H5Pset_chunk (dcpl, RANK, chunk_dims) < 0)
+ goto error;
+
+ /* Set the dummy filter simply for counting the number of bytes being read into the memory */
+ if(H5Zregister(H5Z_COUNTER) < 0)
+ goto error;
+
+ if(H5Pset_filter(dcpl, FILTER_COUNTER, 0, 0, NULL) < 0)
+ goto error;
+
+ /* Create a new dataset within the file using chunk creation properties. */
+ if((dataset = H5Dcreate2 (file, DSET1_NAME, H5T_NATIVE_INT, dataspace,
+ H5P_DEFAULT, dcpl, H5P_DEFAULT)) < 0)
+ goto error;
+
+ /* Create & fill array */
+ H5TEST_ALLOCATE_2D_ARRAY(data, int, DSET1_DIM1, DSET1_DIM2);
+ H5TEST_FILL_2D_ARRAY(data, int, DSET1_DIM1, DSET1_DIM2);
+
+
+ /* Write data to dataset */
+ if(H5Dwrite (dataset, H5T_NATIVE_INT, H5S_ALL, H5S_ALL,
+ H5P_DEFAULT, data) < 0)
+ goto error;
+
+ /* Close resources */
+ H5Dclose (dataset);
+ H5Pclose (dcpl);
+ H5Sclose (dataspace);
+ return 0;
+
+error:
+ H5E_BEGIN_TRY {
+ H5Dclose (dataset);
+ H5Pclose (dcpl);
+ H5Sclose (dataspace);
+ } H5E_END_TRY;
+
+ return 1;
+}
+
+/*---------------------------------------------------------------------------
+ * Create a chunked dataset for testing hash values:
+ * dataset dimensions: 300 x 600
+ * chunk dimensions: 100 x 100
+ */
+static int create_dset2(hid_t file)
+{
+ hid_t dataspace = H5I_INVALID_HID, dataset = H5I_INVALID_HID;
+ hid_t dcpl = H5I_INVALID_HID;
+ hsize_t dims[RANK] = {DSET2_DIM1, DSET2_DIM2};
+ hsize_t chunk_dims[RANK] = {CHUNK2_DIM1, CHUNK2_DIM2};
+ int **data; /* data for writing */
+
+ /* Create the data space. */
+ if((dataspace = H5Screate_simple(RANK, dims, NULL)) < 0)
+ goto error;
+
+ /* Modify dataset creation properties, i.e. enable chunking */
+ if((dcpl = H5Pcreate(H5P_DATASET_CREATE)) < 0)
+ goto error;
+ if(H5Pset_chunk(dcpl, RANK, chunk_dims) < 0)
+ goto error;
+
+ /* Set the dummy filter simply for counting the number of bytes being read into the memory */
+ if(H5Zregister(H5Z_COUNTER) < 0)
+ goto error;
+ if(H5Pset_filter(dcpl, FILTER_COUNTER, 0, 0, NULL) < 0)
+ goto error;
+
+ /* Create a new dataset within the file using chunk creation properties. */
+ if((dataset = H5Dcreate2(file, DSET2_NAME, H5T_NATIVE_INT, dataspace,
+ H5P_DEFAULT, dcpl, H5P_DEFAULT)) < 0)
+ goto error;
+
+ /* Create & fill array */
+ H5TEST_ALLOCATE_2D_ARRAY(data, int, DSET2_DIM1, DSET2_DIM2);
+ H5TEST_FILL_2D_ARRAY(data, int, DSET2_DIM1, DSET2_DIM2);
+
+ /* Write data to dataset */
+ if(H5Dwrite(dataset, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, data) < 0)
+ goto error;
+
+ /* Close resources */
+ H5Dclose(dataset);
+ H5Pclose(dcpl);
+ H5Sclose(dataspace);
+
+ return 0;
+
+error:
+ H5E_BEGIN_TRY {
+ H5Dclose(dataset);
+ H5Pclose(dcpl);
+ H5Sclose(dataspace);
+ } H5E_END_TRY;
+
+ return 1;
+}
+
+/*---------------------------------------------------------------------------
+ * Check the performance of the chunk cache when partial chunks exist
+ * along the dataset dimensions.
+ */
+static int check_partial_chunks_perf(hid_t file)
+{
+ hid_t dataset = H5I_INVALID_HID;
+ hid_t filespace = H5I_INVALID_HID;
+ hid_t memspace = H5I_INVALID_HID;
+ hid_t dapl = H5I_INVALID_HID;
+
+ int rdata[DSET1_DIM2]; /* data for reading */
+ int i;
+
+ hsize_t row_rank = 1;
+ hsize_t row_dim[1] = {DSET1_DIM2};
+ hsize_t start[RANK] = {0, 0};
+ hsize_t count[RANK] = {1, DSET1_DIM2};
+ double start_t, end_t;
+
+ if((dapl = H5Pcreate(H5P_DATASET_ACCESS)) < 0)
+ goto error;
+ if(H5Pset_chunk_cache (dapl, RDCC_NSLOTS, RDCC_NBYTES, RDCC_W0) < 0)
+ goto error;
+
+ dataset = H5Dopen2 (file, DSET1_NAME, dapl);
+
+ H5_CHECK_OVERFLOW(row_rank, hsize_t, int);
+ memspace = H5Screate_simple((int)row_rank, row_dim, NULL);
+ filespace = H5Dget_space(dataset);
+
+ nbytes_global = 0;
+
+ start_t = H5_get_time();
+
+ /* Read the data row by row */
+ for(i = 0; i < DSET1_DIM1; i++) {
+ start[0] = (hsize_t)i;
+ if(H5Sselect_hyperslab(filespace, H5S_SELECT_SET,
+ start, NULL, count, NULL) < 0)
+ goto error;
+
+ if(H5Dread (dataset, H5T_NATIVE_INT, memspace, filespace,
+ H5P_DEFAULT, rdata) < 0)
+ goto error;
+ }
+
+ end_t = H5_get_time();
+
+ if((end_t - start_t) > (double)0.0f)
+ printf("1. Partial chunks: total read time is %lf; number of bytes being read from file is %lu\n", (end_t -start_t), nbytes_global);
+ else
+ printf("1. Partial chunks: no total read time because timer is not available; number of bytes being read from file is %lu\n", nbytes_global);
+
+ H5Dclose (dataset);
+ H5Sclose (filespace);
+ H5Sclose (memspace);
+ H5Pclose (dapl);
+
+ return 0;
+error:
+ H5E_BEGIN_TRY {
+ H5Dclose (dataset);
+ H5Sclose (filespace);
+ H5Sclose (memspace);
+ H5Pclose (dapl);
+ } H5E_END_TRY;
+ return 1;
+}
+
+/*---------------------------------------------------------------------------
+ * Check the performance of chunk cache when the number of cache slots
+ * is smaller than the number of chunks along the fastest-growing
+ * dimension of the dataset.
+ */
+static int check_hash_value_perf(hid_t file)
+{
+ hid_t dataset = H5I_INVALID_HID;
+ hid_t filespace = H5I_INVALID_HID;
+ hid_t memspace = H5I_INVALID_HID;
+ hid_t dapl = H5I_INVALID_HID;
+
+ int rdata[DSET2_DIM1]; /* data for reading */
+ int i;
+
+ hsize_t column_rank = 1;
+ hsize_t column_dim[1] = {DSET2_DIM1};
+ hsize_t start[RANK] = {0, 0};
+ hsize_t count[RANK] = {DSET2_DIM1, 1};
+ double start_t, end_t;
+
+ if((dapl = H5Pcreate(H5P_DATASET_ACCESS)) < 0)
+ goto error;
+ if(H5Pset_chunk_cache (dapl, RDCC_NSLOTS, RDCC_NBYTES, RDCC_W0) < 0)
+ goto error;
+
+ if((dataset = H5Dopen2 (file, DSET2_NAME, dapl)) < 0)
+ goto error;
+
+ H5_CHECK_OVERFLOW(column_rank, hsize_t, int);
+ if((memspace = H5Screate_simple((int)column_rank, column_dim, NULL)) < 0)
+ goto error;
+ if((filespace = H5Dget_space(dataset)) < 0)
+ goto error;
+
+ nbytes_global = 0;
+
+ start_t = H5_get_time();
+
+ /* Read the data column by column */
+ for(i = 0; i < DSET2_DIM2; i++) {
+ start[1] = (hsize_t)i;
+ if(H5Sselect_hyperslab(filespace, H5S_SELECT_SET,
+ start, NULL, count, NULL) < 0)
+ goto error;
+
+ if(H5Dread (dataset, H5T_NATIVE_INT, memspace, filespace,
+ H5P_DEFAULT, rdata) < 0)
+ goto error;
+ }
+
+ end_t = H5_get_time();
+
+ if((end_t - start_t) > (double)0.0f)
+ printf("2. Hash value: total read time is %lf; number of bytes being read from file is %lu\n", (end_t -start_t), nbytes_global);
+ else
+ printf("2. Hash value: no total read time because timer is not available; number of bytes being read from file is %lu\n", nbytes_global);
+
+ H5Dclose (dataset);
+ H5Sclose (filespace);
+ H5Sclose (memspace);
+ H5Pclose (dapl);
+ return 0;
+
+error:
+ H5E_BEGIN_TRY {
+ H5Dclose (dataset);
+ H5Sclose (filespace);
+ H5Sclose (memspace);
+ H5Pclose (dapl);
+ } H5E_END_TRY;
+ return 1;
+}
+
+/*-------------------------------------------------------------------------------------
+ * Purpose: check the performance of chunk cache in these two cases (HDFFV-10601):
+ * 1. partial chunks exist along any dimension.
+ * 2. number of slots in chunk cache is smaller than the number of chunks
+ * in the fastest-growing dimension.
+ *-------------------------------------------------------------------------------------*/
+int
+main (void)
+{
+ hid_t file; /* handles */
+ int nerrors = 0;
+
+ /* Create a new file. If file exists its contents will be overwritten. */
+ if((file = H5Fcreate (FILENAME, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT)) < 0)
+ goto error;
+
+ nerrors += create_dset1(file);
+ nerrors += create_dset2(file);
+
+ if(H5Fclose (file) < 0)
+ goto error;
+
+ /* Re-open the file for testing performance. */
+ if((file = H5Fopen (FILENAME, H5F_ACC_RDONLY, H5P_DEFAULT)) < 0)
+ goto error;
+
+ nerrors += check_partial_chunks_perf(file);
+ nerrors += check_hash_value_perf(file);
+
+ if(H5Fclose (file) < 0)
+ goto error;
+
+ if (nerrors>0) goto error;
+ cleanup();
+ return 0;
+
+error:
+ fprintf(stderr, "*** ERRORS DETECTED ***\n");
+ return 1;
+}
diff --git a/tools/test/perform/direct_write_perf.c b/tools/test/perform/direct_write_perf.c
index f13cd24..20b7237 100644
--- a/tools/test/perform/direct_write_perf.c
+++ b/tools/test/perform/direct_write_perf.c
@@ -75,7 +75,7 @@ const char *FILENAME[] = {
#define NX 100
#define NY 1000
#define NZ 250
-#define CHUNK_NX 1
+#define CHUNK_NX 1
#define CHUNK_NY 1000
#define CHUNK_NZ 250
@@ -108,7 +108,7 @@ void reportTime(struct timeval start, double mbytes)
} /* end if */
/*printf("mbytes=%lf, sec=%lf, usec=%lf\n", mbytes, (double)timeval_diff.tv_sec, (double)timeval_diff.tv_usec);*/
- printf("MBytes/second: %lf\n", (double)mbytes/((double)timeval_diff.tv_sec+((double)timeval_diff.tv_usec/(double)1000000.0)));
+ printf("MBytes/second: %lf\n", (double)mbytes/((double)timeval_diff.tv_sec+((double)timeval_diff.tv_usec/(double)1000000.0)));
}
/*--------------------------------------------------
@@ -121,7 +121,7 @@ int create_file(hid_t fapl_id)
hid_t fapl;
hid_t cparms;
hid_t dataspace, dataset;
- hsize_t dims[RANK] = {NX, NY, NZ};
+ hsize_t dims[RANK] = {NX, NY, NZ};
hsize_t chunk_dims[RANK] ={CHUNK_NX, CHUNK_NY, CHUNK_NZ};
unsigned int aggression = 9; /* Compression aggression setting */
int ret;
@@ -198,7 +198,7 @@ int create_file(hid_t fapl_id)
if(H5Dclose(dataset) < 0)
TEST_ERROR;
- if(H5Fclose(file) < 0)
+ if(H5Fclose(file) < 0)
TEST_ERROR;
if(H5Sclose(dataspace) < 0)
@@ -223,7 +223,7 @@ int create_file(hid_t fapl_id)
/* Initialize data for chunks */
for(i = 0; i < NX; i++) {
p = direct_buf[i] = (unsigned int*)malloc(CHUNK_NY*CHUNK_NZ*sizeof(unsigned int));
-
+
for(j=0; j < CHUNK_NY*CHUNK_NZ; j++, p++)
*p = rand() % 65000;
@@ -267,7 +267,7 @@ error:
}
/*--------------------------------------------------
- * Benchmark the performance of the new function
+ * Benchmark the performance of the new function
* with precompressed data.
*--------------------------------------------------
*/
@@ -283,8 +283,8 @@ test_direct_write_uncompressed_data(hid_t fapl_id)
unsigned filter_mask = 0;
hsize_t offset[RANK] = {0, 0, 0};
- struct timeval timeval_start;
-
+ struct timeval timeval_start;
+
TESTING("H5Dwrite_chunk for uncompressed data");
if((dxpl = H5Pcreate(H5P_DATASET_XFER)) < 0)
@@ -301,8 +301,8 @@ test_direct_write_uncompressed_data(hid_t fapl_id)
TEST_ERROR;
- /* Write the compressed chunk data repeatedly to cover all the chunks in the
- * dataset, using the direct writing function. */
+ /* Write the compressed chunk data repeatedly to cover all the chunks in the
+ * dataset, using the direct writing function. */
for(i=0; i<NX; i++) {
status = H5Dwrite_chunk(dataset, dxpl, filter_mask, offset, CHUNK_NY*CHUNK_NZ*sizeof(unsigned int), direct_buf[i]);
(offset[0])++;
@@ -315,8 +315,8 @@ test_direct_write_uncompressed_data(hid_t fapl_id)
H5Pclose(dxpl);
H5Fclose(file);
- /* Report the performance */
- reportTime(timeval_start, (double)(NX*NY*NZ*sizeof(unsigned int)/MB));
+ /* Report the performance */
+ reportTime(timeval_start, (double)(NX*NY*NZ*sizeof(unsigned int)/MB));
PASSED();
return 0;
@@ -332,7 +332,7 @@ error:
/*--------------------------------------------------
- * Benchmark the performance of the new function
+ * Benchmark the performance of the new function
* with precompressed data.
*--------------------------------------------------
*/
@@ -348,8 +348,8 @@ test_direct_write_compressed_data(hid_t fapl_id)
unsigned filter_mask = 0;
hsize_t offset[RANK] = {0, 0, 0};
- struct timeval timeval_start;
-
+ struct timeval timeval_start;
+
TESTING("H5DOwrite_chunk for pre-compressed data");
if((dxpl = H5Pcreate(H5P_DATASET_XFER)) < 0)
@@ -366,8 +366,8 @@ test_direct_write_compressed_data(hid_t fapl_id)
TEST_ERROR;
- /* Write the compressed chunk data repeatedly to cover all the chunks in the
- * dataset, using the direct writing function. */
+ /* Write the compressed chunk data repeatedly to cover all the chunks in the
+ * dataset, using the direct writing function. */
for(i=0; i<NX; i++) {
status = H5Dwrite_chunk(dataset, dxpl, filter_mask, offset, data_size[i], outbuf[i]);
(offset[0])++;
@@ -379,9 +379,9 @@ test_direct_write_compressed_data(hid_t fapl_id)
H5Dclose(dataset);
H5Pclose(dxpl);
H5Fclose(file);
-
- /* Report the performance */
- reportTime(timeval_start, (double)(total_size/MB));
+
+ /* Report the performance */
+ reportTime(timeval_start, (double)(total_size/MB));
PASSED();
return 0;
@@ -416,7 +416,7 @@ test_compressed_write(hid_t fapl_id)
hsize_t count[RANK]; /* Block count */
hsize_t block[RANK]; /* Block sizes */
- struct timeval timeval_start;
+ struct timeval timeval_start;
TESTING("H5Dwrite with compression enabled");
@@ -443,14 +443,14 @@ test_compressed_write(hid_t fapl_id)
stride[0] = stride[1] = stride[2] = 1;
count[0] = count[1] = count[2] = 1;
block[0] = CHUNK_NX; block[1] = CHUNK_NY; block[2] = CHUNK_NZ;
-
+
for(i=0; i<NX; i++) {
/*
* Select hyperslab for one chunk in the file
*/
if((status = H5Sselect_hyperslab(dataspace, H5S_SELECT_SET, start, stride, count, block)) < 0)
TEST_ERROR;
- (start[0])++;
+ (start[0])++;
if((status = H5Dwrite(dataset, H5T_NATIVE_INT, mem_space, dataspace,
H5P_DEFAULT, direct_buf[i])) < 0)
@@ -465,10 +465,10 @@ test_compressed_write(hid_t fapl_id)
H5Sclose(mem_space);
H5Pclose(dxpl);
H5Fclose(file);
-
- /* Report the performance */
- reportTime(timeval_start, (double)(NX*NY*NZ*sizeof(unsigned int)/MB));
-
+
+ /* Report the performance */
+ reportTime(timeval_start, (double)(NX*NY*NZ*sizeof(unsigned int)/MB));
+
PASSED();
return 0;
@@ -504,7 +504,7 @@ test_no_compress_write(hid_t fapl_id)
hsize_t count[RANK]; /* Block count */
hsize_t block[RANK]; /* Block sizes */
- struct timeval timeval_start;
+ struct timeval timeval_start;
TESTING("H5Dwrite without compression");
@@ -531,14 +531,14 @@ test_no_compress_write(hid_t fapl_id)
stride[0] = stride[1] = stride[2] = 1;
count[0] = count[1] = count[2] = 1;
block[0] = CHUNK_NX; block[1] = CHUNK_NY; block[2] = CHUNK_NZ;
-
+
for(i=0; i<NX; i++) {
/*
* Select hyperslab for one chunk in the file
*/
if((status = H5Sselect_hyperslab(dataspace, H5S_SELECT_SET, start, stride, count, block)) < 0)
TEST_ERROR;
- (start[0])++;
+ (start[0])++;
if((status = H5Dwrite(dataset, H5T_NATIVE_INT, mem_space, dataspace,
H5P_DEFAULT, direct_buf[i])) < 0)
@@ -553,10 +553,10 @@ test_no_compress_write(hid_t fapl_id)
H5Sclose(mem_space);
H5Pclose(dxpl);
H5Fclose(file);
-
- /* Report the performance */
- reportTime(timeval_start, (double)(NX*NY*NZ*sizeof(unsigned int)/MB));
-
+
+ /* Report the performance */
+ reportTime(timeval_start, (double)(NX*NY*NZ*sizeof(unsigned int)/MB));
+
PASSED();
return 0;
@@ -576,13 +576,13 @@ error:
* data to a Unix file
*--------------------------------------------------
*/
-int
+int
test_unix_write(void)
{
int file, flag;
- ssize_t op_size;
+ ssize_t op_size;
int i;
- struct timeval timeval_start;
+ struct timeval timeval_start;
TESTING("Write compressed data to a Unix file");
@@ -595,8 +595,8 @@ test_unix_write(void)
if ((file=open(FILENAME[1],flag))== -1)
TEST_ERROR;
- /* Write the compressed chunk data repeatedly to cover all the chunks in the
- * dataset, using the direct writing function. */
+ /* Write the compressed chunk data repeatedly to cover all the chunks in the
+ * dataset, using the direct writing function. */
for(i=0; i<NX; i++) {
op_size = write(file, outbuf[i],data_size[i]);
if (op_size < 0)
@@ -617,14 +617,14 @@ test_unix_write(void)
TEST_ERROR;
}
- /* Report the performance */
- reportTime(timeval_start, (double)(total_size/MB));
+ /* Report the performance */
+ reportTime(timeval_start, (double)(total_size/MB));
PASSED();
return 0;
error:
- return 1;
+ return 1;
}
/*--------------------------------------------------
@@ -650,7 +650,7 @@ main (void)
free(outbuf[i]);
free(direct_buf[i]);
}
-
+
return 0;
}
diff --git a/tools/test/perform/iopipe.c b/tools/test/perform/iopipe.c
index 2d9c44f..bb74a1b 100644
--- a/tools/test/perform/iopipe.c
+++ b/tools/test/perform/iopipe.c
@@ -12,7 +12,7 @@
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/*
- * Programmer: Robb Matzke <matzke@llnl.gov>
+ * Programmer: Robb Matzke
* Thursday, March 12, 1998
*/
@@ -21,10 +21,6 @@
#include "H5private.h"
-#ifdef H5_HAVE_SYS_TIMEB
-#include <sys/timeb.h>
-#endif
-
#define RAW_FILE_NAME "iopipe.raw"
#define HDF5_FILE_NAME "iopipe.h5"
@@ -56,25 +52,18 @@
* Programmer: Robb Matzke
* Thursday, March 12, 1998
*
- * Modifications:
- *
*-------------------------------------------------------------------------
*/
-#ifdef H5_HAVE_GETRUSAGE
static void
-print_stats (const char *prefix,
+print_stats(const char *prefix,
+#ifdef H5_HAVE_GETRUSAGE
struct rusage *r_start, struct rusage *r_stop,
- struct timeval *t_start, struct timeval *t_stop,
- size_t nbytes)
-#else /* H5_HAVE_GETRUSAGE */
-static void
-print_stats (const char *prefix,
- struct timeval *r_start, struct timeval *r_stop,
- struct timeval *t_start, struct timeval *t_stop,
- size_t nbytes)
#endif /* H5_HAVE_GETRUSAGE */
+ double t_start, double t_stop,
+ size_t nbytes)
{
- double e_time, bw;
+ double e_time;
+ char bw[16];
#ifdef H5_HAVE_GETRUSAGE
double u_time, s_time;
@@ -88,27 +77,16 @@ print_stats (const char *prefix,
((double)(r_start->ru_stime.tv_sec)+
(double)(r_start->ru_stime.tv_usec)/(double)1000000.0F);
#endif
-#ifndef H5_HAVE_SYS_TIMEB
- e_time = ((double)(t_stop->tv_sec)+
- (double)(t_stop->tv_usec)/(double)1000000.0F) -
- ((double)(t_start->tv_sec)+
- (double)(t_start->tv_usec)/(double)1000000.0F);
-#else
- e_time = ((double)(t_stop->tv_sec)+
- (double)(t_stop->tv_usec)/(double)1000.0F) -
- ((double)(t_start->tv_sec)+
- (double)(t_start->tv_usec)/(double)1000.0F);
-#endif
- bw = (double)nbytes / e_time;
+ e_time = t_stop - t_start;
+ H5_bandwidth(bw, (double)nbytes, e_time);
#ifdef H5_HAVE_GETRUSAGE
- printf (HEADING "%1.2fuser %1.2fsystem %1.2felapsed %1.2fMB/s\n",
- prefix, u_time, s_time, e_time, bw/(1024*1024));
+ HDprintf(HEADING "%1.2fuser %1.2fsystem %1.2felapsed %s\n",
+ prefix, u_time, s_time, e_time, bw);
#else
- printf (HEADING "%1.2felapsed %1.2fMB/s\n",
- prefix, e_time, bw/(1024*1024));
+ HDprintf(HEADING "%1.2felapsed %s\n",
+ prefix, e_time, bw);
#endif
-
}
@@ -122,18 +100,16 @@ print_stats (const char *prefix,
* Programmer: Robb Matzke
* Thursday, March 12, 1998
*
- * Modifications:
- *
*-------------------------------------------------------------------------
*/
static void
-synchronize (void)
+synchronize(void)
{
#ifdef H5_HAVE_SYSTEM
#if defined(H5_HAVE_WIN32_API) && ! defined(__CYGWIN__)
_flushall();
#else
- int status;
+ int H5_ATTR_NDEBUG_UNUSED status;
status = HDsystem("sync");
HDassert(status >= 0);
@@ -157,349 +133,244 @@ synchronize (void)
* Programmer: Robb Matzke
* Thursday, March 12, 1998
*
- * Modifications:
- *
*-------------------------------------------------------------------------
*/
int
-main (void)
+main(void)
{
- static hsize_t size[2] = {REQUEST_SIZE_X, REQUEST_SIZE_Y};
- static unsigned nread = NREAD_REQUESTS, nwrite = NWRITE_REQUESTS;
+ hsize_t size[2] = {REQUEST_SIZE_X, REQUEST_SIZE_Y};
+ unsigned nread = NREAD_REQUESTS, nwrite = NWRITE_REQUESTS;
unsigned char *the_data = NULL;
- hid_t file, dset, file_space = -1;
- herr_t status;
+ hid_t file, dset, file_space = H5I_INVALID_HID;
#ifdef H5_HAVE_GETRUSAGE
struct rusage r_start, r_stop;
-#else
- struct timeval r_start, r_stop;
#endif
- struct timeval t_start, t_stop;
+ double t_start, t_stop;
int fd;
unsigned u;
- hssize_t n;
- off_t offset;
+ herr_t H5_ATTR_NDEBUG_UNUSED status;
+ hssize_t H5_ATTR_NDEBUG_UNUSED n;
+ off_t H5_ATTR_NDEBUG_UNUSED offset;
hsize_t start[2];
hsize_t count[2];
-#ifdef H5_HAVE_SYS_TIMEB
- struct _timeb *tbstart = malloc(sizeof(struct _timeb));
- struct _timeb *tbstop = malloc(sizeof(struct _timeb));
-#endif
/*
* The extra cast in the following statement is a bug workaround for the
* Win32 version 5.0 compiler.
* 1998-11-06 ptl
*/
- printf ("I/O request size is %1.1fMB\n",
- (double)(hssize_t)(size[0]*size[1])/(double)1024.0F*(double)1024);
+ HDprintf("I/O request size is %1.1fMB\n",
+ (double)(hssize_t)(size[0] * size[1]) / (double)1024.0F * (double)1024);
/* Open the files */
- file = H5Fcreate (HDF5_FILE_NAME, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT);
- assert (file>=0);
- fd = HDopen (RAW_FILE_NAME, O_RDWR|O_CREAT|O_TRUNC, 0666);
- assert (fd>=0);
+ file = H5Fcreate(HDF5_FILE_NAME, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT);
+ HDassert(file >= 0);
+ fd = HDopen(RAW_FILE_NAME, O_RDWR|O_CREAT|O_TRUNC, 0666);
+ HDassert(fd >= 0);
/* Create the dataset */
- file_space = H5Screate_simple (2, size, size);
- assert(file_space >= 0);
+ file_space = H5Screate_simple(2, size, size);
+ HDassert(file_space >= 0);
dset = H5Dcreate2(file, "dset", H5T_NATIVE_UCHAR, file_space, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
- assert(dset >= 0);
- the_data = (unsigned char *)malloc((size_t)(size[0] * size[1]));
+ HDassert(dset >= 0);
+ the_data = (unsigned char *)HDmalloc((size_t)(size[0] * size[1]));
/* initial fill for lazy malloc */
HDmemset(the_data, 0xAA, (size_t)(size[0] * size[1]));
+
/* Fill raw */
- synchronize ();
+ synchronize();
#ifdef H5_HAVE_GETRUSAGE
HDgetrusage(RUSAGE_SELF, &r_start);
#endif
-#ifdef H5_HAVE_GETTIMEOFDAY
- HDgettimeofday(&t_start, NULL);
-#else
-#ifdef H5_HAVE_SYS_TIMEB
- _ftime(tbstart);
-#endif
-#endif
- HDfprintf (stderr, HEADING, "fill raw");
+ t_start = H5_get_time();
+ HDfprintf(stderr, HEADING, "fill raw");
for(u = 0; u < nwrite; u++) {
- putc (PROGRESS, stderr);
- HDfflush(stderr);
- HDmemset(the_data, 0xAA, (size_t)(size[0]*size[1]));
+ HDputc(PROGRESS, stderr);
+ HDfflush(stderr);
+ HDmemset(the_data, 0xAA, (size_t)(size[0] * size[1]));
}
#ifdef H5_HAVE_GETRUSAGE
HDgetrusage(RUSAGE_SELF, &r_stop);
#endif
-#ifdef H5_HAVE_GETTIMEOFDAY
- HDgettimeofday(&t_stop, NULL);
-#else
-#ifdef H5_HAVE_SYS_TIMEB
- _ftime(tbstop);
- t_start.tv_sec = tbstart->time;
- t_start.tv_usec = tbstart->millitm;
- t_stop.tv_sec = tbstop->time;
- t_stop.tv_usec = tbstop->millitm;
-#endif
-#endif
- putc ('\n', stderr);
- print_stats ("fill raw",
- &r_start, &r_stop, &t_start, &t_stop,
- (size_t)(nread*size[0]*size[1]));
+ t_stop = H5_get_time();
+ HDputc('\n', stderr);
+ print_stats("fill raw",
+#ifdef H5_HAVE_GETRUSAGE
+ &r_start, &r_stop,
+#endif /* H5_HAVE_GETRUSAGE */
+ t_start, t_stop, (size_t)(nread * size[0] * size[1]));
/* Fill hdf5 */
- synchronize ();
+ synchronize();
#ifdef H5_HAVE_GETRUSAGE
HDgetrusage(RUSAGE_SELF, &r_start);
#endif
-#ifdef H5_HAVE_GETTIMEOFDAY
- HDgettimeofday(&t_start, NULL);
-#else
-#ifdef H5_HAVE_SYS_TIMEB
- _ftime(tbstart);
-#endif
-#endif
- HDfprintf (stderr, HEADING, "fill hdf5");
+ t_start = H5_get_time();
+ HDfprintf(stderr, HEADING, "fill hdf5");
for(u = 0; u < nread; u++) {
- putc (PROGRESS, stderr);
- HDfflush(stderr);
- status = H5Dread (dset, H5T_NATIVE_UCHAR, file_space, file_space,
- H5P_DEFAULT, the_data);
- assert (status>=0);
+ HDputc(PROGRESS, stderr);
+ HDfflush(stderr);
+ status = H5Dread(dset, H5T_NATIVE_UCHAR, file_space, file_space,
+ H5P_DEFAULT, the_data);
+ HDassert(status >= 0);
}
#ifdef H5_HAVE_GETRUSAGE
HDgetrusage(RUSAGE_SELF, &r_stop);
#endif
-#ifdef H5_HAVE_GETTIMEOFDAY
- HDgettimeofday(&t_stop, NULL);
-#else
-#ifdef H5_HAVE_SYS_TIMEB
- _ftime(tbstop);
- t_start.tv_sec = tbstart->time;
- t_start.tv_usec = tbstart->millitm;
- t_stop.tv_sec = tbstop->time;
- t_stop.tv_usec = tbstop->millitm;
-#endif
-#endif
- putc ('\n', stderr);
- print_stats ("fill hdf5",
- &r_start, &r_stop, &t_start, &t_stop,
- (size_t)(nread*size[0]*size[1]));
+ t_stop = H5_get_time();
+ HDputc('\n', stderr);
+ print_stats("fill hdf5",
+#ifdef H5_HAVE_GETRUSAGE
+ &r_start, &r_stop,
+#endif /* H5_HAVE_GETRUSAGE */
+ t_start, t_stop, (size_t)(nread * size[0] * size[1]));
/* Write the raw dataset */
- synchronize ();
+ synchronize();
#ifdef H5_HAVE_GETRUSAGE
HDgetrusage(RUSAGE_SELF, &r_start);
#endif
-#ifdef H5_HAVE_GETTIMEOFDAY
- HDgettimeofday(&t_start, NULL);
-#else
-#ifdef H5_HAVE_SYS_TIMEB
- _ftime(tbstart);
-#endif
-#endif
- HDfprintf (stderr, HEADING, "out raw");
+ t_start = H5_get_time();
+ HDfprintf(stderr, HEADING, "out raw");
for(u = 0; u < nwrite; u++) {
- putc (PROGRESS, stderr);
- HDfflush(stderr);
- offset = HDlseek (fd, (off_t)0, SEEK_SET);
- assert (0==offset);
- n = HDwrite (fd, the_data, (size_t)(size[0]*size[1]));
- assert (n>=0 && (size_t)n==size[0]*size[1]);
+ HDputc(PROGRESS, stderr);
+ HDfflush(stderr);
+ offset = HDlseek(fd, (off_t)0, SEEK_SET);
+ HDassert(0 == offset);
+ n = HDwrite(fd, the_data, (size_t)(size[0] * size[1]));
+ HDassert(n >= 0 && (size_t)n == (size[0] * size[1]));
}
#ifdef H5_HAVE_GETRUSAGE
HDgetrusage(RUSAGE_SELF, &r_stop);
#endif
-#ifdef H5_HAVE_GETTIMEOFDAY
- HDgettimeofday(&t_stop, NULL);
-#else
-#ifdef H5_HAVE_SYS_TIMEB
- _ftime(tbstop);
- t_start.tv_sec = tbstart->time;
- t_start.tv_usec = tbstart->millitm;
- t_stop.tv_sec = tbstop->time;
- t_stop.tv_usec = tbstop->millitm;
-#endif
-#endif
- putc ('\n', stderr);
- print_stats ("out raw",
- &r_start, &r_stop, &t_start, &t_stop,
- (size_t)(nread*size[0]*size[1]));
+ t_stop = H5_get_time();
+ HDputc('\n', stderr);
+ print_stats("out raw",
+#ifdef H5_HAVE_GETRUSAGE
+ &r_start, &r_stop,
+#endif /* H5_HAVE_GETRUSAGE */
+ t_start, t_stop, (size_t)(nread * size[0] * size[1]));
/* Write the hdf5 dataset */
- synchronize ();
+ synchronize();
#ifdef H5_HAVE_GETRUSAGE
HDgetrusage(RUSAGE_SELF, &r_start);
#endif
-#ifdef H5_HAVE_GETTIMEOFDAY
- HDgettimeofday(&t_start, NULL);
-#else
-#ifdef H5_HAVE_SYS_TIMEB
- _ftime(tbstart);
-#endif
-#endif
- HDfprintf (stderr, HEADING, "out hdf5");
+ t_start = H5_get_time();
+ HDfprintf(stderr, HEADING, "out hdf5");
for(u = 0; u < nwrite; u++) {
- putc (PROGRESS, stderr);
- HDfflush(stderr);
- status = H5Dwrite (dset, H5T_NATIVE_UCHAR, H5S_ALL, H5S_ALL,
- H5P_DEFAULT, the_data);
- assert (status>=0);
+ HDputc(PROGRESS, stderr);
+ HDfflush(stderr);
+ status = H5Dwrite(dset, H5T_NATIVE_UCHAR, H5S_ALL, H5S_ALL,
+ H5P_DEFAULT, the_data);
+ HDassert(status >= 0);
}
#ifdef H5_HAVE_GETRUSAGE
HDgetrusage(RUSAGE_SELF, &r_stop);
#endif
-#ifdef H5_HAVE_GETTIMEOFDAY
- HDgettimeofday(&t_stop, NULL);
-#else
-#ifdef H5_HAVE_SYS_TIMEB
- _ftime(tbstop);
- t_start.tv_sec = tbstart->time;
- t_start.tv_usec = tbstart->millitm;
- t_stop.tv_sec = tbstop->time;
- t_stop.tv_usec = tbstop->millitm;
-#endif
-#endif
- putc ('\n', stderr);
- print_stats ("out hdf5",
- &r_start, &r_stop, &t_start, &t_stop,
- (size_t)(nread*size[0]*size[1]));
+ t_stop = H5_get_time();
+ HDputc('\n', stderr);
+ print_stats("out hdf5",
+#ifdef H5_HAVE_GETRUSAGE
+ &r_start, &r_stop,
+#endif /* H5_HAVE_GETRUSAGE */
+ t_start, t_stop, (size_t)(nread * size[0] * size[1]));
/* Read the raw dataset */
- synchronize ();
+ synchronize();
#ifdef H5_HAVE_GETRUSAGE
HDgetrusage(RUSAGE_SELF, &r_start);
#endif
-#ifdef H5_HAVE_GETTIMEOFDAY
- HDgettimeofday(&t_start, NULL);
-#else
-#ifdef H5_HAVE_SYS_TIMEB
- _ftime(tbstart);
-#endif
-#endif
- HDfprintf (stderr, HEADING, "in raw");
+ t_start = H5_get_time();
+ HDfprintf(stderr, HEADING, "in raw");
for(u = 0; u < nread; u++) {
- putc (PROGRESS, stderr);
- HDfflush(stderr);
- offset = HDlseek (fd, (off_t)0, SEEK_SET);
- assert (0==offset);
- n = HDread (fd, the_data, (size_t)(size[0]*size[1]));
- assert (n>=0 && (size_t)n==size[0]*size[1]);
+ HDputc(PROGRESS, stderr);
+ HDfflush(stderr);
+ offset = HDlseek(fd, (off_t)0, SEEK_SET);
+ HDassert(0 == offset);
+ n = HDread(fd, the_data, (size_t)(size[0] * size[1]));
+ HDassert(n >= 0 && (size_t)n == (size[0] * size[1]));
}
#ifdef H5_HAVE_GETRUSAGE
HDgetrusage(RUSAGE_SELF, &r_stop);
#endif
-#ifdef H5_HAVE_GETTIMEOFDAY
- HDgettimeofday(&t_stop, NULL);
-#else
-#ifdef H5_HAVE_SYS_TIMEB
- _ftime(tbstop);
- t_start.tv_sec = tbstart->time;
- t_start.tv_usec = tbstart->millitm;
- t_stop.tv_sec = tbstop->time;
- t_stop.tv_usec = tbstop->millitm;
-#endif
-#endif
- putc ('\n', stderr);
- print_stats ("in raw",
- &r_start, &r_stop, &t_start, &t_stop,
- (size_t)(nread*size[0]*size[1]));
+ t_stop = H5_get_time();
+ HDputc('\n', stderr);
+ print_stats("in raw",
+#ifdef H5_HAVE_GETRUSAGE
+ &r_start, &r_stop,
+#endif /* H5_HAVE_GETRUSAGE */
+ t_start, t_stop, (size_t)(nread * size[0] * size[1]));
/* Read the hdf5 dataset */
- synchronize ();
+ synchronize();
#ifdef H5_HAVE_GETRUSAGE
HDgetrusage(RUSAGE_SELF, &r_start);
#endif
-#ifdef H5_HAVE_GETTIMEOFDAY
- HDgettimeofday(&t_start, NULL);
-#else
-#ifdef H5_HAVE_SYS_TIMEB
- _ftime(tbstart);
-#endif
-#endif
- HDfprintf (stderr, HEADING, "in hdf5");
+ t_start = H5_get_time();
+ HDfprintf(stderr, HEADING, "in hdf5");
for(u = 0; u < nread; u++) {
- putc (PROGRESS, stderr);
- HDfflush(stderr);
- status = H5Dread (dset, H5T_NATIVE_UCHAR, file_space, file_space,
- H5P_DEFAULT, the_data);
- assert (status>=0);
+ HDputc(PROGRESS, stderr);
+ HDfflush(stderr);
+ status = H5Dread(dset, H5T_NATIVE_UCHAR, file_space, file_space,
+ H5P_DEFAULT, the_data);
+ HDassert(status >= 0);
}
#ifdef H5_HAVE_GETRUSAGE
HDgetrusage(RUSAGE_SELF, &r_stop);
#endif
-#ifdef H5_HAVE_GETTIMEOFDAY
- HDgettimeofday(&t_stop, NULL);
-#else
-#ifdef H5_HAVE_SYS_TIMEB
- _ftime(tbstop);
- t_start.tv_sec = tbstart->time;
- t_start.tv_usec = tbstart->millitm;
- t_stop.tv_sec = tbstop->time;
- t_stop.tv_usec = tbstop->millitm;
-#endif
-#endif
- putc ('\n', stderr);
- print_stats ("in hdf5",
- &r_start, &r_stop, &t_start, &t_stop,
- (size_t)(nread*size[0]*size[1]));
+ t_stop = H5_get_time();
+ HDputc('\n', stderr);
+ print_stats("in hdf5",
+#ifdef H5_HAVE_GETRUSAGE
+ &r_start, &r_stop,
+#endif /* H5_HAVE_GETRUSAGE */
+ t_start, t_stop, (size_t)(nread * size[0] * size[1]));
/* Read hyperslab */
- assert (size[0]>20 && size[1]>20);
+ HDassert(size[0] > 20 && size[1] > 20);
start[0] = start[1] = 10;
- count[0] = count[1] = size[0]-20;
- status = H5Sselect_hyperslab (file_space, H5S_SELECT_SET, start, NULL, count, NULL);
- assert (status>=0);
- synchronize ();
+ count[0] = count[1] = size[0] - 20;
+ status = H5Sselect_hyperslab(file_space, H5S_SELECT_SET, start, NULL, count, NULL);
+ HDassert(status >= 0);
+ synchronize();
#ifdef H5_HAVE_GETRUSAGE
HDgetrusage(RUSAGE_SELF, &r_start);
#endif
-#ifdef H5_HAVE_GETTIMEOFDAY
- HDgettimeofday(&t_start, NULL);
-#else
-#ifdef H5_HAVE_SYS_TIMEB
- _ftime(tbstart);
-#endif
-#endif
- HDfprintf (stderr, HEADING, "in hdf5 partial");
+ t_start = H5_get_time();
+ HDfprintf(stderr, HEADING, "in hdf5 partial");
for(u = 0; u < nread; u++) {
- putc (PROGRESS, stderr);
- HDfflush(stderr);
- status = H5Dread (dset, H5T_NATIVE_UCHAR, file_space, file_space,
- H5P_DEFAULT, the_data);
- assert (status>=0);
+ HDputc(PROGRESS, stderr);
+ HDfflush(stderr);
+ status = H5Dread(dset, H5T_NATIVE_UCHAR, file_space, file_space,
+ H5P_DEFAULT, the_data);
+ HDassert(status >= 0);
}
#ifdef H5_HAVE_GETRUSAGE
HDgetrusage(RUSAGE_SELF, &r_stop);
#endif
-#ifdef H5_HAVE_GETTIMEOFDAY
- HDgettimeofday(&t_stop, NULL);
-#else
-#ifdef H5_HAVE_SYS_TIMEB
- _ftime(tbstop);
- t_start.tv_sec = tbstart->time;
- t_start.tv_usec = tbstart->millitm;
- t_stop.tv_sec = tbstop->time;
- t_stop.tv_usec = tbstop->millitm;
-#endif
-#endif
- putc('\n', stderr);
+ t_stop = H5_get_time();
+ HDputc('\n', stderr);
print_stats("in hdf5 partial",
- &r_start, &r_stop, &t_start, &t_stop,
- (size_t)(nread*count[0]*count[1]));
-
-
+#ifdef H5_HAVE_GETRUSAGE
+ &r_start, &r_stop,
+#endif /* H5_HAVE_GETRUSAGE */
+ t_start, t_stop, (size_t)(nread * size[0] * size[1]));
/* Close everything */
HDclose(fd);
+
H5Dclose(dset);
H5Sclose(file_space);
H5Fclose(file);
- free(the_data);
+
+ HDfree(the_data);
return 0;
}
diff --git a/tools/test/perform/overhead.c b/tools/test/perform/overhead.c
index 108d9e4..bb3aff5 100644
--- a/tools/test/perform/overhead.c
+++ b/tools/test/perform/overhead.c
@@ -12,7 +12,7 @@
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/*
- * Programmer: Robb Matzke <matzke@llnl.gov>
+ * Programmer: Robb Matzke
* Monday, September 28, 1998
*
* Purpose: Creates a chunked dataset and measures the storage overhead.
@@ -217,9 +217,9 @@ test(fill_t fill_style, const double splits[],
fspace, H5P_DEFAULT, dcpl, H5P_DEFAULT)) < 0) goto error;
if ((fd=HDopen(FILE_NAME_1, O_RDONLY, 0666)) < 0) goto error;
- if(FILL_RANDOM==fill_style)
+ if(FILL_RANDOM==fill_style)
had = (int *)calloc((size_t)cur_size[0], sizeof(int));
-
+
for (i=1; i<=cur_size[0]; i++) {
/* Decide which chunk to write to */
@@ -391,7 +391,7 @@ main(int argc, char *argv[])
nerrors += test(FILL_INWARD, splits, FALSE, use_cache);
nerrors += test(FILL_OUTWARD, splits, FALSE, use_cache);
nerrors += test(FILL_RANDOM, splits, FALSE, use_cache);
- }
+ }
else {
if (use_cache) usage(argv[0]);
nerrors += test(fill_style, splits, TRUE, FALSE);
diff --git a/tools/test/perform/perf.c b/tools/test/perform/perf.c
index 34b8a2d..364836f 100644
--- a/tools/test/perform/perf.c
+++ b/tools/test/perform/perf.c
@@ -110,15 +110,15 @@ const char *FILENAME[] = {
/* function prototypes */
static int parse_args(int argc, char **argv);
-extern int errno;
-
+#ifndef H5_HAVE_UNISTD_H
/* globals needed for getopt */
extern char *optarg;
+#endif
int main(int argc, char **argv)
{
- char *buf, *tmp, *buf2, *tmp2, *check;
- int i, j, mynod=0, nprocs=1, err, my_correct = 1, correct, myerrno;
+ char *buf, *tmp, *buf2 = NULL, *tmp2 = NULL, *check;
+ int i, j, mynod=0, nprocs=1, my_correct = 1, correct, myerrno;
double stim, etim;
double write_tim = 0;
double read_tim = 0;
@@ -127,10 +127,6 @@ int main(int argc, char **argv)
double min_read_tim, min_write_tim;
double ave_read_tim, ave_write_tim;
int64_t iter_jump = 0;
- int64_t seek_position = 0;
- MPI_File fh;
- MPI_Status status;
- int nchars;
char filename[MAX_PATH];
herr_t ret; /* Generic return value */
@@ -164,7 +160,7 @@ int main(int argc, char **argv)
iter_jump = nprocs * opt_block;
/* setup a buffer of data to write */
- if (!(tmp = (char *) malloc(opt_block + 256))) {
+ if (!(tmp = (char *) malloc((size_t)opt_block + 256))) {
perror("malloc");
goto die_jar_jar_die;
}
@@ -172,7 +168,7 @@ int main(int argc, char **argv)
if (opt_correct) {
/* do the same buffer setup for verifiable data */
- if (!(tmp2 = (char *) malloc(opt_block + 256))) {
+ if (!(tmp2 = (char *) malloc((size_t)opt_block + 256))) {
perror("malloc2");
goto die_jar_jar_die;
}
@@ -222,7 +218,7 @@ int main(int argc, char **argv)
VRFY((fid >= 0), "H5Fcreate succeeded", H5FATAL);
/* define a contiquous dataset of opt_iter*nprocs*opt_block chars */
- dims[0] = opt_iter * nprocs * opt_block;
+ dims[0] = (hsize_t)opt_iter * (hsize_t)nprocs * (hsize_t)opt_block;
sid = H5Screate_simple(RANK, dims, NULL);
VRFY((sid >= 0), "H5Screate_simple succeeded", H5FATAL);
dataset = H5Dcreate2(fid, "Dataset1", H5T_NATIVE_CHAR, sid,
@@ -230,7 +226,7 @@ int main(int argc, char **argv)
VRFY((dataset >= 0), "H5Dcreate2 succeeded", H5FATAL);
/* create the memory dataspace and the file dataspace */
- dims[0] = opt_block;
+ dims[0] = (hsize_t)opt_block;
mem_dataspace = H5Screate_simple(RANK, dims, NULL);
VRFY((mem_dataspace >= 0), "", H5FATAL);
file_dataspace = H5Dget_space(dataset);
@@ -242,7 +238,7 @@ int main(int argc, char **argv)
for(j=0; j < opt_iter; j++) {
/* setup a file dataspace selection */
start[0] = (hsize_t)((j * iter_jump) + (mynod * opt_block));
- stride[0] = block[0] = opt_block;
+ stride[0] = block[0] = (hsize_t)opt_block;
count[0]= 1;
ret=H5Sselect_hyperslab(file_dataspace, H5S_SELECT_SET, start, stride, count, block);
VRFY((ret >= 0), "H5Sset_hyperslab succeeded", H5FATAL);
@@ -295,7 +291,7 @@ int main(int argc, char **argv)
for (j=0; j < opt_iter; j++) {
/* setup a file dataspace selection */
start[0] = (hsize_t)((j * iter_jump) + (mynod * opt_block));
- stride[0] = block[0] = opt_block;
+ stride[0] = block[0] = (hsize_t)opt_block;
count[0]= 1;
ret=H5Sselect_hyperslab(file_dataspace, H5S_SELECT_SET, start, stride, count, block);
VRFY((ret >= 0), "H5Sset_hyperslab succeeded", H5FATAL);
@@ -326,7 +322,7 @@ int main(int argc, char **argv)
/* if the user wanted to check correctness, compare the write
* buffer to the read buffer */
- if (opt_correct && memcmp(buf, buf2, opt_block)) {
+ if (opt_correct && memcmp(buf, buf2, (size_t)opt_block)) {
HDfprintf(stderr, "node %d, correctness test failed\n", mynod);
my_correct = 0;
MPI_Allreduce(&my_correct, &correct, 1, MPI_INT, MPI_MIN,
@@ -367,8 +363,8 @@ int main(int argc, char **argv)
/* print out the results on one node */
if (mynod == 0) {
- read_bw = ((int64_t)(opt_block*nprocs*opt_iter))/(max_read_tim*1000000.0);
- write_bw = ((int64_t)(opt_block*nprocs*opt_iter))/(max_write_tim*1000000.0);
+ read_bw = (double)((int64_t)(opt_block*nprocs*opt_iter))/(max_read_tim*1000000.0);
+ write_bw = (double)((int64_t)(opt_block*nprocs*opt_iter))/(max_write_tim*1000000.0);
printf("nr_procs = %d, nr_iter = %d, blk_sz = %ld\n", nprocs,
opt_iter, (long)opt_block);
@@ -439,9 +435,9 @@ parse_args(int argc, char **argv)
{
char *p;
- opt_alignment = HDatoi(optarg);
+ opt_alignment = (hsize_t)HDatoi(optarg);
if(NULL != (p = (char*)HDstrchr(optarg, '/')))
- opt_threshold = HDatoi(p + 1);
+ opt_threshold = (hsize_t)HDatoi(p + 1);
}
HDfprintf(stdout,
"alignment/threshold=%Hu/%Hu\n",
diff --git a/tools/test/perform/perf_meta.c b/tools/test/perform/perf_meta.c
index b56f074..77248cc 100644
--- a/tools/test/perform/perf_meta.c
+++ b/tools/test/perform/perf_meta.c
@@ -12,7 +12,7 @@
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/*
- * Programmer: Raymond Lu <slu@ncsa.uiuc.edu>
+ * Programmer: Raymond Lu
* Friday, Oct 3, 2004
*
* Purpose: Tests performance of metadata
diff --git a/tools/test/perform/pio_engine.c b/tools/test/perform/pio_engine.c
index 798e32e..cdd698e 100644
--- a/tools/test/perform/pio_engine.c
+++ b/tools/test/perform/pio_engine.c
@@ -54,24 +54,15 @@
/* sizes of various items. these sizes won't change during program execution */
/* The following three must have the same type */
-#define ELMT_SIZE (sizeof(unsigned char)) /* we're doing bytes */
-#define ELMT_MPI_TYPE MPI_BYTE
#define ELMT_H5_TYPE H5T_NATIVE_UCHAR
#define GOTOERROR(errcode) { ret_code = errcode; goto done; }
-#define GOTODONE { goto done; }
#define ERRMSG(mesg) { \
HDfprintf(stderr, "Proc %d: ", pio_mpi_rank_g); \
HDfprintf(stderr, "*** Assertion failed (%s) at line %4d in %s\n", \
mesg, (int)__LINE__, __FILE__); \
}
-#define MSG(mesg) { \
- HDfprintf(stderr, "Proc %d: ", pio_mpi_rank_g); \
- HDfprintf(stderr, "(%s) at line %4d in %s\n", \
- mesg, (int)__LINE__, __FILE__); \
-}
-
/* verify: if val is false (0), print mesg. */
#define VRFY(val, mesg) do { \
if (!val) { \
@@ -138,6 +129,7 @@ static herr_t do_fopen(parameters *param, char *fname, file_descr *fd /*out*/,
int flags);
static herr_t do_fclose(iotype iot, file_descr *fd);
static void do_cleanupfile(iotype iot, char *fname);
+static off_t sqrto(off_t);
/*
* Function: do_pio
@@ -208,7 +200,7 @@ do_pio(parameters param)
bsize = buf_size; /* Actual buffer size */
}
else {
- snbytes = (off_t)sqrt(nbytes); /* General dataset size */
+ snbytes = sqrto(nbytes); /* General dataset size */
bsize = buf_size * blk_size; /* Actual buffer size */
}
@@ -260,7 +252,7 @@ do_pio(parameters param)
}
if (!param.dim2d){
- if(((snbytes/pio_mpi_nprocs_g)%buf_size)!=0) {
+ if(((size_t)(snbytes/pio_mpi_nprocs_g)%buf_size)!=0) {
HDfprintf(stderr,
"Dataset size/process (%" H5_PRINTF_LL_WIDTH "d) must be a multiple of the "
"trasfer buffer size (%zu)\n",
@@ -269,7 +261,7 @@ do_pio(parameters param)
}
}
else {
- if((snbytes%buf_size)!=0) {
+ if(((size_t)snbytes%buf_size)!=0) {
HDfprintf(stderr,
"Dataset side size (%" H5_PRINTF_LL_WIDTH "d) must be a multiple of the "
"trasfer buffer size (%zu)\n",
@@ -311,21 +303,21 @@ do_pio(parameters param)
/* Need barrier to make sure everyone starts at the same time */
MPI_Barrier(pio_comm_g);
- set_time(res.timers, HDF5_GROSS_WRITE_FIXED_DIMS, TSTART);
+ io_time_set(res.timers, HDF5_GROSS_WRITE_FIXED_DIMS, TSTART);
hrc = do_fopen(&param, fname, &fd, PIO_CREATE | PIO_WRITE);
VRFY((hrc == SUCCESS), "do_fopen failed");
- set_time(res.timers, HDF5_FINE_WRITE_FIXED_DIMS, TSTART);
+ io_time_set(res.timers, HDF5_FINE_WRITE_FIXED_DIMS, TSTART);
hrc = do_write(&res, &fd, &param, ndsets, nbytes, buf_size, buffer);
- set_time(res.timers, HDF5_FINE_WRITE_FIXED_DIMS, TSTOP);
+ io_time_set(res.timers, HDF5_FINE_WRITE_FIXED_DIMS, TSTOP);
VRFY((hrc == SUCCESS), "do_write failed");
/* Close file for write */
hrc = do_fclose(iot, &fd);
- set_time(res.timers, HDF5_GROSS_WRITE_FIXED_DIMS, TSTOP);
+ io_time_set(res.timers, HDF5_GROSS_WRITE_FIXED_DIMS, TSTOP);
VRFY((hrc == SUCCESS), "do_fclose failed");
if (!param.h5_write_only) {
@@ -339,20 +331,20 @@ do_pio(parameters param)
MPI_Barrier(pio_comm_g);
/* Open file for read */
- set_time(res.timers, HDF5_GROSS_READ_FIXED_DIMS, TSTART);
+ io_time_set(res.timers, HDF5_GROSS_READ_FIXED_DIMS, TSTART);
hrc = do_fopen(&param, fname, &fd, PIO_READ);
VRFY((hrc == SUCCESS), "do_fopen failed");
- set_time(res.timers, HDF5_FINE_READ_FIXED_DIMS, TSTART);
+ io_time_set(res.timers, HDF5_FINE_READ_FIXED_DIMS, TSTART);
hrc = do_read(&res, &fd, &param, ndsets, nbytes, buf_size, buffer);
- set_time(res.timers, HDF5_FINE_READ_FIXED_DIMS, TSTOP);
+ io_time_set(res.timers, HDF5_FINE_READ_FIXED_DIMS, TSTOP);
VRFY((hrc == SUCCESS), "do_read failed");
/* Close file for read */
hrc = do_fclose(iot, &fd);
- set_time(res.timers, HDF5_GROSS_READ_FIXED_DIMS, TSTOP);
+ io_time_set(res.timers, HDF5_GROSS_READ_FIXED_DIMS, TSTOP);
VRFY((hrc == SUCCESS), "do_fclose failed");
}
@@ -371,15 +363,17 @@ done:
switch (iot) {
case POSIXIO:
if (fd.posixfd != -1)
- hrc = do_fclose(iot, &fd);
+ hrc = do_fclose(iot, &fd);
break;
case MPIO:
if (fd.mpifd != MPI_FILE_NULL)
- hrc = do_fclose(iot, &fd);
+ hrc = do_fclose(iot, &fd);
break;
case PHDF5:
if (fd.h5fd != -1)
- hrc = do_fclose(iot, &fd);
+ hrc = do_fclose(iot, &fd);
+ break;
+ default:
break;
}
@@ -422,6 +416,8 @@ pio_create_filename(iotype iot, const char *base_name, char *fullname, size_t si
case PHDF5:
suffix = ".h5";
break;
+ default:
+ break;
}
/* First use the environment variable and then try the constant */
@@ -557,16 +553,16 @@ do_write(results *res, file_descr *fd, parameters *parms, long ndsets,
/* HDF5 variables */
herr_t hrc; /*HDF5 return code */
hsize_t h5dims[2]; /*dataset dim sizes */
- hid_t h5dset_space_id = -1; /*dataset space ID */
- hid_t h5mem_space_id = -1; /*memory dataspace ID */
- hid_t h5ds_id = -1; /*dataset handle */
+ hid_t h5dset_space_id = H5I_INVALID_HID; /*dataset space ID */
+ hid_t h5mem_space_id = H5I_INVALID_HID; /*memory dataspace ID */
+ hid_t h5ds_id = H5I_INVALID_HID; /*dataset handle */
hsize_t h5block[2]; /*dataspace selection */
hsize_t h5stride[2];
hsize_t h5count[2];
hsize_t h5start[2];
hssize_t h5offset[2]; /* Selection offset within dataspace */
- hid_t h5dcpl = -1; /* Dataset creation property list */
- hid_t h5dxpl = -1; /* Dataset transfer property list */
+ hid_t h5dcpl = H5I_INVALID_HID; /* Dataset creation property list */
+ hid_t h5dxpl = H5I_INVALID_HID; /* Dataset transfer property list */
/* Get the parameters from the parameter block */
blk_size=parms->blk_size;
@@ -589,7 +585,7 @@ do_write(results *res, file_descr *fd, parameters *parms, long ndsets,
} /* end if */
/* Interleaved Pattern: */
else {
- bytes_begin[0] = (off_t)(blk_size*pio_mpi_rank_g);
+ bytes_begin[0] = (off_t)(blk_size*(size_t)pio_mpi_rank_g);
} /* end else */
/* Prepare buffer for verifying data */
@@ -601,7 +597,7 @@ do_write(results *res, file_descr *fd, parameters *parms, long ndsets,
/* nbytes is always the number of bytes per dataset (1D or 2D). If the
dataspace is 2D, snbytes is the size of a side of the dataset square.
*/
- snbytes = (off_t)sqrt(nbytes);
+ snbytes = sqrto(nbytes);
/* Contiguous Pattern: */
if (!parms->interleaved) {
@@ -613,9 +609,9 @@ do_write(results *res, file_descr *fd, parameters *parms, long ndsets,
bytes_begin[0] = 0;
if(!parms->h5_use_chunks || parms->io_type==PHDF5)
- bytes_begin[1] = (off_t)(blk_size*pio_mpi_rank_g);
+ bytes_begin[1] = (off_t)(blk_size*(size_t)pio_mpi_rank_g);
else
- bytes_begin[1] = (off_t)(blk_size*blk_size*pio_mpi_rank_g);
+ bytes_begin[1] = (off_t)(blk_size*blk_size*(size_t)pio_mpi_rank_g);
} /* end else */
/* Prepare buffer for verifying data */
@@ -693,7 +689,7 @@ do_write(results *res, file_descr *fd, parameters *parms, long ndsets,
VRFY((mrc==MPI_SUCCESS), "MPIO_TYPE_COMMIT");
/* Build contiguous file's derived type */
- mrc = MPI_Type_vector((int)blk_size, (int)1, (int)(snbytes/buf_size),
+ mrc = MPI_Type_vector((int)blk_size, (int)1, (int)((size_t)snbytes/buf_size),
mpi_partial_buffer_cont, &mpi_cont_type);
VRFY((mrc==MPI_SUCCESS), "MPIO_TYPE_CREATE");
@@ -711,7 +707,7 @@ do_write(results *res, file_descr *fd, parameters *parms, long ndsets,
VRFY((mrc==MPI_SUCCESS), "MPIO_TYPE_COMMIT");
/* Build interleaved file's derived type */
- mrc = MPI_Type_vector((int)buf_size, (int)1, (int)(snbytes/blk_size),
+ mrc = MPI_Type_vector((int)buf_size, (int)1, (int)((size_t)snbytes/blk_size),
mpi_partial_buffer_inter, &mpi_inter_type);
VRFY((mrc==MPI_SUCCESS), "MPIO_TYPE_CREATE");
@@ -738,7 +734,7 @@ do_write(results *res, file_descr *fd, parameters *parms, long ndsets,
VRFY((mrc==MPI_SUCCESS), "MPIO_TYPE_COMMIT");
/* Build chunk interleaved file's derived type */
- mrc = MPI_Type_vector((int)(buf_size/blk_size), (int)1, (int)(snbytes/blk_size),
+ mrc = MPI_Type_vector((int)(buf_size/blk_size), (int)1, (int)((size_t)snbytes/blk_size),
mpi_full_chunk, &mpi_chunk_inter_type);
VRFY((mrc==MPI_SUCCESS), "MPIO_TYPE_CREATE");
@@ -754,22 +750,22 @@ do_write(results *res, file_descr *fd, parameters *parms, long ndsets,
if (!parms->dim2d){
if(nbytes>0) {
/* define a contiguous dataset of nbytes native bytes */
- h5dims[0] = nbytes;
+ h5dims[0] = (hsize_t)nbytes;
h5dset_space_id = H5Screate_simple(1, h5dims, NULL);
VRFY((h5dset_space_id >= 0), "H5Screate_simple");
/* Set up the file dset space id to select the pattern to access */
if (!parms->interleaved){
/* Contiguous pattern */
- h5start[0] = bytes_begin[0];
+ h5start[0] = (hsize_t)bytes_begin[0];
h5stride[0] = h5block[0] = blk_size;
h5count[0] = buf_size/blk_size;
} /* end if */
else {
/* Interleaved access pattern */
/* Skip offset over blocks of other processes */
- h5start[0] = bytes_begin[0];
- h5stride[0] = blk_size*pio_mpi_nprocs_g;
+ h5start[0] = (hsize_t)bytes_begin[0];
+ h5stride[0] = blk_size*(size_t)pio_mpi_nprocs_g;
h5block[0] = blk_size;
h5count[0] = buf_size/blk_size;
} /* end else */
@@ -797,16 +793,16 @@ do_write(results *res, file_descr *fd, parameters *parms, long ndsets,
else {
if(nbytes>0) {
/* define a contiguous dataset of nbytes native bytes */
- h5dims[0] = snbytes;
- h5dims[1] = snbytes;
+ h5dims[0] = (hsize_t)snbytes;
+ h5dims[1] = (hsize_t)snbytes;
h5dset_space_id = H5Screate_simple(2, h5dims, NULL);
VRFY((h5dset_space_id >= 0), "H5Screate_simple");
/* Set up the file dset space id to select the pattern to access */
if (!parms->interleaved){
/* Contiguous pattern */
- h5start[0] = bytes_begin[0];
- h5start[1] = bytes_begin[1];
+ h5start[0] = (hsize_t)bytes_begin[0];
+ h5start[1] = (hsize_t)bytes_begin[1];
h5stride[0] = 1;
h5stride[1] = h5block[0] = h5block[1] = blk_size;
h5count[0] = 1;
@@ -815,10 +811,10 @@ do_write(results *res, file_descr *fd, parameters *parms, long ndsets,
else {
/* Interleaved access pattern */
/* Skip offset over blocks of other processes */
- h5start[0] = bytes_begin[0];
- h5start[1] = bytes_begin[1];
+ h5start[0] = (hsize_t)bytes_begin[0];
+ h5start[1] = (hsize_t)bytes_begin[1];
h5stride[0] = blk_size;
- h5stride[1] = blk_size*pio_mpi_nprocs_g;
+ h5stride[1] = blk_size*(size_t)pio_mpi_nprocs_g;
h5block[0] = h5block[1] = blk_size;
h5count[0] = buf_size/blk_size;
h5count[1] = 1;
@@ -866,6 +862,9 @@ do_write(results *res, file_descr *fd, parameters *parms, long ndsets,
} /* end if */
} /* end if */
break;
+
+ default:
+ break;
} /* end switch */
for (ndset = 1; ndset <= ndsets; ++ndset) {
@@ -929,6 +928,9 @@ do_write(results *res, file_descr *fd, parameters *parms, long ndsets,
GOTOERROR(FAIL);
}
break;
+
+ default:
+ break;
}
/* The task is to transfer bytes_count bytes, starting at
@@ -958,7 +960,7 @@ do_write(results *res, file_descr *fd, parameters *parms, long ndsets,
} /* end else */
/* Start "raw data" write timer */
- set_time(res->timers, HDF5_RAW_WRITE_FIXED_DIMS, TSTART);
+ io_time_set(res->timers, HDF5_RAW_WRITE_FIXED_DIMS, TSTART);
while (nbytes_xfer < bytes_count){
/* Write */
@@ -982,7 +984,7 @@ do_write(results *res, file_descr *fd, parameters *parms, long ndsets,
VRFY((rc != 0), "POSIXWRITE");
/* Advance global offset in dataset */
- nbytes_xfer+=buf_size;
+ nbytes_xfer+=(ssize_t)buf_size;
} /* end if */
/* Interleaved access pattern */
else {
@@ -1011,7 +1013,7 @@ do_write(results *res, file_descr *fd, parameters *parms, long ndsets,
buf_p+=blk_size;
/* Advance global offset in dataset */
- nbytes_xfer+=blk_size;
+ nbytes_xfer+=(ssize_t)blk_size;
/* Decrement number of bytes left this time */
nbytes_toxfer-=blk_size;
@@ -1025,8 +1027,8 @@ do_write(results *res, file_descr *fd, parameters *parms, long ndsets,
/* Contiguous access pattern */
if (!parms->interleaved) {
/* Compute file offset */
- file_offset=posix_file_offset+(off_t)(((nbytes_xfer/blk_size)
- /snbytes)*(blk_size*snbytes)+((nbytes_xfer/blk_size)%snbytes));
+ file_offset=posix_file_offset+(off_t)((((size_t)nbytes_xfer/blk_size)
+ /(size_t)snbytes)*(blk_size*(size_t)snbytes)+(((size_t)nbytes_xfer/blk_size)%(size_t)snbytes));
/* Number of bytes to be transferred per I/O operation */
nbytes_xfer_advance = buf_size;
@@ -1037,9 +1039,9 @@ do_write(results *res, file_descr *fd, parameters *parms, long ndsets,
/* Interleaved access pattern */
else {
/* Compute file offset */
- file_offset=posix_file_offset+(off_t)((((nbytes_xfer/buf_size)
- *pio_mpi_nprocs_g)/snbytes)*(buf_size*snbytes)
- +((nbytes_xfer/buf_size)*pio_mpi_nprocs_g)%snbytes);
+ file_offset=posix_file_offset+(off_t)(((((size_t)nbytes_xfer/buf_size)
+ *(size_t)pio_mpi_nprocs_g)/(size_t)snbytes)*(buf_size*(size_t)snbytes)
+ +(((size_t)nbytes_xfer/buf_size)*(size_t)pio_mpi_nprocs_g)%(size_t)snbytes);
/* Number of bytes to be transferred per I/O operation */
nbytes_xfer_advance = blk_size;
@@ -1070,16 +1072,16 @@ do_write(results *res, file_descr *fd, parameters *parms, long ndsets,
*snbytes/blk_size*(blk_size*blk_size))+((nbytes_xfer/(buf_size/blk_size))
*pio_mpi_nprocs_g)%(snbytes/blk_size*(blk_size*blk_size))); */
- file_offset=posix_file_offset+(off_t)(((nbytes_xfer/(buf_size/blk_size)
- *pio_mpi_nprocs_g)/(snbytes*blk_size))*(buf_size*snbytes)+((nbytes_xfer/(buf_size/blk_size))
- *pio_mpi_nprocs_g)%(snbytes*blk_size));
+ file_offset=posix_file_offset+(off_t)((((size_t)nbytes_xfer/(buf_size/blk_size)
+ *(size_t)pio_mpi_nprocs_g)/((size_t)snbytes*blk_size))*(buf_size*(size_t)snbytes)+(((size_t)nbytes_xfer/(buf_size/blk_size))
+ *(size_t)pio_mpi_nprocs_g)%((size_t)snbytes*blk_size));
/* Number of bytes to be transferred per I/O operation */
nbytes_xfer_advance = blk_size * blk_size;
/* Global offset advance after each I/O operation */
/* file_offset_advance = (off_t)(snbytes/blk_size*(blk_size*blk_size)); */
- file_offset_advance = (off_t)(snbytes*blk_size);
+ file_offset_advance = (off_t)snbytes*(off_t)blk_size;
} /* end else */
} /* end else */
@@ -1106,7 +1108,7 @@ do_write(results *res, file_descr *fd, parameters *parms, long ndsets,
buf_p+=nbytes_xfer_advance;
/* Advance global offset in dataset */
- nbytes_xfer+=nbytes_xfer_advance;
+ nbytes_xfer+=(ssize_t)nbytes_xfer_advance;
/* Decrement number of bytes left this time */
nbytes_toxfer-=nbytes_xfer_advance;
@@ -1137,7 +1139,7 @@ do_write(results *res, file_descr *fd, parameters *parms, long ndsets,
VRFY((mrc==MPI_SUCCESS), "MPIO_WRITE");
/* Advance global offset in dataset */
- nbytes_xfer+=buf_size;
+ nbytes_xfer+=(ssize_t)buf_size;
} /* end if */
/* Interleaved access pattern */
else {
@@ -1162,7 +1164,7 @@ do_write(results *res, file_descr *fd, parameters *parms, long ndsets,
buf_p+=blk_size;
/* Advance global offset in dataset */
- nbytes_xfer+=blk_size;
+ nbytes_xfer+=(ssize_t)blk_size;
/* Decrement number of bytes left this time */
nbytes_toxfer-=blk_size;
@@ -1183,7 +1185,7 @@ do_write(results *res, file_descr *fd, parameters *parms, long ndsets,
VRFY((mrc==MPI_SUCCESS), "MPIO_WRITE");
/* Advance global offset in dataset */
- nbytes_xfer+=buf_size;
+ nbytes_xfer+=(ssize_t)buf_size;
} /* end if */
/* Interleaved access pattern */
else {
@@ -1202,7 +1204,7 @@ do_write(results *res, file_descr *fd, parameters *parms, long ndsets,
VRFY((mrc==MPI_SUCCESS), "MPIO_WRITE");
/* Advance global offset in dataset */
- nbytes_xfer+=buf_size;
+ nbytes_xfer+=(ssize_t)buf_size;
} /* end else */
} /* end else */
} /* end if */
@@ -1213,8 +1215,8 @@ do_write(results *res, file_descr *fd, parameters *parms, long ndsets,
/* Contiguous access pattern */
if (!parms->interleaved) {
/* Compute offset in file */
- mpi_offset=mpi_file_offset+((nbytes_xfer/blk_size)/snbytes)*
- (blk_size*snbytes)+((nbytes_xfer/blk_size)%snbytes);
+ mpi_offset=mpi_file_offset+(MPI_Offset)((((size_t)nbytes_xfer/blk_size)/(size_t)snbytes)*
+ (blk_size*(size_t)snbytes))+(MPI_Offset)(((size_t)nbytes_xfer/blk_size)%(size_t)snbytes);
/* Number of bytes to be transferred per I/O operation */
nbytes_xfer_advance = buf_size;
@@ -1228,8 +1230,8 @@ do_write(results *res, file_descr *fd, parameters *parms, long ndsets,
/* Interleaved access pattern */
else {
/* Compute offset in file */
- mpi_offset=mpi_file_offset+(((nbytes_xfer/buf_size)*pio_mpi_nprocs_g)/snbytes)*
- (buf_size*snbytes)+((nbytes_xfer/buf_size)*pio_mpi_nprocs_g)%snbytes;
+ mpi_offset=mpi_file_offset+(MPI_Offset)(((((size_t)nbytes_xfer/buf_size)*(size_t)pio_mpi_nprocs_g)/(size_t)snbytes)*
+ (buf_size*(size_t)snbytes))+(MPI_Offset)((((size_t)nbytes_xfer/buf_size)*(size_t)pio_mpi_nprocs_g)%(size_t)snbytes);
/* Number of bytes to be transferred per I/O operation */
nbytes_xfer_advance = blk_size;
@@ -1266,16 +1268,16 @@ do_write(results *res, file_descr *fd, parameters *parms, long ndsets,
(buf_size/blk_size*snbytes/blk_size*(blk_size*blk_size))+
((nbytes_xfer/(buf_size/blk_size))*pio_mpi_nprocs_g)%(snbytes
/blk_size*(blk_size*blk_size)); */
- mpi_offset=mpi_file_offset+((nbytes_xfer/(buf_size/blk_size)
- *pio_mpi_nprocs_g)/(snbytes*blk_size))*(buf_size*snbytes)
- +((nbytes_xfer/(buf_size/blk_size))*pio_mpi_nprocs_g)%(snbytes*blk_size);
+ mpi_offset=mpi_file_offset+(MPI_Offset)((((size_t)nbytes_xfer/(buf_size/blk_size)
+ *(size_t)pio_mpi_nprocs_g)/((size_t)snbytes*blk_size))*(buf_size*(size_t)snbytes))
+ +(MPI_Offset)((((size_t)nbytes_xfer/(buf_size/blk_size))*(size_t)pio_mpi_nprocs_g)%((size_t)snbytes*blk_size));
/* Number of bytes to be transferred per I/O operation */
nbytes_xfer_advance = blk_size * blk_size;
/* Global offset advance after each I/O operation */
/* mpi_offset_advance = (MPI_Offset)(snbytes/blk_size*(blk_size*blk_size)); */
- mpi_offset_advance = (MPI_Offset)(snbytes*blk_size);
+ mpi_offset_advance = (MPI_Offset)((size_t)snbytes*blk_size);
/* MPI type to be used for collective access */
mpi_collective_type = mpi_chunk_inter_type;
@@ -1301,7 +1303,7 @@ do_write(results *res, file_descr *fd, parameters *parms, long ndsets,
buf_p+=nbytes_xfer_advance;
/* Advance global offset in dataset */
- nbytes_xfer+=nbytes_xfer_advance;
+ nbytes_xfer+=(ssize_t)nbytes_xfer_advance;
/* Decrement number of bytes left this time */
nbytes_toxfer-=nbytes_xfer_advance;
@@ -1324,7 +1326,7 @@ do_write(results *res, file_descr *fd, parameters *parms, long ndsets,
VRFY((mrc==MPI_SUCCESS), "MPIO_WRITE");
/* Advance global offset in dataset */
- nbytes_xfer+=buf_size*blk_size;
+ nbytes_xfer+=(off_t)buf_size*(off_t)blk_size;
} /* end else */
} /* end else */
@@ -1353,22 +1355,22 @@ do_write(results *res, file_descr *fd, parameters *parms, long ndsets,
VRFY((hrc >= 0), "H5Dwrite");
/* Increment number of bytes transferred */
- nbytes_xfer += buf_size;
+ nbytes_xfer += (ssize_t)buf_size;
} /* end if */
/* 2D dataspace */
else {
/* Set up the file dset space id to move the selection to process */
if (!parms->interleaved){
/* Contiguous pattern */
- h5offset[0] = (nbytes_xfer/(snbytes*blk_size))*blk_size;
- h5offset[1] = (nbytes_xfer%(snbytes*blk_size))/blk_size;
+ h5offset[0] = (hssize_t)(((size_t)nbytes_xfer/((size_t)snbytes*blk_size))*blk_size);
+ h5offset[1] = (hssize_t)(((size_t)nbytes_xfer%((size_t)snbytes*blk_size))/blk_size);
} /* end if */
else {
/* Interleaved access pattern */
/* Skip offset over blocks of other processes */
- h5offset[0] = ((nbytes_xfer*pio_mpi_nprocs_g)/(snbytes*buf_size))*buf_size;
- h5offset[1] = ((nbytes_xfer*pio_mpi_nprocs_g)%(snbytes*buf_size))/buf_size;
+ h5offset[0] = (hssize_t)((((size_t)nbytes_xfer*(size_t)pio_mpi_nprocs_g)/((size_t)snbytes*buf_size))*buf_size);
+ h5offset[1] = (hssize_t)((((size_t)nbytes_xfer*(size_t)pio_mpi_nprocs_g)%((size_t)snbytes*buf_size))/buf_size);
} /* end else */
hrc = H5Soffset_simple(h5dset_space_id, h5offset);
@@ -1380,16 +1382,19 @@ do_write(results *res, file_descr *fd, parameters *parms, long ndsets,
VRFY((hrc >= 0), "H5Dwrite");
/* Increment number of bytes transferred */
- nbytes_xfer += buf_size*blk_size;
+ nbytes_xfer += (off_t)buf_size*(off_t)blk_size;
} /* end else */
break;
+
+ default:
+ break;
} /* switch (parms->io_type) */
} /* end while */
/* Stop "raw data" write timer */
- set_time(res->timers, HDF5_RAW_WRITE_FIXED_DIMS, TSTOP);
+ io_time_set(res->timers, HDF5_RAW_WRITE_FIXED_DIMS, TSTOP);
/* Calculate write time */
@@ -1402,7 +1407,7 @@ do_write(results *res, file_descr *fd, parameters *parms, long ndsets,
GOTOERROR(FAIL);
}
- h5ds_id = -1;
+ h5ds_id = H5I_INVALID_HID;
} /* end if */
} /* end for */
@@ -1458,7 +1463,7 @@ done:
HDfprintf(stderr, "HDF5 Dataset Space Close failed\n");
ret_code = FAIL;
} else {
- h5dset_space_id = -1;
+ h5dset_space_id = H5I_INVALID_HID;
}
}
@@ -1468,7 +1473,7 @@ done:
HDfprintf(stderr, "HDF5 Memory Space Close failed\n");
ret_code = FAIL;
} else {
- h5mem_space_id = -1;
+ h5mem_space_id = H5I_INVALID_HID;
}
}
@@ -1478,13 +1483,20 @@ done:
HDfprintf(stderr, "HDF5 Dataset Transfer Property List Close failed\n");
ret_code = FAIL;
} else {
- h5dxpl = -1;
+ h5dxpl = H5I_INVALID_HID;
}
}
return ret_code;
}
+static off_t
+sqrto(off_t x)
+{
+ double root_x = sqrt((double)x);
+ return (off_t)root_x;
+}
+
/*
* Function: do_read
* Purpose: read the required amount of data from the file.
@@ -1537,15 +1549,15 @@ do_read(results *res, file_descr *fd, parameters *parms, long ndsets,
/* HDF5 variables */
herr_t hrc; /*HDF5 return code */
hsize_t h5dims[2]; /*dataset dim sizes */
- hid_t h5dset_space_id = -1; /*dataset space ID */
- hid_t h5mem_space_id = -1; /*memory dataspace ID */
- hid_t h5ds_id = -1; /*dataset handle */
+ hid_t h5dset_space_id = H5I_INVALID_HID; /*dataset space ID */
+ hid_t h5mem_space_id = H5I_INVALID_HID; /*memory dataspace ID */
+ hid_t h5ds_id = H5I_INVALID_HID; /*dataset handle */
hsize_t h5block[2]; /*dataspace selection */
hsize_t h5stride[2];
hsize_t h5count[2];
hsize_t h5start[2];
hssize_t h5offset[2]; /* Selection offset within dataspace */
- hid_t h5dxpl = -1; /* Dataset transfer property list */
+ hid_t h5dxpl = H5I_INVALID_HID; /* Dataset transfer property list */
/* Get the parameters from the parameter block */
blk_size=parms->blk_size;
@@ -1569,7 +1581,7 @@ do_read(results *res, file_descr *fd, parameters *parms, long ndsets,
} /* end if */
/* Interleaved Pattern: */
else {
- bytes_begin[0] = (off_t)(blk_size*pio_mpi_rank_g);
+ bytes_begin[0] = (off_t)blk_size*(off_t)pio_mpi_rank_g;
} /* end else */
}/* end if */
/* 2D dataspace */
@@ -1577,7 +1589,7 @@ do_read(results *res, file_descr *fd, parameters *parms, long ndsets,
/* nbytes is always the number of bytes per dataset (1D or 2D). If the
dataspace is 2D, snbytes is the size of a side of the 'dataset square'.
*/
- snbytes = (off_t)sqrt(nbytes);
+ snbytes = sqrto(nbytes);
bsize = buf_size * blk_size;
@@ -1591,9 +1603,9 @@ do_read(results *res, file_descr *fd, parameters *parms, long ndsets,
bytes_begin[0] = 0;
if (!parms->h5_use_chunks || parms->io_type==PHDF5)
- bytes_begin[1] = (off_t)(blk_size*pio_mpi_rank_g);
+ bytes_begin[1] = (off_t)blk_size*(off_t)pio_mpi_rank_g;
else
- bytes_begin[1] = (off_t)(blk_size*blk_size*pio_mpi_rank_g);
+ bytes_begin[1] = (off_t)blk_size*(off_t)blk_size*(off_t)pio_mpi_rank_g;
} /* end else */
} /* end else */
@@ -1665,7 +1677,7 @@ do_read(results *res, file_descr *fd, parameters *parms, long ndsets,
VRFY((mrc==MPI_SUCCESS), "MPIO_TYPE_COMMIT");
/* Build contiguous file's derived type */
- mrc = MPI_Type_vector((int)blk_size, (int)1, (int)(snbytes/buf_size),
+ mrc = MPI_Type_vector((int)blk_size, (int)1, (int)((size_t)snbytes/buf_size),
mpi_partial_buffer_cont, &mpi_cont_type);
VRFY((mrc==MPI_SUCCESS), "MPIO_TYPE_CREATE");
@@ -1683,7 +1695,7 @@ do_read(results *res, file_descr *fd, parameters *parms, long ndsets,
VRFY((mrc==MPI_SUCCESS), "MPIO_TYPE_COMMIT");
/* Build interleaved file's derived type */
- mrc = MPI_Type_vector((int)buf_size, (int)1, (int)(snbytes/blk_size),
+ mrc = MPI_Type_vector((int)buf_size, (int)1, (int)((size_t)snbytes/blk_size),
mpi_partial_buffer_inter, &mpi_inter_type);
VRFY((mrc==MPI_SUCCESS), "MPIO_TYPE_CREATE");
@@ -1710,7 +1722,7 @@ do_read(results *res, file_descr *fd, parameters *parms, long ndsets,
VRFY((mrc==MPI_SUCCESS), "MPIO_TYPE_COMMIT");
/* Build chunk interleaved file's derived type */
- mrc = MPI_Type_vector((int)(buf_size/blk_size), (int)1, (int)(snbytes/blk_size),
+ mrc = MPI_Type_vector((int)(buf_size/blk_size), (int)1, (int)((size_t)snbytes/blk_size),
mpi_full_chunk, &mpi_chunk_inter_type);
VRFY((mrc==MPI_SUCCESS), "MPIO_TYPE_CREATE");
@@ -1725,22 +1737,22 @@ do_read(results *res, file_descr *fd, parameters *parms, long ndsets,
if (!parms->dim2d){
if(nbytes>0) {
/* define a contiguous dataset of nbytes native bytes */
- h5dims[0] = nbytes;
+ h5dims[0] = (hsize_t)nbytes;
h5dset_space_id = H5Screate_simple(1, h5dims, NULL);
VRFY((h5dset_space_id >= 0), "H5Screate_simple");
/* Set up the file dset space id to select the pattern to access */
if (!parms->interleaved){
/* Contiguous pattern */
- h5start[0] = bytes_begin[0];
+ h5start[0] = (hsize_t)bytes_begin[0];
h5stride[0] = h5block[0] = blk_size;
h5count[0] = buf_size/blk_size;
} /* end if */
else {
/* Interleaved access pattern */
/* Skip offset over blocks of other processes */
- h5start[0] = bytes_begin[0];
- h5stride[0] = blk_size*pio_mpi_nprocs_g;
+ h5start[0] = (hsize_t)bytes_begin[0];
+ h5stride[0] = blk_size*(size_t)pio_mpi_nprocs_g;
h5block[0] = blk_size;
h5count[0] = buf_size/blk_size;
} /* end else */
@@ -1768,16 +1780,16 @@ do_read(results *res, file_descr *fd, parameters *parms, long ndsets,
else {
if(nbytes>0) {
/* define a contiguous dataset of nbytes native bytes */
- h5dims[0] = snbytes;
- h5dims[1] = snbytes;
+ h5dims[0] = (hsize_t)snbytes;
+ h5dims[1] = (hsize_t)snbytes;
h5dset_space_id = H5Screate_simple(2, h5dims, NULL);
VRFY((h5dset_space_id >= 0), "H5Screate_simple");
/* Set up the file dset space id to select the pattern to access */
if (!parms->interleaved){
/* Contiguous pattern */
- h5start[0] = bytes_begin[0];
- h5start[1] = bytes_begin[1];
+ h5start[0] = (hsize_t)bytes_begin[0];
+ h5start[1] = (hsize_t)bytes_begin[1];
h5stride[0] = 1;
h5stride[1] = h5block[0] = h5block[1] = blk_size;
h5count[0] = 1;
@@ -1786,10 +1798,10 @@ do_read(results *res, file_descr *fd, parameters *parms, long ndsets,
else {
/* Interleaved access pattern */
/* Skip offset over blocks of other processes */
- h5start[0] = bytes_begin[0];
- h5start[1] = bytes_begin[1];
+ h5start[0] = (hsize_t)bytes_begin[0];
+ h5start[1] = (hsize_t)bytes_begin[1];
h5stride[0] = blk_size;
- h5stride[1] = blk_size*pio_mpi_nprocs_g;
+ h5stride[1] = blk_size*(size_t)pio_mpi_nprocs_g;
h5block[0] = h5block[1] = blk_size;
h5count[0] = buf_size/blk_size;
h5count[1] = 1;
@@ -1824,19 +1836,22 @@ do_read(results *res, file_descr *fd, parameters *parms, long ndsets,
/* Create the dataset transfer property list */
h5dxpl = H5Pcreate(H5P_DATASET_XFER);
if (h5dxpl < 0) {
- HDfprintf(stderr, "HDF5 Property List Create failed\n");
- GOTOERROR(FAIL);
+ HDfprintf(stderr, "HDF5 Property List Create failed\n");
+ GOTOERROR(FAIL);
}
/* Change to collective I/O, if asked */
if(parms->collective) {
- hrc = H5Pset_dxpl_mpio(h5dxpl, H5FD_MPIO_COLLECTIVE);
- if (hrc < 0) {
- HDfprintf(stderr, "HDF5 Property List Set failed\n");
- GOTOERROR(FAIL);
- } /* end if */
+ hrc = H5Pset_dxpl_mpio(h5dxpl, H5FD_MPIO_COLLECTIVE);
+ if (hrc < 0) {
+ HDfprintf(stderr, "HDF5 Property List Set failed\n");
+ GOTOERROR(FAIL);
+ } /* end if */
} /* end if */
break;
+
+ default:
+ break;
} /* end switch */
for (ndset = 1; ndset <= ndsets; ++ndset) {
@@ -1847,19 +1862,21 @@ do_read(results *res, file_descr *fd, parameters *parms, long ndsets,
switch (parms->io_type) {
case POSIXIO:
case MPIO:
- /* both posix and mpi io just need dataset offset in file*/
- dset_offset = (ndset - 1) * nbytes;
- break;
+ /* both posix and mpi io just need dataset offset in file*/
+ dset_offset = (ndset - 1) * nbytes;
+ break;
case PHDF5:
HDsprintf(dname, "Dataset_%ld", ndset);
- h5ds_id = H5DOPEN(fd->h5fd, dname);
- if (h5ds_id < 0) {
- HDfprintf(stderr, "HDF5 Dataset open failed\n");
- GOTOERROR(FAIL);
- }
+ h5ds_id = H5DOPEN(fd->h5fd, dname);
+ if (h5ds_id < 0) {
+ HDfprintf(stderr, "HDF5 Dataset open failed\n");
+ GOTOERROR(FAIL);
+ }
+ break;
- break;
+ default:
+ break;
}
/* The task is to transfer bytes_count bytes, starting at
@@ -1889,7 +1906,7 @@ do_read(results *res, file_descr *fd, parameters *parms, long ndsets,
} /* end else */
/* Start "raw data" read timer */
- set_time(res->timers, HDF5_RAW_READ_FIXED_DIMS, TSTART);
+ io_time_set(res->timers, HDF5_RAW_READ_FIXED_DIMS, TSTART);
while (nbytes_xfer < bytes_count){
/* Read */
@@ -1913,7 +1930,7 @@ do_read(results *res, file_descr *fd, parameters *parms, long ndsets,
VRFY((rc != 0), "POSIXREAD");
/* Advance global offset in dataset */
- nbytes_xfer+=buf_size;
+ nbytes_xfer+=(off_t)buf_size;
} /* end if */
/* Interleaved access pattern */
else {
@@ -1942,7 +1959,7 @@ do_read(results *res, file_descr *fd, parameters *parms, long ndsets,
buf_p+=blk_size;
/* Advance global offset in dataset */
- nbytes_xfer+=blk_size;
+ nbytes_xfer+=(off_t)blk_size;
/* Decrement number of bytes left this time */
nbytes_toxfer-=blk_size;
@@ -1956,8 +1973,8 @@ do_read(results *res, file_descr *fd, parameters *parms, long ndsets,
/* Contiguous access pattern */
if (!parms->interleaved) {
/* Compute file offset */
- file_offset=posix_file_offset+(off_t)(((nbytes_xfer/blk_size)
- /snbytes)*(blk_size*snbytes)+((nbytes_xfer/blk_size)%snbytes));
+ file_offset=posix_file_offset+(off_t)((((size_t)nbytes_xfer/blk_size)
+ /(size_t)snbytes)*(blk_size*(size_t)snbytes)+(((size_t)nbytes_xfer/blk_size)%(size_t)snbytes));
/* Number of bytes to be transferred per I/O operation */
nbytes_xfer_advance = buf_size;
@@ -1968,9 +1985,9 @@ do_read(results *res, file_descr *fd, parameters *parms, long ndsets,
/* Interleaved access pattern */
else {
/* Compute file offset */
- file_offset=posix_file_offset+(off_t)((((nbytes_xfer/buf_size)
- *pio_mpi_nprocs_g)/snbytes)*(buf_size*snbytes)
- +((nbytes_xfer/buf_size)*pio_mpi_nprocs_g)%snbytes);
+ file_offset=posix_file_offset+(off_t)(((((size_t)nbytes_xfer/buf_size)
+ *(size_t)pio_mpi_nprocs_g)/(size_t)snbytes)*(buf_size*(size_t)snbytes)
+ +(((size_t)nbytes_xfer/buf_size)*(size_t)pio_mpi_nprocs_g)%(size_t)snbytes);
/* Number of bytes to be transferred per I/O operation */
nbytes_xfer_advance = blk_size;
@@ -2001,16 +2018,16 @@ do_read(results *res, file_descr *fd, parameters *parms, long ndsets,
*snbytes/blk_size*(blk_size*blk_size))+((nbytes_xfer/(buf_size/blk_size))
*pio_mpi_nprocs_g)%(snbytes/blk_size*(blk_size*blk_size))); */
- file_offset=posix_file_offset+(off_t)(((nbytes_xfer/(buf_size/blk_size)
- *pio_mpi_nprocs_g)/(snbytes*blk_size))*(buf_size*snbytes)+((nbytes_xfer/(buf_size/blk_size))
- *pio_mpi_nprocs_g)%(snbytes*blk_size));
+ file_offset=posix_file_offset+(off_t)((((size_t)nbytes_xfer/(buf_size/blk_size)
+ *(size_t)pio_mpi_nprocs_g)/((size_t)snbytes*blk_size))*(buf_size*(size_t)snbytes)+(((size_t)nbytes_xfer/(buf_size/blk_size))
+ *(size_t)pio_mpi_nprocs_g)%((size_t)snbytes*blk_size));
/* Number of bytes to be transferred per I/O operation */
nbytes_xfer_advance = blk_size * blk_size;
/* Global offset advance after each I/O operation */
/* file_offset_advance = (off_t)(snbytes/blk_size*(blk_size*blk_size)); */
- file_offset_advance = (off_t)(snbytes*blk_size);
+ file_offset_advance = (off_t)((size_t)snbytes*blk_size);
} /* end else */
} /* end else */
@@ -2037,7 +2054,7 @@ do_read(results *res, file_descr *fd, parameters *parms, long ndsets,
buf_p+=nbytes_xfer_advance;
/* Advance global offset in dataset */
- nbytes_xfer+=nbytes_xfer_advance;
+ nbytes_xfer+=(off_t)nbytes_xfer_advance;
/* Decrement number of bytes left this time */
nbytes_toxfer-=nbytes_xfer_advance;
@@ -2067,7 +2084,7 @@ do_read(results *res, file_descr *fd, parameters *parms, long ndsets,
VRFY((mrc==MPI_SUCCESS), "MPIO_READ");
/* Advance global offset in dataset */
- nbytes_xfer+=buf_size;
+ nbytes_xfer+=(off_t)buf_size;
} /* end if */
/* Interleaved access pattern */
else {
@@ -2092,7 +2109,7 @@ do_read(results *res, file_descr *fd, parameters *parms, long ndsets,
buf_p+=blk_size;
/* Advance global offset in dataset */
- nbytes_xfer+=blk_size;
+ nbytes_xfer+=(off_t)blk_size;
/* Decrement number of bytes left this time */
nbytes_toxfer-=blk_size;
@@ -2113,7 +2130,7 @@ do_read(results *res, file_descr *fd, parameters *parms, long ndsets,
VRFY((mrc==MPI_SUCCESS), "MPIO_READ");
/* Advance global offset in dataset */
- nbytes_xfer+=buf_size;
+ nbytes_xfer+=(off_t)buf_size;
} /* end if */
/* Interleaved access pattern */
else {
@@ -2132,7 +2149,7 @@ do_read(results *res, file_descr *fd, parameters *parms, long ndsets,
VRFY((mrc==MPI_SUCCESS), "MPIO_READ");
/* Advance global offset in dataset */
- nbytes_xfer+=buf_size;
+ nbytes_xfer+=(off_t)buf_size;
} /* end else */
} /* end else */
} /* end if */
@@ -2143,8 +2160,8 @@ do_read(results *res, file_descr *fd, parameters *parms, long ndsets,
/* Contiguous access pattern */
if (!parms->interleaved) {
/* Compute offset in file */
- mpi_offset=mpi_file_offset+((nbytes_xfer/blk_size)/snbytes)*
- (blk_size*snbytes)+((nbytes_xfer/blk_size)%snbytes);
+ mpi_offset=mpi_file_offset+(MPI_Offset)((((size_t)nbytes_xfer/blk_size)/(size_t)snbytes)*
+ (blk_size*(size_t)snbytes))+(MPI_Offset)(((size_t)nbytes_xfer/blk_size)%(size_t)snbytes);
/* Number of bytes to be transferred per I/O operation */
nbytes_xfer_advance = buf_size;
@@ -2158,8 +2175,8 @@ do_read(results *res, file_descr *fd, parameters *parms, long ndsets,
/* Interleaved access pattern */
else {
/* Compute offset in file */
- mpi_offset=mpi_file_offset+(((nbytes_xfer/buf_size)*pio_mpi_nprocs_g)/snbytes)*
- (buf_size*snbytes)+((nbytes_xfer/buf_size)*pio_mpi_nprocs_g)%snbytes;
+ mpi_offset=mpi_file_offset+(MPI_Offset)(((((size_t)nbytes_xfer/buf_size)*(size_t)pio_mpi_nprocs_g)/(size_t)snbytes)*
+ (buf_size*(size_t)snbytes))+(MPI_Offset)((((size_t)nbytes_xfer/buf_size)*(size_t)pio_mpi_nprocs_g)%(size_t)snbytes);
/* Number of bytes to be transferred per I/O operation */
nbytes_xfer_advance = blk_size;
@@ -2196,16 +2213,16 @@ do_read(results *res, file_descr *fd, parameters *parms, long ndsets,
(buf_size/blk_size*snbytes/blk_size*(blk_size*blk_size))+
((nbytes_xfer/(buf_size/blk_size))*pio_mpi_nprocs_g)%(snbytes
/blk_size*(blk_size*blk_size)); */
- mpi_offset=mpi_file_offset+((nbytes_xfer/(buf_size/blk_size)
- *pio_mpi_nprocs_g)/(snbytes*blk_size))*(buf_size*snbytes)
- +((nbytes_xfer/(buf_size/blk_size))*pio_mpi_nprocs_g)%(snbytes*blk_size);
+ mpi_offset=mpi_file_offset+(MPI_Offset)((((size_t)nbytes_xfer/(buf_size/blk_size)
+ *(size_t)pio_mpi_nprocs_g)/((size_t)snbytes*blk_size))*(buf_size*(size_t)snbytes))
+ +(MPI_Offset)((((size_t)nbytes_xfer/(buf_size/blk_size))*(size_t)pio_mpi_nprocs_g)%((size_t)snbytes*blk_size));
/* Number of bytes to be transferred per I/O operation */
nbytes_xfer_advance = blk_size * blk_size;
/* Global offset advance after each I/O operation */
/* mpi_offset_advance = (MPI_Offset)(snbytes/blk_size*(blk_size*blk_size)); */
- mpi_offset_advance = (MPI_Offset)(snbytes*blk_size);
+ mpi_offset_advance = (MPI_Offset)((size_t)snbytes*blk_size);
/* MPI type to be used for collective access */
mpi_collective_type = mpi_chunk_inter_type;
@@ -2231,7 +2248,7 @@ do_read(results *res, file_descr *fd, parameters *parms, long ndsets,
buf_p+=nbytes_xfer_advance;
/* Advance global offset in dataset */
- nbytes_xfer+=nbytes_xfer_advance;
+ nbytes_xfer+=(off_t)nbytes_xfer_advance;
/* Decrement number of bytes left this time */
nbytes_toxfer-=nbytes_xfer_advance;
@@ -2254,7 +2271,7 @@ do_read(results *res, file_descr *fd, parameters *parms, long ndsets,
VRFY((mrc==MPI_SUCCESS), "MPIO_READ");
/* Advance global offset in dataset */
- nbytes_xfer+=buf_size*blk_size;
+ nbytes_xfer+=(off_t)buf_size*(off_t)blk_size;
} /* end else */
} /* end else */
@@ -2282,21 +2299,21 @@ do_read(results *res, file_descr *fd, parameters *parms, long ndsets,
VRFY((hrc >= 0), "H5Dread");
/* Increment number of bytes transferred */
- nbytes_xfer += buf_size;
+ nbytes_xfer += (off_t)buf_size;
} /* end if */
/* 2D dataspace */
else {
/* Set up the file dset space id to move the selection to process */
if (!parms->interleaved){
/* Contiguous pattern */
- h5offset[0] = (nbytes_xfer/(snbytes*blk_size))*blk_size;
- h5offset[1] = (nbytes_xfer%(snbytes*blk_size))/blk_size;
+ h5offset[0] = (hssize_t)(((size_t)nbytes_xfer/((size_t)snbytes*blk_size))*blk_size);
+ h5offset[1] = (hssize_t)(((size_t)nbytes_xfer%((size_t)snbytes*blk_size))/blk_size);
} /* end if */
else {
/* Interleaved access pattern */
/* Skip offset over blocks of other processes */
- h5offset[0] = ((nbytes_xfer*pio_mpi_nprocs_g)/(snbytes*buf_size))*buf_size;
- h5offset[1] = ((nbytes_xfer*pio_mpi_nprocs_g)%(snbytes*buf_size))/buf_size;
+ h5offset[0] = (hssize_t)((((size_t)nbytes_xfer*(size_t)pio_mpi_nprocs_g)/((size_t)snbytes*buf_size))*buf_size);
+ h5offset[1] = (hssize_t)((((size_t)nbytes_xfer*(size_t)pio_mpi_nprocs_g)%((size_t)snbytes*buf_size))/buf_size);
} /* end else */
hrc = H5Soffset_simple(h5dset_space_id, h5offset);
@@ -2308,10 +2325,13 @@ do_read(results *res, file_descr *fd, parameters *parms, long ndsets,
VRFY((hrc >= 0), "H5Dread");
/* Increment number of bytes transferred */
- nbytes_xfer += buf_size*blk_size;
+ nbytes_xfer += (off_t)buf_size*(off_t)blk_size;
} /* end else */
break;
+
+ default:
+ break;
} /* switch (parms->io_type) */
/* Verify raw data, if asked */
@@ -2344,7 +2364,7 @@ do_read(results *res, file_descr *fd, parameters *parms, long ndsets,
} /* end while */
/* Stop "raw data" read timer */
- set_time(res->timers, HDF5_RAW_READ_FIXED_DIMS, TSTOP);
+ io_time_set(res->timers, HDF5_RAW_READ_FIXED_DIMS, TSTOP);
/* Calculate read time */
@@ -2357,7 +2377,7 @@ do_read(results *res, file_descr *fd, parameters *parms, long ndsets,
GOTOERROR(FAIL);
}
- h5ds_id = -1;
+ h5ds_id = H5I_INVALID_HID;
} /* end if */
} /* end for */
@@ -2413,7 +2433,7 @@ done:
HDfprintf(stderr, "HDF5 Dataset Space Close failed\n");
ret_code = FAIL;
} else {
- h5dset_space_id = -1;
+ h5dset_space_id = H5I_INVALID_HID;
}
}
@@ -2423,7 +2443,7 @@ done:
HDfprintf(stderr, "HDF5 Memory Space Close failed\n");
ret_code = FAIL;
} else {
- h5mem_space_id = -1;
+ h5mem_space_id = H5I_INVALID_HID;
}
}
@@ -2433,7 +2453,7 @@ done:
HDfprintf(stderr, "HDF5 Dataset Transfer Property List Close failed\n");
ret_code = FAIL;
} else {
- h5dxpl = -1;
+ h5dxpl = H5I_INVALID_HID;
}
}
@@ -2451,7 +2471,7 @@ done:
do_fopen(parameters *param, char *fname, file_descr *fd /*out*/, int flags)
{
int ret_code = SUCCESS, mrc;
- hid_t acc_tpl = -1; /* file access templates */
+ hid_t acc_tpl = H5I_INVALID_HID; /* file access templates */
switch (param->io_type) {
case POSIXIO:
@@ -2541,6 +2561,9 @@ do_fopen(parameters *param, char *fname, file_descr *fd /*out*/, int flags)
}
break;
+
+ default:
+ break;
}
done:
@@ -2561,38 +2584,41 @@ do_fclose(iotype iot, file_descr *fd /*out*/)
int mrc = 0, rc = 0;
switch (iot) {
- case POSIXIO:
- rc = POSIXCLOSE(fd->posixfd);
+ case POSIXIO:
+ rc = POSIXCLOSE(fd->posixfd);
- if (rc != 0){
- HDfprintf(stderr, "POSIX File Close failed\n");
- GOTOERROR(FAIL);
- }
+ if (rc != 0){
+ HDfprintf(stderr, "POSIX File Close failed\n");
+ GOTOERROR(FAIL);
+ }
- fd->posixfd = -1;
- break;
+ fd->posixfd = -1;
+ break;
- case MPIO:
- mrc = MPI_File_close(&fd->mpifd);
+ case MPIO:
+ mrc = MPI_File_close(&fd->mpifd);
- if (mrc != MPI_SUCCESS){
- HDfprintf(stderr, "MPI File close failed\n");
- GOTOERROR(FAIL);
- }
+ if (mrc != MPI_SUCCESS){
+ HDfprintf(stderr, "MPI File close failed\n");
+ GOTOERROR(FAIL);
+ }
- fd->mpifd = MPI_FILE_NULL;
- break;
+ fd->mpifd = MPI_FILE_NULL;
+ break;
- case PHDF5:
- hrc = H5Fclose(fd->h5fd);
+ case PHDF5:
+ hrc = H5Fclose(fd->h5fd);
- if (hrc < 0) {
- HDfprintf(stderr, "HDF5 File Close failed\n");
- GOTOERROR(FAIL);
- }
+ if (hrc < 0) {
+ HDfprintf(stderr, "HDF5 File Close failed\n");
+ GOTOERROR(FAIL);
+ }
- fd->h5fd = -1;
- break;
+ fd->h5fd = -1;
+ break;
+
+ default:
+ break;
}
done:
@@ -2619,15 +2645,17 @@ do_cleanupfile(iotype iot, char *fname)
clean_file_g = (getenv("HDF5_NOCLEANUP")==NULL) ? 1 : 0;
if (clean_file_g){
- switch (iot){
- case POSIXIO:
- HDremove(fname);
- break;
- case MPIO:
- case PHDF5:
- MPI_File_delete(fname, h5_io_info_g);
- break;
- }
+ switch (iot){
+ case POSIXIO:
+ HDremove(fname);
+ break;
+ case MPIO:
+ case PHDF5:
+ MPI_File_delete(fname, h5_io_info_g);
+ break;
+ default:
+ break;
+ }
}
}
@@ -2639,9 +2667,9 @@ int MPI_File_read_at(MPI_File fh, MPI_Offset offset, void *buf,
int count, MPI_Datatype datatype, MPI_Status *status)
{
int err;
- set_time(timer_g, HDF5_MPI_READ, TSTART);
+ io_time_set(timer_g, HDF5_MPI_READ, TSTART);
err=PMPI_File_read_at(fh, offset, buf, count, datatype, status);
- set_time(timer_g, HDF5_MPI_READ, TSTOP);
+ io_time_set(timer_g, HDF5_MPI_READ, TSTOP);
return err;
}
@@ -2650,9 +2678,9 @@ int MPI_File_read_at_all(MPI_File fh, MPI_Offset offset, void *buf,
int count, MPI_Datatype datatype, MPI_Status *status)
{
int err;
- set_time(timer_g, HDF5_MPI_READ, TSTART);
+ io_time_set(timer_g, HDF5_MPI_READ, TSTART);
err=PMPI_File_read_at_all(fh, offset, buf, count, datatype, status);
- set_time(timer_g, HDF5_MPI_READ, TSTOP);
+ io_time_set(timer_g, HDF5_MPI_READ, TSTOP);
return err;
}
@@ -2660,9 +2688,9 @@ int MPI_File_write_at(MPI_File fh, MPI_Offset offset, void *buf,
int count, MPI_Datatype datatype, MPI_Status *status)
{
int err;
- set_time(timer_g, HDF5_MPI_WRITE, TSTART);
+ io_time_set(timer_g, HDF5_MPI_WRITE, TSTART);
err=PMPI_File_write_at(fh, offset, buf, count, datatype, status);
- set_time(timer_g, HDF5_MPI_WRITE, TSTOP);
+ io_time_set(timer_g, HDF5_MPI_WRITE, TSTOP);
return err;
}
@@ -2670,9 +2698,9 @@ int MPI_File_write_at_all(MPI_File fh, MPI_Offset offset, void *buf,
int count, MPI_Datatype datatype, MPI_Status *status)
{
int err;
- set_time(timer_g, HDF5_MPI_WRITE, TSTART);
+ io_time_set(timer_g, HDF5_MPI_WRITE, TSTART);
err=PMPI_File_write_at_all(fh, offset, buf, count, datatype, status);
- set_time(timer_g, HDF5_MPI_WRITE, TSTOP);
+ io_time_set(timer_g, HDF5_MPI_WRITE, TSTOP);
return err;
}
diff --git a/tools/test/perform/pio_perf.c b/tools/test/perform/pio_perf.c
index 93741c4..cb15f64 100644
--- a/tools/test/perform/pio_perf.c
+++ b/tools/test/perform/pio_perf.c
@@ -80,8 +80,13 @@
#define PIO_MPI 0x2
#define PIO_HDF5 0x4
+#ifdef STANDALONE
+#define DBL_EPSILON 2.2204460492503131e-16
+#define H5_DBL_ABS_EQUAL(X,Y) (fabs((X)-(Y)) < DBL_EPSILON)
+#endif
+
/* report 0.0 in case t is zero too */
-#define MB_PER_SEC(bytes,t) (((t)==0.0) ? 0.0 : ((((double)bytes) / ONE_MB) / (t)))
+#define MB_PER_SEC(bytes,t) (H5_DBL_ABS_EQUAL((t), 0.0) ? 0.0 : ((((double)bytes) / ONE_MB) / (t)))
#ifndef TRUE
#define TRUE 1
@@ -311,6 +316,7 @@ static void output_report(const char *fmt, ...);
static void print_indent(register int indent);
static void usage(const char *prog);
static void report_parameters(struct options *opts);
+static off_t squareo(off_t);
/*
* Function: main
@@ -321,7 +327,7 @@ static void report_parameters(struct options *opts);
* Modifications:
*/
int
-main(int argc, char **argv)
+main(int argc, char *argv[])
{
int ret;
int exit_value = EXIT_SUCCESS;
@@ -393,6 +399,12 @@ finish:
return exit_value;
}
+off_t
+squareo(off_t x)
+{
+ return x * x;
+}
+
/*
* Function: run_test_loop
* Purpose: Run the I/O tests. Write the results to OUTPUT.
@@ -428,8 +440,8 @@ run_test_loop(struct options *opts)
parms.interleaved = opts->interleaved;
parms.collective = opts->collective;
parms.dim2d = opts->dim2d;
- parms.h5_align = opts->h5_alignment;
- parms.h5_thresh = opts->h5_threshold;
+ parms.h5_align = (hsize_t)opts->h5_alignment;
+ parms.h5_thresh = (hsize_t)opts->h5_threshold;
parms.h5_use_chunks = opts->h5_use_chunks;
parms.h5_write_only = opts->h5_write_only;
parms.verify = opts->verify;
@@ -456,7 +468,7 @@ run_test_loop(struct options *opts)
parms.buf_size = buf_size;
if (parms.dim2d){
- parms.num_bytes = (off_t)pow((double)(opts->num_bpp*parms.num_procs),2);
+ parms.num_bytes = squareo(opts->num_bpp * parms.num_procs);
if (parms.interleaved)
output_report("Transfer Buffer Size: %ldx%ld bytes, File size: %.2f MB\n",
buf_size, opts->blk_size,
@@ -558,6 +570,8 @@ run_test(iotype iot, parameters parms, struct options *opts)
case PHDF5:
output_report("PHDF5 (w/MPI-IO driver)\n");
break;
+ default:
+ break;
}
MPI_Comm_size(pio_comm_g, &comm_size);
@@ -587,74 +601,74 @@ run_test(iotype iot, parameters parms, struct options *opts)
res = do_pio(parms);
/* gather all of the "mpi write" times */
- t = get_time(res.timers, HDF5_MPI_WRITE);
+ t = io_time_get(res.timers, HDF5_MPI_WRITE);
get_minmax(&write_mpi_mm, t);
write_mpi_mm_table[i] = write_mpi_mm;
/* gather all of the "write" times */
- t = get_time(res.timers, HDF5_FINE_WRITE_FIXED_DIMS);
+ t = io_time_get(res.timers, HDF5_FINE_WRITE_FIXED_DIMS);
get_minmax(&write_mm, t);
write_mm_table[i] = write_mm;
/* gather all of the "write" times from open to close */
- t = get_time(res.timers, HDF5_GROSS_WRITE_FIXED_DIMS);
+ t = io_time_get(res.timers, HDF5_GROSS_WRITE_FIXED_DIMS);
get_minmax(&write_gross_mm, t);
write_gross_mm_table[i] = write_gross_mm;
/* gather all of the raw "write" times */
- t = get_time(res.timers, HDF5_RAW_WRITE_FIXED_DIMS);
+ t = io_time_get(res.timers, HDF5_RAW_WRITE_FIXED_DIMS);
get_minmax(&write_raw_mm, t);
write_raw_mm_table[i] = write_raw_mm;
/* gather all of the file open times (time from open to first write) */
- t = get_time(res.timers, HDF5_FILE_WRITE_OPEN);
+ t = io_time_get(res.timers, HDF5_FILE_WRITE_OPEN);
get_minmax(&write_open_mm, t);
write_open_mm_table[i] = write_open_mm;
/* gather all of the file close times (time from last write to close) */
- t = get_time(res.timers, HDF5_FILE_WRITE_CLOSE);
+ t = io_time_get(res.timers, HDF5_FILE_WRITE_CLOSE);
get_minmax(&write_close_mm, t);
write_close_mm_table[i] = write_close_mm;
if (!parms.h5_write_only) {
/* gather all of the "mpi read" times */
- t = get_time(res.timers, HDF5_MPI_READ);
+ t = io_time_get(res.timers, HDF5_MPI_READ);
get_minmax(&read_mpi_mm, t);
read_mpi_mm_table[i] = read_mpi_mm;
/* gather all of the "read" times */
- t = get_time(res.timers, HDF5_FINE_READ_FIXED_DIMS);
+ t = io_time_get(res.timers, HDF5_FINE_READ_FIXED_DIMS);
get_minmax(&read_mm, t);
read_mm_table[i] = read_mm;
/* gather all of the "read" times from open to close */
- t = get_time(res.timers, HDF5_GROSS_READ_FIXED_DIMS);
+ t = io_time_get(res.timers, HDF5_GROSS_READ_FIXED_DIMS);
get_minmax(&read_gross_mm, t);
read_gross_mm_table[i] = read_gross_mm;
/* gather all of the raw "read" times */
- t = get_time(res.timers, HDF5_RAW_READ_FIXED_DIMS);
+ t = io_time_get(res.timers, HDF5_RAW_READ_FIXED_DIMS);
get_minmax(&read_raw_mm, t);
read_raw_mm_table[i] = read_raw_mm;
/* gather all of the file open times (time from open to first read) */
- t = get_time(res.timers, HDF5_FILE_READ_OPEN);
+ t = io_time_get(res.timers, HDF5_FILE_READ_OPEN);
get_minmax(&read_open_mm, t);
read_open_mm_table[i] = read_open_mm;
/* gather all of the file close times (time from last read to close) */
- t = get_time(res.timers, HDF5_FILE_READ_CLOSE);
+ t = io_time_get(res.timers, HDF5_FILE_READ_CLOSE);
get_minmax(&read_close_mm, t);
read_close_mm_table[i] = read_close_mm;
@@ -879,7 +893,7 @@ accumulate_minmax_stuff(minmax *mm, int count)
int i;
minmax total_mm;
- total_mm.sum = 0.0;
+ total_mm.sum = 0.0f;
total_mm.max = -DBL_MAX;
total_mm.min = DBL_MAX;
total_mm.num = count;
@@ -1155,10 +1169,10 @@ report_parameters(struct options *opts)
recover_size_and_print((long long)(opts->num_bpp * opts->max_num_procs), "\n");
HDfprintf(output, "rank %d: File size=", rank);
- recover_size_and_print((long long)(pow(opts->num_bpp * opts->min_num_procs,2)
- * opts->num_dsets), ":");
- recover_size_and_print((long long)(pow(opts->num_bpp * opts->max_num_procs,2)
- * opts->num_dsets), "\n");
+ recover_size_and_print((long long)(squareo(opts->num_bpp * opts->min_num_procs)
+ * opts->num_dsets), ":");
+ recover_size_and_print((long long)(squareo(opts->num_bpp * opts->max_num_procs)
+ * opts->num_dsets), "\n");
HDfprintf(output, "rank %d: Transfer buffer size=", rank);
if(opts->interleaved){
@@ -1322,7 +1336,7 @@ parse_command_line(int argc, char *argv[])
break;
#endif /* 0 */
case 'B':
- cl_opts->blk_size = parse_size_directive(opt_arg);
+ cl_opts->blk_size = (size_t)parse_size_directive(opt_arg);
break;
case 'c':
/* Turn on chunked HDF5 dataset creation */
@@ -1423,10 +1437,10 @@ parse_command_line(int argc, char *argv[])
cl_opts->h5_write_only = TRUE;
break;
case 'x':
- cl_opts->min_xfer_size = parse_size_directive(opt_arg);
+ cl_opts->min_xfer_size = (size_t)parse_size_directive(opt_arg);
break;
case 'X':
- cl_opts->max_xfer_size = parse_size_directive(opt_arg);
+ cl_opts->max_xfer_size = (size_t)parse_size_directive(opt_arg);
break;
case 'h':
case '?':
@@ -1446,13 +1460,13 @@ parse_command_line(int argc, char *argv[])
}
if (cl_opts->max_xfer_size == 0)
- cl_opts->max_xfer_size = cl_opts->num_bpp;
+ cl_opts->max_xfer_size = (size_t)cl_opts->num_bpp;
if (cl_opts->min_xfer_size == 0)
- cl_opts->min_xfer_size = (cl_opts->num_bpp)/2;
+ cl_opts->min_xfer_size = (size_t)(cl_opts->num_bpp)/2;
if (cl_opts->blk_size == 0)
- cl_opts->blk_size = (cl_opts->num_bpp)/2;
+ cl_opts->blk_size = (size_t)(cl_opts->num_bpp)/2;
/* set default if none specified yet */
@@ -1462,15 +1476,15 @@ parse_command_line(int argc, char *argv[])
/* verify parameters sanity. Adjust if needed. */
/* cap xfer_size with bytes per process */
if (!cl_opts->dim2d) {
- if (cl_opts->min_xfer_size > cl_opts->num_bpp)
- cl_opts->min_xfer_size = cl_opts->num_bpp;
- if (cl_opts->max_xfer_size > cl_opts->num_bpp)
- cl_opts->max_xfer_size = cl_opts->num_bpp;
+ if (cl_opts->min_xfer_size > (size_t)cl_opts->num_bpp)
+ cl_opts->min_xfer_size = (size_t)cl_opts->num_bpp;
+ if (cl_opts->max_xfer_size > (size_t)cl_opts->num_bpp)
+ cl_opts->max_xfer_size = (size_t)cl_opts->num_bpp;
}
if (cl_opts->min_xfer_size > cl_opts->max_xfer_size)
cl_opts->min_xfer_size = cl_opts->max_xfer_size;
- if (cl_opts->blk_size > cl_opts->num_bpp )
- cl_opts->blk_size = cl_opts->num_bpp;
+ if (cl_opts->blk_size > (size_t)cl_opts->num_bpp )
+ cl_opts->blk_size = (size_t)cl_opts->num_bpp;
/* check range of number of processes */
if (cl_opts->min_num_procs <= 0)
cl_opts->min_num_procs = 1;
diff --git a/tools/test/perform/pio_perf.h b/tools/test/perform/pio_perf.h
index 7605f20..55d721e 100644
--- a/tools/test/perform/pio_perf.h
+++ b/tools/test/perform/pio_perf.h
@@ -13,12 +13,13 @@
#ifndef PIO_PERF_H__
#define PIO_PERF_H__
-#include "io_timer.h"
#ifndef STANDALONE
+#include "io_timer.h"
#include "h5test.h"
#include "h5tools.h"
#include "h5tools_utils.h"
#else
+#include "io_timer.h"
#include "pio_standalone.h"
#endif
diff --git a/tools/test/perform/pio_standalone.c b/tools/test/perform/pio_standalone.c
index 0fba904..8cdca85 100644
--- a/tools/test/perform/pio_standalone.c
+++ b/tools/test/perform/pio_standalone.c
@@ -164,3 +164,135 @@ print_version(const char *progname)
progname, H5_VERS_MAJOR, H5_VERS_MINOR, H5_VERS_RELEASE,
H5_VERS_SUBRELEASE[0] ? "-" : "", H5_VERS_SUBRELEASE);
}
+
+#ifdef STANDALONE
+/*
+ * Function: h5_set_info_object
+ * Purpose: Process environment variables setting to set up MPI Info
+ * object.
+ * Return: 0 if all is fine; otherwise non-zero.
+ * Programmer: Albert Cheng, 2002/05/21.
+ * Modifications:
+ * Bill Wendling, 2002/05/31
+ * Modified so that the HDF5_MPI_INFO environment variable can
+ * be a semicolon separated list of "key=value" pairings. Most
+ * of the code is to remove any whitespaces which might be
+ * surrounding the "key=value" pairs.
+ */
+int
+h5_set_info_object(void)
+{
+ char *envp; /* environment pointer */
+ int ret_value=0;
+
+ /* handle any MPI INFO hints via $HDF5_MPI_INFO */
+ if ((envp = HDgetenv("HDF5_MPI_INFO")) != NULL){
+ char *next, *valp;
+
+ valp = envp = next = HDstrdup(envp);
+
+ if (!valp) return 0;
+
+ /* create an INFO object if not created yet */
+ if (h5_io_info_g == MPI_INFO_NULL)
+ MPI_Info_create(&h5_io_info_g);
+
+ do {
+ size_t len;
+ char *key_val, *endp, *namep;
+
+ if (*valp == ';')
+ valp++;
+
+ /* copy key/value pair into temporary buffer */
+ len = strcspn(valp, ";");
+ next = &valp[len];
+ key_val = (char *)HDcalloc(1, len + 1);
+
+ /* increment the next pointer past the terminating semicolon */
+ if (*next == ';')
+ ++next;
+
+ namep = HDstrncpy(key_val, valp, len);
+
+ /* pass up any beginning whitespaces */
+ while (*namep && (*namep == ' ' || *namep == '\t'))
+ namep++;
+
+ if (!*namep) continue; /* was all white space, so move to next k/v pair */
+
+ /* eat up any ending white spaces */
+ endp = &namep[HDstrlen(namep) - 1];
+
+ while (endp && (*endp == ' ' || *endp == '\t'))
+ *endp-- = '\0';
+
+ /* find the '=' */
+ valp = HDstrchr(namep, '=');
+
+ if (valp != NULL) { /* it's a valid key/value pairing */
+ char *tmp_val = valp + 1;
+
+ /* change '=' to \0, move valp down one */
+ *valp-- = '\0';
+
+ /* eat up ending whitespace on the "key" part */
+ while (*valp == ' ' || *valp == '\t')
+ *valp-- = '\0';
+
+ valp = tmp_val;
+
+ /* eat up beginning whitespace on the "value" part */
+ while (*valp == ' ' || *valp == '\t')
+ *valp++ = '\0';
+
+ /* actually set the darned thing */
+ if (MPI_SUCCESS != MPI_Info_set(h5_io_info_g, namep, valp)) {
+ HDprintf("MPI_Info_set failed\n");
+ ret_value = -1;
+ }
+ }
+
+ valp = next;
+ HDfree(key_val);
+ } while (next && *next);
+
+ HDfree(envp);
+ }
+
+ return ret_value;
+}
+
+
+/*
+ * Function: h5_dump_info_object
+ * Purpose: Display content of an MPI Info object
+ * Return: void
+ * Programmer: Albert Cheng 2002/05/21
+ * Modifications:
+ */
+void
+h5_dump_info_object(MPI_Info info)
+{
+ char key[MPI_MAX_INFO_KEY+1];
+ char value[MPI_MAX_INFO_VAL+1];
+ int flag;
+ int i, nkeys;
+
+ HDprintf("Dumping MPI Info Object (up to %d bytes per item):\n", MPI_MAX_INFO_VAL);
+ if (info==MPI_INFO_NULL){
+ HDprintf("object is MPI_INFO_NULL\n");
+ }
+ else {
+ MPI_Info_get_nkeys(info, &nkeys);
+ HDprintf("object has %d items\n", nkeys);
+ for (i=0; i<nkeys; i++){
+ MPI_Info_get_nthkey(info, i, key);
+ MPI_Info_get(info, key, MPI_MAX_INFO_VAL, value, &flag);
+ HDprintf("%s=%s\n", key, value);
+ }
+
+ }
+}
+#endif /* STANDALONE */
+
diff --git a/tools/test/perform/pio_standalone.h b/tools/test/perform/pio_standalone.h
index e6db2e8..f2cda4f 100644
--- a/tools/test/perform/pio_standalone.h
+++ b/tools/test/perform/pio_standalone.h
@@ -213,7 +213,7 @@ H5_DLL int HDfprintf (FILE *stream, const char *fmt, ...);
#define HDgetpwnam(S) getpwnam(S)
#define HDgetpwuid(U) getpwuid(U)
#define HDgetrusage(X,S) getrusage(X,S)
-#define HDgets(S) gets(S)
+/* Don't define a macro for gets() - it was removed in C11 */
#ifdef H5_HAVE_WIN32_API
H5_DLL int Wgettimeofday(struct timeval *tv, struct timezone *tz);
#define HDgettimeofday(V,Z) Wgettimeofday(V,Z)
@@ -483,8 +483,8 @@ extern MPI_Info h5_io_info_g; /* MPI INFO object for IO */
#endif
#ifdef H5_HAVE_PARALLEL
-H5TEST_DLL int h5_set_info_object(void);
-H5TEST_DLL void h5_dump_info_object(MPI_Info info);
+int h5_set_info_object(void);
+void h5_dump_info_object(MPI_Info info);
#endif
diff --git a/tools/test/perform/sio_engine.c b/tools/test/perform/sio_engine.c
index 488f575..aa3a316 100644
--- a/tools/test/perform/sio_engine.c
+++ b/tools/test/perform/sio_engine.c
@@ -114,11 +114,11 @@ static const char *multi_letters = "msbrglo"; /* string for multi driver */
/* HDF5 global variables */
static hsize_t h5count[MAX_DIMS]; /*selection count */
static hssize_t h5offset[MAX_DIMS]; /* Selection offset within dataspace */
-static hid_t h5dset_space_id = -1; /*dataset space ID */
-static hid_t h5mem_space_id = -1; /*memory dataspace ID */
-static hid_t h5ds_id = -1; /*dataset handle */
-static hid_t h5dcpl = -1; /* Dataset creation property list */
-static hid_t h5dxpl = -1; /* Dataset transfer property list */
+static hid_t h5dset_space_id = H5I_INVALID_HID; /*dataset space ID */
+static hid_t h5mem_space_id = H5I_INVALID_HID; /*memory dataspace ID */
+static hid_t h5ds_id = H5I_INVALID_HID; /*dataset handle */
+static hid_t h5dcpl = H5I_INVALID_HID; /* Dataset creation property list */
+static hid_t h5dxpl = H5I_INVALID_HID; /* Dataset transfer property list */
/*
* Function: do_sio
@@ -212,18 +212,18 @@ do_sio(parameters param, results *res)
HDfprintf(output, "data filename=%s\n",
fname);
- set_time(res->timers, HDF5_GROSS_WRITE_FIXED_DIMS, TSTART);
+ io_time_set(res->timers, HDF5_GROSS_WRITE_FIXED_DIMS, TSTART);
hrc = do_fopen(&param, fname, &fd, SIO_CREATE | SIO_WRITE);
VRFY((hrc == SUCCESS), "do_fopen failed");
- set_time(res->timers, HDF5_FINE_WRITE_FIXED_DIMS, TSTART);
+ io_time_set(res->timers, HDF5_FINE_WRITE_FIXED_DIMS, TSTART);
hrc = do_write(res, &fd, &param, buffer);
- set_time(res->timers, HDF5_FINE_WRITE_FIXED_DIMS, TSTOP);
+ io_time_set(res->timers, HDF5_FINE_WRITE_FIXED_DIMS, TSTOP);
VRFY((hrc == SUCCESS), "do_write failed");
/* Close file for write */
hrc = do_fclose(iot, &fd);
- set_time(res->timers, HDF5_GROSS_WRITE_FIXED_DIMS, TSTOP);
+ io_time_set(res->timers, HDF5_GROSS_WRITE_FIXED_DIMS, TSTOP);
VRFY((hrc == SUCCESS), "do_fclose failed");
if (!param.h5_write_only) {
@@ -232,19 +232,19 @@ do_sio(parameters param, results *res)
*/
/* Open file for read */
- set_time(res->timers, HDF5_GROSS_READ_FIXED_DIMS, TSTART);
+ io_time_set(res->timers, HDF5_GROSS_READ_FIXED_DIMS, TSTART);
hrc = do_fopen(&param, fname, &fd, SIO_READ);
VRFY((hrc == SUCCESS), "do_fopen failed");
- set_time(res->timers, HDF5_FINE_READ_FIXED_DIMS, TSTART);
+ io_time_set(res->timers, HDF5_FINE_READ_FIXED_DIMS, TSTART);
hrc = do_read(res, &fd, &param, buffer);
- set_time(res->timers, HDF5_FINE_READ_FIXED_DIMS, TSTOP);
+ io_time_set(res->timers, HDF5_FINE_READ_FIXED_DIMS, TSTOP);
VRFY((hrc == SUCCESS), "do_read failed");
/* Close file for read */
hrc = do_fclose(iot, &fd);
- set_time(res->timers, HDF5_GROSS_READ_FIXED_DIMS, TSTOP);
+ io_time_set(res->timers, HDF5_GROSS_READ_FIXED_DIMS, TSTOP);
VRFY((hrc == SUCCESS), "do_fclose failed");
}
@@ -550,7 +550,7 @@ do_write(results *res, file_descr *fd, parameters *parms, void *buffer)
}
/* Start "raw data" write timer */
- set_time(res->timers, HDF5_RAW_WRITE_FIXED_DIMS, TSTART);
+ io_time_set(res->timers, HDF5_RAW_WRITE_FIXED_DIMS, TSTART);
/* Perform write */
hrc = dset_write(rank-1, fd, parms, buffer);
@@ -562,7 +562,7 @@ do_write(results *res, file_descr *fd, parameters *parms, void *buffer)
/* Stop "raw data" write timer */
- set_time(res->timers, HDF5_RAW_WRITE_FIXED_DIMS, TSTOP);
+ io_time_set(res->timers, HDF5_RAW_WRITE_FIXED_DIMS, TSTOP);
/* Calculate write time */
@@ -575,7 +575,7 @@ do_write(results *res, file_descr *fd, parameters *parms, void *buffer)
GOTOERROR(FAIL);
}
- h5ds_id = -1;
+ h5ds_id = H5I_INVALID_HID;
} /* end if */
done:
@@ -587,7 +587,7 @@ done:
HDfprintf(stderr, "HDF5 Dataset Space Close failed\n");
ret_code = FAIL;
} else {
- h5dset_space_id = -1;
+ h5dset_space_id = H5I_INVALID_HID;
}
}
@@ -597,7 +597,7 @@ done:
HDfprintf(stderr, "HDF5 Memory Space Close failed\n");
ret_code = FAIL;
} else {
- h5mem_space_id = -1;
+ h5mem_space_id = H5I_INVALID_HID;
}
}
@@ -607,7 +607,7 @@ done:
HDfprintf(stderr, "HDF5 Dataset Transfer Property List Close failed\n");
ret_code = FAIL;
} else {
- h5dxpl = -1;
+ h5dxpl = H5I_INVALID_HID;
}
}
@@ -872,7 +872,7 @@ do_read(results *res, file_descr *fd, parameters *parms, void *buffer)
} /* end switch */
/* Start "raw data" read timer */
- set_time(res->timers, HDF5_RAW_READ_FIXED_DIMS, TSTART);
+ io_time_set(res->timers, HDF5_RAW_READ_FIXED_DIMS, TSTART);
hrc = dset_read(rank-1, fd, parms, buffer, buffer2);
if (hrc < 0) {
@@ -881,7 +881,7 @@ do_read(results *res, file_descr *fd, parameters *parms, void *buffer)
}
/* Stop "raw data" read timer */
- set_time(res->timers, HDF5_RAW_READ_FIXED_DIMS, TSTOP);
+ io_time_set(res->timers, HDF5_RAW_READ_FIXED_DIMS, TSTOP);
/* Calculate read time */
@@ -894,7 +894,7 @@ do_read(results *res, file_descr *fd, parameters *parms, void *buffer)
GOTOERROR(FAIL);
}
- h5ds_id = -1;
+ h5ds_id = H5I_INVALID_HID;
} /* end if */
done:
@@ -906,7 +906,7 @@ done:
HDfprintf(stderr, "HDF5 Dataset Space Close failed\n");
ret_code = FAIL;
} else {
- h5dset_space_id = -1;
+ h5dset_space_id = H5I_INVALID_HID;
}
}
@@ -916,7 +916,7 @@ done:
HDfprintf(stderr, "HDF5 Memory Space Close failed\n");
ret_code = FAIL;
} else {
- h5mem_space_id = -1;
+ h5mem_space_id = H5I_INVALID_HID;
}
}
@@ -926,7 +926,7 @@ done:
HDfprintf(stderr, "HDF5 Dataset Transfer Property List Close failed\n");
ret_code = FAIL;
} else {
- h5dxpl = -1;
+ h5dxpl = H5I_INVALID_HID;
}
}
@@ -1137,7 +1137,7 @@ done:
hid_t
set_vfd(parameters *param)
{
- hid_t my_fapl = -1;
+ hid_t my_fapl = H5I_INVALID_HID;
vfdtype vfd;
vfd = param->vfd;
@@ -1174,7 +1174,7 @@ set_vfd(parameters *param)
HDmemset(memb_addr, 0, sizeof memb_addr);
HDassert(HDstrlen(multi_letters)==H5FD_MEM_NTYPES);
- for (mt=H5FD_MEM_DEFAULT; mt<H5FD_MEM_NTYPES; H5_INC_ENUM(H5FD_mem_t,mt)) {
+ for (mt=H5FD_MEM_DEFAULT; mt<H5FD_MEM_NTYPES; mt++) {
memb_fapl[mt] = H5P_DEFAULT;
HDsprintf(sv[mt], "%%s-%c.h5", multi_letters[mt]);
memb_name[mt] = sv[mt];
@@ -1268,8 +1268,7 @@ done:
* 'temp' in the code below, but early (4.4.7, at least) gcc only
* allows diagnostic pragmas to be toggled outside of functions.
*/
-#pragma GCC diagnostic push
-#pragma GCC diagnostic ignored "-Wformat-nonliteral"
+H5_GCC_DIAG_OFF(format-nonliteral)
static void
do_cleanupfile(iotype iot, char *filename)
{
@@ -1312,7 +1311,7 @@ do_cleanupfile(iotype iot, char *filename)
H5FD_mem_t mt;
assert(HDstrlen(multi_letters)==H5FD_MEM_NTYPES);
- for (mt = H5FD_MEM_DEFAULT; mt < H5FD_MEM_NTYPES; H5_INC_ENUM(H5FD_mem_t,mt)) {
+ for (mt = H5FD_MEM_DEFAULT; mt < H5FD_MEM_NTYPES; mt++) {
HDsnprintf(temp, sizeof temp, "%s-%c.h5",
filename, multi_letters[mt]);
HDremove(temp); /*don't care if it fails*/
@@ -1322,7 +1321,7 @@ do_cleanupfile(iotype iot, char *filename)
}
H5Pclose(fapl);
break;
-
+
default:
/* unknown request */
HDfprintf(stderr, "Unknown IO type request (%d)\n", (int)iot);
@@ -1331,5 +1330,5 @@ do_cleanupfile(iotype iot, char *filename)
}
}
}
-#pragma GCC diagnostic pop
+H5_GCC_DIAG_ON(format-nonliteral)
diff --git a/tools/test/perform/sio_perf.c b/tools/test/perform/sio_perf.c
index 90030d8..d2eb3fc 100644
--- a/tools/test/perform/sio_perf.c
+++ b/tools/test/perform/sio_perf.c
@@ -303,7 +303,7 @@ typedef struct _minmax {
/* local functions */
static hsize_t parse_size_directive(const char *size);
-static struct options *parse_command_line(int argc, char *argv[]);
+static struct options *parse_command_line(int argc, const char *argv[]);
static void run_test_loop(struct options *options);
static int run_test(iotype iot, parameters parms, struct options *opts);
static void output_all_info(minmax *mm, int count, int indent_level);
@@ -324,7 +324,7 @@ static void report_parameters(struct options *opts);
* Modifications:
*/
int
-main(int argc, char **argv)
+main(int argc, const char *argv[])
{
int exit_value = EXIT_SUCCESS;
struct options *opts = NULL;
@@ -498,50 +498,50 @@ run_test(iotype iot, parameters parms, struct options *opts)
do_sio(parms, &res);
/* gather all of the "sys write" times */
- t = get_time(res.timers, HDF5_MPI_WRITE);
+ t = io_time_get(res.timers, HDF5_MPI_WRITE);
get_minmax(&write_sys_mm, t);
write_sys_mm_table[i] = write_sys_mm;
/* gather all of the "write" times */
- t = get_time(res.timers, HDF5_FINE_WRITE_FIXED_DIMS);
+ t = io_time_get(res.timers, HDF5_FINE_WRITE_FIXED_DIMS);
get_minmax(&write_mm, t);
write_mm_table[i] = write_mm;
/* gather all of the "write" times from open to close */
- t = get_time(res.timers, HDF5_GROSS_WRITE_FIXED_DIMS);
+ t = io_time_get(res.timers, HDF5_GROSS_WRITE_FIXED_DIMS);
get_minmax(&write_gross_mm, t);
write_gross_mm_table[i] = write_gross_mm;
/* gather all of the raw "write" times */
- t = get_time(res.timers, HDF5_RAW_WRITE_FIXED_DIMS);
+ t = io_time_get(res.timers, HDF5_RAW_WRITE_FIXED_DIMS);
get_minmax(&write_raw_mm, t);
write_raw_mm_table[i] = write_raw_mm;
if (!parms.h5_write_only) {
/* gather all of the "mpi read" times */
- t = get_time(res.timers, HDF5_MPI_READ);
+ t = io_time_get(res.timers, HDF5_MPI_READ);
get_minmax(&read_sys_mm, t);
read_sys_mm_table[i] = read_sys_mm;
/* gather all of the "read" times */
- t = get_time(res.timers, HDF5_FINE_READ_FIXED_DIMS);
+ t = io_time_get(res.timers, HDF5_FINE_READ_FIXED_DIMS);
get_minmax(&read_mm, t);
read_mm_table[i] = read_mm;
/* gather all of the "read" times from open to close */
- t = get_time(res.timers, HDF5_GROSS_READ_FIXED_DIMS);
+ t = io_time_get(res.timers, HDF5_GROSS_READ_FIXED_DIMS);
get_minmax(&read_gross_mm, t);
read_gross_mm_table[i] = read_gross_mm;
/* gather all of the raw "read" times */
- t = get_time(res.timers, HDF5_RAW_READ_FIXED_DIMS);
+ t = io_time_get(res.timers, HDF5_RAW_READ_FIXED_DIMS);
get_minmax(&read_raw_mm, t);
read_raw_mm_table[i] = read_gross_mm;
@@ -944,7 +944,7 @@ report_parameters(struct options *opts)
* Added multidimensional testing (Christian Chilan, April, 2008)
*/
static struct options *
-parse_command_line(int argc, char *argv[])
+parse_command_line(int argc, const char *argv[])
{
int opt;
struct options *cl_opts;
@@ -984,7 +984,7 @@ parse_command_line(int argc, char *argv[])
cl_opts->h5_extendable = FALSE; /* Use extendable dataset */
cl_opts->verify = FALSE; /* No Verify data correctness by default */
- while ((opt = get_option(argc, (const char **)argv, s_opts, l_opts)) != EOF) {
+ while ((opt = get_option(argc, argv, s_opts, l_opts)) != EOF) {
switch ((char)opt) {
case 'a':
cl_opts->h5_alignment = parse_size_directive(opt_arg);
diff --git a/tools/test/perform/sio_perf.h b/tools/test/perform/sio_perf.h
index 83caf54..d26c78b 100644
--- a/tools/test/perform/sio_perf.h
+++ b/tools/test/perform/sio_perf.h
@@ -13,12 +13,13 @@
#ifndef SIO_PERF_H__
#define SIO_PERF_H__
-#include "io_timer.h"
#ifndef STANDALONE
+#include "io_timer.h"
#include "h5test.h"
#include "h5tools.h"
#include "h5tools_utils.h"
#else
+#include "io_timer.h"
#include "sio_standalone.h"
#endif
diff --git a/tools/test/perform/sio_standalone.h b/tools/test/perform/sio_standalone.h
index 5ce922b..99e13bc 100644
--- a/tools/test/perform/sio_standalone.h
+++ b/tools/test/perform/sio_standalone.h
@@ -47,13 +47,6 @@
#define MAX3(a,b,c) MAX(a,MAX(b,c))
#define MAX4(a,b,c,d) MAX(MAX(a,b),MAX(c,d))
-/*
- * A macro to portably increment enumerated types.
- */
-#ifndef H5_INC_ENUM
-# define H5_INC_ENUM(TYPE,VAR) (VAR)=((TYPE)((VAR)+1))
-#endif
-
#define H5_FLT_ABS_EQUAL(X,Y) (HDfabsf((X)-(Y)) < FLT_EPSILON)
#define H5_DBL_ABS_EQUAL(X,Y) (HDfabs ((X)-(Y)) < DBL_EPSILON)
#define H5_LDBL_ABS_EQUAL(X,Y) (HDfabsl((X)-(Y)) < LDBL_EPSILON)
@@ -235,7 +228,7 @@ H5_DLL int HDfprintf (FILE *stream, const char *fmt, ...);
#define HDgetpwnam(S) getpwnam(S)
#define HDgetpwuid(U) getpwuid(U)
#define HDgetrusage(X,S) getrusage(X,S)
-#define HDgets(S) gets(S)
+/* Don't define a macro for gets() - it was removed in C11 */
#ifdef H5_HAVE_WIN32_API
H5_DLL int Wgettimeofday(struct timeval *tv, struct timezone *tz);
#define HDgettimeofday(V,Z) Wgettimeofday(V,Z)
@@ -505,8 +498,8 @@ extern MPI_Info h5_io_info_g; /* MPI INFO object for IO */
#endif
#ifdef H5_HAVE_PARALLEL
-H5TEST_DLL int h5_set_info_object(void);
-H5TEST_DLL void h5_dump_info_object(MPI_Info info);
+int h5_set_info_object(void);
+void h5_dump_info_object(MPI_Info info);
#endif
@@ -534,4 +527,10 @@ typedef struct long_options {
extern int get_option(int argc, const char **argv, const char *opt,
const struct long_options *l_opt);
+
+extern int nCols; /*max number of columns for outputting */
+
+/* Definitions of useful routines */
+extern void print_version(const char *progname);
+
#endif
diff --git a/tools/test/perform/zip_perf.c b/tools/test/perform/zip_perf.c
index e301bb3..8f1f584 100644
--- a/tools/test/perform/zip_perf.c
+++ b/tools/test/perform/zip_perf.c
@@ -552,7 +552,7 @@ do_write_test(unsigned long file_size, unsigned long min_buf_size,
* Modifications:
*/
int
-main(int argc, char **argv)
+main(int argc, const char *argv[])
{
unsigned long min_buf_size = 128 * ONE_KB, max_buf_size = ONE_MB;
unsigned long file_size = 64 * ONE_MB;
@@ -563,7 +563,7 @@ main(int argc, char **argv)
/* Initialize h5tools lib */
h5tools_init();
- while ((opt = get_option(argc, (const char **)argv, s_opts, l_opts)) > 0) {
+ while ((opt = get_option(argc, argv, s_opts, l_opts)) > 0) {
switch ((char)opt) {
case '0': case '1': case '2':
case '3': case '4': case '5':