summaryrefslogtreecommitdiffstats
path: root/tools/test/h5repack
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/test/h5repack
parent78a5870680770a8827c0e1e805688be30d1a33a7 (diff)
downloadhdf5-cf3342f8fc53108e831b208d8ccb48628fb23e51.zip
hdf5-cf3342f8fc53108e831b208d8ccb48628fb23e51.tar.gz
hdf5-cf3342f8fc53108e831b208d8ccb48628fb23e51.tar.bz2
Fix tools error handling and valgrind issues
Diffstat (limited to 'tools/test/h5repack')
-rw-r--r--tools/test/h5repack/CMakeTests.cmake4
-rw-r--r--tools/test/h5repack/h5repacktst.c6
2 files changed, 6 insertions, 4 deletions
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;