summaryrefslogtreecommitdiffstats
path: root/test/fheap.c
diff options
context:
space:
mode:
authorQuincey Koziol <koziol@koziol.gov>2019-06-28 21:13:36 (GMT)
committerQuincey Koziol <koziol@koziol.gov>2019-06-28 21:13:36 (GMT)
commit2042c775f0d9240609527e621d84e4911ad7f6a5 (patch)
treeb90dd86bd7d25534102b6e929d9cbbdf01c77389 /test/fheap.c
parentd5130bb57332ce0049302c5836bbf666b23513cd (diff)
parent13d951d37205bcd48723330a898e5d67c5e1ecb2 (diff)
downloadhdf5-2042c775f0d9240609527e621d84e4911ad7f6a5.zip
hdf5-2042c775f0d9240609527e621d84e4911ad7f6a5.tar.gz
hdf5-2042c775f0d9240609527e621d84e4911ad7f6a5.tar.bz2
Merge branch 'develop' into feature/update_gcc_flags
Diffstat (limited to 'test/fheap.c')
-rw-r--r--test/fheap.c57
1 files changed, 32 insertions, 25 deletions
diff --git a/test/fheap.c b/test/fheap.c
index 846f03e..557fd37 100644
--- a/test/fheap.c
+++ b/test/fheap.c
@@ -1904,7 +1904,7 @@ test_create(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tparam)
TEST_ERROR
/* Close the fractal heap */
- if(H5HF_close(fh) < 0)
+ if((fh = H5HF_close(fh)) < 0)
FAIL_STACK_ERROR
/* Delete heap */
@@ -6643,7 +6643,7 @@ test_man_remove_one(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tpara
FAIL_STACK_ERROR
/* Close the fractal heap */
- if(H5HF_close(fh) < 0)
+ if((fh = H5HF_close(fh)) < 0)
TEST_ERROR
/* Close the file */
@@ -6834,7 +6834,7 @@ test_man_remove_two(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tpara
FAIL_STACK_ERROR
/* Close the fractal heap */
- if(H5HF_close(fh) < 0)
+ if((fh = H5HF_close(fh)) < 0)
TEST_ERROR
/* Close the file */
@@ -7001,7 +7001,7 @@ test_man_remove_one_larger(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t
FAIL_STACK_ERROR
/* Close the fractal heap */
- if(H5HF_close(fh) < 0)
+ if((fh = H5HF_close(fh)) < 0)
FAIL_STACK_ERROR
/* Close the file */
@@ -7239,7 +7239,7 @@ test_man_remove_two_larger(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t
FAIL_STACK_ERROR
/* Close the fractal heap */
- if(H5HF_close(fh) < 0)
+ if((fh = H5HF_close(fh)) < 0)
TEST_ERROR
/* Close the file */
@@ -7541,7 +7541,7 @@ test_man_remove_three_larger(hid_t fapl, H5HF_create_t *cparam, fheap_test_param
FAIL_STACK_ERROR
/* Close the fractal heap */
- if(H5HF_close(fh) < 0)
+ if((fh = H5HF_close(fh)) < 0)
TEST_ERROR
/* Close the file */
@@ -13683,23 +13683,23 @@ test_filtered_huge(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tparam
H5F_t *f = NULL; /* Internal file object pointer */
H5HF_t *fh = NULL; /* Fractal heap wrapper */
haddr_t fh_addr; /* Address of fractal heap */
- H5HF_create_t tmp_cparam; /* Local heap creation parameters */
- fheap_heap_ids_t keep_ids; /* Structure to retain heap IDs */
- size_t id_len; /* Size of fractal heap IDs */
- h5_stat_size_t empty_size; /* Size of a file with an empty heap */
- h5_stat_size_t file_size; /* Size of file currently */
- unsigned char *heap_id = NULL; /* Heap ID for object */
- size_t obj_size; /* Size of object */
- size_t robj_size; /* Size of object read */
- unsigned char obj_type; /* Type of storage for object */
- fheap_heap_state_t state; /* State of fractal heap */
- unsigned deflate_level; /* Deflation level */
- size_t old_actual_id_len =0 ; /* Old actual ID length */
- hbool_t huge_ids_direct; /* Are 'huge' objects directly acccessed? */
- const char *base_desc = "insert 'huge' object into heap with I/O filters, then remove %s"; /* Test description */
+ H5HF_create_t tmp_cparam; /* Local heap creation parameters */
+ fheap_heap_ids_t keep_ids; /* Structure to retain heap IDs */
+ size_t id_len; /* Size of fractal heap IDs */
+ h5_stat_size_t empty_size; /* Size of a file with an empty heap */
+ h5_stat_size_t file_size; /* Size of file currently */
+ unsigned char *heap_id = NULL; /* Heap ID for object */
+ size_t obj_size; /* Size of object */
+ size_t robj_size; /* Size of object read */
+ unsigned char obj_type; /* Type of storage for object */
+ fheap_heap_state_t state; /* State of fractal heap */
+ unsigned deflate_level; /* Deflation level */
+ size_t old_actual_id_len =0 ; /* Old actual ID length */
+ hbool_t huge_ids_direct; /* Are 'huge' objects directly acccessed? */
+ const char *base_desc = "insert 'huge' object into heap with I/O filters, then remove %s"; /* Test description */
- /* Copy heap creation properties */
- HDmemcpy(&tmp_cparam, cparam, sizeof(H5HF_create_t));
+ /* Copy heap creation properties */
+ HDmemcpy(&tmp_cparam, cparam, sizeof(H5HF_create_t));
/* Set an I/O filter for heap data */
deflate_level = 6;
@@ -13867,7 +13867,9 @@ error:
H5MM_xfree(heap_id);
if(fh)
H5HF_close(fh);
- H5Fclose(file);
+ if(&tmp_cparam.pline)
+ H5O_msg_reset(H5O_PLINE_ID, &tmp_cparam.pline); /* Release the I/O pipeline filter information */
+ H5Fclose(file);
} H5E_END_TRY;
return(1);
} /* test_filtered_huge() */
@@ -15571,9 +15573,12 @@ error:
H5MM_xfree(keep_ids.ids);
H5MM_xfree(keep_ids.lens);
H5MM_xfree(keep_ids.offs);
+
+ if(tparam->comp == FHEAP_TEST_COMPRESS)
+ H5O_msg_reset(H5O_PLINE_ID, &tmp_cparam.pline); /* Release the I/O pipeline filter information */
if(fh)
H5HF_close(fh);
- H5Fclose(file);
+ H5Fclose(file);
} H5E_END_TRY;
return(1);
} /* test_random() */
@@ -15789,7 +15794,9 @@ error:
H5MM_xfree(keep_ids.offs);
if(fh)
H5HF_close(fh);
- H5Fclose(file);
+ if(tparam->comp == FHEAP_TEST_COMPRESS)
+ H5O_msg_reset(H5O_PLINE_ID, &tmp_cparam.pline); /* Release the I/O pipeline filter information */
+ H5Fclose(file);
} H5E_END_TRY;
return(1);
} /* test_random_pow2() */