summaryrefslogtreecommitdiffstats
path: root/tools/test
diff options
context:
space:
mode:
Diffstat (limited to 'tools/test')
-rw-r--r--tools/test/h5copy/testh5copy.sh.in12
-rw-r--r--tools/test/h5diff/CMakeTests.cmake42
-rw-r--r--tools/test/h5diff/h5diff_plugin.sh.in117
-rw-r--r--tools/test/h5diff/h5diffgentest.c118
-rw-r--r--tools/test/h5diff/testfiles/h5diff_10.txt15
-rw-r--r--tools/test/h5diff/testfiles/h5diff_58_ref.txt12
-rw-r--r--tools/test/h5diff/testfiles/h5diff_600.txt15
-rw-r--r--tools/test/h5diff/testfiles/h5diff_603.txt15
-rw-r--r--tools/test/h5diff/testfiles/h5diff_606.txt15
-rw-r--r--tools/test/h5diff/testfiles/h5diff_612.txt15
-rw-r--r--tools/test/h5diff/testfiles/h5diff_615.txt15
-rw-r--r--tools/test/h5diff/testfiles/h5diff_621.txt15
-rw-r--r--tools/test/h5diff/testfiles/h5diff_622.txt15
-rw-r--r--tools/test/h5diff/testfiles/h5diff_623.txt15
-rw-r--r--tools/test/h5diff/testfiles/h5diff_624.txt15
-rw-r--r--tools/test/h5diff/testfiles/h5diff_70.txt32
-rw-r--r--tools/test/h5diff/testfiles/h5diff_700.txt32
-rw-r--r--tools/test/h5diff/testfiles/h5diff_701.txt32
-rw-r--r--tools/test/h5diff/testfiles/h5diff_702.txt32
-rw-r--r--tools/test/h5diff/testfiles/h5diff_703.txt32
-rw-r--r--tools/test/h5diff/testfiles/h5diff_80.txt64
-rw-r--r--tools/test/h5diff/testfiles/h5diff_830.txt30
-rw-r--r--tools/test/h5diff/testfiles/h5diff_eps.txt17
-rw-r--r--tools/test/h5diff/testfiles/h5diff_eps1.h5bin0 -> 2272 bytes
-rw-r--r--tools/test/h5diff/testfiles/h5diff_eps2.h5bin0 -> 2272 bytes
-rw-r--r--tools/test/h5diff/testfiles/h5diff_reg.txt9
-rw-r--r--tools/test/h5diff/testfiles/h5diff_strings1.h5 (renamed from tools/test/h5diff/testfiles/diff_strings1.h5)bin4640 -> 4640 bytes
-rw-r--r--tools/test/h5diff/testfiles/h5diff_strings2.h5 (renamed from tools/test/h5diff/testfiles/diff_strings2.h5)bin4640 -> 4640 bytes
-rw-r--r--tools/test/h5diff/testh5diff.sh.in76
-rw-r--r--tools/test/h5dump/h5dump_plugin.sh.in28
-rw-r--r--tools/test/h5dump/h5dumpgentest.c10
-rw-r--r--tools/test/h5dump/testh5dump.sh.in381
-rw-r--r--tools/test/h5dump/testh5dumppbits.sh.in158
-rw-r--r--tools/test/h5dump/testh5dumpvds.sh.in172
-rw-r--r--tools/test/h5dump/testh5dumpxml.sh.in31
-rw-r--r--tools/test/h5format_convert/testfiles/h5fc_v_err.ddl.err7
-rw-r--r--tools/test/h5format_convert/testh5fc.sh.in2
-rw-r--r--tools/test/h5jam/tellub.c46
-rw-r--r--tools/test/h5ls/h5ls_plugin.sh.in6
-rw-r--r--tools/test/h5repack/CMakeTests.cmake118
-rw-r--r--tools/test/h5repack/h5repack.sh.in294
-rw-r--r--tools/test/h5repack/h5repacktst.c10
-rw-r--r--tools/test/h5repack/testfiles/h5copy_extlinks_src-base.h5copy_extlinks_src.h5.ddl28
-rw-r--r--tools/test/h5repack/testfiles/h5copy_extlinks_src-merge.h5copy_extlinks_src.h5.tst26
-rw-r--r--tools/test/h5repack/testfiles/h5copy_extlinks_src-mergeprune.h5copy_extlinks_src.h5.ddl28
-rw-r--r--tools/test/h5repack/testfiles/h5copy_extlinks_src-prune.h5copy_extlinks_src.h5.ddl6
-rw-r--r--tools/test/h5repack/testfiles/h5copy_extlinks_src.h5bin0 -> 2184 bytes
-rw-r--r--tools/test/h5repack/testfiles/h5copy_extlinks_trg.h5bin0 -> 2168 bytes
-rw-r--r--tools/test/h5repack/testfiles/h5repack-help.txt3
-rw-r--r--tools/test/h5repack/testfiles/textlink-base.textlink.h5.ddl12
-rw-r--r--tools/test/h5repack/testfiles/textlink-merge.textlink.h5.tst13
-rw-r--r--tools/test/h5repack/testfiles/textlink-mergeprune.textlink.h5.ddl4
-rw-r--r--tools/test/h5repack/testfiles/textlink-prune.textlink.h5.ddl4
-rw-r--r--tools/test/h5repack/testfiles/textlinkfar-base.textlinkfar.h5.ddl116
-rw-r--r--tools/test/h5repack/testfiles/textlinkfar-merge.textlinkfar.h5.tst20
-rw-r--r--tools/test/h5repack/testfiles/textlinkfar-mergeprune.textlinkfar.h5.ddl152
-rw-r--r--tools/test/h5repack/testfiles/textlinkfar-prune.textlinkfar.h5.ddl4
-rw-r--r--tools/test/h5repack/testfiles/textlinksrc-base.textlinksrc.h5.ddl150
-rw-r--r--tools/test/h5repack/testfiles/textlinksrc-merge.textlinksrc.h5.tst32
-rw-r--r--tools/test/h5repack/testfiles/textlinksrc-mergeprune.textlinksrc.h5.ddl187
-rw-r--r--tools/test/h5repack/testfiles/textlinksrc-prune.textlinksrc.h5.ddl4
-rw-r--r--tools/test/h5repack/testfiles/textlinktar-base.textlinktar.h5.ddl168
-rw-r--r--tools/test/h5repack/testfiles/textlinktar-merge.textlinktar.h5.tst44
-rw-r--r--tools/test/h5repack/testfiles/textlinktar-mergeprune.textlinktar.h5.ddl200
-rw-r--r--tools/test/h5repack/testfiles/textlinktar-prune.textlinktar.h5.ddl52
-rw-r--r--tools/test/h5repack/testfiles/tsoftlinks-base.tsoftlinks.h5.ddl77
-rw-r--r--tools/test/h5repack/testfiles/tsoftlinks-merge.tsoftlinks.h5.tst53
-rw-r--r--tools/test/h5repack/testfiles/tsoftlinks-mergeprune.tsoftlinks.h5.ddl127
-rw-r--r--tools/test/h5repack/testfiles/tsoftlinks-prune.tsoftlinks.h5.ddl47
-rw-r--r--tools/test/misc/h5perf_gentest.c4
-rw-r--r--tools/test/misc/h5repart_gentest.c2
-rw-r--r--tools/test/misc/testfiles/h5mkgrp_version.txt.in2
-rw-r--r--tools/test/misc/testh5mkgrp.sh.in93
-rw-r--r--tools/test/perform/CMakeLists.txt2
-rw-r--r--tools/test/perform/chunk.c2
-rw-r--r--tools/test/perform/chunk_cache.c82
-rw-r--r--tools/test/perform/iopipe.c405
-rw-r--r--tools/test/perform/overhead.c2
-rw-r--r--tools/test/perform/perf_meta.c2
79 files changed, 3177 insertions, 1046 deletions
diff --git a/tools/test/h5copy/testh5copy.sh.in b/tools/test/h5copy/testh5copy.sh.in
index 2440ca4..ebbcb6c 100644
--- a/tools/test/h5copy/testh5copy.sh.in
+++ b/tools/test/h5copy/testh5copy.sh.in
@@ -13,7 +13,7 @@
#
# Tests for the h5copy tool
#
-# Pedro Vicente Nunes (pvn@hdfgroup.org), Albert Cheng (acheng@hdfgroup.org)
+# Pedro Vicente Nunes, Albert Cheng
# Thursday, July 20, 2006
#
@@ -200,6 +200,7 @@ TOOLTEST()
fi
runh5diff=no
fi
+
if [ "$3" = -o ]; then
outputfile=$4
else
@@ -219,6 +220,7 @@ TOOLTEST()
$RUNSERIAL $H5COPY_BIN $@
) > $actualout 2> $actualerr
RET=$?
+
if [ $RET != 0 ]; then
echo "*FAILED*"
echo "failed result is:"
@@ -268,6 +270,7 @@ TOOLTEST_PREFILL()
$RUNSERIAL $H5COPY_BIN -i $inputfile -o $outputfile -v -s $grp_name -d $grp_name2
) > $actualout 2> $actualerr
RET=$?
+
if [ $RET != 0 ]; then
echo "*FAILED*"
echo "failed result is:"
@@ -282,6 +285,7 @@ TOOLTEST_PREFILL()
$RUNSERIAL $H5COPY_BIN -i $inputfile -o $outputfile -v -s $obj_name -d $obj_name2
) > $actualout 2> $actualerr
RET=$?
+
if [ $RET != 0 ]; then
echo "*FAILED*"
echo "failed result is:"
@@ -313,6 +317,7 @@ TOOLTEST_SAME()
else
runh5diff=no
fi
+
if [ "$3" = -o ]; then
outputfile=$4
else
@@ -330,6 +335,7 @@ TOOLTEST_SAME()
$RUNSERIAL $H5COPY_BIN -i $inputfile -o $outputfile -v -s $grp_name -d $grp_name
) > $actualout 2> $actualerr
RET=$?
+
if [ $RET != 0 ]; then
echo "*FAILED*"
echo "failed result is:"
@@ -344,6 +350,7 @@ TOOLTEST_SAME()
$RUNSERIAL $H5COPY_BIN -i $outputfile -o $outputfile -v -s $grp_name -d $grp_name2
) > $actualout 2> $actualerr
RET=$?
+
if [ $RET != 0 ]; then
echo "*FAILED*"
echo "failed result is:"
@@ -406,6 +413,7 @@ TOOLTEST_FAIL()
if [ "$1" = -i ]; then
inputfile=$2
fi
+
if [ "$3" = -o ]; then
outputfile=$4
fi
@@ -417,8 +425,8 @@ TOOLTEST_FAIL()
#echo "#############################"
$RUNSERIAL $H5COPY_BIN $@
) > $actualout 2> $actualerr
-
RET=$?
+
# save actualout and actualerr in case they are needed later.
cp $actualout $actualout_sav
STDOUT_FILTER $actualout
diff --git a/tools/test/h5diff/CMakeTests.cmake b/tools/test/h5diff/CMakeTests.cmake
index 3d9c6f5..4e8e8d1 100644
--- a/tools/test/h5diff/CMakeTests.cmake
+++ b/tools/test/h5diff/CMakeTests.cmake
@@ -66,8 +66,10 @@
${HDF5_TOOLS_TEST_H5DIFF_SOURCE_DIR}/testfiles/non_comparables2.h5
${HDF5_TOOLS_TEST_H5DIFF_SOURCE_DIR}/testfiles/tudfilter.h5
${HDF5_TOOLS_TEST_H5DIFF_SOURCE_DIR}/testfiles/tudfilter2.h5
- ${HDF5_TOOLS_TEST_H5DIFF_SOURCE_DIR}/testfiles/diff_strings1.h5
- ${HDF5_TOOLS_TEST_H5DIFF_SOURCE_DIR}/testfiles/diff_strings2.h5
+ ${HDF5_TOOLS_TEST_H5DIFF_SOURCE_DIR}/testfiles/h5diff_strings1.h5
+ ${HDF5_TOOLS_TEST_H5DIFF_SOURCE_DIR}/testfiles/h5diff_strings2.h5
+ ${HDF5_TOOLS_TEST_H5DIFF_SOURCE_DIR}/testfiles/h5diff_eps1.h5
+ ${HDF5_TOOLS_TEST_H5DIFF_SOURCE_DIR}/testfiles/h5diff_eps2.h5
# tools/testfiles/vds
${HDF5_TOOLS_DIR}/testfiles/vds/1_a.h5
${HDF5_TOOLS_DIR}/testfiles/vds/1_b.h5
@@ -291,6 +293,7 @@
${HDF5_TOOLS_TEST_H5DIFF_SOURCE_DIR}/testfiles/h5diff_80.txt
${HDF5_TOOLS_TEST_H5DIFF_SOURCE_DIR}/testfiles/h5diff_800.txt
${HDF5_TOOLS_TEST_H5DIFF_SOURCE_DIR}/testfiles/h5diff_801.txt
+ ${HDF5_TOOLS_TEST_H5DIFF_SOURCE_DIR}/testfiles/h5diff_830.txt
${HDF5_TOOLS_TEST_H5DIFF_SOURCE_DIR}/testfiles/h5diff_90.txt
${HDF5_TOOLS_TEST_H5DIFF_SOURCE_DIR}/testfiles/h5diff_8625.txt
${HDF5_TOOLS_TEST_H5DIFF_SOURCE_DIR}/testfiles/h5diff_8639.txt
@@ -302,6 +305,7 @@
${HDF5_TOOLS_TEST_H5DIFF_SOURCE_DIR}/testfiles/h5diff_v2.txt
${HDF5_TOOLS_TEST_H5DIFF_SOURCE_DIR}/testfiles/h5diff_v3.txt
${HDF5_TOOLS_TEST_H5DIFF_SOURCE_DIR}/testfiles/h5diff_vlstr.txt
+ ${HDF5_TOOLS_TEST_H5DIFF_SOURCE_DIR}/testfiles/h5diff_eps.txt
)
set (LIST_WIN_TEST_FILES
@@ -338,9 +342,10 @@
# Overwrite system dependent files (Windows) and not VS2015
#
set (COPY_WINDOWS_FILES false)
- if (MINGW)
- set (COPY_WINDOWS_FILES true)
- endif ()
+ # MinGW tests may depend on host system
+ #if (MINGW)
+ # set (COPY_WINDOWS_FILES true)
+ #endif ()
if (WIN32 AND MSVC_VERSION LESS 1900)
set (COPY_WINDOWS_FILES true)
endif ()
@@ -539,8 +544,11 @@
set (ATTR_VERBOSE_LEVEL_FILE1 h5diff_attr_v_level1.h5)
set (ATTR_VERBOSE_LEVEL_FILE2 h5diff_attr_v_level2.h5)
# strings
- set (STRINGS1 diff_strings1.h5)
- set (STRINGS2 diff_strings2.h5)
+ set (STRINGS1 h5diff_strings1.h5)
+ set (STRINGS2 h5diff_strings2.h5)
+ # epsilon
+ set (EPS1 h5diff_eps1.h5)
+ set (EPS2 h5diff_eps2.h5)
# VDS tests
set (FILEV1 1_vds.h5)
@@ -912,6 +920,8 @@
h5diff_800.out.err
h5diff_801.out
h5diff_801.out.err
+ h5diff_830.out
+ h5diff_830.out.err
h5diff_8625.out
h5diff_8625.out.err
h5diff_8639.out
@@ -926,6 +936,8 @@
h5diff_v3.out.err
h5diff_vlstr.out
h5diff_vlstr.out.err
+ h5diff_eps.out
+ h5diff_eps.out.err
)
set_tests_properties (H5DIFF-clearall-objects PROPERTIES WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles")
if (last_test)
@@ -1107,6 +1119,9 @@ ADD_H5_TEST (h5diff_609 0 -d 200 ${FILE1} ${FILE2} g1/dset3 g1/dset4)
# 6.10: number smaller than smallest difference
ADD_H5_TEST (h5diff_610 1 -d 1 ${FILE1} ${FILE2} g1/dset3 g1/dset4)
+# eps: number smaller than epsilon
+ADD_H5_TEST (h5diff_eps 0 -v3 -d 1e-16 ${EPS1} ${EPS2})
+
# ##############################################################################
# # -p
# ##############################################################################
@@ -1492,9 +1507,9 @@ ADD_H5_TEST (h5diff_484 0 -v --exclude-path "/dset3" ${EXCLUDE_FILE1_1} ${EXCLUD
# Only one file contains unique objs. Common objs are same.
# (HDFFV-7837)
#
-ADD_H5_TEST (h5diff_485 0 -v --exclude-path "/group1" h5diff_exclude3-1.h5 h5diff_exclude3-2.h5)
-ADD_H5_TEST (h5diff_486 0 -v --exclude-path "/group1" h5diff_exclude3-2.h5 h5diff_exclude3-1.h5)
-ADD_H5_TEST (h5diff_487 1 -v --exclude-path "/group1/dset" h5diff_exclude3-1.h5 h5diff_exclude3-2.h5)
+ADD_H5_TEST (h5diff_485 0 -v --exclude-path "/group1" ${EXCLUDE_FILE3_1} ${EXCLUDE_FILE3_2})
+ADD_H5_TEST (h5diff_486 0 -v --exclude-path "/group1" ${EXCLUDE_FILE3_2} ${EXCLUDE_FILE3_1})
+ADD_H5_TEST (h5diff_487 1 -v --exclude-path "/group1/dset" ${EXCLUDE_FILE3_1} ${EXCLUDE_FILE3_2})
# ##############################################################################
# # diff various multiple vlen and fixed strings in a compound type dataset
@@ -1528,12 +1543,15 @@ ADD_H5_TEST (h5diff_646 1 -v --use-system-epsilon -p 0.05 ${FILE1} ${FILE2} /g1/
# ##############################################################################
# # Test array variances
# ##############################################################################
-#
-# Test with -d , -p and --use-system-epsilon.
ADD_H5_TEST (h5diff_800 1 -v ${FILE7} ${FILE8} /g1/array /g1/array)
ADD_H5_TEST (h5diff_801 1 -v ${FILE7} ${FILE8A} /g1/array /g1/array)
# ##############################################################################
+# # dataset subsets
+# ##############################################################################
+#TRILABS-227 ADD_H5_TEST (h5diff_830 1 --enable-error-stack -v ${FILE7} ${FILE8} /g1/array3D[0,0,0;2,2,1;2,2,2;] /g1/array3D[0,0,0;2,2,1;2,2,2;])
+
+# ##############################################################################
# # VDS tests
# ##############################################################################
ADD_H5_TEST (h5diff_v1 0 -v ${FILEV1} ${FILEV2})
diff --git a/tools/test/h5diff/h5diff_plugin.sh.in b/tools/test/h5diff/h5diff_plugin.sh.in
index 341cba5..ffc43da 100644
--- a/tools/test/h5diff/h5diff_plugin.sh.in
+++ b/tools/test/h5diff/h5diff_plugin.sh.in
@@ -135,24 +135,24 @@ CLEAN_TESTFILES_AND_TESTDIR()
# -h print help page
while [ $# -gt 0 ]; do
case "$1" in
- -p) # reset the tool name and bin to run ph5diff tests
- TESTNAME=ph5diff
- H5DIFF=../../src/h5diff/ph5diff # The tool name
- H5DIFF_BIN=`pwd`/$H5DIFF # The path of the tool binary
- pmode=yes
- shift
- ;;
+ -p) # reset the tool name and bin to run ph5diff tests
+ TESTNAME=ph5diff
+ H5DIFF=../../src/h5diff/ph5diff # The tool name
+ H5DIFF_BIN=`pwd`/$H5DIFF # The path of the tool binary
+ pmode=yes
+ shift
+ ;;
-h) # print help page
- echo "$0 [-p] [-h]"
- echo " -p run ph5diff tests"
- echo " -h print help page"
- shift
- exit 0
- ;;
+ echo "$0 [-p] [-h]"
+ echo " -p run ph5diff tests"
+ echo " -h print help page"
+ shift
+ exit 0
+ ;;
*) # unknown option
echo "$0: Unknown option ($1)"
- exit 1
- ;;
+ exit 1
+ ;;
esac
done
@@ -218,19 +218,21 @@ TOOLTEST() {
# Run test.
TESTING $H5DIFF $@
(
- #echo "#############################"
- #echo "Expected output for '$H5DIFF $@'"
- #echo "#############################"
- cd $TESTDIR
- eval $ENVCMD $RUNCMD $H5DIFF_BIN "$@"
+ #echo "#############################"
+ #echo "Expected output for '$H5DIFF $@'"
+ #echo "#############################"
+ cd $TESTDIR
+ eval $ENVCMD $RUNCMD $H5DIFF_BIN "$@"
) >$actual 2>$actual_err
EXIT_CODE=$?
+
# save actual and actual_err in case they are needed later.
cp $actual $actual_sav
STDOUT_FILTER $actual
cp $actual_err $actual_err_sav
STDERR_FILTER $actual_err
cat $actual_err >> $actual
+
# don't add exit code check in pmode, as it causes failure. (exit code
# is from mpirun not tool)
# if any problem occurs relate to an exit code, it will be caught in
@@ -260,27 +262,29 @@ TOOLTEST() {
actual_sorted=actual_sorted
sort $expect -o $expect_sorted
sort $actual -o $actual_sorted
+
# remove "EXIT CODE:" line from expect file. test for exit code
# is done by serial mode.
grep -v "EXIT CODE:" $expect_sorted > $expect_sorted.noexit
mv $expect_sorted.noexit $expect_sorted
- if $CMP $expect_sorted $actual_sorted; then
- echo " PASSED"
- else
- echo "*FAILED*"
- nerrors="`expr $nerrors + 1`"
- if test yes = "$verbose"; then
- echo "====Expected result ($expect_sorted) differs from actual result ($actual_sorted)"
- $DIFF $expect_sorted $actual_sorted |sed 's/^/ /'
- echo "====The actual output ($actual_sav)"
- sed 's/^/ /' < $actual_sav
- echo "====The actual stderr ($actual_err_sav)"
- sed 's/^/ /' < $actual_err_sav
- echo "====End of actual stderr ($actual_err_sav)"
- echo ""
+
+ if $CMP $expect_sorted $actual_sorted; then
+ echo " PASSED"
+ else
+ echo "*FAILED*"
+ nerrors="`expr $nerrors + 1`"
+ if test yes = "$verbose"; then
+ echo "====Expected result ($expect_sorted) differs from actual result ($actual_sorted)"
+ $DIFF $expect_sorted $actual_sorted |sed 's/^/ /'
+ echo "====The actual output ($actual_sav)"
+ sed 's/^/ /' < $actual_sav
+ echo "====The actual stderr ($actual_err_sav)"
+ sed 's/^/ /' < $actual_err_sav
+ echo "====End of actual stderr ($actual_err_sav)"
+ echo ""
+ fi
fi
fi
- fi
# Clean up output file
if test -z "$HDF5_NOCLEANUP"; then
@@ -306,18 +310,20 @@ TOOLTEST_ERR() {
# Run test.
TESTING $H5DIFF $@
(
- #echo "#############################"
- #echo "Expected output for '$H5DIFF $@'"
- #echo "#############################"
- cd $TESTDIR
- eval $ENVCMD $RUNCMD $H5DIFF_BIN "$@"
+ #echo "#############################"
+ #echo "Expected output for '$H5DIFF $@'"
+ #echo "#############################"
+ cd $TESTDIR
+ eval $ENVCMD $RUNCMD $H5DIFF_BIN "$@"
) >$actual 2>$actual_err
EXIT_CODE=$?
+
# save actual and actual_err in case they are needed later.
cp $actual $actual_sav
STDOUT_FILTER $actual
cp $actual_err $actual_err_sav
STDERR_FILTER $actual_err
+
# don't add exit code check in pmode, as it causes failure. (exit code
# is from mpirun not tool)
# if any problem occurs relate to an exit code, it will be caught in
@@ -348,23 +354,24 @@ TOOLTEST_ERR() {
sort $expect_err -o $expect_sorted
sort $actual_err -o $actual_sorted
mv $expect_sorted.noexit $expect_sorted
- if $CMP $expect_sorted $actual_sorted; then
- echo " PASSED"
- else
- echo "*FAILED*"
- nerrors="`expr $nerrors + 1`"
- if test yes = "$verbose"; then
- echo "====Expected result ($expect_sorted) differs from actual result ($actual_sorted)"
- $DIFF $expect_sorted $actual_sorted |sed 's/^/ /'
- echo "====The actual output ($actual_sav)"
- sed 's/^/ /' < $actual_sav
- echo "====The actual stderr ($actual_err_sav)"
- sed 's/^/ /' < $actual_err_sav
- echo "====End of actual stderr ($actual_err_sav)"
- echo ""
+
+ if $CMP $expect_sorted $actual_sorted; then
+ echo " PASSED"
+ else
+ echo "*FAILED*"
+ nerrors="`expr $nerrors + 1`"
+ if test yes = "$verbose"; then
+ echo "====Expected result ($expect_sorted) differs from actual result ($actual_sorted)"
+ $DIFF $expect_sorted $actual_sorted |sed 's/^/ /'
+ echo "====The actual output ($actual_sav)"
+ sed 's/^/ /' < $actual_sav
+ echo "====The actual stderr ($actual_err_sav)"
+ sed 's/^/ /' < $actual_err_sav
+ echo "====End of actual stderr ($actual_err_sav)"
+ echo ""
+ fi
fi
fi
- fi
# Clean up output file
if test -z "$HDF5_NOCLEANUP"; then
diff --git a/tools/test/h5diff/h5diffgentest.c b/tools/test/h5diff/h5diffgentest.c
index 1d5354f..173a5ce 100644
--- a/tools/test/h5diff/h5diffgentest.c
+++ b/tools/test/h5diff/h5diffgentest.c
@@ -31,7 +31,7 @@ size_t H5TOOLS_MALLOCSIZE = (128 * 1024 * 1024);
*
* Purpose: generate files for h5diff testing
*
- * Programmer: Pedro Vicente, pvn@ncsa.uiuc.edu
+ * Programmer: Pedro Vicente
*
* Date: November 12, 2003
*
@@ -94,8 +94,11 @@ size_t H5TOOLS_MALLOCSIZE = (128 * 1024 * 1024);
#define NON_COMPARBLES1 "non_comparables1.h5"
#define NON_COMPARBLES2 "non_comparables2.h5"
/* string dataset and attribute */
-#define DIFF_STRINGS1 "diff_strings1.h5"
-#define DIFF_STRINGS2 "diff_strings2.h5"
+#define DIFF_STRINGS1 "h5diff_strings1.h5"
+#define DIFF_STRINGS2 "h5diff_strings2.h5"
+/* double dataset and epsilon */
+#define DIFF_EPS1 "h5diff_eps1.h5"
+#define DIFF_EPS2 "h5diff_eps2.h5"
#define UIMAX 4294967295u /*Maximum value for a variable of type unsigned int */
#define STR_SIZE 3
@@ -110,7 +113,7 @@ size_t H5TOOLS_MALLOCSIZE = (128 * 1024 * 1024);
/* Error macros */
#define AT() HDprintf("ERROR at %s:%d in %s()...\n", __FILE__, __LINE__, FUNC);
-#define PROGRAM_ERROR {AT(); goto error;}
+#define PROGRAM_ERROR do {AT(); goto error;} while(0)
/* A UD link traversal function. Shouldn't actually be called. */
static hid_t
@@ -172,6 +175,7 @@ static void test_comps_vlen_arry(const char *fname, const char *dset,
static void test_data_nocomparables(const char *fname, int diff);
static void test_objs_nocomparables(const char *fname1, const char *fname2);
static void test_objs_strings(const char *fname, const char *fname2);
+static void test_double_epsilon(const char *fname1, const char *fname2);
/* called by test_attributes() and test_datasets() */
static void write_attr_strings(hid_t loc_id, const char* dset_name, hid_t fid, int make_diffs);
@@ -288,6 +292,9 @@ int main(void)
/* string dataset and attribute. HDFFV-10028 */
test_objs_strings(DIFF_STRINGS1, DIFF_STRINGS2);
+ /* double dataset and epsilion. HDFFV-10897 */
+ test_double_epsilon(DIFF_EPS1, DIFF_EPS2);
+
return EXIT_SUCCESS;
}
@@ -4928,73 +4935,73 @@ test_objs_nocomparables(const char *fname1, const char *fname2)
*------------------------------------------------------------------------*/
/* file1 */
if((fid1 = H5Fopen(fname1, H5F_ACC_RDWR, H5P_DEFAULT)) < 0)
- PROGRAM_ERROR
+ PROGRAM_ERROR;
/* file2 */
if((fid2 = H5Fopen(fname2, H5F_ACC_RDWR, H5P_DEFAULT)) < 0)
- PROGRAM_ERROR
+ PROGRAM_ERROR;
/*-----------------------------------------------------------------------
* in file1 : add member objects
*------------------------------------------------------------------------*/
/* parent group */
if((topgid1 = H5Gcreate2(fid1, "diffobjtypes", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0)
- PROGRAM_ERROR
+ PROGRAM_ERROR;
/* dataset */
if(write_dset(topgid1, 1, dims, "obj1", H5T_NATIVE_INT, data1) < 0)
- PROGRAM_ERROR
+ PROGRAM_ERROR;
/* group */
if((gid1 = H5Gcreate2(topgid1, "obj2", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0)
- PROGRAM_ERROR
+ PROGRAM_ERROR;
/* committed type */
if((tid1 = H5Tcopy(H5T_NATIVE_INT)) < 0)
- PROGRAM_ERROR
+ PROGRAM_ERROR;
if(H5Tcommit2(topgid1, "obj3", tid1, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT) < 0)
- PROGRAM_ERROR
+ PROGRAM_ERROR;
/*-----------------------------------------------------------------------
* in file2 : add member objects
*------------------------------------------------------------------------*/
/* parent group */
if((topgid2 = H5Gcreate2(fid2, "diffobjtypes", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0)
- PROGRAM_ERROR
+ PROGRAM_ERROR;
/* group */
if((gid2 = H5Gcreate2(topgid2, "obj1", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0)
- PROGRAM_ERROR
+ PROGRAM_ERROR;
/* committed type */
if((tid2 = H5Tcopy(H5T_NATIVE_INT)) < 0)
- PROGRAM_ERROR
+ PROGRAM_ERROR;
if(H5Tcommit2(topgid2, "obj2", tid2, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT) < 0)
- PROGRAM_ERROR
+ PROGRAM_ERROR;
/* dataset */
if(write_dset(topgid2, 1, dims, "obj3", H5T_NATIVE_INT, data2) < 0)
- PROGRAM_ERROR
+ PROGRAM_ERROR;
/*-----------------------------------------------------------------------
* Close IDs
*-----------------------------------------------------------------------*/
if(H5Fclose(fid1) < 0)
- PROGRAM_ERROR
+ PROGRAM_ERROR;
if(H5Fclose(fid2) < 0)
- PROGRAM_ERROR
+ PROGRAM_ERROR;
if(H5Gclose(topgid1) < 0)
- PROGRAM_ERROR
+ PROGRAM_ERROR;
if(H5Gclose(topgid2) < 0)
- PROGRAM_ERROR
+ PROGRAM_ERROR;
if(H5Gclose(gid1) < 0)
- PROGRAM_ERROR
+ PROGRAM_ERROR;
if(H5Gclose(gid2) < 0)
- PROGRAM_ERROR
+ PROGRAM_ERROR;
if(H5Tclose(tid1) < 0)
- PROGRAM_ERROR
+ PROGRAM_ERROR;
if(H5Tclose(tid2) < 0)
- PROGRAM_ERROR
+ PROGRAM_ERROR;
return;
@@ -8018,6 +8025,59 @@ out:
return -1;
}
+/*
+ * Function: test_double_epsilion
+ *
+ * Purpose: Create test files to compare data with epsilion
+ */
+static
+void test_double_epsilon(const char *fname1, const char *fname2)
+{
+ hid_t fid1 = H5I_INVALID_HID, fid2 = H5I_INVALID_HID;
+ hsize_t dims1[2] = { 4, 7 };
+ double wdata[4][7];
+ int i, j;
+
+ /*-------------------------------------------------------------------------
+ * create two files
+ *-------------------------------------------------------------------------
+ */
+ if ((fid1 = H5Fcreate(fname1, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT)) < 0)
+ PROGRAM_ERROR;
+ if ((fid2 = H5Fcreate(fname2, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT)) < 0)
+ PROGRAM_ERROR;
+
+ /*
+ * Initialize data.
+ */
+ for (i=0; i<4; i++)
+ for (j=0; j<7; j++)
+ wdata[i][j] = 0.0;
+
+ /* dataset */
+ if(write_dset(fid1, 2, dims1, "dataset", H5T_IEEE_F64LE, wdata) < 0)
+ PROGRAM_ERROR;
+
+ /*
+ * Initialize data.
+ */
+ for (i=0; i<4; i++)
+ for (j=0; j<7; j++)
+ wdata[i][j] = (double)1.e-19;
+
+ /* dataset */
+ if(write_dset(fid2, 2, dims1, "dataset", H5T_IEEE_F64LE, wdata) < 0)
+ PROGRAM_ERROR;
+
+error:
+ H5E_BEGIN_TRY {
+ H5Fclose(fid1);
+ H5Fclose(fid2);
+ } H5E_END_TRY;
+
+ return;
+}
+
/*-------------------------------------------------------------------------
* Function: write_attr
*
@@ -8073,22 +8133,22 @@ write_dset(hid_t loc_id, int rank, hsize_t *dims, const char *name, hid_t tid, v
/* create a space */
if((sid = H5Screate_simple(rank, dims, NULL)) < 0)
- PROGRAM_ERROR
+ PROGRAM_ERROR;
/* create the dataset */
if((did = H5Dcreate2(loc_id, name, tid, sid, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0)
- PROGRAM_ERROR
+ PROGRAM_ERROR;
/* write */
if(buf)
if(H5Dwrite(did, tid, H5S_ALL, H5S_ALL, H5P_DEFAULT, buf) < 0)
- PROGRAM_ERROR
+ PROGRAM_ERROR;
/* close */
if(H5Dclose(did) < 0)
- PROGRAM_ERROR
+ PROGRAM_ERROR;
if(H5Sclose(sid) < 0)
- PROGRAM_ERROR
+ PROGRAM_ERROR;
return SUCCEED;
diff --git a/tools/test/h5diff/testfiles/h5diff_10.txt b/tools/test/h5diff/testfiles/h5diff_10.txt
index 0a2fd12..b5ff01a 100644
--- a/tools/test/h5diff/testfiles/h5diff_10.txt
+++ b/tools/test/h5diff/testfiles/h5diff_10.txt
@@ -17,10 +17,9 @@ usage: h5diff [OPTIONS] file1 file2 [obj1[ obj2]]
Verbose mode with level. Print differences and list of objects.
Level of detail depends on value of N:
0 : Identical to '-v' or '--verbose'.
- 1 : All level 0 information plus one-line attribute
- status summary.
- 2 : All level 1 information plus extended attribute
- status report.
+ 1 : All level 0 information plus one-line attribute status summary.
+ 2 : All level 1 information plus extended attribute status report.
+ 3 : All level 2 information plus file names.
-q, --quiet
Quiet mode. Do not produce output.
--enable-error-stack
@@ -109,6 +108,14 @@ usage: h5diff [OPTIONS] file1 file2 [obj1[ obj2]]
excluded.
This option can be used repeatedly to exclude multiple paths.
+ --exclude-attribute "path/to/object/with/attribute"
+ Exclude attributes on the specified path to an object when comparing files or groups.
+
+ If there are multiple paths to an object, only the specified path(s)
+ will be excluded; the comparison will include any path not explicitly
+ excluded.
+ This option can be used repeatedly to exclude multiple paths.
+
Modes of output:
Default mode: print the number of differences found and where they occured
-r Report mode: print the above plus the differences
diff --git a/tools/test/h5diff/testfiles/h5diff_58_ref.txt b/tools/test/h5diff/testfiles/h5diff_58_ref.txt
index 6fa2299..48a4b33 100644
--- a/tools/test/h5diff/testfiles/h5diff_58_ref.txt
+++ b/tools/test/h5diff/testfiles/h5diff_58_ref.txt
@@ -1,32 +1,32 @@
dataset: </g1/reference2D> and </g1/reference2D>
size: [2] [2]
-position difference
+position reference2D reference2D difference
------------------------------------------------------------
[ 0 ] 1 0 1
[ 1 ] 2 0 2
size: [2] [2]
-position difference
+position reference2D reference2D difference
------------------------------------------------------------
[ 0 ] 1 0 1
[ 1 ] 2 0 2
size: [2] [2]
-position difference
+position reference2D reference2D difference
------------------------------------------------------------
[ 0 ] 1 0 1
[ 1 ] 2 0 2
size: [2] [2]
-position difference
+position reference2D reference2D difference
------------------------------------------------------------
[ 0 ] 1 0 1
[ 1 ] 2 0 2
size: [2] [2]
-position difference
+position reference2D reference2D difference
------------------------------------------------------------
[ 0 ] 1 0 1
[ 1 ] 2 0 2
size: [2] [2]
-position difference
+position reference2D reference2D difference
------------------------------------------------------------
[ 0 ] 1 0 1
[ 1 ] 2 0 2
diff --git a/tools/test/h5diff/testfiles/h5diff_600.txt b/tools/test/h5diff/testfiles/h5diff_600.txt
index 55b8da7..f52d8cc 100644
--- a/tools/test/h5diff/testfiles/h5diff_600.txt
+++ b/tools/test/h5diff/testfiles/h5diff_600.txt
@@ -17,10 +17,9 @@ usage: h5diff [OPTIONS] file1 file2 [obj1[ obj2]]
Verbose mode with level. Print differences and list of objects.
Level of detail depends on value of N:
0 : Identical to '-v' or '--verbose'.
- 1 : All level 0 information plus one-line attribute
- status summary.
- 2 : All level 1 information plus extended attribute
- status report.
+ 1 : All level 0 information plus one-line attribute status summary.
+ 2 : All level 1 information plus extended attribute status report.
+ 3 : All level 2 information plus file names.
-q, --quiet
Quiet mode. Do not produce output.
--enable-error-stack
@@ -109,6 +108,14 @@ usage: h5diff [OPTIONS] file1 file2 [obj1[ obj2]]
excluded.
This option can be used repeatedly to exclude multiple paths.
+ --exclude-attribute "path/to/object/with/attribute"
+ Exclude attributes on the specified path to an object when comparing files or groups.
+
+ If there are multiple paths to an object, only the specified path(s)
+ will be excluded; the comparison will include any path not explicitly
+ excluded.
+ This option can be used repeatedly to exclude multiple paths.
+
Modes of output:
Default mode: print the number of differences found and where they occured
-r Report mode: print the above plus the differences
diff --git a/tools/test/h5diff/testfiles/h5diff_603.txt b/tools/test/h5diff/testfiles/h5diff_603.txt
index 36cd0ef..84111b3 100644
--- a/tools/test/h5diff/testfiles/h5diff_603.txt
+++ b/tools/test/h5diff/testfiles/h5diff_603.txt
@@ -18,10 +18,9 @@ usage: h5diff [OPTIONS] file1 file2 [obj1[ obj2]]
Verbose mode with level. Print differences and list of objects.
Level of detail depends on value of N:
0 : Identical to '-v' or '--verbose'.
- 1 : All level 0 information plus one-line attribute
- status summary.
- 2 : All level 1 information plus extended attribute
- status report.
+ 1 : All level 0 information plus one-line attribute status summary.
+ 2 : All level 1 information plus extended attribute status report.
+ 3 : All level 2 information plus file names.
-q, --quiet
Quiet mode. Do not produce output.
--enable-error-stack
@@ -110,6 +109,14 @@ usage: h5diff [OPTIONS] file1 file2 [obj1[ obj2]]
excluded.
This option can be used repeatedly to exclude multiple paths.
+ --exclude-attribute "path/to/object/with/attribute"
+ Exclude attributes on the specified path to an object when comparing files or groups.
+
+ If there are multiple paths to an object, only the specified path(s)
+ will be excluded; the comparison will include any path not explicitly
+ excluded.
+ This option can be used repeatedly to exclude multiple paths.
+
Modes of output:
Default mode: print the number of differences found and where they occured
-r Report mode: print the above plus the differences
diff --git a/tools/test/h5diff/testfiles/h5diff_606.txt b/tools/test/h5diff/testfiles/h5diff_606.txt
index c2e9ac1..d915d36 100644
--- a/tools/test/h5diff/testfiles/h5diff_606.txt
+++ b/tools/test/h5diff/testfiles/h5diff_606.txt
@@ -18,10 +18,9 @@ usage: h5diff [OPTIONS] file1 file2 [obj1[ obj2]]
Verbose mode with level. Print differences and list of objects.
Level of detail depends on value of N:
0 : Identical to '-v' or '--verbose'.
- 1 : All level 0 information plus one-line attribute
- status summary.
- 2 : All level 1 information plus extended attribute
- status report.
+ 1 : All level 0 information plus one-line attribute status summary.
+ 2 : All level 1 information plus extended attribute status report.
+ 3 : All level 2 information plus file names.
-q, --quiet
Quiet mode. Do not produce output.
--enable-error-stack
@@ -110,6 +109,14 @@ usage: h5diff [OPTIONS] file1 file2 [obj1[ obj2]]
excluded.
This option can be used repeatedly to exclude multiple paths.
+ --exclude-attribute "path/to/object/with/attribute"
+ Exclude attributes on the specified path to an object when comparing files or groups.
+
+ If there are multiple paths to an object, only the specified path(s)
+ will be excluded; the comparison will include any path not explicitly
+ excluded.
+ This option can be used repeatedly to exclude multiple paths.
+
Modes of output:
Default mode: print the number of differences found and where they occured
-r Report mode: print the above plus the differences
diff --git a/tools/test/h5diff/testfiles/h5diff_612.txt b/tools/test/h5diff/testfiles/h5diff_612.txt
index 2e09432..1ef8cdf 100644
--- a/tools/test/h5diff/testfiles/h5diff_612.txt
+++ b/tools/test/h5diff/testfiles/h5diff_612.txt
@@ -18,10 +18,9 @@ usage: h5diff [OPTIONS] file1 file2 [obj1[ obj2]]
Verbose mode with level. Print differences and list of objects.
Level of detail depends on value of N:
0 : Identical to '-v' or '--verbose'.
- 1 : All level 0 information plus one-line attribute
- status summary.
- 2 : All level 1 information plus extended attribute
- status report.
+ 1 : All level 0 information plus one-line attribute status summary.
+ 2 : All level 1 information plus extended attribute status report.
+ 3 : All level 2 information plus file names.
-q, --quiet
Quiet mode. Do not produce output.
--enable-error-stack
@@ -110,6 +109,14 @@ usage: h5diff [OPTIONS] file1 file2 [obj1[ obj2]]
excluded.
This option can be used repeatedly to exclude multiple paths.
+ --exclude-attribute "path/to/object/with/attribute"
+ Exclude attributes on the specified path to an object when comparing files or groups.
+
+ If there are multiple paths to an object, only the specified path(s)
+ will be excluded; the comparison will include any path not explicitly
+ excluded.
+ This option can be used repeatedly to exclude multiple paths.
+
Modes of output:
Default mode: print the number of differences found and where they occured
-r Report mode: print the above plus the differences
diff --git a/tools/test/h5diff/testfiles/h5diff_615.txt b/tools/test/h5diff/testfiles/h5diff_615.txt
index a07de54..881362e 100644
--- a/tools/test/h5diff/testfiles/h5diff_615.txt
+++ b/tools/test/h5diff/testfiles/h5diff_615.txt
@@ -18,10 +18,9 @@ usage: h5diff [OPTIONS] file1 file2 [obj1[ obj2]]
Verbose mode with level. Print differences and list of objects.
Level of detail depends on value of N:
0 : Identical to '-v' or '--verbose'.
- 1 : All level 0 information plus one-line attribute
- status summary.
- 2 : All level 1 information plus extended attribute
- status report.
+ 1 : All level 0 information plus one-line attribute status summary.
+ 2 : All level 1 information plus extended attribute status report.
+ 3 : All level 2 information plus file names.
-q, --quiet
Quiet mode. Do not produce output.
--enable-error-stack
@@ -110,6 +109,14 @@ usage: h5diff [OPTIONS] file1 file2 [obj1[ obj2]]
excluded.
This option can be used repeatedly to exclude multiple paths.
+ --exclude-attribute "path/to/object/with/attribute"
+ Exclude attributes on the specified path to an object when comparing files or groups.
+
+ If there are multiple paths to an object, only the specified path(s)
+ will be excluded; the comparison will include any path not explicitly
+ excluded.
+ This option can be used repeatedly to exclude multiple paths.
+
Modes of output:
Default mode: print the number of differences found and where they occured
-r Report mode: print the above plus the differences
diff --git a/tools/test/h5diff/testfiles/h5diff_621.txt b/tools/test/h5diff/testfiles/h5diff_621.txt
index 5f44dd7..ba39a99 100644
--- a/tools/test/h5diff/testfiles/h5diff_621.txt
+++ b/tools/test/h5diff/testfiles/h5diff_621.txt
@@ -18,10 +18,9 @@ usage: h5diff [OPTIONS] file1 file2 [obj1[ obj2]]
Verbose mode with level. Print differences and list of objects.
Level of detail depends on value of N:
0 : Identical to '-v' or '--verbose'.
- 1 : All level 0 information plus one-line attribute
- status summary.
- 2 : All level 1 information plus extended attribute
- status report.
+ 1 : All level 0 information plus one-line attribute status summary.
+ 2 : All level 1 information plus extended attribute status report.
+ 3 : All level 2 information plus file names.
-q, --quiet
Quiet mode. Do not produce output.
--enable-error-stack
@@ -110,6 +109,14 @@ usage: h5diff [OPTIONS] file1 file2 [obj1[ obj2]]
excluded.
This option can be used repeatedly to exclude multiple paths.
+ --exclude-attribute "path/to/object/with/attribute"
+ Exclude attributes on the specified path to an object when comparing files or groups.
+
+ If there are multiple paths to an object, only the specified path(s)
+ will be excluded; the comparison will include any path not explicitly
+ excluded.
+ This option can be used repeatedly to exclude multiple paths.
+
Modes of output:
Default mode: print the number of differences found and where they occured
-r Report mode: print the above plus the differences
diff --git a/tools/test/h5diff/testfiles/h5diff_622.txt b/tools/test/h5diff/testfiles/h5diff_622.txt
index 2e28a42..70421fc 100644
--- a/tools/test/h5diff/testfiles/h5diff_622.txt
+++ b/tools/test/h5diff/testfiles/h5diff_622.txt
@@ -18,10 +18,9 @@ usage: h5diff [OPTIONS] file1 file2 [obj1[ obj2]]
Verbose mode with level. Print differences and list of objects.
Level of detail depends on value of N:
0 : Identical to '-v' or '--verbose'.
- 1 : All level 0 information plus one-line attribute
- status summary.
- 2 : All level 1 information plus extended attribute
- status report.
+ 1 : All level 0 information plus one-line attribute status summary.
+ 2 : All level 1 information plus extended attribute status report.
+ 3 : All level 2 information plus file names.
-q, --quiet
Quiet mode. Do not produce output.
--enable-error-stack
@@ -110,6 +109,14 @@ usage: h5diff [OPTIONS] file1 file2 [obj1[ obj2]]
excluded.
This option can be used repeatedly to exclude multiple paths.
+ --exclude-attribute "path/to/object/with/attribute"
+ Exclude attributes on the specified path to an object when comparing files or groups.
+
+ If there are multiple paths to an object, only the specified path(s)
+ will be excluded; the comparison will include any path not explicitly
+ excluded.
+ This option can be used repeatedly to exclude multiple paths.
+
Modes of output:
Default mode: print the number of differences found and where they occured
-r Report mode: print the above plus the differences
diff --git a/tools/test/h5diff/testfiles/h5diff_623.txt b/tools/test/h5diff/testfiles/h5diff_623.txt
index 21cb90a..0d74268 100644
--- a/tools/test/h5diff/testfiles/h5diff_623.txt
+++ b/tools/test/h5diff/testfiles/h5diff_623.txt
@@ -18,10 +18,9 @@ usage: h5diff [OPTIONS] file1 file2 [obj1[ obj2]]
Verbose mode with level. Print differences and list of objects.
Level of detail depends on value of N:
0 : Identical to '-v' or '--verbose'.
- 1 : All level 0 information plus one-line attribute
- status summary.
- 2 : All level 1 information plus extended attribute
- status report.
+ 1 : All level 0 information plus one-line attribute status summary.
+ 2 : All level 1 information plus extended attribute status report.
+ 3 : All level 2 information plus file names.
-q, --quiet
Quiet mode. Do not produce output.
--enable-error-stack
@@ -110,6 +109,14 @@ usage: h5diff [OPTIONS] file1 file2 [obj1[ obj2]]
excluded.
This option can be used repeatedly to exclude multiple paths.
+ --exclude-attribute "path/to/object/with/attribute"
+ Exclude attributes on the specified path to an object when comparing files or groups.
+
+ If there are multiple paths to an object, only the specified path(s)
+ will be excluded; the comparison will include any path not explicitly
+ excluded.
+ This option can be used repeatedly to exclude multiple paths.
+
Modes of output:
Default mode: print the number of differences found and where they occured
-r Report mode: print the above plus the differences
diff --git a/tools/test/h5diff/testfiles/h5diff_624.txt b/tools/test/h5diff/testfiles/h5diff_624.txt
index 92c98d9..cb8b8b4 100644
--- a/tools/test/h5diff/testfiles/h5diff_624.txt
+++ b/tools/test/h5diff/testfiles/h5diff_624.txt
@@ -18,10 +18,9 @@ usage: h5diff [OPTIONS] file1 file2 [obj1[ obj2]]
Verbose mode with level. Print differences and list of objects.
Level of detail depends on value of N:
0 : Identical to '-v' or '--verbose'.
- 1 : All level 0 information plus one-line attribute
- status summary.
- 2 : All level 1 information plus extended attribute
- status report.
+ 1 : All level 0 information plus one-line attribute status summary.
+ 2 : All level 1 information plus extended attribute status report.
+ 3 : All level 2 information plus file names.
-q, --quiet
Quiet mode. Do not produce output.
--enable-error-stack
@@ -110,6 +109,14 @@ usage: h5diff [OPTIONS] file1 file2 [obj1[ obj2]]
excluded.
This option can be used repeatedly to exclude multiple paths.
+ --exclude-attribute "path/to/object/with/attribute"
+ Exclude attributes on the specified path to an object when comparing files or groups.
+
+ If there are multiple paths to an object, only the specified path(s)
+ will be excluded; the comparison will include any path not explicitly
+ excluded.
+ This option can be used repeatedly to exclude multiple paths.
+
Modes of output:
Default mode: print the number of differences found and where they occured
-r Report mode: print the above plus the differences
diff --git a/tools/test/h5diff/testfiles/h5diff_70.txt b/tools/test/h5diff/testfiles/h5diff_70.txt
index efa34ea..b0b8bf6 100644
--- a/tools/test/h5diff/testfiles/h5diff_70.txt
+++ b/tools/test/h5diff/testfiles/h5diff_70.txt
@@ -1183,10 +1183,42 @@ position opaque3D of </dset> opaque3D of </dset> difference
[ 3 2 1 ] 24 0 24
24 differences found
attribute: <reference of </dset>> and <reference of </dset>>
+Not comparable: <reference of </dset>> or <reference of </dset>> is an empty dataset
+Not comparable: <reference of </dset>> or <reference of </dset>> is an empty dataset
0 differences found
attribute: <reference2D of </dset>> and <reference2D of </dset>>
+Not comparable: <reference2D of </dset>> or <reference2D of </dset>> is an empty dataset
+Not comparable: <reference2D of </dset>> or <reference2D of </dset>> is an empty dataset
+Not comparable: <reference2D of </dset>> or <reference2D of </dset>> is an empty dataset
+Not comparable: <reference2D of </dset>> or <reference2D of </dset>> is an empty dataset
+Not comparable: <reference2D of </dset>> or <reference2D of </dset>> is an empty dataset
+Not comparable: <reference2D of </dset>> or <reference2D of </dset>> is an empty dataset
0 differences found
attribute: <reference3D of </dset>> and <reference3D of </dset>>
+Not comparable: <reference3D of </dset>> or <reference3D of </dset>> is an empty dataset
+Not comparable: <reference3D of </dset>> or <reference3D of </dset>> is an empty dataset
+Not comparable: <reference3D of </dset>> or <reference3D of </dset>> is an empty dataset
+Not comparable: <reference3D of </dset>> or <reference3D of </dset>> is an empty dataset
+Not comparable: <reference3D of </dset>> or <reference3D of </dset>> is an empty dataset
+Not comparable: <reference3D of </dset>> or <reference3D of </dset>> is an empty dataset
+Not comparable: <reference3D of </dset>> or <reference3D of </dset>> is an empty dataset
+Not comparable: <reference3D of </dset>> or <reference3D of </dset>> is an empty dataset
+Not comparable: <reference3D of </dset>> or <reference3D of </dset>> is an empty dataset
+Not comparable: <reference3D of </dset>> or <reference3D of </dset>> is an empty dataset
+Not comparable: <reference3D of </dset>> or <reference3D of </dset>> is an empty dataset
+Not comparable: <reference3D of </dset>> or <reference3D of </dset>> is an empty dataset
+Not comparable: <reference3D of </dset>> or <reference3D of </dset>> is an empty dataset
+Not comparable: <reference3D of </dset>> or <reference3D of </dset>> is an empty dataset
+Not comparable: <reference3D of </dset>> or <reference3D of </dset>> is an empty dataset
+Not comparable: <reference3D of </dset>> or <reference3D of </dset>> is an empty dataset
+Not comparable: <reference3D of </dset>> or <reference3D of </dset>> is an empty dataset
+Not comparable: <reference3D of </dset>> or <reference3D of </dset>> is an empty dataset
+Not comparable: <reference3D of </dset>> or <reference3D of </dset>> is an empty dataset
+Not comparable: <reference3D of </dset>> or <reference3D of </dset>> is an empty dataset
+Not comparable: <reference3D of </dset>> or <reference3D of </dset>> is an empty dataset
+Not comparable: <reference3D of </dset>> or <reference3D of </dset>> is an empty dataset
+Not comparable: <reference3D of </dset>> or <reference3D of </dset>> is an empty dataset
+Not comparable: <reference3D of </dset>> or <reference3D of </dset>> is an empty dataset
0 differences found
attribute: <string of </dset>> and <string of </dset>>
size: [2] [2]
diff --git a/tools/test/h5diff/testfiles/h5diff_700.txt b/tools/test/h5diff/testfiles/h5diff_700.txt
index 851a407..6cf9893 100644
--- a/tools/test/h5diff/testfiles/h5diff_700.txt
+++ b/tools/test/h5diff/testfiles/h5diff_700.txt
@@ -1187,10 +1187,42 @@ position opaque3D of </dset> opaque3D of </dset> difference
[ 3 2 1 ] 24 0 24
24 differences found
attribute: <reference of </dset>> and <reference of </dset>>
+Not comparable: <reference of </dset>> or <reference of </dset>> is an empty dataset
+Not comparable: <reference of </dset>> or <reference of </dset>> is an empty dataset
0 differences found
attribute: <reference2D of </dset>> and <reference2D of </dset>>
+Not comparable: <reference2D of </dset>> or <reference2D of </dset>> is an empty dataset
+Not comparable: <reference2D of </dset>> or <reference2D of </dset>> is an empty dataset
+Not comparable: <reference2D of </dset>> or <reference2D of </dset>> is an empty dataset
+Not comparable: <reference2D of </dset>> or <reference2D of </dset>> is an empty dataset
+Not comparable: <reference2D of </dset>> or <reference2D of </dset>> is an empty dataset
+Not comparable: <reference2D of </dset>> or <reference2D of </dset>> is an empty dataset
0 differences found
attribute: <reference3D of </dset>> and <reference3D of </dset>>
+Not comparable: <reference3D of </dset>> or <reference3D of </dset>> is an empty dataset
+Not comparable: <reference3D of </dset>> or <reference3D of </dset>> is an empty dataset
+Not comparable: <reference3D of </dset>> or <reference3D of </dset>> is an empty dataset
+Not comparable: <reference3D of </dset>> or <reference3D of </dset>> is an empty dataset
+Not comparable: <reference3D of </dset>> or <reference3D of </dset>> is an empty dataset
+Not comparable: <reference3D of </dset>> or <reference3D of </dset>> is an empty dataset
+Not comparable: <reference3D of </dset>> or <reference3D of </dset>> is an empty dataset
+Not comparable: <reference3D of </dset>> or <reference3D of </dset>> is an empty dataset
+Not comparable: <reference3D of </dset>> or <reference3D of </dset>> is an empty dataset
+Not comparable: <reference3D of </dset>> or <reference3D of </dset>> is an empty dataset
+Not comparable: <reference3D of </dset>> or <reference3D of </dset>> is an empty dataset
+Not comparable: <reference3D of </dset>> or <reference3D of </dset>> is an empty dataset
+Not comparable: <reference3D of </dset>> or <reference3D of </dset>> is an empty dataset
+Not comparable: <reference3D of </dset>> or <reference3D of </dset>> is an empty dataset
+Not comparable: <reference3D of </dset>> or <reference3D of </dset>> is an empty dataset
+Not comparable: <reference3D of </dset>> or <reference3D of </dset>> is an empty dataset
+Not comparable: <reference3D of </dset>> or <reference3D of </dset>> is an empty dataset
+Not comparable: <reference3D of </dset>> or <reference3D of </dset>> is an empty dataset
+Not comparable: <reference3D of </dset>> or <reference3D of </dset>> is an empty dataset
+Not comparable: <reference3D of </dset>> or <reference3D of </dset>> is an empty dataset
+Not comparable: <reference3D of </dset>> or <reference3D of </dset>> is an empty dataset
+Not comparable: <reference3D of </dset>> or <reference3D of </dset>> is an empty dataset
+Not comparable: <reference3D of </dset>> or <reference3D of </dset>> is an empty dataset
+Not comparable: <reference3D of </dset>> or <reference3D of </dset>> is an empty dataset
0 differences found
attribute: <string of </dset>> and <string of </dset>>
size: [2] [2]
diff --git a/tools/test/h5diff/testfiles/h5diff_701.txt b/tools/test/h5diff/testfiles/h5diff_701.txt
index 33f1a0f..4187754 100644
--- a/tools/test/h5diff/testfiles/h5diff_701.txt
+++ b/tools/test/h5diff/testfiles/h5diff_701.txt
@@ -1254,10 +1254,42 @@ position opaque3D of </dset> opaque3D of </dset> difference
[ 3 2 1 ] 24 0 24
24 differences found
attribute: <reference of </dset>> and <reference of </dset>>
+Not comparable: <reference of </dset>> or <reference of </dset>> is an empty dataset
+Not comparable: <reference of </dset>> or <reference of </dset>> is an empty dataset
0 differences found
attribute: <reference2D of </dset>> and <reference2D of </dset>>
+Not comparable: <reference2D of </dset>> or <reference2D of </dset>> is an empty dataset
+Not comparable: <reference2D of </dset>> or <reference2D of </dset>> is an empty dataset
+Not comparable: <reference2D of </dset>> or <reference2D of </dset>> is an empty dataset
+Not comparable: <reference2D of </dset>> or <reference2D of </dset>> is an empty dataset
+Not comparable: <reference2D of </dset>> or <reference2D of </dset>> is an empty dataset
+Not comparable: <reference2D of </dset>> or <reference2D of </dset>> is an empty dataset
0 differences found
attribute: <reference3D of </dset>> and <reference3D of </dset>>
+Not comparable: <reference3D of </dset>> or <reference3D of </dset>> is an empty dataset
+Not comparable: <reference3D of </dset>> or <reference3D of </dset>> is an empty dataset
+Not comparable: <reference3D of </dset>> or <reference3D of </dset>> is an empty dataset
+Not comparable: <reference3D of </dset>> or <reference3D of </dset>> is an empty dataset
+Not comparable: <reference3D of </dset>> or <reference3D of </dset>> is an empty dataset
+Not comparable: <reference3D of </dset>> or <reference3D of </dset>> is an empty dataset
+Not comparable: <reference3D of </dset>> or <reference3D of </dset>> is an empty dataset
+Not comparable: <reference3D of </dset>> or <reference3D of </dset>> is an empty dataset
+Not comparable: <reference3D of </dset>> or <reference3D of </dset>> is an empty dataset
+Not comparable: <reference3D of </dset>> or <reference3D of </dset>> is an empty dataset
+Not comparable: <reference3D of </dset>> or <reference3D of </dset>> is an empty dataset
+Not comparable: <reference3D of </dset>> or <reference3D of </dset>> is an empty dataset
+Not comparable: <reference3D of </dset>> or <reference3D of </dset>> is an empty dataset
+Not comparable: <reference3D of </dset>> or <reference3D of </dset>> is an empty dataset
+Not comparable: <reference3D of </dset>> or <reference3D of </dset>> is an empty dataset
+Not comparable: <reference3D of </dset>> or <reference3D of </dset>> is an empty dataset
+Not comparable: <reference3D of </dset>> or <reference3D of </dset>> is an empty dataset
+Not comparable: <reference3D of </dset>> or <reference3D of </dset>> is an empty dataset
+Not comparable: <reference3D of </dset>> or <reference3D of </dset>> is an empty dataset
+Not comparable: <reference3D of </dset>> or <reference3D of </dset>> is an empty dataset
+Not comparable: <reference3D of </dset>> or <reference3D of </dset>> is an empty dataset
+Not comparable: <reference3D of </dset>> or <reference3D of </dset>> is an empty dataset
+Not comparable: <reference3D of </dset>> or <reference3D of </dset>> is an empty dataset
+Not comparable: <reference3D of </dset>> or <reference3D of </dset>> is an empty dataset
0 differences found
attribute: <string of </dset>> and <string of </dset>>
size: [2] [2]
diff --git a/tools/test/h5diff/testfiles/h5diff_702.txt b/tools/test/h5diff/testfiles/h5diff_702.txt
index 851a407..6cf9893 100644
--- a/tools/test/h5diff/testfiles/h5diff_702.txt
+++ b/tools/test/h5diff/testfiles/h5diff_702.txt
@@ -1187,10 +1187,42 @@ position opaque3D of </dset> opaque3D of </dset> difference
[ 3 2 1 ] 24 0 24
24 differences found
attribute: <reference of </dset>> and <reference of </dset>>
+Not comparable: <reference of </dset>> or <reference of </dset>> is an empty dataset
+Not comparable: <reference of </dset>> or <reference of </dset>> is an empty dataset
0 differences found
attribute: <reference2D of </dset>> and <reference2D of </dset>>
+Not comparable: <reference2D of </dset>> or <reference2D of </dset>> is an empty dataset
+Not comparable: <reference2D of </dset>> or <reference2D of </dset>> is an empty dataset
+Not comparable: <reference2D of </dset>> or <reference2D of </dset>> is an empty dataset
+Not comparable: <reference2D of </dset>> or <reference2D of </dset>> is an empty dataset
+Not comparable: <reference2D of </dset>> or <reference2D of </dset>> is an empty dataset
+Not comparable: <reference2D of </dset>> or <reference2D of </dset>> is an empty dataset
0 differences found
attribute: <reference3D of </dset>> and <reference3D of </dset>>
+Not comparable: <reference3D of </dset>> or <reference3D of </dset>> is an empty dataset
+Not comparable: <reference3D of </dset>> or <reference3D of </dset>> is an empty dataset
+Not comparable: <reference3D of </dset>> or <reference3D of </dset>> is an empty dataset
+Not comparable: <reference3D of </dset>> or <reference3D of </dset>> is an empty dataset
+Not comparable: <reference3D of </dset>> or <reference3D of </dset>> is an empty dataset
+Not comparable: <reference3D of </dset>> or <reference3D of </dset>> is an empty dataset
+Not comparable: <reference3D of </dset>> or <reference3D of </dset>> is an empty dataset
+Not comparable: <reference3D of </dset>> or <reference3D of </dset>> is an empty dataset
+Not comparable: <reference3D of </dset>> or <reference3D of </dset>> is an empty dataset
+Not comparable: <reference3D of </dset>> or <reference3D of </dset>> is an empty dataset
+Not comparable: <reference3D of </dset>> or <reference3D of </dset>> is an empty dataset
+Not comparable: <reference3D of </dset>> or <reference3D of </dset>> is an empty dataset
+Not comparable: <reference3D of </dset>> or <reference3D of </dset>> is an empty dataset
+Not comparable: <reference3D of </dset>> or <reference3D of </dset>> is an empty dataset
+Not comparable: <reference3D of </dset>> or <reference3D of </dset>> is an empty dataset
+Not comparable: <reference3D of </dset>> or <reference3D of </dset>> is an empty dataset
+Not comparable: <reference3D of </dset>> or <reference3D of </dset>> is an empty dataset
+Not comparable: <reference3D of </dset>> or <reference3D of </dset>> is an empty dataset
+Not comparable: <reference3D of </dset>> or <reference3D of </dset>> is an empty dataset
+Not comparable: <reference3D of </dset>> or <reference3D of </dset>> is an empty dataset
+Not comparable: <reference3D of </dset>> or <reference3D of </dset>> is an empty dataset
+Not comparable: <reference3D of </dset>> or <reference3D of </dset>> is an empty dataset
+Not comparable: <reference3D of </dset>> or <reference3D of </dset>> is an empty dataset
+Not comparable: <reference3D of </dset>> or <reference3D of </dset>> is an empty dataset
0 differences found
attribute: <string of </dset>> and <string of </dset>>
size: [2] [2]
diff --git a/tools/test/h5diff/testfiles/h5diff_703.txt b/tools/test/h5diff/testfiles/h5diff_703.txt
index 33f1a0f..4187754 100644
--- a/tools/test/h5diff/testfiles/h5diff_703.txt
+++ b/tools/test/h5diff/testfiles/h5diff_703.txt
@@ -1254,10 +1254,42 @@ position opaque3D of </dset> opaque3D of </dset> difference
[ 3 2 1 ] 24 0 24
24 differences found
attribute: <reference of </dset>> and <reference of </dset>>
+Not comparable: <reference of </dset>> or <reference of </dset>> is an empty dataset
+Not comparable: <reference of </dset>> or <reference of </dset>> is an empty dataset
0 differences found
attribute: <reference2D of </dset>> and <reference2D of </dset>>
+Not comparable: <reference2D of </dset>> or <reference2D of </dset>> is an empty dataset
+Not comparable: <reference2D of </dset>> or <reference2D of </dset>> is an empty dataset
+Not comparable: <reference2D of </dset>> or <reference2D of </dset>> is an empty dataset
+Not comparable: <reference2D of </dset>> or <reference2D of </dset>> is an empty dataset
+Not comparable: <reference2D of </dset>> or <reference2D of </dset>> is an empty dataset
+Not comparable: <reference2D of </dset>> or <reference2D of </dset>> is an empty dataset
0 differences found
attribute: <reference3D of </dset>> and <reference3D of </dset>>
+Not comparable: <reference3D of </dset>> or <reference3D of </dset>> is an empty dataset
+Not comparable: <reference3D of </dset>> or <reference3D of </dset>> is an empty dataset
+Not comparable: <reference3D of </dset>> or <reference3D of </dset>> is an empty dataset
+Not comparable: <reference3D of </dset>> or <reference3D of </dset>> is an empty dataset
+Not comparable: <reference3D of </dset>> or <reference3D of </dset>> is an empty dataset
+Not comparable: <reference3D of </dset>> or <reference3D of </dset>> is an empty dataset
+Not comparable: <reference3D of </dset>> or <reference3D of </dset>> is an empty dataset
+Not comparable: <reference3D of </dset>> or <reference3D of </dset>> is an empty dataset
+Not comparable: <reference3D of </dset>> or <reference3D of </dset>> is an empty dataset
+Not comparable: <reference3D of </dset>> or <reference3D of </dset>> is an empty dataset
+Not comparable: <reference3D of </dset>> or <reference3D of </dset>> is an empty dataset
+Not comparable: <reference3D of </dset>> or <reference3D of </dset>> is an empty dataset
+Not comparable: <reference3D of </dset>> or <reference3D of </dset>> is an empty dataset
+Not comparable: <reference3D of </dset>> or <reference3D of </dset>> is an empty dataset
+Not comparable: <reference3D of </dset>> or <reference3D of </dset>> is an empty dataset
+Not comparable: <reference3D of </dset>> or <reference3D of </dset>> is an empty dataset
+Not comparable: <reference3D of </dset>> or <reference3D of </dset>> is an empty dataset
+Not comparable: <reference3D of </dset>> or <reference3D of </dset>> is an empty dataset
+Not comparable: <reference3D of </dset>> or <reference3D of </dset>> is an empty dataset
+Not comparable: <reference3D of </dset>> or <reference3D of </dset>> is an empty dataset
+Not comparable: <reference3D of </dset>> or <reference3D of </dset>> is an empty dataset
+Not comparable: <reference3D of </dset>> or <reference3D of </dset>> is an empty dataset
+Not comparable: <reference3D of </dset>> or <reference3D of </dset>> is an empty dataset
+Not comparable: <reference3D of </dset>> or <reference3D of </dset>> is an empty dataset
0 differences found
attribute: <string of </dset>> and <string of </dset>>
size: [2] [2]
diff --git a/tools/test/h5diff/testfiles/h5diff_80.txt b/tools/test/h5diff/testfiles/h5diff_80.txt
index b223eed..11dccd8 100644
--- a/tools/test/h5diff/testfiles/h5diff_80.txt
+++ b/tools/test/h5diff/testfiles/h5diff_80.txt
@@ -528,166 +528,166 @@ position opaque3D opaque3D difference
24 differences found
dataset: </g1/reference> and </g1/reference>
size: [2] [2]
-position difference
+position reference reference difference
------------------------------------------------------------
[ 0 ] 1 0 1
[ 1 ] 2 0 2
size: [2] [2]
-position difference
+position reference reference difference
------------------------------------------------------------
[ 0 ] 1 0 1
[ 1 ] 2 0 2
4 differences found
dataset: </g1/reference2D> and </g1/reference2D>
size: [2] [2]
-position difference
+position reference2D reference2D difference
------------------------------------------------------------
[ 0 ] 1 0 1
[ 1 ] 2 0 2
size: [2] [2]
-position difference
+position reference2D reference2D difference
------------------------------------------------------------
[ 0 ] 1 0 1
[ 1 ] 2 0 2
size: [2] [2]
-position difference
+position reference2D reference2D difference
------------------------------------------------------------
[ 0 ] 1 0 1
[ 1 ] 2 0 2
size: [2] [2]
-position difference
+position reference2D reference2D difference
------------------------------------------------------------
[ 0 ] 1 0 1
[ 1 ] 2 0 2
size: [2] [2]
-position difference
+position reference2D reference2D difference
------------------------------------------------------------
[ 0 ] 1 0 1
[ 1 ] 2 0 2
size: [2] [2]
-position difference
+position reference2D reference2D difference
------------------------------------------------------------
[ 0 ] 1 0 1
[ 1 ] 2 0 2
12 differences found
dataset: </g1/reference3D> and </g1/reference3D>
size: [2] [2]
-position difference
+position reference3D reference3D difference
------------------------------------------------------------
[ 0 ] 1 0 1
[ 1 ] 2 0 2
size: [2] [2]
-position difference
+position reference3D reference3D difference
------------------------------------------------------------
[ 0 ] 1 0 1
[ 1 ] 2 0 2
size: [2] [2]
-position difference
+position reference3D reference3D difference
------------------------------------------------------------
[ 0 ] 1 0 1
[ 1 ] 2 0 2
size: [2] [2]
-position difference
+position reference3D reference3D difference
------------------------------------------------------------
[ 0 ] 1 0 1
[ 1 ] 2 0 2
size: [2] [2]
-position difference
+position reference3D reference3D difference
------------------------------------------------------------
[ 0 ] 1 0 1
[ 1 ] 2 0 2
size: [2] [2]
-position difference
+position reference3D reference3D difference
------------------------------------------------------------
[ 0 ] 1 0 1
[ 1 ] 2 0 2
size: [2] [2]
-position difference
+position reference3D reference3D difference
------------------------------------------------------------
[ 0 ] 1 0 1
[ 1 ] 2 0 2
size: [2] [2]
-position difference
+position reference3D reference3D difference
------------------------------------------------------------
[ 0 ] 1 0 1
[ 1 ] 2 0 2
size: [2] [2]
-position difference
+position reference3D reference3D difference
------------------------------------------------------------
[ 0 ] 1 0 1
[ 1 ] 2 0 2
size: [2] [2]
-position difference
+position reference3D reference3D difference
------------------------------------------------------------
[ 0 ] 1 0 1
[ 1 ] 2 0 2
size: [2] [2]
-position difference
+position reference3D reference3D difference
------------------------------------------------------------
[ 0 ] 1 0 1
[ 1 ] 2 0 2
size: [2] [2]
-position difference
+position reference3D reference3D difference
------------------------------------------------------------
[ 0 ] 1 0 1
[ 1 ] 2 0 2
size: [2] [2]
-position difference
+position reference3D reference3D difference
------------------------------------------------------------
[ 0 ] 1 0 1
[ 1 ] 2 0 2
size: [2] [2]
-position difference
+position reference3D reference3D difference
------------------------------------------------------------
[ 0 ] 1 0 1
[ 1 ] 2 0 2
size: [2] [2]
-position difference
+position reference3D reference3D difference
------------------------------------------------------------
[ 0 ] 1 0 1
[ 1 ] 2 0 2
size: [2] [2]
-position difference
+position reference3D reference3D difference
------------------------------------------------------------
[ 0 ] 1 0 1
[ 1 ] 2 0 2
size: [2] [2]
-position difference
+position reference3D reference3D difference
------------------------------------------------------------
[ 0 ] 1 0 1
[ 1 ] 2 0 2
size: [2] [2]
-position difference
+position reference3D reference3D difference
------------------------------------------------------------
[ 0 ] 1 0 1
[ 1 ] 2 0 2
size: [2] [2]
-position difference
+position reference3D reference3D difference
------------------------------------------------------------
[ 0 ] 1 0 1
[ 1 ] 2 0 2
size: [2] [2]
-position difference
+position reference3D reference3D difference
------------------------------------------------------------
[ 0 ] 1 0 1
[ 1 ] 2 0 2
size: [2] [2]
-position difference
+position reference3D reference3D difference
------------------------------------------------------------
[ 0 ] 1 0 1
[ 1 ] 2 0 2
size: [2] [2]
-position difference
+position reference3D reference3D difference
------------------------------------------------------------
[ 0 ] 1 0 1
[ 1 ] 2 0 2
size: [2] [2]
-position difference
+position reference3D reference3D difference
------------------------------------------------------------
[ 0 ] 1 0 1
[ 1 ] 2 0 2
size: [2] [2]
-position difference
+position reference3D reference3D difference
------------------------------------------------------------
[ 0 ] 1 0 1
[ 1 ] 2 0 2
diff --git a/tools/test/h5diff/testfiles/h5diff_830.txt b/tools/test/h5diff/testfiles/h5diff_830.txt
new file mode 100644
index 0000000..8f00d8b
--- /dev/null
+++ b/tools/test/h5diff/testfiles/h5diff_830.txt
@@ -0,0 +1,30 @@
+dataset: </g1/array3D> and </g1/array3D>
+size: [4x3x2] [4x3x2]
+position array3D array3D difference
+------------------------------------------------------------
+[ 0 0 0 ] 1 0 1
+[ 0 0 0 ] 2 0 2
+[ 0 0 0 ] 3 0 3
+[ 0 0 1 ] 4 0 4
+[ 0 0 1 ] 5 0 5
+[ 0 0 1 ] 6 0 6
+[ 0 2 0 ] 13 0 13
+[ 0 2 0 ] 14 0 14
+[ 0 2 0 ] 15 0 15
+[ 0 2 1 ] 16 0 16
+[ 0 2 1 ] 17 0 17
+[ 0 2 1 ] 18 0 18
+[ 2 0 0 ] 37 0 37
+[ 2 0 0 ] 38 0 38
+[ 2 0 0 ] 39 0 39
+[ 2 0 1 ] 40 0 40
+[ 2 0 1 ] 41 0 41
+[ 2 0 1 ] 42 0 42
+[ 2 2 0 ] 49 0 49
+[ 2 2 0 ] 50 0 50
+[ 2 2 0 ] 51 0 51
+[ 2 2 1 ] 52 0 52
+[ 2 2 1 ] 53 0 53
+[ 2 2 1 ] 54 0 54
+24 differences found
+EXIT CODE: 1
diff --git a/tools/test/h5diff/testfiles/h5diff_eps.txt b/tools/test/h5diff/testfiles/h5diff_eps.txt
new file mode 100644
index 0000000..3a71366
--- /dev/null
+++ b/tools/test/h5diff/testfiles/h5diff_eps.txt
@@ -0,0 +1,17 @@
+file1: h5diff_eps1.h5
+file2: h5diff_eps2.h5
+
+file1 file2
+---------------------------------------
+ x x /
+ x x /DS1
+
+
+group : </> and </>
+0 differences found
+Attributes status: 0 common, 0 only in obj1, 0 only in obj2
+
+dataset: </DS1> and </DS1>
+0 differences found
+Attributes status: 0 common, 0 only in obj1, 0 only in obj2
+EXIT CODE: 0
diff --git a/tools/test/h5diff/testfiles/h5diff_eps1.h5 b/tools/test/h5diff/testfiles/h5diff_eps1.h5
new file mode 100644
index 0000000..2803a1d
--- /dev/null
+++ b/tools/test/h5diff/testfiles/h5diff_eps1.h5
Binary files differ
diff --git a/tools/test/h5diff/testfiles/h5diff_eps2.h5 b/tools/test/h5diff/testfiles/h5diff_eps2.h5
new file mode 100644
index 0000000..4acf27a
--- /dev/null
+++ b/tools/test/h5diff/testfiles/h5diff_eps2.h5
Binary files differ
diff --git a/tools/test/h5diff/testfiles/h5diff_reg.txt b/tools/test/h5diff/testfiles/h5diff_reg.txt
index d4f5415..ecb6275 100644
--- a/tools/test/h5diff/testfiles/h5diff_reg.txt
+++ b/tools/test/h5diff/testfiles/h5diff_reg.txt
@@ -1,12 +1,11 @@
dataset: </Dataset3> and </Dataset3>
-attribute: <Attr1 of <(null)>> and <Attr1 of <(null)>>
+attribute: <Attr1 of <Dataset3>> and <Attr1 of <Dataset3>>
0 differences found
-Warning: Cannot open referenced attribute: attribute 1
-Warning: Cannot open referenced attribute: attribute 2
-attribute: <Attr2 of <(null)>> and <Attr2 of <(null)>>
+Warning: Cannot open referenced attribute1
+attribute: <Attr2 of <Dataset3>> and <Attr2 of <Dataset3>>
0 differences found
-attribute: <Attr3 of <(null)>> and <Attr3 of <(null)>>
+attribute: <Attr3 of <Dataset3>> and <Attr3 of <Dataset3>>
0 differences found
0 differences found
obj1 obj2
diff --git a/tools/test/h5diff/testfiles/diff_strings1.h5 b/tools/test/h5diff/testfiles/h5diff_strings1.h5
index 0f8b380..0f8b380 100644
--- a/tools/test/h5diff/testfiles/diff_strings1.h5
+++ b/tools/test/h5diff/testfiles/h5diff_strings1.h5
Binary files differ
diff --git a/tools/test/h5diff/testfiles/diff_strings2.h5 b/tools/test/h5diff/testfiles/h5diff_strings2.h5
index e8520ae..e8520ae 100644
--- a/tools/test/h5diff/testfiles/diff_strings2.h5
+++ b/tools/test/h5diff/testfiles/h5diff_strings2.h5
Binary files differ
diff --git a/tools/test/h5diff/testh5diff.sh.in b/tools/test/h5diff/testh5diff.sh.in
index 2d490a8..587c340 100644
--- a/tools/test/h5diff/testh5diff.sh.in
+++ b/tools/test/h5diff/testh5diff.sh.in
@@ -85,6 +85,7 @@ $SRC_H5DIFF_TESTFILES/h5diff_attr2.h5
$SRC_H5DIFF_TESTFILES/h5diff_attr3.h5
$SRC_H5DIFF_TESTFILES/h5diff_dset1.h5
$SRC_H5DIFF_TESTFILES/h5diff_dset2.h5
+$SRC_H5DIFF_TESTFILES/h5diff_dset3.h5
$SRC_H5DIFF_TESTFILES/h5diff_hyper1.h5
$SRC_H5DIFF_TESTFILES/h5diff_hyper2.h5
$SRC_H5DIFF_TESTFILES/h5diff_empty.h5
@@ -119,8 +120,10 @@ $SRC_H5DIFF_TESTFILES/h5diff_attr_v_level2.h5
$SRC_H5DIFF_TESTFILES/h5diff_enum_invalid_values.h5
$SRC_H5DIFF_TESTFILES/non_comparables1.h5
$SRC_H5DIFF_TESTFILES/non_comparables2.h5
-$SRC_H5DIFF_TESTFILES/diff_strings1.h5
-$SRC_H5DIFF_TESTFILES/diff_strings2.h5
+$SRC_H5DIFF_TESTFILES/h5diff_strings1.h5
+$SRC_H5DIFF_TESTFILES/h5diff_strings2.h5
+$SRC_H5DIFF_TESTFILES/h5diff_eps1.h5
+$SRC_H5DIFF_TESTFILES/h5diff_eps2.h5
$SRC_TOOLS_TESTFILES/tvlstr.h5
"
@@ -349,6 +352,9 @@ $SRC_H5DIFF_TESTFILES/h5diff_708.txt
$SRC_H5DIFF_TESTFILES/h5diff_709.txt
$SRC_H5DIFF_TESTFILES/h5diff_710.txt
$SRC_H5DIFF_TESTFILES/h5diff_80.txt
+$SRC_H5DIFF_TESTFILES/h5diff_800.txt
+$SRC_H5DIFF_TESTFILES/h5diff_801.txt
+$SRC_H5DIFF_TESTFILES/h5diff_830.txt
$SRC_H5DIFF_TESTFILES/h5diff_90.txt
$SRC_H5DIFF_TESTFILES/h5diff_8625.txt
$SRC_H5DIFF_TESTFILES/h5diff_8639.txt
@@ -357,6 +363,7 @@ $SRC_H5DIFF_TESTFILES/h5diff_v1.txt
$SRC_H5DIFF_TESTFILES/h5diff_v2.txt
$SRC_H5DIFF_TESTFILES/h5diff_v3.txt
$SRC_H5DIFF_TESTFILES/h5diff_vlstr.txt
+$SRC_H5DIFF_TESTFILES/h5diff_eps.txt
"
#
@@ -494,18 +501,20 @@ TOOLTEST() {
# Run test.
TESTING $H5DIFF $@
(
- #echo "#############################"
- #echo "Expected output for '$H5DIFF $@'"
- #echo "#############################"
- cd $TESTDIR
- eval $RUNCMD $H5DIFF_BIN "$@"
+ #echo "#############################"
+ #echo "Expected output for '$H5DIFF $@'"
+ #echo "#############################"
+ cd $TESTDIR
+ eval $RUNCMD $H5DIFF_BIN "$@"
) >$actual 2>$actual_err
EXIT_CODE=$?
+
# save actual and actual_err in case they are needed later.
cp $actual $actual_sav
STDOUT_FILTER $actual
cp $actual_err $actual_err_sav
STDERR_FILTER $actual_err
+
# don't add exit code check in pmode, as it causes failure. (exit code
# is from mpirun not tool)
# if any problem occurs relate to an exit code, it will be caught in
@@ -539,23 +548,24 @@ TOOLTEST() {
# is done by serial mode.
grep -v "EXIT CODE:" $expect_sorted > $expect_sorted.noexit
mv $expect_sorted.noexit $expect_sorted
- if $CMP $expect_sorted $actual_sorted; then
- echo " PASSED"
- else
- echo "*FAILED*"
- nerrors="`expr $nerrors + 1`"
- if test yes = "$verbose"; then
- echo "====Expected result ($expect_sorted) differs from actual result ($actual_sorted)"
- $DIFF $expect_sorted $actual_sorted |sed 's/^/ /'
- echo "====The actual output ($actual_sav)"
- sed 's/^/ /' < $actual_sav
- echo "====The actual stderr ($actual_err_sav)"
- sed 's/^/ /' < $actual_err_sav
- echo "====End of actual stderr ($actual_err_sav)"
- echo ""
+
+ if $CMP $expect_sorted $actual_sorted; then
+ echo " PASSED"
+ else
+ echo "*FAILED*"
+ nerrors="`expr $nerrors + 1`"
+ if test yes = "$verbose"; then
+ echo "====Expected result ($expect_sorted) differs from actual result ($actual_sorted)"
+ $DIFF $expect_sorted $actual_sorted |sed 's/^/ /'
+ echo "====The actual output ($actual_sav)"
+ sed 's/^/ /' < $actual_sav
+ echo "====The actual stderr ($actual_err_sav)"
+ sed 's/^/ /' < $actual_err_sav
+ echo "====End of actual stderr ($actual_err_sav)"
+ echo ""
+ fi
fi
fi
- fi
# Clean up output file
if test -z "$HDF5_NOCLEANUP"; then
@@ -717,10 +727,10 @@ TOOLTEST h5diff_59.txt -v h5diff_dtypes.h5 h5diff_dtypes.h5 dset11a dset11b
# Strings
# ( HDFFV-10128 )
-TOOLTEST h5diff_60.txt -v diff_strings1.h5 diff_strings2.h5 string1 string1
-TOOLTEST h5diff_61.txt -v diff_strings1.h5 diff_strings2.h5 string2 string2
-TOOLTEST h5diff_62.txt -v diff_strings1.h5 diff_strings2.h5 string3 string3
-TOOLTEST h5diff_63.txt -v diff_strings1.h5 diff_strings2.h5 string4 string4
+TOOLTEST h5diff_60.txt -v h5diff_strings1.h5 h5diff_strings2.h5 string1 string1
+TOOLTEST h5diff_61.txt -v h5diff_strings1.h5 h5diff_strings2.h5 string2 string2
+TOOLTEST h5diff_62.txt -v h5diff_strings1.h5 h5diff_strings2.h5 string3 string3
+TOOLTEST h5diff_63.txt -v h5diff_strings1.h5 h5diff_strings2.h5 string4 string4
# ##############################################################################
# # Error messages
@@ -763,6 +773,9 @@ TOOLTEST h5diff_609.txt -d 200 h5diff_basic1.h5 h5diff_basic2.h5 g1/dset3 g1/dse
# 6.10: number smaller than smallest difference
TOOLTEST h5diff_610.txt -d 1 h5diff_basic1.h5 h5diff_basic2.h5 g1/dset3 g1/dset4
+# eps: number smaller than epsilon
+TOOLTEST h5diff_eps.txt -v3 -d 1e-16 h5diff_eps1.h5 h5diff_eps2.h5
+
# ##############################################################################
# # -p
@@ -1184,6 +1197,17 @@ TOOLTEST h5diff_645.txt -v -p 0.05 --use-system-epsilon h5diff_basic1.h5 h5diff_
TOOLTEST h5diff_646.txt -v --use-system-epsilon -p 0.05 h5diff_basic1.h5 h5diff_basic2.h5 /g1/dset3 /g1/dset4
# ##############################################################################
+# # Test array variances
+# ##############################################################################
+TOOLTEST h5diff_800.txt -v h5diff_dset1.h5 h5diff_dset2.h5 /g1/array /g1/array
+TOOLTEST h5diff_801.txt -v h5diff_dset1.h5 h5diff_dset3.h5 /g1/array /g1/array
+
+# ##############################################################################
+# # dataset subsets
+# ##############################################################################
+#TRILABS-227 TOOLTEST h5diff_830.txt --enable-error-stack -v h5diff_dset1.h5 h5diff_dset2.h5 /g1/array3D[0,0,0;2,2,1;2,2,2;] /g1/array3D[0,0,0;2,2,1;2,2,2;]
+
+# ##############################################################################
# VDS tests
# ##############################################################################
TOOLTEST h5diff_v1.txt -v 1_vds.h5 2_vds.h5
diff --git a/tools/test/h5dump/h5dump_plugin.sh.in b/tools/test/h5dump/h5dump_plugin.sh.in
index 6a00a16..d940ab3 100644
--- a/tools/test/h5dump/h5dump_plugin.sh.in
+++ b/tools/test/h5dump/h5dump_plugin.sh.in
@@ -181,8 +181,8 @@ TOOLTEST() {
# Run test.
TESTING $H5DUMP $@
(
- cd $TESTDIR
- $ENVCMD $RUNSERIAL $H5DUMP_BIN "$@"
+ cd $TESTDIR
+ $ENVCMD $RUNSERIAL $H5DUMP_BIN "$@"
) >$actual 2>$actual_err
# save actual and actual_err in case they are needed later.
@@ -192,24 +192,24 @@ TOOLTEST() {
STDERR_FILTER $actual_err
cat $actual_err >> $actual
- if [ ! -f $expect ]; then
- # Create the expect file if it doesn't yet exist.
- echo " CREATED"
- cp $actual $expect
- echo " Expected result (*.ddl) missing"
- nerrors="`expr $nerrors + 1`"
+ if [ ! -f $expect ]; then
+ # Create the expect file if it doesn't yet exist.
+ echo " CREATED"
+ cp $actual $expect
+ echo " Expected result (*.ddl) missing"
+ nerrors="`expr $nerrors + 1`"
elif $CMP $expect $actual > /dev/null 2>&1 ; then
- echo " PASSED"
+ echo " PASSED"
else
- echo "*FAILED*"
- echo " Expected result (*.ddl) differs from actual result (*.out)"
- nerrors="`expr $nerrors + 1`"
- test yes = "$verbose" && $DIFF $caseless $expect $actual |sed 's/^/ /'
+ echo "*FAILED*"
+ echo " Expected result (*.ddl) differs from actual result (*.out)"
+ nerrors="`expr $nerrors + 1`"
+ test yes = "$verbose" && $DIFF $caseless $expect $actual |sed 's/^/ /'
fi
# Clean up output file
if test -z "$HDF5_NOCLEANUP"; then
- rm -f $actual $actual_err $actual_sav $actual_err_sav $actual_ext
+ rm -f $actual $actual_err $actual_sav $actual_err_sav $actual_ext
fi
}
diff --git a/tools/test/h5dump/h5dumpgentest.c b/tools/test/h5dump/h5dumpgentest.c
index 731e233..3bb6604 100644
--- a/tools/test/h5dump/h5dumpgentest.c
+++ b/tools/test/h5dump/h5dumpgentest.c
@@ -3964,7 +3964,7 @@ static void gent_char(void)
*
* Return: void
*
- * Programmer: pvn@ncsa.uiuc.edu
+ * Programmer: Pedro Vicente
*
* Date: May 28, 2003
*
@@ -4404,7 +4404,7 @@ static void write_attr_in(hid_t loc_id,
*
* Return: void
*
- * Programmer: pvn@ncsa.uiuc.edu
+ * Programmer: Pedro Vicente
*
* Date: May 28, 2003
*
@@ -4854,7 +4854,7 @@ static void write_dset_in(hid_t loc_id,
*
* Return: void
*
- * Programmer: pvn@ncsa.uiuc.edu
+ * Programmer: Pedro Vicente
*
* Date: May 19, 2003
*
@@ -4923,7 +4923,7 @@ static void gent_attr_all(void)
*
* Purpose: utility function to write an attribute
*
- * Programmer: pvn@ncsa.uiuc.edu
+ * Programmer: Pedro Vicente
*
* Date: May 19, 2003
*
@@ -4962,7 +4962,7 @@ int write_attr(hid_t loc_id, int rank, hsize_t *dims, const char *attr_name,
*
* Return:
*
- * Programmer: pvn@ncsa.uiuc.edu
+ * Programmer: Pedro Vicente
*
* Date: May 27, 2003
*
diff --git a/tools/test/h5dump/testh5dump.sh.in b/tools/test/h5dump/testh5dump.sh.in
index 53c8927..b69346e 100644
--- a/tools/test/h5dump/testh5dump.sh.in
+++ b/tools/test/h5dump/testh5dump.sh.in
@@ -465,14 +465,14 @@ TESTING() {
TOOLTEST() {
# check if caseless compare and diff requested
if [ "$1" = ignorecase ]; then
- caseless="-i"
- # replace cmp with diff which runs much longer.
- xCMP="$DIFF -i"
- shift
+ caseless="-i"
+ # replace cmp with diff which runs much longer.
+ xCMP="$DIFF -i"
+ shift
else
- caseless=""
- # stick with faster cmp if ignorecase is not requested.
- xCMP="$CMP"
+ caseless=""
+ # stick with faster cmp if ignorecase is not requested.
+ xCMP="$CMP"
fi
expect="$TESTDIR/$1"
@@ -485,8 +485,8 @@ TOOLTEST() {
# Run test.
TESTING $DUMPER $@
(
- cd $TESTDIR
- $RUNSERIAL $DUMPER_BIN "$@"
+ cd $TESTDIR
+ $RUNSERIAL $DUMPER_BIN "$@"
) >$actual 2>$actual_err
# save actual and actual_err in case they are needed later.
@@ -495,24 +495,24 @@ TOOLTEST() {
cp $actual_err $actual_err_sav
STDERR_FILTER $actual_err
- if [ ! -f $expect ]; then
- # Create the expect file if it doesn't yet exist.
- echo " CREATED"
- cp $actual $expect
- echo " Expected result (*.ddl) missing"
- nerrors="`expr $nerrors + 1`"
+ if [ ! -f $expect ]; then
+ # Create the expect file if it doesn't yet exist.
+ echo " CREATED"
+ cp $actual $expect
+ echo " Expected result (*.ddl) missing"
+ nerrors="`expr $nerrors + 1`"
elif $xCMP $expect $actual > /dev/null 2>&1 ; then
- echo " PASSED"
+ echo " PASSED"
else
- echo "*FAILED*"
- echo " Expected result (*.ddl) differs from actual result (*.out)"
- nerrors="`expr $nerrors + 1`"
- test yes = "$verbose" && $DIFF $caseless $expect $actual |sed 's/^/ /'
+ echo "*FAILED*"
+ echo " Expected result (*.ddl) differs from actual result (*.out)"
+ nerrors="`expr $nerrors + 1`"
+ test yes = "$verbose" && $DIFF $caseless $expect $actual |sed 's/^/ /'
fi
# Clean up output file
if test -z "$HDF5_NOCLEANUP"; then
- rm -f $actual $actual_err $actual_sav $actual_err_sav $actual_ext
+ rm -f $actual $actual_err $actual_sav $actual_err_sav $actual_ext
fi
}
@@ -534,41 +534,41 @@ TOOLTEST2() {
# Run test.
TESTING $DUMPER $@
(
- cd $TESTDIR
- $RUNSERIAL $DUMPER_BIN "$@"
+ cd $TESTDIR
+ $RUNSERIAL $DUMPER_BIN "$@"
) >$actual 2>$actual_err
if [ ! -f $expect ]; then
- # Create the expect file if it doesn't yet exist.
- echo " CREATED"
- cp $actual $expect
- echo " Expected result (*.ddl) missing"
- nerrors="`expr $nerrors + 1`"
- elif $CMP $expect $actual; then
- if [ ! -f $expectdata ]; then
- # Create the expect data file if it doesn't yet exist.
+ # Create the expect file if it doesn't yet exist.
echo " CREATED"
- cp $actualdata $expectdata
- echo " Expected data (*.exp) missing"
+ cp $actual $expect
+ echo " Expected result (*.ddl) missing"
nerrors="`expr $nerrors + 1`"
- elif $CMP $expectdata $actualdata; then
- echo " PASSED"
- else
+ elif $CMP $expect $actual; then
+ if [ ! -f $expectdata ]; then
+ # Create the expect data file if it doesn't yet exist.
+ echo " CREATED"
+ cp $actualdata $expectdata
+ echo " Expected data (*.exp) missing"
+ nerrors="`expr $nerrors + 1`"
+ elif $CMP $expectdata $actualdata; then
+ echo " PASSED"
+ else
+ echo "*FAILED*"
+ echo " Expected datafile (*.exp) differs from actual datafile (*.txt)"
+ nerrors="`expr $nerrors + 1`"
+ test yes = "$verbose" && $DIFF $expectdata $actualdata |sed 's/^/ /'
+ fi
+ else
echo "*FAILED*"
- echo " Expected datafile (*.exp) differs from actual datafile (*.txt)"
+ echo " Expected result (*.ddl) differs from actual result (*.out)"
nerrors="`expr $nerrors + 1`"
- test yes = "$verbose" && $DIFF $expectdata $actualdata |sed 's/^/ /'
- fi
- else
- echo "*FAILED*"
- echo " Expected result (*.ddl) differs from actual result (*.out)"
- nerrors="`expr $nerrors + 1`"
- test yes = "$verbose" && $DIFF $expect $actual |sed 's/^/ /'
+ test yes = "$verbose" && $DIFF $expect $actual |sed 's/^/ /'
fi
# Clean up output file
if test -z "$HDF5_NOCLEANUP"; then
- rm -f $actual $actualdata $actual_err
+ rm -f $actual $actualdata $actual_err
fi
}
@@ -592,56 +592,55 @@ TOOLTEST2A() {
# Run test.
TESTING $DUMPER $@
(
- cd $TESTDIR
- $RUNSERIAL $DUMPER_BIN "$@"
+ cd $TESTDIR
+ $RUNSERIAL $DUMPER_BIN "$@"
) >$actual 2>$actual_err
if [ ! -f $expect ]; then
- # Create the expect file if it doesn't yet exist.
- echo " CREATED"
- cp $actual $expect
- echo " Expected result (*.ddl) missing"
- nerrors="`expr $nerrors + 1`"
- elif $CMP $expect $actual; then
- if [ ! -f $expectdata ]; then
- # Create the expect data file if it doesn't yet exist.
+ # Create the expect file if it doesn't yet exist.
echo " CREATED"
- cp $actualdata $expectdata
- echo " Expected data (*.exp) missing"
+ cp $actual $expect
+ echo " Expected result (*.ddl) missing"
nerrors="`expr $nerrors + 1`"
- elif $DIFF $expectdata $actualdata; then
- if [ ! -f $expectmeta ]; then
- # Create the expect meta file if it doesn't yet exist.
- echo " CREATED"
- cp $actualmeta $expectmeta
- echo " Expected metafile (*.ddl) missing"
- nerrors="`expr $nerrors + 1`"
- elif $CMP $expectmeta $actualmeta; then
- echo " PASSED"
+ elif $CMP $expect $actual; then
+ if [ ! -f $expectdata ]; then
+ # Create the expect data file if it doesn't yet exist.
+ echo " CREATED"
+ cp $actualdata $expectdata
+ echo " Expected data (*.exp) missing"
+ nerrors="`expr $nerrors + 1`"
+ elif $DIFF $expectdata $actualdata; then
+ if [ ! -f $expectmeta ]; then
+ # Create the expect meta file if it doesn't yet exist.
+ echo " CREATED"
+ cp $actualmeta $expectmeta
+ echo " Expected metafile (*.ddl) missing"
+ nerrors="`expr $nerrors + 1`"
+ elif $CMP $expectmeta $actualmeta; then
+ echo " PASSED"
+ else
+ echo "*FAILED*"
+ echo " Expected metafile (*.ddl) differs from actual metafile (*.txt)"
+ nerrors="`expr $nerrors + 1`"
+ test yes = "$verbose" && $DIFF $expectmeta $actualmeta |sed 's/^/ /'
+ fi
else
- echo "*FAILED*"
- echo " Expected metafile (*.ddl) differs from actual metafile (*.txt)"
- nerrors="`expr $nerrors + 1`"
- test yes = "$verbose" && $DIFF $expectmeta $actualmeta |sed 's/^/ /'
+ echo "*FAILED*"
+ echo " Expected datafile (*.exp) differs from actual datafile (*.txt)"
+ nerrors="`expr $nerrors + 1`"
+ test yes = "$verbose" && $DIFF $expectdata $actualdata |sed 's/^/ /'
fi
- else
+ else
echo "*FAILED*"
- echo " Expected datafile (*.exp) differs from actual datafile (*.txt)"
+ echo " Expected result (*.ddl) differs from actual result (*.out)"
nerrors="`expr $nerrors + 1`"
- test yes = "$verbose" && $DIFF $expectdata $actualdata |sed 's/^/ /'
- fi
- else
- echo "*FAILED*"
- echo " Expected result (*.ddl) differs from actual result (*.out)"
- nerrors="`expr $nerrors + 1`"
- test yes = "$verbose" && $DIFF $expect $actual |sed 's/^/ /'
+ test yes = "$verbose" && $DIFF $expect $actual |sed 's/^/ /'
fi
# Clean up output file
if test -z "$HDF5_NOCLEANUP"; then
- rm -f $actual $actualdata $actual_err $actualmeta
+ rm -f $actual $actualdata $actual_err $actualmeta
fi
-
}
# same as TOOLTEST2 but only compares the generated data file to the expected data file
@@ -658,28 +657,28 @@ TOOLTEST2B() {
# Run test.
TESTING $DUMPER $@
(
- cd $TESTDIR
- $RUNSERIAL $DUMPER_BIN "$@"
+ cd $TESTDIR
+ $RUNSERIAL $DUMPER_BIN "$@"
) >$actual 2>$actual_err
if [ ! -f $expectdata ]; then
- # Create the expect data file if it doesn't yet exist.
- echo " CREATED"
- cp $actualdata $expectdata
- echo " Expected data (*.exp) missing"
- nerrors="`expr $nerrors + 1`"
+ # Create the expect data file if it doesn't yet exist.
+ echo " CREATED"
+ cp $actualdata $expectdata
+ echo " Expected data (*.exp) missing"
+ nerrors="`expr $nerrors + 1`"
elif $CMP $expectdata $actualdata; then
- echo " PASSED"
+ echo " PASSED"
else
- echo "*FAILED*"
- echo " Expected datafile (*.exp) differs from actual datafile (*.txt)"
- nerrors="`expr $nerrors + 1`"
- test yes = "$verbose" && $DIFF $expectdata $actualdata |sed 's/^/ /'
+ echo "*FAILED*"
+ echo " Expected datafile (*.exp) differs from actual datafile (*.txt)"
+ nerrors="`expr $nerrors + 1`"
+ test yes = "$verbose" && $DIFF $expectdata $actualdata |sed 's/^/ /'
fi
# Clean up output file
if test -z "$HDF5_NOCLEANUP"; then
- rm -f $actual $actualdata $actual_err
+ rm -f $actual $actualdata $actual_err
fi
}
@@ -699,8 +698,8 @@ TOOLTEST3() {
# Run test.
TESTING $DUMPER $@
(
- cd $TESTDIR
- $RUNSERIAL $DUMPER_BIN "$@"
+ cd $TESTDIR
+ $RUNSERIAL $DUMPER_BIN "$@"
) >$actual 2>$actual_err
# save actual and actual_err in case they are needed later.
@@ -719,23 +718,23 @@ TOOLTEST3() {
$actual_err > $actual_ext
if [ ! -f $expect ]; then
- # Create the expect file if it doesn't yet exist.
- echo " CREATED"
- cp $actual $expect
- echo " Expected result (*.ddl) missing"
- nerrors="`expr $nerrors + 1`"
+ # Create the expect file if it doesn't yet exist.
+ echo " CREATED"
+ cp $actual $expect
+ echo " Expected result (*.ddl) missing"
+ nerrors="`expr $nerrors + 1`"
elif $CMP $expect $actual; then
- echo " PASSED"
+ echo " PASSED"
else
- echo "*FAILED*"
- echo " Expected result (*.ddl) differs from actual result (*.out)"
- nerrors="`expr $nerrors + 1`"
- test yes = "$verbose" && $DIFF $expect $actual |sed 's/^/ /'
+ echo "*FAILED*"
+ echo " Expected result (*.ddl) differs from actual result (*.out)"
+ nerrors="`expr $nerrors + 1`"
+ test yes = "$verbose" && $DIFF $expect $actual |sed 's/^/ /'
fi
# Clean up output file
if test -z "$HDF5_NOCLEANUP"; then
- rm -f $actual $actual_err $actual_sav $actual_err_sav
+ rm -f $actual $actual_err $actual_sav $actual_err_sav
fi
}
@@ -757,8 +756,8 @@ TOOLTEST4() {
# Run test.
TESTING $DUMPER $@
(
- cd $TESTDIR
- $ENVCMD $RUNSERIAL $DUMPER_BIN "$@"
+ cd $TESTDIR
+ $ENVCMD $RUNSERIAL $DUMPER_BIN "$@"
) >$actual 2>$actual_err
# save actual and actual_err in case they are needed later.
@@ -777,30 +776,30 @@ TOOLTEST4() {
$actual_err > $actual_ext
if [ ! -f $expect ]; then
- # Create the expect file if it doesn't yet exist.
- echo " CREATED"
- cp $actual $expect
- echo " Expected result (*.ddl) missing"
- nerrors="`expr $nerrors + 1`"
+ # Create the expect file if it doesn't yet exist.
+ echo " CREATED"
+ cp $actual $expect
+ echo " Expected result (*.ddl) missing"
+ nerrors="`expr $nerrors + 1`"
elif $CMP $expect $actual; then
- if $CMP $expect_err $actual_ext; then
- echo " PASSED"
- else
- echo "*FAILED*"
- echo " Expected result (*.err) differs from actual result (*.oerr)"
- nerrors="`expr $nerrors + 1`"
- test yes = "$verbose" && $DIFF $expect_err $actual_ext |sed 's/^/ /'
- fi
+ if $CMP $expect_err $actual_ext; then
+ echo " PASSED"
+ else
+ echo "*FAILED*"
+ echo " Expected result (*.err) differs from actual result (*.oerr)"
+ nerrors="`expr $nerrors + 1`"
+ test yes = "$verbose" && $DIFF $expect_err $actual_ext |sed 's/^/ /'
+ fi
else
- echo "*FAILED*"
- echo " Expected result (*.ddl) differs from actual result (*.out)"
- nerrors="`expr $nerrors + 1`"
- test yes = "$verbose" && $DIFF $expect $actual |sed 's/^/ /'
+ echo "*FAILED*"
+ echo " Expected result (*.ddl) differs from actual result (*.out)"
+ nerrors="`expr $nerrors + 1`"
+ test yes = "$verbose" && $DIFF $expect $actual |sed 's/^/ /'
fi
# Clean up output file
if test -z "$HDF5_NOCLEANUP"; then
- rm -f $actual $actual_err $actual_sav $actual_err_sav
+ rm -f $actual $actual_err $actual_sav $actual_err_sav
fi
}
@@ -822,8 +821,8 @@ TOOLTEST5() {
# Run test.
TESTING $DUMPER $@
(
- cd $TESTDIR
- $ENVCMD $RUNSERIAL $DUMPER_BIN "$@"
+ cd $TESTDIR
+ $ENVCMD $RUNSERIAL $DUMPER_BIN "$@"
) >$actual 2>$actual_err
# save actual and actual_err in case they are needed later.
@@ -842,33 +841,33 @@ TOOLTEST5() {
$actual_err > $actual_ext
if [ ! -f $expect ]; then
- # Create the expect file if it doesn't yet exist.
- echo " CREATED"
- cp $actual $expect
- echo " Expected result (*.ddl) missing"
- nerrors="`expr $nerrors + 1`"
+ # Create the expect file if it doesn't yet exist.
+ echo " CREATED"
+ cp $actual $expect
+ echo " Expected result (*.ddl) missing"
+ nerrors="`expr $nerrors + 1`"
elif $CMP $expect $actual; then
- if $CMP $expect_err $actual_ext; then
- echo " PASSED"
- else
- echo "*FAILED*"
- echo " Expected result (*.err) differs from actual result (*.oerr)"
- nerrors="`expr $nerrors + 1`"
- test yes = "$verbose" && $DIFF $expect_err $actual_ext |sed 's/^/ /'
- fi
+ if $CMP $expect_err $actual_ext; then
+ echo " PASSED"
+ else
+ echo "*FAILED*"
+ echo " Expected result (*.err) differs from actual result (*.oerr)"
+ nerrors="`expr $nerrors + 1`"
+ test yes = "$verbose" && $DIFF $expect_err $actual_ext |sed 's/^/ /'
+ fi
else
- echo "*FAILED*"
- echo " Expected result (*.ddl) differs from actual result (*.out)"
- nerrors="`expr $nerrors + 1`"
- test yes = "$verbose" && $DIFF $expect $actual |sed 's/^/ /'
+ echo "*FAILED*"
+ echo " Expected result (*.ddl) differs from actual result (*.out)"
+ nerrors="`expr $nerrors + 1`"
+ test yes = "$verbose" && $DIFF $expect $actual |sed 's/^/ /'
fi
# Clean up output file
if test -z "$HDF5_NOCLEANUP"; then
- rm -f $actual $actual_err $actual_sav $actual_err_sav
+ rm -f $actual $actual_err $actual_sav $actual_err_sav
fi
-
}
+
# ADD_HELP_TEST
TOOLTEST_HELP() {
@@ -880,27 +879,27 @@ TOOLTEST_HELP() {
# Run test.
TESTING $DUMPER $@
(
- cd $TESTDIR
- $RUNSERIAL $DUMPER_BIN "$@"
+ cd $TESTDIR
+ $RUNSERIAL $DUMPER_BIN "$@"
) >$actual 2>$actual_err
if [ ! -f $expectdata ]; then
- # Create the expect data file if it doesn't yet exist.
- echo " CREATED"
- cp $actual $expect-CREATED
- echo " Expected output (*.txt) missing"
- nerrors="`expr $nerrors + 1`"
+ # Create the expect data file if it doesn't yet exist.
+ echo " CREATED"
+ cp $actual $expect-CREATED
+ echo " Expected output (*.txt) missing"
+ nerrors="`expr $nerrors + 1`"
elif $CMP $expect $actual; then
- echo " PASSED"
+ echo " PASSED"
else
- echo "*FAILED*"
- echo " Expected output (*.txt) differs from actual output (*.out)"
- nerrors="`expr $nerrors + 1`"
+ echo "*FAILED*"
+ echo " Expected output (*.txt) differs from actual output (*.out)"
+ nerrors="`expr $nerrors + 1`"
fi
# Clean up output file
if test -z "$HDF5_NOCLEANUP"; then
- rm -f $actual $actual_err
+ rm -f $actual $actual_err
fi
}
@@ -920,14 +919,16 @@ GREPTEST()
# Run test.
TESTING $DUMPER -p $@
(
- cd $TESTDIR
- $ENVCMD $RUNSERIAL $DUMPER_BIN -p "$@"
+ cd $TESTDIR
+ $ENVCMD $RUNSERIAL $DUMPER_BIN -p "$@"
) >$actual 2>$actual_err
+
if [ "$txttype" = "ERRTXT" ]; then
$GREP "$expectdata" $actual_err > /dev/null
else
$GREP "$expectdata" $actual > /dev/null
fi
+
if [ $? -eq 0 ]; then
echo " PASSED"
else
@@ -937,7 +938,7 @@ GREPTEST()
# Clean up output file
if test -z "$HDF5_NOCLEANUP"; then
- rm -f $actual $actual_err
+ rm -f $actual $actual_err
fi
}
@@ -956,14 +957,16 @@ GREPTEST2()
# Run test.
TESTING $DUMPER -p $@
(
- cd $TESTDIR
- $ENVCMD $RUNSERIAL $DUMPER_BIN -p "$@"
+ cd $TESTDIR
+ $ENVCMD $RUNSERIAL $DUMPER_BIN -p "$@"
) >$actual 2>$actual_err
+
if [ "$txttype" = "ERRTXT" ]; then
$GREP "$expectdata" $actual_err > /dev/null
else
$GREP "$expectdata" $actual > /dev/null
fi
+
if [ $? -eq 0 ]; then
echo " PASSED"
else
@@ -973,21 +976,21 @@ GREPTEST2()
# Clean up output file
if test -z "$HDF5_NOCLEANUP"; then
- rm -f $actual $actual_err
+ rm -f $actual $actual_err
fi
}
# Print a "SKIP" message
SKIP() {
- TESTING $DUMPER $@
+ TESTING $DUMPER $@
echo " -SKIP-"
}
# Print a line-line message left justified in a field of 70 characters
#
PRINT_H5DIFF() {
- SPACES=" "
- echo " Running h5diff $* $SPACES" | cut -c1-70 | tr -d '\012'
+ SPACES=" "
+ echo " Running h5diff $* $SPACES" | cut -c1-70 | tr -d '\012'
}
@@ -997,10 +1000,11 @@ DIFFTEST()
{
PRINT_H5DIFF $@
(
- cd $TESTDIR
- $RUNSERIAL $H5DIFF_BIN "$@" -q
+ cd $TESTDIR
+ $RUNSERIAL $H5DIFF_BIN "$@" -q
)
RET=$?
+
if [ $RET != 0 ] ; then
echo "*FAILED*"
nerrors="`expr $nerrors + 1`"
@@ -1014,8 +1018,8 @@ DIFFTEST()
# beginning with the word "Verifying".
#
PRINT_H5IMPORT() {
- SPACES=" "
- echo " Running h5import $* $SPACES" | cut -c1-70 | tr -d '\012'
+ SPACES=" "
+ echo " Running h5import $* $SPACES" | cut -c1-70 | tr -d '\012'
}
# Call the h5import tool
@@ -1025,15 +1029,16 @@ IMPORTTEST()
# remove the output hdf5 file if it exists
hdf5_file="$TESTDIR/$5"
if [ -f $hdf5_file ]; then
- rm -f $hdf5_file
+ rm -f $hdf5_file
fi
PRINT_H5IMPORT $@
(
- cd $TESTDIR
- $RUNSERIAL $H5IMPORT_BIN "$@"
+ cd $TESTDIR
+ $RUNSERIAL $H5IMPORT_BIN "$@"
)
RET=$?
+
if [ $RET != 0 ] ; then
echo "*FAILED*"
nerrors="`expr $nerrors + 1`"
@@ -1138,9 +1143,9 @@ TOOLTEST tcomp-4.ddl --enable-error-stack tcompound_complex.h5
TOOLTEST tcompound_complex2.ddl --enable-error-stack tcompound_complex2.h5
# tests for bitfields and opaque data types
if test $WORDS_BIGENDIAN != "yes"; then
-TOOLTEST tbitnopaque_le.ddl --enable-error-stack tbitnopaque.h5
+ TOOLTEST tbitnopaque_le.ddl --enable-error-stack tbitnopaque.h5
else
-TOOLTEST tbitnopaque_be.ddl --enable-error-stack tbitnopaque.h5
+ TOOLTEST tbitnopaque_be.ddl --enable-error-stack tbitnopaque.h5
fi
#test for the nested compound type
@@ -1318,12 +1323,12 @@ TOOLTEST tallfilters.ddl --enable-error-stack -H -p -d all tfilters.h5
TOOLTEST tuserfilter.ddl --enable-error-stack -H -p -d myfilter tfilters.h5
if test $USE_FILTER_DEFLATE = "yes" ; then
- # data read internal filters
- TOOLTEST treadintfilter.ddl --enable-error-stack -d deflate -d shuffle -d fletcher32 -d nbit -d scaleoffset tfilters.h5
- if test $USE_FILTER_SZIP = "yes"; then
- # data read
- TOOLTEST treadfilter.ddl --enable-error-stack -d all -d szip tfilters.h5
- fi
+ # data read internal filters
+ TOOLTEST treadintfilter.ddl --enable-error-stack -d deflate -d shuffle -d fletcher32 -d nbit -d scaleoffset tfilters.h5
+ if test $USE_FILTER_SZIP = "yes"; then
+ # data read
+ TOOLTEST treadfilter.ddl --enable-error-stack -d all -d szip tfilters.h5
+ fi
fi
# test for displaying objects with very long names
@@ -1380,9 +1385,9 @@ TOOLTEST tbin4.ddl --enable-error-stack -d double -b FILE -o out4.bin tbin
# Clean up binary output files
if test -z "$HDF5_NOCLEANUP"; then
- rm -f out[1-4].bin
- rm -f out1.h5
- rm -f out3.h5
+ rm -f out[1-4].bin
+ rm -f out1.h5
+ rm -f out3.h5
fi
# test for dataset region references
@@ -1394,7 +1399,7 @@ TOOLTEST2 tbinregR.exp --enable-error-stack -d /Dataset1 -s 0 -R -y -o tbinregR.
# Clean up text output files
if test -z "$HDF5_NOCLEANUP"; then
- rm -f tbinregR.txt
+ rm -f tbinregR.txt
fi
# tests for group creation order
diff --git a/tools/test/h5dump/testh5dumppbits.sh.in b/tools/test/h5dump/testh5dumppbits.sh.in
index febce2c..ff0659a 100644
--- a/tools/test/h5dump/testh5dumppbits.sh.in
+++ b/tools/test/h5dump/testh5dumppbits.sh.in
@@ -236,26 +236,25 @@ TOOLTEST() {
cp $actual_err $actual_err_sav
STDERR_FILTER $actual_err
- if [ ! -f $expect ]; then
- # Create the expect file if it doesn't yet exist.
- echo " CREATED"
- cp $actual $expect
- echo " Expected result (*.ddl) missing"
- nerrors="`expr $nerrors + 1`"
+ if [ ! -f $expect ]; then
+ # Create the expect file if it doesn't yet exist.
+ echo " CREATED"
+ cp $actual $expect
+ echo " Expected result (*.ddl) missing"
+ nerrors="`expr $nerrors + 1`"
elif $CMP $expect $actual; then
- echo " PASSED"
+ echo " PASSED"
else
- echo "*FAILED*"
- echo " Expected result (*.ddl) differs from actual result (*.out)"
- nerrors="`expr $nerrors + 1`"
- test yes = "$verbose" && $DIFF $expect $actual |sed 's/^/ /'
+ echo "*FAILED*"
+ echo " Expected result (*.ddl) differs from actual result (*.out)"
+ nerrors="`expr $nerrors + 1`"
+ test yes = "$verbose" && $DIFF $expect $actual |sed 's/^/ /'
fi
# Clean up output file
if test -z "$HDF5_NOCLEANUP"; then
- rm -f $actual $actual_err $actual_sav $actual_err_sav $actual_ext
+ rm -f $actual $actual_err $actual_sav $actual_err_sav $actual_ext
fi
-
}
@@ -274,36 +273,36 @@ TOOLTEST2() {
# Run test.
TESTING $DUMPER $@
(
- cd $TESTDIR
- $RUNSERIAL $DUMPER_BIN "$@"
+ cd $TESTDIR
+ $RUNSERIAL $DUMPER_BIN "$@"
) >$actual 2>$actual_err
if [ ! -f $expect ]; then
- # Create the expect file if it doesn't yet exist.
- echo " CREATED"
- cp $actual $expect
- echo " Expected result (*.ddl) missing"
- nerrors="`expr $nerrors + 1`"
- elif $CMP $expect $actual; then
- if [ ! -f $expectdata ]; then
- # Create the expect data file if it doesn't yet exist.
+ # Create the expect file if it doesn't yet exist.
echo " CREATED"
- cp $actualdata $expectdata
- echo " Expected data (*.exp) missing"
+ cp $actual $expect
+ echo " Expected result (*.ddl) missing"
nerrors="`expr $nerrors + 1`"
- elif $CMP $expectdata $actualdata; then
- echo " PASSED"
- else
+ elif $CMP $expect $actual; then
+ if [ ! -f $expectdata ]; then
+ # Create the expect data file if it doesn't yet exist.
+ echo " CREATED"
+ cp $actualdata $expectdata
+ echo " Expected data (*.exp) missing"
+ nerrors="`expr $nerrors + 1`"
+ elif $CMP $expectdata $actualdata; then
+ echo " PASSED"
+ else
+ echo "*FAILED*"
+ echo " Expected datafile (*.exp) differs from actual datafile (*.txt)"
+ nerrors="`expr $nerrors + 1`"
+ test yes = "$verbose" && $DIFF $expectdata $actualdata |sed 's/^/ /'
+ fi
+ else
echo "*FAILED*"
- echo " Expected datafile (*.exp) differs from actual datafile (*.txt)"
+ echo " Expected result (*.ddl) differs from actual result (*.out)"
nerrors="`expr $nerrors + 1`"
- test yes = "$verbose" && $DIFF $expectdata $actualdata |sed 's/^/ /'
- fi
- else
- echo "*FAILED*"
- echo " Expected result (*.ddl) differs from actual result (*.out)"
- nerrors="`expr $nerrors + 1`"
- test yes = "$verbose" && $DIFF $expect $actual |sed 's/^/ /'
+ test yes = "$verbose" && $DIFF $expect $actual |sed 's/^/ /'
fi
# Clean up output file
@@ -328,8 +327,8 @@ TOOLTEST3() {
# Run test.
TESTING $DUMPER $@
(
- cd $TESTDIR
- $RUNSERIAL $DUMPER_BIN "$@"
+ cd $TESTDIR
+ $RUNSERIAL $DUMPER_BIN "$@"
) >$actual 2>$actual_err
# save actual and actual_err in case they are needed later.
@@ -348,23 +347,23 @@ TOOLTEST3() {
$actual_err > $actual_ext
if [ ! -f $expect ]; then
- # Create the expect file if it doesn't yet exist.
- echo " CREATED"
- cp $actual $expect
- echo " Expected result (*.ddl) missing"
- nerrors="`expr $nerrors + 1`"
+ # Create the expect file if it doesn't yet exist.
+ echo " CREATED"
+ cp $actual $expect
+ echo " Expected result (*.ddl) missing"
+ nerrors="`expr $nerrors + 1`"
elif $CMP $expect $actual; then
- echo " PASSED"
+ echo " PASSED"
else
- echo "*FAILED*"
- echo " Expected result (*.ddl) differs from actual result (*.out)"
- nerrors="`expr $nerrors + 1`"
- test yes = "$verbose" && $DIFF $expect $actual |sed 's/^/ /'
+ echo "*FAILED*"
+ echo " Expected result (*.ddl) differs from actual result (*.out)"
+ nerrors="`expr $nerrors + 1`"
+ test yes = "$verbose" && $DIFF $expect $actual |sed 's/^/ /'
fi
# Clean up output file
if test -z "$HDF5_NOCLEANUP"; then
- rm -f $actual $actual_err $actual_sav $actual_err_sav
+ rm -f $actual $actual_err $actual_sav $actual_err_sav
fi
}
@@ -385,8 +384,8 @@ TOOLTEST4() {
# Run test.
TESTING $DUMPER $@
(
- cd $TESTDIR
- $RUNSERIAL $DUMPER_BIN "$@"
+ cd $TESTDIR
+ $RUNSERIAL $DUMPER_BIN "$@"
) >$actual 2>$actual_err
# save actual and actual_err in case they are needed later.
@@ -405,30 +404,30 @@ TOOLTEST4() {
$actual_err > $actual_ext
if [ ! -f $expect ]; then
- # Create the expect file if it doesn't yet exist.
- echo " CREATED"
- cp $actual $expect
- echo " Expected result (*.ddl) missing"
- nerrors="`expr $nerrors + 1`"
+ # Create the expect file if it doesn't yet exist.
+ echo " CREATED"
+ cp $actual $expect
+ echo " Expected result (*.ddl) missing"
+ nerrors="`expr $nerrors + 1`"
elif $CMP $expect $actual; then
- if $CMP $expect_err $actual_ext; then
- echo " PASSED"
- else
- echo "*FAILED*"
- echo " Expected result (*.err) differs from actual result (*.oerr)"
- nerrors="`expr $nerrors + 1`"
- test yes = "$verbose" && $DIFF $expect_err $actual_ext |sed 's/^/ /'
- fi
+ if $CMP $expect_err $actual_ext; then
+ echo " PASSED"
+ else
+ echo "*FAILED*"
+ echo " Expected result (*.err) differs from actual result (*.oerr)"
+ nerrors="`expr $nerrors + 1`"
+ test yes = "$verbose" && $DIFF $expect_err $actual_ext |sed 's/^/ /'
+ fi
else
- echo "*FAILED*"
- echo " Expected result (*.ddl) differs from actual result (*.out)"
- nerrors="`expr $nerrors + 1`"
- test yes = "$verbose" && $DIFF $expect $actual |sed 's/^/ /'
+ echo "*FAILED*"
+ echo " Expected result (*.ddl) differs from actual result (*.out)"
+ nerrors="`expr $nerrors + 1`"
+ test yes = "$verbose" && $DIFF $expect $actual |sed 's/^/ /'
fi
# Clean up output file
if test -z "$HDF5_NOCLEANUP"; then
- rm -f $actual $actual_err $actual_sav $actual_err_sav
+ rm -f $actual $actual_err $actual_sav $actual_err_sav
fi
}
@@ -442,8 +441,8 @@ SKIP() {
# Print a line-line message left justified in a field of 70 characters
#
PRINT_H5DIFF() {
- SPACES=" "
- echo " Running h5diff $* $SPACES" | cut -c1-70 | tr -d '\012'
+ SPACES=" "
+ echo " Running h5diff $* $SPACES" | cut -c1-70 | tr -d '\012'
}
@@ -453,10 +452,11 @@ DIFFTEST()
{
PRINT_H5DIFF $@
(
- cd $TESTDIR
- $RUNSERIAL $H5DIFF_BIN "$@" -q
+ cd $TESTDIR
+ $RUNSERIAL $H5DIFF_BIN "$@" -q
)
RET=$?
+
if [ $RET != 0 ] ; then
echo "*FAILED*"
nerrors="`expr $nerrors + 1`"
@@ -470,8 +470,8 @@ DIFFTEST()
# beginning with the word "Verifying".
#
PRINT_H5IMPORT() {
- SPACES=" "
- echo " Running h5import $* $SPACES" | cut -c1-70 | tr -d '\012'
+ SPACES=" "
+ echo " Running h5import $* $SPACES" | cut -c1-70 | tr -d '\012'
}
# Call the h5import tool
@@ -481,22 +481,22 @@ IMPORTTEST()
# remove the output hdf5 file if it exists
hdf5_file="$TESTDIR/$5"
if [ -f $hdf5_file ]; then
- rm -f $hdf5_file
+ rm -f $hdf5_file
fi
PRINT_H5IMPORT $@
(
- cd $TESTDIR
- $RUNSERIAL $H5IMPORT_BIN "$@"
+ cd $TESTDIR
+ $RUNSERIAL $H5IMPORT_BIN "$@"
)
RET=$?
+
if [ $RET != 0 ] ; then
echo "*FAILED*"
nerrors="`expr $nerrors + 1`"
else
echo " PASSED"
fi
-
}
diff --git a/tools/test/h5dump/testh5dumpvds.sh.in b/tools/test/h5dump/testh5dumpvds.sh.in
index f89234e..29ff238 100644
--- a/tools/test/h5dump/testh5dumpvds.sh.in
+++ b/tools/test/h5dump/testh5dumpvds.sh.in
@@ -205,8 +205,8 @@ TOOLTEST() {
# Run test.
TESTING $DUMPER $@
(
- cd $TESTDIR
- $RUNSERIAL $DUMPER_BIN "$@"
+ cd $TESTDIR
+ $RUNSERIAL $DUMPER_BIN "$@"
) >$actual 2>$actual_err
# save actual and actual_err in case they are needed later.
@@ -216,26 +216,25 @@ TOOLTEST() {
STDERR_FILTER $actual_err
cat $actual_err >> $actual
- if [ ! -f $expect ]; then
- # Create the expect file if it doesn't yet exist.
- echo " CREATED"
- cp $actual $expect
- echo " Expected result (*.ddl) missing"
- nerrors="`expr $nerrors + 1`"
+ if [ ! -f $expect ]; then
+ # Create the expect file if it doesn't yet exist.
+ echo " CREATED"
+ cp $actual $expect
+ echo " Expected result (*.ddl) missing"
+ nerrors="`expr $nerrors + 1`"
elif $CMP $expect $actual; then
- echo " PASSED"
+ echo " PASSED"
else
- echo "*FAILED*"
- echo " Expected result (*.ddl) differs from actual result (*.out)"
- nerrors="`expr $nerrors + 1`"
- test yes = "$verbose" && $DIFF $expect $actual |sed 's/^/ /'
+ echo "*FAILED*"
+ echo " Expected result (*.ddl) differs from actual result (*.out)"
+ nerrors="`expr $nerrors + 1`"
+ test yes = "$verbose" && $DIFF $expect $actual |sed 's/^/ /'
fi
# Clean up output file
if test -z "$HDF5_NOCLEANUP"; then
- rm -f $actual $actual_err $actual_sav $actual_err_sav $actual_ext
+ rm -f $actual $actual_err $actual_sav $actual_err_sav $actual_ext
fi
-
}
@@ -254,42 +253,42 @@ TOOLTEST2() {
# Run test.
TESTING $DUMPER $@
(
- cd $TESTDIR
- $RUNSERIAL $DUMPER_BIN "$@"
+ cd $TESTDIR
+ $RUNSERIAL $DUMPER_BIN "$@"
) >$actual 2>$actual_err
cat $actual_err >> $actual
if [ ! -f $expect ]; then
- # Create the expect file if it doesn't yet exist.
- echo " CREATED"
- cp $actual $expect
- echo " Expected result (*.ddl) missing"
- nerrors="`expr $nerrors + 1`"
- elif $CMP $expect $actual; then
- if [ ! -f $expectdata ]; then
- # Create the expect data file if it doesn't yet exist.
+ # Create the expect file if it doesn't yet exist.
echo " CREATED"
- cp $actualdata $expectdata
- echo " Expected data (*.exp) missing"
+ cp $actual $expect
+ echo " Expected result (*.ddl) missing"
nerrors="`expr $nerrors + 1`"
- elif $CMP $expectdata $actualdata; then
- echo " PASSED"
- else
+ elif $CMP $expect $actual; then
+ if [ ! -f $expectdata ]; then
+ # Create the expect data file if it doesn't yet exist.
+ echo " CREATED"
+ cp $actualdata $expectdata
+ echo " Expected data (*.exp) missing"
+ nerrors="`expr $nerrors + 1`"
+ elif $CMP $expectdata $actualdata; then
+ echo " PASSED"
+ else
+ echo "*FAILED*"
+ echo " Expected datafile (*.exp) differs from actual datafile (*.txt)"
+ nerrors="`expr $nerrors + 1`"
+ test yes = "$verbose" && $DIFF $expectdata $actualdata |sed 's/^/ /'
+ fi
+ else
echo "*FAILED*"
- echo " Expected datafile (*.exp) differs from actual datafile (*.txt)"
+ echo " Expected result (*.ddl) differs from actual result (*.out)"
nerrors="`expr $nerrors + 1`"
- test yes = "$verbose" && $DIFF $expectdata $actualdata |sed 's/^/ /'
- fi
- else
- echo "*FAILED*"
- echo " Expected result (*.ddl) differs from actual result (*.out)"
- nerrors="`expr $nerrors + 1`"
- test yes = "$verbose" && $DIFF $expect $actual |sed 's/^/ /'
+ test yes = "$verbose" && $DIFF $expect $actual |sed 's/^/ /'
fi
# Clean up output file
if test -z "$HDF5_NOCLEANUP"; then
- rm -f $actual $actualdata $actual_err
+ rm -f $actual $actualdata $actual_err
fi
}
@@ -309,8 +308,8 @@ TOOLTEST3() {
# Run test.
TESTING $DUMPER $@
(
- cd $TESTDIR
- $RUNSERIAL $DUMPER_BIN "$@"
+ cd $TESTDIR
+ $RUNSERIAL $DUMPER_BIN "$@"
) >$actual 2>$actual_err
# save actual and actual_err in case they are needed later.
@@ -326,27 +325,27 @@ TOOLTEST3() {
-e 's/[1-9]*\.[0-9]*\.[0-9]*[^)]*/version (number)/' \
-e 's/H5Eget_auto[1-2]*/H5Eget_auto(1 or 2)/' \
-e 's/H5Eset_auto[1-2]*/H5Eset_auto(1 or 2)/' \
- $actual_err > $actual_ext
+ $actual_err > $actual_ext
cat $actual_ext >> $actual
if [ ! -f $expect ]; then
- # Create the expect file if it doesn't yet exist.
- echo " CREATED"
- cp $actual $expect
- echo " Expected result (*.ddl) missing"
- nerrors="`expr $nerrors + 1`"
+ # Create the expect file if it doesn't yet exist.
+ echo " CREATED"
+ cp $actual $expect
+ echo " Expected result (*.ddl) missing"
+ nerrors="`expr $nerrors + 1`"
elif $CMP $expect $actual; then
- echo " PASSED"
+ echo " PASSED"
else
- echo "*FAILED*"
- echo " Expected result (*.ddl) differs from actual result (*.out)"
- nerrors="`expr $nerrors + 1`"
- test yes = "$verbose" && $DIFF $expect $actual |sed 's/^/ /'
+ echo "*FAILED*"
+ echo " Expected result (*.ddl) differs from actual result (*.out)"
+ nerrors="`expr $nerrors + 1`"
+ test yes = "$verbose" && $DIFF $expect $actual |sed 's/^/ /'
fi
# Clean up output file
if test -z "$HDF5_NOCLEANUP"; then
- rm -f $actual $actual_err $actual_sav $actual_err_sav
+ rm -f $actual $actual_err $actual_sav $actual_err_sav
fi
}
@@ -367,8 +366,8 @@ TOOLTEST4() {
# Run test.
TESTING $DUMPER $@
(
- cd $TESTDIR
- $RUNSERIAL $DUMPER_BIN "$@"
+ cd $TESTDIR
+ $RUNSERIAL $DUMPER_BIN "$@"
) >$actual 2>$actual_err
# save actual and actual_err in case they are needed later.
@@ -384,47 +383,46 @@ TOOLTEST4() {
-e 's/[1-9]*\.[0-9]*\.[0-9]*[^)]*/version (number)/' \
-e 's/H5Eget_auto[1-2]*/H5Eget_auto(1 or 2)/' \
-e 's/H5Eset_auto[1-2]*/H5Eset_auto(1 or 2)/' \
- $actual_err > $actual_ext
+ $actual_err > $actual_ext
#cat $actual_ext >> $actual
if [ ! -f $expect ]; then
- # Create the expect file if it doesn't yet exist.
- echo " CREATED"
- cp $actual $expect
+ # Create the expect file if it doesn't yet exist.
+ echo " CREATED"
+ cp $actual $expect
elif $CMP $expect $actual; then
- if $CMP $expect_err $actual_ext; then
- echo " PASSED"
- else
- echo "*FAILED*"
- echo " Expected result (*.err) differs from actual result (*.oerr)"
- nerrors="`expr $nerrors + 1`"
- test yes = "$verbose" && $DIFF $expect_err $actual_ext |sed 's/^/ /'
- fi
+ if $CMP $expect_err $actual_ext; then
+ echo " PASSED"
+ else
+ echo "*FAILED*"
+ echo " Expected result (*.err) differs from actual result (*.oerr)"
+ nerrors="`expr $nerrors + 1`"
+ test yes = "$verbose" && $DIFF $expect_err $actual_ext |sed 's/^/ /'
+ fi
else
- echo "*FAILED*"
- echo " Expected result (*.ddl) differs from actual result (*.out)"
- nerrors="`expr $nerrors + 1`"
- test yes = "$verbose" && $DIFF $expect $actual |sed 's/^/ /'
+ echo "*FAILED*"
+ echo " Expected result (*.ddl) differs from actual result (*.out)"
+ nerrors="`expr $nerrors + 1`"
+ test yes = "$verbose" && $DIFF $expect $actual |sed 's/^/ /'
fi
# Clean up output file
if test -z "$HDF5_NOCLEANUP"; then
- rm -f $actual $actual_err $actual_sav $actual_err_sav
+ rm -f $actual $actual_err $actual_sav $actual_err_sav
fi
-
}
# Print a "SKIP" message
SKIP() {
- TESTING $DUMPER $@
+ TESTING $DUMPER $@
echo " -SKIP-"
}
# Print a line-line message left justified in a field of 70 characters
#
PRINT_H5DIFF() {
- SPACES=" "
- echo " Running h5diff $* $SPACES" | cut -c1-70 | tr -d '\012'
+ SPACES=" "
+ echo " Running h5diff $* $SPACES" | cut -c1-70 | tr -d '\012'
}
@@ -434,25 +432,25 @@ DIFFTEST()
{
PRINT_H5DIFF $@
(
- cd $TESTDIR
- $RUNSERIAL $H5DIFF_BIN "$@" -q
+ cd $TESTDIR
+ $RUNSERIAL $H5DIFF_BIN "$@" -q
)
RET=$?
+
if [ $RET != 0 ] ; then
echo "*FAILED*"
nerrors="`expr $nerrors + 1`"
else
echo " PASSED"
fi
-
}
# Print a line-line message left justified in a field of 70 characters
# beginning with the word "Verifying".
#
PRINT_H5IMPORT() {
- SPACES=" "
- echo " Running h5import $* $SPACES" | cut -c1-70 | tr -d '\012'
+ SPACES=" "
+ echo " Running h5import $* $SPACES" | cut -c1-70 | tr -d '\012'
}
# Call the h5import tool
@@ -462,22 +460,22 @@ IMPORTTEST()
# remove the output hdf5 file if it exists
hdf5_file="$TESTDIR/$5"
if [ -f $hdf5_file ]; then
- rm -f $hdf5_file
+ rm -f $hdf5_file
fi
PRINT_H5IMPORT $@
(
- cd $TESTDIR
- $RUNSERIAL $H5IMPORT_BIN "$@"
+ cd $TESTDIR
+ $RUNSERIAL $H5IMPORT_BIN "$@"
)
RET=$?
+
if [ $RET != 0 ] ; then
echo "*FAILED*"
nerrors="`expr $nerrors + 1`"
else
echo " PASSED"
fi
-
}
@@ -491,7 +489,7 @@ COPY_TESTFILES_TO_TESTDIR
####### test for dataset vds ######
- # Data read
+# Data read
if test $USE_FILTER_DEFLATE = "yes" ; then
TOOLTEST tvds-1.ddl --enable-error-stack 1_vds.h5
TOOLTEST tvds-2.ddl --enable-error-stack 2_vds.h5
@@ -504,7 +502,7 @@ if test $USE_FILTER_DEFLATE = "yes" ; then
TOOLTEST vds-gap2.ddl --vds-gap-size=2 --enable-error-stack vds-eiger.h5
fi
- # Layout read
+# Layout read
if test $USE_FILTER_DEFLATE = "yes" ; then
TOOLTEST tvds_layout-1.ddl -p --enable-error-stack 1_vds.h5
TOOLTEST tvds_layout-2.ddl -p --enable-error-stack 2_vds.h5
diff --git a/tools/test/h5dump/testh5dumpxml.sh.in b/tools/test/h5dump/testh5dumpxml.sh.in
index f7af300..52a13c2 100644
--- a/tools/test/h5dump/testh5dumpxml.sh.in
+++ b/tools/test/h5dump/testh5dumpxml.sh.in
@@ -262,36 +262,35 @@ TOOLTEST() {
# Run test.
TESTING $DUMPER $@
(
- cd $TESTDIR
- $RUNSERIAL $DUMPER_BIN "$@"
+ cd $TESTDIR
+ $RUNSERIAL $DUMPER_BIN "$@"
) >$actual 2>$actual_err
-
if [ ! -f $expect ]; then
- # Create the expect file if it doesn't yet exist.
- echo " CREATED"
- cp $actual $expect
- echo " Expected result (*.xml) missing"
- nerrors="`expr $nerrors + 1`"
+ # Create the expect file if it doesn't yet exist.
+ echo " CREATED"
+ cp $actual $expect
+ echo " Expected result (*.xml) missing"
+ nerrors="`expr $nerrors + 1`"
elif $CMP $expect $actual; then
- echo " PASSED"
+ echo " PASSED"
else
- echo "*FAILED*"
- echo " Expected result (*.xml) differs from actual result (*.out)"
- nerrors="`expr $nerrors + 1`"
- test yes = "$verbose" && $DIFF $expect $actual |sed 's/^/ /'
+ echo "*FAILED*"
+ echo " Expected result (*.xml) differs from actual result (*.out)"
+ nerrors="`expr $nerrors + 1`"
+ test yes = "$verbose" && $DIFF $expect $actual |sed 's/^/ /'
fi
# Clean up output file
if test -z "$HDF5_NOCLEANUP"; then
- rm -f $actual $actual_err
+ rm -f $actual $actual_err
fi
}
# Print a "SKIP" message
SKIP() {
- TESTING $DUMPER $@
- echo " -SKIP-"
+ TESTING $DUMPER $@
+ echo " -SKIP-"
}
diff --git a/tools/test/h5format_convert/testfiles/h5fc_v_err.ddl.err b/tools/test/h5format_convert/testfiles/h5fc_v_err.ddl.err
index d85a999..e72892d 100644
--- a/tools/test/h5format_convert/testfiles/h5fc_v_err.ddl.err
+++ b/tools/test/h5format_convert/testfiles/h5fc_v_err.ddl.err
@@ -1,8 +1 @@
h5format_convert error: unable to downgrade dataset "/DSET_ERR"
-H5tools-DIAG: Error detected in HDF5:tools (version (number)) thread (IDs):
- #000: (file name) line (number) in h5trav_visit(): traverse failed
- major: Failure in tools library
- minor: error in function
- #001: (file name) line (number) in traverse(): H5Lvisit_by_name failed
- major: Failure in tools library
- minor: error in function
diff --git a/tools/test/h5format_convert/testh5fc.sh.in b/tools/test/h5format_convert/testh5fc.sh.in
index d780a3d..2cdd445 100644
--- a/tools/test/h5format_convert/testh5fc.sh.in
+++ b/tools/test/h5format_convert/testh5fc.sh.in
@@ -483,7 +483,7 @@ TOOLTEST_OUT h5fc_v_n_all.ddl h5fc_non_v3.h5 -v -n
#
#
# h5format_convert -v h5fc_err_level.h5 (error encountered in converting the dataset)
-TOOLTEST_MASK_OUT h5fc_v_err.ddl h5fc_err_level.h5 -v --enable-error-stack
+TOOLTEST_MASK_OUT h5fc_v_err.ddl h5fc_err_level.h5 -v
#
#
#
diff --git a/tools/test/h5jam/tellub.c b/tools/test/h5jam/tellub.c
index 559c677..453444d 100644
--- a/tools/test/h5jam/tellub.c
+++ b/tools/test/h5jam/tellub.c
@@ -70,11 +70,12 @@ parse_command_line (int argc, const char *argv[])
switch ((char) opt) {
case 'h':
usage (h5tools_getprogname());
- HDexit(EXIT_SUCCESS);
+ h5tools_setstatus(EXIT_SUCCESS);
+ break;
case '?':
default:
usage (h5tools_getprogname());
- HDexit(EXIT_FAILURE);
+ h5tools_setstatus(EXIT_FAILURE);
}
}
@@ -82,10 +83,17 @@ parse_command_line (int argc, const char *argv[])
if (argc <= opt_ind) {
error_msg("missing file name\n");
usage (h5tools_getprogname());
- HDexit(EXIT_FAILURE);
+ h5tools_setstatus(EXIT_FAILURE);
}
} /* end parse_command_line() */
+static void
+leave(int ret)
+{
+ h5tools_close();
+ HDexit(ret);
+}
+
/*-------------------------------------------------------------------------
* Function: main
*
@@ -98,9 +106,7 @@ int
main (int argc, const char *argv[])
{
char *ifname;
- void *edata;
- H5E_auto2_t func;
- hid_t ifile;
+ hid_t ifile = H5I_INVALID_HID;
hsize_t usize;
htri_t testval;
herr_t status;
@@ -112,16 +118,16 @@ main (int argc, const char *argv[])
/* Initialize h5tools lib */
h5tools_init();
- /* Disable error reporting */
- H5Eget_auto2(H5E_DEFAULT, &func, &edata);
- H5Eset_auto2(H5E_DEFAULT, NULL, NULL);
-
parse_command_line(argc, argv);
+ /* enable error reporting if command line option */
+ h5tools_error_report();
+
if(argc <= (opt_ind)) {
error_msg("missing file name\n");
usage (h5tools_getprogname());
- return EXIT_FAILURE;
+ h5tools_setstatus(EXIT_FAILURE);
+ goto done;
}
ifname = HDstrdup(argv[opt_ind]);
@@ -130,33 +136,39 @@ main (int argc, const char *argv[])
if(testval <= 0) {
error_msg("Input HDF5 file is not HDF \"%s\"\n", ifname);
- return EXIT_FAILURE;
+ h5tools_setstatus(EXIT_FAILURE);
+ goto done;
}
ifile = H5Fopen(ifname, H5F_ACC_RDONLY, H5P_DEFAULT);
if(ifile < 0) {
error_msg("Can't open input HDF5 file \"%s\"\n", ifname);
- return EXIT_FAILURE;
+ h5tools_setstatus(EXIT_FAILURE);
+ goto done;
}
plist = H5Fget_create_plist(ifile);
if(plist < 0) {
error_msg("Can't get file creation plist for file \"%s\"\n", ifname);
- return EXIT_FAILURE;
+ h5tools_setstatus(EXIT_FAILURE);
+ goto done;
}
status = H5Pget_userblock(plist, &usize);
if(status < 0) {
error_msg("Can't get user block for file \"%s\"\n", ifname);
- return EXIT_FAILURE;
+ h5tools_setstatus(EXIT_FAILURE);
+ goto done;
}
HDprintf("%ld\n", (long) usize);
+done:
H5Pclose (plist);
- H5Fclose (ifile);
+ if(ifile >= 0)
+ H5Fclose (ifile);
- return EXIT_SUCCESS;
+ leave(h5tools_getstatus());
} /* end main() */
diff --git a/tools/test/h5ls/h5ls_plugin.sh.in b/tools/test/h5ls/h5ls_plugin.sh.in
index c89269d..28370e6 100644
--- a/tools/test/h5ls/h5ls_plugin.sh.in
+++ b/tools/test/h5ls/h5ls_plugin.sh.in
@@ -139,8 +139,8 @@ CLEAN_TESTFILES_AND_TESTDIR()
# Print a $* message left justified in a field of 70 characters
#
MESSAGE() {
- SPACES=" "
- echo "$* $SPACES" | cut -c1-70 | tr -d '\012'
+ SPACES=" "
+ echo "$* $SPACES" | cut -c1-70 | tr -d '\012'
}
# Print a line-line message left justified in a field of 70 characters
@@ -206,7 +206,7 @@ TOOLTEST() {
echo ""
fi
elif [ ! -f $expect ]; then
- # Create the expect file if it doesn't yet exist.
+ # Create the expect file if it doesn't yet exist.
echo " CREATED"
cp $actual $expect
echo " Expected result (*.ls) missing"
diff --git a/tools/test/h5repack/CMakeTests.cmake b/tools/test/h5repack/CMakeTests.cmake
index 4823d07..af73b75 100644
--- a/tools/test/h5repack/CMakeTests.cmake
+++ b/tools/test/h5repack/CMakeTests.cmake
@@ -72,6 +72,14 @@
${HDF5_TOOLS_TEST_H5REPACK_SOURCE_DIR}/testfiles/h5repack_paged_persist.h5
# h5diff/testfile
${HDF5_TOOLS_TEST_H5DIFF_SOURCE_DIR}/testfiles/h5diff_attr1.h5
+ # tools/testfiles for external links
+ ${HDF5_TOOLS_DIR}/testfiles/tsoftlinks.h5
+ ${HDF5_TOOLS_DIR}/testfiles/textlinkfar.h5
+ ${HDF5_TOOLS_DIR}/testfiles/textlinksrc.h5
+ ${HDF5_TOOLS_DIR}/testfiles/textlinktar.h5
+ ${HDF5_TOOLS_DIR}/testfiles/textlink.h5
+ ${HDF5_TOOLS_TEST_H5REPACK_SOURCE_DIR}/testfiles/h5copy_extlinks_src.h5
+ ${HDF5_TOOLS_TEST_H5REPACK_SOURCE_DIR}/testfiles/h5copy_extlinks_trg.h5
# tools/testfiles
${HDF5_TOOLS_DIR}/testfiles/tfamily00000.h5
${HDF5_TOOLS_DIR}/testfiles/tfamily00001.h5
@@ -128,6 +136,13 @@
${HDF5_TOOLS_TEST_H5REPACK_SOURCE_DIR}/testfiles/plugin_version_test.h5repack_layout.h5
${HDF5_TOOLS_TEST_H5REPACK_SOURCE_DIR}/testfiles/plugin_zero.h5repack_layout.h5
${HDF5_TOOLS_TEST_H5REPACK_SOURCE_DIR}/testfiles/plugin_none.h5repack_layout.UD.h5
+ # tools/testfiles for external links
+ ${HDF5_TOOLS_TEST_H5REPACK_SOURCE_DIR}/testfiles/tsoftlinks-merge.tsoftlinks.h5
+ ${HDF5_TOOLS_TEST_H5REPACK_SOURCE_DIR}/testfiles/textlinkfar-merge.textlinkfar.h5
+ ${HDF5_TOOLS_TEST_H5REPACK_SOURCE_DIR}/testfiles/textlinksrc-merge.textlinksrc.h5
+ ${HDF5_TOOLS_TEST_H5REPACK_SOURCE_DIR}/testfiles/textlinktar-merge.textlinktar.h5
+ ${HDF5_TOOLS_TEST_H5REPACK_SOURCE_DIR}/testfiles/textlink-merge.textlink.h5
+ ${HDF5_TOOLS_TEST_H5REPACK_SOURCE_DIR}/testfiles/h5copy_extlinks_src-merge.h5copy_extlinks_src.h5
)
set (LIST_DDL_TEST_FILES
@@ -154,6 +169,25 @@
# refs
${HDF5_TOOLS_TEST_H5REPACK_SOURCE_DIR}/testfiles/attrregion.tattrreg.h5
${HDF5_TOOLS_TEST_H5REPACK_SOURCE_DIR}/testfiles/dataregion.tdatareg.h5
+ # tools/testfiles for external links
+ ${HDF5_TOOLS_TEST_H5REPACK_SOURCE_DIR}/testfiles/textlinkfar-base.textlinkfar.h5
+ ${HDF5_TOOLS_TEST_H5REPACK_SOURCE_DIR}/testfiles/textlinksrc-base.textlinksrc.h5
+ ${HDF5_TOOLS_TEST_H5REPACK_SOURCE_DIR}/testfiles/textlinktar-base.textlinktar.h5
+ ${HDF5_TOOLS_TEST_H5REPACK_SOURCE_DIR}/testfiles/textlink-base.textlink.h5
+ ${HDF5_TOOLS_TEST_H5REPACK_SOURCE_DIR}/testfiles/tsoftlinks-base.tsoftlinks.h5
+ ${HDF5_TOOLS_TEST_H5REPACK_SOURCE_DIR}/testfiles/h5copy_extlinks_src-base.h5copy_extlinks_src.h5
+ ${HDF5_TOOLS_TEST_H5REPACK_SOURCE_DIR}/testfiles/textlinkfar-prune.textlinkfar.h5
+ ${HDF5_TOOLS_TEST_H5REPACK_SOURCE_DIR}/testfiles/textlinksrc-prune.textlinksrc.h5
+ ${HDF5_TOOLS_TEST_H5REPACK_SOURCE_DIR}/testfiles/textlinktar-prune.textlinktar.h5
+ ${HDF5_TOOLS_TEST_H5REPACK_SOURCE_DIR}/testfiles/textlink-prune.textlink.h5
+ ${HDF5_TOOLS_TEST_H5REPACK_SOURCE_DIR}/testfiles/tsoftlinks-prune.tsoftlinks.h5
+ ${HDF5_TOOLS_TEST_H5REPACK_SOURCE_DIR}/testfiles/h5copy_extlinks_src-prune.h5copy_extlinks_src.h5
+ ${HDF5_TOOLS_TEST_H5REPACK_SOURCE_DIR}/testfiles/textlinkfar-mergeprune.textlinkfar.h5
+ ${HDF5_TOOLS_TEST_H5REPACK_SOURCE_DIR}/testfiles/textlinksrc-mergeprune.textlinksrc.h5
+ ${HDF5_TOOLS_TEST_H5REPACK_SOURCE_DIR}/testfiles/textlinktar-mergeprune.textlinktar.h5
+ ${HDF5_TOOLS_TEST_H5REPACK_SOURCE_DIR}/testfiles/textlink-mergeprune.textlink.h5
+ ${HDF5_TOOLS_TEST_H5REPACK_SOURCE_DIR}/testfiles/tsoftlinks-mergeprune.tsoftlinks.h5
+ ${HDF5_TOOLS_TEST_H5REPACK_SOURCE_DIR}/testfiles/h5copy_extlinks_src-mergeprune.h5copy_extlinks_src.h5
)
foreach (h5_file ${LIST_HDF5_TEST_FILES})
@@ -276,7 +310,7 @@
endif ()
endmacro ()
- macro (ADD_H5_CMP_TEST testname testfilter testtype resultcode resultfile)
+ macro (ADD_H5_FILTER_TEST testname testfilter testtype resultcode resultfile)
if ("${testtype}" STREQUAL "SKIP")
if (NOT HDF5_ENABLE_USING_MEMCHECKER)
add_test (
@@ -410,6 +444,48 @@
endif ()
endmacro ()
+ macro (ADD_H5_DIFF_TEST testname testtype resultcode testfile)
+ if ("${testtype}" STREQUAL "SKIP")
+ if (NOT HDF5_ENABLE_USING_MEMCHECKER)
+ add_test (
+ NAME H5REPACK_DIFF-${testname}
+ COMMAND ${CMAKE_COMMAND} -E echo "SKIP ${ARGN} ${PROJECT_BINARY_DIR}/testfiles/${testfile} ${PROJECT_BINARY_DIR}/testfiles/out-${testname}.${testfile}"
+ )
+ set_property(TEST H5REPACK_DIFF-${testname} PROPERTY DISABLED)
+ endif ()
+ else ()
+ add_test (
+ NAME H5REPACK_DIFF-${testname}-clear-objects
+ COMMAND ${CMAKE_COMMAND} -E remove testfiles/out-${testname}.${testfile}
+ )
+ set_tests_properties (H5REPACK_DIFF-${testname}-clear-objects PROPERTIES
+ FIXTURES_REQUIRED clear_h5repack
+ )
+ add_test (
+ NAME H5REPACK_DIFF-${testname}
+ COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} $<TARGET_FILE:h5repack${tgt_file_ext}> --enable-error-stack ${ARGN} ${PROJECT_BINARY_DIR}/testfiles/${testfile} ${PROJECT_BINARY_DIR}/testfiles/out-${testname}.${testfile}
+ )
+ set_tests_properties (H5REPACK_DIFF-${testname} PROPERTIES
+ DEPENDS H5REPACK_DIFF-${testname}-clear-objects
+ )
+ add_test (
+ NAME H5REPACK_DIFF-${testname}_DFF
+ COMMAND "${CMAKE_COMMAND}"
+ -D "TEST_EMULATOR=${CMAKE_CROSSCOMPILING_EMULATOR}"
+ -D "TEST_PROGRAM=$<TARGET_FILE:h5diff${tgt_file_ext}>"
+ -D "TEST_ARGS:STRING=-v;--enable-error-stack;${testfile};out-${testname}.${testfile}"
+ -D "TEST_FOLDER=${PROJECT_BINARY_DIR}/testfiles"
+ -D "TEST_OUTPUT=out-${testname}.${testfile}.out"
+ -D "TEST_EXPECT=${resultcode}"
+ -D "TEST_REFERENCE=${testname}.${testfile}.tst"
+ -P "${HDF_RESOURCES_EXT_DIR}/runTest.cmake"
+ )
+ set_tests_properties (H5REPACK_DIFF-${testname}_DFF PROPERTIES
+ DEPENDS H5REPACK_DIFF-${testname}
+ )
+ endif ()
+ endmacro ()
+
macro (ADD_H5_STAT_TEST testname testtype resultcode statarg resultfile)
if ("${testtype}" STREQUAL "SKIP")
if (NOT HDF5_ENABLE_USING_MEMCHECKER)
@@ -1148,7 +1224,7 @@
if (NOT USE_FILTER_DEFLATE)
set (TESTTYPE "SKIP")
endif ()
- ADD_H5_CMP_TEST (gzip_verbose_filters "O?...ing file[^\n]+\n" ${TESTTYPE} 0 ${arg})
+ ADD_H5_FILTER_TEST (gzip_verbose_filters "O?...ing file[^\n]+\n" ${TESTTYPE} 0 ${arg})
###########################################################
# the following tests assume the input files have filters
@@ -1540,6 +1616,44 @@ ADD_H5_EXTERNAL_TEST (ext_int32le_3d "TEST" int32le_3d -l CONTI)
ADD_H5_EXTERNAL_TEST (ext_uint8be "TEST" uint8be -l CONTI)
##############################################################################
+### E X T E R N A L L I N K T E S T S
+##############################################################################
+### HDFFV-11128 needs fixed to enable the following test
+#ADD_H5_DMP_TEST (h5copy_extlinks_src-base "TEST" 0 h5copy_extlinks_src.h5 --enable-error-stack)
+ADD_H5_DMP_TEST (tsoftlinks-base "TEST" 0 tsoftlinks.h5 --enable-error-stack)
+ADD_H5_DMP_TEST (textlink-base "TEST" 0 textlink.h5 --enable-error-stack)
+ADD_H5_DMP_TEST (textlinkfar-base "TEST" 0 textlinkfar.h5 --enable-error-stack)
+ADD_H5_DMP_TEST (textlinksrc-base "TEST" 0 textlinksrc.h5 --enable-error-stack)
+ADD_H5_DMP_TEST (textlinktar-base "TEST" 0 textlinktar.h5 --enable-error-stack)
+
+ADD_H5_DIFF_TEST (h5copy_extlinks_src-merge "TEST" 0 h5copy_extlinks_src.h5 --merge)
+ADD_H5_DIFF_TEST (tsoftlinks-merge "TEST" 1 tsoftlinks.h5 --merge)
+ADD_H5_DIFF_TEST (textlink-merge "TEST" 0 textlink.h5 --merge)
+### HDFFV-11128 needs fixed to enable the following test
+#ADD_H5_DIFF_TEST (textlinkfar-merge "TEST" 1 textlinkfar.h5 --merge)
+### HDFFV-11128 needs fixed to enable the following test
+#ADD_H5_DIFF_TEST (textlinksrc-merge "TEST" 1 textlinksrc.h5 --merge)
+### HDFFV-11128 needs fixed to enable the following test
+#ADD_H5_DIFF_TEST (textlinktar-merge "TEST" 1 textlinktar.h5 --merge)
+
+ADD_H5_DMP_TEST (h5copy_extlinks_src-prune "TEST" 0 h5copy_extlinks_src.h5 --prune --enable-error-stack)
+ADD_H5_DMP_TEST (tsoftlinks-prune "TEST" 0 tsoftlinks.h5 --prune --enable-error-stack)
+ADD_H5_DMP_TEST (textlink-prune "TEST" 0 textlink.h5 --prune --enable-error-stack)
+ADD_H5_DMP_TEST (textlinkfar-prune "TEST" 0 textlinkfar.h5 --prune --enable-error-stack)
+ADD_H5_DMP_TEST (textlinksrc-prune "TEST" 0 textlinksrc.h5 --prune --enable-error-stack)
+ADD_H5_DMP_TEST (textlinktar-prune "TEST" 0 textlinktar.h5 --prune --enable-error-stack)
+
+ADD_H5_DMP_TEST (h5copy_extlinks_src-mergeprune "TEST" 0 h5copy_extlinks_src.h5 --merge --prune --enable-error-stack)
+ADD_H5_DMP_TEST (tsoftlinks-mergeprune "TEST" 0 tsoftlinks.h5 --merge --prune --enable-error-stack)
+ADD_H5_DMP_TEST (textlink-mergeprune "TEST" 0 textlink.h5 --merge --prune --enable-error-stack)
+### HDFFV-11128 needs fixed to enable the following test
+#ADD_H5_DMP_TEST (textlinkfar-mergeprune "TEST" 0 textlinkfar.h5 --merge --prune --enable-error-stack)
+### HDFFV-11128 needs fixed to enable the following test
+#ADD_H5_DMP_TEST (textlinksrc-mergeprune "TEST" 0 textlinksrc.h5 --merge --prune --enable-error-stack)
+### HDFFV-11128 needs fixed to enable the following test
+#ADD_H5_DMP_TEST (textlinktar-mergeprune "TEST" 0 textlinktar.h5 --merge --prune --enable-error-stack)
+
+##############################################################################
### P L U G I N T E S T S
##############################################################################
if (BUILD_SHARED_LIBS)
diff --git a/tools/test/h5repack/h5repack.sh.in b/tools/test/h5repack/h5repack.sh.in
index ad6fef8..18e6d86 100644
--- a/tools/test/h5repack/h5repack.sh.in
+++ b/tools/test/h5repack/h5repack.sh.in
@@ -92,10 +92,18 @@ $SRC_H5REPACK_TESTFILES/h5repack_attr_refs.h5
$SRC_H5REPACK_TESTFILES/h5repack_deflate.h5
$SRC_H5REPACK_TESTFILES/h5repack_early.h5
$SRC_H5REPACK_TESTFILES/h5repack_ext.h5
+$SRC_H5REPACK_TESTFILES/h5repack_f32le.h5
+$SRC_H5REPACK_TESTFILES/h5repack_f32le_ex.h5
$SRC_H5REPACK_TESTFILES/h5repack_fill.h5
$SRC_H5REPACK_TESTFILES/h5repack_filters.h5
$SRC_H5REPACK_TESTFILES/h5repack_fletcher.h5
$SRC_H5REPACK_TESTFILES/h5repack_hlink.h5
+$SRC_H5REPACK_TESTFILES/h5repack_int32le_1d.h5
+$SRC_H5REPACK_TESTFILES/h5repack_int32le_1d_ex.h5
+$SRC_H5REPACK_TESTFILES/h5repack_int32le_2d.h5
+$SRC_H5REPACK_TESTFILES/h5repack_int32le_2d_ex.h5
+$SRC_H5REPACK_TESTFILES/h5repack_int32le_3d.h5
+$SRC_H5REPACK_TESTFILES/h5repack_int32le_3d_ex.h5
$SRC_H5REPACK_TESTFILES/h5repack_layout.h5
$SRC_H5REPACK_TESTFILES/h5repack_layouto.h5
$SRC_H5REPACK_TESTFILES/h5repack_layout2.h5
@@ -109,23 +117,26 @@ $SRC_H5REPACK_TESTFILES/h5repack_refs.h5
$SRC_H5REPACK_TESTFILES/h5repack_shuffle.h5
$SRC_H5REPACK_TESTFILES/h5repack_soffset.h5
$SRC_H5REPACK_TESTFILES/h5repack_szip.h5
+$SRC_H5REPACK_TESTFILES/h5repack_uint8be.h5
+$SRC_H5REPACK_TESTFILES/h5repack_uint8be_ex.h5
+########fsm#files########
$SRC_H5REPACK_TESTFILES/h5repack_aggr.h5
$SRC_H5REPACK_TESTFILES/h5repack_fsm_aggr_nopersist.h5
$SRC_H5REPACK_TESTFILES/h5repack_fsm_aggr_persist.h5
$SRC_H5REPACK_TESTFILES/h5repack_none.h5
$SRC_H5REPACK_TESTFILES/h5repack_paged_nopersist.h5
$SRC_H5REPACK_TESTFILES/h5repack_paged_persist.h5
-$SRC_H5REPACK_TESTFILES/h5repack_f32le.h5
-$SRC_H5REPACK_TESTFILES/h5repack_f32le_ex.h5
-$SRC_H5REPACK_TESTFILES/h5repack_int32le_1d.h5
-$SRC_H5REPACK_TESTFILES/h5repack_int32le_1d_ex.h5
-$SRC_H5REPACK_TESTFILES/h5repack_int32le_2d.h5
-$SRC_H5REPACK_TESTFILES/h5repack_int32le_2d_ex.h5
-$SRC_H5REPACK_TESTFILES/h5repack_int32le_3d.h5
-$SRC_H5REPACK_TESTFILES/h5repack_int32le_3d_ex.h5
-$SRC_H5REPACK_TESTFILES/h5repack_uint8be.h5
-$SRC_H5REPACK_TESTFILES/h5repack_uint8be_ex.h5
+########h5diff/testfile########
$SRC_H5DIFF_TESTFILES/h5diff_attr1.h5
+########tools/testfiles#for#external#links########
+$SRC_TOOLS_TESTFILES/tsoftlinks.h5
+$SRC_TOOLS_TESTFILES/textlinkfar.h5
+$SRC_TOOLS_TESTFILES/textlinksrc.h5
+$SRC_TOOLS_TESTFILES/textlinktar.h5
+$SRC_TOOLS_TESTFILES/textlink.h5
+$SRC_H5REPACK_TESTFILES/h5copy_extlinks_src.h5
+$SRC_H5REPACK_TESTFILES/h5copy_extlinks_trg.h5
+########tools/testfiles########
$SRC_TOOLS_TESTFILES/tfamily00000.h5
$SRC_TOOLS_TESTFILES/tfamily00001.h5
$SRC_TOOLS_TESTFILES/tfamily00002.h5
@@ -138,6 +149,8 @@ $SRC_TOOLS_TESTFILES/tfamily00008.h5
$SRC_TOOLS_TESTFILES/tfamily00009.h5
$SRC_TOOLS_TESTFILES/tfamily00010.h5
$SRC_TOOLS_TESTFILES/tordergr.h5
+########reference#conversion#files########
+########tools/testfiles/vds########
$SRC_TOOLS_TESTFILES/vds/1_a.h5
$SRC_TOOLS_TESTFILES/vds/1_b.h5
$SRC_TOOLS_TESTFILES/vds/1_c.h5
@@ -168,33 +181,73 @@ $SRC_H5REPACK_TESTFILES/h5repack-help.txt
$SRC_H5REPACK_TESTFILES/h5repack_ext.bin
$SRC_H5REPACK_TESTFILES/ublock.bin
$SRC_H5REPACK_TESTFILES/h5repack.info
-$SRC_H5REPACK_TESTFILES/crtorder.tordergr.h5.ddl
-$SRC_H5REPACK_TESTFILES/deflate_limit.h5repack_layout.h5.ddl
+########dat#files########
$SRC_H5REPACK_TESTFILES/h5repack_f32le_ex-0.dat
$SRC_H5REPACK_TESTFILES/h5repack_int32le_1d_ex-0.dat
$SRC_H5REPACK_TESTFILES/h5repack_int32le_1d_ex-1.dat
$SRC_H5REPACK_TESTFILES/h5repack_int32le_2d_ex-0.dat
$SRC_H5REPACK_TESTFILES/h5repack_int32le_3d_ex-0.dat
-$SRC_H5REPACK_TESTFILES/h5repack_layout.h5.ddl
-$SRC_H5REPACK_TESTFILES/h5repack_filters.h5-gzip_verbose_filters.tst
-$SRC_H5REPACK_TESTFILES/h5repack_layout.h5-dset2_chunk_20x10-errstk.tst
-$SRC_H5REPACK_TESTFILES/h5repack_layout.h5-plugin_test.ddl
$SRC_H5REPACK_TESTFILES/h5repack_uint8be_ex-0.dat
$SRC_H5REPACK_TESTFILES/h5repack_uint8be_ex-1.dat
$SRC_H5REPACK_TESTFILES/h5repack_uint8be_ex-2.dat
$SRC_H5REPACK_TESTFILES/h5repack_uint8be_ex-3.dat
-$SRC_H5REPACK_TESTFILES/plugin_test.h5repack_layout.h5.tst
-$SRC_H5REPACK_TESTFILES/1_vds.h5-vds_dset_chunk20x10x5-v.ddl
-$SRC_H5REPACK_TESTFILES/2_vds.h5-vds_chunk3x6x9-v.ddl
-$SRC_H5REPACK_TESTFILES/3_1_vds.h5-vds_chunk2x5x8-v.ddl
-$SRC_H5REPACK_TESTFILES/4_vds.h5-vds_compa-v.ddl
-$SRC_H5REPACK_TESTFILES/4_vds.h5-vds_conti-v.ddl
+###############
+$SRC_H5REPACK_TESTFILES/crtorder.tordergr.h5.ddl
+$SRC_H5REPACK_TESTFILES/deflate_limit.h5repack_layout.h5.ddl
+$SRC_H5REPACK_TESTFILES/h5repack_layout.h5.ddl
+$SRC_H5REPACK_TESTFILES/h5repack_layout.h5-plugin_test.ddl
+########fsm#files########
$SRC_H5REPACK_TESTFILES/SP.h5repack_fsm_aggr_nopersist.h5.ddl
$SRC_H5REPACK_TESTFILES/S.h5repack_fsm_aggr_persist.h5.ddl
$SRC_H5REPACK_TESTFILES/STG.h5repack_none.h5.ddl
$SRC_H5REPACK_TESTFILES/GS.h5repack_paged_nopersist.h5.ddl
$SRC_H5REPACK_TESTFILES/SP.h5repack_paged_persist.h5.ddl
$SRC_H5REPACK_TESTFILES/SPT.h5repack_aggr.h5.ddl
+########vds#files########
+$SRC_H5REPACK_TESTFILES/1_vds.h5-vds_dset_chunk20x10x5-v.ddl
+$SRC_H5REPACK_TESTFILES/2_vds.h5-vds_chunk3x6x9-v.ddl
+$SRC_H5REPACK_TESTFILES/3_1_vds.h5-vds_chunk2x5x8-v.ddl
+$SRC_H5REPACK_TESTFILES/4_vds.h5-vds_compa-v.ddl
+$SRC_H5REPACK_TESTFILES/4_vds.h5-vds_conti-v.ddl
+########refs#files########
+$SRC_H5REPACK_TESTFILES/attrregion.tattrreg.h5.ddl
+$SRC_H5REPACK_TESTFILES/dataregion.tdatareg.h5.ddl
+########external#links#files########
+$SRC_H5REPACK_TESTFILES/textlinkfar-base.textlinkfar.h5.ddl
+$SRC_H5REPACK_TESTFILES/textlinksrc-base.textlinksrc.h5.ddl
+$SRC_H5REPACK_TESTFILES/textlinktar-base.textlinktar.h5.ddl
+$SRC_H5REPACK_TESTFILES/textlink-base.textlink.h5.ddl
+$SRC_H5REPACK_TESTFILES/tsoftlinks-base.tsoftlinks.h5.ddl
+$SRC_H5REPACK_TESTFILES/h5copy_extlinks_src-base.h5copy_extlinks_src.h5.ddl
+$SRC_H5REPACK_TESTFILES/textlinkfar-merge.textlinkfar.h5.tst
+$SRC_H5REPACK_TESTFILES/textlinksrc-merge.textlinksrc.h5.tst
+$SRC_H5REPACK_TESTFILES/textlinktar-merge.textlinktar.h5.tst
+$SRC_H5REPACK_TESTFILES/textlink-merge.textlink.h5.tst
+$SRC_H5REPACK_TESTFILES/tsoftlinks-merge.tsoftlinks.h5.tst
+$SRC_H5REPACK_TESTFILES/h5copy_extlinks_src-merge.h5copy_extlinks_src.h5.tst
+$SRC_H5REPACK_TESTFILES/textlinkfar-prune.textlinkfar.h5.ddl
+$SRC_H5REPACK_TESTFILES/textlinksrc-prune.textlinksrc.h5.ddl
+$SRC_H5REPACK_TESTFILES/textlinktar-prune.textlinktar.h5.ddl
+$SRC_H5REPACK_TESTFILES/textlink-prune.textlink.h5.ddl
+$SRC_H5REPACK_TESTFILES/tsoftlinks-prune.tsoftlinks.h5.ddl
+$SRC_H5REPACK_TESTFILES/h5copy_extlinks_src-prune.h5copy_extlinks_src.h5.ddl
+$SRC_H5REPACK_TESTFILES/textlinkfar-mergeprune.textlinkfar.h5.ddl
+$SRC_H5REPACK_TESTFILES/textlinksrc-mergeprune.textlinksrc.h5.ddl
+$SRC_H5REPACK_TESTFILES/textlinktar-mergeprune.textlinktar.h5.ddl
+$SRC_H5REPACK_TESTFILES/textlink-mergeprune.textlink.h5.ddl
+$SRC_H5REPACK_TESTFILES/tsoftlinks-mergeprune.tsoftlinks.h5.ddl
+$SRC_H5REPACK_TESTFILES/h5copy_extlinks_src-mergeprune.h5copy_extlinks_src.h5.ddl
+########tst#files########
+$SRC_H5REPACK_TESTFILES/h5repack_filters.h5-gzip_verbose_filters.tst
+$SRC_H5REPACK_TESTFILES/h5repack_layout.h5-dset2_chunk_20x10-errstk.tst
+$SRC_H5REPACK_TESTFILES/plugin_test.h5repack_layout.h5.tst
+########external#links#tst#files########
+$SRC_H5REPACK_TESTFILES/tsoftlinks-merge.tsoftlinks.h5.tst
+$SRC_H5REPACK_TESTFILES/textlinkfar-merge.textlinkfar.h5.tst
+$SRC_H5REPACK_TESTFILES/textlinksrc-merge.textlinksrc.h5.tst
+$SRC_H5REPACK_TESTFILES/textlinktar-merge.textlinktar.h5.tst
+$SRC_H5REPACK_TESTFILES/textlink-merge.textlink.h5.tst
+$SRC_H5REPACK_TESTFILES/h5copy_extlinks_src-merge.h5copy_extlinks_src.h5.tst
"
#
@@ -271,6 +324,12 @@ SKIP() {
echo " -SKIP-"
}
+##############################################################################
+##############################################################################
+### T H E T E S T S M A C R O S ###
+##############################################################################
+##############################################################################
+
# Call the h5diff tool
#
DIFFTEST()
@@ -620,6 +679,7 @@ VERIFY_INVALIDBOUNDS()
# -----------------------------------------------------------------------------
# Expect h5diff to fail
+# Use only by VERIFY_EXTERNAL_CONSOLIDATION
# -----------------------------------------------------------------------------
DIFFFAIL()
{
@@ -805,6 +865,121 @@ TOOLTESTV()
rm -f $outfile
}
+# This is same as TOOLTESTV() with comparing display output
+# with actual filename swapped
+#
+TOOLTESTSV()
+{
+ expect="$TESTDIR/$1.$2.tst"
+ actual="$TESTDIR/`basename $2 .ddl`.out"
+ actual_err="$TESTDIR/`basename $2 .ddl`.err"
+
+ infile=$2
+ outfile=out-$1.$2
+ shift
+ shift
+
+ # Run test.
+ TESTING $H5REPACK $@
+ (
+ cd $TESTDIR
+ $RUNSERIAL $H5REPACK_BIN "$@" $infile $outfile
+ ) >$actual 2>$actual_err
+ RET=$?
+ if [ $RET != 0 ] ; then
+ echo "*FAILED*"
+ nerrors="`expr $nerrors + 1`"
+ else
+ echo " PASSED"
+ VERIFY h5diff equal $@
+ (
+ cd $TESTDIR
+ $RUNSERIAL $H5DIFF_BIN -v $infile $outfile
+ ) >$actual 2>$actual_err
+ RET=$?
+ if [ $RET != 0 ] ; then
+ echo "*FAILED*"
+ nerrors="`expr $nerrors + 1`"
+ else
+ echo " PASSED"
+ fi
+ fi
+
+ # display output compare
+ STDOUT_FILTER $actual
+ cat $actual_err >> $actual
+
+ VERIFY output from $H5REPACK $@
+ if cmp -s $expect $actual; then
+ echo " PASSED"
+ else
+ echo "*FAILED*"
+ echo " Expected result (*.tst) differs from actual result (*.out)"
+ nerrors="`expr $nerrors + 1`"
+ test yes = "$verbose" && diff -c $expect $actual |sed 's/^/ /'
+ fi
+
+ rm -f $actual $actual_err
+ rm -f $outfile
+}
+
+# This is same as TOOLTESTSV() but expects a diff fail
+#
+TOOLFAILSV()
+{
+ expect="$TESTDIR/$1.$2.tst"
+ actual="$TESTDIR/`basename $2 .ddl`.out"
+ actual_err="$TESTDIR/`basename $2 .ddl`.err"
+
+ infile=$2
+ outfile=out-$1.$2
+ shift
+ shift
+
+ # Run test.
+ TESTING $H5REPACK $@
+ (
+ cd $TESTDIR
+ $RUNSERIAL $H5REPACK_BIN "$@" $infile $outfile
+ ) >$actual 2>$actual_err
+ RET=$?
+ if [ $RET != 0 ] ; then
+ echo "*FAILED*"
+ nerrors="`expr $nerrors + 1`"
+ else
+ echo " PASSED"
+ VERIFY h5diff unequal $@
+ (
+ cd $TESTDIR
+ $RUNSERIAL $H5DIFF_BIN -v $infile $outfile
+ ) >$actual 2>$actual_err
+ RET=$?
+ if [ $RET == 0 ] ; then
+ echo "*FAILED*"
+ nerrors="`expr $nerrors + 1`"
+ else
+ echo " PASSED"
+ fi
+ fi
+
+ # display output compare
+ STDOUT_FILTER $actual
+ cat $actual_err >> $actual
+
+ VERIFY output from $H5REPACK $@
+ if cmp -s $expect $actual; then
+ echo " PASSED"
+ else
+ echo "*FAILED*"
+ echo " Expected result (*.tst) differs from actual result (*.out)"
+ nerrors="`expr $nerrors + 1`"
+ test yes = "$verbose" && diff -c $expect $actual |sed 's/^/ /'
+ fi
+
+ rm -f $actual $actual_err
+ rm -f $outfile
+}
+
# same as TOOLTESTV but filters error stack output and compares to an error file
# Extract file name, line number, version and thread IDs because they may be different
# ADD_H5ERR_MASK_TEST
@@ -1356,44 +1531,28 @@ TOOLTEST_STAT SPT $arg
# layout options (these files have no filters)
#########################################################
VERIFY_LAYOUT_DSET dset2_chunk_20x10 h5repack_layout.h5 dset2 CHUNKED --layout dset2:CHUNK=20x10
-
VERIFY_LAYOUT_ALL chunk_20x10 h5repack_layout.h5 CHUNKED -l CHUNK=20x10
-
VERIFY_LAYOUT_DSET dset2_conti h5repack_layout.h5 dset2 CONTIGUOUS -l dset2:CONTI
-
VERIFY_LAYOUT_ALL conti h5repack_layout.h5 CONTIGUOUS -l CONTI
-
VERIFY_LAYOUT_DSET dset2_compa h5repack_layout.h5 dset2 COMPACT -l dset2:COMPA
-
VERIFY_LAYOUT_ALL compa h5repack_layout.h5 COMPACT -l COMPA
-
TOOLTESTM dset2_chunk_20x10-errstk h5repack_layout.h5 --layout=dset2:CHUNK=20x10x5 --enable-error-stack
################################################################
# layout conversions (file has no filters)
###############################################################
-
VERIFY_LAYOUT_DSET dset_compa_conti h5repack_layout.h5 dset_compact CONTIGUOUS -l dset_compact:CONTI
-
VERIFY_LAYOUT_DSET dset_compa_chunk h5repack_layout.h5 dset_compact CHUNKED -l dset_compact:CHUNK=2x5
-
VERIFY_LAYOUT_DSET dset_compa_compa h5repack_layout.h5 dset_compact COMPACT -l dset_compact:COMPA
-
VERIFY_LAYOUT_DSET dset_conti_compa h5repack_layout.h5 dset_contiguous COMPACT -l dset_contiguous:COMPA
-
VERIFY_LAYOUT_DSET dset_conti_chunk h5repack_layout.h5 dset_contiguous CHUNKED -l dset_contiguous:CHUNK=3x6
-
VERIFY_LAYOUT_DSET dset_conti_conti h5repack_layout.h5 dset_contiguous CONTIGUOUS -l dset_contiguous:CONTI
-
VERIFY_LAYOUT_DSET chunk_compa h5repack_layout.h5 dset_chunk COMPACT -l dset_chunk:COMPA
-
VERIFY_LAYOUT_DSET chunk_conti h5repack_layout.h5 dset_chunk CONTIGUOUS -l dset_chunk:CONTI
-
VERIFY_LAYOUT_DSET chunk_18x13 h5repack_layout.h5 dset_chunk CHUNKED -l dset_chunk:CHUNK=18x13
# test convert small size dataset ( < 1k) to compact layout without -m
VERIFY_LAYOUT_DSET contig_small_compa h5repack_layout2.h5 contig_small COMPACT -l contig_small:COMPA
-
VERIFY_LAYOUT_DSET contig_small_fixed_compa h5repack_layout2.h5 chunked_small_fixed COMPACT -l chunked_small_fixed:COMPA
#---------------------------------------------------------------------------
@@ -1421,6 +1580,7 @@ VERIFY_LAYOUT_DSET chunk2compa h5repack_layout3.h5 chunk_unlimit1 CHUNK -l chunk
# chunk dim is bigger than dataset dim. ( dset size < 64k )
VERIFY_LAYOUT_DSET error1 h5repack_layout3.h5 chunk_unlimit1 H5S_UNLIMITED -f chunk_unlimit1:NONE
# chunk dim is bigger than dataset dim. ( dset size > 64k )
+
VERIFY_LAYOUT_DSET error2 h5repack_layout3.h5 chunk_unlimit2 H5S_UNLIMITED -f chunk_unlimit2:NONE
# chunk dims are smaller than dataset dims. ( dset size < 64k )
@@ -1435,7 +1595,6 @@ TOOLTEST error4 h5repack_layout3.h5 -f NONE
# (dset size < 64K) and with unlimited max dims on a condition as follow.
# (HDFFV-8214)
#--------------------------------------------------------------------------
-
# chunk dim is bigger than dataset dim. should succeed.
VERIFY_LAYOUT_DSET ckdim_biger h5repack_layout3.h5 chunk_unlimit2 CONTI -l chunk_unlimit2:CONTI
# chunk dim is smaller than dataset dim. should succeed.
@@ -1466,7 +1625,6 @@ else
fi
# several global filters
-
arg="h5repack_layout.h5 --filter GZIP=1 --filter SHUF"
if test $USE_FILTER_DEFLATE != "yes" ; then
SKIP $arg
@@ -1562,9 +1720,15 @@ else
VERIFY_LAYOUT_VDS vds_conti 4_vds.h5 vds_dset CONTIGUOUS -l vds_dset:CONTI
fi
-#########################################################
-# Testing version bounds
-#########################################################
+################################################################
+# reference new api conversions
+###############################################################
+#TOOLTEST_DUMP attrregion tattrreg.h5
+#TOOLTEST_DUMP dataregion tdatareg.h5
+
+##############################################################################
+### V E R S I O N B O U N D S T E S T S
+##############################################################################
# -j 0 -k 2, superblock will be 0
VERIFY_SUPERBLOCK 0 2 0 h5repack_layout.h5 -j 0 -k 2 h5repack_layout.h5
# -j 1 -k 2, superblock will be 2
@@ -1574,11 +1738,49 @@ VERIFY_SUPERBLOCK 2 2 3 h5repack_layout.h5 -j 2 -k 2 h5repack_layout.h5
# -j 0 -k 1, file cannot be opened
VERIFY_INVALIDBOUNDS 0 1 bounds_latest_latest.h5
-########################################
-# Testing external storage
-########################################
+##############################################################################
+### E X T E R N A L S T O R A G E T E S T S
+##############################################################################
VERIFY_EXTERNAL_CONSOLIDATION -l CONTI
+##############################################################################
+### E X T E R N A L L I N K T E S T S
+##############################################################################
+### HDFFV-11128 needs fixed to enable the following test
+#TOOLTEST_DUMP h5copy_extlinks_src-base h5copy_extlinks_src.h5 --enable-error-stack
+TOOLTEST_DUMP tsoftlinks-base tsoftlinks.h5 --enable-error-stack
+TOOLTEST_DUMP textlink-base textlink.h5 --enable-error-stack
+TOOLTEST_DUMP textlinkfar-base textlinkfar.h5 --enable-error-stack
+TOOLTEST_DUMP textlinksrc-base textlinksrc.h5 --enable-error-stack
+TOOLTEST_DUMP textlinktar-base textlinktar.h5 --enable-error-stack
+
+TOOLTESTSV h5copy_extlinks_src-merge h5copy_extlinks_src.h5 --merge
+TOOLFAILSV tsoftlinks-merge tsoftlinks.h5 --merge
+TOOLTESTSV textlink-merge textlink.h5 --merge
+### HDFFV-11128 needs fixed to enable the following test
+#TOOLFAILSV textlinkfar-merge textlinkfar.h5 --merge
+### HDFFV-11128 needs fixed to enable the following test
+#TOOLFAILSV textlinksrc-merge textlinksrc.h5 --merge
+### HDFFV-11128 needs fixed to enable the following test
+#TOOLFAILSV textlinktar-merge textlinktar.h5 --merge
+
+TOOLTEST_DUMP h5copy_extlinks_src-prune h5copy_extlinks_src.h5 --prune --enable-error-stack
+TOOLTEST_DUMP tsoftlinks-prune tsoftlinks.h5 --prune --enable-error-stack
+TOOLTEST_DUMP textlink-prune textlink.h5 --prune --enable-error-stack
+TOOLTEST_DUMP textlinkfar-prune textlinkfar.h5 --prune --enable-error-stack
+TOOLTEST_DUMP textlinksrc-prune textlinksrc.h5 --prune --enable-error-stack
+TOOLTEST_DUMP textlinktar-prune textlinktar.h5 --prune --enable-error-stack
+
+TOOLTEST_DUMP h5copy_extlinks_src-mergeprune h5copy_extlinks_src.h5 --merge --prune --enable-error-stack
+TOOLTEST_DUMP tsoftlinks-mergeprune tsoftlinks.h5 --merge --prune --enable-error-stack
+TOOLTEST_DUMP textlink-mergeprune textlink.h5 --merge --prune --enable-error-stack
+### HDFFV-11128 needs fixed to enable the following test
+#TOOLTEST_DUMP textlinkfar-mergeprune textlinkfar.h5 --merge --prune --enable-error-stack
+### HDFFV-11128 needs fixed to enable the following test
+#TOOLTEST_DUMP textlinksrc-mergeprune textlinksrc.h5 --merge --prune --enable-error-stack
+### HDFFV-11128 needs fixed to enable the following test
+#TOOLTEST_DUMP textlinktar-mergeprune textlinktar.h5 --merge --prune --enable-error-stack
+
# Clean up temporary files/directories
CLEAN_TESTFILES_AND_TESTDIR
diff --git a/tools/test/h5repack/h5repacktst.c b/tools/test/h5repack/h5repacktst.c
index ab0dbb7..2666e95 100644
--- a/tools/test/h5repack/h5repacktst.c
+++ b/tools/test/h5repack/h5repacktst.c
@@ -3872,7 +3872,7 @@ out:
*
* Purpose: write datasets in LOC_ID
*
-* Programmer: Pedro Vicente, pvn@ncsa.uiuc.edu
+* Programmer: Pedro Vicente
*
* Date: November 12, 2003
*
@@ -4736,7 +4736,7 @@ out:
*
* Purpose: write attributes in LOC_ID (dataset, group, named datatype)
*
-* Programmer: Pedro Vicente, pvn@ncsa.uiuc.edu
+* Programmer: Pedro Vicente
*
* Date: November 12, 2003
*
@@ -5927,7 +5927,7 @@ out:
*
* Purpose: utility function to create and write a dataset in LOC_ID
*
-* Programmer: Pedro Vicente, pvn@ncsa.uiuc.edu
+* Programmer: Pedro Vicente
*
* Date: November 12, 2003
*
@@ -5963,7 +5963,7 @@ out:
*
* Purpose: utility function to create and write a dataset in LOC_ID
*
-* Programmer: Pedro Vicente, pvn@ncsa.uiuc.edu
+* Programmer: Pedro Vicente
*
* Date: November 12, 2003
*
@@ -6011,7 +6011,7 @@ out:
*
* Purpose: utility function to write an attribute in LOC_ID
*
-* Programmer: Pedro Vicente, pvn@ncsa.uiuc.edu
+* Programmer: Pedro Vicente
*
* Date: November 12, 2003
*
diff --git a/tools/test/h5repack/testfiles/h5copy_extlinks_src-base.h5copy_extlinks_src.h5.ddl b/tools/test/h5repack/testfiles/h5copy_extlinks_src-base.h5copy_extlinks_src.h5.ddl
new file mode 100644
index 0000000..ad8a320
--- /dev/null
+++ b/tools/test/h5repack/testfiles/h5copy_extlinks_src-base.h5copy_extlinks_src.h5.ddl
@@ -0,0 +1,28 @@
+HDF5 "out-h5copy_extlinks_src-mergeprune.h5copy_extlinks_src.h5" {
+GROUP "/" {
+ GROUP "group_ext" {
+ DATATYPE "extlink_datatype" H5T_STD_I32LE;
+ DATASET "extlink_dset" {
+ DATATYPE H5T_STD_I32LE
+ DATASPACE SIMPLE { ( 6 ) / ( 6 ) }
+ STORAGE_LAYOUT {
+ CONTIGUOUS
+ SIZE 24
+ OFFSET 2200
+ }
+ FILTERS {
+ NONE
+ }
+ FILLVALUE {
+ FILL_TIME H5D_FILL_TIME_IFSET
+ VALUE H5D_FILL_VALUE_DEFAULT
+ }
+ ALLOCATION_TIME {
+ H5D_ALLOC_TIME_LATE
+ }
+ }
+ GROUP "extlink_grp" {
+ }
+ }
+}
+}
diff --git a/tools/test/h5repack/testfiles/h5copy_extlinks_src-merge.h5copy_extlinks_src.h5.tst b/tools/test/h5repack/testfiles/h5copy_extlinks_src-merge.h5copy_extlinks_src.h5.tst
new file mode 100644
index 0000000..52f215d
--- /dev/null
+++ b/tools/test/h5repack/testfiles/h5copy_extlinks_src-merge.h5copy_extlinks_src.h5.tst
@@ -0,0 +1,26 @@
+
+file1 file2
+---------------------------------------
+ x x /
+ x x /group_ext
+ x x /group_ext/extlink_datatype
+ x x /group_ext/extlink_dset
+ x x /group_ext/extlink_grp
+ x x /group_ext/extlink_notyet1
+ x x /group_ext/extlink_notyet2
+
+group : </> and </>
+0 differences found
+group : </group_ext> and </group_ext>
+0 differences found
+Not comparable: </group_ext/extlink_datatype> is of type H5G_UDLINK and </group_ext/extlink_datatype> is of type H5G_TYPE
+Not comparable: </group_ext/extlink_dset> is of type H5G_UDLINK and </group_ext/extlink_dset> is of type H5G_DATASET
+Not comparable: </group_ext/extlink_grp> is of type H5G_UDLINK and </group_ext/extlink_grp> is of type H5G_GROUP
+external link: </group_ext/extlink_notyet1> and </group_ext/extlink_notyet1>
+0 differences found
+external link: </group_ext/extlink_notyet2> and </group_ext/extlink_notyet2>
+0 differences found
+--------------------------------
+Some objects are not comparable
+--------------------------------
+Use -c for a list of objects without details of differences.
diff --git a/tools/test/h5repack/testfiles/h5copy_extlinks_src-mergeprune.h5copy_extlinks_src.h5.ddl b/tools/test/h5repack/testfiles/h5copy_extlinks_src-mergeprune.h5copy_extlinks_src.h5.ddl
new file mode 100644
index 0000000..ad8a320
--- /dev/null
+++ b/tools/test/h5repack/testfiles/h5copy_extlinks_src-mergeprune.h5copy_extlinks_src.h5.ddl
@@ -0,0 +1,28 @@
+HDF5 "out-h5copy_extlinks_src-mergeprune.h5copy_extlinks_src.h5" {
+GROUP "/" {
+ GROUP "group_ext" {
+ DATATYPE "extlink_datatype" H5T_STD_I32LE;
+ DATASET "extlink_dset" {
+ DATATYPE H5T_STD_I32LE
+ DATASPACE SIMPLE { ( 6 ) / ( 6 ) }
+ STORAGE_LAYOUT {
+ CONTIGUOUS
+ SIZE 24
+ OFFSET 2200
+ }
+ FILTERS {
+ NONE
+ }
+ FILLVALUE {
+ FILL_TIME H5D_FILL_TIME_IFSET
+ VALUE H5D_FILL_VALUE_DEFAULT
+ }
+ ALLOCATION_TIME {
+ H5D_ALLOC_TIME_LATE
+ }
+ }
+ GROUP "extlink_grp" {
+ }
+ }
+}
+}
diff --git a/tools/test/h5repack/testfiles/h5copy_extlinks_src-prune.h5copy_extlinks_src.h5.ddl b/tools/test/h5repack/testfiles/h5copy_extlinks_src-prune.h5copy_extlinks_src.h5.ddl
new file mode 100644
index 0000000..b7d7bca
--- /dev/null
+++ b/tools/test/h5repack/testfiles/h5copy_extlinks_src-prune.h5copy_extlinks_src.h5.ddl
@@ -0,0 +1,6 @@
+HDF5 "out-h5copy_extlinks_src-prune.h5copy_extlinks_src.h5" {
+GROUP "/" {
+ GROUP "group_ext" {
+ }
+}
+}
diff --git a/tools/test/h5repack/testfiles/h5copy_extlinks_src.h5 b/tools/test/h5repack/testfiles/h5copy_extlinks_src.h5
new file mode 100644
index 0000000..7b8621e
--- /dev/null
+++ b/tools/test/h5repack/testfiles/h5copy_extlinks_src.h5
Binary files differ
diff --git a/tools/test/h5repack/testfiles/h5copy_extlinks_trg.h5 b/tools/test/h5repack/testfiles/h5copy_extlinks_trg.h5
new file mode 100644
index 0000000..3a0242d
--- /dev/null
+++ b/tools/test/h5repack/testfiles/h5copy_extlinks_trg.h5
Binary files differ
diff --git a/tools/test/h5repack/testfiles/h5repack-help.txt b/tools/test/h5repack/testfiles/h5repack-help.txt
index 00fae24..e12838d 100644
--- a/tools/test/h5repack/testfiles/h5repack-help.txt
+++ b/tools/test/h5repack/testfiles/h5repack-help.txt
@@ -29,6 +29,9 @@ usage: h5repack [OPTIONS] file1 file2
--high=BOUND The high bound for library release versions to use
when creating objects in the file
(default is H5F_LIBVER_LATEST)
+ --merge Follow external soft link recursively and merge data
+ --prune Do not follow external soft links and remove link
+ --merge --prune Follow external link, merge data and remove dangling link
-c L1, --compact=L1 Maximum number of links in header messages
-d L2, --indexed=L2 Minimum number of links in the indexed format
-s S[:F], --ssize=S[:F] Shared object header message minimum size
diff --git a/tools/test/h5repack/testfiles/textlink-base.textlink.h5.ddl b/tools/test/h5repack/testfiles/textlink-base.textlink.h5.ddl
new file mode 100644
index 0000000..b87a17d
--- /dev/null
+++ b/tools/test/h5repack/testfiles/textlink-base.textlink.h5.ddl
@@ -0,0 +1,12 @@
+HDF5 "out-textlink-base.textlink.h5" {
+GROUP "/" {
+ EXTERNAL_LINK "extlink1" {
+ TARGETFILE "filename"
+ TARGETPATH "objname"
+ }
+ EXTERNAL_LINK "extlink2" {
+ TARGETFILE "anotherfile"
+ TARGETPATH "anotherobj"
+ }
+}
+}
diff --git a/tools/test/h5repack/testfiles/textlink-merge.textlink.h5.tst b/tools/test/h5repack/testfiles/textlink-merge.textlink.h5.tst
new file mode 100644
index 0000000..a7ff71d
--- /dev/null
+++ b/tools/test/h5repack/testfiles/textlink-merge.textlink.h5.tst
@@ -0,0 +1,13 @@
+
+file1 file2
+---------------------------------------
+ x x /
+ x x /extlink1
+ x x /extlink2
+
+group : </> and </>
+0 differences found
+external link: </extlink1> and </extlink1>
+0 differences found
+external link: </extlink2> and </extlink2>
+0 differences found
diff --git a/tools/test/h5repack/testfiles/textlink-mergeprune.textlink.h5.ddl b/tools/test/h5repack/testfiles/textlink-mergeprune.textlink.h5.ddl
new file mode 100644
index 0000000..7206ae9
--- /dev/null
+++ b/tools/test/h5repack/testfiles/textlink-mergeprune.textlink.h5.ddl
@@ -0,0 +1,4 @@
+HDF5 "out-textlink-mergeprune.textlink.h5" {
+GROUP "/" {
+}
+}
diff --git a/tools/test/h5repack/testfiles/textlink-prune.textlink.h5.ddl b/tools/test/h5repack/testfiles/textlink-prune.textlink.h5.ddl
new file mode 100644
index 0000000..83db344
--- /dev/null
+++ b/tools/test/h5repack/testfiles/textlink-prune.textlink.h5.ddl
@@ -0,0 +1,4 @@
+HDF5 "out-textlink-prune.textlink.h5" {
+GROUP "/" {
+}
+}
diff --git a/tools/test/h5repack/testfiles/textlinkfar-base.textlinkfar.h5.ddl b/tools/test/h5repack/testfiles/textlinkfar-base.textlinkfar.h5.ddl
new file mode 100644
index 0000000..a5eb497
--- /dev/null
+++ b/tools/test/h5repack/testfiles/textlinkfar-base.textlinkfar.h5.ddl
@@ -0,0 +1,116 @@
+HDF5 "out-textlinkfar-base.textlinkfar.h5" {
+GROUP "/" {
+ EXTERNAL_LINK "src_file" {
+ TARGETFILE "textlinksrc.h5"
+ TARGETPATH "/"
+ GROUP "/" {
+ EXTERNAL_LINK "ext2soft_link1" {
+ TARGETFILE "tsoftlinks.h5"
+ TARGETPATH "/soft_dset1"
+ DATASET "/soft_dset1" {
+ DATATYPE H5T_STD_I32BE
+ DATASPACE SIMPLE { ( 4, 2 ) / ( 4, 2 ) }
+ STORAGE_LAYOUT {
+ CONTIGUOUS
+ SIZE 32
+ OFFSET 2848
+ }
+ FILTERS {
+ NONE
+ }
+ FILLVALUE {
+ FILL_TIME H5D_FILL_TIME_IFSET
+ VALUE H5D_FILL_VALUE_DEFAULT
+ }
+ ALLOCATION_TIME {
+ H5D_ALLOC_TIME_LATE
+ }
+ }
+ }
+ EXTERNAL_LINK "ext2softdangle_link1" {
+ TARGETFILE "tsoftlinks.h5"
+ TARGETPATH "/soft_dangle"
+ }
+ EXTERNAL_LINK "ext_link1" {
+ TARGETFILE "textlinktar.h5"
+ TARGETPATH "group"
+ GROUP "group" {
+ DATASET "dset" {
+ DATATYPE H5T_STD_I32LE
+ DATASPACE SIMPLE { ( 6 ) / ( 6 ) }
+ STORAGE_LAYOUT {
+ CONTIGUOUS
+ SIZE 24
+ OFFSET 3136
+ }
+ FILTERS {
+ NONE
+ }
+ FILLVALUE {
+ FILL_TIME H5D_FILL_TIME_IFSET
+ VALUE H5D_FILL_VALUE_DEFAULT
+ }
+ ALLOCATION_TIME {
+ H5D_ALLOC_TIME_LATE
+ }
+ }
+ EXTERNAL_LINK "elink_t1" {
+ TARGETFILE "textlinksrc.h5"
+ TARGETPATH "/"
+ GROUP "/" {
+ HARDLINK "/"
+ }
+ }
+ EXTERNAL_LINK "elink_t2" {
+ TARGETFILE "textlinksrc.h5"
+ TARGETPATH "/ext_link4"
+ }
+ GROUP "subgroup" {
+ GROUP "link_to_group" {
+ HARDLINK "/group"
+ }
+ }
+ }
+ }
+ EXTERNAL_LINK "ext_link2" {
+ TARGETFILE "textlinktar.h5"
+ TARGETPATH "dset"
+ DATASET "dset" {
+ DATATYPE H5T_STD_I32LE
+ DATASPACE SIMPLE { ( 6 ) / ( 6 ) }
+ STORAGE_LAYOUT {
+ CONTIGUOUS
+ SIZE 24
+ OFFSET 3160
+ }
+ FILTERS {
+ NONE
+ }
+ FILLVALUE {
+ FILL_TIME H5D_FILL_TIME_IFSET
+ VALUE H5D_FILL_VALUE_DEFAULT
+ }
+ ALLOCATION_TIME {
+ H5D_ALLOC_TIME_LATE
+ }
+ }
+ }
+ EXTERNAL_LINK "ext_link3" {
+ TARGETFILE "textlinktar.h5"
+ TARGETPATH "type"
+ DATATYPE "type" H5T_STD_I32LE;
+ }
+ EXTERNAL_LINK "ext_link4" {
+ TARGETFILE "textlinktar.h5"
+ TARGETPATH "group/elink_t2"
+ }
+ EXTERNAL_LINK "ext_link5" {
+ TARGETFILE "textlinktar.h5"
+ TARGETPATH "empty_group"
+ GROUP "empty_group" {
+ }
+ }
+ }
+ }
+}
+}
diff --git a/tools/test/h5repack/testfiles/textlinkfar-merge.textlinkfar.h5.tst b/tools/test/h5repack/testfiles/textlinkfar-merge.textlinkfar.h5.tst
new file mode 100644
index 0000000..6673d39
--- /dev/null
+++ b/tools/test/h5repack/testfiles/textlinkfar-merge.textlinkfar.h5.tst
@@ -0,0 +1,20 @@
+
+file1 file2
+---------------------------------------
+ x x /
+ x x /src_file
+ x /src_file/ext2soft_link1
+ x /src_file/ext2softdangle_link1
+ x /src_file/ext_link1
+ x /src_file/ext_link2
+ x /src_file/ext_link3
+ x /src_file/ext_link4
+ x /src_file/ext_link5
+
+group : </> and </>
+0 differences found
+Not comparable: </src_file> is of type H5G_UDLINK and </src_file> is of type H5G_GROUP
+--------------------------------
+Some objects are not comparable
+--------------------------------
+Use -c for a list of objects without details of differences.
diff --git a/tools/test/h5repack/testfiles/textlinkfar-mergeprune.textlinkfar.h5.ddl b/tools/test/h5repack/testfiles/textlinkfar-mergeprune.textlinkfar.h5.ddl
new file mode 100644
index 0000000..7ba3308
--- /dev/null
+++ b/tools/test/h5repack/testfiles/textlinkfar-mergeprune.textlinkfar.h5.ddl
@@ -0,0 +1,152 @@
+HDF5 "out-textlinkfar-mergeprune.textlinkfar.h5" {
+GROUP "/" {
+ GROUP "src_file" {
+ EXTERNAL_LINK "ext2soft_link1" {
+ TARGETFILE "tsoftlinks.h5"
+ TARGETPATH "/soft_dset1"
+ DATASET "/soft_dset1" {
+ DATATYPE H5T_STD_I32BE
+ DATASPACE SIMPLE { ( 4, 2 ) / ( 4, 2 ) }
+ STORAGE_LAYOUT {
+ CONTIGUOUS
+ SIZE 32
+ OFFSET 2848
+ }
+ FILTERS {
+ NONE
+ }
+ FILLVALUE {
+ FILL_TIME H5D_FILL_TIME_IFSET
+ VALUE H5D_FILL_VALUE_DEFAULT
+ }
+ ALLOCATION_TIME {
+ H5D_ALLOC_TIME_LATE
+ }
+ }
+ }
+ EXTERNAL_LINK "ext2softdangle_link1" {
+ TARGETFILE "tsoftlinks.h5"
+ TARGETPATH "/soft_dangle"
+ }
+ EXTERNAL_LINK "ext_link1" {
+ TARGETFILE "textlinktar.h5"
+ TARGETPATH "group"
+ GROUP "group" {
+ DATASET "dset" {
+ DATATYPE H5T_STD_I32LE
+ DATASPACE SIMPLE { ( 6 ) / ( 6 ) }
+ STORAGE_LAYOUT {
+ CONTIGUOUS
+ SIZE 24
+ OFFSET 3136
+ }
+ FILTERS {
+ NONE
+ }
+ FILLVALUE {
+ FILL_TIME H5D_FILL_TIME_IFSET
+ VALUE H5D_FILL_VALUE_DEFAULT
+ }
+ ALLOCATION_TIME {
+ H5D_ALLOC_TIME_LATE
+ }
+ }
+ EXTERNAL_LINK "elink_t1" {
+ TARGETFILE "textlinksrc.h5"
+ TARGETPATH "/"
+ GROUP "/" {
+ EXTERNAL_LINK "ext2soft_link1" {
+ TARGETFILE "tsoftlinks.h5"
+ TARGETPATH "/soft_dset1"
+ DATASET "/soft_dset1" {
+ HARDLINK "/dset1"
+ }
+ }
+ EXTERNAL_LINK "ext2softdangle_link1" {
+ TARGETFILE "tsoftlinks.h5"
+ TARGETPATH "/soft_dangle"
+ }
+ EXTERNAL_LINK "ext_link1" {
+ TARGETFILE "textlinktar.h5"
+ TARGETPATH "group"
+ GROUP "group" {
+ HARDLINK "/group"
+ }
+ }
+ EXTERNAL_LINK "ext_link2" {
+ TARGETFILE "textlinktar.h5"
+ TARGETPATH "dset"
+ DATASET "dset" {
+ DATATYPE H5T_STD_I32LE
+ DATASPACE SIMPLE { ( 6 ) / ( 6 ) }
+ STORAGE_LAYOUT {
+ CONTIGUOUS
+ SIZE 24
+ OFFSET 3160
+ }
+ FILTERS {
+ NONE
+ }
+ FILLVALUE {
+ FILL_TIME H5D_FILL_TIME_IFSET
+ VALUE H5D_FILL_VALUE_DEFAULT
+ }
+ ALLOCATION_TIME {
+ H5D_ALLOC_TIME_LATE
+ }
+ }
+ }
+ EXTERNAL_LINK "ext_link3" {
+ TARGETFILE "textlinktar.h5"
+ TARGETPATH "type"
+ DATATYPE "type" H5T_STD_I32LE;
+ }
+ EXTERNAL_LINK "ext_link4" {
+ TARGETFILE "textlinktar.h5"
+ TARGETPATH "group/elink_t2"
+ }
+ EXTERNAL_LINK "ext_link5" {
+ TARGETFILE "textlinktar.h5"
+ TARGETPATH "empty_group"
+ GROUP "empty_group" {
+ }
+ }
+ }
+ }
+ EXTERNAL_LINK "elink_t2" {
+ TARGETFILE "textlinksrc.h5"
+ TARGETPATH "/ext_link4"
+ }
+ GROUP "subgroup" {
+ GROUP "link_to_group" {
+ HARDLINK "/group"
+ }
+ }
+ }
+ }
+ EXTERNAL_LINK "ext_link2" {
+ TARGETFILE "textlinktar.h5"
+ TARGETPATH "dset"
+ DATASET "dset" {
+ HARDLINK "/dset"
+ }
+ }
+ EXTERNAL_LINK "ext_link3" {
+ TARGETFILE "textlinktar.h5"
+ TARGETPATH "type"
+ DATATYPE "type" HARDLINK "/type"
+ }
+ EXTERNAL_LINK "ext_link4" {
+ TARGETFILE "textlinktar.h5"
+ TARGETPATH "group/elink_t2"
+ }
+ EXTERNAL_LINK "ext_link5" {
+ TARGETFILE "textlinktar.h5"
+ TARGETPATH "empty_group"
+ GROUP "empty_group" {
+ HARDLINK "/empty_group"
+ }
+ }
+ }
+}
+}
diff --git a/tools/test/h5repack/testfiles/textlinkfar-prune.textlinkfar.h5.ddl b/tools/test/h5repack/testfiles/textlinkfar-prune.textlinkfar.h5.ddl
new file mode 100644
index 0000000..30f8f1b
--- /dev/null
+++ b/tools/test/h5repack/testfiles/textlinkfar-prune.textlinkfar.h5.ddl
@@ -0,0 +1,4 @@
+HDF5 "out-textlinkfar-prune.textlinkfar.h5" {
+GROUP "/" {
+}
+}
diff --git a/tools/test/h5repack/testfiles/textlinksrc-base.textlinksrc.h5.ddl b/tools/test/h5repack/testfiles/textlinksrc-base.textlinksrc.h5.ddl
new file mode 100644
index 0000000..9a9a9aa
--- /dev/null
+++ b/tools/test/h5repack/testfiles/textlinksrc-base.textlinksrc.h5.ddl
@@ -0,0 +1,150 @@
+HDF5 "out-textlinksrc-base.textlinksrc.h5" {
+GROUP "/" {
+ EXTERNAL_LINK "ext2soft_link1" {
+ TARGETFILE "tsoftlinks.h5"
+ TARGETPATH "/soft_dset1"
+ DATASET "/soft_dset1" {
+ DATATYPE H5T_STD_I32BE
+ DATASPACE SIMPLE { ( 4, 2 ) / ( 4, 2 ) }
+ STORAGE_LAYOUT {
+ CONTIGUOUS
+ SIZE 32
+ OFFSET 2848
+ }
+ FILTERS {
+ NONE
+ }
+ FILLVALUE {
+ FILL_TIME H5D_FILL_TIME_IFSET
+ VALUE H5D_FILL_VALUE_DEFAULT
+ }
+ ALLOCATION_TIME {
+ H5D_ALLOC_TIME_LATE
+ }
+ }
+ }
+ EXTERNAL_LINK "ext2softdangle_link1" {
+ TARGETFILE "tsoftlinks.h5"
+ TARGETPATH "/soft_dangle"
+ }
+ EXTERNAL_LINK "ext_link1" {
+ TARGETFILE "textlinktar.h5"
+ TARGETPATH "group"
+ GROUP "group" {
+ DATASET "dset" {
+ DATATYPE H5T_STD_I32LE
+ DATASPACE SIMPLE { ( 6 ) / ( 6 ) }
+ STORAGE_LAYOUT {
+ CONTIGUOUS
+ SIZE 24
+ OFFSET 3136
+ }
+ FILTERS {
+ NONE
+ }
+ FILLVALUE {
+ FILL_TIME H5D_FILL_TIME_IFSET
+ VALUE H5D_FILL_VALUE_DEFAULT
+ }
+ ALLOCATION_TIME {
+ H5D_ALLOC_TIME_LATE
+ }
+ }
+ EXTERNAL_LINK "elink_t1" {
+ TARGETFILE "textlinksrc.h5"
+ TARGETPATH "/"
+ GROUP "/" {
+ EXTERNAL_LINK "ext2soft_link1" {
+ TARGETFILE "tsoftlinks.h5"
+ TARGETPATH "/soft_dset1"
+ DATASET "/soft_dset1" {
+ HARDLINK "/dset1"
+ }
+ }
+ EXTERNAL_LINK "ext2softdangle_link1" {
+ TARGETFILE "tsoftlinks.h5"
+ TARGETPATH "/soft_dangle"
+ }
+ EXTERNAL_LINK "ext_link1" {
+ TARGETFILE "textlinktar.h5"
+ TARGETPATH "group"
+ GROUP "group" {
+ HARDLINK "/group"
+ }
+ }
+ EXTERNAL_LINK "ext_link2" {
+ TARGETFILE "textlinktar.h5"
+ TARGETPATH "dset"
+ DATASET "dset" {
+ DATATYPE H5T_STD_I32LE
+ DATASPACE SIMPLE { ( 6 ) / ( 6 ) }
+ STORAGE_LAYOUT {
+ CONTIGUOUS
+ SIZE 24
+ OFFSET 3160
+ }
+ FILTERS {
+ NONE
+ }
+ FILLVALUE {
+ FILL_TIME H5D_FILL_TIME_IFSET
+ VALUE H5D_FILL_VALUE_DEFAULT
+ }
+ ALLOCATION_TIME {
+ H5D_ALLOC_TIME_LATE
+ }
+ }
+ }
+ EXTERNAL_LINK "ext_link3" {
+ TARGETFILE "textlinktar.h5"
+ TARGETPATH "type"
+ DATATYPE "type" H5T_STD_I32LE;
+ }
+ EXTERNAL_LINK "ext_link4" {
+ TARGETFILE "textlinktar.h5"
+ TARGETPATH "group/elink_t2"
+ }
+ EXTERNAL_LINK "ext_link5" {
+ TARGETFILE "textlinktar.h5"
+ TARGETPATH "empty_group"
+ GROUP "empty_group" {
+ }
+ }
+ }
+ }
+ EXTERNAL_LINK "elink_t2" {
+ TARGETFILE "textlinksrc.h5"
+ TARGETPATH "/ext_link4"
+ }
+ GROUP "subgroup" {
+ GROUP "link_to_group" {
+ HARDLINK "/group"
+ }
+ }
+ }
+ }
+ EXTERNAL_LINK "ext_link2" {
+ TARGETFILE "textlinktar.h5"
+ TARGETPATH "dset"
+ DATASET "dset" {
+ HARDLINK "/dset"
+ }
+ }
+ EXTERNAL_LINK "ext_link3" {
+ TARGETFILE "textlinktar.h5"
+ TARGETPATH "type"
+ DATATYPE "type" HARDLINK "/type"
+ }
+ EXTERNAL_LINK "ext_link4" {
+ TARGETFILE "textlinktar.h5"
+ TARGETPATH "group/elink_t2"
+ }
+ EXTERNAL_LINK "ext_link5" {
+ TARGETFILE "textlinktar.h5"
+ TARGETPATH "empty_group"
+ GROUP "empty_group" {
+ HARDLINK "/empty_group"
+ }
+ }
+}
+}
diff --git a/tools/test/h5repack/testfiles/textlinksrc-merge.textlinksrc.h5.tst b/tools/test/h5repack/testfiles/textlinksrc-merge.textlinksrc.h5.tst
new file mode 100644
index 0000000..d5a5902
--- /dev/null
+++ b/tools/test/h5repack/testfiles/textlinksrc-merge.textlinksrc.h5.tst
@@ -0,0 +1,32 @@
+
+file1 file2
+---------------------------------------
+ x x /
+ x x /ext2soft_link1
+ x x /ext2softdangle_link1
+ x x /ext_link1
+ x /ext_link1/dset
+ x /ext_link1/elink_t1
+ x /ext_link1/elink_t2
+ x /ext_link1/subgroup
+ x /ext_link1/subgroup/link_to_group
+ x x /ext_link2
+ x x /ext_link3
+ x x /ext_link4
+ x x /ext_link5
+
+group : </> and </>
+0 differences found
+Not comparable: </ext2soft_link1> is of type H5G_UDLINK and </ext2soft_link1> is of type H5G_DATASET
+external link: </ext2softdangle_link1> and </ext2softdangle_link1>
+0 differences found
+Not comparable: </ext_link1> is of type H5G_UDLINK and </ext_link1> is of type H5G_GROUP
+Not comparable: </ext_link2> is of type H5G_UDLINK and </ext_link2> is of type H5G_DATASET
+Not comparable: </ext_link3> is of type H5G_UDLINK and </ext_link3> is of type H5G_TYPE
+external link: </ext_link4> and </ext_link4>
+0 differences found
+Not comparable: </ext_link5> is of type H5G_UDLINK and </ext_link5> is of type H5G_GROUP
+--------------------------------
+Some objects are not comparable
+--------------------------------
+Use -c for a list of objects without details of differences.
diff --git a/tools/test/h5repack/testfiles/textlinksrc-mergeprune.textlinksrc.h5.ddl b/tools/test/h5repack/testfiles/textlinksrc-mergeprune.textlinksrc.h5.ddl
new file mode 100644
index 0000000..5b3c740
--- /dev/null
+++ b/tools/test/h5repack/testfiles/textlinksrc-mergeprune.textlinksrc.h5.ddl
@@ -0,0 +1,187 @@
+HDF5 "out-textlinksrc-mergeprune.textlinksrc.h5" {
+GROUP "/" {
+ DATASET "ext2soft_link1" {
+ DATATYPE H5T_STD_I32BE
+ DATASPACE SIMPLE { ( 4, 2 ) / ( 4, 2 ) }
+ STORAGE_LAYOUT {
+ CONTIGUOUS
+ SIZE 32
+ OFFSET 2048
+ }
+ FILTERS {
+ NONE
+ }
+ FILLVALUE {
+ FILL_TIME H5D_FILL_TIME_IFSET
+ VALUE H5D_FILL_VALUE_DEFAULT
+ }
+ ALLOCATION_TIME {
+ H5D_ALLOC_TIME_LATE
+ }
+ }
+ GROUP "ext_link1" {
+ DATASET "dset" {
+ DATATYPE H5T_STD_I32LE
+ DATASPACE SIMPLE { ( 6 ) / ( 6 ) }
+ STORAGE_LAYOUT {
+ CONTIGUOUS
+ SIZE 24
+ OFFSET 2080
+ }
+ FILTERS {
+ NONE
+ }
+ FILLVALUE {
+ FILL_TIME H5D_FILL_TIME_IFSET
+ VALUE H5D_FILL_VALUE_DEFAULT
+ }
+ ALLOCATION_TIME {
+ H5D_ALLOC_TIME_LATE
+ }
+ }
+ EXTERNAL_LINK "elink_t1" {
+ TARGETFILE "textlinksrc.h5"
+ TARGETPATH "/"
+ GROUP "/" {
+ EXTERNAL_LINK "ext2soft_link1" {
+ TARGETFILE "tsoftlinks.h5"
+ TARGETPATH "/soft_dset1"
+ DATASET "/soft_dset1" {
+ DATATYPE H5T_STD_I32BE
+ DATASPACE SIMPLE { ( 4, 2 ) / ( 4, 2 ) }
+ STORAGE_LAYOUT {
+ CONTIGUOUS
+ SIZE 32
+ OFFSET 2848
+ }
+ FILTERS {
+ NONE
+ }
+ FILLVALUE {
+ FILL_TIME H5D_FILL_TIME_IFSET
+ VALUE H5D_FILL_VALUE_DEFAULT
+ }
+ ALLOCATION_TIME {
+ H5D_ALLOC_TIME_LATE
+ }
+ }
+ }
+ EXTERNAL_LINK "ext2softdangle_link1" {
+ TARGETFILE "tsoftlinks.h5"
+ TARGETPATH "/soft_dangle"
+ }
+ EXTERNAL_LINK "ext_link1" {
+ TARGETFILE "textlinktar.h5"
+ TARGETPATH "group"
+ GROUP "group" {
+ DATASET "dset" {
+ DATATYPE H5T_STD_I32LE
+ DATASPACE SIMPLE { ( 6 ) / ( 6 ) }
+ STORAGE_LAYOUT {
+ CONTIGUOUS
+ SIZE 24
+ OFFSET 3136
+ }
+ FILTERS {
+ NONE
+ }
+ FILLVALUE {
+ FILL_TIME H5D_FILL_TIME_IFSET
+ VALUE H5D_FILL_VALUE_DEFAULT
+ }
+ ALLOCATION_TIME {
+ H5D_ALLOC_TIME_LATE
+ }
+ }
+ EXTERNAL_LINK "elink_t1" {
+ TARGETFILE "textlinksrc.h5"
+ TARGETPATH "/"
+ GROUP "/" {
+ HARDLINK "/"
+ }
+ }
+ EXTERNAL_LINK "elink_t2" {
+ TARGETFILE "textlinksrc.h5"
+ TARGETPATH "/ext_link4"
+ }
+ GROUP "subgroup" {
+ GROUP "link_to_group" {
+ HARDLINK "/group"
+ }
+ }
+ }
+ }
+ EXTERNAL_LINK "ext_link2" {
+ TARGETFILE "textlinktar.h5"
+ TARGETPATH "dset"
+ DATASET "dset" {
+ DATATYPE H5T_STD_I32LE
+ DATASPACE SIMPLE { ( 6 ) / ( 6 ) }
+ STORAGE_LAYOUT {
+ CONTIGUOUS
+ SIZE 24
+ OFFSET 3160
+ }
+ FILTERS {
+ NONE
+ }
+ FILLVALUE {
+ FILL_TIME H5D_FILL_TIME_IFSET
+ VALUE H5D_FILL_VALUE_DEFAULT
+ }
+ ALLOCATION_TIME {
+ H5D_ALLOC_TIME_LATE
+ }
+ }
+ }
+ EXTERNAL_LINK "ext_link3" {
+ TARGETFILE "textlinktar.h5"
+ TARGETPATH "type"
+ DATATYPE "type" H5T_STD_I32LE;
+ }
+ EXTERNAL_LINK "ext_link4" {
+ TARGETFILE "textlinktar.h5"
+ TARGETPATH "group/elink_t2"
+ }
+ EXTERNAL_LINK "ext_link5" {
+ TARGETFILE "textlinktar.h5"
+ TARGETPATH "empty_group"
+ GROUP "empty_group" {
+ }
+ }
+ }
+ }
+ EXTERNAL_LINK "elink_t2" {
+ TARGETFILE "textlinksrc.h5"
+ TARGETPATH "/ext_link4"
+ }
+ GROUP "subgroup" {
+ GROUP "link_to_group" {
+ HARDLINK "/ext_link1"
+ }
+ }
+ }
+ DATASET "ext_link2" {
+ DATATYPE H5T_STD_I32LE
+ DATASPACE SIMPLE { ( 6 ) / ( 6 ) }
+ STORAGE_LAYOUT {
+ CONTIGUOUS
+ SIZE 24
+ OFFSET 2104
+ }
+ FILTERS {
+ NONE
+ }
+ FILLVALUE {
+ FILL_TIME H5D_FILL_TIME_IFSET
+ VALUE H5D_FILL_VALUE_DEFAULT
+ }
+ ALLOCATION_TIME {
+ H5D_ALLOC_TIME_LATE
+ }
+ }
+ DATATYPE "ext_link3" H5T_STD_I32LE;
+ GROUP "ext_link5" {
+ }
+}
+}
diff --git a/tools/test/h5repack/testfiles/textlinksrc-prune.textlinksrc.h5.ddl b/tools/test/h5repack/testfiles/textlinksrc-prune.textlinksrc.h5.ddl
new file mode 100644
index 0000000..65d35ef
--- /dev/null
+++ b/tools/test/h5repack/testfiles/textlinksrc-prune.textlinksrc.h5.ddl
@@ -0,0 +1,4 @@
+HDF5 "out-textlinksrc-prune.textlinksrc.h5" {
+GROUP "/" {
+}
+}
diff --git a/tools/test/h5repack/testfiles/textlinktar-base.textlinktar.h5.ddl b/tools/test/h5repack/testfiles/textlinktar-base.textlinktar.h5.ddl
new file mode 100644
index 0000000..3f02ff2
--- /dev/null
+++ b/tools/test/h5repack/testfiles/textlinktar-base.textlinktar.h5.ddl
@@ -0,0 +1,168 @@
+HDF5 "out-textlinktar-base.textlinktar.h5" {
+GROUP "/" {
+ DATASET "dset" {
+ DATATYPE H5T_STD_I32LE
+ DATASPACE SIMPLE { ( 6 ) / ( 6 ) }
+ STORAGE_LAYOUT {
+ CONTIGUOUS
+ SIZE 24
+ OFFSET 2048
+ }
+ FILTERS {
+ NONE
+ }
+ FILLVALUE {
+ FILL_TIME H5D_FILL_TIME_IFSET
+ VALUE H5D_FILL_VALUE_DEFAULT
+ }
+ ALLOCATION_TIME {
+ H5D_ALLOC_TIME_LATE
+ }
+ }
+ GROUP "empty_group" {
+ }
+ GROUP "group" {
+ DATASET "dset" {
+ DATATYPE H5T_STD_I32LE
+ DATASPACE SIMPLE { ( 6 ) / ( 6 ) }
+ STORAGE_LAYOUT {
+ CONTIGUOUS
+ SIZE 24
+ OFFSET 2072
+ }
+ FILTERS {
+ NONE
+ }
+ FILLVALUE {
+ FILL_TIME H5D_FILL_TIME_IFSET
+ VALUE H5D_FILL_VALUE_DEFAULT
+ }
+ ALLOCATION_TIME {
+ H5D_ALLOC_TIME_LATE
+ }
+ }
+ EXTERNAL_LINK "elink_t1" {
+ TARGETFILE "textlinksrc.h5"
+ TARGETPATH "/"
+ GROUP "/" {
+ EXTERNAL_LINK "ext2soft_link1" {
+ TARGETFILE "tsoftlinks.h5"
+ TARGETPATH "/soft_dset1"
+ DATASET "/soft_dset1" {
+ DATATYPE H5T_STD_I32BE
+ DATASPACE SIMPLE { ( 4, 2 ) / ( 4, 2 ) }
+ STORAGE_LAYOUT {
+ CONTIGUOUS
+ SIZE 32
+ OFFSET 2848
+ }
+ FILTERS {
+ NONE
+ }
+ FILLVALUE {
+ FILL_TIME H5D_FILL_TIME_IFSET
+ VALUE H5D_FILL_VALUE_DEFAULT
+ }
+ ALLOCATION_TIME {
+ H5D_ALLOC_TIME_LATE
+ }
+ }
+ }
+ EXTERNAL_LINK "ext2softdangle_link1" {
+ TARGETFILE "tsoftlinks.h5"
+ TARGETPATH "/soft_dangle"
+ }
+ EXTERNAL_LINK "ext_link1" {
+ TARGETFILE "textlinktar.h5"
+ TARGETPATH "group"
+ GROUP "group" {
+ DATASET "dset" {
+ DATATYPE H5T_STD_I32LE
+ DATASPACE SIMPLE { ( 6 ) / ( 6 ) }
+ STORAGE_LAYOUT {
+ CONTIGUOUS
+ SIZE 24
+ OFFSET 3136
+ }
+ FILTERS {
+ NONE
+ }
+ FILLVALUE {
+ FILL_TIME H5D_FILL_TIME_IFSET
+ VALUE H5D_FILL_VALUE_DEFAULT
+ }
+ ALLOCATION_TIME {
+ H5D_ALLOC_TIME_LATE
+ }
+ }
+ EXTERNAL_LINK "elink_t1" {
+ TARGETFILE "textlinksrc.h5"
+ TARGETPATH "/"
+ GROUP "/" {
+ HARDLINK "/"
+ }
+ }
+ EXTERNAL_LINK "elink_t2" {
+ TARGETFILE "textlinksrc.h5"
+ TARGETPATH "/ext_link4"
+ }
+ GROUP "subgroup" {
+ GROUP "link_to_group" {
+ HARDLINK "/group"
+ }
+ }
+ }
+ }
+ EXTERNAL_LINK "ext_link2" {
+ TARGETFILE "textlinktar.h5"
+ TARGETPATH "dset"
+ DATASET "dset" {
+ DATATYPE H5T_STD_I32LE
+ DATASPACE SIMPLE { ( 6 ) / ( 6 ) }
+ STORAGE_LAYOUT {
+ CONTIGUOUS
+ SIZE 24
+ OFFSET 3160
+ }
+ FILTERS {
+ NONE
+ }
+ FILLVALUE {
+ FILL_TIME H5D_FILL_TIME_IFSET
+ VALUE H5D_FILL_VALUE_DEFAULT
+ }
+ ALLOCATION_TIME {
+ H5D_ALLOC_TIME_LATE
+ }
+ }
+ }
+ EXTERNAL_LINK "ext_link3" {
+ TARGETFILE "textlinktar.h5"
+ TARGETPATH "type"
+ DATATYPE "type" H5T_STD_I32LE;
+ }
+ EXTERNAL_LINK "ext_link4" {
+ TARGETFILE "textlinktar.h5"
+ TARGETPATH "group/elink_t2"
+ }
+ EXTERNAL_LINK "ext_link5" {
+ TARGETFILE "textlinktar.h5"
+ TARGETPATH "empty_group"
+ GROUP "empty_group" {
+ }
+ }
+ }
+ }
+ EXTERNAL_LINK "elink_t2" {
+ TARGETFILE "textlinksrc.h5"
+ TARGETPATH "/ext_link4"
+ }
+ GROUP "subgroup" {
+ GROUP "link_to_group" {
+ HARDLINK "/group"
+ }
+ }
+ }
+ DATATYPE "type" H5T_STD_I32LE;
+}
+}
diff --git a/tools/test/h5repack/testfiles/textlinktar-merge.textlinktar.h5.tst b/tools/test/h5repack/testfiles/textlinktar-merge.textlinktar.h5.tst
new file mode 100644
index 0000000..ccf4f7b
--- /dev/null
+++ b/tools/test/h5repack/testfiles/textlinktar-merge.textlinktar.h5.tst
@@ -0,0 +1,44 @@
+
+file1 file2
+---------------------------------------
+ x x /
+ x x /dset
+ x x /empty_group
+ x x /group
+ x x /group/dset
+ x x /group/elink_t1
+ x /group/elink_t1/ext2soft_link1
+ x /group/elink_t1/ext2softdangle_link1
+ x /group/elink_t1/ext_link1
+ x /group/elink_t1/ext_link2
+ x /group/elink_t1/ext_link3
+ x /group/elink_t1/ext_link4
+ x /group/elink_t1/ext_link5
+ x x /group/elink_t2
+ x x /group/subgroup
+ x x /group/subgroup/link_to_group
+ x x /type
+
+group : </> and </>
+0 differences found
+dataset: </dset> and </dset>
+0 differences found
+group : </empty_group> and </empty_group>
+0 differences found
+group : </group> and </group>
+0 differences found
+dataset: </group/dset> and </group/dset>
+0 differences found
+Not comparable: </group/elink_t1> is of type H5G_UDLINK and </group/elink_t1> is of type H5G_GROUP
+external link: </group/elink_t2> and </group/elink_t2>
+0 differences found
+group : </group/subgroup> and </group/subgroup>
+0 differences found
+group : </group/subgroup/link_to_group> and </group/subgroup/link_to_group>
+0 differences found
+datatype: </type> and </type>
+0 differences found
+--------------------------------
+Some objects are not comparable
+--------------------------------
+Use -c for a list of objects without details of differences.
diff --git a/tools/test/h5repack/testfiles/textlinktar-mergeprune.textlinktar.h5.ddl b/tools/test/h5repack/testfiles/textlinktar-mergeprune.textlinktar.h5.ddl
new file mode 100644
index 0000000..c52e34d
--- /dev/null
+++ b/tools/test/h5repack/testfiles/textlinktar-mergeprune.textlinktar.h5.ddl
@@ -0,0 +1,200 @@
+HDF5 "out-textlinktar-mergeprune.textlinktar.h5" {
+GROUP "/" {
+ DATASET "dset" {
+ DATATYPE H5T_STD_I32LE
+ DATASPACE SIMPLE { ( 6 ) / ( 6 ) }
+ STORAGE_LAYOUT {
+ CONTIGUOUS
+ SIZE 24
+ OFFSET 2048
+ }
+ FILTERS {
+ NONE
+ }
+ FILLVALUE {
+ FILL_TIME H5D_FILL_TIME_IFSET
+ VALUE H5D_FILL_VALUE_DEFAULT
+ }
+ ALLOCATION_TIME {
+ H5D_ALLOC_TIME_LATE
+ }
+ }
+ GROUP "empty_group" {
+ }
+ GROUP "group" {
+ DATASET "dset" {
+ DATATYPE H5T_STD_I32LE
+ DATASPACE SIMPLE { ( 6 ) / ( 6 ) }
+ STORAGE_LAYOUT {
+ CONTIGUOUS
+ SIZE 24
+ OFFSET 2072
+ }
+ FILTERS {
+ NONE
+ }
+ FILLVALUE {
+ FILL_TIME H5D_FILL_TIME_IFSET
+ VALUE H5D_FILL_VALUE_DEFAULT
+ }
+ ALLOCATION_TIME {
+ H5D_ALLOC_TIME_LATE
+ }
+ }
+ GROUP "elink_t1" {
+ EXTERNAL_LINK "ext2soft_link1" {
+ TARGETFILE "tsoftlinks.h5"
+ TARGETPATH "/soft_dset1"
+ DATASET "/soft_dset1" {
+ DATATYPE H5T_STD_I32BE
+ DATASPACE SIMPLE { ( 4, 2 ) / ( 4, 2 ) }
+ STORAGE_LAYOUT {
+ CONTIGUOUS
+ SIZE 32
+ OFFSET 2848
+ }
+ FILTERS {
+ NONE
+ }
+ FILLVALUE {
+ FILL_TIME H5D_FILL_TIME_IFSET
+ VALUE H5D_FILL_VALUE_DEFAULT
+ }
+ ALLOCATION_TIME {
+ H5D_ALLOC_TIME_LATE
+ }
+ }
+ }
+ EXTERNAL_LINK "ext2softdangle_link1" {
+ TARGETFILE "tsoftlinks.h5"
+ TARGETPATH "/soft_dangle"
+ }
+ EXTERNAL_LINK "ext_link1" {
+ TARGETFILE "textlinktar.h5"
+ TARGETPATH "group"
+ GROUP "group" {
+ DATASET "dset" {
+ DATATYPE H5T_STD_I32LE
+ DATASPACE SIMPLE { ( 6 ) / ( 6 ) }
+ STORAGE_LAYOUT {
+ CONTIGUOUS
+ SIZE 24
+ OFFSET 3136
+ }
+ FILTERS {
+ NONE
+ }
+ FILLVALUE {
+ FILL_TIME H5D_FILL_TIME_IFSET
+ VALUE H5D_FILL_VALUE_DEFAULT
+ }
+ ALLOCATION_TIME {
+ H5D_ALLOC_TIME_LATE
+ }
+ }
+ EXTERNAL_LINK "elink_t1" {
+ TARGETFILE "textlinksrc.h5"
+ TARGETPATH "/"
+ GROUP "/" {
+ EXTERNAL_LINK "ext2soft_link1" {
+ TARGETFILE "tsoftlinks.h5"
+ TARGETPATH "/soft_dset1"
+ DATASET "/soft_dset1" {
+ HARDLINK "/dset1"
+ }
+ }
+ EXTERNAL_LINK "ext2softdangle_link1" {
+ TARGETFILE "tsoftlinks.h5"
+ TARGETPATH "/soft_dangle"
+ }
+ EXTERNAL_LINK "ext_link1" {
+ TARGETFILE "textlinktar.h5"
+ TARGETPATH "group"
+ GROUP "group" {
+ HARDLINK "/group"
+ }
+ }
+ EXTERNAL_LINK "ext_link2" {
+ TARGETFILE "textlinktar.h5"
+ TARGETPATH "dset"
+ DATASET "dset" {
+ DATATYPE H5T_STD_I32LE
+ DATASPACE SIMPLE { ( 6 ) / ( 6 ) }
+ STORAGE_LAYOUT {
+ CONTIGUOUS
+ SIZE 24
+ OFFSET 3160
+ }
+ FILTERS {
+ NONE
+ }
+ FILLVALUE {
+ FILL_TIME H5D_FILL_TIME_IFSET
+ VALUE H5D_FILL_VALUE_DEFAULT
+ }
+ ALLOCATION_TIME {
+ H5D_ALLOC_TIME_LATE
+ }
+ }
+ }
+ EXTERNAL_LINK "ext_link3" {
+ TARGETFILE "textlinktar.h5"
+ TARGETPATH "type"
+ DATATYPE "type" H5T_STD_I32LE;
+ }
+ EXTERNAL_LINK "ext_link4" {
+ TARGETFILE "textlinktar.h5"
+ TARGETPATH "group/elink_t2"
+ }
+ EXTERNAL_LINK "ext_link5" {
+ TARGETFILE "textlinktar.h5"
+ TARGETPATH "empty_group"
+ GROUP "empty_group" {
+ }
+ }
+ }
+ }
+ EXTERNAL_LINK "elink_t2" {
+ TARGETFILE "textlinksrc.h5"
+ TARGETPATH "/ext_link4"
+ }
+ GROUP "subgroup" {
+ GROUP "link_to_group" {
+ HARDLINK "/group"
+ }
+ }
+ }
+ }
+ EXTERNAL_LINK "ext_link2" {
+ TARGETFILE "textlinktar.h5"
+ TARGETPATH "dset"
+ DATASET "dset" {
+ HARDLINK "/dset"
+ }
+ }
+ EXTERNAL_LINK "ext_link3" {
+ TARGETFILE "textlinktar.h5"
+ TARGETPATH "type"
+ DATATYPE "type" HARDLINK "/type"
+ }
+ EXTERNAL_LINK "ext_link4" {
+ TARGETFILE "textlinktar.h5"
+ TARGETPATH "group/elink_t2"
+ }
+ EXTERNAL_LINK "ext_link5" {
+ TARGETFILE "textlinktar.h5"
+ TARGETPATH "empty_group"
+ GROUP "empty_group" {
+ HARDLINK "/empty_group"
+ }
+ }
+ }
+ GROUP "subgroup" {
+ GROUP "link_to_group" {
+ HARDLINK "/group"
+ }
+ }
+ }
+ DATATYPE "type" H5T_STD_I32LE;
+}
+}
diff --git a/tools/test/h5repack/testfiles/textlinktar-prune.textlinktar.h5.ddl b/tools/test/h5repack/testfiles/textlinktar-prune.textlinktar.h5.ddl
new file mode 100644
index 0000000..6787784
--- /dev/null
+++ b/tools/test/h5repack/testfiles/textlinktar-prune.textlinktar.h5.ddl
@@ -0,0 +1,52 @@
+HDF5 "out-textlinktar-prune.textlinktar.h5" {
+GROUP "/" {
+ DATASET "dset" {
+ DATATYPE H5T_STD_I32LE
+ DATASPACE SIMPLE { ( 6 ) / ( 6 ) }
+ STORAGE_LAYOUT {
+ CONTIGUOUS
+ SIZE 24
+ OFFSET 2048
+ }
+ FILTERS {
+ NONE
+ }
+ FILLVALUE {
+ FILL_TIME H5D_FILL_TIME_IFSET
+ VALUE H5D_FILL_VALUE_DEFAULT
+ }
+ ALLOCATION_TIME {
+ H5D_ALLOC_TIME_LATE
+ }
+ }
+ GROUP "empty_group" {
+ }
+ GROUP "group" {
+ DATASET "dset" {
+ DATATYPE H5T_STD_I32LE
+ DATASPACE SIMPLE { ( 6 ) / ( 6 ) }
+ STORAGE_LAYOUT {
+ CONTIGUOUS
+ SIZE 24
+ OFFSET 2072
+ }
+ FILTERS {
+ NONE
+ }
+ FILLVALUE {
+ FILL_TIME H5D_FILL_TIME_IFSET
+ VALUE H5D_FILL_VALUE_DEFAULT
+ }
+ ALLOCATION_TIME {
+ H5D_ALLOC_TIME_LATE
+ }
+ }
+ GROUP "subgroup" {
+ GROUP "link_to_group" {
+ HARDLINK "/group"
+ }
+ }
+ }
+ DATATYPE "type" H5T_STD_I32LE;
+}
+}
diff --git a/tools/test/h5repack/testfiles/tsoftlinks-base.tsoftlinks.h5.ddl b/tools/test/h5repack/testfiles/tsoftlinks-base.tsoftlinks.h5.ddl
new file mode 100644
index 0000000..b0cd32d
--- /dev/null
+++ b/tools/test/h5repack/testfiles/tsoftlinks-base.tsoftlinks.h5.ddl
@@ -0,0 +1,77 @@
+HDF5 "out-tsoftlinks-base.tsoftlinks.h5" {
+GROUP "/" {
+ DATASET "dset1" {
+ DATATYPE H5T_STD_I32BE
+ DATASPACE SIMPLE { ( 4, 2 ) / ( 4, 2 ) }
+ STORAGE_LAYOUT {
+ CONTIGUOUS
+ SIZE 32
+ OFFSET 2048
+ }
+ FILTERS {
+ NONE
+ }
+ FILLVALUE {
+ FILL_TIME H5D_FILL_TIME_IFSET
+ VALUE H5D_FILL_VALUE_DEFAULT
+ }
+ ALLOCATION_TIME {
+ H5D_ALLOC_TIME_LATE
+ }
+ }
+ DATASET "dset2" {
+ DATATYPE H5T_STD_I32BE
+ DATASPACE SIMPLE { ( 4, 2 ) / ( 4, 2 ) }
+ STORAGE_LAYOUT {
+ CONTIGUOUS
+ SIZE 32
+ OFFSET 2080
+ }
+ FILTERS {
+ NONE
+ }
+ FILLVALUE {
+ FILL_TIME H5D_FILL_TIME_IFSET
+ VALUE H5D_FILL_VALUE_DEFAULT
+ }
+ ALLOCATION_TIME {
+ H5D_ALLOC_TIME_LATE
+ }
+ }
+ DATATYPE "dtype" H5T_STD_I32BE;
+ GROUP "group1" {
+ SOFTLINK "soft_dangle" {
+ LINKTARGET "not_yet"
+ }
+ SOFTLINK "soft_dset1" {
+ LINKTARGET "/dset1"
+ }
+ SOFTLINK "soft_dset2" {
+ LINKTARGET "/dset2"
+ }
+ SOFTLINK "soft_dtype" {
+ LINKTARGET "/dtype"
+ }
+ SOFTLINK "soft_empty_grp" {
+ LINKTARGET "/group_empty"
+ }
+ }
+ GROUP "group_empty" {
+ }
+ SOFTLINK "soft_dangle" {
+ LINKTARGET "not_yet"
+ }
+ SOFTLINK "soft_dset1" {
+ LINKTARGET "/dset1"
+ }
+ SOFTLINK "soft_dtype" {
+ LINKTARGET "/dtype"
+ }
+ SOFTLINK "soft_empty_grp" {
+ LINKTARGET "/group_empty"
+ }
+ SOFTLINK "soft_group1" {
+ LINKTARGET "/group1"
+ }
+}
+}
diff --git a/tools/test/h5repack/testfiles/tsoftlinks-merge.tsoftlinks.h5.tst b/tools/test/h5repack/testfiles/tsoftlinks-merge.tsoftlinks.h5.tst
new file mode 100644
index 0000000..27c33d7
--- /dev/null
+++ b/tools/test/h5repack/testfiles/tsoftlinks-merge.tsoftlinks.h5.tst
@@ -0,0 +1,53 @@
+
+file1 file2
+---------------------------------------
+ x x /
+ x x /dset1
+ x x /dset2
+ x x /dtype
+ x x /group1
+ x x /group1/soft_dangle
+ x x /group1/soft_dset1
+ x x /group1/soft_dset2
+ x x /group1/soft_dtype
+ x x /group1/soft_empty_grp
+ x x /group_empty
+ x x /soft_dangle
+ x x /soft_dset1
+ x x /soft_dtype
+ x x /soft_empty_grp
+ x x /soft_group1
+ x /soft_group1/soft_dangle
+ x /soft_group1/soft_dset1
+ x /soft_group1/soft_dset2
+ x /soft_group1/soft_dtype
+ x /soft_group1/soft_empty_grp
+
+group : </> and </>
+0 differences found
+dataset: </dset1> and </dset1>
+0 differences found
+dataset: </dset2> and </dset2>
+0 differences found
+datatype: </dtype> and </dtype>
+0 differences found
+group : </group1> and </group1>
+0 differences found
+link : </group1/soft_dangle> and </group1/soft_dangle>
+0 differences found
+Not comparable: </group1/soft_dset1> is of type H5G_LINK and </group1/soft_dset1> is of type H5G_DATASET
+Not comparable: </group1/soft_dset2> is of type H5G_LINK and </group1/soft_dset2> is of type H5G_DATASET
+Not comparable: </group1/soft_dtype> is of type H5G_LINK and </group1/soft_dtype> is of type H5G_TYPE
+Not comparable: </group1/soft_empty_grp> is of type H5G_LINK and </group1/soft_empty_grp> is of type H5G_GROUP
+group : </group_empty> and </group_empty>
+0 differences found
+link : </soft_dangle> and </soft_dangle>
+0 differences found
+Not comparable: </soft_dset1> is of type H5G_LINK and </soft_dset1> is of type H5G_DATASET
+Not comparable: </soft_dtype> is of type H5G_LINK and </soft_dtype> is of type H5G_TYPE
+Not comparable: </soft_empty_grp> is of type H5G_LINK and </soft_empty_grp> is of type H5G_GROUP
+Not comparable: </soft_group1> is of type H5G_LINK and </soft_group1> is of type H5G_GROUP
+--------------------------------
+Some objects are not comparable
+--------------------------------
+Use -c for a list of objects without details of differences.
diff --git a/tools/test/h5repack/testfiles/tsoftlinks-mergeprune.tsoftlinks.h5.ddl b/tools/test/h5repack/testfiles/tsoftlinks-mergeprune.tsoftlinks.h5.ddl
new file mode 100644
index 0000000..fa4e12d
--- /dev/null
+++ b/tools/test/h5repack/testfiles/tsoftlinks-mergeprune.tsoftlinks.h5.ddl
@@ -0,0 +1,127 @@
+HDF5 "out-tsoftlinks-mergeprune.tsoftlinks.h5" {
+GROUP "/" {
+ DATASET "dset1" {
+ DATATYPE H5T_STD_I32BE
+ DATASPACE SIMPLE { ( 4, 2 ) / ( 4, 2 ) }
+ STORAGE_LAYOUT {
+ CONTIGUOUS
+ SIZE 32
+ OFFSET 2048
+ }
+ FILTERS {
+ NONE
+ }
+ FILLVALUE {
+ FILL_TIME H5D_FILL_TIME_IFSET
+ VALUE H5D_FILL_VALUE_DEFAULT
+ }
+ ALLOCATION_TIME {
+ H5D_ALLOC_TIME_LATE
+ }
+ }
+ DATASET "dset2" {
+ DATATYPE H5T_STD_I32BE
+ DATASPACE SIMPLE { ( 4, 2 ) / ( 4, 2 ) }
+ STORAGE_LAYOUT {
+ CONTIGUOUS
+ SIZE 32
+ OFFSET 2080
+ }
+ FILTERS {
+ NONE
+ }
+ FILLVALUE {
+ FILL_TIME H5D_FILL_TIME_IFSET
+ VALUE H5D_FILL_VALUE_DEFAULT
+ }
+ ALLOCATION_TIME {
+ H5D_ALLOC_TIME_LATE
+ }
+ }
+ DATATYPE "dtype" H5T_STD_I32BE;
+ GROUP "group1" {
+ DATASET "soft_dset1" {
+ DATATYPE H5T_STD_I32BE
+ DATASPACE SIMPLE { ( 4, 2 ) / ( 4, 2 ) }
+ STORAGE_LAYOUT {
+ CONTIGUOUS
+ SIZE 32
+ OFFSET 2112
+ }
+ FILTERS {
+ NONE
+ }
+ FILLVALUE {
+ FILL_TIME H5D_FILL_TIME_IFSET
+ VALUE H5D_FILL_VALUE_DEFAULT
+ }
+ ALLOCATION_TIME {
+ H5D_ALLOC_TIME_LATE
+ }
+ }
+ DATASET "soft_dset2" {
+ DATATYPE H5T_STD_I32BE
+ DATASPACE SIMPLE { ( 4, 2 ) / ( 4, 2 ) }
+ STORAGE_LAYOUT {
+ CONTIGUOUS
+ SIZE 32
+ OFFSET 2144
+ }
+ FILTERS {
+ NONE
+ }
+ FILLVALUE {
+ FILL_TIME H5D_FILL_TIME_IFSET
+ VALUE H5D_FILL_VALUE_DEFAULT
+ }
+ ALLOCATION_TIME {
+ H5D_ALLOC_TIME_LATE
+ }
+ }
+ DATATYPE "soft_dtype" H5T_STD_I32BE;
+ GROUP "soft_empty_grp" {
+ }
+ }
+ GROUP "group_empty" {
+ }
+ DATASET "soft_dset1" {
+ DATATYPE H5T_STD_I32BE
+ DATASPACE SIMPLE { ( 4, 2 ) / ( 4, 2 ) }
+ STORAGE_LAYOUT {
+ CONTIGUOUS
+ SIZE 32
+ OFFSET 2176
+ }
+ FILTERS {
+ NONE
+ }
+ FILLVALUE {
+ FILL_TIME H5D_FILL_TIME_IFSET
+ VALUE H5D_FILL_VALUE_DEFAULT
+ }
+ ALLOCATION_TIME {
+ H5D_ALLOC_TIME_LATE
+ }
+ }
+ DATATYPE "soft_dtype" H5T_STD_I32BE;
+ GROUP "soft_empty_grp" {
+ }
+ GROUP "soft_group1" {
+ SOFTLINK "soft_dangle" {
+ LINKTARGET "not_yet"
+ }
+ SOFTLINK "soft_dset1" {
+ LINKTARGET "/dset1"
+ }
+ SOFTLINK "soft_dset2" {
+ LINKTARGET "/dset2"
+ }
+ SOFTLINK "soft_dtype" {
+ LINKTARGET "/dtype"
+ }
+ SOFTLINK "soft_empty_grp" {
+ LINKTARGET "/group_empty"
+ }
+ }
+}
+}
diff --git a/tools/test/h5repack/testfiles/tsoftlinks-prune.tsoftlinks.h5.ddl b/tools/test/h5repack/testfiles/tsoftlinks-prune.tsoftlinks.h5.ddl
new file mode 100644
index 0000000..de58ef2
--- /dev/null
+++ b/tools/test/h5repack/testfiles/tsoftlinks-prune.tsoftlinks.h5.ddl
@@ -0,0 +1,47 @@
+HDF5 "out-tsoftlinks-prune.tsoftlinks.h5" {
+GROUP "/" {
+ DATASET "dset1" {
+ DATATYPE H5T_STD_I32BE
+ DATASPACE SIMPLE { ( 4, 2 ) / ( 4, 2 ) }
+ STORAGE_LAYOUT {
+ CONTIGUOUS
+ SIZE 32
+ OFFSET 2048
+ }
+ FILTERS {
+ NONE
+ }
+ FILLVALUE {
+ FILL_TIME H5D_FILL_TIME_IFSET
+ VALUE H5D_FILL_VALUE_DEFAULT
+ }
+ ALLOCATION_TIME {
+ H5D_ALLOC_TIME_LATE
+ }
+ }
+ DATASET "dset2" {
+ DATATYPE H5T_STD_I32BE
+ DATASPACE SIMPLE { ( 4, 2 ) / ( 4, 2 ) }
+ STORAGE_LAYOUT {
+ CONTIGUOUS
+ SIZE 32
+ OFFSET 2080
+ }
+ FILTERS {
+ NONE
+ }
+ FILLVALUE {
+ FILL_TIME H5D_FILL_TIME_IFSET
+ VALUE H5D_FILL_VALUE_DEFAULT
+ }
+ ALLOCATION_TIME {
+ H5D_ALLOC_TIME_LATE
+ }
+ }
+ DATATYPE "dtype" H5T_STD_I32BE;
+ GROUP "group1" {
+ }
+ GROUP "group_empty" {
+ }
+}
+}
diff --git a/tools/test/misc/h5perf_gentest.c b/tools/test/misc/h5perf_gentest.c
index f50e5fb..511a9e2 100644
--- a/tools/test/misc/h5perf_gentest.c
+++ b/tools/test/misc/h5perf_gentest.c
@@ -14,7 +14,7 @@
creates a large number of attributes, groups, and datasets by specifying
-a, -g, -d options respectively. Using "-h" option to see details.
- Programmer: Peter Cao <xcao@hdfgroup.org>, Jan. 2013
+ Programmer: Peter Cao, Jan. 2013
****************************************************************************/
#include "hdf5.h"
@@ -128,7 +128,7 @@ int main (int argc, char *argv[])
Return: Non-negative on success/Negative on failure
- Programmer: Peter Cao <xcao@hdfgroup.org>, Jan. 2013
+ Programmer: Peter Cao, Jan. 2013
****************************************************************************/
herr_t create_perf_test_file(const char *fname, int ngrps, int ndsets,
int nattrs, hsize_t nrows, hsize_t dim0, hsize_t chunk, int vlen,
diff --git a/tools/test/misc/h5repart_gentest.c b/tools/test/misc/h5repart_gentest.c
index bd94104..520069f 100644
--- a/tools/test/misc/h5repart_gentest.c
+++ b/tools/test/misc/h5repart_gentest.c
@@ -12,7 +12,7 @@
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/*
- * Programmer: Raymond Lu<slu@ncsa.uiuc.edu>
+ * Programmer: Raymond Lu
* June 1, 2005
*
* Purpose: Generate a family file of 1024 bytes for each member
diff --git a/tools/test/misc/testfiles/h5mkgrp_version.txt.in b/tools/test/misc/testfiles/h5mkgrp_version.txt.in
index 75c13a5..37dbabd 100644
--- a/tools/test/misc/testfiles/h5mkgrp_version.txt.in
+++ b/tools/test/misc/testfiles/h5mkgrp_version.txt.in
@@ -1 +1 @@
-h5mkgrp: Version @HDF5_PACKAGE_VERSION_STRING@
+h5mkgrp: Version @HDF5_RELEASE_VERSION_STRING@
diff --git a/tools/test/misc/testh5mkgrp.sh.in b/tools/test/misc/testh5mkgrp.sh.in
index 3ad1f71..7dc8155 100644
--- a/tools/test/misc/testh5mkgrp.sh.in
+++ b/tools/test/misc/testh5mkgrp.sh.in
@@ -13,7 +13,7 @@
#
# Tests for the h5mkgrp tool
#
-# Quincey Koziol (koziol@hdfgroup.org)
+# Quincey Koziol
# Tuesday, February 13, 2007
#
@@ -150,10 +150,11 @@ TOOLTEST()
{
TESTING $H5MKGRP $@
(
- cd $TESTDIR
- $RUNSERIAL $H5MKGRP_BIN $@
+ cd $TESTDIR
+ $RUNSERIAL $H5MKGRP_BIN $@
) > output.out
RET=$?
+
if [ $RET != 0 ]; then
echo "*FAILED*"
echo "failed result is:"
@@ -164,7 +165,7 @@ TOOLTEST()
# Clean up output file
if test -z "$HDF5_NOCLEANUP"; then
- rm -f output.out
+ rm -f output.out
fi
fi
}
@@ -181,8 +182,8 @@ H5LSTEST()
# any unexpected output from that stream too.
VERIFY_H5LS $@
(
- cd $TESTDIR
- $RUNSERIAL $H5LS_BIN $H5LS_ARGS $@
+ cd $TESTDIR
+ $RUNSERIAL $H5LS_BIN $H5LS_ARGS $@
) 2>&1 |sed 's/Modified:.*/Modified: XXXX-XX-XX XX:XX:XX XXX/' >$actual
# save actual in case it is needed later.
@@ -190,25 +191,25 @@ H5LSTEST()
STDOUT_FILTER $actual
STDERR_FILTER $actual
- if [ ! -f $expect ]; then
- # Create the expect file if it doesn't yet exist.
- echo " CREATED"
- cp $actual $expect
- echo " Expected result (*.ls) missing"
- nerrors="`expr $nerrors + 1`"
- elif $CMP $expect $actual; then
- echo " PASSED"
- else
- echo "*FAILED*"
- echo " Expected result (*.ls) differs from actual result (*.out)"
- nerrors="`expr $nerrors + 1`"
- test yes = "$verbose" && $DIFF $expect $actual |sed 's/^/ /'
- fi
-
- # Clean up output file
- if test -z "$HDF5_NOCLEANUP"; then
- rm -f $actual $actual_sav
- fi
+ if [ ! -f $expect ]; then
+ # Create the expect file if it doesn't yet exist.
+ echo " CREATED"
+ cp $actual $expect
+ echo " Expected result (*.ls) missing"
+ nerrors="`expr $nerrors + 1`"
+ elif $CMP $expect $actual; then
+ echo " PASSED"
+ else
+ echo "*FAILED*"
+ echo " Expected result (*.ls) differs from actual result (*.out)"
+ nerrors="`expr $nerrors + 1`"
+ test yes = "$verbose" && $DIFF $expect $actual |sed 's/^/ /'
+ fi
+
+ # Clean up output file
+ if test -z "$HDF5_NOCLEANUP"; then
+ rm -f $actual $actual_sav
+ fi
}
# Single run of tool
@@ -258,30 +259,30 @@ CMPTEST()
# any unexpected output from that stream too.
TESTING $H5MKGRP $@
(
- cd $TESTDIR
- $RUNSERIAL $H5MKGRP_BIN $@
+ cd $TESTDIR
+ $RUNSERIAL $H5MKGRP_BIN $@
) >$actual 2>$actual_err
cat $actual_err >> $actual
- if [ ! -f $expect ]; then
- # Create the expect file if it doesn't yet exist.
- echo " CREATED"
- cp $actual $expect
- echo " Expected result (*.txt) missing"
- nerrors="`expr $nerrors + 1`"
- elif $CMP $expect $actual; then
- echo " PASSED"
- else
- echo "*FAILED*"
- echo " Expected result (*.txt) differs from actual result (*.out)"
- nerrors="`expr $nerrors + 1`"
- test yes = "$verbose" && $DIFF $expect $actual |sed 's/^/ /'
- fi
-
- # Clean up output file
- if test -z "$HDF5_NOCLEANUP"; then
- rm -f $actual $actual_err
- fi
+ if [ ! -f $expect ]; then
+ # Create the expect file if it doesn't yet exist.
+ echo " CREATED"
+ cp $actual $expect
+ echo " Expected result (*.txt) missing"
+ nerrors="`expr $nerrors + 1`"
+ elif $CMP $expect $actual; then
+ echo " PASSED"
+ else
+ echo "*FAILED*"
+ echo " Expected result (*.txt) differs from actual result (*.out)"
+ nerrors="`expr $nerrors + 1`"
+ test yes = "$verbose" && $DIFF $expect $actual |sed 's/^/ /'
+ fi
+
+ # Clean up output file
+ if test -z "$HDF5_NOCLEANUP"; then
+ rm -f $actual $actual_err
+ fi
}
##############################################################################
diff --git a/tools/test/perform/CMakeLists.txt b/tools/test/perform/CMakeLists.txt
index 6780c06..3c45e85 100644
--- a/tools/test/perform/CMakeLists.txt
+++ b/tools/test/perform/CMakeLists.txt
@@ -78,7 +78,7 @@ set (chunk_cache_SOURCES
${HDF5_TOOLS_TEST_PERFORM_SOURCE_DIR}/chunk_cache.c
)
add_executable (chunk_cache ${chunk_cache_SOURCES})
-target_include_directories (chunk_cache PRIVATE "${HDF5_SRC_DIR};${HDF5_BINARY_DIR};$<$<BOOL:${HDF5_ENABLE_PARALLEL}>:${MPI_C_INCLUDE_DIRS}>")
+target_include_directories (chunk_cache PRIVATE "${HDF5_TEST_SRC_DIR};${HDF5_SRC_DIR};${HDF5_BINARY_DIR};$<$<BOOL:${HDF5_ENABLE_PARALLEL}>:${MPI_C_INCLUDE_DIRS}>")
if (NOT BUILD_SHARED_LIBS)
TARGET_C_PROPERTIES (chunk_cache STATIC)
target_link_libraries (chunk_cache PRIVATE ${HDF5_TOOLS_LIB_TARGET} ${HDF5_LIB_TARGET})
diff --git a/tools/test/perform/chunk.c b/tools/test/perform/chunk.c
index 3603c9b..bd16e1d 100644
--- a/tools/test/perform/chunk.c
+++ b/tools/test/perform/chunk.c
@@ -12,7 +12,7 @@
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/*
- * Programmer: Robb Matzke <robb@arborea.spizella.com>
+ * Programmer: Robb Matzke
* Thursday, May 14, 1998
*
* Purpose: Checks the effect of various I/O request sizes and raw data
diff --git a/tools/test/perform/chunk_cache.c b/tools/test/perform/chunk_cache.c
index e594e34..d7c56af 100644
--- a/tools/test/perform/chunk_cache.c
+++ b/tools/test/perform/chunk_cache.c
@@ -19,6 +19,7 @@
*/
#include "hdf5.h"
#include "H5private.h"
+#include "h5test.h"
#define FILENAME "chunk_cache_perf.h5"
@@ -79,18 +80,6 @@ counter (unsigned H5_ATTR_UNUSED flags, size_t H5_ATTR_UNUSED cd_nelmts,
}
/*---------------------------------------------------------------------------*/
-static double retrieve_time(void)
-{
-#ifdef H5_HAVE_GETTIMEOFDAY
- struct timeval t;
- HDgettimeofday(&t, NULL);
- return ((double)t.tv_sec + (double)t.tv_usec / 1000000);
-#else
- return 0.0;
-#endif
-}
-
-/*---------------------------------------------------------------------------*/
static void
cleanup (void)
{
@@ -110,8 +99,7 @@ static int create_dset1(hid_t file)
hid_t dcpl = H5I_INVALID_HID;
hsize_t dims[RANK] = {DSET1_DIM1, DSET1_DIM2};
hsize_t chunk_dims[RANK] = {CHUNK1_DIM1, CHUNK1_DIM2};
- int data[DSET1_DIM1][DSET1_DIM2]; /* data for writing */
- int i, j;
+ int **data; /* data for writing */
/* Create the data space. */
if((dataspace = H5Screate_simple (RANK, dims, NULL)) < 0)
@@ -135,9 +123,10 @@ static int create_dset1(hid_t file)
H5P_DEFAULT, dcpl, H5P_DEFAULT)) < 0)
goto error;
- for (i = 0; i < DSET1_DIM1; i++)
- for (j = 0; j < DSET1_DIM2; j++)
- data[i][j] = i+j;
+ /* Create & fill array */
+ H5TEST_ALLOCATE_2D_ARRAY(data, int, DSET1_DIM1, DSET1_DIM2);
+ H5TEST_FILL_2D_ARRAY(data, int, DSET1_DIM1, DSET1_DIM2);
+
/* Write data to dataset */
if(H5Dwrite (dataset, H5T_NATIVE_INT, H5S_ALL, H5S_ALL,
@@ -171,17 +160,16 @@ static int create_dset2(hid_t file)
hid_t dcpl = H5I_INVALID_HID;
hsize_t dims[RANK] = {DSET2_DIM1, DSET2_DIM2};
hsize_t chunk_dims[RANK] = {CHUNK2_DIM1, CHUNK2_DIM2};
- int data[DSET2_DIM1][DSET2_DIM2]; /* data for writing */
- int i, j;
+ int **data; /* data for writing */
/* Create the data space. */
- if((dataspace = H5Screate_simple (RANK, dims, NULL)) < 0)
+ if((dataspace = H5Screate_simple(RANK, dims, NULL)) < 0)
goto error;
/* Modify dataset creation properties, i.e. enable chunking */
- if((dcpl = H5Pcreate (H5P_DATASET_CREATE)) < 0)
+ if((dcpl = H5Pcreate(H5P_DATASET_CREATE)) < 0)
goto error;
- if(H5Pset_chunk (dcpl, RANK, chunk_dims) < 0)
+ if(H5Pset_chunk(dcpl, RANK, chunk_dims) < 0)
goto error;
/* Set the dummy filter simply for counting the number of bytes being read into the memory */
@@ -191,35 +179,35 @@ static int create_dset2(hid_t file)
goto error;
/* Create a new dataset within the file using chunk creation properties. */
- if((dataset = H5Dcreate2 (file, DSET2_NAME, H5T_NATIVE_INT, dataspace,
+ if((dataset = H5Dcreate2(file, DSET2_NAME, H5T_NATIVE_INT, dataspace,
H5P_DEFAULT, dcpl, H5P_DEFAULT)) < 0)
goto error;
- for (i = 0; i < DSET2_DIM1; i++)
- for (j = 0; j < DSET2_DIM2; j++)
- data[i][j] = i+j;
+ /* Create & fill array */
+ H5TEST_ALLOCATE_2D_ARRAY(data, int, DSET2_DIM1, DSET2_DIM2);
+ H5TEST_FILL_2D_ARRAY(data, int, DSET2_DIM1, DSET2_DIM2);
/* Write data to dataset */
- if(H5Dwrite (dataset, H5T_NATIVE_INT, H5S_ALL, H5S_ALL,
- H5P_DEFAULT, data) < 0)
+ if(H5Dwrite(dataset, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, data) < 0)
goto error;
/* Close resources */
- H5Dclose (dataset);
- H5Pclose (dcpl);
- H5Sclose (dataspace);
+ H5Dclose(dataset);
+ H5Pclose(dcpl);
+ H5Sclose(dataspace);
return 0;
error:
H5E_BEGIN_TRY {
- H5Dclose (dataset);
- H5Pclose (dcpl);
- H5Sclose (dataspace);
+ H5Dclose(dataset);
+ H5Pclose(dcpl);
+ H5Sclose(dataspace);
} H5E_END_TRY;
return 1;
}
+
/*---------------------------------------------------------------------------
* Check the performance of the chunk cache when partial chunks exist
* along the dataset dimensions.
@@ -253,7 +241,7 @@ static int check_partial_chunks_perf(hid_t file)
nbytes_global = 0;
- start_t = retrieve_time();
+ start_t = H5_get_time();
/* Read the data row by row */
for(i = 0; i < DSET1_DIM1; i++) {
@@ -267,13 +255,12 @@ static int check_partial_chunks_perf(hid_t file)
goto error;
}
- end_t = retrieve_time();
+ end_t = H5_get_time();
-#ifdef H5_HAVE_GETTIMEOFDAY
- printf("1. Partial chunks: total read time is %lf; number of bytes being read from file is %lu\n", (end_t -start_t), nbytes_global);
-#else
- printf("1. Partial chunks: no total read time because gettimeofday() is not available; number of bytes being read from file is %lu\n", nbytes_global);
-#endif
+ if((end_t - start_t) > (double)0.0f)
+ printf("1. Partial chunks: total read time is %lf; number of bytes being read from file is %lu\n", (end_t -start_t), nbytes_global);
+ else
+ printf("1. Partial chunks: no total read time because timer is not available; number of bytes being read from file is %lu\n", nbytes_global);
H5Dclose (dataset);
H5Sclose (filespace);
@@ -328,7 +315,7 @@ static int check_hash_value_perf(hid_t file)
nbytes_global = 0;
- start_t = retrieve_time();
+ start_t = H5_get_time();
/* Read the data column by column */
for(i = 0; i < DSET2_DIM2; i++) {
@@ -342,13 +329,12 @@ static int check_hash_value_perf(hid_t file)
goto error;
}
- end_t = retrieve_time();
+ end_t = H5_get_time();
-#ifdef H5_HAVE_GETTIMEOFDAY
- printf("2. Hash value: total read time is %lf; number of bytes being read from file is %lu\n", (end_t -start_t), nbytes_global);
-#else
- printf("2. Hash value: no total read time because gettimeofday() is not available; number of bytes being read from file is %lu\n", nbytes_global);
-#endif
+ if((end_t - start_t) > (double)0.0f)
+ printf("2. Hash value: total read time is %lf; number of bytes being read from file is %lu\n", (end_t -start_t), nbytes_global);
+ else
+ printf("2. Hash value: no total read time because timer is not available; number of bytes being read from file is %lu\n", nbytes_global);
H5Dclose (dataset);
H5Sclose (filespace);
diff --git a/tools/test/perform/iopipe.c b/tools/test/perform/iopipe.c
index bf4728d..bb74a1b 100644
--- a/tools/test/perform/iopipe.c
+++ b/tools/test/perform/iopipe.c
@@ -12,7 +12,7 @@
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/*
- * Programmer: Robb Matzke <matzke@llnl.gov>
+ * Programmer: Robb Matzke
* Thursday, March 12, 1998
*/
@@ -21,10 +21,6 @@
#include "H5private.h"
-#ifdef H5_HAVE_SYS_TIMEB
-#include <sys/timeb.h>
-#endif
-
#define RAW_FILE_NAME "iopipe.raw"
#define HDF5_FILE_NAME "iopipe.h5"
@@ -56,25 +52,18 @@
* Programmer: Robb Matzke
* Thursday, March 12, 1998
*
- * Modifications:
- *
*-------------------------------------------------------------------------
*/
-#ifdef H5_HAVE_GETRUSAGE
static void
-print_stats (const char *prefix,
+print_stats(const char *prefix,
+#ifdef H5_HAVE_GETRUSAGE
struct rusage *r_start, struct rusage *r_stop,
- struct timeval *t_start, struct timeval *t_stop,
- size_t nbytes)
-#else /* H5_HAVE_GETRUSAGE */
-static void
-print_stats (const char *prefix,
- struct timeval *r_start, struct timeval *r_stop,
- struct timeval *t_start, struct timeval *t_stop,
- size_t nbytes)
#endif /* H5_HAVE_GETRUSAGE */
+ double t_start, double t_stop,
+ size_t nbytes)
{
- double e_time, bw;
+ double e_time;
+ char bw[16];
#ifdef H5_HAVE_GETRUSAGE
double u_time, s_time;
@@ -88,27 +77,16 @@ print_stats (const char *prefix,
((double)(r_start->ru_stime.tv_sec)+
(double)(r_start->ru_stime.tv_usec)/(double)1000000.0F);
#endif
-#ifndef H5_HAVE_SYS_TIMEB
- e_time = ((double)(t_stop->tv_sec)+
- (double)(t_stop->tv_usec)/(double)1000000.0F) -
- ((double)(t_start->tv_sec)+
- (double)(t_start->tv_usec)/(double)1000000.0F);
-#else
- e_time = ((double)(t_stop->tv_sec)+
- (double)(t_stop->tv_usec)/(double)1000.0F) -
- ((double)(t_start->tv_sec)+
- (double)(t_start->tv_usec)/(double)1000.0F);
-#endif
- bw = (double)nbytes / e_time;
+ e_time = t_stop - t_start;
+ H5_bandwidth(bw, (double)nbytes, e_time);
#ifdef H5_HAVE_GETRUSAGE
- printf (HEADING "%1.2fuser %1.2fsystem %1.2felapsed %1.2fMB/s\n",
- prefix, u_time, s_time, e_time, bw/(1024*1024));
+ HDprintf(HEADING "%1.2fuser %1.2fsystem %1.2felapsed %s\n",
+ prefix, u_time, s_time, e_time, bw);
#else
- printf (HEADING "%1.2felapsed %1.2fMB/s\n",
- prefix, e_time, bw/(1024*1024));
+ HDprintf(HEADING "%1.2felapsed %s\n",
+ prefix, e_time, bw);
#endif
-
}
@@ -122,12 +100,10 @@ print_stats (const char *prefix,
* Programmer: Robb Matzke
* Thursday, March 12, 1998
*
- * Modifications:
- *
*-------------------------------------------------------------------------
*/
static void
-synchronize (void)
+synchronize(void)
{
#ifdef H5_HAVE_SYSTEM
#if defined(H5_HAVE_WIN32_API) && ! defined(__CYGWIN__)
@@ -157,24 +133,20 @@ synchronize (void)
* Programmer: Robb Matzke
* Thursday, March 12, 1998
*
- * Modifications:
- *
*-------------------------------------------------------------------------
*/
int
-main (void)
+main(void)
{
- static hsize_t size[2] = {REQUEST_SIZE_X, REQUEST_SIZE_Y};
- static unsigned nread = NREAD_REQUESTS, nwrite = NWRITE_REQUESTS;
+ hsize_t size[2] = {REQUEST_SIZE_X, REQUEST_SIZE_Y};
+ unsigned nread = NREAD_REQUESTS, nwrite = NWRITE_REQUESTS;
unsigned char *the_data = NULL;
hid_t file, dset, file_space = H5I_INVALID_HID;
#ifdef H5_HAVE_GETRUSAGE
struct rusage r_start, r_stop;
-#else
- struct timeval r_start, r_stop;
#endif
- struct timeval t_start, t_stop;
+ double t_start, t_stop;
int fd;
unsigned u;
herr_t H5_ATTR_NDEBUG_UNUSED status;
@@ -184,322 +156,221 @@ main (void)
hsize_t count[2];
-#ifdef H5_HAVE_SYS_TIMEB
- struct _timeb *tbstart = malloc(sizeof(struct _timeb));
- struct _timeb *tbstop = malloc(sizeof(struct _timeb));
-#endif
/*
* The extra cast in the following statement is a bug workaround for the
* Win32 version 5.0 compiler.
* 1998-11-06 ptl
*/
- printf ("I/O request size is %1.1fMB\n",
- (double)(hssize_t)(size[0]*size[1])/(double)1024.0F*(double)1024);
+ HDprintf("I/O request size is %1.1fMB\n",
+ (double)(hssize_t)(size[0] * size[1]) / (double)1024.0F * (double)1024);
/* Open the files */
- file = H5Fcreate (HDF5_FILE_NAME, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT);
- HDassert (file>=0);
- fd = HDopen (RAW_FILE_NAME, O_RDWR|O_CREAT|O_TRUNC, 0666);
- HDassert (fd>=0);
+ file = H5Fcreate(HDF5_FILE_NAME, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT);
+ HDassert(file >= 0);
+ fd = HDopen(RAW_FILE_NAME, O_RDWR|O_CREAT|O_TRUNC, 0666);
+ HDassert(fd >= 0);
/* Create the dataset */
- file_space = H5Screate_simple (2, size, size);
+ file_space = H5Screate_simple(2, size, size);
HDassert(file_space >= 0);
dset = H5Dcreate2(file, "dset", H5T_NATIVE_UCHAR, file_space, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
HDassert(dset >= 0);
- the_data = (unsigned char *)malloc((size_t)(size[0] * size[1]));
+ the_data = (unsigned char *)HDmalloc((size_t)(size[0] * size[1]));
/* initial fill for lazy malloc */
HDmemset(the_data, 0xAA, (size_t)(size[0] * size[1]));
+
/* Fill raw */
- synchronize ();
+ synchronize();
#ifdef H5_HAVE_GETRUSAGE
HDgetrusage(RUSAGE_SELF, &r_start);
#endif
-#ifdef H5_HAVE_GETTIMEOFDAY
- HDgettimeofday(&t_start, NULL);
-#else
-#ifdef H5_HAVE_SYS_TIMEB
- _ftime(tbstart);
-#endif
-#endif
- HDfprintf (stderr, HEADING, "fill raw");
+ t_start = H5_get_time();
+ HDfprintf(stderr, HEADING, "fill raw");
for(u = 0; u < nwrite; u++) {
- putc (PROGRESS, stderr);
- HDfflush(stderr);
- HDmemset(the_data, 0xAA, (size_t)(size[0]*size[1]));
+ HDputc(PROGRESS, stderr);
+ HDfflush(stderr);
+ HDmemset(the_data, 0xAA, (size_t)(size[0] * size[1]));
}
#ifdef H5_HAVE_GETRUSAGE
HDgetrusage(RUSAGE_SELF, &r_stop);
#endif
-#ifdef H5_HAVE_GETTIMEOFDAY
- HDgettimeofday(&t_stop, NULL);
-#else
-#ifdef H5_HAVE_SYS_TIMEB
- _ftime(tbstop);
- t_start.tv_sec = tbstart->time;
- t_start.tv_usec = tbstart->millitm;
- t_stop.tv_sec = tbstop->time;
- t_stop.tv_usec = tbstop->millitm;
-#endif
-#endif
- putc ('\n', stderr);
- print_stats ("fill raw",
- &r_start, &r_stop, &t_start, &t_stop,
- (size_t)(nread*size[0]*size[1]));
+ t_stop = H5_get_time();
+ HDputc('\n', stderr);
+ print_stats("fill raw",
+#ifdef H5_HAVE_GETRUSAGE
+ &r_start, &r_stop,
+#endif /* H5_HAVE_GETRUSAGE */
+ t_start, t_stop, (size_t)(nread * size[0] * size[1]));
/* Fill hdf5 */
- synchronize ();
+ synchronize();
#ifdef H5_HAVE_GETRUSAGE
HDgetrusage(RUSAGE_SELF, &r_start);
#endif
-#ifdef H5_HAVE_GETTIMEOFDAY
- HDgettimeofday(&t_start, NULL);
-#else
-#ifdef H5_HAVE_SYS_TIMEB
- _ftime(tbstart);
-#endif
-#endif
- HDfprintf (stderr, HEADING, "fill hdf5");
+ t_start = H5_get_time();
+ HDfprintf(stderr, HEADING, "fill hdf5");
for(u = 0; u < nread; u++) {
- putc (PROGRESS, stderr);
- HDfflush(stderr);
- status = H5Dread (dset, H5T_NATIVE_UCHAR, file_space, file_space,
- H5P_DEFAULT, the_data);
- HDassert (status>=0);
+ HDputc(PROGRESS, stderr);
+ HDfflush(stderr);
+ status = H5Dread(dset, H5T_NATIVE_UCHAR, file_space, file_space,
+ H5P_DEFAULT, the_data);
+ HDassert(status >= 0);
}
#ifdef H5_HAVE_GETRUSAGE
HDgetrusage(RUSAGE_SELF, &r_stop);
#endif
-#ifdef H5_HAVE_GETTIMEOFDAY
- HDgettimeofday(&t_stop, NULL);
-#else
-#ifdef H5_HAVE_SYS_TIMEB
- _ftime(tbstop);
- t_start.tv_sec = tbstart->time;
- t_start.tv_usec = tbstart->millitm;
- t_stop.tv_sec = tbstop->time;
- t_stop.tv_usec = tbstop->millitm;
-#endif
-#endif
- putc ('\n', stderr);
- print_stats ("fill hdf5",
- &r_start, &r_stop, &t_start, &t_stop,
- (size_t)(nread*size[0]*size[1]));
+ t_stop = H5_get_time();
+ HDputc('\n', stderr);
+ print_stats("fill hdf5",
+#ifdef H5_HAVE_GETRUSAGE
+ &r_start, &r_stop,
+#endif /* H5_HAVE_GETRUSAGE */
+ t_start, t_stop, (size_t)(nread * size[0] * size[1]));
/* Write the raw dataset */
- synchronize ();
+ synchronize();
#ifdef H5_HAVE_GETRUSAGE
HDgetrusage(RUSAGE_SELF, &r_start);
#endif
-#ifdef H5_HAVE_GETTIMEOFDAY
- HDgettimeofday(&t_start, NULL);
-#else
-#ifdef H5_HAVE_SYS_TIMEB
- _ftime(tbstart);
-#endif
-#endif
- HDfprintf (stderr, HEADING, "out raw");
+ t_start = H5_get_time();
+ HDfprintf(stderr, HEADING, "out raw");
for(u = 0; u < nwrite; u++) {
- putc (PROGRESS, stderr);
- HDfflush(stderr);
- offset = HDlseek (fd, (off_t)0, SEEK_SET);
- HDassert (0==offset);
- n = HDwrite (fd, the_data, (size_t)(size[0]*size[1]));
- HDassert (n>=0 && (size_t)n==size[0]*size[1]);
+ HDputc(PROGRESS, stderr);
+ HDfflush(stderr);
+ offset = HDlseek(fd, (off_t)0, SEEK_SET);
+ HDassert(0 == offset);
+ n = HDwrite(fd, the_data, (size_t)(size[0] * size[1]));
+ HDassert(n >= 0 && (size_t)n == (size[0] * size[1]));
}
#ifdef H5_HAVE_GETRUSAGE
HDgetrusage(RUSAGE_SELF, &r_stop);
#endif
-#ifdef H5_HAVE_GETTIMEOFDAY
- HDgettimeofday(&t_stop, NULL);
-#else
-#ifdef H5_HAVE_SYS_TIMEB
- _ftime(tbstop);
- t_start.tv_sec = tbstart->time;
- t_start.tv_usec = tbstart->millitm;
- t_stop.tv_sec = tbstop->time;
- t_stop.tv_usec = tbstop->millitm;
-#endif
-#endif
- putc ('\n', stderr);
- print_stats ("out raw",
- &r_start, &r_stop, &t_start, &t_stop,
- (size_t)(nread*size[0]*size[1]));
+ t_stop = H5_get_time();
+ HDputc('\n', stderr);
+ print_stats("out raw",
+#ifdef H5_HAVE_GETRUSAGE
+ &r_start, &r_stop,
+#endif /* H5_HAVE_GETRUSAGE */
+ t_start, t_stop, (size_t)(nread * size[0] * size[1]));
/* Write the hdf5 dataset */
- synchronize ();
+ synchronize();
#ifdef H5_HAVE_GETRUSAGE
HDgetrusage(RUSAGE_SELF, &r_start);
#endif
-#ifdef H5_HAVE_GETTIMEOFDAY
- HDgettimeofday(&t_start, NULL);
-#else
-#ifdef H5_HAVE_SYS_TIMEB
- _ftime(tbstart);
-#endif
-#endif
- HDfprintf (stderr, HEADING, "out hdf5");
+ t_start = H5_get_time();
+ HDfprintf(stderr, HEADING, "out hdf5");
for(u = 0; u < nwrite; u++) {
- putc (PROGRESS, stderr);
- HDfflush(stderr);
- status = H5Dwrite (dset, H5T_NATIVE_UCHAR, H5S_ALL, H5S_ALL,
- H5P_DEFAULT, the_data);
- HDassert (status>=0);
+ HDputc(PROGRESS, stderr);
+ HDfflush(stderr);
+ status = H5Dwrite(dset, H5T_NATIVE_UCHAR, H5S_ALL, H5S_ALL,
+ H5P_DEFAULT, the_data);
+ HDassert(status >= 0);
}
#ifdef H5_HAVE_GETRUSAGE
HDgetrusage(RUSAGE_SELF, &r_stop);
#endif
-#ifdef H5_HAVE_GETTIMEOFDAY
- HDgettimeofday(&t_stop, NULL);
-#else
-#ifdef H5_HAVE_SYS_TIMEB
- _ftime(tbstop);
- t_start.tv_sec = tbstart->time;
- t_start.tv_usec = tbstart->millitm;
- t_stop.tv_sec = tbstop->time;
- t_stop.tv_usec = tbstop->millitm;
-#endif
-#endif
- putc ('\n', stderr);
- print_stats ("out hdf5",
- &r_start, &r_stop, &t_start, &t_stop,
- (size_t)(nread*size[0]*size[1]));
+ t_stop = H5_get_time();
+ HDputc('\n', stderr);
+ print_stats("out hdf5",
+#ifdef H5_HAVE_GETRUSAGE
+ &r_start, &r_stop,
+#endif /* H5_HAVE_GETRUSAGE */
+ t_start, t_stop, (size_t)(nread * size[0] * size[1]));
/* Read the raw dataset */
- synchronize ();
+ synchronize();
#ifdef H5_HAVE_GETRUSAGE
HDgetrusage(RUSAGE_SELF, &r_start);
#endif
-#ifdef H5_HAVE_GETTIMEOFDAY
- HDgettimeofday(&t_start, NULL);
-#else
-#ifdef H5_HAVE_SYS_TIMEB
- _ftime(tbstart);
-#endif
-#endif
- HDfprintf (stderr, HEADING, "in raw");
+ t_start = H5_get_time();
+ HDfprintf(stderr, HEADING, "in raw");
for(u = 0; u < nread; u++) {
- putc (PROGRESS, stderr);
- HDfflush(stderr);
- offset = HDlseek (fd, (off_t)0, SEEK_SET);
- HDassert (0==offset);
- n = HDread (fd, the_data, (size_t)(size[0]*size[1]));
- HDassert (n>=0 && (size_t)n==size[0]*size[1]);
+ HDputc(PROGRESS, stderr);
+ HDfflush(stderr);
+ offset = HDlseek(fd, (off_t)0, SEEK_SET);
+ HDassert(0 == offset);
+ n = HDread(fd, the_data, (size_t)(size[0] * size[1]));
+ HDassert(n >= 0 && (size_t)n == (size[0] * size[1]));
}
#ifdef H5_HAVE_GETRUSAGE
HDgetrusage(RUSAGE_SELF, &r_stop);
#endif
-#ifdef H5_HAVE_GETTIMEOFDAY
- HDgettimeofday(&t_stop, NULL);
-#else
-#ifdef H5_HAVE_SYS_TIMEB
- _ftime(tbstop);
- t_start.tv_sec = tbstart->time;
- t_start.tv_usec = tbstart->millitm;
- t_stop.tv_sec = tbstop->time;
- t_stop.tv_usec = tbstop->millitm;
-#endif
-#endif
- putc ('\n', stderr);
- print_stats ("in raw",
- &r_start, &r_stop, &t_start, &t_stop,
- (size_t)(nread*size[0]*size[1]));
+ t_stop = H5_get_time();
+ HDputc('\n', stderr);
+ print_stats("in raw",
+#ifdef H5_HAVE_GETRUSAGE
+ &r_start, &r_stop,
+#endif /* H5_HAVE_GETRUSAGE */
+ t_start, t_stop, (size_t)(nread * size[0] * size[1]));
/* Read the hdf5 dataset */
- synchronize ();
+ synchronize();
#ifdef H5_HAVE_GETRUSAGE
HDgetrusage(RUSAGE_SELF, &r_start);
#endif
-#ifdef H5_HAVE_GETTIMEOFDAY
- HDgettimeofday(&t_start, NULL);
-#else
-#ifdef H5_HAVE_SYS_TIMEB
- _ftime(tbstart);
-#endif
-#endif
- HDfprintf (stderr, HEADING, "in hdf5");
+ t_start = H5_get_time();
+ HDfprintf(stderr, HEADING, "in hdf5");
for(u = 0; u < nread; u++) {
- putc (PROGRESS, stderr);
- HDfflush(stderr);
- status = H5Dread (dset, H5T_NATIVE_UCHAR, file_space, file_space,
- H5P_DEFAULT, the_data);
- HDassert (status>=0);
+ HDputc(PROGRESS, stderr);
+ HDfflush(stderr);
+ status = H5Dread(dset, H5T_NATIVE_UCHAR, file_space, file_space,
+ H5P_DEFAULT, the_data);
+ HDassert(status >= 0);
}
#ifdef H5_HAVE_GETRUSAGE
HDgetrusage(RUSAGE_SELF, &r_stop);
#endif
-#ifdef H5_HAVE_GETTIMEOFDAY
- HDgettimeofday(&t_stop, NULL);
-#else
-#ifdef H5_HAVE_SYS_TIMEB
- _ftime(tbstop);
- t_start.tv_sec = tbstart->time;
- t_start.tv_usec = tbstart->millitm;
- t_stop.tv_sec = tbstop->time;
- t_stop.tv_usec = tbstop->millitm;
-#endif
-#endif
- putc ('\n', stderr);
- print_stats ("in hdf5",
- &r_start, &r_stop, &t_start, &t_stop,
- (size_t)(nread*size[0]*size[1]));
+ t_stop = H5_get_time();
+ HDputc('\n', stderr);
+ print_stats("in hdf5",
+#ifdef H5_HAVE_GETRUSAGE
+ &r_start, &r_stop,
+#endif /* H5_HAVE_GETRUSAGE */
+ t_start, t_stop, (size_t)(nread * size[0] * size[1]));
/* Read hyperslab */
- HDassert (size[0]>20 && size[1]>20);
+ HDassert(size[0] > 20 && size[1] > 20);
start[0] = start[1] = 10;
- count[0] = count[1] = size[0]-20;
- status = H5Sselect_hyperslab (file_space, H5S_SELECT_SET, start, NULL, count, NULL);
- HDassert (status>=0);
- synchronize ();
+ count[0] = count[1] = size[0] - 20;
+ status = H5Sselect_hyperslab(file_space, H5S_SELECT_SET, start, NULL, count, NULL);
+ HDassert(status >= 0);
+ synchronize();
#ifdef H5_HAVE_GETRUSAGE
HDgetrusage(RUSAGE_SELF, &r_start);
#endif
-#ifdef H5_HAVE_GETTIMEOFDAY
- HDgettimeofday(&t_start, NULL);
-#else
-#ifdef H5_HAVE_SYS_TIMEB
- _ftime(tbstart);
-#endif
-#endif
- HDfprintf (stderr, HEADING, "in hdf5 partial");
+ t_start = H5_get_time();
+ HDfprintf(stderr, HEADING, "in hdf5 partial");
for(u = 0; u < nread; u++) {
- putc (PROGRESS, stderr);
- HDfflush(stderr);
- status = H5Dread (dset, H5T_NATIVE_UCHAR, file_space, file_space,
- H5P_DEFAULT, the_data);
- HDassert (status>=0);
+ HDputc(PROGRESS, stderr);
+ HDfflush(stderr);
+ status = H5Dread(dset, H5T_NATIVE_UCHAR, file_space, file_space,
+ H5P_DEFAULT, the_data);
+ HDassert(status >= 0);
}
#ifdef H5_HAVE_GETRUSAGE
HDgetrusage(RUSAGE_SELF, &r_stop);
#endif
-#ifdef H5_HAVE_GETTIMEOFDAY
- HDgettimeofday(&t_stop, NULL);
-#else
-#ifdef H5_HAVE_SYS_TIMEB
- _ftime(tbstop);
- t_start.tv_sec = tbstart->time;
- t_start.tv_usec = tbstart->millitm;
- t_stop.tv_sec = tbstop->time;
- t_stop.tv_usec = tbstop->millitm;
-#endif
-#endif
- putc('\n', stderr);
+ t_stop = H5_get_time();
+ HDputc('\n', stderr);
print_stats("in hdf5 partial",
- &r_start, &r_stop, &t_start, &t_stop,
- (size_t)(nread*count[0]*count[1]));
-
-
+#ifdef H5_HAVE_GETRUSAGE
+ &r_start, &r_stop,
+#endif /* H5_HAVE_GETRUSAGE */
+ t_start, t_stop, (size_t)(nread * size[0] * size[1]));
/* Close everything */
HDclose(fd);
+
H5Dclose(dset);
H5Sclose(file_space);
H5Fclose(file);
- free(the_data);
+
+ HDfree(the_data);
return 0;
}
diff --git a/tools/test/perform/overhead.c b/tools/test/perform/overhead.c
index 58558a5..bb3aff5 100644
--- a/tools/test/perform/overhead.c
+++ b/tools/test/perform/overhead.c
@@ -12,7 +12,7 @@
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/*
- * Programmer: Robb Matzke <matzke@llnl.gov>
+ * Programmer: Robb Matzke
* Monday, September 28, 1998
*
* Purpose: Creates a chunked dataset and measures the storage overhead.
diff --git a/tools/test/perform/perf_meta.c b/tools/test/perform/perf_meta.c
index b56f074..77248cc 100644
--- a/tools/test/perform/perf_meta.c
+++ b/tools/test/perform/perf_meta.c
@@ -12,7 +12,7 @@
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/*
- * Programmer: Raymond Lu <slu@ncsa.uiuc.edu>
+ * Programmer: Raymond Lu
* Friday, Oct 3, 2004
*
* Purpose: Tests performance of metadata