summaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorDana Robinson <derobins@hdfgroup.org>2016-11-28 18:01:10 (GMT)
committerDana Robinson <derobins@hdfgroup.org>2016-11-28 18:01:10 (GMT)
commit978e83fb5b5715de26ffb795ed5cabd63d729cd0 (patch)
treeb5e47ce726741016bf6a04604973419a0f9a1063 /test
parent2c3d02e6e5771c05e666d4ccf4a77915d0bf1e50 (diff)
parent1921f7f4ad8cf3e7ef271183b6af897b3af87ab9 (diff)
downloadhdf5-978e83fb5b5715de26ffb795ed5cabd63d729cd0.zip
hdf5-978e83fb5b5715de26ffb795ed5cabd63d729cd0.tar.gz
hdf5-978e83fb5b5715de26ffb795ed5cabd63d729cd0.tar.bz2
Merge branch 'develop' into eoc_valgrind_bugfix
Diffstat (limited to 'test')
-rw-r--r--test/CMakeTests.cmake12
-rw-r--r--test/cache_logging.c1
-rw-r--r--test/h5test.c33
-rw-r--r--test/tfile.c10
-rw-r--r--test/vfd.c2
5 files changed, 38 insertions, 20 deletions
diff --git a/test/CMakeTests.cmake b/test/CMakeTests.cmake
index f4b37f3..5cca2d2 100644
--- a/test/CMakeTests.cmake
+++ b/test/CMakeTests.cmake
@@ -581,7 +581,7 @@ endforeach (test ${H5TEST_TESTS})
set_tests_properties (H5TEST-flush2 PROPERTIES DEPENDS H5TEST-flush1)
set_tests_properties (H5TEST-fheap PROPERTIES TIMEOUT 1800)
-set_tests_properties (H5TEST-big PROPERTIES TIMEOUT 1800)
+set_tests_properties (H5TEST-big PROPERTIES TIMEOUT 3600)
set_tests_properties (H5TEST-btree2 PROPERTIES TIMEOUT 1800)
set_tests_properties (H5TEST-objcopy PROPERTIES TIMEOUT 2400)
@@ -612,7 +612,7 @@ if (BUILD_SHARED_LIBS)
set_tests_properties (H5TEST-shared-flush2 PROPERTIES DEPENDS H5TEST-shared-flush1)
set_tests_properties (H5TEST-shared-fheap PROPERTIES TIMEOUT 1800)
- set_tests_properties (H5TEST-shared-big PROPERTIES TIMEOUT 1800)
+ set_tests_properties (H5TEST-shared-big PROPERTIES TIMEOUT 3600)
set_tests_properties (H5TEST-shared-btree2 PROPERTIES TIMEOUT 1800)
set_tests_properties (H5TEST-shared-objcopy PROPERTIES TIMEOUT 2400)
endif (BUILD_SHARED_LIBS)
@@ -638,7 +638,7 @@ if (NOT CYGWIN)
ENVIRONMENT "srcdir=${HDF5_TEST_BINARY_DIR}/H5TEST;HDF5TestExpress=${HDF_TEST_EXPRESS}"
WORKING_DIRECTORY ${HDF5_TEST_BINARY_DIR}/H5TEST
)
- set_tests_properties (H5TEST-cache PROPERTIES TIMEOUT 2400)
+ set_tests_properties (H5TEST-cache PROPERTIES TIMEOUT 3600)
endif (NOT CYGWIN)
#-- Adding test for err_compat
@@ -745,7 +745,7 @@ if (BUILD_SHARED_LIBS)
ENVIRONMENT "srcdir=${HDF5_TEST_BINARY_DIR}/H5TEST-shared;HDF5TestExpress=${HDF_TEST_EXPRESS}"
WORKING_DIRECTORY ${HDF5_TEST_BINARY_DIR}/H5TEST-shared
)
- set_tests_properties (H5TEST-shared-cache PROPERTIES TIMEOUT 2400)
+ set_tests_properties (H5TEST-shared-cache PROPERTIES TIMEOUT 3600)
endif (NOT CYGWIN)
#-- Adding test for err_compat
@@ -1072,7 +1072,7 @@ if (HDF5_TEST_VFD)
set_tests_properties (VFD-${vfdname}-flush2 PROPERTIES TIMEOUT 10)
set_tests_properties (VFD-${vfdname}-istore PROPERTIES TIMEOUT 1800)
if (NOT CYGWIN)
- set_tests_properties (VFD-${vfdname}-cache PROPERTIES TIMEOUT 1800)
+ set_tests_properties (VFD-${vfdname}-cache PROPERTIES TIMEOUT 3600)
endif (NOT CYGWIN)
if (BUILD_SHARED_LIBS)
set_tests_properties (VFD-${vfdname}-flush2-shared PROPERTIES DEPENDS VFD-${vfdname}-flush1-shared)
@@ -1080,7 +1080,7 @@ if (HDF5_TEST_VFD)
set_tests_properties (VFD-${vfdname}-flush2-shared PROPERTIES TIMEOUT 10)
set_tests_properties (VFD-${vfdname}-istore-shared PROPERTIES TIMEOUT 1800)
if (NOT CYGWIN)
- set_tests_properties (VFD-${vfdname}-cache-shared PROPERTIES TIMEOUT 1800)
+ set_tests_properties (VFD-${vfdname}-cache-shared PROPERTIES TIMEOUT 3600)
endif (NOT CYGWIN)
endif (BUILD_SHARED_LIBS)
if (HDF5_TEST_FHEAP_VFD)
diff --git a/test/cache_logging.c b/test/cache_logging.c
index a5e399c..9190a8a 100644
--- a/test/cache_logging.c
+++ b/test/cache_logging.c
@@ -132,6 +132,7 @@ test_logging_api(void)
TEST_ERROR;
/* Clean up */
+ HDfree(location);
if(H5Fclose(fid) < 0)
TEST_ERROR;
diff --git a/test/h5test.c b/test/h5test.c
index c126da8..f85e96c 100644
--- a/test/h5test.c
+++ b/test/h5test.c
@@ -1584,32 +1584,43 @@ h5_make_local_copy(const char *origfilename, const char *local_copy_name)
{
int fd_old = (-1), fd_new = (-1); /* File descriptors for copying data */
ssize_t nread; /* Number of bytes read in */
- void *buf; /* Buffer for copying data */
- const char *filename = H5_get_srcdir_filename(origfilename);; /* Get the test file name to copy */
+ void *buf = NULL; /* Buffer for copying data */
+ const char *filename = H5_get_srcdir_filename(origfilename); /* Get the test file name to copy */
/* Allocate copy buffer */
- if(NULL == (buf = HDmalloc(READ_BUF_SIZE)))
- return -1;
+ if(NULL == (buf = HDcalloc((size_t)1, (size_t)READ_BUF_SIZE)))
+ goto error;
/* Copy old file into temporary file */
if((fd_old = HDopen(filename, O_RDONLY, 0666)) < 0)
- return -1;
+ goto error;
if((fd_new = HDopen(local_copy_name, O_RDWR|O_CREAT|O_TRUNC, 0666)) < 0)
- return -1;
+ goto error;
/* Copy data */
while((nread = HDread(fd_old, buf, (size_t)READ_BUF_SIZE)) > 0)
if(HDwrite(fd_new, buf, (size_t)nread) < 0)
- return -1;
+ goto error;
+ /* Close files */
+ if(HDclose(fd_old) < 0)
+ goto error;
+ if(HDclose(fd_new) < 0)
+ goto error;
+
/* Release memory */
HDfree(buf);
- /* Close files */
- if(HDclose(fd_old) < 0) return -1;
- if(HDclose(fd_new) < 0) return -1;
-
return 0;
+
+error:
+ /* ignore return values since we're already noted the problem */
+ if(fd_old > 0)
+ HDclose(fd_old);
+ if(fd_new > 0)
+ HDclose(fd_new);
+ HDfree(buf);
+ return -1;
} /* end h5_make_local_copy() */
diff --git a/test/tfile.c b/test/tfile.c
index 833d2d9..d6cb427 100644
--- a/test/tfile.c
+++ b/test/tfile.c
@@ -2268,12 +2268,11 @@ test_file_double_file_dataset_open(hbool_t new_format)
CHECK(ret, FAIL, "H5Dwrite");
/* Closing */
+ /* (Leave sid1 open for later use) */
ret = H5Dclose(did1);
CHECK(ret, FAIL, "H5Dclose");
ret = H5Tclose(tid1);
CHECK(ret, FAIL, "H5Tclose");
- ret = H5Sclose(sid1);
- CHECK(ret, FAIL, "H5Sclose");
ret = H5Pclose(dcpl);
CHECK(ret, FAIL, "H5Dclose");
@@ -2392,6 +2391,8 @@ test_file_double_file_dataset_open(hbool_t new_format)
HDmemset(buffer, 0, sizeof(char*) * 5);
ret = H5Dread(did2, tid2, H5S_ALL, H5S_ALL, H5P_DEFAULT, buffer);
CHECK(ret, FAIL, "H5Dread");
+ ret = H5Dvlen_reclaim(tid2, sid1, H5P_DEFAULT, buffer);
+ CHECK(ret, FAIL, "H5Dvlen_reclaim");
/* Second file's dataset close */
ret = H5Dclose(did2);
@@ -2404,6 +2405,9 @@ test_file_double_file_dataset_open(hbool_t new_format)
/* First file's dataset read */
HDmemset(buffer, 0, sizeof(char*) * 5);
ret = H5Dread(did1, tid1, H5S_ALL, H5S_ALL, H5P_DEFAULT, buffer);
+ CHECK(ret, FAIL, "H5Dread");
+ ret = H5Dvlen_reclaim(tid2, sid1, H5P_DEFAULT, buffer);
+ CHECK(ret, FAIL, "H5Dvlen_reclaim");
/* First file's dataset close */
ret = H5Dclose(did1);
@@ -2416,6 +2420,8 @@ test_file_double_file_dataset_open(hbool_t new_format)
/* Closing */
ret = H5Tclose(tid1);
CHECK(ret, FAIL, "H5Tclose");
+ ret = H5Sclose(sid1);
+ CHECK(ret, FAIL, "H5Sclose");
ret = H5Tclose(tid2);
CHECK(ret, FAIL, "H5Tclose");
diff --git a/test/vfd.c b/test/vfd.c
index c19e0d0..a215264 100644
--- a/test/vfd.c
+++ b/test/vfd.c
@@ -997,7 +997,7 @@ test_family_compat(void)
counter++;
HDsnprintf(newname_individual, sizeof(newname_individual), newname, counter);
HDsnprintf(pathname_individual, sizeof(pathname_individual), pathname, counter);
- }
+ } /* end while */
/* Make sure we can open the file. Use the read and write mode to flush the
* superblock. */