summaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorAllen Byrne <byrn@hdfgroup.org>2017-10-18 19:03:27 (GMT)
committerAllen Byrne <byrn@hdfgroup.org>2017-10-18 19:03:27 (GMT)
commitcf3342f8fc53108e831b208d8ccb48628fb23e51 (patch)
treebfaab707066a9625899fb93cc2f300dfed0ee2f9 /tools
parent78a5870680770a8827c0e1e805688be30d1a33a7 (diff)
downloadhdf5-cf3342f8fc53108e831b208d8ccb48628fb23e51.zip
hdf5-cf3342f8fc53108e831b208d8ccb48628fb23e51.tar.gz
hdf5-cf3342f8fc53108e831b208d8ccb48628fb23e51.tar.bz2
Fix tools error handling and valgrind issues
Diffstat (limited to 'tools')
-rw-r--r--tools/lib/h5diff_dset.c4
-rw-r--r--tools/lib/h5tools_filters.c8
-rw-r--r--tools/src/h5repack/h5repack.c17
-rw-r--r--tools/src/h5repack/h5repack_copy.c21
-rw-r--r--tools/src/h5repack/h5repack_refs.c32
-rw-r--r--tools/test/h5copy/CMakeTests.cmake52
-rw-r--r--tools/test/h5copy/testfiles/h5copy_plugin_fail.out.h5.txt3
-rw-r--r--tools/test/h5copy/testfiles/h5copy_plugin_test.out.h5.txt3
-rw-r--r--tools/test/h5copy/testfiles/tudfilter.h5.txt2
-rw-r--r--tools/test/h5copy/testfiles/tudfilter.h5_ERR.txt2
-rw-r--r--tools/test/h5diff/CMakeTests.cmake2
-rw-r--r--tools/test/h5diff/testfiles/h5diff_udfail.txt10
-rw-r--r--tools/test/h5format_convert/testfiles/h5fc_v_err.ddl7
-rw-r--r--tools/test/h5repack/CMakeTests.cmake4
-rw-r--r--tools/test/h5repack/h5repacktst.c6
15 files changed, 114 insertions, 59 deletions
diff --git a/tools/lib/h5diff_dset.c b/tools/lib/h5diff_dset.c
index bea008c..b03295b 100644
--- a/tools/lib/h5diff_dset.c
+++ b/tools/lib/h5diff_dset.c
@@ -74,8 +74,10 @@ hsize_t diff_dataset(hid_t file1_id,
else if (status < 0) {
HGOTO_ERROR(1, H5E_tools_min_id_g, "h5tools_canreadf failed");
}
- else
+ else {
+ ret_value = 1;
opts->not_cmp = 1;
+ }
done:
opts->err_stat = opts->err_stat | ret_value;
diff --git a/tools/lib/h5tools_filters.c b/tools/lib/h5tools_filters.c
index 132e69a..db61d51 100644
--- a/tools/lib/h5tools_filters.c
+++ b/tools/lib/h5tools_filters.c
@@ -18,7 +18,7 @@
* print a warning message
*-------------------------------------------------------------------------
*/
-static void print_warning(const char *dname, const char *fname)
+static void print_filter_warning(const char *dname, const char *fname)
{
fprintf(stderr,
"Warning: dataset <%s> cannot be read, %s filter is not available\n",
@@ -73,7 +73,7 @@ h5tools_canreadf(const char* name, /* object name, serves also as boolean pr
}
else if (!udfilter_avail) {
if (name)
- print_warning(name, "user defined");
+ print_filter_warning(name, "user defined");
ret_value = 0;
}
break;
@@ -85,7 +85,7 @@ h5tools_canreadf(const char* name, /* object name, serves also as boolean pr
case H5Z_FILTER_DEFLATE:
#ifndef H5_HAVE_FILTER_DEFLATE
if (name)
- print_warning(name,"deflate");
+ print_filter_warning(name,"deflate");
ret_value = 0;
#endif
break;
@@ -96,7 +96,7 @@ h5tools_canreadf(const char* name, /* object name, serves also as boolean pr
case H5Z_FILTER_SZIP:
#ifndef H5_HAVE_FILTER_SZIP
if (name)
- print_warning(name,"SZIP");
+ print_filter_warning(name,"SZIP");
ret_value = 0;
#endif
break;
diff --git a/tools/src/h5repack/h5repack.c b/tools/src/h5repack/h5repack.c
index eaca0a5..14b9461 100644
--- a/tools/src/h5repack/h5repack.c
+++ b/tools/src/h5repack/h5repack.c
@@ -227,7 +227,6 @@ hid_t copy_named_datatype(hid_t type_in, hid_t fidout,
/* Stack already exists, search for the datatype */
while (dt && dt->addr_in != oinfo.addr)
dt = dt->next;
-
dt_ret = dt;
}
else {
@@ -286,7 +285,7 @@ hid_t copy_named_datatype(hid_t type_in, hid_t fidout,
/* Increment the ref count on id_out, because the calling function will try to close it */
if(H5Iinc_ref(ret_value) < 0)
- ret_value = -1;
+ HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Iinc_ref failed");
done:
return ret_value;
@@ -426,7 +425,8 @@ copy_attr(hid_t loc_in, hid_t loc_out, named_dt_t **named_dt_head_p,
base_type = H5Tget_super(ftype_id);
is_ref = (is_ref || (H5Tget_class(base_type) == H5T_REFERENCE));
- H5Tclose(base_type);
+ if (H5Tclose(base_type) < 0)
+ H5TOOLS_INFO(H5E_tools_min_id_g, "H5Tclose base_type failed");
}
if (type_class == H5T_COMPOUND) {
@@ -435,7 +435,8 @@ copy_attr(hid_t loc_in, hid_t loc_out, named_dt_t **named_dt_head_p,
for (j = 0; j < nmembers; j++) {
hid_t mtid = H5Tget_member_type(wtype_id, (unsigned)j);
H5T_class_t mtclass = H5Tget_class(mtid);
- H5Tclose(mtid);
+ if (H5Tclose(mtid) < 0)
+ H5TOOLS_INFO(H5E_tools_min_id_g, "H5Tclose mtid failed");
if (mtclass == H5T_REFERENCE) {
is_ref = 1;
@@ -486,17 +487,19 @@ copy_attr(hid_t loc_in, hid_t loc_out, named_dt_t **named_dt_head_p,
* close
*-------------------------------------------------------------------------
*/
- if (H5Aclose(attr_out) < 0)
- HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Aclose failed");
if (H5Sclose(space_id) < 0)
HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Sclose failed");
+ space_id = -1;
if (H5Tclose(wtype_id) < 0)
HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Tclose failed");
+ wtype_id = -1;
if (H5Tclose(ftype_id) < 0)
HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Tclose failed");
+ ftype_id = -1;
if (H5Aclose(attr_id) < 0)
HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Aclose failed");
- } /* u */
+ attr_id = -1;
+ } /* for u */
done:
H5E_BEGIN_TRY {
diff --git a/tools/src/h5repack/h5repack_copy.c b/tools/src/h5repack/h5repack_copy.c
index 7c3dfa5..b043047 100644
--- a/tools/src/h5repack/h5repack_copy.c
+++ b/tools/src/h5repack/h5repack_copy.c
@@ -1175,6 +1175,7 @@ int do_copy_objects(hid_t fidin, hid_t fidout, trav_table_t *travt,
HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Tclose failed");
if (H5Tclose(type_out) < 0)
HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Tclose failed");
+ type_out = -1; /* named datatypes stack, named_dt_head, manages allocation */
break;
@@ -1205,6 +1206,18 @@ int do_copy_objects(hid_t fidin, hid_t fidout, trav_table_t *travt,
} /* end if */
done:
+
+ /* Finalize (link) the stack of named datatypes (if any) first
+ * because of reference counting */
+ if (0 == ret_value && named_dt_head != NULL) {
+ if (named_datatype_free(&named_dt_head, 0) < 0)
+ H5TOOLS_INFO(H5E_tools_min_id_g, "named_datatype_free failed");
+ }
+ else
+ H5E_BEGIN_TRY {
+ named_datatype_free(&named_dt_head, 1);
+ } H5E_END_TRY;
+
H5E_BEGIN_TRY
{
H5Gclose(grp_in);
@@ -1227,14 +1240,6 @@ done:
if (hslab_buf != NULL)
HDfree(hslab_buf);
- /* Finalize (link) the stack of named datatypes (if any) */
- if (0 == ret_value && named_dt_head != NULL)
- named_datatype_free(&named_dt_head, 0);
- else
- H5E_BEGIN_TRY {
- named_datatype_free(&named_dt_head, 1);
- } H5E_END_TRY;
-
return ret_value;
}
diff --git a/tools/src/h5repack/h5repack_refs.c b/tools/src/h5repack/h5repack_refs.c
index 376ab92..14294ea 100644
--- a/tools/src/h5repack/h5repack_refs.c
+++ b/tools/src/h5repack/h5repack_refs.c
@@ -189,7 +189,8 @@ int do_copy_refobjs(hid_t fidin,
refname);
}
} /*refname*/
- H5Oclose(refobj_id);
+ if (H5Oclose(refobj_id) < 0)
+ H5TOOLS_INFO(H5E_tools_min_id_g, "H5Oclose refob failed");
} /* u */
} /*nelmts*/
@@ -276,7 +277,8 @@ int do_copy_refobjs(hid_t fidin,
refname);
}
} /*refname*/
- H5Oclose(refobj_id);
+ if (H5Oclose(refobj_id) < 0)
+ H5TOOLS_INFO(H5E_tools_min_id_g, "H5Oclose refobj_id failed");
} /* u */
} /*nelmts*/
@@ -377,7 +379,8 @@ int do_copy_refobjs(hid_t fidin,
* This function is paired with copy_named_datatype() which is called
* in copy_attr(), so need to free.
*/
- named_datatype_free(&named_dt_head, 0);
+ if (named_datatype_free(&named_dt_head, 0) < 0)
+ H5TOOLS_INFO(H5E_tools_min_id_g, "named_datatype_free failed");
return ret_value;
@@ -392,7 +395,7 @@ done:
H5Tclose(ftype_id);
H5Tclose(mtype_id);
H5Tclose(type_in);
- named_datatype_free(&named_dt_head, 0);
+ named_datatype_free(&named_dt_head, 1);
} H5E_END_TRY;
return ret_value;
@@ -483,7 +486,8 @@ static int copy_refs_attr(hid_t loc_in,
base_type = H5Tget_super(ftype_id);
is_ref_vlen = (H5Tget_class(base_type) == H5T_REFERENCE);
msize = H5Tget_size(base_type);
- H5Tclose(base_type);
+ if (H5Tclose(base_type) < 0)
+ H5TOOLS_INFO(H5E_tools_min_id_g, "H5Tclose base_type failed");
}
else if(type_class == H5T_ARRAY ) {
hid_t base_type;
@@ -491,7 +495,8 @@ static int copy_refs_attr(hid_t loc_in,
base_type = H5Tget_super(ftype_id);
is_ref_array = (H5Tget_class(base_type) == H5T_REFERENCE);
msize = H5Tget_size(base_type);
- H5Tclose(base_type);
+ if (H5Tclose(base_type) < 0)
+ H5TOOLS_INFO(H5E_tools_min_id_g, "H5Tclose base_type failed");
}
else if(type_class == H5T_COMPOUND) {
int nmembers = H5Tget_nmembers(ftype_id) ;
@@ -511,7 +516,8 @@ static int copy_refs_attr(hid_t loc_in,
ref_comp_size[ref_comp_field_n] = H5Tget_size(mtid);
ref_comp_field_n++;
}
- H5Tclose(mtid);
+ if (H5Tclose(mtid) < 0)
+ H5TOOLS_INFO(H5E_tools_min_id_g, "H5Tclose mtid failed");
}
/* if compound don't contain reference type member, free the above
@@ -533,9 +539,12 @@ static int copy_refs_attr(hid_t loc_in,
is_ref_comp = (ref_comp_field_n > 0);
if (!(is_ref || is_ref_vlen || is_ref_array || is_ref_comp)) {
- H5Tclose(mtype_id);
- H5Tclose(ftype_id);
- H5Aclose(attr_id);
+ if (H5Tclose(mtype_id) < 0)
+ H5TOOLS_INFO(H5E_tools_min_id_g, "H5Tclose mtype_id failed");
+ if (H5Tclose(ftype_id) < 0)
+ H5TOOLS_INFO(H5E_tools_min_id_g, "H5Tclose ftype_id failed");
+ if (H5Aclose(attr_id) < 0)
+ H5TOOLS_INFO(H5E_tools_min_id_g, "H5Aclose attr_id failed");
continue;
}
@@ -568,7 +577,8 @@ static int copy_refs_attr(hid_t loc_in,
base_type = H5Tget_super(ftype_id);
msize = H5Tget_size(base_type);
- H5Tclose(base_type);
+ if (H5Tclose(base_type) < 0)
+ H5TOOLS_INFO(H5E_tools_min_id_g, "H5Tclose base_type failed");
array_rank = (unsigned)H5Tget_array_ndims(mtype_id);
H5Tget_array_dims2(mtype_id, array_dims);
diff --git a/tools/test/h5copy/CMakeTests.cmake b/tools/test/h5copy/CMakeTests.cmake
index f9733cf..616a459 100644
--- a/tools/test/h5copy/CMakeTests.cmake
+++ b/tools/test/h5copy/CMakeTests.cmake
@@ -32,6 +32,8 @@
${HDF5_TOOLS_TEST_H5COPY_SOURCE_DIR}/testfiles/h5copy_misc1.out
${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.out.h5.txt
+ ${HDF5_TOOLS_TEST_H5COPY_SOURCE_DIR}/testfiles/h5copy_plugin_test.out.h5.txt
)
file (MAKE_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles")
@@ -80,7 +82,7 @@
NAME H5COPY_F-${testname}-DIFF
COMMAND $<TARGET_FILE:h5diff> -v ./testfiles/${infile} ./testfiles/${testname}.out.h5 ${srcname} ${dstname}
)
- SET_TESTS_PROPERTIES(H5COPY_F-${testname}-DIFF PROPERTIES DEPENDS H5COPY_F-${testname})
+ set_tests_properties (H5COPY_F-${testname}-DIFF PROPERTIES DEPENDS H5COPY_F-${testname})
if ("${resultcode}" STREQUAL "1")
set_tests_properties (H5COPY_F-${testname}-DIFF PROPERTIES WILL_FAIL "true")
endif ()
@@ -116,7 +118,7 @@
NAME H5COPY-${testname}-DIFF
COMMAND $<TARGET_FILE:h5diff> -v ./testfiles/${infile} ./testfiles/${testname}.out.h5 ${srcname} ${dstname}
)
- SET_TESTS_PROPERTIES(H5COPY-${testname}-DIFF PROPERTIES DEPENDS H5COPY-${testname})
+ set_tests_properties (H5COPY-${testname}-DIFF PROPERTIES DEPENDS H5COPY-${testname})
if ("${resultcode}" STREQUAL "1")
set_tests_properties (H5COPY-${testname}-DIFF PROPERTIES WILL_FAIL "true")
endif ()
@@ -166,7 +168,7 @@
NAME H5COPY-${testname}-DIFF
COMMAND $<TARGET_FILE:h5diff> -v ./testfiles/${infile} ./testfiles/${testname}.out.h5 ${srcname} ${dstname}
)
- SET_TESTS_PROPERTIES(H5COPY-${testname}-DIFF PROPERTIES DEPENDS H5COPY-${testname})
+ set_tests_properties (H5COPY-${testname}-DIFF PROPERTIES DEPENDS H5COPY-${testname})
if ("${resultcode}" STREQUAL "1")
set_tests_properties (H5COPY-${testname}-DIFF PROPERTIES WILL_FAIL "true")
endif ()
@@ -207,7 +209,7 @@
NAME H5COPY_SAME-${testname}-DIFF
COMMAND $<TARGET_FILE:h5diff> -v ./testfiles/${testname}.out.h5 ./testfiles/${testname}.out.h5 ${srcname} ${dstname}
)
- SET_TESTS_PROPERTIES(H5COPY_SAME-${testname}-DIFF PROPERTIES DEPENDS H5COPY_SAME-${testname})
+ set_tests_properties (H5COPY_SAME-${testname}-DIFF PROPERTIES DEPENDS H5COPY_SAME-${testname})
if ("${resultcode}" STREQUAL "1")
set_tests_properties (H5COPY_SAME-${testname}-DIFF PROPERTIES WILL_FAIL "true")
endif ()
@@ -295,16 +297,23 @@
-D "TEST_ENV_VALUE=${CMAKE_BINARY_DIR}/plugins"
-P "${HDF_RESOURCES_EXT_DIR}/runTest.cmake"
)
- add_test (
- NAME H5COPY_UD-${testname}-DIFF
- COMMAND $<TARGET_FILE:h5diff> -v ./testfiles/${cmpfile} ./testfiles/${testname}.out.h5 ${srcname} ${dstname}
- )
- SET_TESTS_PROPERTIES(H5COPY_UD-${testname}-DIFF PROPERTIES DEPENDS H5COPY_UD-${testname})
- if ("${resultcode}" STREQUAL "1")
- set_tests_properties (H5COPY_UD-${testname}-DIFF PROPERTIES WILL_FAIL "true")
- endif ()
endif ()
set_tests_properties (H5COPY_UD-${testname} PROPERTIES DEPENDS H5COPY_UD-${testname}-clear-objects)
+ add_test (
+ NAME H5COPY_UD-${testname}-DIFF
+ COMMAND "${CMAKE_COMMAND}"
+ -D "TEST_PROGRAM=$<TARGET_FILE:h5diff-shared>"
+ -D "TEST_ARGS:STRING=-v;./testfiles/${cmpfile};./testfiles/${testname}.out.h5;${srcname};${dstname}"
+ -D "TEST_FOLDER=${PROJECT_BINARY_DIR}"
+ -D "TEST_OUTPUT=./testfiles/${testname}.out.h5.out"
+ -D "TEST_EXPECT=${resultcode}"
+ -D "TEST_REFERENCE=./testfiles/${testname}.out.h5.txt"
+ -D "TEST_APPEND=EXIT CODE:"
+ -D "TEST_ENV_VAR=HDF5_PLUGIN_PATH"
+ -D "TEST_ENV_VALUE=${CMAKE_BINARY_DIR}/plugins"
+ -P "${HDF_RESOURCES_EXT_DIR}/runTest.cmake"
+ )
+ set_tests_properties (H5COPY_UD-${testname}-DIFF PROPERTIES DEPENDS H5COPY_UD-${testname})
endif ()
endmacro ()
@@ -327,7 +336,7 @@
-D "TEST_ARGS:STRING=-v;--enable-error-stack;-i;./testfiles/${infile};-o;./testfiles/${testname}_ERR.out.h5;${sparam};${srcname};${dparam};${dstname}"
-D "TEST_FOLDER=${PROJECT_BINARY_DIR}"
-D "TEST_OUTPUT=./testfiles/${infile}_ERR.out"
- -D "TEST_EXPECT=${resultcode}"
+ -D "TEST_EXPECT=0"
-D "TEST_REFERENCE=./testfiles/${infile}_ERR.txt"
-D "TEST_MASK_ERROR=true"
-D "TEST_APPEND=EXIT CODE:"
@@ -353,6 +362,21 @@
)
endif ()
set_tests_properties (H5COPY_UD_ERR-${testname} PROPERTIES DEPENDS H5COPY_UD_ERR-${testname}-clearall-objects)
+ add_test (
+ NAME H5COPY_UD_ERR-${testname}-DIFF
+ COMMAND "${CMAKE_COMMAND}"
+ -D "TEST_PROGRAM=$<TARGET_FILE:h5diff-shared>"
+ -D "TEST_ARGS:STRING=-v;./testfiles/${cmpfile};./testfiles/${testname}.out.h5;${srcname};${dstname}"
+ -D "TEST_FOLDER=${PROJECT_BINARY_DIR}"
+ -D "TEST_OUTPUT=./testfiles/${testname}.out.h5.out"
+ -D "TEST_EXPECT=0"
+ -D "TEST_REFERENCE=./testfiles/${testname}.out.h5.txt"
+ -D "TEST_APPEND=EXIT CODE:"
+ -D "TEST_ENV_VAR=HDF5_PLUGIN_PATH"
+ -D "TEST_ENV_VALUE=${CMAKE_BINARY_DIR}/plugins"
+ -P "${HDF_RESOURCES_EXT_DIR}/runTest.cmake"
+ )
+ set_tests_properties (H5COPY_UD_ERR-${testname}-DIFF PROPERTIES DEPENDS H5COPY_UD_ERR-${testname})
endif ()
endmacro ()
@@ -546,5 +570,5 @@
##############################################################################
if (BUILD_SHARED_LIBS)
ADD_H5_UD_TEST (h5copy_plugin_test 0 tudfilter.h5 -s /dynlibud -d /dynlibud tudfilter2.h5 )
- ADD_H5_UD_TEST (h5copy_plugin_fail 2 tudfilter.h5 -s /dynlibud -d /dynlibud tudfilter2.h5)
+ ADD_H5_UD_ERR_TEST (h5copy_plugin_fail 2 tudfilter.h5 -s /dynlibud -d /dynlibud tudfilter2.h5)
endif ()
diff --git a/tools/test/h5copy/testfiles/h5copy_plugin_fail.out.h5.txt b/tools/test/h5copy/testfiles/h5copy_plugin_fail.out.h5.txt
new file mode 100644
index 0000000..66e9eb2
--- /dev/null
+++ b/tools/test/h5copy/testfiles/h5copy_plugin_fail.out.h5.txt
@@ -0,0 +1,3 @@
+dataset: </dynlibud> and </dynlibud>
+0 differences found
+EXIT CODE: 0
diff --git a/tools/test/h5copy/testfiles/h5copy_plugin_test.out.h5.txt b/tools/test/h5copy/testfiles/h5copy_plugin_test.out.h5.txt
new file mode 100644
index 0000000..66e9eb2
--- /dev/null
+++ b/tools/test/h5copy/testfiles/h5copy_plugin_test.out.h5.txt
@@ -0,0 +1,3 @@
+dataset: </dynlibud> and </dynlibud>
+0 differences found
+EXIT CODE: 0
diff --git a/tools/test/h5copy/testfiles/tudfilter.h5.txt b/tools/test/h5copy/testfiles/tudfilter.h5.txt
index 8f3d0b5..eabe407 100644
--- a/tools/test/h5copy/testfiles/tudfilter.h5.txt
+++ b/tools/test/h5copy/testfiles/tudfilter.h5.txt
@@ -1,2 +1,2 @@
-Copying file <./testfiles/tudfilter.h5> and object </dynlibud> to file <./testfiles/h5copy_plugin_fail.out.h5> and object </dynlibud>
+Copying file <./testfiles/tudfilter.h5> and object </dynlibud> to file <./testfiles/h5copy_plugin_test.out.h5> and object </dynlibud>
EXIT CODE: 0
diff --git a/tools/test/h5copy/testfiles/tudfilter.h5_ERR.txt b/tools/test/h5copy/testfiles/tudfilter.h5_ERR.txt
index 8f3d0b5..3c5b3ca 100644
--- a/tools/test/h5copy/testfiles/tudfilter.h5_ERR.txt
+++ b/tools/test/h5copy/testfiles/tudfilter.h5_ERR.txt
@@ -1,2 +1,2 @@
-Copying file <./testfiles/tudfilter.h5> and object </dynlibud> to file <./testfiles/h5copy_plugin_fail.out.h5> and object </dynlibud>
+Copying file <./testfiles/tudfilter.h5> and object </dynlibud> to file <./testfiles/h5copy_plugin_fail_ERR.out.h5> and object </dynlibud>
EXIT CODE: 0
diff --git a/tools/test/h5diff/CMakeTests.cmake b/tools/test/h5diff/CMakeTests.cmake
index b5dd820..d87a47f 100644
--- a/tools/test/h5diff/CMakeTests.cmake
+++ b/tools/test/h5diff/CMakeTests.cmake
@@ -1655,7 +1655,7 @@ ADD_H5_TEST (h5diff_v3 0 -c ${FILEV1} ${FILEV2})
##############################################################################
if (BUILD_SHARED_LIBS)
ADD_H5_UD_TEST (h5diff_plugin_test 0 h5diff_ud -v tudfilter.h5 tudfilter2.h5)
- ADD_H5_UD_TEST (h5diff_plugin_fail 0 h5diff_udfail -v tudfilter.h5 tudfilter2.h5)
+ ADD_H5_UD_TEST (h5diff_plugin_fail 2 h5diff_udfail -v tudfilter.h5 tudfilter2.h5)
endif ()
# ##############################################################################
diff --git a/tools/test/h5diff/testfiles/h5diff_udfail.txt b/tools/test/h5diff/testfiles/h5diff_udfail.txt
index aac5528..d51de38 100644
--- a/tools/test/h5diff/testfiles/h5diff_udfail.txt
+++ b/tools/test/h5diff/testfiles/h5diff_udfail.txt
@@ -1,16 +1,12 @@
file1 file2
---------------------------------------
- x x /
- x x /dynlibud
+ x x /
+ x x /dynlibud
group : </> and </>
0 differences found
dataset: </dynlibud> and </dynlibud>
0 differences found
---------------------------------
-Some objects are not comparable
---------------------------------
-Use -c for a list of objects without details of differences.
Warning: dataset </dynlibud> cannot be read, user defined filter is not available
-EXIT CODE: 0
+EXIT CODE: 2
diff --git a/tools/test/h5format_convert/testfiles/h5fc_v_err.ddl b/tools/test/h5format_convert/testfiles/h5fc_v_err.ddl
index b671db0..fa2f078 100644
--- a/tools/test/h5format_convert/testfiles/h5fc_v_err.ddl
+++ b/tools/test/h5format_convert/testfiles/h5fc_v_err.ddl
@@ -11,3 +11,10 @@ Converting the dataset...
Error encountered
Close the file
h5format_convert error: unable to downgrade dataset "/DSET_ERR"
+H5tools-DIAG: Error detected in HDF5:tools (1.11.0) thread 0:
+ #000: /home/byrn/HDF_Projects/hdf5/dev/tools/lib/h5trav.c line 1062 in h5trav_visit(): traverse failed
+ major: Failure in tools library
+ minor: error in function
+ #001: /home/byrn/HDF_Projects/hdf5/dev/tools/lib/h5trav.c line 290 in traverse(): H5Lvisit_by_name failed
+ major: Failure in tools library
+ minor: error in function
diff --git a/tools/test/h5repack/CMakeTests.cmake b/tools/test/h5repack/CMakeTests.cmake
index 559dd88..13ebd17 100644
--- a/tools/test/h5repack/CMakeTests.cmake
+++ b/tools/test/h5repack/CMakeTests.cmake
@@ -275,12 +275,12 @@
endif ()
add_test (
NAME H5REPACK-${testname}
- COMMAND $<TARGET_FILE:h5repack> ${ARGN} ${PROJECT_BINARY_DIR}/testfiles/${testfile} ${PROJECT_BINARY_DIR}/testfiles/out-${testname}.${testfile}
+ COMMAND $<TARGET_FILE:h5repack> --enable-error-stack ${ARGN} ${PROJECT_BINARY_DIR}/testfiles/${testfile} ${PROJECT_BINARY_DIR}/testfiles/out-${testname}.${testfile}
)
set_tests_properties (H5REPACK-${testname} PROPERTIES DEPENDS H5REPACK-${testname}-clear-objects)
add_test (
NAME H5REPACK-${testname}_DFF
- COMMAND $<TARGET_FILE:h5diff> ${PROJECT_BINARY_DIR}/testfiles/${testfile} ${PROJECT_BINARY_DIR}/testfiles/out-${testname}.${testfile}
+ COMMAND $<TARGET_FILE:h5diff> --enable-error-stack ${PROJECT_BINARY_DIR}/testfiles/${testfile} ${PROJECT_BINARY_DIR}/testfiles/out-${testname}.${testfile}
)
set_tests_properties (H5REPACK-${testname}_DFF PROPERTIES DEPENDS H5REPACK-${testname})
endif ()
diff --git a/tools/test/h5repack/h5repacktst.c b/tools/test/h5repack/h5repacktst.c
index 264550e..f6166da 100644
--- a/tools/test/h5repack/h5repacktst.c
+++ b/tools/test/h5repack/h5repacktst.c
@@ -3041,9 +3041,9 @@ int make_all_filters(hid_t loc_id)
/* close */
if(H5Tclose(dtid) < 0)
- return -1;
+ goto out;
if(H5Dclose(dsid) < 0)
- return -1;
+ goto out;
if(H5Sclose(sid) < 0)
goto out;
@@ -3055,6 +3055,8 @@ int make_all_filters(hid_t loc_id)
out:
H5E_BEGIN_TRY
{
+ H5Tclose(dtid);
+ H5Dclose(dsid);
H5Pclose(dcpl);
H5Sclose(sid);
} H5E_END_TRY;