summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--MANIFEST50
-rw-r--r--config/cmake/jrunTest.cmake93
-rw-r--r--config/cmake/vfdTest.cmake6
-rw-r--r--config/cmake_ext_mod/runTest.cmake144
-rw-r--r--hl/tools/h5watch/CMakeTests.cmake59
-rw-r--r--hl/tools/testfiles/w-err-cmpd1.err (renamed from hl/tools/testfiles/w-err-cmpd1.ddl)1
-rw-r--r--hl/tools/testfiles/w-err-cmpd2.err (renamed from hl/tools/testfiles/w-err-cmpd2.ddl)1
-rw-r--r--hl/tools/testfiles/w-err-cmpd3.err (renamed from hl/tools/testfiles/w-err-cmpd3.ddl)1
-rw-r--r--hl/tools/testfiles/w-err-cmpd4.err (renamed from hl/tools/testfiles/w-err-cmpd4.ddl)1
-rw-r--r--hl/tools/testfiles/w-err-cmpd5.err1
-rw-r--r--hl/tools/testfiles/w-err-dset-nomax.err (renamed from hl/tools/testfiles/w-err-dset-nomax.ddl)1
-rw-r--r--hl/tools/testfiles/w-err-dset-none.err (renamed from hl/tools/testfiles/w-err-dset-none.ddl)1
-rw-r--r--hl/tools/testfiles/w-err-dset1.err (renamed from hl/tools/testfiles/w-err-dset1.ddl)1
-rw-r--r--hl/tools/testfiles/w-err-dset2.err (renamed from hl/tools/testfiles/w-err-dset2.ddl)1
-rw-r--r--hl/tools/testfiles/w-err-file.err (renamed from hl/tools/testfiles/w-err-file.ddl)0
-rw-r--r--hl/tools/testfiles/w-err-std.ddl (renamed from hl/tools/testfiles/w-err-cmpd5.ddl)0
-rw-r--r--test/CMakeTests.cmake4
-rw-r--r--tools/test/h5copy/CMakeTests.cmake2
-rw-r--r--tools/test/h5copy/testfiles/h5copy_misc1.err1
-rw-r--r--tools/test/h5copy/testfiles/h5copy_misc1.out1
-rw-r--r--tools/test/h5diff/CMakeTests.cmake1
-rw-r--r--tools/test/h5diff/testfiles/h5diff_454_ERR.txt4
-rw-r--r--tools/test/h5diff/testfiles/h5diff_455_ERR.txt4
-rw-r--r--tools/test/h5diff/testfiles/h5diff_457_ERR.txt4
-rw-r--r--tools/test/h5diff/testfiles/h5diff_458_ERR.txt4
-rw-r--r--tools/test/h5diff/testfiles/h5diff_459_ERR.txt4
-rw-r--r--tools/test/h5diff/testfiles/h5diff_600.txt1
-rw-r--r--tools/test/h5diff/testfiles/h5diff_601_ERR.txt4
-rw-r--r--tools/test/h5diff/testfiles/h5diff_udfail.err12
-rw-r--r--tools/test/h5diff/testfiles/h5diff_udfail.txt1
-rw-r--r--tools/test/h5format_convert/CMakeTests.cmake60
-rw-r--r--tools/test/h5format_convert/testfiles/h5fc_d_file-d.ddl25
-rw-r--r--tools/test/h5format_convert/testfiles/h5fc_d_file.ddl1
-rw-r--r--tools/test/h5format_convert/testfiles/h5fc_d_file.ddl.err1
-rw-r--r--tools/test/h5format_convert/testfiles/h5fc_dname.ddl1
-rw-r--r--tools/test/h5format_convert/testfiles/h5fc_dname.err1
-rw-r--r--tools/test/h5format_convert/testfiles/h5fc_nonexistdset_file.ddl.err (renamed from tools/test/h5format_convert/testfiles/h5fc_nonexistdset_file.ddl)0
-rw-r--r--tools/test/h5format_convert/testfiles/h5fc_nonexistfile.ddl.err (renamed from tools/test/h5format_convert/testfiles/h5fc_nonexistfile.ddl)0
-rw-r--r--tools/test/h5format_convert/testfiles/h5fc_nonexistfile.err1
-rw-r--r--tools/test/h5jam/CMakeTests.cmake2
-rw-r--r--tools/test/h5ls/CMakeTests.cmake52
-rw-r--r--tools/test/h5ls/errfiles/nosuchfile.err1
-rw-r--r--tools/test/h5ls/errfiles/textlinksrc-nodangle-1.err2
-rw-r--r--tools/test/h5ls/errfiles/tgroup-1.err2
-rw-r--r--tools/test/h5repack/CMakeTests.cmake2
-rw-r--r--tools/test/h5stat/CMakeTests.cmake63
-rw-r--r--tools/test/h5stat/testfiles/h5stat_err1_dims.err (renamed from tools/test/h5stat/testfiles/h5stat_err1_dims.ddl)0
-rw-r--r--tools/test/h5stat/testfiles/h5stat_err1_links.err (renamed from tools/test/h5stat/testfiles/h5stat_err1_links.ddl)0
-rw-r--r--tools/test/h5stat/testfiles/h5stat_err1_numattrs.err (renamed from tools/test/h5stat/testfiles/h5stat_err2_numattrs.ddl)0
-rw-r--r--tools/test/h5stat/testfiles/h5stat_err2_numattrs.err (renamed from tools/test/h5stat/testfiles/h5stat_err1_numattrs.ddl)0
-rw-r--r--tools/test/h5stat/testfiles/h5stat_err_old_fill.ddl1
-rw-r--r--tools/test/h5stat/testfiles/h5stat_err_old_fill.err1
-rw-r--r--tools/test/h5stat/testfiles/h5stat_err_old_layout.ddl1
-rw-r--r--tools/test/h5stat/testfiles/h5stat_err_old_layout.err1
-rw-r--r--tools/test/h5stat/testfiles/h5stat_err_refcount.ddl1
-rw-r--r--tools/test/h5stat/testfiles/h5stat_err_refcount.err1
-rw-r--r--tools/test/h5stat/testfiles/h5stat_nofile.ddl1
-rw-r--r--tools/test/h5stat/testfiles/h5stat_nofile.err1
-rw-r--r--tools/test/h5stat/testfiles/h5stat_notexist.ddl1
-rw-r--r--tools/test/h5stat/testfiles/h5stat_notexist.err1
-rw-r--r--tools/test/misc/CMakeTestsClear.cmake87
-rw-r--r--tools/test/misc/testfiles/h5clear_missing_file.ddl1
-rw-r--r--tools/test/misc/testfiles/h5clear_missing_file.err23
-rw-r--r--tools/test/misc/testfiles/h5clear_no_mdc_image.err (renamed from tools/test/misc/testfiles/h5clear_no_mdc_image.ddl)0
-rw-r--r--tools/test/misc/testfiles/h5clear_open_fail.err (renamed from tools/test/misc/testfiles/h5clear_open_fail.ddl)0
-rw-r--r--tools/testfiles/err_attr_dspace.ddl1
-rw-r--r--tools/testfiles/non_existing.ddl1
-rw-r--r--tools/testfiles/nosuchfile.ls1
-rw-r--r--tools/testfiles/pbits/tnofilename-with-packed-bits.ddl1
-rw-r--r--tools/testfiles/pbits/tpbitsCharLengthExceeded.ddl1
-rw-r--r--tools/testfiles/pbits/tpbitsCharOffsetExceeded.ddl1
-rw-r--r--tools/testfiles/pbits/tpbitsIncomplete.ddl1
-rw-r--r--tools/testfiles/pbits/tpbitsIntLengthExceeded.ddl1
-rw-r--r--tools/testfiles/pbits/tpbitsIntOffsetExceeded.ddl1
-rw-r--r--tools/testfiles/pbits/tpbitsLengthExceeded.ddl1
-rw-r--r--tools/testfiles/pbits/tpbitsLengthPositive.ddl1
-rw-r--r--tools/testfiles/pbits/tpbitsLongLengthExceeded.ddl1
-rw-r--r--tools/testfiles/pbits/tpbitsLongOffsetExceeded.ddl1
-rw-r--r--tools/testfiles/pbits/tpbitsMaxExceeded.ddl1
-rw-r--r--tools/testfiles/pbits/tpbitsOffsetExceeded.ddl1
-rw-r--r--tools/testfiles/pbits/tpbitsOffsetNegative.ddl1
-rw-r--r--tools/testfiles/texceedsubblock.ddl1
-rw-r--r--tools/testfiles/texceedsubcount.ddl1
-rw-r--r--tools/testfiles/texceedsubstart.ddl1
-rw-r--r--tools/testfiles/texceedsubstride.ddl1
-rw-r--r--tools/testfiles/textlinksrc-nodangle-1.ls2
-rw-r--r--tools/testfiles/tgroup-1.ls2
-rw-r--r--tools/testfiles/tstarfile.ddl1
88 files changed, 520 insertions, 248 deletions
diff --git a/MANIFEST b/MANIFEST
index 95d8b39..889dd2e 100644
--- a/MANIFEST
+++ b/MANIFEST
@@ -1388,14 +1388,15 @@
./tools/test/h5format_convert/testfiles/h5fc_v_err.ddl.err
./tools/test/h5format_convert/testfiles/h5fc_v_non_chunked.ddl
./tools/test/h5format_convert/testfiles/h5fc_d_file.ddl
+./tools/test/h5format_convert/testfiles/h5fc_d_file.err
./tools/test/h5format_convert/testfiles/h5fc_v_ndata_bt1.ddl
./tools/test/h5format_convert/testfiles/h5fc_dname.ddl
-./tools/test/h5format_convert/testfiles/h5fc_nonexistdset_file.ddl
+./tools/test/h5format_convert/testfiles/h5fc_dname.err
+./tools/test/h5format_convert/testfiles/h5fc_nonexistdset_file.ddl.err
./tools/test/h5format_convert/testfiles/h5fc_help.ddl
./tools/test/h5format_convert/testfiles/h5fc_v_all.ddl
./tools/test/h5format_convert/testfiles/h5fc_nooption.ddl
./tools/test/h5format_convert/testfiles/h5fc_v_n_1d.ddl
-./tools/test/h5format_convert/testfiles/h5fc_nonexistfile.ddl
./tools/test/h5format_convert/testfiles/h5fc_non_v3.h5
./tools/test/h5format_convert/testfiles/h5fc_edge_v3.h5
./tools/test/h5format_convert/testfiles/h5fc_err_level.h5
@@ -1465,6 +1466,11 @@
./tools/test/h5ls/vds_prefix/tvds-4.ls
./tools/test/h5ls/vds_prefix/tvds-5.ls
+# h5ls test error files
+./tools/test/h5ls/errfiles/nosuchfile.err
+./tools/test/h5ls/errfiles/textlinksrc-nodangle-1.err
+./tools/test/h5ls/errfiles/tgroup-1.err
+
# h5copy sources
./tools/src/h5copy/Makefile.am
./tools/src/h5copy/h5copy.c
@@ -1522,8 +1528,8 @@
./tools/test/misc/testfiles/h5clear_missing_file.ddl
./tools/test/misc/testfiles/h5clear_noclose_after_size.ddl
./tools/test/misc/testfiles/h5clear_noclose_before_size.ddl
-./tools/test/misc/testfiles/h5clear_no_mdc_image.ddl
-./tools/test/misc/testfiles/h5clear_open_fail.ddl
+./tools/test/misc/testfiles/h5clear_no_mdc_image.err
+./tools/test/misc/testfiles/h5clear_open_fail.err
./tools/test/misc/testfiles/h5clear_status_noclose_after_size.ddl
./tools/test/misc/testfiles/h5clear_usage.ddl
./tools/test/misc/testfiles/h5clear_user_equal_after_size.ddl
@@ -1577,10 +1583,6 @@
./tools/test/h5stat/testh5stat.sh.in
./tools/test/h5stat/testfiles/h5stat_dims1.ddl
./tools/test/h5stat/testfiles/h5stat_dims2.ddl
-./tools/test/h5stat/testfiles/h5stat_err1_dims.ddl
-./tools/test/h5stat/testfiles/h5stat_err1_links.ddl
-./tools/test/h5stat/testfiles/h5stat_err1_numattrs.ddl
-./tools/test/h5stat/testfiles/h5stat_err2_numattrs.ddl
./tools/test/h5stat/testfiles/h5stat_err_old_fill.h5
./tools/test/h5stat/testfiles/h5stat_err_old_fill.ddl
./tools/test/h5stat/testfiles/h5stat_err_old_layout.h5
@@ -1618,6 +1620,15 @@
./tools/test/h5stat/testfiles/h5stat_threshold.h5
./tools/test/h5stat/testfiles/h5stat_tsohm.ddl
./tools/test/h5stat/testfiles/h5stat_tsohm.h5
+./tools/test/h5stat/testfiles/h5stat_err_refcount.err
+./tools/test/h5stat/testfiles/h5stat_err_old_layout.err
+./tools/test/h5stat/testfiles/h5stat_err_old_fill.err
+./tools/test/h5stat/testfiles/h5stat_err1_dims.err
+./tools/test/h5stat/testfiles/h5stat_err1_links.err
+./tools/test/h5stat/testfiles/h5stat_err1_numattrs.err
+./tools/test/h5stat/testfiles/h5stat_err2_numattrs.err
+./tools/test/h5stat/testfiles/h5stat_notexist.err
+./tools/test/h5stat/testfiles/h5stat_nofile.err
# h5dump test files
./tools/testfiles/charsets.h5
@@ -2490,6 +2501,7 @@
./tools/test/h5diff/testfiles/tudfilter.h5
./tools/test/h5diff/testfiles/tudfilter2.h5
./tools/test/h5diff/testfiles/h5diff_ud.txt
+./tools/test/h5diff/testfiles/h5diff_udfail.err
./tools/test/h5diff/testfiles/h5diff_udfail.txt
./tools/test/h5diff/testfiles/diff_strings1.h5
./tools/test/h5diff/testfiles/diff_strings2.h5
@@ -2590,6 +2602,7 @@
./tools/test/h5copy/testfiles/h5copy_extlinks_src.h5
./tools/test/h5copy/testfiles/h5copy_extlinks_trg.h5
./tools/test/h5copy/testfiles/h5copy_extlinks_src.out.ls
+./tools/test/h5copy/testfiles/h5copy_misc1.err
./tools/test/h5copy/testfiles/h5copy_misc1.out
./tools/test/h5copy/testfiles/h5copytst_new.h5
./tools/test/h5copy/testfiles/h5copytst_new.out.ls
@@ -2758,16 +2771,17 @@
# expected test output from testing h5watch
#
-./hl/tools/testfiles/w-err-cmpd1.ddl
-./hl/tools/testfiles/w-err-cmpd2.ddl
-./hl/tools/testfiles/w-err-cmpd3.ddl
-./hl/tools/testfiles/w-err-cmpd4.ddl
-./hl/tools/testfiles/w-err-cmpd5.ddl
-./hl/tools/testfiles/w-err-dset1.ddl
-./hl/tools/testfiles/w-err-dset2.ddl
-./hl/tools/testfiles/w-err-dset-nomax.ddl
-./hl/tools/testfiles/w-err-dset-none.ddl
-./hl/tools/testfiles/w-err-file.ddl
+./hl/tools/testfiles/w-err-std.ddl
+./hl/tools/testfiles/w-err-cmpd1.err
+./hl/tools/testfiles/w-err-cmpd2.err
+./hl/tools/testfiles/w-err-cmpd3.err
+./hl/tools/testfiles/w-err-cmpd4.err
+./hl/tools/testfiles/w-err-cmpd5.err
+./hl/tools/testfiles/w-err-dset1.err
+./hl/tools/testfiles/w-err-dset2.err
+./hl/tools/testfiles/w-err-dset-nomax.err
+./hl/tools/testfiles/w-err-dset-none.err
+./hl/tools/testfiles/w-err-file.err
./hl/tools/testfiles/w-err-poll0.ddl
./hl/tools/testfiles/w-err-poll.ddl
./hl/tools/testfiles/w-err-width.ddl
diff --git a/config/cmake/jrunTest.cmake b/config/cmake/jrunTest.cmake
index b66f3a8..43aef22 100644
--- a/config/cmake/jrunTest.cmake
+++ b/config/cmake/jrunTest.cmake
@@ -32,9 +32,6 @@ endif ()
if (NOT TEST_CLASSPATH)
message (STATUS "Require TEST_CLASSPATH to be defined")
endif ()
-if (NOT TEST_REFERENCE)
- message (FATAL_ERROR "Require TEST_REFERENCE to be defined")
-endif ()
if (EXISTS ${TEST_FOLDER}/${TEST_OUTPUT})
file (REMOVE ${TEST_FOLDER}/${TEST_OUTPUT})
@@ -44,14 +41,6 @@ if (EXISTS ${TEST_FOLDER}/${TEST_OUTPUT}.err)
file (REMOVE ${TEST_FOLDER}/${TEST_OUTPUT}.err)
endif ()
-# if there is not an error reference file add the error output to the stdout file
-if (NOT TEST_ERRREF)
- if (NOT SKIP_APPEND)
- # append error file since skip was not defined
- set (ERROR_APPEND 1)
- endif ()
-endif ()
-
if (NOT TEST_LOG_LEVEL)
set (LOG_LEVEL "info")
else ()
@@ -131,52 +120,54 @@ message (STATUS "COMMAND Error: ${TEST_ERROR}")
# compare output files to references unless this must be skipped
if (NOT TEST_SKIP_COMPARE)
- if (WIN32 AND NOT MINGW)
- file (READ ${TEST_FOLDER}/${TEST_REFERENCE} TEST_STREAM)
- file (WRITE ${TEST_FOLDER}/${TEST_REFERENCE} "${TEST_STREAM}")
- endif ()
+ if (EXISTS ${TEST_FOLDER}/${TEST_REFERENCE})
+ if (WIN32 AND NOT MINGW)
+ file (READ ${TEST_FOLDER}/${TEST_REFERENCE} TEST_STREAM)
+ file (WRITE ${TEST_FOLDER}/${TEST_REFERENCE} "${TEST_STREAM}")
+ endif ()
- # now compare the output with the reference
- execute_process (
- COMMAND ${CMAKE_COMMAND} -E compare_files ${TEST_FOLDER}/${TEST_OUTPUT} ${TEST_FOLDER}/${TEST_REFERENCE}
- RESULT_VARIABLE TEST_RESULT
- )
- if (NOT "${TEST_RESULT}" STREQUAL "0")
- set (TEST_RESULT 0)
- file (STRINGS ${TEST_FOLDER}/${TEST_OUTPUT} test_act)
- list (LENGTH test_act len_act)
- file (STRINGS ${TEST_FOLDER}/${TEST_REFERENCE} test_ref)
- list (LENGTH test_ref len_ref)
- if (NOT "${len_act}" STREQUAL "0" AND NOT "${len_ref}" STREQUAL "0")
- math (EXPR _FP_LEN "${len_ref} - 1")
- foreach (line RANGE 0 ${_FP_LEN})
- list (GET test_act ${line} str_act)
- list (GET test_ref ${line} str_ref)
- if (NOT "${str_act}" STREQUAL "${str_ref}")
- if (NOT "${str_act}" STREQUAL "")
- set (TEST_RESULT 1)
- message ("line = ${line}\n***ACTUAL: ${str_act}\n****REFER: ${str_ref}\n")
+ # now compare the output with the reference
+ execute_process (
+ COMMAND ${CMAKE_COMMAND} -E compare_files ${TEST_FOLDER}/${TEST_OUTPUT} ${TEST_FOLDER}/${TEST_REFERENCE}
+ RESULT_VARIABLE TEST_RESULT
+ )
+ if (NOT "${TEST_RESULT}" STREQUAL "0")
+ set (TEST_RESULT 0)
+ file (STRINGS ${TEST_FOLDER}/${TEST_OUTPUT} test_act)
+ list (LENGTH test_act len_act)
+ file (STRINGS ${TEST_FOLDER}/${TEST_REFERENCE} test_ref)
+ list (LENGTH test_ref len_ref)
+ if (NOT "${len_act}" STREQUAL "0" AND NOT "${len_ref}" STREQUAL "0")
+ math (EXPR _FP_LEN "${len_ref} - 1")
+ foreach (line RANGE 0 ${_FP_LEN})
+ list (GET test_act ${line} str_act)
+ list (GET test_ref ${line} str_ref)
+ if (NOT "${str_act}" STREQUAL "${str_ref}")
+ if (NOT "${str_act}" STREQUAL "")
+ set (TEST_RESULT 1)
+ message ("line = ${line}\n***ACTUAL: ${str_act}\n****REFER: ${str_ref}\n")
+ endif ()
endif ()
+ endforeach ()
+ else ()
+ if ("${len_act}" STREQUAL "0")
+ message (STATUS "COMPARE Failed: ${TEST_FOLDER}/${TEST_OUTPUT} is empty")
+ endif ()
+ if ("${len_ref}" STREQUAL "0")
+ message (STATUS "COMPARE Failed: ${TEST_FOLDER}/${TEST_REFERENCE} is empty")
endif ()
- endforeach ()
- else ()
- if ("${len_act}" STREQUAL "0")
- message (STATUS "COMPARE Failed: ${TEST_FOLDER}/${TEST_OUTPUT} is empty")
endif ()
- if ("${len_ref}" STREQUAL "0")
- message (STATUS "COMPARE Failed: ${TEST_FOLDER}/${TEST_REFERENCE} is empty")
+ if (NOT "${len_act}" STREQUAL "${len_ref}")
+ set (TEST_RESULT 1)
endif ()
endif ()
- if (NOT "${len_act}" STREQUAL "${len_ref}")
- set (TEST_RESULT 1)
- endif ()
- endif ()
- message (STATUS "COMPARE Result: ${TEST_RESULT}")
+ message (STATUS "COMPARE Result: ${TEST_RESULT}")
- # again, if return value is !=0 scream and shout
- if (NOT "${TEST_RESULT}" STREQUAL "0")
- message (FATAL_ERROR "Failed: The output of ${TEST_OUTPUT} did not match ${TEST_REFERENCE}")
+ # again, if return value is !=0 scream and shout
+ if (NOT "${TEST_RESULT}" STREQUAL "0")
+ message (FATAL_ERROR "Failed: The output of ${TEST_OUTPUT} did not match ${TEST_REFERENCE}")
+ endif ()
endif ()
# now compare the .err file with the error reference, if supplied
@@ -217,7 +208,7 @@ if (NOT TEST_SKIP_COMPARE)
if ("${len_ref}" STREQUAL "0")
message (STATUS "COMPARE Failed: ${TEST_FOLDER}/${TEST_ERRREF} is empty")
endif ()
- endif()
+ endif ()
if (NOT "${len_act}" STREQUAL "${len_ref}")
set (TEST_RESULT 1)
endif ()
@@ -226,7 +217,7 @@ if (NOT TEST_SKIP_COMPARE)
message (STATUS "COMPARE Result: ${TEST_RESULT}")
# again, if return value is !=0 scream and shout
- if (NOT ${TEST_RESULT} STREQUAL 0)
+ if (NOT "${TEST_RESULT}" STREQUAL "0")
message (FATAL_ERROR "Failed: The error output of ${TEST_OUTPUT}.err did not match ${TEST_ERRREF}")
endif ()
endif ()
diff --git a/config/cmake/vfdTest.cmake b/config/cmake/vfdTest.cmake
index 66a97c0..95a4c40 100644
--- a/config/cmake/vfdTest.cmake
+++ b/config/cmake/vfdTest.cmake
@@ -32,9 +32,9 @@ if (EXISTS ${TEST_FOLDER}/${TEST_OUTPUT}.err)
endif ()
# if there is not an error reference file add the error output to the stdout file
-if (NOT TEST_ERRREF)
- set (ERROR_APPEND 1)
-endif ()
+#if (NOT TEST_ERRREF)
+# set (ERROR_APPEND 1)
+#endif ()
message (STATUS "USING ${TEST_VFD} ON COMMAND: ${TEST_PROGRAM} ${TEST_ARGS}")
diff --git a/config/cmake_ext_mod/runTest.cmake b/config/cmake_ext_mod/runTest.cmake
index 5569a73..75d0f3b 100644
--- a/config/cmake_ext_mod/runTest.cmake
+++ b/config/cmake_ext_mod/runTest.cmake
@@ -26,9 +26,6 @@ endif ()
if (NOT TEST_EXPECT)
message (STATUS "Require TEST_EXPECT to be defined")
endif ()
-if (NOT TEST_SKIP_COMPARE AND NOT TEST_REFERENCE)
- message (FATAL_ERROR "Require TEST_REFERENCE to be defined")
-endif ()
if (EXISTS ${TEST_FOLDER}/${TEST_OUTPUT})
file (REMOVE ${TEST_FOLDER}/${TEST_OUTPUT})
@@ -38,11 +35,6 @@ if (EXISTS ${TEST_FOLDER}/${TEST_OUTPUT}.err)
file (REMOVE ${TEST_FOLDER}/${TEST_OUTPUT}.err)
endif ()
-# if there is not an error reference file add the error output to the stdout file
-if (NOT TEST_ERRREF)
- set (ERROR_APPEND 1)
-endif ()
-
message (STATUS "COMMAND: ${TEST_PROGRAM} ${TEST_ARGS}")
if (TEST_LIBRARY_DIRECTORY)
@@ -96,9 +88,19 @@ endif ()
message (STATUS "COMMAND Result: ${TEST_RESULT}")
# if the .err file exists and ERRROR_APPEND is enabled
-if (ERROR_APPEND AND EXISTS ${TEST_FOLDER}/${TEST_OUTPUT}.err)
+if (EXISTS ${TEST_FOLDER}/${TEST_OUTPUT}.err)
file (READ ${TEST_FOLDER}/${TEST_OUTPUT}.err TEST_STREAM)
- file (APPEND ${TEST_FOLDER}/${TEST_OUTPUT} "${TEST_STREAM}")
+ if (TEST_MASK_FILE)
+ STRING(REGEX REPLACE "CurrentDir is [^\n]+\n" "CurrentDir is (dir name)\n" TEST_STREAM "${TEST_STREAM}")
+ endif ()
+
+ if (NOT ERROR_APPEND)
+ # append error output to the stdout output file
+ file (WRITE ${TEST_FOLDER}/${TEST_OUTPUT}.err "${TEST_STREAM}")
+ else ()
+ # write back to original .err file
+ file (APPEND ${TEST_FOLDER}/${TEST_OUTPUT} "${TEST_STREAM}")
+ endif ()
endif ()
# append the test result status with a predefined text
@@ -173,63 +175,65 @@ endif ()
# compare output files to references unless this must be skipped
if (NOT TEST_SKIP_COMPARE)
- if (WIN32 AND NOT MINGW)
- file (READ ${TEST_FOLDER}/${TEST_REFERENCE} TEST_STREAM)
- file (WRITE ${TEST_FOLDER}/${TEST_REFERENCE} "${TEST_STREAM}")
- endif ()
+ if (EXISTS ${TEST_FOLDER}/${TEST_REFERENCE})
+ if (WIN32 AND NOT MINGW)
+ file (READ ${TEST_FOLDER}/${TEST_REFERENCE} TEST_STREAM)
+ file (WRITE ${TEST_FOLDER}/${TEST_REFERENCE} "${TEST_STREAM}")
+ endif ()
- if (NOT TEST_SORT_COMPARE)
- # now compare the output with the reference
- execute_process (
- COMMAND ${CMAKE_COMMAND} -E compare_files ${TEST_FOLDER}/${TEST_OUTPUT} ${TEST_FOLDER}/${TEST_REFERENCE}
- RESULT_VARIABLE TEST_RESULT
- )
- else ()
- file (STRINGS ${TEST_FOLDER}/${TEST_OUTPUT} v1)
- file (STRINGS ${TEST_FOLDER}/${TEST_REFERENCE} v2)
- list (SORT v1)
- list (SORT v2)
- if (NOT v1 STREQUAL v2)
- set(TEST_RESULT 1)
+ if (NOT TEST_SORT_COMPARE)
+ # now compare the output with the reference
+ execute_process (
+ COMMAND ${CMAKE_COMMAND} -E compare_files ${TEST_FOLDER}/${TEST_OUTPUT} ${TEST_FOLDER}/${TEST_REFERENCE}
+ RESULT_VARIABLE TEST_RESULT
+ )
+ else ()
+ file (STRINGS ${TEST_FOLDER}/${TEST_OUTPUT} v1)
+ file (STRINGS ${TEST_FOLDER}/${TEST_REFERENCE} v2)
+ list (SORT v1)
+ list (SORT v2)
+ if (NOT v1 STREQUAL v2)
+ set(TEST_RESULT 1)
+ endif ()
endif ()
- endif ()
- if (NOT "${TEST_RESULT}" STREQUAL "0")
- set (TEST_RESULT 0)
- file (STRINGS ${TEST_FOLDER}/${TEST_OUTPUT} test_act)
- list (LENGTH test_act len_act)
- file (STRINGS ${TEST_FOLDER}/${TEST_REFERENCE} test_ref)
- list (LENGTH test_ref len_ref)
- if (NOT "${len_act}" STREQUAL "0" AND NOT "${len_ref}" STREQUAL "0")
- math (EXPR _FP_LEN "${len_ref} - 1")
- foreach (line RANGE 0 ${_FP_LEN})
- list (GET test_act ${line} str_act)
- list (GET test_ref ${line} str_ref)
- if (NOT "${str_act}" STREQUAL "${str_ref}")
- if (NOT "${str_act}" STREQUAL "")
- set (TEST_RESULT 1)
- message ("line = ${line}\n***ACTUAL: ${str_act}\n****REFER: ${str_ref}\n")
+ if (NOT "${TEST_RESULT}" STREQUAL "0")
+ set (TEST_RESULT 0)
+ file (STRINGS ${TEST_FOLDER}/${TEST_OUTPUT} test_act)
+ list (LENGTH test_act len_act)
+ file (STRINGS ${TEST_FOLDER}/${TEST_REFERENCE} test_ref)
+ list (LENGTH test_ref len_ref)
+ if (NOT "${len_act}" STREQUAL "0" AND NOT "${len_ref}" STREQUAL "0")
+ math (EXPR _FP_LEN "${len_ref} - 1")
+ foreach (line RANGE 0 ${_FP_LEN})
+ list (GET test_act ${line} str_act)
+ list (GET test_ref ${line} str_ref)
+ if (NOT "${str_act}" STREQUAL "${str_ref}")
+ if (NOT "${str_act}" STREQUAL "")
+ set (TEST_RESULT 1)
+ message ("line = ${line}\n***ACTUAL: ${str_act}\n****REFER: ${str_ref}\n")
+ endif ()
endif ()
+ endforeach ()
+ else ()
+ if ("${len_act}" STREQUAL "0")
+ message (STATUS "COMPARE Failed: ${TEST_FOLDER}/${TEST_OUTPUT} is empty")
+ endif ()
+ if ("${len_ref}" STREQUAL "0")
+ message (STATUS "COMPARE Failed: ${TEST_FOLDER}/${TEST_REFERENCE} is empty")
endif ()
- endforeach ()
- else ()
- if ("${len_act}" STREQUAL "0")
- message (STATUS "COMPARE Failed: ${TEST_FOLDER}/${TEST_OUTPUT} is empty")
endif ()
- if ("${len_ref}" STREQUAL "0")
- message (STATUS "COMPARE Failed: ${TEST_FOLDER}/${TEST_REFERENCE} is empty")
+ if (NOT "${len_act}" STREQUAL "${len_ref}")
+ set (TEST_RESULT 1)
endif ()
endif ()
- if (NOT "${len_act}" STREQUAL "${len_ref}")
- set (TEST_RESULT 1)
- endif ()
- endif ()
- message (STATUS "COMPARE Result: ${TEST_RESULT}")
+ message (STATUS "COMPARE Result: ${TEST_RESULT}")
- # again, if return value is !=0 scream and shout
- if (NOT "${TEST_RESULT}" STREQUAL "0")
- message (FATAL_ERROR "Failed: The output of ${TEST_OUTPUT} did not match ${TEST_REFERENCE}")
+ # again, if return value is !=0 scream and shout
+ if (NOT "${TEST_RESULT}" STREQUAL "0")
+ message (FATAL_ERROR "Failed: The output of ${TEST_OUTPUT} did not match ${TEST_REFERENCE}")
+ endif ()
endif ()
# now compare the .err file with the error reference, if supplied
@@ -260,7 +264,7 @@ if (NOT TEST_SKIP_COMPARE)
if (NOT "${str_act}" STREQUAL "")
set (TEST_RESULT 1)
message ("line = ${line}\n***ACTUAL: ${str_act}\n****REFER: ${str_ref}\n")
- endif ()
+ endif ()
endif ()
endforeach ()
else ()
@@ -285,5 +289,27 @@ if (NOT TEST_SKIP_COMPARE)
endif ()
endif ()
+if (TEST_GREP_COMPARE)
+ # now grep the output with the reference
+ file (READ ${TEST_FOLDER}/${TEST_OUTPUT} TEST_STREAM)
+
+ # TEST_REFERENCE should always be matched
+ string (REGEX MATCH "${TEST_REFERENCE}" TEST_MATCH ${TEST_STREAM})
+ string (COMPARE EQUAL "${TEST_REFERENCE}" "${TEST_MATCH}" TEST_RESULT)
+ if ("${TEST_RESULT}" STREQUAL "0")
+ message (FATAL_ERROR "Failed: The output of ${TEST_PROGRAM} did not contain ${TEST_REFERENCE}")
+ endif ()
+
+ string (REGEX MATCH "${TEST_FILTER}" TEST_MATCH ${TEST_STREAM})
+ if ("${TEST_EXPECT}" STREQUAL "1")
+ # TEST_EXPECT (1) interperts TEST_FILTER as NOT to match
+ string (LENGTH "${TEST_MATCH}" TEST_RESULT)
+ if (NOT "${TEST_RESULT}" STREQUAL "0")
+ message (FATAL_ERROR "Failed: The output of ${TEST_PROGRAM} did contain ${TEST_FILTER}")
+ endif ()
+ endif ()
+endif ()
+
# everything went fine...
-message ("Passed: The output of ${TEST_PROGRAM} matches ${TEST_REFERENCE}")
+message ("${TEST_PROGRAM} Passed")
+
diff --git a/hl/tools/h5watch/CMakeTests.cmake b/hl/tools/h5watch/CMakeTests.cmake
index 0b7b4d4..9c18798 100644
--- a/hl/tools/h5watch/CMakeTests.cmake
+++ b/hl/tools/h5watch/CMakeTests.cmake
@@ -18,16 +18,16 @@
set (H5WATCH_TEST_FILES
w-help1.ddl
- w-err-cmpd1.ddl
- w-err-cmpd2.ddl
- w-err-cmpd3.ddl
- w-err-cmpd4.ddl
- w-err-cmpd5.ddl
- w-err-dset1.ddl
- w-err-dset2.ddl
- w-err-dset-nomax.ddl
- w-err-dset-none.ddl
- w-err-file.ddl
+ w-err-cmpd1.err
+ w-err-cmpd2.err
+ w-err-cmpd3.err
+ w-err-cmpd4.err
+ w-err-cmpd5.err
+ w-err-dset1.err
+ w-err-dset2.err
+ w-err-dset-nomax.err
+ w-err-dset-none.err
+ w-err-file.err
w-err-poll.ddl
w-err-poll0.ddl
w-err-width.ddl
@@ -86,6 +86,25 @@ add_custom_target(H5WATCH_files ALL COMMENT "Copying files needed by H5WATCH tes
endif ()
endmacro ()
+ macro (ADD_H5_ERR_TEST resultfile resultcode)
+ if (NOT HDF5_ENABLE_USING_MEMCHECKER)
+ add_test (
+ NAME H5WATCH_ARGS-h5watch-${resultfile}
+ COMMAND "${CMAKE_COMMAND}"
+ -D "TEST_PROGRAM=$<TARGET_FILE:h5watch>"
+ -D "TEST_ARGS:STRING=${ARGN}"
+ -D "TEST_FOLDER=${PROJECT_BINARY_DIR}/testfiles"
+ -D "TEST_OUTPUT=${resultfile}.out"
+ -D "TEST_EXPECT=${resultcode}"
+ -D "TEST_REFERENCE=${resultfile}.ddl"
+ -D "TEST_ERRREF=${resultfile}.err"
+ -P "${HDF_RESOURCES_EXT_DIR}/runTest.cmake"
+ )
+ set_tests_properties (H5WATCH_ARGS-h5watch-${resultfile} PROPERTIES DEPENDS ${last_test})
+ set (last_test "H5WATCH_ARGS-h5watch-${resultfile}")
+ endif ()
+ endmacro ()
+
macro (ADD_H5_WATCH resultfile resultcode)
if (NOT HDF5_ENABLE_USING_MEMCHECKER)
add_test (
@@ -162,20 +181,20 @@ if (NOT SWMR_INCOMPAT)
ADD_H5_TEST (w-help1 0 --help)
#
# Tests on expected failures
- ADD_H5_TEST (w-err-dset1 1 WATCH.h5)
- ADD_H5_TEST (w-err-dset2 1 WATCH.h5/group/DSET_CMPD)
- ADD_H5_TEST (w-err-dset-none 1 WATCH.h5/DSET_NONE)
- ADD_H5_TEST (w-err-dset-nomax 1 WATCH.h5/DSET_NOMAX)
- ADD_H5_TEST (w-err-file 1 ../WATCH.h5/DSET_CMPD)
+ ADD_H5_ERR_TEST (w-err-dset1 1 WATCH.h5)
+ ADD_H5_ERR_TEST (w-err-dset2 1 WATCH.h5/group/DSET_CMPD)
+ ADD_H5_ERR_TEST (w-err-dset-none 1 WATCH.h5/DSET_NONE)
+ ADD_H5_ERR_TEST (w-err-dset-nomax 1 WATCH.h5/DSET_NOMAX)
+ ADD_H5_ERR_TEST (w-err-file 1 ../WATCH.h5/DSET_CMPD)
ADD_H5_TEST (w-err-width 1 --width=-8 WATCH.h5/DSET_ONE)
ADD_H5_TEST (w-err-poll 1 --polling=-8 WATCH.h5/DSET_ONE)
ADD_H5_TEST (w-err-poll0 1 --polling=0 WATCH.h5/DSET_ONE)
#
# Tests on invalid field names via --fields option for a compound typed dataset: DSET_CMPD
- ADD_H5_TEST (w-err-cmpd1 1 --fields=fieldx WATCH.h5/DSET_CMPD)
- ADD_H5_TEST (w-err-cmpd2 1 --fields=field1,field2. WATCH.h5/DSET_CMPD)
- ADD_H5_TEST (w-err-cmpd3 1 --fields=field1,field2, WATCH.h5/DSET_CMPD)
- ADD_H5_TEST (w-err-cmpd4 1 --fields=field1,field2.b.k WATCH.h5/DSET_CMPD)
- ADD_H5_TEST (w-err-cmpd5 1 --fields=field1 --fields=field2.b.k WATCH.h5/DSET_CMPD)
+ ADD_H5_ERR_TEST (w-err-cmpd1 1 --fields=fieldx WATCH.h5/DSET_CMPD)
+ ADD_H5_ERR_TEST (w-err-cmpd2 1 --fields=field1,field2. WATCH.h5/DSET_CMPD)
+ ADD_H5_ERR_TEST (w-err-cmpd3 1 --fields=field1,field2, WATCH.h5/DSET_CMPD)
+ ADD_H5_ERR_TEST (w-err-cmpd4 1 --fields=field1,field2.b.k WATCH.h5/DSET_CMPD)
+ ADD_H5_ERR_TEST (w-err-cmpd5 1 --fields=field1 --fields=field2.b.k WATCH.h5/DSET_CMPD)
#
endif ()
diff --git a/hl/tools/testfiles/w-err-cmpd1.ddl b/hl/tools/testfiles/w-err-cmpd1.err
index 775d6a0..9c165fb 100644
--- a/hl/tools/testfiles/w-err-cmpd1.ddl
+++ b/hl/tools/testfiles/w-err-cmpd1.err
@@ -1,2 +1 @@
-Opened "WATCH.h5" with sec2 driver.
h5watch error: error in processing <list_of_fields>
diff --git a/hl/tools/testfiles/w-err-cmpd2.ddl b/hl/tools/testfiles/w-err-cmpd2.err
index 775d6a0..9c165fb 100644
--- a/hl/tools/testfiles/w-err-cmpd2.ddl
+++ b/hl/tools/testfiles/w-err-cmpd2.err
@@ -1,2 +1 @@
-Opened "WATCH.h5" with sec2 driver.
h5watch error: error in processing <list_of_fields>
diff --git a/hl/tools/testfiles/w-err-cmpd3.ddl b/hl/tools/testfiles/w-err-cmpd3.err
index 775d6a0..9c165fb 100644
--- a/hl/tools/testfiles/w-err-cmpd3.ddl
+++ b/hl/tools/testfiles/w-err-cmpd3.err
@@ -1,2 +1 @@
-Opened "WATCH.h5" with sec2 driver.
h5watch error: error in processing <list_of_fields>
diff --git a/hl/tools/testfiles/w-err-cmpd4.ddl b/hl/tools/testfiles/w-err-cmpd4.err
index 775d6a0..9c165fb 100644
--- a/hl/tools/testfiles/w-err-cmpd4.ddl
+++ b/hl/tools/testfiles/w-err-cmpd4.err
@@ -1,2 +1 @@
-Opened "WATCH.h5" with sec2 driver.
h5watch error: error in processing <list_of_fields>
diff --git a/hl/tools/testfiles/w-err-cmpd5.err b/hl/tools/testfiles/w-err-cmpd5.err
new file mode 100644
index 0000000..9c165fb
--- /dev/null
+++ b/hl/tools/testfiles/w-err-cmpd5.err
@@ -0,0 +1 @@
+h5watch error: error in processing <list_of_fields>
diff --git a/hl/tools/testfiles/w-err-dset-nomax.ddl b/hl/tools/testfiles/w-err-dset-nomax.err
index b99cf84..fd5ca7e 100644
--- a/hl/tools/testfiles/w-err-dset-nomax.ddl
+++ b/hl/tools/testfiles/w-err-dset-nomax.err
@@ -1,2 +1 @@
-Opened "WATCH.h5" with sec2 driver.
h5watch error: "/DSET_NOMAX" should have unlimited or max. dimension setting
diff --git a/hl/tools/testfiles/w-err-dset-none.ddl b/hl/tools/testfiles/w-err-dset-none.err
index cbf6770..db781c3 100644
--- a/hl/tools/testfiles/w-err-dset-none.ddl
+++ b/hl/tools/testfiles/w-err-dset-none.err
@@ -1,2 +1 @@
-Opened "WATCH.h5" with sec2 driver.
h5watch error: "/DSET_NONE" should be a chunked or virtual dataset
diff --git a/hl/tools/testfiles/w-err-dset1.ddl b/hl/tools/testfiles/w-err-dset1.err
index 433c4d6..d6b2a6e 100644
--- a/hl/tools/testfiles/w-err-dset1.ddl
+++ b/hl/tools/testfiles/w-err-dset1.err
@@ -1,2 +1 @@
-Opened "WATCH.h5" with sec2 driver.
h5watch error: no dataset specified
diff --git a/hl/tools/testfiles/w-err-dset2.ddl b/hl/tools/testfiles/w-err-dset2.err
index 81b52de..3f77ec8 100644
--- a/hl/tools/testfiles/w-err-dset2.ddl
+++ b/hl/tools/testfiles/w-err-dset2.err
@@ -1,2 +1 @@
-Opened "WATCH.h5" with sec2 driver.
h5watch error: unable to open dataset "/group/DSET_CMPD"
diff --git a/hl/tools/testfiles/w-err-file.ddl b/hl/tools/testfiles/w-err-file.err
index 015661f..015661f 100644
--- a/hl/tools/testfiles/w-err-file.ddl
+++ b/hl/tools/testfiles/w-err-file.err
diff --git a/hl/tools/testfiles/w-err-cmpd5.ddl b/hl/tools/testfiles/w-err-std.ddl
index 775d6a0..775d6a0 100644
--- a/hl/tools/testfiles/w-err-cmpd5.ddl
+++ b/hl/tools/testfiles/w-err-std.ddl
diff --git a/test/CMakeTests.cmake b/test/CMakeTests.cmake
index 3ad9de7..1c26def 100644
--- a/test/CMakeTests.cmake
+++ b/test/CMakeTests.cmake
@@ -843,6 +843,7 @@ if (HDF5_ENABLE_DEPRECATED_SYMBOLS)
-D "TEST_ARGS:STRING="
-D "TEST_EXPECT=0"
-D "TEST_MASK_ERROR=true"
+ -D "ERROR_APPEND=1"
-D "TEST_OUTPUT=err_compat.txt"
-D "TEST_REFERENCE=err_compat_1"
-D "TEST_FOLDER=${PROJECT_BINARY_DIR}/H5TEST"
@@ -877,6 +878,7 @@ else ()
-D "TEST_ARGS:STRING="
-D "TEST_EXPECT=0"
-D "TEST_MASK_ERROR=true"
+ -D "ERROR_APPEND=1"
-D "TEST_OUTPUT=error_test.txt"
-D "TEST_REFERENCE=error_test_1"
-D "TEST_FOLDER=${PROJECT_BINARY_DIR}/H5TEST"
@@ -943,6 +945,7 @@ if (BUILD_SHARED_LIBS)
-D "TEST_ARGS:STRING="
-D "TEST_EXPECT=0"
-D "TEST_MASK_ERROR=true"
+ -D "ERROR_APPEND=1"
-D "TEST_OUTPUT=err_compat.txt"
-D "TEST_REFERENCE=err_compat_1"
-D "TEST_FOLDER=${PROJECT_BINARY_DIR}/H5TEST-shared"
@@ -977,6 +980,7 @@ if (BUILD_SHARED_LIBS)
-D "TEST_ARGS:STRING="
-D "TEST_EXPECT=0"
-D "TEST_MASK_ERROR=true"
+ -D "ERROR_APPEND=1"
-D "TEST_OUTPUT=error_test.txt"
-D "TEST_REFERENCE=error_test_1"
-D "TEST_FOLDER=${PROJECT_BINARY_DIR}/H5TEST-shared"
diff --git a/tools/test/h5copy/CMakeTests.cmake b/tools/test/h5copy/CMakeTests.cmake
index 924ade1..f31068b 100644
--- a/tools/test/h5copy/CMakeTests.cmake
+++ b/tools/test/h5copy/CMakeTests.cmake
@@ -30,6 +30,7 @@
set (LIST_OTHER_TEST_FILES
${HDF5_TOOLS_TEST_H5COPY_SOURCE_DIR}/testfiles/h5copy_misc1.out
+ ${HDF5_TOOLS_TEST_H5COPY_SOURCE_DIR}/testfiles/h5copy_misc1.err
${HDF5_TOOLS_TEST_H5COPY_SOURCE_DIR}/testfiles/tudfilter.h5.txt
${HDF5_TOOLS_TEST_H5COPY_SOURCE_DIR}/testfiles/tudfilter.h5_ERR.txt
${HDF5_TOOLS_TEST_H5COPY_SOURCE_DIR}/testfiles/h5copy_plugin_fail_ERR.out.h5.txt
@@ -250,6 +251,7 @@
-D "TEST_OUTPUT=./testfiles/${testname}.out.out"
-D "TEST_EXPECT=${resultcode}"
-D "TEST_REFERENCE=./testfiles/${testname}.out"
+ -D "TEST_ERRREF=./testfiles/${testname}.err"
-D "TEST_MASK=true"
-P "${HDF_RESOURCES_EXT_DIR}/runTest.cmake"
)
diff --git a/tools/test/h5copy/testfiles/h5copy_misc1.err b/tools/test/h5copy/testfiles/h5copy_misc1.err
new file mode 100644
index 0000000..2c2c867
--- /dev/null
+++ b/tools/test/h5copy/testfiles/h5copy_misc1.err
@@ -0,0 +1 @@
+h5copy error: group </g1> doesn't exist. Use -p to create parent groups.
diff --git a/tools/test/h5copy/testfiles/h5copy_misc1.out b/tools/test/h5copy/testfiles/h5copy_misc1.out
index 1624f2b..1c7181b 100644
--- a/tools/test/h5copy/testfiles/h5copy_misc1.out
+++ b/tools/test/h5copy/testfiles/h5copy_misc1.out
@@ -1,3 +1,2 @@
Copying file <./testfiles/h5copytst.h5> and object </simple> to file <./testfiles/h5copy_misc1.out.h5> and object </g1/g2/simple>
Error in copy...Exiting
-h5copy error: group </g1> doesn't exist. Use -p to create parent groups.
diff --git a/tools/test/h5diff/CMakeTests.cmake b/tools/test/h5diff/CMakeTests.cmake
index e06f069..596128f 100644
--- a/tools/test/h5diff/CMakeTests.cmake
+++ b/tools/test/h5diff/CMakeTests.cmake
@@ -293,6 +293,7 @@
${HDF5_TOOLS_TEST_H5DIFF_SOURCE_DIR}/testfiles/h5diff_8625.txt
${HDF5_TOOLS_TEST_H5DIFF_SOURCE_DIR}/testfiles/h5diff_8639.txt
${HDF5_TOOLS_TEST_H5DIFF_SOURCE_DIR}/testfiles/h5diff_ud.txt
+ ${HDF5_TOOLS_TEST_H5DIFF_SOURCE_DIR}/testfiles/h5diff_udfail.err
${HDF5_TOOLS_TEST_H5DIFF_SOURCE_DIR}/testfiles/h5diff_udfail.txt
${HDF5_TOOLS_TEST_H5DIFF_SOURCE_DIR}/testfiles/h5diff_v1.txt
${HDF5_TOOLS_TEST_H5DIFF_SOURCE_DIR}/testfiles/h5diff_v2.txt
diff --git a/tools/test/h5diff/testfiles/h5diff_454_ERR.txt b/tools/test/h5diff/testfiles/h5diff_454_ERR.txt
index 4501071..dcc2e9c 100644
--- a/tools/test/h5diff/testfiles/h5diff_454_ERR.txt
+++ b/tools/test/h5diff/testfiles/h5diff_454_ERR.txt
@@ -1,6 +1,2 @@
Warning: </softlink_noexist> is a dangling link.
-H5tools-DIAG: Error detected in HDF5:tools (version (number)) thread (IDs):
- #000: (file name) line (number) in h5diff(): treat dangling link as error
- major: Failure in tools library
- minor: error in function
EXIT CODE: 2
diff --git a/tools/test/h5diff/testfiles/h5diff_455_ERR.txt b/tools/test/h5diff/testfiles/h5diff_455_ERR.txt
index 4501071..dcc2e9c 100644
--- a/tools/test/h5diff/testfiles/h5diff_455_ERR.txt
+++ b/tools/test/h5diff/testfiles/h5diff_455_ERR.txt
@@ -1,6 +1,2 @@
Warning: </softlink_noexist> is a dangling link.
-H5tools-DIAG: Error detected in HDF5:tools (version (number)) thread (IDs):
- #000: (file name) line (number) in h5diff(): treat dangling link as error
- major: Failure in tools library
- minor: error in function
EXIT CODE: 2
diff --git a/tools/test/h5diff/testfiles/h5diff_457_ERR.txt b/tools/test/h5diff/testfiles/h5diff_457_ERR.txt
index 9d73750..762ccdc 100644
--- a/tools/test/h5diff/testfiles/h5diff_457_ERR.txt
+++ b/tools/test/h5diff/testfiles/h5diff_457_ERR.txt
@@ -1,6 +1,2 @@
Warning: </ext_link_noexist1> is a dangling link.
-H5tools-DIAG: Error detected in HDF5:tools (version (number)) thread (IDs):
- #000: (file name) line (number) in h5diff(): treat dangling link as error
- major: Failure in tools library
- minor: error in function
EXIT CODE: 2
diff --git a/tools/test/h5diff/testfiles/h5diff_458_ERR.txt b/tools/test/h5diff/testfiles/h5diff_458_ERR.txt
index b084914..067d665 100644
--- a/tools/test/h5diff/testfiles/h5diff_458_ERR.txt
+++ b/tools/test/h5diff/testfiles/h5diff_458_ERR.txt
@@ -1,6 +1,2 @@
Warning: </ext_link_noexist2> is a dangling link.
-H5tools-DIAG: Error detected in HDF5:tools (version (number)) thread (IDs):
- #000: (file name) line (number) in h5diff(): treat dangling link as error
- major: Failure in tools library
- minor: error in function
EXIT CODE: 2
diff --git a/tools/test/h5diff/testfiles/h5diff_459_ERR.txt b/tools/test/h5diff/testfiles/h5diff_459_ERR.txt
index 9d73750..762ccdc 100644
--- a/tools/test/h5diff/testfiles/h5diff_459_ERR.txt
+++ b/tools/test/h5diff/testfiles/h5diff_459_ERR.txt
@@ -1,6 +1,2 @@
Warning: </ext_link_noexist1> is a dangling link.
-H5tools-DIAG: Error detected in HDF5:tools (version (number)) thread (IDs):
- #000: (file name) line (number) in h5diff(): treat dangling link as error
- major: Failure in tools library
- minor: error in function
EXIT CODE: 2
diff --git a/tools/test/h5diff/testfiles/h5diff_600.txt b/tools/test/h5diff/testfiles/h5diff_600.txt
index f3b346a..13d627c 100644
--- a/tools/test/h5diff/testfiles/h5diff_600.txt
+++ b/tools/test/h5diff/testfiles/h5diff_600.txt
@@ -142,5 +142,4 @@ usage: h5diff [OPTIONS] file1 file2 [obj1[ obj2]]
Use h5diff file1 file1 /g1/dset1 /g1/dset2 to compare
'/g1/dset1' and '/g1/dset2' in the same file
-h5diff error: missing file names
EXIT CODE: 1
diff --git a/tools/test/h5diff/testfiles/h5diff_601_ERR.txt b/tools/test/h5diff/testfiles/h5diff_601_ERR.txt
index b58124a..eb12f38 100644
--- a/tools/test/h5diff/testfiles/h5diff_601_ERR.txt
+++ b/tools/test/h5diff/testfiles/h5diff_601_ERR.txt
@@ -1,6 +1,2 @@
Object </nono_obj> could not be found in <h5diff_basic1.h5>
-H5tools-DIAG: Error detected in HDF5:tools (version (number)) thread (IDs):
- #000: (file name) line (number) in h5diff(): Error: Object could not be found
- major: Failure in tools library
- minor: error in function
EXIT CODE: 2
diff --git a/tools/test/h5diff/testfiles/h5diff_udfail.err b/tools/test/h5diff/testfiles/h5diff_udfail.err
new file mode 100644
index 0000000..d51de38
--- /dev/null
+++ b/tools/test/h5diff/testfiles/h5diff_udfail.err
@@ -0,0 +1,12 @@
+
+file1 file2
+---------------------------------------
+ x x /
+ x x /dynlibud
+
+group : </> and </>
+0 differences found
+dataset: </dynlibud> and </dynlibud>
+0 differences found
+Warning: dataset </dynlibud> cannot be read, user defined filter is not available
+EXIT CODE: 2
diff --git a/tools/test/h5diff/testfiles/h5diff_udfail.txt b/tools/test/h5diff/testfiles/h5diff_udfail.txt
index d51de38..e6000fc 100644
--- a/tools/test/h5diff/testfiles/h5diff_udfail.txt
+++ b/tools/test/h5diff/testfiles/h5diff_udfail.txt
@@ -8,5 +8,4 @@ group : </> and </>
0 differences found
dataset: </dynlibud> and </dynlibud>
0 differences found
-Warning: dataset </dynlibud> cannot be read, user defined filter is not available
EXIT CODE: 2
diff --git a/tools/test/h5format_convert/CMakeTests.cmake b/tools/test/h5format_convert/CMakeTests.cmake
index 2240813..f790a75 100644
--- a/tools/test/h5format_convert/CMakeTests.cmake
+++ b/tools/test/h5format_convert/CMakeTests.cmake
@@ -22,10 +22,8 @@
set (HDF5_REFERENCE_FILES
h5fc_help.ddl
h5fc_nooption.ddl
- h5fc_nonexistfile.ddl
h5fc_d_file.ddl
h5fc_dname.ddl
- h5fc_nonexistdset_file.ddl
h5fc_v_non_chunked.ddl
h5fc_v_bt1.ddl
h5fc_v_ndata_bt1.ddl
@@ -49,6 +47,11 @@
h5fc_v_err.ddl
h5fc_v_err.ddl.err
)
+ set (HDF5_REFERENCE_ERR_FILES
+ h5fc_d_file.ddl.err
+ h5fc_dname.err
+ h5fc_nonexistdset_file.ddl.err
+ )
set (HDF5_REFERENCE_TEST_FILES
h5fc_non_v3.h5
h5fc_edge_v3.h5
@@ -78,6 +81,10 @@
HDFTEST_COPY_FILE("${HDF5_TOOLS_TEST_H5FC_SOURCE_DIR}/testfiles/${ddl_file}" "${PROJECT_BINARY_DIR}/testfiles/${ddl_file}" "h5fc_files")
endforeach ()
+ foreach (h5_file ${HDF5_REFERENCE_ERR_FILES})
+ HDFTEST_COPY_FILE("${HDF5_TOOLS_TEST_H5FC_SOURCE_DIR}/testfiles/${h5_file}" "${PROJECT_BINARY_DIR}/testfiles/${h5_file}" "h5fc_files")
+ endforeach ()
+
foreach (h5_file ${HDF5_REFERENCE_TEST_FILES})
HDFTEST_COPY_FILE("${HDF5_TOOLS_TEST_H5FC_SOURCE_DIR}/testfiles/${h5_file}" "${PROJECT_BINARY_DIR}/testfiles/${h5_file}" "h5fc_files")
endforeach ()
@@ -119,6 +126,7 @@
-D "TEST_OUTPUT=${testname}.out"
-D "TEST_EXPECT=${resultcode}"
-D "TEST_REFERENCE=${resultfile}"
+ -D "TEST_ERRREF=${resultfile}.err"
-P "${HDF_RESOURCES_EXT_DIR}/runTest.cmake"
)
set_tests_properties (H5FC-${testname}-${testfile} PROPERTIES DEPENDS "H5FC-${testname}-${testfile}-tmpfile")
@@ -141,6 +149,42 @@
endif ()
endmacro ()
+ macro (ADD_H5_NOERR_OUTPUT testname resultfile resultcode testfile)
+ # If using memchecker add tests without using scripts
+ if (NOT HDF5_ENABLE_USING_MEMCHECKER)
+ add_test (
+ NAME H5FC-${testname}-clear-objects
+ COMMAND ${CMAKE_COMMAND}
+ -E remove
+ ./testfiles/outtmp.h5
+ ./testfiles/${testname}.out
+ ./testfiles/${testname}.out.err
+ )
+ if (NOT "${last_test}" STREQUAL "")
+ set_tests_properties (H5FC-${testname}-clear-objects PROPERTIES DEPENDS ${last_test})
+ endif ()
+ add_test (
+ NAME H5FC-${testname}-${testfile}-tmpfile
+ COMMAND ${CMAKE_COMMAND}
+ -E copy_if_different ${HDF5_TOOLS_TEST_H5FC_SOURCE_DIR}/testfiles/${testfile} ./testfiles/outtmp.h5
+ )
+ set_tests_properties (H5FC-${testname}-${testfile}-tmpfile PROPERTIES DEPENDS "H5FC-${testname}-clear-objects")
+ add_test (
+ NAME H5FC-${testname}-${testfile}
+ COMMAND "${CMAKE_COMMAND}"
+ -D "TEST_PROGRAM=$<TARGET_FILE:h5format_convert>"
+ -D "TEST_ARGS=${ARGN};outtmp.h5"
+ -D "TEST_FOLDER=${PROJECT_BINARY_DIR}/testfiles"
+ -D "TEST_OUTPUT=${testname}.out"
+ -D "TEST_EXPECT=${resultcode}"
+ -D "TEST_REFERENCE=${resultfile}"
+ -P "${HDF_RESOURCES_EXT_DIR}/runTest.cmake"
+ )
+ set_tests_properties (H5FC-${testname}-${testfile} PROPERTIES DEPENDS "H5FC-${testname}-${testfile}-tmpfile")
+ set (last_test "H5FC-${testname}-${testfile}")
+ endif ()
+ endmacro ()
+
macro (ADD_H5_MASK_OUTPUT testname resultfile resultcode testfile)
# If using memchecker add tests without using scripts
if (NOT HDF5_ENABLE_USING_MEMCHECKER)
@@ -433,17 +477,17 @@
# h5format_convert -d /GROUP/DSET_BT2 --verbose old_h5fc_ext_none.h5 (verbose, bt1 dataset)
# h5format_convert -d /DSET_NDATA_BT2 -v -n old_h5fc_ext_none.h5 (verbose, noop, bt1+nodata dataset)
# h5format_convert -v old_h5fc_ext_none.h5 (verbose, all datasets)
- ADD_H5_OUTPUT (h5fc_v_non_chunked h5fc_v_non_chunked.ddl 0 old_h5fc_ext_none.h5 -d /DSET_CONTIGUOUS -v)
- ADD_H5_OUTPUT (h5fc_v_bt1 h5fc_v_bt1.ddl 0 old_h5fc_ext_none.h5 -d /GROUP/DSET_BT2 --verbose)
- ADD_H5_OUTPUT (h5fc_v_ndata_bt1 h5fc_v_ndata_bt1.ddl 0 old_h5fc_ext_none.h5 -d /DSET_NDATA_BT2 -v -n)
- ADD_H5_OUTPUT (h5fc_v_all h5fc_v_all.ddl 0 old_h5fc_ext_none.h5 -v)
+ ADD_H5_NOERR_OUTPUT (h5fc_v_non_chunked h5fc_v_non_chunked.ddl 0 old_h5fc_ext_none.h5 -d /DSET_CONTIGUOUS -v)
+ ADD_H5_NOERR_OUTPUT (h5fc_v_bt1 h5fc_v_bt1.ddl 0 old_h5fc_ext_none.h5 -d /GROUP/DSET_BT2 --verbose)
+ ADD_H5_NOERR_OUTPUT (h5fc_v_ndata_bt1 h5fc_v_ndata_bt1.ddl 0 old_h5fc_ext_none.h5 -d /DSET_NDATA_BT2 -v -n)
+ ADD_H5_NOERR_OUTPUT (h5fc_v_all h5fc_v_all.ddl 0 old_h5fc_ext_none.h5 -v)
#
#
#
# h5format_convert -d /DSET_EA -v -n h5fc_ext_none.h5 (verbose, noop, one ea dataset)
# h5format_convert -v -n h5fc_non_v3.h5 (verbose, noop, all datasets)
- ADD_H5_OUTPUT (h5fc_v_n_1d h5fc_v_n_1d.ddl 0 h5fc_ext_none.h5 -d /DSET_EA -v -n)
- ADD_H5_OUTPUT (h5fc_v_n_all h5fc_v_n_all.ddl 0 h5fc_non_v3.h5 -v -n)
+ ADD_H5_NOERR_OUTPUT (h5fc_v_n_1d h5fc_v_n_1d.ddl 0 h5fc_ext_none.h5 -d /DSET_EA -v -n)
+ ADD_H5_NOERR_OUTPUT (h5fc_v_n_all h5fc_v_n_all.ddl 0 h5fc_non_v3.h5 -v -n)
#
#
#
diff --git a/tools/test/h5format_convert/testfiles/h5fc_d_file-d.ddl b/tools/test/h5format_convert/testfiles/h5fc_d_file-d.ddl
new file mode 100644
index 0000000..bc0229c
--- /dev/null
+++ b/tools/test/h5format_convert/testfiles/h5fc_d_file-d.ddl
@@ -0,0 +1,25 @@
+usage: h5format_convert [OPTIONS] file_name
+ OPTIONS
+ -h, --help Print a usage message and exit
+ -V, --version Print version number and exit
+ -v, --verbose Turn on verbose mode
+ -d dname, --dname=dataset_name Pathname for the dataset
+ -n, --noop Perform all the steps except the actual conversion
+
+Examples of use:
+
+h5format_convert -d /group/dataset file_name
+ Convert the dataset </group/dataset> in the HDF5 file <file_name>:
+ a. chunked dataset: convert the chunk indexing type to version 1 B-tree
+ b. compact/contiguous dataset: downgrade the layout version to 3
+ c. virtual dataset: no action
+
+h5format_convert file_name
+ Convert all datasets in the HDF5 file <file_name>:
+ a. chunked dataset: convert the chunk indexing type to version 1 B-tree
+ b. compact/contiguous dataset: downgrade the layout version to 3
+ c. virtual dataset: no action
+
+h5format_convert -n -d /group/dataset file_name
+ Go through all the steps except the actual conversion when
+ converting the dataset </group/dataset> in the HDF5 file <file_name>.
diff --git a/tools/test/h5format_convert/testfiles/h5fc_d_file.ddl b/tools/test/h5format_convert/testfiles/h5fc_d_file.ddl
index 38fc432..bc0229c 100644
--- a/tools/test/h5format_convert/testfiles/h5fc_d_file.ddl
+++ b/tools/test/h5format_convert/testfiles/h5fc_d_file.ddl
@@ -23,4 +23,3 @@ h5format_convert file_name
h5format_convert -n -d /group/dataset file_name
Go through all the steps except the actual conversion when
converting the dataset </group/dataset> in the HDF5 file <file_name>.
-h5format_convert error: missing file name
diff --git a/tools/test/h5format_convert/testfiles/h5fc_d_file.ddl.err b/tools/test/h5format_convert/testfiles/h5fc_d_file.ddl.err
new file mode 100644
index 0000000..ceb0fe4
--- /dev/null
+++ b/tools/test/h5format_convert/testfiles/h5fc_d_file.ddl.err
@@ -0,0 +1 @@
+h5format_convert error: missing file name
diff --git a/tools/test/h5format_convert/testfiles/h5fc_dname.ddl b/tools/test/h5format_convert/testfiles/h5fc_dname.ddl
index 48564b7..bc0229c 100644
--- a/tools/test/h5format_convert/testfiles/h5fc_dname.ddl
+++ b/tools/test/h5format_convert/testfiles/h5fc_dname.ddl
@@ -23,4 +23,3 @@ h5format_convert file_name
h5format_convert -n -d /group/dataset file_name
Go through all the steps except the actual conversion when
converting the dataset </group/dataset> in the HDF5 file <file_name>.
-h5format_convert error: No dataset name
diff --git a/tools/test/h5format_convert/testfiles/h5fc_dname.err b/tools/test/h5format_convert/testfiles/h5fc_dname.err
new file mode 100644
index 0000000..361d8a9
--- /dev/null
+++ b/tools/test/h5format_convert/testfiles/h5fc_dname.err
@@ -0,0 +1 @@
+h5format_convert error: No dataset name
diff --git a/tools/test/h5format_convert/testfiles/h5fc_nonexistdset_file.ddl b/tools/test/h5format_convert/testfiles/h5fc_nonexistdset_file.ddl.err
index 39450c0..39450c0 100644
--- a/tools/test/h5format_convert/testfiles/h5fc_nonexistdset_file.ddl
+++ b/tools/test/h5format_convert/testfiles/h5fc_nonexistdset_file.ddl.err
diff --git a/tools/test/h5format_convert/testfiles/h5fc_nonexistfile.ddl b/tools/test/h5format_convert/testfiles/h5fc_nonexistfile.ddl.err
index 706ea9d..706ea9d 100644
--- a/tools/test/h5format_convert/testfiles/h5fc_nonexistfile.ddl
+++ b/tools/test/h5format_convert/testfiles/h5fc_nonexistfile.ddl.err
diff --git a/tools/test/h5format_convert/testfiles/h5fc_nonexistfile.err b/tools/test/h5format_convert/testfiles/h5fc_nonexistfile.err
new file mode 100644
index 0000000..706ea9d
--- /dev/null
+++ b/tools/test/h5format_convert/testfiles/h5fc_nonexistfile.err
@@ -0,0 +1 @@
+h5format_convert error: unable to open file "nonexist.h5"
diff --git a/tools/test/h5jam/CMakeTests.cmake b/tools/test/h5jam/CMakeTests.cmake
index 66ff715..2d00b86 100644
--- a/tools/test/h5jam/CMakeTests.cmake
+++ b/tools/test/h5jam/CMakeTests.cmake
@@ -74,6 +74,8 @@
-D "TEST_FOLDER=${PROJECT_BINARY_DIR}"
-D "TEST_OUTPUT=${expectfile}.out"
-D "TEST_EXPECT=${resultcode}"
+ -D "TEST_ERRREF=testfiles/${expectfile}.txt"
+ -D "TEST_SKIP_COMPARE=1"
-D "TEST_REFERENCE=testfiles/${expectfile}.txt"
-P "${HDF_RESOURCES_EXT_DIR}/runTest.cmake"
)
diff --git a/tools/test/h5ls/CMakeTests.cmake b/tools/test/h5ls/CMakeTests.cmake
index 488b271..116d097 100644
--- a/tools/test/h5ls/CMakeTests.cmake
+++ b/tools/test/h5ls/CMakeTests.cmake
@@ -47,6 +47,12 @@
${HDF5_TOOLS_DIR}/testfiles/tdset_idx.h5
)
+ set (LIST_ERR_TEST_FILES
+ ${HDF5_TOOLS_DIR}/test/h5ls/errfiles/nosuchfile.err
+ ${HDF5_TOOLS_DIR}/test/h5ls/errfiles/textlinksrc-nodangle-1.err
+ ${HDF5_TOOLS_DIR}/test/h5ls/errfiles/tgroup-1.err
+ )
+
set (LIST_OTHER_TEST_FILES
${HDF5_TOOLS_DIR}/testfiles/help-1.ls
${HDF5_TOOLS_DIR}/testfiles/help-2.ls
@@ -116,6 +122,10 @@
get_filename_component(fname "${listfiles}" NAME)
HDFTEST_COPY_FILE("${listfiles}" "${PROJECT_BINARY_DIR}/testfiles/${fname}" "h5ls_files")
endforeach ()
+ foreach (listfiles ${LIST_ERR_TEST_FILES})
+ get_filename_component(fname "${listfiles}" NAME)
+ HDFTEST_COPY_FILE("${listfiles}" "${PROJECT_BINARY_DIR}/testfiles/${fname}" "h5ls_files")
+ endforeach ()
add_custom_target(h5ls_files ALL COMMENT "Copying files needed by h5ls tests" DEPENDS ${h5ls_files_list})
##############################################################################
@@ -159,6 +169,42 @@
endif ()
endmacro ()
+ macro (ADD_H5_ERR_TEST resultfile resultcode)
+ # If using memchecker add tests without using scripts
+ if (HDF5_ENABLE_USING_MEMCHECKER)
+ add_test (NAME H5LS-${resultfile} COMMAND $<TARGET_FILE:h5ls> ${ARGN})
+ set_tests_properties (H5LS-${resultfile} PROPERTIES WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles")
+ if ("${resultcode}" STREQUAL "1")
+ set_tests_properties (H5LS-${resultfile} PROPERTIES WILL_FAIL "true")
+ endif ()
+ if (NOT "${last_test}" STREQUAL "")
+ set_tests_properties (H5LS-${resultfile} PROPERTIES DEPENDS ${last_test})
+ endif ()
+ else ()
+ # Remove any output file left over from previous test run
+ add_test (
+ NAME H5LS-${resultfile}-clear-objects
+ COMMAND ${CMAKE_COMMAND}
+ -E remove
+ testfiles/${resultfile}.out
+ testfiles/${resultfile}.out.err
+ )
+ add_test (
+ NAME H5LS-${resultfile}
+ COMMAND "${CMAKE_COMMAND}"
+ -D "TEST_PROGRAM=$<TARGET_FILE:h5ls>"
+ -D "TEST_ARGS=${ARGN}"
+ -D "TEST_FOLDER=${PROJECT_BINARY_DIR}/testfiles"
+ -D "TEST_OUTPUT=${resultfile}.out"
+ -D "TEST_EXPECT=${resultcode}"
+ -D "TEST_REFERENCE=${resultfile}.ls"
+ -D "TEST_ERRREF=${resultfile}.err"
+ -P "${HDF_RESOURCES_EXT_DIR}/runTest.cmake"
+ )
+ set_tests_properties (H5LS-${resultfile} PROPERTIES DEPENDS H5LS-${resultfile}-clear-objects)
+ endif ()
+ endmacro ()
+
macro (ADD_H5_UD_TEST testname resultcode resultfile)
if (NOT HDF5_ENABLE_USING_MEMCHECKER)
# Remove any output file left over from previous test run
@@ -341,7 +387,7 @@
# test for displaying groups
# The following combination of arguments is expected to return an error message
# and return value 1
- ADD_H5_TEST (tgroup-1 1 -w80 -r -g tgroup.h5)
+ ADD_H5_ERR_TEST (tgroup-1 1 -w80 -r -g tgroup.h5)
ADD_H5_TEST (tgroup-2 0 -w80 -g tgroup.h5/g1)
# test for files with groups that have long comments
@@ -382,7 +428,7 @@
# tests for no-dangling-links
# if this option is given on dangling link, h5ls should return exit code 1
# when used alone , expect to print out help and return exit code 1
- ADD_H5_TEST (textlinksrc-nodangle-1 1 -w80 --no-dangling-links textlinksrc.h5)
+ ADD_H5_ERR_TEST (textlinksrc-nodangle-1 1 -w80 --no-dangling-links textlinksrc.h5)
# external dangling link - expected exit code 1
ADD_H5_TEST (textlinksrc-nodangle-2 1 -w80 --follow-symlinks --no-dangling-links textlinksrc.h5)
# soft dangling link - expected exit code 1
@@ -444,7 +490,7 @@
endif ()
# test for non-existing file
- ADD_H5_TEST (nosuchfile 1 nosuchfile.h5)
+ ADD_H5_ERR_TEST (nosuchfile 1 nosuchfile.h5)
# test for variable length data types in verbose mode
if (H5_WORDS_BIGENDIAN)
diff --git a/tools/test/h5ls/errfiles/nosuchfile.err b/tools/test/h5ls/errfiles/nosuchfile.err
new file mode 100644
index 0000000..8c4ee42
--- /dev/null
+++ b/tools/test/h5ls/errfiles/nosuchfile.err
@@ -0,0 +1 @@
+nosuchfile.h5: unable to open file
diff --git a/tools/test/h5ls/errfiles/textlinksrc-nodangle-1.err b/tools/test/h5ls/errfiles/textlinksrc-nodangle-1.err
new file mode 100644
index 0000000..8991fc1
--- /dev/null
+++ b/tools/test/h5ls/errfiles/textlinksrc-nodangle-1.err
@@ -0,0 +1,2 @@
+Error: --no-dangling-links must be used along with --follow-symlinks option!
+
diff --git a/tools/test/h5ls/errfiles/tgroup-1.err b/tools/test/h5ls/errfiles/tgroup-1.err
new file mode 100644
index 0000000..ba4cf07
--- /dev/null
+++ b/tools/test/h5ls/errfiles/tgroup-1.err
@@ -0,0 +1,2 @@
+Error: 'recursive' option not compatible with 'group info' option!
+
diff --git a/tools/test/h5repack/CMakeTests.cmake b/tools/test/h5repack/CMakeTests.cmake
index 3ee5e27..b9eb8a1 100644
--- a/tools/test/h5repack/CMakeTests.cmake
+++ b/tools/test/h5repack/CMakeTests.cmake
@@ -377,7 +377,7 @@
-D "TEST_OUTPUT=${resultfile}-${testname}.out"
-D "TEST_EXPECT=${resultcode}"
-D "TEST_MASK_ERROR=true"
- -D "TEST_REFERENCE=${resultfile}-${testname}.tst"
+ -D "TEST_ERRREF=${resultfile}-${testname}.tst"
-P "${HDF_RESOURCES_EXT_DIR}/runTest.cmake"
)
set_tests_properties (H5REPACK_MASK-${testname} PROPERTIES DEPENDS H5REPACK_MASK-${testname}-clear-objects)
diff --git a/tools/test/h5stat/CMakeTests.cmake b/tools/test/h5stat/CMakeTests.cmake
index bd55ac1..9c26a92 100644
--- a/tools/test/h5stat/CMakeTests.cmake
+++ b/tools/test/h5stat/CMakeTests.cmake
@@ -39,23 +39,30 @@
h5stat_newgrat
h5stat_newgrat-UG
h5stat_newgrat-UA
- h5stat_err1_links
h5stat_idx
h5stat_links1
h5stat_links2
h5stat_links3
h5stat_links4
h5stat_links5
- h5stat_err1_dims
h5stat_dims1
h5stat_dims2
- h5stat_err1_numattrs
- h5stat_err2_numattrs
h5stat_numattrs1
h5stat_numattrs2
h5stat_numattrs3
h5stat_numattrs4
)
+ set (HDF5_REFERENCE_ERR_FILES
+ h5stat_err_refcount
+ h5stat_err_old_layout
+ h5stat_err_old_fill
+ h5stat_err1_dims
+ h5stat_err1_links
+ h5stat_err1_numattrs
+ h5stat_err2_numattrs
+ h5stat_notexist
+ h5stat_nofile
+ )
set (HDF5_REFERENCE_TEST_FILES
h5stat_err_refcount.h5
h5stat_err_old_layout.h5
@@ -71,6 +78,10 @@
HDFTEST_COPY_FILE("${HDF5_TOOLS_TEST_H5STAT_SOURCE_DIR}/testfiles/${ddl_file}.ddl" "${PROJECT_BINARY_DIR}/${ddl_file}.ddl" "h5stat_files")
endforeach ()
+ foreach (h5_file ${HDF5_REFERENCE_ERR_FILES})
+ HDFTEST_COPY_FILE("${HDF5_TOOLS_TEST_H5STAT_SOURCE_DIR}/testfiles/${h5_file}.err" "${PROJECT_BINARY_DIR}/${h5_file}.err" "h5stat_files")
+ endforeach ()
+
foreach (h5_file ${HDF5_REFERENCE_TEST_FILES})
HDFTEST_COPY_FILE("${HDF5_TOOLS_TEST_H5STAT_SOURCE_DIR}/testfiles/${h5_file}" "${PROJECT_BINARY_DIR}/${h5_file}" "h5stat_files")
endforeach ()
@@ -118,6 +129,42 @@
endif ()
endmacro ()
+ macro (ADD_H5_ERR_TEST resultfile resultcode)
+ # If using memchecker add tests without using scripts
+ if (HDF5_ENABLE_USING_MEMCHECKER)
+ add_test (NAME H5STAT-${resultfile} COMMAND $<TARGET_FILE:h5stat> ${ARGN})
+ if (NOT "${resultcode}" STREQUAL "0")
+ set_tests_properties (H5STAT-${resultfile} PROPERTIES WILL_FAIL "true")
+ endif ()
+ if (NOT "${last_test}" STREQUAL "")
+ set_tests_properties (H5STAT-${resultfile} PROPERTIES DEPENDS ${last_test})
+ endif ()
+ else (HDF5_ENABLE_USING_MEMCHECKER)
+ add_test (
+ NAME H5STAT-${resultfile}-clear-objects
+ COMMAND ${CMAKE_COMMAND}
+ -E remove
+ ${resultfile}.out
+ ${resultfile}.out.err
+ )
+ if (NOT "${last_test}" STREQUAL "")
+ set_tests_properties (H5STAT-${resultfile}-clear-objects PROPERTIES DEPENDS ${last_test})
+ endif ()
+ add_test (
+ NAME H5STAT-${resultfile}
+ COMMAND "${CMAKE_COMMAND}"
+ -D "TEST_PROGRAM=$<TARGET_FILE:h5stat>"
+ -D "TEST_ARGS=${ARGN}"
+ -D "TEST_FOLDER=${PROJECT_BINARY_DIR}"
+ -D "TEST_OUTPUT=${resultfile}.out"
+ -D "TEST_EXPECT=${resultcode}"
+ -D "TEST_ERRREF=${resultfile}.err"
+ -P "${HDF_RESOURCES_EXT_DIR}/runTest.cmake"
+ )
+ set_tests_properties (H5STAT-${resultfile} PROPERTIES DEPENDS H5STAT-${resultfile}-clear-objects)
+ endif ()
+ endmacro ()
+
##############################################################################
##############################################################################
### T H E T E S T S ###
@@ -173,7 +220,7 @@
# -g -l 8
# --links=8
# --links=20 -g
- ADD_H5_TEST (h5stat_err1_links 1 -l 0 h5stat_threshold.h5)
+ ADD_H5_ERR_TEST (h5stat_err1_links 1 -l 0 h5stat_threshold.h5)
ADD_H5_TEST (h5stat_links1 0 -g -l 8 h5stat_threshold.h5)
ADD_H5_TEST (h5stat_links2 0 --links=8 h5stat_threshold.h5)
ADD_H5_TEST (h5stat_links3 0 --links=20 -g h5stat_threshold.h5)
@@ -188,7 +235,7 @@
# -d --dims=-1 (incorrect threshold value)
# -gd -m 5
# -d --di=15
- ADD_H5_TEST (h5stat_err1_dims 1 -d --dims=-1 h5stat_threshold.h5)
+ ADD_H5_ERR_TEST (h5stat_err1_dims 1 -d --dims=-1 h5stat_threshold.h5)
ADD_H5_TEST (h5stat_dims1 0 -gd -m 5 h5stat_threshold.h5)
ADD_H5_TEST (h5stat_dims2 0 -d --di=15 h5stat_threshold.h5)
#
@@ -198,8 +245,8 @@
# -AS -a 10
# -a 1
# -A --numattrs=25
- ADD_H5_TEST (h5stat_err1_numattrs 1 -a -2 h5stat_threshold.h5)
- ADD_H5_TEST (h5stat_err2_numattrs 1 --numattrs h5stat_threshold.h5)
+ ADD_H5_ERR_TEST (h5stat_err1_numattrs 1 -a -2 h5stat_threshold.h5)
+ ADD_H5_ERR_TEST (h5stat_err2_numattrs 1 --numattrs h5stat_threshold.h5)
ADD_H5_TEST (h5stat_numattrs1 0 -AS -a 10 h5stat_threshold.h5)
ADD_H5_TEST (h5stat_numattrs2 0 -a 1 h5stat_threshold.h5)
ADD_H5_TEST (h5stat_numattrs3 0 -A --numattrs=25 h5stat_threshold.h5)
diff --git a/tools/test/h5stat/testfiles/h5stat_err1_dims.ddl b/tools/test/h5stat/testfiles/h5stat_err1_dims.err
index 86d375b..86d375b 100644
--- a/tools/test/h5stat/testfiles/h5stat_err1_dims.ddl
+++ b/tools/test/h5stat/testfiles/h5stat_err1_dims.err
diff --git a/tools/test/h5stat/testfiles/h5stat_err1_links.ddl b/tools/test/h5stat/testfiles/h5stat_err1_links.err
index d43207c..d43207c 100644
--- a/tools/test/h5stat/testfiles/h5stat_err1_links.ddl
+++ b/tools/test/h5stat/testfiles/h5stat_err1_links.err
diff --git a/tools/test/h5stat/testfiles/h5stat_err2_numattrs.ddl b/tools/test/h5stat/testfiles/h5stat_err1_numattrs.err
index 01b6c18..01b6c18 100644
--- a/tools/test/h5stat/testfiles/h5stat_err2_numattrs.ddl
+++ b/tools/test/h5stat/testfiles/h5stat_err1_numattrs.err
diff --git a/tools/test/h5stat/testfiles/h5stat_err1_numattrs.ddl b/tools/test/h5stat/testfiles/h5stat_err2_numattrs.err
index 01b6c18..01b6c18 100644
--- a/tools/test/h5stat/testfiles/h5stat_err1_numattrs.ddl
+++ b/tools/test/h5stat/testfiles/h5stat_err2_numattrs.err
diff --git a/tools/test/h5stat/testfiles/h5stat_err_old_fill.ddl b/tools/test/h5stat/testfiles/h5stat_err_old_fill.ddl
index e751b7f..5cc1e32 100644
--- a/tools/test/h5stat/testfiles/h5stat_err_old_fill.ddl
+++ b/tools/test/h5stat/testfiles/h5stat_err_old_fill.ddl
@@ -1,2 +1 @@
Filename: h5stat_err_old_fill.h5
-h5stat error: unable to traverse objects/links in file "h5stat_err_old_fill.h5"
diff --git a/tools/test/h5stat/testfiles/h5stat_err_old_fill.err b/tools/test/h5stat/testfiles/h5stat_err_old_fill.err
new file mode 100644
index 0000000..8b886d2
--- /dev/null
+++ b/tools/test/h5stat/testfiles/h5stat_err_old_fill.err
@@ -0,0 +1 @@
+h5stat error: unable to traverse objects/links in file "h5stat_err_old_fill.h5"
diff --git a/tools/test/h5stat/testfiles/h5stat_err_old_layout.ddl b/tools/test/h5stat/testfiles/h5stat_err_old_layout.ddl
index a3e27e2..112190c 100644
--- a/tools/test/h5stat/testfiles/h5stat_err_old_layout.ddl
+++ b/tools/test/h5stat/testfiles/h5stat_err_old_layout.ddl
@@ -1,2 +1 @@
Filename: h5stat_err_old_layout.h5
-h5stat error: unable to traverse objects/links in file "h5stat_err_old_layout.h5"
diff --git a/tools/test/h5stat/testfiles/h5stat_err_old_layout.err b/tools/test/h5stat/testfiles/h5stat_err_old_layout.err
new file mode 100644
index 0000000..7aa2fa7
--- /dev/null
+++ b/tools/test/h5stat/testfiles/h5stat_err_old_layout.err
@@ -0,0 +1 @@
+h5stat error: unable to traverse objects/links in file "h5stat_err_old_layout.h5"
diff --git a/tools/test/h5stat/testfiles/h5stat_err_refcount.ddl b/tools/test/h5stat/testfiles/h5stat_err_refcount.ddl
index 1f1b491..41e533e 100644
--- a/tools/test/h5stat/testfiles/h5stat_err_refcount.ddl
+++ b/tools/test/h5stat/testfiles/h5stat_err_refcount.ddl
@@ -1,2 +1 @@
Filename: h5stat_err_refcount.h5
-h5stat error: unable to traverse objects/links in file "h5stat_err_refcount.h5"
diff --git a/tools/test/h5stat/testfiles/h5stat_err_refcount.err b/tools/test/h5stat/testfiles/h5stat_err_refcount.err
new file mode 100644
index 0000000..d176996
--- /dev/null
+++ b/tools/test/h5stat/testfiles/h5stat_err_refcount.err
@@ -0,0 +1 @@
+h5stat error: unable to traverse objects/links in file "h5stat_err_refcount.h5"
diff --git a/tools/test/h5stat/testfiles/h5stat_nofile.ddl b/tools/test/h5stat/testfiles/h5stat_nofile.ddl
index 7171320..01e39af 100644
--- a/tools/test/h5stat/testfiles/h5stat_nofile.ddl
+++ b/tools/test/h5stat/testfiles/h5stat_nofile.ddl
@@ -23,4 +23,3 @@ Usage: h5stat [OPTIONS] file
-s, --freespace Print free space information
-S, --summary Print summary of file space information
--enable-error-stack Prints messages from the HDF5 error stack as they occur
-h5stat error: missing file name
diff --git a/tools/test/h5stat/testfiles/h5stat_nofile.err b/tools/test/h5stat/testfiles/h5stat_nofile.err
new file mode 100644
index 0000000..3b7e979
--- /dev/null
+++ b/tools/test/h5stat/testfiles/h5stat_nofile.err
@@ -0,0 +1 @@
+h5stat error: missing file name
diff --git a/tools/test/h5stat/testfiles/h5stat_notexist.ddl b/tools/test/h5stat/testfiles/h5stat_notexist.ddl
index cc25e43..7f71941 100644
--- a/tools/test/h5stat/testfiles/h5stat_notexist.ddl
+++ b/tools/test/h5stat/testfiles/h5stat_notexist.ddl
@@ -1,2 +1 @@
Filename: notexist.h5
-h5stat error: unable to open file "notexist.h5"
diff --git a/tools/test/h5stat/testfiles/h5stat_notexist.err b/tools/test/h5stat/testfiles/h5stat_notexist.err
new file mode 100644
index 0000000..c1d9e54
--- /dev/null
+++ b/tools/test/h5stat/testfiles/h5stat_notexist.err
@@ -0,0 +1 @@
+h5stat error: unable to open file "notexist.h5"
diff --git a/tools/test/misc/CMakeTestsClear.cmake b/tools/test/misc/CMakeTestsClear.cmake
index a51d0e9..7c3bc71 100644
--- a/tools/test/misc/CMakeTestsClear.cmake
+++ b/tools/test/misc/CMakeTestsClear.cmake
@@ -49,8 +49,6 @@
h5clear_missing_file.ddl
h5clear_noclose_after_size.ddl
h5clear_noclose_before_size.ddl
- h5clear_no_mdc_image.ddl
- h5clear_open_fail.ddl
h5clear_status_noclose_after_size.ddl
h5clear_usage.ddl
h5clear_user_equal_after_size.ddl
@@ -60,10 +58,17 @@
h5clear_user_less_after_size.ddl
h5clear_user_less_before_size.ddl
)
+ set (HDF5_REFERENCE_ERR_FILES
+ h5clear_no_mdc_image.err
+ h5clear_open_fail.err
+ )
foreach (h5_file ${HDF5_TEST_FILES} ${HDF5_SEC2_TEST_FILES} ${HDF5_REFERENCE_TEST_FILES})
HDFTEST_COPY_FILE("${PROJECT_SOURCE_DIR}/testfiles/${h5_file}" "${PROJECT_BINARY_DIR}/testfiles/${h5_file}" "h5clear_files")
endforeach ()
+ foreach (h5_file ${HDF5_REFERENCE_ERR_FILES})
+ HDFTEST_COPY_FILE("${PROJECT_SOURCE_DIR}/testfiles/${h5_file}" "${PROJECT_BINARY_DIR}/testfiles/${h5_file}" "h5clear_files")
+ endforeach ()
# make second copy of h5clear_sec2.h5
foreach (h5_file ${HDF5_SEC2_TEST_FILES})
HDFTEST_COPY_FILE("${PROJECT_SOURCE_DIR}/testfiles/${h5_file}" "${PROJECT_BINARY_DIR}/testfiles/orig_${h5_file}" "h5clear_files")
@@ -108,6 +113,34 @@
endif ()
endmacro ()
+ macro (ADD_H5_ERR_CMP testname resultfile resultcode)
+ if (NOT HDF5_ENABLE_USING_MEMCHECKER)
+ add_test (
+ NAME H5CLEAR_CMP-${testname}-clear-objects
+ COMMAND ${CMAKE_COMMAND}
+ -E remove
+ testfiles/${testname}.out
+ testfiles/${testname}.out.err
+ )
+ if (NOT "${last_test}" STREQUAL "")
+ set_tests_properties (H5CLEAR_CMP-${testname}-clear-objects PROPERTIES DEPENDS ${last_test})
+ endif ()
+ add_test (
+ NAME H5CLEAR_CMP-${testname}
+ COMMAND "${CMAKE_COMMAND}"
+ -D "TEST_PROGRAM=$<TARGET_FILE:h5clear>"
+ -D "TEST_ARGS:STRING=${ARGN}"
+ -D "TEST_FOLDER=${PROJECT_BINARY_DIR}/testfiles"
+ -D "TEST_OUTPUT=${testname}.out"
+ -D "TEST_EXPECT=${resultcode}"
+ -D "TEST_ERRREF=${resultfile}.err"
+ -P "${HDF_RESOURCES_EXT_DIR}/runTest.cmake"
+ )
+ set_tests_properties (H5CLEAR_CMP-${testname} PROPERTIES DEPENDS H5CLEAR_CMP-${testname}-clear-objects)
+ set (last_test "H5CLEAR_CMP-${testname}")
+ endif ()
+ endmacro ()
+
macro (ADD_H5_CMP_WITH_COPY testname resultcode resultfile testfile)
if (NOT HDF5_ENABLE_USING_MEMCHECKER)
add_test (
@@ -144,6 +177,42 @@
endif ()
endmacro ()
+ macro (ADD_H5_ERR_CMP_WITH_COPY testname resultcode resultfile testfile)
+ if (NOT HDF5_ENABLE_USING_MEMCHECKER)
+ add_test (
+ NAME H5CLEAR_CMP-${testname}-clear-objects
+ COMMAND ${CMAKE_COMMAND}
+ -E remove
+ testfiles/${testname}.out
+ testfiles/${testname}.out.err
+ testfiles/${testfile}
+ )
+ if (NOT "${last_test}" STREQUAL "")
+ set_tests_properties (H5CLEAR_CMP-${testname}-clear-objects PROPERTIES DEPENDS ${last_test})
+ endif ()
+ add_test (
+ NAME H5CLEAR_CMP-copy_${testname}
+ COMMAND ${CMAKE_COMMAND}
+ -E copy_if_different
+ "${PROJECT_SOURCE_DIR}/testfiles/${testfile}" "${PROJECT_BINARY_DIR}/testfiles/${testfile}"
+ )
+ set_tests_properties (H5CLEAR_CMP-copy_${testname} PROPERTIES DEPENDS H5CLEAR_CMP-${testname}-clear-objects)
+ add_test (
+ NAME H5CLEAR_CMP-${testname}
+ COMMAND "${CMAKE_COMMAND}"
+ -D "TEST_PROGRAM=$<TARGET_FILE:h5clear>"
+ -D "TEST_ARGS:STRING=${ARGN};${testfile}"
+ -D "TEST_FOLDER=${PROJECT_BINARY_DIR}/testfiles"
+ -D "TEST_OUTPUT=${testname}.out"
+ -D "TEST_EXPECT=${resultcode}"
+ -D "TEST_ERRREF=${resultfile}.err"
+ -P "${HDF_RESOURCES_EXT_DIR}/runTest.cmake"
+ )
+ set_tests_properties (H5CLEAR_CMP-${testname} PROPERTIES DEPENDS H5CLEAR_CMP-copy_${testname})
+ set (last_test "H5CLEAR_CMP-${testname}")
+ endif ()
+ endmacro ()
+
macro (ADD_H5_RETTEST testname resultcode)
if (NOT HDF5_ENABLE_USING_MEMCHECKER)
add_test (
@@ -347,11 +416,11 @@ endif()
ADD_H5_CMP (h5clr_usage_junk h5clear_usage 1 "" junk.h5)
ADD_H5_CMP (h5clr_usage_none h5clear_usage 1 "" orig_h5clear_sec2_v3.h5)
ADD_H5_CMP (h5clr_missing_file_m h5clear_missing_file 1 "-m")
- ADD_H5_CMP (h5clr_open_fail_s h5clear_open_fail 1 "-s" junk.h5)
+ ADD_H5_ERR_CMP (h5clr_open_fail_s h5clear_open_fail 1 "-s" junk.h5)
ADD_H5_CMP (h5clr_missing_file_ms h5clear_missing_file 1 "-m" "-s")
- ADD_H5_CMP (h5clr_open_fail_ms h5clear_open_fail 1 "-m" "-s" junk.h5)
- ADD_H5_CMP (h5clr_no_mdc_image_m h5clear_no_mdc_image 0 "-m" orig_h5clear_sec2_v2.h5)
- ADD_H5_CMP (h5clr_no_mdc_image_ms h5clear_no_mdc_image 0 "-s" "-m" orig_h5clear_sec2_v0.h5)
+ ADD_H5_ERR_CMP (h5clr_open_fail_ms h5clear_open_fail 1 "-m" "-s" junk.h5)
+ ADD_H5_ERR_CMP (h5clr_no_mdc_image_m h5clear_no_mdc_image 0 "-m" orig_h5clear_sec2_v2.h5)
+ ADD_H5_ERR_CMP (h5clr_no_mdc_image_ms h5clear_no_mdc_image 0 "-s" "-m" orig_h5clear_sec2_v0.h5)
#
#
#
@@ -382,8 +451,8 @@ endif()
#
#
# h5clear_mdc_image.h5 already has cache image removed earlier, verify the expected warning from h5clear:
- ADD_H5_CMP (h5clr_mdc_image_m h5clear_no_mdc_image 0 "-m" mod_h5clear_mdc_image.h5)
- ADD_H5_CMP (h5clr_mdc_image_sm h5clear_no_mdc_image 0 "-s" "-m" mod_h5clear_mdc_image2.h5)
+ ADD_H5_ERR_CMP (h5clr_mdc_image_m h5clear_no_mdc_image 0 "-m" mod_h5clear_mdc_image.h5)
+ ADD_H5_ERR_CMP (h5clr_mdc_image_sm h5clear_no_mdc_image 0 "-s" "-m" mod_h5clear_mdc_image2.h5)
#
#
#
@@ -404,7 +473,7 @@ endif()
# "h5clear -s --increment=0 h5clear_status_noclose.h5" (clear status_flag, EOA = MAX(EOA, EOF) + 0)
# (no output, check exit code)
# "h5clear --filesize h5clear_status_noclose.h5" (print EOA/EOF after the last action)
- ADD_H5_CMP_WITH_COPY (h5clr_open_fail_nc_s 1 h5clear_open_fail h5clear_status_noclose.h5 "--filesize")
+ ADD_H5_ERR_CMP_WITH_COPY (h5clr_open_fail_nc_s 1 h5clear_open_fail h5clear_status_noclose.h5 "--filesize")
ADD_H5_RETTEST (h5clr_mdc_image_nc "false" "-s" "--increment=0" h5clear_status_noclose.h5)
ADD_H5_CMP (h5clr_no_mdc_image_nc_m h5clear_status_noclose_after_size 0 "--filesize" h5clear_status_noclose.h5)
#
diff --git a/tools/test/misc/testfiles/h5clear_missing_file.ddl b/tools/test/misc/testfiles/h5clear_missing_file.ddl
index 13eb2c9..32dd549 100644
--- a/tools/test/misc/testfiles/h5clear_missing_file.ddl
+++ b/tools/test/misc/testfiles/h5clear_missing_file.ddl
@@ -20,4 +20,3 @@ h5clear --increment file_name
h5clear --increment=512 file_name
Set the EOA to the maximum of (EOA, EOF) + 512 for the file <file_name>.
-h5clear error: missing file name
diff --git a/tools/test/misc/testfiles/h5clear_missing_file.err b/tools/test/misc/testfiles/h5clear_missing_file.err
new file mode 100644
index 0000000..13eb2c9
--- /dev/null
+++ b/tools/test/misc/testfiles/h5clear_missing_file.err
@@ -0,0 +1,23 @@
+usage: h5clear [OPTIONS] file_name
+ OPTIONS
+ -h, --help Print a usage message and exit
+ -V, --version Print version number and exit
+ -s, --status Clear the status_flags field in the file's superblock
+ -m, --image Remove the metadata cache image from the file
+ --filesize Print the file's EOA and EOF
+ --increment=C Set the file's EOA to the maximum of (EOA, EOF) + C for the file <file_name>
+ C is >= 0; C is optional and will default to 1M when not set
+Examples of use:
+
+h5clear -s file_name
+ Clear the status_flags field in the superblock of the HDF5 file <file_name>.
+
+h5clear -m file_name
+ Remove the metadata cache image from the HDF5 file <file_name>.
+
+h5clear --increment file_name
+ Set the EOA to the maximum of (EOA, EOF) + 1M for the file <file_name>.
+
+h5clear --increment=512 file_name
+ Set the EOA to the maximum of (EOA, EOF) + 512 for the file <file_name>.
+h5clear error: missing file name
diff --git a/tools/test/misc/testfiles/h5clear_no_mdc_image.ddl b/tools/test/misc/testfiles/h5clear_no_mdc_image.err
index f5acd71..f5acd71 100644
--- a/tools/test/misc/testfiles/h5clear_no_mdc_image.ddl
+++ b/tools/test/misc/testfiles/h5clear_no_mdc_image.err
diff --git a/tools/test/misc/testfiles/h5clear_open_fail.ddl b/tools/test/misc/testfiles/h5clear_open_fail.err
index 895ecd4..895ecd4 100644
--- a/tools/test/misc/testfiles/h5clear_open_fail.ddl
+++ b/tools/test/misc/testfiles/h5clear_open_fail.err
diff --git a/tools/testfiles/err_attr_dspace.ddl b/tools/testfiles/err_attr_dspace.ddl
index 6c45322..48ef659 100644
--- a/tools/testfiles/err_attr_dspace.ddl
+++ b/tools/testfiles/err_attr_dspace.ddl
@@ -2,4 +2,3 @@ HDF5 "err_attr_dspace.h5" {
GROUP "/" {
}
}
-h5dump error: error getting attribute information
diff --git a/tools/testfiles/non_existing.ddl b/tools/testfiles/non_existing.ddl
index 4377f8d..4407eae 100644
--- a/tools/testfiles/non_existing.ddl
+++ b/tools/testfiles/non_existing.ddl
@@ -28,4 +28,3 @@ GROUP "/" {
}
}
}
-h5dump error: unable to open file "non_existing.h5"
diff --git a/tools/testfiles/nosuchfile.ls b/tools/testfiles/nosuchfile.ls
index 8c4ee42..e69de29 100644
--- a/tools/testfiles/nosuchfile.ls
+++ b/tools/testfiles/nosuchfile.ls
@@ -1 +0,0 @@
-nosuchfile.h5: unable to open file
diff --git a/tools/testfiles/pbits/tnofilename-with-packed-bits.ddl b/tools/testfiles/pbits/tnofilename-with-packed-bits.ddl
index 0a3beb0..19de76f 100644
--- a/tools/testfiles/pbits/tnofilename-with-packed-bits.ddl
+++ b/tools/testfiles/pbits/tnofilename-with-packed-bits.ddl
@@ -135,4 +135,3 @@ usage: h5dump [OPTIONS] files
h5dump -d /foo -f family fam%05d.h5
-h5dump error: missing file name
diff --git a/tools/testfiles/pbits/tpbitsCharLengthExceeded.ddl b/tools/testfiles/pbits/tpbitsCharLengthExceeded.ddl
index b0683a7..b281827 100644
--- a/tools/testfiles/pbits/tpbitsCharLengthExceeded.ddl
+++ b/tools/testfiles/pbits/tpbitsCharLengthExceeded.ddl
@@ -15,4 +15,3 @@ DATASET "/DS08BITS" {
}
}
}
-h5dump error: Packed Bit offset+length value(9) too large. Max is 8
diff --git a/tools/testfiles/pbits/tpbitsCharOffsetExceeded.ddl b/tools/testfiles/pbits/tpbitsCharOffsetExceeded.ddl
index 530fa05..ee56a5c 100644
--- a/tools/testfiles/pbits/tpbitsCharOffsetExceeded.ddl
+++ b/tools/testfiles/pbits/tpbitsCharOffsetExceeded.ddl
@@ -15,4 +15,3 @@ DATASET "/DS08BITS" {
}
}
}
-h5dump error: Packed Bit offset+length value(9) too large. Max is 8
diff --git a/tools/testfiles/pbits/tpbitsIncomplete.ddl b/tools/testfiles/pbits/tpbitsIncomplete.ddl
index b353065..19de76f 100644
--- a/tools/testfiles/pbits/tpbitsIncomplete.ddl
+++ b/tools/testfiles/pbits/tpbitsIncomplete.ddl
@@ -135,4 +135,3 @@ usage: h5dump [OPTIONS] files
h5dump -d /foo -f family fam%05d.h5
-h5dump error: Bad mask list(0,2,2,1,0,2,2,)
diff --git a/tools/testfiles/pbits/tpbitsIntLengthExceeded.ddl b/tools/testfiles/pbits/tpbitsIntLengthExceeded.ddl
index 1c919cd..1cba6d5 100644
--- a/tools/testfiles/pbits/tpbitsIntLengthExceeded.ddl
+++ b/tools/testfiles/pbits/tpbitsIntLengthExceeded.ddl
@@ -15,4 +15,3 @@ DATASET "/DS16BITS" {
}
}
}
-h5dump error: Packed Bit offset+length value(17) too large. Max is 16
diff --git a/tools/testfiles/pbits/tpbitsIntOffsetExceeded.ddl b/tools/testfiles/pbits/tpbitsIntOffsetExceeded.ddl
index f3b2a8c..330d61f 100644
--- a/tools/testfiles/pbits/tpbitsIntOffsetExceeded.ddl
+++ b/tools/testfiles/pbits/tpbitsIntOffsetExceeded.ddl
@@ -15,4 +15,3 @@ DATASET "/DS16BITS" {
}
}
}
-h5dump error: Packed Bit offset+length value(17) too large. Max is 16
diff --git a/tools/testfiles/pbits/tpbitsLengthExceeded.ddl b/tools/testfiles/pbits/tpbitsLengthExceeded.ddl
index ffe0da9..19de76f 100644
--- a/tools/testfiles/pbits/tpbitsLengthExceeded.ddl
+++ b/tools/testfiles/pbits/tpbitsLengthExceeded.ddl
@@ -135,4 +135,3 @@ usage: h5dump [OPTIONS] files
h5dump -d /foo -f family fam%05d.h5
-h5dump error: Packed Bit offset+length value(65) too large. Max is 64
diff --git a/tools/testfiles/pbits/tpbitsLengthPositive.ddl b/tools/testfiles/pbits/tpbitsLengthPositive.ddl
index 4502143..19de76f 100644
--- a/tools/testfiles/pbits/tpbitsLengthPositive.ddl
+++ b/tools/testfiles/pbits/tpbitsLengthPositive.ddl
@@ -135,4 +135,3 @@ usage: h5dump [OPTIONS] files
h5dump -d /foo -f family fam%05d.h5
-h5dump error: Packed Bit length value(0) must be positive.
diff --git a/tools/testfiles/pbits/tpbitsLongLengthExceeded.ddl b/tools/testfiles/pbits/tpbitsLongLengthExceeded.ddl
index 812c300..44ec077 100644
--- a/tools/testfiles/pbits/tpbitsLongLengthExceeded.ddl
+++ b/tools/testfiles/pbits/tpbitsLongLengthExceeded.ddl
@@ -23,4 +23,3 @@ DATASET "/DS32BITS" {
}
}
}
-h5dump error: Packed Bit offset+length value(33) too large. Max is 32
diff --git a/tools/testfiles/pbits/tpbitsLongOffsetExceeded.ddl b/tools/testfiles/pbits/tpbitsLongOffsetExceeded.ddl
index cbea722..c775557 100644
--- a/tools/testfiles/pbits/tpbitsLongOffsetExceeded.ddl
+++ b/tools/testfiles/pbits/tpbitsLongOffsetExceeded.ddl
@@ -23,4 +23,3 @@ DATASET "/DS32BITS" {
}
}
}
-h5dump error: Packed Bit offset+length value(33) too large. Max is 32
diff --git a/tools/testfiles/pbits/tpbitsMaxExceeded.ddl b/tools/testfiles/pbits/tpbitsMaxExceeded.ddl
index 011f6c9..19de76f 100644
--- a/tools/testfiles/pbits/tpbitsMaxExceeded.ddl
+++ b/tools/testfiles/pbits/tpbitsMaxExceeded.ddl
@@ -135,4 +135,3 @@ usage: h5dump [OPTIONS] files
h5dump -d /foo -f family fam%05d.h5
-h5dump error: Too many masks requested (max. 8). Mask list(0,1,0,1,1,1,2,1,3,1,4,1,5,1,6,1,7,1)
diff --git a/tools/testfiles/pbits/tpbitsOffsetExceeded.ddl b/tools/testfiles/pbits/tpbitsOffsetExceeded.ddl
index 857fe62..19de76f 100644
--- a/tools/testfiles/pbits/tpbitsOffsetExceeded.ddl
+++ b/tools/testfiles/pbits/tpbitsOffsetExceeded.ddl
@@ -135,4 +135,3 @@ usage: h5dump [OPTIONS] files
h5dump -d /foo -f family fam%05d.h5
-h5dump error: Packed Bit offset value(64) must be between 0 and 63
diff --git a/tools/testfiles/pbits/tpbitsOffsetNegative.ddl b/tools/testfiles/pbits/tpbitsOffsetNegative.ddl
index 9ac1160..19de76f 100644
--- a/tools/testfiles/pbits/tpbitsOffsetNegative.ddl
+++ b/tools/testfiles/pbits/tpbitsOffsetNegative.ddl
@@ -135,4 +135,3 @@ usage: h5dump [OPTIONS] files
h5dump -d /foo -f family fam%05d.h5
-h5dump error: Bad mask list(-1,1)
diff --git a/tools/testfiles/texceedsubblock.ddl b/tools/testfiles/texceedsubblock.ddl
index 499e0d2..69ec706 100644
--- a/tools/testfiles/texceedsubblock.ddl
+++ b/tools/testfiles/texceedsubblock.ddl
@@ -1,3 +1,2 @@
HDF5 "taindices.h5" {
}
-h5dump error: number of block dims (2) exceed dataset dims (1)
diff --git a/tools/testfiles/texceedsubcount.ddl b/tools/testfiles/texceedsubcount.ddl
index 81e8c4a..69ec706 100644
--- a/tools/testfiles/texceedsubcount.ddl
+++ b/tools/testfiles/texceedsubcount.ddl
@@ -1,3 +1,2 @@
HDF5 "taindices.h5" {
}
-h5dump error: number of count dims (2) exceed dataset dims (1)
diff --git a/tools/testfiles/texceedsubstart.ddl b/tools/testfiles/texceedsubstart.ddl
index cb535a0..69ec706 100644
--- a/tools/testfiles/texceedsubstart.ddl
+++ b/tools/testfiles/texceedsubstart.ddl
@@ -1,3 +1,2 @@
HDF5 "taindices.h5" {
}
-h5dump error: number of start dims (2) exceed dataset dims (1)
diff --git a/tools/testfiles/texceedsubstride.ddl b/tools/testfiles/texceedsubstride.ddl
index bf85997..69ec706 100644
--- a/tools/testfiles/texceedsubstride.ddl
+++ b/tools/testfiles/texceedsubstride.ddl
@@ -1,3 +1,2 @@
HDF5 "taindices.h5" {
}
-h5dump error: number of stride dims (2) exceed dataset dims (1)
diff --git a/tools/testfiles/textlinksrc-nodangle-1.ls b/tools/testfiles/textlinksrc-nodangle-1.ls
index 6d1da9e..491f696 100644
--- a/tools/testfiles/textlinksrc-nodangle-1.ls
+++ b/tools/testfiles/textlinksrc-nodangle-1.ls
@@ -56,5 +56,3 @@ usage: h5ls [OPTIONS] file[/OBJECT] [file[/[OBJECT]...]
Replaced by --follow-symlinks.
-e, --errors Show all HDF5 error reporting
Replaced by --enable-error-stack.
-Error: --no-dangling-links must be used along with --follow-symlinks option!
-
diff --git a/tools/testfiles/tgroup-1.ls b/tools/testfiles/tgroup-1.ls
index 069d43e..491f696 100644
--- a/tools/testfiles/tgroup-1.ls
+++ b/tools/testfiles/tgroup-1.ls
@@ -56,5 +56,3 @@ usage: h5ls [OPTIONS] file[/OBJECT] [file[/[OBJECT]...]
Replaced by --follow-symlinks.
-e, --errors Show all HDF5 error reporting
Replaced by --enable-error-stack.
-Error: 'recursive' option not compatible with 'group info' option!
-
diff --git a/tools/testfiles/tstarfile.ddl b/tools/testfiles/tstarfile.ddl
index 87c3f87..1cd87f7 100644
--- a/tools/testfiles/tstarfile.ddl
+++ b/tools/testfiles/tstarfile.ddl
@@ -86,4 +86,3 @@ HDF5-DIAG: Error detected in HDF5 (version (number)) thread (IDs):
#004: (file name) line (number) in H5L_get_info_cb(): name doesn't exist
major: Symbol table
minor: Object not found
-h5dump error: unable to get link info from "Dataset1"