From 9978c917123901694e25adfd637ae595c3b114f5 Mon Sep 17 00:00:00 2001 From: Allen Byrne Date: Tue, 12 Mar 2013 13:53:15 -0500 Subject: [svn-r23343] HDFFV-8322: for valgrind testing, split-up testhdf5 tests by excluding and running long running tests separately. Merged from trunk. Tested: local linux --- test/CMakeLists.txt | 20 ++++++++++++++++++-- test/testframe.c | 4 ++-- test/tfile.c | 6 ++++++ test/th5o.c | 4 ++++ test/tsohm.c | 14 ++++++++++++++ 5 files changed, 44 insertions(+), 4 deletions(-) diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt index 42ce2f4..2c6d109 100644 --- a/test/CMakeLists.txt +++ b/test/CMakeLists.txt @@ -180,8 +180,24 @@ ADD_TEST ( tsohm_dst.h5 tsohm_src.h5 ) -ADD_TEST (NAME testhdf5 COMMAND $) -SET_TESTS_PROPERTIES(testhdf5 PROPERTIES DEPENDS h5test-clear-testhdf5-objects) + +IF (HDF5_ENABLE_USING_MEMCHECKER) + ADD_TEST (NAME testhdf5-base COMMAND $ -x heap -x file -x select) + SET_TESTS_PROPERTIES(testhdf5-base PROPERTIES DEPENDS h5test-clear-testhdf5-objects) + SET_TESTS_PROPERTIES(testhdf5-base PROPERTIES ENVIRONMENT HDF5_ALARM_SECONDS=3600) + ADD_TEST (NAME testhdf5-heap COMMAND $ -o heap) + SET_TESTS_PROPERTIES(testhdf5-heap PROPERTIES DEPENDS h5test-clear-testhdf5-objects) + SET_TESTS_PROPERTIES(testhdf5-heap PROPERTIES ENVIRONMENT HDF5_ALARM_SECONDS=3600) + ADD_TEST (NAME testhdf5-file COMMAND $ -o file) + SET_TESTS_PROPERTIES(testhdf5-file PROPERTIES DEPENDS h5test-clear-testhdf5-objects) + SET_TESTS_PROPERTIES(testhdf5-file PROPERTIES ENVIRONMENT HDF5_ALARM_SECONDS=3600) + ADD_TEST (NAME testhdf5-select COMMAND $ -o select) + SET_TESTS_PROPERTIES(testhdf5-select PROPERTIES DEPENDS h5test-clear-testhdf5-objects) + SET_TESTS_PROPERTIES(testhdf5-select PROPERTIES ENVIRONMENT HDF5_ALARM_SECONDS=3600) +ELSE (HDF5_ENABLE_USING_MEMCHECKER) + ADD_TEST (NAME testhdf5 COMMAND $) + SET_TESTS_PROPERTIES(testhdf5 PROPERTIES DEPENDS h5test-clear-testhdf5-objects) +ENDIF (HDF5_ENABLE_USING_MEMCHECKER) ############################################################################## ############################################################################## diff --git a/test/testframe.c b/test/testframe.c index 11a9e99..304b9c7 100644 --- a/test/testframe.c +++ b/test/testframe.c @@ -159,8 +159,8 @@ void TestUsage(void) print_func("Usage: %s [-v[erbose] (l[ow]|m[edium]|h[igh]|0-9)] %s\n", TestProgName, (TestPrivateUsage ? "" : "")); - print_func(" [-[e]x[clude] name+] \n"); - print_func(" [-o[nly] name+] \n"); + print_func(" [-[e]x[clude] name]+ \n"); + print_func(" [-o[nly] name]+ \n"); print_func(" [-b[egin] name] \n"); print_func(" [-s[ummary]] \n"); print_func(" [-c[leanoff]] \n"); diff --git a/test/tfile.c b/test/tfile.c index 65cbf74..7a52e2c 100644 --- a/test/tfile.c +++ b/test/tfile.c @@ -498,6 +498,9 @@ test_file_open(void) /* Close dataset from first open */ ret = H5Dclose(did); CHECK(ret, FAIL, "H5Dclose"); + + ret = H5Pclose(fapl_id); + CHECK(ret, FAIL, "H5Pclose"); } /* test_file_open() */ /**************************************************************** @@ -1032,6 +1035,9 @@ test_get_file_id(void) VERIFY(fid2, FAIL, "H5Iget_file_id"); /* Close objects */ + ret = H5Pclose(plist); + CHECK(ret, FAIL, "H5Pclose"); + ret = H5Tclose(datatype_id); CHECK(ret, FAIL, "H5Tclose"); diff --git a/test/th5o.c b/test/th5o.c index c46751e..a470f4c 100644 --- a/test/th5o.c +++ b/test/th5o.c @@ -111,6 +111,8 @@ test_h5o_open(void) CHECK(dspace, FAIL, "H5Dget_space"); /* Close the IDs */ + ret = H5Sclose(dspace); + CHECK(ret, FAIL, "H5Sclose"); ret = H5Gclose(grp); CHECK(ret, FAIL, "H5Gclose"); ret = H5Tclose(dtype); @@ -324,6 +326,8 @@ test_h5o_open_by_addr(void) CHECK(dspace, FAIL, "H5Dget_space"); /* Close the IDs */ + ret = H5Sclose(dspace); + CHECK(ret, FAIL, "H5Sclose"); ret = H5Gclose(grp); CHECK(ret, FAIL, "H5Gclose"); ret = H5Tclose(dtype); diff --git a/test/tsohm.c b/test/tsohm.c index 62154b1..a0f3eec 100644 --- a/test/tsohm.c +++ b/test/tsohm.c @@ -1280,6 +1280,9 @@ static void size2_verify_plist1(hid_t plist) ret = memcmp(&fill1, &fill1_correct, sizeof(fill1_correct)); VERIFY(ret, 0, memcmp); + + ret = H5Tclose(dtype1_id); + CHECK_I(ret, "H5Tclose"); } /*------------------------------------------------------------------------- @@ -1348,6 +1351,9 @@ static void size2_verify_plist2(hid_t plist) ret = HDmemcmp(&fill2, &fill2_correct, (size_t)DTYPE2_SIZE); VERIFY(ret, 0, memcmp); + + ret = H5Tclose(dtype2_id); + CHECK_I(ret, "H5Tclose"); } #ifdef NOT_NOW @@ -3138,6 +3144,8 @@ static void test_sohm_extlink_helper(hid_t src_fcpl_id, hid_t dst_fcpl_id) /* Close the dataset and both files to make sure everything gets flushed * out of memory */ + ret = H5Sclose(space_id); + CHECK_I(ret, "H5Sclose"); ret = H5Dclose(dset_id); CHECK_I(ret, "H5Dclose"); ret = H5Fclose(src_file_id); @@ -3195,6 +3203,9 @@ test_sohm_extlink(void) test_sohm_extlink_helper(fcpl_id, H5P_DEFAULT); test_sohm_extlink_helper(H5P_DEFAULT, fcpl_id); test_sohm_extlink_helper(fcpl_id, fcpl_id); + + ret = H5Pclose(fcpl_id); + CHECK_I(ret, "H5Pclose"); } @@ -3782,6 +3793,9 @@ test_sohm_extend_dset(void) CHECK_I(ret, "test_sohm_extend_dset_helper"); ret = test_sohm_extend_dset_helper(fcpl_id, TRUE); CHECK_I(ret, "test_sohm_extend_dset_helper"); + + ret = H5Pclose(fcpl_id); + CHECK_I(ret, "H5Pclose"); } -- cgit v0.12