summaryrefslogtreecommitdiffstats
path: root/tools/h5diff
diff options
context:
space:
mode:
authorQuincey Koziol <koziol@hdfgroup.org>2012-03-21 15:10:17 (GMT)
committerQuincey Koziol <koziol@hdfgroup.org>2012-03-21 15:10:17 (GMT)
commiteb89d7b53ab95623ab454186a602e1cafc7391f0 (patch)
treeceafe458b3011e38853e765352d3c7e59bbecce1 /tools/h5diff
parent3e468e6ff65d540a439e99ea568a6bff7add7cea (diff)
downloadhdf5-eb89d7b53ab95623ab454186a602e1cafc7391f0.zip
hdf5-eb89d7b53ab95623ab454186a602e1cafc7391f0.tar.gz
hdf5-eb89d7b53ab95623ab454186a602e1cafc7391f0.tar.bz2
[svn-r22105] Description:
Bring r20557:22085 from trunk to this branch, also fixing some other issues/failures in the branch simultaneously. The h5repack tests are still failing, but Neil will be checking into those, so the branch can be fully functional again. Tested on: Mac OSX/64 10.7.3 (amazon) w/debug
Diffstat (limited to 'tools/h5diff')
-rw-r--r--tools/h5diff/CMakeLists.txt262
-rw-r--r--tools/h5diff/Makefile.in3
-rw-r--r--tools/h5diff/h5diff_common.c263
-rw-r--r--tools/h5diff/h5diff_common.h5
-rw-r--r--tools/h5diff/h5diff_main.c30
-rw-r--r--tools/h5diff/h5diffgentest.c1148
-rw-r--r--tools/h5diff/ph5diff_main.c37
-rw-r--r--tools/h5diff/testfiles/compounds_array_vlen1.h5bin0 -> 26912 bytes
-rw-r--r--tools/h5diff/testfiles/compounds_array_vlen2.h5bin0 -> 26912 bytes
-rw-r--r--tools/h5diff/testfiles/h5diff_10.txt175
-rw-r--r--tools/h5diff/testfiles/h5diff_17.txt3
-rw-r--r--tools/h5diff/testfiles/h5diff_171.txt2
-rw-r--r--tools/h5diff/testfiles/h5diff_172.txt2
-rw-r--r--tools/h5diff/testfiles/h5diff_20.txt2
-rw-r--r--tools/h5diff/testfiles/h5diff_202.txt1
-rw-r--r--tools/h5diff/testfiles/h5diff_205.txt1
-rw-r--r--tools/h5diff/testfiles/h5diff_208.txt5
-rw-r--r--tools/h5diff/testfiles/h5diff_21.txt2
-rw-r--r--tools/h5diff/testfiles/h5diff_22.txt2
-rw-r--r--tools/h5diff/testfiles/h5diff_220.txt8
-rw-r--r--tools/h5diff/testfiles/h5diff_221.txt12
-rw-r--r--tools/h5diff/testfiles/h5diff_222.txt19
-rw-r--r--tools/h5diff/testfiles/h5diff_30.txt9
-rw-r--r--tools/h5diff/testfiles/h5diff_465.txt1
-rw-r--r--tools/h5diff/testfiles/h5diff_466.txt5
-rw-r--r--tools/h5diff/testfiles/h5diff_467.txt3
-rw-r--r--tools/h5diff/testfiles/h5diff_468.txt5
-rw-r--r--tools/h5diff/testfiles/h5diff_469.txt3
-rw-r--r--tools/h5diff/testfiles/h5diff_505.txt2
-rw-r--r--tools/h5diff/testfiles/h5diff_507.txt2
-rw-r--r--tools/h5diff/testfiles/h5diff_509.txt2
-rw-r--r--tools/h5diff/testfiles/h5diff_530.txt24
-rw-r--r--tools/h5diff/testfiles/h5diff_540.txt86
-rw-r--r--tools/h5diff/testfiles/h5diff_57.txt2
-rw-r--r--tools/h5diff/testfiles/h5diff_600.txt175
-rw-r--r--tools/h5diff/testfiles/h5diff_603.txt175
-rw-r--r--tools/h5diff/testfiles/h5diff_606.txt175
-rw-r--r--tools/h5diff/testfiles/h5diff_612.txt175
-rw-r--r--tools/h5diff/testfiles/h5diff_615.txt175
-rw-r--r--tools/h5diff/testfiles/h5diff_621.txt175
-rw-r--r--tools/h5diff/testfiles/h5diff_622.txt175
-rw-r--r--tools/h5diff/testfiles/h5diff_623.txt175
-rw-r--r--tools/h5diff/testfiles/h5diff_624.txt175
-rw-r--r--tools/h5diff/testfiles/h5diff_630.txt3
-rw-r--r--tools/h5diff/testfiles/h5diff_631.txt3
-rw-r--r--tools/h5diff/testfiles/h5diff_640.txt4
-rw-r--r--tools/h5diff/testfiles/h5diff_641.txt4
-rw-r--r--tools/h5diff/testfiles/h5diff_642.txt4
-rw-r--r--tools/h5diff/testfiles/h5diff_643.txt4
-rw-r--r--tools/h5diff/testfiles/h5diff_644.txt4
-rw-r--r--tools/h5diff/testfiles/h5diff_645.txt4
-rw-r--r--tools/h5diff/testfiles/h5diff_646.txt4
-rw-r--r--tools/h5diff/testfiles/h5diff_70.txt2
-rw-r--r--tools/h5diff/testfiles/h5diff_700.txt2
-rw-r--r--tools/h5diff/testfiles/h5diff_701.txt2
-rw-r--r--tools/h5diff/testfiles/h5diff_702.txt2
-rw-r--r--tools/h5diff/testfiles/h5diff_703.txt2
-rw-r--r--tools/h5diff/testfiles/h5diff_80.txt2
-rw-r--r--tools/h5diff/testfiles/h5diff_90.txt6
-rw-r--r--tools/h5diff/testfiles/h5diff_basic1.h5bin11432 -> 12248 bytes
-rw-r--r--tools/h5diff/testfiles/h5diff_comp_vl_strs.h5bin18536 -> 37952 bytes
-rw-r--r--tools/h5diff/testfiles/h5diff_dset_zero_dim_size1.h5bin0 -> 1672 bytes
-rw-r--r--tools/h5diff/testfiles/h5diff_dset_zero_dim_size2.h5bin0 -> 1672 bytes
-rwxr-xr-xtools/h5diff/testfiles/h5diff_enum_invalid_values.h5bin0 -> 2192 bytes
-rw-r--r--tools/h5diff/testfiles/non_comparables1.h5bin0 -> 6568 bytes
-rw-r--r--tools/h5diff/testfiles/non_comparables2.h5bin0 -> 6584 bytes
-rwxr-xr-xtools/h5diff/testh5diff.sh769
67 files changed, 3086 insertions, 1436 deletions
diff --git a/tools/h5diff/CMakeLists.txt b/tools/h5diff/CMakeLists.txt
index 97c3a3c..f178f19 100644
--- a/tools/h5diff/CMakeLists.txt
+++ b/tools/h5diff/CMakeLists.txt
@@ -1,11 +1,10 @@
-cmake_minimum_required (VERSION 2.8)
+cmake_minimum_required (VERSION 2.8.6)
PROJECT (HDF5_TOOLS_H5DIFF)
#-----------------------------------------------------------------------------
# Setup include Directories
#-----------------------------------------------------------------------------
INCLUDE_DIRECTORIES (${HDF5_TOOLS_SRC_DIR}/lib)
-INCLUDE_DIRECTORIES (${HDF5_PROJECT_DIR}/test)
# --------------------------------------------------------------------
# Add the h5diff executables
@@ -16,9 +15,20 @@ ADD_EXECUTABLE (h5diff
)
TARGET_NAMING (h5diff ${LIB_TYPE})
TARGET_LINK_LIBRARIES (h5diff ${HDF5_TOOLS_LIB_TARGET} ${HDF5_LIB_TARGET})
+SET_TARGET_PROPERTIES (h5diff PROPERTIES FOLDER tools)
SET (H5_DEP_EXECUTABLES h5diff)
+IF (H5_HAVE_PARALLEL)
+ ADD_EXECUTABLE (ph5diff
+ ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/h5diff_common.c
+ ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/ph5diff_main.c
+ )
+ TARGET_NAMING (ph5diff ${LIB_TYPE})
+ TARGET_LINK_LIBRARIES (ph5diff ${HDF5_TOOLS_LIB_TARGET} ${HDF5_LIB_TARGET})
+ SET_TARGET_PROPERTIES (ph5diff PROPERTIES FOLDER tools)
+ENDIF (H5_HAVE_PARALLEL)
+
##############################################################################
##############################################################################
### T E S T I N G ###
@@ -32,7 +42,8 @@ IF (BUILD_TESTING)
IF (HDF5_BUILD_GENERATORS AND NOT BUILD_SHARED_LIBS)
ADD_EXECUTABLE (h5diffgentest ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/h5diffgentest.c)
TARGET_NAMING (h5diffgentest ${LIB_TYPE})
- TARGET_LINK_LIBRARIES (h5diffgentest ${HDF5_LIB_TARGET} ${HDF5_TOOLS_LIB_TARGET})
+ TARGET_LINK_LIBRARIES (h5diffgentest ${HDF5_LIB_TARGET})
+ SET_TARGET_PROPERTIES (h5diffgentest PROPERTIES FOLDER generator/tools)
#ADD_TEST (NAME h5diffgentest COMMAND $<TARGET_FILE:h5diffgentest>)
ENDIF (HDF5_BUILD_GENERATORS AND NOT BUILD_SHARED_LIBS)
@@ -69,6 +80,10 @@ IF (BUILD_TESTING)
h5diff_205.txt
h5diff_206.txt
h5diff_207.txt
+ h5diff_208.txt
+ h5diff_220.txt
+ h5diff_221.txt
+ h5diff_222.txt
h5diff_21.txt
h5diff_22.txt
h5diff_23.txt
@@ -114,6 +129,11 @@ IF (BUILD_TESTING)
h5diff_457.txt
h5diff_458.txt
h5diff_459.txt
+ h5diff_465.txt
+ h5diff_466.txt
+ h5diff_467.txt
+ h5diff_468.txt
+ h5diff_469.txt
h5diff_480.txt
h5diff_481.txt
h5diff_482.txt
@@ -148,6 +168,7 @@ IF (BUILD_TESTING)
h5diff_517.txt
h5diff_518.txt
h5diff_530.txt
+ h5diff_540.txt
h5diff_600.txt
h5diff_601.txt
h5diff_603.txt
@@ -175,6 +196,15 @@ IF (BUILD_TESTING)
h5diff_627.txt
h5diff_628.txt
h5diff_629.txt
+ h5diff_630.txt
+ h5diff_631.txt
+ h5diff_640.txt
+ h5diff_641.txt
+ h5diff_642.txt
+ h5diff_643.txt
+ h5diff_644.txt
+ h5diff_645.txt
+ h5diff_646.txt
h5diff_70.txt
h5diff_700.txt
h5diff_701.txt
@@ -209,6 +239,8 @@ IF (BUILD_TESTING)
h5diff_extlink_trg.h5
h5diff_ext2softlink_src.h5
h5diff_ext2softlink_trg.h5
+ h5diff_dset_zero_dim_size1.h5
+ h5diff_dset_zero_dim_size2.h5
h5diff_danglelinks1.h5
h5diff_danglelinks2.h5
h5diff_grp_recurse1.h5
@@ -224,6 +256,10 @@ IF (BUILD_TESTING)
h5diff_comp_vl_strs.h5
h5diff_attr_v_level1.h5
h5diff_attr_v_level2.h5
+ compounds_array_vlen1.h5
+ compounds_array_vlen2.h5
+ non_comparables1.h5
+ non_comparables2.h5
)
FOREACH (txt_file ${HDF5_REFERENCE_FILES})
@@ -317,8 +353,17 @@ IF (BUILD_TESTING)
IF (NOT ${resultcode} STREQUAL "0")
SET_TESTS_PROPERTIES (H5DIFF-${resultfile} PROPERTIES WILL_FAIL "true")
ENDIF (NOT ${resultcode} STREQUAL "0")
+ IF (NOT "${last_test}" STREQUAL "")
+ SET_TESTS_PROPERTIES (H5DIFF-${resultfile} PROPERTIES DEPENDS ${last_test})
+ ENDIF (NOT "${last_test}" STREQUAL "")
+ SET (last_test "H5DIFF-${resultfile}")
ELSE (HDF5_ENABLE_USING_MEMCHECKER)
ADD_TEST (
+ NAME H5DIFF-clear-${resultfile}-objects
+ COMMAND ${CMAKE_COMMAND}
+ -E remove ${resultfile}.out ${resultfile}.out.err
+ )
+ ADD_TEST (
NAME H5DIFF-${resultfile}
COMMAND "${CMAKE_COMMAND}"
-D "TEST_PROGRAM=$<TARGET_FILE:h5diff>"
@@ -330,12 +375,76 @@ IF (BUILD_TESTING)
-D "TEST_APPEND=EXIT CODE:"
-P "${HDF5_RESOURCES_DIR}/runTest.cmake"
)
+ SET_TESTS_PROPERTIES (H5DIFF-${resultfile} PROPERTIES DEPENDS "H5DIFF-clear-${resultfile}-objects")
ENDIF (HDF5_ENABLE_USING_MEMCHECKER)
+ IF (H5_HAVE_PARALLEL)
+ ADD_PH5_TEST (${resultfile} ${resultcode} ${ARGN})
+ ENDIF (H5_HAVE_PARALLEL)
+ ENDMACRO (ADD_H5_TEST file)
+
+ MACRO (ADD_PH5_TEST resultfile resultcode)
+ # If using memchecker add tests without using scripts
+ IF (HDF5_ENABLE_USING_MEMCHECKER)
+ ADD_TEST (NAME PH5DIFF-${resultfile} COMMAND $<TARGET_FILE:ph5diff> ${MPIEXEC} ${MPIEXEC_PREFLAGS} ${MPIEXEC_NUMPROC_FLAG} ${MPIEXEC_MAX_NUMPROCS} ${MPIEXEC_POSTFLAGS} ${ARGN})
+ IF (NOT ${resultcode} STREQUAL "0")
+ SET_TESTS_PROPERTIES (PH5DIFF-${resultfile} PROPERTIES WILL_FAIL "true")
+ ENDIF (NOT ${resultcode} STREQUAL "0")
+ IF (NOT "${last_test}" STREQUAL "")
+ SET_TESTS_PROPERTIES (PH5DIFF-${resultfile} PROPERTIES DEPENDS ${last_test})
+ ENDIF (NOT "${last_test}" STREQUAL "")
+ SET (last_test "PH5DIFF-${resultfile}")
+ ELSE (HDF5_ENABLE_USING_MEMCHECKER)
+ ADD_TEST (
+ NAME PH5DIFF-clear-${resultfile}-objects
+ COMMAND ${CMAKE_COMMAND}
+ -E remove ${resultfile}_p.out ${resultfile}_p.out.err
+ )
+ ADD_TEST (
+ NAME PH5DIFF-${resultfile}
+ COMMAND "${CMAKE_COMMAND}"
+ -D "TEST_PROGRAM=${MPIEXEC};${MPIEXEC_PREFLAGS};${MPIEXEC_NUMPROC_FLAG};${MPIEXEC_MAX_NUMPROCS};${MPIEXEC_POSTFLAGS};$<TARGET_FILE:ph5diff>"
+ -D "TEST_ARGS:STRING=${ARGN}"
+ -D "TEST_FOLDER=${PROJECT_BINARY_DIR}"
+ -D "TEST_OUTPUT=P_${resultfile}.out"
+ -D "TEST_EXPECT=${resultcode}"
+ -D "TEST_REFERENCE=${resultfile}.txt"
+# -D "TEST_APPEND=EXIT CODE: [0-9]"
+# -D "TEST_REF_FILTER=EXIT CODE: 0"
+ -D "TEST_SKIP_COMPARE=TRUE"
+ -P "${HDF5_RESOURCES_DIR}/prunTest.cmake"
+ )
+ SET_TESTS_PROPERTIES (PH5DIFF-${resultfile} PROPERTIES DEPENDS "PH5DIFF-clear-${resultfile}-objects")
+ ENDIF (HDF5_ENABLE_USING_MEMCHECKER)
+ ENDMACRO (ADD_PH5_TEST file)
+
+ # ADD_H5_NO_OUTPUT_TEST
+ # Purpose to verify only exitcode without output comparison
+ # Don't use this if possible; this may be removed.
+ MACRO (ADD_H5_NO_OUTPUT_TEST testname resultcode)
+ # If using memchecker add tests without using scripts
+ IF (NOT HDF5_ENABLE_USING_MEMCHECKER)
+ ADD_TEST (
+ NAME H5DIFF-clear-${testname}-objects
+ COMMAND ${CMAKE_COMMAND}
+ -E remove ${testname}.out ${testname}.out.err
+ )
+ # if there was a previous test
+ IF (NOT "${last_test}" STREQUAL "")
+ SET_TESTS_PROPERTIES (H5DIFF-clear-${testname}-objects PROPERTIES DEPENDS ${last_test})
+ ENDIF (NOT "${last_test}" STREQUAL "")
+ SET (last_test "H5DIFF-clear-${testname}-objects")
+ ENDIF (NOT HDF5_ENABLE_USING_MEMCHECKER)
+
+ ADD_TEST (NAME H5DIFF-${testname} COMMAND $<TARGET_FILE:h5diff> ${ARGN})
+ IF (NOT ${resultcode} STREQUAL "0")
+ SET_TESTS_PROPERTIES (H5DIFF-${testname} PROPERTIES WILL_FAIL "true")
+ ENDIF (NOT ${resultcode} STREQUAL "0")
+
IF (NOT "${last_test}" STREQUAL "")
- SET_TESTS_PROPERTIES (H5DIFF-${resultfile} PROPERTIES DEPENDS ${last_test})
+ SET_TESTS_PROPERTIES (H5DIFF-${testname} PROPERTIES DEPENDS ${last_test})
ENDIF (NOT "${last_test}" STREQUAL "")
- SET (last_test "H5DIFF-${resultfile}")
- ENDMACRO (ADD_H5_TEST file)
+ SET (last_test "H5DIFF-${testname}")
+ ENDMACRO (ADD_H5_NO_OUTPUT_TEST)
##############################################################################
##############################################################################
@@ -364,6 +473,8 @@ IF (BUILD_TESTING)
SET (FILE16 h5diff_extlink_trg.h5)
SET (FILE17 h5diff_ext2softlink_src.h5)
SET (FILE18 h5diff_ext2softlink_trg.h5)
+ SET (FILE19 h5diff_dset_zero_dim_size1.h5)
+ SET (FILE20 h5diff_dset_zero_dim_size2.h5)
SET (DANGLE_LINK_FILE1 h5diff_danglelinks1.h5)
SET (DANGLE_LINK_FILE2 h5diff_danglelinks2.h5)
SET (GRP_RECURSE_FILE1 h5diff_grp_recurse1.h5)
@@ -381,13 +492,16 @@ IF (BUILD_TESTING)
SET (EXCLUDE_FILE2_2 h5diff_exclude2-2.h5)
# compound type with multiple vlen string types
SET (COMP_VL_STRS_FILE h5diff_comp_vl_strs.h5)
+ # container types (array,vlen) with multiple nested compound types
+ SET (COMPS_ARRAY_VLEN_FILE1 compounds_array_vlen1.h5)
+ SET (COMPS_ARRAY_VLEN_FILE2 compounds_array_vlen2.h5)
# attrs with verbose option level
SET (ATTR_VERBOSE_LEVEL_FILE1 h5diff_attr_v_level1.h5)
SET (ATTR_VERBOSE_LEVEL_FILE2 h5diff_attr_v_level2.h5)
-
- # Remove any output file left over from previous test run
- ADD_TEST (
+ IF (HDF5_ENABLE_USING_MEMCHECKER)
+ # Remove any output file left over from previous test run
+ ADD_TEST (
NAME H5DIFF-clearall-objects
COMMAND ${CMAKE_COMMAND}
-E remove
@@ -447,6 +561,14 @@ IF (BUILD_TESTING)
h5diff_206.out.err
h5diff_207.out
h5diff_207.out.err
+ h5diff_208.out
+ h5diff_208.out.err
+ h5diff_220.out
+ h5diff_220.out.err
+ h5diff_221.out
+ h5diff_221.out.err
+ h5diff_222.out
+ h5diff_222.out.err
h5diff_21.out
h5diff_21.out.err
h5diff_22.out
@@ -537,6 +659,16 @@ IF (BUILD_TESTING)
h5diff_458.out.err
h5diff_459.out
h5diff_459.out.err
+ h5diff_465.out
+ h5diff_465.out.err
+ h5diff_466.out
+ h5diff_466.out.err
+ h5diff_467.out
+ h5diff_467.out.err
+ h5diff_468.out
+ h5diff_468.out.err
+ h5diff_469.out
+ h5diff_469.out.err
h5diff_480.out
h5diff_480.out.err
h5diff_481.out
@@ -605,6 +737,8 @@ IF (BUILD_TESTING)
h5diff_518.out.err
h5diff_530.out
h5diff_530.out.err
+ h5diff_540.out
+ h5diff_540.out.err
h5diff_600.out
h5diff_600.out.err
h5diff_601.out
@@ -659,6 +793,20 @@ IF (BUILD_TESTING)
h5diff_628.out.err
h5diff_629.out
h5diff_629.out.err
+ h5diff_640.out
+ h5diff_640.out.err
+ h5diff_641.out
+ h5diff_641.out.err
+ h5diff_642.out
+ h5diff_642.out.err
+ h5diff_643.out
+ h5diff_643.out.err
+ h5diff_644.out
+ h5diff_644.out.err
+ h5diff_645.out
+ h5diff_645.out.err
+ h5diff_646.out
+ h5diff_646.out.err
h5diff_70.out
h5diff_70.out.err
h5diff_700.out
@@ -687,11 +835,12 @@ IF (BUILD_TESTING)
h5diff_80.out.err
h5diff_90.out
h5diff_90.out.err
- )
- IF (NOT "${last_test}" STREQUAL "")
- SET_TESTS_PROPERTIES (H5DIFF-clearall-objects PROPERTIES DEPENDS ${last_test})
- ENDIF (NOT "${last_test}" STREQUAL "")
- SET (last_test "H5DIFF-clearall-objects")
+ )
+ IF (NOT "${last_test}" STREQUAL "")
+ SET_TESTS_PROPERTIES (H5DIFF-clearall-objects PROPERTIES DEPENDS ${last_test})
+ ENDIF (NOT "${last_test}" STREQUAL "")
+ SET (last_test "H5DIFF-clearall-objects")
+ ENDIF (HDF5_ENABLE_USING_MEMCHECKER)
# ############################################################################
# # Common usage
@@ -728,10 +877,10 @@ ADD_H5_TEST (h5diff_16_3 1 -v -p 0.02 ${FILE1} ${FILE1} g1/dset9 g1/dset10)
ADD_H5_TEST (h5diff_17 1 -v ${FILE1} ${FILE2})
# 1.7 test 32-bit INFINITY
-ADD_H5_TEST (h5diff_171 0 -v ${FILE1} ${FILE1} /g1/fp19)
+ADD_H5_TEST (h5diff_171 0 -v ${FILE1} ${FILE1} /g1/fp19 /g1/fp19_COPY)
# 1.7 test 64-bit INFINITY
-ADD_H5_TEST (h5diff_172 0 -v ${FILE1} ${FILE1} /g1/fp20)
+ADD_H5_TEST (h5diff_172 0 -v ${FILE1} ${FILE1} /g1/fp20 /g1/fp20_COPY)
# 1.8 quiet mode
ADD_H5_TEST (h5diff_18 1 -q ${FILE1} ${FILE2})
@@ -739,7 +888,6 @@ ADD_H5_TEST (h5diff_18 1 -q ${FILE1} ${FILE2})
# 1.8 -v and -q
ADD_H5_TEST (h5diff_18_1 2 -v -q ${FILE1} ${FILE2})
-
# ##############################################################################
# # not comparable types
# ##############################################################################
@@ -775,8 +923,6 @@ ADD_H5_TEST (h5diff_27 1 -v ${FILE3} ${FILE3} t1 t2)
# 2.8
ADD_H5_TEST (h5diff_28 1 -v ${FILE3} ${FILE3} l1 l2)
-
-
# ##############################################################################
# # Dataset datatypes
# ##############################################################################
@@ -812,19 +958,16 @@ ADD_H5_TEST (h5diff_58 1 -v ${FILE7} ${FILE8} refreg)
# # Error messages
# ##############################################################################
-
# 6.0: Check if the command line number of arguments is less than 3
ADD_H5_TEST (h5diff_600 1 ${FILE1})
# 6.1: Check if non-exist object name is specified
ADD_H5_TEST (h5diff_601 2 ${FILE1} ${FILE1} nono_obj)
-
# ##############################################################################
# # -d
# ##############################################################################
-
# 6.3: negative value
ADD_H5_TEST (h5diff_603 1 -d -4 ${FILE1} ${FILE2} g1/dset3 g1/dset4)
@@ -877,7 +1020,6 @@ ADD_H5_TEST (h5diff_618 0 -p 2 ${FILE1} ${FILE2} g1/dset3 g1/dset4)
# 6.19: number smaller than smallest difference
ADD_H5_TEST (h5diff_619 1 -p 0.005 ${FILE1} ${FILE2} g1/dset3 g1/dset4)
-
# ##############################################################################
# # -n
# ##############################################################################
@@ -911,6 +1053,13 @@ ADD_H5_TEST (h5diff_628 1 -n 1 ${FILE1} ${FILE2} g1/dset3 g1/dset4)
#ADD_H5_TEST (h5diff_629 2 file1.h6 file2.h6)
# ##############################################################################
+# # NaN
+# ##############################################################################
+# 6.30: test (NaN == NaN) must be true based on our documentation -- XCAO
+ADD_H5_TEST (h5diff_630 0 -v -d "0.0001" ${FILE1} ${FILE1} g1/fp18 g1/fp18_COPY)
+ADD_H5_TEST (h5diff_631 0 -v --use-system-epsilon ${FILE1} ${FILE1} g1/fp18 g1/fp18_COPY)
+
+# ##############################################################################
# 7. attributes
# ##############################################################################
ADD_H5_TEST (h5diff_70 1 -v ${FILE5} ${FILE6})
@@ -944,8 +1093,6 @@ ADD_H5_TEST (h5diff_709 0 -v2 ${ATTR_VERBOSE_LEVEL_FILE1} ${ATTR_VERBOSE_LEVEL_F
# file vs file
ADD_H5_TEST (h5diff_710 1 -v2 ${ATTR_VERBOSE_LEVEL_FILE1} ${ATTR_VERBOSE_LEVEL_FILE2})
-
-
# ##############################################################################
# 8. all dataset datatypes
# ##############################################################################
@@ -988,12 +1135,27 @@ ADD_H5_TEST (h5diff_204 0 -c ${FILE2} ${FILE2} g2/dset4 g2/dset5)
ADD_H5_TEST (h5diff_205 0 -c ${FILE2} ${FILE2} g2/dset5 g2/dset6)
-
# not comparable in compound
ADD_H5_TEST (h5diff_206 0 -c ${FILE2} ${FILE2} g2/dset7 g2/dset8)
ADD_H5_TEST (h5diff_207 0 -c ${FILE2} ${FILE2} g2/dset8 g2/dset9)
+# not comparable in dataspace of zero dimension size
+ADD_H5_TEST (h5diff_208 0 -c ${FILE19} ${FILE20})
+
+# non-comparable dataset with comparable attribute, and other comparable datasets.
+# All the rest comparables should display differences.
+ADD_H5_TEST (h5diff_220 1 -c non_comparables1.h5 non_comparables2.h5 /g1)
+
+# comparable dataset with non-comparable attribute and other comparable attributes.
+# Also test non-compatible attributes with different type, dimention, rank.
+# All the rest comparables should display differences.
+ADD_H5_TEST (h5diff_221 1 -c non_comparables1.h5 non_comparables2.h5 /g2)
+
+# entire file
+# All the rest comparables should display differences
+ADD_H5_TEST (h5diff_222 1 -c non_comparables1.h5 non_comparables2.h5)
+
# ##############################################################################
# # Links compare without --follow-symlinks nor --no-dangling-links
# ##############################################################################
@@ -1081,7 +1243,6 @@ ADD_H5_TEST (h5diff_424 1 --follow-symlinks -v ${FILE18} ${FILE17} /dset2 /ext_l
# extlink_to_softlink_to_dset1 vs extlink_to_softlink_to_dset2"
ADD_H5_TEST (h5diff_425 1 --follow-symlinks -v ${FILE17} ${FILE17} /ext_link_to_slink1 /ext_link_to_slink2)
-
# ##############################################################################
# # Dangling links compare (--follow-symlinks and --no-dangling-links)
# ##############################################################################
@@ -1115,6 +1276,19 @@ ADD_H5_TEST (h5diff_458 2 --follow-symlinks -v --no-dangling-links ${FILE15} $
# dangling link found for ext links (obj to obj). Both dangle links
ADD_H5_TEST (h5diff_459 2 --follow-symlinks -v --no-dangling-links ${FILE15} ${FILE15} /ext_link_noexist1 /ext_link_noexist2)
+# dangling link --follow-symlinks (obj vs obj)
+# (HDFFV-7836)
+ADD_H5_TEST (h5diff_465 0 --follow-symlinks h5diff_danglelinks1.h5 h5diff_danglelinks2.h5 /soft_link1)
+# (HDFFV-7835)
+# soft dangling vs. soft dangling
+ADD_H5_TEST (h5diff_466 0 -v --follow-symlinks h5diff_danglelinks1.h5 h5diff_danglelinks2.h5 /soft_link1)
+# soft link vs. soft dangling
+ADD_H5_TEST (h5diff_467 1 -v --follow-symlinks h5diff_danglelinks1.h5 h5diff_danglelinks2.h5 /soft_link2)
+# ext dangling vs. ext dangling
+ADD_H5_TEST (h5diff_468 0 -v --follow-symlinks h5diff_danglelinks1.h5 h5diff_danglelinks2.h5 /ext_link4)
+# ext link vs. ext dangling
+ADD_H5_TEST (h5diff_469 1 -v --follow-symlinks h5diff_danglelinks1.h5 h5diff_danglelinks2.h5 /ext_link2)
+
# ##############################################################################
# # test for group diff recursivly
# ##############################################################################
@@ -1163,7 +1337,6 @@ ADD_H5_TEST (h5diff_516 0 -v --follow-symlinks ${GRP_RECURSE1_EXT} ${GRP_RECURSE
ADD_H5_TEST (h5diff_517 1 -v ${GRP_RECURSE1_EXT} ${GRP_RECURSE2_EXT1} /g1)
ADD_H5_TEST (h5diff_518 0 -v --follow-symlinks ${GRP_RECURSE1_EXT} ${GRP_RECURSE2_EXT1} /g1)
-
# ##############################################################################
# # Exclude path (--exclude-path)
# ##############################################################################
@@ -1189,9 +1362,27 @@ ADD_H5_TEST (h5diff_484 0 -v --exclude-path "/dset3" ${EXCLUDE_FILE1_1} ${EXCLUD
# ##############################################################################
# # diff various multiple vlen and fixed strings in a compound type dataset
# ##############################################################################
-ADD_H5_TEST (h5diff_530 0 -v ${COMP_VL_STRS_FILE} ${COMP_VL_STRS_FILE})
+ADD_H5_TEST (h5diff_530 0 -v ${COMP_VL_STRS_FILE} ${COMP_VL_STRS_FILE} /group /group_copy)
-
+# ##############################################################################
+# # Test container types (array,vlen) with multiple nested compound types
+# # Complex compound types in dataset and attribute
+# ##############################################################################
+ADD_H5_TEST (h5diff_540 1 -v ${COMPS_ARRAY_VLEN_FILE1} ${COMPS_ARRAY_VLEN_FILE2})
+
+# ##############################################################################
+# # Test mutually exclusive options
+# ##############################################################################
+#
+# Test with -d , -p and --use-system-epsilon.
+ADD_H5_TEST (h5diff_640 1 -v -d 5 -p 0.05 --use-system-epsilon ${FILE1} ${FILE2} /g1/dset3 /g1/dset4)
+ADD_H5_TEST (h5diff_641 1 -v -d 5 -p 0.05 ${FILE1} ${FILE2} /g1/dset3 /g1/dset4)
+ADD_H5_TEST (h5diff_642 1 -v -p 0.05 -d 5 ${FILE1} ${FILE2} /g1/dset3 /g1/dset4)
+ADD_H5_TEST (h5diff_643 1 -v -d 5 --use-system-epsilon ${FILE1} ${FILE2} /g1/dset3 /g1/dset4)
+ADD_H5_TEST (h5diff_644 1 -v --use-system-epsilon -d 5 ${FILE1} ${FILE2} /g1/dset3 /g1/dset4)
+ADD_H5_TEST (h5diff_645 1 -v -p 0.05 --use-system-epsilon ${FILE1} ${FILE2} /g1/dset3 /g1/dset4)
+ADD_H5_TEST (h5diff_646 1 -v --use-system-epsilon -p 0.05 ${FILE1} ${FILE2} /g1/dset3 /g1/dset4)
+
ENDIF (BUILD_TESTING)
##############################################################################
@@ -1211,3 +1402,14 @@ INSTALL (
COMPONENT
toolsapplications
)
+
+IF (H5_HAVE_PARALLEL)
+ INSTALL (
+ TARGETS
+ ph5diff
+ RUNTIME DESTINATION
+ ${HDF5_INSTALL_BIN_DIR}/tools
+ COMPONENT
+ toolsapplications
+ )
+ENDIF (H5_HAVE_PARALLEL)
diff --git a/tools/h5diff/Makefile.in b/tools/h5diff/Makefile.in
index 55d7802..25884b2 100644
--- a/tools/h5diff/Makefile.in
+++ b/tools/h5diff/Makefile.in
@@ -188,6 +188,7 @@ F9XMODEXT = @F9XMODEXT@
F9XMODFLAG = @F9XMODFLAG@
F9XSUFFIXFLAG = @F9XSUFFIXFLAG@
FC = @FC@
+FC2003 = @FC2003@
FCFLAGS = @FCFLAGS@
FCFLAGS_f90 = @FCFLAGS_f90@
FCLIBS = @FCLIBS@
@@ -208,10 +209,12 @@ H5_LONE_COLON = @H5_LONE_COLON@
H5_VERSION = @H5_VERSION@
HADDR_T = @HADDR_T@
HAVE_DMALLOC = @HAVE_DMALLOC@
+HAVE_FORTRAN_2003 = @HAVE_FORTRAN_2003@
HDF5_HL = @HDF5_HL@
HDF5_INTERFACES = @HDF5_INTERFACES@
HDF_CXX = @HDF_CXX@
HDF_FORTRAN = @HDF_FORTRAN@
+HDF_FORTRAN2003 = @HDF_FORTRAN2003@
HID_T = @HID_T@
HL = @HL@
HL_FOR = @HL_FOR@
diff --git a/tools/h5diff/h5diff_common.c b/tools/h5diff/h5diff_common.c
index fd679d3..b8e46f3 100644
--- a/tools/h5diff/h5diff_common.c
+++ b/tools/h5diff/h5diff_common.c
@@ -17,6 +17,7 @@
#include <string.h>
#include "h5diff.h"
#include "h5diff_common.h"
+#include "h5tools.h"
#include "h5tools_utils.h"
static int check_n_input( const char* );
@@ -46,6 +47,31 @@ static struct long_options l_opts[] = {
{ NULL, 0, '\0' }
};
+/*-------------------------------------------------------------------------
+ * Function: check_options
+ *
+ * Purpose: parse command line input
+ *
+ *-------------------------------------------------------------------------
+ */
+static void check_options(diff_opt_t* options)
+{
+ /*--------------------------------------------------------------
+ * check for mutually exclusive options
+ *--------------------------------------------------------------*/
+
+ /* check between -d , -p, --use-system-epsilon.
+ * These options are mutually exclusive.
+ */
+ if ((options->d + options->p + options->use_system_epsilon) > 1)
+ {
+ printf("%s error: -d, -p and --use-system-epsilon options are mutually-exclusive;\n", PROGRAMNAME);
+ printf("use no more than one.\n");
+ printf("Try '-h' or '--help' option for more information or see the %s entry in the 'HDF5 Reference Manual'.\n", PROGRAMNAME);
+ h5diff_exit(EXIT_FAILURE);
+ }
+}
+
/*-------------------------------------------------------------------------
* Function: parse_command_line
@@ -104,27 +130,27 @@ void parse_command_line(int argc,
* short opt
*/
if (!strcmp (argv[i], "-v")) /* no arg */
- {
+ {
opt_ind--;
options->m_verbose_level = 0;
break;
- }
+ }
else if (!strncmp (argv[i], "-v", 2))
- {
+ {
options->m_verbose_level = atoi(&argv[i][2]);
break;
- }
+ }
/*
* long opt
*/
if (!strcmp (argv[i], "--verbose")) /* no arg */
- {
+ {
options->m_verbose_level = 0;
break;
- }
- else if ( !strncmp (argv[i], "--verbose", 9) && argv[i][9]=='=')
- {
+ }
+ else if ( !strncmp (argv[i], "--verbose", 9) && argv[i][9]=='=')
+ {
options->m_verbose_level = atoi(&argv[i][10]);
break;
}
@@ -154,7 +180,7 @@ void parse_command_line(int argc,
}
/* init */
- exclude_node->obj_path = opt_arg;
+ exclude_node->obj_path = (char*)opt_arg;
exclude_node->obj_type = H5TRAV_TYPE_UNKNOWN;
exclude_prev = exclude_head;
@@ -231,14 +257,13 @@ void parse_command_line(int argc,
}
}
+ /* check options */
+ check_options(options);
+
/* if exclude-path option is used, keep the exclude path list */
if (options->exclude_path)
options->exclude = exclude_head;
- /* if use system epsilon, unset -p and -d option */
- if (options->use_system_epsilon)
- options->d = options->p = 0;
-
/* check for file names to be processed */
if (argc <= opt_ind || argv[ opt_ind + 1 ] == NULL)
{
@@ -297,7 +322,10 @@ void parse_command_line(int argc,
printf("--------------------------------\n");
printf("Some objects are not comparable\n");
printf("--------------------------------\n");
- printf("Use -c for a list of objects.\n");
+ if (options->m_verbose)
+ printf("Use -c for a list of objects without details of differences.\n");
+ else
+ printf("Use -c for a list of objects.\n");
}
@@ -424,97 +452,98 @@ check_d_input( const char *str )
void usage(void)
{
printf("usage: h5diff [OPTIONS] file1 file2 [obj1[ obj2]] \n");
- printf(" file1 File name of the first HDF5 file\n");
- printf(" file2 File name of the second HDF5 file\n");
- printf(" [obj1] Name of an HDF5 object, in absolute path\n");
- printf(" [obj2] Name of an HDF5 object, in absolute path\n");
+ printf(" file1 File name of the first HDF5 file\n");
+ printf(" file2 File name of the second HDF5 file\n");
+ printf(" [obj1] Name of an HDF5 object, in absolute path\n");
+ printf(" [obj2] Name of an HDF5 object, in absolute path\n");
printf("\n");
printf(" OPTIONS\n");
- printf(" -h, --help Print a usage message and exit.\n");
- printf(" -V, --version Print version number and exit.\n");
- printf(" -r, --report Report mode. Print differences.\n");
- printf(" -v --verbose Verbose mode. Print differences information and list\n");
- printf(" of objects.\n");
- printf(" -vN --verbose=N Verbose mode with level. Print differences and list\n");
- printf(" of objects.\n");
- printf(" Level of detail depends on value of N:\n");
- printf(" 0 : Identical to '-v' or '--verbose'.\n");
- printf(" 1 : All level 0 information plus one-line attribute\n");
- printf(" status summary.\n");
- printf(" 2 : All level 1 information plus extended attribute\n");
- printf(" status report.\n");
- printf(" -q, --quiet Quiet mode. Do not produce output.\n");
- printf(" --follow-symlinks Follow symbolic links (soft links and external links)\n");
- printf(" and compare the links' target objects.\n");
- printf(" If symbolic link(s) with the same name exist in the\n");
- printf(" files being compared, then determine whether the \n");
- printf(" target of each link is an existing object (dataset,\n");
- printf(" group, or named datatype) or the link is a dangling\n");
- printf(" link (a soft or external link pointing to a target\n");
- printf(" object that does not yet exist).\n");
- printf(" - If both symbolic links are dangling links, they\n");
- printf(" are treated as being the same; by default, h5diff\n");
- printf(" returns an exit code of 0. If, however, \n");
- printf(" --no-dangling-links is used with --follow-symlinks,\n");
- printf(" this situation is treated as an error and h5diff \n");
- printf(" returns an exit code of 2.\n");
- printf(" - If only one of the two links is a dangling link,\n");
- printf(" they are treated as being different and h5diff \n");
- printf(" returns an exit code of 1. If, however, \n");
- printf(" --no-dangling-links is used with --follow-symlinks,\n");
- printf(" this situation is treated as an error and h5diff \n");
- printf(" returns an exit code of 2.\n");
- printf(" - If both symbolic links point to existing objects,\n");
- printf(" h5diff compares the two objects.\n");
- printf(" If any symbolic link specified in the call to h5diff\n");
- printf(" does not exist, h5diff treats it as an error and\n");
- printf(" returns an exit code of 2.\n");
- printf(" --no-dangling-links Must be used with --follow-symlinks option;\n");
- printf(" otherwise, h5diff shows error message and returns\n");
- printf(" an exit code of 2.\n");
- printf(" Check for any symbolic links (soft links or external\n");
- printf(" links) that do not resolve to an existing object\n");
- printf(" (dataset, group, or named datatype). If any\n");
- printf(" dangling link is found, this situation is treated as\n");
- printf(" an error and h5diff returns an exit code of 2.\n");
- printf(" -c, --compare List objects that are not comparable\n");
- printf(" -N, --nan Avoid NaNs detection\n");
- printf(" -n C, --count=C Print differences up to C number, C is a positive\n");
- printf(" integer.\n");
- printf(" -d D, --delta=D Print difference if (|a-b| > D), D is a positive\n");
- printf(" number.\n");
- printf(" -p R, --relative=R Print difference if (|(a-b)/b| > R), R is a positive\n");
- printf(" number.\n");
- printf(" --use-system-epsilon Print difference if (|a-b| > EPSILON), EPSILON is\n");
- printf(" a system epsilon value.\n");
- printf(" If the system epsilon is not defined, the below\n");
- printf(" one of the following predefined values will be used:\n");
- printf(" FLT_EPSILON = 1.19209E-07 for floating-point type\n");
- printf(" DBL_EPSILON = 2.22045E-16 for double percision type\n");
- printf(" --exclude-path \"path\" Exclude the specified path to an object when\n");
- printf(" comparing files or groups. If a group is excluded,\n");
- printf(" all member objects will also be excluded.\n");
- printf(" The specified path is excluded wherever it occurs.\n");
- printf(" This flexibility enables the same option to exclude\n");
- printf(" either objects that exist only in one file or\n");
- printf(" common objects that are known to differ.\n");
+ printf(" -h, --help\n");
+ printf(" Print a usage message and exit.\n");
+ printf(" -V, --version\n");
+ printf(" Print version number and exit.\n");
+ printf(" -r, --report\n");
+ printf(" Report mode. Print differences.\n");
+ printf(" -v --verbose\n");
+ printf(" Verbose mode. Print differences information and list of objects.\n");
+ printf(" -vN --verbose=N\n");
+ printf(" Verbose mode with level. Print differences and list of objects.\n");
+ printf(" Level of detail depends on value of N:\n");
+ printf(" 0 : Identical to '-v' or '--verbose'.\n");
+ printf(" 1 : All level 0 information plus one-line attribute\n");
+ printf(" status summary.\n");
+ printf(" 2 : All level 1 information plus extended attribute\n");
+ printf(" status report.\n");
+ printf(" -q, --quiet\n");
+ printf(" Quiet mode. Do not produce output.\n");
+ printf(" --follow-symlinks\n");
+ printf(" Follow symbolic links (soft links and external links and compare the)\n");
+ printf(" links' target objects.\n");
+ printf(" If symbolic link(s) with the same name exist in the files being\n");
+ printf(" compared, then determine whether the target of each link is an existing\n");
+ printf(" object (dataset, group, or named datatype) or the link is a dangling\n");
+ printf(" link (a soft or external link pointing to a target object that does\n");
+ printf(" not yet exist).\n");
+ printf(" - If both symbolic links are dangling links, they are treated as being\n");
+ printf(" the same; by default, h5diff returns an exit code of 0.\n");
+ printf(" If, however, --no-dangling-links is used with --follow-symlinks,\n");
+ printf(" this situation is treated as an error and h5diff returns an\n");
+ printf(" exit code of 2.\n");
+ printf(" - If only one of the two links is a dangling link,they are treated as\n");
+ printf(" being different and h5diff returns an exit code of 1.\n");
+ printf(" If, however, --no-dangling-links is used with --follow-symlinks,\n");
+ printf(" this situation is treated as an error and h5diff returns an\n");
+ printf(" exit code of 2.\n");
+ printf(" - If both symbolic links point to existing objects, h5diff compares the\n");
+ printf(" two objects.\n");
+ printf(" If any symbolic link specified in the call to h5diff does not exist,\n");
+ printf(" h5diff treats it as an error and returns an exit code of 2.\n");
+ printf(" --no-dangling-links\n");
+ printf(" Must be used with --follow-symlinks option; otherwise, h5diff shows\n");
+ printf(" error message and returns an exit code of 2.\n");
+ printf(" Check for any symbolic links (soft links or external links) that do not\n");
+ printf(" resolve to an existing object (dataset, group, or named datatype).\n");
+ printf(" If any dangling link is found, this situation is treated as an error\n");
+ printf(" and h5diff returns an exit code of 2.\n");
+ printf(" -c, --compare\n");
+ printf(" List objects that are not comparable\n");
+ printf(" -N, --nan\n");
+ printf(" Avoid NaNs detection\n");
+ printf(" -n C, --count=C\n");
+ printf(" Print differences up to C. C must be a positive integer.\n");
+ printf(" -d D, --delta=D\n");
+ printf(" Print difference if (|a-b| > D). D must be a positive number.\n");
+ printf(" Can not use with '-p' or '--use-system-epsilon'.\n");
+ printf(" -p R, --relative=R\n");
+ printf(" Print difference if (|(a-b)/b| > R). R must be a positive number.\n");
+ printf(" Can not use with '-d' or '--use-system-epsilon'.\n");
+ printf(" --use-system-epsilon\n");
+ printf(" Print difference if (|a-b| > EPSILON), EPSILON is system defined value.\n");
+ printf(" If the system epsilon is not defined,one of the following predefined\n");
+ printf(" values will be used:\n");
+ printf(" FLT_EPSILON = 1.19209E-07 for floating-point type\n");
+ printf(" DBL_EPSILON = 2.22045E-16 for double precision type\n");
+ printf(" Can not use with '-p' or '-d'.\n");
+ printf(" --exclude-path \"path\" \n");
+ printf(" Exclude the specified path to an object when comparing files or groups.\n");
+ printf(" If a group is excluded, all member objects will also be excluded.\n");
+ printf(" The specified path is excluded wherever it occurs.\n");
+ printf(" This flexibility enables the same option to exclude either objects that\n");
+ printf(" exist only in one file or common objects that are known to differ.\n");
printf("\n");
- printf(" When comparing files, \"path\" is the absolute path to\n");
- printf(" the excluded object; when comparing groups, \"path\" is\n");
- printf(" similar to the relative path from the group to the\n");
- printf(" excluded object. This \"path\" can be taken from the\n");
- printf(" first section of the output of the --verbose option.\n");
- printf(" For example, if you are comparing the group /groupA\n");
- printf(" in two files and you want to exclude\n");
- printf(" /groupA/groupB/groupC in both files, the exclude\n");
- printf(" option would read as follows:\n");
- printf(" --exclude-path \"/groupB/groupC\"\n");
+ printf(" When comparing files, \"path\" is the absolute path to the excluded;\n");
+ printf(" object; when comparing groups, \"path\" is similar to the relative\n");
+ printf(" path from the group to the excluded object. This \"path\" can be\n");
+ printf(" taken from the first section of the output of the --verbose option.\n");
+ printf(" For example, if you are comparing the group /groupA in two files and\n");
+ printf(" you want to exclude /groupA/groupB/groupC in both files, the exclude\n");
+ printf(" option would read as follows:\n");
+ printf(" --exclude-path \"/groupB/groupC\"\n");
printf("\n");
- printf(" If there are multiple paths to an object, only the\n");
- printf(" specified path(s) will be excluded; the comparison\n");
- printf(" will include any path not explicitly excluded.\n");
- printf(" This option can be used repeatedly to exclude\n");
- printf(" multiple paths.\n");
+ printf(" If there are multiple paths to an object, only the specified path(s)\n");
+ printf(" will be excluded; the comparison will include any path not explicitly\n");
+ printf(" excluded.\n");
+ printf(" This option can be used repeatedly to exclude multiple paths.\n");
printf("\n");
printf(" Modes of output:\n");
@@ -567,35 +596,3 @@ void usage(void)
printf(" '/g1/dset1' and '/g1/dset2' in the same file\n");
printf("\n");
}
-
-
-/*-------------------------------------------------------------------------
- * Function: h5diff_exit
- *
- * Purpose: dismiss phdiff worker processes and exit
- *
- * Return: none
- *
- * Programmer: Albert Cheng
- * Date: Feb 6, 2005
- *
- * Comments:
- *
- * Modifications:
- *
- *-------------------------------------------------------------------------
- */
-void h5diff_exit(int status)
-{
-#ifdef H5_HAVE_PARALLEL
- /* if in parallel mode, dismiss workers, close down MPI, then exit */
- if((g_nTasks > 1) && g_Parallel) {
- phdiff_dismiss_workers();
- MPI_Barrier(MPI_COMM_WORLD);
- }
- if(g_Parallel)
- MPI_Finalize();
-#endif
- exit(status);
-}
-
diff --git a/tools/h5diff/h5diff_common.h b/tools/h5diff/h5diff_common.h
index 5a601df..5b1317f 100644
--- a/tools/h5diff/h5diff_common.h
+++ b/tools/h5diff/h5diff_common.h
@@ -17,14 +17,13 @@
#define H5DIFFCOMMON_H__
#include "h5tools.h"
+/* Name of tool */
+#define PROGRAMNAME "h5diff"
#ifdef __cplusplus
extern "C" {
#endif
-H5TOOLS_DLLVAR unsigned char g_Parallel;
-H5TOOLS_DLLVAR int g_nTasks;
-
void usage(void);
void parse_command_line(int argc, const char* argv[], const char** fname1, const char** fname2, const char** objname1, const char** objname2, diff_opt_t* options);
void h5diff_exit(int status);
diff --git a/tools/h5diff/h5diff_main.c b/tools/h5diff/h5diff_main.c
index c1538a4..607d58e 100644
--- a/tools/h5diff/h5diff_main.c
+++ b/tools/h5diff/h5diff_main.c
@@ -15,12 +15,12 @@
#include <stdlib.h>
#include <assert.h>
+#include <memory.h>
#include "h5diff.h"
#include "h5diff_common.h"
+#include "h5tools.h"
#include "h5tools_utils.h"
-/* Name of tool */
-#define PROGRAMNAME "h5diff"
/*-------------------------------------------------------------------------
* Function: main
@@ -82,11 +82,14 @@ int main(int argc, const char *argv[])
h5tools_setprogname(PROGRAMNAME);
h5tools_setstatus(EXIT_SUCCESS);
+
+ /* Initialize h5tools lib */
+ h5tools_init();
+
/*-------------------------------------------------------------------------
* process the command-line
*-------------------------------------------------------------------------
*/
-
parse_command_line(argc, argv, &fname1, &fname2, &objname1, &objname2, &options);
/*-------------------------------------------------------------------------
@@ -118,3 +121,24 @@ out:
return ret;
}
+/*-------------------------------------------------------------------------
+ * Function: h5diff_exit
+ *
+ * Purpose: dismiss phdiff worker processes and exit
+ *
+ * Return: none
+ *
+ * Programmer: Albert Cheng
+ * Date: Feb 6, 2005
+ *
+ * Comments:
+ *
+ * Modifications:
+ *
+ *-------------------------------------------------------------------------
+ */
+void h5diff_exit(int status)
+{
+ exit(status);
+}
+
diff --git a/tools/h5diff/h5diffgentest.c b/tools/h5diff/h5diffgentest.c
index da3c5f8..0b5d68f 100644
--- a/tools/h5diff/h5diffgentest.c
+++ b/tools/h5diff/h5diffgentest.c
@@ -17,11 +17,18 @@
#include <stdlib.h>
#include "hdf5.h"
#include "H5private.h"
-#include "h5tools.h"
-
-/* Name of tool */
-#define PROGRAMNAME "h5diffgentest"
+/*
+ * The output functions need a temporary buffer to hold a piece of the
+ * dataset while it's being printed. This constant sets the limit on the
+ * size of that temporary buffer in bytes. For efficiency's sake, choose the
+ * largest value suitable for your machine (for testing use a small value).
+ */
+/* Maximum size used in a call to malloc for a dataset
+ * NOTE: this value should stay in sync with the value defined in the tools
+ * library file: h5tools_utils.h
+ */
+hsize_t H5TOOLS_MALLOCSIZE = (128 * 1024 * 1024);
/*-------------------------------------------------------------------------
* Program: h5diffgentest
@@ -53,8 +60,10 @@
#define FILE16 "h5diff_extlink_trg.h5"
#define FILE17 "h5diff_ext2softlink_src.h5"
#define FILE18 "h5diff_ext2softlink_trg.h5"
-#define FILE19 "h5diff_dset_idx1.h5"
-#define FILE20 "h5diff_dset_idx2.h5"
+#define FILE19 "h5diff_dset_zero_dim_size1.h5"
+#define FILE20 "h5diff_dset_zero_dim_size2.h5"
+#define FILE21 "h5diff_dset_idx1.h5"
+#define FILE22 "h5diff_dset_idx2.h5"
#define DANGLE_LINK_FILE1 "h5diff_danglelinks1.h5"
#define DANGLE_LINK_FILE2 "h5diff_danglelinks2.h5"
#define GRP_RECURSE_FILE1 "h5diff_grp_recurse1.h5"
@@ -75,13 +84,26 @@
/* attribute compre with verbose level */
#define ATTR_VERBOSE_LEVEL_FILE1 "h5diff_attr_v_level1.h5"
#define ATTR_VERBOSE_LEVEL_FILE2 "h5diff_attr_v_level2.h5"
+/* file containing valid/invalid enum value mix */
+#define ENUM_INVALID_VALUES "h5diff_enum_invalid_values.h5"
+/* file with container types (array,vlen) with multiple compounds */
+#define COMPS_COMPLEX1 "compounds_array_vlen1.h5"
+#define COMPS_COMPLEX2 "compounds_array_vlen2.h5"
+/* non-comparable dataset and attribute */
+#define NON_COMPARBLES1 "non_comparables1.h5"
+#define NON_COMPARBLES2 "non_comparables2.h5"
#define UIMAX 4294967295u /*Maximum value for a variable of type unsigned int */
#define STR_SIZE 3
#define GBLL ((unsigned long long) 1024 * 1024 *1024 )
-
#define MY_LINKCLASS 187
+
+/* Dataspace of 0 dimension size */
+#define SPACE1_RANK 2
+#define SPACE1_DIM1 0
+#define SPACE1_DIM2 0
+
/* A UD link traversal function. Shouldn't actually be called. */
static hid_t UD_traverse(UNUSED const char * link_name, UNUSED hid_t cur_group,
UNUSED const void * udata, UNUSED size_t udata_size, UNUSED hid_t lapl_id)
@@ -112,6 +134,7 @@ static int test_types(const char *fname);
static int test_datatypes(const char *fname);
static int test_attributes(const char *fname,int make_diffs);
static int test_datasets(const char *fname,int make_diffs);
+static int test_special_datasets(const char *fname,int make_diffs);
static int test_hyperslab(const char *fname,int make_diffs);
static int test_link_name(const char *fname1);
static int test_soft_links(const char *fname1);
@@ -123,8 +146,14 @@ static int test_group_recurse(const char *fname1, const char *fname2);
static int test_group_recurse2(void);
static int test_exclude_obj1(const char *fname1, const char *fname2);
static int test_exclude_obj2(const char *fname1, const char *fname2);
-static int test_comp_vlen_strings(const char *fname1);
+static int test_comp_vlen_strings(const char *fname1, const char *grp_name, int is_file_new);
static int test_attributes_verbose_level(const char *fname1, const char *fname2);
+static int test_enums(const char *fname);
+static void test_comps_array (const char *fname, const char *dset, const char *attr,int diff, int is_file_new);
+static void test_comps_vlen (const char *fname, const char *dset,const char *attr, int diff, int is_file_new);
+static void test_comps_array_vlen (const char *fname, const char *dset, const char *attr, int diff, int is_file_new);
+static void test_comps_vlen_arry (const char *fname, const char *dset,const char *attr, int diff, int is_file_new);
+static void test_non_comparables (const char *fname, int diff);
/* called by test_attributes() and test_datasets() */
static void write_attr_in(hid_t loc_id,const char* dset_name,hid_t fid,int make_diffs);
@@ -176,14 +205,18 @@ int main(void)
test_ext2soft_links(FILE17, FILE18);
+ /* generate 2 files, the second call creates a similar file with differences */
+ test_special_datasets(FILE19,0);
+ test_special_datasets(FILE20,1);
+
/*
- * Generate 2 files: FILE12 with old format; FILE13 with new format
+ * Generate 2 files: FILE21 with old format; FILE22 with new format
* Create 2 datasets in each file:
* One dataset: chunked layout, w/o filters, fixed dimension
* One dataset: chunked layout, w/ filters, fixed dimension
*/
- gen_dataset_idx(FILE19, 0);
- gen_dataset_idx(FILE20, 1);
+ gen_dataset_idx(FILE21, 0);
+ gen_dataset_idx(FILE22, 1);
test_dangle_links(DANGLE_LINK_FILE1, DANGLE_LINK_FILE2);
@@ -194,7 +227,38 @@ int main(void)
test_exclude_obj2(EXCLUDE_FILE2_1, EXCLUDE_FILE2_2);
/* diff various multiple vlen and fixlen string types in a compound dataset */
- test_comp_vlen_strings(COMP_VL_STRS_FILE );
+ test_comp_vlen_strings(COMP_VL_STRS_FILE, "group", 1);
+ test_comp_vlen_strings(COMP_VL_STRS_FILE, "group_copy", 0);
+
+ /* diff when invalid enum values are present.
+ * This will probably grow to involve more extensive testing of
+ * enums so it has been given its own test file and test (apart
+ * from the basic type testing).
+ */
+ test_enums(ENUM_INVALID_VALUES);
+
+ /* -------------------------------------------------
+ * Create test files with dataset and attribute with container types
+ * (array, vlen) with multiple nested compound types.
+ */
+ /* file1 */
+ test_comps_array(COMPS_COMPLEX1,"dset1", "attr1", 0, 1);
+ test_comps_vlen(COMPS_COMPLEX1,"dset2", "attr2", 0, 0);
+ test_comps_array_vlen(COMPS_COMPLEX1,"dset3", "attr3", 0, 0);
+ test_comps_vlen_arry(COMPS_COMPLEX1,"dset4", "attr4", 0, 0);
+ /* file2 */
+ test_comps_array(COMPS_COMPLEX2,"dset1", "attr1", 5, 1);
+ test_comps_vlen(COMPS_COMPLEX2,"dset2", "attr2",5, 0);
+ test_comps_array_vlen(COMPS_COMPLEX2,"dset3", "attr3", 5, 0);
+ test_comps_vlen_arry(COMPS_COMPLEX2,"dset4", "attr4", 5, 0);
+
+ /*-------------------------------------------------
+ * Create test files with non-comparable dataset and attributes with
+ * comparable datasets and attributes. All the comparables should display
+ * differences.
+ */
+ test_non_comparables(NON_COMPARBLES1,0);
+ test_non_comparables(NON_COMPARBLES2,5);
return 0;
}
@@ -324,7 +388,7 @@ int test_basic(const char *fname1, const char *fname2, const char *fname3)
*-------------------------------------------------------------------------
*/
{
- /* epsilon = 0.0000001 = 1e-7
+ /* epsilon = 0.0000001 = 1e-7
* system epsilon for float : FLT_EPSILON = 1.19209E-07
*/
float data11[3][2] ={{0.000000f,0.0000001f},{0.0000001f, 0.00000022f},{0.0000001f,0.0000001f}};
@@ -405,7 +469,7 @@ int test_basic(const char *fname1, const char *fname2, const char *fname3)
data17[5] = 1;
data18[0] = (float) sqrt( (double)-1 );
- data18[1] = (float) sqrt( (double)-1 );
+ data18[1] = (float) sqrt( (double)-10000 );
data18[2] = 1;
data18[3] = 1;
data18[4] = 1;
@@ -413,6 +477,7 @@ int test_basic(const char *fname1, const char *fname2, const char *fname3)
write_dset(gid1,1,dims1,"fp17",H5T_NATIVE_DOUBLE,data17);
write_dset(gid1,1,dims1,"fp18",H5T_NATIVE_DOUBLE,data18);
+ write_dset(gid1,1,dims1,"fp18_COPY",H5T_NATIVE_DOUBLE,data18);
}
/*------------------------------------------------------------------------
@@ -430,7 +495,9 @@ int test_basic(const char *fname1, const char *fname2, const char *fname3)
data20[3] = data20[4] = data20[5] = -log(0);
write_dset(gid1,1,dims1,"fp19",H5T_NATIVE_FLOAT,data19);
+ write_dset(gid1,1,dims1,"fp19_COPY",H5T_NATIVE_FLOAT,data19);
write_dset(gid1,1,dims1,"fp20",H5T_NATIVE_DOUBLE,data20);
+ write_dset(gid1,1,dims1,"fp20_COPY",H5T_NATIVE_DOUBLE,data20);
}
/*-------------------------------------------------------------------------
@@ -919,14 +986,13 @@ int test_attributes(const char *file,
/*-------------------------------------------------------------------------
* Function: test_attributes_verbose_level
*
-* Purpose: Cresting test files for testing attributes along with
+* Purpose: Cresting test files for testing attributes along with
* levels of verbos option
*
*-------------------------------------------------------------------------
*/
static int test_attributes_verbose_level(const char *fname1, const char *fname2)
{
- int i;
herr_t status = SUCCEED;
hid_t fid1, fid2;
hid_t f1_gid, f2_gid;
@@ -1027,7 +1093,7 @@ static int test_attributes_verbose_level(const char *fname1, const char *fname2)
goto out;
}
-
+
/*----------------------------------------------------------------------
@@ -1108,7 +1174,7 @@ static int test_attributes_verbose_level(const char *fname1, const char *fname2)
/*----------------------------------
* CASE1 - Same attr number, all Same attr name
- * add attr to group
+ * add attr to group
*/
write_attr(f1_gid,1,attr_dims,"integer1",H5T_NATIVE_INT,f1_attr_idata);
write_attr(f1_gid,1,attr_dims,"float1",H5T_NATIVE_FLOAT,f1_attr_fdata);
@@ -1117,8 +1183,8 @@ static int test_attributes_verbose_level(const char *fname1, const char *fname2)
write_attr(f2_gid,1,attr_dims,"float1",H5T_NATIVE_FLOAT,f2_attr_fdata);
/*----------------------------------
- * CASE2 - Same attr number, some Same attr name
- * add attr to dset
+ * CASE2 - Same attr number, some Same attr name
+ * add attr to dset
*/
write_attr(f1_did,1,attr_dims,"integer1",H5T_NATIVE_INT,f1_attr_idata);
write_attr(f1_did,1,attr_dims,"float2",H5T_NATIVE_FLOAT,f1_attr_fdata);
@@ -1127,8 +1193,8 @@ static int test_attributes_verbose_level(const char *fname1, const char *fname2)
write_attr(f2_did,1,attr_dims,"float3",H5T_NATIVE_FLOAT,f2_attr_fdata);
/*----------------------------------
- * CASE3 - Same attr number, all different attr name
- * add attr to ntype
+ * CASE3 - Same attr number, all different attr name
+ * add attr to ntype
*/
write_attr(f1_tid,1,attr_dims,"integer1",H5T_NATIVE_INT,f1_attr_idata);
write_attr(f1_tid,1,attr_dims,"float2",H5T_NATIVE_FLOAT,f1_attr_fdata);
@@ -1148,11 +1214,11 @@ static int test_attributes_verbose_level(const char *fname1, const char *fname2)
write_attr(f2_gid2,1,attr_dims,"integer1",H5T_NATIVE_INT,f2_attr_idata);
write_attr(f2_gid2,1,attr_dims,"float2",H5T_NATIVE_FLOAT,f2_attr_fdata);
-
+
/*----------------------------------
* CASE5 - Different attr number, all different attr name
- * add attr to g3
+ * add attr to g3
*/
write_attr(f1_gid3,1,attr_dims,"integer10",H5T_NATIVE_INT,f1_attr_idata);
write_attr(f1_gid3,1,attr_dims,"float11",H5T_NATIVE_FLOAT,f1_attr_fdata);
@@ -1262,6 +1328,62 @@ int test_datasets(const char *file,
}
/*-------------------------------------------------------------------------
+* Function: test_special_datasets
+*
+* Purpose: Check datasets with datasapce of zero dimension size.
+*-------------------------------------------------------------------------
+*/
+static
+int test_special_datasets(const char *file,
+ int make_diffs /* flag to modify data buffers */)
+{
+ hid_t fid;
+ hid_t did;
+ hid_t sid0, sid;
+ hsize_t dims0[SPACE1_RANK]={SPACE1_DIM1, SPACE1_DIM2};
+ hsize_t dims[SPACE1_RANK]={SPACE1_DIM1, SPACE1_DIM2};
+ herr_t status;
+
+ /* Create a file */
+ if((fid = H5Fcreate(file, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT)) < 0)
+ return -1;
+
+ /* Create a dataset with zero dimension size */
+ sid0 = H5Screate_simple(SPACE1_RANK, dims0, NULL);
+ did = H5Dcreate2(fid, "dset1", H5T_NATIVE_INT, sid0, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
+
+ /* close dataset */
+ status = H5Dclose(did);
+ assert(status >= 0);
+
+ /* close dataspace */
+ status = H5Sclose(sid0);
+ assert(status >= 0);
+
+ /* Create a dataset with zero dimension size in one file but the other one
+ * has a dataset with a non-zero dimension size */
+ if(make_diffs) {
+ dims[1] = SPACE1_DIM2 + 4;
+ }
+
+ sid = H5Screate_simple(SPACE1_RANK, dims, NULL);
+ did = H5Dcreate2(fid, "dset2", H5T_NATIVE_INT, sid, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
+
+ /* close dataspace */
+ status = H5Sclose(sid);
+ assert(status >= 0);
+
+ /* close dataset */
+ status = H5Dclose(did);
+ assert(status >= 0);
+
+ /* close file */
+ status = H5Fclose(fid);
+ assert(status >= 0);
+ return status;
+}
+
+/*-------------------------------------------------------------------------
*
* Purpose: Create test files to compare links, one has longer name than
* the other and short name is subset of long name.
@@ -2670,9 +2792,9 @@ static int test_group_recurse(const char *fname1, const char *fname2)
}
/*------------------------------
- * external circle route test
+ * external circle route test
* file1/grp11 <-> file2/grp10 via elink_grp_circle link
- */
+ */
/* file1 */
status = H5Lcreate_external(fname2, "/grp11", gid10_f1, "elink_grp_circle", H5P_DEFAULT, H5P_DEFAULT);
if (status < 0)
@@ -2717,7 +2839,7 @@ out:
/*-------------------------------------------------------------------------
*
-* Purpose:
+* Purpose:
* For testing comparing group member objects recursively via multiple
* linked external links
*
@@ -2732,18 +2854,15 @@ static int test_group_recurse2(void)
hid_t grp1=0, grp2;
hid_t grp3=0;
hid_t grp4=0;
- hid_t tid;
hid_t dset1, dset2;
hid_t datatype, dataspace; /* handles */
hid_t fileid2;
hid_t fileid3;
hid_t fileid4;
- hid_t fileid4_1;
hsize_t dimsf[2]; /* dataset dimensions */
herr_t status=0;
int data1[4][2] = {{0,0},{1,1},{2,2},{3,3}};
int data2[4][2] = {{0,0},{0,1},{0,2},{3,3}};
- int i, j;
/*-----------------------------------------------------------------------
* FILE 1
@@ -2817,7 +2936,7 @@ static int test_group_recurse2(void)
* datatype and default dataset creation properties.
*/
dset1 = H5Dcreate2(fileid1, GRP_R_DSETNAME1, datatype, dataspace,
- H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
+ H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
/*
* Write the data to the dataset using default transfer properties.
@@ -2833,7 +2952,7 @@ static int test_group_recurse2(void)
* datatype and default dataset creation properties.
*/
dset1 = H5Dcreate2(grp3, GRP_R_DSETNAME1, datatype, dataspace,
- H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
+ H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
/*
* Write the data to the dataset using default transfer properties.
@@ -2848,7 +2967,7 @@ static int test_group_recurse2(void)
* datatype and default dataset creation properties.
*/
dset2 = H5Dcreate2(grp4, GRP_R_DSETNAME2, datatype, dataspace,
- H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
+ H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
/*
* Write the data to the dataset using default transfer properties.
@@ -2885,7 +3004,7 @@ static int test_group_recurse2(void)
fileid4 = H5Fcreate(GRP_RECURSE2_EXT3, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT);
/*-----------------------------------------------
- * Groups
+ * Groups
*/
grp4 = H5Gcreate2(fileid4, "/g4", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
if (grp4 < 0)
@@ -2903,7 +3022,7 @@ static int test_group_recurse2(void)
* datatype and default dataset creation properties.
*/
dset2 = H5Dcreate2(grp4, GRP_R_DSETNAME2, datatype, dataspace,
- H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
+ H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
/*
* Write the data to the dataset using default transfer properties.
@@ -2922,7 +3041,7 @@ static int test_group_recurse2(void)
fileid3 = H5Fcreate(GRP_RECURSE2_EXT2, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT);
/*-----------------------------------------------
- * Groups
+ * Groups
*/
grp2 = H5Gcreate2(fileid3, "g2", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
if (grp2 < 0)
@@ -2948,7 +3067,7 @@ static int test_group_recurse2(void)
* datatype and default dataset creation properties.
*/
dset1 = H5Dcreate2(grp3, GRP_R_DSETNAME1, datatype, dataspace,
- H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
+ H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
/*
* Write the data to the dataset using default transfer properties.
@@ -2978,7 +3097,7 @@ static int test_group_recurse2(void)
fileid2 = H5Fcreate(GRP_RECURSE2_EXT1, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT);
/*-----------------------------------------------
- * Groups
+ * Groups
*/
grp1 = H5Gcreate2(fileid2, "g1", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
if (grp1 < 0)
@@ -2992,7 +3111,7 @@ static int test_group_recurse2(void)
* dset1
*/
dset1 = H5Dcreate2(fileid2, GRP_R_DSETNAME1, datatype, dataspace,
- H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
+ H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
/*
* Write the data to the dataset using default transfer properties.
@@ -3107,7 +3226,7 @@ static int test_exclude_obj1(const char *fname1, const char *fname2)
/*-----------------------------------------------------------------------
- * Datasets
+ * Datasets
*------------------------------------------------------------------------*/
/* file1 */
status = write_dset(fid1,2,dims2,"dset1",H5T_NATIVE_INT,data1);
@@ -3181,7 +3300,7 @@ out:
*
* Purpose: Create test files for excluding obj.
* different structure and name
-* Test : exclude different objs to verify the rest are same
+* Test : exclude different objs to verify the rest are same
*
* Programmer: Jonathan Kim (July, 21, 2010)
*
@@ -3252,7 +3371,7 @@ static int test_exclude_obj2(const char *fname1, const char *fname2)
/*-----------------------------------------------------------------------
- * Datasets
+ * Datasets
*------------------------------------------------------------------------*/
/* file1 */
status = write_dset(fid1,2,dims2,"dset10",H5T_NATIVE_INT,data1);
@@ -3327,7 +3446,7 @@ out:
/*-------------------------------------------------------------------------
*
* Purpose: Create test files for multiple variable length string/string array
-* along with fixed length string/string array types in
+* along with fixed length string/string array types in
* a compound type dataset.
*
* Programmer: Jonathan Kim (Oct, 26, 2010)
@@ -3342,11 +3461,12 @@ out:
#define FIXLEN_STR_ARRY_SIZE 30
#define COMP_RANK 1
#define COMP_DIM 1
-static int test_comp_vlen_strings(const char *fname1)
+static int test_comp_vlen_strings(const char *fname1, const char *grp_name, int is_file_new)
{
int i;
hid_t fid1; /* file id */
+ hid_t gid;
/* compound1 datatype */
typedef struct comp1_t
@@ -3512,8 +3632,8 @@ static int test_comp_vlen_strings(const char *fname1)
/* objref */
hsize_t objref_dims[1]={1};
- /*------------------------------------------
- * compound dataset
+ /*------------------------------------------
+ * compound dataset
*------------------------------------------*/
hid_t sid_comp=0; /* dataspace ID */
hid_t tid1_comp=0; /* datatype ID */
@@ -3637,10 +3757,34 @@ static int test_comp_vlen_strings(const char *fname1)
/*-----------------------------------------------------------------------
* Create file(s)
*------------------------------------------------------------------------*/
- fid1 = H5Fcreate (fname1, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT);
- if (fid1 < 0)
+ if (is_file_new == 1)
{
- fprintf(stderr, "Error: %s> H5Fcreate failed.\n", fname1);
+ fid1 = H5Fcreate (fname1, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT);
+ if (fid1 < 0)
+ {
+ fprintf(stderr, "Error: %s> H5Fcreate failed.\n", fname1);
+ status = FAIL;
+ goto out;
+ }
+ }
+ else
+ {
+ fid1 = H5Fopen (fname1, H5F_ACC_RDWR, H5P_DEFAULT);
+ if (fid1 < 0)
+ {
+ fprintf(stderr, "Error: %s> H5Fopen failed.\n", fname1);
+ status = FAIL;
+ goto out;
+ }
+ }
+
+ /*-----------------------------------------------------------------------
+ * Create group
+ *------------------------------------------------------------------------*/
+ gid = H5Gcreate2(fid1, grp_name, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
+ if (gid < 0)
+ {
+ fprintf(stderr, "Error: %s> H5Gcreate2 failed.\n", fname1);
status = FAIL;
goto out;
}
@@ -3860,7 +4004,7 @@ static int test_comp_vlen_strings(const char *fname1)
/* Write data to compound 1 dataset buffer */
- did_comp = H5Dcreate2(fid1, "Compound_dset1", tid1_comp, sid_comp, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
+ did_comp = H5Dcreate2(gid, "Compound_dset1", tid1_comp, sid_comp, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
status = H5Dwrite(did_comp, tid1_comp, H5S_ALL, H5S_ALL, H5P_DEFAULT, &comp1_buf);
if (status < 0)
{
@@ -3871,89 +4015,89 @@ static int test_comp_vlen_strings(const char *fname1)
H5Dclose(did_comp);
/* Write data to compound 2 dataset buffer */
- did_comp = H5Dcreate2(fid1, "Compound_dset2", tid2_comp, sid_comp, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
+ did_comp = H5Dcreate2(gid, "Compound_dset2", tid2_comp, sid_comp, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
status = H5Dwrite(did_comp, tid2_comp, H5S_ALL, H5S_ALL, H5P_DEFAULT, &comp2_buf);
if (status < 0)
{
fprintf(stderr, "Error: %s> H5Dwrite failed.\n", fname1);
status = FAIL;
goto out;
- }
+ }
H5Dclose(did_comp);
/* Write data to compound 3 dataset buffer */
- did_comp = H5Dcreate2(fid1, "Compound_dset3", tid3_comp, sid_comp, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
+ did_comp = H5Dcreate2(gid, "Compound_dset3", tid3_comp, sid_comp, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
status = H5Dwrite(did_comp, tid3_comp, H5S_ALL, H5S_ALL, H5P_DEFAULT, &comp3_buf);
if (status < 0)
{
fprintf(stderr, "Error: %s> H5Dwrite failed.\n", fname1);
status = FAIL;
goto out;
- }
+ }
H5Dclose(did_comp);
/* Write data to compound 4 dataset buffer */
- did_comp = H5Dcreate2(fid1, "Compound_dset4", tid4_comp, sid_comp, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
+ did_comp = H5Dcreate2(gid, "Compound_dset4", tid4_comp, sid_comp, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
status = H5Dwrite(did_comp, tid4_comp, H5S_ALL, H5S_ALL, H5P_DEFAULT, &comp4_buf);
if (status < 0)
{
fprintf(stderr, "Error: %s> H5Dwrite failed.\n", fname1);
status = FAIL;
goto out;
- }
+ }
H5Dclose(did_comp);
/* Write data to compound 5 dataset buffer */
- did_comp = H5Dcreate2(fid1, "Compound_dset5", tid5_comp, sid_comp, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
+ did_comp = H5Dcreate2(gid, "Compound_dset5", tid5_comp, sid_comp, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
status = H5Dwrite(did_comp, tid5_comp, H5S_ALL, H5S_ALL, H5P_DEFAULT, &comp5_buf);
if (status < 0)
{
fprintf(stderr, "Error: %s> H5Dwrite failed.\n", fname1);
status = FAIL;
goto out;
- }
+ }
H5Dclose(did_comp);
/* Write data to compound 6 dataset buffer */
- did_comp = H5Dcreate2(fid1, "Compound_dset6", tid6_comp, sid_comp, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
+ did_comp = H5Dcreate2(gid, "Compound_dset6", tid6_comp, sid_comp, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
status = H5Dwrite(did_comp, tid6_comp, H5S_ALL, H5S_ALL, H5P_DEFAULT, &comp6_buf);
if (status < 0)
{
fprintf(stderr, "Error: %s> H5Dwrite failed.\n", fname1);
status = FAIL;
goto out;
- }
+ }
H5Dclose(did_comp);
/* Write data to compound 7 dataset buffer */
- did_comp = H5Dcreate2(fid1, "Compound_dset7", tid7_comp, sid_comp, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
+ did_comp = H5Dcreate2(gid, "Compound_dset7", tid7_comp, sid_comp, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
status = H5Dwrite(did_comp, tid7_comp, H5S_ALL, H5S_ALL, H5P_DEFAULT, &comp7_buf);
if (status < 0)
{
fprintf(stderr, "Error: %s> H5Dwrite failed.\n", fname1);
status = FAIL;
goto out;
- }
+ }
H5Dclose(did_comp);
/* Write data to compound 8 dataset buffer */
- did_comp = H5Dcreate2(fid1, "Compound_dset8", tid8_comp, sid_comp, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
+ did_comp = H5Dcreate2(gid, "Compound_dset8", tid8_comp, sid_comp, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
status = H5Dwrite(did_comp, tid8_comp, H5S_ALL, H5S_ALL, H5P_DEFAULT, &comp8_buf);
if (status < 0)
{
fprintf(stderr, "Error: %s> H5Dwrite failed.\n", fname1);
status = FAIL;
goto out;
- }
+ }
H5Dclose(did_comp);
/* Write data to compound 9 dataset buffer */
- did_comp = H5Dcreate2(fid1, "Compound_dset9", tid9_comp, sid_comp, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
+ did_comp = H5Dcreate2(gid, "Compound_dset9", tid9_comp, sid_comp, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
/* obj references */
- status=H5Rcreate(&(comp9_buf.objref1),fid1,"/Compound_dset2",H5R_OBJECT,-1);
- status=H5Rcreate(&(comp9_buf.objref2),fid1,"/Compound_dset3",H5R_OBJECT,-1);
- status=H5Rcreate(&(comp9_buf.objref3),fid1,"/Compound_dset4",H5R_OBJECT,-1);
+ status=H5Rcreate(&(comp9_buf.objref1),gid,"Compound_dset2",H5R_OBJECT,-1);
+ status=H5Rcreate(&(comp9_buf.objref2),gid,"Compound_dset3",H5R_OBJECT,-1);
+ status=H5Rcreate(&(comp9_buf.objref3),gid,"Compound_dset4",H5R_OBJECT,-1);
status = H5Dwrite(did_comp, tid9_comp, H5S_ALL, H5S_ALL, H5P_DEFAULT, &comp9_buf);
if (status < 0)
@@ -3961,7 +4105,7 @@ static int test_comp_vlen_strings(const char *fname1)
fprintf(stderr, "Error: %s> H5Dwrite failed.\n", fname1);
status = FAIL;
goto out;
- }
+ }
H5Dclose(did_comp);
@@ -3973,6 +4117,8 @@ out:
*-----------------------------------------------------------------------*/
if(fid1)
H5Fclose(fid1);
+ if(gid)
+ H5Gclose(gid);
/* vlen string */
if(tid_vlen_str)
H5Tclose(tid_vlen_str);
@@ -4024,6 +4170,836 @@ out:
return status;
}
+
+/*-------------------------------------------------------------------------
+*
+* Purpose: Test diffs of enum values which may include invalid values.
+*
+* Programmer: Dana Robinson
+*
+*-------------------------------------------------------------------------*/
+
+static int
+test_enums(const char *fname)
+{
+ hid_t fid = -1;
+
+ hid_t tid = -1;
+ int enum_val = -1;
+
+ /* The data in the two arrays cover the following cases:
+ *
+ * V = valid enum value, I = invalid enum value
+ *
+ * 0: I-I (same value)
+ * 1: V-I
+ * 2: I-V
+ * 3: V-V (same value)
+ * 4: I-I (different values) SKIPPED FOR NOW
+ * 5: V-V (different values)
+ */
+ /* *** NOTE ***
+ *
+ * There is a bug in H5Dread() where invalid enum values are always
+ * returned as -1 so two different invalid enum values cannot be
+ * properly compared. Test 4 has been adjusted to pass here
+ * while we fix the issue.
+ */
+ int data1[6] = {9, 0, 9, 0, 9, 0};
+ /*int data1[6] = {9, 0, 9, 0, 8, 0}; */
+ int data2[6] = {9, 9, 0, 0, 9, 1};
+
+ hsize_t dims = 6;
+
+ herr_t status = SUCCEED;
+
+ /*-----------------------------------------------------------------------
+ * Create the file
+ *---------------------------------------------------------------------*/
+
+ fid = H5Fcreate(fname, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT);
+
+ /*-----------------------------------------------------------------------
+ * Create enum types
+ *---------------------------------------------------------------------*/
+
+ tid = H5Tenum_create(H5T_NATIVE_INT);
+ enum_val = 0;
+ status = H5Tenum_insert(tid, "YIN", &enum_val);
+ enum_val = 1;
+ status = H5Tenum_insert(tid, "YANG", &enum_val);
+
+ /*-----------------------------------------------------------------------
+ * Create datasets containing enum data.
+ *---------------------------------------------------------------------*/
+
+ status = write_dset(fid, 1, &dims, "dset1", tid, data1);
+ status = write_dset(fid, 1, &dims, "dset2", tid, data2);
+
+out:
+ /*-----------------------------------------------------------------------
+ * Close
+ *---------------------------------------------------------------------*/
+ if(fid)
+ H5Fclose(fid);
+ if(tid)
+ H5Tclose(tid);
+
+ return status;
+}
+
+/*-------------------------------------------------------------------------
+*
+* Purpose:
+* Create test files with dataset and attribute with container types
+* (array, vlen) with multiple nested compound types.
+*
+* Function: test_comps_array()
+* - type: compound->array->compound
+*
+* Function: test_comps_vlen()
+* - type: compound->vlen->compound
+*
+* Function: test_comps_array_vlen()
+* - type: compound->array->compound->vlen->compound
+*
+* Function: test_comps_vlen_arry()
+* - type: compound->vlen->compound->array->compound
+*
+* Programmer: Jonathan Kim (Sep, 1, 2011)
+*
+*-------------------------------------------------------------------------*/
+#define SDIM_DSET 2
+#define SDIM_CMPD_ARRAY 2
+
+static void test_comps_array (const char *fname, const char *dset, const char *attr,int diff, int is_file_new)
+{
+ /* sub compound 2 */
+ typedef struct {
+ int i2;
+ float f2;
+ } cmpd2_t;
+
+ /* top compound 1 */
+ typedef struct {
+ int i1;
+ cmpd2_t cmpd2[SDIM_CMPD_ARRAY];
+ } cmpd1_t;
+
+ cmpd1_t wdata[SDIM_DSET]; /* dataset with compound1 */
+
+ hid_t fid; /* HDF5 File IDs */
+ hid_t did_dset; /* Dataset ID */
+ hid_t sid_dset; /* Dataset space ID */
+ hid_t tid_cmpd1; /* Compound1 type ID */
+ hid_t tid_arry1; /* Array type ID in compound1 */
+ hid_t tid_cmpd2; /* Compound2 type ID */
+ hid_t tid_attr;
+ hsize_t sdims_dset[] = {SDIM_DSET};
+ hsize_t sdims_cmpd_arry[] = {SDIM_CMPD_ARRAY};
+ int i,j;
+ herr_t ret; /* Generic return value */
+
+ /* Initialize array data to write */
+ for(i=0; i < SDIM_DSET; i++)
+ {
+ wdata[i].i1 = i;
+ for(j=0; j < SDIM_CMPD_ARRAY; j++)
+ {
+ wdata[i].cmpd2[j].i2 = i*10 + diff;
+ wdata[i].cmpd2[j].f2 = (float)(i*10.5) + diff;
+ } /* end for */
+ }
+
+ /*-----------------------------------------------------------------------
+ * Create file(s)
+ *------------------------------------------------------------------------*/
+ if (is_file_new == 1)
+ fid = H5Fcreate(fname, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT);
+ else
+ fid = H5Fopen (fname, H5F_ACC_RDWR, H5P_DEFAULT);
+
+
+ /* -------------------------------
+ * Create a sub compound2 datatype */
+ tid_cmpd2 = H5Tcreate(H5T_COMPOUND, sizeof(cmpd2_t));
+
+ /* Insert integer field */
+ ret = H5Tinsert(tid_cmpd2, "int2", HOFFSET(cmpd2_t, i2), H5T_NATIVE_INT);
+ assert(ret >= 0);
+
+ /* Insert float field */
+ ret = H5Tinsert(tid_cmpd2, "float2", HOFFSET(cmpd2_t, f2), H5T_NATIVE_FLOAT);
+ assert(ret >= 0);
+
+ /*-----------------------------------
+ * Create a top compound1.
+ */
+ tid_cmpd1 = H5Tcreate (H5T_COMPOUND, sizeof(cmpd1_t));
+
+ ret = H5Tinsert(tid_cmpd1, "int1", HOFFSET(cmpd1_t, i1), H5T_NATIVE_INT);
+ assert(ret >= 0);
+
+ /* Create an array datatype */
+ tid_arry1 = H5Tarray_create2(tid_cmpd2, 1, sdims_cmpd_arry);
+ /* insert the array */
+ ret = H5Tinsert(tid_cmpd1, "array_cmpd1", HOFFSET(cmpd1_t, cmpd2), tid_arry1);
+ assert(ret >= 0);
+
+
+ /* -------------------
+ * Create a dataset
+ */
+ /* Create dataspace for datasets */
+ sid_dset = H5Screate_simple(1, sdims_dset, NULL);
+
+ did_dset = H5Dcreate2(fid, dset, tid_cmpd1, sid_dset, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
+
+ /* Write dataset to disk */
+ ret = H5Dwrite(did_dset, tid_cmpd1, H5S_ALL, H5S_ALL, H5P_DEFAULT, wdata);
+ assert(ret >= 0);
+
+ /*-----------------------------------
+ * Create an attribute in root group
+ */
+ tid_attr = H5Acreate2(fid, attr, tid_cmpd1, sid_dset, H5P_DEFAULT, H5P_DEFAULT);
+ ret = H5Awrite(tid_attr, tid_cmpd1, wdata);
+ assert(ret >= 0);
+
+ /* ----------------
+ * Close Dataset */
+ ret = H5Aclose(tid_attr);
+ assert(ret >= 0);
+ ret = H5Tclose(tid_arry1);
+ assert(ret >= 0);
+ ret = H5Dclose(did_dset);
+ assert(ret >= 0);
+ ret = H5Tclose(tid_cmpd1);
+ assert(ret >= 0);
+ ret = H5Tclose(tid_cmpd2);
+ assert(ret >= 0);
+ ret = H5Sclose(sid_dset);
+ assert(ret >= 0);
+ ret = H5Fclose(fid);
+ assert(ret >= 0);
+}
+
+
+
+static void test_comps_vlen (const char * fname, const char *dset, const char *attr, int diff, int is_file_new)
+{
+ /* sub compound 2 */
+ typedef struct {
+ int i2;
+ float f2;
+ } cmpd2_t;
+
+ /* top compound 1 */
+ typedef struct {
+ int i1;
+ hvl_t vl; /* VL information for compound2 */
+ } cmpd1_t;
+
+ cmpd1_t wdata[SDIM_DSET]; /* Dataset for compound1 */
+
+ hid_t fid; /* HDF5 File ID */
+ hid_t did_dset; /* dataset ID */
+ hid_t sid_dset; /* dataset space ID */
+ hid_t tid_cmpd2; /* compound2 type ID */
+ hid_t tid_cmpd1; /* compound1 type ID */
+ hid_t tid_cmpd1_vlen;
+ hsize_t sdims_dset[] = {SDIM_DSET};
+
+ unsigned i,j; /* counting variables */
+ herr_t ret; /* Generic return value */
+
+ /* Allocate and initialize VL data to write */
+ for(i=0; i<SDIM_DSET; i++)
+ {
+ wdata[i].i1 = i;
+ wdata[i].vl.p = malloc((i+1)*sizeof(cmpd2_t));
+ wdata[i].vl.len = i+1;
+ for(j=0; j<(i+1); j++)
+ {
+ ((cmpd2_t *)wdata[i].vl.p)[j].i2 = i*10 + diff;
+ ((cmpd2_t *)wdata[i].vl.p)[j].f2 = (float)(i*10.5) + diff;
+ } /* end for */
+ } /* end for */
+
+ /*-----------------------------------------------------------------------
+ * Create file(s)
+ *------------------------------------------------------------------------*/
+ if (is_file_new == 1)
+ fid = H5Fcreate(fname, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT);
+ else
+ fid = H5Fopen (fname, H5F_ACC_RDWR, H5P_DEFAULT);
+
+ /* -----------------------------
+ * Create sub compound2 type */
+ tid_cmpd2 = H5Tcreate(H5T_COMPOUND, sizeof(cmpd2_t));
+
+ /* Insert fields */
+ ret = H5Tinsert(tid_cmpd2, "int2", HOFFSET(cmpd2_t, i2), H5T_NATIVE_INT);
+ assert(ret >= 0);
+ ret = H5Tinsert(tid_cmpd2, "float2", HOFFSET(cmpd2_t, f2), H5T_NATIVE_FLOAT);
+ assert(ret >= 0);
+
+ /* ---------------------------
+ * Create top compound1 type */
+ tid_cmpd1 = H5Tcreate(H5T_COMPOUND, sizeof(cmpd1_t));
+ /* Insert fields */
+ ret = H5Tinsert(tid_cmpd1, "int1", HOFFSET(cmpd1_t, i1), H5T_NATIVE_INT);
+ assert(ret >= 0);
+ /* Create a VL datatype */
+ tid_cmpd1_vlen = H5Tvlen_create(tid_cmpd2);
+
+ ret = H5Tinsert(tid_cmpd1, "vlen_cmpd1", HOFFSET(cmpd1_t, vl), tid_cmpd1_vlen);
+ assert(ret >= 0);
+
+ /* -------------------------------
+ * Create dataset with compound1
+ */
+ /* Create dataspace for dataset */
+ sid_dset = H5Screate_simple(1, sdims_dset, NULL);
+
+ /* Create a dataset */
+ did_dset = H5Dcreate2(fid, dset, tid_cmpd1, sid_dset, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
+
+ /* Write dataset to disk */
+ ret = H5Dwrite(did_dset, tid_cmpd1, H5S_ALL, H5S_ALL, H5P_DEFAULT, wdata);
+ assert(ret >= 0);
+
+ /* Reclaim the write VL data */
+ ret = H5Dvlen_reclaim(tid_cmpd1, sid_dset, H5P_DEFAULT, wdata);
+ assert(ret >= 0);
+
+ /*-----------------------------------
+ * Create an attribute in root group
+ */
+ /* TODO: creating vlen with compound type doesn't work for attribute now.
+ * so add this later when it's fixed
+ tid_attr = H5Acreate2(fid, attr, tid_cmpd1, sid_dset, H5P_DEFAULT, H5P_DEFAULT);
+ ret = H5Awrite(tid_attr, tid_cmpd1, wdata);
+ assert(ret >= 0);
+ */
+
+ /* ----------------
+ * Close IDs */
+ ret = H5Dclose(did_dset);
+ assert(ret >= 0);
+ ret = H5Tclose(tid_cmpd2);
+ assert(ret >= 0);
+ ret = H5Tclose(tid_cmpd1);
+ assert(ret >= 0);
+ ret = H5Sclose(sid_dset);
+ assert(ret >= 0);
+ ret = H5Tclose(tid_cmpd1_vlen);
+ assert(ret >= 0);
+ ret = H5Fclose(fid);
+ assert(ret >= 0);
+}
+
+
+static void test_comps_array_vlen (const char * fname, const char *dset,const char *attr, int diff, int is_file_new)
+{
+ typedef struct {
+ int i3;
+ float f3;
+ } cmpd3_t;
+
+ typedef struct { /* Typedef for compound datatype */
+ int i2;
+ hvl_t vl; /* VL information to write */
+ } cmpd2_t;
+
+ typedef struct {
+ int i1;
+ cmpd2_t cmpd2[SDIM_CMPD_ARRAY];
+ } cmpd1_t;
+
+ cmpd1_t wdata[SDIM_DSET]; /* Information to write */
+ hid_t fid; /* HDF5 File IDs */
+ hid_t did_dset; /* Dataset ID */
+ hid_t sid_dset; /* Dataspace ID */
+ hid_t tid_cmpd1; /* Compound1 Datatype ID */
+ hid_t tid_arry1; /* Array Datatype ID */
+ hid_t tid_cmpd2; /* Compound2 Datatype ID */
+ hid_t tid_cmpd2_vlen;
+ hid_t tid_cmpd3; /* Compound3 Datatype ID */
+ hsize_t sdims_dset[] = {SDIM_DSET};
+ hsize_t sdims_arry[] = {SDIM_CMPD_ARRAY};
+ int i,j,k; /* counting variables */
+ herr_t ret; /* Generic return value */
+
+
+
+ /* Initialize array data to write in compound1 */
+ for(i=0; i < SDIM_DSET; i++)
+ {
+ wdata[i].i1 = i;
+ /* Allocate and initialize VL data to write in compound2 */
+ for(j=0; j < SDIM_CMPD_ARRAY; j++)
+ {
+ wdata[i].cmpd2[j].i2 = j*10;
+ wdata[i].cmpd2[j].vl.p = malloc((j+1)*sizeof(cmpd3_t));
+ wdata[i].cmpd2[j].vl.len = j+1;
+ for(k=0; k<(j+1); k++)
+ {
+ /* Initialize data of compound3 */
+ ((cmpd3_t *)wdata[i].cmpd2[j].vl.p)[k].i3 = j*10 + diff;
+ ((cmpd3_t *)wdata[i].cmpd2[j].vl.p)[k].f3 = (float)(j*10.5) + diff;
+ } /* end for */
+ } /* end for */
+ }
+
+ /*-----------------------------------------------------------------------
+ * Create file(s)
+ *------------------------------------------------------------------------*/
+ if (is_file_new == 1)
+ fid = H5Fcreate(fname, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT);
+ else
+ fid = H5Fopen (fname, H5F_ACC_RDWR, H5P_DEFAULT);
+
+ /* Create dataspace for datasets */
+ sid_dset = H5Screate_simple(1, sdims_dset, NULL);
+
+ /*-------------------------------------
+ * Create a sub compound3 datatype */
+ tid_cmpd3 = H5Tcreate(H5T_COMPOUND, sizeof(cmpd3_t));
+
+ /* Insert integer field */
+ ret = H5Tinsert(tid_cmpd3, "int", HOFFSET(cmpd3_t, i3), H5T_NATIVE_INT);
+ assert(ret >= 0);
+
+ /* Insert float field */
+ ret = H5Tinsert(tid_cmpd3, "float", HOFFSET(cmpd3_t, f3), H5T_NATIVE_FLOAT);
+ assert(ret >= 0);
+
+
+ /*-------------------------------------
+ * Create a sub compound2 datatype */
+ tid_cmpd2 = H5Tcreate(H5T_COMPOUND, sizeof(cmpd2_t));
+
+ /* Insert integer field */
+ ret = H5Tinsert(tid_cmpd2, "int", HOFFSET(cmpd2_t, i2), H5T_NATIVE_INT);
+ assert(ret >= 0);
+ /* Create a VL datatype */
+ tid_cmpd2_vlen = H5Tvlen_create(tid_cmpd3);
+ ret = H5Tinsert(tid_cmpd2, "vlen", HOFFSET(cmpd2_t, vl), tid_cmpd2_vlen);
+ assert(ret >= 0);
+
+
+ /*-----------------------------------
+ * Create a top compound1 datatype for dataset.
+ */
+ tid_cmpd1 = H5Tcreate (H5T_COMPOUND, sizeof(cmpd1_t));
+
+ /* Create an array datatype */
+ tid_arry1 = H5Tarray_create2(tid_cmpd2, 1, sdims_arry);
+ /* insert the array */
+ H5Tinsert(tid_cmpd1, "array_comp", HOFFSET(cmpd1_t, cmpd2), tid_arry1);
+
+
+ /* ----------------------
+ * Create a dataset */
+ did_dset = H5Dcreate2(fid, dset, tid_cmpd1, sid_dset, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
+
+ /* Write dataset to disk */
+ ret = H5Dwrite(did_dset, tid_cmpd1, H5S_ALL, H5S_ALL, H5P_DEFAULT, wdata);
+ assert(ret >= 0);
+
+ /* Reclaim the write VL data */
+ ret = H5Dvlen_reclaim(tid_cmpd1, sid_dset, H5P_DEFAULT, wdata);
+ assert(ret >= 0);
+
+ /*-----------------------------------
+ * Create an attribute in root group
+ */
+ /* TODO: creating vlen with compound type doesn't work for attribute now.
+ * so add this later when it's fixed
+ tid_attr = H5Acreate2(fid, attr, tid_cmpd1, sid_dset, H5P_DEFAULT, H5P_DEFAULT);
+ ret = H5Awrite(tid_attr, tid_cmpd1, wdata);
+ assert(ret >= 0);
+ */
+
+ /*-------------------
+ * Close IDs */
+ ret = H5Tclose(tid_arry1);
+ assert(ret >= 0);
+ ret = H5Dclose(did_dset);
+ assert(ret >= 0);
+ ret = H5Sclose(sid_dset);
+ assert(ret >= 0);
+ ret = H5Tclose(tid_cmpd3);
+ assert(ret >= 0);
+ ret = H5Tclose(tid_cmpd2);
+ assert(ret >= 0);
+ ret = H5Tclose(tid_cmpd2_vlen);
+ assert(ret >= 0);
+ ret = H5Tclose(tid_cmpd1);
+ assert(ret >= 0);
+ ret = H5Fclose(fid);
+ assert(ret >= 0);
+}
+
+
+static void test_comps_vlen_arry (const char * fname, const char *dset, const char *attr, int diff, int is_file_new)
+{
+ /* sub compound 3 */
+ typedef struct {
+ int i3;
+ float f3;
+ } cmpd3_t;
+
+ /* sub compound 2 */
+ typedef struct {
+ int i2;
+ cmpd3_t cmpd3[SDIM_CMPD_ARRAY];
+ } cmpd2_t;
+
+ /* top compound 1 */
+ typedef struct {
+ int i1;
+ hvl_t vl; /* VL information for compound2 */
+ } cmpd1_t;
+
+ cmpd1_t wdata[SDIM_DSET]; /* Dataset for compound1 */
+
+ hid_t fid; /* HDF5 File ID */
+ hid_t did_dset; /* dataset ID */
+ hid_t sid_dset; /* dataset space ID */
+ hid_t tid_cmpd3; /* compound3 type ID */
+ hid_t tid_cmpd2; /* compound2 type ID */
+ hid_t tid_cmpd2_arry;
+ hid_t tid_cmpd1; /* compound1 type ID */
+ hid_t tid_cmpd1_vlen;
+ 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 */
+
+ /* Allocate and initialize VL data to write */
+ for(i=0; i<SDIM_DSET; i++)
+ {
+ /* compound 1 data */
+ wdata[i].i1 = i;
+ wdata[i].vl.p = malloc((i+1)*sizeof(cmpd2_t));
+ wdata[i].vl.len = i+1;
+ for(j=0; j<(i+1); j++)
+ {
+ /* compound2 data */
+ ((cmpd2_t *)wdata[i].vl.p)[j].i2 = i*10 + diff;
+ for (k=0; k < SDIM_CMPD_ARRAY; k++)
+ {
+ /* compound 3 data */
+ ((cmpd2_t *)(wdata[i].vl.p))[j].cmpd3[k].i3 = k*10.5 + diff;
+ ((cmpd2_t *)(wdata[i].vl.p))[j].cmpd3[k].f3 = (float)(k*10.5) + diff;
+ }
+ } /* end for */
+ } /* end for */
+
+ /*-----------------------------------------------------------------------
+ * Create file(s)
+ *------------------------------------------------------------------------*/
+ if (is_file_new == 1)
+ fid = H5Fcreate(fname, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT);
+ else
+ fid = H5Fopen (fname, H5F_ACC_RDWR, H5P_DEFAULT);
+
+ /* -----------------------------
+ * Create sub compound3 type */
+ tid_cmpd3 = H5Tcreate(H5T_COMPOUND, sizeof(cmpd3_t));
+
+ /* Insert fields */
+ ret = H5Tinsert(tid_cmpd3, "int3", HOFFSET(cmpd3_t, i3), H5T_NATIVE_INT);
+ assert(ret >= 0);
+ ret = H5Tinsert(tid_cmpd3, "float3", HOFFSET(cmpd3_t, f3), H5T_NATIVE_FLOAT);
+ assert(ret >= 0);
+
+ /* -----------------------------
+ * Create sub compound2 type */
+ tid_cmpd2 = H5Tcreate(H5T_COMPOUND, sizeof(cmpd2_t));
+
+ ret = H5Tinsert(tid_cmpd2, "int2", HOFFSET(cmpd2_t, i2), H5T_NATIVE_INT);
+ assert(ret >= 0);
+
+ tid_cmpd2_arry = H5Tarray_create2(tid_cmpd3, 1, sdims_cmpd_arry);
+ ret = H5Tinsert(tid_cmpd2, "array_cmpd2", HOFFSET(cmpd2_t, cmpd3), tid_cmpd2_arry);
+ assert(ret >= 0);
+
+ /* ---------------------------
+ * Create top compound1 type
+ */
+ /* Create a VL datatype */
+ tid_cmpd1 = H5Tcreate(H5T_COMPOUND, sizeof(cmpd1_t));
+ /* Insert fields */
+ ret = H5Tinsert(tid_cmpd1, "int1", HOFFSET(cmpd1_t, i1), H5T_NATIVE_INT);
+ assert(ret >= 0);
+ tid_cmpd1_vlen = H5Tvlen_create(tid_cmpd2);
+ ret = H5Tinsert(tid_cmpd1, "vlen_cmpd1", HOFFSET(cmpd1_t, vl), tid_cmpd1_vlen);
+ assert(ret >= 0);
+
+ /* -------------------------------
+ * Create dataset with compound1
+ */
+ /* Create dataspace for dataset */
+ sid_dset = H5Screate_simple(1, sdims_dset, NULL);
+
+ /* Create a dataset */
+ did_dset = H5Dcreate2(fid, dset, tid_cmpd1, sid_dset, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
+
+ /* Write dataset to disk */
+ ret = H5Dwrite(did_dset, tid_cmpd1, H5S_ALL, H5S_ALL, H5P_DEFAULT, wdata);
+ assert(ret >= 0);
+
+ /* Reclaim the write VL data */
+ ret = H5Dvlen_reclaim(tid_cmpd1, sid_dset, H5P_DEFAULT, wdata);
+ assert(ret >= 0);
+
+ /*-----------------------------------
+ * Create an attribute in root group
+ */
+ /* TODO: creating vlen with compound type doesn't work for attribute now.
+ * so add this later when it's fixed
+ tid_attr = H5Acreate2(fid, attr, tid_cmpd1, sid_dset, H5P_DEFAULT, H5P_DEFAULT);
+ ret = H5Awrite(tid_attr, tid_cmpd1, wdata);
+ assert(ret >= 0);
+ */
+
+ /* ----------------
+ * Close IDs */
+ ret = H5Dclose(did_dset);
+ assert(ret >= 0);
+ ret = H5Sclose(sid_dset);
+ assert(ret >= 0);
+ ret = H5Tclose(tid_cmpd3);
+ assert(ret >= 0);
+ ret = H5Tclose(tid_cmpd2_arry);
+ assert(ret >= 0);
+ ret = H5Tclose(tid_cmpd2);
+ assert(ret >= 0);
+ ret = H5Tclose(tid_cmpd1_vlen);
+ assert(ret >= 0);
+ ret = H5Tclose(tid_cmpd1);
+ assert(ret >= 0);
+ ret = H5Fclose(fid);
+ assert(ret >= 0);
+}
+
+
+/*-------------------------------------------------------------------------
+* Function: test_non_comparables
+*
+* Purpose:
+* Create test files with non-comparable dataset and attributes with
+* comparable datasets and attributes. All the comparables should display
+* differences.
+*
+*-------------------------------------------------------------------------*/
+#define DIM_ARRY 3
+static void test_non_comparables (const char * fname, int make_diffs)
+{
+ hid_t fid=0;
+ hid_t gid1=0;
+ hid_t gid2=0;
+ hid_t did1=0;
+ hid_t did2=0;
+ hid_t sid1=0;
+ hid_t tid_dset1=0;
+ hid_t tid_attr1=0;
+ hsize_t dims1_1[1] = {DIM_ARRY};
+ hsize_t dims1_2[1] = {DIM_ARRY+1};
+ hsize_t dims2[2] = {DIM_ARRY, 1};
+ int data1[DIM_ARRY] = {0,0,0};
+ int data2[DIM_ARRY] = {1,1,1};
+ int data3[DIM_ARRY+1] = {1,1,1,1};
+ int data1_dim2[DIM_ARRY][1] = {0,0,0};
+ int rank_attr;
+ char data1_str[DIM_ARRY][STR_SIZE]= {"ab","cd","ef"};
+ herr_t status = SUCCEED;
+ int i;
+ void *dset_data_ptr1=NULL;
+ void *dset_data_ptr2=NULL;
+ void *dset_data_ptr3=NULL;
+ void *attr_data_ptr1=NULL;
+ void *attr_data_ptr2=NULL;
+ void *attr_data_ptr3=NULL;
+ void *attr_data_ptr4=NULL;
+ void *attr2_dim_ptr=NULL;
+ void *attr3_dim_ptr=NULL;
+
+ /* init */
+ tid_dset1=H5Tcopy(H5T_NATIVE_INT);
+ dset_data_ptr1=(int*)&data1;
+ dset_data_ptr2=(int*)&data1;
+ dset_data_ptr3=(int*)&data1;
+ tid_attr1=H5Tcopy(H5T_NATIVE_INT);
+ attr_data_ptr1=(int*)&data1;
+ attr_data_ptr3=(int*)&data1;
+ attr_data_ptr4=(int*)&data1;
+ attr2_dim_ptr=(hsize_t*)&dims1_1;
+ attr3_dim_ptr=(hsize_t*)&dims1_1;
+ rank_attr=1;
+
+ if (make_diffs)
+ {
+ /* ------------
+ * group1 */
+ tid_dset1=H5Tcopy(H5T_C_S1);
+ H5Tset_size(tid_dset1, (size_t)STR_SIZE);
+ dset_data_ptr1=(char*)&data1_str;
+ dset_data_ptr2=(int*)&data2;
+ attr_data_ptr1=(int*)&data2;
+
+ /* -----------
+ * group2
+ */
+ dset_data_ptr3=(int*)&data2;
+ /* dset1/attr1 */
+ tid_attr1=H5Tcopy(H5T_C_S1);
+ H5Tset_size(tid_attr1, (size_t)STR_SIZE);
+ attr_data_ptr2=(char*)&data1_str;
+
+ /* dset1/attr2 */
+ attr2_dim_ptr=(hsize_t*)&dims1_2;
+
+ /* dset1/attr3 */
+ attr_data_ptr3=(int*)&data1_dim2;
+ attr3_dim_ptr=(hsize_t*)&dims2;
+ rank_attr=2;
+
+ /* dset1/attr4 */
+ attr_data_ptr4=(int*)&data2;
+
+ }
+
+
+ /*-----------------------------------------------------------------------
+ * Create file(s)
+ *------------------------------------------------------------------------*/
+ fid = H5Fcreate (fname, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT);
+ if (fid < 0)
+ {
+ fprintf(stderr, "Error: %s> H5Fcreate failed.\n", fname);
+ status = FAIL;
+ goto out;
+ }
+
+ /*-----------------------------------------------------------------------
+ * Groups
+ *------------------------------------------------------------------------*/
+ gid1 = H5Gcreate2(fid, "g1", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
+ if (gid1 < 0)
+ {
+ fprintf(stderr, "Error: %s> H5Gcreate2 failed.\n", fname);
+ status = FAIL;
+ goto out;
+ }
+
+ gid2 = H5Gcreate2(fid, "g2", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
+ if (gid2 < 0)
+ {
+ fprintf(stderr, "Error: %s> H5Gcreate2 failed.\n", fname);
+ status = FAIL;
+ goto out;
+ }
+
+ /*-----------------------------------------------------------------------
+ * Datasets in /g1
+ *------------------------------------------------------------------------*/
+ if((sid1 = H5Screate_simple(1, dims1_1, NULL)) < 0)
+ goto out;
+
+ /* dset1 */
+ if((did1 = H5Dcreate2(gid1, "dset1", tid_dset1, sid1, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0)
+ {
+ fprintf(stderr, "Error: %s> H5Dcreate2 failed.\n", "dset1");
+ status = FAIL;
+ goto out;
+ }
+
+ if(H5Dwrite(did1, tid_dset1, H5S_ALL, H5S_ALL, H5P_DEFAULT, dset_data_ptr1) < 0)
+ {
+ fprintf(stderr, "Error: %s> H5Dwrite failed.\n", "dset1");
+ status = FAIL;
+ goto out;
+ }
+ write_attr(did1,1,dims1_1,"attr", H5T_NATIVE_INT, attr_data_ptr1);
+
+ /* dset2 */
+ status = write_dset(gid1, 1, dims1_1,"dset2", H5T_NATIVE_INT, dset_data_ptr2);
+ if (status == FAIL)
+ {
+ fprintf(stderr, "Error: %s> write_dset failed\n", fname);
+ goto out;
+ }
+
+ /*-----------------------------------------------------------------------
+ * Datasets in /g2
+ *------------------------------------------------------------------------*/
+ /* ---------
+ * dset1 */
+ if((did2 = H5Dcreate2(gid2, "dset1", H5T_NATIVE_INT, sid1, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0)
+ {
+ fprintf(stderr, "Error: %s> H5Dcreate2 failed.\n", "dset1");
+ status = FAIL;
+ goto out;
+ }
+
+ if(H5Dwrite(did2, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, dset_data_ptr3) < 0)
+ {
+ fprintf(stderr, "Error: %s> H5Dwrite failed.\n", "dset1");
+ status = FAIL;
+ goto out;
+ }
+ /* attr1 - non-compatible : different type */
+ write_attr(did2,1,dims1_1,"attr1", tid_attr1, attr_data_ptr2);
+
+
+ /* attr2 - non-compatible : same rank, different dimention */
+ write_attr(did2,1, attr2_dim_ptr,"attr2", H5T_NATIVE_INT, data3);
+
+ /* attr3 - non-compatible : different rank */
+ write_attr(did2, rank_attr,attr3_dim_ptr,"attr3", H5T_NATIVE_INT, attr_data_ptr3);
+
+ /* attr4 - compatible : different data values */
+ write_attr(did2,1,dims1_1,"attr4", H5T_NATIVE_INT, attr_data_ptr4);
+
+ /*----------
+ * dset2 */
+ status = write_dset(gid2, 1, dims1_1,"dset2", H5T_NATIVE_INT, dset_data_ptr3);
+ if (status == FAIL)
+ {
+ fprintf(stderr, "Error: %s> write_dset failed\n", fname);
+ goto out;
+ }
+
+
+
+out:
+
+ /*-----------------------------------------------------------------------
+ * Close IDs
+ *-----------------------------------------------------------------------*/
+ if(fid)
+ H5Fclose(fid);
+ if(gid1)
+ H5Gclose(gid1);
+ if(gid2)
+ H5Gclose(gid2);
+ if(did1)
+ H5Dclose(did1);
+ if(did2)
+ H5Dclose(did2);
+ if(sid1)
+ H5Sclose(sid1);
+ if(tid_dset1)
+ H5Tclose(tid_dset1);
+ if(tid_attr1)
+ H5Tclose(tid_attr1);
+}
+
/*-------------------------------------------------------------------------
* Function: write_attr_in
*
@@ -5323,9 +6299,9 @@ void write_dset_in(hid_t loc_id,
tid = H5Tvlen_create(H5T_NATIVE_INT);
did = H5Dcreate2(loc_id, "vlen", tid, sid, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
status = H5Dwrite(did, tid, H5S_ALL, H5S_ALL, H5P_DEFAULT, buf5);
- assert(status >= 0);
+ HDassert(status >= 0);
status = H5Dvlen_reclaim(tid, sid, H5P_DEFAULT, buf5);
- assert(status >= 0);
+ HDassert(status >= 0);
status = H5Dclose(did);
status = H5Tclose(tid);
status = H5Sclose(sid);
@@ -5361,7 +6337,7 @@ void write_dset_in(hid_t loc_id,
/* allocate and initialize array data to write */
size = ( H5TOOLS_MALLOCSIZE / sizeof(double) + 1 ) * sizeof(double);
- dbuf = malloc( size );
+ dbuf = HDmalloc( size );
for( j = 0; j < H5TOOLS_MALLOCSIZE / sizeof(double) + 1; j++)
dbuf[j] = j;
@@ -5385,7 +6361,7 @@ void write_dset_in(hid_t loc_id,
H5Dclose(did);
H5Tclose(tid);
H5Sclose(sid);
- free( dbuf );
+ HDfree( dbuf );
}
/*-------------------------------------------------------------------------
@@ -5828,10 +6804,10 @@ void gen_datareg(hid_t fid,
int i;
/* allocate the buffer for write the references */
- rbuf = calloc((size_t)2, sizeof(hdset_reg_ref_t));
+ rbuf = HDcalloc((size_t)2, sizeof(hdset_reg_ref_t));
/* allocate the buffer for write the data dataset */
- buf = malloc(10 * 10 * sizeof(int));
+ buf = HDmalloc(10 * 10 * sizeof(int));
for(i = 0; i < 10 * 10; i++)
buf[i] = i;
@@ -5840,7 +6816,7 @@ void gen_datareg(hid_t fid,
sid1 = H5Screate_simple(2, dims1, NULL);
did1 = H5Dcreate2(fid, "dsetref", H5T_NATIVE_INT, sid1, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
status = H5Dwrite(did1, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, buf);
- assert(status >= 0);
+ HDassert(status >= 0);
/* create the reference dataset */
sid2 = H5Screate_simple(1, dims2, NULL);
@@ -5857,12 +6833,12 @@ void gen_datareg(hid_t fid,
}
status = H5Sselect_hyperslab(sid1, H5S_SELECT_SET, start, NULL, count, NULL);
- assert(status >= 0);
+ HDassert(status >= 0);
H5Sget_select_npoints(sid1);
/* store first dataset region */
status = H5Rcreate(&rbuf[0], fid, "dsetref", H5R_DATASET_REGION, sid1);
- assert(status >= 0);
+ HDassert(status >= 0);
/* select sequence of five points for second reference */
coord[0][0]=6; coord[0][1]=9;
@@ -5884,20 +6860,20 @@ void gen_datareg(hid_t fid,
/* write */
status = H5Dwrite(did2,H5T_STD_REF_DSETREG,H5S_ALL,H5S_ALL,H5P_DEFAULT,rbuf);
- assert(status >= 0);
+ HDassert(status >= 0);
/* close, free memory buffers */
status = H5Dclose(did1);
- assert(status >= 0);
+ HDassert(status >= 0);
status = H5Sclose(sid1);
- assert(status >= 0);
+ HDassert(status >= 0);
status = H5Dclose(did2);
- assert(status >= 0);
+ HDassert(status >= 0);
status = H5Sclose(sid2);
- assert(status >= 0);
+ HDassert(status >= 0);
- free(rbuf);
- free(buf);
+ HDfree(rbuf);
+ HDfree(buf);
}
@@ -5977,7 +6953,7 @@ int test_hyperslab(const char *fname,
}
}
- free(buf);
+ HDfree(buf);
buf=NULL;
/* close */
diff --git a/tools/h5diff/ph5diff_main.c b/tools/h5diff/ph5diff_main.c
index bac1086..1fc563b 100644
--- a/tools/h5diff/ph5diff_main.c
+++ b/tools/h5diff/ph5diff_main.c
@@ -19,6 +19,7 @@
#include <string.h>
#include <assert.h>
#include "h5diff_common.h"
+#include "h5tools.h"
#include "h5tools_utils.h"
/* Name of tool */
@@ -68,6 +69,9 @@ int main(int argc, const char *argv[])
h5tools_setprogname(PROGRAMNAME);
h5tools_setstatus(EXIT_SUCCESS);
+ /* Initialize h5tools lib */
+ h5tools_init();
+
outBuffOffset = 0;
g_Parallel = 1;
@@ -136,7 +140,7 @@ int main(int argc, const char *argv[])
static void
ph5diff_worker(int nID)
{
- struct diff_args args;
+ struct diff_mpi_args args;
hid_t file1_id, file2_id;
char filenames[2][MAX_FILENAME];
char out_data[PRINT_DATA_MAX_SIZE] = {0};
@@ -177,7 +181,7 @@ ph5diff_worker(int nID)
/*Recv parameters for diff from manager task */
MPI_Recv(&args, sizeof(args), MPI_BYTE, 0, MPI_TAG_ARGS, MPI_COMM_WORLD, &Status);
/*Do the diff */
- diffs.nfound = diff(file1_id, args.name1, file2_id, args.name2, &(args.options), args.type);
+ diffs.nfound = diff(file1_id, args.name1, file2_id, args.name2, &(args.options), &(args.argdata));
diffs.not_cmp = args.options.not_cmp;
/*If print buffer has something in it, request print token.*/
@@ -245,3 +249,32 @@ ph5diff_worker(int nID)
}
}
+/*-------------------------------------------------------------------------
+ * Function: h5diff_exit
+ *
+ * Purpose: dismiss phdiff worker processes and exit
+ *
+ * Return: none
+ *
+ * Programmer: Albert Cheng
+ * Date: Feb 6, 2005
+ *
+ * Comments:
+ *
+ * Modifications:
+ *
+ *-------------------------------------------------------------------------
+ */
+void h5diff_exit(int status)
+{
+ /* if in parallel mode, dismiss workers, close down MPI, then exit */
+ if((g_nTasks > 1) && g_Parallel) {
+ phdiff_dismiss_workers();
+ MPI_Barrier(MPI_COMM_WORLD);
+ }
+ if(g_Parallel)
+ MPI_Finalize();
+
+ exit(status);
+}
+
diff --git a/tools/h5diff/testfiles/compounds_array_vlen1.h5 b/tools/h5diff/testfiles/compounds_array_vlen1.h5
new file mode 100644
index 0000000..398026c
--- /dev/null
+++ b/tools/h5diff/testfiles/compounds_array_vlen1.h5
Binary files differ
diff --git a/tools/h5diff/testfiles/compounds_array_vlen2.h5 b/tools/h5diff/testfiles/compounds_array_vlen2.h5
new file mode 100644
index 0000000..f6f0868
--- /dev/null
+++ b/tools/h5diff/testfiles/compounds_array_vlen2.h5
Binary files differ
diff --git a/tools/h5diff/testfiles/h5diff_10.txt b/tools/h5diff/testfiles/h5diff_10.txt
index fd13a5c..a699f00 100644
--- a/tools/h5diff/testfiles/h5diff_10.txt
+++ b/tools/h5diff/testfiles/h5diff_10.txt
@@ -1,95 +1,96 @@
usage: h5diff [OPTIONS] file1 file2 [obj1[ obj2]]
- file1 File name of the first HDF5 file
- file2 File name of the second HDF5 file
- [obj1] Name of an HDF5 object, in absolute path
- [obj2] Name of an HDF5 object, in absolute path
+ file1 File name of the first HDF5 file
+ file2 File name of the second HDF5 file
+ [obj1] Name of an HDF5 object, in absolute path
+ [obj2] Name of an HDF5 object, in absolute path
OPTIONS
- -h, --help Print a usage message and exit.
- -V, --version Print version number and exit.
- -r, --report Report mode. Print differences.
- -v --verbose Verbose mode. Print differences information and list
- of objects.
- -vN --verbose=N 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.
- -q, --quiet Quiet mode. Do not produce output.
- --follow-symlinks Follow symbolic links (soft links and external links)
- and compare the links' target objects.
- If symbolic link(s) with the same name exist in the
- files being compared, then determine whether the
- target of each link is an existing object (dataset,
- group, or named datatype) or the link is a dangling
- link (a soft or external link pointing to a target
- object that does not yet exist).
- - If both symbolic links are dangling links, they
- are treated as being the same; by default, h5diff
- returns an exit code of 0. If, however,
- --no-dangling-links is used with --follow-symlinks,
- this situation is treated as an error and h5diff
- returns an exit code of 2.
- - If only one of the two links is a dangling link,
- they are treated as being different and h5diff
- returns an exit code of 1. If, however,
- --no-dangling-links is used with --follow-symlinks,
- this situation is treated as an error and h5diff
- returns an exit code of 2.
- - If both symbolic links point to existing objects,
- h5diff compares the two objects.
- If any symbolic link specified in the call to h5diff
- does not exist, h5diff treats it as an error and
- returns an exit code of 2.
- --no-dangling-links Must be used with --follow-symlinks option;
- otherwise, h5diff shows error message and returns
- an exit code of 2.
- Check for any symbolic links (soft links or external
- links) that do not resolve to an existing object
- (dataset, group, or named datatype). If any
- dangling link is found, this situation is treated as
- an error and h5diff returns an exit code of 2.
- -c, --compare List objects that are not comparable
- -N, --nan Avoid NaNs detection
- -n C, --count=C Print differences up to C number, C is a positive
- integer.
- -d D, --delta=D Print difference if (|a-b| > D), D is a positive
- number.
- -p R, --relative=R Print difference if (|(a-b)/b| > R), R is a positive
- number.
- --use-system-epsilon Print difference if (|a-b| > EPSILON), EPSILON is
- a system epsilon value.
- If the system epsilon is not defined, the below
- one of the following predefined values will be used:
- FLT_EPSILON = 1.19209E-07 for floating-point type
- DBL_EPSILON = 2.22045E-16 for double percision type
- --exclude-path "path" Exclude the specified path to an object when
- comparing files or groups. If a group is excluded,
- all member objects will also be excluded.
- The specified path is excluded wherever it occurs.
- This flexibility enables the same option to exclude
- either objects that exist only in one file or
- common objects that are known to differ.
+ -h, --help
+ Print a usage message and exit.
+ -V, --version
+ Print version number and exit.
+ -r, --report
+ Report mode. Print differences.
+ -v --verbose
+ Verbose mode. Print differences information and list of objects.
+ -vN --verbose=N
+ 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.
+ -q, --quiet
+ Quiet mode. Do not produce output.
+ --follow-symlinks
+ Follow symbolic links (soft links and external links and compare the)
+ links' target objects.
+ If symbolic link(s) with the same name exist in the files being
+ compared, then determine whether the target of each link is an existing
+ object (dataset, group, or named datatype) or the link is a dangling
+ link (a soft or external link pointing to a target object that does
+ not yet exist).
+ - If both symbolic links are dangling links, they are treated as being
+ the same; by default, h5diff returns an exit code of 0.
+ If, however, --no-dangling-links is used with --follow-symlinks,
+ this situation is treated as an error and h5diff returns an
+ exit code of 2.
+ - If only one of the two links is a dangling link,they are treated as
+ being different and h5diff returns an exit code of 1.
+ If, however, --no-dangling-links is used with --follow-symlinks,
+ this situation is treated as an error and h5diff returns an
+ exit code of 2.
+ - If both symbolic links point to existing objects, h5diff compares the
+ two objects.
+ If any symbolic link specified in the call to h5diff does not exist,
+ h5diff treats it as an error and returns an exit code of 2.
+ --no-dangling-links
+ Must be used with --follow-symlinks option; otherwise, h5diff shows
+ error message and returns an exit code of 2.
+ Check for any symbolic links (soft links or external links) that do not
+ resolve to an existing object (dataset, group, or named datatype).
+ If any dangling link is found, this situation is treated as an error
+ and h5diff returns an exit code of 2.
+ -c, --compare
+ List objects that are not comparable
+ -N, --nan
+ Avoid NaNs detection
+ -n C, --count=C
+ Print differences up to C. C must be a positive integer.
+ -d D, --delta=D
+ Print difference if (|a-b| > D). D must be a positive number.
+ Can not use with '-p' or '--use-system-epsilon'.
+ -p R, --relative=R
+ Print difference if (|(a-b)/b| > R). R must be a positive number.
+ Can not use with '-d' or '--use-system-epsilon'.
+ --use-system-epsilon
+ Print difference if (|a-b| > EPSILON), EPSILON is system defined value.
+ If the system epsilon is not defined,one of the following predefined
+ values will be used:
+ FLT_EPSILON = 1.19209E-07 for floating-point type
+ DBL_EPSILON = 2.22045E-16 for double precision type
+ Can not use with '-p' or '-d'.
+ --exclude-path "path"
+ Exclude the specified path to an object when comparing files or groups.
+ If a group is excluded, all member objects will also be excluded.
+ The specified path is excluded wherever it occurs.
+ This flexibility enables the same option to exclude either objects that
+ exist only in one file or common objects that are known to differ.
- When comparing files, "path" is the absolute path to
- the excluded object; when comparing groups, "path" is
- similar to the relative path from the group to the
- excluded object. This "path" can be taken from the
- first section of the output of the --verbose option.
- For example, if you are comparing the group /groupA
- in two files and you want to exclude
- /groupA/groupB/groupC in both files, the exclude
- option would read as follows:
- --exclude-path "/groupB/groupC"
+ When comparing files, "path" is the absolute path to the excluded;
+ object; when comparing groups, "path" is similar to the relative
+ path from the group to the excluded object. This "path" can be
+ taken from the first section of the output of the --verbose option.
+ For example, if you are comparing the group /groupA in two files and
+ you want to exclude /groupA/groupB/groupC in both files, the exclude
+ option would read as follows:
+ --exclude-path "/groupB/groupC"
- 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.
+ 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
diff --git a/tools/h5diff/testfiles/h5diff_17.txt b/tools/h5diff/testfiles/h5diff_17.txt
index 5cb604d..4906a2a 100644
--- a/tools/h5diff/testfiles/h5diff_17.txt
+++ b/tools/h5diff/testfiles/h5diff_17.txt
@@ -22,9 +22,12 @@ file1 file2
x /g1/fp16
x /g1/fp17
x /g1/fp18
+ x /g1/fp18_COPY
x /g1/fp19
+ x /g1/fp19_COPY
x /g1/fp2
x /g1/fp20
+ x /g1/fp20_COPY
x /g1/ld
x /g2
x /g2/dset1
diff --git a/tools/h5diff/testfiles/h5diff_171.txt b/tools/h5diff/testfiles/h5diff_171.txt
index 5314a79..aabe16a 100644
--- a/tools/h5diff/testfiles/h5diff_171.txt
+++ b/tools/h5diff/testfiles/h5diff_171.txt
@@ -1,3 +1,3 @@
-dataset: </g1/fp19> and </g1/fp19>
+dataset: </g1/fp19> and </g1/fp19_COPY>
0 differences found
EXIT CODE: 0
diff --git a/tools/h5diff/testfiles/h5diff_172.txt b/tools/h5diff/testfiles/h5diff_172.txt
index 0269194..852f7b5 100644
--- a/tools/h5diff/testfiles/h5diff_172.txt
+++ b/tools/h5diff/testfiles/h5diff_172.txt
@@ -1,3 +1,3 @@
-dataset: </g1/fp20> and </g1/fp20>
+dataset: </g1/fp20> and </g1/fp20_COPY>
0 differences found
EXIT CODE: 0
diff --git a/tools/h5diff/testfiles/h5diff_20.txt b/tools/h5diff/testfiles/h5diff_20.txt
index 6eba851..3edb543 100644
--- a/tools/h5diff/testfiles/h5diff_20.txt
+++ b/tools/h5diff/testfiles/h5diff_20.txt
@@ -2,5 +2,5 @@
--------------------------------
Some objects are not comparable
--------------------------------
-Use -c for a list of objects.
+Use -c for a list of objects without details of differences.
EXIT CODE: 0
diff --git a/tools/h5diff/testfiles/h5diff_202.txt b/tools/h5diff/testfiles/h5diff_202.txt
index 53657d3..95ef1da 100644
--- a/tools/h5diff/testfiles/h5diff_202.txt
+++ b/tools/h5diff/testfiles/h5diff_202.txt
@@ -1,3 +1,2 @@
Not comparable: </g2/dset2> is of class H5T_FLOAT and </g2/dset3> is of class H5T_INTEGER
-Not comparable: </g2/dset2> has sign H5T_SGN_ERROR and </g2/dset3> has sign H5T_SGN_2
EXIT CODE: 0
diff --git a/tools/h5diff/testfiles/h5diff_205.txt b/tools/h5diff/testfiles/h5diff_205.txt
index d72797b..bf5650f 100644
--- a/tools/h5diff/testfiles/h5diff_205.txt
+++ b/tools/h5diff/testfiles/h5diff_205.txt
@@ -1,4 +1,3 @@
Not comparable: </g2/dset5> has rank 2, dimensions [2x2], max dimensions [2x2]
and </g2/dset6> has rank 2, dimensions [3x2], max dimensions [3x2]
-Not comparable: </g2/dset5> has sign H5T_SGN_2 and </g2/dset6> has sign H5T_SGN_NONE
EXIT CODE: 0
diff --git a/tools/h5diff/testfiles/h5diff_208.txt b/tools/h5diff/testfiles/h5diff_208.txt
new file mode 100644
index 0000000..783be90
--- /dev/null
+++ b/tools/h5diff/testfiles/h5diff_208.txt
@@ -0,0 +1,5 @@
+Not comparable: </dset1> or </dset1> is an empty dataset
+Not comparable: </dset2> or </dset2> is an empty dataset
+Not comparable: </dset2> has rank 2, dimensions [0x0], max dimensions [0x0]
+and </dset2> has rank 2, dimensions [0x4], max dimensions [0x4]
+EXIT CODE: 0
diff --git a/tools/h5diff/testfiles/h5diff_21.txt b/tools/h5diff/testfiles/h5diff_21.txt
index 238c8b8..1479457 100644
--- a/tools/h5diff/testfiles/h5diff_21.txt
+++ b/tools/h5diff/testfiles/h5diff_21.txt
@@ -2,5 +2,5 @@
--------------------------------
Some objects are not comparable
--------------------------------
-Use -c for a list of objects.
+Use -c for a list of objects without details of differences.
EXIT CODE: 0
diff --git a/tools/h5diff/testfiles/h5diff_22.txt b/tools/h5diff/testfiles/h5diff_22.txt
index 33c3a3d..3ccb06b 100644
--- a/tools/h5diff/testfiles/h5diff_22.txt
+++ b/tools/h5diff/testfiles/h5diff_22.txt
@@ -2,5 +2,5 @@
--------------------------------
Some objects are not comparable
--------------------------------
-Use -c for a list of objects.
+Use -c for a list of objects without details of differences.
EXIT CODE: 0
diff --git a/tools/h5diff/testfiles/h5diff_220.txt b/tools/h5diff/testfiles/h5diff_220.txt
new file mode 100644
index 0000000..cadbb6d
--- /dev/null
+++ b/tools/h5diff/testfiles/h5diff_220.txt
@@ -0,0 +1,8 @@
+Not comparable: </g1/dset1> is of class H5T_INTEGER and </g1/dset1> is of class H5T_STRING
+attribute: <attr of </g1/dset1>> and <attr of </g1/dset1>>
+3 differences found
+dataset: </g1/dset1> and </g1/dset1>
+3 differences found
+dataset: </g1/dset2> and </g1/dset2>
+3 differences found
+EXIT CODE: 1
diff --git a/tools/h5diff/testfiles/h5diff_221.txt b/tools/h5diff/testfiles/h5diff_221.txt
new file mode 100644
index 0000000..621f5c3
--- /dev/null
+++ b/tools/h5diff/testfiles/h5diff_221.txt
@@ -0,0 +1,12 @@
+Not comparable: <attr1> is of class H5T_INTEGER and <attr1> is of class H5T_STRING
+Not comparable: <attr2> has rank 1, dimensions [3], max dimensions [3]
+and <attr2> has rank 1, dimensions [4], max dimensions [4]
+Not comparable: <attr3> has rank 1, dimensions [3], max dimensions [3]
+and <attr3> has rank 2, dimensions [3x1], max dimensions [3x1]
+attribute: <attr4 of </g2/dset1>> and <attr4 of </g2/dset1>>
+3 differences found
+dataset: </g2/dset1> and </g2/dset1>
+6 differences found
+dataset: </g2/dset2> and </g2/dset2>
+3 differences found
+EXIT CODE: 1
diff --git a/tools/h5diff/testfiles/h5diff_222.txt b/tools/h5diff/testfiles/h5diff_222.txt
new file mode 100644
index 0000000..bdecb8a
--- /dev/null
+++ b/tools/h5diff/testfiles/h5diff_222.txt
@@ -0,0 +1,19 @@
+Not comparable: </g1/dset1> is of class H5T_INTEGER and </g1/dset1> is of class H5T_STRING
+attribute: <attr of </g1/dset1>> and <attr of </g1/dset1>>
+3 differences found
+dataset: </g1/dset1> and </g1/dset1>
+3 differences found
+dataset: </g1/dset2> and </g1/dset2>
+3 differences found
+Not comparable: <attr1> is of class H5T_INTEGER and <attr1> is of class H5T_STRING
+Not comparable: <attr2> has rank 1, dimensions [3], max dimensions [3]
+and <attr2> has rank 1, dimensions [4], max dimensions [4]
+Not comparable: <attr3> has rank 1, dimensions [3], max dimensions [3]
+and <attr3> has rank 2, dimensions [3x1], max dimensions [3x1]
+attribute: <attr4 of </g2/dset1>> and <attr4 of </g2/dset1>>
+3 differences found
+dataset: </g2/dset1> and </g2/dset1>
+6 differences found
+dataset: </g2/dset2> and </g2/dset2>
+3 differences found
+EXIT CODE: 1
diff --git a/tools/h5diff/testfiles/h5diff_30.txt b/tools/h5diff/testfiles/h5diff_30.txt
new file mode 100644
index 0000000..187589a
--- /dev/null
+++ b/tools/h5diff/testfiles/h5diff_30.txt
@@ -0,0 +1,9 @@
+dataset: </dset1> and </dset2>
+size: [6] [6]
+position dset1 dset2 difference
+------------------------------------------------------------
+[ 1 ] YIN **INVALID VALUE**
+[ 2 ] **INVALID VALUE** YIN
+[ 5 ] YIN YANG
+3 differences found
+EXIT CODE: 1
diff --git a/tools/h5diff/testfiles/h5diff_465.txt b/tools/h5diff/testfiles/h5diff_465.txt
new file mode 100644
index 0000000..eca5994
--- /dev/null
+++ b/tools/h5diff/testfiles/h5diff_465.txt
@@ -0,0 +1 @@
+EXIT CODE: 0
diff --git a/tools/h5diff/testfiles/h5diff_466.txt b/tools/h5diff/testfiles/h5diff_466.txt
new file mode 100644
index 0000000..3e00ca3
--- /dev/null
+++ b/tools/h5diff/testfiles/h5diff_466.txt
@@ -0,0 +1,5 @@
+obj1 </soft_link1> is a dangling link.
+obj2 </soft_link1> is a dangling link.
+dangling link: </soft_link1> and </soft_link1>
+0 differences found
+EXIT CODE: 0
diff --git a/tools/h5diff/testfiles/h5diff_467.txt b/tools/h5diff/testfiles/h5diff_467.txt
new file mode 100644
index 0000000..f5195c0
--- /dev/null
+++ b/tools/h5diff/testfiles/h5diff_467.txt
@@ -0,0 +1,3 @@
+obj2 </soft_link2> is a dangling link.
+1 differences found
+EXIT CODE: 1
diff --git a/tools/h5diff/testfiles/h5diff_468.txt b/tools/h5diff/testfiles/h5diff_468.txt
new file mode 100644
index 0000000..75b16c6
--- /dev/null
+++ b/tools/h5diff/testfiles/h5diff_468.txt
@@ -0,0 +1,5 @@
+obj1 </ext_link4> is a dangling link.
+obj2 </ext_link4> is a dangling link.
+dangling link: </ext_link4> and </ext_link4>
+0 differences found
+EXIT CODE: 0
diff --git a/tools/h5diff/testfiles/h5diff_469.txt b/tools/h5diff/testfiles/h5diff_469.txt
new file mode 100644
index 0000000..594fd80
--- /dev/null
+++ b/tools/h5diff/testfiles/h5diff_469.txt
@@ -0,0 +1,3 @@
+obj2 </ext_link2> is a dangling link.
+1 differences found
+EXIT CODE: 1
diff --git a/tools/h5diff/testfiles/h5diff_505.txt b/tools/h5diff/testfiles/h5diff_505.txt
index 28640b7..a220730 100644
--- a/tools/h5diff/testfiles/h5diff_505.txt
+++ b/tools/h5diff/testfiles/h5diff_505.txt
@@ -2,5 +2,5 @@
--------------------------------
Some objects are not comparable
--------------------------------
-Use -c for a list of objects.
+Use -c for a list of objects without details of differences.
EXIT CODE: 0
diff --git a/tools/h5diff/testfiles/h5diff_507.txt b/tools/h5diff/testfiles/h5diff_507.txt
index ed2b799..6176f3f 100644
--- a/tools/h5diff/testfiles/h5diff_507.txt
+++ b/tools/h5diff/testfiles/h5diff_507.txt
@@ -2,5 +2,5 @@
--------------------------------
Some objects are not comparable
--------------------------------
-Use -c for a list of objects.
+Use -c for a list of objects without details of differences.
EXIT CODE: 0
diff --git a/tools/h5diff/testfiles/h5diff_509.txt b/tools/h5diff/testfiles/h5diff_509.txt
index 145cd9d..a51ab35 100644
--- a/tools/h5diff/testfiles/h5diff_509.txt
+++ b/tools/h5diff/testfiles/h5diff_509.txt
@@ -2,5 +2,5 @@
--------------------------------
Some objects are not comparable
--------------------------------
-Use -c for a list of objects.
+Use -c for a list of objects without details of differences.
EXIT CODE: 0
diff --git a/tools/h5diff/testfiles/h5diff_530.txt b/tools/h5diff/testfiles/h5diff_530.txt
index bd2b435..73d736e 100644
--- a/tools/h5diff/testfiles/h5diff_530.txt
+++ b/tools/h5diff/testfiles/h5diff_530.txt
@@ -1,7 +1,7 @@
-file1 file2
+group1 group2
---------------------------------------
- x x /
+ x x
x x /Compound_dset1
x x /Compound_dset2
x x /Compound_dset3
@@ -12,24 +12,24 @@ file1 file2
x x /Compound_dset8
x x /Compound_dset9
-group : </> and </>
+group : </group> and </group_copy>
0 differences found
-dataset: </Compound_dset1> and </Compound_dset1>
+dataset: </group/Compound_dset1> and </group_copy/Compound_dset1>
0 differences found
-dataset: </Compound_dset2> and </Compound_dset2>
+dataset: </group/Compound_dset2> and </group_copy/Compound_dset2>
0 differences found
-dataset: </Compound_dset3> and </Compound_dset3>
+dataset: </group/Compound_dset3> and </group_copy/Compound_dset3>
0 differences found
-dataset: </Compound_dset4> and </Compound_dset4>
+dataset: </group/Compound_dset4> and </group_copy/Compound_dset4>
0 differences found
-dataset: </Compound_dset5> and </Compound_dset5>
+dataset: </group/Compound_dset5> and </group_copy/Compound_dset5>
0 differences found
-dataset: </Compound_dset6> and </Compound_dset6>
+dataset: </group/Compound_dset6> and </group_copy/Compound_dset6>
0 differences found
-dataset: </Compound_dset7> and </Compound_dset7>
+dataset: </group/Compound_dset7> and </group_copy/Compound_dset7>
0 differences found
-dataset: </Compound_dset8> and </Compound_dset8>
+dataset: </group/Compound_dset8> and </group_copy/Compound_dset8>
0 differences found
-dataset: </Compound_dset9> and </Compound_dset9>
+dataset: </group/Compound_dset9> and </group_copy/Compound_dset9>
0 differences found
EXIT CODE: 0
diff --git a/tools/h5diff/testfiles/h5diff_540.txt b/tools/h5diff/testfiles/h5diff_540.txt
new file mode 100644
index 0000000..a6903c8
--- /dev/null
+++ b/tools/h5diff/testfiles/h5diff_540.txt
@@ -0,0 +1,86 @@
+
+file1 file2
+---------------------------------------
+ x x /
+ x x /dset1
+ x x /dset2
+ x x /dset3
+ x x /dset4
+
+group : </> and </>
+0 differences found
+attribute: <attr1 of </>> and <attr1 of </>>
+size: [2] [2]
+position attr1 of </> attr1 of </> difference
+------------------------------------------------------------
+[ 0 ] 0 5 5
+[ 0 ] 0 5 5
+[ 0 ] 0 5 5
+[ 0 ] 0 5 5
+[ 1 ] 10 15 5
+[ 1 ] 10.5 15.5 5
+[ 1 ] 10 15 5
+[ 1 ] 10.5 15.5 5
+8 differences found
+dataset: </dset1> and </dset1>
+size: [2] [2]
+position dset1 dset1 difference
+------------------------------------------------------------
+[ 0 ] 0 5 5
+[ 0 ] 0 5 5
+[ 0 ] 0 5 5
+[ 0 ] 0 5 5
+[ 1 ] 10 15 5
+[ 1 ] 10.5 15.5 5
+[ 1 ] 10 15 5
+[ 1 ] 10.5 15.5 5
+8 differences found
+dataset: </dset2> and </dset2>
+size: [2] [2]
+position dset2 dset2 difference
+------------------------------------------------------------
+[ 0 ] 0 5 5
+[ 0 ] 0 5 5
+[ 1 ] 10 15 5
+[ 1 ] 10.5 15.5 5
+[ 1 ] 10 15 5
+[ 1 ] 10.5 15.5 5
+6 differences found
+dataset: </dset3> and </dset3>
+size: [2] [2]
+position dset3 dset3 difference
+------------------------------------------------------------
+[ 0 ] 0 5 5
+[ 0 ] 0 5 5
+[ 0 ] 10 15 5
+[ 0 ] 10.5 15.5 5
+[ 0 ] 10 15 5
+[ 0 ] 10.5 15.5 5
+[ 1 ] 0 5 5
+[ 1 ] 0 5 5
+[ 1 ] 10 15 5
+[ 1 ] 10.5 15.5 5
+[ 1 ] 10 15 5
+[ 1 ] 10.5 15.5 5
+12 differences found
+dataset: </dset4> and </dset4>
+size: [2] [2]
+position dset4 dset4 difference
+------------------------------------------------------------
+[ 0 ] 0 5 5
+[ 0 ] 0 5 5
+[ 0 ] 0 5 5
+[ 0 ] 10 15 5
+[ 0 ] 10.5 15.5 5
+[ 1 ] 10 15 5
+[ 1 ] 0 5 5
+[ 1 ] 0 5 5
+[ 1 ] 10 15 5
+[ 1 ] 10.5 15.5 5
+[ 1 ] 10 15 5
+[ 1 ] 0 5 5
+[ 1 ] 0 5 5
+[ 1 ] 10 15 5
+[ 1 ] 10.5 15.5 5
+15 differences found
+EXIT CODE: 1
diff --git a/tools/h5diff/testfiles/h5diff_57.txt b/tools/h5diff/testfiles/h5diff_57.txt
index 61aaa57..d5125fe 100644
--- a/tools/h5diff/testfiles/h5diff_57.txt
+++ b/tools/h5diff/testfiles/h5diff_57.txt
@@ -7,5 +7,5 @@ Not comparable: </dset7a> has sign H5T_SGN_2 and </dset7b> has sign H5T_SGN_NONE
--------------------------------
Some objects are not comparable
--------------------------------
-Use -c for a list of objects.
+Use -c for a list of objects without details of differences.
EXIT CODE: 0
diff --git a/tools/h5diff/testfiles/h5diff_600.txt b/tools/h5diff/testfiles/h5diff_600.txt
index ecf73d8..3c3ad9f 100644
--- a/tools/h5diff/testfiles/h5diff_600.txt
+++ b/tools/h5diff/testfiles/h5diff_600.txt
@@ -1,95 +1,96 @@
usage: h5diff [OPTIONS] file1 file2 [obj1[ obj2]]
- file1 File name of the first HDF5 file
- file2 File name of the second HDF5 file
- [obj1] Name of an HDF5 object, in absolute path
- [obj2] Name of an HDF5 object, in absolute path
+ file1 File name of the first HDF5 file
+ file2 File name of the second HDF5 file
+ [obj1] Name of an HDF5 object, in absolute path
+ [obj2] Name of an HDF5 object, in absolute path
OPTIONS
- -h, --help Print a usage message and exit.
- -V, --version Print version number and exit.
- -r, --report Report mode. Print differences.
- -v --verbose Verbose mode. Print differences information and list
- of objects.
- -vN --verbose=N 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.
- -q, --quiet Quiet mode. Do not produce output.
- --follow-symlinks Follow symbolic links (soft links and external links)
- and compare the links' target objects.
- If symbolic link(s) with the same name exist in the
- files being compared, then determine whether the
- target of each link is an existing object (dataset,
- group, or named datatype) or the link is a dangling
- link (a soft or external link pointing to a target
- object that does not yet exist).
- - If both symbolic links are dangling links, they
- are treated as being the same; by default, h5diff
- returns an exit code of 0. If, however,
- --no-dangling-links is used with --follow-symlinks,
- this situation is treated as an error and h5diff
- returns an exit code of 2.
- - If only one of the two links is a dangling link,
- they are treated as being different and h5diff
- returns an exit code of 1. If, however,
- --no-dangling-links is used with --follow-symlinks,
- this situation is treated as an error and h5diff
- returns an exit code of 2.
- - If both symbolic links point to existing objects,
- h5diff compares the two objects.
- If any symbolic link specified in the call to h5diff
- does not exist, h5diff treats it as an error and
- returns an exit code of 2.
- --no-dangling-links Must be used with --follow-symlinks option;
- otherwise, h5diff shows error message and returns
- an exit code of 2.
- Check for any symbolic links (soft links or external
- links) that do not resolve to an existing object
- (dataset, group, or named datatype). If any
- dangling link is found, this situation is treated as
- an error and h5diff returns an exit code of 2.
- -c, --compare List objects that are not comparable
- -N, --nan Avoid NaNs detection
- -n C, --count=C Print differences up to C number, C is a positive
- integer.
- -d D, --delta=D Print difference if (|a-b| > D), D is a positive
- number.
- -p R, --relative=R Print difference if (|(a-b)/b| > R), R is a positive
- number.
- --use-system-epsilon Print difference if (|a-b| > EPSILON), EPSILON is
- a system epsilon value.
- If the system epsilon is not defined, the below
- one of the following predefined values will be used:
- FLT_EPSILON = 1.19209E-07 for floating-point type
- DBL_EPSILON = 2.22045E-16 for double percision type
- --exclude-path "path" Exclude the specified path to an object when
- comparing files or groups. If a group is excluded,
- all member objects will also be excluded.
- The specified path is excluded wherever it occurs.
- This flexibility enables the same option to exclude
- either objects that exist only in one file or
- common objects that are known to differ.
+ -h, --help
+ Print a usage message and exit.
+ -V, --version
+ Print version number and exit.
+ -r, --report
+ Report mode. Print differences.
+ -v --verbose
+ Verbose mode. Print differences information and list of objects.
+ -vN --verbose=N
+ 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.
+ -q, --quiet
+ Quiet mode. Do not produce output.
+ --follow-symlinks
+ Follow symbolic links (soft links and external links and compare the)
+ links' target objects.
+ If symbolic link(s) with the same name exist in the files being
+ compared, then determine whether the target of each link is an existing
+ object (dataset, group, or named datatype) or the link is a dangling
+ link (a soft or external link pointing to a target object that does
+ not yet exist).
+ - If both symbolic links are dangling links, they are treated as being
+ the same; by default, h5diff returns an exit code of 0.
+ If, however, --no-dangling-links is used with --follow-symlinks,
+ this situation is treated as an error and h5diff returns an
+ exit code of 2.
+ - If only one of the two links is a dangling link,they are treated as
+ being different and h5diff returns an exit code of 1.
+ If, however, --no-dangling-links is used with --follow-symlinks,
+ this situation is treated as an error and h5diff returns an
+ exit code of 2.
+ - If both symbolic links point to existing objects, h5diff compares the
+ two objects.
+ If any symbolic link specified in the call to h5diff does not exist,
+ h5diff treats it as an error and returns an exit code of 2.
+ --no-dangling-links
+ Must be used with --follow-symlinks option; otherwise, h5diff shows
+ error message and returns an exit code of 2.
+ Check for any symbolic links (soft links or external links) that do not
+ resolve to an existing object (dataset, group, or named datatype).
+ If any dangling link is found, this situation is treated as an error
+ and h5diff returns an exit code of 2.
+ -c, --compare
+ List objects that are not comparable
+ -N, --nan
+ Avoid NaNs detection
+ -n C, --count=C
+ Print differences up to C. C must be a positive integer.
+ -d D, --delta=D
+ Print difference if (|a-b| > D). D must be a positive number.
+ Can not use with '-p' or '--use-system-epsilon'.
+ -p R, --relative=R
+ Print difference if (|(a-b)/b| > R). R must be a positive number.
+ Can not use with '-d' or '--use-system-epsilon'.
+ --use-system-epsilon
+ Print difference if (|a-b| > EPSILON), EPSILON is system defined value.
+ If the system epsilon is not defined,one of the following predefined
+ values will be used:
+ FLT_EPSILON = 1.19209E-07 for floating-point type
+ DBL_EPSILON = 2.22045E-16 for double precision type
+ Can not use with '-p' or '-d'.
+ --exclude-path "path"
+ Exclude the specified path to an object when comparing files or groups.
+ If a group is excluded, all member objects will also be excluded.
+ The specified path is excluded wherever it occurs.
+ This flexibility enables the same option to exclude either objects that
+ exist only in one file or common objects that are known to differ.
- When comparing files, "path" is the absolute path to
- the excluded object; when comparing groups, "path" is
- similar to the relative path from the group to the
- excluded object. This "path" can be taken from the
- first section of the output of the --verbose option.
- For example, if you are comparing the group /groupA
- in two files and you want to exclude
- /groupA/groupB/groupC in both files, the exclude
- option would read as follows:
- --exclude-path "/groupB/groupC"
+ When comparing files, "path" is the absolute path to the excluded;
+ object; when comparing groups, "path" is similar to the relative
+ path from the group to the excluded object. This "path" can be
+ taken from the first section of the output of the --verbose option.
+ For example, if you are comparing the group /groupA in two files and
+ you want to exclude /groupA/groupB/groupC in both files, the exclude
+ option would read as follows:
+ --exclude-path "/groupB/groupC"
- 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.
+ 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
diff --git a/tools/h5diff/testfiles/h5diff_603.txt b/tools/h5diff/testfiles/h5diff_603.txt
index 776c468..087764a 100644
--- a/tools/h5diff/testfiles/h5diff_603.txt
+++ b/tools/h5diff/testfiles/h5diff_603.txt
@@ -1,96 +1,97 @@
<-d -4> is not a valid option
usage: h5diff [OPTIONS] file1 file2 [obj1[ obj2]]
- file1 File name of the first HDF5 file
- file2 File name of the second HDF5 file
- [obj1] Name of an HDF5 object, in absolute path
- [obj2] Name of an HDF5 object, in absolute path
+ file1 File name of the first HDF5 file
+ file2 File name of the second HDF5 file
+ [obj1] Name of an HDF5 object, in absolute path
+ [obj2] Name of an HDF5 object, in absolute path
OPTIONS
- -h, --help Print a usage message and exit.
- -V, --version Print version number and exit.
- -r, --report Report mode. Print differences.
- -v --verbose Verbose mode. Print differences information and list
- of objects.
- -vN --verbose=N 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.
- -q, --quiet Quiet mode. Do not produce output.
- --follow-symlinks Follow symbolic links (soft links and external links)
- and compare the links' target objects.
- If symbolic link(s) with the same name exist in the
- files being compared, then determine whether the
- target of each link is an existing object (dataset,
- group, or named datatype) or the link is a dangling
- link (a soft or external link pointing to a target
- object that does not yet exist).
- - If both symbolic links are dangling links, they
- are treated as being the same; by default, h5diff
- returns an exit code of 0. If, however,
- --no-dangling-links is used with --follow-symlinks,
- this situation is treated as an error and h5diff
- returns an exit code of 2.
- - If only one of the two links is a dangling link,
- they are treated as being different and h5diff
- returns an exit code of 1. If, however,
- --no-dangling-links is used with --follow-symlinks,
- this situation is treated as an error and h5diff
- returns an exit code of 2.
- - If both symbolic links point to existing objects,
- h5diff compares the two objects.
- If any symbolic link specified in the call to h5diff
- does not exist, h5diff treats it as an error and
- returns an exit code of 2.
- --no-dangling-links Must be used with --follow-symlinks option;
- otherwise, h5diff shows error message and returns
- an exit code of 2.
- Check for any symbolic links (soft links or external
- links) that do not resolve to an existing object
- (dataset, group, or named datatype). If any
- dangling link is found, this situation is treated as
- an error and h5diff returns an exit code of 2.
- -c, --compare List objects that are not comparable
- -N, --nan Avoid NaNs detection
- -n C, --count=C Print differences up to C number, C is a positive
- integer.
- -d D, --delta=D Print difference if (|a-b| > D), D is a positive
- number.
- -p R, --relative=R Print difference if (|(a-b)/b| > R), R is a positive
- number.
- --use-system-epsilon Print difference if (|a-b| > EPSILON), EPSILON is
- a system epsilon value.
- If the system epsilon is not defined, the below
- one of the following predefined values will be used:
- FLT_EPSILON = 1.19209E-07 for floating-point type
- DBL_EPSILON = 2.22045E-16 for double percision type
- --exclude-path "path" Exclude the specified path to an object when
- comparing files or groups. If a group is excluded,
- all member objects will also be excluded.
- The specified path is excluded wherever it occurs.
- This flexibility enables the same option to exclude
- either objects that exist only in one file or
- common objects that are known to differ.
+ -h, --help
+ Print a usage message and exit.
+ -V, --version
+ Print version number and exit.
+ -r, --report
+ Report mode. Print differences.
+ -v --verbose
+ Verbose mode. Print differences information and list of objects.
+ -vN --verbose=N
+ 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.
+ -q, --quiet
+ Quiet mode. Do not produce output.
+ --follow-symlinks
+ Follow symbolic links (soft links and external links and compare the)
+ links' target objects.
+ If symbolic link(s) with the same name exist in the files being
+ compared, then determine whether the target of each link is an existing
+ object (dataset, group, or named datatype) or the link is a dangling
+ link (a soft or external link pointing to a target object that does
+ not yet exist).
+ - If both symbolic links are dangling links, they are treated as being
+ the same; by default, h5diff returns an exit code of 0.
+ If, however, --no-dangling-links is used with --follow-symlinks,
+ this situation is treated as an error and h5diff returns an
+ exit code of 2.
+ - If only one of the two links is a dangling link,they are treated as
+ being different and h5diff returns an exit code of 1.
+ If, however, --no-dangling-links is used with --follow-symlinks,
+ this situation is treated as an error and h5diff returns an
+ exit code of 2.
+ - If both symbolic links point to existing objects, h5diff compares the
+ two objects.
+ If any symbolic link specified in the call to h5diff does not exist,
+ h5diff treats it as an error and returns an exit code of 2.
+ --no-dangling-links
+ Must be used with --follow-symlinks option; otherwise, h5diff shows
+ error message and returns an exit code of 2.
+ Check for any symbolic links (soft links or external links) that do not
+ resolve to an existing object (dataset, group, or named datatype).
+ If any dangling link is found, this situation is treated as an error
+ and h5diff returns an exit code of 2.
+ -c, --compare
+ List objects that are not comparable
+ -N, --nan
+ Avoid NaNs detection
+ -n C, --count=C
+ Print differences up to C. C must be a positive integer.
+ -d D, --delta=D
+ Print difference if (|a-b| > D). D must be a positive number.
+ Can not use with '-p' or '--use-system-epsilon'.
+ -p R, --relative=R
+ Print difference if (|(a-b)/b| > R). R must be a positive number.
+ Can not use with '-d' or '--use-system-epsilon'.
+ --use-system-epsilon
+ Print difference if (|a-b| > EPSILON), EPSILON is system defined value.
+ If the system epsilon is not defined,one of the following predefined
+ values will be used:
+ FLT_EPSILON = 1.19209E-07 for floating-point type
+ DBL_EPSILON = 2.22045E-16 for double precision type
+ Can not use with '-p' or '-d'.
+ --exclude-path "path"
+ Exclude the specified path to an object when comparing files or groups.
+ If a group is excluded, all member objects will also be excluded.
+ The specified path is excluded wherever it occurs.
+ This flexibility enables the same option to exclude either objects that
+ exist only in one file or common objects that are known to differ.
- When comparing files, "path" is the absolute path to
- the excluded object; when comparing groups, "path" is
- similar to the relative path from the group to the
- excluded object. This "path" can be taken from the
- first section of the output of the --verbose option.
- For example, if you are comparing the group /groupA
- in two files and you want to exclude
- /groupA/groupB/groupC in both files, the exclude
- option would read as follows:
- --exclude-path "/groupB/groupC"
+ When comparing files, "path" is the absolute path to the excluded;
+ object; when comparing groups, "path" is similar to the relative
+ path from the group to the excluded object. This "path" can be
+ taken from the first section of the output of the --verbose option.
+ For example, if you are comparing the group /groupA in two files and
+ you want to exclude /groupA/groupB/groupC in both files, the exclude
+ option would read as follows:
+ --exclude-path "/groupB/groupC"
- 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.
+ 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
diff --git a/tools/h5diff/testfiles/h5diff_606.txt b/tools/h5diff/testfiles/h5diff_606.txt
index 762698d..c31a67e 100644
--- a/tools/h5diff/testfiles/h5diff_606.txt
+++ b/tools/h5diff/testfiles/h5diff_606.txt
@@ -1,96 +1,97 @@
<-d 0x1> is not a valid option
usage: h5diff [OPTIONS] file1 file2 [obj1[ obj2]]
- file1 File name of the first HDF5 file
- file2 File name of the second HDF5 file
- [obj1] Name of an HDF5 object, in absolute path
- [obj2] Name of an HDF5 object, in absolute path
+ file1 File name of the first HDF5 file
+ file2 File name of the second HDF5 file
+ [obj1] Name of an HDF5 object, in absolute path
+ [obj2] Name of an HDF5 object, in absolute path
OPTIONS
- -h, --help Print a usage message and exit.
- -V, --version Print version number and exit.
- -r, --report Report mode. Print differences.
- -v --verbose Verbose mode. Print differences information and list
- of objects.
- -vN --verbose=N 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.
- -q, --quiet Quiet mode. Do not produce output.
- --follow-symlinks Follow symbolic links (soft links and external links)
- and compare the links' target objects.
- If symbolic link(s) with the same name exist in the
- files being compared, then determine whether the
- target of each link is an existing object (dataset,
- group, or named datatype) or the link is a dangling
- link (a soft or external link pointing to a target
- object that does not yet exist).
- - If both symbolic links are dangling links, they
- are treated as being the same; by default, h5diff
- returns an exit code of 0. If, however,
- --no-dangling-links is used with --follow-symlinks,
- this situation is treated as an error and h5diff
- returns an exit code of 2.
- - If only one of the two links is a dangling link,
- they are treated as being different and h5diff
- returns an exit code of 1. If, however,
- --no-dangling-links is used with --follow-symlinks,
- this situation is treated as an error and h5diff
- returns an exit code of 2.
- - If both symbolic links point to existing objects,
- h5diff compares the two objects.
- If any symbolic link specified in the call to h5diff
- does not exist, h5diff treats it as an error and
- returns an exit code of 2.
- --no-dangling-links Must be used with --follow-symlinks option;
- otherwise, h5diff shows error message and returns
- an exit code of 2.
- Check for any symbolic links (soft links or external
- links) that do not resolve to an existing object
- (dataset, group, or named datatype). If any
- dangling link is found, this situation is treated as
- an error and h5diff returns an exit code of 2.
- -c, --compare List objects that are not comparable
- -N, --nan Avoid NaNs detection
- -n C, --count=C Print differences up to C number, C is a positive
- integer.
- -d D, --delta=D Print difference if (|a-b| > D), D is a positive
- number.
- -p R, --relative=R Print difference if (|(a-b)/b| > R), R is a positive
- number.
- --use-system-epsilon Print difference if (|a-b| > EPSILON), EPSILON is
- a system epsilon value.
- If the system epsilon is not defined, the below
- one of the following predefined values will be used:
- FLT_EPSILON = 1.19209E-07 for floating-point type
- DBL_EPSILON = 2.22045E-16 for double percision type
- --exclude-path "path" Exclude the specified path to an object when
- comparing files or groups. If a group is excluded,
- all member objects will also be excluded.
- The specified path is excluded wherever it occurs.
- This flexibility enables the same option to exclude
- either objects that exist only in one file or
- common objects that are known to differ.
+ -h, --help
+ Print a usage message and exit.
+ -V, --version
+ Print version number and exit.
+ -r, --report
+ Report mode. Print differences.
+ -v --verbose
+ Verbose mode. Print differences information and list of objects.
+ -vN --verbose=N
+ 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.
+ -q, --quiet
+ Quiet mode. Do not produce output.
+ --follow-symlinks
+ Follow symbolic links (soft links and external links and compare the)
+ links' target objects.
+ If symbolic link(s) with the same name exist in the files being
+ compared, then determine whether the target of each link is an existing
+ object (dataset, group, or named datatype) or the link is a dangling
+ link (a soft or external link pointing to a target object that does
+ not yet exist).
+ - If both symbolic links are dangling links, they are treated as being
+ the same; by default, h5diff returns an exit code of 0.
+ If, however, --no-dangling-links is used with --follow-symlinks,
+ this situation is treated as an error and h5diff returns an
+ exit code of 2.
+ - If only one of the two links is a dangling link,they are treated as
+ being different and h5diff returns an exit code of 1.
+ If, however, --no-dangling-links is used with --follow-symlinks,
+ this situation is treated as an error and h5diff returns an
+ exit code of 2.
+ - If both symbolic links point to existing objects, h5diff compares the
+ two objects.
+ If any symbolic link specified in the call to h5diff does not exist,
+ h5diff treats it as an error and returns an exit code of 2.
+ --no-dangling-links
+ Must be used with --follow-symlinks option; otherwise, h5diff shows
+ error message and returns an exit code of 2.
+ Check for any symbolic links (soft links or external links) that do not
+ resolve to an existing object (dataset, group, or named datatype).
+ If any dangling link is found, this situation is treated as an error
+ and h5diff returns an exit code of 2.
+ -c, --compare
+ List objects that are not comparable
+ -N, --nan
+ Avoid NaNs detection
+ -n C, --count=C
+ Print differences up to C. C must be a positive integer.
+ -d D, --delta=D
+ Print difference if (|a-b| > D). D must be a positive number.
+ Can not use with '-p' or '--use-system-epsilon'.
+ -p R, --relative=R
+ Print difference if (|(a-b)/b| > R). R must be a positive number.
+ Can not use with '-d' or '--use-system-epsilon'.
+ --use-system-epsilon
+ Print difference if (|a-b| > EPSILON), EPSILON is system defined value.
+ If the system epsilon is not defined,one of the following predefined
+ values will be used:
+ FLT_EPSILON = 1.19209E-07 for floating-point type
+ DBL_EPSILON = 2.22045E-16 for double precision type
+ Can not use with '-p' or '-d'.
+ --exclude-path "path"
+ Exclude the specified path to an object when comparing files or groups.
+ If a group is excluded, all member objects will also be excluded.
+ The specified path is excluded wherever it occurs.
+ This flexibility enables the same option to exclude either objects that
+ exist only in one file or common objects that are known to differ.
- When comparing files, "path" is the absolute path to
- the excluded object; when comparing groups, "path" is
- similar to the relative path from the group to the
- excluded object. This "path" can be taken from the
- first section of the output of the --verbose option.
- For example, if you are comparing the group /groupA
- in two files and you want to exclude
- /groupA/groupB/groupC in both files, the exclude
- option would read as follows:
- --exclude-path "/groupB/groupC"
+ When comparing files, "path" is the absolute path to the excluded;
+ object; when comparing groups, "path" is similar to the relative
+ path from the group to the excluded object. This "path" can be
+ taken from the first section of the output of the --verbose option.
+ For example, if you are comparing the group /groupA in two files and
+ you want to exclude /groupA/groupB/groupC in both files, the exclude
+ option would read as follows:
+ --exclude-path "/groupB/groupC"
- 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.
+ 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
diff --git a/tools/h5diff/testfiles/h5diff_612.txt b/tools/h5diff/testfiles/h5diff_612.txt
index c5b3464..05318bd 100644
--- a/tools/h5diff/testfiles/h5diff_612.txt
+++ b/tools/h5diff/testfiles/h5diff_612.txt
@@ -1,96 +1,97 @@
<-p -4> is not a valid option
usage: h5diff [OPTIONS] file1 file2 [obj1[ obj2]]
- file1 File name of the first HDF5 file
- file2 File name of the second HDF5 file
- [obj1] Name of an HDF5 object, in absolute path
- [obj2] Name of an HDF5 object, in absolute path
+ file1 File name of the first HDF5 file
+ file2 File name of the second HDF5 file
+ [obj1] Name of an HDF5 object, in absolute path
+ [obj2] Name of an HDF5 object, in absolute path
OPTIONS
- -h, --help Print a usage message and exit.
- -V, --version Print version number and exit.
- -r, --report Report mode. Print differences.
- -v --verbose Verbose mode. Print differences information and list
- of objects.
- -vN --verbose=N 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.
- -q, --quiet Quiet mode. Do not produce output.
- --follow-symlinks Follow symbolic links (soft links and external links)
- and compare the links' target objects.
- If symbolic link(s) with the same name exist in the
- files being compared, then determine whether the
- target of each link is an existing object (dataset,
- group, or named datatype) or the link is a dangling
- link (a soft or external link pointing to a target
- object that does not yet exist).
- - If both symbolic links are dangling links, they
- are treated as being the same; by default, h5diff
- returns an exit code of 0. If, however,
- --no-dangling-links is used with --follow-symlinks,
- this situation is treated as an error and h5diff
- returns an exit code of 2.
- - If only one of the two links is a dangling link,
- they are treated as being different and h5diff
- returns an exit code of 1. If, however,
- --no-dangling-links is used with --follow-symlinks,
- this situation is treated as an error and h5diff
- returns an exit code of 2.
- - If both symbolic links point to existing objects,
- h5diff compares the two objects.
- If any symbolic link specified in the call to h5diff
- does not exist, h5diff treats it as an error and
- returns an exit code of 2.
- --no-dangling-links Must be used with --follow-symlinks option;
- otherwise, h5diff shows error message and returns
- an exit code of 2.
- Check for any symbolic links (soft links or external
- links) that do not resolve to an existing object
- (dataset, group, or named datatype). If any
- dangling link is found, this situation is treated as
- an error and h5diff returns an exit code of 2.
- -c, --compare List objects that are not comparable
- -N, --nan Avoid NaNs detection
- -n C, --count=C Print differences up to C number, C is a positive
- integer.
- -d D, --delta=D Print difference if (|a-b| > D), D is a positive
- number.
- -p R, --relative=R Print difference if (|(a-b)/b| > R), R is a positive
- number.
- --use-system-epsilon Print difference if (|a-b| > EPSILON), EPSILON is
- a system epsilon value.
- If the system epsilon is not defined, the below
- one of the following predefined values will be used:
- FLT_EPSILON = 1.19209E-07 for floating-point type
- DBL_EPSILON = 2.22045E-16 for double percision type
- --exclude-path "path" Exclude the specified path to an object when
- comparing files or groups. If a group is excluded,
- all member objects will also be excluded.
- The specified path is excluded wherever it occurs.
- This flexibility enables the same option to exclude
- either objects that exist only in one file or
- common objects that are known to differ.
+ -h, --help
+ Print a usage message and exit.
+ -V, --version
+ Print version number and exit.
+ -r, --report
+ Report mode. Print differences.
+ -v --verbose
+ Verbose mode. Print differences information and list of objects.
+ -vN --verbose=N
+ 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.
+ -q, --quiet
+ Quiet mode. Do not produce output.
+ --follow-symlinks
+ Follow symbolic links (soft links and external links and compare the)
+ links' target objects.
+ If symbolic link(s) with the same name exist in the files being
+ compared, then determine whether the target of each link is an existing
+ object (dataset, group, or named datatype) or the link is a dangling
+ link (a soft or external link pointing to a target object that does
+ not yet exist).
+ - If both symbolic links are dangling links, they are treated as being
+ the same; by default, h5diff returns an exit code of 0.
+ If, however, --no-dangling-links is used with --follow-symlinks,
+ this situation is treated as an error and h5diff returns an
+ exit code of 2.
+ - If only one of the two links is a dangling link,they are treated as
+ being different and h5diff returns an exit code of 1.
+ If, however, --no-dangling-links is used with --follow-symlinks,
+ this situation is treated as an error and h5diff returns an
+ exit code of 2.
+ - If both symbolic links point to existing objects, h5diff compares the
+ two objects.
+ If any symbolic link specified in the call to h5diff does not exist,
+ h5diff treats it as an error and returns an exit code of 2.
+ --no-dangling-links
+ Must be used with --follow-symlinks option; otherwise, h5diff shows
+ error message and returns an exit code of 2.
+ Check for any symbolic links (soft links or external links) that do not
+ resolve to an existing object (dataset, group, or named datatype).
+ If any dangling link is found, this situation is treated as an error
+ and h5diff returns an exit code of 2.
+ -c, --compare
+ List objects that are not comparable
+ -N, --nan
+ Avoid NaNs detection
+ -n C, --count=C
+ Print differences up to C. C must be a positive integer.
+ -d D, --delta=D
+ Print difference if (|a-b| > D). D must be a positive number.
+ Can not use with '-p' or '--use-system-epsilon'.
+ -p R, --relative=R
+ Print difference if (|(a-b)/b| > R). R must be a positive number.
+ Can not use with '-d' or '--use-system-epsilon'.
+ --use-system-epsilon
+ Print difference if (|a-b| > EPSILON), EPSILON is system defined value.
+ If the system epsilon is not defined,one of the following predefined
+ values will be used:
+ FLT_EPSILON = 1.19209E-07 for floating-point type
+ DBL_EPSILON = 2.22045E-16 for double precision type
+ Can not use with '-p' or '-d'.
+ --exclude-path "path"
+ Exclude the specified path to an object when comparing files or groups.
+ If a group is excluded, all member objects will also be excluded.
+ The specified path is excluded wherever it occurs.
+ This flexibility enables the same option to exclude either objects that
+ exist only in one file or common objects that are known to differ.
- When comparing files, "path" is the absolute path to
- the excluded object; when comparing groups, "path" is
- similar to the relative path from the group to the
- excluded object. This "path" can be taken from the
- first section of the output of the --verbose option.
- For example, if you are comparing the group /groupA
- in two files and you want to exclude
- /groupA/groupB/groupC in both files, the exclude
- option would read as follows:
- --exclude-path "/groupB/groupC"
+ When comparing files, "path" is the absolute path to the excluded;
+ object; when comparing groups, "path" is similar to the relative
+ path from the group to the excluded object. This "path" can be
+ taken from the first section of the output of the --verbose option.
+ For example, if you are comparing the group /groupA in two files and
+ you want to exclude /groupA/groupB/groupC in both files, the exclude
+ option would read as follows:
+ --exclude-path "/groupB/groupC"
- 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.
+ 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
diff --git a/tools/h5diff/testfiles/h5diff_615.txt b/tools/h5diff/testfiles/h5diff_615.txt
index 58d5c70..fd756b3 100644
--- a/tools/h5diff/testfiles/h5diff_615.txt
+++ b/tools/h5diff/testfiles/h5diff_615.txt
@@ -1,96 +1,97 @@
<-p 0x1> is not a valid option
usage: h5diff [OPTIONS] file1 file2 [obj1[ obj2]]
- file1 File name of the first HDF5 file
- file2 File name of the second HDF5 file
- [obj1] Name of an HDF5 object, in absolute path
- [obj2] Name of an HDF5 object, in absolute path
+ file1 File name of the first HDF5 file
+ file2 File name of the second HDF5 file
+ [obj1] Name of an HDF5 object, in absolute path
+ [obj2] Name of an HDF5 object, in absolute path
OPTIONS
- -h, --help Print a usage message and exit.
- -V, --version Print version number and exit.
- -r, --report Report mode. Print differences.
- -v --verbose Verbose mode. Print differences information and list
- of objects.
- -vN --verbose=N 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.
- -q, --quiet Quiet mode. Do not produce output.
- --follow-symlinks Follow symbolic links (soft links and external links)
- and compare the links' target objects.
- If symbolic link(s) with the same name exist in the
- files being compared, then determine whether the
- target of each link is an existing object (dataset,
- group, or named datatype) or the link is a dangling
- link (a soft or external link pointing to a target
- object that does not yet exist).
- - If both symbolic links are dangling links, they
- are treated as being the same; by default, h5diff
- returns an exit code of 0. If, however,
- --no-dangling-links is used with --follow-symlinks,
- this situation is treated as an error and h5diff
- returns an exit code of 2.
- - If only one of the two links is a dangling link,
- they are treated as being different and h5diff
- returns an exit code of 1. If, however,
- --no-dangling-links is used with --follow-symlinks,
- this situation is treated as an error and h5diff
- returns an exit code of 2.
- - If both symbolic links point to existing objects,
- h5diff compares the two objects.
- If any symbolic link specified in the call to h5diff
- does not exist, h5diff treats it as an error and
- returns an exit code of 2.
- --no-dangling-links Must be used with --follow-symlinks option;
- otherwise, h5diff shows error message and returns
- an exit code of 2.
- Check for any symbolic links (soft links or external
- links) that do not resolve to an existing object
- (dataset, group, or named datatype). If any
- dangling link is found, this situation is treated as
- an error and h5diff returns an exit code of 2.
- -c, --compare List objects that are not comparable
- -N, --nan Avoid NaNs detection
- -n C, --count=C Print differences up to C number, C is a positive
- integer.
- -d D, --delta=D Print difference if (|a-b| > D), D is a positive
- number.
- -p R, --relative=R Print difference if (|(a-b)/b| > R), R is a positive
- number.
- --use-system-epsilon Print difference if (|a-b| > EPSILON), EPSILON is
- a system epsilon value.
- If the system epsilon is not defined, the below
- one of the following predefined values will be used:
- FLT_EPSILON = 1.19209E-07 for floating-point type
- DBL_EPSILON = 2.22045E-16 for double percision type
- --exclude-path "path" Exclude the specified path to an object when
- comparing files or groups. If a group is excluded,
- all member objects will also be excluded.
- The specified path is excluded wherever it occurs.
- This flexibility enables the same option to exclude
- either objects that exist only in one file or
- common objects that are known to differ.
+ -h, --help
+ Print a usage message and exit.
+ -V, --version
+ Print version number and exit.
+ -r, --report
+ Report mode. Print differences.
+ -v --verbose
+ Verbose mode. Print differences information and list of objects.
+ -vN --verbose=N
+ 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.
+ -q, --quiet
+ Quiet mode. Do not produce output.
+ --follow-symlinks
+ Follow symbolic links (soft links and external links and compare the)
+ links' target objects.
+ If symbolic link(s) with the same name exist in the files being
+ compared, then determine whether the target of each link is an existing
+ object (dataset, group, or named datatype) or the link is a dangling
+ link (a soft or external link pointing to a target object that does
+ not yet exist).
+ - If both symbolic links are dangling links, they are treated as being
+ the same; by default, h5diff returns an exit code of 0.
+ If, however, --no-dangling-links is used with --follow-symlinks,
+ this situation is treated as an error and h5diff returns an
+ exit code of 2.
+ - If only one of the two links is a dangling link,they are treated as
+ being different and h5diff returns an exit code of 1.
+ If, however, --no-dangling-links is used with --follow-symlinks,
+ this situation is treated as an error and h5diff returns an
+ exit code of 2.
+ - If both symbolic links point to existing objects, h5diff compares the
+ two objects.
+ If any symbolic link specified in the call to h5diff does not exist,
+ h5diff treats it as an error and returns an exit code of 2.
+ --no-dangling-links
+ Must be used with --follow-symlinks option; otherwise, h5diff shows
+ error message and returns an exit code of 2.
+ Check for any symbolic links (soft links or external links) that do not
+ resolve to an existing object (dataset, group, or named datatype).
+ If any dangling link is found, this situation is treated as an error
+ and h5diff returns an exit code of 2.
+ -c, --compare
+ List objects that are not comparable
+ -N, --nan
+ Avoid NaNs detection
+ -n C, --count=C
+ Print differences up to C. C must be a positive integer.
+ -d D, --delta=D
+ Print difference if (|a-b| > D). D must be a positive number.
+ Can not use with '-p' or '--use-system-epsilon'.
+ -p R, --relative=R
+ Print difference if (|(a-b)/b| > R). R must be a positive number.
+ Can not use with '-d' or '--use-system-epsilon'.
+ --use-system-epsilon
+ Print difference if (|a-b| > EPSILON), EPSILON is system defined value.
+ If the system epsilon is not defined,one of the following predefined
+ values will be used:
+ FLT_EPSILON = 1.19209E-07 for floating-point type
+ DBL_EPSILON = 2.22045E-16 for double precision type
+ Can not use with '-p' or '-d'.
+ --exclude-path "path"
+ Exclude the specified path to an object when comparing files or groups.
+ If a group is excluded, all member objects will also be excluded.
+ The specified path is excluded wherever it occurs.
+ This flexibility enables the same option to exclude either objects that
+ exist only in one file or common objects that are known to differ.
- When comparing files, "path" is the absolute path to
- the excluded object; when comparing groups, "path" is
- similar to the relative path from the group to the
- excluded object. This "path" can be taken from the
- first section of the output of the --verbose option.
- For example, if you are comparing the group /groupA
- in two files and you want to exclude
- /groupA/groupB/groupC in both files, the exclude
- option would read as follows:
- --exclude-path "/groupB/groupC"
+ When comparing files, "path" is the absolute path to the excluded;
+ object; when comparing groups, "path" is similar to the relative
+ path from the group to the excluded object. This "path" can be
+ taken from the first section of the output of the --verbose option.
+ For example, if you are comparing the group /groupA in two files and
+ you want to exclude /groupA/groupB/groupC in both files, the exclude
+ option would read as follows:
+ --exclude-path "/groupB/groupC"
- 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.
+ 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
diff --git a/tools/h5diff/testfiles/h5diff_621.txt b/tools/h5diff/testfiles/h5diff_621.txt
index 1c8f745..fd8c680 100644
--- a/tools/h5diff/testfiles/h5diff_621.txt
+++ b/tools/h5diff/testfiles/h5diff_621.txt
@@ -1,96 +1,97 @@
<-n -4> is not a valid option
usage: h5diff [OPTIONS] file1 file2 [obj1[ obj2]]
- file1 File name of the first HDF5 file
- file2 File name of the second HDF5 file
- [obj1] Name of an HDF5 object, in absolute path
- [obj2] Name of an HDF5 object, in absolute path
+ file1 File name of the first HDF5 file
+ file2 File name of the second HDF5 file
+ [obj1] Name of an HDF5 object, in absolute path
+ [obj2] Name of an HDF5 object, in absolute path
OPTIONS
- -h, --help Print a usage message and exit.
- -V, --version Print version number and exit.
- -r, --report Report mode. Print differences.
- -v --verbose Verbose mode. Print differences information and list
- of objects.
- -vN --verbose=N 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.
- -q, --quiet Quiet mode. Do not produce output.
- --follow-symlinks Follow symbolic links (soft links and external links)
- and compare the links' target objects.
- If symbolic link(s) with the same name exist in the
- files being compared, then determine whether the
- target of each link is an existing object (dataset,
- group, or named datatype) or the link is a dangling
- link (a soft or external link pointing to a target
- object that does not yet exist).
- - If both symbolic links are dangling links, they
- are treated as being the same; by default, h5diff
- returns an exit code of 0. If, however,
- --no-dangling-links is used with --follow-symlinks,
- this situation is treated as an error and h5diff
- returns an exit code of 2.
- - If only one of the two links is a dangling link,
- they are treated as being different and h5diff
- returns an exit code of 1. If, however,
- --no-dangling-links is used with --follow-symlinks,
- this situation is treated as an error and h5diff
- returns an exit code of 2.
- - If both symbolic links point to existing objects,
- h5diff compares the two objects.
- If any symbolic link specified in the call to h5diff
- does not exist, h5diff treats it as an error and
- returns an exit code of 2.
- --no-dangling-links Must be used with --follow-symlinks option;
- otherwise, h5diff shows error message and returns
- an exit code of 2.
- Check for any symbolic links (soft links or external
- links) that do not resolve to an existing object
- (dataset, group, or named datatype). If any
- dangling link is found, this situation is treated as
- an error and h5diff returns an exit code of 2.
- -c, --compare List objects that are not comparable
- -N, --nan Avoid NaNs detection
- -n C, --count=C Print differences up to C number, C is a positive
- integer.
- -d D, --delta=D Print difference if (|a-b| > D), D is a positive
- number.
- -p R, --relative=R Print difference if (|(a-b)/b| > R), R is a positive
- number.
- --use-system-epsilon Print difference if (|a-b| > EPSILON), EPSILON is
- a system epsilon value.
- If the system epsilon is not defined, the below
- one of the following predefined values will be used:
- FLT_EPSILON = 1.19209E-07 for floating-point type
- DBL_EPSILON = 2.22045E-16 for double percision type
- --exclude-path "path" Exclude the specified path to an object when
- comparing files or groups. If a group is excluded,
- all member objects will also be excluded.
- The specified path is excluded wherever it occurs.
- This flexibility enables the same option to exclude
- either objects that exist only in one file or
- common objects that are known to differ.
+ -h, --help
+ Print a usage message and exit.
+ -V, --version
+ Print version number and exit.
+ -r, --report
+ Report mode. Print differences.
+ -v --verbose
+ Verbose mode. Print differences information and list of objects.
+ -vN --verbose=N
+ 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.
+ -q, --quiet
+ Quiet mode. Do not produce output.
+ --follow-symlinks
+ Follow symbolic links (soft links and external links and compare the)
+ links' target objects.
+ If symbolic link(s) with the same name exist in the files being
+ compared, then determine whether the target of each link is an existing
+ object (dataset, group, or named datatype) or the link is a dangling
+ link (a soft or external link pointing to a target object that does
+ not yet exist).
+ - If both symbolic links are dangling links, they are treated as being
+ the same; by default, h5diff returns an exit code of 0.
+ If, however, --no-dangling-links is used with --follow-symlinks,
+ this situation is treated as an error and h5diff returns an
+ exit code of 2.
+ - If only one of the two links is a dangling link,they are treated as
+ being different and h5diff returns an exit code of 1.
+ If, however, --no-dangling-links is used with --follow-symlinks,
+ this situation is treated as an error and h5diff returns an
+ exit code of 2.
+ - If both symbolic links point to existing objects, h5diff compares the
+ two objects.
+ If any symbolic link specified in the call to h5diff does not exist,
+ h5diff treats it as an error and returns an exit code of 2.
+ --no-dangling-links
+ Must be used with --follow-symlinks option; otherwise, h5diff shows
+ error message and returns an exit code of 2.
+ Check for any symbolic links (soft links or external links) that do not
+ resolve to an existing object (dataset, group, or named datatype).
+ If any dangling link is found, this situation is treated as an error
+ and h5diff returns an exit code of 2.
+ -c, --compare
+ List objects that are not comparable
+ -N, --nan
+ Avoid NaNs detection
+ -n C, --count=C
+ Print differences up to C. C must be a positive integer.
+ -d D, --delta=D
+ Print difference if (|a-b| > D). D must be a positive number.
+ Can not use with '-p' or '--use-system-epsilon'.
+ -p R, --relative=R
+ Print difference if (|(a-b)/b| > R). R must be a positive number.
+ Can not use with '-d' or '--use-system-epsilon'.
+ --use-system-epsilon
+ Print difference if (|a-b| > EPSILON), EPSILON is system defined value.
+ If the system epsilon is not defined,one of the following predefined
+ values will be used:
+ FLT_EPSILON = 1.19209E-07 for floating-point type
+ DBL_EPSILON = 2.22045E-16 for double precision type
+ Can not use with '-p' or '-d'.
+ --exclude-path "path"
+ Exclude the specified path to an object when comparing files or groups.
+ If a group is excluded, all member objects will also be excluded.
+ The specified path is excluded wherever it occurs.
+ This flexibility enables the same option to exclude either objects that
+ exist only in one file or common objects that are known to differ.
- When comparing files, "path" is the absolute path to
- the excluded object; when comparing groups, "path" is
- similar to the relative path from the group to the
- excluded object. This "path" can be taken from the
- first section of the output of the --verbose option.
- For example, if you are comparing the group /groupA
- in two files and you want to exclude
- /groupA/groupB/groupC in both files, the exclude
- option would read as follows:
- --exclude-path "/groupB/groupC"
+ When comparing files, "path" is the absolute path to the excluded;
+ object; when comparing groups, "path" is similar to the relative
+ path from the group to the excluded object. This "path" can be
+ taken from the first section of the output of the --verbose option.
+ For example, if you are comparing the group /groupA in two files and
+ you want to exclude /groupA/groupB/groupC in both files, the exclude
+ option would read as follows:
+ --exclude-path "/groupB/groupC"
- 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.
+ 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
diff --git a/tools/h5diff/testfiles/h5diff_622.txt b/tools/h5diff/testfiles/h5diff_622.txt
index 22f216f..f0d38af 100644
--- a/tools/h5diff/testfiles/h5diff_622.txt
+++ b/tools/h5diff/testfiles/h5diff_622.txt
@@ -1,96 +1,97 @@
<-n 0> is not a valid option
usage: h5diff [OPTIONS] file1 file2 [obj1[ obj2]]
- file1 File name of the first HDF5 file
- file2 File name of the second HDF5 file
- [obj1] Name of an HDF5 object, in absolute path
- [obj2] Name of an HDF5 object, in absolute path
+ file1 File name of the first HDF5 file
+ file2 File name of the second HDF5 file
+ [obj1] Name of an HDF5 object, in absolute path
+ [obj2] Name of an HDF5 object, in absolute path
OPTIONS
- -h, --help Print a usage message and exit.
- -V, --version Print version number and exit.
- -r, --report Report mode. Print differences.
- -v --verbose Verbose mode. Print differences information and list
- of objects.
- -vN --verbose=N 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.
- -q, --quiet Quiet mode. Do not produce output.
- --follow-symlinks Follow symbolic links (soft links and external links)
- and compare the links' target objects.
- If symbolic link(s) with the same name exist in the
- files being compared, then determine whether the
- target of each link is an existing object (dataset,
- group, or named datatype) or the link is a dangling
- link (a soft or external link pointing to a target
- object that does not yet exist).
- - If both symbolic links are dangling links, they
- are treated as being the same; by default, h5diff
- returns an exit code of 0. If, however,
- --no-dangling-links is used with --follow-symlinks,
- this situation is treated as an error and h5diff
- returns an exit code of 2.
- - If only one of the two links is a dangling link,
- they are treated as being different and h5diff
- returns an exit code of 1. If, however,
- --no-dangling-links is used with --follow-symlinks,
- this situation is treated as an error and h5diff
- returns an exit code of 2.
- - If both symbolic links point to existing objects,
- h5diff compares the two objects.
- If any symbolic link specified in the call to h5diff
- does not exist, h5diff treats it as an error and
- returns an exit code of 2.
- --no-dangling-links Must be used with --follow-symlinks option;
- otherwise, h5diff shows error message and returns
- an exit code of 2.
- Check for any symbolic links (soft links or external
- links) that do not resolve to an existing object
- (dataset, group, or named datatype). If any
- dangling link is found, this situation is treated as
- an error and h5diff returns an exit code of 2.
- -c, --compare List objects that are not comparable
- -N, --nan Avoid NaNs detection
- -n C, --count=C Print differences up to C number, C is a positive
- integer.
- -d D, --delta=D Print difference if (|a-b| > D), D is a positive
- number.
- -p R, --relative=R Print difference if (|(a-b)/b| > R), R is a positive
- number.
- --use-system-epsilon Print difference if (|a-b| > EPSILON), EPSILON is
- a system epsilon value.
- If the system epsilon is not defined, the below
- one of the following predefined values will be used:
- FLT_EPSILON = 1.19209E-07 for floating-point type
- DBL_EPSILON = 2.22045E-16 for double percision type
- --exclude-path "path" Exclude the specified path to an object when
- comparing files or groups. If a group is excluded,
- all member objects will also be excluded.
- The specified path is excluded wherever it occurs.
- This flexibility enables the same option to exclude
- either objects that exist only in one file or
- common objects that are known to differ.
+ -h, --help
+ Print a usage message and exit.
+ -V, --version
+ Print version number and exit.
+ -r, --report
+ Report mode. Print differences.
+ -v --verbose
+ Verbose mode. Print differences information and list of objects.
+ -vN --verbose=N
+ 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.
+ -q, --quiet
+ Quiet mode. Do not produce output.
+ --follow-symlinks
+ Follow symbolic links (soft links and external links and compare the)
+ links' target objects.
+ If symbolic link(s) with the same name exist in the files being
+ compared, then determine whether the target of each link is an existing
+ object (dataset, group, or named datatype) or the link is a dangling
+ link (a soft or external link pointing to a target object that does
+ not yet exist).
+ - If both symbolic links are dangling links, they are treated as being
+ the same; by default, h5diff returns an exit code of 0.
+ If, however, --no-dangling-links is used with --follow-symlinks,
+ this situation is treated as an error and h5diff returns an
+ exit code of 2.
+ - If only one of the two links is a dangling link,they are treated as
+ being different and h5diff returns an exit code of 1.
+ If, however, --no-dangling-links is used with --follow-symlinks,
+ this situation is treated as an error and h5diff returns an
+ exit code of 2.
+ - If both symbolic links point to existing objects, h5diff compares the
+ two objects.
+ If any symbolic link specified in the call to h5diff does not exist,
+ h5diff treats it as an error and returns an exit code of 2.
+ --no-dangling-links
+ Must be used with --follow-symlinks option; otherwise, h5diff shows
+ error message and returns an exit code of 2.
+ Check for any symbolic links (soft links or external links) that do not
+ resolve to an existing object (dataset, group, or named datatype).
+ If any dangling link is found, this situation is treated as an error
+ and h5diff returns an exit code of 2.
+ -c, --compare
+ List objects that are not comparable
+ -N, --nan
+ Avoid NaNs detection
+ -n C, --count=C
+ Print differences up to C. C must be a positive integer.
+ -d D, --delta=D
+ Print difference if (|a-b| > D). D must be a positive number.
+ Can not use with '-p' or '--use-system-epsilon'.
+ -p R, --relative=R
+ Print difference if (|(a-b)/b| > R). R must be a positive number.
+ Can not use with '-d' or '--use-system-epsilon'.
+ --use-system-epsilon
+ Print difference if (|a-b| > EPSILON), EPSILON is system defined value.
+ If the system epsilon is not defined,one of the following predefined
+ values will be used:
+ FLT_EPSILON = 1.19209E-07 for floating-point type
+ DBL_EPSILON = 2.22045E-16 for double precision type
+ Can not use with '-p' or '-d'.
+ --exclude-path "path"
+ Exclude the specified path to an object when comparing files or groups.
+ If a group is excluded, all member objects will also be excluded.
+ The specified path is excluded wherever it occurs.
+ This flexibility enables the same option to exclude either objects that
+ exist only in one file or common objects that are known to differ.
- When comparing files, "path" is the absolute path to
- the excluded object; when comparing groups, "path" is
- similar to the relative path from the group to the
- excluded object. This "path" can be taken from the
- first section of the output of the --verbose option.
- For example, if you are comparing the group /groupA
- in two files and you want to exclude
- /groupA/groupB/groupC in both files, the exclude
- option would read as follows:
- --exclude-path "/groupB/groupC"
+ When comparing files, "path" is the absolute path to the excluded;
+ object; when comparing groups, "path" is similar to the relative
+ path from the group to the excluded object. This "path" can be
+ taken from the first section of the output of the --verbose option.
+ For example, if you are comparing the group /groupA in two files and
+ you want to exclude /groupA/groupB/groupC in both files, the exclude
+ option would read as follows:
+ --exclude-path "/groupB/groupC"
- 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.
+ 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
diff --git a/tools/h5diff/testfiles/h5diff_623.txt b/tools/h5diff/testfiles/h5diff_623.txt
index 5dce69c..4ab66a5 100644
--- a/tools/h5diff/testfiles/h5diff_623.txt
+++ b/tools/h5diff/testfiles/h5diff_623.txt
@@ -1,96 +1,97 @@
<-n u> is not a valid option
usage: h5diff [OPTIONS] file1 file2 [obj1[ obj2]]
- file1 File name of the first HDF5 file
- file2 File name of the second HDF5 file
- [obj1] Name of an HDF5 object, in absolute path
- [obj2] Name of an HDF5 object, in absolute path
+ file1 File name of the first HDF5 file
+ file2 File name of the second HDF5 file
+ [obj1] Name of an HDF5 object, in absolute path
+ [obj2] Name of an HDF5 object, in absolute path
OPTIONS
- -h, --help Print a usage message and exit.
- -V, --version Print version number and exit.
- -r, --report Report mode. Print differences.
- -v --verbose Verbose mode. Print differences information and list
- of objects.
- -vN --verbose=N 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.
- -q, --quiet Quiet mode. Do not produce output.
- --follow-symlinks Follow symbolic links (soft links and external links)
- and compare the links' target objects.
- If symbolic link(s) with the same name exist in the
- files being compared, then determine whether the
- target of each link is an existing object (dataset,
- group, or named datatype) or the link is a dangling
- link (a soft or external link pointing to a target
- object that does not yet exist).
- - If both symbolic links are dangling links, they
- are treated as being the same; by default, h5diff
- returns an exit code of 0. If, however,
- --no-dangling-links is used with --follow-symlinks,
- this situation is treated as an error and h5diff
- returns an exit code of 2.
- - If only one of the two links is a dangling link,
- they are treated as being different and h5diff
- returns an exit code of 1. If, however,
- --no-dangling-links is used with --follow-symlinks,
- this situation is treated as an error and h5diff
- returns an exit code of 2.
- - If both symbolic links point to existing objects,
- h5diff compares the two objects.
- If any symbolic link specified in the call to h5diff
- does not exist, h5diff treats it as an error and
- returns an exit code of 2.
- --no-dangling-links Must be used with --follow-symlinks option;
- otherwise, h5diff shows error message and returns
- an exit code of 2.
- Check for any symbolic links (soft links or external
- links) that do not resolve to an existing object
- (dataset, group, or named datatype). If any
- dangling link is found, this situation is treated as
- an error and h5diff returns an exit code of 2.
- -c, --compare List objects that are not comparable
- -N, --nan Avoid NaNs detection
- -n C, --count=C Print differences up to C number, C is a positive
- integer.
- -d D, --delta=D Print difference if (|a-b| > D), D is a positive
- number.
- -p R, --relative=R Print difference if (|(a-b)/b| > R), R is a positive
- number.
- --use-system-epsilon Print difference if (|a-b| > EPSILON), EPSILON is
- a system epsilon value.
- If the system epsilon is not defined, the below
- one of the following predefined values will be used:
- FLT_EPSILON = 1.19209E-07 for floating-point type
- DBL_EPSILON = 2.22045E-16 for double percision type
- --exclude-path "path" Exclude the specified path to an object when
- comparing files or groups. If a group is excluded,
- all member objects will also be excluded.
- The specified path is excluded wherever it occurs.
- This flexibility enables the same option to exclude
- either objects that exist only in one file or
- common objects that are known to differ.
+ -h, --help
+ Print a usage message and exit.
+ -V, --version
+ Print version number and exit.
+ -r, --report
+ Report mode. Print differences.
+ -v --verbose
+ Verbose mode. Print differences information and list of objects.
+ -vN --verbose=N
+ 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.
+ -q, --quiet
+ Quiet mode. Do not produce output.
+ --follow-symlinks
+ Follow symbolic links (soft links and external links and compare the)
+ links' target objects.
+ If symbolic link(s) with the same name exist in the files being
+ compared, then determine whether the target of each link is an existing
+ object (dataset, group, or named datatype) or the link is a dangling
+ link (a soft or external link pointing to a target object that does
+ not yet exist).
+ - If both symbolic links are dangling links, they are treated as being
+ the same; by default, h5diff returns an exit code of 0.
+ If, however, --no-dangling-links is used with --follow-symlinks,
+ this situation is treated as an error and h5diff returns an
+ exit code of 2.
+ - If only one of the two links is a dangling link,they are treated as
+ being different and h5diff returns an exit code of 1.
+ If, however, --no-dangling-links is used with --follow-symlinks,
+ this situation is treated as an error and h5diff returns an
+ exit code of 2.
+ - If both symbolic links point to existing objects, h5diff compares the
+ two objects.
+ If any symbolic link specified in the call to h5diff does not exist,
+ h5diff treats it as an error and returns an exit code of 2.
+ --no-dangling-links
+ Must be used with --follow-symlinks option; otherwise, h5diff shows
+ error message and returns an exit code of 2.
+ Check for any symbolic links (soft links or external links) that do not
+ resolve to an existing object (dataset, group, or named datatype).
+ If any dangling link is found, this situation is treated as an error
+ and h5diff returns an exit code of 2.
+ -c, --compare
+ List objects that are not comparable
+ -N, --nan
+ Avoid NaNs detection
+ -n C, --count=C
+ Print differences up to C. C must be a positive integer.
+ -d D, --delta=D
+ Print difference if (|a-b| > D). D must be a positive number.
+ Can not use with '-p' or '--use-system-epsilon'.
+ -p R, --relative=R
+ Print difference if (|(a-b)/b| > R). R must be a positive number.
+ Can not use with '-d' or '--use-system-epsilon'.
+ --use-system-epsilon
+ Print difference if (|a-b| > EPSILON), EPSILON is system defined value.
+ If the system epsilon is not defined,one of the following predefined
+ values will be used:
+ FLT_EPSILON = 1.19209E-07 for floating-point type
+ DBL_EPSILON = 2.22045E-16 for double precision type
+ Can not use with '-p' or '-d'.
+ --exclude-path "path"
+ Exclude the specified path to an object when comparing files or groups.
+ If a group is excluded, all member objects will also be excluded.
+ The specified path is excluded wherever it occurs.
+ This flexibility enables the same option to exclude either objects that
+ exist only in one file or common objects that are known to differ.
- When comparing files, "path" is the absolute path to
- the excluded object; when comparing groups, "path" is
- similar to the relative path from the group to the
- excluded object. This "path" can be taken from the
- first section of the output of the --verbose option.
- For example, if you are comparing the group /groupA
- in two files and you want to exclude
- /groupA/groupB/groupC in both files, the exclude
- option would read as follows:
- --exclude-path "/groupB/groupC"
+ When comparing files, "path" is the absolute path to the excluded;
+ object; when comparing groups, "path" is similar to the relative
+ path from the group to the excluded object. This "path" can be
+ taken from the first section of the output of the --verbose option.
+ For example, if you are comparing the group /groupA in two files and
+ you want to exclude /groupA/groupB/groupC in both files, the exclude
+ option would read as follows:
+ --exclude-path "/groupB/groupC"
- 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.
+ 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
diff --git a/tools/h5diff/testfiles/h5diff_624.txt b/tools/h5diff/testfiles/h5diff_624.txt
index 863e422..f5e7ee3 100644
--- a/tools/h5diff/testfiles/h5diff_624.txt
+++ b/tools/h5diff/testfiles/h5diff_624.txt
@@ -1,96 +1,97 @@
<-n 0x1> is not a valid option
usage: h5diff [OPTIONS] file1 file2 [obj1[ obj2]]
- file1 File name of the first HDF5 file
- file2 File name of the second HDF5 file
- [obj1] Name of an HDF5 object, in absolute path
- [obj2] Name of an HDF5 object, in absolute path
+ file1 File name of the first HDF5 file
+ file2 File name of the second HDF5 file
+ [obj1] Name of an HDF5 object, in absolute path
+ [obj2] Name of an HDF5 object, in absolute path
OPTIONS
- -h, --help Print a usage message and exit.
- -V, --version Print version number and exit.
- -r, --report Report mode. Print differences.
- -v --verbose Verbose mode. Print differences information and list
- of objects.
- -vN --verbose=N 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.
- -q, --quiet Quiet mode. Do not produce output.
- --follow-symlinks Follow symbolic links (soft links and external links)
- and compare the links' target objects.
- If symbolic link(s) with the same name exist in the
- files being compared, then determine whether the
- target of each link is an existing object (dataset,
- group, or named datatype) or the link is a dangling
- link (a soft or external link pointing to a target
- object that does not yet exist).
- - If both symbolic links are dangling links, they
- are treated as being the same; by default, h5diff
- returns an exit code of 0. If, however,
- --no-dangling-links is used with --follow-symlinks,
- this situation is treated as an error and h5diff
- returns an exit code of 2.
- - If only one of the two links is a dangling link,
- they are treated as being different and h5diff
- returns an exit code of 1. If, however,
- --no-dangling-links is used with --follow-symlinks,
- this situation is treated as an error and h5diff
- returns an exit code of 2.
- - If both symbolic links point to existing objects,
- h5diff compares the two objects.
- If any symbolic link specified in the call to h5diff
- does not exist, h5diff treats it as an error and
- returns an exit code of 2.
- --no-dangling-links Must be used with --follow-symlinks option;
- otherwise, h5diff shows error message and returns
- an exit code of 2.
- Check for any symbolic links (soft links or external
- links) that do not resolve to an existing object
- (dataset, group, or named datatype). If any
- dangling link is found, this situation is treated as
- an error and h5diff returns an exit code of 2.
- -c, --compare List objects that are not comparable
- -N, --nan Avoid NaNs detection
- -n C, --count=C Print differences up to C number, C is a positive
- integer.
- -d D, --delta=D Print difference if (|a-b| > D), D is a positive
- number.
- -p R, --relative=R Print difference if (|(a-b)/b| > R), R is a positive
- number.
- --use-system-epsilon Print difference if (|a-b| > EPSILON), EPSILON is
- a system epsilon value.
- If the system epsilon is not defined, the below
- one of the following predefined values will be used:
- FLT_EPSILON = 1.19209E-07 for floating-point type
- DBL_EPSILON = 2.22045E-16 for double percision type
- --exclude-path "path" Exclude the specified path to an object when
- comparing files or groups. If a group is excluded,
- all member objects will also be excluded.
- The specified path is excluded wherever it occurs.
- This flexibility enables the same option to exclude
- either objects that exist only in one file or
- common objects that are known to differ.
+ -h, --help
+ Print a usage message and exit.
+ -V, --version
+ Print version number and exit.
+ -r, --report
+ Report mode. Print differences.
+ -v --verbose
+ Verbose mode. Print differences information and list of objects.
+ -vN --verbose=N
+ 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.
+ -q, --quiet
+ Quiet mode. Do not produce output.
+ --follow-symlinks
+ Follow symbolic links (soft links and external links and compare the)
+ links' target objects.
+ If symbolic link(s) with the same name exist in the files being
+ compared, then determine whether the target of each link is an existing
+ object (dataset, group, or named datatype) or the link is a dangling
+ link (a soft or external link pointing to a target object that does
+ not yet exist).
+ - If both symbolic links are dangling links, they are treated as being
+ the same; by default, h5diff returns an exit code of 0.
+ If, however, --no-dangling-links is used with --follow-symlinks,
+ this situation is treated as an error and h5diff returns an
+ exit code of 2.
+ - If only one of the two links is a dangling link,they are treated as
+ being different and h5diff returns an exit code of 1.
+ If, however, --no-dangling-links is used with --follow-symlinks,
+ this situation is treated as an error and h5diff returns an
+ exit code of 2.
+ - If both symbolic links point to existing objects, h5diff compares the
+ two objects.
+ If any symbolic link specified in the call to h5diff does not exist,
+ h5diff treats it as an error and returns an exit code of 2.
+ --no-dangling-links
+ Must be used with --follow-symlinks option; otherwise, h5diff shows
+ error message and returns an exit code of 2.
+ Check for any symbolic links (soft links or external links) that do not
+ resolve to an existing object (dataset, group, or named datatype).
+ If any dangling link is found, this situation is treated as an error
+ and h5diff returns an exit code of 2.
+ -c, --compare
+ List objects that are not comparable
+ -N, --nan
+ Avoid NaNs detection
+ -n C, --count=C
+ Print differences up to C. C must be a positive integer.
+ -d D, --delta=D
+ Print difference if (|a-b| > D). D must be a positive number.
+ Can not use with '-p' or '--use-system-epsilon'.
+ -p R, --relative=R
+ Print difference if (|(a-b)/b| > R). R must be a positive number.
+ Can not use with '-d' or '--use-system-epsilon'.
+ --use-system-epsilon
+ Print difference if (|a-b| > EPSILON), EPSILON is system defined value.
+ If the system epsilon is not defined,one of the following predefined
+ values will be used:
+ FLT_EPSILON = 1.19209E-07 for floating-point type
+ DBL_EPSILON = 2.22045E-16 for double precision type
+ Can not use with '-p' or '-d'.
+ --exclude-path "path"
+ Exclude the specified path to an object when comparing files or groups.
+ If a group is excluded, all member objects will also be excluded.
+ The specified path is excluded wherever it occurs.
+ This flexibility enables the same option to exclude either objects that
+ exist only in one file or common objects that are known to differ.
- When comparing files, "path" is the absolute path to
- the excluded object; when comparing groups, "path" is
- similar to the relative path from the group to the
- excluded object. This "path" can be taken from the
- first section of the output of the --verbose option.
- For example, if you are comparing the group /groupA
- in two files and you want to exclude
- /groupA/groupB/groupC in both files, the exclude
- option would read as follows:
- --exclude-path "/groupB/groupC"
+ When comparing files, "path" is the absolute path to the excluded;
+ object; when comparing groups, "path" is similar to the relative
+ path from the group to the excluded object. This "path" can be
+ taken from the first section of the output of the --verbose option.
+ For example, if you are comparing the group /groupA in two files and
+ you want to exclude /groupA/groupB/groupC in both files, the exclude
+ option would read as follows:
+ --exclude-path "/groupB/groupC"
- 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.
+ 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
diff --git a/tools/h5diff/testfiles/h5diff_630.txt b/tools/h5diff/testfiles/h5diff_630.txt
new file mode 100644
index 0000000..aaf0148
--- /dev/null
+++ b/tools/h5diff/testfiles/h5diff_630.txt
@@ -0,0 +1,3 @@
+dataset: </g1/fp18> and </g1/fp18_COPY>
+0 differences found
+EXIT CODE: 0
diff --git a/tools/h5diff/testfiles/h5diff_631.txt b/tools/h5diff/testfiles/h5diff_631.txt
new file mode 100644
index 0000000..aaf0148
--- /dev/null
+++ b/tools/h5diff/testfiles/h5diff_631.txt
@@ -0,0 +1,3 @@
+dataset: </g1/fp18> and </g1/fp18_COPY>
+0 differences found
+EXIT CODE: 0
diff --git a/tools/h5diff/testfiles/h5diff_640.txt b/tools/h5diff/testfiles/h5diff_640.txt
new file mode 100644
index 0000000..4c956a6
--- /dev/null
+++ b/tools/h5diff/testfiles/h5diff_640.txt
@@ -0,0 +1,4 @@
+h5diff error: -d, -p and --use-system-epsilon options are mutually-exclusive;
+use no more than one.
+Try '-h' or '--help' option for more information or see the h5diff entry in the 'HDF5 Reference Manual'.
+EXIT CODE: 1
diff --git a/tools/h5diff/testfiles/h5diff_641.txt b/tools/h5diff/testfiles/h5diff_641.txt
new file mode 100644
index 0000000..4c956a6
--- /dev/null
+++ b/tools/h5diff/testfiles/h5diff_641.txt
@@ -0,0 +1,4 @@
+h5diff error: -d, -p and --use-system-epsilon options are mutually-exclusive;
+use no more than one.
+Try '-h' or '--help' option for more information or see the h5diff entry in the 'HDF5 Reference Manual'.
+EXIT CODE: 1
diff --git a/tools/h5diff/testfiles/h5diff_642.txt b/tools/h5diff/testfiles/h5diff_642.txt
new file mode 100644
index 0000000..4c956a6
--- /dev/null
+++ b/tools/h5diff/testfiles/h5diff_642.txt
@@ -0,0 +1,4 @@
+h5diff error: -d, -p and --use-system-epsilon options are mutually-exclusive;
+use no more than one.
+Try '-h' or '--help' option for more information or see the h5diff entry in the 'HDF5 Reference Manual'.
+EXIT CODE: 1
diff --git a/tools/h5diff/testfiles/h5diff_643.txt b/tools/h5diff/testfiles/h5diff_643.txt
new file mode 100644
index 0000000..4c956a6
--- /dev/null
+++ b/tools/h5diff/testfiles/h5diff_643.txt
@@ -0,0 +1,4 @@
+h5diff error: -d, -p and --use-system-epsilon options are mutually-exclusive;
+use no more than one.
+Try '-h' or '--help' option for more information or see the h5diff entry in the 'HDF5 Reference Manual'.
+EXIT CODE: 1
diff --git a/tools/h5diff/testfiles/h5diff_644.txt b/tools/h5diff/testfiles/h5diff_644.txt
new file mode 100644
index 0000000..4c956a6
--- /dev/null
+++ b/tools/h5diff/testfiles/h5diff_644.txt
@@ -0,0 +1,4 @@
+h5diff error: -d, -p and --use-system-epsilon options are mutually-exclusive;
+use no more than one.
+Try '-h' or '--help' option for more information or see the h5diff entry in the 'HDF5 Reference Manual'.
+EXIT CODE: 1
diff --git a/tools/h5diff/testfiles/h5diff_645.txt b/tools/h5diff/testfiles/h5diff_645.txt
new file mode 100644
index 0000000..4c956a6
--- /dev/null
+++ b/tools/h5diff/testfiles/h5diff_645.txt
@@ -0,0 +1,4 @@
+h5diff error: -d, -p and --use-system-epsilon options are mutually-exclusive;
+use no more than one.
+Try '-h' or '--help' option for more information or see the h5diff entry in the 'HDF5 Reference Manual'.
+EXIT CODE: 1
diff --git a/tools/h5diff/testfiles/h5diff_646.txt b/tools/h5diff/testfiles/h5diff_646.txt
new file mode 100644
index 0000000..4c956a6
--- /dev/null
+++ b/tools/h5diff/testfiles/h5diff_646.txt
@@ -0,0 +1,4 @@
+h5diff error: -d, -p and --use-system-epsilon options are mutually-exclusive;
+use no more than one.
+Try '-h' or '--help' option for more information or see the h5diff entry in the 'HDF5 Reference Manual'.
+EXIT CODE: 1
diff --git a/tools/h5diff/testfiles/h5diff_70.txt b/tools/h5diff/testfiles/h5diff_70.txt
index c6aeb68..47b057c 100644
--- a/tools/h5diff/testfiles/h5diff_70.txt
+++ b/tools/h5diff/testfiles/h5diff_70.txt
@@ -2028,5 +2028,5 @@ position vlen3D of </g1> vlen3D of </g1> difference
--------------------------------
Some objects are not comparable
--------------------------------
-Use -c for a list of objects.
+Use -c for a list of objects without details of differences.
EXIT CODE: 1
diff --git a/tools/h5diff/testfiles/h5diff_700.txt b/tools/h5diff/testfiles/h5diff_700.txt
index 99398a9..00c5b07 100644
--- a/tools/h5diff/testfiles/h5diff_700.txt
+++ b/tools/h5diff/testfiles/h5diff_700.txt
@@ -2034,5 +2034,5 @@ position vlen3D of </g1> vlen3D of </g1> difference
--------------------------------
Some objects are not comparable
--------------------------------
-Use -c for a list of objects.
+Use -c for a list of objects without details of differences.
EXIT CODE: 1
diff --git a/tools/h5diff/testfiles/h5diff_701.txt b/tools/h5diff/testfiles/h5diff_701.txt
index 3b3e5b6..a4b436f 100644
--- a/tools/h5diff/testfiles/h5diff_701.txt
+++ b/tools/h5diff/testfiles/h5diff_701.txt
@@ -2133,5 +2133,5 @@ position vlen3D of </g1> vlen3D of </g1> difference
--------------------------------
Some objects are not comparable
--------------------------------
-Use -c for a list of objects.
+Use -c for a list of objects without details of differences.
EXIT CODE: 1
diff --git a/tools/h5diff/testfiles/h5diff_702.txt b/tools/h5diff/testfiles/h5diff_702.txt
index 99398a9..00c5b07 100644
--- a/tools/h5diff/testfiles/h5diff_702.txt
+++ b/tools/h5diff/testfiles/h5diff_702.txt
@@ -2034,5 +2034,5 @@ position vlen3D of </g1> vlen3D of </g1> difference
--------------------------------
Some objects are not comparable
--------------------------------
-Use -c for a list of objects.
+Use -c for a list of objects without details of differences.
EXIT CODE: 1
diff --git a/tools/h5diff/testfiles/h5diff_703.txt b/tools/h5diff/testfiles/h5diff_703.txt
index 3b3e5b6..a4b436f 100644
--- a/tools/h5diff/testfiles/h5diff_703.txt
+++ b/tools/h5diff/testfiles/h5diff_703.txt
@@ -2133,5 +2133,5 @@ position vlen3D of </g1> vlen3D of </g1> difference
--------------------------------
Some objects are not comparable
--------------------------------
-Use -c for a list of objects.
+Use -c for a list of objects without details of differences.
EXIT CODE: 1
diff --git a/tools/h5diff/testfiles/h5diff_80.txt b/tools/h5diff/testfiles/h5diff_80.txt
index 1c55b1a..5957d72 100644
--- a/tools/h5diff/testfiles/h5diff_80.txt
+++ b/tools/h5diff/testfiles/h5diff_80.txt
@@ -877,5 +877,5 @@ point #4 (2,8) (1,7)
--------------------------------
Some objects are not comparable
--------------------------------
-Use -c for a list of objects.
+Use -c for a list of objects without details of differences.
EXIT CODE: 1
diff --git a/tools/h5diff/testfiles/h5diff_90.txt b/tools/h5diff/testfiles/h5diff_90.txt
index fb23843..9965ab0 100644
--- a/tools/h5diff/testfiles/h5diff_90.txt
+++ b/tools/h5diff/testfiles/h5diff_90.txt
@@ -30,7 +30,6 @@ dataset: </g1/dset4> and </g1/dset4>
group : </g2> and </g2>
0 differences found
dataset: </g2/dset1> and </g2/dset1>
-Not comparable: </g2/dset1> or </g2/dset1> is an empty dataset
0 differences found
dataset: </g2/dset2> and </g2/dset2>
0 differences found
@@ -47,10 +46,5 @@ dataset: </g2/dset7> and </g2/dset7>
dataset: </g2/dset8> and </g2/dset8>
0 differences found
dataset: </g2/dset9> and </g2/dset9>
-Not comparable: </g2/dset9> or </g2/dset9> is an empty dataset
0 differences found
---------------------------------
-Some objects are not comparable
---------------------------------
-Use -c for a list of objects.
EXIT CODE: 0
diff --git a/tools/h5diff/testfiles/h5diff_basic1.h5 b/tools/h5diff/testfiles/h5diff_basic1.h5
index 4f3cf9a..e1396be 100644
--- a/tools/h5diff/testfiles/h5diff_basic1.h5
+++ b/tools/h5diff/testfiles/h5diff_basic1.h5
Binary files differ
diff --git a/tools/h5diff/testfiles/h5diff_comp_vl_strs.h5 b/tools/h5diff/testfiles/h5diff_comp_vl_strs.h5
index dac510f..4ad6f19 100644
--- a/tools/h5diff/testfiles/h5diff_comp_vl_strs.h5
+++ b/tools/h5diff/testfiles/h5diff_comp_vl_strs.h5
Binary files differ
diff --git a/tools/h5diff/testfiles/h5diff_dset_zero_dim_size1.h5 b/tools/h5diff/testfiles/h5diff_dset_zero_dim_size1.h5
new file mode 100644
index 0000000..cdc7644
--- /dev/null
+++ b/tools/h5diff/testfiles/h5diff_dset_zero_dim_size1.h5
Binary files differ
diff --git a/tools/h5diff/testfiles/h5diff_dset_zero_dim_size2.h5 b/tools/h5diff/testfiles/h5diff_dset_zero_dim_size2.h5
new file mode 100644
index 0000000..4752ed1
--- /dev/null
+++ b/tools/h5diff/testfiles/h5diff_dset_zero_dim_size2.h5
Binary files differ
diff --git a/tools/h5diff/testfiles/h5diff_enum_invalid_values.h5 b/tools/h5diff/testfiles/h5diff_enum_invalid_values.h5
new file mode 100755
index 0000000..dd02db9
--- /dev/null
+++ b/tools/h5diff/testfiles/h5diff_enum_invalid_values.h5
Binary files differ
diff --git a/tools/h5diff/testfiles/non_comparables1.h5 b/tools/h5diff/testfiles/non_comparables1.h5
new file mode 100644
index 0000000..71b65c8
--- /dev/null
+++ b/tools/h5diff/testfiles/non_comparables1.h5
Binary files differ
diff --git a/tools/h5diff/testfiles/non_comparables2.h5 b/tools/h5diff/testfiles/non_comparables2.h5
new file mode 100644
index 0000000..188ceb9
--- /dev/null
+++ b/tools/h5diff/testfiles/non_comparables2.h5
Binary files differ
diff --git a/tools/h5diff/testh5diff.sh b/tools/h5diff/testh5diff.sh
index 62749c1..005510f 100755
--- a/tools/h5diff/testh5diff.sh
+++ b/tools/h5diff/testh5diff.sh
@@ -30,51 +30,6 @@
# Added test 450 - 459 (dangling links)
-###############################################################################
-## test file names
-###############################################################################
-
-FILE1=h5diff_basic1.h5
-FILE2=h5diff_basic2.h5
-FILE3=h5diff_types.h5
-FILE4=h5diff_dtypes.h5
-FILE5=h5diff_attr1.h5
-FILE6=h5diff_attr2.h5
-FILE7=h5diff_dset1.h5
-FILE8=h5diff_dset2.h5
-FILE9=h5diff_hyper1.h5
-FILE10=h5diff_hyper2.h5
-FILE11=h5diff_empty.h5
-FILE12=h5diff_links.h5
-FILE13=h5diff_softlinks.h5
-FILE14=h5diff_linked_softlink.h5
-FILE15=h5diff_extlink_src.h5
-FILE16=h5diff_extlink_trg.h5
-FILE17=h5diff_ext2softlink_src.h5
-FILE18=h5diff_ext2softlink_trg.h5
-FILE19=h5diff_dset_idx1.h5
-FILE20=h5diff_dset_idx2.h5
-DANGLE_LINK_FILE1=h5diff_danglelinks1.h5
-DANGLE_LINK_FILE2=h5diff_danglelinks2.h5
-# group recursive
-GRP_RECURSE_FILE1=h5diff_grp_recurse1.h5
-GRP_RECURSE_FILE2=h5diff_grp_recurse2.h5
-# group recursive - same structure via external links through files
-GRP_RECURSE1_EXT=h5diff_grp_recurse_ext1.h5
-GRP_RECURSE2_EXT1=h5diff_grp_recurse_ext2-1.h5
-GRP_RECURSE2_EXT2=h5diff_grp_recurse_ext2-2.h5
-GRP_RECURSE2_EXT3=h5diff_grp_recurse_ext2-3.h5
-# same structure, same obj name with different value
-EXCLUDE_FILE1_1=h5diff_exclude1-1.h5
-EXCLUDE_FILE1_2=h5diff_exclude1-2.h5
-# different structure and obj names
-EXCLUDE_FILE2_1=h5diff_exclude2-1.h5
-EXCLUDE_FILE2_2=h5diff_exclude2-2.h5
-# compound type with multiple vlen string types
-COMP_VL_STRS_FILE=h5diff_comp_vl_strs.h5
-
-ATTR_VERBOSE_LEVEL_FILE1=h5diff_attr_v_level1.h5
-ATTR_VERBOSE_LEVEL_FILE2=h5diff_attr_v_level2.h5
TESTNAME=h5diff
EXIT_SUCCESS=0
@@ -85,6 +40,7 @@ H5DIFF_BIN=`pwd`/$H5DIFF # The path of the tool binary
CMP='cmp -s'
DIFF='diff -c'
+CP='cp'
nerrors=0
verbose=yes
@@ -97,7 +53,273 @@ if test -z "$srcdir"; then
srcdir=.
fi
-test -d ./testfiles || mkdir ./testfiles
+# source dirs
+SRC_TOOLS="$srcdir/.."
+SRC_TOOLS_TESTFILES="$SRC_TOOLS/testfiles"
+# testfiles source dirs for tools
+SRC_H5LS_TESTFILES="$SRC_TOOLS_TESTFILES"
+SRC_H5DUMP_TESTFILES="$SRC_TOOLS_TESTFILES"
+SRC_H5DIFF_TESTFILES="$SRC_TOOLS/h5diff/testfiles"
+SRC_H5COPY_TESTFILES="$SRC_TOOLS/h5copy/testfiles"
+SRC_H5REPACK_TESTFILES="$SRC_TOOLS/h5repack/testfiles"
+SRC_H5JAM_TESTFILES="$SRC_TOOLS/h5jam/testfiles"
+SRC_H5STAT_TESTFILES="$SRC_TOOLS/h5stat/testfiles"
+SRC_H5IMPORT_TESTFILES="$SRC_TOOLS/h5import/testfiles"
+
+TESTDIR=./testfiles
+test -d $TESTDIR || mkdir $TESTDIR
+
+######################################################################
+# test files
+# --------------------------------------------------------------------
+# All the test files copy from source directory to test directory
+# NOTE: Keep this framework to add/remove test files.
+# Any test files from other tools can be used in this framework.
+# This list are also used for checking exist.
+# Comment '#' without space can be used.
+# --------------------------------------------------------------------
+LIST_HDF5_TEST_FILES="
+$SRC_H5DIFF_TESTFILES/h5diff_basic1.h5
+$SRC_H5DIFF_TESTFILES/h5diff_basic2.h5
+$SRC_H5DIFF_TESTFILES/h5diff_types.h5
+$SRC_H5DIFF_TESTFILES/h5diff_dtypes.h5
+$SRC_H5DIFF_TESTFILES/h5diff_attr1.h5
+$SRC_H5DIFF_TESTFILES/h5diff_attr2.h5
+$SRC_H5DIFF_TESTFILES/h5diff_dset1.h5
+$SRC_H5DIFF_TESTFILES/h5diff_dset2.h5
+$SRC_H5DIFF_TESTFILES/h5diff_hyper1.h5
+$SRC_H5DIFF_TESTFILES/h5diff_hyper2.h5
+$SRC_H5DIFF_TESTFILES/h5diff_empty.h5
+$SRC_H5DIFF_TESTFILES/h5diff_links.h5
+$SRC_H5DIFF_TESTFILES/h5diff_softlinks.h5
+$SRC_H5DIFF_TESTFILES/h5diff_linked_softlink.h5
+$SRC_H5DIFF_TESTFILES/h5diff_extlink_src.h5
+$SRC_H5DIFF_TESTFILES/h5diff_extlink_trg.h5
+$SRC_H5DIFF_TESTFILES/h5diff_ext2softlink_src.h5
+$SRC_H5DIFF_TESTFILES/h5diff_ext2softlink_trg.h5
+$SRC_H5DIFF_TESTFILES/h5diff_dset_idx1.h5
+$SRC_H5DIFF_TESTFILES/h5diff_dset_idx2.h5
+$SRC_H5DIFF_TESTFILES/h5diff_dset_zero_dim_size1.h5
+$SRC_H5DIFF_TESTFILES/h5diff_dset_zero_dim_size2.h5
+$SRC_H5DIFF_TESTFILES/h5diff_danglelinks1.h5
+$SRC_H5DIFF_TESTFILES/h5diff_danglelinks2.h5
+$SRC_H5DIFF_TESTFILES/h5diff_grp_recurse1.h5
+$SRC_H5DIFF_TESTFILES/h5diff_grp_recurse2.h5
+$SRC_H5DIFF_TESTFILES/h5diff_grp_recurse_ext1.h5
+$SRC_H5DIFF_TESTFILES/h5diff_grp_recurse_ext2-1.h5
+$SRC_H5DIFF_TESTFILES/h5diff_grp_recurse_ext2-2.h5
+$SRC_H5DIFF_TESTFILES/h5diff_grp_recurse_ext2-3.h5
+$SRC_H5DIFF_TESTFILES/h5diff_exclude1-1.h5
+$SRC_H5DIFF_TESTFILES/h5diff_exclude1-2.h5
+$SRC_H5DIFF_TESTFILES/h5diff_exclude2-1.h5
+$SRC_H5DIFF_TESTFILES/h5diff_exclude2-2.h5
+$SRC_H5DIFF_TESTFILES/h5diff_comp_vl_strs.h5
+$SRC_H5DIFF_TESTFILES/compounds_array_vlen1.h5
+$SRC_H5DIFF_TESTFILES/compounds_array_vlen2.h5
+$SRC_H5DIFF_TESTFILES/h5diff_attr_v_level1.h5
+$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
+"
+
+LIST_OTHER_TEST_FILES="
+$SRC_H5DIFF_TESTFILES/h5diff_10.txt
+$SRC_H5DIFF_TESTFILES/h5diff_100.txt
+$SRC_H5DIFF_TESTFILES/h5diff_101.txt
+$SRC_H5DIFF_TESTFILES/h5diff_102.txt
+$SRC_H5DIFF_TESTFILES/h5diff_103.txt
+$SRC_H5DIFF_TESTFILES/h5diff_104.txt
+$SRC_H5DIFF_TESTFILES/h5diff_11.txt
+$SRC_H5DIFF_TESTFILES/h5diff_12.txt
+$SRC_H5DIFF_TESTFILES/h5diff_13.txt
+$SRC_H5DIFF_TESTFILES/h5diff_14.txt
+$SRC_H5DIFF_TESTFILES/h5diff_15.txt
+$SRC_H5DIFF_TESTFILES/h5diff_16_1.txt
+$SRC_H5DIFF_TESTFILES/h5diff_16_2.txt
+$SRC_H5DIFF_TESTFILES/h5diff_16_3.txt
+$SRC_H5DIFF_TESTFILES/h5diff_17.txt
+$SRC_H5DIFF_TESTFILES/h5diff_171.txt
+$SRC_H5DIFF_TESTFILES/h5diff_172.txt
+$SRC_H5DIFF_TESTFILES/h5diff_18_1.txt
+$SRC_H5DIFF_TESTFILES/h5diff_18.txt
+$SRC_H5DIFF_TESTFILES/h5diff_20.txt
+$SRC_H5DIFF_TESTFILES/h5diff_200.txt
+$SRC_H5DIFF_TESTFILES/h5diff_201.txt
+$SRC_H5DIFF_TESTFILES/h5diff_202.txt
+$SRC_H5DIFF_TESTFILES/h5diff_203.txt
+$SRC_H5DIFF_TESTFILES/h5diff_204.txt
+$SRC_H5DIFF_TESTFILES/h5diff_205.txt
+$SRC_H5DIFF_TESTFILES/h5diff_206.txt
+$SRC_H5DIFF_TESTFILES/h5diff_207.txt
+$SRC_H5DIFF_TESTFILES/h5diff_208.txt
+$SRC_H5DIFF_TESTFILES/h5diff_220.txt
+$SRC_H5DIFF_TESTFILES/h5diff_221.txt
+$SRC_H5DIFF_TESTFILES/h5diff_222.txt
+$SRC_H5DIFF_TESTFILES/h5diff_21.txt
+$SRC_H5DIFF_TESTFILES/h5diff_22.txt
+$SRC_H5DIFF_TESTFILES/h5diff_23.txt
+$SRC_H5DIFF_TESTFILES/h5diff_24.txt
+$SRC_H5DIFF_TESTFILES/h5diff_25.txt
+$SRC_H5DIFF_TESTFILES/h5diff_26.txt
+$SRC_H5DIFF_TESTFILES/h5diff_27.txt
+$SRC_H5DIFF_TESTFILES/h5diff_28.txt
+$SRC_H5DIFF_TESTFILES/h5diff_30.txt
+$SRC_H5DIFF_TESTFILES/h5diff_300.txt
+$SRC_H5DIFF_TESTFILES/h5diff_400.txt
+$SRC_H5DIFF_TESTFILES/h5diff_401.txt
+$SRC_H5DIFF_TESTFILES/h5diff_402.txt
+$SRC_H5DIFF_TESTFILES/h5diff_403.txt
+$SRC_H5DIFF_TESTFILES/h5diff_404.txt
+$SRC_H5DIFF_TESTFILES/h5diff_405.txt
+$SRC_H5DIFF_TESTFILES/h5diff_406.txt
+$SRC_H5DIFF_TESTFILES/h5diff_407.txt
+$SRC_H5DIFF_TESTFILES/h5diff_408.txt
+$SRC_H5DIFF_TESTFILES/h5diff_409.txt
+$SRC_H5DIFF_TESTFILES/h5diff_410.txt
+$SRC_H5DIFF_TESTFILES/h5diff_411.txt
+$SRC_H5DIFF_TESTFILES/h5diff_412.txt
+$SRC_H5DIFF_TESTFILES/h5diff_413.txt
+$SRC_H5DIFF_TESTFILES/h5diff_414.txt
+$SRC_H5DIFF_TESTFILES/h5diff_415.txt
+$SRC_H5DIFF_TESTFILES/h5diff_416.txt
+$SRC_H5DIFF_TESTFILES/h5diff_417.txt
+$SRC_H5DIFF_TESTFILES/h5diff_418.txt
+$SRC_H5DIFF_TESTFILES/h5diff_419.txt
+$SRC_H5DIFF_TESTFILES/h5diff_420.txt
+$SRC_H5DIFF_TESTFILES/h5diff_421.txt
+$SRC_H5DIFF_TESTFILES/h5diff_422.txt
+$SRC_H5DIFF_TESTFILES/h5diff_423.txt
+$SRC_H5DIFF_TESTFILES/h5diff_424.txt
+$SRC_H5DIFF_TESTFILES/h5diff_425.txt
+$SRC_H5DIFF_TESTFILES/h5diff_450.txt
+$SRC_H5DIFF_TESTFILES/h5diff_451.txt
+$SRC_H5DIFF_TESTFILES/h5diff_452.txt
+$SRC_H5DIFF_TESTFILES/h5diff_453.txt
+$SRC_H5DIFF_TESTFILES/h5diff_454.txt
+$SRC_H5DIFF_TESTFILES/h5diff_455.txt
+$SRC_H5DIFF_TESTFILES/h5diff_456.txt
+$SRC_H5DIFF_TESTFILES/h5diff_457.txt
+$SRC_H5DIFF_TESTFILES/h5diff_458.txt
+$SRC_H5DIFF_TESTFILES/h5diff_459.txt
+$SRC_H5DIFF_TESTFILES/h5diff_465.txt
+$SRC_H5DIFF_TESTFILES/h5diff_466.txt
+$SRC_H5DIFF_TESTFILES/h5diff_467.txt
+$SRC_H5DIFF_TESTFILES/h5diff_468.txt
+$SRC_H5DIFF_TESTFILES/h5diff_469.txt
+$SRC_H5DIFF_TESTFILES/h5diff_480.txt
+$SRC_H5DIFF_TESTFILES/h5diff_481.txt
+$SRC_H5DIFF_TESTFILES/h5diff_482.txt
+$SRC_H5DIFF_TESTFILES/h5diff_483.txt
+$SRC_H5DIFF_TESTFILES/h5diff_484.txt
+$SRC_H5DIFF_TESTFILES/h5diff_50.txt
+$SRC_H5DIFF_TESTFILES/h5diff_51.txt
+$SRC_H5DIFF_TESTFILES/h5diff_52.txt
+$SRC_H5DIFF_TESTFILES/h5diff_53.txt
+$SRC_H5DIFF_TESTFILES/h5diff_54.txt
+$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_500.txt
+$SRC_H5DIFF_TESTFILES/h5diff_501.txt
+$SRC_H5DIFF_TESTFILES/h5diff_502.txt
+$SRC_H5DIFF_TESTFILES/h5diff_503.txt
+$SRC_H5DIFF_TESTFILES/h5diff_504.txt
+$SRC_H5DIFF_TESTFILES/h5diff_505.txt
+$SRC_H5DIFF_TESTFILES/h5diff_506.txt
+$SRC_H5DIFF_TESTFILES/h5diff_507.txt
+$SRC_H5DIFF_TESTFILES/h5diff_508.txt
+$SRC_H5DIFF_TESTFILES/h5diff_509.txt
+$SRC_H5DIFF_TESTFILES/h5diff_510.txt
+$SRC_H5DIFF_TESTFILES/h5diff_511.txt
+$SRC_H5DIFF_TESTFILES/h5diff_512.txt
+$SRC_H5DIFF_TESTFILES/h5diff_513.txt
+$SRC_H5DIFF_TESTFILES/h5diff_514.txt
+$SRC_H5DIFF_TESTFILES/h5diff_515.txt
+$SRC_H5DIFF_TESTFILES/h5diff_516.txt
+$SRC_H5DIFF_TESTFILES/h5diff_517.txt
+$SRC_H5DIFF_TESTFILES/h5diff_518.txt
+$SRC_H5DIFF_TESTFILES/h5diff_530.txt
+$SRC_H5DIFF_TESTFILES/h5diff_540.txt
+$SRC_H5DIFF_TESTFILES/h5diff_600.txt
+$SRC_H5DIFF_TESTFILES/h5diff_601.txt
+$SRC_H5DIFF_TESTFILES/h5diff_603.txt
+$SRC_H5DIFF_TESTFILES/h5diff_604.txt
+$SRC_H5DIFF_TESTFILES/h5diff_605.txt
+$SRC_H5DIFF_TESTFILES/h5diff_606.txt
+$SRC_H5DIFF_TESTFILES/h5diff_607.txt
+$SRC_H5DIFF_TESTFILES/h5diff_608.txt
+$SRC_H5DIFF_TESTFILES/h5diff_609.txt
+$SRC_H5DIFF_TESTFILES/h5diff_610.txt
+$SRC_H5DIFF_TESTFILES/h5diff_612.txt
+$SRC_H5DIFF_TESTFILES/h5diff_613.txt
+$SRC_H5DIFF_TESTFILES/h5diff_614.txt
+$SRC_H5DIFF_TESTFILES/h5diff_615.txt
+$SRC_H5DIFF_TESTFILES/h5diff_616.txt
+$SRC_H5DIFF_TESTFILES/h5diff_617.txt
+$SRC_H5DIFF_TESTFILES/h5diff_618.txt
+$SRC_H5DIFF_TESTFILES/h5diff_619.txt
+$SRC_H5DIFF_TESTFILES/h5diff_621.txt
+$SRC_H5DIFF_TESTFILES/h5diff_622.txt
+$SRC_H5DIFF_TESTFILES/h5diff_623.txt
+$SRC_H5DIFF_TESTFILES/h5diff_624.txt
+$SRC_H5DIFF_TESTFILES/h5diff_625.txt
+$SRC_H5DIFF_TESTFILES/h5diff_626.txt
+$SRC_H5DIFF_TESTFILES/h5diff_627.txt
+$SRC_H5DIFF_TESTFILES/h5diff_628.txt
+$SRC_H5DIFF_TESTFILES/h5diff_629.txt
+$SRC_H5DIFF_TESTFILES/h5diff_630.txt
+$SRC_H5DIFF_TESTFILES/h5diff_631.txt
+$SRC_H5DIFF_TESTFILES/h5diff_640.txt
+$SRC_H5DIFF_TESTFILES/h5diff_641.txt
+$SRC_H5DIFF_TESTFILES/h5diff_642.txt
+$SRC_H5DIFF_TESTFILES/h5diff_643.txt
+$SRC_H5DIFF_TESTFILES/h5diff_644.txt
+$SRC_H5DIFF_TESTFILES/h5diff_645.txt
+$SRC_H5DIFF_TESTFILES/h5diff_646.txt
+$SRC_H5DIFF_TESTFILES/h5diff_70.txt
+$SRC_H5DIFF_TESTFILES/h5diff_700.txt
+$SRC_H5DIFF_TESTFILES/h5diff_701.txt
+$SRC_H5DIFF_TESTFILES/h5diff_702.txt
+$SRC_H5DIFF_TESTFILES/h5diff_703.txt
+$SRC_H5DIFF_TESTFILES/h5diff_704.txt
+$SRC_H5DIFF_TESTFILES/h5diff_705.txt
+$SRC_H5DIFF_TESTFILES/h5diff_706.txt
+$SRC_H5DIFF_TESTFILES/h5diff_707.txt
+$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_90.txt
+"
+
+#
+# copy test files and expected output files from source dirs to test dir
+#
+COPY_TESTFILES="$LIST_HDF5_TEST_FILES $LIST_OTHER_TEST_FILES $LIST_HDF5_TEST_FILES_XML $LIST_OTHER_TEST_FILES_XML"
+
+COPY_TESTFILES_TO_TESTDIR()
+{
+ # copy test files. Used -f to make sure get a new copy
+ for tstfile in $COPY_TESTFILES
+ do
+ # ignore '#' comment
+ echo $tstfile | tr -d ' ' | grep '^#' > /dev/null
+ RET=$?
+ if [ $RET -eq 1 ]; then
+ if [ -a $tstfile ]; then
+ $CP -f $tstfile $TESTDIR
+ else
+ echo "Error: FAILED to copy $tstfile ."
+ echo " $tstfile doesn't exist!"
+
+ # Comment out this to CREATE expected file
+ exit $EXIT_FAILURE
+ fi
+ fi
+ done
+}
# Parse option
# -p run ph5diff tests
@@ -140,80 +362,8 @@ TESTING() {
echo "Testing $* $SPACES" | cut -c1-70 | tr -d '\012'
}
-# Some systems will dump some messages to stdout for various reasons.
-# Remove them from the stdout result file.
-# $1 is the file name of the file to be filtered.
-# Cases of filter needed:
-# 1. Sandia Red-Storm
-# yod always prints these two lines at the beginning.
-# LibLustre: NAL NID: 0004a605 (5)
-# Lustre: OBD class driver Build Version: 1, info@clusterfs.com
-# 2. LANL Lambda
-# mpijob mirun -np always add an extra line at the end like:
-# P4 procgroup file is /users/acheng/.lsbatch/host10524.l82
-STDOUT_FILTER() {
- result_file=$1
- tmp_file=/tmp/h5test_tmp_$$
- # Filter Sandia Red-Storm yod messages.
- cp $result_file $tmp_file
- sed -e '/^LibLustre:/d' -e '/^Lustre:/d' \
- < $tmp_file > $result_file
- # Filter LANL Lambda mpirun message.
- cp $result_file $tmp_file
- sed -e '/^P4 procgroup file is/d' \
- < $tmp_file > $result_file
- # cleanup
- rm -f $tmp_file
-}
-
-# Some systems will dump some messages to stderr for various reasons.
-# Remove them from the stderr result file.
-# $1 is the file name of the file to be filtered.
-# Cases of filter needed:
-# 1. MPE:
-# In parallel mode and if MPE library is used, it prints the following
-# two message lines whether the MPE tracing is used or not.
-# Writing logfile.
-# Finished writing logfile.
-# 2. LANL MPI:
-# The LANL MPI will print some messages like the following,
-# LA-MPI: *** mpirun (1.5.10)
-# LA-MPI: *** 3 process(es) on 2 host(s): 2*fln21 1*fln22
-# LA-MPI: *** libmpi (1.5.10)
-# LA-MPI: *** Copyright 2001-2004, ACL, Los Alamos National Laboratory
-# 3. h5diff debug output:
-# Debug output all have prefix "h5diff debug: ".
-# 4. AIX system prints messages like these when it is aborting:
-# ERROR: 0031-300 Forcing all remote tasks to exit due to exit code 1 in task 0
-# ERROR: 0031-250 task 4: Terminated
-# ERROR: 0031-250 task 3: Terminated
-# ERROR: 0031-250 task 2: Terminated
-# ERROR: 0031-250 task 1: Terminated
-
-STDERR_FILTER() {
- result_file=$1
- tmp_file=/tmp/h5test_tmp_$$
- # Filter MPE messages
- if test -n "$pmode"; then
- cp $result_file $tmp_file
- sed -e '/^Writing logfile./d' -e '/^Finished writing logfile./d' \
- < $tmp_file > $result_file
- fi
- # Filter LANL MPI messages
- # and LLNL srun messages
- # and AIX error messages
- if test -n "$pmode"; then
- cp $result_file $tmp_file
- sed -e '/^LA-MPI:/d' -e '/^srun:/d' -e '/^ERROR:/d' \
- < $tmp_file > $result_file
- fi
- # Filter h5diff debug output
- cp $result_file $tmp_file
- sed -e '/^h5diff debug: /d' \
- < $tmp_file > $result_file
- # clean up temporary files.
- rm -f $tmp_file
-}
+# Source in the output filter function definitions.
+. $srcdir/../../bin/output_filter.sh
# Run a test and print PASS or *FAIL*. If a test fails then increment
# the `nerrors' global variable and (if $verbose is set) display the
@@ -229,9 +379,9 @@ STDERR_FILTER() {
# that throws the shell script off.
#
TOOLTEST() {
- expect="$srcdir/testfiles/$1"
- actual="./testfiles/`basename $1 .txt`.out"
- actual_err="./testfiles/`basename $1 .txt`.err"
+ expect="$TESTDIR/$1"
+ actual="$TESTDIR/`basename $1 .txt`.out"
+ actual_err="$TESTDIR/`basename $1 .txt`.err"
actual_sav=${actual}-sav
actual_err_sav=${actual_err}-sav
shift
@@ -247,7 +397,7 @@ TOOLTEST() {
#echo "#############################"
#echo "Expected output for '$H5DIFF $@'"
#echo "#############################"
- cd $srcdir/testfiles
+ cd $TESTDIR
eval $RUNCMD $H5DIFF_BIN "$@"
) >$actual 2>$actual_err
EXIT_CODE=$?
@@ -329,6 +479,8 @@ SKIP() {
# is done first in
# TESTING with the name only of the test file $TOOL, not its full path $TESTFILE
##############################################################################
+# prepare for test
+COPY_TESTFILES_TO_TESTDIR
# ############################################################################
# # Common usage
@@ -338,43 +490,43 @@ SKIP() {
TOOLTEST h5diff_10.txt -h
# 1.1 normal mode
-TOOLTEST h5diff_11.txt $FILE1 $FILE2
+TOOLTEST h5diff_11.txt h5diff_basic1.h5 h5diff_basic2.h5
# 1.2 normal mode with objects
-TOOLTEST h5diff_12.txt $FILE1 $FILE2 g1/dset1 g1/dset2
+TOOLTEST h5diff_12.txt h5diff_basic1.h5 h5diff_basic2.h5 g1/dset1 g1/dset2
# 1.3 report mode
-TOOLTEST h5diff_13.txt -r $FILE1 $FILE2
+TOOLTEST h5diff_13.txt -r h5diff_basic1.h5 h5diff_basic2.h5
# 1.4 report mode with objects
-TOOLTEST h5diff_14.txt -r $FILE1 $FILE2 g1/dset1 g1/dset2
+TOOLTEST h5diff_14.txt -r h5diff_basic1.h5 h5diff_basic2.h5 g1/dset1 g1/dset2
# 1.5 with -d
-TOOLTEST h5diff_15.txt --report --delta=5 $FILE1 $FILE2 g1/dset3 g1/dset4
+TOOLTEST h5diff_15.txt --report --delta=5 h5diff_basic1.h5 h5diff_basic2.h5 g1/dset3 g1/dset4
# 1.6.1 with -p (int)
-TOOLTEST h5diff_16_1.txt -v -p 0.02 $FILE1 $FILE1 g1/dset5 g1/dset6
+TOOLTEST h5diff_16_1.txt -v -p 0.02 h5diff_basic1.h5 h5diff_basic1.h5 g1/dset5 g1/dset6
# 1.6.2 with -p (unsigned long_long)
-TOOLTEST h5diff_16_2.txt --verbose --relative=0.02 $FILE1 $FILE1 g1/dset7 g1/dset8
+TOOLTEST h5diff_16_2.txt --verbose --relative=0.02 h5diff_basic1.h5 h5diff_basic1.h5 g1/dset7 g1/dset8
# 1.6.3 with -p (double)
-TOOLTEST h5diff_16_3.txt -v -p 0.02 $FILE1 $FILE1 g1/dset9 g1/dset10
+TOOLTEST h5diff_16_3.txt -v -p 0.02 h5diff_basic1.h5 h5diff_basic1.h5 g1/dset9 g1/dset10
# 1.7 verbose mode
-TOOLTEST h5diff_17.txt -v $FILE1 $FILE2
+TOOLTEST h5diff_17.txt -v h5diff_basic1.h5 h5diff_basic2.h5
# 1.7 test 32-bit INFINITY
-TOOLTEST h5diff_171.txt -v $FILE1 $FILE1 /g1/fp19
+TOOLTEST h5diff_171.txt -v h5diff_basic1.h5 h5diff_basic1.h5 /g1/fp19 /g1/fp19_COPY
# 1.7 test 64-bit INFINITY
-TOOLTEST h5diff_172.txt -v $FILE1 $FILE1 /g1/fp20
+TOOLTEST h5diff_172.txt -v h5diff_basic1.h5 h5diff_basic1.h5 /g1/fp20 /g1/fp20_COPY
# 1.8 quiet mode
-TOOLTEST h5diff_18.txt -q $FILE1 $FILE2
+TOOLTEST h5diff_18.txt -q h5diff_basic1.h5 h5diff_basic2.h5
# 1.8 -v and -q
-TOOLTEST h5diff_18_1.txt -v -q $FILE1 $FILE2
+TOOLTEST h5diff_18_1.txt -v -q h5diff_basic1.h5 h5diff_basic2.h5
# ##############################################################################
@@ -382,35 +534,45 @@ TOOLTEST h5diff_18_1.txt -v -q $FILE1 $FILE2
# ##############################################################################
# 2.0
-TOOLTEST h5diff_20.txt -v $FILE3 $FILE3 dset g1
+TOOLTEST h5diff_20.txt -v h5diff_types.h5 h5diff_types.h5 dset g1
# 2.1
-TOOLTEST h5diff_21.txt -v $FILE3 $FILE3 dset l1
+TOOLTEST h5diff_21.txt -v h5diff_types.h5 h5diff_types.h5 dset l1
# 2.2
-TOOLTEST h5diff_22.txt -v $FILE3 $FILE3 dset t1
+TOOLTEST h5diff_22.txt -v h5diff_types.h5 h5diff_types.h5 dset t1
# ##############################################################################
# # compare groups, types, links (no differences and differences)
# ##############################################################################
# 2.3
-TOOLTEST h5diff_23.txt -v $FILE3 $FILE3 g1 g1
+TOOLTEST h5diff_23.txt -v h5diff_types.h5 h5diff_types.h5 g1 g1
# 2.4
-TOOLTEST h5diff_24.txt -v $FILE3 $FILE3 t1 t1
+TOOLTEST h5diff_24.txt -v h5diff_types.h5 h5diff_types.h5 t1 t1
# 2.5
-TOOLTEST h5diff_25.txt -v $FILE3 $FILE3 l1 l1
+TOOLTEST h5diff_25.txt -v h5diff_types.h5 h5diff_types.h5 l1 l1
# 2.6
-TOOLTEST h5diff_26.txt -v $FILE3 $FILE3 g1 g2
+TOOLTEST h5diff_26.txt -v h5diff_types.h5 h5diff_types.h5 g1 g2
# 2.7
-TOOLTEST h5diff_27.txt -v $FILE3 $FILE3 t1 t2
+TOOLTEST h5diff_27.txt -v h5diff_types.h5 h5diff_types.h5 t1 t2
# 2.8
-TOOLTEST h5diff_28.txt -v $FILE3 $FILE3 l1 l2
+TOOLTEST h5diff_28.txt -v h5diff_types.h5 h5diff_types.h5 l1 l2
+
+
+# ##############################################################################
+# # Enum value tests (may become more comprehensive in the future)
+# ##############################################################################
+
+# 3.0
+# test enum types which may have invalid values
+TOOLTEST h5diff_30.txt -v h5diff_enum_invalid_values.h5 h5diff_enum_invalid_values.h5 dset1 dset2
+
@@ -419,31 +581,31 @@ TOOLTEST h5diff_28.txt -v $FILE3 $FILE3 l1 l2
# ##############################################################################
# 5.0
-TOOLTEST h5diff_50.txt -v $FILE4 $FILE4 dset0a dset0b
+TOOLTEST h5diff_50.txt -v h5diff_dtypes.h5 h5diff_dtypes.h5 dset0a dset0b
# 5.1
-TOOLTEST h5diff_51.txt -v $FILE4 $FILE4 dset1a dset1b
+TOOLTEST h5diff_51.txt -v h5diff_dtypes.h5 h5diff_dtypes.h5 dset1a dset1b
# 5.2
-TOOLTEST h5diff_52.txt -v $FILE4 $FILE4 dset2a dset2b
+TOOLTEST h5diff_52.txt -v h5diff_dtypes.h5 h5diff_dtypes.h5 dset2a dset2b
# 5.3
-TOOLTEST h5diff_53.txt -v $FILE4 $FILE4 dset3a dset4b
+TOOLTEST h5diff_53.txt -v h5diff_dtypes.h5 h5diff_dtypes.h5 dset3a dset4b
# 5.4
-TOOLTEST h5diff_54.txt -v $FILE4 $FILE4 dset4a dset4b
+TOOLTEST h5diff_54.txt -v h5diff_dtypes.h5 h5diff_dtypes.h5 dset4a dset4b
# 5.5
-TOOLTEST h5diff_55.txt -v $FILE4 $FILE4 dset5a dset5b
+TOOLTEST h5diff_55.txt -v h5diff_dtypes.h5 h5diff_dtypes.h5 dset5a dset5b
# 5.6
-TOOLTEST h5diff_56.txt -v $FILE4 $FILE4 dset6a dset6b
+TOOLTEST h5diff_56.txt -v h5diff_dtypes.h5 h5diff_dtypes.h5 dset6a dset6b
# 5.7
-TOOLTEST h5diff_57.txt -v $FILE4 $FILE4 dset7a dset7b
+TOOLTEST h5diff_57.txt -v h5diff_dtypes.h5 h5diff_dtypes.h5 dset7a dset7b
# 5.8 (region reference)
-TOOLTEST h5diff_58.txt -v $FILE7 $FILE8 refreg
+TOOLTEST h5diff_58.txt -v h5diff_dset1.h5 h5diff_dset2.h5 refreg
# ##############################################################################
# # Error messages
@@ -451,10 +613,10 @@ TOOLTEST h5diff_58.txt -v $FILE7 $FILE8 refreg
# 6.0: Check if the command line number of arguments is less than 3
-TOOLTEST h5diff_600.txt $FILE1
+TOOLTEST h5diff_600.txt h5diff_basic1.h5
# 6.1: Check if non-exist object name is specified
-TOOLTEST h5diff_601.txt $FILE1 $FILE1 nono_obj
+TOOLTEST h5diff_601.txt h5diff_basic1.h5 h5diff_basic1.h5 nono_obj
# ##############################################################################
@@ -463,28 +625,28 @@ TOOLTEST h5diff_601.txt $FILE1 $FILE1 nono_obj
# 6.3: negative value
-TOOLTEST h5diff_603.txt -d -4 $FILE1 $FILE2 g1/dset3 g1/dset4
+TOOLTEST h5diff_603.txt -d -4 h5diff_basic1.h5 h5diff_basic2.h5 g1/dset3 g1/dset4
# 6.4: zero
-TOOLTEST h5diff_604.txt -d 0 $FILE1 $FILE2 g1/dset3 g1/dset4
+TOOLTEST h5diff_604.txt -d 0 h5diff_basic1.h5 h5diff_basic2.h5 g1/dset3 g1/dset4
# 6.5: non number
-TOOLTEST h5diff_605.txt -d u $FILE1 $FILE2 g1/dset3 g1/dset4
+TOOLTEST h5diff_605.txt -d u h5diff_basic1.h5 h5diff_basic2.h5 g1/dset3 g1/dset4
# 6.6: hexadecimal
-TOOLTEST h5diff_606.txt -d 0x1 $FILE1 $FILE2 g1/dset3 g1/dset4
+TOOLTEST h5diff_606.txt -d 0x1 h5diff_basic1.h5 h5diff_basic2.h5 g1/dset3 g1/dset4
# 6.7: string
-TOOLTEST h5diff_607.txt -d "1" $FILE1 $FILE2 g1/dset3 g1/dset4
+TOOLTEST h5diff_607.txt -d "1" h5diff_basic1.h5 h5diff_basic2.h5 g1/dset3 g1/dset4
# 6.8: use system epsilon
-TOOLTEST h5diff_608.txt --use-system-epsilon $FILE1 $FILE2 g1/dset3 g1/dset4
+TOOLTEST h5diff_608.txt --use-system-epsilon h5diff_basic1.h5 h5diff_basic2.h5 g1/dset3 g1/dset4
# 6.9: number larger than biggest difference
-TOOLTEST h5diff_609.txt -d 200 $FILE1 $FILE2 g1/dset3 g1/dset4
+TOOLTEST h5diff_609.txt -d 200 h5diff_basic1.h5 h5diff_basic2.h5 g1/dset3 g1/dset4
# 6.10: number smaller than smallest difference
-TOOLTEST h5diff_610.txt -d 1 $FILE1 $FILE2 g1/dset3 g1/dset4
+TOOLTEST h5diff_610.txt -d 1 h5diff_basic1.h5 h5diff_basic2.h5 g1/dset3 g1/dset4
# ##############################################################################
@@ -493,28 +655,28 @@ TOOLTEST h5diff_610.txt -d 1 $FILE1 $FILE2 g1/dset3 g1/dset4
# 6.12: negative value
-TOOLTEST h5diff_612.txt -p -4 $FILE1 $FILE2 g1/dset3 g1/dset4
+TOOLTEST h5diff_612.txt -p -4 h5diff_basic1.h5 h5diff_basic2.h5 g1/dset3 g1/dset4
# 6.13: zero
-TOOLTEST h5diff_613.txt -p 0 $FILE1 $FILE2 g1/dset3 g1/dset4
+TOOLTEST h5diff_613.txt -p 0 h5diff_basic1.h5 h5diff_basic2.h5 g1/dset3 g1/dset4
# 6.14: non number
-TOOLTEST h5diff_614.txt -p u $FILE1 $FILE2 g1/dset3 g1/dset4
+TOOLTEST h5diff_614.txt -p u h5diff_basic1.h5 h5diff_basic2.h5 g1/dset3 g1/dset4
# 6.15: hexadecimal
-TOOLTEST h5diff_615.txt -p 0x1 $FILE1 $FILE2 g1/dset3 g1/dset4
+TOOLTEST h5diff_615.txt -p 0x1 h5diff_basic1.h5 h5diff_basic2.h5 g1/dset3 g1/dset4
# 6.16: string
-TOOLTEST h5diff_616.txt -p "0.21" $FILE1 $FILE2 g1/dset3 g1/dset4
+TOOLTEST h5diff_616.txt -p "0.21" h5diff_basic1.h5 h5diff_basic2.h5 g1/dset3 g1/dset4
# 6.17: repeated option
-TOOLTEST h5diff_617.txt -p 0.21 -p 0.22 $FILE1 $FILE2 g1/dset3 g1/dset4
+TOOLTEST h5diff_617.txt -p 0.21 -p 0.22 h5diff_basic1.h5 h5diff_basic2.h5 g1/dset3 g1/dset4
# 6.18: number larger than biggest difference
-TOOLTEST h5diff_618.txt -p 2 $FILE1 $FILE2 g1/dset3 g1/dset4
+TOOLTEST h5diff_618.txt -p 2 h5diff_basic1.h5 h5diff_basic2.h5 g1/dset3 g1/dset4
# 6.19: number smaller than smallest difference
-TOOLTEST h5diff_619.txt -p 0.005 $FILE1 $FILE2 g1/dset3 g1/dset4
+TOOLTEST h5diff_619.txt -p 0.005 h5diff_basic1.h5 h5diff_basic2.h5 g1/dset3 g1/dset4
@@ -523,204 +685,232 @@ TOOLTEST h5diff_619.txt -p 0.005 $FILE1 $FILE2 g1/dset3 g1/dset4
# ##############################################################################
# 6.21: negative value
-TOOLTEST h5diff_621.txt -n -4 $FILE1 $FILE2 g1/dset3 g1/dset4
+TOOLTEST h5diff_621.txt -n -4 h5diff_basic1.h5 h5diff_basic2.h5 g1/dset3 g1/dset4
# 6.22: zero
-TOOLTEST h5diff_622.txt -n 0 $FILE1 $FILE2 g1/dset3 g1/dset4
+TOOLTEST h5diff_622.txt -n 0 h5diff_basic1.h5 h5diff_basic2.h5 g1/dset3 g1/dset4
# 6.23: non number
-TOOLTEST h5diff_623.txt -n u $FILE1 $FILE2 g1/dset3 g1/dset4
+TOOLTEST h5diff_623.txt -n u h5diff_basic1.h5 h5diff_basic2.h5 g1/dset3 g1/dset4
# 6.24: hexadecimal
-TOOLTEST h5diff_624.txt -n 0x1 $FILE1 $FILE2 g1/dset3 g1/dset4
+TOOLTEST h5diff_624.txt -n 0x1 h5diff_basic1.h5 h5diff_basic2.h5 g1/dset3 g1/dset4
# 6.25: string
-TOOLTEST h5diff_625.txt -n "2" $FILE1 $FILE2 g1/dset3 g1/dset4
+TOOLTEST h5diff_625.txt -n "2" h5diff_basic1.h5 h5diff_basic2.h5 g1/dset3 g1/dset4
# 6.26: repeated option
-TOOLTEST h5diff_626.txt -n 2 -n 3 $FILE1 $FILE2 g1/dset3 g1/dset4
+TOOLTEST h5diff_626.txt -n 2 -n 3 h5diff_basic1.h5 h5diff_basic2.h5 g1/dset3 g1/dset4
# 6.27: number larger than biggest difference
-TOOLTEST h5diff_627.txt --count=200 $FILE1 $FILE2 g1/dset3 g1/dset4
+TOOLTEST h5diff_627.txt --count=200 h5diff_basic1.h5 h5diff_basic2.h5 g1/dset3 g1/dset4
# 6.28: number smaller than smallest difference
-TOOLTEST h5diff_628.txt -n 1 $FILE1 $FILE2 g1/dset3 g1/dset4
+TOOLTEST h5diff_628.txt -n 1 h5diff_basic1.h5 h5diff_basic2.h5 g1/dset3 g1/dset4
# Disabling this test as it hangs - LRK 20090618
# 6.29 non valid files
#TOOLTEST h5diff_629.txt file1.h6 file2.h6
+# ##############################################################################
+# # NaN
+# ##############################################################################
+# 6.30: test (NaN == NaN) must be true based on our documentation -- XCAO
+TOOLTEST h5diff_630.txt -v -d "0.0001" h5diff_basic1.h5 h5diff_basic1.h5 g1/fp18 g1/fp18_COPY
+TOOLTEST h5diff_631.txt -v --use-system-epsilon h5diff_basic1.h5 h5diff_basic1.h5 g1/fp18 g1/fp18_COPY
+
# ##############################################################################
# 7. attributes
# ##############################################################################
-TOOLTEST h5diff_70.txt -v $FILE5 $FILE6
+TOOLTEST h5diff_70.txt -v h5diff_attr1.h5 h5diff_attr2.h5
# ##################################################
# attrs with verbose option level
# ##################################################
-TOOLTEST h5diff_700.txt -v1 $FILE5 $FILE6
-TOOLTEST h5diff_701.txt -v2 $FILE5 $FILE6
-TOOLTEST h5diff_702.txt --verbose=1 $FILE5 $FILE6
-TOOLTEST h5diff_703.txt --verbose=2 $FILE5 $FILE6
+TOOLTEST h5diff_700.txt -v1 h5diff_attr1.h5 h5diff_attr2.h5
+TOOLTEST h5diff_701.txt -v2 h5diff_attr1.h5 h5diff_attr2.h5
+TOOLTEST h5diff_702.txt --verbose=1 h5diff_attr1.h5 h5diff_attr2.h5
+TOOLTEST h5diff_703.txt --verbose=2 h5diff_attr1.h5 h5diff_attr2.h5
# same attr number , all same attr name
-TOOLTEST h5diff_704.txt -v2 $ATTR_VERBOSE_LEVEL_FILE1 $ATTR_VERBOSE_LEVEL_FILE2 /g
+TOOLTEST h5diff_704.txt -v2 h5diff_attr_v_level1.h5 h5diff_attr_v_level2.h5 /g
# same attr number , some same attr name
-TOOLTEST h5diff_705.txt -v2 $ATTR_VERBOSE_LEVEL_FILE1 $ATTR_VERBOSE_LEVEL_FILE2 /dset
+TOOLTEST h5diff_705.txt -v2 h5diff_attr_v_level1.h5 h5diff_attr_v_level2.h5 /dset
# same attr number , all different attr name
-TOOLTEST h5diff_706.txt -v2 $ATTR_VERBOSE_LEVEL_FILE1 $ATTR_VERBOSE_LEVEL_FILE2 /ntype
+TOOLTEST h5diff_706.txt -v2 h5diff_attr_v_level1.h5 h5diff_attr_v_level2.h5 /ntype
# different attr number , same attr name (intersected)
-TOOLTEST h5diff_707.txt -v2 $ATTR_VERBOSE_LEVEL_FILE1 $ATTR_VERBOSE_LEVEL_FILE2 /g2
+TOOLTEST h5diff_707.txt -v2 h5diff_attr_v_level1.h5 h5diff_attr_v_level2.h5 /g2
# different attr number , all different attr name
-TOOLTEST h5diff_708.txt -v2 $ATTR_VERBOSE_LEVEL_FILE1 $ATTR_VERBOSE_LEVEL_FILE2 /g3
+TOOLTEST h5diff_708.txt -v2 h5diff_attr_v_level1.h5 h5diff_attr_v_level2.h5 /g3
# when no attributes exist in both objects
-TOOLTEST h5diff_709.txt -v2 $ATTR_VERBOSE_LEVEL_FILE1 $ATTR_VERBOSE_LEVEL_FILE2 /g4
+TOOLTEST h5diff_709.txt -v2 h5diff_attr_v_level1.h5 h5diff_attr_v_level2.h5 /g4
# file vs file
-TOOLTEST h5diff_710.txt -v2 $ATTR_VERBOSE_LEVEL_FILE1 $ATTR_VERBOSE_LEVEL_FILE2
+TOOLTEST h5diff_710.txt -v2 h5diff_attr_v_level1.h5 h5diff_attr_v_level2.h5
# ##############################################################################
# 8. all dataset datatypes
# ##############################################################################
-TOOLTEST h5diff_80.txt -v $FILE7 $FILE8
+TOOLTEST h5diff_80.txt -v h5diff_dset1.h5 h5diff_dset2.h5
# 9. compare a file with itself
-TOOLTEST h5diff_90.txt -v $FILE2 $FILE2
+TOOLTEST h5diff_90.txt -v h5diff_basic2.h5 h5diff_basic2.h5
# 10. read by hyperslab, print indexes
if test -n "$pmode" -a "$mydomainname" = hdfgroup.uiuc.edu; then
# skip this test which sometimes hangs in some THG machines
- SKIP -v $FILE9 $FILE10
+ SKIP -v h5diff_hyper1.h5 h5diff_hyper2.h5
else
- TOOLTEST h5diff_100.txt -v $FILE9 $FILE10
+ TOOLTEST h5diff_100.txt -v h5diff_hyper1.h5 h5diff_hyper2.h5
fi
# 11. floating point comparison
# double value
-TOOLTEST h5diff_101.txt -v $FILE1 $FILE1 g1/d1 g1/d2
+TOOLTEST h5diff_101.txt -v h5diff_basic1.h5 h5diff_basic1.h5 g1/d1 g1/d2
# float value
-TOOLTEST h5diff_102.txt -v $FILE1 $FILE1 g1/fp1 g1/fp2
+TOOLTEST h5diff_102.txt -v h5diff_basic1.h5 h5diff_basic1.h5 g1/fp1 g1/fp2
# with --use-system-epsilon for double value
-TOOLTEST h5diff_103.txt -v --use-system-epsilon $FILE1 $FILE1 g1/d1 g1/d2
+TOOLTEST h5diff_103.txt -v --use-system-epsilon h5diff_basic1.h5 h5diff_basic1.h5 g1/d1 g1/d2
# with --use-system-epsilon for float value
-TOOLTEST h5diff_104.txt -v --use-system-epsilon $FILE1 $FILE1 g1/fp1 g1/fp2
+TOOLTEST h5diff_104.txt -v --use-system-epsilon h5diff_basic1.h5 h5diff_basic1.h5 g1/fp1 g1/fp2
# not comparable -c flag
-TOOLTEST h5diff_200.txt $FILE2 $FILE2 g2/dset1 g2/dset2
-
-TOOLTEST h5diff_201.txt -c $FILE2 $FILE2 g2/dset1 g2/dset2
+TOOLTEST h5diff_200.txt h5diff_basic2.h5 h5diff_basic2.h5 g2/dset1 g2/dset2
-TOOLTEST h5diff_202.txt -c $FILE2 $FILE2 g2/dset2 g2/dset3
+TOOLTEST h5diff_201.txt -c h5diff_basic2.h5 h5diff_basic2.h5 g2/dset1 g2/dset2
-TOOLTEST h5diff_203.txt -c $FILE2 $FILE2 g2/dset3 g2/dset4
+TOOLTEST h5diff_202.txt -c h5diff_basic2.h5 h5diff_basic2.h5 g2/dset2 g2/dset3
-TOOLTEST h5diff_204.txt -c $FILE2 $FILE2 g2/dset4 g2/dset5
+TOOLTEST h5diff_203.txt -c h5diff_basic2.h5 h5diff_basic2.h5 g2/dset3 g2/dset4
-TOOLTEST h5diff_205.txt -c $FILE2 $FILE2 g2/dset5 g2/dset6
+TOOLTEST h5diff_204.txt -c h5diff_basic2.h5 h5diff_basic2.h5 g2/dset4 g2/dset5
+TOOLTEST h5diff_205.txt -c h5diff_basic2.h5 h5diff_basic2.h5 g2/dset5 g2/dset6
# not comparable in compound
-TOOLTEST h5diff_206.txt -c $FILE2 $FILE2 g2/dset7 g2/dset8
+TOOLTEST h5diff_206.txt -c h5diff_basic2.h5 h5diff_basic2.h5 g2/dset7 g2/dset8
-TOOLTEST h5diff_207.txt -c $FILE2 $FILE2 g2/dset8 g2/dset9
+TOOLTEST h5diff_207.txt -c h5diff_basic2.h5 h5diff_basic2.h5 g2/dset8 g2/dset9
+# not comparable in dataspace of zero dimension size
+TOOLTEST h5diff_208.txt -c h5diff_dset_zero_dim_size1.h5 h5diff_dset_zero_dim_size2.h5
+
+# non-comparable dataset with comparable attribute, and other comparable datasets.
+# Also test non-compatible attributes with different type, dimention, rank.
+# All the comparables should display differences.
+TOOLTEST h5diff_220.txt -c non_comparables1.h5 non_comparables2.h5 /g1
+
+# comparable dataset with non-comparable attribute and other comparable attributes.
+# All the comparables should display differences.
+TOOLTEST h5diff_221.txt -c non_comparables1.h5 non_comparables2.h5 /g2
+
+# entire file
+# All the comparables should display differences.
+if test -n "$pmode" -a "$mydomainname" = hdfgroup.uiuc.edu; then
+ # parallel mode:
+ # skip due to ph5diff hangs on koala (linux64-LE) randomly.
+ SKIP -c non_comparables1.h5 non_comparables2.h5
+else
+ TOOLTEST h5diff_222.txt -c non_comparables1.h5 non_comparables2.h5
+fi
+
# ##############################################################################
# # Links compare without --follow-symlinks nor --no-dangling-links
# ##############################################################################
# test for bug1749
-TOOLTEST h5diff_300.txt -v $FILE12 $FILE12 /link_g1 /link_g2
+TOOLTEST h5diff_300.txt -v h5diff_links.h5 h5diff_links.h5 /link_g1 /link_g2
# ##############################################################################
# # Links compare with --follow-symlinks Only
# ##############################################################################
# soft links file to file
-TOOLTEST h5diff_400.txt --follow-symlinks -v $FILE13 $FILE13
+TOOLTEST h5diff_400.txt --follow-symlinks -v h5diff_softlinks.h5 h5diff_softlinks.h5
# softlink vs dset"
-TOOLTEST h5diff_401.txt --follow-symlinks -v $FILE13 $FILE13 /softlink_dset1_1 /target_dset2
+TOOLTEST h5diff_401.txt --follow-symlinks -v h5diff_softlinks.h5 h5diff_softlinks.h5 /softlink_dset1_1 /target_dset2
# dset vs softlink"
-TOOLTEST h5diff_402.txt --follow-symlinks -v $FILE13 $FILE13 /target_dset2 /softlink_dset1_1
+TOOLTEST h5diff_402.txt --follow-symlinks -v h5diff_softlinks.h5 h5diff_softlinks.h5 /target_dset2 /softlink_dset1_1
# softlink vs softlink"
-TOOLTEST h5diff_403.txt --follow-symlinks -v $FILE13 $FILE13 /softlink_dset1_1 /softlink_dset2
+TOOLTEST h5diff_403.txt --follow-symlinks -v h5diff_softlinks.h5 h5diff_softlinks.h5 /softlink_dset1_1 /softlink_dset2
# extlink vs extlink (FILE)"
-TOOLTEST h5diff_404.txt --follow-symlinks -v $FILE15 $FILE15
+TOOLTEST h5diff_404.txt --follow-symlinks -v h5diff_extlink_src.h5 h5diff_extlink_src.h5
# extlink vs dset"
-TOOLTEST h5diff_405.txt --follow-symlinks -v $FILE15 $FILE16 /ext_link_dset1 /target_group2/x_dset
+TOOLTEST h5diff_405.txt --follow-symlinks -v h5diff_extlink_src.h5 h5diff_extlink_trg.h5 /ext_link_dset1 /target_group2/x_dset
# dset vs extlink"
-TOOLTEST h5diff_406.txt --follow-symlinks -v $FILE16 $FILE15 /target_group2/x_dset /ext_link_dset1
+TOOLTEST h5diff_406.txt --follow-symlinks -v h5diff_extlink_trg.h5 h5diff_extlink_src.h5 /target_group2/x_dset /ext_link_dset1
# extlink vs extlink"
-TOOLTEST h5diff_407.txt --follow-symlinks -v $FILE15 $FILE15 /ext_link_dset1 /ext_link_dset2
+TOOLTEST h5diff_407.txt --follow-symlinks -v h5diff_extlink_src.h5 h5diff_extlink_src.h5 /ext_link_dset1 /ext_link_dset2
# softlink vs extlink"
-TOOLTEST h5diff_408.txt --follow-symlinks -v $FILE13 $FILE15 /softlink_dset1_1 /ext_link_dset2
+TOOLTEST h5diff_408.txt --follow-symlinks -v h5diff_softlinks.h5 h5diff_extlink_src.h5 /softlink_dset1_1 /ext_link_dset2
# extlink vs softlink "
-TOOLTEST h5diff_409.txt --follow-symlinks -v $FILE15 $FILE13 /ext_link_dset2 /softlink_dset1_1
+TOOLTEST h5diff_409.txt --follow-symlinks -v h5diff_extlink_src.h5 h5diff_softlinks.h5 /ext_link_dset2 /softlink_dset1_1
# linked_softlink vs linked_softlink (FILE)"
-TOOLTEST h5diff_410.txt --follow-symlinks -v $FILE14 $FILE14
+TOOLTEST h5diff_410.txt --follow-symlinks -v h5diff_linked_softlink.h5 h5diff_linked_softlink.h5
# dset2 vs linked_softlink_dset1"
-TOOLTEST h5diff_411.txt --follow-symlinks -v $FILE14 $FILE14 /target_dset2 /softlink1_to_slink2
+TOOLTEST h5diff_411.txt --follow-symlinks -v h5diff_linked_softlink.h5 h5diff_linked_softlink.h5 /target_dset2 /softlink1_to_slink2
# linked_softlink_dset1 vs dset2"
-TOOLTEST h5diff_412.txt --follow-symlinks -v $FILE14 $FILE14 /softlink1_to_slink2 /target_dset2
+TOOLTEST h5diff_412.txt --follow-symlinks -v h5diff_linked_softlink.h5 h5diff_linked_softlink.h5 /softlink1_to_slink2 /target_dset2
# linked_softlink_to_dset1 vs linked_softlink_to_dset2"
-TOOLTEST h5diff_413.txt --follow-symlinks -v $FILE14 $FILE14 /softlink1_to_slink2 /softlink2_to_slink2
+TOOLTEST h5diff_413.txt --follow-symlinks -v h5diff_linked_softlink.h5 h5diff_linked_softlink.h5 /softlink1_to_slink2 /softlink2_to_slink2
# group vs linked_softlink_group1"
-TOOLTEST h5diff_414.txt --follow-symlinks -v $FILE14 $FILE14 /target_group /softlink3_to_slink2
+TOOLTEST h5diff_414.txt --follow-symlinks -v h5diff_linked_softlink.h5 h5diff_linked_softlink.h5 /target_group /softlink3_to_slink2
# linked_softlink_group1 vs group"
-TOOLTEST h5diff_415.txt --follow-symlinks -v $FILE14 $FILE14 /softlink3_to_slink2 /target_group
+TOOLTEST h5diff_415.txt --follow-symlinks -v h5diff_linked_softlink.h5 h5diff_linked_softlink.h5 /softlink3_to_slink2 /target_group
# linked_softlink_to_group1 vs linked_softlink_to_group2"
-TOOLTEST h5diff_416.txt --follow-symlinks -v $FILE14 $FILE14 /softlink3_to_slink2 /softlink4_to_slink2
+TOOLTEST h5diff_416.txt --follow-symlinks -v h5diff_linked_softlink.h5 h5diff_linked_softlink.h5 /softlink3_to_slink2 /softlink4_to_slink2
# non-exist-softlink vs softlink"
-TOOLTEST h5diff_417.txt --follow-symlinks -v $FILE13 $FILE13 /softlink_noexist /softlink_dset2
+TOOLTEST h5diff_417.txt --follow-symlinks -v h5diff_softlinks.h5 h5diff_softlinks.h5 /softlink_noexist /softlink_dset2
# softlink vs non-exist-softlink"
-TOOLTEST h5diff_418.txt --follow-symlinks -v $FILE13 $FILE13 /softlink_dset2 /softlink_noexist
+TOOLTEST h5diff_418.txt --follow-symlinks -v h5diff_softlinks.h5 h5diff_softlinks.h5 /softlink_dset2 /softlink_noexist
# non-exist-extlink_file vs extlink"
-TOOLTEST h5diff_419.txt --follow-symlinks -v $FILE15 $FILE15 /ext_link_noexist2 /ext_link_dset2
+TOOLTEST h5diff_419.txt --follow-symlinks -v h5diff_extlink_src.h5 h5diff_extlink_src.h5 /ext_link_noexist2 /ext_link_dset2
# exlink vs non-exist-extlink_file"
-TOOLTEST h5diff_420.txt --follow-symlinks -v $FILE15 $FILE15 /ext_link_dset2 /ext_link_noexist2
+TOOLTEST h5diff_420.txt --follow-symlinks -v h5diff_extlink_src.h5 h5diff_extlink_src.h5 /ext_link_dset2 /ext_link_noexist2
# extlink vs non-exist-extlink_obj"
-TOOLTEST h5diff_421.txt --follow-symlinks -v $FILE15 $FILE15 /ext_link_dset2 /ext_link_noexist1
+TOOLTEST h5diff_421.txt --follow-symlinks -v h5diff_extlink_src.h5 h5diff_extlink_src.h5 /ext_link_dset2 /ext_link_noexist1
# non-exist-extlink_obj vs extlink"
-TOOLTEST h5diff_422.txt --follow-symlinks -v $FILE15 $FILE15 /ext_link_noexist1 /ext_link_dset2
+TOOLTEST h5diff_422.txt --follow-symlinks -v h5diff_extlink_src.h5 h5diff_extlink_src.h5 /ext_link_noexist1 /ext_link_dset2
# extlink_to_softlink_to_dset1 vs dset2"
-TOOLTEST h5diff_423.txt --follow-symlinks -v $FILE17 $FILE18 /ext_link_to_slink1 /dset2
+TOOLTEST h5diff_423.txt --follow-symlinks -v h5diff_ext2softlink_src.h5 h5diff_ext2softlink_trg.h5 /ext_link_to_slink1 /dset2
# dset2 vs extlink_to_softlink_to_dset1"
-TOOLTEST h5diff_424.txt --follow-symlinks -v $FILE18 $FILE17 /dset2 /ext_link_to_slink1
+TOOLTEST h5diff_424.txt --follow-symlinks -v h5diff_ext2softlink_trg.h5 h5diff_ext2softlink_src.h5 /dset2 /ext_link_to_slink1
# extlink_to_softlink_to_dset1 vs extlink_to_softlink_to_dset2"
-TOOLTEST h5diff_425.txt --follow-symlinks -v $FILE17 $FILE17 /ext_link_to_slink1 /ext_link_to_slink2
+TOOLTEST h5diff_425.txt --follow-symlinks -v h5diff_ext2softlink_src.h5 h5diff_ext2softlink_src.h5 /ext_link_to_slink1 /ext_link_to_slink2
# ##############################################################################
# 19. The comparision for the two datasets between the 2 files should be the same
@@ -733,83 +923,95 @@ TOOLTEST h5diff_idx.txt -v $FILE19 $FILE20
# # Dangling links compare (--follow-symlinks and --no-dangling-links)
# ##############################################################################
# dangling links --follow-symlinks (FILE to FILE)
-TOOLTEST h5diff_450.txt --follow-symlinks -v $DANGLE_LINK_FILE1 $DANGLE_LINK_FILE2
+TOOLTEST h5diff_450.txt --follow-symlinks -v h5diff_danglelinks1.h5 h5diff_danglelinks2.h5
# dangling links --follow-symlinks and --no-dangling-links (FILE to FILE)
-TOOLTEST h5diff_451.txt --follow-symlinks -v --no-dangling-links $DANGLE_LINK_FILE1 $DANGLE_LINK_FILE2
+TOOLTEST h5diff_451.txt --follow-symlinks -v --no-dangling-links h5diff_danglelinks1.h5 h5diff_danglelinks2.h5
# try --no-dangling-links without --follow-symlinks options
-TOOLTEST h5diff_452.txt --no-dangling-links $FILE13 $FILE13
+TOOLTEST h5diff_452.txt --no-dangling-links h5diff_softlinks.h5 h5diff_softlinks.h5
# dangling link found for soft links (FILE to FILE)
-TOOLTEST h5diff_453.txt --follow-symlinks -v --no-dangling-links $FILE13 $FILE13
+TOOLTEST h5diff_453.txt --follow-symlinks -v --no-dangling-links h5diff_softlinks.h5 h5diff_softlinks.h5
# dangling link found for soft links (obj to obj)
-TOOLTEST h5diff_454.txt --follow-symlinks -v --no-dangling-links $FILE13 $FILE13 /softlink_dset2 /softlink_noexist
+TOOLTEST h5diff_454.txt --follow-symlinks -v --no-dangling-links h5diff_softlinks.h5 h5diff_softlinks.h5 /softlink_dset2 /softlink_noexist
# dangling link found for soft links (obj to obj) Both dangle links
-TOOLTEST h5diff_455.txt --follow-symlinks -v --no-dangling-links $FILE13 $FILE13 /softlink_noexist /softlink_noexist
+TOOLTEST h5diff_455.txt --follow-symlinks -v --no-dangling-links h5diff_softlinks.h5 h5diff_softlinks.h5 /softlink_noexist /softlink_noexist
# dangling link found for ext links (FILE to FILE)
-TOOLTEST h5diff_456.txt --follow-symlinks -v --no-dangling-links $FILE15 $FILE15
+TOOLTEST h5diff_456.txt --follow-symlinks -v --no-dangling-links h5diff_extlink_src.h5 h5diff_extlink_src.h5
# dangling link found for ext links (obj to obj). target file exist
-TOOLTEST h5diff_457.txt --follow-symlinks -v --no-dangling-links $FILE15 $FILE15 /ext_link_dset1 /ext_link_noexist1
+TOOLTEST h5diff_457.txt --follow-symlinks -v --no-dangling-links h5diff_extlink_src.h5 h5diff_extlink_src.h5 /ext_link_dset1 /ext_link_noexist1
# dangling link found for ext links (obj to obj). target file NOT exist
-TOOLTEST h5diff_458.txt --follow-symlinks -v --no-dangling-links $FILE15 $FILE15 /ext_link_dset1 /ext_link_noexist2
+TOOLTEST h5diff_458.txt --follow-symlinks -v --no-dangling-links h5diff_extlink_src.h5 h5diff_extlink_src.h5 /ext_link_dset1 /ext_link_noexist2
# dangling link found for ext links (obj to obj). Both dangle links
-TOOLTEST h5diff_459.txt --follow-symlinks -v --no-dangling-links $FILE15 $FILE15 /ext_link_noexist1 /ext_link_noexist2
-
+TOOLTEST h5diff_459.txt --follow-symlinks -v --no-dangling-links h5diff_extlink_src.h5 h5diff_extlink_src.h5 /ext_link_noexist1 /ext_link_noexist2
+
+# dangling link --follow-symlinks (obj vs obj)
+# (HDFFV-7836)
+TOOLTEST h5diff_465.txt --follow-symlinks h5diff_danglelinks1.h5 h5diff_danglelinks2.h5 /soft_link1
+# (HDFFV-7835)
+# soft dangling vs. soft dangling
+TOOLTEST h5diff_466.txt -v --follow-symlinks h5diff_danglelinks1.h5 h5diff_danglelinks2.h5 /soft_link1
+# soft link vs. soft dangling
+TOOLTEST h5diff_467.txt -v --follow-symlinks h5diff_danglelinks1.h5 h5diff_danglelinks2.h5 /soft_link2
+# ext dangling vs. ext dangling
+TOOLTEST h5diff_468.txt -v --follow-symlinks h5diff_danglelinks1.h5 h5diff_danglelinks2.h5 /ext_link4
+# ext link vs. ext dangling
+TOOLTEST h5diff_469.txt -v --follow-symlinks h5diff_danglelinks1.h5 h5diff_danglelinks2.h5 /ext_link2
# ##############################################################################
# # test for group diff recursivly
# ##############################################################################
# root
-TOOLTEST h5diff_500.txt -v $GRP_RECURSE_FILE1 $GRP_RECURSE_FILE2 / /
-TOOLTEST h5diff_501.txt -v --follow-symlinks $GRP_RECURSE_FILE1 $GRP_RECURSE_FILE2 / /
+TOOLTEST h5diff_500.txt -v h5diff_grp_recurse1.h5 h5diff_grp_recurse2.h5 / /
+TOOLTEST h5diff_501.txt -v --follow-symlinks h5diff_grp_recurse1.h5 h5diff_grp_recurse2.h5 / /
# root vs group
-TOOLTEST h5diff_502.txt -v $GRP_RECURSE_FILE1 $GRP_RECURSE_FILE2 / /grp1/grp2/grp3
+TOOLTEST h5diff_502.txt -v h5diff_grp_recurse1.h5 h5diff_grp_recurse2.h5 / /grp1/grp2/grp3
# group vs group (same name and structure)
-TOOLTEST h5diff_503.txt -v $GRP_RECURSE_FILE1 $GRP_RECURSE_FILE2 /grp1 /grp1
+TOOLTEST h5diff_503.txt -v h5diff_grp_recurse1.h5 h5diff_grp_recurse2.h5 /grp1 /grp1
# group vs group (different name and structure)
-TOOLTEST h5diff_504.txt -v $GRP_RECURSE_FILE1 $GRP_RECURSE_FILE2 /grp1/grp2 /grp1/grp2/grp3
+TOOLTEST h5diff_504.txt -v h5diff_grp_recurse1.h5 h5diff_grp_recurse2.h5 /grp1/grp2 /grp1/grp2/grp3
# groups vs soft-link
-TOOLTEST h5diff_505.txt -v $GRP_RECURSE_FILE1 $GRP_RECURSE_FILE2 /grp1 /slink_grp1
-TOOLTEST h5diff_506.txt -v --follow-symlinks $GRP_RECURSE_FILE1 $GRP_RECURSE_FILE2 /grp1/grp2 /slink_grp2
+TOOLTEST h5diff_505.txt -v h5diff_grp_recurse1.h5 h5diff_grp_recurse2.h5 /grp1 /slink_grp1
+TOOLTEST h5diff_506.txt -v --follow-symlinks h5diff_grp_recurse1.h5 h5diff_grp_recurse2.h5 /grp1/grp2 /slink_grp2
# groups vs ext-link
-TOOLTEST h5diff_507.txt -v $GRP_RECURSE_FILE1 $GRP_RECURSE_FILE2 /grp1 /elink_grp1
-TOOLTEST h5diff_508.txt -v --follow-symlinks $GRP_RECURSE_FILE1 $GRP_RECURSE_FILE2 /grp1 /elink_grp1
+TOOLTEST h5diff_507.txt -v h5diff_grp_recurse1.h5 h5diff_grp_recurse2.h5 /grp1 /elink_grp1
+TOOLTEST h5diff_508.txt -v --follow-symlinks h5diff_grp_recurse1.h5 h5diff_grp_recurse2.h5 /grp1 /elink_grp1
# soft-link vs ext-link
-TOOLTEST h5diff_509.txt -v $GRP_RECURSE_FILE1 $GRP_RECURSE_FILE2 /slink_grp1 /elink_grp1
-TOOLTEST h5diff_510.txt -v --follow-symlinks $GRP_RECURSE_FILE1 $GRP_RECURSE_FILE2 /slink_grp1 /elink_grp1
+TOOLTEST h5diff_509.txt -v h5diff_grp_recurse1.h5 h5diff_grp_recurse2.h5 /slink_grp1 /elink_grp1
+TOOLTEST h5diff_510.txt -v --follow-symlinks h5diff_grp_recurse1.h5 h5diff_grp_recurse2.h5 /slink_grp1 /elink_grp1
# circled ext links
-TOOLTEST h5diff_511.txt -v $GRP_RECURSE_FILE1 $GRP_RECURSE_FILE2 /grp10 /grp11
-TOOLTEST h5diff_512.txt -v --follow-symlinks $GRP_RECURSE_FILE1 $GRP_RECURSE_FILE2 /grp10 /grp11
+TOOLTEST h5diff_511.txt -v h5diff_grp_recurse1.h5 h5diff_grp_recurse2.h5 /grp10 /grp11
+TOOLTEST h5diff_512.txt -v --follow-symlinks h5diff_grp_recurse1.h5 h5diff_grp_recurse2.h5 /grp10 /grp11
# circled soft2ext-link vs soft2ext-link
-TOOLTEST h5diff_513.txt -v $GRP_RECURSE_FILE1 $GRP_RECURSE_FILE2 /slink_grp10 /slink_grp11
-TOOLTEST h5diff_514.txt -v --follow-symlinks $GRP_RECURSE_FILE1 $GRP_RECURSE_FILE2 /slink_grp10 /slink_grp11
+TOOLTEST h5diff_513.txt -v h5diff_grp_recurse1.h5 h5diff_grp_recurse2.h5 /slink_grp10 /slink_grp11
+TOOLTEST h5diff_514.txt -v --follow-symlinks h5diff_grp_recurse1.h5 h5diff_grp_recurse2.h5 /slink_grp10 /slink_grp11
###############################################################################
# Test for group recursive diff via multi-linked external links
-# With follow-symlinks, file $GRP_RECURSE1_EXT and $GRP_RECURSE2_EXT1 should
+# With follow-symlinks, file h5diff_grp_recurse_ext1.h5 and h5diff_grp_recurse_ext2-1.h5 should
# be same with the external links.
###############################################################################
# file vs file
-TOOLTEST h5diff_515.txt -v $GRP_RECURSE1_EXT $GRP_RECURSE2_EXT1
-TOOLTEST h5diff_516.txt -v --follow-symlinks $GRP_RECURSE1_EXT $GRP_RECURSE2_EXT1
+TOOLTEST h5diff_515.txt -v h5diff_grp_recurse_ext1.h5 h5diff_grp_recurse_ext2-1.h5
+TOOLTEST h5diff_516.txt -v --follow-symlinks h5diff_grp_recurse_ext1.h5 h5diff_grp_recurse_ext2-1.h5
# group vs group
-TOOLTEST h5diff_517.txt -v $GRP_RECURSE1_EXT $GRP_RECURSE2_EXT1 /g1
-TOOLTEST h5diff_518.txt -v --follow-symlinks $GRP_RECURSE1_EXT $GRP_RECURSE2_EXT1 /g1
+TOOLTEST h5diff_517.txt -v h5diff_grp_recurse_ext1.h5 h5diff_grp_recurse_ext2-1.h5 /g1
+TOOLTEST h5diff_518.txt -v --follow-symlinks h5diff_grp_recurse_ext1.h5 h5diff_grp_recurse_ext2-1.h5 /g1
# ##############################################################################
# # Exclude objects (--exclude-path)
@@ -818,25 +1020,44 @@ TOOLTEST h5diff_518.txt -v --follow-symlinks $GRP_RECURSE1_EXT $GRP_RECURSE2_EXT
# Same structure, same names and different value.
#
# Exclude the object with different value. Expect return - same
-TOOLTEST h5diff_480.txt -v --exclude-path /group1/dset3 $EXCLUDE_FILE1_1 $EXCLUDE_FILE1_2
+TOOLTEST h5diff_480.txt -v --exclude-path /group1/dset3 h5diff_exclude1-1.h5 h5diff_exclude1-2.h5
# Verify different by not excluding. Expect return - diff
-TOOLTEST h5diff_481.txt -v $EXCLUDE_FILE1_1 $EXCLUDE_FILE1_2
+TOOLTEST h5diff_481.txt -v h5diff_exclude1-1.h5 h5diff_exclude1-2.h5
#
# Different structure, different names.
#
# Exclude all the different objects. Expect return - same
-TOOLTEST h5diff_482.txt -v --exclude-path "/group1" --exclude-path "/dset1" $EXCLUDE_FILE2_1 $EXCLUDE_FILE2_2
+TOOLTEST h5diff_482.txt -v --exclude-path "/group1" --exclude-path "/dset1" h5diff_exclude2-1.h5 h5diff_exclude2-2.h5
# Exclude only some different objects. Expect return - diff
-TOOLTEST h5diff_483.txt -v --exclude-path "/group1" $EXCLUDE_FILE2_1 $EXCLUDE_FILE2_2
+TOOLTEST h5diff_483.txt -v --exclude-path "/group1" h5diff_exclude2-1.h5 h5diff_exclude2-2.h5
# Exclude from group compare
-TOOLTEST h5diff_484.txt -v --exclude-path "/dset3" $EXCLUDE_FILE1_1 $EXCLUDE_FILE1_2 /group1
+TOOLTEST h5diff_484.txt -v --exclude-path "/dset3" h5diff_exclude1-1.h5 h5diff_exclude1-2.h5 /group1
# ##############################################################################
# # diff various multiple vlen and fixed strings in a compound type dataset
# ##############################################################################
-TOOLTEST h5diff_530.txt -v $COMP_VL_STRS_FILE $COMP_VL_STRS_FILE
+TOOLTEST h5diff_530.txt -v h5diff_comp_vl_strs.h5 h5diff_comp_vl_strs.h5 /group /group_copy
+
+# ##############################################################################
+# # Test container types (array,vlen) with multiple nested compound types
+# # Complex compound types in dataset and attribute
+# ##############################################################################
+TOOLTEST h5diff_540.txt -v compounds_array_vlen1.h5 compounds_array_vlen2.h5
+
+# ##############################################################################
+# # Test mutually exclusive options
+# ##############################################################################
+# Test with -d , -p and --use-system-epsilon.
+TOOLTEST h5diff_640.txt -v -d 5 -p 0.05 --use-system-epsilon h5diff_basic1.h5 h5diff_basic2.h5 /g1/dset3 /g1/dset4
+TOOLTEST h5diff_641.txt -v -d 5 -p 0.05 h5diff_basic1.h5 h5diff_basic2.h5 /g1/dset3 /g1/dset4
+TOOLTEST h5diff_642.txt -v -p 0.05 -d 5 h5diff_basic1.h5 h5diff_basic2.h5 /g1/dset3 /g1/dset4
+TOOLTEST h5diff_643.txt -v -d 5 --use-system-epsilon h5diff_basic1.h5 h5diff_basic2.h5 /g1/dset3 /g1/dset4
+TOOLTEST h5diff_644.txt -v --use-system-epsilon -d 5 h5diff_basic1.h5 h5diff_basic2.h5 /g1/dset3 /g1/dset4
+TOOLTEST h5diff_645.txt -v -p 0.05 --use-system-epsilon h5diff_basic1.h5 h5diff_basic2.h5 /g1/dset3 /g1/dset4
+TOOLTEST h5diff_646.txt -v --use-system-epsilon -p 0.05 h5diff_basic1.h5 h5diff_basic2.h5 /g1/dset3 /g1/dset4
+
# ##############################################################################
# # END