summaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/dtypes.c99
-rw-r--r--test/fheap.c10
-rw-r--r--test/file_image.c4
-rw-r--r--test/links.c57
-rw-r--r--test/objcopy.c150
-rw-r--r--test/tgenprop.c4
-rw-r--r--test/tmisc.c16
-rw-r--r--test/tvlstr.c11
8 files changed, 288 insertions, 63 deletions
diff --git a/test/dtypes.c b/test/dtypes.c
index 326294f..984b6c6 100644
--- a/test/dtypes.c
+++ b/test/dtypes.c
@@ -1789,6 +1789,13 @@ test_compound_9(void)
goto error;
} /* end if */
+ if(H5Dvlen_reclaim(dup_tid, space_id, H5P_DEFAULT, &rdata) < 0) {
+ H5_FAILED(); AT();
+ printf("Can't reclaim read data\n");
+ goto error;
+ } /* end if */
+ rdata.str = NULL;
+
if(H5Dclose(dset_id) < 0)
goto error;
if(H5Tclose(cmpd_tid) < 0)
@@ -1815,6 +1822,12 @@ test_compound_9(void)
goto error;
} /* end if */
+ if((space_id = H5Dget_space(dset_id)) < 0) {
+ H5_FAILED(); AT();
+ printf("Can't get space\n");
+ goto error;
+ } /* end if */
+
if((cmpd_tid = H5Dget_type(dset_id)) < 0) {
H5_FAILED(); AT();
printf("cannot open dataset\n");
@@ -1842,10 +1855,19 @@ test_compound_9(void)
goto error;
} /* end if */
+ if(H5Dvlen_reclaim(dup_tid, space_id, H5P_DEFAULT, &rdata) < 0) {
+ H5_FAILED(); AT();
+ printf("Can't read data\n");
+ goto error;
+ } /* end if */
+ rdata.str = NULL;
+
if(rdata.str) HDfree(rdata.str);
if(H5Dclose(dset_id) < 0)
goto error;
+ if(H5Sclose(space_id) < 0)
+ goto error;
if(H5Tclose(cmpd_tid) < 0)
goto error;
if(H5Tclose(dup_tid) < 0)
@@ -2020,12 +2042,17 @@ test_compound_10(void)
printf("incorrect VL read data\n");
goto error;
}
-
- HDfree(t1);
- HDfree(t2);
- HDfree(wdata[i].str);
- HDfree(rdata[i].str);
} /* end for */
+ if(H5Dvlen_reclaim(arr_tid, space_id, H5P_DEFAULT, &rdata) < 0) {
+ H5_FAILED(); AT();
+ printf("Can't reclaim read data\n");
+ goto error;
+ } /* end if */
+ if(H5Dvlen_reclaim(arr_tid, space_id, H5P_DEFAULT, &wdata) < 0) {
+ H5_FAILED(); AT();
+ printf("Can't reclaim read data\n");
+ goto error;
+ } /* end if */
if(H5Dclose(dset_id) < 0)
goto error;
@@ -2090,6 +2117,8 @@ test_compound_11(void)
hid_t big_tid, little_tid; /* Datatype IDs for type conversion */
hid_t big_tid2, little_tid2; /* Datatype IDs for type conversion */
hid_t opaq_src_tid, opaq_dst_tid; /* Datatype IDs for type conversion */
+ hid_t space_id; /* Dataspace for buffer elements */
+ hsize_t dim[1]; /* Dimensions for dataspace */
void *buf = NULL; /* Conversion buffer */
void *buf_orig = NULL; /* Copy of original conversion buffer */
void *bkg = NULL; /* Background buffer */
@@ -2138,6 +2167,13 @@ test_compound_11(void)
/* Make copy of buffer before conversion */
HDmemcpy(buf_orig,buf,sizeof(big_t)*NTESTELEM);
+ dim[0] = NTESTELEM;
+ if((space_id = H5Screate_simple(1, dim, NULL)) < 0) {
+ H5_FAILED(); AT();
+ printf("Can't create space\n");
+ goto error;
+ } /* end if */
+
/* Make copies of the 'big' and 'little' datatypes, so the type
* conversion routine doesn't use the same ones this time and next time
*/
@@ -2169,8 +2205,12 @@ test_compound_11(void)
(unsigned)u,((big_t *)buf_orig)[u].s1,(unsigned)u,((little_t *)buf)[u].s1);
TEST_ERROR
} /* end if */
- HDfree(((little_t *)buf)[u].s1);
} /* end for */
+ if(H5Dvlen_reclaim(little_tid2, space_id, H5P_DEFAULT, buf) < 0) {
+ H5_FAILED(); AT();
+ printf("Can't reclaim data\n");
+ goto error;
+ } /* end if */
/* Build source and destination types for conversion routine */
if((opaq_src_tid=H5Tcreate(H5T_OPAQUE, (size_t)4)) < 0) TEST_ERROR
@@ -2209,8 +2249,12 @@ test_compound_11(void)
(unsigned)u,((big_t *)buf_orig)[u].s1,(unsigned)u,((little_t *)buf)[u].s1);
TEST_ERROR
} /* end if */
- HDfree(((little_t *)buf)[u].s1);
} /* end for */
+ if(H5Dvlen_reclaim(little_tid, space_id, H5P_DEFAULT, buf) < 0) {
+ H5_FAILED(); AT();
+ printf("Can't reclaim data\n");
+ goto error;
+ } /* end if */
/* Unregister the conversion routine */
if(H5Tunregister(H5T_PERS_HARD, "opaq_test", opaq_src_tid, opaq_dst_tid, convert_opaque) < 0) TEST_ERROR
@@ -2243,12 +2287,17 @@ test_compound_11(void)
(unsigned)u,((big_t *)buf_orig)[u].s1,(unsigned)u,((little_t *)buf)[u].s1);
TEST_ERROR
} /* end if */
- HDfree(((little_t *)buf)[u].s1);
} /* end for */
+ if(H5Dvlen_reclaim(little_tid, space_id, H5P_DEFAULT, buf) < 0) {
+ H5_FAILED(); AT();
+ printf("Can't reclaim data\n");
+ goto error;
+ } /* end if */
/* Free everything */
for(u=0; u<NTESTELEM; u++)
HDfree(((big_t *)buf_orig)[u].s1);
+ if(H5Sclose(space_id) < 0) TEST_ERROR
if(H5Tclose(opaq_dst_tid) < 0) TEST_ERROR
if(H5Tclose(opaq_src_tid) < 0) TEST_ERROR
if(H5Tclose(little_tid2) < 0) TEST_ERROR
@@ -2727,6 +2776,18 @@ test_compound_14(void)
goto error;
} /* end if */
+ if(H5Dvlen_reclaim(cmpd_m1_tid, space_id, H5P_DEFAULT, &rdata1) < 0) {
+ H5_FAILED(); AT();
+ printf("Can't reclaim read data\n");
+ goto error;
+ } /* end if */
+ rdata1.str = NULL;
+ if(H5Dvlen_reclaim(cmpd_m2_tid, space_id, H5P_DEFAULT, &rdata2) < 0) {
+ H5_FAILED(); AT();
+ printf("Can't reclaim read data\n");
+ goto error;
+ } /* end if */
+ rdata2.str = NULL;
if(H5Dclose(dset1_id) < 0)
goto error;
if(H5Dclose(dset2_id) < 0)
@@ -2761,6 +2822,12 @@ test_compound_14(void)
goto error;
} /* end if */
+ if((space_id = H5Dget_space(dset2_id)) < 0) {
+ H5_FAILED(); AT();
+ printf("Can't get space\n");
+ goto error;
+ } /* end if */
+
rdata1.c1 = rdata1.c2 = 0;
if(rdata1.str) HDfree(rdata1.str);
@@ -2796,13 +2863,25 @@ test_compound_14(void)
goto error;
} /* end if */
- if(rdata1.str) HDfree(rdata1.str);
- if(rdata2.str) HDfree(rdata2.str);
+ if(H5Dvlen_reclaim(cmpd_m1_tid, space_id, H5P_DEFAULT, &rdata1) < 0) {
+ H5_FAILED(); AT();
+ printf("Can't reclaim read data\n");
+ goto error;
+ } /* end if */
+ rdata1.str = NULL;
+ if(H5Dvlen_reclaim(cmpd_m2_tid, space_id, H5P_DEFAULT, &rdata2) < 0) {
+ H5_FAILED(); AT();
+ printf("Can't reclaim read data\n");
+ goto error;
+ } /* end if */
+ rdata2.str = NULL;
if(H5Dclose(dset1_id) < 0)
goto error;
if(H5Dclose(dset2_id) < 0)
goto error;
+ if(H5Sclose(space_id) < 0)
+ goto error;
if(H5Tclose(cmpd_m1_tid) < 0)
goto error;
if(H5Tclose(cmpd_m2_tid) < 0)
diff --git a/test/fheap.c b/test/fheap.c
index 25784a9..61a8298 100644
--- a/test/fheap.c
+++ b/test/fheap.c
@@ -470,16 +470,16 @@ get_del_string(const fheap_test_param_t *tparam)
/* Remove half of total objects from heap */
if(tparam->del_dir == FHEAP_DEL_FORWARD)
if(tparam->drain_half == FHEAP_DEL_DRAIN_ALL)
- str = HDstrdup("(all - forward)");
+ str = H5MM_strdup("(all - forward)");
else
- str = HDstrdup("(half, refill, all - forward)");
+ str = H5MM_strdup("(half, refill, all - forward)");
else if(tparam->del_dir == FHEAP_DEL_REVERSE)
if(tparam->drain_half == FHEAP_DEL_DRAIN_ALL)
- str = HDstrdup("(all - reverse)");
+ str = H5MM_strdup("(all - reverse)");
else
- str = HDstrdup("(half, refill, all - reverse)");
+ str = H5MM_strdup("(half, refill, all - reverse)");
else
- str = HDstrdup("(all - deleting heap)");
+ str = H5MM_strdup("(all - deleting heap)");
return(str);
} /* get_del_string() */
diff --git a/test/file_image.c b/test/file_image.c
index 52d0b28..6d1845f 100644
--- a/test/file_image.c
+++ b/test/file_image.c
@@ -156,8 +156,8 @@ error:
if(H5Pclose(fapl_1) < 0) retval = 1;
if(H5Pclose(fapl_2) < 0) retval = 1;
HDfree(buffer);
- HDfree(temp);
- HDfree(temp2);
+ H5free_memory(temp);
+ H5free_memory(temp2);
if(retval == 0)
PASSED();
diff --git a/test/links.c b/test/links.c
index 2886304..c87d2b6 100644
--- a/test/links.c
+++ b/test/links.c
@@ -136,7 +136,7 @@ const char *FILENAME[] = {
#define H5L_DIM1 100
#define H5L_DIM2 100
-#define FILTER_FILESIZE_MAX_FRACTION 0.9F
+#define FILTER_FILESIZE_MAX_FRACTION (double)0.9F
/* Creation order macros */
#define CORDER_GROUP_NAME "corder_group"
@@ -548,8 +548,27 @@ cklinks(hid_t fapl, hbool_t new_format)
HDputs(" expected file location.");
TEST_ERROR
} /* end if */
+ if(H5Lexists(file, "/", H5P_DEFAULT) != TRUE) FAIL_STACK_ERROR
if(H5Lexists(file, "d1", H5P_DEFAULT) != TRUE) FAIL_STACK_ERROR
if(H5Lexists(file, "grp1/hard", H5P_DEFAULT) != TRUE) FAIL_STACK_ERROR
+ if(H5Lexists(file, "/grp1", H5P_DEFAULT) != TRUE) FAIL_STACK_ERROR
+ if(H5Lexists(file, "/grp1/hard", H5P_DEFAULT) != TRUE) FAIL_STACK_ERROR
+ H5E_BEGIN_TRY {
+ status = H5Lexists(file, "no_grp1/hard", H5P_DEFAULT);
+ } H5E_END_TRY;
+ if(status >= 0) {
+ H5_FAILED();
+ HDputs(" H5Lexists() should have failed for a path with missing components.");
+ TEST_ERROR
+ } /* end if */
+ H5E_BEGIN_TRY {
+ status = H5Lexists(file, "/no_grp1/hard", H5P_DEFAULT);
+ } H5E_END_TRY;
+ if(status >= 0) {
+ H5_FAILED();
+ HDputs(" H5Lexists() should have failed for a path with missing components.");
+ TEST_ERROR
+ } /* end if */
/* Symbolic link */
if(H5Oget_info_by_name(file, "grp1/soft", &oinfo2, H5P_DEFAULT) < 0) FAIL_STACK_ERROR
@@ -10985,6 +11004,7 @@ link_info_by_idx(hid_t fapl)
char filename[NAME_BUF_SIZE];/* File name */
char tmpname[NAME_BUF_SIZE]; /* Temporary link name */
unsigned u; /* Local index variable */
+ ssize_t name_len; /* Length of name */
herr_t ret; /* Generic return value */
/* Loop over creating hard or soft links */
@@ -11026,9 +11046,9 @@ link_info_by_idx(hid_t fapl)
} H5E_END_TRY;
if(ret >= 0) TEST_ERROR
H5E_BEGIN_TRY {
- ret = H5Lget_name_by_idx(group_id, ".", H5_INDEX_CRT_ORDER, H5_ITER_INC, (hsize_t)0, tmpname, (size_t)NAME_BUF_SIZE, H5P_DEFAULT);
+ name_len = H5Lget_name_by_idx(group_id, ".", H5_INDEX_CRT_ORDER, H5_ITER_INC, (hsize_t)0, tmpname, (size_t)NAME_BUF_SIZE, H5P_DEFAULT);
} H5E_END_TRY;
- if(ret >= 0) TEST_ERROR
+ if(name_len >= 0) TEST_ERROR
/* Create several links, up to limit of compact form */
for(u = 0; u < max_compact; u++) {
@@ -11068,9 +11088,9 @@ link_info_by_idx(hid_t fapl)
} H5E_END_TRY;
if(ret >= 0) TEST_ERROR
H5E_BEGIN_TRY {
- ret = H5Lget_name_by_idx(group_id, ".", H5_INDEX_CRT_ORDER, H5_ITER_INC, (hsize_t)u, tmpname, (size_t)NAME_BUF_SIZE, H5P_DEFAULT);
+ name_len = H5Lget_name_by_idx(group_id, ".", H5_INDEX_CRT_ORDER, H5_ITER_INC, (hsize_t)u, tmpname, (size_t)NAME_BUF_SIZE, H5P_DEFAULT);
} H5E_END_TRY;
- if(ret >= 0) TEST_ERROR
+ if(name_len >= 0) TEST_ERROR
/* Create more links, to push group into dense form */
for(; u < (max_compact * 2); u++) {
@@ -11110,9 +11130,9 @@ link_info_by_idx(hid_t fapl)
} H5E_END_TRY;
if(ret >= 0) TEST_ERROR
H5E_BEGIN_TRY {
- ret = H5Lget_name_by_idx(group_id, ".", H5_INDEX_CRT_ORDER, H5_ITER_INC, (hsize_t)u, tmpname, (size_t)NAME_BUF_SIZE, H5P_DEFAULT);
+ name_len = H5Lget_name_by_idx(group_id, ".", H5_INDEX_CRT_ORDER, H5_ITER_INC, (hsize_t)u, tmpname, (size_t)NAME_BUF_SIZE, H5P_DEFAULT);
} H5E_END_TRY;
- if(ret >= 0) TEST_ERROR
+ if(name_len >= 0) TEST_ERROR
/* Close the group */
if(H5Gclose(group_id) < 0) TEST_ERROR
@@ -11167,6 +11187,7 @@ link_info_by_idx_old(hid_t fapl)
char tmpname[NAME_BUF_SIZE]; /* Temporary link name */
char tmpval[NAME_BUF_SIZE]; /* Temporary link value */
unsigned u; /* Local index variable */
+ ssize_t name_len; /* Length of name */
herr_t ret; /* Generic return value */
/* Loop over creating hard or soft links */
@@ -11278,9 +11299,9 @@ link_info_by_idx_old(hid_t fapl)
} H5E_END_TRY;
if(ret >= 0) TEST_ERROR
H5E_BEGIN_TRY {
- ret = H5Lget_name_by_idx(group_id, ".", H5_INDEX_CRT_ORDER, H5_ITER_INC, (hsize_t)u, tmpname, (size_t)NAME_BUF_SIZE, H5P_DEFAULT);
+ name_len = H5Lget_name_by_idx(group_id, ".", H5_INDEX_CRT_ORDER, H5_ITER_INC, (hsize_t)u, tmpname, (size_t)NAME_BUF_SIZE, H5P_DEFAULT);
} H5E_END_TRY;
- if(ret >= 0) TEST_ERROR
+ if(name_len >= 0) TEST_ERROR
/* Verify state of group */
if(H5G__has_stab_test(group_id) != TRUE) TEST_ERROR
@@ -12038,7 +12059,7 @@ link_iterate_check(hid_t group_id, H5_index_t idx_type, H5_iter_order_t order,
iter_info->order = order;
iter_info->stop = -1;
iter_info->ncalled = 0;
- iter_info->curr = order != H5_ITER_DEC ? skip : ((max_links - 1) - skip);
+ iter_info->curr = (int64_t)(order != H5_ITER_DEC ? skip : ((max_links - 1) - skip));
HDmemset(iter_info->visited, 0, sizeof(hbool_t) * iter_info->max_visit);
if(H5Literate(group_id, idx_type, order, &skip, link_iterate_cb, iter_info) < 0) TEST_ERROR
@@ -12066,11 +12087,11 @@ link_iterate_check(hid_t group_id, H5_index_t idx_type, H5_iter_order_t order,
#ifndef H5_NO_DEPRECATED_SYMBOLS
/* Skip over some links in group, with H5Giterate */
- iter_info->nskipped = gskip = max_links / 2;
+ iter_info->nskipped = (unsigned)(gskip = (int)(max_links / 2));
iter_info->order = order;
iter_info->stop = -1;
iter_info->ncalled = 0;
- iter_info->curr = order != H5_ITER_DEC ? (unsigned)gskip : ((max_links - 1) - gskip);
+ iter_info->curr = order != H5_ITER_DEC ? (unsigned)gskip : ((max_links - 1) - (unsigned)gskip);
HDmemset(iter_info->visited, 0, sizeof(hbool_t) * iter_info->max_visit);
if(H5Giterate(group_id, ".", &gskip, group_iterate_cb, iter_info) < 0) TEST_ERROR
@@ -12111,7 +12132,7 @@ link_iterate_check(hid_t group_id, H5_index_t idx_type, H5_iter_order_t order,
#ifndef H5_NO_DEPRECATED_SYMBOLS
/* Iterate over links in group, stopping in the middle, with H5Giterate() */
- iter_info->nskipped = gskip = 0;
+ iter_info->nskipped = (unsigned)(gskip = 0);
iter_info->order = order;
iter_info->stop = 3;
iter_info->ncalled = 0;
@@ -12468,7 +12489,7 @@ link_iterate_old_check(hid_t group_id, H5_iter_order_t order,
#ifndef H5_NO_DEPRECATED_SYMBOLS
/* Iterate over links in group, with H5Giterate */
- iter_info->nskipped = gskip = 0;
+ iter_info->nskipped = (unsigned)(gskip = 0);
iter_info->order = order;
iter_info->stop = -1;
iter_info->ncalled = 0;
@@ -12488,7 +12509,7 @@ link_iterate_old_check(hid_t group_id, H5_iter_order_t order,
iter_info->order = order;
iter_info->stop = -1;
iter_info->ncalled = 0;
- iter_info->curr = order != H5_ITER_DEC ? skip : ((max_links - 1) - skip);
+ iter_info->curr = (int64_t)(order != H5_ITER_DEC ? skip : ((max_links - 1) - skip));
HDmemset(iter_info->visited, 0, sizeof(hbool_t) * iter_info->max_visit);
if(H5Literate(group_id, H5_INDEX_NAME, order, &skip, link_iterate_old_cb, iter_info) < 0) TEST_ERROR
@@ -12516,11 +12537,11 @@ link_iterate_old_check(hid_t group_id, H5_iter_order_t order,
#ifndef H5_NO_DEPRECATED_SYMBOLS
/* Skip over some links in group, with H5Giterate */
- iter_info->nskipped = gskip = max_links / 2;
+ iter_info->nskipped = (unsigned)(gskip = (int)(max_links / 2));
iter_info->order = order;
iter_info->stop = -1;
iter_info->ncalled = 0;
- iter_info->curr = order != H5_ITER_DEC ? (unsigned)gskip : ((max_links - 1) - gskip);
+ iter_info->curr = order != H5_ITER_DEC ? (unsigned)gskip : ((max_links - 1) - (unsigned)gskip);
HDmemset(iter_info->visited, 0, sizeof(hbool_t) * iter_info->max_visit);
if(H5Giterate(group_id, ".", &gskip, group_iterate_old_cb, iter_info) < 0) TEST_ERROR
@@ -12561,7 +12582,7 @@ link_iterate_old_check(hid_t group_id, H5_iter_order_t order,
#ifndef H5_NO_DEPRECATED_SYMBOLS
/* Iterate over links in group, stopping in the middle, with H5Giterate() */
- iter_info->nskipped = gskip = 0;
+ iter_info->nskipped = (unsigned)(gskip = 0);
iter_info->order = order;
iter_info->stop = 3;
iter_info->ncalled = 0;
diff --git a/test/objcopy.c b/test/objcopy.c
index f3806cd..cd978f2 100644
--- a/test/objcopy.c
+++ b/test/objcopy.c
@@ -197,7 +197,7 @@ addr_insert(H5O_info_t *oi)
*
*-------------------------------------------------------------------------
*/
-static hbool_t
+static H5_ATTR_PURE hbool_t
addr_lookup(H5O_info_t *oi)
{
size_t n;
@@ -512,8 +512,12 @@ test_copy_attach_attribute_vl(hid_t loc_id)
ret_value = 0;
done:
- if(tid >0 && sid > 0)
- H5Dvlen_reclaim(tid, sid, H5P_DEFAULT, buf);
+ if(tid >0 && sid > 0) {
+ hid_t dxpl_id = H5Pcreate(H5P_DATASET_XFER);
+ H5Pset_vlen_mem_manager(dxpl_id, NULL, NULL, NULL, NULL);
+ H5Dvlen_reclaim(tid, sid, dxpl_id, buf);
+ H5Pclose(dxpl_id);
+ }
if(sid > 0)
H5Sclose(sid);
if(tid > 0)
@@ -4028,6 +4032,7 @@ test_copy_dataset_contig_vl(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid_
hid_t tid = -1; /* Datatype ID */
hid_t sid = -1; /* Dataspace ID */
hid_t did = -1, did2 = -1; /* Dataset IDs */
+ hid_t dxpl_id = -1; /* Dataset transfer property list ID */
unsigned int i, j; /* Local index variables */
hsize_t dim1d[1]; /* Dataset dimensions */
hvl_t buf[DIM_SIZE_1]; /* Buffer for writing data */
@@ -4111,7 +4116,12 @@ test_copy_dataset_contig_vl(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid_
/* Reclaim vlen buffer */
- if(H5Dvlen_reclaim(tid, sid, H5P_DEFAULT, buf) < 0) TEST_ERROR
+ if(H5Tdetect_class(tid, H5T_VLEN) == TRUE) {
+ if((dxpl_id = H5Pcreate(H5P_DATASET_XFER)) < 0) TEST_ERROR
+ if(H5Pset_vlen_mem_manager(dxpl_id, NULL, NULL, NULL, NULL) < 0) TEST_ERROR
+ if(H5Dvlen_reclaim(tid, sid, dxpl_id, buf) < 0) TEST_ERROR
+ if(H5Pclose(dxpl_id) < 0) TEST_ERROR
+ } /* end if */
/* close datatype */
if(H5Tclose(tid) < 0) TEST_ERROR
@@ -4127,6 +4137,7 @@ error:
H5Dclose(did2);
H5Dclose(did);
H5Dvlen_reclaim(tid, sid, H5P_DEFAULT, buf);
+ H5Pclose(dxpl_id);
H5Tclose(tid);
H5Sclose(sid);
H5Fclose(fid_dst);
@@ -4158,6 +4169,7 @@ test_copy_dataset_chunked_vl(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid
hid_t sid = -1; /* Dataspace ID */
hid_t pid = -1; /* Dataset creation property list ID */
hid_t did = -1, did2 = -1; /* Dataset IDs */
+ hid_t dxpl_id = -1; /* Dataset transfer property list ID */
unsigned int i, j; /* Local index variables */
hsize_t dim1d[1]; /* Dataset dimensions */
hsize_t chunk_dim1d[1] = {CHUNK_SIZE_1}; /* Chunk dimensions */
@@ -4250,7 +4262,12 @@ test_copy_dataset_chunked_vl(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid
/* Reclaim vlen buffer */
- if(H5Dvlen_reclaim(tid, sid, H5P_DEFAULT, buf) < 0) TEST_ERROR
+ if(H5Tdetect_class(tid, H5T_VLEN) == TRUE) {
+ if((dxpl_id = H5Pcreate(H5P_DATASET_XFER)) < 0) TEST_ERROR
+ if(H5Pset_vlen_mem_manager(dxpl_id, NULL, NULL, NULL, NULL) < 0) TEST_ERROR
+ if(H5Dvlen_reclaim(tid, sid, dxpl_id, buf) < 0) TEST_ERROR
+ if(H5Pclose(dxpl_id) < 0) TEST_ERROR
+ } /* end if */
/* close datatype */
if(H5Tclose(tid) < 0) TEST_ERROR
@@ -4266,6 +4283,8 @@ error:
H5Dclose(did2);
H5Dclose(did);
H5Dvlen_reclaim(tid, sid, H5P_DEFAULT, buf);
+ H5Pclose(dxpl_id);
+ H5Pclose(pid);
H5Tclose(tid);
H5Sclose(sid);
H5Fclose(fid_dst);
@@ -4297,6 +4316,7 @@ test_copy_dataset_compact_vl(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid
hid_t sid = -1; /* Dataspace ID */
hid_t pid = -1; /* Dataset creation property list ID */
hid_t did = -1, did2 = -1; /* Dataset IDs */
+ hid_t dxpl_id = -1; /* Dataset transfer property list ID */
unsigned int i, j; /* Local index variables */
hsize_t dim1d[1]; /* Dataset dimensions */
hvl_t buf[DIM_SIZE_1]; /* Buffer for writing data */
@@ -4387,7 +4407,12 @@ test_copy_dataset_compact_vl(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid
/* Reclaim vlen buffer */
- if(H5Dvlen_reclaim(tid, sid, H5P_DEFAULT, buf) < 0) TEST_ERROR
+ if(H5Tdetect_class(tid, H5T_VLEN) == TRUE) {
+ if((dxpl_id = H5Pcreate(H5P_DATASET_XFER)) < 0) TEST_ERROR
+ if(H5Pset_vlen_mem_manager(dxpl_id, NULL, NULL, NULL, NULL) < 0) TEST_ERROR
+ if(H5Dvlen_reclaim(tid, sid, dxpl_id, buf) < 0) TEST_ERROR
+ if(H5Pclose(dxpl_id) < 0) TEST_ERROR
+ } /* end if */
/* close datatype */
if(H5Tclose(tid) < 0) TEST_ERROR
@@ -4403,6 +4428,7 @@ error:
H5Dclose(did2);
H5Dclose(did);
H5Dvlen_reclaim(tid, sid, H5P_DEFAULT, buf);
+ H5Pclose(dxpl_id);
H5Tclose(tid);
H5Sclose(sid);
H5Fclose(fid_dst);
@@ -4550,6 +4576,7 @@ test_copy_dataset_compressed_vl(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl,
hid_t tid = -1; /* Datatype ID */
hid_t pid = -1; /* Dataset creation property list ID */
hid_t did = -1, did2 = -1; /* Dataset IDs */
+ hid_t dxpl_id = -1; /* Dataset transfer property list ID */
hsize_t dim2d[2]; /* Dataset dimensions */
hsize_t chunk_dim2d[2] ={CHUNK_SIZE_1, CHUNK_SIZE_2}; /* Chunk dimensions */
hvl_t buf[DIM_SIZE_1][DIM_SIZE_2]; /* Buffer for writing data */
@@ -4649,7 +4676,12 @@ test_copy_dataset_compressed_vl(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl,
if(H5Fclose(fid_dst) < 0) TEST_ERROR
/* Reclaim vlen buffer */
- if(H5Dvlen_reclaim(tid, sid, H5P_DEFAULT, buf) < 0) TEST_ERROR
+ if(H5Tdetect_class(tid, H5T_VLEN) == TRUE) {
+ if((dxpl_id = H5Pcreate(H5P_DATASET_XFER)) < 0) TEST_ERROR
+ if(H5Pset_vlen_mem_manager(dxpl_id, NULL, NULL, NULL, NULL) < 0) TEST_ERROR
+ if(H5Dvlen_reclaim(tid, sid, dxpl_id, buf) < 0) TEST_ERROR
+ if(H5Pclose(dxpl_id) < 0) TEST_ERROR
+ } /* end if */
/* close datatype */
if(H5Tclose(tid) < 0) TEST_ERROR
@@ -4668,6 +4700,7 @@ error:
H5Dclose(did);
H5Pclose(pid);
H5Dvlen_reclaim(tid, sid, H5P_DEFAULT, buf);
+ H5Pclose(dxpl_id);
H5Tclose(tid);
H5Sclose(sid);
H5Fclose(fid_dst);
@@ -6357,6 +6390,7 @@ test_copy_dataset_compact_named_vl(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fap
hid_t sid = -1; /* Dataspace ID */
hid_t pid = -1; /* Dataset creation property list ID */
hid_t did = -1, did2 = -1; /* Dataset IDs */
+ hid_t dxpl_id = -1; /* Dataset transfer property list ID */
unsigned int i, j; /* Local index variables */
hsize_t dim1d[1]; /* Dataset dimensions */
hvl_t buf[DIM_SIZE_1]; /* Buffer for writing data */
@@ -6456,7 +6490,12 @@ test_copy_dataset_compact_named_vl(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fap
/* Reclaim vlen buffer */
- if(H5Dvlen_reclaim(tid_copy, sid, H5P_DEFAULT, buf) < 0) TEST_ERROR
+ if(H5Tdetect_class(tid_copy, H5T_VLEN) == TRUE) {
+ if((dxpl_id = H5Pcreate(H5P_DATASET_XFER)) < 0) TEST_ERROR
+ if(H5Pset_vlen_mem_manager(dxpl_id, NULL, NULL, NULL, NULL) < 0) TEST_ERROR
+ if(H5Dvlen_reclaim(tid_copy, sid, dxpl_id, buf) < 0) TEST_ERROR
+ if(H5Pclose(dxpl_id) < 0) TEST_ERROR
+ } /* end if */
/* close datatype */
if(H5Tclose(tid_copy) < 0) TEST_ERROR
@@ -6473,6 +6512,7 @@ error:
H5Dclose(did2);
H5Dclose(did);
H5Dvlen_reclaim(tid_copy, sid, H5P_DEFAULT, buf);
+ H5Pclose(dxpl_id);
H5Tclose(tid);
H5Tclose(tid_copy);
H5Sclose(sid);
@@ -6504,6 +6544,7 @@ test_copy_dataset_contig_named_vl(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl
hid_t tid = -1, tid_copy=-1; /* Datatype ID */
hid_t sid = -1; /* Dataspace ID */
hid_t did = -1, did2 = -1; /* Dataset IDs */
+ hid_t dxpl_id = -1; /* Dataset transfer property list ID */
unsigned int i, j; /* Local index variables */
hsize_t dim1d[1]; /* Dataset dimensions */
hvl_t buf[DIM_SIZE_1]; /* Buffer for writing data */
@@ -6596,7 +6637,12 @@ test_copy_dataset_contig_named_vl(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl
/* Reclaim vlen buffer */
- if(H5Dvlen_reclaim(tid_copy, sid, H5P_DEFAULT, buf) < 0) TEST_ERROR
+ if(H5Tdetect_class(tid_copy, H5T_VLEN) == TRUE) {
+ if((dxpl_id = H5Pcreate(H5P_DATASET_XFER)) < 0) TEST_ERROR
+ if(H5Pset_vlen_mem_manager(dxpl_id, NULL, NULL, NULL, NULL) < 0) TEST_ERROR
+ if(H5Dvlen_reclaim(tid_copy, sid, dxpl_id, buf) < 0) TEST_ERROR
+ if(H5Pclose(dxpl_id) < 0) TEST_ERROR
+ } /* end if */
/* close datatype */
if(H5Tclose(tid_copy) < 0) TEST_ERROR
@@ -6612,6 +6658,7 @@ error:
H5Dclose(did2);
H5Dclose(did);
H5Dvlen_reclaim(tid_copy, sid, H5P_DEFAULT, buf);
+ H5Pclose(dxpl_id);
H5Tclose(tid);
H5Tclose(tid_copy);
H5Sclose(sid);
@@ -6644,6 +6691,7 @@ test_copy_dataset_chunked_named_vl(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fap
hid_t sid = -1; /* Dataspace ID */
hid_t pid = -1; /* Dataset creation property list ID */
hid_t did = -1, did2 = -1; /* Dataset IDs */
+ hid_t dxpl_id = -1; /* Dataset transfer property list ID */
unsigned int i, j; /* Local index variables */
hsize_t dim1d[1]; /* Dataset dimensions */
hvl_t buf[DIM_SIZE_1]; /* Buffer for writing data */
@@ -6744,7 +6792,12 @@ test_copy_dataset_chunked_named_vl(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fap
/* Reclaim vlen buffer */
- if(H5Dvlen_reclaim(tid_copy, sid, H5P_DEFAULT, buf) < 0) TEST_ERROR
+ if(H5Tdetect_class(tid_copy, H5T_VLEN) == TRUE) {
+ if((dxpl_id = H5Pcreate(H5P_DATASET_XFER)) < 0) TEST_ERROR
+ if(H5Pset_vlen_mem_manager(dxpl_id, NULL, NULL, NULL, NULL) < 0) TEST_ERROR
+ if(H5Dvlen_reclaim(tid_copy, sid, dxpl_id, buf) < 0) TEST_ERROR
+ if(H5Pclose(dxpl_id) < 0) TEST_ERROR
+ } /* end if */
/* close datatype */
if(H5Tclose(tid_copy) < 0) TEST_ERROR
@@ -6761,6 +6814,7 @@ error:
H5Dclose(did2);
H5Dclose(did);
H5Dvlen_reclaim(tid_copy, sid, H5P_DEFAULT, buf);
+ H5Pclose(dxpl_id);
H5Tclose(tid);
H5Tclose(tid_copy);
H5Sclose(sid);
@@ -6793,6 +6847,7 @@ test_copy_dataset_compressed_named_vl(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_
hid_t sid = -1; /* Dataspace ID */
hid_t pid = -1; /* Dataset creation property list ID */
hid_t did = -1, did2 = -1; /* Dataset IDs */
+ hid_t dxpl_id = -1; /* Dataset transfer property list ID */
unsigned int i, j; /* Local index variables */
hsize_t dim1d[1]; /* Dataset dimensions */
hvl_t buf[DIM_SIZE_1]; /* Buffer for writing data */
@@ -6894,7 +6949,12 @@ test_copy_dataset_compressed_named_vl(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_
/* Reclaim vlen buffer */
- if(H5Dvlen_reclaim(tid_copy, sid, H5P_DEFAULT, buf) < 0) TEST_ERROR
+ if(H5Tdetect_class(tid_copy, H5T_VLEN) == TRUE) {
+ if((dxpl_id = H5Pcreate(H5P_DATASET_XFER)) < 0) TEST_ERROR
+ if(H5Pset_vlen_mem_manager(dxpl_id, NULL, NULL, NULL, NULL) < 0) TEST_ERROR
+ if(H5Dvlen_reclaim(tid_copy, sid, dxpl_id, buf) < 0) TEST_ERROR
+ if(H5Pclose(dxpl_id) < 0) TEST_ERROR
+ } /* end if */
/* close datatype */
if(H5Tclose(tid_copy) < 0) TEST_ERROR
@@ -6911,6 +6971,7 @@ error:
H5Dclose(did2);
H5Dclose(did);
H5Dvlen_reclaim(tid_copy, sid, H5P_DEFAULT, buf);
+ H5Pclose(dxpl_id);
H5Tclose(tid);
H5Tclose(tid_copy);
H5Sclose(sid);
@@ -6943,6 +7004,7 @@ test_copy_dataset_compact_vl_vl(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl,
hid_t sid = -1; /* Dataspace ID */
hid_t pid = -1; /* Dataset creation property list ID */
hid_t did = -1, did2 = -1; /* Dataset IDs */
+ hid_t dxpl_id = -1; /* Dataset transfer property list ID */
unsigned int i, j, k; /* Local index variables */
hsize_t dim1d[1]; /* Dataset dimensions */
hvl_t buf[DIM_SIZE_1]; /* Buffer for writing data */
@@ -7049,7 +7111,12 @@ test_copy_dataset_compact_vl_vl(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl,
if(H5Fclose(fid_dst) < 0) TEST_ERROR
/* Reclaim vlen buffer */
- if(H5Dvlen_reclaim(tid2, sid, H5P_DEFAULT, buf) < 0) TEST_ERROR
+ if(H5Tdetect_class(tid2, H5T_VLEN) == TRUE) {
+ if((dxpl_id = H5Pcreate(H5P_DATASET_XFER)) < 0) TEST_ERROR
+ if(H5Pset_vlen_mem_manager(dxpl_id, NULL, NULL, NULL, NULL) < 0) TEST_ERROR
+ if(H5Dvlen_reclaim(tid2, sid, dxpl_id, buf) < 0) TEST_ERROR
+ if(H5Pclose(dxpl_id) < 0) TEST_ERROR
+ } /* end if */
/* close datatype */
if(H5Tclose(tid) < 0) TEST_ERROR
@@ -7066,6 +7133,8 @@ error:
H5Dclose(did2);
H5Dclose(did);
H5Dvlen_reclaim(tid2, sid, H5P_DEFAULT, buf);
+ H5Pclose(dxpl_id);
+ H5Pclose(pid);
H5Tclose(tid);
H5Tclose(tid2);
H5Sclose(sid);
@@ -7098,6 +7167,7 @@ test_copy_dataset_contig_vl_vl(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, h
hid_t sid = -1; /* Dataspace ID */
hid_t pid = -1; /* Dataset creation property list ID */
hid_t did = -1, did2 = -1; /* Dataset IDs */
+ hid_t dxpl_id = -1; /* Dataset transfer property list ID */
unsigned int i, j, k; /* Local index variables */
hsize_t dim1d[1]; /* Dataset dimensions */
hvl_t buf[DIM_SIZE_1]; /* Buffer for writing data */
@@ -7203,7 +7273,12 @@ test_copy_dataset_contig_vl_vl(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, h
if(H5Fclose(fid_dst) < 0) TEST_ERROR
/* Reclaim vlen buffer */
- if(H5Dvlen_reclaim(tid2, sid, H5P_DEFAULT, buf) < 0) TEST_ERROR
+ if(H5Tdetect_class(tid2, H5T_VLEN) == TRUE) {
+ if((dxpl_id = H5Pcreate(H5P_DATASET_XFER)) < 0) TEST_ERROR
+ if(H5Pset_vlen_mem_manager(dxpl_id, NULL, NULL, NULL, NULL) < 0) TEST_ERROR
+ if(H5Dvlen_reclaim(tid2, sid, dxpl_id, buf) < 0) TEST_ERROR
+ if(H5Pclose(dxpl_id) < 0) TEST_ERROR
+ } /* end if */
/* close datatype */
if(H5Tclose(tid) < 0) TEST_ERROR
@@ -7220,6 +7295,8 @@ error:
H5Dclose(did2);
H5Dclose(did);
H5Dvlen_reclaim(tid2, sid, H5P_DEFAULT, buf);
+ H5Pclose(dxpl_id);
+ H5Pclose(pid);
H5Tclose(tid);
H5Tclose(tid2);
H5Sclose(sid);
@@ -7252,6 +7329,7 @@ test_copy_dataset_chunked_vl_vl(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl,
hid_t sid = -1; /* Dataspace ID */
hid_t pid = -1; /* Dataset creation property list ID */
hid_t did = -1, did2 = -1; /* Dataset IDs */
+ hid_t dxpl_id = -1; /* Dataset transfer property list ID */
unsigned int i, j, k; /* Local index variables */
hsize_t dim1d[1]; /* Dataset dimensions */
hvl_t buf[DIM_SIZE_1]; /* Buffer for writing data */
@@ -7359,7 +7437,12 @@ test_copy_dataset_chunked_vl_vl(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl,
/* Reclaim vlen buffer */
- if(H5Dvlen_reclaim(tid2, sid, H5P_DEFAULT, buf) < 0) TEST_ERROR
+ if(H5Tdetect_class(tid2, H5T_VLEN) == TRUE) {
+ if((dxpl_id = H5Pcreate(H5P_DATASET_XFER)) < 0) TEST_ERROR
+ if(H5Pset_vlen_mem_manager(dxpl_id, NULL, NULL, NULL, NULL) < 0) TEST_ERROR
+ if(H5Dvlen_reclaim(tid2, sid, dxpl_id, buf) < 0) TEST_ERROR
+ if(H5Pclose(dxpl_id) < 0) TEST_ERROR
+ } /* end if */
/* close datatype */
if(H5Tclose(tid) < 0) TEST_ERROR
@@ -7377,6 +7460,7 @@ error:
H5Dclose(did2);
H5Dclose(did);
H5Dvlen_reclaim(tid2, sid, H5P_DEFAULT, buf);
+ H5Pclose(dxpl_id);
H5Tclose(tid);
H5Tclose(tid2);
H5Sclose(sid);
@@ -7409,6 +7493,7 @@ test_copy_dataset_compressed_vl_vl(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fap
hid_t sid = -1; /* Dataspace ID */
hid_t pid = -1; /* Dataset creation property list ID */
hid_t did = -1, did2 = -1; /* Dataset IDs */
+ hid_t dxpl_id = -1; /* Dataset transfer property list ID */
unsigned int i, j, k; /* Local index variables */
hsize_t dim1d[1]; /* Dataset dimensions */
hvl_t buf[DIM_SIZE_1]; /* Buffer for writing data */
@@ -7516,7 +7601,12 @@ test_copy_dataset_compressed_vl_vl(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fap
/* Reclaim vlen buffer */
- if(H5Dvlen_reclaim(tid2, sid, H5P_DEFAULT, buf) < 0) TEST_ERROR
+ if(H5Tdetect_class(tid2, H5T_VLEN) == TRUE) {
+ if((dxpl_id = H5Pcreate(H5P_DATASET_XFER)) < 0) TEST_ERROR
+ if(H5Pset_vlen_mem_manager(dxpl_id, NULL, NULL, NULL, NULL) < 0) TEST_ERROR
+ if(H5Dvlen_reclaim(tid2, sid, dxpl_id, buf) < 0) TEST_ERROR
+ if(H5Pclose(dxpl_id) < 0) TEST_ERROR
+ } /* end if */
/* close datatype */
if(H5Tclose(tid) < 0) TEST_ERROR
@@ -7534,6 +7624,7 @@ error:
H5Dclose(did2);
H5Dclose(did);
H5Dvlen_reclaim(tid2, sid, H5P_DEFAULT, buf);
+ H5Pclose(dxpl_id);
H5Tclose(tid);
H5Tclose(tid2);
H5Sclose(sid);
@@ -7576,6 +7667,7 @@ test_copy_dataset_contig_cmpd_vl(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl,
hid_t sid = -1; /* Dataspace ID */
hid_t did = -1; /* Dataset ID */
hid_t did2 = -1; /* Dataset ID */
+ hid_t dxpl_id = -1; /* Dataset transfer property list ID */
unsigned int i, j; /* Local index variables */
hsize_t dim1d[1]; /* Dataset dimensions */
cmpd_vl_t buf[DIM_SIZE_1]; /* Buffer for writing data */
@@ -7665,7 +7757,12 @@ test_copy_dataset_contig_cmpd_vl(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl,
/* Reclaim vlen buffer */
- if(H5Dvlen_reclaim(tid, sid, H5P_DEFAULT, buf) < 0) TEST_ERROR
+ if(H5Tdetect_class(tid, H5T_VLEN) == TRUE) {
+ if((dxpl_id = H5Pcreate(H5P_DATASET_XFER)) < 0) TEST_ERROR
+ if(H5Pset_vlen_mem_manager(dxpl_id, NULL, NULL, NULL, NULL) < 0) TEST_ERROR
+ if(H5Dvlen_reclaim(tid, sid, dxpl_id, buf) < 0) TEST_ERROR
+ if(H5Pclose(dxpl_id) < 0) TEST_ERROR
+ } /* end if */
/* close datatype */
if(H5Tclose(tid2) < 0) TEST_ERROR
@@ -7682,6 +7779,7 @@ error:
H5Dclose(did2);
H5Dclose(did);
H5Dvlen_reclaim(tid, sid, H5P_DEFAULT, buf);
+ H5Pclose(dxpl_id);
H5Tclose(tid2);
H5Tclose(tid);
H5Sclose(sid);
@@ -7714,6 +7812,7 @@ test_copy_dataset_chunked_cmpd_vl(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl
hid_t sid = -1; /* Dataspace ID */
hid_t pid = -1; /* Dataset creation property list ID */
hid_t did = -1, did2 = -1; /* Dataset IDs */
+ hid_t dxpl_id = -1; /* Dataset transfer property list ID */
unsigned int i, j; /* Local index variables */
hsize_t dim1d[1]; /* Dataset dimensions */
hsize_t chunk_dim1d[1] = {CHUNK_SIZE_1}; /* Chunk dimensions */
@@ -7811,7 +7910,12 @@ test_copy_dataset_chunked_cmpd_vl(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl
/* Reclaim vlen buffer */
- if(H5Dvlen_reclaim(tid, sid, H5P_DEFAULT, buf) < 0) TEST_ERROR
+ if(H5Tdetect_class(tid, H5T_VLEN) == TRUE) {
+ if((dxpl_id = H5Pcreate(H5P_DATASET_XFER)) < 0) TEST_ERROR
+ if(H5Pset_vlen_mem_manager(dxpl_id, NULL, NULL, NULL, NULL) < 0) TEST_ERROR
+ if(H5Dvlen_reclaim(tid, sid, dxpl_id, buf) < 0) TEST_ERROR
+ if(H5Pclose(dxpl_id) < 0) TEST_ERROR
+ } /* end if */
/* close datatype */
if(H5Tclose(tid2) < 0) TEST_ERROR
@@ -7828,6 +7932,8 @@ error:
H5Dclose(did2);
H5Dclose(did);
H5Dvlen_reclaim(tid, sid, H5P_DEFAULT, buf);
+ H5Pclose(dxpl_id);
+ H5Pclose(pid);
H5Tclose(tid2);
H5Tclose(tid);
H5Sclose(sid);
@@ -7860,6 +7966,7 @@ test_copy_dataset_compact_cmpd_vl(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl
hid_t sid = -1; /* Dataspace ID */
hid_t pid = -1; /* Dataset creation property list ID */
hid_t did = -1, did2 = -1; /* Dataset IDs */
+ hid_t dxpl_id = -1; /* Dataset transfer property list ID */
unsigned int i, j; /* Local index variables */
hsize_t dim1d[1]; /* Dataset dimensions */
cmpd_vl_t buf[DIM_SIZE_1]; /* Buffer for writing data */
@@ -7956,7 +8063,12 @@ test_copy_dataset_compact_cmpd_vl(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl
/* Reclaim vlen buffer */
- if(H5Dvlen_reclaim(tid, sid, H5P_DEFAULT, buf) < 0) TEST_ERROR
+ if(H5Tdetect_class(tid, H5T_VLEN) == TRUE) {
+ if((dxpl_id = H5Pcreate(H5P_DATASET_XFER)) < 0) TEST_ERROR
+ if(H5Pset_vlen_mem_manager(dxpl_id, NULL, NULL, NULL, NULL) < 0) TEST_ERROR
+ if(H5Dvlen_reclaim(tid, sid, dxpl_id, buf) < 0) TEST_ERROR
+ if(H5Pclose(dxpl_id) < 0) TEST_ERROR
+ } /* end if */
/* close datatype */
if(H5Tclose(tid2) < 0) TEST_ERROR
@@ -7973,6 +8085,8 @@ error:
H5Dclose(did2);
H5Dclose(did);
H5Dvlen_reclaim(tid, sid, H5P_DEFAULT, buf);
+ H5Pclose(dxpl_id);
+ H5Pclose(pid);
H5Tclose(tid2);
H5Tclose(tid);
H5Sclose(sid);
diff --git a/test/tgenprop.c b/test/tgenprop.c
index c4f3a3f..b670c0d 100644
--- a/test/tgenprop.c
+++ b/test/tgenprop.c
@@ -1780,7 +1780,7 @@ test_genprop_path(void)
CHECK_PTR(path, "H5P_get_class_path_test");
if(HDstrcmp(path,CLASS1_PATH)!=0)
TestErrPrintf("Class names don't match!, path=%s, CLASS1_PATH=%s\n",path,CLASS1_PATH);
- HDfree(path);
+ H5free_memory(path);
/* Create another new generic class, derived from first class */
cid2 = H5Pcreate_class(cid1,CLASS2_NAME, NULL, NULL, NULL, NULL, NULL, NULL);
@@ -1805,7 +1805,7 @@ test_genprop_path(void)
VERIFY(ret, 1, "H5Pequal");
/* Release the path string */
- HDfree(path);
+ H5free_memory(path);
/* Close class */
ret = H5Pclose_class(cid3);
diff --git a/test/tmisc.c b/test/tmisc.c
index 1298f6b..011486a 100644
--- a/test/tmisc.c
+++ b/test/tmisc.c
@@ -462,7 +462,8 @@ static void test_misc2_write_attribute(void)
ret = H5Aread(att1, type, &data_check);
CHECK(ret, FAIL, "H5Aread");
- HDfree(data_check.string);
+ ret = H5Dvlen_reclaim(type, dataspace, H5P_DEFAULT, &data_check);
+ CHECK(ret, FAIL, "H5Dvlen_reclaim");
ret = H5Aclose(att1);
CHECK(ret, FAIL, "HAclose");
@@ -487,7 +488,8 @@ static void test_misc2_write_attribute(void)
ret = H5Aread(att2, type, &data_check);
CHECK(ret, FAIL, "H5Aread");
- HDfree(data_check.string);
+ ret = H5Dvlen_reclaim(type, dataspace, H5P_DEFAULT, &data_check);
+ CHECK(ret, FAIL, "H5Dvlen_reclaim");
ret = H5Aclose(att2);
CHECK(ret, FAIL, "HAclose");
@@ -514,6 +516,7 @@ static void test_misc2_read_attribute(const char *filename, const char *att_name
{
hid_t file, root, att;
hid_t type;
+ hid_t space;
herr_t ret;
misc2_struct data_check;
@@ -528,10 +531,17 @@ static void test_misc2_read_attribute(const char *filename, const char *att_name
att = H5Aopen(root, att_name, H5P_DEFAULT);
CHECK(att, FAIL, "H5Aopen");
+ space = H5Aget_space(att);
+ CHECK(space, FAIL, "H5Aget_space");
+
ret = H5Aread(att, type, &data_check);
CHECK(ret, FAIL, "H5Aread");
- HDfree(data_check.string);
+ ret = H5Dvlen_reclaim(type, space, H5P_DEFAULT, &data_check);
+ CHECK(ret, FAIL, "H5Dvlen_reclaim");
+
+ ret = H5Sclose(space);
+ CHECK(ret, FAIL, "H5Sclose");
ret = H5Aclose(att);
CHECK(ret, FAIL, "H5Aclose");
diff --git a/test/tvlstr.c b/test/tvlstr.c
index 02bd59d..dbc3083 100644
--- a/test/tvlstr.c
+++ b/test/tvlstr.c
@@ -604,7 +604,7 @@ static void test_write_vl_string_attribute(void)
if(HDstrcmp(string_att_check,string_att) != 0)
TestErrPrintf("VL string attributes don't match!, string_att=%s, string_att_check=%s\n",string_att,string_att_check);
- HDfree(string_att_check);
+ H5free_memory(string_att_check);
string_att_check = NULL;
ret = H5Aclose(att);
@@ -626,7 +626,7 @@ static void test_write_vl_string_attribute(void)
if(HDstrcmp(string_att_check,string_att_write) != 0)
TestErrPrintf("VL string attributes don't match!, string_att_write=%s, string_att_check=%s\n",string_att_write,string_att_check);
- HDfree(string_att_check);
+ H5free_memory(string_att_check);
string_att_check = NULL;
/* The attribute string written is freed below, in the test_read_vl_string_attribute() test */
@@ -687,7 +687,7 @@ static void test_read_vl_string_attribute(void)
if(HDstrcmp(string_att_check,string_att) != 0)
TestErrPrintf("VL string attributes don't match!, string_att=%s, string_att_check=%s\n",string_att,string_att_check);
- HDfree(string_att_check);
+ H5free_memory(string_att_check);
string_att_check = NULL;
ret = H5Aclose(att);
@@ -704,7 +704,7 @@ static void test_read_vl_string_attribute(void)
if(HDstrcmp(string_att_check,string_att_write) != 0)
TestErrPrintf("VL string attributes don't match!, string_att_write=%s, string_att_check=%s\n",string_att_write,string_att_check);
- HDfree(string_att_check);
+ H5free_memory(string_att_check);
string_att_check = NULL;
}
@@ -762,7 +762,8 @@ static void read_scalar_dset(hid_t file, hid_t type, hid_t space, char *name, ch
if(HDstrcmp(data, data_read))
TestErrPrintf("Expected %s for dataset %s but read %s\n", data, name, data_read);
- HDfree(data_read);
+ ret = H5Dvlen_reclaim(type, space, H5P_DEFAULT, &data_read);
+ CHECK(ret, FAIL, "H5Dvlen_reclaim");
}
/****************************************************************