summaryrefslogtreecommitdiffstats
path: root/test/ohdr.c
diff options
context:
space:
mode:
authorDana Robinson <derobins@hdfgroup.org>2016-11-26 15:47:32 (GMT)
committerDana Robinson <derobins@hdfgroup.org>2016-11-26 15:47:32 (GMT)
commita8d1aff23568c0f64fa16cfbb37d7741bb922a60 (patch)
tree153d5a07966aaed7755168df983bb2c3445bb1dd /test/ohdr.c
parent72ecaf0940f8d6df7bedf14376ea3f2224efc0c6 (diff)
downloadhdf5-a8d1aff23568c0f64fa16cfbb37d7741bb922a60.zip
hdf5-a8d1aff23568c0f64fa16cfbb37d7741bb922a60.tar.gz
hdf5-a8d1aff23568c0f64fa16cfbb37d7741bb922a60.tar.bz2
Tentative fix for valgrind issues related to EoC.
Adds /*out*/ parameters to H5O_close() and H5F_try_close() so that H5D/G_close() will know when H5O_close() has triggered a file close and thus the file struct is not reliable. Also removes the H5F_CLOSING() macro and related which were formerly used to check if the file was closing.
Diffstat (limited to 'test/ohdr.c')
-rw-r--r--test/ohdr.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/test/ohdr.c b/test/ohdr.c
index e613a98..9049863 100644
--- a/test/ohdr.c
+++ b/test/ohdr.c
@@ -131,9 +131,9 @@ test_cont(char *filename, hid_t fapl)
if(hdr_info.nchunks >= nchunks)
TEST_ERROR
- if(H5O_close(&oh_locA) < 0)
+ if(H5O_close(&oh_locA, NULL) < 0)
FAIL_STACK_ERROR
- if(H5O_close(&oh_locB) < 0)
+ if(H5O_close(&oh_locB, NULL) < 0)
FAIL_STACK_ERROR
if(H5Fclose(file) < 0)
FAIL_STACK_ERROR
@@ -145,8 +145,8 @@ test_cont(char *filename, hid_t fapl)
error:
H5E_BEGIN_TRY {
- H5O_close(&oh_locA);
- H5O_close(&oh_locB);
+ H5O_close(&oh_locA, NULL);
+ H5O_close(&oh_locB, NULL);
H5Fclose(file);
} H5E_END_TRY;
@@ -272,7 +272,7 @@ test_ohdr_cache(char *filename, hid_t fapl)
FAIL_STACK_ERROR
/* Close object header created */
- if(H5O_close(&oh_loc) < 0)
+ if(H5O_close(&oh_loc, NULL) < 0)
FAIL_STACK_ERROR
/* Unprotect local heap (which actually unpins it from the cache) */
@@ -732,7 +732,7 @@ main(void)
* works correctly - QAK)
*/
TESTING("close & re-open object header");
- if(H5O_close(&oh_loc) < 0)
+ if(H5O_close(&oh_loc, NULL) < 0)
FAIL_STACK_ERROR
if(H5Fclose(file) < 0)
FAIL_STACK_ERROR
@@ -807,7 +807,7 @@ main(void)
/* release resources */
TESTING("object header closing");
- if(H5O_close(&oh_loc) < 0)
+ if(H5O_close(&oh_loc, NULL) < 0)
FAIL_STACK_ERROR
PASSED();